(()=>{var rD=Object.create;var Dc=Object.defineProperty;var iD=Object.getOwnPropertyDescriptor;var sD=Object.getOwnPropertyNames;var oD=Object.getPrototypeOf,aD=Object.prototype.hasOwnProperty;var lD=(n,e,t)=>e in n?Dc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var Fe=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),He=(n,e)=>{for(var t in e)Dc(n,t,{get:e[t],enumerable:!0})},cD=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of sD(e))!aD.call(n,i)&&i!==t&&Dc(n,i,{get:()=>e[i],enumerable:!(r=iD(e,i))||r.enumerable});return n};var Tt=(n,e,t)=>(t=n!=null?rD(oD(n)):{},cD(e||!n||!n.__esModule?Dc(t,"default",{value:n,enumerable:!0}):t,n));var we=(n,e,t)=>(lD(n,typeof e!="symbol"?e+"":e,t),t);var xb=Fe((Db,Sh)=>{(function(n){if(typeof Db=="object"&&typeof Sh<"u")Sh.exports=n();else if(typeof define=="function"&&define.amd)define([],n);else{var e;typeof window<"u"||typeof window<"u"?e=window:typeof self<"u"?e=self:e=this,e.Bugsnag=n()}})(function(){var n,e,t,r=["navigation","request","process","log","user","state","error","manual"],i=function(T,I,N){for(var M=N,z=0,se=T.length;z<se;z++)M=I(M,T[z],z,T);return M},s=function(T,I){return i(T,function(N,M,z,se){return I(M,z,se)?N.concat(M):N},[])},o=function(T,I){return i(T,function(N,M,z,se){return N===!0||M===I},!1)},a=function(T){return Object.prototype.toString.call(T)==="[object Array]"},c=!{toString:null}.propertyIsEnumerable("toString"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=function(T){var I=[],N;for(N in T)Object.prototype.hasOwnProperty.call(T,N)&&I.push(N);if(!c)return I;for(var M=0,z=u.length;M<z;M++)Object.prototype.hasOwnProperty.call(T,u[M])&&I.push(u[M]);return I},p=function(T,I){return T===void 0&&(T=1),I===void 0&&(I=1/0),function(N){return typeof N=="number"&&parseInt(""+N,10)===N&&N>=T&&N<=I}},h=function(T){return typeof T=="function"||a(T)&&s(T,function(I){return typeof I=="function"}).length===T.length},y=function(T){return typeof T=="string"&&!!T.length},_={},w=function(){return{unhandledExceptions:!0,unhandledRejections:!0}};_.schema={apiKey:{defaultValue:function(){return null},message:"is required",validate:y},appVersion:{defaultValue:function(){},message:"should be a string",validate:function(T){return T===void 0||y(T)}},appType:{defaultValue:function(){},message:"should be a string",validate:function(T){return T===void 0||y(T)}},autoDetectErrors:{defaultValue:function(){return!0},message:"should be true|false",validate:function(T){return T===!0||T===!1}},enabledErrorTypes:{defaultValue:function(){return w()},message:"should be an object containing the flags { unhandledExceptions:true|false, unhandledRejections:true|false }",allowPartialObject:!0,validate:function(T){if(typeof T!="object"||!T)return!1;var I=f(T),N=f(w());return!(s(I,function(M){return o(N,M)}).length<I.length||s(f(T),function(M){return typeof T[M]!="boolean"}).length>0)}},onError:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:h},onSession:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:h},onBreadcrumb:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:h},endpoints:{defaultValue:function(){return{notify:"https://notify.bugsnag.com",sessions:"https://sessions.bugsnag.com"}},message:"should be an object containing endpoint URLs { notify, sessions }",validate:function(T){return T&&typeof T=="object"&&y(T.notify)&&y(T.sessions)&&s(f(T),function(I){return!o(["notify","sessions"],I)}).length===0}},autoTrackSessions:{defaultValue:function(T){return!0},message:"should be true|false",validate:function(T){return T===!0||T===!1}},enabledReleaseStages:{defaultValue:function(){return null},message:"should be an array of strings",validate:function(T){return T===null||a(T)&&s(T,function(I){return typeof I=="string"}).length===T.length}},releaseStage:{defaultValue:function(){return"production"},message:"should be a string",validate:function(T){return typeof T=="string"&&T.length}},maxBreadcrumbs:{defaultValue:function(){return 25},message:"should be a number \u2264100",validate:function(T){return p(0,100)(T)}},enabledBreadcrumbTypes:{defaultValue:function(){return r},message:"should be null or a list of available breadcrumb types ("+r.join(",")+")",validate:function(T){return T===null||a(T)&&i(T,function(I,N){return I===!1?I:o(r,N)},!0)}},context:{defaultValue:function(){},message:"should be a string",validate:function(T){return T===void 0||typeof T=="string"}},user:{defaultValue:function(){return{}},message:"should be an object with { id, email, name } properties",validate:function(T){return T===null||T&&i(f(T),function(I,N){return I&&o(["id","email","name"],N)},!0)}},metadata:{defaultValue:function(){return{}},message:"should be an object",validate:function(T){return typeof T=="object"&&T!==null}},logger:{defaultValue:function(){},message:"should be null or an object with methods { debug, info, warn, error }",validate:function(T){return!T||T&&i(["debug","info","warn","error"],function(I,N){return I&&typeof T[N]=="function"},!0)}},redactedKeys:{defaultValue:function(){return["password"]},message:"should be an array of strings|regexes",validate:function(T){return a(T)&&T.length===s(T,function(I){return typeof I=="string"||I&&typeof I.test=="function"}).length}},plugins:{defaultValue:function(){return[]},message:"should be an array of plugin objects",validate:function(T){return a(T)&&T.length===s(T,function(I){return I&&typeof I=="object"&&typeof I.load=="function"}).length}},featureFlags:{defaultValue:function(){return[]},message:'should be an array of objects that have a "name" property',validate:function(T){return a(T)&&T.length===s(T,function(I){return I&&typeof I=="object"&&typeof I.name=="string"}).length}}};var E=function(T){for(var I=1;I<arguments.length;I++){var N=arguments[I];for(var M in N)Object.prototype.hasOwnProperty.call(N,M)&&(T[M]=N[M])}return T},D=function(T,I){return i(T,function(N,M,z,se){return N.concat(I(M,z,se))},[])};function R(){return R=Object.assign||function(T){for(var I=1;I<arguments.length;I++){var N=arguments[I];for(var M in N)Object.prototype.hasOwnProperty.call(N,M)&&(T[M]=N[M])}return T},R.apply(this,arguments)}var H=_.schema,F={releaseStage:E({},H.releaseStage,{defaultValue:function(){return/^localhost(:\d+)?$/.test(window.location.host)?"development":"production"}}),appType:R({},H.appType,{defaultValue:function(){return"browser"}}),logger:E({},H.logger,{defaultValue:function(){return typeof console<"u"&&typeof console.debug=="function"?m():void 0}})},m=function(){var T={},I=console.log;return D(["debug","info","warn","error"],function(N){var M=console[N];T[N]=typeof M=="function"?M.bind(console,"[bugsnag]"):I.bind(console,"[bugsnag]")}),T},Q=function(){function T(N,M,z,se){se===void 0&&(se=new Date),this.type=z,this.message=N,this.metadata=M,this.timestamp=se}var I=T.prototype;return I.toJSON=function(){return{type:this.type,name:this.message,timestamp:this.timestamp,metaData:this.metadata}},T}(),le=Q,J={};(function(T,I){"use strict";typeof n=="function"&&n.amd?n("stackframe",[],I):typeof J=="object"?J=I():T.StackFrame=I()})(this,function(){"use strict";function T(S){return!isNaN(parseFloat(S))&&isFinite(S)}function I(S){return S.charAt(0).toUpperCase()+S.substring(1)}function N(S){return function(){return this[S]}}var M=["isConstructor","isEval","isNative","isToplevel"],z=["columnNumber","lineNumber"],se=["fileName","functionName","source"],fe=["args"],l=M.concat(z,se,fe);function d(S){if(S instanceof Object)for(var x=0;x<l.length;x++)S.hasOwnProperty(l[x])&&S[l[x]]!==void 0&&this["set"+I(l[x])](S[l[x]])}d.prototype={getArgs:function(){return this.args},setArgs:function(S){if(Object.prototype.toString.call(S)!=="[object Array]")throw new TypeError("Args must be an Array");this.args=S},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(S){if(S instanceof d)this.evalOrigin=S;else if(S instanceof Object)this.evalOrigin=new d(S);else throw new TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var S=this.getFunctionName()||"{anonymous}",x="("+(this.getArgs()||[]).join(",")+")",V=this.getFileName()?"@"+this.getFileName():"",B=T(this.getLineNumber())?":"+this.getLineNumber():"",G=T(this.getColumnNumber())?":"+this.getColumnNumber():"";return S+x+V+B+G}};for(var g=0;g<M.length;g++)d.prototype["get"+I(M[g])]=N(M[g]),d.prototype["set"+I(M[g])]=function(S){return function(x){this[S]=Boolean(x)}}(M[g]);for(var v=0;v<z.length;v++)d.prototype["get"+I(z[v])]=N(z[v]),d.prototype["set"+I(z[v])]=function(S){return function(x){if(!T(x))throw new TypeError(S+" must be a Number");this[S]=Number(x)}}(z[v]);for(var A=0;A<se.length;A++)d.prototype["get"+I(se[A])]=N(se[A]),d.prototype["set"+I(se[A])]=function(S){return function(x){this[S]=String(x)}}(se[A]);return d});var q={};(function(T,I){"use strict";typeof n=="function"&&n.amd?n("error-stack-parser",["stackframe"],I):typeof q=="object"?q=I(J):T.ErrorStackParser=I(T.StackFrame)})(this,function(I){"use strict";var N=/(^|@)\S+\:\d+/,M=/^\s*at .*(\S+\:\d+|\(native\))/m,z=/^(eval@)?(\[native code\])?$/;return{parse:function(fe){if(typeof fe.stacktrace<"u"||typeof fe["opera#sourceloc"]<"u")return this.parseOpera(fe);if(fe.stack&&fe.stack.match(M))return this.parseV8OrIE(fe);if(fe.stack)return this.parseFFOrSafari(fe);throw new Error("Cannot parse given Error object")},extractLocation:function(fe){if(fe.indexOf(":")===-1)return[fe];var l=/(.+?)(?:\:(\d+))?(?:\:(\d+))?$/,d=l.exec(fe.replace(/[\(\)]/g,""));return[d[1],d[2]||void 0,d[3]||void 0]},parseV8OrIE:function(fe){var l=fe.stack.split(`
`).filter(function(d){return!!d.match(M)},this);return l.map(function(d){d.indexOf("(eval ")>-1&&(d=d.replace(/eval code/g,"eval").replace(/(\(eval at [^\()]*)|(\)\,.*$)/g,""));var g=d.replace(/^\s+/,"").replace(/\(eval code/g,"("),v=g.match(/ (\((.+):(\d+):(\d+)\)$)/);g=v?g.replace(v[0],""):g;var A=g.split(/\s+/).slice(1),S=this.extractLocation(v?v[1]:A.pop()),x=A.join(" ")||void 0,V=["eval","<anonymous>"].indexOf(S[0])>-1?void 0:S[0];return new I({functionName:x,fileName:V,lineNumber:S[1],columnNumber:S[2],source:d})},this)},parseFFOrSafari:function(fe){var l=fe.stack.split(`
`).filter(function(d){return!d.match(z)},this);return l.map(function(d){if(d.indexOf(" > eval")>-1&&(d=d.replace(/ line (\d+)(?: > eval line \d+)* > eval\:\d+\:\d+/g,":$1")),d.indexOf("@")===-1&&d.indexOf(":")===-1)return new I({functionName:d});var g=/((.*".+"[^@]*)?[^@]*)(?:@)/,v=d.match(g),A=v&&v[1]?v[1]:void 0,S=this.extractLocation(d.replace(g,""));return new I({functionName:A,fileName:S[0],lineNumber:S[1],columnNumber:S[2],source:d})},this)},parseOpera:function(fe){return!fe.stacktrace||fe.message.indexOf(`
`)>-1&&fe.message.split(`
`).length>fe.stacktrace.split(`
`).length?this.parseOpera9(fe):fe.stack?this.parseOpera11(fe):this.parseOpera10(fe)},parseOpera9:function(fe){for(var l=/Line (\d+).*script (?:in )?(\S+)/i,d=fe.message.split(`
`),g=[],v=2,A=d.length;v<A;v+=2){var S=l.exec(d[v]);S&&g.push(new I({fileName:S[2],lineNumber:S[1],source:d[v]}))}return g},parseOpera10:function(fe){for(var l=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,d=fe.stacktrace.split(`
`),g=[],v=0,A=d.length;v<A;v+=2){var S=l.exec(d[v]);S&&g.push(new I({functionName:S[3]||void 0,fileName:S[2],lineNumber:S[1],source:d[v]}))}return g},parseOpera11:function(fe){var l=fe.stack.split(`
`).filter(function(d){return!!d.match(N)&&!d.match(/^Error created at/)},this);return l.map(function(d){var g=d.split("@"),v=this.extractLocation(g.pop()),A=g.shift()||"",S=A.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^\)]*\)/g,"")||void 0,x;A.match(/\(([^\)]*)\)/)&&(x=A.replace(/^[^\(]+\(([^\)]*)\)$/,"$1"));var V=x===void 0||x==="[arguments not available]"?void 0:x.split(",");return new I({functionName:S,args:V,fileName:v[0],lineNumber:v[1],columnNumber:v[2],source:d})},this)}}});var Z=q,ae=function(T,I,N,M){var z=M&&M.redactedKeys?M.redactedKeys:[],se=M&&M.redactedPaths?M.redactedPaths:[];return JSON.stringify(We(T,z,se),I,N)},Ce=20,Ae=25e3,_e=8,Le="...";function Ve(T){return T instanceof Error||/^\[object (Error|(Dom)?Exception)\]$/.test(Object.prototype.toString.call(T))}function $e(T){return"[Throws: "+(T?T.message:"?")+"]"}function pe(T,I){for(var N=0,M=T.length;N<M;N++)if(T[N]===I)return!0;return!1}function ce(T,I){for(var N=0,M=T.length;N<M;N++)if(I.indexOf(T[N])===0)return!0;return!1}function Oe(T,I){for(var N=0,M=T.length;N<M;N++)if(typeof T[N]=="string"&&T[N].toLowerCase()===I.toLowerCase()||T[N]&&typeof T[N].test=="function"&&T[N].test(I))return!0;return!1}function Qe(T){return Object.prototype.toString.call(T)==="[object Array]"}function Ge(T,I){try{return T[I]}catch(N){return $e(N)}}function We(T,I,N){var M=[],z=0;function se(fe,l){function d(){return l.length>_e&&z>Ae}if(z++,l.length>Ce||d())return Le;if(fe===null||typeof fe!="object")return fe;if(pe(M,fe))return"[Circular]";if(M.push(fe),typeof fe.toJSON=="function")try{z--;var g=se(fe.toJSON(),l);return M.pop(),g}catch(ne){return $e(ne)}var v=Ve(fe);if(v){z--;var A=se({name:fe.name,message:fe.message},l);return M.pop(),A}if(Qe(fe)){for(var S=[],x=0,V=fe.length;x<V;x++){if(d()){S.push(Le);break}S.push(se(fe[x],l.concat("[]")))}return M.pop(),S}var B={};try{for(var G in fe)if(Object.prototype.hasOwnProperty.call(fe,G)){if(ce(N,l.join("."))&&Oe(I,G)){B[G]="[REDACTED]";continue}if(d()){B[G]=Le;break}B[G]=se(Ge(fe,G),l.concat(G))}}catch{}return M.pop(),B}return se(T,[])}function lt(T,I,N,M){if(typeof N=="string"){M===void 0?M=null:M!==null&&typeof M!="string"&&(M=ae(M));var z=I[N];if(typeof z=="number"){T[z]={name:N,variant:M};return}T.push({name:N,variant:M}),I[N]=T.length-1}}function xe(T,I,N){if(a(I)){for(var M=0;M<I.length;++M){var z=I[M];z===null||typeof z!="object"||lt(T,N,z.name,z.variant)}return T}}function b(T){return D(s(T,Boolean),function(I){var N=I.name,M=I.variant,z={featureFlag:N};return typeof M=="string"&&(z.variant=M),z})}function C(T,I,N){var M=I[N];typeof M=="number"&&(T[M]=null,delete I[N])}var O={add:lt,clear:C,merge:xe,toEventApi:b},U=function(T){return!!T&&(!!T.stack||!!T.stacktrace||!!T["opera#sourceloc"])&&typeof(T.stack||T.stacktrace||T["opera#sourceloc"])=="string"&&T.stack!==T.name+": "+T.message},K=Y;function Y(T){switch(Object.prototype.toString.call(T)){case"[object Error]":return!0;case"[object Exception]":return!0;case"[object DOMException]":return!0;default:return T instanceof Error}}var ee=K,ge=function(T,I,N,M){var z;if(I){var se;if(N===null)return ue(T,I);typeof N=="object"&&(se=N),typeof N=="string"&&(se=(z={},z[N]=M,z)),se&&(T[I]||(T[I]={}),T[I]=E({},T[I],se))}},be=function(T,I,N){if(typeof I=="string"){if(!N)return T[I];if(T[I])return T[I][N]}},ue=function(T,I,N){if(typeof I=="string"){if(!N){delete T[I];return}T[I]&&delete T[I][N]}},Se={add:ge,get:be,clear:ue},bt={};(function(T,I){"use strict";typeof n=="function"&&n.amd?n("stack-generator",["stackframe"],I):typeof bt=="object"?bt=I(J):T.StackGenerator=I(T.StackFrame)})(this,function(T){return{backtrace:function(N){var M=[],z=10;typeof N=="object"&&typeof N.maxStackSize=="number"&&(z=N.maxStackSize);for(var se=arguments.callee;se&&M.length<z&&se.arguments;){for(var fe=new Array(se.arguments.length),l=0;l<fe.length;++l)fe[l]=se.arguments[l];/function(?:\s+([\w$]+))+\s*\(/.test(se.toString())?M.push(new T({functionName:RegExp.$1||void 0,args:fe})):M.push(new T({args:fe}));try{se=se.caller}catch{break}}return M}}});var nt=function(){function T(N,M,z,se,fe){z===void 0&&(z=[]),se===void 0&&(se=_t()),this.apiKey=void 0,this.context=void 0,this.groupingHash=void 0,this.originalError=fe,this._handledState=se,this.severity=this._handledState.severity,this.unhandled=this._handledState.unhandled,this.app={},this.device={},this.request={},this.breadcrumbs=[],this.threads=[],this._metadata={},this._features=[],this._featuresIndex={},this._user={},this._session=void 0,this.errors=[ke(N,M,T.__type,z)]}var I=T.prototype;return I.addMetadata=function(M,z,se){return Se.add(this._metadata,M,z,se)},I.getMetadata=function(M,z){return Se.get(this._metadata,M,z)},I.clearMetadata=function(M,z){return Se.clear(this._metadata,M,z)},I.addFeatureFlag=function(M,z){z===void 0&&(z=null),O.add(this._features,this._featuresIndex,M,z)},I.addFeatureFlags=function(M){O.merge(this._features,M,this._featuresIndex)},I.getFeatureFlags=function(){return O.toEventApi(this._features)},I.clearFeatureFlag=function(M){O.clear(this._features,this._featuresIndex,M)},I.clearFeatureFlags=function(){this._features=[],this._featuresIndex={}},I.getUser=function(){return this._user},I.setUser=function(M,z,se){this._user={id:M,email:z,name:se}},I.toJSON=function(){return{payloadVersion:"4",exceptions:D(this.errors,function(M){return E({},M,{message:M.errorMessage})}),severity:this.severity,unhandled:this._handledState.unhandled,severityReason:this._handledState.severityReason,app:this.app,device:this.device,request:this.request,breadcrumbs:this.breadcrumbs,context:this.context,groupingHash:this.groupingHash,metaData:this._metadata,user:this._user,session:this._session,featureFlags:this.getFeatureFlags()}},T}(),rt=function(T){var I={file:T.fileName,method:ut(T.functionName),lineNumber:T.lineNumber,columnNumber:T.columnNumber,code:void 0,inProject:void 0};return I.lineNumber>-1&&!I.file&&!I.method&&(I.file="global code"),I},ut=function(T){return/^global code$/i.test(T)?"global code":T},_t=function(){return{unhandled:!1,severity:"warning",severityReason:{type:"handledException"}}},vt=function(T){return typeof T=="string"?T:""};function ke(T,I,N,M){return{errorClass:vt(T),errorMessage:vt(I),type:N,stacktrace:i(M,function(z,se){var fe=rt(se);try{return JSON.stringify(fe)==="{}"?z:z.concat(fe)}catch{return z}},[])}}function kt(T){return T.cause?[T].concat(kt(T.cause)):[T]}nt.getStacktrace=function(T,I,N){if(U(T))return Z.parse(T).slice(I);try{return s(bt.backtrace(),function(M){return(M.functionName||"").indexOf("StackGenerator$$")===-1}).slice(1+N)}catch{return[]}},nt.create=function(T,I,N,M,z,se){z===void 0&&(z=0);var fe=zt(T,I,M,se),l=fe[0],d=fe[1],g;try{var v=nt.getStacktrace(l,d>0?1+d+z:0,1+z);g=new nt(l.name,l.message,v,N,T)}catch{g=new nt(l.name,l.message,[],N,T)}if(l.name==="InvalidError"&&g.addMetadata(""+M,"non-error parameter",Ke(T)),l.cause){var A,S=kt(l).slice(1),x=D(S,function(V){var B=ee(V)&&U(V)?Z.parse(V):[],G=zt(V,!0,"error cause"),ne=G[0];return ne.name==="InvalidError"&&g.addMetadata("error cause",Ke(V)),ke(ne.name,ne.message,nt.__type,B)});(A=g.errors).push.apply(A,x)}return g};var Ke=function(T){return T===null?"null":T===void 0?"undefined":T},zt=function(T,I,N,M){var z,se=0,fe=function(l){var d=N==="error cause"?"was":"received";M&&M.warn(N+" "+d+' a non-error: "'+l+'"');var g=new Error(N+" "+d+' a non-error. See "'+N+'" tab for more detail.');return g.name="InvalidError",g};if(!I)ee(T)?z=T:(z=fe(typeof T),se+=2);else switch(typeof T){case"string":case"number":case"boolean":z=new Error(String(T)),se+=1;break;case"function":z=fe("function"),se+=2;break;case"object":T!==null&&ee(T)?z=T:T!==null&&an(T)?(z=new Error(T.message||T.errorMessage),z.name=T.name||T.errorClass,se+=1):(z=fe(T===null?"null":"unsupported object"),se+=2);break;default:z=fe("nothing"),se+=2}if(!U(z))try{throw z}catch(l){U(l)&&(z=l,se=1)}return[z,se]};nt.__type="browserjs";var an=function(T){return(typeof T.name=="string"||typeof T.errorClass=="string")&&(typeof T.message=="string"||typeof T.errorMessage=="string")},dn=nt,Qn=function(T,I,N){var M=0,z=function(){if(M>=T.length)return N(null,!0);I(T[M],function(se,fe){if(se)return N(se);if(fe===!1)return N(null,!1);M++,z()})};z()},Pt=function(T,I,N,M){var z=function(se,fe){if(typeof se!="function")return fe(null);try{if(se.length!==2){var l=se(I);return l&&typeof l.then=="function"?l.then(function(d){return setTimeout(function(){return fe(null,d)})},function(d){setTimeout(function(){return N(d),fe(null,!0)})}):fe(null,l)}se(I,function(d,g){if(d)return N(d),fe(null);fe(null,g)})}catch(d){N(d),fe(null)}};Qn(T,z,M)},Ot=function(T,I,N,M){for(var z=!1,se=T.slice();!z&&se.length;)try{z=se.pop()(I)===!1}catch(fe){M.error("Error occurred in "+N+" callback, continuing anyway\u2026"),M.error(fe)}return z},Lt=function(I,N){var M="000000000"+I;return M.substr(M.length-N)},ln=typeof window=="object"?window:self,Ft=0;for(var dt in ln)Object.hasOwnProperty.call(ln,dt)&&Ft++;var Xt=navigator.mimeTypes?navigator.mimeTypes.length:0,Hr=Lt((Xt+navigator.userAgent.length).toString(36)+Ft.toString(36),4),so=function(){return Hr},Fn=0,Ar=4,Gt=36,pr=Math.pow(Gt,Ar);function oo(){return Lt((Math.random()*pr<<0).toString(Gt),Ar)}function P(){return Fn=Fn<pr?Fn:0,Fn++,Fn-1}function L(){var T="c",I=new Date().getTime().toString(Gt),N=Lt(P().toString(Gt),Ar),M=so(),z=oo()+oo();return T+I+N+M+z}L.fingerprint=so;var te=L,he=function(){function T(){this.id=te(),this.startedAt=new Date,this._handled=0,this._unhandled=0,this._user={},this.app={},this.device={}}var I=T.prototype;return I.getUser=function(){return this._user},I.setUser=function(M,z,se){this._user={id:M,email:z,name:se}},I.toJSON=function(){return{id:this.id,startedAt:this.startedAt,events:{handled:this._handled,unhandled:this._unhandled}}},I._track=function(M){this[M._handledState.unhandled?"_unhandled":"_handled"]+=1},T}(),Ie=he,Me=O.add,at=O.clear,je=O.merge,it=function(){},Be=function(){function T(N,M,z,se){var fe=this;M===void 0&&(M=_.schema),z===void 0&&(z=[]),this._notifier=se,this._config={},this._schema=M,this._delivery={sendSession:it,sendEvent:it},this._logger={debug:it,info:it,warn:it,error:it},this._plugins={},this._breadcrumbs=[],this._session=null,this._metadata={},this._featuresIndex={},this._features=[],this._context=void 0,this._user={},this._cbs={e:[],s:[],sp:[],b:[]},this.Client=T,this.Event=dn,this.Breadcrumb=le,this.Session=Ie,this._config=this._configure(N,z),D(z.concat(this._config.plugins),function(g){g&&fe._loadPlugin(g)}),this._depth=1;var l=this,d=this.notify;this.notify=function(){return d.apply(l,arguments)}}var I=T.prototype;return I.addMetadata=function(M,z,se){return Se.add(this._metadata,M,z,se)},I.getMetadata=function(M,z){return Se.get(this._metadata,M,z)},I.clearMetadata=function(M,z){return Se.clear(this._metadata,M,z)},I.addFeatureFlag=function(M,z){z===void 0&&(z=null),Me(this._features,this._featuresIndex,M,z)},I.addFeatureFlags=function(M){je(this._features,M,this._featuresIndex)},I.clearFeatureFlag=function(M){at(this._features,this._featuresIndex,M)},I.clearFeatureFlags=function(){this._features=[],this._featuresIndex={}},I.getContext=function(){return this._context},I.setContext=function(M){this._context=M},I._configure=function(M,z){var se=i(z,function(g,v){return v&&v.configSchema?E({},g,v.configSchema):g},this._schema),fe=i(f(se),function(g,v){var A=se[v].defaultValue(M[v]);if(M[v]!==void 0){var S=se[v].validate(M[v]);S?se[v].allowPartialObject?g.config[v]=E(A,M[v]):g.config[v]=M[v]:(g.errors[v]=se[v].message,g.config[v]=A)}else g.config[v]=A;return g},{errors:{},config:{}}),l=fe.errors,d=fe.config;if(se.apiKey){if(!d.apiKey)throw new Error("No Bugsnag API Key set");/^[0-9a-f]{32}$/i.test(d.apiKey)||(l.apiKey="should be a string of 32 hexadecimal characters")}return this._metadata=E({},d.metadata),je(this._features,d.featureFlags,this._featuresIndex),this._user=E({},d.user),this._context=d.context,d.logger&&(this._logger=d.logger),d.onError&&(this._cbs.e=this._cbs.e.concat(d.onError)),d.onBreadcrumb&&(this._cbs.b=this._cbs.b.concat(d.onBreadcrumb)),d.onSession&&(this._cbs.s=this._cbs.s.concat(d.onSession)),f(l).length&&this._logger.warn(Xe(l,M)),d},I.getUser=function(){return this._user},I.setUser=function(M,z,se){this._user={id:M,email:z,name:se}},I._loadPlugin=function(M){var z=M.load(this);return M.name&&(this._plugins["~"+M.name+"~"]=z),this},I.getPlugin=function(M){return this._plugins["~"+M+"~"]},I._setDelivery=function(M){this._delivery=M(this)},I.startSession=function(){var M=new Ie;M.app.releaseStage=this._config.releaseStage,M.app.version=this._config.appVersion,M.app.type=this._config.appType,M._user=E({},this._user);var z=Ot(this._cbs.s,M,"onSession",this._logger);return z?(this._logger.debug("Session not started due to onSession callback"),this):this._sessionDelegate.startSession(this,M)},I.addOnError=function(M,z){z===void 0&&(z=!1),this._cbs.e[z?"unshift":"push"](M)},I.removeOnError=function(M){this._cbs.e=s(this._cbs.e,function(z){return z!==M})},I._addOnSessionPayload=function(M){this._cbs.sp.push(M)},I.addOnSession=function(M){this._cbs.s.push(M)},I.removeOnSession=function(M){this._cbs.s=s(this._cbs.s,function(z){return z!==M})},I.addOnBreadcrumb=function(M,z){z===void 0&&(z=!1),this._cbs.b[z?"unshift":"push"](M)},I.removeOnBreadcrumb=function(M){this._cbs.b=s(this._cbs.b,function(z){return z!==M})},I.pauseSession=function(){return this._sessionDelegate.pauseSession(this)},I.resumeSession=function(){return this._sessionDelegate.resumeSession(this)},I.leaveBreadcrumb=function(M,z,se){if(M=typeof M=="string"?M:"",se=typeof se=="string"&&o(r,se)?se:"manual",z=typeof z=="object"&&z!==null?z:{},!!M){var fe=new le(M,z,se),l=Ot(this._cbs.b,fe,"onBreadcrumb",this._logger);if(l){this._logger.debug("Breadcrumb not attached due to onBreadcrumb callback");return}this._breadcrumbs.push(fe),this._breadcrumbs.length>this._config.maxBreadcrumbs&&(this._breadcrumbs=this._breadcrumbs.slice(this._breadcrumbs.length-this._config.maxBreadcrumbs))}},I._isBreadcrumbTypeEnabled=function(M){var z=this._config.enabledBreadcrumbTypes;return z===null||o(z,M)},I.notify=function(M,z,se){se===void 0&&(se=it);var fe=dn.create(M,!0,void 0,"notify()",this._depth+1,this._logger);this._notify(fe,z,se)},I._notify=function(M,z,se){var fe=this;if(se===void 0&&(se=it),M.app=E({},M.app,{releaseStage:this._config.releaseStage,version:this._config.appVersion,type:this._config.appType}),M.context=M.context||this._context,M._metadata=E({},M._metadata,this._metadata),M._user=E({},M._user,this._user),M.breadcrumbs=this._breadcrumbs.slice(),je(M._features,this._features,M._featuresIndex),this._config.enabledReleaseStages!==null&&!o(this._config.enabledReleaseStages,this._config.releaseStage))return this._logger.warn("Event not sent due to releaseStage/enabledReleaseStages configuration"),se(null,M);var l=M.severity,d=function(v){fe._logger.error("Error occurred in onError callback, continuing anyway\u2026"),fe._logger.error(v)},g=[].concat(this._cbs.e).concat(z);Pt(g,M,d,function(v,A){if(v&&d(v),!A)return fe._logger.debug("Event not sent due to onError callback"),se(null,M);fe._isBreadcrumbTypeEnabled("error")&&T.prototype.leaveBreadcrumb.call(fe,M.errors[0].errorClass,{errorClass:M.errors[0].errorClass,errorMessage:M.errors[0].errorMessage,severity:M.severity},"error"),l!==M.severity&&(M._handledState.severityReason={type:"userCallbackSetSeverity"}),M.unhandled!==M._handledState.unhandled&&(M._handledState.severityReason.unhandledOverridden=!0,M._handledState.unhandled=M.unhandled),fe._session&&(fe._session._track(M),M._session=fe._session),fe._delivery.sendEvent({apiKey:M.apiKey||fe._config.apiKey,notifier:fe._notifier,events:[M]},function(S){return se(S,M)})})},T}(),Xe=function(T,I){var N=new Error(`Invalid configuration
`+D(f(T),function(M){return"  - "+M+" "+T[M]+", got "+mt(I[M])}).join(`

`));return N},mt=function(T){switch(typeof T){case"string":case"number":case"object":return JSON.stringify(T);default:return String(T)}},fn=Be,Bt={},Xn=["events.[].metaData","events.[].breadcrumbs.[].metaData","events.[].request"];Bt.event=function(T,I){var N=ae(T,null,null,{redactedPaths:Xn,redactedKeys:I});if(N.length>1e6&&(T.events[0]._metadata={notifier:`WARNING!
Serialized payload was `+N.length/1e6+`MB (limit = 1MB)
metadata was removed`},N=ae(T,null,null,{redactedPaths:Xn,redactedKeys:I}),N.length>1e6))throw new Error("payload exceeded 1MB limit");return N},Bt.session=function(T,I){var N=ae(T,null,null);if(N.length>1e6)throw new Error("payload exceeded 1MB limit");return N};var Sn={};Sn=function(T,I){return I===void 0&&(I=window),{sendEvent:function(N,M){M===void 0&&(M=function(){});var z=es(T._config,"notify","4",I),se=new I.XDomainRequest;se.onload=function(){M(null)},se.open("POST",z),setTimeout(function(){try{se.send(Bt.event(N,T._config.redactedKeys))}catch(fe){T._logger.error(fe),M(fe)}},0)},sendSession:function(N,M){M===void 0&&(M=function(){});var z=es(T._config,"sessions","1",I),se=new I.XDomainRequest;se.onload=function(){M(null)},se.open("POST",z),setTimeout(function(){try{se.send(Bt.session(N,T._config.redactedKeys))}catch(fe){T._logger.error(fe),M(fe)}},0)}}};var es=function(T,I,N,M){var z=JSON.parse(JSON.stringify(new Date)),se=ts(T.endpoints[I],M.location.protocol);return se+"?apiKey="+encodeURIComponent(T.apiKey)+"&payloadVersion="+N+"&sentAt="+encodeURIComponent(z)},ts=Sn._matchPageProtocol=function(T,I){return I==="http:"?T.replace(/^https:/,"http:"):T},ao=function(T,I){return I===void 0&&(I=window),{sendEvent:function(N,M){M===void 0&&(M=function(){});try{var z=T._config.endpoints.notify,se=new I.XMLHttpRequest;se.onreadystatechange=function(){se.readyState===I.XMLHttpRequest.DONE&&M(null)},se.open("POST",z),se.setRequestHeader("Content-Type","application/json"),se.setRequestHeader("Bugsnag-Api-Key",N.apiKey||T._config.apiKey),se.setRequestHeader("Bugsnag-Payload-Version","4"),se.setRequestHeader("Bugsnag-Sent-At",new Date().toISOString()),se.send(Bt.event(N,T._config.redactedKeys))}catch(fe){T._logger.error(fe)}},sendSession:function(N,M){M===void 0&&(M=function(){});try{var z=T._config.endpoints.sessions,se=new I.XMLHttpRequest;se.onreadystatechange=function(){se.readyState===I.XMLHttpRequest.DONE&&M(null)},se.open("POST",z),se.setRequestHeader("Content-Type","application/json"),se.setRequestHeader("Bugsnag-Api-Key",T._config.apiKey),se.setRequestHeader("Bugsnag-Payload-Version","1"),se.setRequestHeader("Bugsnag-Sent-At",new Date().toISOString()),se.send(Bt.session(N,T._config.redactedKeys))}catch(fe){T._logger.error(fe)}}}},lo=new Date,qr=function(){lo=new Date},co={name:"appDuration",load:function(T){return T.addOnError(function(I){var N=new Date;I.app.duration=N-lo},!0),{reset:qr}}},uo=function(T){return T===void 0&&(T=window),{load:function(I){I.addOnError(function(N){N.context===void 0&&(N.context=T.location.pathname)},!0)}}},vi=function(I,N){var M="000000000"+I;return M.substr(M.length-N)},ns=typeof window=="object"?window:self,fo=0;for(var ma in ns)Object.hasOwnProperty.call(ns,ma)&&fo++;var ih=navigator.mimeTypes?navigator.mimeTypes.length:0,sh=vi((ih+navigator.userAgent.length).toString(36)+fo.toString(36),4),va=function(){return sh},yi=0,rs=4,is=36,hn=Math.pow(is,rs);function Vr(){return vi((Math.random()*hn<<0).toString(is),rs)}function ho(){return yi=yi<hn?yi:0,yi++,yi-1}function ic(){var T="c",I=new Date().getTime().toString(is),N=vi(ho().toString(is),rs),M=va(),z=Vr()+Vr();return T+I+N+M+z}ic.fingerprint=va;var oh=ic,po="bugsnag-anonymous-id",sc=function(){try{var T=window.localStorage,I=T.getItem(po);return I&&/^c[a-z0-9]{20,32}$/.test(I)||(I=oh(),T.setItem(po,I)),I}catch{}},go=function(T,I){return T===void 0&&(T=navigator),I===void 0&&(I=window.screen),{load:function(N){var M={locale:T.browserLanguage||T.systemLanguage||T.userLanguage||T.language,userAgent:T.userAgent};I&&I.orientation&&I.orientation.type?M.orientation=I.orientation.type:M.orientation=document.documentElement.clientWidth>document.documentElement.clientHeight?"landscape":"portrait",N._config.generateAnonymousId&&(M.id=sc()),N.addOnSession(function(z){z.device=E({},z.device,M),N._config.collectUserIp||ya(z)}),N.addOnError(function(z){z.device=E({},z.device,M,{time:new Date}),N._config.collectUserIp||ya(z)},!0)},configSchema:{generateAnonymousId:{validate:function(N){return N===!0||N===!1},defaultValue:function(){return!0},message:"should be true|false"}}}},ya=function(T){var I=T.getUser();(!I||!I.id)&&T.setUser(T.device.id)},ah=function(T){return T===void 0&&(T=window),{load:function(I){I.addOnError(function(N){N.request&&N.request.url||(N.request=E({},N.request,{url:T.location.href}))},!0)}}},lh={load:function(T){T._sessionDelegate=Bn}},Bn={startSession:function(T,I){var N=T;return N._session=I,N._pausedSession=null,N._config.enabledReleaseStages!==null&&!o(N._config.enabledReleaseStages,N._config.releaseStage)?(N._logger.warn("Session not sent due to releaseStage/enabledReleaseStages configuration"),N):(N._delivery.sendSession({notifier:N._notifier,device:I.device,app:I.app,sessions:[{id:I.id,startedAt:I.startedAt,user:I._user}]}),N)},resumeSession:function(T){return T._session?T:T._pausedSession?(T._session=T._pausedSession,T._pausedSession=null,T):T.startSession()},pauseSession:function(T){T._pausedSession=T._session,T._session=null}},oc={load:function(T){T._config.collectUserIp||T.addOnError(function(I){I._user&&typeof I._user.id>"u"&&delete I._user.id,I._user=E({id:"[REDACTED]"},I._user),I.request=E({clientIp:"[REDACTED]"},I.request)})},configSchema:{collectUserIp:{defaultValue:function(){return!0},message:"should be true|false",validate:function(T){return T===!0||T===!1}}}},bi={};bi.load=function(T){var I=/^(local-)?dev(elopment)?$/.test(T._config.releaseStage);I||!T._isBreadcrumbTypeEnabled("log")||D(ch,function(N){var M=console[N];console[N]=function(){for(var z=arguments.length,se=new Array(z),fe=0;fe<z;fe++)se[fe]=arguments[fe];T.leaveBreadcrumb("Console output",i(se,function(l,d,g){var v="[Unknown value]";try{v=String(d)}catch{}if(v==="[object Object]")try{v=JSON.stringify(d)}catch{}return l["["+g+"]"]=v,l},{severity:N.indexOf("group")===0?"log":N}),"log"),M.apply(console,se)},console[N]._restore=function(){console[N]=M}})};var ch=s(["log","debug","info","warn","error"],function(T){return typeof console<"u"&&typeof console[T]=="function"}),ac=200,Dr=5e5,$r=function(T,I){return T===void 0&&(T=document),I===void 0&&(I=window),{load:function(N){if(!N._config.trackInlineScripts)return;var M=I.location.href,z="",se=!!T.attachEvent,fe=se?T.readyState==="complete":T.readyState!=="loading",l=function(){return T.documentElement.outerHTML};z=l();var d=T.onreadystatechange;T.onreadystatechange=function(){T.readyState==="interactive"&&(z=l(),fe=!0);try{d.apply(this,arguments)}catch{}};var g=null,v=function(G){g=G},A=function(){var G=T.currentScript||g;if(!G&&!fe){var ne=T.scripts||T.getElementsByTagName("script");G=ne[ne.length-1]}return G},S=function(G){(!fe||!z)&&(z=l());var ne=["<!-- DOC START -->"].concat(z.split(`
`)),ve=G-1,re=Math.max(ve-3,0),de=Math.min(ve+3,ne.length);return i(ne.slice(re,de),function(Ne,et,qe){return Ne[re+1+qe]=et.length<=ac?et:et.substr(0,ac),Ne},{})};N.addOnError(function(G){G.errors[0].stacktrace=s(G.errors[0].stacktrace,function(de){return!/__trace__$/.test(de.method)});var ne=G.errors[0].stacktrace[0];if(!(ne&&ne.file&&ne.file.replace(/#.*$/,"")!==M.replace(/#.*$/,""))){var ve=A();if(ve){var re=ve.innerHTML;G.addMetadata("script","content",re.length<=Dr?re:re.substr(0,Dr)),ne&&ne.lineNumber&&(ne.code=S(ne.lineNumber))}}},!0);var x=D(["setTimeout","setInterval","setImmediate","requestAnimationFrame"],function(G){return ss(I,G,function(ne){return B(ne,function(ve){return{get:function(){return ve[0]},replace:function(re){ve[0]=re}}})})}),V=x[0];D(["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],function(G){!I[G]||!I[G].prototype||!Object.prototype.hasOwnProperty.call(I[G].prototype,"addEventListener")||(ss(I[G].prototype,"addEventListener",function(ne){return B(ne,lc)}),ss(I[G].prototype,"removeEventListener",function(ne){return B(ne,lc,!0)}))});function B(G,ne,ve){return ve===void 0&&(ve=!1),function(){var re=[].slice.call(arguments);try{var de=ne(re),Ne=de.get();if(ve&&G.apply(this,re),typeof Ne!="function")return G.apply(this,re);if(Ne.__trace__)de.replace(Ne.__trace__);else{var et=A();Ne.__trace__=function(){v(et),V(function(){v(null)},0);var Kt=Ne.apply(this,arguments);return v(null),Kt},Ne.__trace__.__trace__=Ne.__trace__,de.replace(Ne.__trace__)}}catch{}if(G.apply)return G.apply(this,re);switch(re.length){case 1:return G(re[0]);case 2:return G(re[0],re[1]);default:return G()}}}},configSchema:{trackInlineScripts:{validate:function(N){return N===!0||N===!1},defaultValue:function(){return!0},message:"should be true|false"}}}};function ss(T,I,N){var M=T[I];if(!M)return M;var z=N(M);return T[I]=z,M}function lc(T){var I=!!T[1]&&typeof T[1].handleEvent=="function";return{get:function(){return I?T[1].handleEvent:T[1]},replace:function(N){I?T[1].handleEvent=N:T[1]=N}}}var cc=function(T){return T===void 0&&(T=window),{load:function(I){"addEventListener"in T&&I._isBreadcrumbTypeEnabled("user")&&T.addEventListener("click",function(N){var M,z;try{M=uc(N.target),z=Ei(N.target,T)}catch{M="[hidden]",z="[hidden]",I._logger.error("Cross domain error when tracking click event. See docs: https://tinyurl.com/yy3rn63z")}I.leaveBreadcrumb("UI click",{targetText:M,targetSelector:z},"user")},!0)}}},uc=function(T){var I=T.textContent||T.innerText||"";return!I&&(T.type==="submit"||T.type==="button")&&(I=T.value),I=I.replace(/^\s+|\s+$/g,""),dc(I,140)};function Ei(T,I){var N=[T.tagName];if(T.id&&N.push("#"+T.id),T.className&&T.className.length&&N.push("."+T.className.split(" ").join(".")),!I.document.querySelectorAll||!Array.prototype.indexOf)return N.join("");try{if(I.document.querySelectorAll(N.join("")).length===1)return N.join("")}catch{return N.join("")}if(T.parentNode.childNodes.length>1){var M=Array.prototype.indexOf.call(T.parentNode.childNodes,T)+1;N.push(":nth-child("+M+")")}return I.document.querySelectorAll(N.join("")).length===1?N.join(""):T.parentNode?Ei(T.parentNode,I)+" > "+N.join(""):N.join("")}function dc(T,I){var N="(...)";return T&&T.length<=I?T:T.slice(0,I-N.length)+N}var mo={};mo=function(T){T===void 0&&(T=window);var I={load:function(N){if("addEventListener"in T&&N._isBreadcrumbTypeEnabled("navigation")){var M=function(z){return function(){return N.leaveBreadcrumb(z,{},"navigation")}};T.addEventListener("pagehide",M("Page hidden"),!0),T.addEventListener("pageshow",M("Page shown"),!0),T.addEventListener("load",M("Page loaded"),!0),T.document.addEventListener("DOMContentLoaded",M("DOMContentLoaded"),!0),T.addEventListener("load",function(){return T.addEventListener("popstate",M("Navigated back"),!0)}),T.addEventListener("hashchange",function(z){var se=z.oldURL?{from:vo(z.oldURL,T),to:vo(z.newURL,T),state:pc(T)}:{to:vo(T.location.href,T)};N.leaveBreadcrumb("Hash changed",se,"navigation")},!0),T.history.replaceState&&hc(N,T.history,"replaceState",T),T.history.pushState&&hc(N,T.history,"pushState",T)}}};return I};var vo=function(T,I){var N=I.document.createElement("A");return N.href=T,""+N.pathname+N.search+N.hash},fc=function(T,I,N,M){var z=vo(T.location.href,T);return{title:N,state:I,prevState:pc(T),to:M||z,from:z}},hc=function(T,I,N,M){var z=I[N];I[N]=function(se,fe,l){T.leaveBreadcrumb("History "+N,fc(M,se,fe,l),"navigation"),typeof T.resetEventCount=="function"&&T.resetEventCount(),T._config.autoTrackSessions&&T.startSession(),z.apply(I,[se,fe].concat(l!==void 0?l:[]))}},pc=function(T){try{return T.history.state}catch{}},xr="request",uh=function(T,I){T===void 0&&(T=[]),I===void 0&&(I=window);var N=[],M={load:function(z){if(!z._isBreadcrumbTypeEnabled("request"))return;var se=[z._config.endpoints.notify,z._config.endpoints.sessions].concat(T);fe(),g();function fe(){if("addEventListener"in I.XMLHttpRequest.prototype){var S=I.XMLHttpRequest.prototype.open;I.XMLHttpRequest.prototype.open=function(V,B){var G=this,ne=!1,ve=function(){return d(V,B)},re=function(){return l(V,B,G.status)};ne&&(this.removeEventListener("load",re),this.removeEventListener("error",ve)),this.addEventListener("load",re),this.addEventListener("error",ve),ne=!0,S.apply(this,arguments)}}}function l(S,x,V){if(x===void 0){z._logger.warn("The request URL is no longer present on this XMLHttpRequest. A breadcrumb cannot be left for this request.");return}if(!(typeof x=="string"&&o(se,x.replace(/\?.*$/,"")))){var B={status:V,request:S+" "+x};V>=400?z.leaveBreadcrumb("XMLHttpRequest failed",B,xr):z.leaveBreadcrumb("XMLHttpRequest succeeded",B,xr)}}function d(S,x){if(x===void 0){z._logger.warn("The request URL is no longer present on this XMLHttpRequest. A breadcrumb cannot be left for this request.");return}typeof x=="string"&&o(se,x.replace(/\?.*$/,""))||z.leaveBreadcrumb("XMLHttpRequest error",{request:S+" "+x},xr)}function g(){if(!(!("fetch"in I)||I.fetch.polyfill)){var S=I.fetch;I.fetch=function(){var V=arguments,B=arguments[0],G=arguments[1],ne,ve=null;return B&&typeof B=="object"?(ve=B.url,G&&"method"in G?ne=G.method:B&&"method"in B&&(ne=B.method)):(ve=B,G&&"method"in G&&(ne=G.method)),ne===void 0&&(ne="GET"),new Promise(function(re,de){S.apply(void 0,V).then(function(Ne){v(Ne,ne,ve),re(Ne)}).catch(function(Ne){A(ne,ve),de(Ne)})})}}}var v=function(S,x,V){var B={status:S.status,request:x+" "+V};S.status>=400?z.leaveBreadcrumb("fetch() failed",B,xr):z.leaveBreadcrumb("fetch() succeeded",B,xr)},A=function(S,x){z.leaveBreadcrumb("fetch() error",{request:S+" "+x},xr)}}};return M},dh={load:function(T){var I=0;T.addOnError(function(N){if(I>=T._config.maxEvents)return T._logger.warn("Cancelling event send due to maxEvents per session limit of "+T._config.maxEvents+" being reached"),!1;I++}),T.resetEventCount=function(){I=0}},configSchema:{maxEvents:{defaultValue:function(){return 10},message:"should be a positive integer \u2264100",validate:function(T){return p(1,100)(T)}}}},ba={};ba={load:function(T){T.addOnError(function(I){var N=i(I.errors,function(M,z){return M.concat(z.stacktrace)},[]);D(N,function(M){M.file=fh(M.file)})})}};var fh=ba._strip=function(T){return typeof T=="string"?T.replace(/\?.*$/,"").replace(/#.*$/,""):T},hh=function(T){return T===void 0&&(T=window),{load:function(I){if(!I._config.autoDetectErrors||!I._config.enabledErrorTypes.unhandledExceptions)return;function N(z,se,fe,l,d){if(fe===0&&/Script error\.?/.test(z))I._logger.warn("Ignoring cross-domain or eval script error. See docs: https://tinyurl.com/yy3rn63z");else{var g={severity:"error",unhandled:!0,severityReason:{type:"unhandledException"}},v;if(d)v=I.Event.create(d,!0,g,"window onerror",1),gc(v.errors[0].stacktrace,se,fe,l);else if(typeof z=="object"&&z!==null&&(!se||typeof se!="string")&&!fe&&!l&&!d){var A=z.type?"Event: "+z.type:"Error",S=z.message||z.detail||"";v=I.Event.create({name:A,message:S},!0,g,"window onerror",1),v.originalError=z,v.addMetadata("window onerror",{event:z,extraParameters:se})}else v=I.Event.create(z,!0,g,"window onerror",1),gc(v.errors[0].stacktrace,se,fe,l);I._notify(v)}typeof M=="function"&&M.apply(this,arguments)}var M=T.onerror;T.onerror=N}}},gc=function(T,I,N,M){T[0]||T.push({});var z=T[0];!z.file&&typeof I=="string"&&(z.file=I),!z.lineNumber&&Ea(N)&&(z.lineNumber=N),z.columnNumber||(Ea(M)?z.columnNumber=M:window.event&&Ea(window.event.errorCharacter)&&(z.columnNumber=window.event.errorCharacter))},Ea=function(T){return typeof T=="number"&&String.call(T)!=="NaN"},mc,_a=function(T){T===void 0&&(T=window);var I={load:function(N){if(!(!N._config.autoDetectErrors||!N._config.enabledErrorTypes.unhandledRejections)){var M=function(z){var se=z.reason,fe=!1;try{z.detail&&z.detail.reason&&(se=z.detail.reason,fe=!0)}catch{}var l=N.Event.create(se,!1,{severity:"error",unhandled:!0,severityReason:{type:"unhandledPromiseRejection"}},"unhandledrejection handler",1,N._logger);fe&&D(l.errors[0].stacktrace,vc(se)),N._notify(l,function(d){if(ee(d.originalError)&&!d.originalError.stack){var g;d.addMetadata("unhandledRejection handler",(g={},g[Object.prototype.toString.call(d.originalError)]={name:d.originalError.name,message:d.originalError.message,code:d.originalError.code},g))}})};"addEventListener"in T?T.addEventListener("unhandledrejection",M):T.onunhandledrejection=function(z,se){M({detail:{reason:z,promise:se}})},mc=M}}};return I},vc=function(T){return function(I){I.file!==T.toString()&&I.method&&(I.method=I.method.replace(/^\s+/,""))}},gr={},yc="Bugsnag JavaScript",bc="7.17.4",wa="https://github.com/bugsnag/bugsnag-js",ph=E({},_.schema,F),pn={_client:null,createClient:function(T){typeof T=="string"&&(T={apiKey:T}),T||(T={});var I=[co,go(),uo(),ah(),dh,lh,oc,ba,hh(),_a(),mo(),cc(),uh(),bi,$r()],N=new fn(T,ph,I,{name:yc,version:bc,url:wa});return N._setDelivery(window.XDomainRequest?Sn:ao),N._logger.debug("Loaded!"),N.leaveBreadcrumb("Bugsnag loaded",{},"state"),N._config.autoTrackSessions?N.startSession():N},start:function(T){return pn._client?(pn._client._logger.warn("Bugsnag.start() was called more than once. Ignoring."),pn._client):(pn._client=pn.createClient(T),pn._client)},isStarted:function(){return pn._client!=null}};return D(["resetEventCount"].concat(f(fn.prototype)),function(T){/^_/.test(T)||(pn[T]=function(){if(!pn._client)return console.log("Bugsnag."+T+"() was called before Bugsnag.start()");pn._client._depth+=1;var I=pn._client[T].apply(pn._client,arguments);return pn._client._depth-=1,I})}),gr=pn,gr.Client=fn,gr.Event=dn,gr.Session=Ie,gr.Breadcrumb=le,gr.default=pn,gr})});var Ib=Fe((yj,Ob)=>{Ob.exports=xb()});var On=Fe((kb,xc)=>{(function(){var n=this;(function(){(function(){this.Rails={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]",buttonClickSelector:{selector:"button[data-remote]:not([form]), button[data-confirm]:not([form])",exclude:"form button"},inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form:not([data-turbo=true])",formInputClickSelector:"form:not([data-turbo=true]) input[type=submit], form:not([data-turbo=true]) input[type=image], form:not([data-turbo=true]) button[type=submit], form:not([data-turbo=true]) button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])",formDisableSelector:"input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled",formEnableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled",fileInputSelector:"input[name][type=file]:not([disabled])",linkDisableSelector:"a[data-disable-with], a[data-disable]",buttonDisableSelector:"button[data-remote][data-disable-with], button[data-remote][data-disable]"}}).call(this)}).call(n);var e=n.Rails;(function(){(function(){var t;t=null,e.loadCSPNonce=function(){var r;return t=(r=document.querySelector("meta[name=csp-nonce]"))!=null?r.content:void 0},e.cspNonce=function(){return t??e.loadCSPNonce()}}).call(this),function(){var t,r;r=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector,e.matches=function(i,s){return s.exclude!=null?r.call(i,s.selector)&&!r.call(i,s.exclude):r.call(i,s)},t="_ujsData",e.getData=function(i,s){var o;return(o=i[t])!=null?o[s]:void 0},e.setData=function(i,s,o){return i[t]==null&&(i[t]={}),i[t][s]=o},e.$=function(i){return Array.prototype.slice.call(document.querySelectorAll(i))}}.call(this),function(){var t,r,i;t=e.$,i=e.csrfToken=function(){var s;return s=document.querySelector("meta[name=csrf-token]"),s&&s.content},r=e.csrfParam=function(){var s;return s=document.querySelector("meta[name=csrf-param]"),s&&s.content},e.CSRFProtection=function(s){var o;if(o=i(),o!=null)return s.setRequestHeader("X-CSRF-Token",o)},e.refreshCSRFTokens=function(){var s,o;if(o=i(),s=r(),o!=null&&s!=null)return t('form input[name="'+s+'"]').forEach(function(a){return a.value=o})}}.call(this),function(){var t,r,i,s;i=e.matches,t=window.CustomEvent,typeof t!="function"&&(t=function(o,a){var c;return c=document.createEvent("CustomEvent"),c.initCustomEvent(o,a.bubbles,a.cancelable,a.detail),c},t.prototype=window.Event.prototype,s=t.prototype.preventDefault,t.prototype.preventDefault=function(){var o;return o=s.call(this),this.cancelable&&!this.defaultPrevented&&Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}}),o}),r=e.fire=function(o,a,c){var u;return u=new t(a,{bubbles:!0,cancelable:!0,detail:c}),o.dispatchEvent(u),!u.defaultPrevented},e.stopEverything=function(o){return r(o.target,"ujs:everythingStopped"),o.preventDefault(),o.stopPropagation(),o.stopImmediatePropagation()},e.delegate=function(o,a,c,u){return o.addEventListener(c,function(f){var p;for(p=f.target;!(!(p instanceof Element)||i(p,a));)p=p.parentNode;if(p instanceof Element&&u.call(p,f)===!1)return f.preventDefault(),f.stopPropagation()})}}.call(this),function(){var t,r,i,s,o,a,c;s=e.cspNonce,r=e.CSRFProtection,o=e.fire,t={"*":"*/*",text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript",script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},e.ajax=function(u){var f;if(u=a(u),f=i(u,function(){var p,h;return h=c((p=f.response)!=null?p:f.responseText,f.getResponseHeader("Content-Type")),Math.floor(f.status/100)===2?typeof u.success=="function"&&u.success(h,f.statusText,f):typeof u.error=="function"&&u.error(h,f.statusText,f),typeof u.complete=="function"?u.complete(f,f.statusText):void 0}),u.beforeSend!=null&&!u.beforeSend(f,u))return!1;if(f.readyState===XMLHttpRequest.OPENED)return f.send(u.data)},a=function(u){return u.url=u.url||location.href,u.type=u.type.toUpperCase(),u.type==="GET"&&u.data&&(u.url.indexOf("?")<0?u.url+="?"+u.data:u.url+="&"+u.data),t[u.dataType]==null&&(u.dataType="*"),u.accept=t[u.dataType],u.dataType!=="*"&&(u.accept+=", */*; q=0.01"),u},i=function(u,f){var p;return p=new XMLHttpRequest,p.open(u.type,u.url,!0),p.setRequestHeader("Accept",u.accept),typeof u.data=="string"&&p.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),u.crossDomain||(p.setRequestHeader("X-Requested-With","XMLHttpRequest"),r(p)),p.withCredentials=!!u.withCredentials,p.onreadystatechange=function(){if(p.readyState===XMLHttpRequest.DONE)return f(p)},p},c=function(u,f){var p,h;if(typeof u=="string"&&typeof f=="string"){if(f.match(/\bjson\b/))try{u=JSON.parse(u)}catch{}else if(f.match(/\b(?:java|ecma)script\b/))h=document.createElement("script"),h.setAttribute("nonce",s()),h.text=u,document.head.appendChild(h).parentNode.removeChild(h);else if(f.match(/\b(xml|html|svg)\b/)){p=new DOMParser,f=f.replace(/;.+/,"");try{u=p.parseFromString(u,f)}catch{}}}return u},e.href=function(u){return u.href},e.isCrossDomain=function(u){var f,p,h;p=document.createElement("a"),p.href=location.href,h=document.createElement("a");try{return h.href=u,!((!h.protocol||h.protocol===":")&&!h.host||p.protocol+"//"+p.host==h.protocol+"//"+h.host)}catch(y){return f=y,!0}}}.call(this),function(){var t,r;t=e.matches,r=function(i){return Array.prototype.slice.call(i)},e.serializeElement=function(i,s){var o,a;return o=[i],t(i,"form")&&(o=r(i.elements)),a=[],o.forEach(function(c){if(!(!c.name||c.disabled)&&!t(c,"fieldset[disabled] *")){if(t(c,"select"))return r(c.options).forEach(function(u){if(u.selected)return a.push({name:c.name,value:u.value})});if(c.checked||["radio","checkbox","submit"].indexOf(c.type)===-1)return a.push({name:c.name,value:c.value})}}),s&&a.push(s),a.map(function(c){return c.name!=null?encodeURIComponent(c.name)+"="+encodeURIComponent(c.value):c}).join("&")},e.formElements=function(i,s){return t(i,"form")?r(i.elements).filter(function(o){return t(o,s)}):r(i.querySelectorAll(s))}}.call(this),function(){var t,r,i;r=e.fire,i=e.stopEverything,e.handleConfirm=function(s){if(!t(this))return i(s)},e.confirm=function(s,o){return confirm(s)},t=function(s){var o,a,c;if(c=s.getAttribute("data-confirm"),!c)return!0;if(o=!1,r(s,"confirm")){try{o=e.confirm(c,s)}catch{}a=r(s,"confirm:complete",[o])}return o&&a}}.call(this),function(){var t,r,i,s,o,a,c,u,f,p,h,y;p=e.matches,u=e.getData,h=e.setData,y=e.stopEverything,c=e.formElements,e.handleDisabledElement=function(_){var w;if(w=this,w.disabled)return y(_)},e.enableElement=function(_){var w;if(_ instanceof Event){if(f(_))return;w=_.target}else w=_;if(p(w,e.linkDisableSelector))return a(w);if(p(w,e.buttonDisableSelector)||p(w,e.formEnableSelector))return s(w);if(p(w,e.formSubmitSelector))return o(w)},e.disableElement=function(_){var w;if(w=_ instanceof Event?_.target:_,p(w,e.linkDisableSelector))return i(w);if(p(w,e.buttonDisableSelector)||p(w,e.formDisableSelector))return t(w);if(p(w,e.formSubmitSelector))return r(w)},i=function(_){var w;if(!u(_,"ujs:disabled"))return w=_.getAttribute("data-disable-with"),w!=null&&(h(_,"ujs:enable-with",_.innerHTML),_.innerHTML=w),_.addEventListener("click",y),h(_,"ujs:disabled",!0)},a=function(_){var w;return w=u(_,"ujs:enable-with"),w!=null&&(_.innerHTML=w,h(_,"ujs:enable-with",null)),_.removeEventListener("click",y),h(_,"ujs:disabled",null)},r=function(_){return c(_,e.formDisableSelector).forEach(t)},t=function(_){var w;if(!u(_,"ujs:disabled"))return w=_.getAttribute("data-disable-with"),w!=null&&(p(_,"button")?(h(_,"ujs:enable-with",_.innerHTML),_.innerHTML=w):(h(_,"ujs:enable-with",_.value),_.value=w)),_.disabled=!0,h(_,"ujs:disabled",!0)},o=function(_){return c(_,e.formEnableSelector).forEach(s)},s=function(_){var w;return w=u(_,"ujs:enable-with"),w!=null&&(p(_,"button")?_.innerHTML=w:_.value=w,h(_,"ujs:enable-with",null)),_.disabled=!1,h(_,"ujs:disabled",null)},f=function(_){var w,E;return E=(w=_.detail)!=null?w[0]:void 0,E?.getResponseHeader("X-Xhr-Redirect")!=null}}.call(this),function(){var t;t=e.stopEverything,e.handleMethod=function(r){var i,s,o,a,c,u,f;if(u=this,f=u.getAttribute("data-method"),!!f)return c=e.href(u),s=e.csrfToken(),i=e.csrfParam(),o=document.createElement("form"),a="<input name='_method' value='"+f+"' type='hidden' />",i!=null&&s!=null&&!e.isCrossDomain(c)&&(a+="<input name='"+i+"' value='"+s+"' type='hidden' />"),a+='<input type="submit" />',o.method="post",o.action=c,o.target=u.target,o.innerHTML=a,o.style.display="none",document.body.appendChild(o),o.querySelector('[type="submit"]').click(),t(r)}}.call(this),function(){var t,r,i,s,o,a,c,u,f,p=[].slice;a=e.matches,i=e.getData,u=e.setData,r=e.fire,f=e.stopEverything,t=e.ajax,s=e.isCrossDomain,c=e.serializeElement,o=function(h){var y;return y=h.getAttribute("data-remote"),y!=null&&y!=="false"},e.handleRemote=function(h){var y,_,w,E,D,R,H;return E=this,o(E)?r(E,"ajax:before")?(H=E.getAttribute("data-with-credentials"),w=E.getAttribute("data-type")||"script",a(E,e.formSubmitSelector)?(y=i(E,"ujs:submit-button"),D=i(E,"ujs:submit-button-formmethod")||E.method,R=i(E,"ujs:submit-button-formaction")||E.getAttribute("action")||location.href,D.toUpperCase()==="GET"&&(R=R.replace(/\?.*$/,"")),E.enctype==="multipart/form-data"?(_=new FormData(E),y!=null&&_.append(y.name,y.value)):_=c(E,y),u(E,"ujs:submit-button",null),u(E,"ujs:submit-button-formmethod",null),u(E,"ujs:submit-button-formaction",null)):a(E,e.buttonClickSelector)||a(E,e.inputChangeSelector)?(D=E.getAttribute("data-method"),R=E.getAttribute("data-url"),_=c(E,E.getAttribute("data-params"))):(D=E.getAttribute("data-method"),R=e.href(E),_=E.getAttribute("data-params")),t({type:D||"GET",url:R,data:_,dataType:w,beforeSend:function(F,m){return r(E,"ajax:beforeSend",[F,m])?r(E,"ajax:send",[F]):(r(E,"ajax:stopped"),!1)},success:function(){var F;return F=1<=arguments.length?p.call(arguments,0):[],r(E,"ajax:success",F)},error:function(){var F;return F=1<=arguments.length?p.call(arguments,0):[],r(E,"ajax:error",F)},complete:function(){var F;return F=1<=arguments.length?p.call(arguments,0):[],r(E,"ajax:complete",F)},crossDomain:s(R),withCredentials:H!=null&&H!=="false"}),f(h)):(r(E,"ajax:stopped"),!1):!0},e.formSubmitButtonClick=function(h){var y,_;if(y=this,_=y.form,!!_)return y.name&&u(_,"ujs:submit-button",{name:y.name,value:y.value}),u(_,"ujs:formnovalidate-button",y.formNoValidate),u(_,"ujs:submit-button-formaction",y.getAttribute("formaction")),u(_,"ujs:submit-button-formmethod",y.getAttribute("formmethod"))},e.preventInsignificantClick=function(h){var y,_,w,E,D,R;if(w=this,D=(w.getAttribute("data-method")||"GET").toUpperCase(),y=w.getAttribute("data-params"),E=h.metaKey||h.ctrlKey,_=E&&D==="GET"&&!y,R=h.button!=null&&h.button!==0,R||_)return h.stopImmediatePropagation()}}.call(this),function(){var t,r,i,s,o,a,c,u,f,p,h,y,_,w,E;if(a=e.fire,i=e.delegate,u=e.getData,t=e.$,E=e.refreshCSRFTokens,r=e.CSRFProtection,_=e.loadCSPNonce,o=e.enableElement,s=e.disableElement,p=e.handleDisabledElement,f=e.handleConfirm,w=e.preventInsignificantClick,y=e.handleRemote,c=e.formSubmitButtonClick,h=e.handleMethod,typeof jQuery<"u"&&jQuery!==null&&jQuery.ajax!=null){if(jQuery.rails)throw new Error("If you load both jquery_ujs and rails-ujs, use rails-ujs only.");jQuery.rails=e,jQuery.ajaxPrefilter(function(D,R,H){if(!D.crossDomain)return r(H)})}e.start=function(){if(window._rails_loaded)throw new Error("rails-ujs has already been loaded!");return window.addEventListener("pageshow",function(){return t(e.formEnableSelector).forEach(function(D){if(u(D,"ujs:disabled"))return o(D)}),t(e.linkDisableSelector).forEach(function(D){if(u(D,"ujs:disabled"))return o(D)})}),i(document,e.linkDisableSelector,"ajax:complete",o),i(document,e.linkDisableSelector,"ajax:stopped",o),i(document,e.buttonDisableSelector,"ajax:complete",o),i(document,e.buttonDisableSelector,"ajax:stopped",o),i(document,e.linkClickSelector,"click",w),i(document,e.linkClickSelector,"click",p),i(document,e.linkClickSelector,"click",f),i(document,e.linkClickSelector,"click",s),i(document,e.linkClickSelector,"click",y),i(document,e.linkClickSelector,"click",h),i(document,e.buttonClickSelector,"click",w),i(document,e.buttonClickSelector,"click",p),i(document,e.buttonClickSelector,"click",f),i(document,e.buttonClickSelector,"click",s),i(document,e.buttonClickSelector,"click",y),i(document,e.inputChangeSelector,"change",p),i(document,e.inputChangeSelector,"change",f),i(document,e.inputChangeSelector,"change",y),i(document,e.formSubmitSelector,"submit",p),i(document,e.formSubmitSelector,"submit",f),i(document,e.formSubmitSelector,"submit",y),i(document,e.formSubmitSelector,"submit",function(D){return setTimeout(function(){return s(D)},13)}),i(document,e.formSubmitSelector,"ajax:send",s),i(document,e.formSubmitSelector,"ajax:complete",o),i(document,e.formInputClickSelector,"click",w),i(document,e.formInputClickSelector,"click",p),i(document,e.formInputClickSelector,"click",f),i(document,e.formInputClickSelector,"click",c),document.addEventListener("DOMContentLoaded",E),document.addEventListener("DOMContentLoaded",_),window._rails_loaded=!0},window.Rails===e&&a(document,"rails:attachBindings")&&e.start()}.call(this)}).call(this),typeof xc=="object"&&xc.exports?xc.exports=e:typeof define=="function"&&define.amd&&define(e)}).call(kb)});var Mb=Fe((Rb,Oc)=>{(function(){var n=this;(function(){(function(){this.Turbolinks={supported:function(){return window.history.pushState!=null&&window.requestAnimationFrame!=null&&window.addEventListener!=null}(),visit:function(t,r){return e.controller.visit(t,r)},clearCache:function(){return e.controller.clearCache()},setProgressBarDelay:function(t){return e.controller.setProgressBarDelay(t)}}}).call(this)}).call(n);var e=n.Turbolinks;(function(){(function(){var t,r,i,s=[].slice;e.copyObject=function(o){var a,c,u;c={};for(a in o)u=o[a],c[a]=u;return c},e.closest=function(o,a){return t.call(o,a)},t=function(){var o,a;return o=document.documentElement,(a=o.closest)!=null?a:function(c){var u;for(u=this;u;){if(u.nodeType===Node.ELEMENT_NODE&&r.call(u,c))return u;u=u.parentNode}}}(),e.defer=function(o){return setTimeout(o,1)},e.throttle=function(o){var a;return a=null,function(){var c;return c=1<=arguments.length?s.call(arguments,0):[],a??(a=requestAnimationFrame(function(u){return function(){return a=null,o.apply(u,c)}}(this)))}},e.dispatch=function(o,a){var c,u,f,p,h,y;return h=a??{},y=h.target,c=h.cancelable,u=h.data,f=document.createEvent("Events"),f.initEvent(o,!0,c===!0),f.data=u??{},f.cancelable&&!i&&(p=f.preventDefault,f.preventDefault=function(){return this.defaultPrevented||Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}}),p.call(this)}),(y??document).dispatchEvent(f),f},i=function(){var o;return o=document.createEvent("Events"),o.initEvent("test",!0,!0),o.preventDefault(),o.defaultPrevented}(),e.match=function(o,a){return r.call(o,a)},r=function(){var o,a,c,u;return o=document.documentElement,(a=(c=(u=o.matchesSelector)!=null?u:o.webkitMatchesSelector)!=null?c:o.msMatchesSelector)!=null?a:o.mozMatchesSelector}(),e.uuid=function(){var o,a,c;for(c="",o=a=1;36>=a;o=++a)c+=o===9||o===14||o===19||o===24?"-":o===15?"4":o===20?(Math.floor(4*Math.random())+8).toString(16):Math.floor(15*Math.random()).toString(16);return c}}).call(this),function(){e.Location=function(){function t(a){var c,u;a==null&&(a=""),u=document.createElement("a"),u.href=a.toString(),this.absoluteURL=u.href,c=u.hash.length,2>c?this.requestURL=this.absoluteURL:(this.requestURL=this.absoluteURL.slice(0,-c),this.anchor=u.hash.slice(1))}var r,i,s,o;return t.wrap=function(a){return a instanceof this?a:new this(a)},t.prototype.getOrigin=function(){return this.absoluteURL.split("/",3).join("/")},t.prototype.getPath=function(){var a,c;return(a=(c=this.requestURL.match(/\/\/[^\/]*(\/[^?;]*)/))!=null?c[1]:void 0)!=null?a:"/"},t.prototype.getPathComponents=function(){return this.getPath().split("/").slice(1)},t.prototype.getLastPathComponent=function(){return this.getPathComponents().slice(-1)[0]},t.prototype.getExtension=function(){var a,c;return(a=(c=this.getLastPathComponent().match(/\.[^.]*$/))!=null?c[0]:void 0)!=null?a:""},t.prototype.isHTML=function(){return this.getExtension().match(/^(?:|\.(?:htm|html|xhtml))$/)},t.prototype.isPrefixedBy=function(a){var c;return c=i(a),this.isEqualTo(a)||o(this.absoluteURL,c)},t.prototype.isEqualTo=function(a){return this.absoluteURL===a?.absoluteURL},t.prototype.toCacheKey=function(){return this.requestURL},t.prototype.toJSON=function(){return this.absoluteURL},t.prototype.toString=function(){return this.absoluteURL},t.prototype.valueOf=function(){return this.absoluteURL},i=function(a){return r(a.getOrigin()+a.getPath())},r=function(a){return s(a,"/")?a:a+"/"},o=function(a,c){return a.slice(0,c.length)===c},s=function(a,c){return a.slice(-c.length)===c},t}()}.call(this),function(){var t=function(r,i){return function(){return r.apply(i,arguments)}};e.HttpRequest=function(){function r(i,s,o){this.delegate=i,this.requestCanceled=t(this.requestCanceled,this),this.requestTimedOut=t(this.requestTimedOut,this),this.requestFailed=t(this.requestFailed,this),this.requestLoaded=t(this.requestLoaded,this),this.requestProgressed=t(this.requestProgressed,this),this.url=e.Location.wrap(s).requestURL,this.referrer=e.Location.wrap(o).absoluteURL,this.createXHR()}return r.NETWORK_FAILURE=0,r.TIMEOUT_FAILURE=-1,r.timeout=60,r.prototype.send=function(){var i;return this.xhr&&!this.sent?(this.notifyApplicationBeforeRequestStart(),this.setProgress(0),this.xhr.send(),this.sent=!0,typeof(i=this.delegate).requestStarted=="function"?i.requestStarted():void 0):void 0},r.prototype.cancel=function(){return this.xhr&&this.sent?this.xhr.abort():void 0},r.prototype.requestProgressed=function(i){return i.lengthComputable?this.setProgress(i.loaded/i.total):void 0},r.prototype.requestLoaded=function(){return this.endRequest(function(i){return function(){var s;return 200<=(s=i.xhr.status)&&300>s?i.delegate.requestCompletedWithResponse(i.xhr.responseText,i.xhr.getResponseHeader("Turbolinks-Location")):(i.failed=!0,i.delegate.requestFailedWithStatusCode(i.xhr.status,i.xhr.responseText))}}(this))},r.prototype.requestFailed=function(){return this.endRequest(function(i){return function(){return i.failed=!0,i.delegate.requestFailedWithStatusCode(i.constructor.NETWORK_FAILURE)}}(this))},r.prototype.requestTimedOut=function(){return this.endRequest(function(i){return function(){return i.failed=!0,i.delegate.requestFailedWithStatusCode(i.constructor.TIMEOUT_FAILURE)}}(this))},r.prototype.requestCanceled=function(){return this.endRequest()},r.prototype.notifyApplicationBeforeRequestStart=function(){return e.dispatch("turbolinks:request-start",{data:{url:this.url,xhr:this.xhr}})},r.prototype.notifyApplicationAfterRequestEnd=function(){return e.dispatch("turbolinks:request-end",{data:{url:this.url,xhr:this.xhr}})},r.prototype.createXHR=function(){return this.xhr=new XMLHttpRequest,this.xhr.open("GET",this.url,!0),this.xhr.timeout=1e3*this.constructor.timeout,this.xhr.setRequestHeader("Accept","text/html, application/xhtml+xml"),this.xhr.setRequestHeader("Turbolinks-Referrer",this.referrer),this.xhr.onprogress=this.requestProgressed,this.xhr.onload=this.requestLoaded,this.xhr.onerror=this.requestFailed,this.xhr.ontimeout=this.requestTimedOut,this.xhr.onabort=this.requestCanceled},r.prototype.endRequest=function(i){return this.xhr?(this.notifyApplicationAfterRequestEnd(),i?.call(this),this.destroy()):void 0},r.prototype.setProgress=function(i){var s;return this.progress=i,typeof(s=this.delegate).requestProgressed=="function"?s.requestProgressed(this.progress):void 0},r.prototype.destroy=function(){var i;return this.setProgress(1),typeof(i=this.delegate).requestFinished=="function"&&i.requestFinished(),this.delegate=null,this.xhr=null},r}()}.call(this),function(){var t=function(r,i){return function(){return r.apply(i,arguments)}};e.ProgressBar=function(){function r(){this.trickle=t(this.trickle,this),this.stylesheetElement=this.createStylesheetElement(),this.progressElement=this.createProgressElement()}var i;return i=300,r.defaultCSS=`.turbolinks-progress-bar {
  position: fixed;
  display: block;
  top: 0;
  left: 0;
  height: 3px;
  background: #0076ff;
  z-index: 9999;
  transition: width `+i+"ms ease-out, opacity "+i/2+"ms "+i/2+`ms ease-in;
  transform: translate3d(0, 0, 0);
}`,r.prototype.show=function(){return this.visible?void 0:(this.visible=!0,this.installStylesheetElement(),this.installProgressElement(),this.startTrickling())},r.prototype.hide=function(){return this.visible&&!this.hiding?(this.hiding=!0,this.fadeProgressElement(function(s){return function(){return s.uninstallProgressElement(),s.stopTrickling(),s.visible=!1,s.hiding=!1}}(this))):void 0},r.prototype.setValue=function(s){return this.value=s,this.refresh()},r.prototype.installStylesheetElement=function(){return document.head.insertBefore(this.stylesheetElement,document.head.firstChild)},r.prototype.installProgressElement=function(){return this.progressElement.style.width=0,this.progressElement.style.opacity=1,document.documentElement.insertBefore(this.progressElement,document.body),this.refresh()},r.prototype.fadeProgressElement=function(s){return this.progressElement.style.opacity=0,setTimeout(s,1.5*i)},r.prototype.uninstallProgressElement=function(){return this.progressElement.parentNode?document.documentElement.removeChild(this.progressElement):void 0},r.prototype.startTrickling=function(){return this.trickleInterval!=null?this.trickleInterval:this.trickleInterval=setInterval(this.trickle,i)},r.prototype.stopTrickling=function(){return clearInterval(this.trickleInterval),this.trickleInterval=null},r.prototype.trickle=function(){return this.setValue(this.value+Math.random()/100)},r.prototype.refresh=function(){return requestAnimationFrame(function(s){return function(){return s.progressElement.style.width=10+90*s.value+"%"}}(this))},r.prototype.createStylesheetElement=function(){var s;return s=document.createElement("style"),s.type="text/css",s.textContent=this.constructor.defaultCSS,s},r.prototype.createProgressElement=function(){var s;return s=document.createElement("div"),s.className="turbolinks-progress-bar",s},r}()}.call(this),function(){var t=function(r,i){return function(){return r.apply(i,arguments)}};e.BrowserAdapter=function(){function r(a){this.controller=a,this.showProgressBar=t(this.showProgressBar,this),this.progressBar=new e.ProgressBar}var i,s,o;return o=e.HttpRequest,i=o.NETWORK_FAILURE,s=o.TIMEOUT_FAILURE,r.prototype.visitProposedToLocationWithAction=function(a,c){return this.controller.startVisitToLocationWithAction(a,c)},r.prototype.visitStarted=function(a){return a.issueRequest(),a.changeHistory(),a.loadCachedSnapshot()},r.prototype.visitRequestStarted=function(a){return this.progressBar.setValue(0),a.hasCachedSnapshot()||a.action!=="restore"?this.showProgressBarAfterDelay():this.showProgressBar()},r.prototype.visitRequestProgressed=function(a){return this.progressBar.setValue(a.progress)},r.prototype.visitRequestCompleted=function(a){return a.loadResponse()},r.prototype.visitRequestFailedWithStatusCode=function(a,c){switch(c){case i:case s:return this.reload();default:return a.loadResponse()}},r.prototype.visitRequestFinished=function(a){return this.hideProgressBar()},r.prototype.visitCompleted=function(a){return a.followRedirect()},r.prototype.pageInvalidated=function(){return this.reload()},r.prototype.showProgressBarAfterDelay=function(){return this.progressBarTimeout=setTimeout(this.showProgressBar,this.controller.progressBarDelay)},r.prototype.showProgressBar=function(){return this.progressBar.show()},r.prototype.hideProgressBar=function(){return this.progressBar.hide(),clearTimeout(this.progressBarTimeout)},r.prototype.reload=function(){return window.location.reload()},r}()}.call(this),function(){var t=function(r,i){return function(){return r.apply(i,arguments)}};e.History=function(){function r(i){this.delegate=i,this.onPageLoad=t(this.onPageLoad,this),this.onPopState=t(this.onPopState,this)}return r.prototype.start=function(){return this.started?void 0:(addEventListener("popstate",this.onPopState,!1),addEventListener("load",this.onPageLoad,!1),this.started=!0)},r.prototype.stop=function(){return this.started?(removeEventListener("popstate",this.onPopState,!1),removeEventListener("load",this.onPageLoad,!1),this.started=!1):void 0},r.prototype.push=function(i,s){return i=e.Location.wrap(i),this.update("push",i,s)},r.prototype.replace=function(i,s){return i=e.Location.wrap(i),this.update("replace",i,s)},r.prototype.onPopState=function(i){var s,o,a,c;return this.shouldHandlePopState()&&(c=(o=i.state)!=null?o.turbolinks:void 0)?(s=e.Location.wrap(window.location),a=c.restorationIdentifier,this.delegate.historyPoppedToLocationWithRestorationIdentifier(s,a)):void 0},r.prototype.onPageLoad=function(i){return e.defer(function(s){return function(){return s.pageLoaded=!0}}(this))},r.prototype.shouldHandlePopState=function(){return this.pageIsLoaded()},r.prototype.pageIsLoaded=function(){return this.pageLoaded||document.readyState==="complete"},r.prototype.update=function(i,s,o){var a;return a={turbolinks:{restorationIdentifier:o}},history[i+"State"](a,null,s)},r}()}.call(this),function(){e.HeadDetails=function(){function t(c){var u,f,p,h,y,_;for(this.elements={},p=0,y=c.length;y>p;p++)_=c[p],_.nodeType===Node.ELEMENT_NODE&&(h=_.outerHTML,f=(u=this.elements)[h]!=null?u[h]:u[h]={type:a(_),tracked:o(_),elements:[]},f.elements.push(_))}var r,i,s,o,a;return t.fromHeadElement=function(c){var u;return new this((u=c?.childNodes)!=null?u:[])},t.prototype.hasElementWithKey=function(c){return c in this.elements},t.prototype.getTrackedElementSignature=function(){var c,u;return function(){var f,p;f=this.elements,p=[];for(c in f)u=f[c].tracked,u&&p.push(c);return p}.call(this).join("")},t.prototype.getScriptElementsNotInDetails=function(c){return this.getElementsMatchingTypeNotInDetails("script",c)},t.prototype.getStylesheetElementsNotInDetails=function(c){return this.getElementsMatchingTypeNotInDetails("stylesheet",c)},t.prototype.getElementsMatchingTypeNotInDetails=function(c,u){var f,p,h,y,_,w;h=this.elements,_=[];for(p in h)y=h[p],w=y.type,f=y.elements,w!==c||u.hasElementWithKey(p)||_.push(f[0]);return _},t.prototype.getProvisionalElements=function(){var c,u,f,p,h,y,_;f=[],p=this.elements;for(u in p)h=p[u],_=h.type,y=h.tracked,c=h.elements,_!=null||y?c.length>1&&f.push.apply(f,c.slice(1)):f.push.apply(f,c);return f},t.prototype.getMetaValue=function(c){var u;return(u=this.findMetaElementByName(c))!=null?u.getAttribute("content"):void 0},t.prototype.findMetaElementByName=function(c){var u,f,p,h;u=void 0,h=this.elements;for(p in h)f=h[p].elements,r(f[0],c)&&(u=f[0]);return u},a=function(c){return i(c)?"script":s(c)?"stylesheet":void 0},o=function(c){return c.getAttribute("data-turbolinks-track")==="reload"},i=function(c){var u;return u=c.tagName.toLowerCase(),u==="script"},s=function(c){var u;return u=c.tagName.toLowerCase(),u==="style"||u==="link"&&c.getAttribute("rel")==="stylesheet"},r=function(c,u){var f;return f=c.tagName.toLowerCase(),f==="meta"&&c.getAttribute("name")===u},t}()}.call(this),function(){e.Snapshot=function(){function t(r,i){this.headDetails=r,this.bodyElement=i}return t.wrap=function(r){return r instanceof this?r:typeof r=="string"?this.fromHTMLString(r):this.fromHTMLElement(r)},t.fromHTMLString=function(r){var i;return i=document.createElement("html"),i.innerHTML=r,this.fromHTMLElement(i)},t.fromHTMLElement=function(r){var i,s,o,a;return o=r.querySelector("head"),i=(a=r.querySelector("body"))!=null?a:document.createElement("body"),s=e.HeadDetails.fromHeadElement(o),new this(s,i)},t.prototype.clone=function(){return new this.constructor(this.headDetails,this.bodyElement.cloneNode(!0))},t.prototype.getRootLocation=function(){var r,i;return i=(r=this.getSetting("root"))!=null?r:"/",new e.Location(i)},t.prototype.getCacheControlValue=function(){return this.getSetting("cache-control")},t.prototype.getElementForAnchor=function(r){try{return this.bodyElement.querySelector("[id='"+r+"'], a[name='"+r+"']")}catch{}},t.prototype.getPermanentElements=function(){return this.bodyElement.querySelectorAll("[id][data-turbolinks-permanent]")},t.prototype.getPermanentElementById=function(r){return this.bodyElement.querySelector("#"+r+"[data-turbolinks-permanent]")},t.prototype.getPermanentElementsPresentInSnapshot=function(r){var i,s,o,a,c;for(a=this.getPermanentElements(),c=[],s=0,o=a.length;o>s;s++)i=a[s],r.getPermanentElementById(i.id)&&c.push(i);return c},t.prototype.findFirstAutofocusableElement=function(){return this.bodyElement.querySelector("[autofocus]")},t.prototype.hasAnchor=function(r){return this.getElementForAnchor(r)!=null},t.prototype.isPreviewable=function(){return this.getCacheControlValue()!=="no-preview"},t.prototype.isCacheable=function(){return this.getCacheControlValue()!=="no-cache"},t.prototype.isVisitable=function(){return this.getSetting("visit-control")!=="reload"},t.prototype.getSetting=function(r){return this.headDetails.getMetaValue("turbolinks-"+r)},t}()}.call(this),function(){var t=[].slice;e.Renderer=function(){function r(){}var i;return r.render=function(){var s,o,a,c;return a=arguments[0],o=arguments[1],s=3<=arguments.length?t.call(arguments,2):[],c=function(u,f,p){p.prototype=u.prototype;var h=new p,y=u.apply(h,f);return Object(y)===y?y:h}(this,s,function(){}),c.delegate=a,c.render(o),c},r.prototype.renderView=function(s){return this.delegate.viewWillRender(this.newBody),s(),this.delegate.viewRendered(this.newBody)},r.prototype.invalidateView=function(){return this.delegate.viewInvalidated()},r.prototype.createScriptElement=function(s){var o;return s.getAttribute("data-turbolinks-eval")==="false"?s:(o=document.createElement("script"),o.textContent=s.textContent,o.async=!1,i(o,s),o)},i=function(s,o){var a,c,u,f,p,h,y;for(f=o.attributes,h=[],a=0,c=f.length;c>a;a++)p=f[a],u=p.name,y=p.value,h.push(s.setAttribute(u,y));return h},r}()}.call(this),function(){var t,r,i=function(o,a){function c(){this.constructor=o}for(var u in a)s.call(a,u)&&(o[u]=a[u]);return c.prototype=a.prototype,o.prototype=new c,o.__super__=a.prototype,o},s={}.hasOwnProperty;e.SnapshotRenderer=function(o){function a(c,u,f){this.currentSnapshot=c,this.newSnapshot=u,this.isPreview=f,this.currentHeadDetails=this.currentSnapshot.headDetails,this.newHeadDetails=this.newSnapshot.headDetails,this.currentBody=this.currentSnapshot.bodyElement,this.newBody=this.newSnapshot.bodyElement}return i(a,o),a.prototype.render=function(c){return this.shouldRender()?(this.mergeHead(),this.renderView(function(u){return function(){return u.replaceBody(),u.isPreview||u.focusFirstAutofocusableElement(),c()}}(this))):this.invalidateView()},a.prototype.mergeHead=function(){return this.copyNewHeadStylesheetElements(),this.copyNewHeadScriptElements(),this.removeCurrentHeadProvisionalElements(),this.copyNewHeadProvisionalElements()},a.prototype.replaceBody=function(){var c;return c=this.relocateCurrentBodyPermanentElements(),this.activateNewBodyScriptElements(),this.assignNewBody(),this.replacePlaceholderElementsWithClonedPermanentElements(c)},a.prototype.shouldRender=function(){return this.newSnapshot.isVisitable()&&this.trackedElementsAreIdentical()},a.prototype.trackedElementsAreIdentical=function(){return this.currentHeadDetails.getTrackedElementSignature()===this.newHeadDetails.getTrackedElementSignature()},a.prototype.copyNewHeadStylesheetElements=function(){var c,u,f,p,h;for(p=this.getNewHeadStylesheetElements(),h=[],u=0,f=p.length;f>u;u++)c=p[u],h.push(document.head.appendChild(c));return h},a.prototype.copyNewHeadScriptElements=function(){var c,u,f,p,h;for(p=this.getNewHeadScriptElements(),h=[],u=0,f=p.length;f>u;u++)c=p[u],h.push(document.head.appendChild(this.createScriptElement(c)));return h},a.prototype.removeCurrentHeadProvisionalElements=function(){var c,u,f,p,h;for(p=this.getCurrentHeadProvisionalElements(),h=[],u=0,f=p.length;f>u;u++)c=p[u],h.push(document.head.removeChild(c));return h},a.prototype.copyNewHeadProvisionalElements=function(){var c,u,f,p,h;for(p=this.getNewHeadProvisionalElements(),h=[],u=0,f=p.length;f>u;u++)c=p[u],h.push(document.head.appendChild(c));return h},a.prototype.relocateCurrentBodyPermanentElements=function(){var c,u,f,p,h,y,_;for(y=this.getCurrentBodyPermanentElements(),_=[],c=0,u=y.length;u>c;c++)p=y[c],h=t(p),f=this.newSnapshot.getPermanentElementById(p.id),r(p,h.element),r(f,p),_.push(h);return _},a.prototype.replacePlaceholderElementsWithClonedPermanentElements=function(c){var u,f,p,h,y,_,w;for(w=[],p=0,h=c.length;h>p;p++)_=c[p],f=_.element,y=_.permanentElement,u=y.cloneNode(!0),w.push(r(f,u));return w},a.prototype.activateNewBodyScriptElements=function(){var c,u,f,p,h,y;for(h=this.getNewBodyScriptElements(),y=[],u=0,p=h.length;p>u;u++)f=h[u],c=this.createScriptElement(f),y.push(r(f,c));return y},a.prototype.assignNewBody=function(){return document.body=this.newBody},a.prototype.focusFirstAutofocusableElement=function(){var c;return(c=this.newSnapshot.findFirstAutofocusableElement())!=null?c.focus():void 0},a.prototype.getNewHeadStylesheetElements=function(){return this.newHeadDetails.getStylesheetElementsNotInDetails(this.currentHeadDetails)},a.prototype.getNewHeadScriptElements=function(){return this.newHeadDetails.getScriptElementsNotInDetails(this.currentHeadDetails)},a.prototype.getCurrentHeadProvisionalElements=function(){return this.currentHeadDetails.getProvisionalElements()},a.prototype.getNewHeadProvisionalElements=function(){return this.newHeadDetails.getProvisionalElements()},a.prototype.getCurrentBodyPermanentElements=function(){return this.currentSnapshot.getPermanentElementsPresentInSnapshot(this.newSnapshot)},a.prototype.getNewBodyScriptElements=function(){return this.newBody.querySelectorAll("script")},a}(e.Renderer),t=function(o){var a;return a=document.createElement("meta"),a.setAttribute("name","turbolinks-permanent-placeholder"),a.setAttribute("content",o.id),{element:a,permanentElement:o}},r=function(o,a){var c;return(c=o.parentNode)?c.replaceChild(a,o):void 0}}.call(this),function(){var t=function(i,s){function o(){this.constructor=i}for(var a in s)r.call(s,a)&&(i[a]=s[a]);return o.prototype=s.prototype,i.prototype=new o,i.__super__=s.prototype,i},r={}.hasOwnProperty;e.ErrorRenderer=function(i){function s(o){var a;a=document.createElement("html"),a.innerHTML=o,this.newHead=a.querySelector("head"),this.newBody=a.querySelector("body")}return t(s,i),s.prototype.render=function(o){return this.renderView(function(a){return function(){return a.replaceHeadAndBody(),a.activateBodyScriptElements(),o()}}(this))},s.prototype.replaceHeadAndBody=function(){var o,a;return a=document.head,o=document.body,a.parentNode.replaceChild(this.newHead,a),o.parentNode.replaceChild(this.newBody,o)},s.prototype.activateBodyScriptElements=function(){var o,a,c,u,f,p;for(u=this.getScriptElements(),p=[],a=0,c=u.length;c>a;a++)f=u[a],o=this.createScriptElement(f),p.push(f.parentNode.replaceChild(o,f));return p},s.prototype.getScriptElements=function(){return document.documentElement.querySelectorAll("script")},s}(e.Renderer)}.call(this),function(){e.View=function(){function t(r){this.delegate=r,this.htmlElement=document.documentElement}return t.prototype.getRootLocation=function(){return this.getSnapshot().getRootLocation()},t.prototype.getElementForAnchor=function(r){return this.getSnapshot().getElementForAnchor(r)},t.prototype.getSnapshot=function(){return e.Snapshot.fromHTMLElement(this.htmlElement)},t.prototype.render=function(r,i){var s,o,a;return a=r.snapshot,s=r.error,o=r.isPreview,this.markAsPreview(o),a!=null?this.renderSnapshot(a,o,i):this.renderError(s,i)},t.prototype.markAsPreview=function(r){return r?this.htmlElement.setAttribute("data-turbolinks-preview",""):this.htmlElement.removeAttribute("data-turbolinks-preview")},t.prototype.renderSnapshot=function(r,i,s){return e.SnapshotRenderer.render(this.delegate,s,this.getSnapshot(),e.Snapshot.wrap(r),i)},t.prototype.renderError=function(r,i){return e.ErrorRenderer.render(this.delegate,i,r)},t}()}.call(this),function(){var t=function(r,i){return function(){return r.apply(i,arguments)}};e.ScrollManager=function(){function r(i){this.delegate=i,this.onScroll=t(this.onScroll,this),this.onScroll=e.throttle(this.onScroll)}return r.prototype.start=function(){return this.started?void 0:(addEventListener("scroll",this.onScroll,!1),this.onScroll(),this.started=!0)},r.prototype.stop=function(){return this.started?(removeEventListener("scroll",this.onScroll,!1),this.started=!1):void 0},r.prototype.scrollToElement=function(i){return i.scrollIntoView()},r.prototype.scrollToPosition=function(i){var s,o;return s=i.x,o=i.y,window.scrollTo(s,o)},r.prototype.onScroll=function(i){return this.updatePosition({x:window.pageXOffset,y:window.pageYOffset})},r.prototype.updatePosition=function(i){var s;return this.position=i,(s=this.delegate)!=null?s.scrollPositionChanged(this.position):void 0},r}()}.call(this),function(){e.SnapshotCache=function(){function t(i){this.size=i,this.keys=[],this.snapshots={}}var r;return t.prototype.has=function(i){var s;return s=r(i),s in this.snapshots},t.prototype.get=function(i){var s;if(this.has(i))return s=this.read(i),this.touch(i),s},t.prototype.put=function(i,s){return this.write(i,s),this.touch(i),s},t.prototype.read=function(i){var s;return s=r(i),this.snapshots[s]},t.prototype.write=function(i,s){var o;return o=r(i),this.snapshots[o]=s},t.prototype.touch=function(i){var s,o;return o=r(i),s=this.keys.indexOf(o),s>-1&&this.keys.splice(s,1),this.keys.unshift(o),this.trim()},t.prototype.trim=function(){var i,s,o,a,c;for(a=this.keys.splice(this.size),c=[],i=0,o=a.length;o>i;i++)s=a[i],c.push(delete this.snapshots[s]);return c},r=function(i){return e.Location.wrap(i).toCacheKey()},t}()}.call(this),function(){var t=function(r,i){return function(){return r.apply(i,arguments)}};e.Visit=function(){function r(s,o,a){this.controller=s,this.action=a,this.performScroll=t(this.performScroll,this),this.identifier=e.uuid(),this.location=e.Location.wrap(o),this.adapter=this.controller.adapter,this.state="initialized",this.timingMetrics={}}var i;return r.prototype.start=function(){return this.state==="initialized"?(this.recordTimingMetric("visitStart"),this.state="started",this.adapter.visitStarted(this)):void 0},r.prototype.cancel=function(){var s;return this.state==="started"?((s=this.request)!=null&&s.cancel(),this.cancelRender(),this.state="canceled"):void 0},r.prototype.complete=function(){var s;return this.state==="started"?(this.recordTimingMetric("visitEnd"),this.state="completed",typeof(s=this.adapter).visitCompleted=="function"&&s.visitCompleted(this),this.controller.visitCompleted(this)):void 0},r.prototype.fail=function(){var s;return this.state==="started"?(this.state="failed",typeof(s=this.adapter).visitFailed=="function"?s.visitFailed(this):void 0):void 0},r.prototype.changeHistory=function(){var s,o;return this.historyChanged?void 0:(s=this.location.isEqualTo(this.referrer)?"replace":this.action,o=i(s),this.controller[o](this.location,this.restorationIdentifier),this.historyChanged=!0)},r.prototype.issueRequest=function(){return this.shouldIssueRequest()&&this.request==null?(this.progress=0,this.request=new e.HttpRequest(this,this.location,this.referrer),this.request.send()):void 0},r.prototype.getCachedSnapshot=function(){var s;return!(s=this.controller.getCachedSnapshotForLocation(this.location))||this.location.anchor!=null&&!s.hasAnchor(this.location.anchor)||this.action!=="restore"&&!s.isPreviewable()?void 0:s},r.prototype.hasCachedSnapshot=function(){return this.getCachedSnapshot()!=null},r.prototype.loadCachedSnapshot=function(){var s,o;return(o=this.getCachedSnapshot())?(s=this.shouldIssueRequest(),this.render(function(){var a;return this.cacheSnapshot(),this.controller.render({snapshot:o,isPreview:s},this.performScroll),typeof(a=this.adapter).visitRendered=="function"&&a.visitRendered(this),s?void 0:this.complete()})):void 0},r.prototype.loadResponse=function(){return this.response!=null?this.render(function(){var s,o;return this.cacheSnapshot(),this.request.failed?(this.controller.render({error:this.response},this.performScroll),typeof(s=this.adapter).visitRendered=="function"&&s.visitRendered(this),this.fail()):(this.controller.render({snapshot:this.response},this.performScroll),typeof(o=this.adapter).visitRendered=="function"&&o.visitRendered(this),this.complete())}):void 0},r.prototype.followRedirect=function(){return this.redirectedToLocation&&!this.followedRedirect?(this.location=this.redirectedToLocation,this.controller.replaceHistoryWithLocationAndRestorationIdentifier(this.redirectedToLocation,this.restorationIdentifier),this.followedRedirect=!0):void 0},r.prototype.requestStarted=function(){var s;return this.recordTimingMetric("requestStart"),typeof(s=this.adapter).visitRequestStarted=="function"?s.visitRequestStarted(this):void 0},r.prototype.requestProgressed=function(s){var o;return this.progress=s,typeof(o=this.adapter).visitRequestProgressed=="function"?o.visitRequestProgressed(this):void 0},r.prototype.requestCompletedWithResponse=function(s,o){return this.response=s,o!=null&&(this.redirectedToLocation=e.Location.wrap(o)),this.adapter.visitRequestCompleted(this)},r.prototype.requestFailedWithStatusCode=function(s,o){return this.response=o,this.adapter.visitRequestFailedWithStatusCode(this,s)},r.prototype.requestFinished=function(){var s;return this.recordTimingMetric("requestEnd"),typeof(s=this.adapter).visitRequestFinished=="function"?s.visitRequestFinished(this):void 0},r.prototype.performScroll=function(){return this.scrolled?void 0:(this.action==="restore"?this.scrollToRestoredPosition()||this.scrollToTop():this.scrollToAnchor()||this.scrollToTop(),this.scrolled=!0)},r.prototype.scrollToRestoredPosition=function(){var s,o;return s=(o=this.restorationData)!=null?o.scrollPosition:void 0,s!=null?(this.controller.scrollToPosition(s),!0):void 0},r.prototype.scrollToAnchor=function(){return this.location.anchor!=null?(this.controller.scrollToAnchor(this.location.anchor),!0):void 0},r.prototype.scrollToTop=function(){return this.controller.scrollToPosition({x:0,y:0})},r.prototype.recordTimingMetric=function(s){var o;return(o=this.timingMetrics)[s]!=null?o[s]:o[s]=new Date().getTime()},r.prototype.getTimingMetrics=function(){return e.copyObject(this.timingMetrics)},i=function(s){switch(s){case"replace":return"replaceHistoryWithLocationAndRestorationIdentifier";case"advance":case"restore":return"pushHistoryWithLocationAndRestorationIdentifier"}},r.prototype.shouldIssueRequest=function(){return this.action==="restore"?!this.hasCachedSnapshot():!0},r.prototype.cacheSnapshot=function(){return this.snapshotCached?void 0:(this.controller.cacheSnapshot(),this.snapshotCached=!0)},r.prototype.render=function(s){return this.cancelRender(),this.frame=requestAnimationFrame(function(o){return function(){return o.frame=null,s.call(o)}}(this))},r.prototype.cancelRender=function(){return this.frame?cancelAnimationFrame(this.frame):void 0},r}()}.call(this),function(){var t=function(r,i){return function(){return r.apply(i,arguments)}};e.Controller=function(){function r(){this.clickBubbled=t(this.clickBubbled,this),this.clickCaptured=t(this.clickCaptured,this),this.pageLoaded=t(this.pageLoaded,this),this.history=new e.History(this),this.view=new e.View(this),this.scrollManager=new e.ScrollManager(this),this.restorationData={},this.clearCache(),this.setProgressBarDelay(500)}return r.prototype.start=function(){return e.supported&&!this.started?(addEventListener("click",this.clickCaptured,!0),addEventListener("DOMContentLoaded",this.pageLoaded,!1),this.scrollManager.start(),this.startHistory(),this.started=!0,this.enabled=!0):void 0},r.prototype.disable=function(){return this.enabled=!1},r.prototype.stop=function(){return this.started?(removeEventListener("click",this.clickCaptured,!0),removeEventListener("DOMContentLoaded",this.pageLoaded,!1),this.scrollManager.stop(),this.stopHistory(),this.started=!1):void 0},r.prototype.clearCache=function(){return this.cache=new e.SnapshotCache(10)},r.prototype.visit=function(i,s){var o,a;return s==null&&(s={}),i=e.Location.wrap(i),this.applicationAllowsVisitingLocation(i)?this.locationIsVisitable(i)?(o=(a=s.action)!=null?a:"advance",this.adapter.visitProposedToLocationWithAction(i,o)):window.location=i:void 0},r.prototype.startVisitToLocationWithAction=function(i,s,o){var a;return e.supported?(a=this.getRestorationDataForIdentifier(o),this.startVisit(i,s,{restorationData:a})):window.location=i},r.prototype.setProgressBarDelay=function(i){return this.progressBarDelay=i},r.prototype.startHistory=function(){return this.location=e.Location.wrap(window.location),this.restorationIdentifier=e.uuid(),this.history.start(),this.history.replace(this.location,this.restorationIdentifier)},r.prototype.stopHistory=function(){return this.history.stop()},r.prototype.pushHistoryWithLocationAndRestorationIdentifier=function(i,s){return this.restorationIdentifier=s,this.location=e.Location.wrap(i),this.history.push(this.location,this.restorationIdentifier)},r.prototype.replaceHistoryWithLocationAndRestorationIdentifier=function(i,s){return this.restorationIdentifier=s,this.location=e.Location.wrap(i),this.history.replace(this.location,this.restorationIdentifier)},r.prototype.historyPoppedToLocationWithRestorationIdentifier=function(i,s){var o;return this.restorationIdentifier=s,this.enabled?(o=this.getRestorationDataForIdentifier(this.restorationIdentifier),this.startVisit(i,"restore",{restorationIdentifier:this.restorationIdentifier,restorationData:o,historyChanged:!0}),this.location=e.Location.wrap(i)):this.adapter.pageInvalidated()},r.prototype.getCachedSnapshotForLocation=function(i){var s;return(s=this.cache.get(i))!=null?s.clone():void 0},r.prototype.shouldCacheSnapshot=function(){return this.view.getSnapshot().isCacheable()},r.prototype.cacheSnapshot=function(){var i,s;return this.shouldCacheSnapshot()?(this.notifyApplicationBeforeCachingSnapshot(),s=this.view.getSnapshot(),i=this.lastRenderedLocation,e.defer(function(o){return function(){return o.cache.put(i,s.clone())}}(this))):void 0},r.prototype.scrollToAnchor=function(i){var s;return(s=this.view.getElementForAnchor(i))?this.scrollToElement(s):this.scrollToPosition({x:0,y:0})},r.prototype.scrollToElement=function(i){return this.scrollManager.scrollToElement(i)},r.prototype.scrollToPosition=function(i){return this.scrollManager.scrollToPosition(i)},r.prototype.scrollPositionChanged=function(i){var s;return s=this.getCurrentRestorationData(),s.scrollPosition=i},r.prototype.render=function(i,s){return this.view.render(i,s)},r.prototype.viewInvalidated=function(){return this.adapter.pageInvalidated()},r.prototype.viewWillRender=function(i){return this.notifyApplicationBeforeRender(i)},r.prototype.viewRendered=function(){return this.lastRenderedLocation=this.currentVisit.location,this.notifyApplicationAfterRender()},r.prototype.pageLoaded=function(){return this.lastRenderedLocation=this.location,this.notifyApplicationAfterPageLoad()},r.prototype.clickCaptured=function(){return removeEventListener("click",this.clickBubbled,!1),addEventListener("click",this.clickBubbled,!1)},r.prototype.clickBubbled=function(i){var s,o,a;return this.enabled&&this.clickEventIsSignificant(i)&&(o=this.getVisitableLinkForNode(i.target))&&(a=this.getVisitableLocationForLink(o))&&this.applicationAllowsFollowingLinkToLocation(o,a)?(i.preventDefault(),s=this.getActionForLink(o),this.visit(a,{action:s})):void 0},r.prototype.applicationAllowsFollowingLinkToLocation=function(i,s){var o;return o=this.notifyApplicationAfterClickingLinkToLocation(i,s),!o.defaultPrevented},r.prototype.applicationAllowsVisitingLocation=function(i){var s;return s=this.notifyApplicationBeforeVisitingLocation(i),!s.defaultPrevented},r.prototype.notifyApplicationAfterClickingLinkToLocation=function(i,s){return e.dispatch("turbolinks:click",{target:i,data:{url:s.absoluteURL},cancelable:!0})},r.prototype.notifyApplicationBeforeVisitingLocation=function(i){return e.dispatch("turbolinks:before-visit",{data:{url:i.absoluteURL},cancelable:!0})},r.prototype.notifyApplicationAfterVisitingLocation=function(i){return e.dispatch("turbolinks:visit",{data:{url:i.absoluteURL}})},r.prototype.notifyApplicationBeforeCachingSnapshot=function(){return e.dispatch("turbolinks:before-cache")},r.prototype.notifyApplicationBeforeRender=function(i){return e.dispatch("turbolinks:before-render",{data:{newBody:i}})},r.prototype.notifyApplicationAfterRender=function(){return e.dispatch("turbolinks:render")},r.prototype.notifyApplicationAfterPageLoad=function(i){return i==null&&(i={}),e.dispatch("turbolinks:load",{data:{url:this.location.absoluteURL,timing:i}})},r.prototype.startVisit=function(i,s,o){var a;return(a=this.currentVisit)!=null&&a.cancel(),this.currentVisit=this.createVisit(i,s,o),this.currentVisit.start(),this.notifyApplicationAfterVisitingLocation(i)},r.prototype.createVisit=function(i,s,o){var a,c,u,f,p;return c=o??{},f=c.restorationIdentifier,u=c.restorationData,a=c.historyChanged,p=new e.Visit(this,i,s),p.restorationIdentifier=f??e.uuid(),p.restorationData=e.copyObject(u),p.historyChanged=a,p.referrer=this.location,p},r.prototype.visitCompleted=function(i){return this.notifyApplicationAfterPageLoad(i.getTimingMetrics())},r.prototype.clickEventIsSignificant=function(i){return!(i.defaultPrevented||i.target.isContentEditable||i.which>1||i.altKey||i.ctrlKey||i.metaKey||i.shiftKey)},r.prototype.getVisitableLinkForNode=function(i){return this.nodeIsVisitable(i)?e.closest(i,"a[href]:not([target]):not([download])"):void 0},r.prototype.getVisitableLocationForLink=function(i){var s;return s=new e.Location(i.getAttribute("href")),this.locationIsVisitable(s)?s:void 0},r.prototype.getActionForLink=function(i){var s;return(s=i.getAttribute("data-turbolinks-action"))!=null?s:"advance"},r.prototype.nodeIsVisitable=function(i){var s;return(s=e.closest(i,"[data-turbolinks]"))?s.getAttribute("data-turbolinks")!=="false":!0},r.prototype.locationIsVisitable=function(i){return i.isPrefixedBy(this.view.getRootLocation())&&i.isHTML()},r.prototype.getCurrentRestorationData=function(){return this.getRestorationDataForIdentifier(this.restorationIdentifier)},r.prototype.getRestorationDataForIdentifier=function(i){var s;return(s=this.restorationData)[i]!=null?s[i]:s[i]={}},r}()}.call(this),function(){(function(){var t,r;if((t=r=document.currentScript)&&!r.hasAttribute("data-turbolinks-suppress-warning")){for(;t=t.parentNode;)if(t===document.body)return console.warn(`You are loading Turbolinks from a <script> element inside the <body> element. This is probably not what you meant to do!

Load your application\u2019s JavaScript bundle inside the <head> element instead. <script> elements in <body> are evaluated with each page change.

For more information, see: https://github.com/turbolinks/turbolinks#working-with-script-elements

\u2014\u2014
Suppress this warning by adding a \`data-turbolinks-suppress-warning\` attribute to: %s`,r.outerHTML)}})()}.call(this),function(){var t,r,i;e.start=function(){return r()?(e.controller==null&&(e.controller=t()),e.controller.start()):void 0},r=function(){return window.Turbolinks==null&&(window.Turbolinks=e),i()},t=function(){var s;return s=new e.Controller,s.adapter=new e.BrowserAdapter(s),s},i=function(){return window.Turbolinks===e},i()&&e.start()}.call(this)}).call(this),typeof Oc=="object"&&Oc.exports?Oc.exports=e:typeof define=="function"&&define.amd&&define(e)}).call(Rb)});var Pb=Fe((Nb,Ic)=>{(function(){var n=this;(function(){(function(){var t=[].slice;this.LocalTime={config:{},run:function(){return this.getController().processElements()},process:function(){var r,i,s,o;for(i=1<=arguments.length?t.call(arguments,0):[],s=0,o=i.length;s<o;s++)r=i[s],this.getController().processElement(r);return i.length},getController:function(){return this.controller!=null?this.controller:this.controller=new e.Controller}}}).call(this)}).call(n);var e=n.LocalTime;(function(){(function(){e.config.i18n={en:{date:{dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbrDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbrMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],yesterday:"yesterday",today:"today",tomorrow:"tomorrow",on:"on {date}",formats:{default:"%b %e, %Y",thisYear:"%b %e"}},time:{am:"am",pm:"pm",singular:"a {time}",singularAn:"an {time}",elapsed:"{time} ago",second:"second",seconds:"seconds",minute:"minute",minutes:"minutes",hour:"hour",hours:"hours",formats:{default:"%l:%M%P"}},datetime:{at:"{date} at {time}",formats:{default:"%B %e, %Y at %l:%M%P %Z"}}}}}).call(this),function(){e.config.locale="en",e.config.defaultLocale="en"}.call(this),function(){e.config.timerInterval=6e4}.call(this),function(){var t,r,i;i=!isNaN(Date.parse("2011-01-01T12:00:00-05:00")),e.parseDate=function(s){return s=s.toString(),i||(s=r(s)),new Date(Date.parse(s))},t=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(Z|[-+]?[\d:]+)$/,r=function(s){var o,a,c,u,f,p,h,y,_;if(c=s.match(t))return c[0],y=c[1],f=c[2],o=c[3],a=c[4],u=c[5],h=c[6],_=c[7],_!=="Z"&&(p=_.replace(":","")),y+"/"+f+"/"+o+" "+a+":"+u+":"+h+" GMT"+[p]}}.call(this),function(){e.elementMatchesSelector=function(){var t,r,i,s,o,a;return t=document.documentElement,r=(i=(s=(o=(a=t.matches)!=null?a:t.matchesSelector)!=null?o:t.webkitMatchesSelector)!=null?s:t.mozMatchesSelector)!=null?i:t.msMatchesSelector,function(c,u){if(c?.nodeType===Node.ELEMENT_NODE)return r.call(c,u)}}()}.call(this),function(){var t,r,i;t=e.config,i=t.i18n,e.getI18nValue=function(s,o){var a,c;return s==null&&(s=""),a=(o??{locale:t.locale}).locale,c=r(i[a],s),c??(a!==t.defaultLocale?e.getI18nValue(s,{locale:t.defaultLocale}):void 0)},e.translate=function(s,o,a){var c,u,f;o==null&&(o={}),f=e.getI18nValue(s,a);for(c in o)u=o[c],f=f.replace("{"+c+"}",u);return f},r=function(s,o){var a,c,u,f,p;for(p=s,f=o.split("."),a=0,u=f.length;a<u;a++){if(c=f[a],p[c]==null)return null;p=p[c]}return p}}.call(this),function(){var t,r,i,s,o;t=e.getI18nValue,o=e.translate,e.strftime=s=function(a,c){var u,f,p,h,y,_,w;return f=a.getDay(),u=a.getDate(),y=a.getMonth(),w=a.getFullYear(),p=a.getHours(),h=a.getMinutes(),_=a.getSeconds(),c.replace(/%(-?)([%aAbBcdeHIlmMpPSwyYZ])/g,function(E,D,R){switch(R){case"%":return"%";case"a":return t("date.abbrDayNames")[f];case"A":return t("date.dayNames")[f];case"b":return t("date.abbrMonthNames")[y];case"B":return t("date.monthNames")[y];case"c":return a.toString();case"d":return r(u,D);case"e":return u;case"H":return r(p,D);case"I":return r(s(a,"%l"),D);case"l":return p===0||p===12?12:(p+12)%12;case"m":return r(y+1,D);case"M":return r(h,D);case"p":return o("time."+(p>11?"pm":"am")).toUpperCase();case"P":return o("time."+(p>11?"pm":"am"));case"S":return r(_,D);case"w":return f;case"y":return r(w%100,D);case"Y":return w;case"Z":return i(a)}})},r=function(a,c){switch(c){case"-":return a;default:return("0"+a).slice(-2)}},i=function(a){var c,u,f,p,h;return h=a.toString(),(c=(u=h.match(/\(([\w\s]+)\)$/))!=null?u[1]:void 0)?/\s/.test(c)?c.match(/\b(\w)/g).join(""):c:(c=(f=h.match(/(\w{3,4})\s\d{4}$/))!=null?f[1]:void 0)||(c=(p=h.match(/(UTC[\+\-]\d+)/))!=null?p[1]:void 0)?c:""}}.call(this),function(){e.CalendarDate=function(){function t(r,i,s){this.date=new Date(Date.UTC(r,i-1)),this.date.setUTCDate(s),this.year=this.date.getUTCFullYear(),this.month=this.date.getUTCMonth()+1,this.day=this.date.getUTCDate(),this.value=this.date.getTime()}return t.fromDate=function(r){return new this(r.getFullYear(),r.getMonth()+1,r.getDate())},t.today=function(){return this.fromDate(new Date)},t.prototype.equals=function(r){return r?.value===this.value},t.prototype.is=function(r){return this.equals(r)},t.prototype.isToday=function(){return this.is(this.constructor.today())},t.prototype.occursOnSameYearAs=function(r){return this.year===r?.year},t.prototype.occursThisYear=function(){return this.occursOnSameYearAs(this.constructor.today())},t.prototype.daysSince=function(r){if(r)return(this.date-r.date)/864e5},t.prototype.daysPassed=function(){return this.constructor.today().daysSince(this)},t}()}.call(this),function(){var t,r,i;r=e.strftime,i=e.translate,t=e.getI18nValue,e.RelativeTime=function(){function s(o){this.date=o,this.calendarDate=e.CalendarDate.fromDate(this.date)}return s.prototype.toString=function(){var o,a;return(a=this.toTimeElapsedString())?i("time.elapsed",{time:a}):(o=this.toWeekdayString())?(a=this.toTimeString(),i("datetime.at",{date:o,time:a})):i("date.on",{date:this.toDateString()})},s.prototype.toTimeOrDateString=function(){return this.calendarDate.isToday()?this.toTimeString():this.toDateString()},s.prototype.toTimeElapsedString=function(){var o,a,c,u,f;return c=new Date().getTime()-this.date.getTime(),u=Math.round(c/1e3),a=Math.round(u/60),o=Math.round(a/60),c<0?null:u<10?(f=i("time.second"),i("time.singular",{time:f})):u<45?u+" "+i("time.seconds"):u<90?(f=i("time.minute"),i("time.singular",{time:f})):a<45?a+" "+i("time.minutes"):a<90?(f=i("time.hour"),i("time.singularAn",{time:f})):o<24?o+" "+i("time.hours"):""},s.prototype.toWeekdayString=function(){switch(this.calendarDate.daysPassed()){case 0:return i("date.today");case 1:return i("date.yesterday");case-1:return i("date.tomorrow");case 2:case 3:case 4:case 5:case 6:return r(this.date,"%A");default:return""}},s.prototype.toDateString=function(){var o;return o=t(this.calendarDate.occursThisYear()?"date.formats.thisYear":"date.formats.default"),r(this.date,o)},s.prototype.toTimeString=function(){return r(this.date,t("time.formats.default"))},s}()}.call(this),function(){var t,r=function(i,s){return function(){return i.apply(s,arguments)}};t=e.elementMatchesSelector,e.PageObserver=function(){function i(s,o){this.selector=s,this.callback=o,this.processInsertion=r(this.processInsertion,this),this.processMutations=r(this.processMutations,this)}return i.prototype.start=function(){if(!this.started)return this.observeWithMutationObserver()||this.observeWithMutationEvent(),this.started=!0},i.prototype.observeWithMutationObserver=function(){var s;if(typeof MutationObserver<"u"&&MutationObserver!==null)return s=new MutationObserver(this.processMutations),s.observe(document.documentElement,{childList:!0,subtree:!0}),!0},i.prototype.observeWithMutationEvent=function(){return addEventListener("DOMNodeInserted",this.processInsertion,!1),!0},i.prototype.findSignificantElements=function(s){var o;return o=[],s?.nodeType===Node.ELEMENT_NODE&&(t(s,this.selector)&&o.push(s),o.push.apply(o,s.querySelectorAll(this.selector))),o},i.prototype.processMutations=function(s){var o,a,c,u,f,p,h,y;for(o=[],a=0,u=s.length;a<u;a++)switch(p=s[a],p.type){case"childList":for(y=p.addedNodes,c=0,f=y.length;c<f;c++)h=y[c],o.push.apply(o,this.findSignificantElements(h))}return this.notify(o)},i.prototype.processInsertion=function(s){var o;return o=this.findSignificantElements(s.target),this.notify(o)},i.prototype.notify=function(s){if(s?.length)return typeof this.callback=="function"?this.callback(s):void 0},i}()}.call(this),function(){var t,r,i,s,o=function(a,c){return function(){return a.apply(c,arguments)}};i=e.parseDate,s=e.strftime,r=e.getI18nValue,t=e.config,e.Controller=function(){function a(){this.processElements=o(this.processElements,this),this.pageObserver=new e.PageObserver(c,this.processElements)}var c,u,f;return c="time[data-local]:not([data-localized])",a.prototype.start=function(){if(!this.started)return this.processElements(),this.startTimer(),this.pageObserver.start(),this.started=!0},a.prototype.startTimer=function(){var p;if(p=t.timerInterval)return this.timer!=null?this.timer:this.timer=setInterval(this.processElements,p)},a.prototype.processElements=function(p){var h,y,_;for(p==null&&(p=document.querySelectorAll(c)),y=0,_=p.length;y<_;y++)h=p[y],this.processElement(h);return p.length},a.prototype.processElement=function(p){var h,y,_,w,E,D;if(y=p.getAttribute("datetime"),_=p.getAttribute("data-format"),w=p.getAttribute("data-local"),E=i(y),!isNaN(E))return p.hasAttribute("title")||(D=s(E,r("datetime.formats.default")),p.setAttribute("title",D)),p.textContent=h=function(){switch(w){case"time":return u(p),s(E,_);case"date":return u(p),f(E).toDateString();case"time-ago":return f(E).toString();case"time-or-date":return f(E).toTimeOrDateString();case"weekday":return f(E).toWeekdayString();case"weekday-or-date":return f(E).toWeekdayString()||f(E).toDateString()}}(),p.hasAttribute("aria-label")?void 0:p.setAttribute("aria-label",h)},u=function(p){return p.setAttribute("data-localized","")},f=function(p){return new e.RelativeTime(p)},a}()}.call(this),function(){var t,r,i,s;s=!1,t=function(){return document.attachEvent?document.readyState==="complete":document.readyState!=="loading"},r=function(o){var a;return(a=typeof requestAnimationFrame=="function"?requestAnimationFrame(o):void 0)!=null?a:setTimeout(o,17)},i=function(){var o;return o=e.getController(),o.start()},e.start=function(){if(!s)return s=!0,typeof MutationObserver<"u"&&MutationObserver!==null||t()?i():r(i)},window.LocalTime===e&&e.start()}.call(this)}).call(this),typeof Ic=="object"&&Ic.exports?Ic.exports=e:typeof define=="function"&&define.amd&&define(e)}).call(Nb)});var Rc=Fe((Lb,kc)=>{(function(n,e){"use strict";typeof kc=="object"&&typeof kc.exports=="object"?kc.exports=n.document?e(n,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(n)})(typeof window<"u"?window:Lb,function(n,e){"use strict";var t=[],r=Object.getPrototypeOf,i=t.slice,s=t.flat?function(l){return t.flat.call(l)}:function(l){return t.concat.apply([],l)},o=t.push,a=t.indexOf,c={},u=c.toString,f=c.hasOwnProperty,p=f.toString,h=p.call(Object),y={},_=function(d){return typeof d=="function"&&typeof d.nodeType!="number"&&typeof d.item!="function"},w=function(d){return d!=null&&d===d.window},E=n.document,D={type:!0,src:!0,nonce:!0,noModule:!0};function R(l,d,g){g=g||E;var v,A,S=g.createElement("script");if(S.text=l,d)for(v in D)A=d[v]||d.getAttribute&&d.getAttribute(v),A&&S.setAttribute(v,A);g.head.appendChild(S).parentNode.removeChild(S)}function H(l){return l==null?l+"":typeof l=="object"||typeof l=="function"?c[u.call(l)]||"object":typeof l}var F="3.6.3",m=function(l,d){return new m.fn.init(l,d)};m.fn=m.prototype={jquery:F,constructor:m,length:0,toArray:function(){return i.call(this)},get:function(l){return l==null?i.call(this):l<0?this[l+this.length]:this[l]},pushStack:function(l){var d=m.merge(this.constructor(),l);return d.prevObject=this,d},each:function(l){return m.each(this,l)},map:function(l){return this.pushStack(m.map(this,function(d,g){return l.call(d,g,d)}))},slice:function(){return this.pushStack(i.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(m.grep(this,function(l,d){return(d+1)%2}))},odd:function(){return this.pushStack(m.grep(this,function(l,d){return d%2}))},eq:function(l){var d=this.length,g=+l+(l<0?d:0);return this.pushStack(g>=0&&g<d?[this[g]]:[])},end:function(){return this.prevObject||this.constructor()},push:o,sort:t.sort,splice:t.splice},m.extend=m.fn.extend=function(){var l,d,g,v,A,S,x=arguments[0]||{},V=1,B=arguments.length,G=!1;for(typeof x=="boolean"&&(G=x,x=arguments[V]||{},V++),typeof x!="object"&&!_(x)&&(x={}),V===B&&(x=this,V--);V<B;V++)if((l=arguments[V])!=null)for(d in l)v=l[d],!(d==="__proto__"||x===v)&&(G&&v&&(m.isPlainObject(v)||(A=Array.isArray(v)))?(g=x[d],A&&!Array.isArray(g)?S=[]:!A&&!m.isPlainObject(g)?S={}:S=g,A=!1,x[d]=m.extend(G,S,v)):v!==void 0&&(x[d]=v));return x},m.extend({expando:"jQuery"+(F+Math.random()).replace(/\D/g,""),isReady:!0,error:function(l){throw new Error(l)},noop:function(){},isPlainObject:function(l){var d,g;return!l||u.call(l)!=="[object Object]"?!1:(d=r(l),d?(g=f.call(d,"constructor")&&d.constructor,typeof g=="function"&&p.call(g)===h):!0)},isEmptyObject:function(l){var d;for(d in l)return!1;return!0},globalEval:function(l,d,g){R(l,{nonce:d&&d.nonce},g)},each:function(l,d){var g,v=0;if(Q(l))for(g=l.length;v<g&&d.call(l[v],v,l[v])!==!1;v++);else for(v in l)if(d.call(l[v],v,l[v])===!1)break;return l},makeArray:function(l,d){var g=d||[];return l!=null&&(Q(Object(l))?m.merge(g,typeof l=="string"?[l]:l):o.call(g,l)),g},inArray:function(l,d,g){return d==null?-1:a.call(d,l,g)},merge:function(l,d){for(var g=+d.length,v=0,A=l.length;v<g;v++)l[A++]=d[v];return l.length=A,l},grep:function(l,d,g){for(var v,A=[],S=0,x=l.length,V=!g;S<x;S++)v=!d(l[S],S),v!==V&&A.push(l[S]);return A},map:function(l,d,g){var v,A,S=0,x=[];if(Q(l))for(v=l.length;S<v;S++)A=d(l[S],S,g),A!=null&&x.push(A);else for(S in l)A=d(l[S],S,g),A!=null&&x.push(A);return s(x)},guid:1,support:y}),typeof Symbol=="function"&&(m.fn[Symbol.iterator]=t[Symbol.iterator]),m.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(l,d){c["[object "+d+"]"]=d.toLowerCase()});function Q(l){var d=!!l&&"length"in l&&l.length,g=H(l);return _(l)||w(l)?!1:g==="array"||d===0||typeof d=="number"&&d>0&&d-1 in l}var le=function(l){var d,g,v,A,S,x,V,B,G,ne,ve,re,de,Ne,et,qe,Kt,Zt,jn,It="sizzle"+1*new Date,ct=l.document,Dn=0,Et=0,Ht=Sc(),Sa=Sc(),Ec=Sc(),Hn=Sc(),os=function(k,W){return k===W&&(ve=!0),0},as={}.hasOwnProperty,xn=[],_i=xn.pop,Zn=xn.push,wi=xn.push,yb=xn.slice,ls=function(k,W){for(var X=0,ye=k.length;X<ye;X++)if(k[X]===W)return X;return-1},gh="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",At="[\\x20\\t\\r\\n\\f]",cs="(?:\\\\[\\da-fA-F]{1,6}"+At+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",bb="\\["+At+"*("+cs+")(?:"+At+"*([*^$|!~]?=)"+At+`*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(`+cs+"))|)"+At+"*\\]",mh=":("+cs+`)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|`+bb+")*)|.*)\\)|)",$A=new RegExp(At+"+","g"),_c=new RegExp("^"+At+"+|((?:^|[^\\\\])(?:\\\\.)*)"+At+"+$","g"),zA=new RegExp("^"+At+"*,"+At+"*"),Eb=new RegExp("^"+At+"*([>+~]|"+At+")"+At+"*"),WA=new RegExp(At+"|>"),UA=new RegExp(mh),YA=new RegExp("^"+cs+"$"),wc={ID:new RegExp("^#("+cs+")"),CLASS:new RegExp("^\\.("+cs+")"),TAG:new RegExp("^("+cs+"|[*])"),ATTR:new RegExp("^"+bb),PSEUDO:new RegExp("^"+mh),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+At+"*(even|odd|(([+-]|)(\\d*)n|)"+At+"*(?:([+-]|)"+At+"*(\\d+)|))"+At+"*\\)|)","i"),bool:new RegExp("^(?:"+gh+")$","i"),needsContext:new RegExp("^"+At+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+At+"*((?:-\\d)?\\d*)"+At+"*\\)|)(?=[^-]|$)","i")},GA=/HTML$/i,KA=/^(?:input|select|textarea|button)$/i,QA=/^h\d$/i,Ta=/^[^{]+\{\s*\[native \w/,XA=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,vh=/[+~]/,zr=new RegExp("\\\\[\\da-fA-F]{1,6}"+At+"?|\\\\([^\\r\\n\\f])","g"),Wr=function(k,W){var X="0x"+k.slice(1)-65536;return W||(X<0?String.fromCharCode(X+65536):String.fromCharCode(X>>10|55296,X&1023|56320))},_b=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,wb=function(k,W){return W?k==="\0"?"\uFFFD":k.slice(0,-1)+"\\"+k.charCodeAt(k.length-1).toString(16)+" ":"\\"+k},Sb=function(){re()},ZA=Cc(function(k){return k.disabled===!0&&k.nodeName.toLowerCase()==="fieldset"},{dir:"parentNode",next:"legend"});try{wi.apply(xn=yb.call(ct.childNodes),ct.childNodes),xn[ct.childNodes.length].nodeType}catch{wi={apply:xn.length?function(W,X){Zn.apply(W,yb.call(X))}:function(W,X){for(var ye=W.length,ie=0;W[ye++]=X[ie++];);W.length=ye-1}}}function Rt(k,W,X,ye){var ie,Ee,Te,Re,Pe,Ze,Ye,tt=W&&W.ownerDocument,gt=W?W.nodeType:9;if(X=X||[],typeof k!="string"||!k||gt!==1&&gt!==9&&gt!==11)return X;if(!ye&&(re(W),W=W||de,et)){if(gt!==11&&(Pe=XA.exec(k)))if(ie=Pe[1]){if(gt===9)if(Te=W.getElementById(ie)){if(Te.id===ie)return X.push(Te),X}else return X;else if(tt&&(Te=tt.getElementById(ie))&&jn(W,Te)&&Te.id===ie)return X.push(Te),X}else{if(Pe[2])return wi.apply(X,W.getElementsByTagName(k)),X;if((ie=Pe[3])&&g.getElementsByClassName&&W.getElementsByClassName)return wi.apply(X,W.getElementsByClassName(ie)),X}if(g.qsa&&!Hn[k+" "]&&(!qe||!qe.test(k))&&(gt!==1||W.nodeName.toLowerCase()!=="object")){if(Ye=k,tt=W,gt===1&&(WA.test(k)||Eb.test(k))){for(tt=vh.test(k)&&bh(W.parentNode)||W,(tt!==W||!g.scope)&&((Re=W.getAttribute("id"))?Re=Re.replace(_b,wb):W.setAttribute("id",Re=It)),Ze=x(k),Ee=Ze.length;Ee--;)Ze[Ee]=(Re?"#"+Re:":scope")+" "+Tc(Ze[Ee]);Ye=Ze.join(",")}try{if(g.cssSupportsSelector&&!CSS.supports("selector(:is("+Ye+"))"))throw new Error;return wi.apply(X,tt.querySelectorAll(Ye)),X}catch{Hn(k,!0)}finally{Re===It&&W.removeAttribute("id")}}}return B(k.replace(_c,"$1"),W,X,ye)}function Sc(){var k=[];function W(X,ye){return k.push(X+" ")>v.cacheLength&&delete W[k.shift()],W[X+" "]=ye}return W}function mr(k){return k[It]=!0,k}function Jn(k){var W=de.createElement("fieldset");try{return!!k(W)}catch{return!1}finally{W.parentNode&&W.parentNode.removeChild(W),W=null}}function yh(k,W){for(var X=k.split("|"),ye=X.length;ye--;)v.attrHandle[X[ye]]=W}function Tb(k,W){var X=W&&k,ye=X&&k.nodeType===1&&W.nodeType===1&&k.sourceIndex-W.sourceIndex;if(ye)return ye;if(X){for(;X=X.nextSibling;)if(X===W)return-1}return k?1:-1}function JA(k){return function(W){var X=W.nodeName.toLowerCase();return X==="input"&&W.type===k}}function eD(k){return function(W){var X=W.nodeName.toLowerCase();return(X==="input"||X==="button")&&W.type===k}}function Cb(k){return function(W){return"form"in W?W.parentNode&&W.disabled===!1?"label"in W?"label"in W.parentNode?W.parentNode.disabled===k:W.disabled===k:W.isDisabled===k||W.isDisabled!==!k&&ZA(W)===k:W.disabled===k:"label"in W?W.disabled===k:!1}}function us(k){return mr(function(W){return W=+W,mr(function(X,ye){for(var ie,Ee=k([],X.length,W),Te=Ee.length;Te--;)X[ie=Ee[Te]]&&(X[ie]=!(ye[ie]=X[ie]))})})}function bh(k){return k&&typeof k.getElementsByTagName<"u"&&k}g=Rt.support={},S=Rt.isXML=function(k){var W=k&&k.namespaceURI,X=k&&(k.ownerDocument||k).documentElement;return!GA.test(W||X&&X.nodeName||"HTML")},re=Rt.setDocument=function(k){var W,X,ye=k?k.ownerDocument||k:ct;return ye==de||ye.nodeType!==9||!ye.documentElement||(de=ye,Ne=de.documentElement,et=!S(de),ct!=de&&(X=de.defaultView)&&X.top!==X&&(X.addEventListener?X.addEventListener("unload",Sb,!1):X.attachEvent&&X.attachEvent("onunload",Sb)),g.scope=Jn(function(ie){return Ne.appendChild(ie).appendChild(de.createElement("div")),typeof ie.querySelectorAll<"u"&&!ie.querySelectorAll(":scope fieldset div").length}),g.cssSupportsSelector=Jn(function(){return CSS.supports("selector(*)")&&de.querySelectorAll(":is(:jqfake)")&&!CSS.supports("selector(:is(*,:jqfake))")}),g.attributes=Jn(function(ie){return ie.className="i",!ie.getAttribute("className")}),g.getElementsByTagName=Jn(function(ie){return ie.appendChild(de.createComment("")),!ie.getElementsByTagName("*").length}),g.getElementsByClassName=Ta.test(de.getElementsByClassName),g.getById=Jn(function(ie){return Ne.appendChild(ie).id=It,!de.getElementsByName||!de.getElementsByName(It).length}),g.getById?(v.filter.ID=function(ie){var Ee=ie.replace(zr,Wr);return function(Te){return Te.getAttribute("id")===Ee}},v.find.ID=function(ie,Ee){if(typeof Ee.getElementById<"u"&&et){var Te=Ee.getElementById(ie);return Te?[Te]:[]}}):(v.filter.ID=function(ie){var Ee=ie.replace(zr,Wr);return function(Te){var Re=typeof Te.getAttributeNode<"u"&&Te.getAttributeNode("id");return Re&&Re.value===Ee}},v.find.ID=function(ie,Ee){if(typeof Ee.getElementById<"u"&&et){var Te,Re,Pe,Ze=Ee.getElementById(ie);if(Ze){if(Te=Ze.getAttributeNode("id"),Te&&Te.value===ie)return[Ze];for(Pe=Ee.getElementsByName(ie),Re=0;Ze=Pe[Re++];)if(Te=Ze.getAttributeNode("id"),Te&&Te.value===ie)return[Ze]}return[]}}),v.find.TAG=g.getElementsByTagName?function(ie,Ee){if(typeof Ee.getElementsByTagName<"u")return Ee.getElementsByTagName(ie);if(g.qsa)return Ee.querySelectorAll(ie)}:function(ie,Ee){var Te,Re=[],Pe=0,Ze=Ee.getElementsByTagName(ie);if(ie==="*"){for(;Te=Ze[Pe++];)Te.nodeType===1&&Re.push(Te);return Re}return Ze},v.find.CLASS=g.getElementsByClassName&&function(ie,Ee){if(typeof Ee.getElementsByClassName<"u"&&et)return Ee.getElementsByClassName(ie)},Kt=[],qe=[],(g.qsa=Ta.test(de.querySelectorAll))&&(Jn(function(ie){var Ee;Ne.appendChild(ie).innerHTML="<a id='"+It+"'></a><select id='"+It+"-\r\\' msallowcapture=''><option selected=''></option></select>",ie.querySelectorAll("[msallowcapture^='']").length&&qe.push("[*^$]="+At+`*(?:''|"")`),ie.querySelectorAll("[selected]").length||qe.push("\\["+At+"*(?:value|"+gh+")"),ie.querySelectorAll("[id~="+It+"-]").length||qe.push("~="),Ee=de.createElement("input"),Ee.setAttribute("name",""),ie.appendChild(Ee),ie.querySelectorAll("[name='']").length||qe.push("\\["+At+"*name"+At+"*="+At+`*(?:''|"")`),ie.querySelectorAll(":checked").length||qe.push(":checked"),ie.querySelectorAll("a#"+It+"+*").length||qe.push(".#.+[+~]"),ie.querySelectorAll("\\\f"),qe.push("[\\r\\n\\f]")}),Jn(function(ie){ie.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var Ee=de.createElement("input");Ee.setAttribute("type","hidden"),ie.appendChild(Ee).setAttribute("name","D"),ie.querySelectorAll("[name=d]").length&&qe.push("name"+At+"*[*^$|!~]?="),ie.querySelectorAll(":enabled").length!==2&&qe.push(":enabled",":disabled"),Ne.appendChild(ie).disabled=!0,ie.querySelectorAll(":disabled").length!==2&&qe.push(":enabled",":disabled"),ie.querySelectorAll("*,:x"),qe.push(",.*:")})),(g.matchesSelector=Ta.test(Zt=Ne.matches||Ne.webkitMatchesSelector||Ne.mozMatchesSelector||Ne.oMatchesSelector||Ne.msMatchesSelector))&&Jn(function(ie){g.disconnectedMatch=Zt.call(ie,"*"),Zt.call(ie,"[s!='']:x"),Kt.push("!=",mh)}),g.cssSupportsSelector||qe.push(":has"),qe=qe.length&&new RegExp(qe.join("|")),Kt=Kt.length&&new RegExp(Kt.join("|")),W=Ta.test(Ne.compareDocumentPosition),jn=W||Ta.test(Ne.contains)?function(ie,Ee){var Te=ie.nodeType===9&&ie.documentElement||ie,Re=Ee&&Ee.parentNode;return ie===Re||!!(Re&&Re.nodeType===1&&(Te.contains?Te.contains(Re):ie.compareDocumentPosition&&ie.compareDocumentPosition(Re)&16))}:function(ie,Ee){if(Ee){for(;Ee=Ee.parentNode;)if(Ee===ie)return!0}return!1},os=W?function(ie,Ee){if(ie===Ee)return ve=!0,0;var Te=!ie.compareDocumentPosition-!Ee.compareDocumentPosition;return Te||(Te=(ie.ownerDocument||ie)==(Ee.ownerDocument||Ee)?ie.compareDocumentPosition(Ee):1,Te&1||!g.sortDetached&&Ee.compareDocumentPosition(ie)===Te?ie==de||ie.ownerDocument==ct&&jn(ct,ie)?-1:Ee==de||Ee.ownerDocument==ct&&jn(ct,Ee)?1:ne?ls(ne,ie)-ls(ne,Ee):0:Te&4?-1:1)}:function(ie,Ee){if(ie===Ee)return ve=!0,0;var Te,Re=0,Pe=ie.parentNode,Ze=Ee.parentNode,Ye=[ie],tt=[Ee];if(!Pe||!Ze)return ie==de?-1:Ee==de?1:Pe?-1:Ze?1:ne?ls(ne,ie)-ls(ne,Ee):0;if(Pe===Ze)return Tb(ie,Ee);for(Te=ie;Te=Te.parentNode;)Ye.unshift(Te);for(Te=Ee;Te=Te.parentNode;)tt.unshift(Te);for(;Ye[Re]===tt[Re];)Re++;return Re?Tb(Ye[Re],tt[Re]):Ye[Re]==ct?-1:tt[Re]==ct?1:0}),de},Rt.matches=function(k,W){return Rt(k,null,null,W)},Rt.matchesSelector=function(k,W){if(re(k),g.matchesSelector&&et&&!Hn[W+" "]&&(!Kt||!Kt.test(W))&&(!qe||!qe.test(W)))try{var X=Zt.call(k,W);if(X||g.disconnectedMatch||k.document&&k.document.nodeType!==11)return X}catch{Hn(W,!0)}return Rt(W,de,null,[k]).length>0},Rt.contains=function(k,W){return(k.ownerDocument||k)!=de&&re(k),jn(k,W)},Rt.attr=function(k,W){(k.ownerDocument||k)!=de&&re(k);var X=v.attrHandle[W.toLowerCase()],ye=X&&as.call(v.attrHandle,W.toLowerCase())?X(k,W,!et):void 0;return ye!==void 0?ye:g.attributes||!et?k.getAttribute(W):(ye=k.getAttributeNode(W))&&ye.specified?ye.value:null},Rt.escape=function(k){return(k+"").replace(_b,wb)},Rt.error=function(k){throw new Error("Syntax error, unrecognized expression: "+k)},Rt.uniqueSort=function(k){var W,X=[],ye=0,ie=0;if(ve=!g.detectDuplicates,ne=!g.sortStable&&k.slice(0),k.sort(os),ve){for(;W=k[ie++];)W===k[ie]&&(ye=X.push(ie));for(;ye--;)k.splice(X[ye],1)}return ne=null,k},A=Rt.getText=function(k){var W,X="",ye=0,ie=k.nodeType;if(ie){if(ie===1||ie===9||ie===11){if(typeof k.textContent=="string")return k.textContent;for(k=k.firstChild;k;k=k.nextSibling)X+=A(k)}else if(ie===3||ie===4)return k.nodeValue}else for(;W=k[ye++];)X+=A(W);return X},v=Rt.selectors={cacheLength:50,createPseudo:mr,match:wc,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(k){return k[1]=k[1].replace(zr,Wr),k[3]=(k[3]||k[4]||k[5]||"").replace(zr,Wr),k[2]==="~="&&(k[3]=" "+k[3]+" "),k.slice(0,4)},CHILD:function(k){return k[1]=k[1].toLowerCase(),k[1].slice(0,3)==="nth"?(k[3]||Rt.error(k[0]),k[4]=+(k[4]?k[5]+(k[6]||1):2*(k[3]==="even"||k[3]==="odd")),k[5]=+(k[7]+k[8]||k[3]==="odd")):k[3]&&Rt.error(k[0]),k},PSEUDO:function(k){var W,X=!k[6]&&k[2];return wc.CHILD.test(k[0])?null:(k[3]?k[2]=k[4]||k[5]||"":X&&UA.test(X)&&(W=x(X,!0))&&(W=X.indexOf(")",X.length-W)-X.length)&&(k[0]=k[0].slice(0,W),k[2]=X.slice(0,W)),k.slice(0,3))}},filter:{TAG:function(k){var W=k.replace(zr,Wr).toLowerCase();return k==="*"?function(){return!0}:function(X){return X.nodeName&&X.nodeName.toLowerCase()===W}},CLASS:function(k){var W=Ht[k+" "];return W||(W=new RegExp("(^|"+At+")"+k+"("+At+"|$)"))&&Ht(k,function(X){return W.test(typeof X.className=="string"&&X.className||typeof X.getAttribute<"u"&&X.getAttribute("class")||"")})},ATTR:function(k,W,X){return function(ye){var ie=Rt.attr(ye,k);return ie==null?W==="!=":W?(ie+="",W==="="?ie===X:W==="!="?ie!==X:W==="^="?X&&ie.indexOf(X)===0:W==="*="?X&&ie.indexOf(X)>-1:W==="$="?X&&ie.slice(-X.length)===X:W==="~="?(" "+ie.replace($A," ")+" ").indexOf(X)>-1:W==="|="?ie===X||ie.slice(0,X.length+1)===X+"-":!1):!0}},CHILD:function(k,W,X,ye,ie){var Ee=k.slice(0,3)!=="nth",Te=k.slice(-4)!=="last",Re=W==="of-type";return ye===1&&ie===0?function(Pe){return!!Pe.parentNode}:function(Pe,Ze,Ye){var tt,gt,Mt,Je,rn,yn,qn=Ee!==Te?"nextSibling":"previousSibling",jt=Pe.parentNode,Ca=Re&&Pe.nodeName.toLowerCase(),Aa=!Ye&&!Re,Vn=!1;if(jt){if(Ee){for(;qn;){for(Je=Pe;Je=Je[qn];)if(Re?Je.nodeName.toLowerCase()===Ca:Je.nodeType===1)return!1;yn=qn=k==="only"&&!yn&&"nextSibling"}return!0}if(yn=[Te?jt.firstChild:jt.lastChild],Te&&Aa){for(Je=jt,Mt=Je[It]||(Je[It]={}),gt=Mt[Je.uniqueID]||(Mt[Je.uniqueID]={}),tt=gt[k]||[],rn=tt[0]===Dn&&tt[1],Vn=rn&&tt[2],Je=rn&&jt.childNodes[rn];Je=++rn&&Je&&Je[qn]||(Vn=rn=0)||yn.pop();)if(Je.nodeType===1&&++Vn&&Je===Pe){gt[k]=[Dn,rn,Vn];break}}else if(Aa&&(Je=Pe,Mt=Je[It]||(Je[It]={}),gt=Mt[Je.uniqueID]||(Mt[Je.uniqueID]={}),tt=gt[k]||[],rn=tt[0]===Dn&&tt[1],Vn=rn),Vn===!1)for(;(Je=++rn&&Je&&Je[qn]||(Vn=rn=0)||yn.pop())&&!((Re?Je.nodeName.toLowerCase()===Ca:Je.nodeType===1)&&++Vn&&(Aa&&(Mt=Je[It]||(Je[It]={}),gt=Mt[Je.uniqueID]||(Mt[Je.uniqueID]={}),gt[k]=[Dn,Vn]),Je===Pe)););return Vn-=ie,Vn===ye||Vn%ye===0&&Vn/ye>=0}}},PSEUDO:function(k,W){var X,ye=v.pseudos[k]||v.setFilters[k.toLowerCase()]||Rt.error("unsupported pseudo: "+k);return ye[It]?ye(W):ye.length>1?(X=[k,k,"",W],v.setFilters.hasOwnProperty(k.toLowerCase())?mr(function(ie,Ee){for(var Te,Re=ye(ie,W),Pe=Re.length;Pe--;)Te=ls(ie,Re[Pe]),ie[Te]=!(Ee[Te]=Re[Pe])}):function(ie){return ye(ie,0,X)}):ye}},pseudos:{not:mr(function(k){var W=[],X=[],ye=V(k.replace(_c,"$1"));return ye[It]?mr(function(ie,Ee,Te,Re){for(var Pe,Ze=ye(ie,null,Re,[]),Ye=ie.length;Ye--;)(Pe=Ze[Ye])&&(ie[Ye]=!(Ee[Ye]=Pe))}):function(ie,Ee,Te){return W[0]=ie,ye(W,null,Te,X),W[0]=null,!X.pop()}}),has:mr(function(k){return function(W){return Rt(k,W).length>0}}),contains:mr(function(k){return k=k.replace(zr,Wr),function(W){return(W.textContent||A(W)).indexOf(k)>-1}}),lang:mr(function(k){return YA.test(k||"")||Rt.error("unsupported lang: "+k),k=k.replace(zr,Wr).toLowerCase(),function(W){var X;do if(X=et?W.lang:W.getAttribute("xml:lang")||W.getAttribute("lang"))return X=X.toLowerCase(),X===k||X.indexOf(k+"-")===0;while((W=W.parentNode)&&W.nodeType===1);return!1}}),target:function(k){var W=l.location&&l.location.hash;return W&&W.slice(1)===k.id},root:function(k){return k===Ne},focus:function(k){return k===de.activeElement&&(!de.hasFocus||de.hasFocus())&&!!(k.type||k.href||~k.tabIndex)},enabled:Cb(!1),disabled:Cb(!0),checked:function(k){var W=k.nodeName.toLowerCase();return W==="input"&&!!k.checked||W==="option"&&!!k.selected},selected:function(k){return k.parentNode&&k.parentNode.selectedIndex,k.selected===!0},empty:function(k){for(k=k.firstChild;k;k=k.nextSibling)if(k.nodeType<6)return!1;return!0},parent:function(k){return!v.pseudos.empty(k)},header:function(k){return QA.test(k.nodeName)},input:function(k){return KA.test(k.nodeName)},button:function(k){var W=k.nodeName.toLowerCase();return W==="input"&&k.type==="button"||W==="button"},text:function(k){var W;return k.nodeName.toLowerCase()==="input"&&k.type==="text"&&((W=k.getAttribute("type"))==null||W.toLowerCase()==="text")},first:us(function(){return[0]}),last:us(function(k,W){return[W-1]}),eq:us(function(k,W,X){return[X<0?X+W:X]}),even:us(function(k,W){for(var X=0;X<W;X+=2)k.push(X);return k}),odd:us(function(k,W){for(var X=1;X<W;X+=2)k.push(X);return k}),lt:us(function(k,W,X){for(var ye=X<0?X+W:X>W?W:X;--ye>=0;)k.push(ye);return k}),gt:us(function(k,W,X){for(var ye=X<0?X+W:X;++ye<W;)k.push(ye);return k})}},v.pseudos.nth=v.pseudos.eq;for(d in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})v.pseudos[d]=JA(d);for(d in{submit:!0,reset:!0})v.pseudos[d]=eD(d);function Ab(){}Ab.prototype=v.filters=v.pseudos,v.setFilters=new Ab,x=Rt.tokenize=function(k,W){var X,ye,ie,Ee,Te,Re,Pe,Ze=Sa[k+" "];if(Ze)return W?0:Ze.slice(0);for(Te=k,Re=[],Pe=v.preFilter;Te;){(!X||(ye=zA.exec(Te)))&&(ye&&(Te=Te.slice(ye[0].length)||Te),Re.push(ie=[])),X=!1,(ye=Eb.exec(Te))&&(X=ye.shift(),ie.push({value:X,type:ye[0].replace(_c," ")}),Te=Te.slice(X.length));for(Ee in v.filter)(ye=wc[Ee].exec(Te))&&(!Pe[Ee]||(ye=Pe[Ee](ye)))&&(X=ye.shift(),ie.push({value:X,type:Ee,matches:ye}),Te=Te.slice(X.length));if(!X)break}return W?Te.length:Te?Rt.error(k):Sa(k,Re).slice(0)};function Tc(k){for(var W=0,X=k.length,ye="";W<X;W++)ye+=k[W].value;return ye}function Cc(k,W,X){var ye=W.dir,ie=W.next,Ee=ie||ye,Te=X&&Ee==="parentNode",Re=Et++;return W.first?function(Pe,Ze,Ye){for(;Pe=Pe[ye];)if(Pe.nodeType===1||Te)return k(Pe,Ze,Ye);return!1}:function(Pe,Ze,Ye){var tt,gt,Mt,Je=[Dn,Re];if(Ye){for(;Pe=Pe[ye];)if((Pe.nodeType===1||Te)&&k(Pe,Ze,Ye))return!0}else for(;Pe=Pe[ye];)if(Pe.nodeType===1||Te)if(Mt=Pe[It]||(Pe[It]={}),gt=Mt[Pe.uniqueID]||(Mt[Pe.uniqueID]={}),ie&&ie===Pe.nodeName.toLowerCase())Pe=Pe[ye]||Pe;else{if((tt=gt[Ee])&&tt[0]===Dn&&tt[1]===Re)return Je[2]=tt[2];if(gt[Ee]=Je,Je[2]=k(Pe,Ze,Ye))return!0}return!1}}function Eh(k){return k.length>1?function(W,X,ye){for(var ie=k.length;ie--;)if(!k[ie](W,X,ye))return!1;return!0}:k[0]}function tD(k,W,X){for(var ye=0,ie=W.length;ye<ie;ye++)Rt(k,W[ye],X);return X}function Ac(k,W,X,ye,ie){for(var Ee,Te=[],Re=0,Pe=k.length,Ze=W!=null;Re<Pe;Re++)(Ee=k[Re])&&(!X||X(Ee,ye,ie))&&(Te.push(Ee),Ze&&W.push(Re));return Te}function _h(k,W,X,ye,ie,Ee){return ye&&!ye[It]&&(ye=_h(ye)),ie&&!ie[It]&&(ie=_h(ie,Ee)),mr(function(Te,Re,Pe,Ze){var Ye,tt,gt,Mt=[],Je=[],rn=Re.length,yn=Te||tD(W||"*",Pe.nodeType?[Pe]:Pe,[]),qn=k&&(Te||!W)?Ac(yn,Mt,k,Pe,Ze):yn,jt=X?ie||(Te?k:rn||ye)?[]:Re:qn;if(X&&X(qn,jt,Pe,Ze),ye)for(Ye=Ac(jt,Je),ye(Ye,[],Pe,Ze),tt=Ye.length;tt--;)(gt=Ye[tt])&&(jt[Je[tt]]=!(qn[Je[tt]]=gt));if(Te){if(ie||k){if(ie){for(Ye=[],tt=jt.length;tt--;)(gt=jt[tt])&&Ye.push(qn[tt]=gt);ie(null,jt=[],Ye,Ze)}for(tt=jt.length;tt--;)(gt=jt[tt])&&(Ye=ie?ls(Te,gt):Mt[tt])>-1&&(Te[Ye]=!(Re[Ye]=gt))}}else jt=Ac(jt===Re?jt.splice(rn,jt.length):jt),ie?ie(null,Re,jt,Ze):wi.apply(Re,jt)})}function wh(k){for(var W,X,ye,ie=k.length,Ee=v.relative[k[0].type],Te=Ee||v.relative[" "],Re=Ee?1:0,Pe=Cc(function(tt){return tt===W},Te,!0),Ze=Cc(function(tt){return ls(W,tt)>-1},Te,!0),Ye=[function(tt,gt,Mt){var Je=!Ee&&(Mt||gt!==G)||((W=gt).nodeType?Pe(tt,gt,Mt):Ze(tt,gt,Mt));return W=null,Je}];Re<ie;Re++)if(X=v.relative[k[Re].type])Ye=[Cc(Eh(Ye),X)];else{if(X=v.filter[k[Re].type].apply(null,k[Re].matches),X[It]){for(ye=++Re;ye<ie&&!v.relative[k[ye].type];ye++);return _h(Re>1&&Eh(Ye),Re>1&&Tc(k.slice(0,Re-1).concat({value:k[Re-2].type===" "?"*":""})).replace(_c,"$1"),X,Re<ye&&wh(k.slice(Re,ye)),ye<ie&&wh(k=k.slice(ye)),ye<ie&&Tc(k))}Ye.push(X)}return Eh(Ye)}function nD(k,W){var X=W.length>0,ye=k.length>0,ie=function(Ee,Te,Re,Pe,Ze){var Ye,tt,gt,Mt=0,Je="0",rn=Ee&&[],yn=[],qn=G,jt=Ee||ye&&v.find.TAG("*",Ze),Ca=Dn+=qn==null?1:Math.random()||.1,Aa=jt.length;for(Ze&&(G=Te==de||Te||Ze);Je!==Aa&&(Ye=jt[Je])!=null;Je++){if(ye&&Ye){for(tt=0,!Te&&Ye.ownerDocument!=de&&(re(Ye),Re=!et);gt=k[tt++];)if(gt(Ye,Te||de,Re)){Pe.push(Ye);break}Ze&&(Dn=Ca)}X&&((Ye=!gt&&Ye)&&Mt--,Ee&&rn.push(Ye))}if(Mt+=Je,X&&Je!==Mt){for(tt=0;gt=W[tt++];)gt(rn,yn,Te,Re);if(Ee){if(Mt>0)for(;Je--;)rn[Je]||yn[Je]||(yn[Je]=_i.call(Pe));yn=Ac(yn)}wi.apply(Pe,yn),Ze&&!Ee&&yn.length>0&&Mt+W.length>1&&Rt.uniqueSort(Pe)}return Ze&&(Dn=Ca,G=qn),rn};return X?mr(ie):ie}return V=Rt.compile=function(k,W){var X,ye=[],ie=[],Ee=Ec[k+" "];if(!Ee){for(W||(W=x(k)),X=W.length;X--;)Ee=wh(W[X]),Ee[It]?ye.push(Ee):ie.push(Ee);Ee=Ec(k,nD(ie,ye)),Ee.selector=k}return Ee},B=Rt.select=function(k,W,X,ye){var ie,Ee,Te,Re,Pe,Ze=typeof k=="function"&&k,Ye=!ye&&x(k=Ze.selector||k);if(X=X||[],Ye.length===1){if(Ee=Ye[0]=Ye[0].slice(0),Ee.length>2&&(Te=Ee[0]).type==="ID"&&W.nodeType===9&&et&&v.relative[Ee[1].type]){if(W=(v.find.ID(Te.matches[0].replace(zr,Wr),W)||[])[0],W)Ze&&(W=W.parentNode);else return X;k=k.slice(Ee.shift().value.length)}for(ie=wc.needsContext.test(k)?0:Ee.length;ie--&&(Te=Ee[ie],!v.relative[Re=Te.type]);)if((Pe=v.find[Re])&&(ye=Pe(Te.matches[0].replace(zr,Wr),vh.test(Ee[0].type)&&bh(W.parentNode)||W))){if(Ee.splice(ie,1),k=ye.length&&Tc(Ee),!k)return wi.apply(X,ye),X;break}}return(Ze||V(k,Ye))(ye,W,!et,X,!W||vh.test(k)&&bh(W.parentNode)||W),X},g.sortStable=It.split("").sort(os).join("")===It,g.detectDuplicates=!!ve,re(),g.sortDetached=Jn(function(k){return k.compareDocumentPosition(de.createElement("fieldset"))&1}),Jn(function(k){return k.innerHTML="<a href='#'></a>",k.firstChild.getAttribute("href")==="#"})||yh("type|href|height|width",function(k,W,X){if(!X)return k.getAttribute(W,W.toLowerCase()==="type"?1:2)}),(!g.attributes||!Jn(function(k){return k.innerHTML="<input/>",k.firstChild.setAttribute("value",""),k.firstChild.getAttribute("value")===""}))&&yh("value",function(k,W,X){if(!X&&k.nodeName.toLowerCase()==="input")return k.defaultValue}),Jn(function(k){return k.getAttribute("disabled")==null})||yh(gh,function(k,W,X){var ye;if(!X)return k[W]===!0?W.toLowerCase():(ye=k.getAttributeNode(W))&&ye.specified?ye.value:null}),Rt}(n);m.find=le,m.expr=le.selectors,m.expr[":"]=m.expr.pseudos,m.uniqueSort=m.unique=le.uniqueSort,m.text=le.getText,m.isXMLDoc=le.isXML,m.contains=le.contains,m.escapeSelector=le.escape;var J=function(l,d,g){for(var v=[],A=g!==void 0;(l=l[d])&&l.nodeType!==9;)if(l.nodeType===1){if(A&&m(l).is(g))break;v.push(l)}return v},q=function(l,d){for(var g=[];l;l=l.nextSibling)l.nodeType===1&&l!==d&&g.push(l);return g},Z=m.expr.match.needsContext;function ae(l,d){return l.nodeName&&l.nodeName.toLowerCase()===d.toLowerCase()}var Ce=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function Ae(l,d,g){return _(d)?m.grep(l,function(v,A){return!!d.call(v,A,v)!==g}):d.nodeType?m.grep(l,function(v){return v===d!==g}):typeof d!="string"?m.grep(l,function(v){return a.call(d,v)>-1!==g}):m.filter(d,l,g)}m.filter=function(l,d,g){var v=d[0];return g&&(l=":not("+l+")"),d.length===1&&v.nodeType===1?m.find.matchesSelector(v,l)?[v]:[]:m.find.matches(l,m.grep(d,function(A){return A.nodeType===1}))},m.fn.extend({find:function(l){var d,g,v=this.length,A=this;if(typeof l!="string")return this.pushStack(m(l).filter(function(){for(d=0;d<v;d++)if(m.contains(A[d],this))return!0}));for(g=this.pushStack([]),d=0;d<v;d++)m.find(l,A[d],g);return v>1?m.uniqueSort(g):g},filter:function(l){return this.pushStack(Ae(this,l||[],!1))},not:function(l){return this.pushStack(Ae(this,l||[],!0))},is:function(l){return!!Ae(this,typeof l=="string"&&Z.test(l)?m(l):l||[],!1).length}});var _e,Le=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,Ve=m.fn.init=function(l,d,g){var v,A;if(!l)return this;if(g=g||_e,typeof l=="string")if(l[0]==="<"&&l[l.length-1]===">"&&l.length>=3?v=[null,l,null]:v=Le.exec(l),v&&(v[1]||!d))if(v[1]){if(d=d instanceof m?d[0]:d,m.merge(this,m.parseHTML(v[1],d&&d.nodeType?d.ownerDocument||d:E,!0)),Ce.test(v[1])&&m.isPlainObject(d))for(v in d)_(this[v])?this[v](d[v]):this.attr(v,d[v]);return this}else return A=E.getElementById(v[2]),A&&(this[0]=A,this.length=1),this;else return!d||d.jquery?(d||g).find(l):this.constructor(d).find(l);else{if(l.nodeType)return this[0]=l,this.length=1,this;if(_(l))return g.ready!==void 0?g.ready(l):l(m)}return m.makeArray(l,this)};Ve.prototype=m.fn,_e=m(E);var $e=/^(?:parents|prev(?:Until|All))/,pe={children:!0,contents:!0,next:!0,prev:!0};m.fn.extend({has:function(l){var d=m(l,this),g=d.length;return this.filter(function(){for(var v=0;v<g;v++)if(m.contains(this,d[v]))return!0})},closest:function(l,d){var g,v=0,A=this.length,S=[],x=typeof l!="string"&&m(l);if(!Z.test(l)){for(;v<A;v++)for(g=this[v];g&&g!==d;g=g.parentNode)if(g.nodeType<11&&(x?x.index(g)>-1:g.nodeType===1&&m.find.matchesSelector(g,l))){S.push(g);break}}return this.pushStack(S.length>1?m.uniqueSort(S):S)},index:function(l){return l?typeof l=="string"?a.call(m(l),this[0]):a.call(this,l.jquery?l[0]:l):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(l,d){return this.pushStack(m.uniqueSort(m.merge(this.get(),m(l,d))))},addBack:function(l){return this.add(l==null?this.prevObject:this.prevObject.filter(l))}});function ce(l,d){for(;(l=l[d])&&l.nodeType!==1;);return l}m.each({parent:function(l){var d=l.parentNode;return d&&d.nodeType!==11?d:null},parents:function(l){return J(l,"parentNode")},parentsUntil:function(l,d,g){return J(l,"parentNode",g)},next:function(l){return ce(l,"nextSibling")},prev:function(l){return ce(l,"previousSibling")},nextAll:function(l){return J(l,"nextSibling")},prevAll:function(l){return J(l,"previousSibling")},nextUntil:function(l,d,g){return J(l,"nextSibling",g)},prevUntil:function(l,d,g){return J(l,"previousSibling",g)},siblings:function(l){return q((l.parentNode||{}).firstChild,l)},children:function(l){return q(l.firstChild)},contents:function(l){return l.contentDocument!=null&&r(l.contentDocument)?l.contentDocument:(ae(l,"template")&&(l=l.content||l),m.merge([],l.childNodes))}},function(l,d){m.fn[l]=function(g,v){var A=m.map(this,d,g);return l.slice(-5)!=="Until"&&(v=g),v&&typeof v=="string"&&(A=m.filter(v,A)),this.length>1&&(pe[l]||m.uniqueSort(A),$e.test(l)&&A.reverse()),this.pushStack(A)}});var Oe=/[^\x20\t\r\n\f]+/g;function Qe(l){var d={};return m.each(l.match(Oe)||[],function(g,v){d[v]=!0}),d}m.Callbacks=function(l){l=typeof l=="string"?Qe(l):m.extend({},l);var d,g,v,A,S=[],x=[],V=-1,B=function(){for(A=A||l.once,v=d=!0;x.length;V=-1)for(g=x.shift();++V<S.length;)S[V].apply(g[0],g[1])===!1&&l.stopOnFalse&&(V=S.length,g=!1);l.memory||(g=!1),d=!1,A&&(g?S=[]:S="")},G={add:function(){return S&&(g&&!d&&(V=S.length-1,x.push(g)),function ne(ve){m.each(ve,function(re,de){_(de)?(!l.unique||!G.has(de))&&S.push(de):de&&de.length&&H(de)!=="string"&&ne(de)})}(arguments),g&&!d&&B()),this},remove:function(){return m.each(arguments,function(ne,ve){for(var re;(re=m.inArray(ve,S,re))>-1;)S.splice(re,1),re<=V&&V--}),this},has:function(ne){return ne?m.inArray(ne,S)>-1:S.length>0},empty:function(){return S&&(S=[]),this},disable:function(){return A=x=[],S=g="",this},disabled:function(){return!S},lock:function(){return A=x=[],!g&&!d&&(S=g=""),this},locked:function(){return!!A},fireWith:function(ne,ve){return A||(ve=ve||[],ve=[ne,ve.slice?ve.slice():ve],x.push(ve),d||B()),this},fire:function(){return G.fireWith(this,arguments),this},fired:function(){return!!v}};return G};function Ge(l){return l}function We(l){throw l}function lt(l,d,g,v){var A;try{l&&_(A=l.promise)?A.call(l).done(d).fail(g):l&&_(A=l.then)?A.call(l,d,g):d.apply(void 0,[l].slice(v))}catch(S){g.apply(void 0,[S])}}m.extend({Deferred:function(l){var d=[["notify","progress",m.Callbacks("memory"),m.Callbacks("memory"),2],["resolve","done",m.Callbacks("once memory"),m.Callbacks("once memory"),0,"resolved"],["reject","fail",m.Callbacks("once memory"),m.Callbacks("once memory"),1,"rejected"]],g="pending",v={state:function(){return g},always:function(){return A.done(arguments).fail(arguments),this},catch:function(S){return v.then(null,S)},pipe:function(){var S=arguments;return m.Deferred(function(x){m.each(d,function(V,B){var G=_(S[B[4]])&&S[B[4]];A[B[1]](function(){var ne=G&&G.apply(this,arguments);ne&&_(ne.promise)?ne.promise().progress(x.notify).done(x.resolve).fail(x.reject):x[B[0]+"With"](this,G?[ne]:arguments)})}),S=null}).promise()},then:function(S,x,V){var B=0;function G(ne,ve,re,de){return function(){var Ne=this,et=arguments,qe=function(){var Zt,jn;if(!(ne<B)){if(Zt=re.apply(Ne,et),Zt===ve.promise())throw new TypeError("Thenable self-resolution");jn=Zt&&(typeof Zt=="object"||typeof Zt=="function")&&Zt.then,_(jn)?de?jn.call(Zt,G(B,ve,Ge,de),G(B,ve,We,de)):(B++,jn.call(Zt,G(B,ve,Ge,de),G(B,ve,We,de),G(B,ve,Ge,ve.notifyWith))):(re!==Ge&&(Ne=void 0,et=[Zt]),(de||ve.resolveWith)(Ne,et))}},Kt=de?qe:function(){try{qe()}catch(Zt){m.Deferred.exceptionHook&&m.Deferred.exceptionHook(Zt,Kt.stackTrace),ne+1>=B&&(re!==We&&(Ne=void 0,et=[Zt]),ve.rejectWith(Ne,et))}};ne?Kt():(m.Deferred.getStackHook&&(Kt.stackTrace=m.Deferred.getStackHook()),n.setTimeout(Kt))}}return m.Deferred(function(ne){d[0][3].add(G(0,ne,_(V)?V:Ge,ne.notifyWith)),d[1][3].add(G(0,ne,_(S)?S:Ge)),d[2][3].add(G(0,ne,_(x)?x:We))}).promise()},promise:function(S){return S!=null?m.extend(S,v):v}},A={};return m.each(d,function(S,x){var V=x[2],B=x[5];v[x[1]]=V.add,B&&V.add(function(){g=B},d[3-S][2].disable,d[3-S][3].disable,d[0][2].lock,d[0][3].lock),V.add(x[3].fire),A[x[0]]=function(){return A[x[0]+"With"](this===A?void 0:this,arguments),this},A[x[0]+"With"]=V.fireWith}),v.promise(A),l&&l.call(A,A),A},when:function(l){var d=arguments.length,g=d,v=Array(g),A=i.call(arguments),S=m.Deferred(),x=function(V){return function(B){v[V]=this,A[V]=arguments.length>1?i.call(arguments):B,--d||S.resolveWith(v,A)}};if(d<=1&&(lt(l,S.done(x(g)).resolve,S.reject,!d),S.state()==="pending"||_(A[g]&&A[g].then)))return S.then();for(;g--;)lt(A[g],x(g),S.reject);return S.promise()}});var xe=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;m.Deferred.exceptionHook=function(l,d){n.console&&n.console.warn&&l&&xe.test(l.name)&&n.console.warn("jQuery.Deferred exception: "+l.message,l.stack,d)},m.readyException=function(l){n.setTimeout(function(){throw l})};var b=m.Deferred();m.fn.ready=function(l){return b.then(l).catch(function(d){m.readyException(d)}),this},m.extend({isReady:!1,readyWait:1,ready:function(l){(l===!0?--m.readyWait:m.isReady)||(m.isReady=!0,!(l!==!0&&--m.readyWait>0)&&b.resolveWith(E,[m]))}}),m.ready.then=b.then;function C(){E.removeEventListener("DOMContentLoaded",C),n.removeEventListener("load",C),m.ready()}E.readyState==="complete"||E.readyState!=="loading"&&!E.documentElement.doScroll?n.setTimeout(m.ready):(E.addEventListener("DOMContentLoaded",C),n.addEventListener("load",C));var O=function(l,d,g,v,A,S,x){var V=0,B=l.length,G=g==null;if(H(g)==="object"){A=!0;for(V in g)O(l,d,V,g[V],!0,S,x)}else if(v!==void 0&&(A=!0,_(v)||(x=!0),G&&(x?(d.call(l,v),d=null):(G=d,d=function(ne,ve,re){return G.call(m(ne),re)})),d))for(;V<B;V++)d(l[V],g,x?v:v.call(l[V],V,d(l[V],g)));return A?l:G?d.call(l):B?d(l[0],g):S},U=/^-ms-/,K=/-([a-z])/g;function Y(l,d){return d.toUpperCase()}function ee(l){return l.replace(U,"ms-").replace(K,Y)}var ge=function(l){return l.nodeType===1||l.nodeType===9||!+l.nodeType};function be(){this.expando=m.expando+be.uid++}be.uid=1,be.prototype={cache:function(l){var d=l[this.expando];return d||(d={},ge(l)&&(l.nodeType?l[this.expando]=d:Object.defineProperty(l,this.expando,{value:d,configurable:!0}))),d},set:function(l,d,g){var v,A=this.cache(l);if(typeof d=="string")A[ee(d)]=g;else for(v in d)A[ee(v)]=d[v];return A},get:function(l,d){return d===void 0?this.cache(l):l[this.expando]&&l[this.expando][ee(d)]},access:function(l,d,g){return d===void 0||d&&typeof d=="string"&&g===void 0?this.get(l,d):(this.set(l,d,g),g!==void 0?g:d)},remove:function(l,d){var g,v=l[this.expando];if(v!==void 0){if(d!==void 0)for(Array.isArray(d)?d=d.map(ee):(d=ee(d),d=d in v?[d]:d.match(Oe)||[]),g=d.length;g--;)delete v[d[g]];(d===void 0||m.isEmptyObject(v))&&(l.nodeType?l[this.expando]=void 0:delete l[this.expando])}},hasData:function(l){var d=l[this.expando];return d!==void 0&&!m.isEmptyObject(d)}};var ue=new be,Se=new be,bt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,nt=/[A-Z]/g;function rt(l){return l==="true"?!0:l==="false"?!1:l==="null"?null:l===+l+""?+l:bt.test(l)?JSON.parse(l):l}function ut(l,d,g){var v;if(g===void 0&&l.nodeType===1)if(v="data-"+d.replace(nt,"-$&").toLowerCase(),g=l.getAttribute(v),typeof g=="string"){try{g=rt(g)}catch{}Se.set(l,d,g)}else g=void 0;return g}m.extend({hasData:function(l){return Se.hasData(l)||ue.hasData(l)},data:function(l,d,g){return Se.access(l,d,g)},removeData:function(l,d){Se.remove(l,d)},_data:function(l,d,g){return ue.access(l,d,g)},_removeData:function(l,d){ue.remove(l,d)}}),m.fn.extend({data:function(l,d){var g,v,A,S=this[0],x=S&&S.attributes;if(l===void 0){if(this.length&&(A=Se.get(S),S.nodeType===1&&!ue.get(S,"hasDataAttrs"))){for(g=x.length;g--;)x[g]&&(v=x[g].name,v.indexOf("data-")===0&&(v=ee(v.slice(5)),ut(S,v,A[v])));ue.set(S,"hasDataAttrs",!0)}return A}return typeof l=="object"?this.each(function(){Se.set(this,l)}):O(this,function(V){var B;if(S&&V===void 0)return B=Se.get(S,l),B!==void 0||(B=ut(S,l),B!==void 0)?B:void 0;this.each(function(){Se.set(this,l,V)})},null,d,arguments.length>1,null,!0)},removeData:function(l){return this.each(function(){Se.remove(this,l)})}}),m.extend({queue:function(l,d,g){var v;if(l)return d=(d||"fx")+"queue",v=ue.get(l,d),g&&(!v||Array.isArray(g)?v=ue.access(l,d,m.makeArray(g)):v.push(g)),v||[]},dequeue:function(l,d){d=d||"fx";var g=m.queue(l,d),v=g.length,A=g.shift(),S=m._queueHooks(l,d),x=function(){m.dequeue(l,d)};A==="inprogress"&&(A=g.shift(),v--),A&&(d==="fx"&&g.unshift("inprogress"),delete S.stop,A.call(l,x,S)),!v&&S&&S.empty.fire()},_queueHooks:function(l,d){var g=d+"queueHooks";return ue.get(l,g)||ue.access(l,g,{empty:m.Callbacks("once memory").add(function(){ue.remove(l,[d+"queue",g])})})}}),m.fn.extend({queue:function(l,d){var g=2;return typeof l!="string"&&(d=l,l="fx",g--),arguments.length<g?m.queue(this[0],l):d===void 0?this:this.each(function(){var v=m.queue(this,l,d);m._queueHooks(this,l),l==="fx"&&v[0]!=="inprogress"&&m.dequeue(this,l)})},dequeue:function(l){return this.each(function(){m.dequeue(this,l)})},clearQueue:function(l){return this.queue(l||"fx",[])},promise:function(l,d){var g,v=1,A=m.Deferred(),S=this,x=this.length,V=function(){--v||A.resolveWith(S,[S])};for(typeof l!="string"&&(d=l,l=void 0),l=l||"fx";x--;)g=ue.get(S[x],l+"queueHooks"),g&&g.empty&&(v++,g.empty.add(V));return V(),A.promise(d)}});var _t=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,vt=new RegExp("^(?:([+-])=|)("+_t+")([a-z%]*)$","i"),ke=["Top","Right","Bottom","Left"],kt=E.documentElement,Ke=function(l){return m.contains(l.ownerDocument,l)},zt={composed:!0};kt.getRootNode&&(Ke=function(l){return m.contains(l.ownerDocument,l)||l.getRootNode(zt)===l.ownerDocument});var an=function(l,d){return l=d||l,l.style.display==="none"||l.style.display===""&&Ke(l)&&m.css(l,"display")==="none"};function dn(l,d,g,v){var A,S,x=20,V=v?function(){return v.cur()}:function(){return m.css(l,d,"")},B=V(),G=g&&g[3]||(m.cssNumber[d]?"":"px"),ne=l.nodeType&&(m.cssNumber[d]||G!=="px"&&+B)&&vt.exec(m.css(l,d));if(ne&&ne[3]!==G){for(B=B/2,G=G||ne[3],ne=+B||1;x--;)m.style(l,d,ne+G),(1-S)*(1-(S=V()/B||.5))<=0&&(x=0),ne=ne/S;ne=ne*2,m.style(l,d,ne+G),g=g||[]}return g&&(ne=+ne||+B||0,A=g[1]?ne+(g[1]+1)*g[2]:+g[2],v&&(v.unit=G,v.start=ne,v.end=A)),A}var Qn={};function Pt(l){var d,g=l.ownerDocument,v=l.nodeName,A=Qn[v];return A||(d=g.body.appendChild(g.createElement(v)),A=m.css(d,"display"),d.parentNode.removeChild(d),A==="none"&&(A="block"),Qn[v]=A,A)}function Ot(l,d){for(var g,v,A=[],S=0,x=l.length;S<x;S++)v=l[S],v.style&&(g=v.style.display,d?(g==="none"&&(A[S]=ue.get(v,"display")||null,A[S]||(v.style.display="")),v.style.display===""&&an(v)&&(A[S]=Pt(v))):g!=="none"&&(A[S]="none",ue.set(v,"display",g)));for(S=0;S<x;S++)A[S]!=null&&(l[S].style.display=A[S]);return l}m.fn.extend({show:function(){return Ot(this,!0)},hide:function(){return Ot(this)},toggle:function(l){return typeof l=="boolean"?l?this.show():this.hide():this.each(function(){an(this)?m(this).show():m(this).hide()})}});var Lt=/^(?:checkbox|radio)$/i,ln=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Ft=/^$|^module$|\/(?:java|ecma)script/i;(function(){var l=E.createDocumentFragment(),d=l.appendChild(E.createElement("div")),g=E.createElement("input");g.setAttribute("type","radio"),g.setAttribute("checked","checked"),g.setAttribute("name","t"),d.appendChild(g),y.checkClone=d.cloneNode(!0).cloneNode(!0).lastChild.checked,d.innerHTML="<textarea>x</textarea>",y.noCloneChecked=!!d.cloneNode(!0).lastChild.defaultValue,d.innerHTML="<option></option>",y.option=!!d.lastChild})();var dt={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};dt.tbody=dt.tfoot=dt.colgroup=dt.caption=dt.thead,dt.th=dt.td,y.option||(dt.optgroup=dt.option=[1,"<select multiple='multiple'>","</select>"]);function Xt(l,d){var g;return typeof l.getElementsByTagName<"u"?g=l.getElementsByTagName(d||"*"):typeof l.querySelectorAll<"u"?g=l.querySelectorAll(d||"*"):g=[],d===void 0||d&&ae(l,d)?m.merge([l],g):g}function Hr(l,d){for(var g=0,v=l.length;g<v;g++)ue.set(l[g],"globalEval",!d||ue.get(d[g],"globalEval"))}var so=/<|&#?\w+;/;function Fn(l,d,g,v,A){for(var S,x,V,B,G,ne,ve=d.createDocumentFragment(),re=[],de=0,Ne=l.length;de<Ne;de++)if(S=l[de],S||S===0)if(H(S)==="object")m.merge(re,S.nodeType?[S]:S);else if(!so.test(S))re.push(d.createTextNode(S));else{for(x=x||ve.appendChild(d.createElement("div")),V=(ln.exec(S)||["",""])[1].toLowerCase(),B=dt[V]||dt._default,x.innerHTML=B[1]+m.htmlPrefilter(S)+B[2],ne=B[0];ne--;)x=x.lastChild;m.merge(re,x.childNodes),x=ve.firstChild,x.textContent=""}for(ve.textContent="",de=0;S=re[de++];){if(v&&m.inArray(S,v)>-1){A&&A.push(S);continue}if(G=Ke(S),x=Xt(ve.appendChild(S),"script"),G&&Hr(x),g)for(ne=0;S=x[ne++];)Ft.test(S.type||"")&&g.push(S)}return ve}var Ar=/^([^.]*)(?:\.(.+)|)/;function Gt(){return!0}function pr(){return!1}function oo(l,d){return l===P()==(d==="focus")}function P(){try{return E.activeElement}catch{}}function L(l,d,g,v,A,S){var x,V;if(typeof d=="object"){typeof g!="string"&&(v=v||g,g=void 0);for(V in d)L(l,V,g,v,d[V],S);return l}if(v==null&&A==null?(A=g,v=g=void 0):A==null&&(typeof g=="string"?(A=v,v=void 0):(A=v,v=g,g=void 0)),A===!1)A=pr;else if(!A)return l;return S===1&&(x=A,A=function(B){return m().off(B),x.apply(this,arguments)},A.guid=x.guid||(x.guid=m.guid++)),l.each(function(){m.event.add(this,d,A,v,g)})}m.event={global:{},add:function(l,d,g,v,A){var S,x,V,B,G,ne,ve,re,de,Ne,et,qe=ue.get(l);if(ge(l))for(g.handler&&(S=g,g=S.handler,A=S.selector),A&&m.find.matchesSelector(kt,A),g.guid||(g.guid=m.guid++),(B=qe.events)||(B=qe.events=Object.create(null)),(x=qe.handle)||(x=qe.handle=function(Kt){return typeof m<"u"&&m.event.triggered!==Kt.type?m.event.dispatch.apply(l,arguments):void 0}),d=(d||"").match(Oe)||[""],G=d.length;G--;)V=Ar.exec(d[G])||[],de=et=V[1],Ne=(V[2]||"").split(".").sort(),de&&(ve=m.event.special[de]||{},de=(A?ve.delegateType:ve.bindType)||de,ve=m.event.special[de]||{},ne=m.extend({type:de,origType:et,data:v,handler:g,guid:g.guid,selector:A,needsContext:A&&m.expr.match.needsContext.test(A),namespace:Ne.join(".")},S),(re=B[de])||(re=B[de]=[],re.delegateCount=0,(!ve.setup||ve.setup.call(l,v,Ne,x)===!1)&&l.addEventListener&&l.addEventListener(de,x)),ve.add&&(ve.add.call(l,ne),ne.handler.guid||(ne.handler.guid=g.guid)),A?re.splice(re.delegateCount++,0,ne):re.push(ne),m.event.global[de]=!0)},remove:function(l,d,g,v,A){var S,x,V,B,G,ne,ve,re,de,Ne,et,qe=ue.hasData(l)&&ue.get(l);if(!(!qe||!(B=qe.events))){for(d=(d||"").match(Oe)||[""],G=d.length;G--;){if(V=Ar.exec(d[G])||[],de=et=V[1],Ne=(V[2]||"").split(".").sort(),!de){for(de in B)m.event.remove(l,de+d[G],g,v,!0);continue}for(ve=m.event.special[de]||{},de=(v?ve.delegateType:ve.bindType)||de,re=B[de]||[],V=V[2]&&new RegExp("(^|\\.)"+Ne.join("\\.(?:.*\\.|)")+"(\\.|$)"),x=S=re.length;S--;)ne=re[S],(A||et===ne.origType)&&(!g||g.guid===ne.guid)&&(!V||V.test(ne.namespace))&&(!v||v===ne.selector||v==="**"&&ne.selector)&&(re.splice(S,1),ne.selector&&re.delegateCount--,ve.remove&&ve.remove.call(l,ne));x&&!re.length&&((!ve.teardown||ve.teardown.call(l,Ne,qe.handle)===!1)&&m.removeEvent(l,de,qe.handle),delete B[de])}m.isEmptyObject(B)&&ue.remove(l,"handle events")}},dispatch:function(l){var d,g,v,A,S,x,V=new Array(arguments.length),B=m.event.fix(l),G=(ue.get(this,"events")||Object.create(null))[B.type]||[],ne=m.event.special[B.type]||{};for(V[0]=B,d=1;d<arguments.length;d++)V[d]=arguments[d];if(B.delegateTarget=this,!(ne.preDispatch&&ne.preDispatch.call(this,B)===!1)){for(x=m.event.handlers.call(this,B,G),d=0;(A=x[d++])&&!B.isPropagationStopped();)for(B.currentTarget=A.elem,g=0;(S=A.handlers[g++])&&!B.isImmediatePropagationStopped();)(!B.rnamespace||S.namespace===!1||B.rnamespace.test(S.namespace))&&(B.handleObj=S,B.data=S.data,v=((m.event.special[S.origType]||{}).handle||S.handler).apply(A.elem,V),v!==void 0&&(B.result=v)===!1&&(B.preventDefault(),B.stopPropagation()));return ne.postDispatch&&ne.postDispatch.call(this,B),B.result}},handlers:function(l,d){var g,v,A,S,x,V=[],B=d.delegateCount,G=l.target;if(B&&G.nodeType&&!(l.type==="click"&&l.button>=1)){for(;G!==this;G=G.parentNode||this)if(G.nodeType===1&&!(l.type==="click"&&G.disabled===!0)){for(S=[],x={},g=0;g<B;g++)v=d[g],A=v.selector+" ",x[A]===void 0&&(x[A]=v.needsContext?m(A,this).index(G)>-1:m.find(A,this,null,[G]).length),x[A]&&S.push(v);S.length&&V.push({elem:G,handlers:S})}}return G=this,B<d.length&&V.push({elem:G,handlers:d.slice(B)}),V},addProp:function(l,d){Object.defineProperty(m.Event.prototype,l,{enumerable:!0,configurable:!0,get:_(d)?function(){if(this.originalEvent)return d(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[l]},set:function(g){Object.defineProperty(this,l,{enumerable:!0,configurable:!0,writable:!0,value:g})}})},fix:function(l){return l[m.expando]?l:new m.Event(l)},special:{load:{noBubble:!0},click:{setup:function(l){var d=this||l;return Lt.test(d.type)&&d.click&&ae(d,"input")&&te(d,"click",Gt),!1},trigger:function(l){var d=this||l;return Lt.test(d.type)&&d.click&&ae(d,"input")&&te(d,"click"),!0},_default:function(l){var d=l.target;return Lt.test(d.type)&&d.click&&ae(d,"input")&&ue.get(d,"click")||ae(d,"a")}},beforeunload:{postDispatch:function(l){l.result!==void 0&&l.originalEvent&&(l.originalEvent.returnValue=l.result)}}}};function te(l,d,g){if(!g){ue.get(l,d)===void 0&&m.event.add(l,d,Gt);return}ue.set(l,d,!1),m.event.add(l,d,{namespace:!1,handler:function(v){var A,S,x=ue.get(this,d);if(v.isTrigger&1&&this[d]){if(x.length)(m.event.special[d]||{}).delegateType&&v.stopPropagation();else if(x=i.call(arguments),ue.set(this,d,x),A=g(this,d),this[d](),S=ue.get(this,d),x!==S||A?ue.set(this,d,!1):S={},x!==S)return v.stopImmediatePropagation(),v.preventDefault(),S&&S.value}else x.length&&(ue.set(this,d,{value:m.event.trigger(m.extend(x[0],m.Event.prototype),x.slice(1),this)}),v.stopImmediatePropagation())}})}m.removeEvent=function(l,d,g){l.removeEventListener&&l.removeEventListener(d,g)},m.Event=function(l,d){if(!(this instanceof m.Event))return new m.Event(l,d);l&&l.type?(this.originalEvent=l,this.type=l.type,this.isDefaultPrevented=l.defaultPrevented||l.defaultPrevented===void 0&&l.returnValue===!1?Gt:pr,this.target=l.target&&l.target.nodeType===3?l.target.parentNode:l.target,this.currentTarget=l.currentTarget,this.relatedTarget=l.relatedTarget):this.type=l,d&&m.extend(this,d),this.timeStamp=l&&l.timeStamp||Date.now(),this[m.expando]=!0},m.Event.prototype={constructor:m.Event,isDefaultPrevented:pr,isPropagationStopped:pr,isImmediatePropagationStopped:pr,isSimulated:!1,preventDefault:function(){var l=this.originalEvent;this.isDefaultPrevented=Gt,l&&!this.isSimulated&&l.preventDefault()},stopPropagation:function(){var l=this.originalEvent;this.isPropagationStopped=Gt,l&&!this.isSimulated&&l.stopPropagation()},stopImmediatePropagation:function(){var l=this.originalEvent;this.isImmediatePropagationStopped=Gt,l&&!this.isSimulated&&l.stopImmediatePropagation(),this.stopPropagation()}},m.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},m.event.addProp),m.each({focus:"focusin",blur:"focusout"},function(l,d){m.event.special[l]={setup:function(){return te(this,l,oo),!1},trigger:function(){return te(this,l),!0},_default:function(g){return ue.get(g.target,l)},delegateType:d}}),m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(l,d){m.event.special[l]={delegateType:d,bindType:d,handle:function(g){var v,A=this,S=g.relatedTarget,x=g.handleObj;return(!S||S!==A&&!m.contains(A,S))&&(g.type=x.origType,v=x.handler.apply(this,arguments),g.type=d),v}}}),m.fn.extend({on:function(l,d,g,v){return L(this,l,d,g,v)},one:function(l,d,g,v){return L(this,l,d,g,v,1)},off:function(l,d,g){var v,A;if(l&&l.preventDefault&&l.handleObj)return v=l.handleObj,m(l.delegateTarget).off(v.namespace?v.origType+"."+v.namespace:v.origType,v.selector,v.handler),this;if(typeof l=="object"){for(A in l)this.off(A,d,l[A]);return this}return(d===!1||typeof d=="function")&&(g=d,d=void 0),g===!1&&(g=pr),this.each(function(){m.event.remove(this,l,g,d)})}});var he=/<script|<style|<link/i,Ie=/checked\s*(?:[^=]|=\s*.checked.)/i,Me=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function at(l,d){return ae(l,"table")&&ae(d.nodeType!==11?d:d.firstChild,"tr")&&m(l).children("tbody")[0]||l}function je(l){return l.type=(l.getAttribute("type")!==null)+"/"+l.type,l}function it(l){return(l.type||"").slice(0,5)==="true/"?l.type=l.type.slice(5):l.removeAttribute("type"),l}function Be(l,d){var g,v,A,S,x,V,B;if(d.nodeType===1){if(ue.hasData(l)&&(S=ue.get(l),B=S.events,B)){ue.remove(d,"handle events");for(A in B)for(g=0,v=B[A].length;g<v;g++)m.event.add(d,A,B[A][g])}Se.hasData(l)&&(x=Se.access(l),V=m.extend({},x),Se.set(d,V))}}function Xe(l,d){var g=d.nodeName.toLowerCase();g==="input"&&Lt.test(l.type)?d.checked=l.checked:(g==="input"||g==="textarea")&&(d.defaultValue=l.defaultValue)}function mt(l,d,g,v){d=s(d);var A,S,x,V,B,G,ne=0,ve=l.length,re=ve-1,de=d[0],Ne=_(de);if(Ne||ve>1&&typeof de=="string"&&!y.checkClone&&Ie.test(de))return l.each(function(et){var qe=l.eq(et);Ne&&(d[0]=de.call(this,et,qe.html())),mt(qe,d,g,v)});if(ve&&(A=Fn(d,l[0].ownerDocument,!1,l,v),S=A.firstChild,A.childNodes.length===1&&(A=S),S||v)){for(x=m.map(Xt(A,"script"),je),V=x.length;ne<ve;ne++)B=A,ne!==re&&(B=m.clone(B,!0,!0),V&&m.merge(x,Xt(B,"script"))),g.call(l[ne],B,ne);if(V)for(G=x[x.length-1].ownerDocument,m.map(x,it),ne=0;ne<V;ne++)B=x[ne],Ft.test(B.type||"")&&!ue.access(B,"globalEval")&&m.contains(G,B)&&(B.src&&(B.type||"").toLowerCase()!=="module"?m._evalUrl&&!B.noModule&&m._evalUrl(B.src,{nonce:B.nonce||B.getAttribute("nonce")},G):R(B.textContent.replace(Me,""),B,G))}return l}function fn(l,d,g){for(var v,A=d?m.filter(d,l):l,S=0;(v=A[S])!=null;S++)!g&&v.nodeType===1&&m.cleanData(Xt(v)),v.parentNode&&(g&&Ke(v)&&Hr(Xt(v,"script")),v.parentNode.removeChild(v));return l}m.extend({htmlPrefilter:function(l){return l},clone:function(l,d,g){var v,A,S,x,V=l.cloneNode(!0),B=Ke(l);if(!y.noCloneChecked&&(l.nodeType===1||l.nodeType===11)&&!m.isXMLDoc(l))for(x=Xt(V),S=Xt(l),v=0,A=S.length;v<A;v++)Xe(S[v],x[v]);if(d)if(g)for(S=S||Xt(l),x=x||Xt(V),v=0,A=S.length;v<A;v++)Be(S[v],x[v]);else Be(l,V);return x=Xt(V,"script"),x.length>0&&Hr(x,!B&&Xt(l,"script")),V},cleanData:function(l){for(var d,g,v,A=m.event.special,S=0;(g=l[S])!==void 0;S++)if(ge(g)){if(d=g[ue.expando]){if(d.events)for(v in d.events)A[v]?m.event.remove(g,v):m.removeEvent(g,v,d.handle);g[ue.expando]=void 0}g[Se.expando]&&(g[Se.expando]=void 0)}}}),m.fn.extend({detach:function(l){return fn(this,l,!0)},remove:function(l){return fn(this,l)},text:function(l){return O(this,function(d){return d===void 0?m.text(this):this.empty().each(function(){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&(this.textContent=d)})},null,l,arguments.length)},append:function(){return mt(this,arguments,function(l){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var d=at(this,l);d.appendChild(l)}})},prepend:function(){return mt(this,arguments,function(l){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var d=at(this,l);d.insertBefore(l,d.firstChild)}})},before:function(){return mt(this,arguments,function(l){this.parentNode&&this.parentNode.insertBefore(l,this)})},after:function(){return mt(this,arguments,function(l){this.parentNode&&this.parentNode.insertBefore(l,this.nextSibling)})},empty:function(){for(var l,d=0;(l=this[d])!=null;d++)l.nodeType===1&&(m.cleanData(Xt(l,!1)),l.textContent="");return this},clone:function(l,d){return l=l??!1,d=d??l,this.map(function(){return m.clone(this,l,d)})},html:function(l){return O(this,function(d){var g=this[0]||{},v=0,A=this.length;if(d===void 0&&g.nodeType===1)return g.innerHTML;if(typeof d=="string"&&!he.test(d)&&!dt[(ln.exec(d)||["",""])[1].toLowerCase()]){d=m.htmlPrefilter(d);try{for(;v<A;v++)g=this[v]||{},g.nodeType===1&&(m.cleanData(Xt(g,!1)),g.innerHTML=d);g=0}catch{}}g&&this.empty().append(d)},null,l,arguments.length)},replaceWith:function(){var l=[];return mt(this,arguments,function(d){var g=this.parentNode;m.inArray(this,l)<0&&(m.cleanData(Xt(this)),g&&g.replaceChild(d,this))},l)}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(l,d){m.fn[l]=function(g){for(var v,A=[],S=m(g),x=S.length-1,V=0;V<=x;V++)v=V===x?this:this.clone(!0),m(S[V])[d](v),o.apply(A,v.get());return this.pushStack(A)}});var Bt=new RegExp("^("+_t+")(?!px)[a-z%]+$","i"),Xn=/^--/,Sn=function(l){var d=l.ownerDocument.defaultView;return(!d||!d.opener)&&(d=n),d.getComputedStyle(l)},es=function(l,d,g){var v,A,S={};for(A in d)S[A]=l.style[A],l.style[A]=d[A];v=g.call(l);for(A in d)l.style[A]=S[A];return v},ts=new RegExp(ke.join("|"),"i"),ao="[\\x20\\t\\r\\n\\f]",lo=new RegExp("^"+ao+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ao+"+$","g");(function(){function l(){if(G){B.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",G.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",kt.appendChild(B).appendChild(G);var ne=n.getComputedStyle(G);g=ne.top!=="1%",V=d(ne.marginLeft)===12,G.style.right="60%",S=d(ne.right)===36,v=d(ne.width)===36,G.style.position="absolute",A=d(G.offsetWidth/3)===12,kt.removeChild(B),G=null}}function d(ne){return Math.round(parseFloat(ne))}var g,v,A,S,x,V,B=E.createElement("div"),G=E.createElement("div");G.style&&(G.style.backgroundClip="content-box",G.cloneNode(!0).style.backgroundClip="",y.clearCloneStyle=G.style.backgroundClip==="content-box",m.extend(y,{boxSizingReliable:function(){return l(),v},pixelBoxStyles:function(){return l(),S},pixelPosition:function(){return l(),g},reliableMarginLeft:function(){return l(),V},scrollboxSize:function(){return l(),A},reliableTrDimensions:function(){var ne,ve,re,de;return x==null&&(ne=E.createElement("table"),ve=E.createElement("tr"),re=E.createElement("div"),ne.style.cssText="position:absolute;left:-11111px;border-collapse:separate",ve.style.cssText="border:1px solid",ve.style.height="1px",re.style.height="9px",re.style.display="block",kt.appendChild(ne).appendChild(ve).appendChild(re),de=n.getComputedStyle(ve),x=parseInt(de.height,10)+parseInt(de.borderTopWidth,10)+parseInt(de.borderBottomWidth,10)===ve.offsetHeight,kt.removeChild(ne)),x}}))})();function qr(l,d,g){var v,A,S,x,V=Xn.test(d),B=l.style;return g=g||Sn(l),g&&(x=g.getPropertyValue(d)||g[d],V&&x&&(x=x.replace(lo,"$1")||void 0),x===""&&!Ke(l)&&(x=m.style(l,d)),!y.pixelBoxStyles()&&Bt.test(x)&&ts.test(d)&&(v=B.width,A=B.minWidth,S=B.maxWidth,B.minWidth=B.maxWidth=B.width=x,x=g.width,B.width=v,B.minWidth=A,B.maxWidth=S)),x!==void 0?x+"":x}function co(l,d){return{get:function(){if(l()){delete this.get;return}return(this.get=d).apply(this,arguments)}}}var uo=["Webkit","Moz","ms"],vi=E.createElement("div").style,ns={};function fo(l){for(var d=l[0].toUpperCase()+l.slice(1),g=uo.length;g--;)if(l=uo[g]+d,l in vi)return l}function ma(l){var d=m.cssProps[l]||ns[l];return d||(l in vi?l:ns[l]=fo(l)||l)}var ih=/^(none|table(?!-c[ea]).+)/,sh={position:"absolute",visibility:"hidden",display:"block"},va={letterSpacing:"0",fontWeight:"400"};function yi(l,d,g){var v=vt.exec(d);return v?Math.max(0,v[2]-(g||0))+(v[3]||"px"):d}function rs(l,d,g,v,A,S){var x=d==="width"?1:0,V=0,B=0;if(g===(v?"border":"content"))return 0;for(;x<4;x+=2)g==="margin"&&(B+=m.css(l,g+ke[x],!0,A)),v?(g==="content"&&(B-=m.css(l,"padding"+ke[x],!0,A)),g!=="margin"&&(B-=m.css(l,"border"+ke[x]+"Width",!0,A))):(B+=m.css(l,"padding"+ke[x],!0,A),g!=="padding"?B+=m.css(l,"border"+ke[x]+"Width",!0,A):V+=m.css(l,"border"+ke[x]+"Width",!0,A));return!v&&S>=0&&(B+=Math.max(0,Math.ceil(l["offset"+d[0].toUpperCase()+d.slice(1)]-S-B-V-.5))||0),B}function is(l,d,g){var v=Sn(l),A=!y.boxSizingReliable()||g,S=A&&m.css(l,"boxSizing",!1,v)==="border-box",x=S,V=qr(l,d,v),B="offset"+d[0].toUpperCase()+d.slice(1);if(Bt.test(V)){if(!g)return V;V="auto"}return(!y.boxSizingReliable()&&S||!y.reliableTrDimensions()&&ae(l,"tr")||V==="auto"||!parseFloat(V)&&m.css(l,"display",!1,v)==="inline")&&l.getClientRects().length&&(S=m.css(l,"boxSizing",!1,v)==="border-box",x=B in l,x&&(V=l[B])),V=parseFloat(V)||0,V+rs(l,d,g||(S?"border":"content"),x,v,V)+"px"}m.extend({cssHooks:{opacity:{get:function(l,d){if(d){var g=qr(l,"opacity");return g===""?"1":g}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(l,d,g,v){if(!(!l||l.nodeType===3||l.nodeType===8||!l.style)){var A,S,x,V=ee(d),B=Xn.test(d),G=l.style;if(B||(d=ma(V)),x=m.cssHooks[d]||m.cssHooks[V],g!==void 0){if(S=typeof g,S==="string"&&(A=vt.exec(g))&&A[1]&&(g=dn(l,d,A),S="number"),g==null||g!==g)return;S==="number"&&!B&&(g+=A&&A[3]||(m.cssNumber[V]?"":"px")),!y.clearCloneStyle&&g===""&&d.indexOf("background")===0&&(G[d]="inherit"),(!x||!("set"in x)||(g=x.set(l,g,v))!==void 0)&&(B?G.setProperty(d,g):G[d]=g)}else return x&&"get"in x&&(A=x.get(l,!1,v))!==void 0?A:G[d]}},css:function(l,d,g,v){var A,S,x,V=ee(d),B=Xn.test(d);return B||(d=ma(V)),x=m.cssHooks[d]||m.cssHooks[V],x&&"get"in x&&(A=x.get(l,!0,g)),A===void 0&&(A=qr(l,d,v)),A==="normal"&&d in va&&(A=va[d]),g===""||g?(S=parseFloat(A),g===!0||isFinite(S)?S||0:A):A}}),m.each(["height","width"],function(l,d){m.cssHooks[d]={get:function(g,v,A){if(v)return ih.test(m.css(g,"display"))&&(!g.getClientRects().length||!g.getBoundingClientRect().width)?es(g,sh,function(){return is(g,d,A)}):is(g,d,A)},set:function(g,v,A){var S,x=Sn(g),V=!y.scrollboxSize()&&x.position==="absolute",B=V||A,G=B&&m.css(g,"boxSizing",!1,x)==="border-box",ne=A?rs(g,d,A,G,x):0;return G&&V&&(ne-=Math.ceil(g["offset"+d[0].toUpperCase()+d.slice(1)]-parseFloat(x[d])-rs(g,d,"border",!1,x)-.5)),ne&&(S=vt.exec(v))&&(S[3]||"px")!=="px"&&(g.style[d]=v,v=m.css(g,d)),yi(g,v,ne)}}}),m.cssHooks.marginLeft=co(y.reliableMarginLeft,function(l,d){if(d)return(parseFloat(qr(l,"marginLeft"))||l.getBoundingClientRect().left-es(l,{marginLeft:0},function(){return l.getBoundingClientRect().left}))+"px"}),m.each({margin:"",padding:"",border:"Width"},function(l,d){m.cssHooks[l+d]={expand:function(g){for(var v=0,A={},S=typeof g=="string"?g.split(" "):[g];v<4;v++)A[l+ke[v]+d]=S[v]||S[v-2]||S[0];return A}},l!=="margin"&&(m.cssHooks[l+d].set=yi)}),m.fn.extend({css:function(l,d){return O(this,function(g,v,A){var S,x,V={},B=0;if(Array.isArray(v)){for(S=Sn(g),x=v.length;B<x;B++)V[v[B]]=m.css(g,v[B],!1,S);return V}return A!==void 0?m.style(g,v,A):m.css(g,v)},l,d,arguments.length>1)}});function hn(l,d,g,v,A){return new hn.prototype.init(l,d,g,v,A)}m.Tween=hn,hn.prototype={constructor:hn,init:function(l,d,g,v,A,S){this.elem=l,this.prop=g,this.easing=A||m.easing._default,this.options=d,this.start=this.now=this.cur(),this.end=v,this.unit=S||(m.cssNumber[g]?"":"px")},cur:function(){var l=hn.propHooks[this.prop];return l&&l.get?l.get(this):hn.propHooks._default.get(this)},run:function(l){var d,g=hn.propHooks[this.prop];return this.options.duration?this.pos=d=m.easing[this.easing](l,this.options.duration*l,0,1,this.options.duration):this.pos=d=l,this.now=(this.end-this.start)*d+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),g&&g.set?g.set(this):hn.propHooks._default.set(this),this}},hn.prototype.init.prototype=hn.prototype,hn.propHooks={_default:{get:function(l){var d;return l.elem.nodeType!==1||l.elem[l.prop]!=null&&l.elem.style[l.prop]==null?l.elem[l.prop]:(d=m.css(l.elem,l.prop,""),!d||d==="auto"?0:d)},set:function(l){m.fx.step[l.prop]?m.fx.step[l.prop](l):l.elem.nodeType===1&&(m.cssHooks[l.prop]||l.elem.style[ma(l.prop)]!=null)?m.style(l.elem,l.prop,l.now+l.unit):l.elem[l.prop]=l.now}}},hn.propHooks.scrollTop=hn.propHooks.scrollLeft={set:function(l){l.elem.nodeType&&l.elem.parentNode&&(l.elem[l.prop]=l.now)}},m.easing={linear:function(l){return l},swing:function(l){return .5-Math.cos(l*Math.PI)/2},_default:"swing"},m.fx=hn.prototype.init,m.fx.step={};var Vr,ho,ic=/^(?:toggle|show|hide)$/,oh=/queueHooks$/;function po(){ho&&(E.hidden===!1&&n.requestAnimationFrame?n.requestAnimationFrame(po):n.setTimeout(po,m.fx.interval),m.fx.tick())}function sc(){return n.setTimeout(function(){Vr=void 0}),Vr=Date.now()}function go(l,d){var g,v=0,A={height:l};for(d=d?1:0;v<4;v+=2-d)g=ke[v],A["margin"+g]=A["padding"+g]=l;return d&&(A.opacity=A.width=l),A}function ya(l,d,g){for(var v,A=(Bn.tweeners[d]||[]).concat(Bn.tweeners["*"]),S=0,x=A.length;S<x;S++)if(v=A[S].call(g,d,l))return v}function ah(l,d,g){var v,A,S,x,V,B,G,ne,ve="width"in d||"height"in d,re=this,de={},Ne=l.style,et=l.nodeType&&an(l),qe=ue.get(l,"fxshow");g.queue||(x=m._queueHooks(l,"fx"),x.unqueued==null&&(x.unqueued=0,V=x.empty.fire,x.empty.fire=function(){x.unqueued||V()}),x.unqueued++,re.always(function(){re.always(function(){x.unqueued--,m.queue(l,"fx").length||x.empty.fire()})}));for(v in d)if(A=d[v],ic.test(A)){if(delete d[v],S=S||A==="toggle",A===(et?"hide":"show"))if(A==="show"&&qe&&qe[v]!==void 0)et=!0;else continue;de[v]=qe&&qe[v]||m.style(l,v)}if(B=!m.isEmptyObject(d),!(!B&&m.isEmptyObject(de))){ve&&l.nodeType===1&&(g.overflow=[Ne.overflow,Ne.overflowX,Ne.overflowY],G=qe&&qe.display,G==null&&(G=ue.get(l,"display")),ne=m.css(l,"display"),ne==="none"&&(G?ne=G:(Ot([l],!0),G=l.style.display||G,ne=m.css(l,"display"),Ot([l]))),(ne==="inline"||ne==="inline-block"&&G!=null)&&m.css(l,"float")==="none"&&(B||(re.done(function(){Ne.display=G}),G==null&&(ne=Ne.display,G=ne==="none"?"":ne)),Ne.display="inline-block")),g.overflow&&(Ne.overflow="hidden",re.always(function(){Ne.overflow=g.overflow[0],Ne.overflowX=g.overflow[1],Ne.overflowY=g.overflow[2]})),B=!1;for(v in de)B||(qe?"hidden"in qe&&(et=qe.hidden):qe=ue.access(l,"fxshow",{display:G}),S&&(qe.hidden=!et),et&&Ot([l],!0),re.done(function(){et||Ot([l]),ue.remove(l,"fxshow");for(v in de)m.style(l,v,de[v])})),B=ya(et?qe[v]:0,v,re),v in qe||(qe[v]=B.start,et&&(B.end=B.start,B.start=0))}}function lh(l,d){var g,v,A,S,x;for(g in l)if(v=ee(g),A=d[v],S=l[g],Array.isArray(S)&&(A=S[1],S=l[g]=S[0]),g!==v&&(l[v]=S,delete l[g]),x=m.cssHooks[v],x&&"expand"in x){S=x.expand(S),delete l[v];for(g in S)g in l||(l[g]=S[g],d[g]=A)}else d[v]=A}function Bn(l,d,g){var v,A,S=0,x=Bn.prefilters.length,V=m.Deferred().always(function(){delete B.elem}),B=function(){if(A)return!1;for(var ve=Vr||sc(),re=Math.max(0,G.startTime+G.duration-ve),de=re/G.duration||0,Ne=1-de,et=0,qe=G.tweens.length;et<qe;et++)G.tweens[et].run(Ne);return V.notifyWith(l,[G,Ne,re]),Ne<1&&qe?re:(qe||V.notifyWith(l,[G,1,0]),V.resolveWith(l,[G]),!1)},G=V.promise({elem:l,props:m.extend({},d),opts:m.extend(!0,{specialEasing:{},easing:m.easing._default},g),originalProperties:d,originalOptions:g,startTime:Vr||sc(),duration:g.duration,tweens:[],createTween:function(ve,re){var de=m.Tween(l,G.opts,ve,re,G.opts.specialEasing[ve]||G.opts.easing);return G.tweens.push(de),de},stop:function(ve){var re=0,de=ve?G.tweens.length:0;if(A)return this;for(A=!0;re<de;re++)G.tweens[re].run(1);return ve?(V.notifyWith(l,[G,1,0]),V.resolveWith(l,[G,ve])):V.rejectWith(l,[G,ve]),this}}),ne=G.props;for(lh(ne,G.opts.specialEasing);S<x;S++)if(v=Bn.prefilters[S].call(G,l,ne,G.opts),v)return _(v.stop)&&(m._queueHooks(G.elem,G.opts.queue).stop=v.stop.bind(v)),v;return m.map(ne,ya,G),_(G.opts.start)&&G.opts.start.call(l,G),G.progress(G.opts.progress).done(G.opts.done,G.opts.complete).fail(G.opts.fail).always(G.opts.always),m.fx.timer(m.extend(B,{elem:l,anim:G,queue:G.opts.queue})),G}m.Animation=m.extend(Bn,{tweeners:{"*":[function(l,d){var g=this.createTween(l,d);return dn(g.elem,l,vt.exec(d),g),g}]},tweener:function(l,d){_(l)?(d=l,l=["*"]):l=l.match(Oe);for(var g,v=0,A=l.length;v<A;v++)g=l[v],Bn.tweeners[g]=Bn.tweeners[g]||[],Bn.tweeners[g].unshift(d)},prefilters:[ah],prefilter:function(l,d){d?Bn.prefilters.unshift(l):Bn.prefilters.push(l)}}),m.speed=function(l,d,g){var v=l&&typeof l=="object"?m.extend({},l):{complete:g||!g&&d||_(l)&&l,duration:l,easing:g&&d||d&&!_(d)&&d};return m.fx.off?v.duration=0:typeof v.duration!="number"&&(v.duration in m.fx.speeds?v.duration=m.fx.speeds[v.duration]:v.duration=m.fx.speeds._default),(v.queue==null||v.queue===!0)&&(v.queue="fx"),v.old=v.complete,v.complete=function(){_(v.old)&&v.old.call(this),v.queue&&m.dequeue(this,v.queue)},v},m.fn.extend({fadeTo:function(l,d,g,v){return this.filter(an).css("opacity",0).show().end().animate({opacity:d},l,g,v)},animate:function(l,d,g,v){var A=m.isEmptyObject(l),S=m.speed(d,g,v),x=function(){var V=Bn(this,m.extend({},l),S);(A||ue.get(this,"finish"))&&V.stop(!0)};return x.finish=x,A||S.queue===!1?this.each(x):this.queue(S.queue,x)},stop:function(l,d,g){var v=function(A){var S=A.stop;delete A.stop,S(g)};return typeof l!="string"&&(g=d,d=l,l=void 0),d&&this.queue(l||"fx",[]),this.each(function(){var A=!0,S=l!=null&&l+"queueHooks",x=m.timers,V=ue.get(this);if(S)V[S]&&V[S].stop&&v(V[S]);else for(S in V)V[S]&&V[S].stop&&oh.test(S)&&v(V[S]);for(S=x.length;S--;)x[S].elem===this&&(l==null||x[S].queue===l)&&(x[S].anim.stop(g),A=!1,x.splice(S,1));(A||!g)&&m.dequeue(this,l)})},finish:function(l){return l!==!1&&(l=l||"fx"),this.each(function(){var d,g=ue.get(this),v=g[l+"queue"],A=g[l+"queueHooks"],S=m.timers,x=v?v.length:0;for(g.finish=!0,m.queue(this,l,[]),A&&A.stop&&A.stop.call(this,!0),d=S.length;d--;)S[d].elem===this&&S[d].queue===l&&(S[d].anim.stop(!0),S.splice(d,1));for(d=0;d<x;d++)v[d]&&v[d].finish&&v[d].finish.call(this);delete g.finish})}}),m.each(["toggle","show","hide"],function(l,d){var g=m.fn[d];m.fn[d]=function(v,A,S){return v==null||typeof v=="boolean"?g.apply(this,arguments):this.animate(go(d,!0),v,A,S)}}),m.each({slideDown:go("show"),slideUp:go("hide"),slideToggle:go("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(l,d){m.fn[l]=function(g,v,A){return this.animate(d,g,v,A)}}),m.timers=[],m.fx.tick=function(){var l,d=0,g=m.timers;for(Vr=Date.now();d<g.length;d++)l=g[d],!l()&&g[d]===l&&g.splice(d--,1);g.length||m.fx.stop(),Vr=void 0},m.fx.timer=function(l){m.timers.push(l),m.fx.start()},m.fx.interval=13,m.fx.start=function(){ho||(ho=!0,po())},m.fx.stop=function(){ho=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(l,d){return l=m.fx&&m.fx.speeds[l]||l,d=d||"fx",this.queue(d,function(g,v){var A=n.setTimeout(g,l);v.stop=function(){n.clearTimeout(A)}})},function(){var l=E.createElement("input"),d=E.createElement("select"),g=d.appendChild(E.createElement("option"));l.type="checkbox",y.checkOn=l.value!=="",y.optSelected=g.selected,l=E.createElement("input"),l.value="t",l.type="radio",y.radioValue=l.value==="t"}();var oc,bi=m.expr.attrHandle;m.fn.extend({attr:function(l,d){return O(this,m.attr,l,d,arguments.length>1)},removeAttr:function(l){return this.each(function(){m.removeAttr(this,l)})}}),m.extend({attr:function(l,d,g){var v,A,S=l.nodeType;if(!(S===3||S===8||S===2)){if(typeof l.getAttribute>"u")return m.prop(l,d,g);if((S!==1||!m.isXMLDoc(l))&&(A=m.attrHooks[d.toLowerCase()]||(m.expr.match.bool.test(d)?oc:void 0)),g!==void 0){if(g===null){m.removeAttr(l,d);return}return A&&"set"in A&&(v=A.set(l,g,d))!==void 0?v:(l.setAttribute(d,g+""),g)}return A&&"get"in A&&(v=A.get(l,d))!==null?v:(v=m.find.attr(l,d),v??void 0)}},attrHooks:{type:{set:function(l,d){if(!y.radioValue&&d==="radio"&&ae(l,"input")){var g=l.value;return l.setAttribute("type",d),g&&(l.value=g),d}}}},removeAttr:function(l,d){var g,v=0,A=d&&d.match(Oe);if(A&&l.nodeType===1)for(;g=A[v++];)l.removeAttribute(g)}}),oc={set:function(l,d,g){return d===!1?m.removeAttr(l,g):l.setAttribute(g,g),g}},m.each(m.expr.match.bool.source.match(/\w+/g),function(l,d){var g=bi[d]||m.find.attr;bi[d]=function(v,A,S){var x,V,B=A.toLowerCase();return S||(V=bi[B],bi[B]=x,x=g(v,A,S)!=null?B:null,bi[B]=V),x}});var ch=/^(?:input|select|textarea|button)$/i,ac=/^(?:a|area)$/i;m.fn.extend({prop:function(l,d){return O(this,m.prop,l,d,arguments.length>1)},removeProp:function(l){return this.each(function(){delete this[m.propFix[l]||l]})}}),m.extend({prop:function(l,d,g){var v,A,S=l.nodeType;if(!(S===3||S===8||S===2))return(S!==1||!m.isXMLDoc(l))&&(d=m.propFix[d]||d,A=m.propHooks[d]),g!==void 0?A&&"set"in A&&(v=A.set(l,g,d))!==void 0?v:l[d]=g:A&&"get"in A&&(v=A.get(l,d))!==null?v:l[d]},propHooks:{tabIndex:{get:function(l){var d=m.find.attr(l,"tabindex");return d?parseInt(d,10):ch.test(l.nodeName)||ac.test(l.nodeName)&&l.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),y.optSelected||(m.propHooks.selected={get:function(l){var d=l.parentNode;return d&&d.parentNode&&d.parentNode.selectedIndex,null},set:function(l){var d=l.parentNode;d&&(d.selectedIndex,d.parentNode&&d.parentNode.selectedIndex)}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this});function Dr(l){var d=l.match(Oe)||[];return d.join(" ")}function $r(l){return l.getAttribute&&l.getAttribute("class")||""}function ss(l){return Array.isArray(l)?l:typeof l=="string"?l.match(Oe)||[]:[]}m.fn.extend({addClass:function(l){var d,g,v,A,S,x;return _(l)?this.each(function(V){m(this).addClass(l.call(this,V,$r(this)))}):(d=ss(l),d.length?this.each(function(){if(v=$r(this),g=this.nodeType===1&&" "+Dr(v)+" ",g){for(S=0;S<d.length;S++)A=d[S],g.indexOf(" "+A+" ")<0&&(g+=A+" ");x=Dr(g),v!==x&&this.setAttribute("class",x)}}):this)},removeClass:function(l){var d,g,v,A,S,x;return _(l)?this.each(function(V){m(this).removeClass(l.call(this,V,$r(this)))}):arguments.length?(d=ss(l),d.length?this.each(function(){if(v=$r(this),g=this.nodeType===1&&" "+Dr(v)+" ",g){for(S=0;S<d.length;S++)for(A=d[S];g.indexOf(" "+A+" ")>-1;)g=g.replace(" "+A+" "," ");x=Dr(g),v!==x&&this.setAttribute("class",x)}}):this):this.attr("class","")},toggleClass:function(l,d){var g,v,A,S,x=typeof l,V=x==="string"||Array.isArray(l);return _(l)?this.each(function(B){m(this).toggleClass(l.call(this,B,$r(this),d),d)}):typeof d=="boolean"&&V?d?this.addClass(l):this.removeClass(l):(g=ss(l),this.each(function(){if(V)for(S=m(this),A=0;A<g.length;A++)v=g[A],S.hasClass(v)?S.removeClass(v):S.addClass(v);else(l===void 0||x==="boolean")&&(v=$r(this),v&&ue.set(this,"__className__",v),this.setAttribute&&this.setAttribute("class",v||l===!1?"":ue.get(this,"__className__")||""))}))},hasClass:function(l){var d,g,v=0;for(d=" "+l+" ";g=this[v++];)if(g.nodeType===1&&(" "+Dr($r(g))+" ").indexOf(d)>-1)return!0;return!1}});var lc=/\r/g;m.fn.extend({val:function(l){var d,g,v,A=this[0];return arguments.length?(v=_(l),this.each(function(S){var x;this.nodeType===1&&(v?x=l.call(this,S,m(this).val()):x=l,x==null?x="":typeof x=="number"?x+="":Array.isArray(x)&&(x=m.map(x,function(V){return V==null?"":V+""})),d=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],(!d||!("set"in d)||d.set(this,x,"value")===void 0)&&(this.value=x))})):A?(d=m.valHooks[A.type]||m.valHooks[A.nodeName.toLowerCase()],d&&"get"in d&&(g=d.get(A,"value"))!==void 0?g:(g=A.value,typeof g=="string"?g.replace(lc,""):g??"")):void 0}}),m.extend({valHooks:{option:{get:function(l){var d=m.find.attr(l,"value");return d??Dr(m.text(l))}},select:{get:function(l){var d,g,v,A=l.options,S=l.selectedIndex,x=l.type==="select-one",V=x?null:[],B=x?S+1:A.length;for(S<0?v=B:v=x?S:0;v<B;v++)if(g=A[v],(g.selected||v===S)&&!g.disabled&&(!g.parentNode.disabled||!ae(g.parentNode,"optgroup"))){if(d=m(g).val(),x)return d;V.push(d)}return V},set:function(l,d){for(var g,v,A=l.options,S=m.makeArray(d),x=A.length;x--;)v=A[x],(v.selected=m.inArray(m.valHooks.option.get(v),S)>-1)&&(g=!0);return g||(l.selectedIndex=-1),S}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(l,d){if(Array.isArray(d))return l.checked=m.inArray(m(l).val(),d)>-1}},y.checkOn||(m.valHooks[this].get=function(l){return l.getAttribute("value")===null?"on":l.value})}),y.focusin="onfocusin"in n;var cc=/^(?:focusinfocus|focusoutblur)$/,uc=function(l){l.stopPropagation()};m.extend(m.event,{trigger:function(l,d,g,v){var A,S,x,V,B,G,ne,ve,re=[g||E],de=f.call(l,"type")?l.type:l,Ne=f.call(l,"namespace")?l.namespace.split("."):[];if(S=ve=x=g=g||E,!(g.nodeType===3||g.nodeType===8)&&!cc.test(de+m.event.triggered)&&(de.indexOf(".")>-1&&(Ne=de.split("."),de=Ne.shift(),Ne.sort()),B=de.indexOf(":")<0&&"on"+de,l=l[m.expando]?l:new m.Event(de,typeof l=="object"&&l),l.isTrigger=v?2:3,l.namespace=Ne.join("."),l.rnamespace=l.namespace?new RegExp("(^|\\.)"+Ne.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,l.result=void 0,l.target||(l.target=g),d=d==null?[l]:m.makeArray(d,[l]),ne=m.event.special[de]||{},!(!v&&ne.trigger&&ne.trigger.apply(g,d)===!1))){if(!v&&!ne.noBubble&&!w(g)){for(V=ne.delegateType||de,cc.test(V+de)||(S=S.parentNode);S;S=S.parentNode)re.push(S),x=S;x===(g.ownerDocument||E)&&re.push(x.defaultView||x.parentWindow||n)}for(A=0;(S=re[A++])&&!l.isPropagationStopped();)ve=S,l.type=A>1?V:ne.bindType||de,G=(ue.get(S,"events")||Object.create(null))[l.type]&&ue.get(S,"handle"),G&&G.apply(S,d),G=B&&S[B],G&&G.apply&&ge(S)&&(l.result=G.apply(S,d),l.result===!1&&l.preventDefault());return l.type=de,!v&&!l.isDefaultPrevented()&&(!ne._default||ne._default.apply(re.pop(),d)===!1)&&ge(g)&&B&&_(g[de])&&!w(g)&&(x=g[B],x&&(g[B]=null),m.event.triggered=de,l.isPropagationStopped()&&ve.addEventListener(de,uc),g[de](),l.isPropagationStopped()&&ve.removeEventListener(de,uc),m.event.triggered=void 0,x&&(g[B]=x)),l.result}},simulate:function(l,d,g){var v=m.extend(new m.Event,g,{type:l,isSimulated:!0});m.event.trigger(v,null,d)}}),m.fn.extend({trigger:function(l,d){return this.each(function(){m.event.trigger(l,d,this)})},triggerHandler:function(l,d){var g=this[0];if(g)return m.event.trigger(l,d,g,!0)}}),y.focusin||m.each({focus:"focusin",blur:"focusout"},function(l,d){var g=function(v){m.event.simulate(d,v.target,m.event.fix(v))};m.event.special[d]={setup:function(){var v=this.ownerDocument||this.document||this,A=ue.access(v,d);A||v.addEventListener(l,g,!0),ue.access(v,d,(A||0)+1)},teardown:function(){var v=this.ownerDocument||this.document||this,A=ue.access(v,d)-1;A?ue.access(v,d,A):(v.removeEventListener(l,g,!0),ue.remove(v,d))}}});var Ei=n.location,dc={guid:Date.now()},mo=/\?/;m.parseXML=function(l){var d,g;if(!l||typeof l!="string")return null;try{d=new n.DOMParser().parseFromString(l,"text/xml")}catch{}return g=d&&d.getElementsByTagName("parsererror")[0],(!d||g)&&m.error("Invalid XML: "+(g?m.map(g.childNodes,function(v){return v.textContent}).join(`
`):l)),d};var vo=/\[\]$/,fc=/\r?\n/g,hc=/^(?:submit|button|image|reset|file)$/i,pc=/^(?:input|select|textarea|keygen)/i;function xr(l,d,g,v){var A;if(Array.isArray(d))m.each(d,function(S,x){g||vo.test(l)?v(l,x):xr(l+"["+(typeof x=="object"&&x!=null?S:"")+"]",x,g,v)});else if(!g&&H(d)==="object")for(A in d)xr(l+"["+A+"]",d[A],g,v);else v(l,d)}m.param=function(l,d){var g,v=[],A=function(S,x){var V=_(x)?x():x;v[v.length]=encodeURIComponent(S)+"="+encodeURIComponent(V??"")};if(l==null)return"";if(Array.isArray(l)||l.jquery&&!m.isPlainObject(l))m.each(l,function(){A(this.name,this.value)});else for(g in l)xr(g,l[g],d,A);return v.join("&")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var l=m.prop(this,"elements");return l?m.makeArray(l):this}).filter(function(){var l=this.type;return this.name&&!m(this).is(":disabled")&&pc.test(this.nodeName)&&!hc.test(l)&&(this.checked||!Lt.test(l))}).map(function(l,d){var g=m(this).val();return g==null?null:Array.isArray(g)?m.map(g,function(v){return{name:d.name,value:v.replace(fc,`\r
`)}}):{name:d.name,value:g.replace(fc,`\r
`)}}).get()}});var uh=/%20/g,dh=/#.*$/,ba=/([?&])_=[^&]*/,fh=/^(.*?):[ \t]*([^\r\n]*)$/mg,hh=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,gc=/^(?:GET|HEAD)$/,Ea=/^\/\//,mc={},_a={},vc="*/".concat("*"),gr=E.createElement("a");gr.href=Ei.href;function yc(l){return function(d,g){typeof d!="string"&&(g=d,d="*");var v,A=0,S=d.toLowerCase().match(Oe)||[];if(_(g))for(;v=S[A++];)v[0]==="+"?(v=v.slice(1)||"*",(l[v]=l[v]||[]).unshift(g)):(l[v]=l[v]||[]).push(g)}}function bc(l,d,g,v){var A={},S=l===_a;function x(V){var B;return A[V]=!0,m.each(l[V]||[],function(G,ne){var ve=ne(d,g,v);if(typeof ve=="string"&&!S&&!A[ve])return d.dataTypes.unshift(ve),x(ve),!1;if(S)return!(B=ve)}),B}return x(d.dataTypes[0])||!A["*"]&&x("*")}function wa(l,d){var g,v,A=m.ajaxSettings.flatOptions||{};for(g in d)d[g]!==void 0&&((A[g]?l:v||(v={}))[g]=d[g]);return v&&m.extend(!0,l,v),l}function ph(l,d,g){for(var v,A,S,x,V=l.contents,B=l.dataTypes;B[0]==="*";)B.shift(),v===void 0&&(v=l.mimeType||d.getResponseHeader("Content-Type"));if(v){for(A in V)if(V[A]&&V[A].test(v)){B.unshift(A);break}}if(B[0]in g)S=B[0];else{for(A in g){if(!B[0]||l.converters[A+" "+B[0]]){S=A;break}x||(x=A)}S=S||x}if(S)return S!==B[0]&&B.unshift(S),g[S]}function pn(l,d,g,v){var A,S,x,V,B,G={},ne=l.dataTypes.slice();if(ne[1])for(x in l.converters)G[x.toLowerCase()]=l.converters[x];for(S=ne.shift();S;)if(l.responseFields[S]&&(g[l.responseFields[S]]=d),!B&&v&&l.dataFilter&&(d=l.dataFilter(d,l.dataType)),B=S,S=ne.shift(),S){if(S==="*")S=B;else if(B!=="*"&&B!==S){if(x=G[B+" "+S]||G["* "+S],!x){for(A in G)if(V=A.split(" "),V[1]===S&&(x=G[B+" "+V[0]]||G["* "+V[0]],x)){x===!0?x=G[A]:G[A]!==!0&&(S=V[0],ne.unshift(V[1]));break}}if(x!==!0)if(x&&l.throws)d=x(d);else try{d=x(d)}catch(ve){return{state:"parsererror",error:x?ve:"No conversion from "+B+" to "+S}}}}return{state:"success",data:d}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ei.href,type:"GET",isLocal:hh.test(Ei.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":vc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(l,d){return d?wa(wa(l,m.ajaxSettings),d):wa(m.ajaxSettings,l)},ajaxPrefilter:yc(mc),ajaxTransport:yc(_a),ajax:function(l,d){typeof l=="object"&&(d=l,l=void 0),d=d||{};var g,v,A,S,x,V,B,G,ne,ve,re=m.ajaxSetup({},d),de=re.context||re,Ne=re.context&&(de.nodeType||de.jquery)?m(de):m.event,et=m.Deferred(),qe=m.Callbacks("once memory"),Kt=re.statusCode||{},Zt={},jn={},It="canceled",ct={readyState:0,getResponseHeader:function(Et){var Ht;if(B){if(!S)for(S={};Ht=fh.exec(A);)S[Ht[1].toLowerCase()+" "]=(S[Ht[1].toLowerCase()+" "]||[]).concat(Ht[2]);Ht=S[Et.toLowerCase()+" "]}return Ht==null?null:Ht.join(", ")},getAllResponseHeaders:function(){return B?A:null},setRequestHeader:function(Et,Ht){return B==null&&(Et=jn[Et.toLowerCase()]=jn[Et.toLowerCase()]||Et,Zt[Et]=Ht),this},overrideMimeType:function(Et){return B==null&&(re.mimeType=Et),this},statusCode:function(Et){var Ht;if(Et)if(B)ct.always(Et[ct.status]);else for(Ht in Et)Kt[Ht]=[Kt[Ht],Et[Ht]];return this},abort:function(Et){var Ht=Et||It;return g&&g.abort(Ht),Dn(0,Ht),this}};if(et.promise(ct),re.url=((l||re.url||Ei.href)+"").replace(Ea,Ei.protocol+"//"),re.type=d.method||d.type||re.method||re.type,re.dataTypes=(re.dataType||"*").toLowerCase().match(Oe)||[""],re.crossDomain==null){V=E.createElement("a");try{V.href=re.url,V.href=V.href,re.crossDomain=gr.protocol+"//"+gr.host!=V.protocol+"//"+V.host}catch{re.crossDomain=!0}}if(re.data&&re.processData&&typeof re.data!="string"&&(re.data=m.param(re.data,re.traditional)),bc(mc,re,d,ct),B)return ct;G=m.event&&re.global,G&&m.active++===0&&m.event.trigger("ajaxStart"),re.type=re.type.toUpperCase(),re.hasContent=!gc.test(re.type),v=re.url.replace(dh,""),re.hasContent?re.data&&re.processData&&(re.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&(re.data=re.data.replace(uh,"+")):(ve=re.url.slice(v.length),re.data&&(re.processData||typeof re.data=="string")&&(v+=(mo.test(v)?"&":"?")+re.data,delete re.data),re.cache===!1&&(v=v.replace(ba,"$1"),ve=(mo.test(v)?"&":"?")+"_="+dc.guid+++ve),re.url=v+ve),re.ifModified&&(m.lastModified[v]&&ct.setRequestHeader("If-Modified-Since",m.lastModified[v]),m.etag[v]&&ct.setRequestHeader("If-None-Match",m.etag[v])),(re.data&&re.hasContent&&re.contentType!==!1||d.contentType)&&ct.setRequestHeader("Content-Type",re.contentType),ct.setRequestHeader("Accept",re.dataTypes[0]&&re.accepts[re.dataTypes[0]]?re.accepts[re.dataTypes[0]]+(re.dataTypes[0]!=="*"?", "+vc+"; q=0.01":""):re.accepts["*"]);for(ne in re.headers)ct.setRequestHeader(ne,re.headers[ne]);if(re.beforeSend&&(re.beforeSend.call(de,ct,re)===!1||B))return ct.abort();if(It="abort",qe.add(re.complete),ct.done(re.success),ct.fail(re.error),g=bc(_a,re,d,ct),!g)Dn(-1,"No Transport");else{if(ct.readyState=1,G&&Ne.trigger("ajaxSend",[ct,re]),B)return ct;re.async&&re.timeout>0&&(x=n.setTimeout(function(){ct.abort("timeout")},re.timeout));try{B=!1,g.send(Zt,Dn)}catch(Et){if(B)throw Et;Dn(-1,Et)}}function Dn(Et,Ht,Sa,Ec){var Hn,os,as,xn,_i,Zn=Ht;B||(B=!0,x&&n.clearTimeout(x),g=void 0,A=Ec||"",ct.readyState=Et>0?4:0,Hn=Et>=200&&Et<300||Et===304,Sa&&(xn=ph(re,ct,Sa)),!Hn&&m.inArray("script",re.dataTypes)>-1&&m.inArray("json",re.dataTypes)<0&&(re.converters["text script"]=function(){}),xn=pn(re,xn,ct,Hn),Hn?(re.ifModified&&(_i=ct.getResponseHeader("Last-Modified"),_i&&(m.lastModified[v]=_i),_i=ct.getResponseHeader("etag"),_i&&(m.etag[v]=_i)),Et===204||re.type==="HEAD"?Zn="nocontent":Et===304?Zn="notmodified":(Zn=xn.state,os=xn.data,as=xn.error,Hn=!as)):(as=Zn,(Et||!Zn)&&(Zn="error",Et<0&&(Et=0))),ct.status=Et,ct.statusText=(Ht||Zn)+"",Hn?et.resolveWith(de,[os,Zn,ct]):et.rejectWith(de,[ct,Zn,as]),ct.statusCode(Kt),Kt=void 0,G&&Ne.trigger(Hn?"ajaxSuccess":"ajaxError",[ct,re,Hn?os:as]),qe.fireWith(de,[ct,Zn]),G&&(Ne.trigger("ajaxComplete",[ct,re]),--m.active||m.event.trigger("ajaxStop")))}return ct},getJSON:function(l,d,g){return m.get(l,d,g,"json")},getScript:function(l,d){return m.get(l,void 0,d,"script")}}),m.each(["get","post"],function(l,d){m[d]=function(g,v,A,S){return _(v)&&(S=S||A,A=v,v=void 0),m.ajax(m.extend({url:g,type:d,dataType:S,data:v,success:A},m.isPlainObject(g)&&g))}}),m.ajaxPrefilter(function(l){var d;for(d in l.headers)d.toLowerCase()==="content-type"&&(l.contentType=l.headers[d]||"")}),m._evalUrl=function(l,d,g){return m.ajax({url:l,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(v){m.globalEval(v,d,g)}})},m.fn.extend({wrapAll:function(l){var d;return this[0]&&(_(l)&&(l=l.call(this[0])),d=m(l,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&d.insertBefore(this[0]),d.map(function(){for(var g=this;g.firstElementChild;)g=g.firstElementChild;return g}).append(this)),this},wrapInner:function(l){return _(l)?this.each(function(d){m(this).wrapInner(l.call(this,d))}):this.each(function(){var d=m(this),g=d.contents();g.length?g.wrapAll(l):d.append(l)})},wrap:function(l){var d=_(l);return this.each(function(g){m(this).wrapAll(d?l.call(this,g):l)})},unwrap:function(l){return this.parent(l).not("body").each(function(){m(this).replaceWith(this.childNodes)}),this}}),m.expr.pseudos.hidden=function(l){return!m.expr.pseudos.visible(l)},m.expr.pseudos.visible=function(l){return!!(l.offsetWidth||l.offsetHeight||l.getClientRects().length)},m.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch{}};var T={0:200,1223:204},I=m.ajaxSettings.xhr();y.cors=!!I&&"withCredentials"in I,y.ajax=I=!!I,m.ajaxTransport(function(l){var d,g;if(y.cors||I&&!l.crossDomain)return{send:function(v,A){var S,x=l.xhr();if(x.open(l.type,l.url,l.async,l.username,l.password),l.xhrFields)for(S in l.xhrFields)x[S]=l.xhrFields[S];l.mimeType&&x.overrideMimeType&&x.overrideMimeType(l.mimeType),!l.crossDomain&&!v["X-Requested-With"]&&(v["X-Requested-With"]="XMLHttpRequest");for(S in v)x.setRequestHeader(S,v[S]);d=function(V){return function(){d&&(d=g=x.onload=x.onerror=x.onabort=x.ontimeout=x.onreadystatechange=null,V==="abort"?x.abort():V==="error"?typeof x.status!="number"?A(0,"error"):A(x.status,x.statusText):A(T[x.status]||x.status,x.statusText,(x.responseType||"text")!=="text"||typeof x.responseText!="string"?{binary:x.response}:{text:x.responseText},x.getAllResponseHeaders()))}},x.onload=d(),g=x.onerror=x.ontimeout=d("error"),x.onabort!==void 0?x.onabort=g:x.onreadystatechange=function(){x.readyState===4&&n.setTimeout(function(){d&&g()})},d=d("abort");try{x.send(l.hasContent&&l.data||null)}catch(V){if(d)throw V}},abort:function(){d&&d()}}}),m.ajaxPrefilter(function(l){l.crossDomain&&(l.contents.script=!1)}),m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(l){return m.globalEval(l),l}}}),m.ajaxPrefilter("script",function(l){l.cache===void 0&&(l.cache=!1),l.crossDomain&&(l.type="GET")}),m.ajaxTransport("script",function(l){if(l.crossDomain||l.scriptAttrs){var d,g;return{send:function(v,A){d=m("<script>").attr(l.scriptAttrs||{}).prop({charset:l.scriptCharset,src:l.url}).on("load error",g=function(S){d.remove(),g=null,S&&A(S.type==="error"?404:200,S.type)}),E.head.appendChild(d[0])},abort:function(){g&&g()}}}});var N=[],M=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var l=N.pop()||m.expando+"_"+dc.guid++;return this[l]=!0,l}}),m.ajaxPrefilter("json jsonp",function(l,d,g){var v,A,S,x=l.jsonp!==!1&&(M.test(l.url)?"url":typeof l.data=="string"&&(l.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&M.test(l.data)&&"data");if(x||l.dataTypes[0]==="jsonp")return v=l.jsonpCallback=_(l.jsonpCallback)?l.jsonpCallback():l.jsonpCallback,x?l[x]=l[x].replace(M,"$1"+v):l.jsonp!==!1&&(l.url+=(mo.test(l.url)?"&":"?")+l.jsonp+"="+v),l.converters["script json"]=function(){return S||m.error(v+" was not called"),S[0]},l.dataTypes[0]="json",A=n[v],n[v]=function(){S=arguments},g.always(function(){A===void 0?m(n).removeProp(v):n[v]=A,l[v]&&(l.jsonpCallback=d.jsonpCallback,N.push(v)),S&&_(A)&&A(S[0]),S=A=void 0}),"script"}),y.createHTMLDocument=function(){var l=E.implementation.createHTMLDocument("").body;return l.innerHTML="<form></form><form></form>",l.childNodes.length===2}(),m.parseHTML=function(l,d,g){if(typeof l!="string")return[];typeof d=="boolean"&&(g=d,d=!1);var v,A,S;return d||(y.createHTMLDocument?(d=E.implementation.createHTMLDocument(""),v=d.createElement("base"),v.href=E.location.href,d.head.appendChild(v)):d=E),A=Ce.exec(l),S=!g&&[],A?[d.createElement(A[1])]:(A=Fn([l],d,S),S&&S.length&&m(S).remove(),m.merge([],A.childNodes))},m.fn.load=function(l,d,g){var v,A,S,x=this,V=l.indexOf(" ");return V>-1&&(v=Dr(l.slice(V)),l=l.slice(0,V)),_(d)?(g=d,d=void 0):d&&typeof d=="object"&&(A="POST"),x.length>0&&m.ajax({url:l,type:A||"GET",dataType:"html",data:d}).done(function(B){S=arguments,x.html(v?m("<div>").append(m.parseHTML(B)).find(v):B)}).always(g&&function(B,G){x.each(function(){g.apply(this,S||[B.responseText,G,B])})}),this},m.expr.pseudos.animated=function(l){return m.grep(m.timers,function(d){return l===d.elem}).length},m.offset={setOffset:function(l,d,g){var v,A,S,x,V,B,G,ne=m.css(l,"position"),ve=m(l),re={};ne==="static"&&(l.style.position="relative"),V=ve.offset(),S=m.css(l,"top"),B=m.css(l,"left"),G=(ne==="absolute"||ne==="fixed")&&(S+B).indexOf("auto")>-1,G?(v=ve.position(),x=v.top,A=v.left):(x=parseFloat(S)||0,A=parseFloat(B)||0),_(d)&&(d=d.call(l,g,m.extend({},V))),d.top!=null&&(re.top=d.top-V.top+x),d.left!=null&&(re.left=d.left-V.left+A),"using"in d?d.using.call(l,re):ve.css(re)}},m.fn.extend({offset:function(l){if(arguments.length)return l===void 0?this:this.each(function(A){m.offset.setOffset(this,l,A)});var d,g,v=this[0];if(v)return v.getClientRects().length?(d=v.getBoundingClientRect(),g=v.ownerDocument.defaultView,{top:d.top+g.pageYOffset,left:d.left+g.pageXOffset}):{top:0,left:0}},position:function(){if(this[0]){var l,d,g,v=this[0],A={top:0,left:0};if(m.css(v,"position")==="fixed")d=v.getBoundingClientRect();else{for(d=this.offset(),g=v.ownerDocument,l=v.offsetParent||g.documentElement;l&&(l===g.body||l===g.documentElement)&&m.css(l,"position")==="static";)l=l.parentNode;l&&l!==v&&l.nodeType===1&&(A=m(l).offset(),A.top+=m.css(l,"borderTopWidth",!0),A.left+=m.css(l,"borderLeftWidth",!0))}return{top:d.top-A.top-m.css(v,"marginTop",!0),left:d.left-A.left-m.css(v,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var l=this.offsetParent;l&&m.css(l,"position")==="static";)l=l.offsetParent;return l||kt})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(l,d){var g=d==="pageYOffset";m.fn[l]=function(v){return O(this,function(A,S,x){var V;if(w(A)?V=A:A.nodeType===9&&(V=A.defaultView),x===void 0)return V?V[d]:A[S];V?V.scrollTo(g?V.pageXOffset:x,g?x:V.pageYOffset):A[S]=x},l,v,arguments.length)}}),m.each(["top","left"],function(l,d){m.cssHooks[d]=co(y.pixelPosition,function(g,v){if(v)return v=qr(g,d),Bt.test(v)?m(g).position()[d]+"px":v})}),m.each({Height:"height",Width:"width"},function(l,d){m.each({padding:"inner"+l,content:d,"":"outer"+l},function(g,v){m.fn[v]=function(A,S){var x=arguments.length&&(g||typeof A!="boolean"),V=g||(A===!0||S===!0?"margin":"border");return O(this,function(B,G,ne){var ve;return w(B)?v.indexOf("outer")===0?B["inner"+l]:B.document.documentElement["client"+l]:B.nodeType===9?(ve=B.documentElement,Math.max(B.body["scroll"+l],ve["scroll"+l],B.body["offset"+l],ve["offset"+l],ve["client"+l])):ne===void 0?m.css(B,G,V):m.style(B,G,ne,V)},d,x?A:void 0,x)}})}),m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(l,d){m.fn[d]=function(g){return this.on(d,g)}}),m.fn.extend({bind:function(l,d,g){return this.on(l,null,d,g)},unbind:function(l,d){return this.off(l,null,d)},delegate:function(l,d,g,v){return this.on(d,l,g,v)},undelegate:function(l,d,g){return arguments.length===1?this.off(l,"**"):this.off(d,l||"**",g)},hover:function(l,d){return this.mouseenter(l).mouseleave(d||l)}}),m.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(l,d){m.fn[d]=function(g,v){return arguments.length>0?this.on(d,null,g,v):this.trigger(d)}});var z=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;m.proxy=function(l,d){var g,v,A;if(typeof d=="string"&&(g=l[d],d=l,l=g),!!_(l))return v=i.call(arguments,2),A=function(){return l.apply(d||this,v.concat(i.call(arguments)))},A.guid=l.guid=l.guid||m.guid++,A},m.holdReady=function(l){l?m.readyWait++:m.ready(!0)},m.isArray=Array.isArray,m.parseJSON=JSON.parse,m.nodeName=ae,m.isFunction=_,m.isWindow=w,m.camelCase=ee,m.type=H,m.now=Date.now,m.isNumeric=function(l){var d=m.type(l);return(d==="number"||d==="string")&&!isNaN(l-parseFloat(l))},m.trim=function(l){return l==null?"":(l+"").replace(z,"$1")},typeof define=="function"&&define.amd&&define("jquery",[],function(){return m});var se=n.jQuery,fe=n.$;return m.noConflict=function(l){return n.$===m&&(n.$=fe),l&&n.jQuery===m&&(n.jQuery=se),m},typeof e>"u"&&(n.jQuery=n.$=m),m})});var r_=Fe((up,n_)=>{(function(n,e){typeof define=="function"&&define.amd?define(e):typeof up=="object"?n_.exports=e():n.NProgress=e()})(up,function(){var n={};n.version="0.2.0";var e=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};n.configure=function(h){var y,_;for(y in h)_=h[y],_!==void 0&&h.hasOwnProperty(y)&&(e[y]=_);return this},n.status=null,n.set=function(h){var y=n.isStarted();h=t(h,e.minimum,1),n.status=h===1?null:h;var _=n.render(!y),w=_.querySelector(e.barSelector),E=e.speed,D=e.easing;return _.offsetWidth,s(function(R){e.positionUsing===""&&(e.positionUsing=n.getPositioningCSS()),o(w,i(h,E,D)),h===1?(o(_,{transition:"none",opacity:1}),_.offsetWidth,setTimeout(function(){o(_,{transition:"all "+E+"ms linear",opacity:0}),setTimeout(function(){n.remove(),R()},E)},E)):setTimeout(R,E)}),this},n.isStarted=function(){return typeof n.status=="number"},n.start=function(){n.status||n.set(0);var h=function(){setTimeout(function(){n.status&&(n.trickle(),h())},e.trickleSpeed)};return e.trickle&&h(),this},n.done=function(h){return!h&&!n.status?this:n.inc(.3+.5*Math.random()).set(1)},n.inc=function(h){var y=n.status;return y?(typeof h!="number"&&(h=(1-y)*t(Math.random()*y,.1,.95)),y=t(y+h,0,.994),n.set(y)):n.start()},n.trickle=function(){return n.inc(Math.random()*e.trickleRate)},function(){var h=0,y=0;n.promise=function(_){return!_||_.state()==="resolved"?this:(y===0&&n.start(),h++,y++,_.always(function(){y--,y===0?(h=0,n.done()):n.set((h-y)/h)}),this)}}(),n.render=function(h){if(n.isRendered())return document.getElementById("nprogress");c(document.documentElement,"nprogress-busy");var y=document.createElement("div");y.id="nprogress",y.innerHTML=e.template;var _=y.querySelector(e.barSelector),w=h?"-100":r(n.status||0),E=document.querySelector(e.parent),D;return o(_,{transition:"all 0 linear",transform:"translate3d("+w+"%,0,0)"}),e.showSpinner||(D=y.querySelector(e.spinnerSelector),D&&p(D)),E!=document.body&&c(E,"nprogress-custom-parent"),E.appendChild(y),y},n.remove=function(){u(document.documentElement,"nprogress-busy"),u(document.querySelector(e.parent),"nprogress-custom-parent");var h=document.getElementById("nprogress");h&&p(h)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var h=document.body.style,y="WebkitTransform"in h?"Webkit":"MozTransform"in h?"Moz":"msTransform"in h?"ms":"OTransform"in h?"O":"";return y+"Perspective"in h?"translate3d":y+"Transform"in h?"translate":"margin"};function t(h,y,_){return h<y?y:h>_?_:h}function r(h){return(-1+h)*100}function i(h,y,_){var w;return e.positionUsing==="translate3d"?w={transform:"translate3d("+r(h)+"%,0,0)"}:e.positionUsing==="translate"?w={transform:"translate("+r(h)+"%,0)"}:w={"margin-left":r(h)+"%"},w.transition="all "+y+"ms "+_,w}var s=function(){var h=[];function y(){var _=h.shift();_&&_(y)}return function(_){h.push(_),h.length==1&&y()}}(),o=function(){var h=["Webkit","O","Moz","ms"],y={};function _(R){return R.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(H,F){return F.toUpperCase()})}function w(R){var H=document.body.style;if(R in H)return R;for(var F=h.length,m=R.charAt(0).toUpperCase()+R.slice(1),Q;F--;)if(Q=h[F]+m,Q in H)return Q;return R}function E(R){return R=_(R),y[R]||(y[R]=w(R))}function D(R,H,F){H=E(H),R.style[H]=F}return function(R,H){var F=arguments,m,Q;if(F.length==2)for(m in H)Q=H[m],Q!==void 0&&H.hasOwnProperty(m)&&D(R,m,Q);else D(R,F[1],F[2])}}();function a(h,y){var _=typeof h=="string"?h:f(h);return _.indexOf(" "+y+" ")>=0}function c(h,y){var _=f(h),w=_+y;a(_,y)||(h.className=w.substring(1))}function u(h,y){var _=f(h),w;a(h,y)&&(w=_.replace(" "+y+" "," "),h.className=w.substring(1,w.length-1))}function f(h){return(" "+(h.className||"")+" ").replace(/\s+/gi," ")}function p(h){h&&h.parentNode&&h.parentNode.removeChild(h)}return n})});var i_=Fe(ru=>{(function(n,e){if(typeof define=="function"&&define.amd)define(["exports"],e);else if(typeof ru<"u")e(ru);else{var t={exports:{}};e(t.exports),n.priorityNavScroller=t.exports}})(ru,function(n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var e=function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=i.selector,o=s===void 0?".nav-scroller":s,a=i.navSelector,c=a===void 0?".nav-scroller-nav":a,u=i.contentSelector,f=u===void 0?".nav-scroller-content":u,p=i.itemSelector,h=p===void 0?".nav-scroller-item":p,y=i.buttonLeftSelector,_=y===void 0?".nav-scroller-btn--left":y,w=i.buttonRightSelector,E=w===void 0?".nav-scroller-btn--right":w,D=i.scrollStep,R=D===void 0?80:D,H=typeof o=="string"?document.querySelector(o):o,F=function(){return Number.isInteger(R)||R==="average"};if(H==null||!F())throw new Error("There is something wrong, check your options.");var m=H.querySelector(c),Q=H.querySelector(f),le=Q.querySelectorAll(h),J=H.querySelector(_),q=H.querySelector(E),Z=!1,ae=0,Ce=0,Ae="",_e="",Le,Ve=function(){_e=pe(),Ge(_e),ce()},$e=function(){Le&&window.cancelAnimationFrame(Le),Le=window.requestAnimationFrame(function(){Ve()})},pe=function(){var xe=m.scrollWidth,b=m.clientWidth,C=m.scrollLeft;ae=C,Ce=xe-(b+C);var O=ae>1,U=Ce>1;return O&&U?"both":O?"left":U?"right":"none"},ce=function(){if(R==="average"){var xe=m.scrollWidth-(parseInt(getComputedStyle(Q).getPropertyValue("padding-left"))+parseInt(getComputedStyle(Q).getPropertyValue("padding-right"))),b=Math.floor(xe/le.length);R=b}},Oe=function(xe){if(!(Z===!0||_e!==xe&&_e!=="both")){var b=R,C=xe==="left"?ae:Ce;C<R*1.75&&(b=C),xe==="right"&&(b*=-1,C<R&&Q.classList.add("snap-align-end")),Q.classList.remove("no-transition"),Q.style.transform="translateX("+b+"px)",Ae=xe,Z=!0}},Qe=function(){var xe=window.getComputedStyle(Q,null),b=xe.getPropertyValue("transform"),C=Math.abs(parseInt(b.split(",")[4])||0);Ae==="left"&&(C*=-1),Q.classList.add("no-transition"),Q.style.transform="",m.scrollLeft=m.scrollLeft+C,Q.classList.remove("no-transition","snap-align-end"),Z=!1},Ge=function(xe){xe==="both"||xe==="left"?J.classList.add("active"):J.classList.remove("active"),xe==="both"||xe==="right"?q.classList.add("active"):q.classList.remove("active")},We=function(){Ve(),window.addEventListener("resize",function(){$e()}),m.addEventListener("scroll",function(){$e()}),Q.addEventListener("transitionend",function(){Qe()}),J.addEventListener("click",function(){Oe("left")}),q.addEventListener("click",function(){Oe("right")})};return We(),{init:We}},t=e;n.default=t})});var a_=Fe((dp,o_)=>{(function(n,e){typeof define=="function"&&define.amd?define(e):typeof dp=="object"?o_.exports=e():n.Sifter=e()})(dp,function(){var n=function(u,f){this.items=u,this.settings=f||{diacritics:!0}};n.prototype.tokenize=function(u){if(u=i(String(u||"").toLowerCase()),!u||!u.length)return[];var f,p,h,y,_=[],w=u.split(/ +/);for(f=0,p=w.length;f<p;f++){if(h=s(w[f]),this.settings.diacritics)for(y in a)a.hasOwnProperty(y)&&(h=h.replace(new RegExp(y,"g"),a[y]));_.push({string:w[f],regex:new RegExp(h,"i")})}return _},n.prototype.iterator=function(u,f){var p;o(u)?p=Array.prototype.forEach||function(h){for(var y=0,_=this.length;y<_;y++)h(this[y],y,this)}:p=function(h){for(var y in this)this.hasOwnProperty(y)&&h(this[y],y,this)},p.apply(u,[f])},n.prototype.getScoreFunction=function(u,f){var p,h,y,_,w;p=this,u=p.prepareSearch(u,f),y=u.tokens,h=u.options.fields,_=y.length,w=u.options.nesting;var E=function(R,H){var F,m;return!R||(R=String(R||""),m=R.search(H.regex),m===-1)?0:(F=H.string.length/R.length,m===0&&(F+=.5),F)},D=function(){var R=h.length;return R?R===1?function(H,F){return E(r(F,h[0],w),H)}:function(H,F){for(var m=0,Q=0;m<R;m++)Q+=E(r(F,h[m],w),H);return Q/R}:function(){return 0}}();return _?_===1?function(R){return D(y[0],R)}:u.options.conjunction==="and"?function(R){for(var H,F=0,m=0;F<_;F++){if(H=D(y[F],R),H<=0)return 0;m+=H}return m/_}:function(R){for(var H=0,F=0;H<_;H++)F+=D(y[H],R);return F/_}:function(){return 0}},n.prototype.getSortFunction=function(u,f){var p,h,y,_,w,E,D,R,H,F,m;if(y=this,u=y.prepareSearch(u,f),m=!u.query&&f.sort_empty||f.sort,H=function(Q,le){return Q==="$score"?le.score:r(y.items[le.id],Q,f.nesting)},w=[],m)for(p=0,h=m.length;p<h;p++)(u.query||m[p].field!=="$score")&&w.push(m[p]);if(u.query){for(F=!0,p=0,h=w.length;p<h;p++)if(w[p].field==="$score"){F=!1;break}F&&w.unshift({field:"$score",direction:"desc"})}else for(p=0,h=w.length;p<h;p++)if(w[p].field==="$score"){w.splice(p,1);break}for(R=[],p=0,h=w.length;p<h;p++)R.push(w[p].direction==="desc"?-1:1);return E=w.length,E?E===1?(_=w[0].field,D=R[0],function(Q,le){return D*e(H(_,Q),H(_,le))}):function(Q,le){var J,q,Z,ae,Ce;for(J=0;J<E;J++)if(Ce=w[J].field,q=R[J]*e(H(Ce,Q),H(Ce,le)),q)return q;return 0}:null},n.prototype.prepareSearch=function(u,f){if(typeof u=="object")return u;f=t({},f);var p=f.fields,h=f.sort,y=f.sort_empty;return p&&!o(p)&&(f.fields=[p]),h&&!o(h)&&(f.sort=[h]),y&&!o(y)&&(f.sort_empty=[y]),{options:f,query:String(u||"").toLowerCase(),tokens:this.tokenize(u),total:0,items:[]}},n.prototype.search=function(u,f){var p=this,h,y,_,w,E,D;return _=this.prepareSearch(u,f),f=_.options,u=_.query,D=f.score||p.getScoreFunction(_),u.length?p.iterator(p.items,function(R,H){y=D(R),(f.filter===!1||y>0)&&_.items.push({score:y,id:H})}):p.iterator(p.items,function(R,H){_.items.push({score:1,id:H})}),E=p.getSortFunction(_,f),E&&_.items.sort(E),_.total=_.items.length,typeof f.limit=="number"&&(_.items=_.items.slice(0,f.limit)),_};var e=function(u,f){return typeof u=="number"&&typeof f=="number"?u>f?1:u<f?-1:0:(u=c(String(u||"")),f=c(String(f||"")),u>f?1:f>u?-1:0)},t=function(u,f){var p,h,y,_;for(p=1,h=arguments.length;p<h;p++)if(_=arguments[p],!!_)for(y in _)_.hasOwnProperty(y)&&(u[y]=_[y]);return u},r=function(u,f,p){if(!(!u||!f)){if(!p)return u[f];for(var h=f.split(".");h.length&&(u=u[h.shift()]););return u}},i=function(u){return(u+"").replace(/^\s+|\s+$|/g,"")},s=function(u){return(u+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")},o=Array.isArray||typeof $<"u"&&$.isArray||function(u){return Object.prototype.toString.call(u)==="[object Array]"},a={a:"[a\u1E00\u1E01\u0102\u0103\xC2\xE2\u01CD\u01CE\u023A\u2C65\u0226\u0227\u1EA0\u1EA1\xC4\xE4\xC0\xE0\xC1\xE1\u0100\u0101\xC3\xE3\xC5\xE5\u0105\u0104\xC3\u0105\u0104]",b:"[b\u2422\u03B2\u0392B\u0E3F\u{10301}\u16D2]",c:"[c\u0106\u0107\u0108\u0109\u010C\u010D\u010A\u010BC\u0304c\u0304\xC7\xE7\u1E08\u1E09\u023B\u023C\u0187\u0188\u0255\u1D04\uFF23\uFF43]",d:"[d\u010E\u010F\u1E0A\u1E0B\u1E10\u1E11\u1E0C\u1E0D\u1E12\u1E13\u1E0E\u1E0F\u0110\u0111D\u0326d\u0326\u0189\u0256\u018A\u0257\u018B\u018C\u1D6D\u1D81\u1D91\u0221\u1D05\uFF24\uFF44\xF0]",e:"[e\xC9\xE9\xC8\xE8\xCA\xEA\u1E18\u1E19\u011A\u011B\u0114\u0115\u1EBC\u1EBD\u1E1A\u1E1B\u1EBA\u1EBB\u0116\u0117\xCB\xEB\u0112\u0113\u0228\u0229\u0118\u0119\u1D92\u0246\u0247\u0204\u0205\u1EBE\u1EBF\u1EC0\u1EC1\u1EC4\u1EC5\u1EC2\u1EC3\u1E1C\u1E1D\u1E16\u1E17\u1E14\u1E15\u0206\u0207\u1EB8\u1EB9\u1EC6\u1EC7\u2C78\u1D07\uFF25\uFF45\u0258\u01DD\u018F\u0190\u03B5]",f:"[f\u0191\u0192\u1E1E\u1E1F]",g:"[g\u0262\u20B2\u01E4\u01E5\u011C\u011D\u011E\u011F\u0122\u0123\u0193\u0260\u0120\u0121]",h:"[h\u0124\u0125\u0126\u0127\u1E28\u1E29\u1E96\u1E96\u1E24\u1E25\u1E22\u1E23\u0266\u02B0\u01F6\u0195]",i:"[i\xCD\xED\xCC\xEC\u012C\u012D\xCE\xEE\u01CF\u01D0\xCF\xEF\u1E2E\u1E2F\u0128\u0129\u012E\u012F\u012A\u012B\u1EC8\u1EC9\u0208\u0209\u020A\u020B\u1ECA\u1ECB\u1E2C\u1E2D\u0197\u0268\u0268\u0306\u1D7B\u1D96\u0130iI\u0131\u026A\uFF29\uFF49]",j:"[j\u0237\u0134\u0135\u0248\u0249\u029D\u025F\u02B2]",k:"[k\u0198\u0199\uA740\uA741\u1E30\u1E31\u01E8\u01E9\u1E32\u1E33\u1E34\u1E35\u03BA\u03F0\u20AD]",l:"[l\u0141\u0142\u013D\u013E\u013B\u013C\u0139\u013A\u1E36\u1E37\u1E38\u1E39\u1E3C\u1E3D\u1E3A\u1E3B\u013F\u0140\u023D\u019A\u2C60\u2C61\u2C62\u026B\u026C\u1D85\u026D\u0234\u029F\uFF2C\uFF4C]",n:"[n\u0143\u0144\u01F8\u01F9\u0147\u0148\xD1\xF1\u1E44\u1E45\u0145\u0146\u1E46\u1E47\u1E4A\u1E4B\u1E48\u1E49N\u0308n\u0308\u019D\u0272\u0220\u019E\u1D70\u1D87\u0273\u0235\u0274\uFF2E\uFF4E\u014A\u014B]",o:"[o\xD8\xF8\xD6\xF6\xD3\xF3\xD2\xF2\xD4\xF4\u01D1\u01D2\u0150\u0151\u014E\u014F\u022E\u022F\u1ECC\u1ECD\u019F\u0275\u01A0\u01A1\u1ECE\u1ECF\u014C\u014D\xD5\xF5\u01EA\u01EB\u020C\u020D\u0555\u0585]",p:"[p\u1E54\u1E55\u1E56\u1E57\u2C63\u1D7D\u01A4\u01A5\u1D71]",q:"[q\uA756\uA757\u02A0\u024A\u024B\uA758\uA759q\u0303]",r:"[r\u0154\u0155\u024C\u024D\u0158\u0159\u0156\u0157\u1E58\u1E59\u0210\u0211\u0212\u0213\u1E5A\u1E5B\u2C64\u027D]",s:"[s\u015A\u015B\u1E60\u1E61\u1E62\u1E63\uA7A8\uA7A9\u015C\u015D\u0160\u0161\u015E\u015F\u0218\u0219S\u0308s\u0308]",t:"[t\u0164\u0165\u1E6A\u1E6B\u0162\u0163\u1E6C\u1E6D\u01AE\u0288\u021A\u021B\u1E70\u1E71\u1E6E\u1E6F\u01AC\u01AD]",u:"[u\u016C\u016D\u0244\u0289\u1EE4\u1EE5\xDC\xFC\xDA\xFA\xD9\xF9\xDB\xFB\u01D3\u01D4\u0170\u0171\u016C\u016D\u01AF\u01B0\u1EE6\u1EE7\u016A\u016B\u0168\u0169\u0172\u0173\u0214\u0215\u222A]",v:"[v\u1E7C\u1E7D\u1E7E\u1E7F\u01B2\u028B\uA75E\uA75F\u2C71\u028B]",w:"[w\u1E82\u1E83\u1E80\u1E81\u0174\u0175\u1E84\u1E85\u1E86\u1E87\u1E88\u1E89]",x:"[x\u1E8C\u1E8D\u1E8A\u1E8B\u03C7]",y:"[y\xDD\xFD\u1EF2\u1EF3\u0176\u0177\u0178\xFF\u1EF8\u1EF9\u1E8E\u1E8F\u1EF4\u1EF5\u024E\u024F\u01B3\u01B4]",z:"[z\u0179\u017A\u1E90\u1E91\u017D\u017E\u017B\u017C\u1E92\u1E93\u1E94\u1E95\u01B5\u01B6]"},c=function(){var u,f,p,h,y="",_={};for(p in a)if(a.hasOwnProperty(p))for(h=a[p].substring(2,a[p].length-1),y+=h,u=0,f=h.length;u<f;u++)_[h.charAt(u)]=p;var w=new RegExp("["+y+"]","g");return function(E){return E.replace(w,function(D){return _[D]}).toLowerCase()}}();return n})});var c_=Fe((fp,l_)=>{(function(n,e){typeof define=="function"&&define.amd?define(e):typeof fp=="object"?l_.exports=e():n.MicroPlugin=e()})(fp,function(){var n={};n.mixin=function(t){t.plugins={},t.prototype.initializePlugins=function(r){var i,s,o,a=this,c=[];if(a.plugins={names:[],settings:{},requested:{},loaded:{}},e.isArray(r))for(i=0,s=r.length;i<s;i++)typeof r[i]=="string"?c.push(r[i]):(a.plugins.settings[r[i].name]=r[i].options,c.push(r[i].name));else if(r)for(o in r)r.hasOwnProperty(o)&&(a.plugins.settings[o]=r[o],c.push(o));for(;c.length;)a.require(c.shift())},t.prototype.loadPlugin=function(r){var i=this,s=i.plugins,o=t.plugins[r];if(!t.plugins.hasOwnProperty(r))throw new Error('Unable to find "'+r+'" plugin');s.requested[r]=!0,s.loaded[r]=o.fn.apply(i,[i.plugins.settings[r]||{}]),s.names.push(r)},t.prototype.require=function(r){var i=this,s=i.plugins;if(!i.plugins.loaded.hasOwnProperty(r)){if(s.requested[r])throw new Error('Plugin has circular dependency ("'+r+'")');i.loadPlugin(r)}return s.loaded[r]},t.define=function(r,i){t.plugins[r]={name:r,fn:i}}};var e={isArray:Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"}};return n})});var d_=Fe((u_,iu)=>{(function(n,e){typeof define=="function"&&define.amd?define(["jquery","sifter","microplugin"],e):typeof iu=="object"&&typeof iu.exports=="object"?iu.exports=e(Rc(),a_(),c_()):n.Selectize=e(n.jQuery,n.Sifter,n.MicroPlugin)})(u_,function(n,e,t){"use strict";var r=function(b,C){if(!(typeof C=="string"&&!C.length)){var O=typeof C=="string"?new RegExp(C,"i"):C,U=function(K){var Y=0;if(K.nodeType===3){var ee=K.data.search(O);if(ee>=0&&K.data.length>0){var ge=K.data.match(O),be=document.createElement("span");be.className="highlight";var ue=K.splitText(ee),Se=ue.splitText(ge[0].length),bt=ue.cloneNode(!0);be.appendChild(bt),ue.parentNode.replaceChild(be,ue),Y=1}}else if(K.nodeType===1&&K.childNodes&&!/(script|style)/i.test(K.tagName)&&(K.className!=="highlight"||K.tagName!=="SPAN"))for(var nt=0;nt<K.childNodes.length;++nt)nt+=U(K.childNodes[nt]);return Y};return b.each(function(){U(this)})}};n.fn.removeHighlight=function(){return this.find("span.highlight").each(function(){this.parentNode.firstChild.nodeName;var b=this.parentNode;b.replaceChild(this.firstChild,this),b.normalize()}).end()};var i=function(){};i.prototype={on:function(b,C){this._events=this._events||{},this._events[b]=this._events[b]||[],this._events[b].push(C)},off:function(b,C){var O=arguments.length;if(O===0)return delete this._events;if(O===1)return delete this._events[b];this._events=this._events||{},b in this._events&&this._events[b].splice(this._events[b].indexOf(C),1)},trigger:function(b){if(this._events=this._events||{},b in this._events)for(var C=0;C<this._events[b].length;C++)this._events[b][C].apply(this,Array.prototype.slice.call(arguments,1))}},i.mixin=function(b){for(var C=["on","off","trigger"],O=0;O<C.length;O++)b.prototype[C[O]]=i.prototype[C[O]]};function s(b,C){return navigator.userAgentData?b===navigator.userAgentData.platform:C.test(navigator.userAgent)}var o=s("macOS",/Mac/),a=65,c=188,u=13,f=27,p=37,h=38,y=80,_=39,w=40,E=78,D=8,R=46,H=16,F=o?91:17,m=o?18:17,Q=9,le=1,J=2,q=!s("Android",/android/i)&&!!document.createElement("input").validity,Z=function(b){return typeof b<"u"},ae=function(b){return typeof b>"u"||b===null?null:typeof b=="boolean"?b?"1":"0":b+""},Ce=function(b){return(b+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},Ae=function(b){return(b+"").replace(/\$/g,"$$$$")},_e={};_e.before=function(b,C,O){var U=b[C];b[C]=function(){return O.apply(b,arguments),U.apply(b,arguments)}},_e.after=function(b,C,O){var U=b[C];b[C]=function(){var K=U.apply(b,arguments);return O.apply(b,arguments),K}};var Le=function(b){var C=!1;return function(){C||(C=!0,b.apply(this,arguments))}},Ve=function(b,C){var O;return function(){var U=this,K=arguments;window.clearTimeout(O),O=window.setTimeout(function(){b.apply(U,K)},C)}},$e=function(b,C,O){var U,K=b.trigger,Y={};b.trigger=function(){var ee=arguments[0];if(C.indexOf(ee)!==-1)Y[ee]=arguments;else return K.apply(b,arguments)},O.apply(b,[]),b.trigger=K;for(U in Y)Y.hasOwnProperty(U)&&K.apply(b,Y[U])},pe=function(b,C,O,U){b.on(C,O,function(K){for(var Y=K.target;Y&&Y.parentNode!==b[0];)Y=Y.parentNode;return K.currentTarget=Y,U.apply(this,[K])})},ce=function(b){var C={};if(b===void 0)return console.warn("WARN getSelection cannot locate input control"),C;if("selectionStart"in b)C.start=b.selectionStart,C.length=b.selectionEnd-C.start;else if(document.selection){b.focus();var O=document.selection.createRange(),U=document.selection.createRange().text.length;O.moveStart("character",-b.value.length),C.start=O.text.length-U,C.length=U}return C},Oe=function(b,C,O){var U,K,Y={};if(O)for(U=0,K=O.length;U<K;U++)Y[O[U]]=b.css(O[U]);else Y=b.css();C.css(Y)},Qe=function(b,C){return b?(xe.$testInput||(xe.$testInput=n("<span />").css({position:"absolute",width:"auto",padding:0,whiteSpace:"pre"}),n("<div />").css({position:"absolute",width:0,height:0,overflow:"hidden"}).append(xe.$testInput).appendTo("body")),xe.$testInput.text(b),Oe(C,xe.$testInput,["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"]),xe.$testInput.width()):0},Ge=function(b){var C=null,O=function(U,K){var Y,ee,ge,be,ue,Se,bt,nt,rt;U=U||window.event||{},K=K||{},!(U.metaKey||U.altKey)&&(!K.force&&b.data("grow")===!1||(Y=b.val(),U.type&&U.type.toLowerCase()==="keydown"&&(ee=U.keyCode,ge=ee>=48&&ee<=57||ee>=65&&ee<=90||ee>=96&&ee<=111||ee>=186&&ee<=222||ee===32,ee===R||ee===D?(rt=ce(b[0]),rt.length?Y=Y.substring(0,rt.start)+Y.substring(rt.start+rt.length):ee===D&&rt.start?Y=Y.substring(0,rt.start-1)+Y.substring(rt.start+1):ee===R&&typeof rt.start<"u"&&(Y=Y.substring(0,rt.start)+Y.substring(rt.start+1))):ge&&(bt=U.shiftKey,nt=String.fromCharCode(U.keyCode),bt?nt=nt.toUpperCase():nt=nt.toLowerCase(),Y+=nt)),ue=b.attr("placeholder"),ue?Se=Qe(ue,b)+4:Se=0,be=Math.max(Qe(Y,b),Se)+4,be!==C&&(C=be,b.width(be),b.triggerHandler("resize"))))};b.on("keydown keyup update blur",O),O()},We=function(b){var C=document.createElement("div");return C.appendChild(b.cloneNode(!0)),C.innerHTML},lt=function(b,C){C||(C={});var O="Selectize";console.error(O+": "+b),C.explanation&&(console.group&&console.group(),console.error(C.explanation),console.group&&console.groupEnd())},xe=function(b,C){var O,U,K,Y,ee,ge=this;ee=b[0],ee.selectize=ge;var be=window.getComputedStyle&&window.getComputedStyle(ee,null);if(Y=be?be.getPropertyValue("direction"):ee.currentStyle&&ee.currentStyle.direction,Y=Y||b.parents("[dir]:first").attr("dir")||"",n.extend(ge,{order:0,settings:C,$input:b,tabIndex:b.attr("tabindex")||"",tagType:ee.tagName.toLowerCase()==="select"?le:J,rtl:/rtl/i.test(Y),eventNS:".selectize"+ ++xe.count,highlightedValue:null,isBlurring:!1,isOpen:!1,isDisabled:!1,isRequired:b.is("[required]"),isInvalid:!1,isLocked:!1,isFocused:!1,isInputHidden:!1,isSetup:!1,isShiftDown:!1,isCmdDown:!1,isCtrlDown:!1,ignoreFocus:!1,ignoreBlur:!1,ignoreHover:!1,hasOptions:!1,currentResults:null,lastValue:"",lastValidValue:"",caretPos:0,loading:0,loadedSearches:{},$activeOption:null,$activeItems:[],optgroups:{},options:{},userOptions:{},items:[],renderCache:{},onSearchChange:C.loadThrottle===null?ge.onSearchChange:Ve(ge.onSearchChange,C.loadThrottle)}),ge.sifter=new e(this.options,{diacritics:C.diacritics}),ge.settings.options){for(U=0,K=ge.settings.options.length;U<K;U++)ge.registerOption(ge.settings.options[U]);delete ge.settings.options}if(ge.settings.optgroups){for(U=0,K=ge.settings.optgroups.length;U<K;U++)ge.registerOptionGroup(ge.settings.optgroups[U]);delete ge.settings.optgroups}ge.settings.mode=ge.settings.mode||(ge.settings.maxItems===1?"single":"multi"),typeof ge.settings.hideSelected!="boolean"&&(ge.settings.hideSelected=ge.settings.mode==="multi"),ge.initializePlugins(ge.settings.plugins),ge.setupCallbacks(),ge.setupTemplates(),ge.setup()};return i.mixin(xe),typeof t<"u"?t.mixin(xe):lt("Dependency MicroPlugin is missing",{explanation:'Make sure you either: (1) are using the "standalone" version of Selectize, or (2) require MicroPlugin before you load Selectize.'}),n.extend(xe.prototype,{setup:function(){var b=this,C=b.settings,O=b.eventNS,U=n(window),K=n(document),Y=b.$input,ee,ge,be,ue,Se,bt,nt,rt,ut,_t,vt,ke;if(nt=b.settings.mode,_t=Y.attr("class")||"",ee=n("<div>").addClass(C.wrapperClass).addClass(_t).addClass(nt),ge=n("<div>").addClass(C.inputClass).addClass("items").appendTo(ee),be=n('<input type="text" autocomplete="new-password" autofill="no" />').appendTo(ge).attr("tabindex",Y.is(":disabled")?"-1":b.tabIndex),bt=n(C.dropdownParent||ee),ue=n("<div>").addClass(C.dropdownClass).addClass(nt).hide().appendTo(bt),Se=n("<div>").addClass(C.dropdownContentClass).attr("tabindex","-1").appendTo(ue),(ke=Y.attr("id"))&&(be.attr("id",ke+"-selectized"),n("label[for='"+ke+"']").attr("for",ke+"-selectized")),b.settings.copyClassesToDropdown&&ue.addClass(_t),ee.css({width:Y[0].style.width}),b.plugins.names.length&&(vt="plugin-"+b.plugins.names.join(" plugin-"),ee.addClass(vt),ue.addClass(vt)),(C.maxItems===null||C.maxItems>1)&&b.tagType===le&&Y.attr("multiple","multiple"),b.settings.placeholder&&be.attr("placeholder",C.placeholder),!b.settings.splitOn&&b.settings.delimiter){var kt=b.settings.delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");b.settings.splitOn=new RegExp("\\s*"+kt+"+\\s*")}Y.attr("autocorrect")&&be.attr("autocorrect",Y.attr("autocorrect")),Y.attr("autocapitalize")&&be.attr("autocapitalize",Y.attr("autocapitalize")),Y.is("input")&&(be[0].type=Y[0].type),b.$wrapper=ee,b.$control=ge,b.$control_input=be,b.$dropdown=ue,b.$dropdown_content=Se,ue.on("mouseenter mousedown click","[data-disabled]>[data-selectable]",function(Ke){Ke.stopImmediatePropagation()}),ue.on("mouseenter","[data-selectable]",function(){return b.onOptionHover.apply(b,arguments)}),ue.on("mousedown click","[data-selectable]",function(){return b.onOptionSelect.apply(b,arguments)}),pe(ge,"mousedown","*:not(input)",function(){return b.onItemSelect.apply(b,arguments)}),Ge(be),ge.on({mousedown:function(){return b.onMouseDown.apply(b,arguments)},click:function(){return b.onClick.apply(b,arguments)}}),be.on({mousedown:function(Ke){Ke.stopPropagation()},keydown:function(){return b.onKeyDown.apply(b,arguments)},keypress:function(){return b.onKeyPress.apply(b,arguments)},input:function(){return b.onInput.apply(b,arguments)},resize:function(){b.positionDropdown.apply(b,[])},blur:function(){return b.onBlur.apply(b,arguments)},focus:function(){return b.ignoreBlur=!1,b.onFocus.apply(b,arguments)},paste:function(){return b.onPaste.apply(b,arguments)}}),K.on("keydown"+O,function(Ke){b.isCmdDown=Ke[o?"metaKey":"ctrlKey"],b.isCtrlDown=Ke[o?"altKey":"ctrlKey"],b.isShiftDown=Ke.shiftKey}),K.on("keyup"+O,function(Ke){Ke.keyCode===m&&(b.isCtrlDown=!1),Ke.keyCode===H&&(b.isShiftDown=!1),Ke.keyCode===F&&(b.isCmdDown=!1)}),K.on("mousedown"+O,function(Ke){if(b.isFocused){if(Ke.target===b.$dropdown[0]||Ke.target.parentNode===b.$dropdown[0])return!1;!b.$control.has(Ke.target).length&&Ke.target!==b.$control[0]&&b.blur(Ke.target)}}),U.on(["scroll"+O,"resize"+O].join(" "),function(){b.isOpen&&b.positionDropdown.apply(b,arguments)}),U.on("mousemove"+O,function(){b.ignoreHover=!1}),this.revertSettings={$children:Y.children().detach(),tabindex:Y.attr("tabindex")},Y.attr("tabindex",-1).hide().after(b.$wrapper),Array.isArray(C.items)&&(b.lastValidValue=C.items,b.setValue(C.items),delete C.items),q&&Y.on("invalid"+O,function(Ke){Ke.preventDefault(),b.isInvalid=!0,b.refreshState()}),b.updateOriginalInput(),b.refreshItems(),b.refreshState(),b.updatePlaceholder(),b.isSetup=!0,Y.is(":disabled")&&b.disable(),b.on("change",this.onChange),Y.data("selectize",b),Y.addClass("selectized"),b.trigger("initialize"),C.preload===!0&&b.onSearchChange("")},setupTemplates:function(){var b=this,C=b.settings.labelField,O=b.settings.valueField,U=b.settings.optgroupLabelField,K={optgroup:function(Y){return'<div class="optgroup">'+Y.html+"</div>"},optgroup_header:function(Y,ee){return'<div class="optgroup-header">'+ee(Y[U])+"</div>"},option:function(Y,ee){return'<div class="option '+(Y[O]===""?"selectize-dropdown-emptyoptionlabel":"")+'">'+ee(Y[C])+"</div>"},item:function(Y,ee){return'<div class="item">'+ee(Y[C])+"</div>"},option_create:function(Y,ee){return'<div class="create">Add <strong>'+ee(Y.input)+"</strong>&#x2026;</div>"}};b.settings.render=n.extend({},K,b.settings.render)},setupCallbacks:function(){var b,C,O={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur",dropdown_item_activate:"onDropdownItemActivate",dropdown_item_deactivate:"onDropdownItemDeactivate"};for(b in O)O.hasOwnProperty(b)&&(C=this.settings[O[b]],C&&this.on(b,C))},onClick:function(b){var C=this;(!C.isFocused||!C.isOpen)&&(C.focus(),b.preventDefault())},onMouseDown:function(b){var C=this,O=b.isDefaultPrevented(),U=n(b.target);if(C.isFocused){if(b.target!==C.$control_input[0])return C.settings.mode==="single"?C.isOpen?C.close():C.open():O||C.setActiveItem(null),!1}else O||window.setTimeout(function(){C.focus()},0)},onChange:function(){var b=this;b.getValue()!==""&&(b.lastValidValue=b.getValue()),this.$input.trigger("input"),this.$input.trigger("change")},onPaste:function(b){var C=this;if(C.isFull()||C.isInputHidden||C.isLocked){b.preventDefault();return}C.settings.splitOn&&setTimeout(function(){var O=C.$control_input.val();if(O.match(C.settings.splitOn))for(var U=O.trim().split(C.settings.splitOn),K=0,Y=U.length;K<Y;K++)C.createItem(U[K])},0)},onKeyPress:function(b){if(this.isLocked)return b&&b.preventDefault();var C=String.fromCharCode(b.keyCode||b.which);if(this.settings.create&&this.settings.mode==="multi"&&C===this.settings.delimiter)return this.createItem(),b.preventDefault(),!1},onKeyDown:function(b){var C=b.target===this.$control_input[0],O=this;if(O.isLocked){b.keyCode!==Q&&b.preventDefault();return}switch(b.keyCode){case a:if(O.isCmdDown){O.selectAll();return}break;case f:O.isOpen&&(b.preventDefault(),b.stopPropagation(),O.close());return;case E:if(!b.ctrlKey||b.altKey)break;case w:if(!O.isOpen&&O.hasOptions)O.open();else if(O.$activeOption){O.ignoreHover=!0;var U=O.getAdjacentOption(O.$activeOption,1);U.length&&O.setActiveOption(U,!0,!0)}b.preventDefault();return;case y:if(!b.ctrlKey||b.altKey)break;case h:if(O.$activeOption){O.ignoreHover=!0;var K=O.getAdjacentOption(O.$activeOption,-1);K.length&&O.setActiveOption(K,!0,!0)}b.preventDefault();return;case u:O.isOpen&&O.$activeOption&&(O.onOptionSelect({currentTarget:O.$activeOption}),b.preventDefault());return;case p:O.advanceSelection(-1,b);return;case _:O.advanceSelection(1,b);return;case Q:O.settings.selectOnTab&&O.isOpen&&O.$activeOption&&(O.onOptionSelect({currentTarget:O.$activeOption}),O.isFull()||b.preventDefault()),O.settings.create&&O.createItem()&&O.settings.showAddOptionOnCreate&&b.preventDefault();return;case D:case R:O.deleteSelection(b);return}if((O.isFull()||O.isInputHidden)&&!(o?b.metaKey:b.ctrlKey)){b.preventDefault();return}},onInput:function(b){var C=this,O=C.$control_input.val()||"";C.lastValue!==O&&(C.lastValue=O,C.onSearchChange(O),C.refreshOptions(),C.trigger("type",O))},onSearchChange:function(b){var C=this,O=C.settings.load;O&&(C.loadedSearches.hasOwnProperty(b)||(C.loadedSearches[b]=!0,C.load(function(U){O.apply(C,[b,U])})))},onFocus:function(b){var C=this,O=C.isFocused;if(C.isDisabled)return C.blur(),b&&b.preventDefault(),!1;C.ignoreFocus||(C.isFocused=!0,C.settings.preload==="focus"&&C.onSearchChange(""),O||C.trigger("focus"),C.$activeItems.length||(C.showInput(),C.setActiveItem(null),C.refreshOptions(!!C.settings.openOnFocus)),C.refreshState())},onBlur:function(b,C){var O=this;if(O.isFocused&&(O.isFocused=!1,!O.ignoreFocus)){if(!O.ignoreBlur&&document.activeElement===O.$dropdown_content[0]){O.ignoreBlur=!0,O.onFocus(b);return}var U=function(){O.close(),O.setTextboxValue(""),O.setActiveItem(null),O.setActiveOption(null),O.setCaret(O.items.length),O.refreshState(),C&&C.focus&&C.focus(),O.isBlurring=!1,O.ignoreFocus=!1,O.trigger("blur")};O.isBlurring=!0,O.ignoreFocus=!0,O.settings.create&&O.settings.createOnBlur?O.createItem(null,!1,U):U()}},onOptionHover:function(b){this.ignoreHover||this.setActiveOption(b.currentTarget,!1)},onOptionSelect:function(b){var C,O,U,K=this;b.preventDefault&&(b.preventDefault(),b.stopPropagation()),O=n(b.currentTarget),O.hasClass("create")?K.createItem(null,function(){K.settings.closeAfterSelect&&K.close()}):(C=O.attr("data-value"),typeof C<"u"&&(K.lastQuery=null,K.setTextboxValue(""),K.addItem(C),K.settings.closeAfterSelect?K.close():!K.settings.hideSelected&&b.type&&/mouse/.test(b.type)&&K.setActiveOption(K.getOption(C))))},onItemSelect:function(b){var C=this;C.isLocked||C.settings.mode==="multi"&&(b.preventDefault(),C.setActiveItem(b.currentTarget,b))},load:function(b){var C=this,O=C.$wrapper.addClass(C.settings.loadingClass);C.loading++,b.apply(C,[function(U){C.loading=Math.max(C.loading-1,0),U&&U.length&&(C.addOption(U),C.refreshOptions(C.isFocused&&!C.isInputHidden)),C.loading||O.removeClass(C.settings.loadingClass),C.trigger("load",U)}])},getTextboxValue:function(){var b=this.$control_input;return b.val()},setTextboxValue:function(b){var C=this.$control_input,O=C.val()!==b;O&&(C.val(b).triggerHandler("update"),this.lastValue=b)},getValue:function(){return this.tagType===le&&this.$input.attr("multiple")?this.items:this.items.join(this.settings.delimiter)},setValue:function(b,C){var O=C?[]:["change"];$e(this,O,function(){this.clear(C),this.addItems(b,C)})},setMaxItems:function(b){b===0&&(b=null),this.settings.maxItems=b,this.settings.mode=this.settings.mode||(this.settings.maxItems===1?"single":"multi"),this.refreshState()},setActiveItem:function(b,C){var O=this,U,K,Y,ee,ge,be,ue,Se;if(O.settings.mode!=="single"){if(b=n(b),!b.length){n(O.$activeItems).removeClass("active"),O.$activeItems=[],O.isFocused&&O.showInput();return}if(U=C&&C.type.toLowerCase(),U==="mousedown"&&O.isShiftDown&&O.$activeItems.length){for(Se=O.$control.children(".active:last"),ee=Array.prototype.indexOf.apply(O.$control[0].childNodes,[Se[0]]),ge=Array.prototype.indexOf.apply(O.$control[0].childNodes,[b[0]]),ee>ge&&(ue=ee,ee=ge,ge=ue),K=ee;K<=ge;K++)be=O.$control[0].childNodes[K],O.$activeItems.indexOf(be)===-1&&(n(be).addClass("active"),O.$activeItems.push(be));C.preventDefault()}else U==="mousedown"&&O.isCtrlDown||U==="keydown"&&this.isShiftDown?b.hasClass("active")?(Y=O.$activeItems.indexOf(b[0]),O.$activeItems.splice(Y,1),b.removeClass("active")):O.$activeItems.push(b.addClass("active")[0]):(n(O.$activeItems).removeClass("active"),O.$activeItems=[b.addClass("active")[0]]);O.hideInput(),this.isFocused||O.focus()}},setActiveOption:function(b,C,O){var U,K,Y,ee,ge,be=this;be.$activeOption&&(be.$activeOption.removeClass("active"),be.trigger("dropdown_item_deactivate",be.$activeOption.attr("data-value"))),be.$activeOption=null,b=n(b),b.length&&(be.$activeOption=b.addClass("active"),be.isOpen&&be.trigger("dropdown_item_activate",be.$activeOption.attr("data-value")),(C||!Z(C))&&(U=be.$dropdown_content.height(),K=be.$activeOption.outerHeight(!0),C=be.$dropdown_content.scrollTop()||0,Y=be.$activeOption.offset().top-be.$dropdown_content.offset().top+C,ee=Y,ge=Y-U+K,Y+K>U+C?be.$dropdown_content.stop().animate({scrollTop:ge},O?be.settings.scrollDuration:0):Y<C&&be.$dropdown_content.stop().animate({scrollTop:ee},O?be.settings.scrollDuration:0)))},selectAll:function(){var b=this;b.settings.mode!=="single"&&(b.$activeItems=Array.prototype.slice.apply(b.$control.children(":not(input)").addClass("active")),b.$activeItems.length&&(b.hideInput(),b.close()),b.focus())},hideInput:function(){var b=this;b.setTextboxValue(""),b.$control_input.css({opacity:0,position:"absolute",left:b.rtl?1e4:-1e4}),b.isInputHidden=!0},showInput:function(){this.$control_input.css({opacity:1,position:"relative",left:0}),this.isInputHidden=!1},focus:function(){var b=this;return b.isDisabled||(b.ignoreFocus=!0,b.$control_input[0].focus(),window.setTimeout(function(){b.ignoreFocus=!1,b.onFocus()},0)),b},blur:function(b){return this.$control_input[0].blur(),this.onBlur(null,b),this},getScoreFunction:function(b){return this.sifter.getScoreFunction(b,this.getSearchOptions())},getSearchOptions:function(){var b=this.settings,C=b.sortField;return typeof C=="string"&&(C=[{field:C}]),{fields:b.searchField,conjunction:b.searchConjunction,sort:C,nesting:b.nesting}},search:function(b){var C,O,U,K,Y,ee=this,ge=ee.settings,be=this.getSearchOptions();if(ge.score&&(Y=ee.settings.score.apply(this,[b]),typeof Y!="function"))throw new Error('Selectize "score" setting must be a function that returns a function');if(b!==ee.lastQuery?(ee.lastQuery=b,K=ee.sifter.search(b,n.extend(be,{score:Y})),ee.currentResults=K):K=n.extend(!0,{},ee.currentResults),ge.hideSelected)for(C=K.items.length-1;C>=0;C--)ee.items.indexOf(ae(K.items[C].id))!==-1&&K.items.splice(C,1);return K},refreshOptions:function(b){var C,O,U,K,Y,ee,ge,be,ue,Se,bt,nt,rt,ut,_t,vt;typeof b>"u"&&(b=!0);var ke=this,kt=ke.$control_input.val().trim(),Ke=ke.search(kt),zt=ke.$dropdown_content,an=ke.$activeOption&&ae(ke.$activeOption.attr("data-value"));for(K=Ke.items.length,typeof ke.settings.maxOptions=="number"&&(K=Math.min(K,ke.settings.maxOptions)),Y={},ee=[],C=0;C<K;C++)for(ge=ke.options[Ke.items[C].id],be=ke.render("option",ge),ue=ge[ke.settings.optgroupField]||"",Se=Array.isArray(ue)?ue:[ue],O=0,U=Se&&Se.length;O<U;O++)ue=Se[O],ke.optgroups.hasOwnProperty(ue)||(ue=""),Y.hasOwnProperty(ue)||(Y[ue]=document.createDocumentFragment(),ee.push(ue)),Y[ue].appendChild(be);for(this.settings.lockOptgroupOrder&&ee.sort(function(dn,Qn){var Pt=ke.optgroups[dn]&&ke.optgroups[dn].$order||0,Ot=ke.optgroups[Qn]&&ke.optgroups[Qn].$order||0;return Pt-Ot}),bt=document.createDocumentFragment(),C=0,K=ee.length;C<K;C++)ue=ee[C],ke.optgroups.hasOwnProperty(ue)&&Y[ue].childNodes.length?(nt=document.createDocumentFragment(),nt.appendChild(ke.render("optgroup_header",ke.optgroups[ue])),nt.appendChild(Y[ue]),bt.appendChild(ke.render("optgroup",n.extend({},ke.optgroups[ue],{html:We(nt),dom:nt})))):bt.appendChild(Y[ue]);if(zt.html(bt),ke.settings.highlight&&(zt.removeHighlight(),Ke.query.length&&Ke.tokens.length))for(C=0,K=Ke.tokens.length;C<K;C++)r(zt,Ke.tokens[C].regex);if(!ke.settings.hideSelected)for(ke.$dropdown.find(".selected").removeClass("selected"),C=0,K=ke.items.length;C<K;C++)ke.getOption(ke.items[C]).addClass("selected");rt=ke.canCreate(kt),rt&&ke.settings.showAddOptionOnCreate&&(zt.prepend(ke.render("option_create",{input:kt})),vt=n(zt[0].childNodes[0])),ke.hasOptions=Ke.items.length>0||rt&&ke.settings.showAddOptionOnCreate,ke.hasOptions?(Ke.items.length>0?(_t=an&&ke.getOption(an),Ke.query!==""&&_t&&_t.length?ut=_t:ke.settings.mode==="single"&&ke.items.length&&(ut=ke.getOption(ke.items[0])),(!ut||!ut.length)&&(vt&&!ke.settings.addPrecedence?ut=ke.getAdjacentOption(vt,1):ut=zt.find("[data-selectable]:first"))):ut=vt,ke.setActiveOption(ut),b&&!ke.isOpen&&ke.open()):(ke.setActiveOption(null),b&&ke.isOpen&&ke.close())},addOption:function(b){var C,O,U,K=this;if(Array.isArray(b)){for(C=0,O=b.length;C<O;C++)K.addOption(b[C]);return}(U=K.registerOption(b))&&(K.userOptions[U]=!0,K.lastQuery=null,K.trigger("option_add",U,b))},registerOption:function(b){var C=ae(b[this.settings.valueField]);return typeof C>"u"||C===null||this.options.hasOwnProperty(C)?!1:(b.$order=b.$order||++this.order,this.options[C]=b,C)},registerOptionGroup:function(b){var C=ae(b[this.settings.optgroupValueField]);return C?(b.$order=b.$order||++this.order,this.optgroups[C]=b,C):!1},addOptionGroup:function(b,C){C[this.settings.optgroupValueField]=b,(b=this.registerOptionGroup(C))&&this.trigger("optgroup_add",b,C)},removeOptionGroup:function(b){this.optgroups.hasOwnProperty(b)&&(delete this.optgroups[b],this.renderCache={},this.trigger("optgroup_remove",b))},clearOptionGroups:function(){this.optgroups={},this.renderCache={},this.trigger("optgroup_clear")},updateOption:function(b,C){var O=this,U,K,Y,ee,ge,be,ue;if(b=ae(b),Y=ae(C[O.settings.valueField]),b!==null&&O.options.hasOwnProperty(b)){if(typeof Y!="string")throw new Error("Value must be set in option data");ue=O.options[b].$order,Y!==b&&(delete O.options[b],ee=O.items.indexOf(b),ee!==-1&&O.items.splice(ee,1,Y)),C.$order=C.$order||ue,O.options[Y]=C,ge=O.renderCache.item,be=O.renderCache.option,ge&&(delete ge[b],delete ge[Y]),be&&(delete be[b],delete be[Y]),O.items.indexOf(Y)!==-1&&(U=O.getItem(b),K=n(O.render("item",C)),U.hasClass("active")&&K.addClass("active"),U.replaceWith(K)),O.lastQuery=null,O.isOpen&&O.refreshOptions(!1)}},removeOption:function(b,C){var O=this;b=ae(b);var U=O.renderCache.item,K=O.renderCache.option;U&&delete U[b],K&&delete K[b],delete O.userOptions[b],delete O.options[b],O.lastQuery=null,O.trigger("option_remove",b),O.removeItem(b,C)},clearOptions:function(b){var C=this;C.loadedSearches={},C.userOptions={},C.renderCache={};var O=C.options;n.each(C.options,function(U,K){C.items.indexOf(U)==-1&&delete O[U]}),C.options=C.sifter.items=O,C.lastQuery=null,C.trigger("option_clear"),C.clear(b)},getOption:function(b){return this.getElementWithValue(b,this.$dropdown_content.find("[data-selectable]"))},getFirstOption:function(){var b=this.$dropdown.find("[data-selectable]");return b.length>0?b.eq(0):n()},getAdjacentOption:function(b,C){var O=this.$dropdown.find("[data-selectable]"),U=O.index(b)+C;return U>=0&&U<O.length?O.eq(U):n()},getElementWithValue:function(b,C){if(b=ae(b),typeof b<"u"&&b!==null){for(var O=0,U=C.length;O<U;O++)if(C[O].getAttribute("data-value")===b)return n(C[O])}return n()},getElementWithTextContent:function(b,C,O){if(b=ae(b),typeof b<"u"&&b!==null)for(var U=0,K=O.length;U<K;U++){var Y=O[U].textContent;if(C==!0&&(Y=Y!==null?Y.toLowerCase():null,b=b.toLowerCase()),Y===b)return n(O[U])}return n()},getItem:function(b){return this.getElementWithValue(b,this.$control.children())},getFirstItemMatchedByTextContent:function(b,C){return C=C!==null&&C===!0,this.getElementWithTextContent(b,C,this.$dropdown_content.find("[data-selectable]"))},addItems:function(b,C){this.buffer=document.createDocumentFragment();for(var O=this.$control[0].childNodes,U=0;U<O.length;U++)this.buffer.appendChild(O[U]);for(var K=Array.isArray(b)?b:[b],U=0,Y=K.length;U<Y;U++)this.isPending=U<Y-1,this.addItem(K[U],C);var ee=this.$control[0];ee.insertBefore(this.buffer,ee.firstChild),this.buffer=null},addItem:function(b,C){var O=C?[]:["change"];$e(this,O,function(){var U,K,Y,ee=this,ge=ee.settings.mode,be,ue,Se,bt;if(b=ae(b),ee.items.indexOf(b)!==-1){ge==="single"&&ee.close();return}ee.options.hasOwnProperty(b)&&(ge==="single"&&ee.clear(C),!(ge==="multi"&&ee.isFull())&&(U=n(ee.render("item",ee.options[b])),bt=ee.isFull(),ee.items.splice(ee.caretPos,0,b),ee.insertAtCaret(U),(!ee.isPending||!bt&&ee.isFull())&&ee.refreshState(),ee.isSetup&&(Y=ee.$dropdown_content.find("[data-selectable]"),ee.isPending||(K=ee.getOption(b),Se=ee.getAdjacentOption(K,1).attr("data-value"),ee.refreshOptions(ee.isFocused&&ge!=="single"),Se&&ee.setActiveOption(ee.getOption(Se))),!Y.length||ee.isFull()?ee.close():ee.isPending||ee.positionDropdown(),ee.updatePlaceholder(),ee.trigger("item_add",b,U),ee.isPending||ee.updateOriginalInput({silent:C}))))})},removeItem:function(b,C){var O=this,U,K,Y;U=b instanceof n?b:O.getItem(b),b=ae(U.attr("data-value")),K=O.items.indexOf(b),K!==-1&&(O.trigger("item_before_remove",b,U),U.remove(),U.hasClass("active")&&(Y=O.$activeItems.indexOf(U[0]),O.$activeItems.splice(Y,1)),O.items.splice(K,1),O.lastQuery=null,!O.settings.persist&&O.userOptions.hasOwnProperty(b)&&O.removeOption(b,C),K<O.caretPos&&O.setCaret(O.caretPos-1),O.refreshState(),O.updatePlaceholder(),O.updateOriginalInput({silent:C}),O.positionDropdown(),O.trigger("item_remove",b,U))},createItem:function(b,C){var O=this,U=O.caretPos;b=b||(O.$control_input.val()||"").trim();var K=arguments[arguments.length-1];if(typeof K!="function"&&(K=function(){}),typeof C!="boolean"&&(C=!0),!O.canCreate(b))return K(),!1;O.lock();var Y=typeof O.settings.create=="function"?this.settings.create:function(be){var ue={};ue[O.settings.labelField]=be;var Se=be;if(O.settings.formatValueToKey&&typeof O.settings.formatValueToKey=="function"&&(Se=O.settings.formatValueToKey.apply(this,[Se]),Se===null||typeof Se>"u"||typeof Se=="object"||typeof Se=="function"))throw new Error('Selectize "formatValueToKey" setting must be a function that returns a value other than object or function.');return ue[O.settings.valueField]=Se,ue},ee=Le(function(be){if(O.unlock(),!be||typeof be!="object")return K();var ue=ae(be[O.settings.valueField]);if(typeof ue!="string")return K();O.setTextboxValue(""),O.addOption(be),O.setCaret(U),O.addItem(ue),O.refreshOptions(C&&O.settings.mode!=="single"),K(be)}),ge=Y.apply(this,[b,ee]);return typeof ge<"u"&&ee(ge),!0},refreshItems:function(){this.lastQuery=null,this.isSetup&&this.addItem(this.items),this.refreshState(),this.updateOriginalInput()},refreshState:function(){this.refreshValidityState(),this.refreshClasses()},refreshValidityState:function(){if(!this.isRequired)return!1;var b=!this.items.length;this.isInvalid=b,this.$control_input.prop("required",b),this.$input.prop("required",!b)},refreshClasses:function(){var b=this,C=b.isFull(),O=b.isLocked;b.$wrapper.toggleClass("rtl",b.rtl),b.$control.toggleClass("focus",b.isFocused).toggleClass("disabled",b.isDisabled).toggleClass("required",b.isRequired).toggleClass("invalid",b.isInvalid).toggleClass("locked",O).toggleClass("full",C).toggleClass("not-full",!C).toggleClass("input-active",b.isFocused&&!b.isInputHidden).toggleClass("dropdown-active",b.isOpen).toggleClass("has-options",!n.isEmptyObject(b.options)).toggleClass("has-items",b.items.length>0),b.$control_input.data("grow",!C&&!O)},isFull:function(){return this.settings.maxItems!==null&&this.items.length>=this.settings.maxItems},updateOriginalInput:function(b){var C,O,U,K,Y=this;if(b=b||{},Y.tagType===le){for(U=[],C=0,O=Y.items.length;C<O;C++)K=Y.options[Y.items[C]][Y.settings.labelField]||"",U.push('<option value="'+Ce(Y.items[C])+'" selected="selected">'+Ce(K)+"</option>");!U.length&&!this.$input.attr("multiple")&&U.push('<option value="" selected="selected"></option>'),Y.$input.html(U.join(""))}else Y.$input.val(Y.getValue()),Y.$input.attr("value",Y.$input.val());Y.isSetup&&(b.silent||Y.trigger("change",Y.$input.val()))},updatePlaceholder:function(){if(this.settings.placeholder){var b=this.$control_input;this.items.length?b.removeAttr("placeholder"):b.attr("placeholder",this.settings.placeholder),b.triggerHandler("update",{force:!0})}},open:function(){var b=this;b.isLocked||b.isOpen||b.settings.mode==="multi"&&b.isFull()||(b.focus(),b.isOpen=!0,b.refreshState(),b.$dropdown.css({visibility:"hidden",display:"block"}),b.positionDropdown(),b.$dropdown.css({visibility:"visible"}),b.trigger("dropdown_open",b.$dropdown))},close:function(){var b=this,C=b.isOpen;b.settings.mode==="single"&&b.items.length&&(b.hideInput(),b.isBlurring&&b.$control_input.blur()),b.isOpen=!1,b.$dropdown.hide(),b.setActiveOption(null),b.refreshState(),C&&b.trigger("dropdown_close",b.$dropdown)},positionDropdown:function(){var b=this.$control,C=this.settings.dropdownParent==="body"?b.offset():b.position();C.top+=b.outerHeight(!0),this.$dropdown.css({width:b[0].getBoundingClientRect().width,top:C.top,left:C.left})},clear:function(b){var C=this;C.items.length&&(C.$control.children(":not(input)").remove(),C.items=[],C.lastQuery=null,C.setCaret(0),C.setActiveItem(null),C.updatePlaceholder(),C.updateOriginalInput({silent:b}),C.refreshState(),C.showInput(),C.trigger("clear"))},insertAtCaret:function(b){var C=Math.min(this.caretPos,this.items.length),O=b[0],U=this.buffer||this.$control[0];C===0?U.insertBefore(O,U.firstChild):U.insertBefore(O,U.childNodes[C]),this.setCaret(C+1)},deleteSelection:function(b){var C,O,U,K,Y,ee,ge,be,ue,Se=this;if(U=b&&b.keyCode===D?-1:1,K=ce(Se.$control_input[0]),Se.$activeOption&&!Se.settings.hideSelected&&(typeof Se.settings.deselectBehavior=="string"&&Se.settings.deselectBehavior==="top"?ge=Se.getFirstOption().attr("data-value"):ge=Se.getAdjacentOption(Se.$activeOption,-1).attr("data-value")),Y=[],Se.$activeItems.length){for(ue=Se.$control.children(".active:"+(U>0?"last":"first")),ee=Se.$control.children(":not(input)").index(ue),U>0&&ee++,C=0,O=Se.$activeItems.length;C<O;C++)Y.push(n(Se.$activeItems[C]).attr("data-value"));b&&(b.preventDefault(),b.stopPropagation())}else(Se.isFocused||Se.settings.mode==="single")&&Se.items.length&&(U<0&&K.start===0&&K.length===0?Y.push(Se.items[Se.caretPos-1]):U>0&&K.start===Se.$control_input.val().length&&Y.push(Se.items[Se.caretPos]));if(!Y.length||typeof Se.settings.onDelete=="function"&&Se.settings.onDelete.apply(Se,[Y])===!1)return!1;for(typeof ee<"u"&&Se.setCaret(ee);Y.length;)Se.removeItem(Y.pop());return Se.showInput(),Se.positionDropdown(),Se.refreshOptions(!0),ge&&(be=Se.getOption(ge),be.length&&Se.setActiveOption(be)),!0},advanceSelection:function(b,C){var O,U,K,Y,ee,ge,be=this;b!==0&&(be.rtl&&(b*=-1),O=b>0?"last":"first",U=ce(be.$control_input[0]),be.isFocused&&!be.isInputHidden?(Y=be.$control_input.val().length,ee=b<0?U.start===0&&U.length===0:U.start===Y,ee&&!Y&&be.advanceCaret(b,C)):(ge=be.$control.children(".active:"+O),ge.length&&(K=be.$control.children(":not(input)").index(ge),be.setActiveItem(null),be.setCaret(b>0?K+1:K))))},advanceCaret:function(b,C){var O=this,U,K;b!==0&&(U=b>0?"next":"prev",O.isShiftDown?(K=O.$control_input[U](),K.length&&(O.hideInput(),O.setActiveItem(K),C&&C.preventDefault())):O.setCaret(O.caretPos+b))},setCaret:function(b){var C=this;if(C.settings.mode==="single"?b=C.items.length:b=Math.max(0,Math.min(C.items.length,b)),!C.isPending){var O,U,K,Y,ee;for(Y=C.$control.children(":not(input)"),O=0,U=Y.length;O<U;O++)ee=n(Y[O]).detach(),O<b?C.$control_input.before(ee):C.$control.append(ee)}C.caretPos=b},lock:function(){this.close(),this.isLocked=!0,this.refreshState()},unlock:function(){this.isLocked=!1,this.refreshState()},disable:function(){var b=this;b.$input.prop("disabled",!0),b.$control_input.prop("disabled",!0).prop("tabindex",-1),b.isDisabled=!0,b.lock()},enable:function(){var b=this;b.$input.prop("disabled",!1),b.$control_input.prop("disabled",!1).prop("tabindex",b.tabIndex),b.isDisabled=!1,b.unlock()},destroy:function(){var b=this,C=b.eventNS,O=b.revertSettings;b.trigger("destroy"),b.off(),b.$wrapper.remove(),b.$dropdown.remove(),b.$input.html("").append(O.$children).removeAttr("tabindex").removeClass("selectized").attr({tabindex:O.tabindex}).show(),b.$control_input.removeData("grow"),b.$input.removeData("selectize"),--xe.count==0&&xe.$testInput&&(xe.$testInput.remove(),xe.$testInput=void 0),n(window).off(C),n(document).off(C),n(document.body).off(C),delete b.$input[0].selectize},render:function(b,C){var O,U,K,Y="",ee=!1,ge=this,be=/^[\t \r\n]*<([a-z][a-z0-9\-_]*(?:\:[a-z][a-z0-9\-_]*)?)/i;return(b==="option"||b==="item")&&(O=ae(C[ge.settings.valueField]),ee=!!O),ee&&(Z(ge.renderCache[b])||(ge.renderCache[b]={}),ge.renderCache[b].hasOwnProperty(O))?ge.renderCache[b][O]:(Y=n(ge.settings.render[b].apply(this,[C,Ce])),b==="option"||b==="option_create"?C[ge.settings.disabledField]||Y.attr("data-selectable",""):b==="optgroup"&&(U=C[ge.settings.optgroupValueField]||"",Y.attr("data-group",U),C[ge.settings.disabledField]&&Y.attr("data-disabled","")),(b==="option"||b==="item")&&Y.attr("data-value",O||""),ee&&(ge.renderCache[b][O]=Y[0]),Y[0])},clearCache:function(b){var C=this;typeof b>"u"?C.renderCache={}:delete C.renderCache[b]},canCreate:function(b){var C=this;if(!C.settings.create)return!1;var O=C.settings.createFilter;return b.length&&(typeof O!="function"||O.apply(C,[b]))&&(typeof O!="string"||new RegExp(O).test(b))&&(!(O instanceof RegExp)||O.test(b))}}),xe.count=0,xe.defaults={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:!1,showAddOptionOnCreate:!0,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,maxOptions:1e3,maxItems:null,hideSelected:null,addPrecedence:!1,selectOnTab:!0,preload:!1,allowEmptyOption:!1,showEmptyOptionInDropdown:!1,emptyOptionLabel:"--",closeAfterSelect:!1,scrollDuration:60,deselectBehavior:"previous",loadThrottle:300,loadingClass:"loading",dataAttr:"data-data",optgroupField:"optgroup",valueField:"value",labelField:"text",disabledField:"disabled",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"selectize-control",inputClass:"selectize-input",dropdownClass:"selectize-dropdown",dropdownContentClass:"selectize-dropdown-content",dropdownParent:null,copyClassesToDropdown:!0,render:{}},n.fn.selectize=function(b){var C=n.fn.selectize.defaults,O=n.extend({},C,b),U=O.dataAttr,K=O.labelField,Y=O.valueField,ee=O.disabledField,ge=O.optgroupField,be=O.optgroupLabelField,ue=O.optgroupValueField,Se=function(nt,rt){var ut,_t,vt,ke,kt=nt.attr(U);if(kt)for(rt.options=JSON.parse(kt),ut=0,_t=rt.options.length;ut<_t;ut++)rt.items.push(rt.options[ut][Y]);else{var Ke=n.trim(nt.val()||"");if(!O.allowEmptyOption&&!Ke.length)return;for(vt=Ke.split(O.delimiter),ut=0,_t=vt.length;ut<_t;ut++)ke={},ke[K]=vt[ut],ke[Y]=vt[ut],rt.options.push(ke);rt.items=vt}},bt=function(nt,rt){var ut,_t,vt,ke,kt=0,Ke=rt.options,zt={},an=function(Pt){var Ot=U&&Pt.attr(U);return typeof Ot=="string"&&Ot.length?JSON.parse(Ot):null},dn=function(Pt,Ot){Pt=n(Pt);var Lt=ae(Pt.val());if(!(!Lt&&!O.allowEmptyOption)){if(zt.hasOwnProperty(Lt)){if(Ot){var ln=zt[Lt][ge];ln?n.isArray(ln)?ln.push(Ot):zt[Lt][ge]=[ln,Ot]:zt[Lt][ge]=Ot}return}var Ft=an(Pt)||{};Ft[K]=Ft[K]||Pt.text(),Ft[Y]=Ft[Y]||Lt,Ft[ee]=Ft[ee]||Pt.prop("disabled"),Ft[ge]=Ft[ge]||Ot,zt[Lt]=Ft,Ke.push(Ft),Pt.is(":selected")&&rt.items.push(Lt)}},Qn=function(Pt){var Ot,Lt,ln,Ft,dt;for(Pt=n(Pt),ln=Pt.attr("label"),ln&&(Ft=an(Pt)||{},Ft[be]=ln,Ft[ue]=ln,Ft[ee]=Pt.prop("disabled"),rt.optgroups.push(Ft)),dt=n("option",Pt),Ot=0,Lt=dt.length;Ot<Lt;Ot++)dn(dt[Ot],ln)};for(rt.maxItems=nt.attr("multiple")?null:1,ke=nt.children(),ut=0,_t=ke.length;ut<_t;ut++)vt=ke[ut].tagName.toLowerCase(),vt==="optgroup"?Qn(ke[ut]):vt==="option"&&dn(ke[ut])};return this.each(function(){if(!this.selectize){var nt,rt=n(this),ut=this.tagName.toLowerCase(),_t=rt.attr("placeholder")||rt.attr("data-placeholder");if(!_t&&!O.allowEmptyOption&&(_t=rt.children('option[value=""]').text()),O.allowEmptyOption&&O.showEmptyOptionInDropdown&&!rt.children('option[value=""]').length){var vt=rt.html();rt.html('<option value="">'+O.emptyOptionLabel+"</option>"+vt)}var ke={placeholder:_t,options:[],optgroups:[],items:[]};ut==="select"?bt(rt,ke):Se(rt,ke),nt=new xe(rt,n.extend(!0,{},C,ke,b)),nt.settings_user=b}})},n.fn.selectize.defaults=xe.defaults,n.fn.selectize.support={validity:q},xe.define("auto_position",function(){var b=this;let C={top:"top",bottom:"bottom"};b.positionDropdown=function(){return function(){let O=this.$control,U=this.settings.dropdownParent==="body"?O.offset():O.position();U.top+=O.outerHeight(!0);let K=this.$dropdown.prop("scrollHeight")+5,Y=this.$control.get(0).getBoundingClientRect().top,ee=this.$wrapper.height(),ge=Y+K+ee>window.innerHeight?C.top:C.bottom,be={width:O.outerWidth(),left:U.left};ge===C.top?(Object.assign(be,{bottom:U.top,top:"unset",margin:"0 0 5px 0"}),this.$dropdown.addClass("selectize-position-top")):(Object.assign(be,{top:U.top,bottom:"unset",margin:"5px 0 0 0"}),this.$dropdown.removeClass("selectize-position-top")),this.$dropdown.css(be)}}()}),xe.define("auto_select_on_type",function(b){var C=this;C.onBlur=function(){var O=C.onBlur;return function(U){var K=C.getFirstItemMatchedByTextContent(C.lastValue,!0);return typeof K.attr("data-value")<"u"&&C.getValue()!==K.attr("data-value")&&C.setValue(K.attr("data-value")),O.apply(this,arguments)}}()}),xe.define("autofill_disable",function(b){var C=this;C.setup=function(){var O=C.setup;return function(){O.apply(C,arguments),C.$control_input.attr({autocomplete:"new-password",autofill:"no"})}}()}),xe.define("drag_drop",function(b){if(!n.fn.sortable)throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".');if(this.settings.mode==="multi"){var C=this;C.lock=function(){var O=C.lock;return function(){var U=C.$control.data("sortable");return U&&U.disable(),O.apply(C,arguments)}}(),C.unlock=function(){var O=C.unlock;return function(){var U=C.$control.data("sortable");return U&&U.enable(),O.apply(C,arguments)}}(),C.setup=function(){var O=C.setup;return function(){O.apply(this,arguments);var U=C.$control.sortable({items:"[data-value]",forcePlaceholderSize:!0,disabled:C.isLocked,start:function(K,Y){Y.placeholder.css("width",Y.helper.css("width")),U.addClass("dragging")},stop:function(){U.removeClass("dragging");var K=C.$activeItems?C.$activeItems.slice():null,Y=[];U.children("[data-value]").each(function(){Y.push(n(this).attr("data-value"))}),C.isFocused=!1,C.setValue(Y),C.isFocused=!0,C.setActiveItem(K),C.positionDropdown()}})}}()}}),xe.define("dropdown_header",function(b){var C=this;b=n.extend({title:"Untitled",headerClass:"selectize-dropdown-header",titleRowClass:"selectize-dropdown-header-title",labelClass:"selectize-dropdown-header-label",closeClass:"selectize-dropdown-header-close",html:function(O){return'<div class="'+O.headerClass+'"><div class="'+O.titleRowClass+'"><span class="'+O.labelClass+'">'+O.title+'</span><a href="javascript:void(0)" class="'+O.closeClass+'">&#xd7;</a></div></div>'}},b),C.setup=function(){var O=C.setup;return function(){O.apply(C,arguments),C.$dropdown_header=n(b.html(b)),C.$dropdown.prepend(C.$dropdown_header)}}()}),xe.define("optgroup_columns",function(b){var C=this;b=n.extend({equalizeWidth:!0,equalizeHeight:!0},b),this.getAdjacentOption=function(K,Y){var ee=K.closest("[data-group]").find("[data-selectable]"),ge=ee.index(K)+Y;return ge>=0&&ge<ee.length?ee.eq(ge):n()},this.onKeyDown=function(){var K=C.onKeyDown;return function(Y){var ee,ge,be,ue;if(this.isOpen&&(Y.keyCode===p||Y.keyCode===_)){C.ignoreHover=!0,ue=this.$activeOption.closest("[data-group]"),ee=ue.find("[data-selectable]").index(this.$activeOption),Y.keyCode===p?ue=ue.prev("[data-group]"):ue=ue.next("[data-group]"),be=ue.find("[data-selectable]"),ge=be.eq(Math.min(be.length-1,ee)),ge.length&&this.setActiveOption(ge);return}return K.apply(this,arguments)}}();var O=function(){var K,Y=O.width,ee=document;return typeof Y>"u"&&(K=ee.createElement("div"),K.innerHTML='<div style="width:50px;height:50px;position:absolute;left:-50px;top:-50px;overflow:auto;"><div style="width:1px;height:100px;"></div></div>',K=K.firstChild,ee.body.appendChild(K),Y=O.width=K.offsetWidth-K.clientWidth,ee.body.removeChild(K)),Y},U=function(){var K,Y,ee,ge,be,ue,Se;if(Se=n("[data-group]",C.$dropdown_content),Y=Se.length,!(!Y||!C.$dropdown_content.width())){if(b.equalizeHeight){for(ee=0,K=0;K<Y;K++)ee=Math.max(ee,Se.eq(K).height());Se.css({height:ee})}b.equalizeWidth&&(ue=C.$dropdown_content.innerWidth()-O(),ge=Math.round(ue/Y),Se.css({width:ge}),Y>1&&(be=ue-ge*(Y-1),Se.eq(Y-1).css({width:be})))}};(b.equalizeHeight||b.equalizeWidth)&&(_e.after(this,"positionDropdown",U),_e.after(this,"refreshOptions",U))}),xe.define("remove_button",function(b){b=n.extend({label:"&#xd7;",title:"Remove",className:"remove",append:!0},b);var C=function(U,K){K.className="remove-single";var Y=U,ee='<a href="javascript:void(0)" class="'+K.className+'" tabindex="-1" title="'+Ce(K.title)+'">'+K.label+"</a>",ge=function(be,ue){return n("<span>").append(be).append(ue)};U.setup=function(){var be=Y.setup;return function(){if(K.append){var ue=n(Y.$input.context).attr("id"),Se=n("#"+ue),bt=Y.settings.render.item;Y.settings.render.item=function(nt){return ge(bt.apply(U,arguments),ee)}}be.apply(U,arguments),U.$control.on("click","."+K.className,function(nt){nt.preventDefault(),!Y.isLocked&&Y.clear()})}}()},O=function(U,K){var Y=U,ee='<a href="javascript:void(0)" class="'+K.className+'" tabindex="-1" title="'+Ce(K.title)+'">'+K.label+"</a>",ge=function(be,ue){var Se=be.search(/(<\/[^>]+>\s*)$/);return be.substring(0,Se)+ue+be.substring(Se)};U.setup=function(){var be=Y.setup;return function(){if(K.append){var ue=Y.settings.render.item;Y.settings.render.item=function(Se){return ge(ue.apply(U,arguments),ee)}}be.apply(U,arguments),U.$control.on("click","."+K.className,function(Se){if(Se.preventDefault(),!Y.isLocked){var bt=n(Se.currentTarget).parent();return Y.setActiveItem(bt),Y.deleteSelection()&&Y.setCaret(Y.items.length),!1}})}}()};if(this.settings.mode==="single"){C(this,b);return}else O(this,b)}),xe.define("restore_on_backspace",function(b){var C=this;b.text=b.text||function(O){return O[this.settings.labelField]},this.onKeyDown=function(){var O=C.onKeyDown;return function(U){var K,Y;if(U.keyCode===D&&this.$control_input.val()===""&&!this.$activeItems.length&&(K=this.caretPos-1,K>=0&&K<this.items.length)){Y=this.options[this.items[K]],this.deleteSelection(U)&&(this.setTextboxValue(b.text.apply(this,[Y])),this.refreshOptions(!0)),U.preventDefault();return}return O.apply(this,arguments)}}()}),xe.define("select_on_focus",function(b){var C=this;C.on("focus",function(){var O=C.onFocus;return function(U){var K=C.getItem(C.getValue()).text();return C.clear(),C.setTextboxValue(K),C.$control_input.select(),setTimeout(function(){C.settings.selectOnTab&&C.setActiveOption(C.getFirstItemMatchedByTextContent(K)),C.settings.score=null},0),O.apply(this,arguments)}}()),C.onBlur=function(){var O=C.onBlur;return function(U){return C.getValue()===""&&C.lastValidValue!==C.getValue()&&C.setValue(C.lastValidValue),setTimeout(function(){C.settings.score=function(){return function(){return 1}}},0),O.apply(this,arguments)}}(),C.settings.score=function(){return function(){return 1}}}),xe.define("tag_limit",function(b){let C=this;b.tagLimit=b.tagLimit,this.onBlur=function(O){let U=C.onBlur;return function(K){if(U.apply(this,K),!K)return;let Y=this.$control,ee=Y.find(".item"),ge=b.tagLimit;ge===void 0||ee.length<=ge||(ee.toArray().forEach(function(be,ue){ue<ge||n(be).hide()}),Y.append("<span><b>"+(ee.length-ge)+"</b></span>"))}}(),this.onFocus=function(O){let U=C.onFocus;return function(K){if(U.apply(this,K),!K)return;let Y=this.$control;Y.find(".item").show(),Y.find("span").remove()}}()}),xe})});var p_=Fe((f_,h_)=>{(function(n){typeof define=="function"&&define.amd?define(["jquery"],n):typeof f_=="object"?h_.exports=n(Rc()):n(jQuery)})(function(n){n(document).ready(function(){n("body").append("<div id=snackbar-container/>")});function e(r){return typeof r<"u"&&r!==null}var t={events:{},on:function(r,i){this.events[r]=this.events[r]||[],this.events[r].push(i)},off:function(r){this.events[r]&&delete this.events[r]},emit:function(r,i){this.events[r]&&this.events[r].forEach(function(s){s(i)})}};n(document).on("click","[data-toggle=snackbar]",function(){n(this).snackbar("toggle")}).on("click","#snackbar-container .snackbar",function(){n(this).snackbar("hide")}),n.snackbar=function(r){if(e(r)&&r===Object(r)){var i,s=!1;e(r.id)?n("#"+r.id).length?i=n("#"+r.id):(i=n("<div/>").attr("id",""+r.id).attr("class","snackbar"),s=!0):(r.id="snackbar"+Date.now(),i=n("<div/>").attr("id",r.id).attr("class","snackbar"),s=!0);var o=i.hasClass("snackbar-opened");e(r.style)?(o?i.attr("class","snackbar snackbar-opened "+r.style):i.attr("class","snackbar "+r.style),i.attr("data-style",r.style)):o?i.attr("class","snackbar snackbar-opened"):i.attr("class","snackbar"),r.htmlAllowed=e(r.htmlAllowed)?r.htmlAllowed:!1,r.timeout=e(r.timeout)?r.timeout:3e3,i.attr("data-timeout",r.timeout),r.content=r.htmlAllowed?r.content:n("<p>"+r.content+"</p>").text(),e(r.onClose)&&t.on(r.id,r.onClose),e(r.htmlAllowed)&&i.attr("data-html-allowed",r.htmlAllowed),e(r.content)&&(i.find(".snackbar-content").length?i.find(".snackbar-content").html(r.content):i.prepend("<span class=snackbar-content>"+r.content+"</span>"),i.attr("data-content",r.content)),s?i.appendTo("#snackbar-container"):i.insertAfter("#snackbar-container .snackbar:last-child"),e(r.action)&&r.action=="toggle"&&(o?r.action="hide":r.action="show");var a=Date.now();i.data("animationId1",a),setTimeout(function(){i.data("animationId1")===a&&(!e(r.action)||r.action=="show"?i.addClass("snackbar-opened"):e(r.action)&&r.action=="hide"&&(i.removeClass("snackbar-opened"),t.emit(r.id),t.off(r.id)))},50);var c=Date.now();return i.data("animationId2",c),r.timeout!==0&&setTimeout(function(){i.data("animationId2")===c&&(i.removeClass("snackbar-opened"),t.emit(r.id),t.off(r.id))},r.timeout),i}else return!1},n.fn.snackbar=function(r){if(!(typeof r>"u")){var i={};if(this.hasClass("snackbar"))return i={id:this.attr("id"),content:n(this).attr("data-content"),style:n(this).attr("data-style"),timeout:parseInt(n(this).attr("data-timeout")),htmlAllowed:n(this).attr("data-html-allowed")},(r==="show"||r==="hide"||r=="toggle")&&(i.action=r),n.snackbar(i);(!e(r)||r==="show"||r==="hide"||r=="toggle")&&(i={content:n(this).attr("data-content"),style:n(this).attr("data-style"),timeout:n(this).attr("data-timeout"),htmlAllowed:n(this).attr("data-html-allowed")}),e(r)&&(i.id=this.attr("data-snackbar-id"),(r==="show"||r==="hide"||r=="toggle")&&(i.action=r));var s=n.snackbar(i);return this.attr("data-snackbar-id",s.attr("id")),s}}})});var I_=Fe((vu,O_)=>{(function(n,e){typeof vu=="object"&&typeof O_<"u"?e(vu):typeof define=="function"&&define.amd?define(["exports"],e):e(n.WHATWGFetch={})})(vu,function(n){"use strict";var e=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof e<"u"&&e,t={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};function r(q){return q&&DataView.prototype.isPrototypeOf(q)}if(t.arrayBuffer)var i=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=ArrayBuffer.isView||function(q){return q&&i.indexOf(Object.prototype.toString.call(q))>-1};function o(q){if(typeof q!="string"&&(q=String(q)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(q)||q==="")throw new TypeError('Invalid character in header field name: "'+q+'"');return q.toLowerCase()}function a(q){return typeof q!="string"&&(q=String(q)),q}function c(q){var Z={next:function(){var ae=q.shift();return{done:ae===void 0,value:ae}}};return t.iterable&&(Z[Symbol.iterator]=function(){return Z}),Z}function u(q){this.map={},q instanceof u?q.forEach(function(Z,ae){this.append(ae,Z)},this):Array.isArray(q)?q.forEach(function(Z){this.append(Z[0],Z[1])},this):q&&Object.getOwnPropertyNames(q).forEach(function(Z){this.append(Z,q[Z])},this)}u.prototype.append=function(q,Z){q=o(q),Z=a(Z);var ae=this.map[q];this.map[q]=ae?ae+", "+Z:Z},u.prototype.delete=function(q){delete this.map[o(q)]},u.prototype.get=function(q){return q=o(q),this.has(q)?this.map[q]:null},u.prototype.has=function(q){return this.map.hasOwnProperty(o(q))},u.prototype.set=function(q,Z){this.map[o(q)]=a(Z)},u.prototype.forEach=function(q,Z){for(var ae in this.map)this.map.hasOwnProperty(ae)&&q.call(Z,this.map[ae],ae,this)},u.prototype.keys=function(){var q=[];return this.forEach(function(Z,ae){q.push(ae)}),c(q)},u.prototype.values=function(){var q=[];return this.forEach(function(Z){q.push(Z)}),c(q)},u.prototype.entries=function(){var q=[];return this.forEach(function(Z,ae){q.push([ae,Z])}),c(q)},t.iterable&&(u.prototype[Symbol.iterator]=u.prototype.entries);function f(q){if(q.bodyUsed)return Promise.reject(new TypeError("Already read"));q.bodyUsed=!0}function p(q){return new Promise(function(Z,ae){q.onload=function(){Z(q.result)},q.onerror=function(){ae(q.error)}})}function h(q){var Z=new FileReader,ae=p(Z);return Z.readAsArrayBuffer(q),ae}function y(q){var Z=new FileReader,ae=p(Z);return Z.readAsText(q),ae}function _(q){for(var Z=new Uint8Array(q),ae=new Array(Z.length),Ce=0;Ce<Z.length;Ce++)ae[Ce]=String.fromCharCode(Z[Ce]);return ae.join("")}function w(q){if(q.slice)return q.slice(0);var Z=new Uint8Array(q.byteLength);return Z.set(new Uint8Array(q)),Z.buffer}function E(){return this.bodyUsed=!1,this._initBody=function(q){this.bodyUsed=this.bodyUsed,this._bodyInit=q,q?typeof q=="string"?this._bodyText=q:t.blob&&Blob.prototype.isPrototypeOf(q)?this._bodyBlob=q:t.formData&&FormData.prototype.isPrototypeOf(q)?this._bodyFormData=q:t.searchParams&&URLSearchParams.prototype.isPrototypeOf(q)?this._bodyText=q.toString():t.arrayBuffer&&t.blob&&r(q)?(this._bodyArrayBuffer=w(q.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):t.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(q)||s(q))?this._bodyArrayBuffer=w(q):this._bodyText=q=Object.prototype.toString.call(q):this._bodyText="",this.headers.get("content-type")||(typeof q=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):t.searchParams&&URLSearchParams.prototype.isPrototypeOf(q)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},t.blob&&(this.blob=function(){var q=f(this);if(q)return q;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var q=f(this);return q||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else return this.blob().then(h)}),this.text=function(){var q=f(this);if(q)return q;if(this._bodyBlob)return y(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(_(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},t.formData&&(this.formData=function(){return this.text().then(F)}),this.json=function(){return this.text().then(JSON.parse)},this}var D=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function R(q){var Z=q.toUpperCase();return D.indexOf(Z)>-1?Z:q}function H(q,Z){if(!(this instanceof H))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');Z=Z||{};var ae=Z.body;if(q instanceof H){if(q.bodyUsed)throw new TypeError("Already read");this.url=q.url,this.credentials=q.credentials,Z.headers||(this.headers=new u(q.headers)),this.method=q.method,this.mode=q.mode,this.signal=q.signal,!ae&&q._bodyInit!=null&&(ae=q._bodyInit,q.bodyUsed=!0)}else this.url=String(q);if(this.credentials=Z.credentials||this.credentials||"same-origin",(Z.headers||!this.headers)&&(this.headers=new u(Z.headers)),this.method=R(Z.method||this.method||"GET"),this.mode=Z.mode||this.mode||null,this.signal=Z.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&ae)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(ae),(this.method==="GET"||this.method==="HEAD")&&(Z.cache==="no-store"||Z.cache==="no-cache")){var Ce=/([?&])_=[^&]*/;if(Ce.test(this.url))this.url=this.url.replace(Ce,"$1_="+new Date().getTime());else{var Ae=/\?/;this.url+=(Ae.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}H.prototype.clone=function(){return new H(this,{body:this._bodyInit})};function F(q){var Z=new FormData;return q.trim().split("&").forEach(function(ae){if(ae){var Ce=ae.split("="),Ae=Ce.shift().replace(/\+/g," "),_e=Ce.join("=").replace(/\+/g," ");Z.append(decodeURIComponent(Ae),decodeURIComponent(_e))}}),Z}function m(q){var Z=new u,ae=q.replace(/\r?\n[\t ]+/g," ");return ae.split("\r").map(function(Ce){return Ce.indexOf(`
`)===0?Ce.substr(1,Ce.length):Ce}).forEach(function(Ce){var Ae=Ce.split(":"),_e=Ae.shift().trim();if(_e){var Le=Ae.join(":").trim();Z.append(_e,Le)}}),Z}E.call(H.prototype);function Q(q,Z){if(!(this instanceof Q))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');Z||(Z={}),this.type="default",this.status=Z.status===void 0?200:Z.status,this.ok=this.status>=200&&this.status<300,this.statusText=Z.statusText===void 0?"":""+Z.statusText,this.headers=new u(Z.headers),this.url=Z.url||"",this._initBody(q)}E.call(Q.prototype),Q.prototype.clone=function(){return new Q(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new u(this.headers),url:this.url})},Q.error=function(){var q=new Q(null,{status:0,statusText:""});return q.type="error",q};var le=[301,302,303,307,308];Q.redirect=function(q,Z){if(le.indexOf(Z)===-1)throw new RangeError("Invalid status code");return new Q(null,{status:Z,headers:{location:q}})},n.DOMException=e.DOMException;try{new n.DOMException}catch{n.DOMException=function(Z,ae){this.message=Z,this.name=ae;var Ce=Error(Z);this.stack=Ce.stack},n.DOMException.prototype=Object.create(Error.prototype),n.DOMException.prototype.constructor=n.DOMException}function J(q,Z){return new Promise(function(ae,Ce){var Ae=new H(q,Z);if(Ae.signal&&Ae.signal.aborted)return Ce(new n.DOMException("Aborted","AbortError"));var _e=new XMLHttpRequest;function Le(){_e.abort()}_e.onload=function(){var $e={status:_e.status,statusText:_e.statusText,headers:m(_e.getAllResponseHeaders()||"")};$e.url="responseURL"in _e?_e.responseURL:$e.headers.get("X-Request-URL");var pe="response"in _e?_e.response:_e.responseText;setTimeout(function(){ae(new Q(pe,$e))},0)},_e.onerror=function(){setTimeout(function(){Ce(new TypeError("Network request failed"))},0)},_e.ontimeout=function(){setTimeout(function(){Ce(new TypeError("Network request failed"))},0)},_e.onabort=function(){setTimeout(function(){Ce(new n.DOMException("Aborted","AbortError"))},0)};function Ve($e){try{return $e===""&&e.location.href?e.location.href:$e}catch{return $e}}_e.open(Ae.method,Ve(Ae.url),!0),Ae.credentials==="include"?_e.withCredentials=!0:Ae.credentials==="omit"&&(_e.withCredentials=!1),"responseType"in _e&&(t.blob?_e.responseType="blob":t.arrayBuffer&&Ae.headers.get("Content-Type")&&Ae.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(_e.responseType="arraybuffer")),Z&&typeof Z.headers=="object"&&!(Z.headers instanceof u)?Object.getOwnPropertyNames(Z.headers).forEach(function($e){_e.setRequestHeader($e,a(Z.headers[$e]))}):Ae.headers.forEach(function($e,pe){_e.setRequestHeader(pe,$e)}),Ae.signal&&(Ae.signal.addEventListener("abort",Le),_e.onreadystatechange=function(){_e.readyState===4&&Ae.signal.removeEventListener("abort",Le)}),_e.send(typeof Ae._bodyInit>"u"?null:Ae._bodyInit)})}J.polyfill=!0,e.fetch||(e.fetch=J,e.Headers=u,e.Request=H,e.Response=Q),n.Headers=u,n.Request=H,n.Response=Q,n.fetch=J,Object.defineProperty(n,"__esModule",{value:!0})})});var R_=Fe((yz,k_)=>{I_();k_.exports=self.fetch.bind(self)});var Eu=Fe((Tz,M_)=>{function $R(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}M_.exports=$R});var P_=Fe((Cz,N_)=>{var zR=typeof window=="object"&&window&&window.Object===Object&&window;N_.exports=zR});var Yp=Fe((Az,L_)=>{var WR=P_(),UR=typeof self=="object"&&self&&self.Object===Object&&self,YR=WR||UR||Function("return this")();L_.exports=YR});var B_=Fe((Dz,F_)=>{var GR=Yp(),KR=function(){return GR.Date.now()};F_.exports=KR});var H_=Fe((xz,j_)=>{var QR=/\s/;function XR(n){for(var e=n.length;e--&&QR.test(n.charAt(e)););return e}j_.exports=XR});var V_=Fe((Oz,q_)=>{var ZR=H_(),JR=/^\s+/;function eM(n){return n&&n.slice(0,ZR(n)+1).replace(JR,"")}q_.exports=eM});var Gp=Fe((Iz,$_)=>{var tM=Yp(),nM=tM.Symbol;$_.exports=nM});var Y_=Fe((kz,U_)=>{var z_=Gp(),W_=Object.prototype,rM=W_.hasOwnProperty,iM=W_.toString,Ya=z_?z_.toStringTag:void 0;function sM(n){var e=rM.call(n,Ya),t=n[Ya];try{n[Ya]=void 0;var r=!0}catch{}var i=iM.call(n);return r&&(e?n[Ya]=t:delete n[Ya]),i}U_.exports=sM});var K_=Fe((Rz,G_)=>{var oM=Object.prototype,aM=oM.toString;function lM(n){return aM.call(n)}G_.exports=lM});var J_=Fe((Mz,Z_)=>{var Q_=Gp(),cM=Y_(),uM=K_(),dM="[object Null]",fM="[object Undefined]",X_=Q_?Q_.toStringTag:void 0;function hM(n){return n==null?n===void 0?fM:dM:X_&&X_ in Object(n)?cM(n):uM(n)}Z_.exports=hM});var tw=Fe((Nz,ew)=>{function pM(n){return n!=null&&typeof n=="object"}ew.exports=pM});var rw=Fe((Pz,nw)=>{var gM=J_(),mM=tw(),vM="[object Symbol]";function yM(n){return typeof n=="symbol"||mM(n)&&gM(n)==vM}nw.exports=yM});var aw=Fe((Lz,ow)=>{var bM=V_(),iw=Eu(),EM=rw(),sw=0/0,_M=/^[-+]0x[0-9a-f]+$/i,wM=/^0b[01]+$/i,SM=/^0o[0-7]+$/i,TM=parseInt;function CM(n){if(typeof n=="number")return n;if(EM(n))return sw;if(iw(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=iw(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=bM(n);var t=wM.test(n);return t||SM.test(n)?TM(n.slice(2),t?2:8):_M.test(n)?sw:+n}ow.exports=CM});var Po=Fe((Fz,cw)=>{var AM=Eu(),Kp=B_(),lw=aw(),DM="Expected a function",xM=Math.max,OM=Math.min;function IM(n,e,t){var r,i,s,o,a,c,u=0,f=!1,p=!1,h=!0;if(typeof n!="function")throw new TypeError(DM);e=lw(e)||0,AM(t)&&(f=!!t.leading,p="maxWait"in t,s=p?xM(lw(t.maxWait)||0,e):s,h="trailing"in t?!!t.trailing:h);function y(Q){var le=r,J=i;return r=i=void 0,u=Q,o=n.apply(J,le),o}function _(Q){return u=Q,a=setTimeout(D,e),f?y(Q):o}function w(Q){var le=Q-c,J=Q-u,q=e-le;return p?OM(q,s-J):q}function E(Q){var le=Q-c,J=Q-u;return c===void 0||le>=e||le<0||p&&J>=s}function D(){var Q=Kp();if(E(Q))return R(Q);a=setTimeout(D,w(Q))}function R(Q){return a=void 0,h&&r?y(Q):(r=i=void 0,o)}function H(){a!==void 0&&clearTimeout(a),u=0,r=c=i=a=void 0}function F(){return a===void 0?o:R(Kp())}function m(){var Q=Kp(),le=E(Q);if(r=arguments,i=this,c=Q,le){if(a===void 0)return _(c);if(p)return clearTimeout(a),a=setTimeout(D,e),y(c)}return a===void 0&&(a=setTimeout(D,e)),o}return m.cancel=H,m.flush=F,m}cw.exports=IM});var dw=Fe((Bz,uw)=>{var kM=Po(),RM=Eu(),MM="Expected a function";function NM(n,e,t){var r=!0,i=!0;if(typeof n!="function")throw new TypeError(MM);return RM(t)&&(r="leading"in t?!!t.leading:r,i="trailing"in t?!!t.trailing:i),kM(n,e,{leading:r,maxWait:e,trailing:i})}uw.exports=NM});var kw=Fe((Lg,Fg)=>{(function(n,e){typeof Lg=="object"&&typeof Fg<"u"?Fg.exports=e():typeof define=="function"&&define.amd?define(e):(n=typeof globalThis<"u"?globalThis:n||self,n.monthSelectPlugin=e())})(Lg,function(){"use strict";var n=function(){return n=Object.assign||function(a){for(var c,u=1,f=arguments.length;u<f;u++){c=arguments[u];for(var p in c)Object.prototype.hasOwnProperty.call(c,p)&&(a[p]=c[p])}return a},n.apply(this,arguments)},e=function(o,a,c){return c.months[a?"shorthand":"longhand"][o]};function t(o){for(;o.firstChild;)o.removeChild(o.firstChild)}function r(o){try{if(typeof o.composedPath=="function"){var a=o.composedPath();return a[0]}return o.target}catch{return o.target}}var i={shorthand:!1,dateFormat:"F Y",altFormat:"F Y",theme:"light"};function s(o){var a=n(n({},i),o);return function(c){c.config.dateFormat=a.dateFormat,c.config.altFormat=a.altFormat;var u={monthsContainer:null};function f(){if(c.rContainer){t(c.rContainer);for(var J=0;J<c.monthElements.length;J++){var q=c.monthElements[J];q.parentNode&&q.parentNode.removeChild(q)}}}function p(){c.rContainer&&(u.monthsContainer=c._createElement("div","flatpickr-monthSelect-months"),u.monthsContainer.tabIndex=-1,h(),c.rContainer.appendChild(u.monthsContainer),c.calendarContainer.classList.add("flatpickr-monthSelect-theme-"+a.theme))}function h(){if(u.monthsContainer){t(u.monthsContainer);for(var J=document.createDocumentFragment(),q=0;q<12;q++){var Z=c.createDay("flatpickr-monthSelect-month",new Date(c.currentYear,q),0,q);Z.dateObj.getMonth()===new Date().getMonth()&&Z.dateObj.getFullYear()===new Date().getFullYear()&&Z.classList.add("today"),Z.textContent=e(q,a.shorthand,c.l10n),Z.addEventListener("click",E),J.appendChild(Z)}u.monthsContainer.appendChild(J),c.config.minDate&&c.currentYear===c.config.minDate.getFullYear()?c.prevMonthNav.classList.add("flatpickr-disabled"):c.prevMonthNav.classList.remove("flatpickr-disabled"),c.config.maxDate&&c.currentYear===c.config.maxDate.getFullYear()?c.nextMonthNav.classList.add("flatpickr-disabled"):c.nextMonthNav.classList.remove("flatpickr-disabled")}}function y(){c._bind(c.prevMonthNav,"click",function(J){J.preventDefault(),J.stopPropagation(),c.changeYear(c.currentYear-1),w(),h()}),c._bind(c.nextMonthNav,"click",function(J){J.preventDefault(),J.stopPropagation(),c.changeYear(c.currentYear+1),w(),h()}),c._bind(u.monthsContainer,"mouseover",function(J){c.config.mode==="range"&&c.onMouseOver(r(J),"flatpickr-monthSelect-month")})}function _(){if(c.rContainer&&c.selectedDates.length){for(var J=c.rContainer.querySelectorAll(".flatpickr-monthSelect-month.selected"),q=0;q<J.length;q++)J[q].classList.remove("selected");var Z=c.selectedDates[0].getMonth(),ae=c.rContainer.querySelector(".flatpickr-monthSelect-month:nth-child("+(Z+1)+")");ae&&ae.classList.add("selected")}}function w(){var J=c.selectedDates[0];if(J&&(J=new Date(J),J.setFullYear(c.currentYear),c.config.minDate&&J<c.config.minDate&&(J=c.config.minDate),c.config.maxDate&&J>c.config.maxDate&&(J=c.config.maxDate),c.currentYear=J.getFullYear()),c.currentYearElement.value=String(c.currentYear),c.rContainer){var q=c.rContainer.querySelectorAll(".flatpickr-monthSelect-month");q.forEach(function(Z){Z.dateObj.setFullYear(c.currentYear),c.config.minDate&&Z.dateObj<c.config.minDate||c.config.maxDate&&Z.dateObj>c.config.maxDate?Z.classList.add("flatpickr-disabled"):Z.classList.remove("flatpickr-disabled")})}_()}function E(J){J.preventDefault(),J.stopPropagation();var q=r(J);if(q instanceof Element&&!q.classList.contains("flatpickr-disabled")&&!q.classList.contains("notAllowed")&&(D(q.dateObj),c.config.closeOnSelect)){var Z=c.config.mode==="single",ae=c.config.mode==="range"&&c.selectedDates.length===2;(Z||ae)&&c.close()}}function D(J){var q=new Date(c.currentYear,J.getMonth(),J.getDate()),Z=[];switch(c.config.mode){case"single":Z=[q];break;case"multiple":Z.push(q);break;case"range":c.selectedDates.length===2?Z=[q]:(Z=c.selectedDates.concat([q]),Z.sort(function(ae,Ce){return ae.getTime()-Ce.getTime()}));break}c.setDate(Z,!0),_()}var R={37:-1,39:1,40:3,38:-3};function H(J,q,Z,ae){var Ce=R[ae.keyCode]!==void 0;if(!(!Ce&&ae.keyCode!==13)&&!(!c.rContainer||!u.monthsContainer)){var Ae=c.rContainer.querySelector(".flatpickr-monthSelect-month.selected"),_e=Array.prototype.indexOf.call(u.monthsContainer.children,document.activeElement);if(_e===-1){var Le=Ae||u.monthsContainer.firstElementChild;Le.focus(),_e=Le.$i}Ce?u.monthsContainer.children[(12+_e+R[ae.keyCode])%12].focus():ae.keyCode===13&&u.monthsContainer.contains(document.activeElement)&&D(document.activeElement.dateObj)}}function F(){var J;((J=c.config)===null||J===void 0?void 0:J.mode)==="range"&&c.selectedDates.length===1&&c.clear(!1),c.selectedDates.length||h()}function m(){a._stubbedCurrentMonth=c._initialDate.getMonth(),c._initialDate.setMonth(a._stubbedCurrentMonth),c.currentMonth=a._stubbedCurrentMonth}function Q(){a._stubbedCurrentMonth&&(c._initialDate.setMonth(a._stubbedCurrentMonth),c.currentMonth=a._stubbedCurrentMonth,delete a._stubbedCurrentMonth)}function le(){if(u.monthsContainer!==null)for(var J=u.monthsContainer.querySelectorAll(".flatpickr-monthSelect-month"),q=0;q<J.length;q++)J[q].removeEventListener("click",E)}return{onParseConfig:function(){c.config.enableTime=!1},onValueUpdate:_,onKeyDown:H,onReady:[m,f,p,y,_,function(){c.config.onClose.push(F),c.loadedPlugins.push("monthSelect")}],onDestroy:[Q,le,function(){c.config.onClose=c.config.onClose.filter(function(J){return J!==F})}]}}}return s})});var Nw=Fe((KW,Mw)=>{Mw.exports=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}});var Mi=Fe(Os=>{var $g,$M=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];Os.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};Os.getSymbolTotalCodewords=function(e){return $M[e]};Os.getBCHDigit=function(n){let e=0;for(;n!==0;)e++,n>>>=1;return e};Os.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');$g=e};Os.isKanjiModeEnabled=function(){return typeof $g<"u"};Os.toSJIS=function(e){return $g(e)}});var rd=Fe(sr=>{sr.L={bit:1};sr.M={bit:0};sr.Q={bit:3};sr.H={bit:2};function zM(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return sr.L;case"m":case"medium":return sr.M;case"q":case"quartile":return sr.Q;case"h":case"high":return sr.H;default:throw new Error("Unknown EC Level: "+n)}}sr.isValid=function(e){return e&&typeof e.bit<"u"&&e.bit>=0&&e.bit<4};sr.from=function(e,t){if(sr.isValid(e))return e;try{return zM(e)}catch{return t}}});var Fw=Fe((ZW,Lw)=>{function Pw(){this.buffer=[],this.length=0}Pw.prototype={get:function(n){let e=Math.floor(n/8);return(this.buffer[e]>>>7-n%8&1)===1},put:function(n,e){for(let t=0;t<e;t++)this.putBit((n>>>e-t-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(n){let e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),n&&(this.buffer[e]|=128>>>this.length%8),this.length++}};Lw.exports=Pw});var jw=Fe((JW,Bw)=>{function sl(n){if(!n||n<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=n,this.data=new Uint8Array(n*n),this.reservedBit=new Uint8Array(n*n)}sl.prototype.set=function(n,e,t,r){let i=n*this.size+e;this.data[i]=t,r&&(this.reservedBit[i]=!0)};sl.prototype.get=function(n,e){return this.data[n*this.size+e]};sl.prototype.xor=function(n,e,t){this.data[n*this.size+e]^=t};sl.prototype.isReserved=function(n,e){return this.reservedBit[n*this.size+e]};Bw.exports=sl});var Hw=Fe(id=>{var WM=Mi().getSymbolSize;id.getRowColCoords=function(e){if(e===1)return[];let t=Math.floor(e/7)+2,r=WM(e),i=r===145?26:Math.ceil((r-13)/(2*t-2))*2,s=[r-7];for(let o=1;o<t-1;o++)s[o]=s[o-1]-i;return s.push(6),s.reverse()};id.getPositions=function(e){let t=[],r=id.getRowColCoords(e),i=r.length;for(let s=0;s<i;s++)for(let o=0;o<i;o++)s===0&&o===0||s===0&&o===i-1||s===i-1&&o===0||t.push([r[s],r[o]]);return t}});var $w=Fe(Vw=>{var UM=Mi().getSymbolSize,qw=7;Vw.getPositions=function(e){let t=UM(e);return[[0,0],[t-qw,0],[0,t-qw]]}});var zw=Fe(Nt=>{Nt.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var Is={N1:3,N2:3,N3:40,N4:10};Nt.isValid=function(e){return e!=null&&e!==""&&!isNaN(e)&&e>=0&&e<=7};Nt.from=function(e){return Nt.isValid(e)?parseInt(e,10):void 0};Nt.getPenaltyN1=function(e){let t=e.size,r=0,i=0,s=0,o=null,a=null;for(let c=0;c<t;c++){i=s=0,o=a=null;for(let u=0;u<t;u++){let f=e.get(c,u);f===o?i++:(i>=5&&(r+=Is.N1+(i-5)),o=f,i=1),f=e.get(u,c),f===a?s++:(s>=5&&(r+=Is.N1+(s-5)),a=f,s=1)}i>=5&&(r+=Is.N1+(i-5)),s>=5&&(r+=Is.N1+(s-5))}return r};Nt.getPenaltyN2=function(e){let t=e.size,r=0;for(let i=0;i<t-1;i++)for(let s=0;s<t-1;s++){let o=e.get(i,s)+e.get(i,s+1)+e.get(i+1,s)+e.get(i+1,s+1);(o===4||o===0)&&r++}return r*Is.N2};Nt.getPenaltyN3=function(e){let t=e.size,r=0,i=0,s=0;for(let o=0;o<t;o++){i=s=0;for(let a=0;a<t;a++)i=i<<1&2047|e.get(o,a),a>=10&&(i===1488||i===93)&&r++,s=s<<1&2047|e.get(a,o),a>=10&&(s===1488||s===93)&&r++}return r*Is.N3};Nt.getPenaltyN4=function(e){let t=0,r=e.data.length;for(let s=0;s<r;s++)t+=e.data[s];return Math.abs(Math.ceil(t*100/r/5)-10)*Is.N4};function YM(n,e,t){switch(n){case Nt.Patterns.PATTERN000:return(e+t)%2===0;case Nt.Patterns.PATTERN001:return e%2===0;case Nt.Patterns.PATTERN010:return t%3===0;case Nt.Patterns.PATTERN011:return(e+t)%3===0;case Nt.Patterns.PATTERN100:return(Math.floor(e/2)+Math.floor(t/3))%2===0;case Nt.Patterns.PATTERN101:return e*t%2+e*t%3===0;case Nt.Patterns.PATTERN110:return(e*t%2+e*t%3)%2===0;case Nt.Patterns.PATTERN111:return(e*t%3+(e+t)%2)%2===0;default:throw new Error("bad maskPattern:"+n)}}Nt.applyMask=function(e,t){let r=t.size;for(let i=0;i<r;i++)for(let s=0;s<r;s++)t.isReserved(s,i)||t.xor(s,i,YM(e,s,i))};Nt.getBestMask=function(e,t){let r=Object.keys(Nt.Patterns).length,i=0,s=1/0;for(let o=0;o<r;o++){t(o),Nt.applyMask(o,e);let a=Nt.getPenaltyN1(e)+Nt.getPenaltyN2(e)+Nt.getPenaltyN3(e)+Nt.getPenaltyN4(e);Nt.applyMask(o,e),a<s&&(s=a,i=o)}return i}});var Wg=Fe(zg=>{var Ni=rd(),sd=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],od=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];zg.getBlocksCount=function(e,t){switch(t){case Ni.L:return sd[(e-1)*4+0];case Ni.M:return sd[(e-1)*4+1];case Ni.Q:return sd[(e-1)*4+2];case Ni.H:return sd[(e-1)*4+3];default:return}};zg.getTotalCodewordsCount=function(e,t){switch(t){case Ni.L:return od[(e-1)*4+0];case Ni.M:return od[(e-1)*4+1];case Ni.Q:return od[(e-1)*4+2];case Ni.H:return od[(e-1)*4+3];default:return}}});var Ww=Fe(ld=>{var ol=new Uint8Array(512),ad=new Uint8Array(256);(function(){let e=1;for(let t=0;t<255;t++)ol[t]=e,ad[e]=t,e<<=1,e&256&&(e^=285);for(let t=255;t<512;t++)ol[t]=ol[t-255]})();ld.log=function(e){if(e<1)throw new Error("log("+e+")");return ad[e]};ld.exp=function(e){return ol[e]};ld.mul=function(e,t){return e===0||t===0?0:ol[ad[e]+ad[t]]}});var Uw=Fe(al=>{var Ug=Ww();al.mul=function(e,t){let r=new Uint8Array(e.length+t.length-1);for(let i=0;i<e.length;i++)for(let s=0;s<t.length;s++)r[i+s]^=Ug.mul(e[i],t[s]);return r};al.mod=function(e,t){let r=new Uint8Array(e);for(;r.length-t.length>=0;){let i=r[0];for(let o=0;o<t.length;o++)r[o]^=Ug.mul(t[o],i);let s=0;for(;s<r.length&&r[s]===0;)s++;r=r.slice(s)}return r};al.generateECPolynomial=function(e){let t=new Uint8Array([1]);for(let r=0;r<e;r++)t=al.mul(t,new Uint8Array([1,Ug.exp(r)]));return t}});var Kw=Fe((oU,Gw)=>{var Yw=Uw();function Yg(n){this.genPoly=void 0,this.degree=n,this.degree&&this.initialize(this.degree)}Yg.prototype.initialize=function(e){this.degree=e,this.genPoly=Yw.generateECPolynomial(this.degree)};Yg.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");let t=new Uint8Array(e.length+this.degree);t.set(e);let r=Yw.mod(t,this.genPoly),i=this.degree-r.length;if(i>0){let s=new Uint8Array(this.degree);return s.set(r,i),s}return r};Gw.exports=Yg});var Gg=Fe(Qw=>{Qw.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}});var Kg=Fe(oi=>{var Xw="[0-9]+",GM="[A-Z $%*+\\-./:]+",ll="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";ll=ll.replace(/u/g,"\\u");var KM="(?:(?![A-Z0-9 $%*+\\-./:]|"+ll+`)(?:.|[\r
]))+`;oi.KANJI=new RegExp(ll,"g");oi.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");oi.BYTE=new RegExp(KM,"g");oi.NUMERIC=new RegExp(Xw,"g");oi.ALPHANUMERIC=new RegExp(GM,"g");var QM=new RegExp("^"+ll+"$"),XM=new RegExp("^"+Xw+"$"),ZM=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");oi.testKanji=function(e){return QM.test(e)};oi.testNumeric=function(e){return XM.test(e)};oi.testAlphanumeric=function(e){return ZM.test(e)}});var Pi=Fe(tn=>{var JM=Gg(),Qg=Kg();tn.NUMERIC={id:"Numeric",bit:1<<0,ccBits:[10,12,14]};tn.ALPHANUMERIC={id:"Alphanumeric",bit:1<<1,ccBits:[9,11,13]};tn.BYTE={id:"Byte",bit:1<<2,ccBits:[8,16,16]};tn.KANJI={id:"Kanji",bit:1<<3,ccBits:[8,10,12]};tn.MIXED={bit:-1};tn.getCharCountIndicator=function(e,t){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!JM.isValid(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]};tn.getBestModeForData=function(e){return Qg.testNumeric(e)?tn.NUMERIC:Qg.testAlphanumeric(e)?tn.ALPHANUMERIC:Qg.testKanji(e)?tn.KANJI:tn.BYTE};tn.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")};tn.isValid=function(e){return e&&e.bit&&e.ccBits};function eN(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"numeric":return tn.NUMERIC;case"alphanumeric":return tn.ALPHANUMERIC;case"kanji":return tn.KANJI;case"byte":return tn.BYTE;default:throw new Error("Unknown mode: "+n)}}tn.from=function(e,t){if(tn.isValid(e))return e;try{return eN(e)}catch{return t}}});var nS=Fe(ks=>{var cd=Mi(),tN=Wg(),Zw=rd(),Li=Pi(),Xg=Gg(),eS=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,Jw=cd.getBCHDigit(eS);function nN(n,e,t){for(let r=1;r<=40;r++)if(e<=ks.getCapacity(r,t,n))return r}function tS(n,e){return Li.getCharCountIndicator(n,e)+4}function rN(n,e){let t=0;return n.forEach(function(r){let i=tS(r.mode,e);t+=i+r.getBitsLength()}),t}function iN(n,e){for(let t=1;t<=40;t++)if(rN(n,t)<=ks.getCapacity(t,e,Li.MIXED))return t}ks.from=function(e,t){return Xg.isValid(e)?parseInt(e,10):t};ks.getCapacity=function(e,t,r){if(!Xg.isValid(e))throw new Error("Invalid QR Code version");typeof r>"u"&&(r=Li.BYTE);let i=cd.getSymbolTotalCodewords(e),s=tN.getTotalCodewordsCount(e,t),o=(i-s)*8;if(r===Li.MIXED)return o;let a=o-tS(r,e);switch(r){case Li.NUMERIC:return Math.floor(a/10*3);case Li.ALPHANUMERIC:return Math.floor(a/11*2);case Li.KANJI:return Math.floor(a/13);case Li.BYTE:default:return Math.floor(a/8)}};ks.getBestVersionForData=function(e,t){let r,i=Zw.from(t,Zw.M);if(Array.isArray(e)){if(e.length>1)return iN(e,i);if(e.length===0)return 1;r=e[0]}else r=e;return nN(r.mode,r.getLength(),i)};ks.getEncodedBits=function(e){if(!Xg.isValid(e)||e<7)throw new Error("Invalid QR Code version");let t=e<<12;for(;cd.getBCHDigit(t)-Jw>=0;)t^=eS<<cd.getBCHDigit(t)-Jw;return e<<12|t}});var oS=Fe(sS=>{var Zg=Mi(),iS=1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0,sN=1<<14|1<<12|1<<10|1<<4|1<<1,rS=Zg.getBCHDigit(iS);sS.getEncodedBits=function(e,t){let r=e.bit<<3|t,i=r<<10;for(;Zg.getBCHDigit(i)-rS>=0;)i^=iS<<Zg.getBCHDigit(i)-rS;return(r<<10|i)^sN}});var lS=Fe((fU,aS)=>{var oN=Pi();function Bo(n){this.mode=oN.NUMERIC,this.data=n.toString()}Bo.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)};Bo.prototype.getLength=function(){return this.data.length};Bo.prototype.getBitsLength=function(){return Bo.getBitsLength(this.data.length)};Bo.prototype.write=function(e){let t,r,i;for(t=0;t+3<=this.data.length;t+=3)r=this.data.substr(t,3),i=parseInt(r,10),e.put(i,10);let s=this.data.length-t;s>0&&(r=this.data.substr(t),i=parseInt(r,10),e.put(i,s*3+1))};aS.exports=Bo});var uS=Fe((hU,cS)=>{var aN=Pi(),Jg=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function jo(n){this.mode=aN.ALPHANUMERIC,this.data=n}jo.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};jo.prototype.getLength=function(){return this.data.length};jo.prototype.getBitsLength=function(){return jo.getBitsLength(this.data.length)};jo.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let r=Jg.indexOf(this.data[t])*45;r+=Jg.indexOf(this.data[t+1]),e.put(r,11)}this.data.length%2&&e.put(Jg.indexOf(this.data[t]),6)};cS.exports=jo});var fS=Fe((pU,dS)=>{"use strict";dS.exports=function(e){for(var t=[],r=e.length,i=0;i<r;i++){var s=e.charCodeAt(i);if(s>=55296&&s<=56319&&r>i+1){var o=e.charCodeAt(i+1);o>=56320&&o<=57343&&(s=(s-55296)*1024+o-56320+65536,i+=1)}if(s<128){t.push(s);continue}if(s<2048){t.push(s>>6|192),t.push(s&63|128);continue}if(s<55296||s>=57344&&s<65536){t.push(s>>12|224),t.push(s>>6&63|128),t.push(s&63|128);continue}if(s>=65536&&s<=1114111){t.push(s>>18|240),t.push(s>>12&63|128),t.push(s>>6&63|128),t.push(s&63|128);continue}t.push(239,191,189)}return new Uint8Array(t).buffer}});var pS=Fe((gU,hS)=>{var lN=fS(),cN=Pi();function Ho(n){this.mode=cN.BYTE,typeof n=="string"&&(n=lN(n)),this.data=new Uint8Array(n)}Ho.getBitsLength=function(e){return e*8};Ho.prototype.getLength=function(){return this.data.length};Ho.prototype.getBitsLength=function(){return Ho.getBitsLength(this.data.length)};Ho.prototype.write=function(n){for(let e=0,t=this.data.length;e<t;e++)n.put(this.data[e],8)};hS.exports=Ho});var mS=Fe((mU,gS)=>{var uN=Pi(),dN=Mi();function qo(n){this.mode=uN.KANJI,this.data=n}qo.getBitsLength=function(e){return e*13};qo.prototype.getLength=function(){return this.data.length};qo.prototype.getBitsLength=function(){return qo.getBitsLength(this.data.length)};qo.prototype.write=function(n){let e;for(e=0;e<this.data.length;e++){let t=dN.toSJIS(this.data[e]);if(t>=33088&&t<=40956)t-=33088;else if(t>=57408&&t<=60351)t-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+`
Make sure your charset is UTF-8`);t=(t>>>8&255)*192+(t&255),n.put(t,13)}};gS.exports=qo});var vS=Fe((vU,em)=>{"use strict";var cl={single_source_shortest_paths:function(n,e,t){var r={},i={};i[e]=0;var s=cl.PriorityQueue.make();s.push(e,0);for(var o,a,c,u,f,p,h,y,_;!s.empty();){o=s.pop(),a=o.value,u=o.cost,f=n[a]||{};for(c in f)f.hasOwnProperty(c)&&(p=f[c],h=u+p,y=i[c],_=typeof i[c]>"u",(_||y>h)&&(i[c]=h,s.push(c,h),r[c]=a))}if(typeof t<"u"&&typeof i[t]>"u"){var w=["Could not find a path from ",e," to ",t,"."].join("");throw new Error(w)}return r},extract_shortest_path_from_predecessor_list:function(n,e){for(var t=[],r=e,i;r;)t.push(r),i=n[r],r=n[r];return t.reverse(),t},find_path:function(n,e,t){var r=cl.single_source_shortest_paths(n,e,t);return cl.extract_shortest_path_from_predecessor_list(r,t)},PriorityQueue:{make:function(n){var e=cl.PriorityQueue,t={},r;n=n||{};for(r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t.queue=[],t.sorter=n.sorter||e.default_sorter,t},default_sorter:function(n,e){return n.cost-e.cost},push:function(n,e){var t={value:n,cost:e};this.queue.push(t),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};typeof em<"u"&&(em.exports=cl)});var CS=Fe(Vo=>{var Dt=Pi(),ES=lS(),_S=uS(),wS=pS(),SS=mS(),ul=Kg(),ud=Mi(),fN=vS();function yS(n){return unescape(encodeURIComponent(n)).length}function dl(n,e,t){let r=[],i;for(;(i=n.exec(t))!==null;)r.push({data:i[0],index:i.index,mode:e,length:i[0].length});return r}function TS(n){let e=dl(ul.NUMERIC,Dt.NUMERIC,n),t=dl(ul.ALPHANUMERIC,Dt.ALPHANUMERIC,n),r,i;return ud.isKanjiModeEnabled()?(r=dl(ul.BYTE,Dt.BYTE,n),i=dl(ul.KANJI,Dt.KANJI,n)):(r=dl(ul.BYTE_KANJI,Dt.BYTE,n),i=[]),e.concat(t,r,i).sort(function(o,a){return o.index-a.index}).map(function(o){return{data:o.data,mode:o.mode,length:o.length}})}function tm(n,e){switch(e){case Dt.NUMERIC:return ES.getBitsLength(n);case Dt.ALPHANUMERIC:return _S.getBitsLength(n);case Dt.KANJI:return SS.getBitsLength(n);case Dt.BYTE:return wS.getBitsLength(n)}}function hN(n){return n.reduce(function(e,t){let r=e.length-1>=0?e[e.length-1]:null;return r&&r.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)},[])}function pN(n){let e=[];for(let t=0;t<n.length;t++){let r=n[t];switch(r.mode){case Dt.NUMERIC:e.push([r,{data:r.data,mode:Dt.ALPHANUMERIC,length:r.length},{data:r.data,mode:Dt.BYTE,length:r.length}]);break;case Dt.ALPHANUMERIC:e.push([r,{data:r.data,mode:Dt.BYTE,length:r.length}]);break;case Dt.KANJI:e.push([r,{data:r.data,mode:Dt.BYTE,length:yS(r.data)}]);break;case Dt.BYTE:e.push([{data:r.data,mode:Dt.BYTE,length:yS(r.data)}])}}return e}function gN(n,e){let t={},r={start:{}},i=["start"];for(let s=0;s<n.length;s++){let o=n[s],a=[];for(let c=0;c<o.length;c++){let u=o[c],f=""+s+c;a.push(f),t[f]={node:u,lastCount:0},r[f]={};for(let p=0;p<i.length;p++){let h=i[p];t[h]&&t[h].node.mode===u.mode?(r[h][f]=tm(t[h].lastCount+u.length,u.mode)-tm(t[h].lastCount,u.mode),t[h].lastCount+=u.length):(t[h]&&(t[h].lastCount=u.length),r[h][f]=tm(u.length,u.mode)+4+Dt.getCharCountIndicator(u.mode,e))}}i=a}for(let s=0;s<i.length;s++)r[i[s]].end=0;return{map:r,table:t}}function bS(n,e){let t,r=Dt.getBestModeForData(n);if(t=Dt.from(e,r),t!==Dt.BYTE&&t.bit<r.bit)throw new Error('"'+n+'" cannot be encoded with mode '+Dt.toString(t)+`.
 Suggested mode is: `+Dt.toString(r));switch(t===Dt.KANJI&&!ud.isKanjiModeEnabled()&&(t=Dt.BYTE),t){case Dt.NUMERIC:return new ES(n);case Dt.ALPHANUMERIC:return new _S(n);case Dt.KANJI:return new SS(n);case Dt.BYTE:return new wS(n)}}Vo.fromArray=function(e){return e.reduce(function(t,r){return typeof r=="string"?t.push(bS(r,null)):r.data&&t.push(bS(r.data,r.mode)),t},[])};Vo.fromString=function(e,t){let r=TS(e,ud.isKanjiModeEnabled()),i=pN(r),s=gN(i,t),o=fN.find_path(s.map,"start","end"),a=[];for(let c=1;c<o.length-1;c++)a.push(s.table[o[c]].node);return Vo.fromArray(hN(a))};Vo.rawSplit=function(e){return Vo.fromArray(TS(e,ud.isKanjiModeEnabled()))}});var DS=Fe(AS=>{var fd=Mi(),nm=rd(),mN=Fw(),vN=jw(),yN=Hw(),bN=$w(),sm=zw(),om=Wg(),EN=Kw(),dd=nS(),_N=oS(),wN=Pi(),rm=CS();function SN(n,e){let t=n.size,r=bN.getPositions(e);for(let i=0;i<r.length;i++){let s=r[i][0],o=r[i][1];for(let a=-1;a<=7;a++)if(!(s+a<=-1||t<=s+a))for(let c=-1;c<=7;c++)o+c<=-1||t<=o+c||(a>=0&&a<=6&&(c===0||c===6)||c>=0&&c<=6&&(a===0||a===6)||a>=2&&a<=4&&c>=2&&c<=4?n.set(s+a,o+c,!0,!0):n.set(s+a,o+c,!1,!0))}}function TN(n){let e=n.size;for(let t=8;t<e-8;t++){let r=t%2===0;n.set(t,6,r,!0),n.set(6,t,r,!0)}}function CN(n,e){let t=yN.getPositions(e);for(let r=0;r<t.length;r++){let i=t[r][0],s=t[r][1];for(let o=-2;o<=2;o++)for(let a=-2;a<=2;a++)o===-2||o===2||a===-2||a===2||o===0&&a===0?n.set(i+o,s+a,!0,!0):n.set(i+o,s+a,!1,!0)}}function AN(n,e){let t=n.size,r=dd.getEncodedBits(e),i,s,o;for(let a=0;a<18;a++)i=Math.floor(a/3),s=a%3+t-8-3,o=(r>>a&1)===1,n.set(i,s,o,!0),n.set(s,i,o,!0)}function im(n,e,t){let r=n.size,i=_N.getEncodedBits(e,t),s,o;for(s=0;s<15;s++)o=(i>>s&1)===1,s<6?n.set(s,8,o,!0):s<8?n.set(s+1,8,o,!0):n.set(r-15+s,8,o,!0),s<8?n.set(8,r-s-1,o,!0):s<9?n.set(8,15-s-1+1,o,!0):n.set(8,15-s-1,o,!0);n.set(r-8,8,1,!0)}function DN(n,e){let t=n.size,r=-1,i=t-1,s=7,o=0;for(let a=t-1;a>0;a-=2)for(a===6&&a--;;){for(let c=0;c<2;c++)if(!n.isReserved(i,a-c)){let u=!1;o<e.length&&(u=(e[o]>>>s&1)===1),n.set(i,a-c,u),s--,s===-1&&(o++,s=7)}if(i+=r,i<0||t<=i){i-=r,r=-r;break}}}function xN(n,e,t){let r=new mN;t.forEach(function(c){r.put(c.mode.bit,4),r.put(c.getLength(),wN.getCharCountIndicator(c.mode,n)),c.write(r)});let i=fd.getSymbolTotalCodewords(n),s=om.getTotalCodewordsCount(n,e),o=(i-s)*8;for(r.getLengthInBits()+4<=o&&r.put(0,4);r.getLengthInBits()%8!==0;)r.putBit(0);let a=(o-r.getLengthInBits())/8;for(let c=0;c<a;c++)r.put(c%2?17:236,8);return ON(r,n,e)}function ON(n,e,t){let r=fd.getSymbolTotalCodewords(e),i=om.getTotalCodewordsCount(e,t),s=r-i,o=om.getBlocksCount(e,t),a=r%o,c=o-a,u=Math.floor(r/o),f=Math.floor(s/o),p=f+1,h=u-f,y=new EN(h),_=0,w=new Array(o),E=new Array(o),D=0,R=new Uint8Array(n.buffer);for(let le=0;le<o;le++){let J=le<c?f:p;w[le]=R.slice(_,_+J),E[le]=y.encode(w[le]),_+=J,D=Math.max(D,J)}let H=new Uint8Array(r),F=0,m,Q;for(m=0;m<D;m++)for(Q=0;Q<o;Q++)m<w[Q].length&&(H[F++]=w[Q][m]);for(m=0;m<h;m++)for(Q=0;Q<o;Q++)H[F++]=E[Q][m];return H}function IN(n,e,t,r){let i;if(Array.isArray(n))i=rm.fromArray(n);else if(typeof n=="string"){let u=e;if(!u){let f=rm.rawSplit(n);u=dd.getBestVersionForData(f,t)}i=rm.fromString(n,u||40)}else throw new Error("Invalid data");let s=dd.getBestVersionForData(i,t);if(!s)throw new Error("The amount of data is too big to be stored in a QR Code");if(!e)e=s;else if(e<s)throw new Error(`
The chosen QR Code version cannot contain this amount of data.
Minimum version required to store current data is: `+s+`.
`);let o=xN(e,t,i),a=fd.getSymbolSize(e),c=new vN(a);return SN(c,e),TN(c),CN(c,e),im(c,t,0),e>=7&&AN(c,e),DN(c,o),isNaN(r)&&(r=sm.getBestMask(c,im.bind(null,c,t))),sm.applyMask(r,c),im(c,t,r),{modules:c,version:e,errorCorrectionLevel:t,maskPattern:r,segments:i}}AS.create=function(e,t){if(typeof e>"u"||e==="")throw new Error("No input text");let r=nm.M,i,s;return typeof t<"u"&&(r=nm.from(t.errorCorrectionLevel,nm.M),i=dd.from(t.version),s=sm.from(t.maskPattern),t.toSJISFunc&&fd.setToSJISFunction(t.toSJISFunc)),IN(e,i,r,s)}});var am=Fe(Rs=>{function xS(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let e=n.slice().replace("#","").split("");if(e.length<3||e.length===5||e.length>8)throw new Error("Invalid hex color: "+n);(e.length===3||e.length===4)&&(e=Array.prototype.concat.apply([],e.map(function(r){return[r,r]}))),e.length===6&&e.push("F","F");let t=parseInt(e.join(""),16);return{r:t>>24&255,g:t>>16&255,b:t>>8&255,a:t&255,hex:"#"+e.slice(0,6).join("")}}Rs.getOptions=function(e){e||(e={}),e.color||(e.color={});let t=typeof e.margin>"u"||e.margin===null||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:r,scale:r?4:i,margin:t,color:{dark:xS(e.color.dark||"#000000ff"),light:xS(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}};Rs.getScale=function(e,t){return t.width&&t.width>=e+t.margin*2?t.width/(e+t.margin*2):t.scale};Rs.getImageWidth=function(e,t){let r=Rs.getScale(e,t);return Math.floor((e+t.margin*2)*r)};Rs.qrToImageData=function(e,t,r){let i=t.modules.size,s=t.modules.data,o=Rs.getScale(i,r),a=Math.floor((i+r.margin*2)*o),c=r.margin*o,u=[r.color.light,r.color.dark];for(let f=0;f<a;f++)for(let p=0;p<a;p++){let h=(f*a+p)*4,y=r.color.light;if(f>=c&&p>=c&&f<a-c&&p<a-c){let _=Math.floor((f-c)/o),w=Math.floor((p-c)/o);y=u[s[_*i+w]?1:0]}e[h++]=y.r,e[h++]=y.g,e[h++]=y.b,e[h]=y.a}}});var OS=Fe(hd=>{var lm=am();function kN(n,e,t){n.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=t,e.width=t,e.style.height=t+"px",e.style.width=t+"px"}function RN(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}hd.render=function(e,t,r){let i=r,s=t;typeof i>"u"&&(!t||!t.getContext)&&(i=t,t=void 0),t||(s=RN()),i=lm.getOptions(i);let o=lm.getImageWidth(e.modules.size,i),a=s.getContext("2d"),c=a.createImageData(o,o);return lm.qrToImageData(c.data,e,i),kN(a,s,o),a.putImageData(c,0,0),s};hd.renderToDataURL=function(e,t,r){let i=r;typeof i>"u"&&(!t||!t.getContext)&&(i=t,t=void 0),i||(i={});let s=hd.render(e,t,i),o=i.type||"image/png",a=i.rendererOpts||{};return s.toDataURL(o,a.quality)}});var RS=Fe(kS=>{var MN=am();function IS(n,e){let t=n.a/255,r=e+'="'+n.hex+'"';return t<1?r+" "+e+'-opacity="'+t.toFixed(2).slice(1)+'"':r}function cm(n,e,t){let r=n+e;return typeof t<"u"&&(r+=" "+t),r}function NN(n,e,t){let r="",i=0,s=!1,o=0;for(let a=0;a<n.length;a++){let c=Math.floor(a%e),u=Math.floor(a/e);!c&&!s&&(s=!0),n[a]?(o++,a>0&&c>0&&n[a-1]||(r+=s?cm("M",c+t,.5+u+t):cm("m",i,0),i=0,s=!1),c+1<e&&n[a+1]||(r+=cm("h",o),o=0)):i++}return r}kS.render=function(e,t,r){let i=MN.getOptions(t),s=e.modules.size,o=e.modules.data,a=s+i.margin*2,c=i.color.light.a?"<path "+IS(i.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>':"",u="<path "+IS(i.color.dark,"stroke")+' d="'+NN(o,s,i.margin)+'"/>',f='viewBox="0 0 '+a+" "+a+'"',h='<svg xmlns="http://www.w3.org/2000/svg" '+(i.width?'width="'+i.width+'" height="'+i.width+'" ':"")+f+' shape-rendering="crispEdges">'+c+u+`</svg>
`;return typeof r=="function"&&r(null,h),h}});var NS=Fe(fl=>{var PN=Nw(),um=DS(),MS=OS(),LN=RS();function dm(n,e,t,r,i){let s=[].slice.call(arguments,1),o=s.length,a=typeof s[o-1]=="function";if(!a&&!PN())throw new Error("Callback required as last argument");if(a){if(o<2)throw new Error("Too few arguments provided");o===2?(i=t,t=e,e=r=void 0):o===3&&(e.getContext&&typeof i>"u"?(i=r,r=void 0):(i=r,r=t,t=e,e=void 0))}else{if(o<1)throw new Error("Too few arguments provided");return o===1?(t=e,e=r=void 0):o===2&&!e.getContext&&(r=t,t=e,e=void 0),new Promise(function(c,u){try{let f=um.create(t,r);c(n(f,e,r))}catch(f){u(f)}})}try{let c=um.create(t,r);i(null,n(c,e,r))}catch(c){i(c)}}fl.create=um.create;fl.toCanvas=dm.bind(null,MS.render);fl.toDataURL=dm.bind(null,MS.renderToDataURL);fl.toString=dm.bind(null,function(n,e,t){return LN.render(n,t)})});var jy=Fe((E0,Df)=>{(function(n,e){typeof define=="function"&&define.amd?define(e):typeof Df=="object"&&Df.exports?Df.exports=e():n.EvEmitter=e()})(typeof window<"u"?window:E0,function(){"use strict";function n(){}var e=n.prototype;return e.on=function(t,r){if(!(!t||!r)){var i=this._events=this._events||{},s=i[t]=i[t]||[];return s.indexOf(r)==-1&&s.push(r),this}},e.once=function(t,r){if(!(!t||!r)){this.on(t,r);var i=this._onceEvents=this._onceEvents||{},s=i[t]=i[t]||{};return s[r]=!0,this}},e.off=function(t,r){var i=this._events&&this._events[t];if(!(!i||!i.length)){var s=i.indexOf(r);return s!=-1&&i.splice(s,1),this}},e.emitEvent=function(t,r){var i=this._events&&this._events[t];if(!(!i||!i.length)){i=i.slice(0),r=r||[];for(var s=this._onceEvents&&this._onceEvents[t],o=0;o<i.length;o++){var a=i[o],c=s&&s[a];c&&(this.off(t,a),delete s[a]),a.apply(this,r)}return this}},e.allOff=function(){delete this._events,delete this._onceEvents},n})});var Of=Fe((D3,xf)=>{(function(n,e){typeof define=="function"&&define.amd?define(e):typeof xf=="object"&&xf.exports?xf.exports=e():n.getSize=e()})(window,function(){"use strict";function e(h){var y=parseFloat(h),_=h.indexOf("%")==-1&&!isNaN(y);return _&&y}function t(){}var r=typeof console>"u"?t:function(h){console.error(h)},i=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],s=i.length;function o(){for(var h={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},y=0;y<s;y++){var _=i[y];h[_]=0}return h}function a(h){var y=getComputedStyle(h);return y||r("Style returned "+y+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),y}var c=!1,u;function f(){if(!c){c=!0;var h=document.createElement("div");h.style.width="200px",h.style.padding="1px 2px 3px 4px",h.style.borderStyle="solid",h.style.borderWidth="1px 2px 3px 4px",h.style.boxSizing="border-box";var y=document.body||document.documentElement;y.appendChild(h);var _=a(h);u=Math.round(e(_.width))==200,p.isBoxSizeOuter=u,y.removeChild(h)}}function p(h){if(f(),typeof h=="string"&&(h=document.querySelector(h)),!(!h||typeof h!="object"||!h.nodeType)){var y=a(h);if(y.display=="none")return o();var _={};_.width=h.offsetWidth,_.height=h.offsetHeight;for(var w=_.isBorderBox=y.boxSizing=="border-box",E=0;E<s;E++){var D=i[E],R=y[D],H=parseFloat(R);_[D]=isNaN(H)?0:H}var F=_.paddingLeft+_.paddingRight,m=_.paddingTop+_.paddingBottom,Q=_.marginLeft+_.marginRight,le=_.marginTop+_.marginBottom,J=_.borderLeftWidth+_.borderRightWidth,q=_.borderTopWidth+_.borderBottomWidth,Z=w&&u,ae=e(y.width);ae!==!1&&(_.width=ae+(Z?0:F+J));var Ce=e(y.height);return Ce!==!1&&(_.height=Ce+(Z?0:m+q)),_.innerWidth=_.width-(F+J),_.innerHeight=_.height-(m+q),_.outerWidth=_.width+Q,_.outerHeight=_.height+le,_}}return p})});var _0=Fe((x3,If)=>{(function(n,e){"use strict";typeof define=="function"&&define.amd?define(e):typeof If=="object"&&If.exports?If.exports=e():n.matchesSelector=e()})(window,function(){"use strict";var e=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var r=["webkit","moz","ms","o"],i=0;i<r.length;i++){var s=r[i],o=s+"MatchesSelector";if(t[o])return o}}();return function(r,i){return r[e](i)}})});var w0=Fe((O3,kf)=>{(function(n,e){typeof define=="function"&&define.amd?define(["desandro-matches-selector/matches-selector"],function(t){return e(n,t)}):typeof kf=="object"&&kf.exports?kf.exports=e(n,_0()):n.fizzyUIUtils=e(n,n.matchesSelector)})(window,function(e,t){"use strict";var r={};r.extend=function(o,a){for(var c in a)o[c]=a[c];return o},r.modulo=function(o,a){return(o%a+a)%a};var i=Array.prototype.slice;r.makeArray=function(o){if(Array.isArray(o))return o;if(o==null)return[];var a=typeof o=="object"&&typeof o.length=="number";return a?i.call(o):[o]},r.removeFrom=function(o,a){var c=o.indexOf(a);c!=-1&&o.splice(c,1)},r.getParent=function(o,a){for(;o.parentNode&&o!=document.body;)if(o=o.parentNode,t(o,a))return o},r.getQueryElement=function(o){return typeof o=="string"?document.querySelector(o):o},r.handleEvent=function(o){var a="on"+o.type;this[a]&&this[a](o)},r.filterFindElements=function(o,a){o=r.makeArray(o);var c=[];return o.forEach(function(u){if(u instanceof HTMLElement){if(!a){c.push(u);return}t(u,a)&&c.push(u);for(var f=u.querySelectorAll(a),p=0;p<f.length;p++)c.push(f[p])}}),c},r.debounceMethod=function(o,a,c){c=c||100;var u=o.prototype[a],f=a+"Timeout";o.prototype[a]=function(){var p=this[f];clearTimeout(p);var h=arguments,y=this;this[f]=setTimeout(function(){u.apply(y,h),delete y[f]},c)}},r.docReady=function(o){var a=document.readyState;a=="complete"||a=="interactive"?setTimeout(o):document.addEventListener("DOMContentLoaded",o)},r.toDashed=function(o){return o.replace(/(.)([A-Z])/g,function(a,c,u){return c+"-"+u}).toLowerCase()};var s=e.console;return r.htmlInit=function(o,a){r.docReady(function(){var c=r.toDashed(a),u="data-"+c,f=document.querySelectorAll("["+u+"]"),p=document.querySelectorAll(".js-"+c),h=r.makeArray(f).concat(r.makeArray(p)),y=u+"-options",_=e.jQuery;h.forEach(function(w){var E=w.getAttribute(u)||w.getAttribute(y),D;try{D=E&&JSON.parse(E)}catch(H){s&&s.error("Error parsing "+u+" on "+w.className+": "+H);return}var R=new o(w,D);_&&_.data(w,a,R)})})},r})});var S0=Fe((I3,Rf)=>{(function(n,e){typeof define=="function"&&define.amd?define(["ev-emitter/ev-emitter","get-size/get-size"],e):typeof Rf=="object"&&Rf.exports?Rf.exports=e(jy(),Of()):(n.Outlayer={},n.Outlayer.Item=e(n.EvEmitter,n.getSize))})(window,function(e,t){"use strict";function r(w){for(var E in w)return!1;return E=null,!0}var i=document.documentElement.style,s=typeof i.transition=="string"?"transition":"WebkitTransition",o=typeof i.transform=="string"?"transform":"WebkitTransform",a={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[s],c={transform:o,transition:s,transitionDuration:s+"Duration",transitionProperty:s+"Property",transitionDelay:s+"Delay"};function u(w,E){w&&(this.element=w,this.layout=E,this.position={x:0,y:0},this._create())}var f=u.prototype=Object.create(e.prototype);f.constructor=u,f._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},f.handleEvent=function(w){var E="on"+w.type;this[E]&&this[E](w)},f.getSize=function(){this.size=t(this.element)},f.css=function(w){var E=this.element.style;for(var D in w){var R=c[D]||D;E[R]=w[D]}},f.getPosition=function(){var w=getComputedStyle(this.element),E=this.layout._getOption("originLeft"),D=this.layout._getOption("originTop"),R=w[E?"left":"right"],H=w[D?"top":"bottom"],F=parseFloat(R),m=parseFloat(H),Q=this.layout.size;R.indexOf("%")!=-1&&(F=F/100*Q.width),H.indexOf("%")!=-1&&(m=m/100*Q.height),F=isNaN(F)?0:F,m=isNaN(m)?0:m,F-=E?Q.paddingLeft:Q.paddingRight,m-=D?Q.paddingTop:Q.paddingBottom,this.position.x=F,this.position.y=m},f.layoutPosition=function(){var w=this.layout.size,E={},D=this.layout._getOption("originLeft"),R=this.layout._getOption("originTop"),H=D?"paddingLeft":"paddingRight",F=D?"left":"right",m=D?"right":"left",Q=this.position.x+w[H];E[F]=this.getXValue(Q),E[m]="";var le=R?"paddingTop":"paddingBottom",J=R?"top":"bottom",q=R?"bottom":"top",Z=this.position.y+w[le];E[J]=this.getYValue(Z),E[q]="",this.css(E),this.emitEvent("layout",[this])},f.getXValue=function(w){var E=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!E?w/this.layout.size.width*100+"%":w+"px"},f.getYValue=function(w){var E=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&E?w/this.layout.size.height*100+"%":w+"px"},f._transitionTo=function(w,E){this.getPosition();var D=this.position.x,R=this.position.y,H=w==this.position.x&&E==this.position.y;if(this.setPosition(w,E),H&&!this.isTransitioning){this.layoutPosition();return}var F=w-D,m=E-R,Q={};Q.transform=this.getTranslate(F,m),this.transition({to:Q,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},f.getTranslate=function(w,E){var D=this.layout._getOption("originLeft"),R=this.layout._getOption("originTop");return w=D?w:-w,E=R?E:-E,"translate3d("+w+"px, "+E+"px, 0)"},f.goTo=function(w,E){this.setPosition(w,E),this.layoutPosition()},f.moveTo=f._transitionTo,f.setPosition=function(w,E){this.position.x=parseFloat(w),this.position.y=parseFloat(E)},f._nonTransition=function(w){this.css(w.to),w.isCleaning&&this._removeStyles(w.to);for(var E in w.onTransitionEnd)w.onTransitionEnd[E].call(this)},f.transition=function(w){if(!parseFloat(this.layout.options.transitionDuration)){this._nonTransition(w);return}var E=this._transn;for(var D in w.onTransitionEnd)E.onEnd[D]=w.onTransitionEnd[D];for(D in w.to)E.ingProperties[D]=!0,w.isCleaning&&(E.clean[D]=!0);if(w.from){this.css(w.from);var R=this.element.offsetHeight;R=null}this.enableTransition(w.to),this.css(w.to),this.isTransitioning=!0};function p(w){return w.replace(/([A-Z])/g,function(E){return"-"+E.toLowerCase()})}var h="opacity,"+p(o);f.enableTransition=function(){if(!this.isTransitioning){var w=this.layout.options.transitionDuration;w=typeof w=="number"?w+"ms":w,this.css({transitionProperty:h,transitionDuration:w,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(a,this,!1)}},f.onwebkitTransitionEnd=function(w){this.ontransitionend(w)},f.onotransitionend=function(w){this.ontransitionend(w)};var y={"-webkit-transform":"transform"};f.ontransitionend=function(w){if(w.target===this.element){var E=this._transn,D=y[w.propertyName]||w.propertyName;if(delete E.ingProperties[D],r(E.ingProperties)&&this.disableTransition(),D in E.clean&&(this.element.style[w.propertyName]="",delete E.clean[D]),D in E.onEnd){var R=E.onEnd[D];R.call(this),delete E.onEnd[D]}this.emitEvent("transitionEnd",[this])}},f.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(a,this,!1),this.isTransitioning=!1},f._removeStyles=function(w){var E={};for(var D in w)E[D]="";this.css(E)};var _={transitionProperty:"",transitionDuration:"",transitionDelay:""};return f.removeTransitionStyles=function(){this.css(_)},f.stagger=function(w){w=isNaN(w)?0:w,this.staggerDelay=w+"ms"},f.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},f.remove=function(){if(!s||!parseFloat(this.layout.options.transitionDuration)){this.removeElem();return}this.once("transitionEnd",function(){this.removeElem()}),this.hide()},f.reveal=function(){delete this.isHidden,this.css({display:""});var w=this.layout.options,E={},D=this.getHideRevealTransitionEndProperty("visibleStyle");E[D]=this.onRevealTransitionEnd,this.transition({from:w.hiddenStyle,to:w.visibleStyle,isCleaning:!0,onTransitionEnd:E})},f.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},f.getHideRevealTransitionEndProperty=function(w){var E=this.layout.options[w];if(E.opacity)return"opacity";for(var D in E)return D},f.hide=function(){this.isHidden=!0,this.css({display:""});var w=this.layout.options,E={},D=this.getHideRevealTransitionEndProperty("hiddenStyle");E[D]=this.onHideTransitionEnd,this.transition({from:w.visibleStyle,to:w.hiddenStyle,isCleaning:!0,onTransitionEnd:E})},f.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},f.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},u})});var T0=Fe((k3,Mf)=>{(function(n,e){"use strict";typeof define=="function"&&define.amd?define(["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(t,r,i,s){return e(n,t,r,i,s)}):typeof Mf=="object"&&Mf.exports?Mf.exports=e(n,jy(),Of(),w0(),S0()):n.Outlayer=e(n,n.EvEmitter,n.getSize,n.fizzyUIUtils,n.Outlayer.Item)})(window,function(e,t,r,i,s){"use strict";var o=e.console,a=e.jQuery,c=function(){},u=0,f={};function p(E,D){var R=i.getQueryElement(E);if(!R){o&&o.error("Bad element for "+this.constructor.namespace+": "+(R||E));return}this.element=R,a&&(this.$element=a(this.element)),this.options=i.extend({},this.constructor.defaults),this.option(D);var H=++u;this.element.outlayerGUID=H,f[H]=this,this._create();var F=this._getOption("initLayout");F&&this.layout()}p.namespace="outlayer",p.Item=s,p.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var h=p.prototype;i.extend(h,t.prototype),h.option=function(E){i.extend(this.options,E)},h._getOption=function(E){var D=this.constructor.compatOptions[E];return D&&this.options[D]!==void 0?this.options[D]:this.options[E]},p.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},h._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),i.extend(this.element.style,this.options.containerStyle);var E=this._getOption("resize");E&&this.bindResize()},h.reloadItems=function(){this.items=this._itemize(this.element.children)},h._itemize=function(E){for(var D=this._filterFindItemElements(E),R=this.constructor.Item,H=[],F=0;F<D.length;F++){var m=D[F],Q=new R(m,this);H.push(Q)}return H},h._filterFindItemElements=function(E){return i.filterFindElements(E,this.options.itemSelector)},h.getItemElements=function(){return this.items.map(function(E){return E.element})},h.layout=function(){this._resetLayout(),this._manageStamps();var E=this._getOption("layoutInstant"),D=E!==void 0?E:!this._isLayoutInited;this.layoutItems(this.items,D),this._isLayoutInited=!0},h._init=h.layout,h._resetLayout=function(){this.getSize()},h.getSize=function(){this.size=r(this.element)},h._getMeasurement=function(E,D){var R=this.options[E],H;R?(typeof R=="string"?H=this.element.querySelector(R):R instanceof HTMLElement&&(H=R),this[E]=H?r(H)[D]:R):this[E]=0},h.layoutItems=function(E,D){E=this._getItemsForLayout(E),this._layoutItems(E,D),this._postLayout()},h._getItemsForLayout=function(E){return E.filter(function(D){return!D.isIgnored})},h._layoutItems=function(E,D){if(this._emitCompleteOnItems("layout",E),!(!E||!E.length)){var R=[];E.forEach(function(H){var F=this._getItemLayoutPosition(H);F.item=H,F.isInstant=D||H.isLayoutInstant,R.push(F)},this),this._processLayoutQueue(R)}},h._getItemLayoutPosition=function(){return{x:0,y:0}},h._processLayoutQueue=function(E){this.updateStagger(),E.forEach(function(D,R){this._positionItem(D.item,D.x,D.y,D.isInstant,R)},this)},h.updateStagger=function(){var E=this.options.stagger;if(E==null){this.stagger=0;return}return this.stagger=w(E),this.stagger},h._positionItem=function(E,D,R,H,F){H?E.goTo(D,R):(E.stagger(F*this.stagger),E.moveTo(D,R))},h._postLayout=function(){this.resizeContainer()},h.resizeContainer=function(){var E=this._getOption("resizeContainer");if(E){var D=this._getContainerSize();D&&(this._setContainerMeasure(D.width,!0),this._setContainerMeasure(D.height,!1))}},h._getContainerSize=c,h._setContainerMeasure=function(E,D){if(E!==void 0){var R=this.size;R.isBorderBox&&(E+=D?R.paddingLeft+R.paddingRight+R.borderLeftWidth+R.borderRightWidth:R.paddingBottom+R.paddingTop+R.borderTopWidth+R.borderBottomWidth),E=Math.max(E,0),this.element.style[D?"width":"height"]=E+"px"}},h._emitCompleteOnItems=function(E,D){var R=this;function H(){R.dispatchEvent(E+"Complete",null,[D])}var F=D.length;if(!D||!F){H();return}var m=0;function Q(){m++,m==F&&H()}D.forEach(function(le){le.once(E,Q)})},h.dispatchEvent=function(E,D,R){var H=D?[D].concat(R):R;if(this.emitEvent(E,H),a)if(this.$element=this.$element||a(this.element),D){var F=a.Event(D);F.type=E,this.$element.trigger(F,R)}else this.$element.trigger(E,R)},h.ignore=function(E){var D=this.getItem(E);D&&(D.isIgnored=!0)},h.unignore=function(E){var D=this.getItem(E);D&&delete D.isIgnored},h.stamp=function(E){E=this._find(E),E&&(this.stamps=this.stamps.concat(E),E.forEach(this.ignore,this))},h.unstamp=function(E){E=this._find(E),E&&E.forEach(function(D){i.removeFrom(this.stamps,D),this.unignore(D)},this)},h._find=function(E){if(E)return typeof E=="string"&&(E=this.element.querySelectorAll(E)),E=i.makeArray(E),E},h._manageStamps=function(){!this.stamps||!this.stamps.length||(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},h._getBoundingRect=function(){var E=this.element.getBoundingClientRect(),D=this.size;this._boundingRect={left:E.left+D.paddingLeft+D.borderLeftWidth,top:E.top+D.paddingTop+D.borderTopWidth,right:E.right-(D.paddingRight+D.borderRightWidth),bottom:E.bottom-(D.paddingBottom+D.borderBottomWidth)}},h._manageStamp=c,h._getElementOffset=function(E){var D=E.getBoundingClientRect(),R=this._boundingRect,H=r(E),F={left:D.left-R.left-H.marginLeft,top:D.top-R.top-H.marginTop,right:R.right-D.right-H.marginRight,bottom:R.bottom-D.bottom-H.marginBottom};return F},h.handleEvent=i.handleEvent,h.bindResize=function(){e.addEventListener("resize",this),this.isResizeBound=!0},h.unbindResize=function(){e.removeEventListener("resize",this),this.isResizeBound=!1},h.onresize=function(){this.resize()},i.debounceMethod(p,"onresize",100),h.resize=function(){!this.isResizeBound||!this.needsResizeLayout()||this.layout()},h.needsResizeLayout=function(){var E=r(this.element),D=this.size&&E;return D&&E.innerWidth!==this.size.innerWidth},h.addItems=function(E){var D=this._itemize(E);return D.length&&(this.items=this.items.concat(D)),D},h.appended=function(E){var D=this.addItems(E);D.length&&(this.layoutItems(D,!0),this.reveal(D))},h.prepended=function(E){var D=this._itemize(E);if(D.length){var R=this.items.slice(0);this.items=D.concat(R),this._resetLayout(),this._manageStamps(),this.layoutItems(D,!0),this.reveal(D),this.layoutItems(R)}},h.reveal=function(E){if(this._emitCompleteOnItems("reveal",E),!(!E||!E.length)){var D=this.updateStagger();E.forEach(function(R,H){R.stagger(H*D),R.reveal()})}},h.hide=function(E){if(this._emitCompleteOnItems("hide",E),!(!E||!E.length)){var D=this.updateStagger();E.forEach(function(R,H){R.stagger(H*D),R.hide()})}},h.revealItemElements=function(E){var D=this.getItems(E);this.reveal(D)},h.hideItemElements=function(E){var D=this.getItems(E);this.hide(D)},h.getItem=function(E){for(var D=0;D<this.items.length;D++){var R=this.items[D];if(R.element==E)return R}},h.getItems=function(E){E=i.makeArray(E);var D=[];return E.forEach(function(R){var H=this.getItem(R);H&&D.push(H)},this),D},h.remove=function(E){var D=this.getItems(E);this._emitCompleteOnItems("remove",D),!(!D||!D.length)&&D.forEach(function(R){R.remove(),i.removeFrom(this.items,R)},this)},h.destroy=function(){var E=this.element.style;E.height="",E.position="",E.width="",this.items.forEach(function(R){R.destroy()}),this.unbindResize();var D=this.element.outlayerGUID;delete f[D],delete this.element.outlayerGUID,a&&a.removeData(this.element,this.constructor.namespace)},p.data=function(E){E=i.getQueryElement(E);var D=E&&E.outlayerGUID;return D&&f[D]},p.create=function(E,D){var R=y(p);return R.defaults=i.extend({},p.defaults),i.extend(R.defaults,D),R.compatOptions=i.extend({},p.compatOptions),R.namespace=E,R.data=p.data,R.Item=y(s),i.htmlInit(R,E),a&&a.bridget&&a.bridget(E,R),R};function y(E){function D(){E.apply(this,arguments)}return D.prototype=Object.create(E.prototype),D.prototype.constructor=D,D}var _={ms:1,s:1e3};function w(E){if(typeof E=="number")return E;var D=E.match(/(^\d*\.?\d*)(\w*)/),R=D&&D[1],H=D&&D[2];if(!R.length)return 0;R=parseFloat(R);var F=_[H]||1;return R*F}return p.Item=s,p})});var C0=Fe((R3,Nf)=>{(function(n,e){typeof define=="function"&&define.amd?define(["outlayer/outlayer","get-size/get-size"],e):typeof Nf=="object"&&Nf.exports?Nf.exports=e(T0(),Of()):n.Masonry=e(n.Outlayer,n.getSize)})(window,function(e,t){"use strict";var r=e.create("masonry");r.compatOptions.fitWidth="isFitWidth";var i=r.prototype;return i._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var s=0;s<this.cols;s++)this.colYs.push(0);this.maxY=0,this.horizontalColIndex=0},i.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var s=this.items[0],o=s&&s.element;this.columnWidth=o&&t(o).outerWidth||this.containerWidth}var a=this.columnWidth+=this.gutter,c=this.containerWidth+this.gutter,u=c/a,f=a-c%a,p=f&&f<1?"round":"floor";u=Math[p](u),this.cols=Math.max(u,1)},i.getContainerWidth=function(){var s=this._getOption("fitWidth"),o=s?this.element.parentNode:this.element,a=t(o);this.containerWidth=a&&a.innerWidth},i._getItemLayoutPosition=function(s){s.getSize();var o=s.size.outerWidth%this.columnWidth,a=o&&o<1?"round":"ceil",c=Math[a](s.size.outerWidth/this.columnWidth);c=Math.min(c,this.cols);for(var u=this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition",f=this[u](c,s),p={x:this.columnWidth*f.col,y:f.y},h=f.y+s.size.outerHeight,y=c+f.col,_=f.col;_<y;_++)this.colYs[_]=h;return p},i._getTopColPosition=function(s){var o=this._getTopColGroup(s),a=Math.min.apply(Math,o);return{col:o.indexOf(a),y:a}},i._getTopColGroup=function(s){if(s<2)return this.colYs;for(var o=[],a=this.cols+1-s,c=0;c<a;c++)o[c]=this._getColGroupY(c,s);return o},i._getColGroupY=function(s,o){if(o<2)return this.colYs[s];var a=this.colYs.slice(s,s+o);return Math.max.apply(Math,a)},i._getHorizontalColPosition=function(s,o){var a=this.horizontalColIndex%this.cols,c=s>1&&a+s>this.cols;a=c?0:a;var u=o.size.outerWidth&&o.size.outerHeight;return this.horizontalColIndex=u?a+s:this.horizontalColIndex,{col:a,y:this._getColGroupY(a,s)}},i._manageStamp=function(s){var o=t(s),a=this._getElementOffset(s),c=this._getOption("originLeft"),u=c?a.left:a.right,f=u+o.outerWidth,p=Math.floor(u/this.columnWidth);p=Math.max(0,p);var h=Math.floor(f/this.columnWidth);h-=f%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var y=this._getOption("originTop"),_=(y?a.top:a.bottom)+o.outerHeight,w=p;w<=h;w++)this.colYs[w]=Math.max(_,this.colYs[w])},i._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var s={height:this.maxY};return this._getOption("fitWidth")&&(s.width=this._getContainerFitWidth()),s},i._getContainerFitWidth=function(){for(var s=0,o=this.cols;--o&&this.colYs[o]===0;)s++;return(this.cols-s)*this.columnWidth-this.gutter},i.needsResizeLayout=function(){var s=this.containerWidth;return this.getContainerWidth(),s!=this.containerWidth},r})});var D0=Fe((A0,Pf)=>{(function(n,e){typeof Pf=="object"&&Pf.exports?Pf.exports=e():n.EvEmitter=e()})(typeof window<"u"?window:A0,function(){function n(){}let e=n.prototype;return e.on=function(t,r){if(!t||!r)return this;let i=this._events=this._events||{},s=i[t]=i[t]||[];return s.includes(r)||s.push(r),this},e.once=function(t,r){if(!t||!r)return this;this.on(t,r);let i=this._onceEvents=this._onceEvents||{},s=i[t]=i[t]||{};return s[r]=!0,this},e.off=function(t,r){let i=this._events&&this._events[t];if(!i||!i.length)return this;let s=i.indexOf(r);return s!=-1&&i.splice(s,1),this},e.emitEvent=function(t,r){let i=this._events&&this._events[t];if(!i||!i.length)return this;i=i.slice(0),r=r||[];let s=this._onceEvents&&this._onceEvents[t];for(let o of i)s&&s[o]&&(this.off(t,o),delete s[o]),o.apply(this,r);return this},e.allOff=function(){return delete this._events,delete this._onceEvents,this},n})});var O0=Fe((x0,Lf)=>{(function(n,e){typeof Lf=="object"&&Lf.exports?Lf.exports=e(n,D0()):n.imagesLoaded=e(n,n.EvEmitter)})(typeof window<"u"?window:x0,function(e,t){let r=e.jQuery,i=e.console;function s(p){return Array.isArray(p)?p:typeof p=="object"&&typeof p.length=="number"?[...p]:[p]}function o(p,h,y){if(!(this instanceof o))return new o(p,h,y);let _=p;if(typeof p=="string"&&(_=document.querySelectorAll(p)),!_){i.error(`Bad element for imagesLoaded ${_||p}`);return}this.elements=s(_),this.options={},typeof h=="function"?y=h:Object.assign(this.options,h),y&&this.on("always",y),this.getImages(),r&&(this.jqDeferred=new r.Deferred),setTimeout(this.check.bind(this))}o.prototype=Object.create(t.prototype),o.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)};let a=[1,9,11];o.prototype.addElementImages=function(p){p.nodeName==="IMG"&&this.addImage(p),this.options.background===!0&&this.addElementBackgroundImages(p);let{nodeType:h}=p;if(!h||!a.includes(h))return;let y=p.querySelectorAll("img");for(let _ of y)this.addImage(_);if(typeof this.options.background=="string"){let _=p.querySelectorAll(this.options.background);for(let w of _)this.addElementBackgroundImages(w)}};let c=/url\((['"])?(.*?)\1\)/gi;o.prototype.addElementBackgroundImages=function(p){let h=getComputedStyle(p);if(!h)return;let y=c.exec(h.backgroundImage);for(;y!==null;){let _=y&&y[2];_&&this.addBackground(_,p),y=c.exec(h.backgroundImage)}},o.prototype.addImage=function(p){let h=new u(p);this.images.push(h)},o.prototype.addBackground=function(p,h){let y=new f(p,h);this.images.push(y)},o.prototype.check=function(){if(this.progressedCount=0,this.hasAnyBroken=!1,!this.images.length){this.complete();return}let p=(h,y,_)=>{setTimeout(()=>{this.progress(h,y,_)})};this.images.forEach(function(h){h.once("progress",p),h.check()})},o.prototype.progress=function(p,h,y){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!p.isLoaded,this.emitEvent("progress",[this,p,h]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,p),this.progressedCount===this.images.length&&this.complete(),this.options.debug&&i&&i.log(`progress: ${y}`,p,h)},o.prototype.complete=function(){let p=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(p,[this]),this.emitEvent("always",[this]),this.jqDeferred){let h=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[h](this)}};function u(p){this.img=p}u.prototype=Object.create(t.prototype),u.prototype.check=function(){if(this.getIsImageComplete()){this.confirm(this.img.naturalWidth!==0,"naturalWidth");return}this.proxyImage=new Image,this.img.crossOrigin&&(this.proxyImage.crossOrigin=this.img.crossOrigin),this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.currentSrc||this.img.src},u.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},u.prototype.confirm=function(p,h){this.isLoaded=p;let{parentNode:y}=this.img,_=y.nodeName==="PICTURE"?y:this.img;this.emitEvent("progress",[this,_,h])},u.prototype.handleEvent=function(p){let h="on"+p.type;this[h]&&this[h](p)},u.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},u.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},u.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)};function f(p,h){this.url=p,this.element=h,this.img=new Image}return f.prototype=Object.create(u.prototype),f.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(this.img.naturalWidth!==0,"naturalWidth"),this.unbindEvents())},f.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},f.prototype.confirm=function(p,h){this.isLoaded=p,this.emitEvent("progress",[this,this.element,h])},o.makeJQueryPlugin=function(p){p=p||e.jQuery,p&&(r=p,r.fn.imagesLoaded=function(h,y){return new o(this,h,y).jqDeferred.promise(r(this))})},o.makeJQueryPlugin(),o})});var L0=Fe((zf,Ky)=>{(function(n,e){typeof zf=="object"&&typeof Ky=="object"?Ky.exports=e():typeof define=="function"&&define.amd?define([],e):typeof zf=="object"?zf.ReactPixel=e():n.ReactPixel=e()})(window,function(){return function(n){var e={};function t(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return n[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}return t.m=n,t.c=e,t.d=function(r,i,s){t.o(r,i)||Object.defineProperty(r,i,{enumerable:!0,get:s})},t.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},t.t=function(r,i){if(1&i&&(r=t(r)),8&i||4&i&&typeof r=="object"&&r&&r.__esModule)return r;var s=Object.create(null);if(t.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:r}),2&i&&typeof r!="string")for(var o in r)t.d(s,o,function(a){return r[a]}.bind(null,o));return s},t.n=function(r){var i=r&&r.__esModule?function(){return r.default}:function(){return r};return t.d(i,"a",i),i},t.o=function(r,i){return Object.prototype.hasOwnProperty.call(r,i)},t.p="",t(t.s=0)}([function(n,e,t){n.exports=t(1)},function(n,e,t){"use strict";function r(f){return function(p){if(Array.isArray(p)){for(var h=0,y=new Array(p.length);h<p.length;h++)y[h]=p[h];return y}}(f)||function(p){if(Symbol.iterator in Object(p)||Object.prototype.toString.call(p)==="[object Arguments]")return Array.from(p)}(f)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}t.r(e);var i=!!window.fbq,s=!1,o=function(){var f;if(s){for(var p=arguments.length,h=new Array(p),y=0;y<p;y++)h[y]=arguments[y];(f=console).info.apply(f,r(["[react-facebook-pixel]"].concat(h)))}},a=function(){var f;if(s){for(var p=arguments.length,h=new Array(p),y=0;y<p;y++)h[y]=arguments[y];(f=console).info.apply(f,r(["[react-facebook-pixel]"].concat(h)))}},c=function(){return i||o("Pixel not initialized before using call ReactPixel.init with required params"),i},u={autoConfig:!0,debug:!1};e.default={init:function(f){var p,h,y,_,w,E,D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:u;p=window,h=document,y="script",p.fbq||(_=p.fbq=function(){_.callMethod?_.callMethod.apply(_,arguments):_.queue.push(arguments)},p._fbq||(p._fbq=_),_.push=_,_.loaded=!0,_.version="2.0",_.queue=[],(w=h.createElement(y)).async=!0,w.src="https://connect.facebook.net/en_US/fbevents.js",(E=h.getElementsByTagName(y)[0]).parentNode.insertBefore(w,E)),f?(R.autoConfig===!1&&fbq("set","autoConfig",!1,f),fbq("init",f,D),i=!0,s=R.debug):o("Please insert pixel id for initializing")},pageView:function(){c()&&(fbq("track","PageView"),s&&a("called fbq('track', 'PageView');"))},track:function(f,p){c()&&(fbq("track",f,p),s&&(a("called fbq('track', '".concat(f,"');")),p&&a("with data",p)))},trackSingle:function(f,p,h){c()&&(fbq("trackSingle",f,p,h),s&&(a("called fbq('trackSingle', '".concat(f,"', '").concat(p,"');")),h&&a("with data",h)))},trackCustom:function(f,p){c()&&(fbq("trackCustom",f,p),s&&(a("called fbq('trackCustom', '".concat(f,"');")),p&&a("with data",p)))},trackSingleCustom:function(f,p,h){c()&&(fbq("trackSingle",f,p,h),s&&(a("called fbq('trackSingleCustom', '".concat(f,"', '").concat(p,"');")),h&&a("with data",h)))},grantConsent:function(){c()&&(fbq("consent","grant"),s&&a("called fbq('consent', 'grant');"))},revokeConsent:function(){c()&&(fbq("consent","revoke"),s&&a("called fbq('consent', 'revoke');"))},fbq:function(f){function p(){return f.apply(this,arguments)}return p.toString=function(){return f.toString()},p}(function(){if(c()){for(var f=arguments.length,p=new Array(f),h=0;h<f;h++)p[h]=arguments[h];fbq.apply(void 0,p),s&&(a("called fbq('".concat(p.slice(0,2).join("', '"),"')")),p[2]&&a("with data",p[2]))}})}}])})});var B0=Fe((Xy,Zy)=>{(function(n,e){typeof Xy=="object"&&typeof Zy<"u"?Zy.exports=function(t,r,i,s,o){for(r=r.split?r.split("."):r,s=0;s<r.length;s++)t=t?t[r[s]]:o;return t===o?i:t}:typeof define=="function"&&define.amd?define(function(){return function(t,r,i,s,o){for(r=r.split?r.split("."):r,s=0;s<r.length;s++)t=t?t[r[s]]:o;return t===o?i:t}}):n.dlv=function(t,r,i,s,o){for(r=r.split?r.split("."):r,s=0;s<r.length;s++)t=t?t[r[s]]:o;return t===o?i:t}})(Xy)});var Th=Tt(Ib());["production","staging"].includes("production".toString())?Th.default.start({apiKey:"41497f8f7737e792ad2193ec9469dd87",appVersion:"1729652906".toString(),releaseStage:"production".toString()}):console.log(`Bugsnag was disabled in ${"production".toString()} enviroment`);window.Bugsnag=Th.default;var HA=Tt(On()),qA=Tt(Mb()),VA=Tt(Pb());var Ah=Tt(Rc());window.jQuery=Ah.default;window.$=Ah.default;var Ch=0;document.addEventListener("turbolinks:load",()=>{document.addEventListener("ajax:send",()=>{Ch++}),document.addEventListener("ajax:complete",()=>{Ch--})});window.pendingRequests=Ch;var cp={};He(cp,{Alert:()=>Ss,Button:()=>Ts,Carousel:()=>xi,Collapse:()=>Oi,Dropdown:()=>$n,Modal:()=>Jr,Offcanvas:()=>br,Popover:()=>Ro,ScrollSpy:()=>Cs,Tab:()=>ti,Toast:()=>As,Tooltip:()=>ei});var Vc={};He(Vc,{afterMain:()=>Vb,afterRead:()=>jb,afterWrite:()=>Wb,applyStyles:()=>bo,arrow:()=>Nc,auto:()=>Da,basePlacements:()=>Ur,beforeMain:()=>Hb,beforeRead:()=>Fb,beforeWrite:()=>$b,bottom:()=>Jt,clippingParents:()=>Dh,computeStyles:()=>_o,createPopper:()=>La,createPopperBase:()=>eE,createPopperLite:()=>tE,detectOverflow:()=>Cn,end:()=>Si,eventListeners:()=>wo,flip:()=>Bc,hide:()=>jc,left:()=>Wt,main:()=>qb,modifierPhases:()=>Oh,offset:()=>Hc,placements:()=>Oa,popper:()=>ds,popperGenerator:()=>bs,popperOffsets:()=>Co,preventOverflow:()=>qc,read:()=>Bb,reference:()=>xh,right:()=>Qt,start:()=>Or,top:()=>qt,variationPlacements:()=>Mc,viewport:()=>xa,write:()=>zb});var qt="top",Jt="bottom",Qt="right",Wt="left",Da="auto",Ur=[qt,Jt,Qt,Wt],Or="start",Si="end",Dh="clippingParents",xa="viewport",ds="popper",xh="reference",Mc=Ur.reduce(function(n,e){return n.concat([e+"-"+Or,e+"-"+Si])},[]),Oa=[].concat(Ur,[Da]).reduce(function(n,e){return n.concat([e,e+"-"+Or,e+"-"+Si])},[]),Fb="beforeRead",Bb="read",jb="afterRead",Hb="beforeMain",qb="main",Vb="afterMain",$b="beforeWrite",zb="write",Wb="afterWrite",Oh=[Fb,Bb,jb,Hb,qb,Vb,$b,zb,Wb];function cn(n){return n?(n.nodeName||"").toLowerCase():null}function Vt(n){if(n==null)return window;if(n.toString()!=="[object Window]"){var e=n.ownerDocument;return e&&e.defaultView||window}return n}function er(n){var e=Vt(n).Element;return n instanceof e||n instanceof Element}function sn(n){var e=Vt(n).HTMLElement;return n instanceof e||n instanceof HTMLElement}function yo(n){if(typeof ShadowRoot>"u")return!1;var e=Vt(n).ShadowRoot;return n instanceof e||n instanceof ShadowRoot}function uD(n){var e=n.state;Object.keys(e.elements).forEach(function(t){var r=e.styles[t]||{},i=e.attributes[t]||{},s=e.elements[t];!sn(s)||!cn(s)||(Object.assign(s.style,r),Object.keys(i).forEach(function(o){var a=i[o];a===!1?s.removeAttribute(o):s.setAttribute(o,a===!0?"":a)}))})}function dD(n){var e=n.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(r){var i=e.elements[r],s=e.attributes[r]||{},o=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:t[r]),a=o.reduce(function(c,u){return c[u]="",c},{});!sn(i)||!cn(i)||(Object.assign(i.style,a),Object.keys(s).forEach(function(c){i.removeAttribute(c)}))})}}var bo={name:"applyStyles",enabled:!0,phase:"write",fn:uD,effect:dD,requires:["computeStyles"]};function un(n){return n.split("-")[0]}var vr=Math.max,fs=Math.min,Yr=Math.round;function Eo(){var n=navigator.userAgentData;return n!=null&&n.brands?n.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Ia(){return!/^((?!chrome|android).)*safari/i.test(Eo())}function tr(n,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var r=n.getBoundingClientRect(),i=1,s=1;e&&sn(n)&&(i=n.offsetWidth>0&&Yr(r.width)/n.offsetWidth||1,s=n.offsetHeight>0&&Yr(r.height)/n.offsetHeight||1);var o=er(n)?Vt(n):window,a=o.visualViewport,c=!Ia()&&t,u=(r.left+(c&&a?a.offsetLeft:0))/i,f=(r.top+(c&&a?a.offsetTop:0))/s,p=r.width/i,h=r.height/s;return{width:p,height:h,top:f,right:u+p,bottom:f+h,left:u,x:u,y:f}}function hs(n){var e=tr(n),t=n.offsetWidth,r=n.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:n.offsetLeft,y:n.offsetTop,width:t,height:r}}function ka(n,e){var t=e.getRootNode&&e.getRootNode();if(n.contains(e))return!0;if(t&&yo(t)){var r=e;do{if(r&&n.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Tn(n){return Vt(n).getComputedStyle(n)}function Ih(n){return["table","td","th"].indexOf(cn(n))>=0}function gn(n){return((er(n)?n.ownerDocument:n.document)||window.document).documentElement}function Gr(n){return cn(n)==="html"?n:n.assignedSlot||n.parentNode||(yo(n)?n.host:null)||gn(n)}function Ub(n){return!sn(n)||Tn(n).position==="fixed"?null:n.offsetParent}function fD(n){var e=/firefox/i.test(Eo()),t=/Trident/i.test(Eo());if(t&&sn(n)){var r=Tn(n);if(r.position==="fixed")return null}var i=Gr(n);for(yo(i)&&(i=i.host);sn(i)&&["html","body"].indexOf(cn(i))<0;){var s=Tn(i);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||e&&s.willChange==="filter"||e&&s.filter&&s.filter!=="none")return i;i=i.parentNode}return null}function yr(n){for(var e=Vt(n),t=Ub(n);t&&Ih(t)&&Tn(t).position==="static";)t=Ub(t);return t&&(cn(t)==="html"||cn(t)==="body"&&Tn(t).position==="static")?e:t||fD(n)||e}function ps(n){return["top","bottom"].indexOf(n)>=0?"x":"y"}function gs(n,e,t){return vr(n,fs(e,t))}function Yb(n,e,t){var r=gs(n,e,t);return r>t?t:r}function Ra(){return{top:0,right:0,bottom:0,left:0}}function Ma(n){return Object.assign({},Ra(),n)}function Na(n,e){return e.reduce(function(t,r){return t[r]=n,t},{})}var hD=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,Ma(typeof e!="number"?e:Na(e,Ur))};function pD(n){var e,t=n.state,r=n.name,i=n.options,s=t.elements.arrow,o=t.modifiersData.popperOffsets,a=un(t.placement),c=ps(a),u=[Wt,Qt].indexOf(a)>=0,f=u?"height":"width";if(!(!s||!o)){var p=hD(i.padding,t),h=hs(s),y=c==="y"?qt:Wt,_=c==="y"?Jt:Qt,w=t.rects.reference[f]+t.rects.reference[c]-o[c]-t.rects.popper[f],E=o[c]-t.rects.reference[c],D=yr(s),R=D?c==="y"?D.clientHeight||0:D.clientWidth||0:0,H=w/2-E/2,F=p[y],m=R-h[f]-p[_],Q=R/2-h[f]/2+H,le=gs(F,Q,m),J=c;t.modifiersData[r]=(e={},e[J]=le,e.centerOffset=le-Q,e)}}function gD(n){var e=n.state,t=n.options,r=t.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||ka(e.elements.popper,i)&&(e.elements.arrow=i))}var Nc={name:"arrow",enabled:!0,phase:"main",fn:pD,effect:gD,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function nr(n){return n.split("-")[1]}var mD={top:"auto",right:"auto",bottom:"auto",left:"auto"};function vD(n){var e=n.x,t=n.y,r=window,i=r.devicePixelRatio||1;return{x:Yr(e*i)/i||0,y:Yr(t*i)/i||0}}function Gb(n){var e,t=n.popper,r=n.popperRect,i=n.placement,s=n.variation,o=n.offsets,a=n.position,c=n.gpuAcceleration,u=n.adaptive,f=n.roundOffsets,p=n.isFixed,h=o.x,y=h===void 0?0:h,_=o.y,w=_===void 0?0:_,E=typeof f=="function"?f({x:y,y:w}):{x:y,y:w};y=E.x,w=E.y;var D=o.hasOwnProperty("x"),R=o.hasOwnProperty("y"),H=Wt,F=qt,m=window;if(u){var Q=yr(t),le="clientHeight",J="clientWidth";if(Q===Vt(t)&&(Q=gn(t),Tn(Q).position!=="static"&&a==="absolute"&&(le="scrollHeight",J="scrollWidth")),Q=Q,i===qt||(i===Wt||i===Qt)&&s===Si){F=Jt;var q=p&&Q===m&&m.visualViewport?m.visualViewport.height:Q[le];w-=q-r.height,w*=c?1:-1}if(i===Wt||(i===qt||i===Jt)&&s===Si){H=Qt;var Z=p&&Q===m&&m.visualViewport?m.visualViewport.width:Q[J];y-=Z-r.width,y*=c?1:-1}}var ae=Object.assign({position:a},u&&mD),Ce=f===!0?vD({x:y,y:w}):{x:y,y:w};if(y=Ce.x,w=Ce.y,c){var Ae;return Object.assign({},ae,(Ae={},Ae[F]=R?"0":"",Ae[H]=D?"0":"",Ae.transform=(m.devicePixelRatio||1)<=1?"translate("+y+"px, "+w+"px)":"translate3d("+y+"px, "+w+"px, 0)",Ae))}return Object.assign({},ae,(e={},e[F]=R?w+"px":"",e[H]=D?y+"px":"",e.transform="",e))}function yD(n){var e=n.state,t=n.options,r=t.gpuAcceleration,i=r===void 0?!0:r,s=t.adaptive,o=s===void 0?!0:s,a=t.roundOffsets,c=a===void 0?!0:a;if(!1)var u;var f={placement:un(e.placement),variation:nr(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Gb(Object.assign({},f,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:c})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Gb(Object.assign({},f,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var _o={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:yD,data:{}};var Pc={passive:!0};function bD(n){var e=n.state,t=n.instance,r=n.options,i=r.scroll,s=i===void 0?!0:i,o=r.resize,a=o===void 0?!0:o,c=Vt(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return s&&u.forEach(function(f){f.addEventListener("scroll",t.update,Pc)}),a&&c.addEventListener("resize",t.update,Pc),function(){s&&u.forEach(function(f){f.removeEventListener("scroll",t.update,Pc)}),a&&c.removeEventListener("resize",t.update,Pc)}}var wo={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:bD,data:{}};var ED={left:"right",right:"left",bottom:"top",top:"bottom"};function So(n){return n.replace(/left|right|bottom|top/g,function(e){return ED[e]})}var _D={start:"end",end:"start"};function Lc(n){return n.replace(/start|end/g,function(e){return _D[e]})}function ms(n){var e=Vt(n),t=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:t,scrollTop:r}}function vs(n){return tr(gn(n)).left+ms(n).scrollLeft}function kh(n,e){var t=Vt(n),r=gn(n),i=t.visualViewport,s=r.clientWidth,o=r.clientHeight,a=0,c=0;if(i){s=i.width,o=i.height;var u=Ia();(u||!u&&e==="fixed")&&(a=i.offsetLeft,c=i.offsetTop)}return{width:s,height:o,x:a+vs(n),y:c}}function Rh(n){var e,t=gn(n),r=ms(n),i=(e=n.ownerDocument)==null?void 0:e.body,s=vr(t.scrollWidth,t.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=vr(t.scrollHeight,t.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+vs(n),c=-r.scrollTop;return Tn(i||t).direction==="rtl"&&(a+=vr(t.clientWidth,i?i.clientWidth:0)-s),{width:s,height:o,x:a,y:c}}function ys(n){var e=Tn(n),t=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+i+r)}function Fc(n){return["html","body","#document"].indexOf(cn(n))>=0?n.ownerDocument.body:sn(n)&&ys(n)?n:Fc(Gr(n))}function Ti(n,e){var t;e===void 0&&(e=[]);var r=Fc(n),i=r===((t=n.ownerDocument)==null?void 0:t.body),s=Vt(r),o=i?[s].concat(s.visualViewport||[],ys(r)?r:[]):r,a=e.concat(o);return i?a:a.concat(Ti(Gr(o)))}function To(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function wD(n,e){var t=tr(n,!1,e==="fixed");return t.top=t.top+n.clientTop,t.left=t.left+n.clientLeft,t.bottom=t.top+n.clientHeight,t.right=t.left+n.clientWidth,t.width=n.clientWidth,t.height=n.clientHeight,t.x=t.left,t.y=t.top,t}function Kb(n,e,t){return e===xa?To(kh(n,t)):er(e)?wD(e,t):To(Rh(gn(n)))}function SD(n){var e=Ti(Gr(n)),t=["absolute","fixed"].indexOf(Tn(n).position)>=0,r=t&&sn(n)?yr(n):n;return er(r)?e.filter(function(i){return er(i)&&ka(i,r)&&cn(i)!=="body"}):[]}function Mh(n,e,t,r){var i=e==="clippingParents"?SD(n):[].concat(e),s=[].concat(i,[t]),o=s[0],a=s.reduce(function(c,u){var f=Kb(n,u,r);return c.top=vr(f.top,c.top),c.right=fs(f.right,c.right),c.bottom=fs(f.bottom,c.bottom),c.left=vr(f.left,c.left),c},Kb(n,o,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Pa(n){var e=n.reference,t=n.element,r=n.placement,i=r?un(r):null,s=r?nr(r):null,o=e.x+e.width/2-t.width/2,a=e.y+e.height/2-t.height/2,c;switch(i){case qt:c={x:o,y:e.y-t.height};break;case Jt:c={x:o,y:e.y+e.height};break;case Qt:c={x:e.x+e.width,y:a};break;case Wt:c={x:e.x-t.width,y:a};break;default:c={x:e.x,y:e.y}}var u=i?ps(i):null;if(u!=null){var f=u==="y"?"height":"width";switch(s){case Or:c[u]=c[u]-(e[f]/2-t[f]/2);break;case Si:c[u]=c[u]+(e[f]/2-t[f]/2);break;default:}}return c}function Cn(n,e){e===void 0&&(e={});var t=e,r=t.placement,i=r===void 0?n.placement:r,s=t.strategy,o=s===void 0?n.strategy:s,a=t.boundary,c=a===void 0?Dh:a,u=t.rootBoundary,f=u===void 0?xa:u,p=t.elementContext,h=p===void 0?ds:p,y=t.altBoundary,_=y===void 0?!1:y,w=t.padding,E=w===void 0?0:w,D=Ma(typeof E!="number"?E:Na(E,Ur)),R=h===ds?xh:ds,H=n.rects.popper,F=n.elements[_?R:h],m=Mh(er(F)?F:F.contextElement||gn(n.elements.popper),c,f,o),Q=tr(n.elements.reference),le=Pa({reference:Q,element:H,strategy:"absolute",placement:i}),J=To(Object.assign({},H,le)),q=h===ds?J:Q,Z={top:m.top-q.top+D.top,bottom:q.bottom-m.bottom+D.bottom,left:m.left-q.left+D.left,right:q.right-m.right+D.right},ae=n.modifiersData.offset;if(h===ds&&ae){var Ce=ae[i];Object.keys(Z).forEach(function(Ae){var _e=[Qt,Jt].indexOf(Ae)>=0?1:-1,Le=[qt,Jt].indexOf(Ae)>=0?"y":"x";Z[Ae]+=Ce[Le]*_e})}return Z}function Nh(n,e){e===void 0&&(e={});var t=e,r=t.placement,i=t.boundary,s=t.rootBoundary,o=t.padding,a=t.flipVariations,c=t.allowedAutoPlacements,u=c===void 0?Oa:c,f=nr(r),p=f?a?Mc:Mc.filter(function(_){return nr(_)===f}):Ur,h=p.filter(function(_){return u.indexOf(_)>=0});h.length===0&&(h=p);var y=h.reduce(function(_,w){return _[w]=Cn(n,{placement:w,boundary:i,rootBoundary:s,padding:o})[un(w)],_},{});return Object.keys(y).sort(function(_,w){return y[_]-y[w]})}function TD(n){if(un(n)===Da)return[];var e=So(n);return[Lc(n),e,Lc(e)]}function CD(n){var e=n.state,t=n.options,r=n.name;if(!e.modifiersData[r]._skip){for(var i=t.mainAxis,s=i===void 0?!0:i,o=t.altAxis,a=o===void 0?!0:o,c=t.fallbackPlacements,u=t.padding,f=t.boundary,p=t.rootBoundary,h=t.altBoundary,y=t.flipVariations,_=y===void 0?!0:y,w=t.allowedAutoPlacements,E=e.options.placement,D=un(E),R=D===E,H=c||(R||!_?[So(E)]:TD(E)),F=[E].concat(H).reduce(function(lt,xe){return lt.concat(un(xe)===Da?Nh(e,{placement:xe,boundary:f,rootBoundary:p,padding:u,flipVariations:_,allowedAutoPlacements:w}):xe)},[]),m=e.rects.reference,Q=e.rects.popper,le=new Map,J=!0,q=F[0],Z=0;Z<F.length;Z++){var ae=F[Z],Ce=un(ae),Ae=nr(ae)===Or,_e=[qt,Jt].indexOf(Ce)>=0,Le=_e?"width":"height",Ve=Cn(e,{placement:ae,boundary:f,rootBoundary:p,altBoundary:h,padding:u}),$e=_e?Ae?Qt:Wt:Ae?Jt:qt;m[Le]>Q[Le]&&($e=So($e));var pe=So($e),ce=[];if(s&&ce.push(Ve[Ce]<=0),a&&ce.push(Ve[$e]<=0,Ve[pe]<=0),ce.every(function(lt){return lt})){q=ae,J=!1;break}le.set(ae,ce)}if(J)for(var Oe=_?3:1,Qe=function(xe){var b=F.find(function(C){var O=le.get(C);if(O)return O.slice(0,xe).every(function(U){return U})});if(b)return q=b,"break"},Ge=Oe;Ge>0;Ge--){var We=Qe(Ge);if(We==="break")break}e.placement!==q&&(e.modifiersData[r]._skip=!0,e.placement=q,e.reset=!0)}}var Bc={name:"flip",enabled:!0,phase:"main",fn:CD,requiresIfExists:["offset"],data:{_skip:!1}};function Qb(n,e,t){return t===void 0&&(t={x:0,y:0}),{top:n.top-e.height-t.y,right:n.right-e.width+t.x,bottom:n.bottom-e.height+t.y,left:n.left-e.width-t.x}}function Xb(n){return[qt,Qt,Jt,Wt].some(function(e){return n[e]>=0})}function AD(n){var e=n.state,t=n.name,r=e.rects.reference,i=e.rects.popper,s=e.modifiersData.preventOverflow,o=Cn(e,{elementContext:"reference"}),a=Cn(e,{altBoundary:!0}),c=Qb(o,r),u=Qb(a,i,s),f=Xb(c),p=Xb(u);e.modifiersData[t]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:f,hasPopperEscaped:p},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":p})}var jc={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:AD};function DD(n,e,t){var r=un(n),i=[Wt,qt].indexOf(r)>=0?-1:1,s=typeof t=="function"?t(Object.assign({},e,{placement:n})):t,o=s[0],a=s[1];return o=o||0,a=(a||0)*i,[Wt,Qt].indexOf(r)>=0?{x:a,y:o}:{x:o,y:a}}function xD(n){var e=n.state,t=n.options,r=n.name,i=t.offset,s=i===void 0?[0,0]:i,o=Oa.reduce(function(f,p){return f[p]=DD(p,e.rects,s),f},{}),a=o[e.placement],c=a.x,u=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=c,e.modifiersData.popperOffsets.y+=u),e.modifiersData[r]=o}var Hc={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:xD};function OD(n){var e=n.state,t=n.name;e.modifiersData[t]=Pa({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var Co={name:"popperOffsets",enabled:!0,phase:"read",fn:OD,data:{}};function Ph(n){return n==="x"?"y":"x"}function ID(n){var e=n.state,t=n.options,r=n.name,i=t.mainAxis,s=i===void 0?!0:i,o=t.altAxis,a=o===void 0?!1:o,c=t.boundary,u=t.rootBoundary,f=t.altBoundary,p=t.padding,h=t.tether,y=h===void 0?!0:h,_=t.tetherOffset,w=_===void 0?0:_,E=Cn(e,{boundary:c,rootBoundary:u,padding:p,altBoundary:f}),D=un(e.placement),R=nr(e.placement),H=!R,F=ps(D),m=Ph(F),Q=e.modifiersData.popperOffsets,le=e.rects.reference,J=e.rects.popper,q=typeof w=="function"?w(Object.assign({},e.rects,{placement:e.placement})):w,Z=typeof q=="number"?{mainAxis:q,altAxis:q}:Object.assign({mainAxis:0,altAxis:0},q),ae=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,Ce={x:0,y:0};if(Q){if(s){var Ae,_e=F==="y"?qt:Wt,Le=F==="y"?Jt:Qt,Ve=F==="y"?"height":"width",$e=Q[F],pe=$e+E[_e],ce=$e-E[Le],Oe=y?-J[Ve]/2:0,Qe=R===Or?le[Ve]:J[Ve],Ge=R===Or?-J[Ve]:-le[Ve],We=e.elements.arrow,lt=y&&We?hs(We):{width:0,height:0},xe=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Ra(),b=xe[_e],C=xe[Le],O=gs(0,le[Ve],lt[Ve]),U=H?le[Ve]/2-Oe-O-b-Z.mainAxis:Qe-O-b-Z.mainAxis,K=H?-le[Ve]/2+Oe+O+C+Z.mainAxis:Ge+O+C+Z.mainAxis,Y=e.elements.arrow&&yr(e.elements.arrow),ee=Y?F==="y"?Y.clientTop||0:Y.clientLeft||0:0,ge=(Ae=ae?.[F])!=null?Ae:0,be=$e+U-ge-ee,ue=$e+K-ge,Se=gs(y?fs(pe,be):pe,$e,y?vr(ce,ue):ce);Q[F]=Se,Ce[F]=Se-$e}if(a){var bt,nt=F==="x"?qt:Wt,rt=F==="x"?Jt:Qt,ut=Q[m],_t=m==="y"?"height":"width",vt=ut+E[nt],ke=ut-E[rt],kt=[qt,Wt].indexOf(D)!==-1,Ke=(bt=ae?.[m])!=null?bt:0,zt=kt?vt:ut-le[_t]-J[_t]-Ke+Z.altAxis,an=kt?ut+le[_t]+J[_t]-Ke-Z.altAxis:ke,dn=y&&kt?Yb(zt,ut,an):gs(y?zt:vt,ut,y?an:ke);Q[m]=dn,Ce[m]=dn-ut}e.modifiersData[r]=Ce}}var qc={name:"preventOverflow",enabled:!0,phase:"main",fn:ID,requiresIfExists:["offset"]};function Lh(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}function Fh(n){return n===Vt(n)||!sn(n)?ms(n):Lh(n)}function kD(n){var e=n.getBoundingClientRect(),t=Yr(e.width)/n.offsetWidth||1,r=Yr(e.height)/n.offsetHeight||1;return t!==1||r!==1}function Bh(n,e,t){t===void 0&&(t=!1);var r=sn(e),i=sn(e)&&kD(e),s=gn(e),o=tr(n,i,t),a={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!t)&&((cn(e)!=="body"||ys(s))&&(a=Fh(e)),sn(e)?(c=tr(e,!0),c.x+=e.clientLeft,c.y+=e.clientTop):s&&(c.x=vs(s))),{x:o.left+a.scrollLeft-c.x,y:o.top+a.scrollTop-c.y,width:o.width,height:o.height}}function RD(n){var e=new Map,t=new Set,r=[];n.forEach(function(s){e.set(s.name,s)});function i(s){t.add(s.name);var o=[].concat(s.requires||[],s.requiresIfExists||[]);o.forEach(function(a){if(!t.has(a)){var c=e.get(a);c&&i(c)}}),r.push(s)}return n.forEach(function(s){t.has(s.name)||i(s)}),r}function jh(n){var e=RD(n);return Oh.reduce(function(t,r){return t.concat(e.filter(function(i){return i.phase===r}))},[])}function Hh(n){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(n())})})),e}}function qh(n){var e=n.reduce(function(t,r){var i=t[r.name];return t[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,t},{});return Object.keys(e).map(function(t){return e[t]})}var Zb={placement:"bottom",modifiers:[],strategy:"absolute"};function Jb(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function bs(n){n===void 0&&(n={});var e=n,t=e.defaultModifiers,r=t===void 0?[]:t,i=e.defaultOptions,s=i===void 0?Zb:i;return function(a,c,u){u===void 0&&(u=s);var f={placement:"bottom",orderedModifiers:[],options:Object.assign({},Zb,s),modifiersData:{},elements:{reference:a,popper:c},attributes:{},styles:{}},p=[],h=!1,y={state:f,setOptions:function(D){var R=typeof D=="function"?D(f.options):D;w(),f.options=Object.assign({},s,f.options,R),f.scrollParents={reference:er(a)?Ti(a):a.contextElement?Ti(a.contextElement):[],popper:Ti(c)};var H=jh(qh([].concat(r,f.options.modifiers)));if(f.orderedModifiers=H.filter(function(ae){return ae.enabled}),!1){var F;if(getBasePlacement(f.options.placement)===auto)var m;var Q,le,J,q,Z}return _(),y.update()},forceUpdate:function(){if(!h){var D=f.elements,R=D.reference,H=D.popper;if(Jb(R,H)){f.rects={reference:Bh(R,yr(H),f.options.strategy==="fixed"),popper:hs(H)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach(function(ae){return f.modifiersData[ae.name]=Object.assign({},ae.data)});for(var F=0,m=0;m<f.orderedModifiers.length;m++){if(f.reset===!0){f.reset=!1,m=-1;continue}var Q=f.orderedModifiers[m],le=Q.fn,J=Q.options,q=J===void 0?{}:J,Z=Q.name;typeof le=="function"&&(f=le({state:f,options:q,name:Z,instance:y})||f)}}}},update:Hh(function(){return new Promise(function(E){y.forceUpdate(),E(f)})}),destroy:function(){w(),h=!0}};if(!Jb(a,c))return y;y.setOptions(u).then(function(E){!h&&u.onFirstUpdate&&u.onFirstUpdate(E)});function _(){f.orderedModifiers.forEach(function(E){var D=E.name,R=E.options,H=R===void 0?{}:R,F=E.effect;if(typeof F=="function"){var m=F({state:f,name:D,instance:y,options:H}),Q=function(){};p.push(m||Q)}})}function w(){p.forEach(function(E){return E()}),p=[]}return y}}var eE=bs();var MD=[wo,Co,_o,bo],tE=bs({defaultModifiers:MD});var ND=[wo,Co,_o,bo,Hc,Bc,qc,Nc,jc],La=bs({defaultModifiers:ND});var PD=1e6,LD=1e3,tp="transitionend",FD=n=>n==null?`${n}`:Object.prototype.toString.call(n).match(/\s([a-z]+)/i)[1].toLowerCase(),BD=n=>{do n+=Math.floor(Math.random()*PD);while(document.getElementById(n));return n},OE=n=>{let e=n.getAttribute("data-bs-target");if(!e||e==="#"){let t=n.getAttribute("href");if(!t||!t.includes("#")&&!t.startsWith("."))return null;t.includes("#")&&!t.startsWith("#")&&(t=`#${t.split("#")[1]}`),e=t&&t!=="#"?t.trim():null}return e},IE=n=>{let e=OE(n);return e&&document.querySelector(e)?e:null},Qr=n=>{let e=OE(n);return e?document.querySelector(e):null},jD=n=>{if(!n)return 0;let{transitionDuration:e,transitionDelay:t}=window.getComputedStyle(n),r=Number.parseFloat(e),i=Number.parseFloat(t);return!r&&!i?0:(e=e.split(",")[0],t=t.split(",")[0],(Number.parseFloat(e)+Number.parseFloat(t))*LD)},kE=n=>{n.dispatchEvent(new Event(tp))},Xr=n=>!n||typeof n!="object"?!1:(typeof n.jquery<"u"&&(n=n[0]),typeof n.nodeType<"u"),Ai=n=>Xr(n)?n.jquery?n[0]:n:typeof n=="string"&&n.length>0?document.querySelector(n):null,Mo=n=>{if(!Xr(n)||n.getClientRects().length===0)return!1;let e=getComputedStyle(n).getPropertyValue("visibility")==="visible",t=n.closest("details:not([open])");if(!t)return e;if(t!==n){let r=n.closest("summary");if(r&&r.parentNode!==t||r===null)return!1}return e},Di=n=>!n||n.nodeType!==Node.ELEMENT_NODE||n.classList.contains("disabled")?!0:typeof n.disabled<"u"?n.disabled:n.hasAttribute("disabled")&&n.getAttribute("disabled")!=="false",RE=n=>{if(!document.documentElement.attachShadow)return null;if(typeof n.getRootNode=="function"){let e=n.getRootNode();return e instanceof ShadowRoot?e:null}return n instanceof ShadowRoot?n:n.parentNode?RE(n.parentNode):null},Xc=()=>{},Ha=n=>{n.offsetHeight},ME=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,Vh=[],HD=n=>{document.readyState==="loading"?(Vh.length||document.addEventListener("DOMContentLoaded",()=>{for(let e of Vh)e()}),Vh.push(n)):n()},rr=()=>document.documentElement.dir==="rtl",ir=n=>{HD(()=>{let e=ME();if(e){let t=n.NAME,r=e.fn[t];e.fn[t]=n.jQueryInterface,e.fn[t].Constructor=n,e.fn[t].noConflict=()=>(e.fn[t]=r,n.jQueryInterface)}})},Kr=n=>{typeof n=="function"&&n()},NE=(n,e,t=!0)=>{if(!t){Kr(n);return}let r=5,i=jD(e)+r,s=!1,o=({target:a})=>{a===e&&(s=!0,e.removeEventListener(tp,o),Kr(n))};e.addEventListener(tp,o),setTimeout(()=>{s||kE(e)},i)},sp=(n,e,t,r)=>{let i=n.length,s=n.indexOf(e);return s===-1?!t&&r?n[i-1]:n[0]:(s+=t?1:-1,r&&(s=(s+i)%i),n[Math.max(0,Math.min(s,i-1))])},qD=/[^.]*(?=\..*)\.|.*/,VD=/\..*/,$D=/::\d+$/,$h={},nE=1,PE={mouseenter:"mouseover",mouseleave:"mouseout"},zD=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function LE(n,e){return e&&`${e}::${nE++}`||n.uidEvent||nE++}function FE(n){let e=LE(n);return n.uidEvent=e,$h[e]=$h[e]||{},$h[e]}function WD(n,e){return function t(r){return op(r,{delegateTarget:n}),t.oneOff&&De.off(n,r.type,e),e.apply(n,[r])}}function UD(n,e,t){return function r(i){let s=n.querySelectorAll(e);for(let{target:o}=i;o&&o!==this;o=o.parentNode)for(let a of s)if(a===o)return op(i,{delegateTarget:o}),r.oneOff&&De.off(n,i.type,e,t),t.apply(o,[i])}}function BE(n,e,t=null){return Object.values(n).find(r=>r.callable===e&&r.delegationSelector===t)}function jE(n,e,t){let r=typeof e=="string",i=r?t:e||t,s=HE(n);return zD.has(s)||(s=n),[r,i,s]}function rE(n,e,t,r,i){if(typeof e!="string"||!n)return;let[s,o,a]=jE(e,t,r);e in PE&&(o=(_=>function(w){if(!w.relatedTarget||w.relatedTarget!==w.delegateTarget&&!w.delegateTarget.contains(w.relatedTarget))return _.call(this,w)})(o));let c=FE(n),u=c[a]||(c[a]={}),f=BE(u,o,s?t:null);if(f){f.oneOff=f.oneOff&&i;return}let p=LE(o,e.replace(qD,"")),h=s?UD(n,t,o):WD(n,o);h.delegationSelector=s?t:null,h.callable=o,h.oneOff=i,h.uidEvent=p,u[p]=h,n.addEventListener(a,h,s)}function np(n,e,t,r,i){let s=BE(e[t],r,i);s&&(n.removeEventListener(t,s,Boolean(i)),delete e[t][s.uidEvent])}function YD(n,e,t,r){let i=e[t]||{};for(let s of Object.keys(i))if(s.includes(r)){let o=i[s];np(n,e,t,o.callable,o.delegationSelector)}}function HE(n){return n=n.replace(VD,""),PE[n]||n}var De={on(n,e,t,r){rE(n,e,t,r,!1)},one(n,e,t,r){rE(n,e,t,r,!0)},off(n,e,t,r){if(typeof e!="string"||!n)return;let[i,s,o]=jE(e,t,r),a=o!==e,c=FE(n),u=c[o]||{},f=e.startsWith(".");if(typeof s<"u"){if(!Object.keys(u).length)return;np(n,c,o,s,i?t:null);return}if(f)for(let p of Object.keys(c))YD(n,c,p,e.slice(1));for(let p of Object.keys(u)){let h=p.replace($D,"");if(!a||e.includes(h)){let y=u[p];np(n,c,o,y.callable,y.delegationSelector)}}},trigger(n,e,t){if(typeof e!="string"||!n)return null;let r=ME(),i=HE(e),s=e!==i,o=null,a=!0,c=!0,u=!1;s&&r&&(o=r.Event(e,t),r(n).trigger(o),a=!o.isPropagationStopped(),c=!o.isImmediatePropagationStopped(),u=o.isDefaultPrevented());let f=new Event(e,{bubbles:a,cancelable:!0});return f=op(f,t),u&&f.preventDefault(),c&&n.dispatchEvent(f),f.defaultPrevented&&o&&o.preventDefault(),f}};function op(n,e){for(let[t,r]of Object.entries(e||{}))try{n[t]=r}catch{Object.defineProperty(n,t,{configurable:!0,get(){return r}})}return n}var Ci=new Map,zh={set(n,e,t){Ci.has(n)||Ci.set(n,new Map);let r=Ci.get(n);if(!r.has(e)&&r.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(r.keys())[0]}.`);return}r.set(e,t)},get(n,e){return Ci.has(n)&&Ci.get(n).get(e)||null},remove(n,e){if(!Ci.has(n))return;let t=Ci.get(n);t.delete(e),t.size===0&&Ci.delete(n)}};function iE(n){if(n==="true")return!0;if(n==="false")return!1;if(n===Number(n).toString())return Number(n);if(n===""||n==="null")return null;if(typeof n!="string")return n;try{return JSON.parse(decodeURIComponent(n))}catch{return n}}function Wh(n){return n.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}var Zr={setDataAttribute(n,e,t){n.setAttribute(`data-bs-${Wh(e)}`,t)},removeDataAttribute(n,e){n.removeAttribute(`data-bs-${Wh(e)}`)},getDataAttributes(n){if(!n)return{};let e={},t=Object.keys(n.dataset).filter(r=>r.startsWith("bs")&&!r.startsWith("bsConfig"));for(let r of t){let i=r.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=iE(n.dataset[r])}return e},getDataAttribute(n,e){return iE(n.getAttribute(`data-bs-${Wh(e)}`))}},ws=class{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(e,t){let r=Xr(t)?Zr.getDataAttribute(t,"config"):{};return{...this.constructor.Default,...typeof r=="object"?r:{},...Xr(t)?Zr.getDataAttributes(t):{},...typeof e=="object"?e:{}}}_typeCheckConfig(e,t=this.constructor.DefaultType){for(let r of Object.keys(t)){let i=t[r],s=e[r],o=Xr(s)?"element":FD(s);if(!new RegExp(i).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${r}" provided type "${o}" but expected type "${i}".`)}}},GD="5.2.3",zn=class extends ws{constructor(e,t){super(),e=Ai(e),e&&(this._element=e,this._config=this._getConfig(t),zh.set(this._element,this.constructor.DATA_KEY,this))}dispose(){zh.remove(this._element,this.constructor.DATA_KEY),De.off(this._element,this.constructor.EVENT_KEY);for(let e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,t,r=!0){NE(e,t,r)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return zh.get(Ai(e),this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,typeof t=="object"?t:null)}static get VERSION(){return GD}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}},tu=(n,e="hide")=>{let t=`click.dismiss${n.EVENT_KEY}`,r=n.NAME;De.on(document,t,`[data-bs-dismiss="${r}"]`,function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),Di(this))return;let s=Qr(this)||this.closest(`.${r}`);n.getOrCreateInstance(s)[e]()})},KD="alert",QD="bs.alert",qE=`.${QD}`,XD=`close${qE}`,ZD=`closed${qE}`,JD="fade",ex="show",Ss=class extends zn{static get NAME(){return KD}close(){if(De.trigger(this._element,XD).defaultPrevented)return;this._element.classList.remove(ex);let t=this._element.classList.contains(JD);this._queueCallback(()=>this._destroyElement(),this._element,t)}_destroyElement(){this._element.remove(),De.trigger(this._element,ZD),this.dispose()}static jQueryInterface(e){return this.each(function(){let t=Ss.getOrCreateInstance(this);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e](this)}})}};tu(Ss,"close");ir(Ss);var tx="button",nx="bs.button",rx=`.${nx}`,ix=".data-api",sx="active",sE='[data-bs-toggle="button"]',ox=`click${rx}${ix}`,Ts=class extends zn{static get NAME(){return tx}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(sx))}static jQueryInterface(e){return this.each(function(){let t=Ts.getOrCreateInstance(this);e==="toggle"&&t[e]()})}};De.on(document,ox,sE,n=>{n.preventDefault();let e=n.target.closest(sE);Ts.getOrCreateInstance(e).toggle()});ir(Ts);var ft={find(n,e=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(e,n))},findOne(n,e=document.documentElement){return Element.prototype.querySelector.call(e,n)},children(n,e){return[].concat(...n.children).filter(t=>t.matches(e))},parents(n,e){let t=[],r=n.parentNode.closest(e);for(;r;)t.push(r),r=r.parentNode.closest(e);return t},prev(n,e){let t=n.previousElementSibling;for(;t;){if(t.matches(e))return[t];t=t.previousElementSibling}return[]},next(n,e){let t=n.nextElementSibling;for(;t;){if(t.matches(e))return[t];t=t.nextElementSibling}return[]},focusableChildren(n){let e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(t=>`${t}:not([tabindex^="-"])`).join(",");return this.find(e,n).filter(t=>!Di(t)&&Mo(t))}},ax="swipe",No=".bs.swipe",lx=`touchstart${No}`,cx=`touchmove${No}`,ux=`touchend${No}`,dx=`pointerdown${No}`,fx=`pointerup${No}`,hx="touch",px="pen",gx="pointer-event",mx=40,vx={endCallback:null,leftCallback:null,rightCallback:null},yx={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"},ko=class extends ws{constructor(e,t){super(),this._element=e,!(!e||!ko.isSupported())&&(this._config=this._getConfig(t),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return vx}static get DefaultType(){return yx}static get NAME(){return ax}dispose(){De.off(this._element,No)}_start(e){if(!this._supportPointerEvents){this._deltaX=e.touches[0].clientX;return}this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX)}_end(e){this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX-this._deltaX),this._handleSwipe(),Kr(this._config.endCallback)}_move(e){this._deltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this._deltaX}_handleSwipe(){let e=Math.abs(this._deltaX);if(e<=mx)return;let t=e/this._deltaX;this._deltaX=0,t&&Kr(t>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(De.on(this._element,dx,e=>this._start(e)),De.on(this._element,fx,e=>this._end(e)),this._element.classList.add(gx)):(De.on(this._element,lx,e=>this._start(e)),De.on(this._element,cx,e=>this._move(e)),De.on(this._element,ux,e=>this._end(e)))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&(e.pointerType===px||e.pointerType===hx)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}},bx="carousel",Ex="bs.carousel",Ii=`.${Ex}`,VE=".data-api",_x="ArrowLeft",wx="ArrowRight",Sx=500,Fa="next",Ao="prev",xo="left",Kc="right",Tx=`slide${Ii}`,Uh=`slid${Ii}`,Cx=`keydown${Ii}`,Ax=`mouseenter${Ii}`,Dx=`mouseleave${Ii}`,xx=`dragstart${Ii}`,Ox=`load${Ii}${VE}`,Ix=`click${Ii}${VE}`,$E="carousel",$c="active",kx="slide",Rx="carousel-item-end",Mx="carousel-item-start",Nx="carousel-item-next",Px="carousel-item-prev",zE=".active",WE=".carousel-item",Lx=zE+WE,Fx=".carousel-item img",Bx=".carousel-indicators",jx="[data-bs-slide], [data-bs-slide-to]",Hx='[data-bs-ride="carousel"]',qx={[_x]:Kc,[wx]:xo},Vx={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},$x={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"},xi=class extends zn{constructor(e,t){super(e,t),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=ft.findOne(Bx,this._element),this._addEventListeners(),this._config.ride===$E&&this.cycle()}static get Default(){return Vx}static get DefaultType(){return $x}static get NAME(){return bx}next(){this._slide(Fa)}nextWhenVisible(){!document.hidden&&Mo(this._element)&&this.next()}prev(){this._slide(Ao)}pause(){this._isSliding&&kE(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){if(this._config.ride){if(this._isSliding){De.one(this._element,Uh,()=>this.cycle());return}this.cycle()}}to(e){let t=this._getItems();if(e>t.length-1||e<0)return;if(this._isSliding){De.one(this._element,Uh,()=>this.to(e));return}let r=this._getItemIndex(this._getActive());if(r===e)return;let i=e>r?Fa:Ao;this._slide(i,t[e])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&&De.on(this._element,Cx,e=>this._keydown(e)),this._config.pause==="hover"&&(De.on(this._element,Ax,()=>this.pause()),De.on(this._element,Dx,()=>this._maybeEnableCycle())),this._config.touch&&ko.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(let r of ft.find(Fx,this._element))De.on(r,xx,i=>i.preventDefault());let t={leftCallback:()=>this._slide(this._directionToOrder(xo)),rightCallback:()=>this._slide(this._directionToOrder(Kc)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),Sx+this._config.interval))}};this._swipeHelper=new ko(this._element,t)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;let t=qx[e.key];t&&(e.preventDefault(),this._slide(this._directionToOrder(t)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;let t=ft.findOne(zE,this._indicatorsElement);t.classList.remove($c),t.removeAttribute("aria-current");let r=ft.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);r&&(r.classList.add($c),r.setAttribute("aria-current","true"))}_updateInterval(){let e=this._activeElement||this._getActive();if(!e)return;let t=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=t||this._config.defaultInterval}_slide(e,t=null){if(this._isSliding)return;let r=this._getActive(),i=e===Fa,s=t||sp(this._getItems(),r,i,this._config.wrap);if(s===r)return;let o=this._getItemIndex(s),a=y=>De.trigger(this._element,y,{relatedTarget:s,direction:this._orderToDirection(e),from:this._getItemIndex(r),to:o});if(a(Tx).defaultPrevented||!r||!s)return;let u=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=s;let f=i?Mx:Rx,p=i?Nx:Px;s.classList.add(p),Ha(s),r.classList.add(f),s.classList.add(f);let h=()=>{s.classList.remove(f,p),s.classList.add($c),r.classList.remove($c,p,f),this._isSliding=!1,a(Uh)};this._queueCallback(h,r,this._isAnimated()),u&&this.cycle()}_isAnimated(){return this._element.classList.contains(kx)}_getActive(){return ft.findOne(Lx,this._element)}_getItems(){return ft.find(WE,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return rr()?e===xo?Ao:Fa:e===xo?Fa:Ao}_orderToDirection(e){return rr()?e===Ao?xo:Kc:e===Ao?Kc:xo}static jQueryInterface(e){return this.each(function(){let t=xi.getOrCreateInstance(this,e);if(typeof e=="number"){t.to(e);return}if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e]()}})}};De.on(document,Ix,jx,function(n){let e=Qr(this);if(!e||!e.classList.contains($E))return;n.preventDefault();let t=xi.getOrCreateInstance(e),r=this.getAttribute("data-bs-slide-to");if(r){t.to(r),t._maybeEnableCycle();return}if(Zr.getDataAttribute(this,"slide")==="next"){t.next(),t._maybeEnableCycle();return}t.prev(),t._maybeEnableCycle()});De.on(window,Ox,()=>{let n=ft.find(Hx);for(let e of n)xi.getOrCreateInstance(e)});ir(xi);var zx="collapse",Wx="bs.collapse",qa=`.${Wx}`,Ux=".data-api",Yx=`show${qa}`,Gx=`shown${qa}`,Kx=`hide${qa}`,Qx=`hidden${qa}`,Xx=`click${qa}${Ux}`,Yh="show",Io="collapse",zc="collapsing",Zx="collapsed",Jx=`:scope .${Io} .${Io}`,eO="collapse-horizontal",tO="width",nO="height",rO=".collapse.show, .collapse.collapsing",rp='[data-bs-toggle="collapse"]',iO={parent:null,toggle:!0},sO={parent:"(null|element)",toggle:"boolean"},Oi=class extends zn{constructor(e,t){super(e,t),this._isTransitioning=!1,this._triggerArray=[];let r=ft.find(rp);for(let i of r){let s=IE(i),o=ft.find(s).filter(a=>a===this._element);s!==null&&o.length&&this._triggerArray.push(i)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return iO}static get DefaultType(){return sO}static get NAME(){return zx}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(rO).filter(a=>a!==this._element).map(a=>Oi.getOrCreateInstance(a,{toggle:!1}))),e.length&&e[0]._isTransitioning||De.trigger(this._element,Yx).defaultPrevented)return;for(let a of e)a.hide();let r=this._getDimension();this._element.classList.remove(Io),this._element.classList.add(zc),this._element.style[r]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;let i=()=>{this._isTransitioning=!1,this._element.classList.remove(zc),this._element.classList.add(Io,Yh),this._element.style[r]="",De.trigger(this._element,Gx)},o=`scroll${r[0].toUpperCase()+r.slice(1)}`;this._queueCallback(i,this._element,!0),this._element.style[r]=`${this._element[o]}px`}hide(){if(this._isTransitioning||!this._isShown()||De.trigger(this._element,Kx).defaultPrevented)return;let t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,Ha(this._element),this._element.classList.add(zc),this._element.classList.remove(Io,Yh);for(let i of this._triggerArray){let s=Qr(i);s&&!this._isShown(s)&&this._addAriaAndCollapsedClass([i],!1)}this._isTransitioning=!0;let r=()=>{this._isTransitioning=!1,this._element.classList.remove(zc),this._element.classList.add(Io),De.trigger(this._element,Qx)};this._element.style[t]="",this._queueCallback(r,this._element,!0)}_isShown(e=this._element){return e.classList.contains(Yh)}_configAfterMerge(e){return e.toggle=Boolean(e.toggle),e.parent=Ai(e.parent),e}_getDimension(){return this._element.classList.contains(eO)?tO:nO}_initializeChildren(){if(!this._config.parent)return;let e=this._getFirstLevelChildren(rp);for(let t of e){let r=Qr(t);r&&this._addAriaAndCollapsedClass([t],this._isShown(r))}}_getFirstLevelChildren(e){let t=ft.find(Jx,this._config.parent);return ft.find(e,this._config.parent).filter(r=>!t.includes(r))}_addAriaAndCollapsedClass(e,t){if(e.length)for(let r of e)r.classList.toggle(Zx,!t),r.setAttribute("aria-expanded",t)}static jQueryInterface(e){let t={};return typeof e=="string"&&/show|hide/.test(e)&&(t.toggle=!1),this.each(function(){let r=Oi.getOrCreateInstance(this,t);if(typeof e=="string"){if(typeof r[e]>"u")throw new TypeError(`No method named "${e}"`);r[e]()}})}};De.on(document,Xx,rp,function(n){(n.target.tagName==="A"||n.delegateTarget&&n.delegateTarget.tagName==="A")&&n.preventDefault();let e=IE(this),t=ft.find(e);for(let r of t)Oi.getOrCreateInstance(r,{toggle:!1}).toggle()});ir(Oi);var oE="dropdown",oO="bs.dropdown",Ds=`.${oO}`,ap=".data-api",aO="Escape",aE="Tab",lO="ArrowUp",lE="ArrowDown",cO=2,uO=`hide${Ds}`,dO=`hidden${Ds}`,fO=`show${Ds}`,hO=`shown${Ds}`,UE=`click${Ds}${ap}`,YE=`keydown${Ds}${ap}`,pO=`keyup${Ds}${ap}`,Oo="show",gO="dropup",mO="dropend",vO="dropstart",yO="dropup-center",bO="dropdown-center",Es='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',EO=`${Es}.${Oo}`,Qc=".dropdown-menu",_O=".navbar",wO=".navbar-nav",SO=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",TO=rr()?"top-end":"top-start",CO=rr()?"top-start":"top-end",AO=rr()?"bottom-end":"bottom-start",DO=rr()?"bottom-start":"bottom-end",xO=rr()?"left-start":"right-start",OO=rr()?"right-start":"left-start",IO="top",kO="bottom",RO={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},MO={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"},$n=class extends zn{constructor(e,t){super(e,t),this._popper=null,this._parent=this._element.parentNode,this._menu=ft.next(this._element,Qc)[0]||ft.prev(this._element,Qc)[0]||ft.findOne(Qc,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return RO}static get DefaultType(){return MO}static get NAME(){return oE}toggle(){return this._isShown()?this.hide():this.show()}show(){if(Di(this._element)||this._isShown())return;let e={relatedTarget:this._element};if(!De.trigger(this._element,fO,e).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(wO))for(let r of[].concat(...document.body.children))De.on(r,"mouseover",Xc);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Oo),this._element.classList.add(Oo),De.trigger(this._element,hO,e)}}hide(){if(Di(this._element)||!this._isShown())return;let e={relatedTarget:this._element};this._completeHide(e)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(e){if(!De.trigger(this._element,uO,e).defaultPrevented){if("ontouchstart"in document.documentElement)for(let r of[].concat(...document.body.children))De.off(r,"mouseover",Xc);this._popper&&this._popper.destroy(),this._menu.classList.remove(Oo),this._element.classList.remove(Oo),this._element.setAttribute("aria-expanded","false"),Zr.removeDataAttribute(this._menu,"popper"),De.trigger(this._element,dO,e)}}_getConfig(e){if(e=super._getConfig(e),typeof e.reference=="object"&&!Xr(e.reference)&&typeof e.reference.getBoundingClientRect!="function")throw new TypeError(`${oE.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(){if(typeof Vc>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;this._config.reference==="parent"?e=this._parent:Xr(this._config.reference)?e=Ai(this._config.reference):typeof this._config.reference=="object"&&(e=this._config.reference);let t=this._getPopperConfig();this._popper=La(e,this._menu,t)}_isShown(){return this._menu.classList.contains(Oo)}_getPlacement(){let e=this._parent;if(e.classList.contains(mO))return xO;if(e.classList.contains(vO))return OO;if(e.classList.contains(yO))return IO;if(e.classList.contains(bO))return kO;let t=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return e.classList.contains(gO)?t?CO:TO:t?DO:AO}_detectNavbar(){return this._element.closest(_O)!==null}_getOffset(){let{offset:e}=this._config;return typeof e=="string"?e.split(",").map(t=>Number.parseInt(t,10)):typeof e=="function"?t=>e(t,this._element):e}_getPopperConfig(){let e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(Zr.setDataAttribute(this._menu,"popper","static"),e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,...typeof this._config.popperConfig=="function"?this._config.popperConfig(e):this._config.popperConfig}}_selectMenuItem({key:e,target:t}){let r=ft.find(SO,this._menu).filter(i=>Mo(i));r.length&&sp(r,t,e===lE,!r.includes(t)).focus()}static jQueryInterface(e){return this.each(function(){let t=$n.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e]()}})}static clearMenus(e){if(e.button===cO||e.type==="keyup"&&e.key!==aE)return;let t=ft.find(EO);for(let r of t){let i=$n.getInstance(r);if(!i||i._config.autoClose===!1)continue;let s=e.composedPath(),o=s.includes(i._menu);if(s.includes(i._element)||i._config.autoClose==="inside"&&!o||i._config.autoClose==="outside"&&o||i._menu.contains(e.target)&&(e.type==="keyup"&&e.key===aE||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;let a={relatedTarget:i._element};e.type==="click"&&(a.clickEvent=e),i._completeHide(a)}}static dataApiKeydownHandler(e){let t=/input|textarea/i.test(e.target.tagName),r=e.key===aO,i=[lO,lE].includes(e.key);if(!i&&!r||t&&!r)return;e.preventDefault();let s=this.matches(Es)?this:ft.prev(this,Es)[0]||ft.next(this,Es)[0]||ft.findOne(Es,e.delegateTarget.parentNode),o=$n.getOrCreateInstance(s);if(i){e.stopPropagation(),o.show(),o._selectMenuItem(e);return}o._isShown()&&(e.stopPropagation(),o.hide(),s.focus())}};De.on(document,YE,Es,$n.dataApiKeydownHandler);De.on(document,YE,Qc,$n.dataApiKeydownHandler);De.on(document,UE,$n.clearMenus);De.on(document,pO,$n.clearMenus);De.on(document,UE,Es,function(n){n.preventDefault(),$n.getOrCreateInstance(this).toggle()});ir($n);var cE=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",uE=".sticky-top",Wc="padding-right",dE="margin-right",ja=class{constructor(){this._element=document.body}getWidth(){let e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){let e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,Wc,t=>t+e),this._setElementAttributes(cE,Wc,t=>t+e),this._setElementAttributes(uE,dE,t=>t-e)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,Wc),this._resetElementAttributes(cE,Wc),this._resetElementAttributes(uE,dE)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,t,r){let i=this.getWidth(),s=o=>{if(o!==this._element&&window.innerWidth>o.clientWidth+i)return;this._saveInitialAttribute(o,t);let a=window.getComputedStyle(o).getPropertyValue(t);o.style.setProperty(t,`${r(Number.parseFloat(a))}px`)};this._applyManipulationCallback(e,s)}_saveInitialAttribute(e,t){let r=e.style.getPropertyValue(t);r&&Zr.setDataAttribute(e,t,r)}_resetElementAttributes(e,t){let r=i=>{let s=Zr.getDataAttribute(i,t);if(s===null){i.style.removeProperty(t);return}Zr.removeDataAttribute(i,t),i.style.setProperty(t,s)};this._applyManipulationCallback(e,r)}_applyManipulationCallback(e,t){if(Xr(e)){t(e);return}for(let r of ft.find(e,this._element))t(r)}},GE="backdrop",NO="fade",fE="show",hE=`mousedown.bs.${GE}`,PO={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},LO={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"},Zc=class extends ws{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return PO}static get DefaultType(){return LO}static get NAME(){return GE}show(e){if(!this._config.isVisible){Kr(e);return}this._append();let t=this._getElement();this._config.isAnimated&&Ha(t),t.classList.add(fE),this._emulateAnimation(()=>{Kr(e)})}hide(e){if(!this._config.isVisible){Kr(e);return}this._getElement().classList.remove(fE),this._emulateAnimation(()=>{this.dispose(),Kr(e)})}dispose(){this._isAppended&&(De.off(this._element,hE),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){let e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add(NO),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=Ai(e.rootElement),e}_append(){if(this._isAppended)return;let e=this._getElement();this._config.rootElement.append(e),De.on(e,hE,()=>{Kr(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(e){NE(e,this._getElement(),this._config.isAnimated)}},FO="focustrap",BO="bs.focustrap",Jc=`.${BO}`,jO=`focusin${Jc}`,HO=`keydown.tab${Jc}`,qO="Tab",VO="forward",pE="backward",$O={autofocus:!0,trapElement:null},zO={autofocus:"boolean",trapElement:"element"},eu=class extends ws{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return $O}static get DefaultType(){return zO}static get NAME(){return FO}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),De.off(document,Jc),De.on(document,jO,e=>this._handleFocusin(e)),De.on(document,HO,e=>this._handleKeydown(e)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,De.off(document,Jc))}_handleFocusin(e){let{trapElement:t}=this._config;if(e.target===document||e.target===t||t.contains(e.target))return;let r=ft.focusableChildren(t);r.length===0?t.focus():this._lastTabNavDirection===pE?r[r.length-1].focus():r[0].focus()}_handleKeydown(e){e.key===qO&&(this._lastTabNavDirection=e.shiftKey?pE:VO)}},WO="modal",UO="bs.modal",Er=`.${UO}`,YO=".data-api",GO="Escape",KO=`hide${Er}`,QO=`hidePrevented${Er}`,KE=`hidden${Er}`,QE=`show${Er}`,XO=`shown${Er}`,ZO=`resize${Er}`,JO=`click.dismiss${Er}`,eI=`mousedown.dismiss${Er}`,tI=`keydown.dismiss${Er}`,nI=`click${Er}${YO}`,gE="modal-open",rI="fade",mE="show",Gh="modal-static",iI=".modal.show",sI=".modal-dialog",oI=".modal-body",aI='[data-bs-toggle="modal"]',lI={backdrop:!0,focus:!0,keyboard:!0},cI={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"},Jr=class extends zn{constructor(e,t){super(e,t),this._dialog=ft.findOne(sI,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new ja,this._addEventListeners()}static get Default(){return lI}static get DefaultType(){return cI}static get NAME(){return WO}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||this._isTransitioning||De.trigger(this._element,QE,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(gE),this._adjustDialog(),this._backdrop.show(()=>this._showElement(e)))}hide(){!this._isShown||this._isTransitioning||De.trigger(this._element,KO).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(mE),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){for(let e of[window,this._dialog])De.off(e,Er);this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Zc({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new eu({trapElement:this._element})}_showElement(e){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;let t=ft.findOne(oI,this._dialog);t&&(t.scrollTop=0),Ha(this._element),this._element.classList.add(mE);let r=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,De.trigger(this._element,XO,{relatedTarget:e})};this._queueCallback(r,this._dialog,this._isAnimated())}_addEventListeners(){De.on(this._element,tI,e=>{if(e.key===GO){if(this._config.keyboard){e.preventDefault(),this.hide();return}this._triggerBackdropTransition()}}),De.on(window,ZO,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),De.on(this._element,eI,e=>{De.one(this._element,JO,t=>{if(!(this._element!==e.target||this._element!==t.target)){if(this._config.backdrop==="static"){this._triggerBackdropTransition();return}this._config.backdrop&&this.hide()}})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(gE),this._resetAdjustments(),this._scrollBar.reset(),De.trigger(this._element,KE)})}_isAnimated(){return this._element.classList.contains(rI)}_triggerBackdropTransition(){if(De.trigger(this._element,QO).defaultPrevented)return;let t=this._element.scrollHeight>document.documentElement.clientHeight,r=this._element.style.overflowY;r==="hidden"||this._element.classList.contains(Gh)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(Gh),this._queueCallback(()=>{this._element.classList.remove(Gh),this._queueCallback(()=>{this._element.style.overflowY=r},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){let e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._scrollBar.getWidth(),r=t>0;if(r&&!e){let i=rr()?"paddingLeft":"paddingRight";this._element.style[i]=`${t}px`}if(!r&&e){let i=rr()?"paddingRight":"paddingLeft";this._element.style[i]=`${t}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,t){return this.each(function(){let r=Jr.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof r[e]>"u")throw new TypeError(`No method named "${e}"`);r[e](t)}})}};De.on(document,nI,aI,function(n){let e=Qr(this);["A","AREA"].includes(this.tagName)&&n.preventDefault(),De.one(e,QE,i=>{i.defaultPrevented||De.one(e,KE,()=>{Mo(this)&&this.focus()})});let t=ft.findOne(iI);t&&Jr.getInstance(t).hide(),Jr.getOrCreateInstance(e).toggle(this)});tu(Jr);ir(Jr);var uI="offcanvas",dI="bs.offcanvas",ni=`.${dI}`,XE=".data-api",fI=`load${ni}${XE}`,hI="Escape",vE="show",yE="showing",bE="hiding",pI="offcanvas-backdrop",ZE=".offcanvas.show",gI=`show${ni}`,mI=`shown${ni}`,vI=`hide${ni}`,EE=`hidePrevented${ni}`,JE=`hidden${ni}`,yI=`resize${ni}`,bI=`click${ni}${XE}`,EI=`keydown.dismiss${ni}`,_I='[data-bs-toggle="offcanvas"]',wI={backdrop:!0,keyboard:!0,scroll:!1},SI={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"},br=class extends zn{constructor(e,t){super(e,t),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return wI}static get DefaultType(){return SI}static get NAME(){return uI}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown||De.trigger(this._element,gI,{relatedTarget:e}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new ja().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(yE);let r=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(vE),this._element.classList.remove(yE),De.trigger(this._element,mI,{relatedTarget:e})};this._queueCallback(r,this._element,!0)}hide(){if(!this._isShown||De.trigger(this._element,vI).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(bE),this._backdrop.hide();let t=()=>{this._element.classList.remove(vE,bE),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new ja().reset(),De.trigger(this._element,JE)};this._queueCallback(t,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){let e=()=>{if(this._config.backdrop==="static"){De.trigger(this._element,EE);return}this.hide()},t=Boolean(this._config.backdrop);return new Zc({className:pI,isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?e:null})}_initializeFocusTrap(){return new eu({trapElement:this._element})}_addEventListeners(){De.on(this._element,EI,e=>{if(e.key===hI){if(!this._config.keyboard){De.trigger(this._element,EE);return}this.hide()}})}static jQueryInterface(e){return this.each(function(){let t=br.getOrCreateInstance(this,e);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e](this)}})}};De.on(document,bI,_I,function(n){let e=Qr(this);if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),Di(this))return;De.one(e,JE,()=>{Mo(this)&&this.focus()});let t=ft.findOne(ZE);t&&t!==e&&br.getInstance(t).hide(),br.getOrCreateInstance(e).toggle(this)});De.on(window,fI,()=>{for(let n of ft.find(ZE))br.getOrCreateInstance(n).show()});De.on(window,yI,()=>{for(let n of ft.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(n).position!=="fixed"&&br.getOrCreateInstance(n).hide()});tu(br);ir(br);var TI=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),CI=/^aria-[\w-]*$/i,AI=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,DI=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,xI=(n,e)=>{let t=n.nodeName.toLowerCase();return e.includes(t)?TI.has(t)?Boolean(AI.test(n.nodeValue)||DI.test(n.nodeValue)):!0:e.filter(r=>r instanceof RegExp).some(r=>r.test(t))},e_={"*":["class","dir","id","lang","role",CI],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]};function OI(n,e,t){if(!n.length)return n;if(t&&typeof t=="function")return t(n);let i=new window.DOMParser().parseFromString(n,"text/html"),s=[].concat(...i.body.querySelectorAll("*"));for(let o of s){let a=o.nodeName.toLowerCase();if(!Object.keys(e).includes(a)){o.remove();continue}let c=[].concat(...o.attributes),u=[].concat(e["*"]||[],e[a]||[]);for(let f of c)xI(f,u)||o.removeAttribute(f.nodeName)}return i.body.innerHTML}var II="TemplateFactory",kI={allowList:e_,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},RI={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},MI={entry:"(string|element|function|null)",selector:"(string|element)"},ip=class extends ws{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return kI}static get DefaultType(){return RI}static get NAME(){return II}getContent(){return Object.values(this._config.content).map(e=>this._resolvePossibleFunction(e)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(e){return this._checkContent(e),this._config.content={...this._config.content,...e},this}toHtml(){let e=document.createElement("div");e.innerHTML=this._maybeSanitize(this._config.template);for(let[i,s]of Object.entries(this._config.content))this._setContent(e,s,i);let t=e.children[0],r=this._resolvePossibleFunction(this._config.extraClass);return r&&t.classList.add(...r.split(" ")),t}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(let[t,r]of Object.entries(e))super._typeCheckConfig({selector:t,entry:r},MI)}_setContent(e,t,r){let i=ft.findOne(r,e);if(i){if(t=this._resolvePossibleFunction(t),!t){i.remove();return}if(Xr(t)){this._putElementInTemplate(Ai(t),i);return}if(this._config.html){i.innerHTML=this._maybeSanitize(t);return}i.textContent=t}}_maybeSanitize(e){return this._config.sanitize?OI(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return typeof e=="function"?e(this):e}_putElementInTemplate(e,t){if(this._config.html){t.innerHTML="",t.append(e);return}t.textContent=e.textContent}},NI="tooltip",PI=new Set(["sanitize","allowList","sanitizeFn"]),Kh="fade",LI="modal",Uc="show",FI=".tooltip-inner",_E=`.${LI}`,wE="hide.bs.modal",Ba="hover",Qh="focus",BI="click",jI="manual",HI="hide",qI="hidden",VI="show",$I="shown",zI="inserted",WI="click",UI="focusin",YI="focusout",GI="mouseenter",KI="mouseleave",QI={AUTO:"auto",TOP:"top",RIGHT:rr()?"left":"right",BOTTOM:"bottom",LEFT:rr()?"right":"left"},XI={allowList:e_,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,0],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},ZI={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"},ei=class extends zn{constructor(e,t){if(typeof Vc>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(e,t),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return XI}static get DefaultType(){return ZI}static get NAME(){return NI}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),De.off(this._element.closest(_E),wE,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this._isWithContent()&&this._isEnabled))return;let e=De.trigger(this._element,this.constructor.eventName(VI)),r=(RE(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(e.defaultPrevented||!r)return;this._disposePopper();let i=this._getTipElement();this._element.setAttribute("aria-describedby",i.getAttribute("id"));let{container:s}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(s.append(i),De.trigger(this._element,this.constructor.eventName(zI))),this._popper=this._createPopper(i),i.classList.add(Uc),"ontouchstart"in document.documentElement)for(let a of[].concat(...document.body.children))De.on(a,"mouseover",Xc);let o=()=>{De.trigger(this._element,this.constructor.eventName($I)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(o,this.tip,this._isAnimated())}hide(){if(!this._isShown()||De.trigger(this._element,this.constructor.eventName(HI)).defaultPrevented)return;if(this._getTipElement().classList.remove(Uc),"ontouchstart"in document.documentElement)for(let i of[].concat(...document.body.children))De.off(i,"mouseover",Xc);this._activeTrigger[BI]=!1,this._activeTrigger[Qh]=!1,this._activeTrigger[Ba]=!1,this._isHovered=null;let r=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),De.trigger(this._element,this.constructor.eventName(qI)))};this._queueCallback(r,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(e){let t=this._getTemplateFactory(e).toHtml();if(!t)return null;t.classList.remove(Kh,Uc),t.classList.add(`bs-${this.constructor.NAME}-auto`);let r=BD(this.constructor.NAME).toString();return t.setAttribute("id",r),this._isAnimated()&&t.classList.add(Kh),t}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new ip({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[FI]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(e){return this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(Kh)}_isShown(){return this.tip&&this.tip.classList.contains(Uc)}_createPopper(e){let t=typeof this._config.placement=="function"?this._config.placement.call(this,e,this._element):this._config.placement,r=QI[t.toUpperCase()];return La(this._element,e,this._getPopperConfig(r))}_getOffset(){let{offset:e}=this._config;return typeof e=="string"?e.split(",").map(t=>Number.parseInt(t,10)):typeof e=="function"?t=>e(t,this._element):e}_resolvePossibleFunction(e){return typeof e=="function"?e.call(this._element):e}_getPopperConfig(e){let t={placement:e,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:r=>{this._getTipElement().setAttribute("data-popper-placement",r.state.placement)}}]};return{...t,...typeof this._config.popperConfig=="function"?this._config.popperConfig(t):this._config.popperConfig}}_setListeners(){let e=this._config.trigger.split(" ");for(let t of e)if(t==="click")De.on(this._element,this.constructor.eventName(WI),this._config.selector,r=>{this._initializeOnDelegatedTarget(r).toggle()});else if(t!==jI){let r=t===Ba?this.constructor.eventName(GI):this.constructor.eventName(UI),i=t===Ba?this.constructor.eventName(KI):this.constructor.eventName(YI);De.on(this._element,r,this._config.selector,s=>{let o=this._initializeOnDelegatedTarget(s);o._activeTrigger[s.type==="focusin"?Qh:Ba]=!0,o._enter()}),De.on(this._element,i,this._config.selector,s=>{let o=this._initializeOnDelegatedTarget(s);o._activeTrigger[s.type==="focusout"?Qh:Ba]=o._element.contains(s.relatedTarget),o._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},De.on(this._element.closest(_E),wE,this._hideModalHandler)}_fixTitle(){let e=this._element.getAttribute("title");e&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",e),this._element.setAttribute("data-bs-original-title",e),this._element.removeAttribute("title"))}_enter(){if(this._isShown()||this._isHovered){this._isHovered=!0;return}this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show)}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(e,t){clearTimeout(this._timeout),this._timeout=setTimeout(e,t)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){let t=Zr.getDataAttributes(this._element);for(let r of Object.keys(t))PI.has(r)&&delete t[r];return e={...t,...typeof e=="object"&&e?e:{}},e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e.container=e.container===!1?document.body:Ai(e.container),typeof e.delay=="number"&&(e.delay={show:e.delay,hide:e.delay}),typeof e.title=="number"&&(e.title=e.title.toString()),typeof e.content=="number"&&(e.content=e.content.toString()),e}_getDelegateConfig(){let e={};for(let t in this._config)this.constructor.Default[t]!==this._config[t]&&(e[t]=this._config[t]);return e.selector=!1,e.trigger="manual",e}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(e){return this.each(function(){let t=ei.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e]()}})}};ir(ei);var JI="popover",ek=".popover-header",tk=".popover-body",nk={...ei.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},rk={...ei.DefaultType,content:"(null|string|element|function)"},Ro=class extends ei{static get Default(){return nk}static get DefaultType(){return rk}static get NAME(){return JI}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[ek]:this._getTitle(),[tk]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each(function(){let t=Ro.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e]()}})}};ir(Ro);var ik="scrollspy",sk="bs.scrollspy",lp=`.${sk}`,ok=".data-api",ak=`activate${lp}`,SE=`click${lp}`,lk=`load${lp}${ok}`,ck="dropdown-item",Do="active",uk='[data-bs-spy="scroll"]',Xh="[href]",dk=".nav, .list-group",TE=".nav-link",fk=".nav-item",hk=".list-group-item",pk=`${TE}, ${fk} > ${TE}, ${hk}`,gk=".dropdown",mk=".dropdown-toggle",vk={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},yk={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"},Cs=class extends zn{constructor(e,t){super(e,t),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return vk}static get DefaultType(){return yk}static get NAME(){return ik}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(let e of this._observableSections.values())this._observer.observe(e)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(e){return e.target=Ai(e.target)||document.body,e.rootMargin=e.offset?`${e.offset}px 0px -30%`:e.rootMargin,typeof e.threshold=="string"&&(e.threshold=e.threshold.split(",").map(t=>Number.parseFloat(t))),e}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(De.off(this._config.target,SE),De.on(this._config.target,SE,Xh,e=>{let t=this._observableSections.get(e.target.hash);if(t){e.preventDefault();let r=this._rootElement||window,i=t.offsetTop-this._element.offsetTop;if(r.scrollTo){r.scrollTo({top:i,behavior:"smooth"});return}r.scrollTop=i}}))}_getNewObserver(){let e={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(t=>this._observerCallback(t),e)}_observerCallback(e){let t=o=>this._targetLinks.get(`#${o.target.id}`),r=o=>{this._previousScrollData.visibleEntryTop=o.target.offsetTop,this._process(t(o))},i=(this._rootElement||document.documentElement).scrollTop,s=i>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=i;for(let o of e){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(t(o));continue}let a=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(s&&a){if(r(o),!i)return;continue}!s&&!a&&r(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;let e=ft.find(Xh,this._config.target);for(let t of e){if(!t.hash||Di(t))continue;let r=ft.findOne(t.hash,this._element);Mo(r)&&(this._targetLinks.set(t.hash,t),this._observableSections.set(t.hash,r))}}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._config.target),this._activeTarget=e,e.classList.add(Do),this._activateParents(e),De.trigger(this._element,ak,{relatedTarget:e}))}_activateParents(e){if(e.classList.contains(ck)){ft.findOne(mk,e.closest(gk)).classList.add(Do);return}for(let t of ft.parents(e,dk))for(let r of ft.prev(t,pk))r.classList.add(Do)}_clearActiveClass(e){e.classList.remove(Do);let t=ft.find(`${Xh}.${Do}`,e);for(let r of t)r.classList.remove(Do)}static jQueryInterface(e){return this.each(function(){let t=Cs.getOrCreateInstance(this,e);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e]()}})}};De.on(window,lk,()=>{for(let n of ft.find(uk))Cs.getOrCreateInstance(n)});ir(Cs);var bk="tab",Ek="bs.tab",xs=`.${Ek}`,_k=`hide${xs}`,wk=`hidden${xs}`,Sk=`show${xs}`,Tk=`shown${xs}`,Ck=`click${xs}`,Ak=`keydown${xs}`,Dk=`load${xs}`,xk="ArrowLeft",CE="ArrowRight",Ok="ArrowUp",AE="ArrowDown",_s="active",DE="fade",Zh="show",Ik="dropdown",kk=".dropdown-toggle",Rk=".dropdown-menu",Jh=":not(.dropdown-toggle)",Mk='.list-group, .nav, [role="tablist"]',Nk=".nav-item, .list-group-item",Pk=`.nav-link${Jh}, .list-group-item${Jh}, [role="tab"]${Jh}`,t_='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',ep=`${Pk}, ${t_}`,Lk=`.${_s}[data-bs-toggle="tab"], .${_s}[data-bs-toggle="pill"], .${_s}[data-bs-toggle="list"]`,ti=class extends zn{constructor(e){super(e),this._parent=this._element.closest(Mk),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),De.on(this._element,Ak,t=>this._keydown(t)))}static get NAME(){return bk}show(){let e=this._element;if(this._elemIsActive(e))return;let t=this._getActiveElem(),r=t?De.trigger(t,_k,{relatedTarget:e}):null;De.trigger(e,Sk,{relatedTarget:t}).defaultPrevented||r&&r.defaultPrevented||(this._deactivate(t,e),this._activate(e,t))}_activate(e,t){if(!e)return;e.classList.add(_s),this._activate(Qr(e));let r=()=>{if(e.getAttribute("role")!=="tab"){e.classList.add(Zh);return}e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),De.trigger(e,Tk,{relatedTarget:t})};this._queueCallback(r,e,e.classList.contains(DE))}_deactivate(e,t){if(!e)return;e.classList.remove(_s),e.blur(),this._deactivate(Qr(e));let r=()=>{if(e.getAttribute("role")!=="tab"){e.classList.remove(Zh);return}e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),De.trigger(e,wk,{relatedTarget:t})};this._queueCallback(r,e,e.classList.contains(DE))}_keydown(e){if(![xk,CE,Ok,AE].includes(e.key))return;e.stopPropagation(),e.preventDefault();let t=[CE,AE].includes(e.key),r=sp(this._getChildren().filter(i=>!Di(i)),e.target,t,!0);r&&(r.focus({preventScroll:!0}),ti.getOrCreateInstance(r).show())}_getChildren(){return ft.find(ep,this._parent)}_getActiveElem(){return this._getChildren().find(e=>this._elemIsActive(e))||null}_setInitialAttributes(e,t){this._setAttributeIfNotExists(e,"role","tablist");for(let r of t)this._setInitialAttributesOnChild(r)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);let t=this._elemIsActive(e),r=this._getOuterElement(e);e.setAttribute("aria-selected",t),r!==e&&this._setAttributeIfNotExists(r,"role","presentation"),t||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){let t=Qr(e);t&&(this._setAttributeIfNotExists(t,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(t,"aria-labelledby",`#${e.id}`))}_toggleDropDown(e,t){let r=this._getOuterElement(e);if(!r.classList.contains(Ik))return;let i=(s,o)=>{let a=ft.findOne(s,r);a&&a.classList.toggle(o,t)};i(kk,_s),i(Rk,Zh),r.setAttribute("aria-expanded",t)}_setAttributeIfNotExists(e,t,r){e.hasAttribute(t)||e.setAttribute(t,r)}_elemIsActive(e){return e.classList.contains(_s)}_getInnerElement(e){return e.matches(ep)?e:ft.findOne(ep,e)}_getOuterElement(e){return e.closest(Nk)||e}static jQueryInterface(e){return this.each(function(){let t=ti.getOrCreateInstance(this);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e]()}})}};De.on(document,Ck,t_,function(n){["A","AREA"].includes(this.tagName)&&n.preventDefault(),!Di(this)&&ti.getOrCreateInstance(this).show()});De.on(window,Dk,()=>{for(let n of ft.find(Lk))ti.getOrCreateInstance(n)});ir(ti);var Fk="toast",Bk="bs.toast",ki=`.${Bk}`,jk=`mouseover${ki}`,Hk=`mouseout${ki}`,qk=`focusin${ki}`,Vk=`focusout${ki}`,$k=`hide${ki}`,zk=`hidden${ki}`,Wk=`show${ki}`,Uk=`shown${ki}`,Yk="fade",xE="hide",Yc="show",Gc="showing",Gk={animation:"boolean",autohide:"boolean",delay:"number"},Kk={animation:!0,autohide:!0,delay:5e3},As=class extends zn{constructor(e,t){super(e,t),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Kk}static get DefaultType(){return Gk}static get NAME(){return Fk}show(){if(De.trigger(this._element,Wk).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(Yk);let t=()=>{this._element.classList.remove(Gc),De.trigger(this._element,Uk),this._maybeScheduleHide()};this._element.classList.remove(xE),Ha(this._element),this._element.classList.add(Yc,Gc),this._queueCallback(t,this._element,this._config.animation)}hide(){if(!this.isShown()||De.trigger(this._element,$k).defaultPrevented)return;let t=()=>{this._element.classList.add(xE),this._element.classList.remove(Gc,Yc),De.trigger(this._element,zk)};this._element.classList.add(Gc),this._queueCallback(t,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(Yc),super.dispose()}isShown(){return this._element.classList.contains(Yc)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(e,t){switch(e.type){case"mouseover":case"mouseout":{this._hasMouseInteraction=t;break}case"focusin":case"focusout":{this._hasKeyboardInteraction=t;break}}if(t){this._clearTimeout();return}let r=e.relatedTarget;this._element===r||this._element.contains(r)||this._maybeScheduleHide()}_setListeners(){De.on(this._element,jk,e=>this._onInteraction(e,!0)),De.on(this._element,Hk,e=>this._onInteraction(e,!1)),De.on(this._element,qk,e=>this._onInteraction(e,!0)),De.on(this._element,Vk,e=>this._onInteraction(e,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each(function(){let t=As.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e](this)}})}};tu(As);ir(As);window.bootstrap=cp;var nu=Tt(r_());document.addEventListener("turbolinks:click",function(){nu.default.start()});document.addEventListener("turbolinks:render",function(){nu.default.done(),nu.default.remove()});var s_=Tt(i_());document.addEventListener("turbolinks:load",function(){document.getElementsByClassName("nav-scroller").length>0&&(0,s_.default)({selector:".nav-scroller",navSelector:".nav-scroller-nav",contentSelector:".nav-scroller-content",itemSelector:".nav-link",buttonLeftSelector:".nav-scroller-btn--left",buttonRightSelector:".nav-scroller-btn--right",scrollStep:80})});var Ir=Tt(d_());$.extend(!0,$.fn.selectize.defaults,{copyClassesToDropdown:!1,dropdownClass:"selectize-dropdown dropdown-menu"});Ir.default.define("shared_options",function(n){var e=this;Ir.default.sharedOptions=Ir.default.sharedOptions||{},e.setup=function(){var t=e.setup;return function(){return Ir.default.sharedOptions[e.settings.optionGroupName]||(Ir.default.sharedOptions[e.settings.optionGroupName]=[]),t.apply(this,arguments)}}(),e.removeItem=function(t,r){var i=e.removeItem;return function(s,o){let a=Ir.default.sharedOptions[e.settings.optionGroupName];return a.splice(a.indexOf(s),1),i.apply(this,arguments)}}(),e.addItem=function(t,r){var i=e.addItem;return function(s,o){return Ir.default.sharedOptions[e.settings.optionGroupName].push(s),i.apply(this,arguments)}}(),e.search=function(t){var r=e.search;return function(i){e.lastQuery=null;var s=r.apply(this,arguments);if(e.settings.hideSelected)for(var o=s.items.length-1;o>=0;o--)Ir.default.sharedOptions[e.settings.optionGroupName].indexOf(s.items[o].id)!==-1&&s.items.splice(o,1);return s}}()});Ir.default.define("select_remove_all_options",function(n){if(this.settings.mode!=="single"){var e=this;e.setup=function(){var t=e.setup;return function(){t.apply(this,arguments);var r=$('<button type="button" class="btn btn-sm btn-success">Select All</button>'),i=$('<button type="button" class="btn btn-sm btn-default">Clear</button>'),s=$('<div class="selectize-plugin-select-remove-all-options btn-group"></div>');s.append(r," ",i),r.on("click",function(){e.setValue($.map(e.options,function(o,a){return a}))}),i.on("click",function(){e.setValue([])}),this.$wrapper.append(s)}}()}});$.ajaxSetup({headers:{"X-CSRF-TOKEN":$('meta[name="csrf-token"]').attr("content")}});$(document).ajaxError(function(n,e,t,r){if(e.status===401)return location.reload()});var F$=Tt(p_());(function(n){"use strict";let e=function(o,a){let c=o.locale||"en-US";this.parse=function(u){let f=new Intl.NumberFormat(c),p=f.format(11111).replace(/1/g,"")||".",h=f.format(1.1).replace(/1/g,"");return parseFloat(u.replace(new RegExp(" ","g"),"").replace(new RegExp("\\"+p,"g"),"").replace(new RegExp("\\"+h),"."))},this.render=function(u){let f=parseInt(a.getAttribute("data-decimals"))||0,p=a.getAttribute("data-digit-grouping")!=="false";return new Intl.NumberFormat(c,{minimumFractionDigits:f,maximumFractionDigits:f,useGrouping:p}).format(u)}},t=!1,r=n.fn.val;n.fn.val=function(o){if(arguments.length>=1){for(let a=0;a<this.length;a++)if(this[a]["bootstrap-input-spinner"]&&this[a].setValue){let c=this[a];setTimeout(function(){c.setValue(o)})}}return r.apply(this,arguments)},n.fn.inputSpinner=function(o){if(o==="destroy")return this.each(function(){this["bootstrap-input-spinner"]?this.destroyInputSpinner():console.warn("element",this,"is no bootstrap-input-spinner")}),this;let a={decrementButton:"<strong>&minus;</strong>",incrementButton:"<strong>&plus;</strong>",groupClass:"",buttonsClass:"btn-outline-secondary",buttonsWidth:"2.5rem",textAlign:"center",autoDelay:500,autoInterval:50,buttonsOnly:!1,keyboardStepping:!0,locale:navigator.language,editor:e,template:'<div class="input-group ${groupClass}"><button style="min-width: ${buttonsWidth}" class="btn btn-decrement ${buttonsClass} btn-minus" type="button">${decrementButton}</button><input type="text" inputmode="decimal" style="text-align: ${textAlign}" class="form-control form-control-text-input"/><button style="min-width: ${buttonsWidth}" class="btn btn-increment ${buttonsClass} btn-plus" type="button">${incrementButton}</button></div>'};for(let u in o)a[u]=o[u];let c=a.template.replace(/\${groupClass}/g,a.groupClass).replace(/\${buttonsWidth}/g,a.buttonsWidth).replace(/\${buttonsClass}/g,a.buttonsClass).replace(/\${decrementButton}/g,a.decrementButton).replace(/\${incrementButton}/g,a.incrementButton).replace(/\${textAlign}/g,a.textAlign);return this.each(function(){if(this["bootstrap-input-spinner"])console.warn("element",this,"is already a bootstrap-input-spinner");else{var u=n(this);u[0]["bootstrap-input-spinner"]=!0,u.hide(),u[0].inputSpinnerEditor=new a.editor(a,this);var f=null,p=null,h=n(c),y=h.find(".btn-decrement"),_=h.find(".btn-increment"),w=h.find("input"),E=n("label[for='"+u.attr("id")+"']");E[0]||(E=u.closest("label"));var D=null,R=null,H=null;Ce();var F=parseFloat(u[0].value);let Ae=!1,_e=u.attr("data-prefix")||"",Le=u.attr("data-suffix")||"";if(_e){let Ve=n('<span class="input-group-text">'+_e+"</span>");h.find("input").before(Ve)}if(Le){let Ve=n('<span class="input-group-text">'+Le+"</span>");h.find("input").after(Ve)}u[0].setValue=function(Ve){Q(Ve)},u[0].destroyInputSpinner=function(){le()};var m=new MutationObserver(function(){Ce(),Q(F,!0)});m.observe(u[0],{attributes:!0}),u.after(h),Q(F),w.on("paste input change focusout",function(Ve){let $e=w[0].value,pe=Ve.type==="focusout";$e=u[0].inputSpinnerEditor.parse($e),Q($e,pe),J(u,Ve.type),a.keyboardStepping&&pe&&ae()}).on("keydown",function(Ve){a.keyboardStepping&&(Ve.which===38?(Ve.preventDefault(),y.prop("disabled")||q(H)):Ve.which===40&&(Ve.preventDefault(),_.prop("disabled")||q(-H)))}).on("keyup",function(Ve){a.keyboardStepping&&(Ve.which===38||Ve.which===40)&&(Ve.preventDefault(),ae())}),s(y[0],function(){y.prop("disabled")||(Ae=!0,q(-H))}),s(_[0],function(){_.prop("disabled")||(Ae=!0,q(H))}),i(document.body,function(){Ae===!0&&(ae(),J(u,"change"),Ae=!1)})}function Q(Ae,_e){_e===void 0&&(_e=!0),isNaN(Ae)||Ae===""?(u[0].value="",_e&&(w[0].value=""),F=NaN):(Ae=parseFloat(Ae),Ae=Math.min(Math.max(Ae,D),R),u[0].value=Ae,_e&&(w[0].value=u[0].inputSpinnerEditor.render(Ae)),F=Ae)}function le(){u.prop("required",w.prop("required")),m.disconnect(),ae(),w.off("paste input change focusout"),h.remove(),u.show(),u[0]["bootstrap-input-spinner"]=void 0,E[0]&&E.attr("for",u.attr("id"))}function J(Ae,_e){_e&&setTimeout(function(){let Le;typeof Event=="function"?Le=new Event(_e,{bubbles:!0}):(Le=document.createEvent("Event"),Le.initEvent(_e,!0,!0)),Ae[0].dispatchEvent(Le)})}function q(Ae){Z(Ae),ae(),a.autoInterval!==void 0&&(f=setTimeout(function(){p=setInterval(function(){Z(Ae)},a.autoInterval)},a.autoDelay))}function Z(Ae){isNaN(F)&&(F=0),Q(Math.round(F/Ae)*Ae+Ae),J(u,"input")}function ae(){clearTimeout(f),clearTimeout(p)}function Ce(){u.prop("required")&&(w.prop("required",u.prop("required")),u.removeAttr("required")),w.prop("placeholder",u.prop("placeholder")),w.attr("inputmode",u.attr("inputmode")||"decimal");let Ae=u.prop("disabled"),_e=u.prop("readonly");w.prop("disabled",Ae),w.prop("readonly",_e||a.buttonsOnly),_.prop("disabled",Ae||_e),y.prop("disabled",Ae||_e),(Ae||_e)&&ae();let Le=u.prop("class"),Ve="";/form-control-sm/g.test(Le)?Ve="input-group-sm":/form-control-lg/g.test(Le)&&(Ve="input-group-lg");let $e=Le.replace(/form-control(-(sm|lg))?/g,"");h.prop("class","input-group "+Ve+" "+a.groupClass),w.prop("class","form-control "+$e),D=isNaN(u.prop("min"))||u.prop("min")===""?-1/0:parseFloat(u.prop("min")),R=isNaN(u.prop("max"))||u.prop("max")===""?1/0:parseFloat(u.prop("max")),H=parseFloat(u.prop("step"))||1,u.attr("hidden")?h.attr("hidden",u.attr("hidden")):h.removeAttr("hidden"),u.attr("id")&&(w.attr("id",u.attr("id")+"_MP_cBdLN29i2"),E[0]&&E.attr("for",w.attr("id")))}}),this};function i(o,a){o.addEventListener("mouseup",function(c){a(c)}),o.addEventListener("touchend",function(c){a(c)}),o.addEventListener("keyup",function(c){(c.keyCode===32||c.keyCode===13)&&(t=!1,a(c))})}function s(o,a){o.addEventListener("mousedown",function(c){c.button===0&&(c.preventDefault(),a(c))}),o.addEventListener("touchstart",function(c){c.cancelable&&c.preventDefault(),a(c)}),o.addEventListener("keydown",function(c){(c.keyCode===32||c.keyCode===13)&&!t&&(t=!0,a(c))})}})(jQuery);var hp=class{constructor(e,t,r){this.eventTarget=e,this.eventName=t,this.eventOptions=r,this.unorderedBindings=new Set}connect(){this.eventTarget.addEventListener(this.eventName,this,this.eventOptions)}disconnect(){this.eventTarget.removeEventListener(this.eventName,this,this.eventOptions)}bindingConnected(e){this.unorderedBindings.add(e)}bindingDisconnected(e){this.unorderedBindings.delete(e)}handleEvent(e){let t=Qk(e);for(let r of this.bindings){if(t.immediatePropagationStopped)break;r.handleEvent(t)}}hasBindings(){return this.unorderedBindings.size>0}get bindings(){return Array.from(this.unorderedBindings).sort((e,t)=>{let r=e.index,i=t.index;return r<i?-1:r>i?1:0})}};function Qk(n){if("immediatePropagationStopped"in n)return n;{let{stopImmediatePropagation:e}=n;return Object.assign(n,{immediatePropagationStopped:!1,stopImmediatePropagation(){this.immediatePropagationStopped=!0,e.call(this)}})}}var pp=class{constructor(e){this.application=e,this.eventListenerMaps=new Map,this.started=!1}start(){this.started||(this.started=!0,this.eventListeners.forEach(e=>e.connect()))}stop(){this.started&&(this.started=!1,this.eventListeners.forEach(e=>e.disconnect()))}get eventListeners(){return Array.from(this.eventListenerMaps.values()).reduce((e,t)=>e.concat(Array.from(t.values())),[])}bindingConnected(e){this.fetchEventListenerForBinding(e).bindingConnected(e)}bindingDisconnected(e,t=!1){this.fetchEventListenerForBinding(e).bindingDisconnected(e),t&&this.clearEventListenersForBinding(e)}handleError(e,t,r={}){this.application.handleError(e,`Error ${t}`,r)}clearEventListenersForBinding(e){let t=this.fetchEventListenerForBinding(e);t.hasBindings()||(t.disconnect(),this.removeMappedEventListenerFor(e))}removeMappedEventListenerFor(e){let{eventTarget:t,eventName:r,eventOptions:i}=e,s=this.fetchEventListenerMapForEventTarget(t),o=this.cacheKey(r,i);s.delete(o),s.size==0&&this.eventListenerMaps.delete(t)}fetchEventListenerForBinding(e){let{eventTarget:t,eventName:r,eventOptions:i}=e;return this.fetchEventListener(t,r,i)}fetchEventListener(e,t,r){let i=this.fetchEventListenerMapForEventTarget(e),s=this.cacheKey(t,r),o=i.get(s);return o||(o=this.createEventListener(e,t,r),i.set(s,o)),o}createEventListener(e,t,r){let i=new hp(e,t,r);return this.started&&i.connect(),i}fetchEventListenerMapForEventTarget(e){let t=this.eventListenerMaps.get(e);return t||(t=new Map,this.eventListenerMaps.set(e,t)),t}cacheKey(e,t){let r=[e];return Object.keys(t).sort().forEach(i=>{r.push(`${t[i]?"":"!"}${i}`)}),r.join(":")}},Xk={stop({event:n,value:e}){return e&&n.stopPropagation(),!0},prevent({event:n,value:e}){return e&&n.preventDefault(),!0},self({event:n,value:e,element:t}){return e?t===n.target:!0}},Zk=/^(?:(.+?)(?:\.(.+?))?(?:@(window|document))?->)?(.+?)(?:#([^:]+?))(?::(.+))?$/;function Jk(n){let t=n.trim().match(Zk)||[],r=t[1],i=t[2];return i&&!["keydown","keyup","keypress"].includes(r)&&(r+=`.${i}`,i=""),{eventTarget:eR(t[3]),eventName:r,eventOptions:t[6]?tR(t[6]):{},identifier:t[4],methodName:t[5],keyFilter:i}}function eR(n){if(n=="window")return window;if(n=="document")return document}function tR(n){return n.split(":").reduce((e,t)=>Object.assign(e,{[t.replace(/^!/,"")]:!/^!/.test(t)}),{})}function nR(n){if(n==window)return"window";if(n==document)return"document"}function Pp(n){return n.replace(/(?:[_-])([a-z0-9])/g,(e,t)=>t.toUpperCase())}function gp(n){return Pp(n.replace(/--/g,"-").replace(/__/g,"_"))}function za(n){return n.charAt(0).toUpperCase()+n.slice(1)}function b_(n){return n.replace(/([A-Z])/g,(e,t)=>`-${t.toLowerCase()}`)}function rR(n){return n.match(/[^\s]+/g)||[]}var mp=class{constructor(e,t,r,i){this.element=e,this.index=t,this.eventTarget=r.eventTarget||e,this.eventName=r.eventName||iR(e)||su("missing event name"),this.eventOptions=r.eventOptions||{},this.identifier=r.identifier||su("missing identifier"),this.methodName=r.methodName||su("missing method name"),this.keyFilter=r.keyFilter||"",this.schema=i}static forToken(e,t){return new this(e.element,e.index,Jk(e.content),t)}toString(){let e=this.keyFilter?`.${this.keyFilter}`:"",t=this.eventTargetName?`@${this.eventTargetName}`:"";return`${this.eventName}${e}${t}->${this.identifier}#${this.methodName}`}isFilterTarget(e){if(!this.keyFilter)return!1;let t=this.keyFilter.split("+"),r=["meta","ctrl","alt","shift"],[i,s,o,a]=r.map(u=>t.includes(u));if(e.metaKey!==i||e.ctrlKey!==s||e.altKey!==o||e.shiftKey!==a)return!0;let c=t.filter(u=>!r.includes(u))[0];return c?(Object.prototype.hasOwnProperty.call(this.keyMappings,c)||su(`contains unknown key filter: ${this.keyFilter}`),this.keyMappings[c].toLowerCase()!==e.key.toLowerCase()):!1}get params(){let e={},t=new RegExp(`^data-${this.identifier}-(.+)-param$`,"i");for(let{name:r,value:i}of Array.from(this.element.attributes)){let s=r.match(t),o=s&&s[1];o&&(e[Pp(o)]=sR(i))}return e}get eventTargetName(){return nR(this.eventTarget)}get keyMappings(){return this.schema.keyMappings}},g_={a:()=>"click",button:()=>"click",form:()=>"submit",details:()=>"toggle",input:n=>n.getAttribute("type")=="submit"?"click":"input",select:()=>"change",textarea:()=>"input"};function iR(n){let e=n.tagName.toLowerCase();if(e in g_)return g_[e](n)}function su(n){throw new Error(n)}function sR(n){try{return JSON.parse(n)}catch{return n}}var vp=class{constructor(e,t){this.context=e,this.action=t}get index(){return this.action.index}get eventTarget(){return this.action.eventTarget}get eventOptions(){return this.action.eventOptions}get identifier(){return this.context.identifier}handleEvent(e){this.willBeInvokedByEvent(e)&&this.applyEventModifiers(e)&&this.invokeWithEvent(e)}get eventName(){return this.action.eventName}get method(){let e=this.controller[this.methodName];if(typeof e=="function")return e;throw new Error(`Action "${this.action}" references undefined method "${this.methodName}"`)}applyEventModifiers(e){let{element:t}=this.action,{actionDescriptorFilters:r}=this.context.application,i=!0;for(let[s,o]of Object.entries(this.eventOptions))if(s in r){let a=r[s];i=i&&a({name:s,value:o,event:e,element:t})}else continue;return i}invokeWithEvent(e){let{target:t,currentTarget:r}=e;try{let{params:i}=this.action,s=Object.assign(e,{params:i});this.method.call(this.controller,s),this.context.logDebugActivity(this.methodName,{event:e,target:t,currentTarget:r,action:this.methodName})}catch(i){let{identifier:s,controller:o,element:a,index:c}=this,u={identifier:s,controller:o,element:a,index:c,event:e};this.context.handleError(i,`invoking action "${this.action}"`,u)}}willBeInvokedByEvent(e){let t=e.target;return e instanceof KeyboardEvent&&this.action.isFilterTarget(e)?!1:this.element===t?!0:t instanceof Element&&this.element.contains(t)?this.scope.containsElement(t):this.scope.containsElement(this.action.element)}get controller(){return this.context.controller}get methodName(){return this.action.methodName}get element(){return this.scope.element}get scope(){return this.context.scope}},ou=class{constructor(e,t){this.mutationObserverInit={attributes:!0,childList:!0,subtree:!0},this.element=e,this.started=!1,this.delegate=t,this.elements=new Set,this.mutationObserver=new MutationObserver(r=>this.processMutations(r))}start(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,this.mutationObserverInit),this.refresh())}pause(e){this.started&&(this.mutationObserver.disconnect(),this.started=!1),e(),this.started||(this.mutationObserver.observe(this.element,this.mutationObserverInit),this.started=!0)}stop(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)}refresh(){if(this.started){let e=new Set(this.matchElementsInTree());for(let t of Array.from(this.elements))e.has(t)||this.removeElement(t);for(let t of Array.from(e))this.addElement(t)}}processMutations(e){if(this.started)for(let t of e)this.processMutation(t)}processMutation(e){e.type=="attributes"?this.processAttributeChange(e.target,e.attributeName):e.type=="childList"&&(this.processRemovedNodes(e.removedNodes),this.processAddedNodes(e.addedNodes))}processAttributeChange(e,t){let r=e;this.elements.has(r)?this.delegate.elementAttributeChanged&&this.matchElement(r)?this.delegate.elementAttributeChanged(r,t):this.removeElement(r):this.matchElement(r)&&this.addElement(r)}processRemovedNodes(e){for(let t of Array.from(e)){let r=this.elementFromNode(t);r&&this.processTree(r,this.removeElement)}}processAddedNodes(e){for(let t of Array.from(e)){let r=this.elementFromNode(t);r&&this.elementIsActive(r)&&this.processTree(r,this.addElement)}}matchElement(e){return this.delegate.matchElement(e)}matchElementsInTree(e=this.element){return this.delegate.matchElementsInTree(e)}processTree(e,t){for(let r of this.matchElementsInTree(e))t.call(this,r)}elementFromNode(e){if(e.nodeType==Node.ELEMENT_NODE)return e}elementIsActive(e){return e.isConnected!=this.element.isConnected?!1:this.element.contains(e)}addElement(e){this.elements.has(e)||this.elementIsActive(e)&&(this.elements.add(e),this.delegate.elementMatched&&this.delegate.elementMatched(e))}removeElement(e){this.elements.has(e)&&(this.elements.delete(e),this.delegate.elementUnmatched&&this.delegate.elementUnmatched(e))}},yp=class{constructor(e,t,r){this.attributeName=t,this.delegate=r,this.elementObserver=new ou(e,this)}get element(){return this.elementObserver.element}get selector(){return`[${this.attributeName}]`}start(){this.elementObserver.start()}pause(e){this.elementObserver.pause(e)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}get started(){return this.elementObserver.started}matchElement(e){return e.hasAttribute(this.attributeName)}matchElementsInTree(e){let t=this.matchElement(e)?[e]:[],r=Array.from(e.querySelectorAll(this.selector));return t.concat(r)}elementMatched(e){this.delegate.elementMatchedAttribute&&this.delegate.elementMatchedAttribute(e,this.attributeName)}elementUnmatched(e){this.delegate.elementUnmatchedAttribute&&this.delegate.elementUnmatchedAttribute(e,this.attributeName)}elementAttributeChanged(e,t){this.delegate.elementAttributeValueChanged&&this.attributeName==t&&this.delegate.elementAttributeValueChanged(e,t)}};function oR(n,e,t){E_(n,e).add(t)}function aR(n,e,t){E_(n,e).delete(t),lR(n,e)}function E_(n,e){let t=n.get(e);return t||(t=new Set,n.set(e,t)),t}function lR(n,e){let t=n.get(e);t!=null&&t.size==0&&n.delete(e)}var ri=class{constructor(){this.valuesByKey=new Map}get keys(){return Array.from(this.valuesByKey.keys())}get values(){return Array.from(this.valuesByKey.values()).reduce((t,r)=>t.concat(Array.from(r)),[])}get size(){return Array.from(this.valuesByKey.values()).reduce((t,r)=>t+r.size,0)}add(e,t){oR(this.valuesByKey,e,t)}delete(e,t){aR(this.valuesByKey,e,t)}has(e,t){let r=this.valuesByKey.get(e);return r!=null&&r.has(t)}hasKey(e){return this.valuesByKey.has(e)}hasValue(e){return Array.from(this.valuesByKey.values()).some(r=>r.has(e))}getValuesForKey(e){let t=this.valuesByKey.get(e);return t?Array.from(t):[]}getKeysForValue(e){return Array.from(this.valuesByKey).filter(([t,r])=>r.has(e)).map(([t,r])=>t)}};var bp=class{constructor(e,t,r,i={}){this.selector=t,this.details=i,this.elementObserver=new ou(e,this),this.delegate=r,this.matchesByElement=new ri}get started(){return this.elementObserver.started}start(){this.elementObserver.start()}pause(e){this.elementObserver.pause(e)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}get element(){return this.elementObserver.element}matchElement(e){let t=e.matches(this.selector);return this.delegate.selectorMatchElement?t&&this.delegate.selectorMatchElement(e,this.details):t}matchElementsInTree(e){let t=this.matchElement(e)?[e]:[],r=Array.from(e.querySelectorAll(this.selector)).filter(i=>this.matchElement(i));return t.concat(r)}elementMatched(e){this.selectorMatched(e)}elementUnmatched(e){this.selectorUnmatched(e)}elementAttributeChanged(e,t){let r=this.matchElement(e),i=this.matchesByElement.has(this.selector,e);!r&&i&&this.selectorUnmatched(e)}selectorMatched(e){this.delegate.selectorMatched&&(this.delegate.selectorMatched(e,this.selector,this.details),this.matchesByElement.add(this.selector,e))}selectorUnmatched(e){this.delegate.selectorUnmatched(e,this.selector,this.details),this.matchesByElement.delete(this.selector,e)}},Ep=class{constructor(e,t){this.element=e,this.delegate=t,this.started=!1,this.stringMap=new Map,this.mutationObserver=new MutationObserver(r=>this.processMutations(r))}start(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,{attributes:!0,attributeOldValue:!0}),this.refresh())}stop(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)}refresh(){if(this.started)for(let e of this.knownAttributeNames)this.refreshAttribute(e,null)}processMutations(e){if(this.started)for(let t of e)this.processMutation(t)}processMutation(e){let t=e.attributeName;t&&this.refreshAttribute(t,e.oldValue)}refreshAttribute(e,t){let r=this.delegate.getStringMapKeyForAttribute(e);if(r!=null){this.stringMap.has(e)||this.stringMapKeyAdded(r,e);let i=this.element.getAttribute(e);if(this.stringMap.get(e)!=i&&this.stringMapValueChanged(i,r,t),i==null){let s=this.stringMap.get(e);this.stringMap.delete(e),s&&this.stringMapKeyRemoved(r,e,s)}else this.stringMap.set(e,i)}}stringMapKeyAdded(e,t){this.delegate.stringMapKeyAdded&&this.delegate.stringMapKeyAdded(e,t)}stringMapValueChanged(e,t,r){this.delegate.stringMapValueChanged&&this.delegate.stringMapValueChanged(e,t,r)}stringMapKeyRemoved(e,t,r){this.delegate.stringMapKeyRemoved&&this.delegate.stringMapKeyRemoved(e,t,r)}get knownAttributeNames(){return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)))}get currentAttributeNames(){return Array.from(this.element.attributes).map(e=>e.name)}get recordedAttributeNames(){return Array.from(this.stringMap.keys())}},au=class{constructor(e,t,r){this.attributeObserver=new yp(e,t,this),this.delegate=r,this.tokensByElement=new ri}get started(){return this.attributeObserver.started}start(){this.attributeObserver.start()}pause(e){this.attributeObserver.pause(e)}stop(){this.attributeObserver.stop()}refresh(){this.attributeObserver.refresh()}get element(){return this.attributeObserver.element}get attributeName(){return this.attributeObserver.attributeName}elementMatchedAttribute(e){this.tokensMatched(this.readTokensForElement(e))}elementAttributeValueChanged(e){let[t,r]=this.refreshTokensForElement(e);this.tokensUnmatched(t),this.tokensMatched(r)}elementUnmatchedAttribute(e){this.tokensUnmatched(this.tokensByElement.getValuesForKey(e))}tokensMatched(e){e.forEach(t=>this.tokenMatched(t))}tokensUnmatched(e){e.forEach(t=>this.tokenUnmatched(t))}tokenMatched(e){this.delegate.tokenMatched(e),this.tokensByElement.add(e.element,e)}tokenUnmatched(e){this.delegate.tokenUnmatched(e),this.tokensByElement.delete(e.element,e)}refreshTokensForElement(e){let t=this.tokensByElement.getValuesForKey(e),r=this.readTokensForElement(e),i=uR(t,r).findIndex(([s,o])=>!dR(s,o));return i==-1?[[],[]]:[t.slice(i),r.slice(i)]}readTokensForElement(e){let t=this.attributeName,r=e.getAttribute(t)||"";return cR(r,e,t)}};function cR(n,e,t){return n.trim().split(/\s+/).filter(r=>r.length).map((r,i)=>({element:e,attributeName:t,content:r,index:i}))}function uR(n,e){let t=Math.max(n.length,e.length);return Array.from({length:t},(r,i)=>[n[i],e[i]])}function dR(n,e){return n&&e&&n.index==e.index&&n.content==e.content}var lu=class{constructor(e,t,r){this.tokenListObserver=new au(e,t,this),this.delegate=r,this.parseResultsByToken=new WeakMap,this.valuesByTokenByElement=new WeakMap}get started(){return this.tokenListObserver.started}start(){this.tokenListObserver.start()}stop(){this.tokenListObserver.stop()}refresh(){this.tokenListObserver.refresh()}get element(){return this.tokenListObserver.element}get attributeName(){return this.tokenListObserver.attributeName}tokenMatched(e){let{element:t}=e,{value:r}=this.fetchParseResultForToken(e);r&&(this.fetchValuesByTokenForElement(t).set(e,r),this.delegate.elementMatchedValue(t,r))}tokenUnmatched(e){let{element:t}=e,{value:r}=this.fetchParseResultForToken(e);r&&(this.fetchValuesByTokenForElement(t).delete(e),this.delegate.elementUnmatchedValue(t,r))}fetchParseResultForToken(e){let t=this.parseResultsByToken.get(e);return t||(t=this.parseToken(e),this.parseResultsByToken.set(e,t)),t}fetchValuesByTokenForElement(e){let t=this.valuesByTokenByElement.get(e);return t||(t=new Map,this.valuesByTokenByElement.set(e,t)),t}parseToken(e){try{return{value:this.delegate.parseValueForToken(e)}}catch(t){return{error:t}}}},_p=class{constructor(e,t){this.context=e,this.delegate=t,this.bindingsByAction=new Map}start(){this.valueListObserver||(this.valueListObserver=new lu(this.element,this.actionAttribute,this),this.valueListObserver.start())}stop(){this.valueListObserver&&(this.valueListObserver.stop(),delete this.valueListObserver,this.disconnectAllActions())}get element(){return this.context.element}get identifier(){return this.context.identifier}get actionAttribute(){return this.schema.actionAttribute}get schema(){return this.context.schema}get bindings(){return Array.from(this.bindingsByAction.values())}connectAction(e){let t=new vp(this.context,e);this.bindingsByAction.set(e,t),this.delegate.bindingConnected(t)}disconnectAction(e){let t=this.bindingsByAction.get(e);t&&(this.bindingsByAction.delete(e),this.delegate.bindingDisconnected(t))}disconnectAllActions(){this.bindings.forEach(e=>this.delegate.bindingDisconnected(e,!0)),this.bindingsByAction.clear()}parseValueForToken(e){let t=mp.forToken(e,this.schema);if(t.identifier==this.identifier)return t}elementMatchedValue(e,t){this.connectAction(t)}elementUnmatchedValue(e,t){this.disconnectAction(t)}},wp=class{constructor(e,t){this.context=e,this.receiver=t,this.stringMapObserver=new Ep(this.element,this),this.valueDescriptorMap=this.controller.valueDescriptorMap}start(){this.stringMapObserver.start(),this.invokeChangedCallbacksForDefaultValues()}stop(){this.stringMapObserver.stop()}get element(){return this.context.element}get controller(){return this.context.controller}getStringMapKeyForAttribute(e){if(e in this.valueDescriptorMap)return this.valueDescriptorMap[e].name}stringMapKeyAdded(e,t){let r=this.valueDescriptorMap[t];this.hasValue(e)||this.invokeChangedCallback(e,r.writer(this.receiver[e]),r.writer(r.defaultValue))}stringMapValueChanged(e,t,r){let i=this.valueDescriptorNameMap[t];e!==null&&(r===null&&(r=i.writer(i.defaultValue)),this.invokeChangedCallback(t,e,r))}stringMapKeyRemoved(e,t,r){let i=this.valueDescriptorNameMap[e];this.hasValue(e)?this.invokeChangedCallback(e,i.writer(this.receiver[e]),r):this.invokeChangedCallback(e,i.writer(i.defaultValue),r)}invokeChangedCallbacksForDefaultValues(){for(let{key:e,name:t,defaultValue:r,writer:i}of this.valueDescriptors)r!=null&&!this.controller.data.has(e)&&this.invokeChangedCallback(t,i(r),void 0)}invokeChangedCallback(e,t,r){let i=`${e}Changed`,s=this.receiver[i];if(typeof s=="function"){let o=this.valueDescriptorNameMap[e];try{let a=o.reader(t),c=r;r&&(c=o.reader(r)),s.call(this.receiver,a,c)}catch(a){throw a instanceof TypeError&&(a.message=`Stimulus Value "${this.context.identifier}.${o.name}" - ${a.message}`),a}}}get valueDescriptors(){let{valueDescriptorMap:e}=this;return Object.keys(e).map(t=>e[t])}get valueDescriptorNameMap(){let e={};return Object.keys(this.valueDescriptorMap).forEach(t=>{let r=this.valueDescriptorMap[t];e[r.name]=r}),e}hasValue(e){let t=this.valueDescriptorNameMap[e],r=`has${za(t.name)}`;return this.receiver[r]}},Sp=class{constructor(e,t){this.context=e,this.delegate=t,this.targetsByName=new ri}start(){this.tokenListObserver||(this.tokenListObserver=new au(this.element,this.attributeName,this),this.tokenListObserver.start())}stop(){this.tokenListObserver&&(this.disconnectAllTargets(),this.tokenListObserver.stop(),delete this.tokenListObserver)}tokenMatched({element:e,content:t}){this.scope.containsElement(e)&&this.connectTarget(e,t)}tokenUnmatched({element:e,content:t}){this.disconnectTarget(e,t)}connectTarget(e,t){var r;this.targetsByName.has(t,e)||(this.targetsByName.add(t,e),(r=this.tokenListObserver)===null||r===void 0||r.pause(()=>this.delegate.targetConnected(e,t)))}disconnectTarget(e,t){var r;this.targetsByName.has(t,e)&&(this.targetsByName.delete(t,e),(r=this.tokenListObserver)===null||r===void 0||r.pause(()=>this.delegate.targetDisconnected(e,t)))}disconnectAllTargets(){for(let e of this.targetsByName.keys)for(let t of this.targetsByName.getValuesForKey(e))this.disconnectTarget(t,e)}get attributeName(){return`data-${this.context.identifier}-target`}get element(){return this.context.element}get scope(){return this.context.scope}};function Wa(n,e){let t=__(n);return Array.from(t.reduce((r,i)=>(hR(i,e).forEach(s=>r.add(s)),r),new Set))}function fR(n,e){return __(n).reduce((r,i)=>(r.push(...pR(i,e)),r),[])}function __(n){let e=[];for(;n;)e.push(n),n=Object.getPrototypeOf(n);return e.reverse()}function hR(n,e){let t=n[e];return Array.isArray(t)?t:[]}function pR(n,e){let t=n[e];return t?Object.keys(t).map(r=>[r,t[r]]):[]}var Tp=class{constructor(e,t){this.context=e,this.delegate=t,this.outletsByName=new ri,this.outletElementsByName=new ri,this.selectorObserverMap=new Map}start(){this.selectorObserverMap.size===0&&(this.outletDefinitions.forEach(e=>{let t=this.selector(e),r={outletName:e};t&&this.selectorObserverMap.set(e,new bp(document.body,t,this,r))}),this.selectorObserverMap.forEach(e=>e.start())),this.dependentContexts.forEach(e=>e.refresh())}stop(){this.selectorObserverMap.size>0&&(this.disconnectAllOutlets(),this.selectorObserverMap.forEach(e=>e.stop()),this.selectorObserverMap.clear())}refresh(){this.selectorObserverMap.forEach(e=>e.refresh())}selectorMatched(e,t,{outletName:r}){let i=this.getOutlet(e,r);i&&this.connectOutlet(i,e,r)}selectorUnmatched(e,t,{outletName:r}){let i=this.getOutletFromMap(e,r);i&&this.disconnectOutlet(i,e,r)}selectorMatchElement(e,{outletName:t}){return this.hasOutlet(e,t)&&e.matches(`[${this.context.application.schema.controllerAttribute}~=${t}]`)}connectOutlet(e,t,r){var i;this.outletElementsByName.has(r,t)||(this.outletsByName.add(r,e),this.outletElementsByName.add(r,t),(i=this.selectorObserverMap.get(r))===null||i===void 0||i.pause(()=>this.delegate.outletConnected(e,t,r)))}disconnectOutlet(e,t,r){var i;this.outletElementsByName.has(r,t)&&(this.outletsByName.delete(r,e),this.outletElementsByName.delete(r,t),(i=this.selectorObserverMap.get(r))===null||i===void 0||i.pause(()=>this.delegate.outletDisconnected(e,t,r)))}disconnectAllOutlets(){for(let e of this.outletElementsByName.keys)for(let t of this.outletElementsByName.getValuesForKey(e))for(let r of this.outletsByName.getValuesForKey(e))this.disconnectOutlet(r,t,e)}selector(e){return this.scope.outlets.getSelectorForOutletName(e)}get outletDependencies(){let e=new ri;return this.router.modules.forEach(t=>{let r=t.definition.controllerConstructor;Wa(r,"outlets").forEach(s=>e.add(s,t.identifier))}),e}get outletDefinitions(){return this.outletDependencies.getKeysForValue(this.identifier)}get dependentControllerIdentifiers(){return this.outletDependencies.getValuesForKey(this.identifier)}get dependentContexts(){let e=this.dependentControllerIdentifiers;return this.router.contexts.filter(t=>e.includes(t.identifier))}hasOutlet(e,t){return!!this.getOutlet(e,t)||!!this.getOutletFromMap(e,t)}getOutlet(e,t){return this.application.getControllerForElementAndIdentifier(e,t)}getOutletFromMap(e,t){return this.outletsByName.getValuesForKey(t).find(r=>r.element===e)}get scope(){return this.context.scope}get identifier(){return this.context.identifier}get application(){return this.context.application}get router(){return this.application.router}},Cp=class{constructor(e,t){this.logDebugActivity=(r,i={})=>{let{identifier:s,controller:o,element:a}=this;i=Object.assign({identifier:s,controller:o,element:a},i),this.application.logDebugActivity(this.identifier,r,i)},this.module=e,this.scope=t,this.controller=new e.controllerConstructor(this),this.bindingObserver=new _p(this,this.dispatcher),this.valueObserver=new wp(this,this.controller),this.targetObserver=new Sp(this,this),this.outletObserver=new Tp(this,this);try{this.controller.initialize(),this.logDebugActivity("initialize")}catch(r){this.handleError(r,"initializing controller")}}connect(){this.bindingObserver.start(),this.valueObserver.start(),this.targetObserver.start(),this.outletObserver.start();try{this.controller.connect(),this.logDebugActivity("connect")}catch(e){this.handleError(e,"connecting controller")}}refresh(){this.outletObserver.refresh()}disconnect(){try{this.controller.disconnect(),this.logDebugActivity("disconnect")}catch(e){this.handleError(e,"disconnecting controller")}this.outletObserver.stop(),this.targetObserver.stop(),this.valueObserver.stop(),this.bindingObserver.stop()}get application(){return this.module.application}get identifier(){return this.module.identifier}get schema(){return this.application.schema}get dispatcher(){return this.application.dispatcher}get element(){return this.scope.element}get parentElement(){return this.element.parentElement}handleError(e,t,r={}){let{identifier:i,controller:s,element:o}=this;r=Object.assign({identifier:i,controller:s,element:o},r),this.application.handleError(e,`Error ${t}`,r)}targetConnected(e,t){this.invokeControllerMethod(`${t}TargetConnected`,e)}targetDisconnected(e,t){this.invokeControllerMethod(`${t}TargetDisconnected`,e)}outletConnected(e,t,r){this.invokeControllerMethod(`${gp(r)}OutletConnected`,e,t)}outletDisconnected(e,t,r){this.invokeControllerMethod(`${gp(r)}OutletDisconnected`,e,t)}invokeControllerMethod(e,...t){let r=this.controller;typeof r[e]=="function"&&r[e](...t)}};function gR(n){return mR(n,vR(n))}function mR(n,e){let t=_R(n),r=yR(n.prototype,e);return Object.defineProperties(t.prototype,r),t}function vR(n){return Wa(n,"blessings").reduce((t,r)=>{let i=r(n);for(let s in i){let o=t[s]||{};t[s]=Object.assign(o,i[s])}return t},{})}function yR(n,e){return ER(e).reduce((t,r)=>{let i=bR(n,e,r);return i&&Object.assign(t,{[r]:i}),t},{})}function bR(n,e,t){let r=Object.getOwnPropertyDescriptor(n,t);if(!(r&&"value"in r)){let s=Object.getOwnPropertyDescriptor(e,t).value;return r&&(s.get=r.get||s.get,s.set=r.set||s.set),s}}var ER=(()=>typeof Object.getOwnPropertySymbols=="function"?n=>[...Object.getOwnPropertyNames(n),...Object.getOwnPropertySymbols(n)]:Object.getOwnPropertyNames)(),_R=(()=>{function n(t){function r(){return Reflect.construct(t,arguments,new.target)}return r.prototype=Object.create(t.prototype,{constructor:{value:r}}),Reflect.setPrototypeOf(r,t),r}function e(){let r=n(function(){this.a.call(this)});return r.prototype.a=function(){},new r}try{return e(),n}catch{return r=>class extends r{}}})();function wR(n){return{identifier:n.identifier,controllerConstructor:gR(n.controllerConstructor)}}var Ap=class{constructor(e,t){this.application=e,this.definition=wR(t),this.contextsByScope=new WeakMap,this.connectedContexts=new Set}get identifier(){return this.definition.identifier}get controllerConstructor(){return this.definition.controllerConstructor}get contexts(){return Array.from(this.connectedContexts)}connectContextForScope(e){let t=this.fetchContextForScope(e);this.connectedContexts.add(t),t.connect()}disconnectContextForScope(e){let t=this.contextsByScope.get(e);t&&(this.connectedContexts.delete(t),t.disconnect())}fetchContextForScope(e){let t=this.contextsByScope.get(e);return t||(t=new Cp(this,e),this.contextsByScope.set(e,t)),t}},Dp=class{constructor(e){this.scope=e}has(e){return this.data.has(this.getDataKey(e))}get(e){return this.getAll(e)[0]}getAll(e){let t=this.data.get(this.getDataKey(e))||"";return rR(t)}getAttributeName(e){return this.data.getAttributeNameForKey(this.getDataKey(e))}getDataKey(e){return`${e}-class`}get data(){return this.scope.data}},xp=class{constructor(e){this.scope=e}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get(e){let t=this.getAttributeNameForKey(e);return this.element.getAttribute(t)}set(e,t){let r=this.getAttributeNameForKey(e);return this.element.setAttribute(r,t),this.get(e)}has(e){let t=this.getAttributeNameForKey(e);return this.element.hasAttribute(t)}delete(e){if(this.has(e)){let t=this.getAttributeNameForKey(e);return this.element.removeAttribute(t),!0}else return!1}getAttributeNameForKey(e){return`data-${this.identifier}-${b_(e)}`}},Op=class{constructor(e){this.warnedKeysByObject=new WeakMap,this.logger=e}warn(e,t,r){let i=this.warnedKeysByObject.get(e);i||(i=new Set,this.warnedKeysByObject.set(e,i)),i.has(t)||(i.add(t),this.logger.warn(r,e))}};function Ip(n,e){return`[${n}~="${e}"]`}var kp=class{constructor(e){this.scope=e}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(e){return this.find(e)!=null}find(...e){return e.reduce((t,r)=>t||this.findTarget(r)||this.findLegacyTarget(r),void 0)}findAll(...e){return e.reduce((t,r)=>[...t,...this.findAllTargets(r),...this.findAllLegacyTargets(r)],[])}findTarget(e){let t=this.getSelectorForTargetName(e);return this.scope.findElement(t)}findAllTargets(e){let t=this.getSelectorForTargetName(e);return this.scope.findAllElements(t)}getSelectorForTargetName(e){let t=this.schema.targetAttributeForScope(this.identifier);return Ip(t,e)}findLegacyTarget(e){let t=this.getLegacySelectorForTargetName(e);return this.deprecate(this.scope.findElement(t),e)}findAllLegacyTargets(e){let t=this.getLegacySelectorForTargetName(e);return this.scope.findAllElements(t).map(r=>this.deprecate(r,e))}getLegacySelectorForTargetName(e){let t=`${this.identifier}.${e}`;return Ip(this.schema.targetAttribute,t)}deprecate(e,t){if(e){let{identifier:r}=this,i=this.schema.targetAttribute,s=this.schema.targetAttributeForScope(r);this.guide.warn(e,`target:${t}`,`Please replace ${i}="${r}.${t}" with ${s}="${t}". The ${i} attribute is deprecated and will be removed in a future version of Stimulus.`)}return e}get guide(){return this.scope.guide}},Rp=class{constructor(e,t){this.scope=e,this.controllerElement=t}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(e){return this.find(e)!=null}find(...e){return e.reduce((t,r)=>t||this.findOutlet(r),void 0)}findAll(...e){return e.reduce((t,r)=>[...t,...this.findAllOutlets(r)],[])}getSelectorForOutletName(e){let t=this.schema.outletAttributeForScope(this.identifier,e);return this.controllerElement.getAttribute(t)}findOutlet(e){let t=this.getSelectorForOutletName(e);if(t)return this.findElement(t,e)}findAllOutlets(e){let t=this.getSelectorForOutletName(e);return t?this.findAllElements(t,e):[]}findElement(e,t){return this.scope.queryElements(e).filter(i=>this.matchesElement(i,e,t))[0]}findAllElements(e,t){return this.scope.queryElements(e).filter(i=>this.matchesElement(i,e,t))}matchesElement(e,t,r){let i=e.getAttribute(this.scope.schema.controllerAttribute)||"";return e.matches(t)&&i.split(" ").includes(r)}},Va=class{constructor(e,t,r,i){this.targets=new kp(this),this.classes=new Dp(this),this.data=new xp(this),this.containsElement=s=>s.closest(this.controllerSelector)===this.element,this.schema=e,this.element=t,this.identifier=r,this.guide=new Op(i),this.outlets=new Rp(this.documentScope,t)}findElement(e){return this.element.matches(e)?this.element:this.queryElements(e).find(this.containsElement)}findAllElements(e){return[...this.element.matches(e)?[this.element]:[],...this.queryElements(e).filter(this.containsElement)]}queryElements(e){return Array.from(this.element.querySelectorAll(e))}get controllerSelector(){return Ip(this.schema.controllerAttribute,this.identifier)}get isDocumentScope(){return this.element===document.documentElement}get documentScope(){return this.isDocumentScope?this:new Va(this.schema,document.documentElement,this.identifier,this.guide.logger)}},Mp=class{constructor(e,t,r){this.element=e,this.schema=t,this.delegate=r,this.valueListObserver=new lu(this.element,this.controllerAttribute,this),this.scopesByIdentifierByElement=new WeakMap,this.scopeReferenceCounts=new WeakMap}start(){this.valueListObserver.start()}stop(){this.valueListObserver.stop()}get controllerAttribute(){return this.schema.controllerAttribute}parseValueForToken(e){let{element:t,content:r}=e,i=this.fetchScopesByIdentifierForElement(t),s=i.get(r);return s||(s=this.delegate.createScopeForElementAndIdentifier(t,r),i.set(r,s)),s}elementMatchedValue(e,t){let r=(this.scopeReferenceCounts.get(t)||0)+1;this.scopeReferenceCounts.set(t,r),r==1&&this.delegate.scopeConnected(t)}elementUnmatchedValue(e,t){let r=this.scopeReferenceCounts.get(t);r&&(this.scopeReferenceCounts.set(t,r-1),r==1&&this.delegate.scopeDisconnected(t))}fetchScopesByIdentifierForElement(e){let t=this.scopesByIdentifierByElement.get(e);return t||(t=new Map,this.scopesByIdentifierByElement.set(e,t)),t}},Np=class{constructor(e){this.application=e,this.scopeObserver=new Mp(this.element,this.schema,this),this.scopesByIdentifier=new ri,this.modulesByIdentifier=new Map}get element(){return this.application.element}get schema(){return this.application.schema}get logger(){return this.application.logger}get controllerAttribute(){return this.schema.controllerAttribute}get modules(){return Array.from(this.modulesByIdentifier.values())}get contexts(){return this.modules.reduce((e,t)=>e.concat(t.contexts),[])}start(){this.scopeObserver.start()}stop(){this.scopeObserver.stop()}loadDefinition(e){this.unloadIdentifier(e.identifier);let t=new Ap(this.application,e);this.connectModule(t);let r=e.controllerConstructor.afterLoad;r&&r(e.identifier,this.application)}unloadIdentifier(e){let t=this.modulesByIdentifier.get(e);t&&this.disconnectModule(t)}getContextForElementAndIdentifier(e,t){let r=this.modulesByIdentifier.get(t);if(r)return r.contexts.find(i=>i.element==e)}handleError(e,t,r){this.application.handleError(e,t,r)}createScopeForElementAndIdentifier(e,t){return new Va(this.schema,e,t,this.logger)}scopeConnected(e){this.scopesByIdentifier.add(e.identifier,e);let t=this.modulesByIdentifier.get(e.identifier);t&&t.connectContextForScope(e)}scopeDisconnected(e){this.scopesByIdentifier.delete(e.identifier,e);let t=this.modulesByIdentifier.get(e.identifier);t&&t.disconnectContextForScope(e)}connectModule(e){this.modulesByIdentifier.set(e.identifier,e),this.scopesByIdentifier.getValuesForKey(e.identifier).forEach(r=>e.connectContextForScope(r))}disconnectModule(e){this.modulesByIdentifier.delete(e.identifier),this.scopesByIdentifier.getValuesForKey(e.identifier).forEach(r=>e.disconnectContextForScope(r))}},SR={controllerAttribute:"data-controller",actionAttribute:"data-action",targetAttribute:"data-target",targetAttributeForScope:n=>`data-${n}-target`,outletAttributeForScope:(n,e)=>`data-${n}-${e}-outlet`,keyMappings:Object.assign(Object.assign({enter:"Enter",tab:"Tab",esc:"Escape",space:" ",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",home:"Home",end:"End"},m_("abcdefghijklmnopqrstuvwxyz".split("").map(n=>[n,n]))),m_("0123456789".split("").map(n=>[n,n])))};function m_(n){return n.reduce((e,[t,r])=>Object.assign(Object.assign({},e),{[t]:r}),{})}var cu=class{constructor(e=document.documentElement,t=SR){this.logger=console,this.debug=!1,this.logDebugActivity=(r,i,s={})=>{this.debug&&this.logFormattedMessage(r,i,s)},this.element=e,this.schema=t,this.dispatcher=new pp(this),this.router=new Np(this),this.actionDescriptorFilters=Object.assign({},Xk)}static start(e,t){let r=new this(e,t);return r.start(),r}async start(){await TR(),this.logDebugActivity("application","starting"),this.dispatcher.start(),this.router.start(),this.logDebugActivity("application","start")}stop(){this.logDebugActivity("application","stopping"),this.dispatcher.stop(),this.router.stop(),this.logDebugActivity("application","stop")}register(e,t){this.load({identifier:e,controllerConstructor:t})}registerActionOption(e,t){this.actionDescriptorFilters[e]=t}load(e,...t){(Array.isArray(e)?e:[e,...t]).forEach(i=>{i.controllerConstructor.shouldLoad&&this.router.loadDefinition(i)})}unload(e,...t){(Array.isArray(e)?e:[e,...t]).forEach(i=>this.router.unloadIdentifier(i))}get controllers(){return this.router.contexts.map(e=>e.controller)}getControllerForElementAndIdentifier(e,t){let r=this.router.getContextForElementAndIdentifier(e,t);return r?r.controller:null}handleError(e,t,r){var i;this.logger.error(`%s

%o

%o`,t,e,r),(i=window.onerror)===null||i===void 0||i.call(window,t,"",0,0,e)}logFormattedMessage(e,t,r={}){r=Object.assign({application:this},r),this.logger.groupCollapsed(`${e} #${t}`),this.logger.log("details:",Object.assign({},r)),this.logger.groupEnd()}};function TR(){return new Promise(n=>{document.readyState=="loading"?document.addEventListener("DOMContentLoaded",()=>n()):n()})}function CR(n){return Wa(n,"classes").reduce((t,r)=>Object.assign(t,AR(r)),{})}function AR(n){return{[`${n}Class`]:{get(){let{classes:e}=this;if(e.has(n))return e.get(n);{let t=e.getAttributeName(n);throw new Error(`Missing attribute "${t}"`)}}},[`${n}Classes`]:{get(){return this.classes.getAll(n)}},[`has${za(n)}Class`]:{get(){return this.classes.has(n)}}}}function DR(n){return Wa(n,"outlets").reduce((t,r)=>Object.assign(t,xR(r)),{})}function xR(n){let e=gp(n);return{[`${e}Outlet`]:{get(){let t=this.outlets.find(n);if(t){let r=this.application.getControllerForElementAndIdentifier(t,n);if(r)return r;throw new Error(`Missing "data-controller=${n}" attribute on outlet element for "${this.identifier}" controller`)}throw new Error(`Missing outlet element "${n}" for "${this.identifier}" controller`)}},[`${e}Outlets`]:{get(){let t=this.outlets.findAll(n);return t.length>0?t.map(r=>{let i=this.application.getControllerForElementAndIdentifier(r,n);if(i)return i;console.warn(`The provided outlet element is missing the outlet controller "${n}" for "${this.identifier}"`,r)}).filter(r=>r):[]}},[`${e}OutletElement`]:{get(){let t=this.outlets.find(n);if(t)return t;throw new Error(`Missing outlet element "${n}" for "${this.identifier}" controller`)}},[`${e}OutletElements`]:{get(){return this.outlets.findAll(n)}},[`has${za(e)}Outlet`]:{get(){return this.outlets.has(n)}}}}function OR(n){return Wa(n,"targets").reduce((t,r)=>Object.assign(t,IR(r)),{})}function IR(n){return{[`${n}Target`]:{get(){let e=this.targets.find(n);if(e)return e;throw new Error(`Missing target element "${n}" for "${this.identifier}" controller`)}},[`${n}Targets`]:{get(){return this.targets.findAll(n)}},[`has${za(n)}Target`]:{get(){return this.targets.has(n)}}}}function kR(n){let e=fR(n,"values"),t={valueDescriptorMap:{get(){return e.reduce((r,i)=>{let s=w_(i,this.identifier),o=this.data.getAttributeNameForKey(s.key);return Object.assign(r,{[o]:s})},{})}}};return e.reduce((r,i)=>Object.assign(r,RR(i)),t)}function RR(n,e){let t=w_(n,e),{key:r,name:i,reader:s,writer:o}=t;return{[i]:{get(){let a=this.data.get(r);return a!==null?s(a):t.defaultValue},set(a){a===void 0?this.data.delete(r):this.data.set(r,o(a))}},[`has${za(i)}`]:{get(){return this.data.has(r)||t.hasCustomDefaultValue}}}}function w_([n,e],t){return LR({controller:t,token:n,typeDefinition:e})}function Lp(n){switch(n){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function $a(n){switch(typeof n){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}if(Array.isArray(n))return"array";if(Object.prototype.toString.call(n)==="[object Object]")return"object"}function MR(n){let e=Lp(n.typeObject.type);if(!e)return;let t=$a(n.typeObject.default);if(e!==t){let r=n.controller?`${n.controller}.${n.token}`:n.token;throw new Error(`The specified default value for the Stimulus Value "${r}" must match the defined type "${e}". The provided default value of "${n.typeObject.default}" is of type "${t}".`)}return e}function NR(n){let e=MR({controller:n.controller,token:n.token,typeObject:n.typeDefinition}),t=$a(n.typeDefinition),r=Lp(n.typeDefinition),i=e||t||r;if(i)return i;let s=n.controller?`${n.controller}.${n.typeDefinition}`:n.token;throw new Error(`Unknown value type "${s}" for "${n.token}" value`)}function PR(n){let e=Lp(n);if(e)return FR[e];let t=n.default;return t!==void 0?t:n}function LR(n){let e=`${b_(n.token)}-value`,t=NR(n);return{type:t,key:e,name:Pp(e),get defaultValue(){return PR(n.typeDefinition)},get hasCustomDefaultValue(){return $a(n.typeDefinition)!==void 0},reader:BR[t],writer:v_[t]||v_.default}}var FR={get array(){return[]},boolean:!1,number:0,get object(){return{}},string:""},BR={array(n){let e=JSON.parse(n);if(!Array.isArray(e))throw new TypeError(`expected value of type "array" but instead got value "${n}" of type "${$a(e)}"`);return e},boolean(n){return!(n=="0"||String(n).toLowerCase()=="false")},number(n){return Number(n)},object(n){let e=JSON.parse(n);if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError(`expected value of type "object" but instead got value "${n}" of type "${$a(e)}"`);return e},string(n){return n}},v_={default:jR,array:y_,object:y_};function y_(n){return JSON.stringify(n)}function jR(n){return`${n}`}var me=class{constructor(e){this.context=e}static get shouldLoad(){return!0}static afterLoad(e,t){}get application(){return this.context.application}get scope(){return this.context.scope}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get targets(){return this.scope.targets}get outlets(){return this.scope.outlets}get classes(){return this.scope.classes}get data(){return this.scope.data}initialize(){}connect(){}disconnect(){}dispatch(e,{target:t=this.element,detail:r={},prefix:i=this.identifier,bubbles:s=!0,cancelable:o=!0}={}){let a=i?`${i}:${e}`:e,c=new CustomEvent(a,{detail:r,bubbles:s,cancelable:o});return t.dispatchEvent(c),c}};me.blessings=[CR,OR,kR,DR];me.targets=[];me.outlets=[];me.values={};var Fp={};He(Fp,{default:()=>uu});var S_=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],ii=(()=>{if(typeof document>"u")return!1;let n=S_[0],e={};for(let t of S_)if(t?.[1]in document){for(let[i,s]of t.entries())e[n[i]]=s;return e}return!1})(),T_={change:ii.fullscreenchange,error:ii.fullscreenerror},Wn={request(n=document.documentElement,e){return new Promise((t,r)=>{let i=()=>{Wn.off("change",i),t()};Wn.on("change",i);let s=n[ii.requestFullscreen](e);s instanceof Promise&&s.then(i).catch(r)})},exit(){return new Promise((n,e)=>{if(!Wn.isFullscreen){n();return}let t=()=>{Wn.off("change",t),n()};Wn.on("change",t);let r=document[ii.exitFullscreen]();r instanceof Promise&&r.then(t).catch(e)})},toggle(n,e){return Wn.isFullscreen?Wn.exit():Wn.request(n,e)},onchange(n){Wn.on("change",n)},onerror(n){Wn.on("error",n)},on(n,e){let t=T_[n];t&&document.addEventListener(t,e,!1)},off(n,e){let t=T_[n];t&&document.removeEventListener(t,e,!1)},raw:ii};Object.defineProperties(Wn,{isFullscreen:{get:()=>Boolean(document[ii.fullscreenElement])},element:{enumerable:!0,get:()=>document[ii.fullscreenElement]??void 0},isEnabled:{enumerable:!0,get:()=>Boolean(document[ii.fullscreenEnabled])}});ii||(Wn={isEnabled:!1});var C_=Wn;function A_(n){return new URLSearchParams(window.location.search).has(n)}var uu=class extends me{initialize(){A_("switch_account")&&Turbolinks.clearCache()}connect(){this.fixSnackbar(),this.enableTootip(),this.enablePopover(),this.bugSnag()}enableTootip(){var n=[].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')),e=n.map(function(t){return new window.bootstrap.Tooltip(t)});document.addEventListener("turbolinks:before-cache",function(){e.map(function(t){t._element&&t.dispose()})})}enablePopover(){var n=[].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]')),e=n.map(function(t){return new window.bootstrap.Popover(t)});document.addEventListener("turbolinks:before-cache",function(){e.map(function(t){t._element&&t.dispose()})})}fullscreen(n){n.preventDefault(),C_.toggle($("html")[0])}fixSnackbar(){document.getElementById("snackbar-container")||$("body").append("<div id='snackbar-container'> </div>")}bugSnag(){document.addEventListener("DOMContentLoaded",function(){let n={dataset:{userId:null,accountId:null}},e=document.getElementsByTagName("body")[0].dataset||n,t=e.userEmail,r=e.userId;window.Bugsnag.setUser(r,t)})}};we(uu,"targets",["disabled"]);var HR=[{name:"application",module:Fp,filename:"./application_controller.js"}],D_=HR;var Bp={};He(Bp,{default:()=>du});var du=class extends me{connect(){this.hasTogglerTarget&&this.togglerTarget.checked&&this.containerTarget.classList.remove("d-none")}toggle(n){let e=this.togglerTarget.checked;this.containerTarget.classList.contains("d-none")?this.containerTarget.classList.remove("d-none"):(this.inputTarget.value="0.0",this.containerTarget.classList.add("d-none"))}};we(du,"targets",["container","toggler","input"]);var jp={};He(jp,{default:()=>fu});var fu=class extends me{connect(){this.element.addEventListener("input",function(n){this.updateField(n.target.id,n.target.value)}.bind(this)),this.hasToggleTarget&&["bill_billing_address_attributes_city","bill_billing_address_attributes_state"].forEach(e=>{this.element.elements.namedItem(e).addEventListener("readyOnlyChange",function(r){this.updateField(r.target.id,r.target.value),this.triggerDeliveryOption()}.bind(this))})}updateField(n,e){let t=this.inputTargetMapper(n);t==null||t.length==0||t.filter(r=>this.element.elements.namedItem(r)!==null).forEach(r=>{this.element.elements.namedItem(r).value=e})}updateShippingAddress(){let n=["bill_billing_address_attributes_contact_name","bill_billing_address_attributes_contact_phone_number","bill_billing_address_attributes_line_1","bill_billing_address_attributes_line_2","bill_billing_address_attributes_postcode","bill_billing_address_attributes_city","bill_billing_address_attributes_state"],e=["bill_shipping_address_attributes_contact_name","bill_shipping_address_attributes_contact_phone_number","bill_shipping_address_attributes_line_1","bill_shipping_address_attributes_line_2","bill_shipping_address_attributes_postcode","bill_shipping_address_attributes_city","bill_shipping_address_attributes_state"];this.toggleTarget.checked?(n.forEach(t=>{let r=this.element.elements.namedItem(t).value;this.updateField(t,r)}),this.triggerDeliveryOption()):e.forEach(t=>{this.element.elements.namedItem(t).value=""})}inputTargetMapper(n){let e={bill_name:["bill_billing_address_attributes_contact_name","bill_shipping_address_attributes_contact_name"],bill_phone_no:["bill_billing_address_attributes_contact_phone_number","bill_shipping_address_attributes_contact_phone_number"]},t={bill_billing_address_attributes_contact_name:["bill_shipping_address_attributes_contact_name"],bill_billing_address_attributes_contact_phone_number:["bill_shipping_address_attributes_contact_phone_number"],bill_billing_address_attributes_line_1:["bill_shipping_address_attributes_line_1"],bill_billing_address_attributes_line_2:["bill_shipping_address_attributes_line_2"],bill_billing_address_attributes_postcode:["bill_shipping_address_attributes_postcode"],bill_billing_address_attributes_city:["bill_shipping_address_attributes_city"],bill_billing_address_attributes_state:["bill_shipping_address_attributes_state"]};if(this.hasToggleTarget&&this.toggleTarget.checked)return t[n];if(n in e)return e[n]}triggerDeliveryOption(){this.element.elements.namedItem("bill_shipping_address_attributes_postcode").dispatchEvent(new Event("input"))}};we(fu,"targets",["toggle"]);var Hp={};He(Hp,{default:()=>Ua});var Ua=class extends me{connect(){this.recordLimit=parseInt(this.data.get("limit")),this.toggleForm()}toggleForm(n){this.toggleTierTarget.checked?(this.defaultFormTarget.classList.toggle("d-none"),this.tierFormTarget.classList.remove("d-none"),this.tiersItemTarget.classList.remove("d-none")):(this.defaultFormTarget.classList.remove("d-none"),this.tierFormTarget.classList.toggle("d-none"),this.tiersItemTarget.classList.toggle("d-none"))}addMultipleChild(n){n.preventDefault();let e=this.selectTierNoTarget.value;this.element.querySelectorAll(".nested-fields:not(.hidden)").forEach(r=>{r.remove()});for(let r=0;r<e;r++){let i=r,s=this.templateTarget.innerHTML.replace(/TEMPLATE_RECORD/g,i);this.addItemTarget.insertAdjacentHTML("beforebegin",s),document.getElementById(`${this.formValue}_tiers_attributes_${i}_level`).value=r+1,this.reachedLimit()&&(this.add_itemTarget.style.display="none")}}reachedLimit(){let n=this.element.querySelectorAll(".nested-fields:not(.hidden)");return this.recordLimit===n.length}};we(Ua,"targets",["addItem","template","record","selectTierNo","toggleTier","defaultForm","tierForm","tiersItem"]),we(Ua,"values",{form:String});var qp={};He(qp,{default:()=>hu});var hu=class extends me{connect(){this.toggleFields()}toggleFields(n){this.toggleTarget.checked?(this.agentIdTarget.classList.toggle("d-none"),this.exceptionTarget.classList.remove("d-none")):(this.agentIdTarget.classList.remove("d-none"),this.exceptionTarget.classList.toggle("d-none"))}};we(hu,"targets",["toggle","exception","agentId"]);var Vp={};He(Vp,{default:()=>pu});var pu=class extends me{connect(){this.recalculate(null)}updateTotal(n){this.hasDiscountTarget&&(this.discountTarget.innerHTML="- RM "+this.calcDiscountAmount()),this.hasFeeTarget&&this.fee>0&&(this.feeTarget.innerHTML="RM "+this.fee.toFixed(2)),this.hasAdditionalFeeTarget&&(this.additionalFeeTarget.innerHTML="RM "+this.calcAddFeeAmount()),this.hasAmountTarget&&this.data.set("price",this.amountTarget.value),this.totalTarget.innerHTML="RM "+this.calcTotalAmount()}isRecurringEnabled(){let n=!1;return this.hasEnableRecurringInputTarget&&(n=this.enableRecurringInputTarget.checked),n}getProRatePercentage(){let n=null,e=1;if(this.hasRecurringProRateInputTarget)n=this.recurringProRateInputTarget.value&&parseFloat(this.recurringProRateInputTarget.value,0);else return e;return this.hasSummaryProRateWrapperTarget&&(this.isRecurringEnabled()?(this.summaryProRateWrapperTarget.classList.remove("d-none"),e=n):(this.summaryProRateWrapperTarget.classList.add("d-none"),e=1)),this.hasProRatePercentageInputTarget&&(this.isRecurringEnabled()?this.proRatePercentageInputTarget.value=n:this.proRatePercentageInputTarget.value=""),e}calcTotalAmount(){return(this.discountedSubTotal+this.calcTax()+this.fee+this.shipping).toFixed(2)}calcDiscountAmount(){return this.calcDiscount().toFixed(2)}calcAddFeeAmount(){return this.calcAddFee().toFixed(2)}calcTax(){return this.tax/100*this.discountedSubTotal}getProRatedSubTotal(){return this.subtotal*this.getProRatePercentage()}calcDiscount(){let n=parseFloat(this.data.get("discount")),e=this.data.get("discount-unit"),t=this.getProRatedSubTotal();if(e==="percentage")return parseFloat(n/100*t);{let r=parseFloat(n);return r>t?t:r}}calcAddFee(){let n=parseFloat(this.data.get("additional-fee")),e=this.data.get("additional-fee-unit"),t=this.getProRatedSubTotal();if(e==="percentage")return parseFloat(n/100*t);{let r=parseFloat(n);return r>t?t:r}}recalculate(n){let e=this.fee;n&&n.currentTarget&&(e=n.currentTarget.dataset.billFee||this.fee),this.hasAmountTarget&&this.data.set("price",this.amountTarget.value),this.fee!=parseFloat(e)&&$.snackbar({content:"Transaction fee changed"}),this.fee=e,this.updateTotal()}get discountedSubTotal(){return this.subtotal*this.getProRatePercentage()-this.calcDiscount()+this.calcAddFee()}get subtotal(){return this.hasQuantityTarget?this.price*this.quantity*this.proRatePercentage:this.price*this.proRatePercentage}get quantity(){return parseFloat(this.quantityTarget.value)}get price(){return parseFloat(this.data.get("price"))}get tax(){return parseFloat(this.data.get("tax"))}get shipping(){return parseFloat(this.data.get("shipping"))||0}get fee(){return parseFloat(this.data.get("fee"))||0}get proRatePercentage(){return parseFloat(this.data.get("proRatePercentage"))||1}set fee(n){this.data.set("fee",n)}};we(pu,"targets",["discount","total","quantity","amount","fee","additionalFee","recurringProRateInput","proRatePercentageInput","summaryProRateWrapper","enableRecurringInput"]);var $p={};He($p,{default:()=>gu});var x_=({price:n,quantity:e,priceTiers:t})=>{if(!t||t.length==0)return n;let r=t.find(i=>i.quantity_from<=e&&e<=(i.quantity_to||9999999));return r&&r.price||n};var gu=class extends me{connect(){this.productOptionSelected()}productOptionSelected(){let n=this.productOptionValueTargets.map(t=>t.value).join(", "),e=null;if(this.variants()&&this.variants().length==1?e=this.variants()[0]:this.variants()&&this.variants().length>1&&(e=this.variants().find(t=>t.values===n),e||(e=this.variants().find(t=>t.values===""))),e){let t=e.quantity;if(this.quantityInputTarget.setAttribute("data-product-weight",e.weight),this.quantityInputTarget.setAttribute("data-min-purchase-quantity",e.min_purchase_quantity),this.quantityInputTarget.setAttribute("data-max-purchase-quantity",e.max_purchase_quantity),this.hasQuantityFixedTextTarget){let c=parseInt(this.quantityFixedTextTarget.textContent,10);t==null||isNaN(t)?this.quantityInputTarget.value=c:t==0?this.quantityInputTarget.value=0:c>t?(this.quantityInputTarget.value=0,t=0):this.quantityInputTarget.value=c}else t==null||isNaN(t)?this.quantityInputTarget.removeAttribute("data-max"):t==0?(this.quantityInputTarget.dataset.max=0,this.quantityInputTarget.value=0):(this.quantityInputTarget.dataset.max=t,parseInt(this.quantityInputTarget.value)>t&&(this.quantityInputTarget.value=t));e.id&&e.id!=this.quantityInputTarget.dataset.productVariantId&&(e.max_purchase_quantity&&this.quantityInputTarget.value>e.max_purchase_quantity?this.quantityInputTarget.value=e.max_purchase_quantity:e.min_purchase_quantity&&this.quantityInputTarget.value<e.min_purchase_quantity&&(this.quantityInputTarget.value=e.min_purchase_quantity));let r=parseInt(this.quantityInputTarget.value,10),i=x_({price:e.price,quantity:r,priceTiers:e.price_tiers}),s=`RM ${parseFloat(i,10).toFixed(2)}`,o=this.hasDiscountInputTarget?parseFloat(this.discountInputTarget.value):0;window.dispatchEvent(new CustomEvent("event-update-quantity-spinner"));let a=i*r-o;if(a=a<0?0:a,this.priceTextTarget.textContent=s,this.hasPriceInputTarget&&(this.priceInputTarget.value=e.price),this.hasWeightInputTarget&&(this.weightInputTarget.value=e.weight*r),this.hasAmountInputTarget&&(this.amountInputTarget.value=a.toFixed(2)),this.hasAmountTextTarget&&(this.amountTextTarget.textContent=`RM ${a.toFixed(2)}`),this.hasQuantityLeftTextTarget&&(this.isQuantityDisabled(t)?this.quantityLeftTextTarget.classList.add("d-none"):this.isStockAvailable(t)?(this.quantityLeftTextTarget.textContent=`Only ${t} left`,this.quantityLeftTextTarget.classList.remove("d-none")):this.quantityLeftTextTarget.classList.add("d-none")),this.hasInfinityTextTarget&&(this.isQuantityDisabled(t)?this.infinityTextTarget.classList.remove("d-none"):this.isStockAvailable(t)?this.infinityTextTarget.classList.add("d-none"):this.infinityTextTarget.classList.add("d-none")),this.hasSoldOutButtonTarget&&this.hasChooseProductButtonTarget&&(this.isQuantityDisabled(t)||this.isStockAvailable(t)?(this.soldOutButtonTarget.classList.add("d-none"),this.chooseProductButtonTarget.classList.remove("d-none")):(this.soldOutButtonTarget.classList.remove("d-none"),this.chooseProductButtonTarget.classList.add("d-none"))),this.hasSoldOutTextTarget&&(this.isQuantityDisabled(t)||this.isStockAvailable(t)?this.soldOutTextTarget.classList.add("d-none"):this.soldOutTextTarget.classList.remove("d-none")),this.hasQuantityTextTarget&&(this.isQuantityDisabled(t)||this.isStockAvailable(t)?this.quantityTextTarget.classList.remove("d-none"):this.quantityTextTarget.classList.add("d-none")),this.hasQuantityContainerTarget&&(this.isQuantityDisabled(t)||this.isStockAvailable(t)?this.quantityContainerTarget.classList.remove("d-none"):this.quantityContainerTarget.classList.add("d-none")),this.hasQuantityFixedTextTarget&&(this.isQuantityDisabled(t)||this.isStockAvailable(t)?this.quantityFixedTextTarget.classList.remove("d-none"):this.quantityFixedTextTarget.classList.add("d-none")),r>0?this.productOptionValueTargets.forEach(c=>{c.dataset.required==="true"&&c.setAttribute("required","required")}):this.productOptionValueTargets.forEach(c=>{c.removeAttribute("required")}),this.productVariantIdTarget.value=e.id,this.quantityInputTarget.setAttribute("data-product-variant-id",e.id),this.hasImagesTarget&&this.imagesTargets&&this.imagesTargets.forEach(c=>{let u=c.dataset,f=e.id?"ProductVariant":"Product";u.id==(e.id||e.product_id)&&u.kind==f?c.classList.remove("d-none"):c.classList.add("d-none")}),this.productOptionValueTargets.length==1){let c=e.code;document.getElementById("product-code").textContent=c}window.dispatchEvent(new CustomEvent("event-update-subtotal"))}else this.productVariantIdTarget.value=null}isQuantityDisabled(n){return n==null||isNaN(n)}isStockAvailable(n){return n>0}variants(){return JSON.parse(this.data.get("variants"))}};we(gu,"targets",["discountInput","images","quantityInput","quantityText","quantityFixedText","priceInput","priceText","amountInput","amountText","weightInput","productOptionValue","productVariantId","soldOutButton","chooseProductButton","soldOutText","quantityLeftText","quantityContainer","infinityText"]);var zp={};He(zp,{default:()=>mu});var mu=class extends me{connect(){this.hasKindTarget&&this.showHideValuesField(this.kindTarget.value==="options")}toggleValues(n){n.preventDefault(),this.showHideValuesField(n.target.value==="options"),this.fieldValuesTarget.querySelector("input").value=""}showHideValuesField(n){this.fieldValuesTarget.style.display=n?"":"none"}};we(mu,"targets",["fieldValues","kind"]);var Up={};He(Up,{default:()=>bu});var qR=R_(),VR=(n,e,t)=>n.length!==5?(e.value="",t.value="",Wp(e,t),Promise.reject(new Error("fail"))):qR(`/postcodes/${n}.json`).then(r=>r.json()).then(r=>{e.value=r.city,t.value=r.state,Wp(e,t)}).catch(()=>{e.value="",t.value="",Wp(e,t)}),Wp=(n,e)=>{[n,e].forEach(t=>{t.dispatchEvent(new CustomEvent("readyOnlyChange"))})},yu=VR;var bu=class extends me{connect(){this.togglerTarget.checked?this.containerTarget.classList.remove("d-none"):this.hasCityTarget&&this.resetFields(!0)}toggle(){this.containerTarget.classList.contains("d-none")?(this.resetFields(!1),this.containerTarget.classList.remove("d-none")):(this.resetFields(!0),this.containerTarget.classList.add("d-none"))}change(n){let e=n.target.value;yu(e,this.cityTarget,this.stateTarget).catch(()=>{})}resetFields(n){[this.cityTarget,this.stateTarget].forEach(r=>{r.value=""}),[this.nameTarget,this.phoneTarget,this.lineOneTarget,this.lineTwoTarget,this.postcodeTarget].forEach(r=>{r.value="",r.disabled=n})}};we(bu,"targets",["city","container","name","phone","postcode","state","lineOne","lineTwo","toggler"]);var Qp={};He(Qp,{default:()=>Ga});var fw=Tt(On()),hw=Tt(dw());var Ga=class extends me{initialize(){this.getDeliveryOptions=(0,hw.default)(this.getDeliveryOptions,1e3).bind(this)}connect(){this.shippingRateEnabled()&&this.hasPostcodeTarget&&this.postcodeTarget.value&&(this.shippingProfileIdValue=this.data.get("shippingProfileId"),this.postcodeValue=this.postcodeTarget.value,this.weightValue==parseFloat(this.totalWeightInputTarget.value),this.getDeliveryOptions())}getDeliveryOptions(){if(!this.shippingRateEnabled())return;let n=null;this.hasSelectedTarget&&(n=this.selectedTargets.find(r=>r.checked==!0));let e=n&&n.id||null;if(this.shippingProfileIdValue==this.data.get("shippingProfileId")&&this.postcodeValue==this.postcodeTarget.value&&this.weightValue==parseFloat(this.totalWeightInputTarget.value)){this.hasSelectedTarget&&this.updateRate(n.dataset.deliveryOptionPrice);return}if(this.shippingProfileIdValue=this.data.get("shippingProfileId"),this.postcodeValue=this.postcodeTarget.value,this.weightValue=parseFloat(this.totalWeightInputTarget.value),this.postcodeValue.length===0)return;let t=new FormData;t.append("shipping_profile_id",this.shippingProfileIdValue),t.append("postcode_number",this.postcodeValue),t.append("weight",this.weightValue),fw.default.ajax({url:"/delivery_options",type:"POST",data:t,success:()=>{if(this.hasSelectedTarget){let r=null;e?(r=document.getElementById(e),r.checked=!0):r=this.selectedTargets[0],isNaN(this.selectedDeliveryOption())||(r=this.selectedTargets.find(i=>i.value==this.selectedDeliveryOption()),r.checked=!0),this.updateRate(r.dataset.deliveryOptionPrice)}else this.updateRate(0)}})}resetRate(){this.shippingRateEnabled()&&this.updateRate(0)}recalculateRate(n){this.shippingRateEnabled()&&this.updateRate(n.target.dataset.deliveryOptionPrice)}updateRate(n){this.hasShippingTarget&&(this.shippingTarget.innerHTML=`RM ${parseFloat(n).toFixed(2)}`),this.hasItemShippingTarget&&(this.itemShippingTarget.value=parseFloat(n).toFixed(2),this.itemShippingTarget.dispatchEvent(new Event("change"))),n>0&&this.hasDueTarget&&window.dispatchEvent(new CustomEvent("event-update-total-due"))}getAmountDue(n){let e=this.getTotalDiscounted(),t=this.getTotalTaxed(),r=parseFloat(n);return e+t+r}getTotalTaxed(){let n=parseFloat(this.data.get("tax"));return parseFloat((n/100*this.getTotalDiscounted()).toFixed(2))}getTotalDiscounted(){let n=parseFloat(this.data.get("discount-amount"))||0;return parseFloat(this.subtotalInputTarget.value)-n}shippingRateEnabled(){return this.data.get("shippingRateEnabled")==="true"}selectedDeliveryOption(){return parseInt(this.data.get("selectedDeliveryOption"),10)}};we(Ga,"targets",["shipping","selected","due","postcode","itemShipping","subtotalInput","totalWeightInput"]),we(Ga,"values",{shippingProfileId:String,postcode:String,weight:String});var Xp={};He(Xp,{default:()=>_u});var _u=class extends me{connect(){if(this.hasTotalTarget&&this.hasSelectionTarget){let n=this.selectionTargets.find(e=>e.checked==!0);n&&n.value==="others"?this.readOnlyInputField(!1):n&&n.value!=="others"?this.readOnlyInputField(!0):(this.readOnlyInputField(!0),this.selectionTarget.checked=!0,this.totalTarget.value=this.selectionTarget.value),setTimeout(()=>{this.totalTarget.dispatchEvent(new Event("change"))},1)}}updateTotal(n){n.currentTarget.value==="others"?(this.readOnlyInputField(!1),this.totalTarget.value=parseInt(this.data.get("minAmount"))||0):(this.readOnlyInputField(!0),this.totalTarget.value=n.currentTarget.value),this.totalTarget.dispatchEvent(new Event("change"))}readOnlyInputField(n){let e=this.totalTarget.parentNode.parentNode.querySelector(".form-text");this.totalTarget.readOnly=n,n?e.style.visibility="hidden":n||(e.style.visibility="visible")}};we(_u,"targets",["selection","total"]);var Zp={};He(Zp,{default:()=>Ka});var pw=Tt(On()),gw=Tt(Po());var Ka=class extends me{initialize(){this.updateDiscount=(0,gw.default)(this.updateDiscount,1e3).bind(this)}connect(){this.previousTotalValue=this.getCurrentTotalAmount()}updateDiscount(){if(!this.hasVoucherCodeTarget||this.voucherCodeTarget.value.trim()==""||this.previousTotalValue==this.getCurrentTotalAmount())return;let n=new FormData(document.getElementById("new_bill"));n.append("commit","Update Discount"),pw.default.ajax({url:`/collections/${this.slug()}`,type:"POST",dataType:"script",data:n,success:e=>{}}),this.previousTotalValue=this.getCurrentTotalAmount()}getCurrentTotalAmount(){return parseFloat(document.getElementById("bill_total_amount").value)}slug(){return this.data.get("slug")}};we(Ka,"targets",["voucherCode"]),we(Ka,"values",{previousTotalValue:Number});var ig={};He(ig,{default:()=>rg});var Su={logger:self.console,WebSocket:self.WebSocket},$t={log(...n){this.enabled&&(n.push(Date.now()),Su.logger.log("[ActionCable]",...n))}},Xa=()=>new Date().getTime(),wu=n=>(Xa()-n)/1e3,Za=class{constructor(e){this.visibilityDidChange=this.visibilityDidChange.bind(this),this.connection=e,this.reconnectAttempts=0}start(){this.isRunning()||(this.startedAt=Xa(),delete this.stoppedAt,this.startPolling(),addEventListener("visibilitychange",this.visibilityDidChange),$t.log(`ConnectionMonitor started. stale threshold = ${this.constructor.staleThreshold} s`))}stop(){this.isRunning()&&(this.stoppedAt=Xa(),this.stopPolling(),removeEventListener("visibilitychange",this.visibilityDidChange),$t.log("ConnectionMonitor stopped"))}isRunning(){return this.startedAt&&!this.stoppedAt}recordPing(){this.pingedAt=Xa()}recordConnect(){this.reconnectAttempts=0,this.recordPing(),delete this.disconnectedAt,$t.log("ConnectionMonitor recorded connect")}recordDisconnect(){this.disconnectedAt=Xa(),$t.log("ConnectionMonitor recorded disconnect")}startPolling(){this.stopPolling(),this.poll()}stopPolling(){clearTimeout(this.pollTimeout)}poll(){this.pollTimeout=setTimeout(()=>{this.reconnectIfStale(),this.poll()},this.getPollInterval())}getPollInterval(){let{staleThreshold:e,reconnectionBackoffRate:t}=this.constructor,r=Math.pow(1+t,Math.min(this.reconnectAttempts,10)),s=(this.reconnectAttempts===0?1:t)*Math.random();return e*1e3*r*(1+s)}reconnectIfStale(){this.connectionIsStale()&&($t.log(`ConnectionMonitor detected stale connection. reconnectAttempts = ${this.reconnectAttempts}, time stale = ${wu(this.refreshedAt)} s, stale threshold = ${this.constructor.staleThreshold} s`),this.reconnectAttempts++,this.disconnectedRecently()?$t.log(`ConnectionMonitor skipping reopening recent disconnect. time disconnected = ${wu(this.disconnectedAt)} s`):($t.log("ConnectionMonitor reopening"),this.connection.reopen()))}get refreshedAt(){return this.pingedAt?this.pingedAt:this.startedAt}connectionIsStale(){return wu(this.refreshedAt)>this.constructor.staleThreshold}disconnectedRecently(){return this.disconnectedAt&&wu(this.disconnectedAt)<this.constructor.staleThreshold}visibilityDidChange(){document.visibilityState==="visible"&&setTimeout(()=>{(this.connectionIsStale()||!this.connection.isOpen())&&($t.log(`ConnectionMonitor reopening stale connection on visibilitychange. visibilityState = ${document.visibilityState}`),this.connection.reopen())},200)}};Za.staleThreshold=6;Za.reconnectionBackoffRate=.15;var vw={message_types:{welcome:"welcome",disconnect:"disconnect",ping:"ping",confirmation:"confirm_subscription",rejection:"reject_subscription"},disconnect_reasons:{unauthorized:"unauthorized",invalid_request:"invalid_request",server_restart:"server_restart"},default_mount_path:"/cable",protocols:["actioncable-v1-json","actioncable-unsupported"]},{message_types:Qa,protocols:Tu}=vw,PM=Tu.slice(0,Tu.length-1),mw=[].indexOf,Ja=class{constructor(e){this.open=this.open.bind(this),this.consumer=e,this.subscriptions=this.consumer.subscriptions,this.monitor=new Za(this),this.disconnected=!0}send(e){return this.isOpen()?(this.webSocket.send(JSON.stringify(e)),!0):!1}open(){return this.isActive()?($t.log(`Attempted to open WebSocket, but existing socket is ${this.getState()}`),!1):($t.log(`Opening WebSocket, current state is ${this.getState()}, subprotocols: ${Tu}`),this.webSocket&&this.uninstallEventHandlers(),this.webSocket=new Su.WebSocket(this.consumer.url,Tu),this.installEventHandlers(),this.monitor.start(),!0)}close({allowReconnect:e}={allowReconnect:!0}){if(e||this.monitor.stop(),this.isOpen())return this.webSocket.close()}reopen(){if($t.log(`Reopening WebSocket, current state is ${this.getState()}`),this.isActive())try{return this.close()}catch(e){$t.log("Failed to reopen WebSocket",e)}finally{$t.log(`Reopening WebSocket in ${this.constructor.reopenDelay}ms`),setTimeout(this.open,this.constructor.reopenDelay)}else return this.open()}getProtocol(){if(this.webSocket)return this.webSocket.protocol}isOpen(){return this.isState("open")}isActive(){return this.isState("open","connecting")}isProtocolSupported(){return mw.call(PM,this.getProtocol())>=0}isState(...e){return mw.call(e,this.getState())>=0}getState(){if(this.webSocket){for(let e in Su.WebSocket)if(Su.WebSocket[e]===this.webSocket.readyState)return e.toLowerCase()}return null}installEventHandlers(){for(let e in this.events){let t=this.events[e].bind(this);this.webSocket[`on${e}`]=t}}uninstallEventHandlers(){for(let e in this.events)this.webSocket[`on${e}`]=function(){}}};Ja.reopenDelay=500;Ja.prototype.events={message(n){if(!this.isProtocolSupported())return;let{identifier:e,message:t,reason:r,reconnect:i,type:s}=JSON.parse(n.data);switch(s){case Qa.welcome:return this.monitor.recordConnect(),this.subscriptions.reload();case Qa.disconnect:return $t.log(`Disconnecting. Reason: ${r}`),this.close({allowReconnect:i});case Qa.ping:return this.monitor.recordPing();case Qa.confirmation:return this.subscriptions.confirmSubscription(e),this.subscriptions.notify(e,"connected");case Qa.rejection:return this.subscriptions.reject(e);default:return this.subscriptions.notify(e,"received",t)}},open(){if($t.log(`WebSocket onopen event, using '${this.getProtocol()}' subprotocol`),this.disconnected=!1,!this.isProtocolSupported())return $t.log("Protocol is unsupported. Stopping monitor and disconnecting."),this.close({allowReconnect:!1})},close(n){if($t.log("WebSocket onclose event"),!this.disconnected)return this.disconnected=!0,this.monitor.recordDisconnect(),this.subscriptions.notifyAll("disconnected",{willAttemptReconnect:this.monitor.isRunning()})},error(){$t.log("WebSocket onerror event")}};var LM=function(n,e){if(e!=null)for(let t in e){let r=e[t];n[t]=r}return n},Jp=class{constructor(e,t={},r){this.consumer=e,this.identifier=JSON.stringify(t),LM(this,r)}perform(e,t={}){return t.action=e,this.send(t)}send(e){return this.consumer.send({command:"message",identifier:this.identifier,data:JSON.stringify(e)})}unsubscribe(){return this.consumer.subscriptions.remove(this)}},eg=class{constructor(e){this.subscriptions=e,this.pendingSubscriptions=[]}guarantee(e){this.pendingSubscriptions.indexOf(e)==-1?($t.log(`SubscriptionGuarantor guaranteeing ${e.identifier}`),this.pendingSubscriptions.push(e)):$t.log(`SubscriptionGuarantor already guaranteeing ${e.identifier}`),this.startGuaranteeing()}forget(e){$t.log(`SubscriptionGuarantor forgetting ${e.identifier}`),this.pendingSubscriptions=this.pendingSubscriptions.filter(t=>t!==e)}startGuaranteeing(){this.stopGuaranteeing(),this.retrySubscribing()}stopGuaranteeing(){clearTimeout(this.retryTimeout)}retrySubscribing(){this.retryTimeout=setTimeout(()=>{this.subscriptions&&typeof this.subscriptions.subscribe=="function"&&this.pendingSubscriptions.map(e=>{$t.log(`SubscriptionGuarantor resubscribing ${e.identifier}`),this.subscriptions.subscribe(e)})},500)}},tg=class{constructor(e){this.consumer=e,this.guarantor=new eg(this),this.subscriptions=[]}create(e,t){let r=e,i=typeof r=="object"?r:{channel:r},s=new Jp(this.consumer,i,t);return this.add(s)}add(e){return this.subscriptions.push(e),this.consumer.ensureActiveConnection(),this.notify(e,"initialized"),this.subscribe(e),e}remove(e){return this.forget(e),this.findAll(e.identifier).length||this.sendCommand(e,"unsubscribe"),e}reject(e){return this.findAll(e).map(t=>(this.forget(t),this.notify(t,"rejected"),t))}forget(e){return this.guarantor.forget(e),this.subscriptions=this.subscriptions.filter(t=>t!==e),e}findAll(e){return this.subscriptions.filter(t=>t.identifier===e)}reload(){return this.subscriptions.map(e=>this.subscribe(e))}notifyAll(e,...t){return this.subscriptions.map(r=>this.notify(r,e,...t))}notify(e,t,...r){let i;return typeof e=="string"?i=this.findAll(e):i=[e],i.map(s=>typeof s[t]=="function"?s[t](...r):void 0)}subscribe(e){this.sendCommand(e,"subscribe")&&this.guarantor.guarantee(e)}confirmSubscription(e){$t.log(`Subscription confirmed ${e}`),this.findAll(e).map(t=>this.guarantor.forget(t))}sendCommand(e,t){let{identifier:r}=e;return this.consumer.send({command:t,identifier:r})}},ng=class{constructor(e){this._url=e,this.subscriptions=new tg(this),this.connection=new Ja(this)}get url(){return FM(this._url)}send(e){return this.connection.send(e)}connect(){return this.connection.open()}disconnect(){return this.connection.close({allowReconnect:!1})}ensureActiveConnection(){if(!this.connection.isActive())return this.connection.open()}};function FM(n){if(typeof n=="function"&&(n=n()),n&&!/^wss?:/i.test(n)){let e=document.createElement("a");return e.href=n,e.href=e.href,e.protocol=e.protocol.replace("http","ws"),e.href}else return n}function yw(n=BM("url")||vw.default_mount_path){return new ng(n)}function BM(n){let e=document.head.querySelector(`meta[name='action-cable-${n}']`);if(e)return e.getAttribute("content")}var bw=yw();var rg=class extends me{connect(){this.channel=bw.subscriptions.create({channel:"DocumentUploadStatusChannel",collection_id:this.data.get("id")},{received:this.cableReceived.bind(this)})}cableReceived(n){n.status==="completed"?($("table[id^=dttb]").DataTable().ajax.reload(null,!1),$("#dropdown-title").replaceWith(n.title_list)):n.status==="error"&&$("table[id=dttb-bill-uploads]").DataTable().ajax.reload(null,!1)}};var og={};He(og,{default:()=>sg});var Ew=Tt(On());var sg=class extends me{connect(){this.initSpinner(),this.updateSpinnerListener()}updateSpinnerListener(){this.destroySpinner(),this.initSpinner(),this.shouldProcessInput()&&($(this.element).off("change"),$(this.element).on("change",n=>{let e=parseInt(n.target.value);this.processQuantityInput(e)}),this.processQuantityInput(parseInt(this.element.value))),this.shouldSubmitOnChange()&&$(this.element).on("change",n=>{let e=$(this.element).parent("form");Ew.default.fire(e[0],"submit")})}processQuantityInput(n){let e=parseInt(this.element.dataset.max),t=parseInt(this.element.dataset.maxPurchaseQuantity),r=parseInt(this.element.dataset.minPurchaseQuantity);n>e&&($(this.element).val(e),$.snackbar({content:`Current stock limit is ${e}`,style:"error"})),n>t&&($(this.element).val(t),$.snackbar({content:`Maximum purchase limit is ${t}`,style:"error"})),n<r&&((isNaN(this.getMinLimit())||this.getMinLimit()===0)&&!this.isIncrement(n)?$(this.element).val(0):$(this.element).val(r)),this.element.setAttribute("data-previous-value",$(this.element).val())}shouldSubmitOnChange(){return this.element.dataset.submitOnChange==="true"}shouldProcessInput(){return this.hasMaxLimit()||this.hasMaxPurchaseLimit()||this.hasMinPurchaseLimit()}isIncrement(n){return n>this.getPreviousValue()}getPreviousValue(){return parseInt(this.element.dataset.previousValue,10)}getMinLimit(){return parseInt(this.element.dataset.min,10)}hasMaxLimit(){return this.element.dataset.max!==void 0}hasMaxPurchaseLimit(){return this.element.dataset.maxPurchaseQuantity!==void 0}hasMinPurchaseLimit(){return this.element.dataset.minPurchaseQuantity!==void 0}initSpinner(){$(this.element).inputSpinner({buttonsWidth:"0rem"})}destroySpinner(){$(this.element).inputSpinner("destroy")}disconnect(){this.destroySpinner()}};var ag={};He(ag,{default:()=>Cu});var Cu=class extends me{success(n){let[e,t,r]=n.detail,{paid_referral_rewards_total:i,unpaid_referral_rewards_total:s}=e;this.unpaidTotalTarget.innerHTML=s,this.paidTotalTarget.innerHTML=i,this.buttonTarget.classList.add("d-none"),$("#dttb_referral_rewards").DataTable().ajax.reload()}};we(Cu,"targets",["unpaidTotal","paidTotal","button"]);var lg={};He(lg,{default:()=>Au});var _w=Tt(On());var Au=class extends me{connect(){this.selectized=$(this.selectTarget).selectize({create:function(n,e){let t=new FormData;t.append("product_category[name]",n),_w.default.ajax({type:"POST",url:"/apps/product_categories.json",data:t,success:function(r){e({value:r.id,text:r.name})},error:function(){}})},sortField:"text"})}disconnect(){this.selectized[0].selectize.destroy()}};we(Au,"targets",["select","selectized"]);var ug={};He(ug,{default:()=>Du});var cg=Tt(On());var Du=class extends me{connect(){this.updateShippingWeight(),this.sumTotal(),this.hasSelectizeTarget&&this.selectize()}addRow(n,e){let t=$("#item-body tr").length;t==0?t=t+1:t=parseInt($("#item-body tr").last().attr("data-product-index"))+1,$("#item-body").append(this.rowDom(n,e,t)),this.updateShippingWeight(),this.sumTotal()}rowDom(n,e,t){let r=s=>s.discarded_at==null,i=n.product_options.filter(r).map((s,o)=>{let a=s.product_option_values.filter(r).map(c=>`<option value='${c.name}'>${c.name}</option>`).join("");return`<div class="form-group select optional bill_items_product_product_options_name form-group col-lg-4 col-md-6 col-12">
          <label class="form-label select optional" for="bill_items_attributes_0_product_product_options_attributes_${o}_name">${s.name}</label>

          <select class="form-control select optional form-select" data-collection-product-variant-target="productOptionValue" data-action="collection-product-variant#productOptionSelected" aria-required="Select an option" name="bill[items_attributes][${t}][product][product_options_attributes][${o}][name]" id="bill_items_attributes_${t}_product_product_options_attributes_${o}_name">
            <option>Please select an option</option>
            ${a}
          </select>
        </div>`}).join("");return`<tr
              data-product-index="${t}"
              data-controller="collection-product-variant"
              data-collection-product-variant-variants='${JSON.stringify(n.variants)}'
            >
              <td>
                <span> ${n.title} </span>
                <div class="row">
                  ${i}
                </div>
                <input class="form-control hidden" data-collection-product-variant-target="productVariantId" type="hidden" name="${e}[items_attributes][${t}][product_variant_id]" id="${e}_items_attributes_${t}_product_variant_id">
                <input class="form-control hidden" type="hidden" value="${n.id}" name="${e}[items_attributes][${t}][product_id]" id="${e}_items_attributes_${t}_product_id">
                <input class="form-control hidden" data-collection-product-variant-target="priceInput" type="hidden" value="${n.value}" name="${e}[items_attributes][${t}][price]" id="${e}_items_attributes_${t}_price">
                <input class="form-control hidden" data-collection-product-variant-target="weightInput" data-collection-summary-target="weightInput" type="hidden" value="${n.weight}" name="${e}[items_attributes][${t}][weight]" id="${e}_items_attributes_${t}_weight">
                <input class="form-control hidden" type="hidden" value="${n.weight_unit}" name="${e}[items_attributes][${t}][weight_unit]" id="${e}_items_attributes_${t}_weight_unit">
              </td>
              <td class="p-quantity">
                <div class="products-summary-spinner" data-collection-product-variant-target="quantityContainer">
                  <input type="number" name="${e}[items_attributes][${t}][quantity]" id="${e}_items_attributes_${t}_quantity" value="1" min="0" class="form-control-sm product-spinner item-quantity" data-controller="input-spinner" data-collection-product-variant-target="quantityInput" data-action="change->input-spinner#updateSpinnerListener change->collection-product-variant#productOptionSelected change->product#sumPrice event-update-quantity-spinner@window->input-spinner#updateSpinnerListener" data-product-weight="${n.weight}" data-product-weight-unit="${n.weight_unit}" style="display: none;">
                </div>
                <div class="span" data-collection-product-variant-target="quantityLeftText"></div>
                <div class="span d-none" data-collection-product-variant-target="soldOutText">Sold out</div>
              </td>
              <td
                class="p-price"
                data-collection-product-variant-target="priceText"
              >
                ${n.value}
              </td>
              <td class="p-total">
                <input
                  class="form-control numeric decimal col-md-12 item-amount"
                  type="number"
                  readonly="true"
                  value="${n.value}"
                  name="${e}[items_attributes][${t}][amount]"
                  data-collection-product-variant-target="amountInput"
                  data-collection-summary-target="amountInput"
                  id="${e}_items_attributes_${t}_amount">
              </td>
              <td class="text-right">
                <a href="#" data-action="product#remove_row" class="btn btn-icon btn-light btn-sm">
                  ${this.deleteButton()}
                </a>
              </td>
            </tr>`}deleteButton(){return`<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-trash" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="#2c3e50" fill="none" stroke-linecap="round" stroke-linejoin="round">
              <path stroke="none" d="M0 0h24v24H0z" fill="none"/>
              <line x1="4" y1="7" x2="20" y2="7" />
              <line x1="10" y1="11" x2="10" y2="17" />
              <line x1="14" y1="11" x2="14" y2="17" />
              <path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12" />
              <path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3" />
            </svg>`}sumTotal(n){var e=0;if($(".items-product").find("tr").each(function(){var a=$(this);a.find(".p-total").each(function(){var c=$(this).find(".item-amount").val();!isNaN(c)&&c.length!==0&&(e+=parseFloat(c))})}),this.hasTotalItemTarget&&(this.totalItemTarget.value=e.toFixed(2)+e.toFixed(2)),this.hasTotalTarget&&(this.totalTarget.value=e.toFixed(2)),this.hasTotalTextTarget&&(this.totalTextTarget.textContent=`RM ${e.toFixed(2)}`),this.hasDiscountTarget){var t=this.discountTarget.value||0;if(this.hasDiscountUnitTarget){var r=this.discountUnitTarget.value;this.discountUnitTarget.value=="percentage"&&(t=t/100*e)}e-=parseFloat(t),e<0&&(e=0)}let i=1,s=!1;if(this.hasRecurringProRateInputTarget&&(i=this.recurringProRateInputTarget.value&&parseFloat(this.recurringProRateInputTarget.value,0)),this.hasEnableRecurringInputTarget&&(s=this.enableRecurringInputTarget.checked),this.hasSummaryProRateWrapperTarget&&(s?(this.summaryProRateWrapperTarget.classList.remove("d-none"),e=e*i):this.summaryProRateWrapperTarget.classList.add("d-none")),this.hasProRatePercentageInputTarget&&(s?this.proRatePercentageInputTarget.value=i:this.proRatePercentageInputTarget.value=""),this.hasTaxTarget){var o=this.taxTarget.value;e+=o/100*e}if(this.hasItemShippingTarget){let a=this.itemShippingTarget.value;e+=parseFloat(a)}if(this.hasTransactionFeeTarget){let a=this.transactionFeeTarget.value;e+=parseFloat(a)}this.hasTotalAmountTarget&&(this.totalAmountTarget.value=e.toFixed(2)),this.hasTotalAmountTextTarget&&(this.totalAmountTextTarget.textContent=`RM ${e.toFixed(2)}`)}updateShippingWeight(){var n=$(".item-quantity");if(n.length==0){$("form").attr("data-delivery-option-weight",0);return}var e=0;n.each(function(){var t=parseInt($(this).val()),r=$(this).attr("data-product-weight-unit"),i=parseFloat($(this).attr("data-product-weight"));switch(r){case"kg":e+=i*1e3*t;break;case"gram":e+=i*t;break;default:e+=0}}),$("form #bill_total_weight").val(e),window.dispatchEvent(new CustomEvent("require-new-rate"))}sumPrice(n){let e=n.target.closest("td").querySelector(".item-quantity").value,t=n.target.closest("tr");if(!isNaN(e)&&e.length!==0){var r=t.querySelector(".p-price").textContent.replace(/[^0-9.-]+/g,""),i=parseFloat(r)*e;let s=t.querySelector(".p-total"),o=s.querySelector(".p-total-text");s.querySelector(".item-amount").value=i.toFixed(2),o&&(o.textContent=`RM ${i.toFixed(2)}`)}this.updateShippingWeight(),this.sumTotal()}remove_row(n){n.preventDefault(),this.item=n.currentTarget,this.item.closest("tr").remove(),this.updateShippingWeight(),this.sumTotal()}delete_row(n){n.preventDefault(),this.item=n.currentTarget;let e=this.item.getAttribute("href");this.item=n.currentTarget,this.item.closest("tr").remove(),this.updateShippingWeight(),this.sumTotal(),cg.default.ajax({type:"DELETE",url:e,dataType:"script",success:t=>this._success(),complete:t=>this._complete(),error:t=>this._errors()})}selectize(){let n=this.selectizeTarget.dataset.url,e=this.selectizeTarget.dataset.parent,t=[],r=this;$(this.selectizeTarget).selectize({valueField:"id",labelField:"title",searchField:"title",create:!1,preload:"focus",render:{option:(i,s)=>r.dropdownDom(i)},load:function(i,s){let o=n;i.length>0&&(o=`${n}?draw=1&columns%5B0%5D%5Bdata%5D=title&search%5Bvalue%5D=${encodeURIComponent(i)}`,this.clearOptions(),this.renderCache={}),cg.default.ajax({type:"GET",url:o,success:a=>s(a.data),error:()=>s()})},onChange:function(i,s){var o=this.options[i];o&&r.addRow(o,e)},onFocus:function(){this.clear()}})}dropdownDom(n){return`<div class="list-item p-2" data-id="${n.id}">
              <div class="title">${n.title}</span>
              <div class="text-muted d-flex justify-content-between">
                <span>Code:  ${n.code}</span>
                <span class="price ml-auto">Price:  ${n.price}</span>
              </div>
            </div>`}_success(){}_complete(){}_errors(){}};we(Du,"targets",["selectize","discount","discountText","tax","taxText","discountUnit","total","totalText","totalAmount","totalAmountText","totalItem","itemShipping","itemShippingText","transactionFee","recurringProRateInput","proRatePercentageInput","summaryProRateWrapper","enableRecurringInput"]);var dg={};He(dg,{default:()=>xu});var xu=class extends me{connect(){this.togglerTarget.checked&&this.hasContainerTarget&&(this.containerTarget.classList.remove("d-none"),this.unitChange())}unitChange(){if(!this.hasWeightTarget&&!this.hasUnitTarget)return;let n=parseFloat(this.weightTarget.value);this.unitTarget.value=="gram"?this.weightTarget.value=n.toFixed(0):this.weightTarget.value=n.toFixed(2)}toggle(){this.containerTarget.classList.contains("d-none")?(this.containerTarget.classList.remove("d-none"),this.resetFields(!1),this.unitChange()):(this.resetFields(!0),this.containerTarget.classList.add("d-none"))}resetFields(n){!this.hasWeightTarget&&!this.hasUnitTarget||(n?(this.weightTarget.value="0.0",this.weightTarget.setAttribute("value","0.0"),this.unitTarget.querySelectorAll("option").forEach(e=>{e.removeAttribute("selected")}),this.unitTarget.selectedIndex=-1):(this.weightTarget.value="0.0",this.weightTarget.setAttribute("value","0.0"),this.unitTarget.selectedIndex=0))}};we(xu,"targets",["weight","unit","toggler","container"]);var fg={};He(fg,{default:()=>Ou});var Ou=class extends me{connect(){this.conditionTarget.value!=="flat_rate"&&this.containerTarget.classList.remove("d-none")}toggle(n){n.target.value==="flat_rate"?(this.resetFields(!0),this.containerTarget.classList.add("d-none")):(this.resetFields(!1),this.containerTarget.classList.remove("d-none"))}resetFields(n){this.valueTargets.forEach(e=>{e.disabled=n,e.value=""})}};we(Ou,"targets",["value","condition","container"]);var hg={};He(hg,{default:()=>Iu});var Iu=class extends me{connect(){this.hasShippingRateTarget&&this.shippingRateTarget.checked&&this.containerTarget.classList.remove("d-none")}toggle(){this.containerTarget.classList.contains("d-none")?(this.resetFields(!1),this.containerTarget.classList.remove("d-none")):(this.resetFields(!0),this.containerTarget.classList.add("d-none"))}resetFields(n){n?this.shippingIdTargets.forEach(e=>{e.disabled=n,e.removeAttribute("checked"),this.valueTarget.value=""}):this.shippingIdTargets.forEach(e=>{e.disabled=n,this.shippingIdTargets[0].setAttribute("checked","checked")})}};we(Iu,"targets",["shippingId","shippingRate","container","value"]);var pg={};He(pg,{default:()=>ku});var ku=class extends me{updateTotalDue(){if(this.isShippingEnabled()){let n=this.postcodeTarget.value;fetch(`/shipment_costs/${n}.json?store_id=${this.data.get("storeId")}`).then(e=>e.json()).then(e=>{let t=this.recurringProRateInputTarget.value&&parseFloat(this.recurringProRateInputTarget.value,0),r=!1;this.hasEnableRecurringInputTarget&&(r=this.enableRecurringInputTarget.checked);let i=parseFloat(e.amount||0),s=parseFloat(this.data.get("tax")),o=i+(this.getProRatedSubTotal()-this.getDiscountAmount())*(1+s/100);this.shippingTarget.innerHTML=`RM ${parseFloat(i).toFixed(2)}`,this.dueTarget.innerHTML=`RM ${parseFloat(o).toFixed(2)}`}).catch(()=>{let e=this.getProRatedSubTotal()-this.getDiscountAmount();this.shippingTarget.innerHTML="RM 0.00",this.dueTarget.innerHTML=`RM ${parseFloat(e).toFixed(2)}`})}else{let n=parseFloat(this.data.get("tax")),e=0;this.hasItemShippingTarget&&(e=parseFloat(this.itemShippingTarget.value||0),this.shippingTarget.innerHTML=`RM ${parseFloat(e).toFixed(2)}`);let t=e+(this.getProRatedSubTotal()-this.getDiscountAmount())*(1+n/100);this.dueTarget.innerHTML=`RM ${parseFloat(t).toFixed(2)}`}}resetShipping(){if(!this.isShippingEnabled())return;let n=this.getProRatedSubTotal()-this.getDiscountAmount();this.shippingTarget.innerHTML="RM 0.00",this.dueTarget.innerHTML=`RM ${parseFloat(n).toFixed(2)}`}isShippingEnabled(){return this.data.get("shippingEnabled")==="true"}getProRatedSubTotal(){return parseFloat(this.data.get("subtotal"))*this.getProRatePercentage()}getDiscountAmount(){let n=parseFloat(this.data.get("discount-amount"))||0,e=this.getProRatedSubTotal();return n>e?e:n}getProRatePercentage(){let n=this.recurringProRateInputTarget.value&&parseFloat(this.recurringProRateInputTarget.value,0),e=1;return this.hasSummaryProRateWrapperTarget&&(this.isRecurringEnabled()?(this.summaryProRateWrapperTarget.classList.remove("d-none"),e=n):(this.summaryProRateWrapperTarget.classList.add("d-none"),e=1)),this.hasProRatePercentageInputTarget&&(this.isRecurringEnabled()?this.proRatePercentageInputTarget.value=n:this.proRatePercentageInputTarget.value=""),e}isRecurringEnabled(){let n=!1;return this.hasEnableRecurringInputTarget&&(n=this.enableRecurringInputTarget.checked),n}};we(ku,"targets",["shipping","postcode","due","itemShipping","recurringProRateInput","proRatePercentageInput","summaryProRateWrapper","enableRecurringInput"]);var gg={};He(gg,{default:()=>Ru});var Ru=class extends me{connect(){this.toggleFullAccess()}toggleFullAccess(){console.log(this.roleTarget.value),this.roleTarget.value==="admin"?this.containerTarget.classList.remove("d-none"):this.containerTarget.classList.add("d-none")}};we(Ru,"targets",["role","container"]);var mg={};He(mg,{default:()=>Mu});var el=Tt(On());var Mu=class extends me{connect(){this.filter(),this.updateValueLabel(),this.updatePlaceholder(),this.toggleFields(),this.updateTotal()}filter(){this.hasZakatStateTarget&&(this.hasZakatAmilTarget&&el.default.ajax({url:`/zakats/amils?zakat_state_id=${this.zakatStateTarget.value}`,format:"json",type:"GET",success:n=>{this.filterOptions(this.zakatAmilTarget,n.data)}}),this.hasZakatAgencyTarget&&el.default.ajax({url:`/zakats/agencies?zakat_state_id=${this.zakatStateTarget.value}`,format:"json",type:"GET",success:n=>{this.filterOptions(this.zakatAgencyTarget,n.data),this.filterByAgency(),this.updatePlaceholder(),this.toggleFields(),this.updateTotal()}}))}filterByAgency(){this.hasZakatTypeTarget&&el.default.ajax({url:`/zakats/types?zakat_agency_id=${this.zakatAgencyTarget.value}`,format:"json",type:"GET",success:n=>{this.filterOptions(this.zakatTypeTarget,n.data),this.filterByType(),this.updatePlaceholder(),this.toggleFields(),this.updateTotal()}})}filterByType(){this.hasZakatTypeTarget&&this.hasZakatRateTarget&&el.default.ajax({url:`/zakats/rates?zakat_type_id=${this.zakatTypeTarget.value}`,format:"json",type:"GET",success:n=>{this.filterOptions(this.zakatRateTarget,n.data),this.updateValueLabel(n.parent),this.updatePlaceholder(),this.toggleFields(),this.updateTotal()}})}filterOptions(n,e){n.options&&Array.from(n.options).forEach((t,r)=>{e.find(s=>s.id==t.value)||t.value==""?t.classList.remove("d-none"):(t.classList.add("d-none"),t.selected=!1)})}updatePlaceholder(){this.hasZakatAgencyTarget&&this.zakatAgencyTarget.options&&(this.zakatStateTarget.value==""?(this.zakatAgencyTarget.options[0].text="Sila pilih Negeri dahulu",this.zakatAgencyTarget.options[0].label="Sila pilih Negeri dahulu"):(this.zakatAgencyTarget.options[0].text="Sila pilih Agensi Zakat",this.zakatAgencyTarget.options[0].label="Sila pilih Agensi Zakat")),this.hasZakatTypeTarget&&this.zakatTypeTarget.options&&(this.zakatAgencyTarget.value==""?(this.zakatTypeTarget.options[0].text="Sila pilih Agensi dahulu",this.zakatTypeTarget.options[0].label="Sila pilih Agensi dahulu"):(this.zakatTypeTarget.options[0].text="Sila pilih Jenis Zakat",this.zakatTypeTarget.options[0].label="Sila pilih Jenis Zakat")),this.hasZakatRateTarget&&this.zakatRateTarget.options&&(this.zakatTypeTarget.value==""?(this.zakatRateTarget.options[0].text="Sila pilih Jenis Zakat dahulu",this.zakatRateTarget.options[0].label="Sila pilih Jenis Zakat dahulu"):(this.zakatRateTarget.options[0].text="Sila pilih Nilai Zakat",this.zakatRateTarget.options[0].label="Sila pilih Nilai Zakat"))}toggleFields(){this.hasZakatRateTarget&&this.zakatRateTarget.options&&this.zakatTypeTarget.value!==""&&(Array.from(this.zakatRateTarget.options).filter(e=>!e.classList.contains("d-none")).length>1?(this.zakatRateWrapperTarget.classList.remove("d-none"),this.valueWrapperTarget.classList.remove("d-none"),this.zakatRateTarget.setAttribute("required",!0),this.valueTarget.setAttribute("required",!0)):(this.zakatRateWrapperTarget.classList.add("d-none"),this.valueWrapperTarget.classList.add("d-none"),this.zakatRateTarget.removeAttribute("required"),this.valueTarget.removeAttribute("required")))}updateValueLabel(n){this.hasValueLabelTarget&&(n&&n.value_label?this.valueLabelTarget.innerHTML=n.value_label:this.valueLabelTarget.innerHTML="(Sila pilih Jenis Zakat)")}updateTotal(){window.dispatchEvent(new CustomEvent("event-update-zakat-total"))}};we(Mu,"targets",["zakatAgency","zakatState","zakatAmil","zakatType","zakatRate","zakatRateWrapper","valueWrapper","valueLabel","value"]);var jM=[{name:"application--additional-fee",module:Bp,filename:"./application/additional_fee_controller.js"},{name:"application--address-form",module:jp,filename:"./application/address_form_controller.js"},{name:"application--affiliate-tier-form",module:Hp,filename:"./application/affiliate_tier_form_controller.js"},{name:"application--agent-form",module:qp,filename:"./application/agent_form_controller.js"},{name:"application--bill",module:Vp,filename:"./application/bill_controller.js"},{name:"application--collection-product-variant",module:$p,filename:"./application/collection_product_variant_controller.js"},{name:"application--custom-field-form",module:zp,filename:"./application/custom_field_form_controller.js"},{name:"application--customer-address",module:Up,filename:"./application/customer_address_controller.js"},{name:"application--delivery-option",module:Qp,filename:"./application/delivery_option_controller.js"},{name:"application--direct-amount-selection",module:Xp,filename:"./application/direct_amount_selection_controller.js"},{name:"application--discount",module:Zp,filename:"./application/discount_controller.js"},{name:"application--document-upload",module:ig,filename:"./application/document_upload_controller.js"},{name:"application--input-spinner",module:og,filename:"./application/input_spinner_controller.js"},{name:"application--pay-user-referral-rewards",module:ag,filename:"./application/pay_user_referral_rewards_controller.js"},{name:"application--product-category",module:lg,filename:"./application/product_category_controller.js"},{name:"application--product",module:ug,filename:"./application/product_controller.js"},{name:"application--product-shipping-rate",module:dg,filename:"./application/product_shipping_rate_controller.js"},{name:"application--shipping-condition",module:fg,filename:"./application/shipping_condition_controller.js"},{name:"application--shipping-profile-selection",module:hg,filename:"./application/shipping_profile_selection_controller.js"},{name:"application--store-collection",module:pg,filename:"./application/store_collection_controller.js"},{name:"application--team-full-access",module:gg,filename:"./application/team_full_access_controller.js"},{name:"application--zakat-fields",module:mg,filename:"./application/zakat_fields_controller.js"}],ww=jM;var vg={};He(vg,{default:()=>Nu});var Nu=class extends me{connect(){this.hasTogglerTarget&&this.togglerTarget.checked&&this.containerTarget.classList.remove("d-none")}toggle(n){let e=this.togglerTarget.checked;this.containerTarget.classList.contains("d-none")?this.containerTarget.classList.remove("d-none"):(this.inputTarget.value="0.0",this.containerTarget.classList.add("d-none"))}};we(Nu,"targets",["container","toggler","input"]);var yg={};He(yg,{default:()=>Pu});var Pu=class extends me{postcode_change(n){let e=n.target.value,t=n.target.dataset.shippingField==="true";yu(e,this.cityTarget,this.stateTarget).then(()=>{if(t){let r=new CustomEvent("event-update-total-due");window.dispatchEvent(r)}}).catch(()=>{if(t){let r=new CustomEvent("event-postcode-empty");window.dispatchEvent(r)}})}};we(Pu,"targets",["city","postcode","state"]);var bg={};He(bg,{default:()=>Lu});var Sw=Tt(Po()),Tw=Tt(On());var Lu=class extends me{initialize(){this.save=this.save.bind(this)}connect(){this.delayValue>0&&(this.save=(0,Sw.default)(this.save,this.delayValue))}save(){window._rails_loaded?Tw.default.fire(this.element,"submit"):this.element.requestSubmit()}};we(Lu,"values",{delay:Number});var Eg={};He(Eg,{default:()=>Fu});var Fu=class extends me{connect(){this.toggle()}toggle(){let n=this.selectTarget;var e=document.querySelector(".image"),t=document.querySelector(".custom");n.value==e.dataset.values&&(e.hidden=!1,t.hidden=!0),n.value==t.dataset.values&&(e.hidden=!0,t.hidden=!1)}};we(Fu,"targets",["element","select"]);var _g={};He(_g,{default:()=>Bu});var Bu=class extends me{connect(){let n,e="";this.hasB2cTarget&&(n=this.b2cTarget.innerHTML),this.hasB2bTarget&&(e=this.b2bTarget.innerHTML),this.initSelectize(),this.hasB2cTarget&&this.hasB2bTarget&&(this.b2cTarget.innerHTML="",this.b2bTarget.innerHTML="",this.collapsible(n,e)),this.eMandate()}collapsible(n,e){let t=document.getElementById("banks-payment");t.addEventListener("show.bs.collapse",r=>{r.target.dataset.bankTarget==="b2c"?this.b2cTarget.innerHTML=n:this.b2bTarget.innerHTML=e,this.initSelectize()}),t.addEventListener("hide.bs.collapse",r=>{$(r.target).html("")})}initSelectize(){this.hasDropdownTarget&&this.dropdownTargets.forEach(n=>{this.renderSelectize(n)})}renderSelectize(n){let e=this;$(n).selectize({render:{option:(t,r)=>e.dropdownDom(t,r),item:(t,r)=>e.dropdownDom(t,r)},onFocus:function(){this.clear()}})}dropdownDom(n,e){return`<div class="option cursor_pointer">
                <span class="payment payment-bank-${n.value} mr-2 ml-n1"></span>
                <span class="payment-label">${e(n.text)}</span>
            </div>`}disconnect(){this.hasDropdownTarget&&this.dropdownTargets.forEach(n=>{n.selectize.destroy()})}eMandate(){$("#banks-payment.accordion .accordion-collapse.collapse").on("shown.bs.collapse",function(){if(!document.querySelector("#bill_e_mandate_true"))return!1;let n=document.querySelector("#bill_e_mandate_true:checked")?1:0,e=this.querySelectorAll(".label-template")[n].innerHTML;this.querySelector("label").innerHTML=e})}};we(Bu,"targets",["dropdown","b2c","b2b"]);var wg={};He(wg,{default:()=>ju});var ju=class extends me{connect(){document.queryCommandSupported("copy")&&this.element.classList.add("clipboard--supported")}copy(n){n.preventDefault(),$.snackbar({content:"Copied to clipboard"}),this.selectText(this.sourceTarget),document.execCommand("copy"),this.deselectAll()}copyhref(n){n.preventDefault(),$.snackbar({content:"Copied to clipboard"});let e=document.createElement("span");e.innerText=this.sourceTarget.getAttribute("href"),document.body.appendChild(e),this.selectText(e),document.execCommand("copy"),this.deselectAll(),document.body.removeChild(e)}selectText(n){if(/INPUT|TEXTAREA/i.test(n.tagName)){n.focus(),n.setSelectionRange?n.setSelectionRange(0,n.value.length):n.select();return}if(window.getSelection)window.getSelection().selectAllChildren(n);else if(document.body.createTextRange){var e=document.body.createTextRange();e.moveToElementText(n),e.select()}}deselectAll(){var n=document.activeElement;n&&/INPUT|TEXTAREA/i.test(n.tagName)&&("selectionStart"in n&&(n.selectionEnd=n.selectionStart),n.blur()),window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty()}};we(ju,"targets",["source"]);var Sg={};He(Sg,{default:()=>Hu});var Hu=class extends me{connect(){this.fixAmountToggle(null,!0),this.nullMinAmount()}fixAmountToggle(n,e=!1){let t=this.fixAmountTarget.checked;this.enableTargets.forEach(r=>{e||(r.checked=!1),r.disabled=!t}),this.disableTargets.forEach(r=>{e||(r.checked=!1),r.disabled=t})}nullMinAmount(){let n=this.minAmountTarget;(n.value===null||n.value.trim()==="")&&(n.value="0.0")}};we(Hu,"targets",["enable","disable","fixAmount","minAmount"]);var Tg={};He(Tg,{default:()=>qu});var qu=class extends me{updateSubtotal(){let n=this.amountInputTargets.reduce((t,r)=>t+parseFloat(r.value),0),e=this.weightInputTargets.reduce((t,r)=>t+parseFloat(r.value),0);this.subtotalInputTarget.value=n.toFixed(2),this.hasTotalWeightInputTarget&&(this.totalWeightInputTarget.value=e),this.hasSubtotalTextTarget&&(this.subtotalTextTarget.textContent=`RM ${n.toFixed(2)}`),window.dispatchEvent(new CustomEvent("event-update-total-due"))}};we(qu,"targets",["amountInput","weightInput","quantityInput","subtotalInput","totalWeightInput","subtotalText"]);var Ag={};He(Ag,{default:()=>Cg});var Cg=class extends me{connect(){this.load(),this.data.get("refreshInterval")&&this.startRefreshing()}disconnect(){this.stopRefreshing()}load(){let n=this.data.get("url");fetch(n,{headers:{"X-Requested-With":"XMLHttpRequest"}}).then(e=>e.text()).then(e=>this.element.innerHTML=e)}startRefreshing(){this.refreshTimer=setInterval(()=>{this.load()},this.data.get("refreshInterval"))}stopRefreshing(){this.refreshTimer&&clearInterval(this.refreshTimer)}};var Dg={};He(Dg,{default:()=>Vu});var Vu=class extends me{connect(){this.hasTogglerTarget&&this.togglerTarget.checked&&(this.containerTarget.classList.remove("d-none"),this.inputTarget.disabled=!1,this.disableTargets.forEach(n=>{n.disabled=!0}))}toggle(n){let e=this.togglerTarget.checked;this.containerTarget.classList.contains("d-none")?(this.inputTarget.disabled=!1,this.containerTarget.classList.remove("d-none")):(this.inputTarget.disabled=!0,this.containerTarget.classList.add("d-none")),this.disableTargets.forEach(t=>{t.disabled=e})}};we(Vu,"targets",["container","toggler","input","disable"]);var xg={};He(xg,{default:()=>$u});var $u=class extends me{connect(){this.hasDisableTarget&&!this.isChecked()&&this.disable(!0),this.hasHiddenTarget&&!this.isChecked()&&this.hidden(!0)}toggle(n){this.disable(!this.isChecked()),this.hidden(!this.isChecked())}disable(n){this.disableTargets.forEach(e=>{var t=e.querySelectorAll("input, button");t.forEach(function(r){r.disabled=n})})}hidden(n){this.hiddenTargets.forEach(e=>{e.hidden=n})}isChecked(){return this.hasAcceptTarget?this.acceptTarget.checked:!0}};we($u,"targets",["disable","accept","hidden"]);var Og={};He(Og,{default:()=>tl});var tl=class extends me{connect(){this.toggle()}toggle(){this.inputTarget.value!=this.typeValue?this.outputTarget.hidden=!0:this.inputTarget.value==this.typeValue&&(this.outputTarget.hidden=!1)}};we(tl,"targets",["input","output"]),we(tl,"values",{type:String});var Ig={};He(Ig,{default:()=>zu});var zu=class extends me{connect(){}toggleTargets(){this.hideableTargets.forEach(n=>{n.hidden=!n.hidden})}};we(zu,"targets",["hideable"]);var kg={};He(kg,{default:()=>Wu});var Wu=class extends me{connect(){this.hasSwitchTarget&&(this.field().value!==""||this.switchTarget.checked)&&(this.container().classList.remove("d-none"),this.switchTarget.checked=!0)}toggle(){this.container().classList.contains("d-none")?this.container().classList.remove("d-none"):(this.field().value=null,this.container().classList.add("d-none"))}container(){return document.getElementById(this.switchTarget.dataset.containerTarget)}field(){return this.container().getElementsByTagName("input")[0]}};we(Wu,"targets",["switch"]);var Bg={};He(Bg,{default:()=>Ju});var Uu=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],Ri={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(n){return typeof console<"u"&&console.warn(n)},getWeek:function(n){var e=new Date(n.getTime());e.setHours(0,0,0,0),e.setDate(e.getDate()+3-(e.getDay()+6)%7);var t=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-t.getTime())/864e5-3+(t.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1};var Yu={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(n){var e=n%100;if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},Gu=Yu;var bn=function(n,e){return e===void 0&&(e=2),("000"+n).slice(e*-1)},In=function(n){return n===!0?1:0};function Rg(n,e){var t;return function(){var r=this,i=arguments;clearTimeout(t),t=setTimeout(function(){return n.apply(r,i)},e)}}var Ku=function(n){return n instanceof Array?n:[n]};function En(n,e,t){if(t===!0)return n.classList.add(e);n.classList.remove(e)}function wt(n,e,t){var r=window.document.createElement(n);return e=e||"",t=t||"",r.className=e,t!==void 0&&(r.textContent=t),r}function nl(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function Mg(n,e){if(e(n))return n;if(n.parentNode)return Mg(n.parentNode,e)}function rl(n,e){var t=wt("div","numInputWrapper"),r=wt("input","numInput "+n),i=wt("span","arrowUp"),s=wt("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?r.type="number":(r.type="text",r.pattern="\\d*"),e!==void 0)for(var o in e)r.setAttribute(o,e[o]);return t.appendChild(r),t.appendChild(i),t.appendChild(s),t}function kn(n){try{if(typeof n.composedPath=="function"){var e=n.composedPath();return e[0]}return n.target}catch{return n.target}}var Ng=function(){},il=function(n,e,t){return t.months[e?"shorthand":"longhand"][n]},Cw={D:Ng,F:function(n,e,t){n.setMonth(t.months.longhand.indexOf(e))},G:function(n,e){n.setHours((n.getHours()>=12?12:0)+parseFloat(e))},H:function(n,e){n.setHours(parseFloat(e))},J:function(n,e){n.setDate(parseFloat(e))},K:function(n,e,t){n.setHours(n.getHours()%12+12*In(new RegExp(t.amPM[1],"i").test(e)))},M:function(n,e,t){n.setMonth(t.months.shorthand.indexOf(e))},S:function(n,e){n.setSeconds(parseFloat(e))},U:function(n,e){return new Date(parseFloat(e)*1e3)},W:function(n,e,t){var r=parseInt(e),i=new Date(n.getFullYear(),0,2+(r-1)*7,0,0,0,0);return i.setDate(i.getDate()-i.getDay()+t.firstDayOfWeek),i},Y:function(n,e){n.setFullYear(parseFloat(e))},Z:function(n,e){return new Date(e)},d:function(n,e){n.setDate(parseFloat(e))},h:function(n,e){n.setHours((n.getHours()>=12?12:0)+parseFloat(e))},i:function(n,e){n.setMinutes(parseFloat(e))},j:function(n,e){n.setDate(parseFloat(e))},l:Ng,m:function(n,e){n.setMonth(parseFloat(e)-1)},n:function(n,e){n.setMonth(parseFloat(e)-1)},s:function(n,e){n.setSeconds(parseFloat(e))},u:function(n,e){return new Date(parseFloat(e))},w:Ng,y:function(n,e){n.setFullYear(2e3+parseFloat(e))}},si={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},Lo={Z:function(n){return n.toISOString()},D:function(n,e,t){return e.weekdays.shorthand[Lo.w(n,e,t)]},F:function(n,e,t){return il(Lo.n(n,e,t)-1,!1,e)},G:function(n,e,t){return bn(Lo.h(n,e,t))},H:function(n){return bn(n.getHours())},J:function(n,e){return e.ordinal!==void 0?n.getDate()+e.ordinal(n.getDate()):n.getDate()},K:function(n,e){return e.amPM[In(n.getHours()>11)]},M:function(n,e){return il(n.getMonth(),!0,e)},S:function(n){return bn(n.getSeconds())},U:function(n){return n.getTime()/1e3},W:function(n,e,t){return t.getWeek(n)},Y:function(n){return bn(n.getFullYear(),4)},d:function(n){return bn(n.getDate())},h:function(n){return n.getHours()%12?n.getHours()%12:12},i:function(n){return bn(n.getMinutes())},j:function(n){return n.getDate()},l:function(n,e){return e.weekdays.longhand[n.getDay()]},m:function(n){return bn(n.getMonth()+1)},n:function(n){return n.getMonth()+1},s:function(n){return n.getSeconds()},u:function(n){return n.getTime()},w:function(n){return n.getDay()},y:function(n){return String(n.getFullYear()).substring(2)}};var Pg=function(n){var e=n.config,t=e===void 0?Ri:e,r=n.l10n,i=r===void 0?Yu:r,s=n.isMobile,o=s===void 0?!1:s;return function(a,c,u){var f=u||i;return t.formatDate!==void 0&&!o?t.formatDate(a,c,f):c.split("").map(function(p,h,y){return Lo[p]&&y[h-1]!=="\\"?Lo[p](a,f,t):p!=="\\"?p:""}).join("")}},Qu=function(n){var e=n.config,t=e===void 0?Ri:e,r=n.l10n,i=r===void 0?Yu:r;return function(s,o,a,c){if(!(s!==0&&!s)){var u=c||i,f,p=s;if(s instanceof Date)f=new Date(s.getTime());else if(typeof s!="string"&&s.toFixed!==void 0)f=new Date(s);else if(typeof s=="string"){var h=o||(t||Ri).dateFormat,y=String(s).trim();if(y==="today")f=new Date,a=!0;else if(t&&t.parseDate)f=t.parseDate(s,h);else if(/Z$/.test(y)||/GMT$/.test(y))f=new Date(s);else{for(var _=void 0,w=[],E=0,D=0,R="";E<h.length;E++){var H=h[E],F=H==="\\",m=h[E-1]==="\\"||F;if(si[H]&&!m){R+=si[H];var Q=new RegExp(R).exec(s);Q&&(_=!0)&&w[H!=="Y"?"push":"unshift"]({fn:Cw[H],val:Q[++D]})}else F||(R+=".")}f=!t||!t.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0)),w.forEach(function(le){var J=le.fn,q=le.val;return f=J(f,q,u)||f}),f=_?f:void 0}}if(!(f instanceof Date&&!isNaN(f.getTime()))){t.errorHandler(new Error("Invalid date provided: "+p));return}return a===!0&&f.setHours(0,0,0,0),f}}};function Rn(n,e,t){return t===void 0&&(t=!0),t!==!1?new Date(n.getTime()).setHours(0,0,0,0)-new Date(e.getTime()).setHours(0,0,0,0):n.getTime()-e.getTime()}var Aw=function(n,e,t){return n>Math.min(e,t)&&n<Math.max(e,t)},Xu=function(n,e,t){return n*3600+e*60+t},Dw=function(n){var e=Math.floor(n/3600),t=(n-e*3600)/60;return[e,t,n-e*3600-t*60]},xw={DAY:864e5};function Zu(n){var e=n.defaultHour,t=n.defaultMinute,r=n.defaultSeconds;if(n.minDate!==void 0){var i=n.minDate.getHours(),s=n.minDate.getMinutes(),o=n.minDate.getSeconds();e<i&&(e=i),e===i&&t<s&&(t=s),e===i&&t===s&&r<o&&(r=n.minDate.getSeconds())}if(n.maxDate!==void 0){var a=n.maxDate.getHours(),c=n.maxDate.getMinutes();e=Math.min(e,a),e===a&&(t=Math.min(c,t)),e===a&&t===c&&(r=n.maxDate.getSeconds())}return{hours:e,minutes:t,seconds:r}}typeof Object.assign!="function"&&(Object.assign=function(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];if(!n)throw TypeError("Cannot convert undefined or null to object");for(var r=function(a){a&&Object.keys(a).forEach(function(c){return n[c]=a[c]})},i=0,s=e;i<s.length;i++){var o=s[i];r(o)}return n});var _n=function(){return _n=Object.assign||function(n){for(var e,t=1,r=arguments.length;t<r;t++){e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i])}return n},_n.apply(this,arguments)},Ow=function(){for(var n=0,e=0,t=arguments.length;e<t;e++)n+=arguments[e].length;for(var r=Array(n),i=0,e=0;e<t;e++)for(var s=arguments[e],o=0,a=s.length;o<a;o++,i++)r[i]=s[o];return r},HM=300;function qM(n,e){var t={config:_n(_n({},Ri),en.defaultConfig),l10n:Gu};t.parseDate=Qu({config:t.config,l10n:t.l10n}),t._handlers=[],t.pluginElements=[],t.loadedPlugins=[],t._bind=w,t._setHoursFromDate=h,t._positionCalendar=rt,t.changeMonth=Qe,t.changeYear=C,t.clear=Ge,t.close=We,t.onMouseOver=ee,t._createElement=wt,t.createDay=Q,t.destroy=lt,t.isEnabled=O,t.jumpToDate=R,t.updateValue=Gt,t.open=be,t.redraw=vt,t.set=zt,t.setDate=dn,t.toggle=Ft;function r(){t.utils={getDaysInMonth:function(P,L){return P===void 0&&(P=t.currentMonth),L===void 0&&(L=t.currentYear),P===1&&(L%4===0&&L%100!==0||L%400===0)?29:t.l10n.daysInMonth[P]}}}function i(){t.element=t.input=n,t.isOpen=!1,Se(),nt(),Ot(),Pt(),r(),t.isMobile||m(),D(),(t.selectedDates.length||t.config.noCalendar)&&(t.config.enableTime&&h(t.config.noCalendar?t.latestSelectedDateObj:void 0),Gt(!1)),a();var P=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!t.isMobile&&P&&rt(),dt("onReady")}function s(){var P;return((P=t.calendarContainer)===null||P===void 0?void 0:P.getRootNode()).activeElement||document.activeElement}function o(P){return P.bind(t)}function a(){var P=t.config;P.weekNumbers===!1&&P.showMonths===1||P.noCalendar!==!0&&window.requestAnimationFrame(function(){if(t.calendarContainer!==void 0&&(t.calendarContainer.style.visibility="hidden",t.calendarContainer.style.display="block"),t.daysContainer!==void 0){var L=(t.days.offsetWidth+1)*P.showMonths;t.daysContainer.style.width=L+"px",t.calendarContainer.style.width=L+(t.weekWrapper!==void 0?t.weekWrapper.offsetWidth:0)+"px",t.calendarContainer.style.removeProperty("visibility"),t.calendarContainer.style.removeProperty("display")}})}function c(P){if(t.selectedDates.length===0){var L=t.config.minDate===void 0||Rn(new Date,t.config.minDate)>=0?new Date:new Date(t.config.minDate.getTime()),te=Zu(t.config);L.setHours(te.hours,te.minutes,te.seconds,L.getMilliseconds()),t.selectedDates=[L],t.latestSelectedDateObj=L}P!==void 0&&P.type!=="blur"&&oo(P);var he=t._input.value;p(),Gt(),t._input.value!==he&&t._debouncedChange()}function u(P,L){return P%12+12*In(L===t.l10n.amPM[1])}function f(P){switch(P%24){case 0:case 12:return 12;default:return P%12}}function p(){if(!(t.hourElement===void 0||t.minuteElement===void 0)){var P=(parseInt(t.hourElement.value.slice(-2),10)||0)%24,L=(parseInt(t.minuteElement.value,10)||0)%60,te=t.secondElement!==void 0?(parseInt(t.secondElement.value,10)||0)%60:0;t.amPM!==void 0&&(P=u(P,t.amPM.textContent));var he=t.config.minTime!==void 0||t.config.minDate&&t.minDateHasTime&&t.latestSelectedDateObj&&Rn(t.latestSelectedDateObj,t.config.minDate,!0)===0,Ie=t.config.maxTime!==void 0||t.config.maxDate&&t.maxDateHasTime&&t.latestSelectedDateObj&&Rn(t.latestSelectedDateObj,t.config.maxDate,!0)===0;if(t.config.maxTime!==void 0&&t.config.minTime!==void 0&&t.config.minTime>t.config.maxTime){var Me=Xu(t.config.minTime.getHours(),t.config.minTime.getMinutes(),t.config.minTime.getSeconds()),at=Xu(t.config.maxTime.getHours(),t.config.maxTime.getMinutes(),t.config.maxTime.getSeconds()),je=Xu(P,L,te);if(je>at&&je<Me){var it=Dw(Me);P=it[0],L=it[1],te=it[2]}}else{if(Ie){var Be=t.config.maxTime!==void 0?t.config.maxTime:t.config.maxDate;P=Math.min(P,Be.getHours()),P===Be.getHours()&&(L=Math.min(L,Be.getMinutes())),L===Be.getMinutes()&&(te=Math.min(te,Be.getSeconds()))}if(he){var Xe=t.config.minTime!==void 0?t.config.minTime:t.config.minDate;P=Math.max(P,Xe.getHours()),P===Xe.getHours()&&L<Xe.getMinutes()&&(L=Xe.getMinutes()),L===Xe.getMinutes()&&(te=Math.max(te,Xe.getSeconds()))}}y(P,L,te)}}function h(P){var L=P||t.latestSelectedDateObj;L&&L instanceof Date&&y(L.getHours(),L.getMinutes(),L.getSeconds())}function y(P,L,te){t.latestSelectedDateObj!==void 0&&t.latestSelectedDateObj.setHours(P%24,L,te||0,0),!(!t.hourElement||!t.minuteElement||t.isMobile)&&(t.hourElement.value=bn(t.config.time_24hr?P:(12+P)%12+12*In(P%12===0)),t.minuteElement.value=bn(L),t.amPM!==void 0&&(t.amPM.textContent=t.l10n.amPM[In(P>=12)]),t.secondElement!==void 0&&(t.secondElement.value=bn(te)))}function _(P){var L=kn(P),te=parseInt(L.value)+(P.delta||0);(te/1e3>1||P.key==="Enter"&&!/[^\d]/.test(te.toString()))&&C(te)}function w(P,L,te,he){if(L instanceof Array)return L.forEach(function(Ie){return w(P,Ie,te,he)});if(P instanceof Array)return P.forEach(function(Ie){return w(Ie,L,te,he)});P.addEventListener(L,te,he),t._handlers.push({remove:function(){return P.removeEventListener(L,te,he)}})}function E(){dt("onChange")}function D(){if(t.config.wrap&&["open","close","toggle","clear"].forEach(function(te){Array.prototype.forEach.call(t.element.querySelectorAll("[data-"+te+"]"),function(he){return w(he,"click",t[te])})}),t.isMobile){ln();return}var P=Rg(ge,50);if(t._debouncedChange=Rg(E,HM),t.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&w(t.daysContainer,"mouseover",function(te){t.config.mode==="range"&&ee(kn(te))}),w(t._input,"keydown",Y),t.calendarContainer!==void 0&&w(t.calendarContainer,"keydown",Y),!t.config.inline&&!t.config.static&&w(window,"resize",P),window.ontouchstart!==void 0?w(window.document,"touchstart",b):w(window.document,"mousedown",b),w(window.document,"focus",b,{capture:!0}),t.config.clickOpens===!0&&(w(t._input,"focus",t.open),w(t._input,"click",t.open)),t.daysContainer!==void 0&&(w(t.monthNav,"click",pr),w(t.monthNav,["keyup","increment"],_),w(t.daysContainer,"click",kt)),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0){var L=function(te){return kn(te).select()};w(t.timeContainer,["increment"],c),w(t.timeContainer,"blur",c,{capture:!0}),w(t.timeContainer,"click",H),w([t.hourElement,t.minuteElement],["focus","click"],L),t.secondElement!==void 0&&w(t.secondElement,"focus",function(){return t.secondElement&&t.secondElement.select()}),t.amPM!==void 0&&w(t.amPM,"click",function(te){c(te)})}t.config.allowInput&&w(t._input,"blur",K)}function R(P,L){var te=P!==void 0?t.parseDate(P):t.latestSelectedDateObj||(t.config.minDate&&t.config.minDate>t.now?t.config.minDate:t.config.maxDate&&t.config.maxDate<t.now?t.config.maxDate:t.now),he=t.currentYear,Ie=t.currentMonth;try{te!==void 0&&(t.currentYear=te.getFullYear(),t.currentMonth=te.getMonth())}catch(Me){Me.message="Invalid date supplied: "+te,t.config.errorHandler(Me)}L&&t.currentYear!==he&&(dt("onYearChange"),Ae()),L&&(t.currentYear!==he||t.currentMonth!==Ie)&&dt("onMonthChange"),t.redraw()}function H(P){var L=kn(P);~L.className.indexOf("arrow")&&F(P,L.classList.contains("arrowUp")?1:-1)}function F(P,L,te){var he=P&&kn(P),Ie=te||he&&he.parentNode&&he.parentNode.firstChild,Me=Xt("increment");Me.delta=L,Ie&&Ie.dispatchEvent(Me)}function m(){var P=window.document.createDocumentFragment();if(t.calendarContainer=wt("div","flatpickr-calendar"),t.calendarContainer.tabIndex=-1,!t.config.noCalendar){if(P.appendChild(Ve()),t.innerContainer=wt("div","flatpickr-innerContainer"),t.config.weekNumbers){var L=Oe(),te=L.weekWrapper,he=L.weekNumbers;t.innerContainer.appendChild(te),t.weekNumbers=he,t.weekWrapper=te}t.rContainer=wt("div","flatpickr-rContainer"),t.rContainer.appendChild(pe()),t.daysContainer||(t.daysContainer=wt("div","flatpickr-days"),t.daysContainer.tabIndex=-1),Ce(),t.rContainer.appendChild(t.daysContainer),t.innerContainer.appendChild(t.rContainer),P.appendChild(t.innerContainer)}t.config.enableTime&&P.appendChild($e()),En(t.calendarContainer,"rangeMode",t.config.mode==="range"),En(t.calendarContainer,"animate",t.config.animate===!0),En(t.calendarContainer,"multiMonth",t.config.showMonths>1),t.calendarContainer.appendChild(P);var Ie=t.config.appendTo!==void 0&&t.config.appendTo.nodeType!==void 0;if((t.config.inline||t.config.static)&&(t.calendarContainer.classList.add(t.config.inline?"inline":"static"),t.config.inline&&(!Ie&&t.element.parentNode?t.element.parentNode.insertBefore(t.calendarContainer,t._input.nextSibling):t.config.appendTo!==void 0&&t.config.appendTo.appendChild(t.calendarContainer)),t.config.static)){var Me=wt("div","flatpickr-wrapper");t.element.parentNode&&t.element.parentNode.insertBefore(Me,t.element),Me.appendChild(t.element),t.altInput&&Me.appendChild(t.altInput),Me.appendChild(t.calendarContainer)}!t.config.static&&!t.config.inline&&(t.config.appendTo!==void 0?t.config.appendTo:window.document.body).appendChild(t.calendarContainer)}function Q(P,L,te,he){var Ie=O(L,!0),Me=wt("span",P,L.getDate().toString());return Me.dateObj=L,Me.$i=he,Me.setAttribute("aria-label",t.formatDate(L,t.config.ariaDateFormat)),P.indexOf("hidden")===-1&&Rn(L,t.now)===0&&(t.todayDateElem=Me,Me.classList.add("today"),Me.setAttribute("aria-current","date")),Ie?(Me.tabIndex=-1,Hr(L)&&(Me.classList.add("selected"),t.selectedDateElem=Me,t.config.mode==="range"&&(En(Me,"startRange",t.selectedDates[0]&&Rn(L,t.selectedDates[0],!0)===0),En(Me,"endRange",t.selectedDates[1]&&Rn(L,t.selectedDates[1],!0)===0),P==="nextMonthDay"&&Me.classList.add("inRange")))):Me.classList.add("flatpickr-disabled"),t.config.mode==="range"&&so(L)&&!Hr(L)&&Me.classList.add("inRange"),t.weekNumbers&&t.config.showMonths===1&&P!=="prevMonthDay"&&he%7===6&&t.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+t.config.getWeek(L)+"</span>"),dt("onDayCreate",Me),Me}function le(P){P.focus(),t.config.mode==="range"&&ee(P)}function J(P){for(var L=P>0?0:t.config.showMonths-1,te=P>0?t.config.showMonths:-1,he=L;he!=te;he+=P)for(var Ie=t.daysContainer.children[he],Me=P>0?0:Ie.children.length-1,at=P>0?Ie.children.length:-1,je=Me;je!=at;je+=P){var it=Ie.children[je];if(it.className.indexOf("hidden")===-1&&O(it.dateObj))return it}}function q(P,L){for(var te=P.className.indexOf("Month")===-1?P.dateObj.getMonth():t.currentMonth,he=L>0?t.config.showMonths:-1,Ie=L>0?1:-1,Me=te-t.currentMonth;Me!=he;Me+=Ie)for(var at=t.daysContainer.children[Me],je=te-t.currentMonth===Me?P.$i+L:L<0?at.children.length-1:0,it=at.children.length,Be=je;Be>=0&&Be<it&&Be!=(L>0?it:-1);Be+=Ie){var Xe=at.children[Be];if(Xe.className.indexOf("hidden")===-1&&O(Xe.dateObj)&&Math.abs(P.$i-Be)>=Math.abs(L))return le(Xe)}t.changeMonth(Ie),Z(J(Ie),0)}function Z(P,L){var te=s(),he=U(te||document.body),Ie=P!==void 0?P:he?te:t.selectedDateElem!==void 0&&U(t.selectedDateElem)?t.selectedDateElem:t.todayDateElem!==void 0&&U(t.todayDateElem)?t.todayDateElem:J(L>0?1:-1);Ie===void 0?t._input.focus():he?q(Ie,L):le(Ie)}function ae(P,L){for(var te=(new Date(P,L,1).getDay()-t.l10n.firstDayOfWeek+7)%7,he=t.utils.getDaysInMonth((L-1+12)%12,P),Ie=t.utils.getDaysInMonth(L,P),Me=window.document.createDocumentFragment(),at=t.config.showMonths>1,je=at?"prevMonthDay hidden":"prevMonthDay",it=at?"nextMonthDay hidden":"nextMonthDay",Be=he+1-te,Xe=0;Be<=he;Be++,Xe++)Me.appendChild(Q("flatpickr-day "+je,new Date(P,L-1,Be),Be,Xe));for(Be=1;Be<=Ie;Be++,Xe++)Me.appendChild(Q("flatpickr-day",new Date(P,L,Be),Be,Xe));for(var mt=Ie+1;mt<=42-te&&(t.config.showMonths===1||Xe%7!==0);mt++,Xe++)Me.appendChild(Q("flatpickr-day "+it,new Date(P,L+1,mt%Ie),mt,Xe));var fn=wt("div","dayContainer");return fn.appendChild(Me),fn}function Ce(){if(t.daysContainer!==void 0){nl(t.daysContainer),t.weekNumbers&&nl(t.weekNumbers);for(var P=document.createDocumentFragment(),L=0;L<t.config.showMonths;L++){var te=new Date(t.currentYear,t.currentMonth,1);te.setMonth(t.currentMonth+L),P.appendChild(ae(te.getFullYear(),te.getMonth()))}t.daysContainer.appendChild(P),t.days=t.daysContainer.firstChild,t.config.mode==="range"&&t.selectedDates.length===1&&ee()}}function Ae(){if(!(t.config.showMonths>1||t.config.monthSelectorType!=="dropdown")){var P=function(he){return t.config.minDate!==void 0&&t.currentYear===t.config.minDate.getFullYear()&&he<t.config.minDate.getMonth()?!1:!(t.config.maxDate!==void 0&&t.currentYear===t.config.maxDate.getFullYear()&&he>t.config.maxDate.getMonth())};t.monthsDropdownContainer.tabIndex=-1,t.monthsDropdownContainer.innerHTML="";for(var L=0;L<12;L++)if(P(L)){var te=wt("option","flatpickr-monthDropdown-month");te.value=new Date(t.currentYear,L).getMonth().toString(),te.textContent=il(L,t.config.shorthandCurrentMonth,t.l10n),te.tabIndex=-1,t.currentMonth===L&&(te.selected=!0),t.monthsDropdownContainer.appendChild(te)}}}function _e(){var P=wt("div","flatpickr-month"),L=window.document.createDocumentFragment(),te;t.config.showMonths>1||t.config.monthSelectorType==="static"?te=wt("span","cur-month"):(t.monthsDropdownContainer=wt("select","flatpickr-monthDropdown-months"),t.monthsDropdownContainer.setAttribute("aria-label",t.l10n.monthAriaLabel),w(t.monthsDropdownContainer,"change",function(at){var je=kn(at),it=parseInt(je.value,10);t.changeMonth(it-t.currentMonth),dt("onMonthChange")}),Ae(),te=t.monthsDropdownContainer);var he=rl("cur-year",{tabindex:"-1"}),Ie=he.getElementsByTagName("input")[0];Ie.setAttribute("aria-label",t.l10n.yearAriaLabel),t.config.minDate&&Ie.setAttribute("min",t.config.minDate.getFullYear().toString()),t.config.maxDate&&(Ie.setAttribute("max",t.config.maxDate.getFullYear().toString()),Ie.disabled=!!t.config.minDate&&t.config.minDate.getFullYear()===t.config.maxDate.getFullYear());var Me=wt("div","flatpickr-current-month");return Me.appendChild(te),Me.appendChild(he),L.appendChild(Me),P.appendChild(L),{container:P,yearElement:Ie,monthElement:te}}function Le(){nl(t.monthNav),t.monthNav.appendChild(t.prevMonthNav),t.config.showMonths&&(t.yearElements=[],t.monthElements=[]);for(var P=t.config.showMonths;P--;){var L=_e();t.yearElements.push(L.yearElement),t.monthElements.push(L.monthElement),t.monthNav.appendChild(L.container)}t.monthNav.appendChild(t.nextMonthNav)}function Ve(){return t.monthNav=wt("div","flatpickr-months"),t.yearElements=[],t.monthElements=[],t.prevMonthNav=wt("span","flatpickr-prev-month"),t.prevMonthNav.innerHTML=t.config.prevArrow,t.nextMonthNav=wt("span","flatpickr-next-month"),t.nextMonthNav.innerHTML=t.config.nextArrow,Le(),Object.defineProperty(t,"_hidePrevMonthArrow",{get:function(){return t.__hidePrevMonthArrow},set:function(P){t.__hidePrevMonthArrow!==P&&(En(t.prevMonthNav,"flatpickr-disabled",P),t.__hidePrevMonthArrow=P)}}),Object.defineProperty(t,"_hideNextMonthArrow",{get:function(){return t.__hideNextMonthArrow},set:function(P){t.__hideNextMonthArrow!==P&&(En(t.nextMonthNav,"flatpickr-disabled",P),t.__hideNextMonthArrow=P)}}),t.currentYearElement=t.yearElements[0],Fn(),t.monthNav}function $e(){t.calendarContainer.classList.add("hasTime"),t.config.noCalendar&&t.calendarContainer.classList.add("noCalendar");var P=Zu(t.config);t.timeContainer=wt("div","flatpickr-time"),t.timeContainer.tabIndex=-1;var L=wt("span","flatpickr-time-separator",":"),te=rl("flatpickr-hour",{"aria-label":t.l10n.hourAriaLabel});t.hourElement=te.getElementsByTagName("input")[0];var he=rl("flatpickr-minute",{"aria-label":t.l10n.minuteAriaLabel});if(t.minuteElement=he.getElementsByTagName("input")[0],t.hourElement.tabIndex=t.minuteElement.tabIndex=-1,t.hourElement.value=bn(t.latestSelectedDateObj?t.latestSelectedDateObj.getHours():t.config.time_24hr?P.hours:f(P.hours)),t.minuteElement.value=bn(t.latestSelectedDateObj?t.latestSelectedDateObj.getMinutes():P.minutes),t.hourElement.setAttribute("step",t.config.hourIncrement.toString()),t.minuteElement.setAttribute("step",t.config.minuteIncrement.toString()),t.hourElement.setAttribute("min",t.config.time_24hr?"0":"1"),t.hourElement.setAttribute("max",t.config.time_24hr?"23":"12"),t.hourElement.setAttribute("maxlength","2"),t.minuteElement.setAttribute("min","0"),t.minuteElement.setAttribute("max","59"),t.minuteElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(te),t.timeContainer.appendChild(L),t.timeContainer.appendChild(he),t.config.time_24hr&&t.timeContainer.classList.add("time24hr"),t.config.enableSeconds){t.timeContainer.classList.add("hasSeconds");var Ie=rl("flatpickr-second");t.secondElement=Ie.getElementsByTagName("input")[0],t.secondElement.value=bn(t.latestSelectedDateObj?t.latestSelectedDateObj.getSeconds():P.seconds),t.secondElement.setAttribute("step",t.minuteElement.getAttribute("step")),t.secondElement.setAttribute("min","0"),t.secondElement.setAttribute("max","59"),t.secondElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(wt("span","flatpickr-time-separator",":")),t.timeContainer.appendChild(Ie)}return t.config.time_24hr||(t.amPM=wt("span","flatpickr-am-pm",t.l10n.amPM[In((t.latestSelectedDateObj?t.hourElement.value:t.config.defaultHour)>11)]),t.amPM.title=t.l10n.toggleTitle,t.amPM.tabIndex=-1,t.timeContainer.appendChild(t.amPM)),t.timeContainer}function pe(){t.weekdayContainer?nl(t.weekdayContainer):t.weekdayContainer=wt("div","flatpickr-weekdays");for(var P=t.config.showMonths;P--;){var L=wt("div","flatpickr-weekdaycontainer");t.weekdayContainer.appendChild(L)}return ce(),t.weekdayContainer}function ce(){if(t.weekdayContainer){var P=t.l10n.firstDayOfWeek,L=Ow(t.l10n.weekdays.shorthand);P>0&&P<L.length&&(L=Ow(L.splice(P,L.length),L.splice(0,P)));for(var te=t.config.showMonths;te--;)t.weekdayContainer.children[te].innerHTML=`
      <span class='flatpickr-weekday'>
        `+L.join("</span><span class='flatpickr-weekday'>")+`
      </span>
      `}}function Oe(){t.calendarContainer.classList.add("hasWeeks");var P=wt("div","flatpickr-weekwrapper");P.appendChild(wt("span","flatpickr-weekday",t.l10n.weekAbbreviation));var L=wt("div","flatpickr-weeks");return P.appendChild(L),{weekWrapper:P,weekNumbers:L}}function Qe(P,L){L===void 0&&(L=!0);var te=L?P:P-t.currentMonth;te<0&&t._hidePrevMonthArrow===!0||te>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=te,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,dt("onYearChange"),Ae()),Ce(),dt("onMonthChange"),Fn())}function Ge(P,L){if(P===void 0&&(P=!0),L===void 0&&(L=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,L===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var te=Zu(t.config),he=te.hours,Ie=te.minutes,Me=te.seconds;y(he,Ie,Me)}t.redraw(),P&&dt("onChange")}function We(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),dt("onClose")}function lt(){t.config!==void 0&&dt("onDestroy");for(var P=t._handlers.length;P--;)t._handlers[P].remove();if(t._handlers=[],t.mobileInput)t.mobileInput.parentNode&&t.mobileInput.parentNode.removeChild(t.mobileInput),t.mobileInput=void 0;else if(t.calendarContainer&&t.calendarContainer.parentNode)if(t.config.static&&t.calendarContainer.parentNode){var L=t.calendarContainer.parentNode;if(L.lastChild&&L.removeChild(L.lastChild),L.parentNode){for(;L.firstChild;)L.parentNode.insertBefore(L.firstChild,L);L.parentNode.removeChild(L)}}else t.calendarContainer.parentNode.removeChild(t.calendarContainer);t.altInput&&(t.input.type="text",t.altInput.parentNode&&t.altInput.parentNode.removeChild(t.altInput),delete t.altInput),t.input&&(t.input.type=t.input._type,t.input.classList.remove("flatpickr-input"),t.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(te){try{delete t[te]}catch{}})}function xe(P){return t.calendarContainer.contains(P)}function b(P){if(t.isOpen&&!t.config.inline){var L=kn(P),te=xe(L),he=L===t.input||L===t.altInput||t.element.contains(L)||P.path&&P.path.indexOf&&(~P.path.indexOf(t.input)||~P.path.indexOf(t.altInput)),Ie=!he&&!te&&!xe(P.relatedTarget),Me=!t.config.ignoredFocusElements.some(function(at){return at.contains(L)});Ie&&Me&&(t.config.allowInput&&t.setDate(t._input.value,!1,t.config.altInput?t.config.altFormat:t.config.dateFormat),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0&&t.input.value!==""&&t.input.value!==void 0&&c(),t.close(),t.config&&t.config.mode==="range"&&t.selectedDates.length===1&&t.clear(!1))}}function C(P){if(!(!P||t.config.minDate&&P<t.config.minDate.getFullYear()||t.config.maxDate&&P>t.config.maxDate.getFullYear())){var L=P,te=t.currentYear!==L;t.currentYear=L||t.currentYear,t.config.maxDate&&t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth=Math.min(t.config.maxDate.getMonth(),t.currentMonth):t.config.minDate&&t.currentYear===t.config.minDate.getFullYear()&&(t.currentMonth=Math.max(t.config.minDate.getMonth(),t.currentMonth)),te&&(t.redraw(),dt("onYearChange"),Ae())}}function O(P,L){var te;L===void 0&&(L=!0);var he=t.parseDate(P,void 0,L);if(t.config.minDate&&he&&Rn(he,t.config.minDate,L!==void 0?L:!t.minDateHasTime)<0||t.config.maxDate&&he&&Rn(he,t.config.maxDate,L!==void 0?L:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(he===void 0)return!1;for(var Ie=!!t.config.enable,Me=(te=t.config.enable)!==null&&te!==void 0?te:t.config.disable,at=0,je=void 0;at<Me.length;at++){if(je=Me[at],typeof je=="function"&&je(he))return Ie;if(je instanceof Date&&he!==void 0&&je.getTime()===he.getTime())return Ie;if(typeof je=="string"){var it=t.parseDate(je,void 0,!0);return it&&it.getTime()===he.getTime()?Ie:!Ie}else if(typeof je=="object"&&he!==void 0&&je.from&&je.to&&he.getTime()>=je.from.getTime()&&he.getTime()<=je.to.getTime())return Ie}return!Ie}function U(P){return t.daysContainer!==void 0?P.className.indexOf("hidden")===-1&&P.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(P):!1}function K(P){var L=P.target===t._input,te=t._input.value.trimEnd()!==Ar();L&&te&&!(P.relatedTarget&&xe(P.relatedTarget))&&t.setDate(t._input.value,!0,P.target===t.altInput?t.config.altFormat:t.config.dateFormat)}function Y(P){var L=kn(P),te=t.config.wrap?n.contains(L):L===t._input,he=t.config.allowInput,Ie=t.isOpen&&(!he||!te),Me=t.config.inline&&te&&!he;if(P.keyCode===13&&te){if(he)return t.setDate(t._input.value,!0,L===t.altInput?t.config.altFormat:t.config.dateFormat),t.close(),L.blur();t.open()}else if(xe(L)||Ie||Me){var at=!!t.timeContainer&&t.timeContainer.contains(L);switch(P.keyCode){case 13:at?(P.preventDefault(),c(),ke()):kt(P);break;case 27:P.preventDefault(),ke();break;case 8:case 46:te&&!t.config.allowInput&&(P.preventDefault(),t.clear());break;case 37:case 39:if(!at&&!te){P.preventDefault();var je=s();if(t.daysContainer!==void 0&&(he===!1||je&&U(je))){var it=P.keyCode===39?1:-1;P.ctrlKey?(P.stopPropagation(),Qe(it),Z(J(1),0)):Z(void 0,it)}}else t.hourElement&&t.hourElement.focus();break;case 38:case 40:P.preventDefault();var Be=P.keyCode===40?1:-1;t.daysContainer&&L.$i!==void 0||L===t.input||L===t.altInput?P.ctrlKey?(P.stopPropagation(),C(t.currentYear-Be),Z(J(1),0)):at||Z(void 0,Be*7):L===t.currentYearElement?C(t.currentYear-Be):t.config.enableTime&&(!at&&t.hourElement&&t.hourElement.focus(),c(P),t._debouncedChange());break;case 9:if(at){var Xe=[t.hourElement,t.minuteElement,t.secondElement,t.amPM].concat(t.pluginElements).filter(function(Bt){return Bt}),mt=Xe.indexOf(L);if(mt!==-1){var fn=Xe[mt+(P.shiftKey?-1:1)];P.preventDefault(),(fn||t._input).focus()}}else!t.config.noCalendar&&t.daysContainer&&t.daysContainer.contains(L)&&P.shiftKey&&(P.preventDefault(),t._input.focus());break;default:break}}if(t.amPM!==void 0&&L===t.amPM)switch(P.key){case t.l10n.amPM[0].charAt(0):case t.l10n.amPM[0].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[0],p(),Gt();break;case t.l10n.amPM[1].charAt(0):case t.l10n.amPM[1].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[1],p(),Gt();break}(te||xe(L))&&dt("onKeyDown",P)}function ee(P,L){if(L===void 0&&(L="flatpickr-day"),!(t.selectedDates.length!==1||P&&(!P.classList.contains(L)||P.classList.contains("flatpickr-disabled")))){for(var te=P?P.dateObj.getTime():t.days.firstElementChild.dateObj.getTime(),he=t.parseDate(t.selectedDates[0],void 0,!0).getTime(),Ie=Math.min(te,t.selectedDates[0].getTime()),Me=Math.max(te,t.selectedDates[0].getTime()),at=!1,je=0,it=0,Be=Ie;Be<Me;Be+=xw.DAY)O(new Date(Be),!0)||(at=at||Be>Ie&&Be<Me,Be<he&&(!je||Be>je)?je=Be:Be>he&&(!it||Be<it)&&(it=Be));var Xe=Array.from(t.rContainer.querySelectorAll("*:nth-child(-n+"+t.config.showMonths+") > ."+L));Xe.forEach(function(mt){var fn=mt.dateObj,Bt=fn.getTime(),Xn=je>0&&Bt<je||it>0&&Bt>it;if(Xn){mt.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(Sn){mt.classList.remove(Sn)});return}else if(at&&!Xn)return;["startRange","inRange","endRange","notAllowed"].forEach(function(Sn){mt.classList.remove(Sn)}),P!==void 0&&(P.classList.add(te<=t.selectedDates[0].getTime()?"startRange":"endRange"),he<te&&Bt===he?mt.classList.add("startRange"):he>te&&Bt===he&&mt.classList.add("endRange"),Bt>=je&&(it===0||Bt<=it)&&Aw(Bt,he,te)&&mt.classList.add("inRange"))})}}function ge(){t.isOpen&&!t.config.static&&!t.config.inline&&rt()}function be(P,L){if(L===void 0&&(L=t._positionElement),t.isMobile===!0){if(P){P.preventDefault();var te=kn(P);te&&te.blur()}t.mobileInput!==void 0&&(t.mobileInput.focus(),t.mobileInput.click()),dt("onOpen");return}else if(t._input.disabled||t.config.inline)return;var he=t.isOpen;t.isOpen=!0,he||(t.calendarContainer.classList.add("open"),t._input.classList.add("active"),dt("onOpen"),rt(L)),t.config.enableTime===!0&&t.config.noCalendar===!0&&t.config.allowInput===!1&&(P===void 0||!t.timeContainer.contains(P.relatedTarget))&&setTimeout(function(){return t.hourElement.select()},50)}function ue(P){return function(L){var te=t.config["_"+P+"Date"]=t.parseDate(L,t.config.dateFormat),he=t.config["_"+(P==="min"?"max":"min")+"Date"];te!==void 0&&(t[P==="min"?"minDateHasTime":"maxDateHasTime"]=te.getHours()>0||te.getMinutes()>0||te.getSeconds()>0),t.selectedDates&&(t.selectedDates=t.selectedDates.filter(function(Ie){return O(Ie)}),!t.selectedDates.length&&P==="min"&&h(te),Gt()),t.daysContainer&&(vt(),te!==void 0?t.currentYearElement[P]=te.getFullYear().toString():t.currentYearElement.removeAttribute(P),t.currentYearElement.disabled=!!he&&te!==void 0&&he.getFullYear()===te.getFullYear())}}function Se(){var P=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],L=_n(_n({},JSON.parse(JSON.stringify(n.dataset||{}))),e),te={};t.config.parseDate=L.parseDate,t.config.formatDate=L.formatDate,Object.defineProperty(t.config,"enable",{get:function(){return t.config._enable},set:function(Xe){t.config._enable=Qn(Xe)}}),Object.defineProperty(t.config,"disable",{get:function(){return t.config._disable},set:function(Xe){t.config._disable=Qn(Xe)}});var he=L.mode==="time";if(!L.dateFormat&&(L.enableTime||he)){var Ie=en.defaultConfig.dateFormat||Ri.dateFormat;te.dateFormat=L.noCalendar||he?"H:i"+(L.enableSeconds?":S":""):Ie+" H:i"+(L.enableSeconds?":S":"")}if(L.altInput&&(L.enableTime||he)&&!L.altFormat){var Me=en.defaultConfig.altFormat||Ri.altFormat;te.altFormat=L.noCalendar||he?"h:i"+(L.enableSeconds?":S K":" K"):Me+(" h:i"+(L.enableSeconds?":S":"")+" K")}Object.defineProperty(t.config,"minDate",{get:function(){return t.config._minDate},set:ue("min")}),Object.defineProperty(t.config,"maxDate",{get:function(){return t.config._maxDate},set:ue("max")});var at=function(Xe){return function(mt){t.config[Xe==="min"?"_minTime":"_maxTime"]=t.parseDate(mt,"H:i:S")}};Object.defineProperty(t.config,"minTime",{get:function(){return t.config._minTime},set:at("min")}),Object.defineProperty(t.config,"maxTime",{get:function(){return t.config._maxTime},set:at("max")}),L.mode==="time"&&(t.config.noCalendar=!0,t.config.enableTime=!0),Object.assign(t.config,te,L);for(var je=0;je<P.length;je++)t.config[P[je]]=t.config[P[je]]===!0||t.config[P[je]]==="true";Uu.filter(function(Xe){return t.config[Xe]!==void 0}).forEach(function(Xe){t.config[Xe]=Ku(t.config[Xe]||[]).map(o)}),t.isMobile=!t.config.disableMobile&&!t.config.inline&&t.config.mode==="single"&&!t.config.disable.length&&!t.config.enable&&!t.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var je=0;je<t.config.plugins.length;je++){var it=t.config.plugins[je](t)||{};for(var Be in it)Uu.indexOf(Be)>-1?t.config[Be]=Ku(it[Be]).map(o).concat(t.config[Be]):typeof L[Be]>"u"&&(t.config[Be]=it[Be])}L.altInputClass||(t.config.altInputClass=bt().className+" "+t.config.altInputClass),dt("onParseConfig")}function bt(){return t.config.wrap?n.querySelector("[data-input]"):n}function nt(){typeof t.config.locale!="object"&&typeof en.l10ns[t.config.locale]>"u"&&t.config.errorHandler(new Error("flatpickr: invalid locale "+t.config.locale)),t.l10n=_n(_n({},en.l10ns.default),typeof t.config.locale=="object"?t.config.locale:t.config.locale!=="default"?en.l10ns[t.config.locale]:void 0),si.D="("+t.l10n.weekdays.shorthand.join("|")+")",si.l="("+t.l10n.weekdays.longhand.join("|")+")",si.M="("+t.l10n.months.shorthand.join("|")+")",si.F="("+t.l10n.months.longhand.join("|")+")",si.K="("+t.l10n.amPM[0]+"|"+t.l10n.amPM[1]+"|"+t.l10n.amPM[0].toLowerCase()+"|"+t.l10n.amPM[1].toLowerCase()+")";var P=_n(_n({},e),JSON.parse(JSON.stringify(n.dataset||{})));P.time_24hr===void 0&&en.defaultConfig.time_24hr===void 0&&(t.config.time_24hr=t.l10n.time_24hr),t.formatDate=Pg(t),t.parseDate=Qu({config:t.config,l10n:t.l10n})}function rt(P){if(typeof t.config.position=="function")return void t.config.position(t,P);if(t.calendarContainer!==void 0){dt("onPreCalendarPosition");var L=P||t._positionElement,te=Array.prototype.reduce.call(t.calendarContainer.children,function(ns,fo){return ns+fo.offsetHeight},0),he=t.calendarContainer.offsetWidth,Ie=t.config.position.split(" "),Me=Ie[0],at=Ie.length>1?Ie[1]:null,je=L.getBoundingClientRect(),it=window.innerHeight-je.bottom,Be=Me==="above"||Me!=="below"&&it<te&&je.top>te,Xe=window.pageYOffset+je.top+(Be?-te-2:L.offsetHeight+2);if(En(t.calendarContainer,"arrowTop",!Be),En(t.calendarContainer,"arrowBottom",Be),!t.config.inline){var mt=window.pageXOffset+je.left,fn=!1,Bt=!1;at==="center"?(mt-=(he-je.width)/2,fn=!0):at==="right"&&(mt-=he-je.width,Bt=!0),En(t.calendarContainer,"arrowLeft",!fn&&!Bt),En(t.calendarContainer,"arrowCenter",fn),En(t.calendarContainer,"arrowRight",Bt);var Xn=window.document.body.offsetWidth-(window.pageXOffset+je.right),Sn=mt+he>window.document.body.offsetWidth,es=Xn+he>window.document.body.offsetWidth;if(En(t.calendarContainer,"rightMost",Sn),!t.config.static)if(t.calendarContainer.style.top=Xe+"px",!Sn)t.calendarContainer.style.left=mt+"px",t.calendarContainer.style.right="auto";else if(!es)t.calendarContainer.style.left="auto",t.calendarContainer.style.right=Xn+"px";else{var ts=ut();if(ts===void 0)return;var ao=window.document.body.offsetWidth,lo=Math.max(0,ao/2-he/2),qr=".flatpickr-calendar.centerMost:before",co=".flatpickr-calendar.centerMost:after",uo=ts.cssRules.length,vi="{left:"+je.left+"px;right:auto;}";En(t.calendarContainer,"rightMost",!1),En(t.calendarContainer,"centerMost",!0),ts.insertRule(qr+","+co+vi,uo),t.calendarContainer.style.left=lo+"px",t.calendarContainer.style.right="auto"}}}}function ut(){for(var P=null,L=0;L<document.styleSheets.length;L++){var te=document.styleSheets[L];if(te.cssRules){try{te.cssRules}catch{continue}P=te;break}}return P??_t()}function _t(){var P=document.createElement("style");return document.head.appendChild(P),P.sheet}function vt(){t.config.noCalendar||t.isMobile||(Ae(),Fn(),Ce())}function ke(){t._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(t.close,0):t.close()}function kt(P){P.preventDefault(),P.stopPropagation();var L=function(Xe){return Xe.classList&&Xe.classList.contains("flatpickr-day")&&!Xe.classList.contains("flatpickr-disabled")&&!Xe.classList.contains("notAllowed")},te=Mg(kn(P),L);if(te!==void 0){var he=te,Ie=t.latestSelectedDateObj=new Date(he.dateObj.getTime()),Me=(Ie.getMonth()<t.currentMonth||Ie.getMonth()>t.currentMonth+t.config.showMonths-1)&&t.config.mode!=="range";if(t.selectedDateElem=he,t.config.mode==="single")t.selectedDates=[Ie];else if(t.config.mode==="multiple"){var at=Hr(Ie);at?t.selectedDates.splice(parseInt(at),1):t.selectedDates.push(Ie)}else t.config.mode==="range"&&(t.selectedDates.length===2&&t.clear(!1,!1),t.latestSelectedDateObj=Ie,t.selectedDates.push(Ie),Rn(Ie,t.selectedDates[0],!0)!==0&&t.selectedDates.sort(function(Xe,mt){return Xe.getTime()-mt.getTime()}));if(p(),Me){var je=t.currentYear!==Ie.getFullYear();t.currentYear=Ie.getFullYear(),t.currentMonth=Ie.getMonth(),je&&(dt("onYearChange"),Ae()),dt("onMonthChange")}if(Fn(),Ce(),Gt(),!Me&&t.config.mode!=="range"&&t.config.showMonths===1?le(he):t.selectedDateElem!==void 0&&t.hourElement===void 0&&t.selectedDateElem&&t.selectedDateElem.focus(),t.hourElement!==void 0&&t.hourElement!==void 0&&t.hourElement.focus(),t.config.closeOnSelect){var it=t.config.mode==="single"&&!t.config.enableTime,Be=t.config.mode==="range"&&t.selectedDates.length===2&&!t.config.enableTime;(it||Be)&&ke()}E()}}var Ke={locale:[nt,ce],showMonths:[Le,a,pe],minDate:[R],maxDate:[R],positionElement:[Lt],clickOpens:[function(){t.config.clickOpens===!0?(w(t._input,"focus",t.open),w(t._input,"click",t.open)):(t._input.removeEventListener("focus",t.open),t._input.removeEventListener("click",t.open))}]};function zt(P,L){if(P!==null&&typeof P=="object"){Object.assign(t.config,P);for(var te in P)Ke[te]!==void 0&&Ke[te].forEach(function(he){return he()})}else t.config[P]=L,Ke[P]!==void 0?Ke[P].forEach(function(he){return he()}):Uu.indexOf(P)>-1&&(t.config[P]=Ku(L));t.redraw(),Gt(!0)}function an(P,L){var te=[];if(P instanceof Array)te=P.map(function(he){return t.parseDate(he,L)});else if(P instanceof Date||typeof P=="number")te=[t.parseDate(P,L)];else if(typeof P=="string")switch(t.config.mode){case"single":case"time":te=[t.parseDate(P,L)];break;case"multiple":te=P.split(t.config.conjunction).map(function(he){return t.parseDate(he,L)});break;case"range":te=P.split(t.l10n.rangeSeparator).map(function(he){return t.parseDate(he,L)});break;default:break}else t.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(P)));t.selectedDates=t.config.allowInvalidPreload?te:te.filter(function(he){return he instanceof Date&&O(he,!1)}),t.config.mode==="range"&&t.selectedDates.sort(function(he,Ie){return he.getTime()-Ie.getTime()})}function dn(P,L,te){if(L===void 0&&(L=!1),te===void 0&&(te=t.config.dateFormat),P!==0&&!P||P instanceof Array&&P.length===0)return t.clear(L);an(P,te),t.latestSelectedDateObj=t.selectedDates[t.selectedDates.length-1],t.redraw(),R(void 0,L),h(),t.selectedDates.length===0&&t.clear(!1),Gt(L),L&&dt("onChange")}function Qn(P){return P.slice().map(function(L){return typeof L=="string"||typeof L=="number"||L instanceof Date?t.parseDate(L,void 0,!0):L&&typeof L=="object"&&L.from&&L.to?{from:t.parseDate(L.from,void 0),to:t.parseDate(L.to,void 0)}:L}).filter(function(L){return L})}function Pt(){t.selectedDates=[],t.now=t.parseDate(t.config.now)||new Date;var P=t.config.defaultDate||((t.input.nodeName==="INPUT"||t.input.nodeName==="TEXTAREA")&&t.input.placeholder&&t.input.value===t.input.placeholder?null:t.input.value);P&&an(P,t.config.dateFormat),t._initialDate=t.selectedDates.length>0?t.selectedDates[0]:t.config.minDate&&t.config.minDate.getTime()>t.now.getTime()?t.config.minDate:t.config.maxDate&&t.config.maxDate.getTime()<t.now.getTime()?t.config.maxDate:t.now,t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth(),t.selectedDates.length>0&&(t.latestSelectedDateObj=t.selectedDates[0]),t.config.minTime!==void 0&&(t.config.minTime=t.parseDate(t.config.minTime,"H:i")),t.config.maxTime!==void 0&&(t.config.maxTime=t.parseDate(t.config.maxTime,"H:i")),t.minDateHasTime=!!t.config.minDate&&(t.config.minDate.getHours()>0||t.config.minDate.getMinutes()>0||t.config.minDate.getSeconds()>0),t.maxDateHasTime=!!t.config.maxDate&&(t.config.maxDate.getHours()>0||t.config.maxDate.getMinutes()>0||t.config.maxDate.getSeconds()>0)}function Ot(){if(t.input=bt(),!t.input){t.config.errorHandler(new Error("Invalid input element specified"));return}t.input._type=t.input.type,t.input.type="text",t.input.classList.add("flatpickr-input"),t._input=t.input,t.config.altInput&&(t.altInput=wt(t.input.nodeName,t.config.altInputClass),t._input=t.altInput,t.altInput.placeholder=t.input.placeholder,t.altInput.disabled=t.input.disabled,t.altInput.required=t.input.required,t.altInput.tabIndex=t.input.tabIndex,t.altInput.type="text",t.input.setAttribute("type","hidden"),!t.config.static&&t.input.parentNode&&t.input.parentNode.insertBefore(t.altInput,t.input.nextSibling)),t.config.allowInput||t._input.setAttribute("readonly","readonly"),Lt()}function Lt(){t._positionElement=t.config.positionElement||t._input}function ln(){var P=t.config.enableTime?t.config.noCalendar?"time":"datetime-local":"date";t.mobileInput=wt("input",t.input.className+" flatpickr-mobile"),t.mobileInput.tabIndex=1,t.mobileInput.type=P,t.mobileInput.disabled=t.input.disabled,t.mobileInput.required=t.input.required,t.mobileInput.placeholder=t.input.placeholder,t.mobileFormatStr=P==="datetime-local"?"Y-m-d\\TH:i:S":P==="date"?"Y-m-d":"H:i:S",t.selectedDates.length>0&&(t.mobileInput.defaultValue=t.mobileInput.value=t.formatDate(t.selectedDates[0],t.mobileFormatStr)),t.config.minDate&&(t.mobileInput.min=t.formatDate(t.config.minDate,"Y-m-d")),t.config.maxDate&&(t.mobileInput.max=t.formatDate(t.config.maxDate,"Y-m-d")),t.input.getAttribute("step")&&(t.mobileInput.step=String(t.input.getAttribute("step"))),t.input.type="hidden",t.altInput!==void 0&&(t.altInput.type="hidden");try{t.input.parentNode&&t.input.parentNode.insertBefore(t.mobileInput,t.input.nextSibling)}catch{}w(t.mobileInput,"change",function(L){t.setDate(kn(L).value,!1,t.mobileFormatStr),dt("onChange"),dt("onClose")})}function Ft(P){if(t.isOpen===!0)return t.close();t.open(P)}function dt(P,L){if(t.config!==void 0){var te=t.config[P];if(te!==void 0&&te.length>0)for(var he=0;te[he]&&he<te.length;he++)te[he](t.selectedDates,t.input.value,t,L);P==="onChange"&&(t.input.dispatchEvent(Xt("change")),t.input.dispatchEvent(Xt("input")))}}function Xt(P){var L=document.createEvent("Event");return L.initEvent(P,!0,!0),L}function Hr(P){for(var L=0;L<t.selectedDates.length;L++){var te=t.selectedDates[L];if(te instanceof Date&&Rn(te,P)===0)return""+L}return!1}function so(P){return t.config.mode!=="range"||t.selectedDates.length<2?!1:Rn(P,t.selectedDates[0])>=0&&Rn(P,t.selectedDates[1])<=0}function Fn(){t.config.noCalendar||t.isMobile||!t.monthNav||(t.yearElements.forEach(function(P,L){var te=new Date(t.currentYear,t.currentMonth,1);te.setMonth(t.currentMonth+L),t.config.showMonths>1||t.config.monthSelectorType==="static"?t.monthElements[L].textContent=il(te.getMonth(),t.config.shorthandCurrentMonth,t.l10n)+" ":t.monthsDropdownContainer.value=te.getMonth().toString(),P.value=te.getFullYear().toString()}),t._hidePrevMonthArrow=t.config.minDate!==void 0&&(t.currentYear===t.config.minDate.getFullYear()?t.currentMonth<=t.config.minDate.getMonth():t.currentYear<t.config.minDate.getFullYear()),t._hideNextMonthArrow=t.config.maxDate!==void 0&&(t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth+1>t.config.maxDate.getMonth():t.currentYear>t.config.maxDate.getFullYear()))}function Ar(P){var L=P||(t.config.altInput?t.config.altFormat:t.config.dateFormat);return t.selectedDates.map(function(te){return t.formatDate(te,L)}).filter(function(te,he,Ie){return t.config.mode!=="range"||t.config.enableTime||Ie.indexOf(te)===he}).join(t.config.mode!=="range"?t.config.conjunction:t.l10n.rangeSeparator)}function Gt(P){P===void 0&&(P=!0),t.mobileInput!==void 0&&t.mobileFormatStr&&(t.mobileInput.value=t.latestSelectedDateObj!==void 0?t.formatDate(t.latestSelectedDateObj,t.mobileFormatStr):""),t.input.value=Ar(t.config.dateFormat),t.altInput!==void 0&&(t.altInput.value=Ar(t.config.altFormat)),P!==!1&&dt("onValueUpdate")}function pr(P){var L=kn(P),te=t.prevMonthNav.contains(L),he=t.nextMonthNav.contains(L);te||he?Qe(te?-1:1):t.yearElements.indexOf(L)>=0?L.select():L.classList.contains("arrowUp")?t.changeYear(t.currentYear+1):L.classList.contains("arrowDown")&&t.changeYear(t.currentYear-1)}function oo(P){P.preventDefault();var L=P.type==="keydown",te=kn(P),he=te;t.amPM!==void 0&&te===t.amPM&&(t.amPM.textContent=t.l10n.amPM[In(t.amPM.textContent===t.l10n.amPM[0])]);var Ie=parseFloat(he.getAttribute("min")),Me=parseFloat(he.getAttribute("max")),at=parseFloat(he.getAttribute("step")),je=parseInt(he.value,10),it=P.delta||(L?P.which===38?1:-1:0),Be=je+at*it;if(typeof he.value<"u"&&he.value.length===2){var Xe=he===t.hourElement,mt=he===t.minuteElement;Be<Ie?(Be=Me+Be+In(!Xe)+(In(Xe)&&In(!t.amPM)),mt&&F(void 0,-1,t.hourElement)):Be>Me&&(Be=he===t.hourElement?Be-Me-In(!t.amPM):Ie,mt&&F(void 0,1,t.hourElement)),t.amPM&&Xe&&(at===1?Be+je===23:Math.abs(Be-je)>at)&&(t.amPM.textContent=t.l10n.amPM[In(t.amPM.textContent===t.l10n.amPM[0])]),he.value=bn(Be)}}return i(),t}function Fo(n,e){for(var t=Array.prototype.slice.call(n).filter(function(o){return o instanceof HTMLElement}),r=[],i=0;i<t.length;i++){var s=t[i];try{if(s.getAttribute("data-fp-omit")!==null)continue;s._flatpickr!==void 0&&(s._flatpickr.destroy(),s._flatpickr=void 0),s._flatpickr=qM(s,e||{}),r.push(s._flatpickr)}catch(o){console.error(o)}}return r.length===1?r[0]:r}typeof HTMLElement<"u"&&typeof HTMLCollection<"u"&&typeof NodeList<"u"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(n){return Fo(this,n)},HTMLElement.prototype.flatpickr=function(n){return Fo([this],n)});var en=function(n,e){return typeof n=="string"?Fo(window.document.querySelectorAll(n),e):n instanceof Node?Fo([n],e):Fo(n,e)};en.defaultConfig={};en.l10ns={en:_n({},Gu),default:_n({},Gu)};en.localize=function(n){en.l10ns.default=_n(_n({},en.l10ns.default),n)};en.setDefaults=function(n){en.defaultConfig=_n(_n({},en.defaultConfig),n)};en.parseDate=Qu({});en.formatDate=Pg({});en.compareDates=Rn;typeof jQuery<"u"&&typeof jQuery.fn<"u"&&(jQuery.fn.flatpickr=function(n){return Fo(this,n)});Date.prototype.fp_incr=function(n){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof n=="string"?parseInt(n,10):n))};typeof window<"u"&&(window.flatpickr=en);var Iw=en;var Rw=Tt(kw());var VM=(n,e,t)=>{t.element.dataset.datestr=e},Ju=class extends me{connect(){this.hasDatetimeTarget&&this.dateTimePickr(),this.hasDateTarget&&this.datePickr(),this.hasTimeTarget&&this.timePickr(),this.hasMonthTarget&&this.monthPickr()}execFlatpickr(n,e){if(this.data.get("options")){let t=JSON.parse(this.data.get("options"));e=Object.assign({},e,t)}if(n.dataset.datestr&&(e.defaultDate=n.dataset.datestr),this.flatPickr=Iw(n,e),this.flatPickr.config.onChange.push(VM),this.data.get("url")){let t=(r,i,s)=>{let o=new URL(window.location.origin+this.data.get("url")),a=o.searchParams;a.set("date",i),o.search=a.toString(),Turbolinks.visit(o.toString())};this.flatPickr.config.onChange.push(t)}}dateTimePickr(){let n={wrap:!0,enableTime:!0,altInput:!0,altFormat:"d-M-Y h:i K",allowInput:!0};this.execFlatpickr(this.datetimeTarget,n)}datePickr(){let n={wrap:!0,altInput:!0,altFormat:"d-M-Y",allowInput:!0};this.execFlatpickr(this.dateTarget,n)}timePickr(){let n={wrap:!0,enableTime:!0,noCalendar:!0,dateFormat:"h:i K",allowInput:!0};this.execFlatpickr(this.timeTarget,n)}monthPickr(){let n={wrap:!0,altInput:!0,disableMobile:!0,plugins:[new Rw.default({shorthand:!0,dateFormat:"Y-m-d",altFormat:"F Y"})]};this.execFlatpickr(this.monthTarget,n)}disconnect(){let n=this.inputTarget.value;this.flatPickr.destroy(),this.inputTarget.value=n}};we(Ju,"targets",["date","datetime","time","month","input"]);var Hg={};He(Hg,{default:()=>ed});var jg=Tt(On());var ed=class extends me{connect(){this.defaultModal=document.getElementById("modal"),this.defaultModal&&(this.mainModal=new window.bootstrap.Modal(this.defaultModal),window.mainModal=this.mainModal,this.resetModal())}go(n){this.item=n.currentTarget;let e=this.item.dataset.url;this.item.dataset.remote==="true"?this.load(e):Turbolinks.visit(e)}post(n){this.item=n.currentTarget;let e=this.item.dataset.url,t=this.item.dataset.params;jg.default.ajax({type:"POST",url:e,data:t})}modal(n){n.preventDefault(),this.defaultModal.querySelector(".modal-content").innerHTML=this.loadingContent(),this.load(n.currentTarget.getAttribute("href"));let e=["modal-sm","modal-lg","modal-xl"];this.defaultModal.classList.remove(...e),this.mainModal.show(),this.defaultModal.querySelector(".modal-dialog").classList.add(`modal-${n.currentTarget.getAttribute("data-size")}`)}load(n){jg.default.ajax({type:"GET",url:n,dataType:"script",success:()=>this._success(),complete:()=>this._complete(),error:()=>this._errors()})}loadingContent(){return`<div class="modal-body">
              <div class="text-center">
                <span class="spinner-border text-azure"></span>
              </div>
            </div>`}resetModal(){this.defaultModal.addEventListener("hidden.bs.modal",n=>{let e=["animate__animated","animate__shakeX","modal-lg","modal-xl","modal-sm"];this.defaultModal.querySelector(".modal-dialog").classList.remove(...e)})}_success(){}_complete(){}_errors(){}};we(ed,"targets",["modal"]);var qg={};He(qg,{default:()=>td});var td=class extends me{connect(){}addPrefix(n){let e=this.inputTarget.value;return e.match(/^60|^\+60/)||(e=e.length<4?"+60":"+60"+e),this.inputTarget.value=e.replace(/(?!^\+60)(\+60)/g,"")}cleanup(n){if(this.inputTarget.value==="+60")return this.inputTarget.value=""}};we(td,"targets",["input"]);var Vg={};He(Vg,{default:()=>nd});var nd=class extends me{connect(){this.data.get("value")!==null&&(this.containerTarget.classList.remove("d-none"),this.togglerTarget.checked=!0)}toggle(){this.containerTarget.classList.contains("d-none")?(this.containerTarget.classList.remove("d-none"),this.quantityTarget.value=this.data.get("value")):(this.quantityTarget.value=null,this.containerTarget.classList.add("d-none"))}};we(nd,"targets",["container","quantity","toggler"]);var pm={};He(pm,{default:()=>pd});function fm(n,e,t,r){function i(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(f){try{u(r.next(f))}catch(p){o(p)}}function c(f){try{u(r.throw(f))}catch(p){o(p)}}function u(f){f.done?s(f.value):i(f.value).then(a,c)}u((r=r.apply(n,e||[])).next())})}function hm(n,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(u){return function(f){return c([u,f])}}function c(u){if(r)throw new TypeError("Generator is already executing.");for(;t;)try{if(r=1,i&&(s=u[0]&2?i.return:u[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,u[1])).done)return s;switch(i=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return t.label++,{value:u[1],done:!1};case 5:t.label++,i=u[1],u=[0];continue;case 7:u=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){t.label=u[1];break}if(u[0]===6&&t.label<s[1]){t.label=s[1],s=u;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(u);break}s[2]&&t.ops.pop(),t.trys.pop();continue}u=e.call(n,t)}catch(f){u=[6,f],i=0}finally{r=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}var FN=function(n){return function(){var e=Array.prototype.slice.call(arguments);return new Promise(function(t,r){e.push(function(i,s){i?r(i):t(s)}),n.apply(null,e)})}};function BN(n){return typeof n=="function"}function LS(n){return typeof n=="string"}var jN=NS(),FS=FN(jN.toCanvas),HN=function(n){var e=n.canvas,t=n.content,r=n.width,i=r===void 0?0:r,s=n.nodeQrCodeOptions,o=s===void 0?{}:s;return o.errorCorrectionLevel=o.errorCorrectionLevel||VN(t),qN(t,o).then(function(a){return o.scale=i===0?void 0:i/a*4,FS(e,t,o)})},qN=function(n,e){var t=document.createElement("canvas");return FS(t,n,e).then(function(){return t.width})},VN=function(n){return n.length>36?"M":n.length>16?"Q":"H"},$N=function(n){var e=n.canvas,t=n.logo;if(!t||t==="")return Promise.resolve();var r=e.width;LS(t)&&(t={src:t});var i=t,s=i.logoSize,o=s===void 0?.15:s,a=i.borderColor,c=a===void 0?"#ffffff":a,u=i.bgColor,f=u===void 0?c||"#ffffff":u,p=i.borderSize,h=p===void 0?.05:p,y=i.crossOrigin,_=i.borderRadius,w=_===void 0?8:_,E=i.logoRadius,D=E===void 0?0:E,R=typeof t=="string"?t:t.src,H=r*o,F=r*(1-o)/2,m=r*(o+h),Q=r*(1-o-h)/2,le=e.getContext("2d");PS(le)(Q,Q,m,m,w),le.fillStyle=f,le.fill();var J=new Image;J.setAttribute("crossOrigin",y||"anonymous"),J.src=R;var q=function(ae){le.drawImage(ae,F,F,H,H)},Z=function(ae){var Ce=document.createElement("canvas");Ce.width=F+H,Ce.height=F+H,Ce.getContext("2d").drawImage(ae,F,F,H,H),PS(le)(F,F,H,H,D),le.fillStyle=le.createPattern(Ce,"no-repeat"),le.fill()};return new Promise(function(ae){J.onload=function(){D?Z(J):q(J),ae()}})},PS=function(n){return function(e,t,r,i,s){var o=Math.min(r,i);return s>o/2&&(s=o/2),n.beginPath(),n.moveTo(e+s,t),n.arcTo(e+r,t,e+r,t+i,s),n.arcTo(e+r,t+i,e,t+i,s),n.arcTo(e,t+i,e,t,s),n.arcTo(e,t,e+r,t,s),n.closePath(),n}},BS=function(n){return HN(n).then(function(){return $N(n)})},zN=function(n){return fm(this,void 0,void 0,function(){var e,t,r,i,s,o,a;return hm(this,function(c){switch(c.label){case 0:return e=n.canvas,n.logo&&(LS(n.logo)&&(n.logo={src:n.logo}),n.logo.crossOrigin="Anonymous"),this.ifCanvasDrawed?[3,2]:[4,BS(n)];case 1:c.sent(),c.label=2;case 2:if(t=n.image,r=t===void 0?new Image:t,i=n.downloadName,s=i===void 0?"qr-code":i,o=n.download,e.toDataURL())r.src=e.toDataURL();else throw new Error("Can not get the canvas DataURL");return this.ifImageCreated=!0,o!==!0&&!BN(o)?[2]:(o=o===!0?function(u){return u()}:o,a=function(){jS(r,s)},o&&o(a),[2,Promise.resolve()])}})})},jS=function(n,e){var t=n.src,r=document.createElement("a");r.download=e,r.href=t,r.dispatchEvent(new MouseEvent("click"))},WN=function(){function n(e){this.ifCanvasDrawed=!1,this.ifImageCreated=!1,this.defaultOption={canvas:document.createElement("canvas"),image:new Image,content:""},this.option=Object.assign(this.defaultOption,e)}return n.prototype.toCanvas=function(){var e=this;return BS.call(this,this.option).then(function(){return e.ifCanvasDrawed=!0,Promise.resolve()})},n.prototype.toImage=function(){return zN.call(this,this.option)},n.prototype.downloadImage=function(e){return fm(this,void 0,void 0,function(){return hm(this,function(t){switch(t.label){case 0:return this.ifImageCreated?[3,2]:[4,this.toImage()];case 1:t.sent(),t.label=2;case 2:return jS(this.option.image,e),[2]}})})},n.prototype.getCanvas=function(){return fm(this,void 0,Promise,function(){return hm(this,function(e){switch(e.label){case 0:return this.ifCanvasDrawed?[3,2]:[4,this.toCanvas()];case 1:e.sent(),e.label=2;case 2:return[2,this.option.canvas]}})})},n}(),HS=WN;var pd=class extends me{connect(){let n=this.data.get("width")||480,e=this.data.get("logo");this.qrcode=new HS({canvas:this.canvasTarget,content:this.data.get("url"),width:n,logo:{src:e,logoRadius:2}}),this.qrcode.toCanvas()}download(){this.qrcode.downloadImage("qrcode_"+Date.now())}};we(pd,"targets",["canvas"]);var gm={};He(gm,{default:()=>gd});var gd=class extends me{connect(){this.toggleButtonTarget.style.display=this.shouldShowButton()?"block":"none"}shouldShowButton(){return this.contentTarget.scrollHeight>this.contentTarget.clientHeight}toggleReadMore(){let n=this.getCTAText();this.toggleButtonTarget.textContent=this.contentTarget.classList.contains("expanded")?n.see_more:n.see_less,this.contentTarget.classList.toggle("expanded")}getCTAText(){let n=this.data.get("i8lnValue");return n?JSON.parse(n):{see_more:"See more",see_less:"See less"}}};we(gd,"targets",["content","toggleButton"]);var mm={};He(mm,{default:()=>md});var RU=Tt(On());var md=class extends me{connect(){let n=this.selectTarget.dataset.placeholder,e=this.selectTarget.dataset.settings||"{}";n&&(e.placeholder=n);let t=Object.assign({},JSON.parse(e),this.tags());this.selectized=$(this.selectTarget).selectize(t),this.initParent()}tags(){return this.selectTarget.dataset.tags?{delimiter:",",persist:!1,create:function(n){return{value:n,text:n}}}:{}}initParent(){let n=JSON.parse(this.selectTarget.dataset.parent||"{}");if(!n||(this.parent=document.getElementById(n.id),!this.parent)||this.parent.dataset.initAsSelectizeParent==="true")return!1;this.parent.dataset.initAsSelectizeParent=!0;let e=r=>i=>{if(!i.length)return;let s=this.selectized[0].selectize;s.disable(),r&&(s.clear(),s.clearOptions()),s.load(o=>{$.ajax({url:n.search_url,type:"GET",dataType:"json",data:new URLSearchParams({value:i}).toString(),success:a=>{o(a.data),s.enable()}})})},t=this.parent.options[this.parent.selectedIndex].value;this.selectizedParent=$(this.parent).selectize({onChange:e(!0)}),t&&e(!1)(t)}disconnect(){this.selectized[0].selectize.destroy(),this.selectizedParent&&this.selectizedParent[0].selectize.destroy()}};we(md,"targets",["select","selectized","parent","selectizedParent"]);var vm={};He(vm,{default:()=>vd});var vd=class extends me{connect(){this.tinyMCEEditor=this.tinymceTarget.innerHTML,this.grapesJSEditor=this.grapesjsTarget.innerHTML,this.toggle()}toggle(){let n=this.switchTarget.checked;this.tinymceTarget.hidden=!0,this.grapesjsTarget.hidden=!0,n==0&&(this.tinymceTarget.hidden=!1,this.grapesjsTarget.innerHTML="",this.tinymceTarget.innerHTML=this.tinyMCEEditor),n==1&&(this.grapesjsTarget.hidden=!1,this.tinymceTarget.innerHTML="",this.grapesjsTarget.innerHTML=this.grapesJSEditor)}};we(vd,"targets",["switch","grapesjs","tinymce"]);var bm={};He(bm,{default:()=>ym});var ym=class extends me{initialize(){this.apply()}connect(){}apply(){document.body.classList.remove("theme-dark","theme-light"),document.body.classList.add(`theme-${this.theme}`)}switch(n){this.theme=n.currentTarget.dataset.themeValue,this.apply()}get systemDefault(){return"light"}get theme(){return window.localStorage.getItem("theme")||(this.theme=this.systemDefault)}set theme(n){window.localStorage.setItem("theme",n)}};var _m={};He(_m,{default:()=>Em});var Em=class extends me{connect(){}toggleRequired(n){n.target.checked?n.target.closest("form").querySelectorAll("input, select, textarea").forEach(e=>{e.required=!1}):n.target.closest("form").querySelectorAll("input, select, textarea").forEach(e=>{e.required=!0})}};var UN=[{name:"shared--additional-fee",module:vg,filename:"./shared/additional_fee_controller.js"},{name:"shared--address",module:yg,filename:"./shared/address_controller.js"},{name:"shared--autosave",module:bg,filename:"./shared/autosave_controller.js"},{name:"shared--background",module:Eg,filename:"./shared/background_controller.js"},{name:"shared--bank",module:_g,filename:"./shared/bank_controller.js"},{name:"shared--clipboard",module:wg,filename:"./shared/clipboard_controller.js"},{name:"shared--collection",module:Sg,filename:"./shared/collection_controller.js"},{name:"shared--collection-summary",module:Tg,filename:"./shared/collection_summary_controller.js"},{name:"shared--content-loader",module:Ag,filename:"./shared/content_loader_controller.js"},{name:"shared--direct-custom-amount",module:Dg,filename:"./shared/direct_custom_amount_controller.js"},{name:"shared--display",module:xg,filename:"./shared/display_controller.js"},{name:"shared--displaypartial",module:Og,filename:"./shared/displaypartial_controller.js"},{name:"shared--escrow",module:Ig,filename:"./shared/escrow_controller.js"},{name:"shared--field-toggler",module:kg,filename:"./shared/field_toggler_controller.js"},{name:"shared--flatpickr",module:Bg,filename:"./shared/flatpickr_controller.js"},{name:"shared--link",module:Hg,filename:"./shared/link_controller.js"},{name:"shared--phone",module:qg,filename:"./shared/phone_controller.js"},{name:"shared--product-stock-management",module:Vg,filename:"./shared/product_stock_management_controller.js"},{name:"shared--qrcode",module:pm,filename:"./shared/qrcode_controller.js"},{name:"shared--read-more",module:gm,filename:"./shared/read_more_controller.js"},{name:"shared--selectize",module:mm,filename:"./shared/selectize_controller.js"},{name:"shared--switch-editor",module:vm,filename:"./shared/switch_editor_controller.js"},{name:"shared--theme",module:bm,filename:"./shared/theme_controller.js"},{name:"shared--utils",module:_m,filename:"./shared/utils_controller.js"}],qS=UN;var wm={};He(wm,{default:()=>bd});var yd=(n,e,t)=>{let r=e.replace(/-/g,"_");return n=n.replace(new RegExp(`${e}-index=".{1,3}"`,"g"),`${e}-index="${t}"`),n=n.replace(new RegExp(`${r}s_attributes_.{1,3}_`,"g"),`${r}s_attributes_${t}_`),n=n.replace(new RegExp(`${r}s_attributes\\]\\[.{1,3}\\]`,"g"),`${r}s_attributes][${t}]`),n};var bd=class extends me{connect(){this.updateTickets()}updateTickets(){if(this.hasQuantityTarget&&this.hasTicketListTarget){let n=parseInt(this.quantityTarget.value),e=this.ticketListTarget.children.length,t=n-e;if(t>=0)Array(t).fill(0).forEach((r,i)=>{let s=e+parseInt(i,10)+1,o=this.ticketTemplateTarget.innerHTML;o=yd(o,"ticket",s),this.ticketListTarget.insertAdjacentHTML("beforeend",o)});else{let r=Array.from(this.ticketListTarget.children).reverse();Array(Math.abs(t)).fill(0).forEach((i,s)=>{r[s].remove()})}this.rewriteTitles()}}rewriteTitles(){let n=this.ticketFormTargets.filter(e=>!e.classList.contains("d-none"));n.length>1?(this.ticketTitleTarget.innerHTML="Tickets",n.forEach((e,t)=>{e.querySelector(".title").innerHTML=`Ticket ${t+1}`})):(this.ticketTitleTarget.innerHTML="Ticket",n.forEach((e,t)=>{e.querySelector(".title").innerHTML=""}))}};we(bd,"targets",["quantity","ticketList","ticketTemplate","ticketForm","ticketTitle"]);var Tm={};He(Tm,{default:()=>Sm});var Sm=class extends me{toggle(n){n.preventDefault();let e=this.barElement(),t=this.contentElement();e.classList.toggle("d-block"),t.classList.toggle("d-block"),t.classList.toggle("d-none")}isVisible(n){return!!(n.offsetWidth||n.offsetHeight||n.getClientRects().length)}barElement(){let n="collection-summary-mobile__bar";return document.getElementsByClassName(n)[0]}contentElement(){let n="collection-summary-mobile__content-container";return document.getElementsByClassName(n)[0]}};var Cm={};He(Cm,{default:()=>Ed});var Ed=class extends me{connect(){this.enableEMandateUpdated()}enableEMandateUpdated(){if(!this.hasEnableEMandateTarget)return;let n=this.enableEMandateTargets[1].checked,e=null;this.hasAcceptWrapperTarget&&(e=this.acceptWrapperTarget.querySelector("label"),e.innerHTML=""),n?(this.eMandateSectionTarget.classList.remove("d-none"),this.requiredInputTargets.forEach(t=>{t.setAttribute("required",!0)}),this.hasAcceptWrapperTarget&&this.updateAcceptLabel(e,this.eMandateAcceptLabelTarget)):(this.eMandateSectionTarget.classList.add("d-none"),this.requiredInputTargets.forEach(t=>{t.removeAttribute("required")}),this.hasAcceptWrapperTarget&&this.updateAcceptLabel(e,this.defaultAcceptLabelTarget))}updateAcceptLabel(n,e){e.childNodes.forEach(function(r){let i=r.cloneNode(!0);n.appendChild(i)})}};we(Ed,"targets",["enableEMandate","eMandateSection","requiredInput","defaultAcceptLabel","eMandateAcceptLabel","acceptWrapper"]);var Dm={};He(Dm,{default:()=>Am});var VS=Tt(On());var Am=class extends me{eMandateUserUpdated(){let n=document.getElementById("new_bill"),e=new FormData(n),t={e_mandate_id:e.get(this.getFieldName("e_mandate_id")),biller_account_id:e.get(this.getFieldName("biller_account_id")),id_number:e.get(this.getFieldName("id_number")),reference:e.get(this.getFieldName("reference")),purpose:e.get(this.getFieldName("purpose")),frequency:e.get(this.getFieldName("frequency")),maximum_debiting_count:e.get(this.getFieldName("maximum_debiting_count")),start_at:e.get(this.getFieldName("start_at")),end_at:e.get(this.getFieldName("end_at"))};VS.default.ajax({url:"/e_mandates/e_mandate_users",type:"GET",dataType:"json",data:new URLSearchParams(t).toString()})}getFieldName(n){return`bill[e_mandate_user_attributes][${n}]`}};var Py={};He(Py,{default:()=>Ny});var Cd,Ue,YS,YN,$o,Ms,$S,GS,KS,wd={},QS=[],GN=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Fi(n,e){for(var t in e)n[t]=e[t];return n}function XS(n){var e=n.parentNode;e&&e.removeChild(n)}function j(n,e,t){var r,i,s,o={};for(s in e)s=="key"?r=e[s]:s=="ref"?i=e[s]:o[s]=e[s];if(arguments.length>2&&(o.children=arguments.length>3?Cd.call(arguments,2):t),typeof n=="function"&&n.defaultProps!=null)for(s in n.defaultProps)o[s]===void 0&&(o[s]=n.defaultProps[s]);return _d(n,o,r,i,null)}function _d(n,e,t,r,i){var s={type:n,props:e,key:t,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++YS};return i==null&&Ue.vnode!=null&&Ue.vnode(s),s}function nn(){return{current:null}}function yt(n){return n.children}function KN(n,e,t,r,i){var s;for(s in t)s==="children"||s==="key"||s in e||Sd(n,s,null,t[s],r);for(s in e)i&&typeof e[s]!="function"||s==="children"||s==="key"||s==="value"||s==="checked"||t[s]===e[s]||Sd(n,s,e[s],t[s],r)}function zS(n,e,t){e[0]==="-"?n.setProperty(e,t??""):n[e]=t==null?"":typeof t!="number"||GN.test(e)?t:t+"px"}function Sd(n,e,t,r,i){var s;e:if(e==="style")if(typeof t=="string")n.style.cssText=t;else{if(typeof r=="string"&&(n.style.cssText=r=""),r)for(e in r)t&&e in t||zS(n.style,e,"");if(t)for(e in t)r&&t[e]===r[e]||zS(n.style,e,t[e])}else if(e[0]==="o"&&e[1]==="n")s=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in n?e.toLowerCase().slice(2):e.slice(2),n.l||(n.l={}),n.l[e+s]=t,t?r||n.addEventListener(e,s?US:WS,s):n.removeEventListener(e,s?US:WS,s);else if(e!=="dangerouslySetInnerHTML"){if(i)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!=="width"&&e!=="height"&&e!=="href"&&e!=="list"&&e!=="form"&&e!=="tabIndex"&&e!=="download"&&e in n)try{n[e]=t??"";break e}catch{}typeof t=="function"||(t==null||t===!1&&e.indexOf("-")==-1?n.removeAttribute(e):n.setAttribute(e,t))}}function WS(n){$o=!0;try{return this.l[n.type+!1](Ue.event?Ue.event(n):n)}finally{$o=!1}}function US(n){$o=!0;try{return this.l[n.type+!0](Ue.event?Ue.event(n):n)}finally{$o=!1}}function mn(n,e){this.props=n,this.context=e}function hl(n,e){if(e==null)return n.__?hl(n.__,n.__.__k.indexOf(n)+1):null;for(var t;e<n.__k.length;e++)if((t=n.__k[e])!=null&&t.__e!=null)return t.__e;return typeof n.type=="function"?hl(n):null}function ZS(n){var e,t;if((n=n.__)!=null&&n.__c!=null){for(n.__e=n.__c.base=null,e=0;e<n.__k.length;e++)if((t=n.__k[e])!=null&&t.__e!=null){n.__e=n.__c.base=t.__e;break}return ZS(n)}}function QN(n){$o?setTimeout(n):GS(n)}function xm(n){(!n.__d&&(n.__d=!0)&&Ms.push(n)&&!Td.__r++||$S!==Ue.debounceRendering)&&(($S=Ue.debounceRendering)||QN)(Td)}function Td(){var n,e,t,r,i,s,o,a;for(Ms.sort(function(c,u){return c.__v.__b-u.__v.__b});n=Ms.shift();)n.__d&&(e=Ms.length,r=void 0,i=void 0,o=(s=(t=n).__v).__e,(a=t.__P)&&(r=[],(i=Fi({},s)).__v=s.__v+1,Om(a,s,i,t.__n,a.ownerSVGElement!==void 0,s.__h!=null?[o]:null,r,o??hl(s),s.__h),rT(r,s),s.__e!=o&&ZS(s)),Ms.length>e&&Ms.sort(function(c,u){return c.__v.__b-u.__v.__b}));Td.__r=0}function JS(n,e,t,r,i,s,o,a,c,u){var f,p,h,y,_,w,E,D=r&&r.__k||QS,R=D.length;for(t.__k=[],f=0;f<e.length;f++)if((y=t.__k[f]=(y=e[f])==null||typeof y=="boolean"?null:typeof y=="string"||typeof y=="number"||typeof y=="bigint"?_d(null,y,null,null,y):Array.isArray(y)?_d(yt,{children:y},null,null,null):y.__b>0?_d(y.type,y.props,y.key,y.ref?y.ref:null,y.__v):y)!=null){if(y.__=t,y.__b=t.__b+1,(h=D[f])===null||h&&y.key==h.key&&y.type===h.type)D[f]=void 0;else for(p=0;p<R;p++){if((h=D[p])&&y.key==h.key&&y.type===h.type){D[p]=void 0;break}h=null}Om(n,y,h=h||wd,i,s,o,a,c,u),_=y.__e,(p=y.ref)&&h.ref!=p&&(E||(E=[]),h.ref&&E.push(h.ref,null,y),E.push(p,y.__c||_,y)),_!=null?(w==null&&(w=_),typeof y.type=="function"&&y.__k===h.__k?y.__d=c=eT(y,c,n):c=tT(n,y,h,D,_,c),typeof t.type=="function"&&(t.__d=c)):c&&h.__e==c&&c.parentNode!=n&&(c=hl(h))}for(t.__e=w,f=R;f--;)D[f]!=null&&(typeof t.type=="function"&&D[f].__e!=null&&D[f].__e==t.__d&&(t.__d=nT(r).nextSibling),sT(D[f],D[f]));if(E)for(f=0;f<E.length;f++)iT(E[f],E[++f],E[++f])}function eT(n,e,t){for(var r,i=n.__k,s=0;i&&s<i.length;s++)(r=i[s])&&(r.__=n,e=typeof r.type=="function"?eT(r,e,t):tT(t,r,r,i,r.__e,e));return e}function pl(n,e){return e=e||[],n==null||typeof n=="boolean"||(Array.isArray(n)?n.some(function(t){pl(t,e)}):e.push(n)),e}function tT(n,e,t,r,i,s){var o,a,c;if(e.__d!==void 0)o=e.__d,e.__d=void 0;else if(t==null||i!=s||i.parentNode==null)e:if(s==null||s.parentNode!==n)n.appendChild(i),o=null;else{for(a=s,c=0;(a=a.nextSibling)&&c<r.length;c+=1)if(a==i)break e;n.insertBefore(i,s),o=s}return o!==void 0?o:i.nextSibling}function nT(n){var e,t,r;if(n.type==null||typeof n.type=="string")return n.__e;if(n.__k){for(e=n.__k.length-1;e>=0;e--)if((t=n.__k[e])&&(r=nT(t)))return r}return null}function Om(n,e,t,r,i,s,o,a,c){var u,f,p,h,y,_,w,E,D,R,H,F,m,Q,le,J=e.type;if(e.constructor!==void 0)return null;t.__h!=null&&(c=t.__h,a=e.__e=t.__e,e.__h=null,s=[a]),(u=Ue.__b)&&u(e);try{e:if(typeof J=="function"){if(E=e.props,D=(u=J.contextType)&&r[u.__c],R=u?D?D.props.value:u.__:r,t.__c?w=(f=e.__c=t.__c).__=f.__E:("prototype"in J&&J.prototype.render?e.__c=f=new J(E,R):(e.__c=f=new mn(E,R),f.constructor=J,f.render=ZN),D&&D.sub(f),f.props=E,f.state||(f.state={}),f.context=R,f.__n=r,p=f.__d=!0,f.__h=[],f._sb=[]),f.__s==null&&(f.__s=f.state),J.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=Fi({},f.__s)),Fi(f.__s,J.getDerivedStateFromProps(E,f.__s))),h=f.props,y=f.state,f.__v=e,p)J.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(J.getDerivedStateFromProps==null&&E!==h&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(E,R),!f.__e&&f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(E,f.__s,R)===!1||e.__v===t.__v){for(e.__v!==t.__v&&(f.props=E,f.state=f.__s,f.__d=!1),e.__e=t.__e,e.__k=t.__k,e.__k.forEach(function(q){q&&(q.__=e)}),H=0;H<f._sb.length;H++)f.__h.push(f._sb[H]);f._sb=[],f.__h.length&&o.push(f);break e}f.componentWillUpdate!=null&&f.componentWillUpdate(E,f.__s,R),f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(h,y,_)})}if(f.context=R,f.props=E,f.__P=n,F=Ue.__r,m=0,"prototype"in J&&J.prototype.render){for(f.state=f.__s,f.__d=!1,F&&F(e),u=f.render(f.props,f.state,f.context),Q=0;Q<f._sb.length;Q++)f.__h.push(f._sb[Q]);f._sb=[]}else do f.__d=!1,F&&F(e),u=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++m<25);f.state=f.__s,f.getChildContext!=null&&(r=Fi(Fi({},r),f.getChildContext())),p||f.getSnapshotBeforeUpdate==null||(_=f.getSnapshotBeforeUpdate(h,y)),le=u!=null&&u.type===yt&&u.key==null?u.props.children:u,JS(n,Array.isArray(le)?le:[le],e,t,r,i,s,o,a,c),f.base=e.__e,e.__h=null,f.__h.length&&o.push(f),w&&(f.__E=f.__=null),f.__e=!1}else s==null&&e.__v===t.__v?(e.__k=t.__k,e.__e=t.__e):e.__e=XN(t.__e,e,t,r,i,s,o,c);(u=Ue.diffed)&&u(e)}catch(q){e.__v=null,(c||s!=null)&&(e.__e=a,e.__h=!!c,s[s.indexOf(a)]=null),Ue.__e(q,e,t)}}function rT(n,e){Ue.__c&&Ue.__c(e,n),n.some(function(t){try{n=t.__h,t.__h=[],n.some(function(r){r.call(t)})}catch(r){Ue.__e(r,t.__v)}})}function XN(n,e,t,r,i,s,o,a){var c,u,f,p=t.props,h=e.props,y=e.type,_=0;if(y==="svg"&&(i=!0),s!=null){for(;_<s.length;_++)if((c=s[_])&&"setAttribute"in c==!!y&&(y?c.localName===y:c.nodeType===3)){n=c,s[_]=null;break}}if(n==null){if(y===null)return document.createTextNode(h);n=i?document.createElementNS("http://www.w3.org/2000/svg",y):document.createElement(y,h.is&&h),s=null,a=!1}if(y===null)p===h||a&&n.data===h||(n.data=h);else{if(s=s&&Cd.call(n.childNodes),u=(p=t.props||wd).dangerouslySetInnerHTML,f=h.dangerouslySetInnerHTML,!a){if(s!=null)for(p={},_=0;_<n.attributes.length;_++)p[n.attributes[_].name]=n.attributes[_].value;(f||u)&&(f&&(u&&f.__html==u.__html||f.__html===n.innerHTML)||(n.innerHTML=f&&f.__html||""))}if(KN(n,h,p,i,a),f)e.__k=[];else if(_=e.props.children,JS(n,Array.isArray(_)?_:[_],e,t,r,i&&y!=="foreignObject",s,o,s?s[0]:t.__k&&hl(t,0),a),s!=null)for(_=s.length;_--;)s[_]!=null&&XS(s[_]);a||("value"in h&&(_=h.value)!==void 0&&(_!==n.value||y==="progress"&&!_||y==="option"&&_!==p.value)&&Sd(n,"value",_,p.value,!1),"checked"in h&&(_=h.checked)!==void 0&&_!==n.checked&&Sd(n,"checked",_,p.checked,!1))}return n}function iT(n,e,t){try{typeof n=="function"?n(e):n.current=e}catch(r){Ue.__e(r,t)}}function sT(n,e,t){var r,i;if(Ue.unmount&&Ue.unmount(n),(r=n.ref)&&(r.current&&r.current!==n.__e||iT(r,null,e)),(r=n.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){Ue.__e(s,e)}r.base=r.__P=null,n.__c=void 0}if(r=n.__k)for(i=0;i<r.length;i++)r[i]&&sT(r[i],e,t||typeof n.type!="function");t||n.__e==null||XS(n.__e),n.__=n.__e=n.__d=void 0}function ZN(n,e,t){return this.constructor(n,t)}function Bi(n,e,t){var r,i,s;Ue.__&&Ue.__(n,e),i=(r=typeof t=="function")?null:t&&t.__k||e.__k,s=[],Om(e,n=(!r&&t||e).__k=j(yt,null,[n]),i||wd,wd,e.ownerSVGElement!==void 0,!r&&t?[t]:i?null:e.firstChild?Cd.call(e.childNodes):null,s,!r&&t?t:i?i.__e:e.firstChild,r),rT(s,n)}function Ad(n,e){var t={__c:e="__cC"+KS++,__:n,Consumer:function(r,i){return r.children(i)},Provider:function(r){var i,s;return this.getChildContext||(i=[],(s={})[e]=this,this.getChildContext=function(){return s},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&i.some(function(a){a.__e=!0,xm(a)})},this.sub=function(o){i.push(o);var a=o.componentWillUnmount;o.componentWillUnmount=function(){i.splice(i.indexOf(o),1),a&&a.call(o)}}),r.children}};return t.Provider.__=t.Consumer.contextType=t}Cd=QS.slice,Ue={__e:function(n,e,t,r){for(var i,s,o;e=e.__;)if((i=e.__c)&&!i.__)try{if((s=i.constructor)&&s.getDerivedStateFromError!=null&&(i.setState(s.getDerivedStateFromError(n)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(n,r||{}),o=i.__d),o)return i.__E=i}catch(a){n=a}throw n}},YS=0,YN=function(n){return n!=null&&n.constructor===void 0},$o=!1,mn.prototype.setState=function(n,e){var t;t=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Fi({},this.state),typeof n=="function"&&(n=n(Fi({},t),this.props)),n&&Fi(t,n),n!=null&&this.__v&&(e&&this._sb.push(e),xm(this))},mn.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),xm(this))},mn.prototype.render=yt,Ms=[],GS=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Td.__r=0,KS=0;var e1,kr,Im,oT;var hT=[],km=[],aT=Ue.__b,lT=Ue.__r,cT=Ue.diffed,uT=Ue.__c,dT=Ue.unmount;function t1(){for(var n;n=hT.shift();)if(n.__P&&n.__H)try{n.__H.__h.forEach(Dd),n.__H.__h.forEach(Rm),n.__H.__h=[]}catch(e){n.__H.__h=[],Ue.__e(e,n.__v)}}Ue.__b=function(n){kr=null,aT&&aT(n)},Ue.__r=function(n){lT&&lT(n),e1=0;var e=(kr=n.__c).__H;e&&(Im===kr?(e.__h=[],kr.__h=[],e.__.forEach(function(t){t.__N&&(t.__=t.__N),t.__V=km,t.__N=t.i=void 0})):(e.__h.forEach(Dd),e.__h.forEach(Rm),e.__h=[])),Im=kr},Ue.diffed=function(n){cT&&cT(n);var e=n.__c;e&&e.__H&&(e.__H.__h.length&&(hT.push(e)!==1&&oT===Ue.requestAnimationFrame||((oT=Ue.requestAnimationFrame)||n1)(t1)),e.__H.__.forEach(function(t){t.i&&(t.__H=t.i),t.__V!==km&&(t.__=t.__V),t.i=void 0,t.__V=km})),Im=kr=null},Ue.__c=function(n,e){e.some(function(t){try{t.__h.forEach(Dd),t.__h=t.__h.filter(function(r){return!r.__||Rm(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],Ue.__e(r,t.__v)}}),uT&&uT(n,e)},Ue.unmount=function(n){dT&&dT(n);var e,t=n.__c;t&&t.__H&&(t.__H.__.forEach(function(r){try{Dd(r)}catch(i){e=i}}),t.__H=void 0,e&&Ue.__e(e,t.__v))};var fT=typeof requestAnimationFrame=="function";function n1(n){var e,t=function(){clearTimeout(r),fT&&cancelAnimationFrame(e),setTimeout(n)},r=setTimeout(t,100);fT&&(e=requestAnimationFrame(t))}function Dd(n){var e=kr,t=n.__c;typeof t=="function"&&(n.__c=void 0,t()),kr=e}function Rm(n){var e=kr;n.__c=n.__(),kr=e}function r1(n,e){for(var t in e)n[t]=e[t];return n}function pT(n,e){for(var t in n)if(t!=="__source"&&!(t in e))return!0;for(var r in e)if(r!=="__source"&&n[r]!==e[r])return!0;return!1}function gT(n){this.props=n}(gT.prototype=new mn).isPureReactComponent=!0,gT.prototype.shouldComponentUpdate=function(n,e){return pT(this.props,n)||pT(this.state,e)};var mT=Ue.__b;Ue.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),mT&&mT(n)};var EY=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var i1=Ue.__e;Ue.__e=function(n,e,t,r){if(n.then){for(var i,s=e;s=s.__;)if((i=s.__c)&&i.__c)return e.__e==null&&(e.__e=t.__e,e.__k=t.__k),i.__c(n,e)}i1(n,e,t,r)};var vT=Ue.unmount;function ST(n,e,t){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),n.__c.__H=null),(n=r1({},n)).__c!=null&&(n.__c.__P===t&&(n.__c.__P=e),n.__c=null),n.__k=n.__k&&n.__k.map(function(r){return ST(r,e,t)})),n}function TT(n,e,t){return n&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(r){return TT(r,e,t)}),n.__c&&n.__c.__P===e&&(n.__e&&t.insertBefore(n.__e,n.__d),n.__c.__e=!0,n.__c.__P=t)),n}function Mm(){this.__u=0,this.t=null,this.__b=null}function CT(n){var e=n.__.__c;return e&&e.__a&&e.__a(n)}function xd(){this.u=null,this.o=null}Ue.unmount=function(n){var e=n.__c;e&&e.__R&&e.__R(),e&&n.__h===!0&&(n.type=null),vT&&vT(n)},(Mm.prototype=new mn).__c=function(n,e){var t=e.__c,r=this;r.t==null&&(r.t=[]),r.t.push(t);var i=CT(r.__v),s=!1,o=function(){s||(s=!0,t.__R=null,i?i(a):a())};t.__R=o;var a=function(){if(!--r.__u){if(r.state.__a){var u=r.state.__a;r.__v.__k[0]=TT(u,u.__c.__P,u.__c.__O)}var f;for(r.setState({__a:r.__b=null});f=r.t.pop();)f.forceUpdate()}},c=e.__h===!0;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),n.then(o,o)},Mm.prototype.componentWillUnmount=function(){this.t=[]},Mm.prototype.render=function(n,e){if(this.__b){if(this.__v.__k){var t=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=ST(this.__b,t,r.__O=r.__P)}this.__b=null}var i=e.__a&&j(yt,null,n.fallback);return i&&(i.__h=null),[j(yt,null,e.__a?null:n.children),i]};var yT=function(n,e,t){if(++t[1]===t[0]&&n.o.delete(e),n.props.revealOrder&&(n.props.revealOrder[0]!=="t"||!n.o.size))for(t=n.u;t;){for(;t.length>3;)t.pop()();if(t[1]<t[0])break;n.u=t=t[2]}};function s1(n){return this.getChildContext=function(){return n.context},n.children}function o1(n){var e=this,t=n.i;e.componentWillUnmount=function(){Bi(null,e.l),e.l=null,e.i=null},e.i&&e.i!==t&&e.componentWillUnmount(),n.__v?(e.l||(e.i=t,e.l={nodeType:1,parentNode:t,childNodes:[],appendChild:function(r){this.childNodes.push(r),e.i.appendChild(r)},insertBefore:function(r,i){this.childNodes.push(r),e.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),e.i.removeChild(r)}}),Bi(j(s1,{context:e.context},n.__v),e.l)):e.l&&e.componentWillUnmount()}function AT(n,e){var t=j(o1,{__v:n,i:e});return t.containerInfo=e,t}(xd.prototype=new mn).__a=function(n){var e=this,t=CT(e.__v),r=e.o.get(n);return r[0]++,function(i){var s=function(){e.props.revealOrder?(r.push(i),yT(e,n,r)):i()};t?t(s):s()}},xd.prototype.render=function(n){this.u=null,this.o=new Map;var e=pl(n.children);n.revealOrder&&n.revealOrder[0]==="b"&&e.reverse();for(var t=e.length;t--;)this.o.set(e[t],this.u=[1,0,this.u]);return n.children},xd.prototype.componentDidUpdate=xd.prototype.componentDidMount=function(){var n=this;this.o.forEach(function(e,t){yT(n,t,e)})};var a1=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,l1=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,c1=typeof document<"u",u1=function(n){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(n)};mn.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(n){Object.defineProperty(mn.prototype,n,{configurable:!0,get:function(){return this["UNSAFE_"+n]},set:function(e){Object.defineProperty(this,n,{configurable:!0,writable:!0,value:e})}})});var bT=Ue.event;function d1(){}function f1(){return this.cancelBubble}function h1(){return this.defaultPrevented}Ue.event=function(n){return bT&&(n=bT(n)),n.persist=d1,n.isPropagationStopped=f1,n.isDefaultPrevented=h1,n.nativeEvent=n};var p1,ET={configurable:!0,get:function(){return this.class}},_T=Ue.vnode;Ue.vnode=function(n){var e=n.type,t=n.props,r=t;if(typeof e=="string"){var i=e.indexOf("-")===-1;for(var s in r={},t){var o=t[s];c1&&s==="children"&&e==="noscript"||s==="value"&&"defaultValue"in t&&o==null||(s==="defaultValue"&&"value"in t&&t.value==null?s="value":s==="download"&&o===!0?o="":/ondoubleclick/i.test(s)?s="ondblclick":/^onchange(textarea|input)/i.test(s+e)&&!u1(t.type)?s="oninput":/^onfocus$/i.test(s)?s="onfocusin":/^onblur$/i.test(s)?s="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(s)?s=s.toLowerCase():i&&l1.test(s)?s=s.replace(/[A-Z0-9]/g,"-$&").toLowerCase():o===null&&(o=void 0),/^oninput$/i.test(s)&&(s=s.toLowerCase(),r[s]&&(s="oninputCapture")),r[s]=o)}e=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=pl(t.children).forEach(function(a){a.props.selected=r.value.indexOf(a.props.value)!=-1})),e=="select"&&r.defaultValue!=null&&(r.value=pl(t.children).forEach(function(a){a.props.selected=r.multiple?r.defaultValue.indexOf(a.props.value)!=-1:r.defaultValue==a.props.value})),n.props=r,t.class!=t.className&&(ET.enumerable="className"in t,t.className!=null&&(r.class=t.className),Object.defineProperty(r,"className",ET))}n.$$typeof=a1,_T&&_T(n)};var wT=Ue.__r;Ue.__r=function(n){wT&&wT(n),p1=n.__c};var VT=[],$m=new Map;function Wi(n){VT.push(n),$m.forEach(e=>{WT(e,n)})}function $T(n){n.isConnected&&zT(n.getRootNode())}function zT(n){let e=$m.get(n);if(!e||!e.isConnected){if(e=n.querySelector("style[data-fullcalendar]"),!e){e=document.createElement("style"),e.setAttribute("data-fullcalendar","");let t=m1();t&&(e.nonce=t);let r=n===document?document.head:n,i=n===document?r.querySelector("script,link[rel=stylesheet],link[as=style],style"):r.firstChild;r.insertBefore(e,i)}$m.set(n,e),g1(e)}}function g1(n){for(let e of VT)WT(n,e)}function WT(n,e){let{sheet:t}=n,r=t.cssRules.length;e.split("}").forEach((i,s)=>{i=i.trim(),i&&t.insertRule(i+"}",r+s)})}var Nm;function m1(){return Nm===void 0&&(Nm=v1()),Nm}function v1(){let n=document.querySelector('meta[name="csp-nonce"]');if(n&&n.hasAttribute("content"))return n.getAttribute("content");let e=document.querySelector("script[nonce]");return e&&e.nonce||""}typeof document<"u"&&zT(document);var y1=':root{--fc-small-font-size:.85em;--fc-page-bg-color:#fff;--fc-neutral-bg-color:hsla(0,0%,82%,.3);--fc-neutral-text-color:grey;--fc-border-color:#ddd;--fc-button-text-color:#fff;--fc-button-bg-color:#2c3e50;--fc-button-border-color:#2c3e50;--fc-button-hover-bg-color:#1e2b37;--fc-button-hover-border-color:#1a252f;--fc-button-active-bg-color:#1a252f;--fc-button-active-border-color:#151e27;--fc-event-bg-color:#3788d8;--fc-event-border-color:#3788d8;--fc-event-text-color:#fff;--fc-event-selected-overlay-color:rgba(0,0,0,.25);--fc-more-link-bg-color:#d0d0d0;--fc-more-link-text-color:inherit;--fc-event-resizer-thickness:8px;--fc-event-resizer-dot-total-width:8px;--fc-event-resizer-dot-border-width:1px;--fc-non-business-color:hsla(0,0%,84%,.3);--fc-bg-event-color:#8fdf82;--fc-bg-event-opacity:0.3;--fc-highlight-color:rgba(188,232,241,.3);--fc-today-bg-color:rgba(255,220,40,.15);--fc-now-indicator-color:red}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc{display:flex;flex-direction:column;font-size:1em}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc table{border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc td,.fc th{padding:0;vertical-align:top}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-theme-standard td,.fc-theme-standard th{border:1px solid var(--fc-border-color)}.fc-liquid-hack td,.fc-liquid-hack th{position:relative}@font-face{font-family:fcicons;font-style:normal;font-weight:400;src:url("data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format("truetype")}.fc-icon{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:fcicons!important;font-style:normal;font-variant:normal;font-weight:400;height:1em;line-height:1;text-align:center;text-transform:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:1em}.fc-icon-chevron-left:before{content:"\\e900"}.fc-icon-chevron-right:before{content:"\\e901"}.fc-icon-chevrons-left:before{content:"\\e902"}.fc-icon-chevrons-right:before{content:"\\e903"}.fc-icon-minus-square:before{content:"\\e904"}.fc-icon-plus-square:before{content:"\\e905"}.fc-icon-x:before{content:"\\e906"}.fc .fc-button{border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}.fc .fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc .fc-button{-webkit-appearance:button}.fc .fc-button:not(:disabled){cursor:pointer}.fc .fc-button{background-color:transparent;border:1px solid transparent;border-radius:.25em;display:inline-block;font-size:1em;font-weight:400;line-height:1.5;padding:.4em .65em;text-align:center;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle}.fc .fc-button:hover{text-decoration:none}.fc .fc-button:focus{box-shadow:0 0 0 .2rem rgba(44,62,80,.25);outline:0}.fc .fc-button:disabled{opacity:.65}.fc .fc-button-primary{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:hover{background-color:var(--fc-button-hover-bg-color);border-color:var(--fc-button-hover-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:disabled{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button-primary:not(:disabled).fc-button-active,.fc .fc-button-primary:not(:disabled):active{background-color:var(--fc-button-active-bg-color);border-color:var(--fc-button-active-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:not(:disabled).fc-button-active:focus,.fc .fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button .fc-icon{font-size:1.5em;vertical-align:middle}.fc .fc-button-group{display:inline-flex;position:relative;vertical-align:middle}.fc .fc-button-group>.fc-button{flex:1 1 auto;position:relative}.fc .fc-button-group>.fc-button.fc-button-active,.fc .fc-button-group>.fc-button:active,.fc .fc-button-group>.fc-button:focus,.fc .fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.fc .fc-toolbar{align-items:center;display:flex;justify-content:space-between}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:1.5em}.fc .fc-toolbar.fc-footer-toolbar{margin-top:1.5em}.fc .fc-toolbar-title{font-size:1.75em;margin:0}.fc-direction-ltr .fc-toolbar>*>:not(:first-child){margin-left:.75em}.fc-direction-rtl .fc-toolbar>*>:not(:first-child){margin-right:.75em}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc .fc-scroller{-webkit-overflow-scrolling:touch;position:relative}.fc .fc-scroller-liquid{height:100%}.fc .fc-scroller-liquid-absolute{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-scroller-harness{direction:ltr;overflow:hidden;position:relative}.fc .fc-scroller-harness-liquid{height:100%}.fc-direction-rtl .fc-scroller-harness>.fc-scroller{direction:rtl}.fc-theme-standard .fc-scrollgrid{border:1px solid var(--fc-border-color)}.fc .fc-scrollgrid,.fc .fc-scrollgrid table{table-layout:fixed;width:100%}.fc .fc-scrollgrid table{border-left-style:hidden;border-right-style:hidden;border-top-style:hidden}.fc .fc-scrollgrid{border-bottom-width:0;border-collapse:separate;border-right-width:0}.fc .fc-scrollgrid-liquid{height:100%}.fc .fc-scrollgrid-section,.fc .fc-scrollgrid-section table,.fc .fc-scrollgrid-section>td{height:1px}.fc .fc-scrollgrid-section-liquid>td{height:100%}.fc .fc-scrollgrid-section>*{border-left-width:0;border-top-width:0}.fc .fc-scrollgrid-section-footer>*,.fc .fc-scrollgrid-section-header>*{border-bottom-width:0}.fc .fc-scrollgrid-section-body table,.fc .fc-scrollgrid-section-footer table{border-bottom-style:hidden}.fc .fc-scrollgrid-section-sticky>*{background:var(--fc-page-bg-color);position:sticky;z-index:3}.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>*{top:0}.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky>*{bottom:0}.fc .fc-scrollgrid-sticky-shim{height:1px;margin-bottom:-1px}.fc-sticky{position:sticky}.fc .fc-view-harness{flex-grow:1;position:relative}.fc .fc-view-harness-active>.fc-view{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-col-header-cell-cushion{display:inline-block;padding:2px 4px}.fc .fc-bg-event,.fc .fc-highlight,.fc .fc-non-business{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-non-business{background:var(--fc-non-business-color)}.fc .fc-bg-event{background:var(--fc-bg-event-color);opacity:var(--fc-bg-event-opacity)}.fc .fc-bg-event .fc-event-title{font-size:var(--fc-small-font-size);font-style:italic;margin:.5em}.fc .fc-highlight{background:var(--fc-highlight-color)}.fc .fc-cell-shaded,.fc .fc-day-disabled{background:var(--fc-neutral-bg-color)}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-event .fc-event-main{position:relative;z-index:2}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event .fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{background:var(--fc-page-bg-color);border-color:inherit;border-radius:calc(var(--fc-event-resizer-dot-total-width)/2);border-style:solid;border-width:var(--fc-event-resizer-dot-border-width);height:var(--fc-event-resizer-dot-total-width);width:var(--fc-event-resizer-dot-total-width)}.fc-event-selected .fc-event-resizer:before{bottom:-20px;content:"";left:-20px;position:absolute;right:-20px;top:-20px}.fc-event-selected,.fc-event:focus{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:before,.fc-event:focus:before{bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:3}.fc-event-selected:after,.fc-event:focus:after{background:var(--fc-event-selected-overlay-color);bottom:-1px;content:"";left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fc-h-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-h-event .fc-event-main{color:var(--fc-event-text-color)}.fc-h-event .fc-event-main-frame{display:flex}.fc-h-event .fc-event-time{max-width:100%;overflow:hidden}.fc-h-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-width:0}.fc-h-event .fc-event-title{display:inline-block;left:0;max-width:100%;overflow:hidden;right:0;vertical-align:top}.fc-h-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end){border-bottom-left-radius:0;border-left-width:0;border-top-left-radius:0}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start){border-bottom-right-radius:0;border-right-width:0;border-top-right-radius:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{bottom:0;top:0;width:var(--fc-event-resizer-thickness)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-h-event.fc-event-selected .fc-event-resizer{margin-top:calc(var(--fc-event-resizer-dot-total-width)*-.5);top:50%}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc .fc-popover{box-shadow:0 2px 6px rgba(0,0,0,.15);position:absolute;z-index:9999}.fc .fc-popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:3px 4px}.fc .fc-popover-title{margin:0 2px}.fc .fc-popover-close{cursor:pointer;font-size:1.1em;opacity:.65}.fc-theme-standard .fc-popover{background:var(--fc-page-bg-color);border:1px solid var(--fc-border-color)}.fc-theme-standard .fc-popover-header{background:var(--fc-neutral-bg-color)}';Wi(y1);function Il(n){n.parentNode&&n.parentNode.removeChild(n)}function on(n,e){if(n.closest)return n.closest(e);if(!document.documentElement.contains(n))return null;do{if(Jm(n,e))return n;n=n.parentElement||n.parentNode}while(n!==null&&n.nodeType===1);return null}function Jm(n,e){return(n.matches||n.matchesSelector||n.msMatchesSelector).call(n,e)}function UT(n,e){let t=n instanceof HTMLElement?[n]:n,r=[];for(let i=0;i<t.length;i+=1){let s=t[i].querySelectorAll(e);for(let o=0;o<s.length;o+=1)r.push(s[o])}return r}var b1=/(top|left|right|bottom|width|height)$/i;function Gs(n,e){for(let t in e)ev(n,t,e[t])}function ev(n,e,t){t==null?n.style[e]="":typeof t=="number"&&b1.test(e)?n.style[e]=`${t}px`:n.style[e]=t}function Ud(n){var e,t;return(t=(e=n.composedPath)===null||e===void 0?void 0:e.call(n)[0])!==null&&t!==void 0?t:n.target}var DT=0;function cr(){return DT+=1,"fc-dom-"+DT}function kl(n){n.preventDefault()}function E1(n,e){return t=>{let r=on(t.target,n);r&&e.call(r,t,r)}}function tv(n,e,t,r){let i=E1(t,r);return n.addEventListener(e,i),()=>{n.removeEventListener(e,i)}}function YT(n,e,t,r){let i;return tv(n,"mouseover",e,(s,o)=>{if(o!==i){i=o,t(s,o);let a=c=>{i=null,r(c,o),o.removeEventListener("mouseleave",a)};o.addEventListener("mouseleave",a)}})}var xT=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function nv(n,e){let t=r=>{e(r),xT.forEach(i=>{n.removeEventListener(i,t)})};xT.forEach(r=>{n.addEventListener(r,t)})}function GT(n){return Object.assign({onClick:n},KT(n))}function KT(n){return{tabIndex:0,onKeyDown(e){(e.key==="Enter"||e.key===" ")&&(n(e),e.preventDefault())}}}var OT=0;function di(){return OT+=1,String(OT)}function Rl(){document.body.classList.add("fc-not-allowed")}function Ml(){document.body.classList.remove("fc-not-allowed")}function rv(n){n.style.userSelect="none",n.addEventListener("selectstart",kl)}function iv(n){n.style.userSelect="",n.removeEventListener("selectstart",kl)}function sv(n){n.addEventListener("contextmenu",kl)}function ov(n){n.removeEventListener("contextmenu",kl)}function QT(n){let e=[],t=[],r,i;for(typeof n=="string"?t=n.split(/\s*,\s*/):typeof n=="function"?t=[n]:Array.isArray(n)&&(t=n),r=0;r<t.length;r+=1)i=t[r],typeof i=="string"?e.push(i.charAt(0)==="-"?{field:i.substring(1),order:-1}:{field:i,order:1}):typeof i=="function"&&e.push({func:i});return e}function XT(n,e,t){let r,i;for(r=0;r<t.length;r+=1)if(i=_1(n,e,t[r]),i)return i;return 0}function _1(n,e,t){return t.func?t.func(n,e):ZT(n[t.field],e[t.field])*(t.order||1)}function ZT(n,e){return!n&&!e?0:e==null?-1:n==null?1:typeof n=="string"||typeof e=="string"?String(n).localeCompare(String(e)):n-e}function Ps(n,e){let t=String(n);return"000".substr(0,e-t.length)+t}function Go(n,e,t){return typeof n=="function"?n(...e):typeof n=="string"?e.reduce((r,i,s)=>r.replace("$"+s,i||""),n):t}function av(n,e){return n-e}function gl(n){return n%1===0}function w1(n){let e=n.querySelector(".fc-scrollgrid-shrink-frame"),t=n.querySelector(".fc-scrollgrid-shrink-cushion");if(!e)throw new Error("needs fc-scrollgrid-shrink-frame className");if(!t)throw new Error("needs fc-scrollgrid-shrink-cushion className");return n.getBoundingClientRect().width-e.getBoundingClientRect().width+t.getBoundingClientRect().width}var IT=["years","months","days","milliseconds"],S1=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function ht(n,e){return typeof n=="string"?T1(n):typeof n=="object"&&n?kT(n):typeof n=="number"?kT({[e||"milliseconds"]:n}):null}function T1(n){let e=S1.exec(n);if(e){let t=e[1]?-1:1;return{years:0,months:0,days:t*(e[2]?parseInt(e[2],10):0),milliseconds:t*((e[3]?parseInt(e[3],10):0)*60*60*1e3+(e[4]?parseInt(e[4],10):0)*60*1e3+(e[5]?parseInt(e[5],10):0)*1e3+(e[6]?parseInt(e[6],10):0))}}return null}function kT(n){let e={years:n.years||n.year||0,months:n.months||n.month||0,days:n.days||n.day||0,milliseconds:(n.hours||n.hour||0)*60*60*1e3+(n.minutes||n.minute||0)*60*1e3+(n.seconds||n.second||0)*1e3+(n.milliseconds||n.millisecond||n.ms||0)},t=n.weeks||n.week;return t&&(e.days+=t*7,e.specifiedWeeks=!0),e}function C1(n,e){return n.years===e.years&&n.months===e.months&&n.days===e.days&&n.milliseconds===e.milliseconds}function Nl(n,e){return{years:n.years+e.years,months:n.months+e.months,days:n.days+e.days,milliseconds:n.milliseconds+e.milliseconds}}function JT(n,e){return{years:n.years-e.years,months:n.months-e.months,days:n.days-e.days,milliseconds:n.milliseconds-e.milliseconds}}function lv(n,e){return{years:n.years*e,months:n.months*e,days:n.days*e,milliseconds:n.milliseconds*e}}function A1(n){return zo(n)/365}function D1(n){return zo(n)/30}function zo(n){return Un(n)/864e5}function Un(n){return n.years*(365*864e5)+n.months*(30*864e5)+n.days*864e5+n.milliseconds}function Pl(n,e){let t=null;for(let r=0;r<IT.length;r+=1){let i=IT[r];if(e[i]){let s=n[i]/e[i];if(!gl(s)||t!==null&&t!==s)return null;t=s}else if(n[i])return null}return t}function ml(n){let e=n.milliseconds;if(e){if(e%1e3!==0)return{unit:"millisecond",value:e};if(e%(1e3*60)!==0)return{unit:"second",value:e/1e3};if(e%(1e3*60*60)!==0)return{unit:"minute",value:e/(1e3*60)};if(e)return{unit:"hour",value:e/(1e3*60*60)}}return n.days?n.specifiedWeeks&&n.days%7===0?{unit:"week",value:n.days/7}:{unit:"day",value:n.days}:n.months?{unit:"month",value:n.months}:n.years?{unit:"year",value:n.years}:{unit:"millisecond",value:0}}var{hasOwnProperty:Ld}=Object.prototype;function Yd(n,e){let t={};if(e){for(let r in e)if(e[r]===Ns){let i=[];for(let s=n.length-1;s>=0;s-=1){let o=n[s][r];if(typeof o=="object"&&o)i.unshift(o);else if(o!==void 0){t[r]=o;break}}i.length&&(t[r]=Yd(i))}}for(let r=n.length-1;r>=0;r-=1){let i=n[r];for(let s in i)s in t||(t[s]=i[s])}return t}function ai(n,e){let t={};for(let r in n)e(n[r],r)&&(t[r]=n[r]);return t}function ar(n,e){let t={};for(let r in n)t[r]=e(n[r],r);return t}function cv(n){let e={};for(let t of n)e[t]=!0;return e}function Gd(n){let e=[];for(let t in n)e.push(n[t]);return e}function Yn(n,e){if(n===e)return!0;for(let t in n)if(Ld.call(n,t)&&!(t in e))return!1;for(let t in e)if(Ld.call(e,t)&&n[t]!==e[t])return!1;return!0}var x1=/^on[A-Z]/;function O1(n,e){let t=zm(n,e);for(let r of t)if(!x1.test(r))return!1;return!0}function zm(n,e){let t=[];for(let r in n)Ld.call(n,r)&&(r in e||t.push(r));for(let r in e)Ld.call(e,r)&&n[r]!==e[r]&&t.push(r);return t}function Nd(n,e,t={}){if(n===e)return!0;for(let r in e)if(!(r in n&&I1(n[r],e[r],t[r])))return!1;for(let r in n)if(!(r in e))return!1;return!0}function I1(n,e,t){return n===e||t===!0?!0:t?t(n,e):!1}function eC(n,e=0,t,r=1){let i=[];t==null&&(t=Object.keys(n).length);for(let s=e;s<t;s+=r){let o=n[s];o!==void 0&&i.push(o)}return i}function Pr(n,e,t){if(n===e)return!0;let r=n.length,i;if(r!==e.length)return!1;for(i=0;i<r;i+=1)if(!(t?t(n[i],e[i]):n[i]===e[i]))return!1;return!0}var k1=["sun","mon","tue","wed","thu","fri","sat"];function Kd(n,e){let t=Hi(n);return t[2]+=e*7,Mn(t)}function Ut(n,e){let t=Hi(n);return t[2]+=e,Mn(t)}function Rr(n,e){let t=Hi(n);return t[6]+=e,Mn(t)}function uv(n,e){return Lr(n,e)/7}function Lr(n,e){return(e.valueOf()-n.valueOf())/(1e3*60*60*24)}function R1(n,e){return(e.valueOf()-n.valueOf())/(1e3*60*60)}function M1(n,e){return(e.valueOf()-n.valueOf())/(1e3*60)}function N1(n,e){return(e.valueOf()-n.valueOf())/1e3}function tC(n,e){let t=St(n),r=St(e);return{years:0,months:0,days:Math.round(Lr(t,r)),milliseconds:e.valueOf()-r.valueOf()-(n.valueOf()-t.valueOf())}}function nC(n,e){let t=Wo(n,e);return t!==null&&t%7===0?t/7:null}function Wo(n,e){return qi(n)===qi(e)?Math.round(Lr(n,e)):null}function St(n){return Mn([n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()])}function P1(n){return Mn([n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours()])}function L1(n){return Mn([n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes()])}function F1(n){return Mn([n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds()])}function B1(n,e,t){let r=n.getUTCFullYear(),i=Pm(n,r,e,t);if(i<1)return Pm(n,r-1,e,t);let s=Pm(n,r+1,e,t);return s>=1?Math.min(i,s):i}function Pm(n,e,t,r){let i=Mn([e,0,1+j1(e,t,r)]),s=St(n),o=Math.round(Lr(i,s));return Math.floor(o/7)+1}function j1(n,e,t){let r=7+e-t;return-((7+Mn([n,0,r]).getUTCDay()-e)%7)+r-1}function RT(n){return[n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()]}function MT(n){return new Date(n[0],n[1]||0,n[2]==null?1:n[2],n[3]||0,n[4]||0,n[5]||0)}function Hi(n){return[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds(),n.getUTCMilliseconds()]}function Mn(n){return n.length===1&&(n=n.concat([0])),new Date(Date.UTC(...n))}function dv(n){return!isNaN(n.valueOf())}function qi(n){return n.getUTCHours()*1e3*60*60+n.getUTCMinutes()*1e3*60+n.getUTCSeconds()*1e3+n.getUTCMilliseconds()}function Qd(n,e,t=!1){let r=n.toISOString();return r=r.replace(".000",""),t&&(r=r.replace("T00:00:00Z","")),r.length>10&&(e==null?r=r.replace("Z",""):e!==0&&(r=r.replace("Z",pv(e,!0)))),r}function Ui(n){return n.toISOString().replace(/T.*$/,"")}function fv(n){return n.toISOString().match(/^\d{4}-\d{2}/)[0]}function hv(n){return Ps(n.getUTCHours(),2)+":"+Ps(n.getUTCMinutes(),2)+":"+Ps(n.getUTCSeconds(),2)}function pv(n,e=!1){let t=n<0?"-":"+",r=Math.abs(n),i=Math.floor(r/60),s=Math.round(r%60);return e?`${t+Ps(i,2)}:${Ps(s,2)}`:`GMT${t}${i}${s?`:${Ps(s,2)}`:""}`}function ze(n,e,t){let r,i;return function(...s){if(!r)i=n.apply(this,s);else if(!Pr(r,s)){t&&t(i);let o=n.apply(this,s);(!e||!e(o,i))&&(i=o)}return r=s,i}}function Ko(n,e,t){let r,i;return s=>{if(!r)i=n.call(this,s);else if(!Yn(r,s)){t&&t(i);let o=n.call(this,s);(!e||!e(o,i))&&(i=o)}return r=s,i}}var NT={week:3,separator:0,omitZeroMinute:0,meridiem:0,omitCommas:0},Fd={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},Od=/\s*([ap])\.?m\.?/i,H1=/,/g,q1=/\s+/g,V1=/\u200e/g,$1=/UTC|GMT/,Wm=class{constructor(e){let t={},r={},i=0;for(let s in e)s in NT?(r[s]=e[s],i=Math.max(NT[s],i)):(t[s]=e[s],s in Fd&&(i=Math.max(Fd[s],i)));this.standardDateProps=t,this.extendedSettings=r,this.severity=i,this.buildFormattingFunc=ze(PT)}format(e,t){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,t)(e)}formatRange(e,t,r,i){let{standardDateProps:s,extendedSettings:o}=this,a=K1(e.marker,t.marker,r.calendarSystem);if(!a)return this.format(e,r);let c=a;c>1&&(s.year==="numeric"||s.year==="2-digit")&&(s.month==="numeric"||s.month==="2-digit")&&(s.day==="numeric"||s.day==="2-digit")&&(c=1);let u=this.format(e,r),f=this.format(t,r);if(u===f)return u;let p=Q1(s,c),h=PT(p,o,r),y=h(e),_=h(t),w=X1(u,y,f,_),E=o.separator||i||r.defaultSeparator||"";return w?w.before+y+E+_+w.after:u+E+f}getLargestUnit(){switch(this.severity){case 7:case 6:case 5:return"year";case 4:return"month";case 3:return"week";case 2:return"day";default:return"time"}}};function PT(n,e,t){let r=Object.keys(n).length;return r===1&&n.timeZoneName==="short"?i=>pv(i.timeZoneOffset):r===0&&e.week?i=>G1(t.computeWeekNumber(i.marker),t.weekText,t.weekTextLong,t.locale,e.week):z1(n,e,t)}function z1(n,e,t){n=Object.assign({},n),e=Object.assign({},e),W1(n,e),n.timeZone="UTC";let r=new Intl.DateTimeFormat(t.locale.codes,n),i;if(e.omitZeroMinute){let s=Object.assign({},n);delete s.minute,i=new Intl.DateTimeFormat(t.locale.codes,s)}return s=>{let{marker:o}=s,a;i&&!o.getUTCMinutes()?a=i:a=r;let c=a.format(o);return U1(c,s,n,e,t)}}function W1(n,e){n.timeZoneName&&(n.hour||(n.hour="2-digit"),n.minute||(n.minute="2-digit")),n.timeZoneName==="long"&&(n.timeZoneName="short"),e.omitZeroMinute&&(n.second||n.millisecond)&&delete e.omitZeroMinute}function U1(n,e,t,r,i){return n=n.replace(V1,""),t.timeZoneName==="short"&&(n=Y1(n,i.timeZone==="UTC"||e.timeZoneOffset==null?"UTC":pv(e.timeZoneOffset))),r.omitCommas&&(n=n.replace(H1,"").trim()),r.omitZeroMinute&&(n=n.replace(":00","")),r.meridiem===!1?n=n.replace(Od,"").trim():r.meridiem==="narrow"?n=n.replace(Od,(s,o)=>o.toLocaleLowerCase()):r.meridiem==="short"?n=n.replace(Od,(s,o)=>`${o.toLocaleLowerCase()}m`):r.meridiem==="lowercase"&&(n=n.replace(Od,s=>s.toLocaleLowerCase())),n=n.replace(q1," "),n=n.trim(),n}function Y1(n,e){let t=!1;return n=n.replace($1,()=>(t=!0,e)),t||(n+=` ${e}`),n}function G1(n,e,t,r,i){let s=[];return i==="long"?s.push(t):(i==="short"||i==="narrow")&&s.push(e),(i==="long"||i==="short")&&s.push(" "),s.push(r.simpleNumberFormat.format(n)),r.options.direction==="rtl"&&s.reverse(),s.join("")}function K1(n,e,t){return t.getMarkerYear(n)!==t.getMarkerYear(e)?5:t.getMarkerMonth(n)!==t.getMarkerMonth(e)?4:t.getMarkerDay(n)!==t.getMarkerDay(e)?2:qi(n)!==qi(e)?1:0}function Q1(n,e){let t={};for(let r in n)(!(r in Fd)||Fd[r]<=e)&&(t[r]=n[r]);return t}function X1(n,e,t,r){let i=0;for(;i<n.length;){let s=n.indexOf(e,i);if(s===-1)break;let o=n.substr(0,s);i=s+e.length;let a=n.substr(i),c=0;for(;c<t.length;){let u=t.indexOf(r,c);if(u===-1)break;let f=t.substr(0,u);c=u+r.length;let p=t.substr(c);if(o===f&&a===p)return{before:o,after:a}}}return null}function LT(n,e){let t=e.markerToArray(n.marker);return{marker:n.marker,timeZoneOffset:n.timeZoneOffset,array:t,year:t[0],month:t[1],day:t[2],hour:t[3],minute:t[4],second:t[5],millisecond:t[6]}}function Bd(n,e,t,r){let i=LT(n,t.calendarSystem),s=e?LT(e,t.calendarSystem):null;return{date:i,start:i,end:s,timeZone:t.timeZone,localeCodes:t.locale.codes,defaultSeparator:r||t.defaultSeparator}}var Um=class{constructor(e){this.cmdStr=e}format(e,t,r){return t.cmdFormatter(this.cmdStr,Bd(e,null,t,r))}formatRange(e,t,r,i){return r.cmdFormatter(this.cmdStr,Bd(e,t,r,i))}},Ym=class{constructor(e){this.func=e}format(e,t,r){return this.func(Bd(e,null,t,r))}formatRange(e,t,r,i){return this.func(Bd(e,t,r,i))}};function Ct(n){return typeof n=="object"&&n?new Wm(n):typeof n=="string"?new Um(n):typeof n=="function"?new Ym(n):null}var gv={navLinkDayClick:oe,navLinkWeekClick:oe,duration:ht,bootstrapFontAwesome:oe,buttonIcons:oe,customButtons:oe,defaultAllDayEventDuration:ht,defaultTimedEventDuration:ht,nextDayThreshold:ht,scrollTime:ht,scrollTimeReset:Boolean,slotMinTime:ht,slotMaxTime:ht,dayPopoverFormat:Ct,slotDuration:ht,snapDuration:ht,headerToolbar:oe,footerToolbar:oe,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:Ct,dayHeaderClassNames:oe,dayHeaderContent:oe,dayHeaderDidMount:oe,dayHeaderWillUnmount:oe,dayCellClassNames:oe,dayCellContent:oe,dayCellDidMount:oe,dayCellWillUnmount:oe,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:oe,weekNumbers:Boolean,weekNumberClassNames:oe,weekNumberContent:oe,weekNumberDidMount:oe,weekNumberWillUnmount:oe,editable:Boolean,viewClassNames:oe,viewDidMount:oe,viewWillUnmount:oe,nowIndicator:Boolean,nowIndicatorClassNames:oe,nowIndicatorContent:oe,nowIndicatorDidMount:oe,nowIndicatorWillUnmount:oe,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:oe,locale:oe,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:oe,eventOrder:QT,eventOrderStrict:Boolean,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:oe,contentHeight:oe,direction:String,weekNumberFormat:Ct,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,weekTextLong:String,progressiveEventRendering:Boolean,businessHours:oe,initialDate:oe,now:oe,eventDataTransform:oe,stickyHeaderDates:oe,stickyFooterScrollbar:oe,viewHeight:oe,defaultAllDay:Boolean,eventSourceFailure:oe,eventSourceSuccess:oe,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:oe,eventConstraint:oe,eventAllow:oe,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:oe,eventContent:oe,eventDidMount:oe,eventWillUnmount:oe,selectConstraint:oe,selectOverlap:oe,selectAllow:oe,droppable:Boolean,unselectCancel:String,slotLabelFormat:oe,slotLaneClassNames:oe,slotLaneContent:oe,slotLaneDidMount:oe,slotLaneWillUnmount:oe,slotLabelClassNames:oe,slotLabelContent:oe,slotLabelDidMount:oe,slotLabelWillUnmount:oe,dayMaxEvents:oe,dayMaxEventRows:oe,dayMinWidth:Number,slotLabelInterval:ht,allDayText:String,allDayClassNames:oe,allDayContent:oe,allDayDidMount:oe,allDayWillUnmount:oe,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:Ct,rerenderDelay:Number,moreLinkText:oe,moreLinkHint:oe,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMaxStack:Number,eventMinHeight:Number,eventMinWidth:Number,eventShortHeight:Number,slotEventOverlap:Boolean,plugins:oe,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:ht,hiddenDays:oe,fixedWeekCount:Boolean,validRange:oe,visibleRange:oe,titleFormat:oe,eventInteractive:Boolean,noEventsText:String,viewHint:oe,navLinkHint:oe,closeHint:String,timeHint:String,eventHint:String,moreLinkClick:oe,moreLinkClassNames:oe,moreLinkContent:oe,moreLinkDidMount:oe,moreLinkWillUnmount:oe,monthStartFormat:Ct,handleCustomRendering:oe,customRenderingMetaMap:oe,customRenderingReplacesEl:Boolean},Yi={eventDisplay:"auto",defaultRangeSeparator:" - ",titleRangeSeparator:" \u2013 ",defaultTimedEventDuration:"01:00:00",defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:"00:00:00",dayHeaders:!0,initialView:"",aspectRatio:1.35,headerToolbar:{start:"title",center:"",end:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberCalculation:"local",editable:!1,nowIndicator:!1,scrollTime:"06:00:00",scrollTimeReset:!0,slotMinTime:"00:00:00",slotMaxTime:"24:00:00",showNonCurrentDates:!0,lazyFetching:!0,startParam:"start",endParam:"end",timeZoneParam:"timeZone",timeZone:"local",locales:[],locale:"",themeSystem:"standard",dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:"*",eventOrder:"start,-duration,allDay,title",dayPopoverFormat:{month:"long",day:"numeric",year:"numeric"},handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3,eventDragMinDistance:5,expandRows:!1,navLinks:!1,selectable:!1,eventMinHeight:15,eventMinWidth:30,eventShortHeight:30,monthStartFormat:{month:"long",day:"numeric"}},mv={datesSet:oe,eventsSet:oe,eventAdd:oe,eventChange:oe,eventRemove:oe,windowResize:oe,eventClick:oe,eventMouseEnter:oe,eventMouseLeave:oe,select:oe,unselect:oe,loading:oe,_unmount:oe,_beforeprint:oe,_afterprint:oe,_noEventDrop:oe,_noEventResize:oe,_resize:oe,_scrollRequest:oe},vv={buttonText:oe,buttonHints:oe,views:oe,plugins:oe,initialEvents:oe,events:oe,eventSources:oe},Gi={headerToolbar:Ns,footerToolbar:Ns,buttonText:Ns,buttonHints:Ns,buttonIcons:Ns,dateIncrement:Ns,plugins:Id,events:Id,eventSources:Id,resources:Id};function Ns(n,e){return typeof n=="object"&&typeof e=="object"&&n&&e?Yn(n,e):n===e}function Id(n,e){return Array.isArray(n)&&Array.isArray(e)?Pr(n,e):n===e}var rC={type:String,component:oe,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:oe,usesMinMaxTime:Boolean,classNames:oe,content:oe,didMount:oe,willUnmount:oe};function Xd(n){return Yd(n,Gi)}function Zd(n,e){let t={},r={};for(let i in e)i in n&&(t[i]=e[i](n[i]));for(let i in n)i in e||(r[i]=n[i]);return{refined:t,extra:r}}function oe(n){return n}function Ll(n,e,t,r){return{instanceId:di(),defId:n,range:e,forcedStartTzo:t??null,forcedEndTzo:r??null}}function Z1(n,e,t,r){for(let i=0;i<r.length;i+=1){let s=r[i].parse(n,t);if(s){let{allDay:o}=n;return o==null&&(o=e,o==null&&(o=s.allDayGuess,o==null&&(o=!1))),{allDay:o,duration:s.duration,typeData:s.typeData,typeId:i}}}return null}function Ls(n,e,t){let{dateEnv:r,pluginHooks:i,options:s}=t,{defs:o,instances:a}=n;a=ai(a,c=>!o[c.defId].recurringDef);for(let c in o){let u=o[c];if(u.recurringDef){let{duration:f}=u.recurringDef;f||(f=u.allDay?s.defaultAllDayEventDuration:s.defaultTimedEventDuration);let p=J1(u,f,e,r,i.recurringTypes);for(let h of p){let y=Ll(c,{start:h,end:r.add(h,f)});a[y.instanceId]=y}}}return{defs:o,instances:a}}function J1(n,e,t,r,i){let o=i[n.recurringDef.typeId].expand(n.recurringDef.typeData,{start:r.subtract(t.start,e),end:t.end},r);return n.allDay&&(o=o.map(St)),o}function vl(n,e,t,r,i,s){let o=wn(),a=bv(t);for(let c of n){let u=sC(c,e,t,r,a,i,s);u&&yl(u,o)}return o}function yl(n,e=wn()){return e.defs[n.def.defId]=n.def,n.instance&&(e.instances[n.instance.instanceId]=n.instance),e}function Fl(n,e){let t=n.instances[e];if(t){let r=n.defs[t.defId],i=ef(n,s=>eP(r,s));return i.defs[r.defId]=r,i.instances[t.instanceId]=t,i}return wn()}function eP(n,e){return Boolean(n.groupId&&n.groupId===e.groupId)}function wn(){return{defs:{},instances:{}}}function Jd(n,e){return{defs:Object.assign(Object.assign({},n.defs),e.defs),instances:Object.assign(Object.assign({},n.instances),e.instances)}}function ef(n,e){let t=ai(n.defs,e),r=ai(n.instances,i=>t[i.defId]);return{defs:t,instances:r}}function tP(n,e){let{defs:t,instances:r}=n,i={},s={};for(let o in t)e.defs[o]||(i[o]=t[o]);for(let o in r)!e.instances[o]&&i[r[o].defId]&&(s[o]=r[o]);return{defs:i,instances:s}}function nP(n,e){return Array.isArray(n)?vl(n,null,e,!0):typeof n=="object"&&n?vl([n],null,e,!0):n!=null?String(n):null}function Gm(n){return Array.isArray(n)?n:typeof n=="string"?n.split(/\s+/):[]}var jd={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:oe,overlap:oe,allow:oe,className:Gm,classNames:Gm,color:String,backgroundColor:String,borderColor:String,textColor:String},rP={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]};function Qo(n,e){let t=nP(n.constraint,e);return{display:n.display||null,startEditable:n.startEditable!=null?n.startEditable:n.editable,durationEditable:n.durationEditable!=null?n.durationEditable:n.editable,constraints:t!=null?[t]:[],overlap:n.overlap!=null?n.overlap:null,allows:n.allow!=null?[n.allow]:[],backgroundColor:n.backgroundColor||n.color||"",borderColor:n.borderColor||n.color||"",textColor:n.textColor||"",classNames:(n.className||[]).concat(n.classNames||[])}}function yv(n){return n.reduce(iP,rP)}function iP(n,e){return{display:e.display!=null?e.display:n.display,startEditable:e.startEditable!=null?e.startEditable:n.startEditable,durationEditable:e.durationEditable!=null?e.durationEditable:n.durationEditable,constraints:n.constraints.concat(e.constraints),overlap:typeof e.overlap=="boolean"?e.overlap:n.overlap,allows:n.allows.concat(e.allows),backgroundColor:e.backgroundColor||n.backgroundColor,borderColor:e.borderColor||n.borderColor,textColor:e.textColor||n.textColor,classNames:n.classNames.concat(e.classNames)}}var Pd={id:String,groupId:String,title:String,url:String,interactive:Boolean},iC={start:oe,end:oe,date:oe,allDay:Boolean},sP=Object.assign(Object.assign(Object.assign({},Pd),iC),{extendedProps:oe});function sC(n,e,t,r,i=bv(t),s,o){let{refined:a,extra:c}=tf(n,t,i),u=aP(e,t),f=Z1(a,u,t.dateEnv,t.pluginHooks.recurringTypes);if(f){let h=bl(a,c,e?e.sourceId:"",f.allDay,Boolean(f.duration),t,s);return h.recurringDef={typeId:f.typeId,typeData:f.typeData,duration:f.duration},{def:h,instance:null}}let p=oP(a,u,t,r);if(p){let h=bl(a,c,e?e.sourceId:"",p.allDay,p.hasEnd,t,s),y=Ll(h.defId,p.range,p.forcedStartTzo,p.forcedEndTzo);return o&&h.publicId&&o[h.publicId]&&(y.instanceId=o[h.publicId]),{def:h,instance:y}}return null}function tf(n,e,t=bv(e)){return Zd(n,t)}function bv(n){return Object.assign(Object.assign(Object.assign({},jd),sP),n.pluginHooks.eventRefiners)}function bl(n,e,t,r,i,s,o){let a={title:n.title||"",groupId:n.groupId||"",publicId:n.id||"",url:n.url||"",recurringDef:null,defId:(o&&n.id?o[n.id]:"")||di(),sourceId:t,allDay:r,hasEnd:i,interactive:n.interactive,ui:Qo(n,s),extendedProps:Object.assign(Object.assign({},n.extendedProps||{}),e)};for(let c of s.pluginHooks.eventDefMemberAdders)Object.assign(a,c(n));return Object.freeze(a.ui.classNames),Object.freeze(a.extendedProps),a}function oP(n,e,t,r){let{allDay:i}=n,s,o=null,a=!1,c,u=null,f=n.start!=null?n.start:n.date;if(s=t.dateEnv.createMarkerMeta(f),s)o=s.marker;else if(!r)return null;return n.end!=null&&(c=t.dateEnv.createMarkerMeta(n.end)),i==null&&(e!=null?i=e:i=(!s||s.isTimeUnspecified)&&(!c||c.isTimeUnspecified)),i&&o&&(o=St(o)),c&&(u=c.marker,i&&(u=St(u)),o&&u<=o&&(u=null)),u?a=!0:r||(a=t.options.forceEventDuration||!1,u=t.dateEnv.add(o,i?t.options.defaultAllDayEventDuration:t.options.defaultTimedEventDuration)),{allDay:i,hasEnd:a,range:{start:o,end:u},forcedStartTzo:s?s.forcedTzo:null,forcedEndTzo:c?c.forcedTzo:null}}function aP(n,e){let t=null;return n&&(t=n.defaultAllDay),t==null&&(t=e.options.defaultAllDay),t}var lP={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function Ev(n,e){return vl(cP(n),null,e)}function cP(n){let e;return n===!0?e=[{}]:Array.isArray(n)?e=n.filter(t=>t.daysOfWeek):typeof n=="object"&&n?e=[n]:e=[],e=e.map(t=>Object.assign(Object.assign({},lP),t)),e}function oC(n){let e=Math.floor(Lr(n.start,n.end))||1,t=St(n.start),r=Ut(t,e);return{start:t,end:r}}function nf(n,e=ht(0)){let t=null,r=null;if(n.end){r=St(n.end);let i=n.end.valueOf()-r.valueOf();i&&i>=Un(e)&&(r=Ut(r,1))}return n.start&&(t=St(n.start),r&&r<=t&&(r=Ut(t,1))),{start:t,end:r}}function _v(n){let e=nf(n);return Lr(e.start,e.end)>1}function Vi(n,e,t,r){return r==="year"?ht(t.diffWholeYears(n,e),"year"):r==="month"?ht(t.diffWholeMonths(n,e),"month"):tC(n,e)}function wv(n,e){return n.left>=e.left&&n.left<e.right&&n.top>=e.top&&n.top<e.bottom}function rf(n,e){let t={left:Math.max(n.left,e.left),right:Math.min(n.right,e.right),top:Math.max(n.top,e.top),bottom:Math.min(n.bottom,e.bottom)};return t.left<t.right&&t.top<t.bottom?t:!1}function Sv(n,e){return{left:Math.min(Math.max(n.left,e.left),e.right),top:Math.min(Math.max(n.top,e.top),e.bottom)}}function Tv(n){return{left:(n.left+n.right)/2,top:(n.top+n.bottom)/2}}function Cv(n,e){return{left:n.left-e.left,top:n.top-e.top}}var Lm;function Av(){return Lm==null&&(Lm=uP()),Lm}function uP(){if(typeof document>"u")return!0;let n=document.createElement("div");n.style.position="absolute",n.style.top="0px",n.style.left="0px",n.innerHTML="<table><tr><td><div></div></td></tr></table>",n.querySelector("table").style.height="100px",n.querySelector("div").style.height="100%",document.body.appendChild(n);let t=n.querySelector("div").offsetHeight>0;return document.body.removeChild(n),t}var Fm=wn(),El=class{constructor(){this.getKeysForEventDefs=ze(this._getKeysForEventDefs),this.splitDateSelection=ze(this._splitDateSpan),this.splitEventStore=ze(this._splitEventStore),this.splitIndividualUi=ze(this._splitIndividualUi),this.splitEventDrag=ze(this._splitInteraction),this.splitEventResize=ze(this._splitInteraction),this.eventUiBuilders={}}splitProps(e){let t=this.getKeyInfo(e),r=this.getKeysForEventDefs(e.eventStore),i=this.splitDateSelection(e.dateSelection),s=this.splitIndividualUi(e.eventUiBases,r),o=this.splitEventStore(e.eventStore,r),a=this.splitEventDrag(e.eventDrag),c=this.splitEventResize(e.eventResize),u={};this.eventUiBuilders=ar(t,(f,p)=>this.eventUiBuilders[p]||ze(dP));for(let f in t){let p=t[f],h=o[f]||Fm,y=this.eventUiBuilders[f];u[f]={businessHours:p.businessHours||e.businessHours,dateSelection:i[f]||null,eventStore:h,eventUiBases:y(e.eventUiBases[""],p.ui,s[f]),eventSelection:h.instances[e.eventSelection]?e.eventSelection:"",eventDrag:a[f]||null,eventResize:c[f]||null}}return u}_splitDateSpan(e){let t={};if(e){let r=this.getKeysForDateSpan(e);for(let i of r)t[i]=e}return t}_getKeysForEventDefs(e){return ar(e.defs,t=>this.getKeysForEventDef(t))}_splitEventStore(e,t){let{defs:r,instances:i}=e,s={};for(let o in r)for(let a of t[o])s[a]||(s[a]=wn()),s[a].defs[o]=r[o];for(let o in i){let a=i[o];for(let c of t[a.defId])s[c]&&(s[c].instances[o]=a)}return s}_splitIndividualUi(e,t){let r={};for(let i in e)if(i)for(let s of t[i])r[s]||(r[s]={}),r[s][i]=e[i];return r}_splitInteraction(e){let t={};if(e){let r=this._splitEventStore(e.affectedEvents,this._getKeysForEventDefs(e.affectedEvents)),i=this._getKeysForEventDefs(e.mutatedEvents),s=this._splitEventStore(e.mutatedEvents,i),o=a=>{t[a]||(t[a]={affectedEvents:r[a]||Fm,mutatedEvents:s[a]||Fm,isEvent:e.isEvent})};for(let a in r)o(a);for(let a in s)o(a)}return t}};function dP(n,e,t){let r=[];n&&r.push(n),e&&r.push(e);let i={"":yv(r)};return t&&Object.assign(i,t),i}function fP(n,e){let t=null,r=null;return n.start&&(t=e.createMarker(n.start)),n.end&&(r=e.createMarker(n.end)),!t&&!r||t&&r&&r<t?null:{start:t,end:r}}function FT(n,e){let t=[],{start:r}=e,i,s;for(n.sort(hP),i=0;i<n.length;i+=1)s=n[i],s.start>r&&t.push({start:r,end:s.start}),s.end>r&&(r=s.end);return r<e.end&&t.push({start:r,end:e.end}),t}function hP(n,e){return n.start.valueOf()-e.start.valueOf()}function Gn(n,e){let{start:t,end:r}=n,i=null;return e.start!==null&&(t===null?t=e.start:t=new Date(Math.max(t.valueOf(),e.start.valueOf()))),e.end!=null&&(r===null?r=e.end:r=new Date(Math.min(r.valueOf(),e.end.valueOf()))),(t===null||r===null||t<r)&&(i={start:t,end:r}),i}function aC(n,e){return(n.start===null?null:n.start.valueOf())===(e.start===null?null:e.start.valueOf())&&(n.end===null?null:n.end.valueOf())===(e.end===null?null:e.end.valueOf())}function sf(n,e){return(n.end===null||e.start===null||n.end>e.start)&&(n.start===null||e.end===null||n.start<e.end)}function Xo(n,e){return(n.start===null||e.start!==null&&e.start>=n.start)&&(n.end===null||e.end!==null&&e.end<=n.end)}function or(n,e){return(n.start===null||e>=n.start)&&(n.end===null||e<n.end)}function pP(n,e){return e.start!=null&&n<e.start?e.start:e.end!=null&&n>=e.end?new Date(e.end.valueOf()-1):n}function Bl(n,e,t,r){return{dow:n.getUTCDay(),isDisabled:Boolean(r&&!or(r.activeRange,n)),isOther:Boolean(r&&!or(r.currentRange,n)),isToday:Boolean(e&&or(e,n)),isPast:Boolean(t?n<t:e?n<e.start:!1),isFuture:Boolean(t?n>t:e?n>=e.end:!1)}}function Zo(n,e){let t=["fc-day",`fc-day-${k1[n.dow]}`];return n.isDisabled?t.push("fc-day-disabled"):(n.isToday&&(t.push("fc-day-today"),t.push(e.getClass("today"))),n.isPast&&t.push("fc-day-past"),n.isFuture&&t.push("fc-day-future"),n.isOther&&t.push("fc-day-other")),t}var gP=Ct({year:"numeric",month:"long",day:"numeric"}),mP=Ct({week:"long"});function Fr(n,e,t="day",r=!0){let{dateEnv:i,options:s,calendarApi:o}=n,a=i.format(e,t==="week"?mP:gP);if(s.navLinks){let c=i.toDate(e),u=f=>{let p=t==="day"?s.navLinkDayClick:t==="week"?s.navLinkWeekClick:null;typeof p=="function"?p.call(o,i.toDate(e),f):(typeof p=="string"&&(t=p),o.zoomTo(e,t))};return Object.assign({title:Go(s.navLinkHint,[a,c],a),"data-navlink":""},r?GT(u):{onClick:u})}return{"aria-label":a}}var Bm=null;function lC(){return Bm===null&&(Bm=vP()),Bm}function vP(){let n=document.createElement("div");Gs(n,{position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}),n.innerHTML="<div></div>",document.body.appendChild(n);let t=n.firstChild.getBoundingClientRect().left>n.getBoundingClientRect().left;return Il(n),t}var jm;function cC(){return jm||(jm=yP()),jm}function yP(){let n=document.createElement("div");n.style.overflow="scroll",n.style.position="absolute",n.style.top="-9999px",n.style.left="-9999px",document.body.appendChild(n);let e=uC(n);return document.body.removeChild(n),e}function uC(n){return{x:n.offsetHeight-n.clientHeight,y:n.offsetWidth-n.clientWidth}}function dC(n,e=!1){let t=window.getComputedStyle(n),r=parseInt(t.borderLeftWidth,10)||0,i=parseInt(t.borderRightWidth,10)||0,s=parseInt(t.borderTopWidth,10)||0,o=parseInt(t.borderBottomWidth,10)||0,a=uC(n),c=a.y-r-i,u=a.x-s-o,f={borderLeft:r,borderRight:i,borderTop:s,borderBottom:o,scrollbarBottom:u,scrollbarLeft:0,scrollbarRight:0};return lC()&&t.direction==="rtl"?f.scrollbarLeft=c:f.scrollbarRight=c,e&&(f.paddingLeft=parseInt(t.paddingLeft,10)||0,f.paddingRight=parseInt(t.paddingRight,10)||0,f.paddingTop=parseInt(t.paddingTop,10)||0,f.paddingBottom=parseInt(t.paddingBottom,10)||0),f}function Dv(n,e=!1,t){let r=t?n.getBoundingClientRect():jl(n),i=dC(n,e),s={left:r.left+i.borderLeft+i.scrollbarLeft,right:r.right-i.borderRight-i.scrollbarRight,top:r.top+i.borderTop,bottom:r.bottom-i.borderBottom-i.scrollbarBottom};return e&&(s.left+=i.paddingLeft,s.right-=i.paddingRight,s.top+=i.paddingTop,s.bottom-=i.paddingBottom),s}function jl(n){let e=n.getBoundingClientRect();return{left:e.left+window.pageXOffset,top:e.top+window.pageYOffset,right:e.right+window.pageXOffset,bottom:e.bottom+window.pageYOffset}}function bP(n){let e=of(n),t=n.getBoundingClientRect();for(let r of e){let i=rf(t,r.getBoundingClientRect());if(i)t=i;else return null}return t}function of(n){let e=[];for(;n instanceof HTMLElement;){let t=window.getComputedStyle(n);if(t.position==="fixed")break;/(auto|scroll)/.test(t.overflow+t.overflowY+t.overflowX)&&e.push(n),n=n.parentNode}return e}function xv(n,e,t){let r=!1,i=function(a){r||(r=!0,e(a))},s=function(a){r||(r=!0,t(a))},o=n(i,s);o&&typeof o.then=="function"&&o.then(i,s)}var li=class{constructor(){this.handlers={},this.thisContext=null}setThisContext(e){this.thisContext=e}setOptions(e){this.options=e}on(e,t){EP(this.handlers,e,t)}off(e,t){_P(this.handlers,e,t)}trigger(e,...t){let r=this.handlers[e]||[],i=this.options&&this.options[e],s=[].concat(i||[],r);for(let o of s)o.apply(this.thisContext,t)}hasHandlers(e){return Boolean(this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e])}};function EP(n,e,t){(n[e]||(n[e]=[])).push(t)}function _P(n,e,t){t?n[e]&&(n[e]=n[e].filter(r=>r!==t)):delete n[e]}var _r=class{constructor(e,t,r,i){this.els=t;let s=this.originClientRect=e.getBoundingClientRect();r&&this.buildElHorizontals(s.left),i&&this.buildElVerticals(s.top)}buildElHorizontals(e){let t=[],r=[];for(let i of this.els){let s=i.getBoundingClientRect();t.push(s.left-e),r.push(s.right-e)}this.lefts=t,this.rights=r}buildElVerticals(e){let t=[],r=[];for(let i of this.els){let s=i.getBoundingClientRect();t.push(s.top-e),r.push(s.bottom-e)}this.tops=t,this.bottoms=r}leftToIndex(e){let{lefts:t,rights:r}=this,i=t.length,s;for(s=0;s<i;s+=1)if(e>=t[s]&&e<r[s])return s}topToIndex(e){let{tops:t,bottoms:r}=this,i=t.length,s;for(s=0;s<i;s+=1)if(e>=t[s]&&e<r[s])return s}getWidth(e){return this.rights[e]-this.lefts[e]}getHeight(e){return this.bottoms[e]-this.tops[e]}similarTo(e){return kd(this.tops||[],e.tops||[])&&kd(this.bottoms||[],e.bottoms||[])&&kd(this.lefts||[],e.lefts||[])&&kd(this.rights||[],e.rights||[])}};function kd(n,e){let t=n.length;if(t!==e.length)return!1;for(let r=0;r<t;r++)if(Math.round(n[r])!==Math.round(e[r]))return!1;return!0}var Fs=class{getMaxScrollTop(){return this.getScrollHeight()-this.getClientHeight()}getMaxScrollLeft(){return this.getScrollWidth()-this.getClientWidth()}canScrollVertically(){return this.getMaxScrollTop()>0}canScrollHorizontally(){return this.getMaxScrollLeft()>0}canScrollUp(){return this.getScrollTop()>0}canScrollDown(){return this.getScrollTop()<this.getMaxScrollTop()}canScrollLeft(){return this.getScrollLeft()>0}canScrollRight(){return this.getScrollLeft()<this.getMaxScrollLeft()}},_l=class extends Fs{constructor(e){super(),this.el=e}getScrollTop(){return this.el.scrollTop}getScrollLeft(){return this.el.scrollLeft}setScrollTop(e){this.el.scrollTop=e}setScrollLeft(e){this.el.scrollLeft=e}getScrollWidth(){return this.el.scrollWidth}getScrollHeight(){return this.el.scrollHeight}getClientHeight(){return this.el.clientHeight}getClientWidth(){return this.el.clientWidth}},wl=class extends Fs{getScrollTop(){return window.pageYOffset}getScrollLeft(){return window.pageXOffset}setScrollTop(e){window.scroll(window.pageXOffset,e)}setScrollLeft(e){window.scroll(e,window.pageYOffset)}getScrollWidth(){return document.documentElement.scrollWidth}getScrollHeight(){return document.documentElement.scrollHeight}getClientHeight(){return document.documentElement.clientHeight}getClientWidth(){return document.documentElement.clientWidth}},ci=class{constructor(e){this.iconOverrideOption&&this.setIconOverride(e[this.iconOverrideOption])}setIconOverride(e){let t,r;if(typeof e=="object"&&e){t=Object.assign({},this.iconClasses);for(r in e)t[r]=this.applyIconOverridePrefix(e[r]);this.iconClasses=t}else e===!1&&(this.iconClasses={})}applyIconOverridePrefix(e){let t=this.iconOverridePrefix;return t&&e.indexOf(t)!==0&&(e=t+e),e}getClass(e){return this.classes[e]||""}getIconClass(e,t){let r;return t&&this.rtlIconClasses?r=this.rtlIconClasses[e]||this.iconClasses[e]:r=this.iconClasses[e],r?`${this.baseIconClass} ${r}`:""}getCustomButtonIconClass(e){let t;return this.iconOverrideCustomButtonOption&&(t=e[this.iconOverrideCustomButtonOption],t)?`${this.baseIconClass} ${this.applyIconOverridePrefix(t)}`:""}};ci.prototype.classes={};ci.prototype.iconClasses={};ci.prototype.baseIconClass="";ci.prototype.iconOverridePrefix="";function Ov(n){n();let e=Ue.debounceRendering,t=[];function r(i){t.push(i)}for(Ue.debounceRendering=r,Bi(j(Km,{}),document.createElement("div"));t.length;)t.shift()();Ue.debounceRendering=e}var Km=class extends mn{render(){return j("div",{})}componentDidMount(){this.setState({})}};function fC(n){let e=Ad(n),t=e.Provider;return e.Provider=function(){let r=!this.getChildContext,i=t.apply(this,arguments);if(r){let s=[];this.shouldComponentUpdate=o=>{this.props.value!==o.value&&s.forEach(a=>{a.context=o.value,a.forceUpdate()})},this.sub=o=>{s.push(o);let a=o.componentWillUnmount;o.componentWillUnmount=()=>{s.splice(s.indexOf(o),1),a&&a.call(o)}}}return i},e}var Hd=class{constructor(e,t,r,i){this.execFunc=e,this.emitter=t,this.scrollTime=r,this.scrollTimeReset=i,this.handleScrollRequest=s=>{this.queuedRequest=Object.assign({},this.queuedRequest||{},s),this.drain()},t.on("_scrollRequest",this.handleScrollRequest),this.fireInitialScroll()}detach(){this.emitter.off("_scrollRequest",this.handleScrollRequest)}update(e){e&&this.scrollTimeReset?this.fireInitialScroll():this.drain()}fireInitialScroll(){this.handleScrollRequest({time:this.scrollTime})}drain(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)}},ur=fC({});function hC(n,e,t,r,i,s,o,a,c,u,f,p,h){return{dateEnv:i,options:t,pluginHooks:o,emitter:u,dispatch:a,getCurrentData:c,calendarApi:f,viewSpec:n,viewApi:e,dateProfileGenerator:r,theme:s,isRtl:t.direction==="rtl",addResizeHandler(y){u.on("_resize",y)},removeResizeHandler(y){u.off("_resize",y)},createScrollResponder(y){return new Hd(y,u,ht(t.scrollTime),t.scrollTimeReset)},registerInteractiveComponent:p,unregisterInteractiveComponent:h}}var Mr=class extends mn{shouldComponentUpdate(e,t){return this.debug&&console.log(zm(e,this.props),zm(t,this.state)),!Nd(this.props,e,this.propEquality)||!Nd(this.state,t,this.stateEquality)}safeSetState(e){Nd(this.state,Object.assign(Object.assign({},this.state),e),this.stateEquality)||this.setState(e)}};Mr.addPropsEquality=wP;Mr.addStateEquality=SP;Mr.contextType=ur;Mr.prototype.propEquality={};Mr.prototype.stateEquality={};var pt=class extends Mr{};pt.contextType=ur;function wP(n){let e=Object.create(this.prototype.propEquality);Object.assign(e,n),this.prototype.propEquality=e}function SP(n){let e=Object.create(this.prototype.stateEquality);Object.assign(e,n),this.prototype.stateEquality=e}function dr(n,e){typeof n=="function"?n(e):n&&(n.current=e)}var vn=class extends pt{constructor(){super(...arguments),this.uid=di()}prepareHits(){}queryHit(e,t,r,i){return null}isValidSegDownEl(e){return!this.props.eventDrag&&!this.props.eventResize&&!on(e,".fc-event-mirror")}isValidDateDownEl(e){return!on(e,".fc-event:not(.fc-bg-event)")&&!on(e,".fc-more-link")&&!on(e,"a[data-navlink]")&&!on(e,".fc-popover")}};function pC(n,e){switch(e.type){case"CHANGE_DATE":return e.dateMarker;default:return n}}function gC(n,e){let t=n.initialDate;return t!=null?e.createMarker(t):Jo(n.now,e)}function Jo(n,e){return typeof n=="function"&&(n=n()),n==null?e.createNowMarker():e.createMarker(n)}var Bs=class{constructor(e){this.props=e,this.nowDate=Jo(e.nowInput,e.dateEnv),this.initHiddenDays()}buildPrev(e,t,r){let{dateEnv:i}=this.props,s=i.subtract(i.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(s,-1,r)}buildNext(e,t,r){let{dateEnv:i}=this.props,s=i.add(i.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(s,1,r)}build(e,t,r=!0){let{props:i}=this,s,o,a,c,u,f;return s=this.buildValidRange(),s=this.trimHiddenDays(s),r&&(e=pP(e,s)),o=this.buildCurrentRangeInfo(e,t),a=/^(year|month|week|day)$/.test(o.unit),c=this.buildRenderRange(this.trimHiddenDays(o.range),o.unit,a),c=this.trimHiddenDays(c),u=c,i.showNonCurrentDates||(u=Gn(u,o.range)),u=this.adjustActiveRange(u),u=Gn(u,s),f=sf(o.range,s),or(c,e)||(e=c.start),{currentDate:e,validRange:s,currentRange:o.range,currentRangeUnit:o.unit,isRangeAllDay:a,activeRange:u,renderRange:c,slotMinTime:i.slotMinTime,slotMaxTime:i.slotMaxTime,isValid:f,dateIncrement:this.buildDateIncrement(o.duration)}}buildValidRange(){let e=this.props.validRangeInput,t=typeof e=="function"?e.call(this.props.calendarApi,this.nowDate):e;return this.refineRange(t)||{start:null,end:null}}buildCurrentRangeInfo(e,t){let{props:r}=this,i=null,s=null,o=null,a;return r.duration?(i=r.duration,s=r.durationUnit,o=this.buildRangeFromDuration(e,t,i,s)):(a=this.props.dayCount)?(s="day",o=this.buildRangeFromDayCount(e,t,a)):(o=this.buildCustomVisibleRange(e))?s=r.dateEnv.greatestWholeUnit(o.start,o.end).unit:(i=this.getFallbackDuration(),s=ml(i).unit,o=this.buildRangeFromDuration(e,t,i,s)),{duration:i,unit:s,range:o}}getFallbackDuration(){return ht({day:1})}adjustActiveRange(e){let{dateEnv:t,usesMinMaxTime:r,slotMinTime:i,slotMaxTime:s}=this.props,{start:o,end:a}=e;return r&&(zo(i)<0&&(o=St(o),o=t.add(o,i)),zo(s)>1&&(a=St(a),a=Ut(a,-1),a=t.add(a,s))),{start:o,end:a}}buildRangeFromDuration(e,t,r,i){let{dateEnv:s,dateAlignment:o}=this.props,a,c,u;if(!o){let{dateIncrement:p}=this.props;p&&Un(p)<Un(r)?o=ml(p).unit:o=i}zo(r)<=1&&this.isHiddenDay(a)&&(a=this.skipHiddenDays(a,t),a=St(a));function f(){a=s.startOf(e,o),c=s.add(a,r),u={start:a,end:c}}return f(),this.trimHiddenDays(u)||(e=this.skipHiddenDays(e,t),f()),u}buildRangeFromDayCount(e,t,r){let{dateEnv:i,dateAlignment:s}=this.props,o=0,a=e,c;s&&(a=i.startOf(a,s)),a=St(a),a=this.skipHiddenDays(a,t),c=a;do c=Ut(c,1),this.isHiddenDay(c)||(o+=1);while(o<r);return{start:a,end:c}}buildCustomVisibleRange(e){let{props:t}=this,r=t.visibleRangeInput,i=typeof r=="function"?r.call(t.calendarApi,t.dateEnv.toDate(e)):r,s=this.refineRange(i);return s&&(s.start==null||s.end==null)?null:s}buildRenderRange(e,t,r){return e}buildDateIncrement(e){let{dateIncrement:t}=this.props,r;return t||((r=this.props.dateAlignment)?ht(1,r):e||ht({days:1}))}refineRange(e){if(e){let t=fP(e,this.props.dateEnv);return t&&(t=nf(t)),t}return null}initHiddenDays(){let e=this.props.hiddenDays||[],t=[],r=0,i;for(this.props.weekends===!1&&e.push(0,6),i=0;i<7;i+=1)(t[i]=e.indexOf(i)!==-1)||(r+=1);if(!r)throw new Error("invalid hiddenDays");this.isHiddenDayHash=t}trimHiddenDays(e){let{start:t,end:r}=e;return t&&(t=this.skipHiddenDays(t)),r&&(r=this.skipHiddenDays(r,-1,!0)),t==null||r==null||t<r?{start:t,end:r}:null}isHiddenDay(e){return e instanceof Date&&(e=e.getUTCDay()),this.isHiddenDayHash[e]}skipHiddenDays(e,t=1,r=!1){for(;this.isHiddenDayHash[(e.getUTCDay()+(r?t:0)+7)%7];)e=Ut(e,t);return e}};function af(n,e,t){t.emitter.trigger("select",Object.assign(Object.assign({},Iv(n,t)),{jsEvent:e?e.origEvent:null,view:t.viewApi||t.calendarApi.view}))}function TP(n,e){e.emitter.trigger("unselect",{jsEvent:n?n.origEvent:null,view:e.viewApi||e.calendarApi.view})}function Iv(n,e){let t={};for(let r of e.pluginHooks.dateSpanTransforms)Object.assign(t,r(n,e));return Object.assign(t,LP(n,e.dateEnv)),t}function qd(n,e,t){let{dateEnv:r,options:i}=t,s=e;return n?(s=St(s),s=r.add(s,i.defaultAllDayEventDuration)):s=r.add(s,i.defaultTimedEventDuration),s}function Hl(n,e,t,r){let i=Vd(n.defs,e),s=wn();for(let o in n.defs){let a=n.defs[o];s.defs[o]=CP(a,i[o],t,r)}for(let o in n.instances){let a=n.instances[o],c=s.defs[a.defId];s.instances[o]=AP(a,c,i[a.defId],t,r)}return s}function CP(n,e,t,r){let i=t.standardProps||{};i.hasEnd==null&&e.durationEditable&&(t.startDelta||t.endDelta)&&(i.hasEnd=!0);let s=Object.assign(Object.assign(Object.assign({},n),i),{ui:Object.assign(Object.assign({},n.ui),i.ui)});t.extendedProps&&(s.extendedProps=Object.assign(Object.assign({},s.extendedProps),t.extendedProps));for(let o of r.pluginHooks.eventDefMutationAppliers)o(s,t,r);return!s.hasEnd&&r.options.forceEventDuration&&(s.hasEnd=!0),s}function AP(n,e,t,r,i){let{dateEnv:s}=i,o=r.standardProps&&r.standardProps.allDay===!0,a=r.standardProps&&r.standardProps.hasEnd===!1,c=Object.assign({},n);return o&&(c.range=oC(c.range)),r.datesDelta&&t.startEditable&&(c.range={start:s.add(c.range.start,r.datesDelta),end:s.add(c.range.end,r.datesDelta)}),r.startDelta&&t.durationEditable&&(c.range={start:s.add(c.range.start,r.startDelta),end:c.range.end}),r.endDelta&&t.durationEditable&&(c.range={start:c.range.start,end:s.add(c.range.end,r.endDelta)}),a&&(c.range={start:c.range.start,end:qd(e.allDay,c.range.start,i)}),e.allDay&&(c.range={start:St(c.range.start),end:St(c.range.end)}),c.range.end<c.range.start&&(c.range.end=qd(e.allDay,c.range.start,i)),c}var ji=class{constructor(e,t){this.context=e,this.internalEventSource=t}remove(){this.context.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:this.internalEventSource.sourceId})}refetch(){this.context.dispatch({type:"FETCH_EVENT_SOURCES",sourceIds:[this.internalEventSource.sourceId],isRefetch:!0})}get id(){return this.internalEventSource.publicId}get url(){return this.internalEventSource.meta.url}get format(){return this.internalEventSource.meta.format}},xt=class{constructor(e,t,r){this._context=e,this._def=t,this._instance=r||null}setProp(e,t){if(e in iC)console.warn("Could not set date-related prop 'name'. Use one of the date-related methods instead.");else if(e==="id")t=Pd[e](t),this.mutate({standardProps:{publicId:t}});else if(e in Pd)t=Pd[e](t),this.mutate({standardProps:{[e]:t}});else if(e in jd){let r=jd[e](t);e==="color"?r={backgroundColor:t,borderColor:t}:e==="editable"?r={startEditable:t,durationEditable:t}:r={[e]:t},this.mutate({standardProps:{ui:r}})}else console.warn(`Could not set prop '${e}'. Use setExtendedProp instead.`)}setExtendedProp(e,t){this.mutate({extendedProps:{[e]:t}})}setStart(e,t={}){let{dateEnv:r}=this._context,i=r.createMarker(e);if(i&&this._instance){let s=this._instance.range,o=Vi(s.start,i,r,t.granularity);t.maintainDuration?this.mutate({datesDelta:o}):this.mutate({startDelta:o})}}setEnd(e,t={}){let{dateEnv:r}=this._context,i;if(!(e!=null&&(i=r.createMarker(e),!i))&&this._instance)if(i){let s=Vi(this._instance.range.end,i,r,t.granularity);this.mutate({endDelta:s})}else this.mutate({standardProps:{hasEnd:!1}})}setDates(e,t,r={}){let{dateEnv:i}=this._context,s={allDay:r.allDay},o=i.createMarker(e),a;if(o&&!(t!=null&&(a=i.createMarker(t),!a))&&this._instance){let c=this._instance.range;r.allDay===!0&&(c=oC(c));let u=Vi(c.start,o,i,r.granularity);if(a){let f=Vi(c.end,a,i,r.granularity);C1(u,f)?this.mutate({datesDelta:u,standardProps:s}):this.mutate({startDelta:u,endDelta:f,standardProps:s})}else s.hasEnd=!1,this.mutate({datesDelta:u,standardProps:s})}}moveStart(e){let t=ht(e);t&&this.mutate({startDelta:t})}moveEnd(e){let t=ht(e);t&&this.mutate({endDelta:t})}moveDates(e){let t=ht(e);t&&this.mutate({datesDelta:t})}setAllDay(e,t={}){let r={allDay:e},{maintainDuration:i}=t;i==null&&(i=this._context.options.allDayMaintainDuration),this._def.allDay!==e&&(r.hasEnd=i),this.mutate({standardProps:r})}formatRange(e){let{dateEnv:t}=this._context,r=this._instance,i=Ct(e);return this._def.hasEnd?t.formatRange(r.range.start,r.range.end,i,{forcedStartTzo:r.forcedStartTzo,forcedEndTzo:r.forcedEndTzo}):t.format(r.range.start,i,{forcedTzo:r.forcedStartTzo})}mutate(e){let t=this._instance;if(t){let r=this._def,i=this._context,{eventStore:s}=i.getCurrentData(),o=Fl(s,t.instanceId);o=Hl(o,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}},e,i);let c=new xt(i,r,t);this._def=o.defs[r.defId],this._instance=o.instances[t.instanceId],i.dispatch({type:"MERGE_EVENTS",eventStore:o}),i.emitter.trigger("eventChange",{oldEvent:c,event:this,relatedEvents:Br(o,i,t),revert(){i.dispatch({type:"RESET_EVENTS",eventStore:s})}})}}remove(){let e=this._context,t=mC(this);e.dispatch({type:"REMOVE_EVENTS",eventStore:t}),e.emitter.trigger("eventRemove",{event:this,relatedEvents:[],revert(){e.dispatch({type:"MERGE_EVENTS",eventStore:t})}})}get source(){let{sourceId:e}=this._def;return e?new ji(this._context,this._context.getCurrentData().eventSources[e]):null}get start(){return this._instance?this._context.dateEnv.toDate(this._instance.range.start):null}get end(){return this._instance&&this._def.hasEnd?this._context.dateEnv.toDate(this._instance.range.end):null}get startStr(){let e=this._instance;return e?this._context.dateEnv.formatIso(e.range.start,{omitTime:this._def.allDay,forcedTzo:e.forcedStartTzo}):""}get endStr(){let e=this._instance;return e&&this._def.hasEnd?this._context.dateEnv.formatIso(e.range.end,{omitTime:this._def.allDay,forcedTzo:e.forcedEndTzo}):""}get id(){return this._def.publicId}get groupId(){return this._def.groupId}get allDay(){return this._def.allDay}get title(){return this._def.title}get url(){return this._def.url}get display(){return this._def.ui.display||"auto"}get startEditable(){return this._def.ui.startEditable}get durationEditable(){return this._def.ui.durationEditable}get constraint(){return this._def.ui.constraints[0]||null}get overlap(){return this._def.ui.overlap}get allow(){return this._def.ui.allows[0]||null}get backgroundColor(){return this._def.ui.backgroundColor}get borderColor(){return this._def.ui.borderColor}get textColor(){return this._def.ui.textColor}get classNames(){return this._def.ui.classNames}get extendedProps(){return this._def.extendedProps}toPlainObject(e={}){let t=this._def,{ui:r}=t,{startStr:i,endStr:s}=this,o={allDay:t.allDay};return t.title&&(o.title=t.title),i&&(o.start=i),s&&(o.end=s),t.publicId&&(o.id=t.publicId),t.groupId&&(o.groupId=t.groupId),t.url&&(o.url=t.url),r.display&&r.display!=="auto"&&(o.display=r.display),e.collapseColor&&r.backgroundColor&&r.backgroundColor===r.borderColor?o.color=r.backgroundColor:(r.backgroundColor&&(o.backgroundColor=r.backgroundColor),r.borderColor&&(o.borderColor=r.borderColor)),r.textColor&&(o.textColor=r.textColor),r.classNames.length&&(o.classNames=r.classNames),Object.keys(t.extendedProps).length&&(e.collapseExtendedProps?Object.assign(o,t.extendedProps):o.extendedProps=t.extendedProps),o}toJSON(){return this.toPlainObject()}};function mC(n){let e=n._def,t=n._instance;return{defs:{[e.defId]:e},instances:t?{[t.instanceId]:t}:{}}}function Br(n,e,t){let{defs:r,instances:i}=n,s=[],o=t?t.instanceId:"";for(let a in i){let c=i[a],u=r[c.defId];c.instanceId!==o&&s.push(new xt(e,u,c))}return s}function Uo(n,e,t,r){let i={},s={},o={},a=[],c=[],u=Vd(n.defs,e);for(let f in n.defs){let p=n.defs[f];u[p.defId].display==="inverse-background"&&(p.groupId?(i[p.groupId]=[],o[p.groupId]||(o[p.groupId]=p)):s[f]=[])}for(let f in n.instances){let p=n.instances[f],h=n.defs[p.defId],y=u[h.defId],_=p.range,w=!h.allDay&&r?nf(_,r):_,E=Gn(w,t);E&&(y.display==="inverse-background"?h.groupId?i[h.groupId].push(E):s[p.defId].push(E):y.display!=="none"&&(y.display==="background"?a:c).push({def:h,ui:y,instance:p,range:E,isStart:w.start&&w.start.valueOf()===E.start.valueOf(),isEnd:w.end&&w.end.valueOf()===E.end.valueOf()}))}for(let f in i){let p=i[f],h=FT(p,t);for(let y of h){let _=o[f],w=u[_.defId];a.push({def:_,ui:w,instance:null,range:y,isStart:!1,isEnd:!1})}}for(let f in s){let p=s[f],h=FT(p,t);for(let y of h)a.push({def:n.defs[f],ui:u[f],instance:null,range:y,isStart:!1,isEnd:!1})}return{bg:a,fg:c}}function kv(n){return n.ui.display==="background"||n.ui.display==="inverse-background"}function BT(n,e){n.fcSeg=e}function fi(n){return n.fcSeg||n.parentNode.fcSeg||null}function Vd(n,e){return ar(n,t=>vC(t,e))}function vC(n,e){let t=[];return e[""]&&t.push(e[""]),e[n.defId]&&t.push(e[n.defId]),t.push(n.ui),yv(t)}function Ks(n,e){let t=n.map(DP);return t.sort((r,i)=>XT(r,i,e)),t.map(r=>r._seg)}function DP(n){let{eventRange:e}=n,t=e.def,r=e.instance?e.instance.range:e.range,i=r.start?r.start.valueOf():0,s=r.end?r.end.valueOf():0;return Object.assign(Object.assign(Object.assign({},t.extendedProps),t),{id:t.publicId,start:i,end:s,duration:s-i,allDay:Number(t.allDay),_seg:n})}function xP(n,e){let{pluginHooks:t}=e,r=t.isDraggableTransformers,{def:i,ui:s}=n.eventRange,o=s.startEditable;for(let a of r)o=a(o,i,s,e);return o}function OP(n,e){return n.isStart&&n.eventRange.ui.durationEditable&&e.options.eventResizableFromStart}function IP(n,e){return n.isEnd&&n.eventRange.ui.durationEditable}function Ki(n,e,t,r,i,s,o){let{dateEnv:a,options:c}=t,{displayEventTime:u,displayEventEnd:f}=c,p=n.eventRange.def,h=n.eventRange.instance;u==null&&(u=r!==!1),f==null&&(f=i!==!1);let y=h.range.start,_=h.range.end,w=s||n.start||n.eventRange.range.start,E=o||n.end||n.eventRange.range.end,D=St(y).valueOf()===St(w).valueOf(),R=St(Rr(_,-1)).valueOf()===St(Rr(E,-1)).valueOf();return u&&!p.allDay&&(D||R)?(w=D?y:w,E=R?_:E,f&&p.hasEnd?a.formatRange(w,E,e,{forcedStartTzo:s?null:h.forcedStartTzo,forcedEndTzo:o?null:h.forcedEndTzo}):a.format(w,e,{forcedTzo:s?null:h.forcedStartTzo})):""}function Kn(n,e,t){let r=n.eventRange.range;return{isPast:r.end<(t||e.start),isFuture:r.start>=(t||e.end),isToday:e&&or(e,r.start)}}function kP(n){let e=["fc-event"];return n.isMirror&&e.push("fc-event-mirror"),n.isDraggable&&e.push("fc-event-draggable"),(n.isStartResizable||n.isEndResizable)&&e.push("fc-event-resizable"),n.isDragging&&e.push("fc-event-dragging"),n.isResizing&&e.push("fc-event-resizing"),n.isSelected&&e.push("fc-event-selected"),n.isStart&&e.push("fc-event-start"),n.isEnd&&e.push("fc-event-end"),n.isPast&&e.push("fc-event-past"),n.isToday&&e.push("fc-event-today"),n.isFuture&&e.push("fc-event-future"),e}function ql(n){return n.instance?n.instance.instanceId:`${n.def.defId}:${n.range.start.toISOString()}`}function ea(n,e){let{def:t,instance:r}=n.eventRange,{url:i}=t;if(i)return{href:i};let{emitter:s,options:o}=e,{eventInteractive:a}=o;return a==null&&(a=t.interactive,a==null&&(a=Boolean(s.hasHandlers("eventClick")))),a?KT(c=>{s.trigger("eventClick",{el:c.target,event:new xt(e,t,r),jsEvent:c,view:e.viewApi})}):{}}var RP={start:oe,end:oe,allDay:Boolean};function MP(n,e,t){let r=NP(n,e),{range:i}=r;if(!i.start)return null;if(!i.end){if(t==null)return null;i.end=e.add(i.start,t)}return r}function NP(n,e){let{refined:t,extra:r}=Zd(n,RP),i=t.start?e.createMarkerMeta(t.start):null,s=t.end?e.createMarkerMeta(t.end):null,{allDay:o}=t;return o==null&&(o=i&&i.isTimeUnspecified&&(!s||s.isTimeUnspecified)),Object.assign({range:{start:i?i.marker:null,end:s?s.marker:null},allDay:o},r)}function Rv(n,e){return aC(n.range,e.range)&&n.allDay===e.allDay&&PP(n,e)}function PP(n,e){for(let t in e)if(t!=="range"&&t!=="allDay"&&n[t]!==e[t])return!1;for(let t in n)if(!(t in e))return!1;return!0}function LP(n,e){return Object.assign(Object.assign({},yC(n.range,e,n.allDay)),{allDay:n.allDay})}function Mv(n,e,t){return Object.assign(Object.assign({},yC(n,e,t)),{timeZone:e.timeZone})}function yC(n,e,t){return{start:e.toDate(n.start),end:e.toDate(n.end),startStr:e.formatIso(n.start,{omitTime:t}),endStr:e.formatIso(n.end,{omitTime:t})}}function FP(n,e,t){let r=tf({editable:!1},t),i=bl(r.refined,r.extra,"",n.allDay,!0,t);return{def:i,ui:vC(i,e),instance:Ll(i.defId,n.range),range:n.range,isStart:!0,isEnd:!0}}var bC={};function BP(n,e){bC[n]=e}function jP(n){return new bC[n]}var Qm=class{getMarkerYear(e){return e.getUTCFullYear()}getMarkerMonth(e){return e.getUTCMonth()}getMarkerDay(e){return e.getUTCDate()}arrayToMarker(e){return Mn(e)}markerToArray(e){return Hi(e)}};BP("gregory",Qm);var HP=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;function EC(n){let e=HP.exec(n);if(e){let t=new Date(Date.UTC(Number(e[1]),e[3]?Number(e[3])-1:0,Number(e[5]||1),Number(e[7]||0),Number(e[8]||0),Number(e[10]||0),e[12]?Number(`0.${e[12]}`)*1e3:0));if(dv(t)){let r=null;return e[13]&&(r=(e[15]==="-"?-1:1)*(Number(e[16]||0)*60+Number(e[18]||0))),{marker:t,isTimeUnspecified:!e[6],timeZoneOffset:r}}}return null}var Sl=class{constructor(e){let t=this.timeZone=e.timeZone,r=t!=="local"&&t!=="UTC";e.namedTimeZoneImpl&&r&&(this.namedTimeZoneImpl=new e.namedTimeZoneImpl(t)),this.canComputeOffset=Boolean(!r||this.namedTimeZoneImpl),this.calendarSystem=jP(e.calendarSystem),this.locale=e.locale,this.weekDow=e.locale.week.dow,this.weekDoy=e.locale.week.doy,e.weekNumberCalculation==="ISO"&&(this.weekDow=1,this.weekDoy=4),typeof e.firstDay=="number"&&(this.weekDow=e.firstDay),typeof e.weekNumberCalculation=="function"&&(this.weekNumberFunc=e.weekNumberCalculation),this.weekText=e.weekText!=null?e.weekText:e.locale.options.weekText,this.weekTextLong=(e.weekTextLong!=null?e.weekTextLong:e.locale.options.weekTextLong)||this.weekText,this.cmdFormatter=e.cmdFormatter,this.defaultSeparator=e.defaultSeparator}createMarker(e){let t=this.createMarkerMeta(e);return t===null?null:t.marker}createNowMarker(){return this.canComputeOffset?this.timestampToMarker(new Date().valueOf()):Mn(RT(new Date))}createMarkerMeta(e){if(typeof e=="string")return this.parse(e);let t=null;return typeof e=="number"?t=this.timestampToMarker(e):e instanceof Date?(e=e.valueOf(),isNaN(e)||(t=this.timestampToMarker(e))):Array.isArray(e)&&(t=Mn(e)),t===null||!dv(t)?null:{marker:t,isTimeUnspecified:!1,forcedTzo:null}}parse(e){let t=EC(e);if(t===null)return null;let{marker:r}=t,i=null;return t.timeZoneOffset!==null&&(this.canComputeOffset?r=this.timestampToMarker(r.valueOf()-t.timeZoneOffset*60*1e3):i=t.timeZoneOffset),{marker:r,isTimeUnspecified:t.isTimeUnspecified,forcedTzo:i}}getYear(e){return this.calendarSystem.getMarkerYear(e)}getMonth(e){return this.calendarSystem.getMarkerMonth(e)}getDay(e){return this.calendarSystem.getMarkerDay(e)}add(e,t){let r=this.calendarSystem.markerToArray(e);return r[0]+=t.years,r[1]+=t.months,r[2]+=t.days,r[6]+=t.milliseconds,this.calendarSystem.arrayToMarker(r)}subtract(e,t){let r=this.calendarSystem.markerToArray(e);return r[0]-=t.years,r[1]-=t.months,r[2]-=t.days,r[6]-=t.milliseconds,this.calendarSystem.arrayToMarker(r)}addYears(e,t){let r=this.calendarSystem.markerToArray(e);return r[0]+=t,this.calendarSystem.arrayToMarker(r)}addMonths(e,t){let r=this.calendarSystem.markerToArray(e);return r[1]+=t,this.calendarSystem.arrayToMarker(r)}diffWholeYears(e,t){let{calendarSystem:r}=this;return qi(e)===qi(t)&&r.getMarkerDay(e)===r.getMarkerDay(t)&&r.getMarkerMonth(e)===r.getMarkerMonth(t)?r.getMarkerYear(t)-r.getMarkerYear(e):null}diffWholeMonths(e,t){let{calendarSystem:r}=this;return qi(e)===qi(t)&&r.getMarkerDay(e)===r.getMarkerDay(t)?r.getMarkerMonth(t)-r.getMarkerMonth(e)+(r.getMarkerYear(t)-r.getMarkerYear(e))*12:null}greatestWholeUnit(e,t){let r=this.diffWholeYears(e,t);return r!==null?{unit:"year",value:r}:(r=this.diffWholeMonths(e,t),r!==null?{unit:"month",value:r}:(r=nC(e,t),r!==null?{unit:"week",value:r}:(r=Wo(e,t),r!==null?{unit:"day",value:r}:(r=R1(e,t),gl(r)?{unit:"hour",value:r}:(r=M1(e,t),gl(r)?{unit:"minute",value:r}:(r=N1(e,t),gl(r)?{unit:"second",value:r}:{unit:"millisecond",value:t.valueOf()-e.valueOf()}))))))}countDurationsBetween(e,t,r){let i;return r.years&&(i=this.diffWholeYears(e,t),i!==null)?i/A1(r):r.months&&(i=this.diffWholeMonths(e,t),i!==null)?i/D1(r):r.days&&(i=Wo(e,t),i!==null)?i/zo(r):(t.valueOf()-e.valueOf())/Un(r)}startOf(e,t){return t==="year"?this.startOfYear(e):t==="month"?this.startOfMonth(e):t==="week"?this.startOfWeek(e):t==="day"?St(e):t==="hour"?P1(e):t==="minute"?L1(e):t==="second"?F1(e):null}startOfYear(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e)])}startOfMonth(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e)])}startOfWeek(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e),e.getUTCDate()-(e.getUTCDay()-this.weekDow+7)%7])}computeWeekNumber(e){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(e)):B1(e,this.weekDow,this.weekDoy)}format(e,t,r={}){return t.format({marker:e,timeZoneOffset:r.forcedTzo!=null?r.forcedTzo:this.offsetForMarker(e)},this)}formatRange(e,t,r,i={}){return i.isEndExclusive&&(t=Rr(t,-1)),r.formatRange({marker:e,timeZoneOffset:i.forcedStartTzo!=null?i.forcedStartTzo:this.offsetForMarker(e)},{marker:t,timeZoneOffset:i.forcedEndTzo!=null?i.forcedEndTzo:this.offsetForMarker(t)},this,i.defaultSeparator)}formatIso(e,t={}){let r=null;return t.omitTimeZoneOffset||(t.forcedTzo!=null?r=t.forcedTzo:r=this.offsetForMarker(e)),Qd(e,r,t.omitTime)}timestampToMarker(e){return this.timeZone==="local"?Mn(RT(new Date(e))):this.timeZone==="UTC"||!this.namedTimeZoneImpl?new Date(e):Mn(this.namedTimeZoneImpl.timestampToArray(e))}offsetForMarker(e){return this.timeZone==="local"?-MT(Hi(e)).getTimezoneOffset():this.timeZone==="UTC"?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(Hi(e)):null}toDate(e,t){return this.timeZone==="local"?MT(Hi(e)):this.timeZone==="UTC"?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-this.namedTimeZoneImpl.offsetForArray(Hi(e))*1e3*60):new Date(e.valueOf()-(t||0))}};var js=class{constructor(){this.strictOrder=!1,this.allowReslicing=!1,this.maxCoord=-1,this.maxStackCnt=-1,this.levelCoords=[],this.entriesByLevel=[],this.stackCnts={}}addSegs(e){let t=[];for(let r of e)this.insertEntry(r,t);return t}insertEntry(e,t){let r=this.findInsertion(e);return this.isInsertionValid(r,e)?(this.insertEntryAt(e,r),1):this.handleInvalidInsertion(r,e,t)}isInsertionValid(e,t){return(this.maxCoord===-1||e.levelCoord+t.thickness<=this.maxCoord)&&(this.maxStackCnt===-1||e.stackCnt<this.maxStackCnt)}handleInvalidInsertion(e,t,r){return this.allowReslicing&&e.touchingEntry?this.splitEntry(t,e.touchingEntry,r):(r.push(t),0)}splitEntry(e,t,r){let i=0,s=[],o=e.span,a=t.span;return o.start<a.start&&(i+=this.insertEntry({index:e.index,thickness:e.thickness,span:{start:o.start,end:a.start}},s)),o.end>a.end&&(i+=this.insertEntry({index:e.index,thickness:e.thickness,span:{start:a.end,end:o.end}},s)),i?(r.push({index:e.index,thickness:e.thickness,span:Vl(a,o)},...s),i):(r.push(e),0)}insertEntryAt(e,t){let{entriesByLevel:r,levelCoords:i}=this;t.lateral===-1?(Hm(i,t.level,t.levelCoord),Hm(r,t.level,[e])):Hm(r[t.level],t.lateral,e),this.stackCnts[Nr(e)]=t.stackCnt}findInsertion(e){let{levelCoords:t,entriesByLevel:r,strictOrder:i,stackCnts:s}=this,o=t.length,a=0,c=-1,u=-1,f=null,p=0;for(let _=0;_<o;_+=1){let w=t[_];if(!i&&w>=a+e.thickness)break;let E=r[_],D,R=Cl(E,e.span.start,Tl),H=R[0]+R[1];for(;(D=E[H])&&D.span.start<e.span.end;){let F=w+D.thickness;F>a&&(a=F,f=D,c=_,u=H),F===a&&(p=Math.max(p,s[Nr(D)]+1)),H+=1}}let h=0;if(f)for(h=c+1;h<o&&t[h]<a;)h+=1;let y=-1;return h<o&&t[h]===a&&(y=Cl(r[h],e.span.end,Tl)[0]),{touchingLevel:c,touchingLateral:u,touchingEntry:f,stackCnt:p,levelCoord:a,level:h,lateral:y}}toRects(){let{entriesByLevel:e,levelCoords:t}=this,r=e.length,i=[];for(let s=0;s<r;s+=1){let o=e[s],a=t[s];for(let c of o)i.push(Object.assign(Object.assign({},c),{levelCoord:a}))}return i}};function Tl(n){return n.span.end}function Nr(n){return n.index+":"+n.span.start}function Nv(n){let e=[];for(let t of n){let r=[],i={span:t.span,entries:[t]};for(let s of e)Vl(s.span,i.span)?i={entries:s.entries.concat(i.entries),span:qP(s.span,i.span)}:r.push(s);r.push(i),e=r}return e}function qP(n,e){return{start:Math.min(n.start,e.start),end:Math.max(n.end,e.end)}}function Vl(n,e){let t=Math.max(n.start,e.start),r=Math.min(n.end,e.end);return t<r?{start:t,end:r}:null}function Hm(n,e,t){n.splice(e,0,t)}function Cl(n,e,t){let r=0,i=n.length;if(!i||e<t(n[r]))return[0,0];if(e>t(n[i-1]))return[i,0];for(;r<i;){let s=Math.floor(r+(i-r)/2),o=t(n[s]);if(e<o)i=s;else if(e>o)r=s+1;else return[s,1]}return[r,0]}var wr=class{constructor(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}destroy(){}};function _C(n,e){return{component:n,el:e.el,useEventCenter:e.useEventCenter!=null?e.useEventCenter:!0,isHitComboAllowed:e.isHitComboAllowed||null}}function $l(n){return{[n.component.uid]:n}}var ta={},Al=class{constructor(e,t){this.emitter=new li}destroy(){}setMirrorIsVisible(e){}setMirrorNeedsRevert(e){}setAutoScrollEnabled(e){}},zl={};var Dl=class extends pt{constructor(){super(...arguments),this.state={forPrint:!1},this.handleBeforePrint=()=>{this.setState({forPrint:!0})},this.handleAfterPrint=()=>{this.setState({forPrint:!1})}}render(){let{props:e}=this,{options:t}=e,{forPrint:r}=this.state,i=r||t.height==="auto"||t.contentHeight==="auto",s=!i&&t.height!=null?t.height:"",o=["fc",r?"fc-media-print":"fc-media-screen",`fc-direction-${t.direction}`,e.theme.getClass("root")];return Av()||o.push("fc-liquid-hack"),e.children(o,s,i,r)}componentDidMount(){let{emitter:e}=this.props;e.on("_beforeprint",this.handleBeforePrint),e.on("_afterprint",this.handleAfterPrint)}componentWillUnmount(){let{emitter:e}=this.props;e.off("_beforeprint",this.handleBeforePrint),e.off("_afterprint",this.handleAfterPrint)}};function wC(n,e){return!n||e>10?Ct({weekday:"short"}):e>1?Ct({weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}):Ct({weekday:"long"})}var SC="fc-col-header-cell";function TC(n){return n.text}var xl=class extends pt{constructor(){super(...arguments),this.id=di(),this.queuedDomNodes=[],this.currentDomNodes=[],this.handleEl=e=>{this.props.elRef&&dr(this.props.elRef,e)}}render(){let{props:e,context:t}=this,{options:r}=t,{customGenerator:i,defaultGenerator:s,renderProps:o}=e,a=Pv(e),c=!1,u,f=[],p;if(i!=null){let h=typeof i=="function"?i(o,j):i;if(h===!0)c=!0;else{let y=h&&typeof h=="object";y&&"html"in h?a.dangerouslySetInnerHTML={__html:h.html}:y&&"domNodes"in h?f=Array.prototype.slice.call(h.domNodes):!y&&typeof h!="function"?u=h:p=h}}else c=!CC(e.generatorName,r);return c&&s&&(u=s(o)),this.queuedDomNodes=f,this.currentGeneratorMeta=p,j(e.elTag,a,u)}componentDidMount(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentDidUpdate(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentWillUnmount(){this.triggerCustomRendering(!1)}triggerCustomRendering(e){var t;let{props:r,context:i}=this,{handleCustomRendering:s,customRenderingMetaMap:o}=i.options;if(s){let a=(t=this.currentGeneratorMeta)!==null&&t!==void 0?t:o?.[r.generatorName];a&&s(Object.assign(Object.assign({id:this.id,isActive:e,containerEl:this.base,reportNewContainerEl:this.handleEl,generatorMeta:a},r),{elClasses:(r.elClasses||[]).filter(VP)}))}}applyQueueudDomNodes(){let{queuedDomNodes:e,currentDomNodes:t}=this,r=this.base;if(!Pr(e,t)){t.forEach(Il);for(let i of e)r.appendChild(i);this.currentDomNodes=e}}};xl.addPropsEquality({elClasses:Pr,elStyle:Yn,elAttrs:O1,renderProps:Yn});function CC(n,e){var t;return Boolean(e.handleCustomRendering&&n&&((t=e.customRenderingMetaMap)===null||t===void 0?void 0:t[n]))}function Pv(n,e){let t=Object.assign(Object.assign({},n.elAttrs),{ref:n.elRef});return(n.elClasses||e)&&(t.className=(n.elClasses||[]).concat(e||[]).concat(t.className||[]).filter(Boolean).join(" ")),n.elStyle&&(t.style=n.elStyle),t}function VP(n){return Boolean(n)}var Lv=fC(0),Yt=class extends mn{constructor(){super(...arguments),this.InnerContent=$P.bind(void 0,this),this.handleRootEl=e=>{this.rootEl=e,this.props.elRef&&dr(this.props.elRef,e)}}render(){let{props:e}=this,t=zP(e.classNameGenerator,e.renderProps);if(e.children){let r=Pv(e,t),i=e.children(this.InnerContent,e.renderProps,r);return e.elTag?j(e.elTag,r,i):i}else return j(xl,Object.assign(Object.assign({},e),{elRef:this.handleRootEl,elTag:e.elTag||"div",elClasses:(e.elClasses||[]).concat(t),renderId:this.context}))}componentDidMount(){var e,t;(t=(e=this.props).didMount)===null||t===void 0||t.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.rootEl||this.base}))}componentWillUnmount(){var e,t;(t=(e=this.props).willUnmount)===null||t===void 0||t.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.rootEl||this.base}))}};Yt.contextType=Lv;function $P(n,e){let t=n.props;return j(xl,Object.assign({renderProps:t.renderProps,generatorName:t.generatorName,customGenerator:t.customGenerator,defaultGenerator:t.defaultGenerator,renderId:n.context},e))}function zP(n,e){let t=typeof n=="function"?n(e):n||[];return typeof t=="string"?[t]:t}var $d=class extends pt{render(){let{dateEnv:e,options:t,theme:r,viewApi:i}=this.context,{props:s}=this,{date:o,dateProfile:a}=s,c=Bl(o,s.todayRange,null,a),u=[SC].concat(Zo(c,r)),f=e.format(o,s.dayHeaderFormat),p=!c.isDisabled&&s.colCnt>1?Fr(this.context,o):{},h=Object.assign(Object.assign(Object.assign({date:e.toDate(o),view:i},s.extraRenderProps),{text:f}),c);return j(Yt,{elTag:"th",elClasses:u,elAttrs:Object.assign({role:"columnheader",colSpan:s.colSpan,"data-date":c.isDisabled?void 0:Ui(o)},s.extraDataAttrs),renderProps:h,generatorName:"dayHeaderContent",customGenerator:t.dayHeaderContent,defaultGenerator:TC,classNameGenerator:t.dayHeaderClassNames,didMount:t.dayHeaderDidMount,willUnmount:t.dayHeaderWillUnmount},y=>j("div",{className:"fc-scrollgrid-sync-inner"},!c.isDisabled&&j(y,{elTag:"a",elAttrs:p,elClasses:["fc-col-header-cell-cushion",s.isSticky&&"fc-sticky"]})))}},WP=Ct({weekday:"long"}),zd=class extends pt{render(){let{props:e}=this,{dateEnv:t,theme:r,viewApi:i,options:s}=this.context,o=Ut(new Date(2592e5),e.dow),a={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},c=t.format(o,e.dayHeaderFormat),u=Object.assign(Object.assign(Object.assign(Object.assign({date:o},a),{view:i}),e.extraRenderProps),{text:c});return j(Yt,{elTag:"th",elClasses:[SC,...Zo(a,r),...e.extraClassNames||[]],elAttrs:Object.assign({role:"columnheader",colSpan:e.colSpan},e.extraDataAttrs),renderProps:u,generatorName:"dayHeaderContent",customGenerator:s.dayHeaderContent,defaultGenerator:TC,classNameGenerator:s.dayHeaderClassNames,didMount:s.dayHeaderDidMount,willUnmount:s.dayHeaderWillUnmount},f=>j("div",{className:"fc-scrollgrid-sync-inner"},j(f,{elTag:"a",elClasses:["fc-col-header-cell-cushion",e.isSticky&&"fc-sticky"],elAttrs:{"aria-label":t.format(o,WP)}})))}},lr=class extends mn{constructor(e,t){super(e,t),this.initialNowDate=Jo(t.options.now,t.dateEnv),this.initialNowQueriedMs=new Date().valueOf(),this.state=this.computeTiming().currentState}render(){let{props:e,state:t}=this;return e.children(t.nowDate,t.todayRange)}componentDidMount(){this.setTimeout()}componentDidUpdate(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())}componentWillUnmount(){this.clearTimeout()}computeTiming(){let{props:e,context:t}=this,r=Rr(this.initialNowDate,new Date().valueOf()-this.initialNowQueriedMs),i=t.dateEnv.startOf(r,e.unit),s=t.dateEnv.add(i,ht(1,e.unit)),o=s.valueOf()-r.valueOf();return o=Math.min(1e3*60*60*24,o),{currentState:{nowDate:i,todayRange:jT(i)},nextState:{nowDate:s,todayRange:jT(s)},waitMs:o}}setTimeout(){let{nextState:e,waitMs:t}=this.computeTiming();this.timeoutId=setTimeout(()=>{this.setState(e,()=>{this.setTimeout()})},t)}clearTimeout(){this.timeoutId&&clearTimeout(this.timeoutId)}};lr.contextType=ur;function jT(n){let e=St(n),t=Ut(e,1);return{start:e,end:t}}var Hs=class extends pt{constructor(){super(...arguments),this.createDayHeaderFormatter=ze(UP)}render(){let{context:e}=this,{dates:t,dateProfile:r,datesRepDistinctDays:i,renderIntro:s}=this.props,o=this.createDayHeaderFormatter(e.options.dayHeaderFormat,i,t.length);return j(lr,{unit:"day"},(a,c)=>j("tr",{role:"row"},s&&s("day"),t.map(u=>i?j($d,{key:u.toISOString(),date:u,dateProfile:r,todayRange:c,colCnt:t.length,dayHeaderFormat:o}):j(zd,{key:u.getUTCDay(),dow:u.getUTCDay(),dayHeaderFormat:o}))))}};function UP(n,e,t){return n||wC(e,t)}var qs=class{constructor(e,t){let r=e.start,{end:i}=e,s=[],o=[],a=-1;for(;r<i;)t.isHiddenDay(r)?s.push(a+.5):(a+=1,s.push(a),o.push(r)),r=Ut(r,1);this.dates=o,this.indices=s,this.cnt=o.length}sliceRange(e){let t=this.getDateDayIndex(e.start),r=this.getDateDayIndex(Ut(e.end,-1)),i=Math.max(0,t),s=Math.min(this.cnt-1,r);return i=Math.ceil(i),s=Math.floor(s),i<=s?{firstIndex:i,lastIndex:s,isStart:t===i,isEnd:r===s}:null}getDateDayIndex(e){let{indices:t}=this,r=Math.floor(Lr(this.dates[0],e));return r<0?t[0]-1:r>=t.length?t[t.length-1]+1:t[r]}},Vs=class{constructor(e,t){let{dates:r}=e,i,s,o;if(t){for(s=r[0].getUTCDay(),i=1;i<r.length&&r[i].getUTCDay()!==s;i+=1);o=Math.ceil(r.length/i)}else o=1,i=r.length;this.rowCnt=o,this.colCnt=i,this.daySeries=e,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}buildCells(){let e=[];for(let t=0;t<this.rowCnt;t+=1){let r=[];for(let i=0;i<this.colCnt;i+=1)r.push(this.buildCell(t,i));e.push(r)}return e}buildCell(e,t){let r=this.daySeries.dates[e*this.colCnt+t];return{key:r.toISOString(),date:r}}buildHeaderDates(){let e=[];for(let t=0;t<this.colCnt;t+=1)e.push(this.cells[0][t].date);return e}sliceRange(e){let{colCnt:t}=this,r=this.daySeries.sliceRange(e),i=[];if(r){let{firstIndex:s,lastIndex:o}=r,a=s;for(;a<=o;){let c=Math.floor(a/t),u=Math.min((c+1)*t,o+1);i.push({row:c,firstCol:a%t,lastCol:(u-1)%t,isStart:r.isStart&&a===s,isEnd:r.isEnd&&u-1===o}),a=u}}return i}},$s=class{constructor(){this.sliceBusinessHours=ze(this._sliceBusinessHours),this.sliceDateSelection=ze(this._sliceDateSpan),this.sliceEventStore=ze(this._sliceEventStore),this.sliceEventDrag=ze(this._sliceInteraction),this.sliceEventResize=ze(this._sliceInteraction),this.forceDayIfListItem=!1}sliceProps(e,t,r,i,...s){let{eventUiBases:o}=e,a=this.sliceEventStore(e.eventStore,o,t,r,...s);return{dateSelectionSegs:this.sliceDateSelection(e.dateSelection,t,r,o,i,...s),businessHourSegs:this.sliceBusinessHours(e.businessHours,t,r,i,...s),fgEventSegs:a.fg,bgEventSegs:a.bg,eventDrag:this.sliceEventDrag(e.eventDrag,o,t,r,...s),eventResize:this.sliceEventResize(e.eventResize,o,t,r,...s),eventSelection:e.eventSelection}}sliceNowDate(e,t,r,i,...s){return this._sliceDateSpan({range:{start:e,end:Rr(e,1)},allDay:!1},t,r,{},i,...s)}_sliceBusinessHours(e,t,r,i,...s){return e?this._sliceEventStore(Ls(e,Rd(t,Boolean(r)),i),{},t,r,...s).bg:[]}_sliceEventStore(e,t,r,i,...s){if(e){let o=Uo(e,t,Rd(r,Boolean(i)),i);return{bg:this.sliceEventRanges(o.bg,s),fg:this.sliceEventRanges(o.fg,s)}}return{bg:[],fg:[]}}_sliceInteraction(e,t,r,i,...s){if(!e)return null;let o=Uo(e.mutatedEvents,t,Rd(r,Boolean(i)),i);return{segs:this.sliceEventRanges(o.fg,s),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}}_sliceDateSpan(e,t,r,i,s,...o){if(!e)return[];let a=Rd(t,Boolean(r)),c=Gn(e.range,a);if(c){e=Object.assign(Object.assign({},e),{range:c});let u=FP(e,i,s),f=this.sliceRange(e.range,...o);for(let p of f)p.eventRange=u;return f}return[]}sliceEventRanges(e,t){let r=[];for(let i of e)r.push(...this.sliceEventRange(i,t));return r}sliceEventRange(e,t){let r=e.range;this.forceDayIfListItem&&e.ui.display==="list-item"&&(r={start:r.start,end:Ut(r.start,1)});let i=this.sliceRange(r,...t);for(let s of i)s.eventRange=e,s.isStart=e.isStart&&s.isStart,s.isEnd=e.isEnd&&s.isEnd;return i}};function Rd(n,e){let t=n.activeRange;return e?t:{start:Rr(t.start,n.slotMinTime.milliseconds),end:Rr(t.end,n.slotMaxTime.milliseconds-864e5)}}function AC(n,e,t,r,i){switch(e.type){case"RECEIVE_EVENTS":return YP(n,t[e.sourceId],e.fetchId,e.fetchRange,e.rawEvents,i);case"RESET_RAW_EVENTS":return GP(n,t[e.sourceId],e.rawEvents,r.activeRange,i);case"ADD_EVENTS":return KP(n,e.eventStore,r?r.activeRange:null,i);case"RESET_EVENTS":return e.eventStore;case"MERGE_EVENTS":return Jd(n,e.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?Ls(n,r.activeRange,i):n;case"REMOVE_EVENTS":return tP(n,e.eventStore);case"REMOVE_EVENT_SOURCE":return xC(n,e.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return ef(n,s=>!s.sourceId);case"REMOVE_ALL_EVENTS":return wn();default:return n}}function YP(n,e,t,r,i,s){if(e&&t===e.latestFetchId){let o=vl(DC(i,e,s),e,s);return r&&(o=Ls(o,r,s)),Jd(xC(n,e.sourceId),o)}return n}function GP(n,e,t,r,i){let{defIdMap:s,instanceIdMap:o}=XP(n),a=vl(DC(t,e,i),e,i,!1,s,o);return Ls(a,r,i)}function DC(n,e,t){let r=t.options.eventDataTransform,i=e?e.eventDataTransform:null;return i&&(n=HT(n,i)),r&&(n=HT(n,r)),n}function HT(n,e){let t;if(!e)t=n;else{t=[];for(let r of n){let i=e(r);i?t.push(i):i==null&&t.push(r)}}return t}function KP(n,e,t,r){return t&&(e=Ls(e,t,r)),Jd(n,e)}function Fv(n,e,t){let{defs:r}=n,i=ar(n.instances,s=>r[s.defId].allDay?s:Object.assign(Object.assign({},s),{range:{start:t.createMarker(e.toDate(s.range.start,s.forcedStartTzo)),end:t.createMarker(e.toDate(s.range.end,s.forcedEndTzo))},forcedStartTzo:t.canComputeOffset?null:s.forcedStartTzo,forcedEndTzo:t.canComputeOffset?null:s.forcedEndTzo}));return{defs:r,instances:i}}function xC(n,e){return ef(n,t=>t.sourceId!==e)}function QP(n,e){return{defs:n.defs,instances:ai(n.instances,t=>!e[t.instanceId])}}function XP(n){let{defs:e,instances:t}=n,r={},i={};for(let s in e){let o=e[s],{publicId:a}=o;a&&(r[a]=s)}for(let s in t){let o=t[s],a=e[o.defId],{publicId:c}=a;c&&(i[c]=s)}return{defIdMap:r,instanceIdMap:i}}function lf(n,e,t){let{instances:r}=n.mutatedEvents;for(let i in r)if(!Xo(e.validRange,r[i].range))return!1;return OC({eventDrag:n},t)}function Bv(n,e,t){return Xo(e.validRange,n.range)?OC({dateSelection:n},t):!1}function OC(n,e){let t=e.getCurrentData(),r=Object.assign({businessHours:t.businessHours,dateSelection:"",eventStore:t.eventStore,eventUiBases:t.eventUiBases,eventSelection:"",eventDrag:null,eventResize:null},n);return(e.pluginHooks.isPropsValid||IC)(r,e)}function IC(n,e,t={},r){return!(n.eventDrag&&!ZP(n,e,t,r)||n.dateSelection&&!JP(n,e,t,r))}function ZP(n,e,t,r){let i=e.getCurrentData(),s=n.eventDrag,o=s.mutatedEvents,a=o.defs,c=o.instances,u=Vd(a,s.isEvent?n.eventUiBases:{"":i.selectionConfig});r&&(u=ar(u,r));let f=QP(n.eventStore,s.affectedEvents.instances),p=f.defs,h=f.instances,y=Vd(p,n.eventUiBases);for(let _ in c){let w=c[_],E=w.range,D=u[w.defId],R=a[w.defId];if(!kC(D.constraints,E,f,n.businessHours,e))return!1;let{eventOverlap:H}=e.options,F=typeof H=="function"?H:null;for(let Q in h){let le=h[Q];if(sf(E,le.range)&&(y[le.defId].overlap===!1&&s.isEvent||D.overlap===!1||F&&!F(new xt(e,p[le.defId],le),new xt(e,R,w))))return!1}let m=i.eventStore;for(let Q of D.allows){let le=Object.assign(Object.assign({},t),{range:w.range,allDay:R.allDay}),J=m.defs[R.defId],q=m.instances[_],Z;if(J?Z=new xt(e,J,q):Z=new xt(e,R),!Q(Iv(le,e),Z))return!1}}return!0}function JP(n,e,t,r){let i=n.eventStore,s=i.defs,o=i.instances,a=n.dateSelection,c=a.range,{selectionConfig:u}=e.getCurrentData();if(r&&(u=r(u)),!kC(u.constraints,c,i,n.businessHours,e))return!1;let{selectOverlap:f}=e.options,p=typeof f=="function"?f:null;for(let h in o){let y=o[h];if(sf(c,y.range)&&(u.overlap===!1||p&&!p(new xt(e,s[y.defId],y),null)))return!1}for(let h of u.allows){let y=Object.assign(Object.assign({},t),a);if(!h(Iv(y,e),null))return!1}return!0}function kC(n,e,t,r,i){for(let s of n)if(!tL(eL(s,e,t,r,i),e))return!1;return!0}function eL(n,e,t,r,i){return n==="businessHours"?qm(Ls(r,e,i)):typeof n=="string"?qm(ef(t,s=>s.groupId===n)):typeof n=="object"&&n?qm(Ls(n,e,i)):[]}function qm(n){let{instances:e}=n,t=[];for(let r in e)t.push(e[r].range);return t}function tL(n,e){for(let t of n)if(Xo(t,e))return!0;return!1}var Wd=class extends Error{constructor(e,t){super(e),this.response=t}};function jv(n,e,t){n=n.toUpperCase();let r={method:n};return n==="GET"?e+=(e.indexOf("?")===-1?"?":"&")+new URLSearchParams(t):(r.body=new URLSearchParams(t),r.headers={"Content-Type":"application/x-www-form-urlencoded"}),fetch(e,r).then(i=>{if(i.ok)return i.json().then(s=>[s,i],()=>{throw new Wd("Failure parsing JSON",i)});throw new Wd("Request failed",i)})}var zs=class{constructor(e){this.drainedOption=e,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}request(e){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),e==null?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),e))}pause(e=""){let{pauseDepths:t}=this;t[e]=(t[e]||0)+1,this.clearTimeout()}resume(e="",t){let{pauseDepths:r}=this;e in r&&(t?delete r[e]:(r[e]-=1,r[e]<=0&&delete r[e]),this.tryDrain())}isPaused(){return Object.keys(this.pauseDepths).length}tryDrain(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}}clear(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}}clearTimeout(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=0)}drained(){this.drainedOption&&this.drainedOption()}},Md=/^(visible|hidden)$/,Yo=class extends pt{constructor(){super(...arguments),this.handleEl=e=>{this.el=e,dr(this.props.elRef,e)}}render(){let{props:e}=this,{liquid:t,liquidIsAbsolute:r}=e,i=t&&r,s=["fc-scroller"];return t&&(r?s.push("fc-scroller-liquid-absolute"):s.push("fc-scroller-liquid")),j("div",{ref:this.handleEl,className:s.join(" "),style:{overflowX:e.overflowX,overflowY:e.overflowY,left:i&&-(e.overcomeLeft||0)||"",right:i&&-(e.overcomeRight||0)||"",bottom:i&&-(e.overcomeBottom||0)||"",marginLeft:!i&&-(e.overcomeLeft||0)||"",marginRight:!i&&-(e.overcomeRight||0)||"",marginBottom:!i&&-(e.overcomeBottom||0)||"",maxHeight:e.maxHeight||""}},e.children)}needsXScrolling(){if(Md.test(this.props.overflowX))return!1;let{el:e}=this,t=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),{children:r}=e;for(let i=0;i<r.length;i+=1)if(r[i].getBoundingClientRect().width>t)return!0;return!1}needsYScrolling(){if(Md.test(this.props.overflowY))return!1;let{el:e}=this,t=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),{children:r}=e;for(let i=0;i<r.length;i+=1)if(r[i].getBoundingClientRect().height>t)return!0;return!1}getXScrollbarWidth(){return Md.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight}getYScrollbarWidth(){return Md.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth}},Nn=class{constructor(e){this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=(t,r)=>{let{depths:i,currentMap:s}=this,o=!1,a=!1;t!==null?(o=r in s,s[r]=t,i[r]=(i[r]||0)+1,a=!0):(i[r]-=1,i[r]||(delete s[r],delete this.callbackMap[r],o=!0)),this.masterCallback&&(o&&this.masterCallback(null,String(r)),a&&this.masterCallback(t,String(r)))}}createRef(e){let t=this.callbackMap[e];return t||(t=this.callbackMap[e]=r=>{this.handleValue(r,String(e))}),t}collect(e,t,r){return eC(this.currentMap,e,t,r)}getAll(){return Gd(this.currentMap)}};function RC(n){let e=UT(n,".fc-scrollgrid-shrink"),t=0;for(let r of e)t=Math.max(t,w1(r));return Math.ceil(t)}function Hv(n,e){return n.liquid&&e.liquid}function MC(n,e){return e.maxHeight!=null||Hv(n,e)}function NC(n,e,t,r){let{expandRows:i}=t;return typeof e.content=="function"?e.content(t):j("table",{role:"presentation",className:[e.tableClassName,n.syncRowHeights?"fc-scrollgrid-sync-table":""].join(" "),style:{minWidth:t.tableMinWidth,width:t.clientWidth,height:i?t.clientHeight:""}},t.tableColGroupNode,j(r?"thead":"tbody",{role:"presentation"},typeof e.rowContent=="function"?e.rowContent(t):e.rowContent))}function PC(n,e){return Pr(n,e,Yn)}function LC(n,e){let t=[];for(let r of n){let i=r.span||1;for(let s=0;s<i;s+=1)t.push(j("col",{style:{width:r.width==="shrink"?FC(e):r.width||"",minWidth:r.minWidth||""}}))}return j("colgroup",{},...t)}function FC(n){return n??4}function BC(n){for(let e of n)if(e.width==="shrink")return!0;return!1}function jC(n,e){let t=["fc-scrollgrid",e.theme.getClass("table")];return n&&t.push("fc-scrollgrid-liquid"),t}function HC(n,e){let t=["fc-scrollgrid-section",`fc-scrollgrid-section-${n.type}`,n.className];return e&&n.liquid&&n.maxHeight==null&&t.push("fc-scrollgrid-section-liquid"),n.isSticky&&t.push("fc-scrollgrid-section-sticky"),t}function na(n){return j("div",{className:"fc-scrollgrid-sticky-shim",style:{width:n.clientWidth,minWidth:n.tableMinWidth}})}function Qs(n){let{stickyHeaderDates:e}=n;return(e==null||e==="auto")&&(e=n.height==="auto"||n.viewHeight==="auto"),e}function Wl(n){let{stickyFooterScrollbar:e}=n;return(e==null||e==="auto")&&(e=n.height==="auto"||n.viewHeight==="auto"),e}var $i=class extends pt{constructor(){super(...arguments),this.processCols=ze(e=>e,PC),this.renderMicroColGroup=ze(LC),this.scrollerRefs=new Nn,this.scrollerElRefs=new Nn(this._handleScrollerEl.bind(this)),this.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},this.handleSizing=()=>{this.safeSetState(Object.assign({shrinkWidth:this.computeShrinkWidth()},this.computeScrollerDims()))}}render(){let{props:e,state:t,context:r}=this,i=e.sections||[],s=this.processCols(e.cols),o=this.renderMicroColGroup(s,t.shrinkWidth),a=jC(e.liquid,r);e.collapsibleWidth&&a.push("fc-scrollgrid-collapsible");let c=i.length,u=0,f,p=[],h=[],y=[];for(;u<c&&(f=i[u]).type==="header";)p.push(this.renderSection(f,o,!0)),u+=1;for(;u<c&&(f=i[u]).type==="body";)h.push(this.renderSection(f,o,!1)),u+=1;for(;u<c&&(f=i[u]).type==="footer";)y.push(this.renderSection(f,o,!0)),u+=1;let _=!Av(),w={role:"rowgroup"};return j("table",{role:"grid",className:a.join(" "),style:{height:e.height}},Boolean(!_&&p.length)&&j("thead",w,...p),Boolean(!_&&h.length)&&j("tbody",w,...h),Boolean(!_&&y.length)&&j("tfoot",w,...y),_&&j("tbody",w,...p,...h,...y))}renderSection(e,t,r){return"outerContent"in e?j(yt,{key:e.key},e.outerContent):j("tr",{key:e.key,role:"presentation",className:HC(e,this.props.liquid).join(" ")},this.renderChunkTd(e,t,e.chunk,r))}renderChunkTd(e,t,r,i){if("outerContent"in r)return r.outerContent;let{props:s}=this,{forceYScrollbars:o,scrollerClientWidths:a,scrollerClientHeights:c}=this.state,u=MC(s,e),f=Hv(s,e),p=s.liquid?o?"scroll":u?"auto":"hidden":"visible",h=e.key,y=NC(e,r,{tableColGroupNode:t,tableMinWidth:"",clientWidth:!s.collapsibleWidth&&a[h]!==void 0?a[h]:null,clientHeight:c[h]!==void 0?c[h]:null,expandRows:e.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:()=>{}},i);return j(i?"th":"td",{ref:r.elRef,role:"presentation"},j("div",{className:`fc-scroller-harness${f?" fc-scroller-harness-liquid":""}`},j(Yo,{ref:this.scrollerRefs.createRef(h),elRef:this.scrollerElRefs.createRef(h),overflowY:p,overflowX:s.liquid?"hidden":"visible",maxHeight:e.maxHeight,liquid:f,liquidIsAbsolute:!0},y)))}_handleScrollerEl(e,t){let r=nL(this.props.sections,t);r&&dr(r.chunk.scrollerElRef,e)}componentDidMount(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)}componentDidUpdate(){this.handleSizing()}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing)}computeShrinkWidth(){return BC(this.props.cols)?RC(this.scrollerElRefs.getAll()):0}computeScrollerDims(){let e=cC(),{scrollerRefs:t,scrollerElRefs:r}=this,i=!1,s={},o={};for(let a in t.currentMap){let c=t.currentMap[a];if(c&&c.needsYScrolling()){i=!0;break}}for(let a of this.props.sections){let c=a.key,u=r.currentMap[c];if(u){let f=u.parentNode;s[c]=Math.floor(f.getBoundingClientRect().width-(i?e.y:0)),o[c]=Math.floor(f.getBoundingClientRect().height)}}return{forceYScrollbars:i,scrollerClientWidths:s,scrollerClientHeights:o}}};$i.addStateEquality({scrollerClientWidths:Yn,scrollerClientHeights:Yn});function nL(n,e){for(let t of n)if(t.key===e)return t;return null}var ui=class extends pt{constructor(){super(...arguments),this.handleEl=e=>{this.el=e,e&&BT(e,this.props.seg)}}render(){let{props:e,context:t}=this,{options:r}=t,{seg:i}=e,{eventRange:s}=i,{ui:o}=s,a={event:new xt(t,s.def,s.instance),view:t.viewApi,timeText:e.timeText,textColor:o.textColor,backgroundColor:o.backgroundColor,borderColor:o.borderColor,isDraggable:!e.disableDragging&&xP(i,t),isStartResizable:!e.disableResizing&&OP(i,t),isEndResizable:!e.disableResizing&&IP(i),isMirror:Boolean(e.isDragging||e.isResizing||e.isDateSelecting),isStart:Boolean(i.isStart),isEnd:Boolean(i.isEnd),isPast:Boolean(e.isPast),isFuture:Boolean(e.isFuture),isToday:Boolean(e.isToday),isSelected:Boolean(e.isSelected),isDragging:Boolean(e.isDragging),isResizing:Boolean(e.isResizing)};return j(Yt,Object.assign({},e,{elRef:this.handleEl,elClasses:[...kP(a),...i.eventRange.ui.classNames,...e.elClasses||[]],renderProps:a,generatorName:"eventContent",customGenerator:r.eventContent,defaultGenerator:e.defaultGenerator,classNameGenerator:r.eventClassNames,didMount:r.eventDidMount,willUnmount:r.eventWillUnmount}))}componentDidUpdate(e){this.el&&this.props.seg!==e.seg&&BT(this.el,this.props.seg)}},Ws=class extends pt{render(){let{props:e,context:t}=this,{options:r}=t,{seg:i}=e,{ui:s}=i.eventRange,o=r.eventTimeFormat||e.defaultTimeFormat,a=Ki(i,o,t,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return j(ui,Object.assign({},e,{elTag:"a",elStyle:{borderColor:s.borderColor,backgroundColor:s.backgroundColor},elAttrs:ea(i,t),defaultGenerator:rL,timeText:a}),(c,u)=>j(yt,null,j(c,{elTag:"div",elClasses:["fc-event-main"],elStyle:{color:u.textColor}}),Boolean(u.isStartResizable)&&j("div",{className:"fc-event-resizer fc-event-resizer-start"}),Boolean(u.isEndResizable)&&j("div",{className:"fc-event-resizer fc-event-resizer-end"})))}};function rL(n){return j("div",{className:"fc-event-main-frame"},n.timeText&&j("div",{className:"fc-event-time"},n.timeText),j("div",{className:"fc-event-title-container"},j("div",{className:"fc-event-title fc-sticky"},n.event.title||j(yt,null,"\xA0"))))}var Ul=n=>j(ur.Consumer,null,e=>{let{options:t}=e,r={isAxis:n.isAxis,date:e.dateEnv.toDate(n.date),view:e.viewApi};return j(Yt,Object.assign({},n,{elTag:n.elTag||"div",renderProps:r,generatorName:"nowIndicatorContent",customGenerator:t.nowIndicatorContent,classNameGenerator:t.nowIndicatorClassNames,didMount:t.nowIndicatorDidMount,willUnmount:t.nowIndicatorWillUnmount}))}),iL=Ct({day:"numeric"}),zi=class extends pt{constructor(){super(...arguments),this.refineRenderProps=Ko(sL)}render(){let{props:e,context:t}=this,{options:r}=t,i=this.refineRenderProps({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,isMonthStart:e.isMonthStart||!1,showDayNumber:e.showDayNumber,extraRenderProps:e.extraRenderProps,viewApi:t.viewApi,dateEnv:t.dateEnv,monthStartFormat:r.monthStartFormat});return j(Yt,Object.assign({},e,{elClasses:[...Zo(i,t.theme),...e.elClasses||[]],elAttrs:Object.assign(Object.assign({},e.elAttrs),i.isDisabled?{}:{"data-date":Ui(e.date)}),renderProps:i,generatorName:"dayCellContent",customGenerator:r.dayCellContent,defaultGenerator:e.defaultGenerator,classNameGenerator:i.isDisabled?void 0:r.dayCellClassNames,didMount:r.dayCellDidMount,willUnmount:r.dayCellWillUnmount}))}};function ra(n){return Boolean(n.dayCellContent||CC("dayCellContent",n))}function sL(n){let{date:e,dateEnv:t,dateProfile:r,isMonthStart:i}=n,s=Bl(e,n.todayRange,null,r),o=n.showDayNumber?t.format(e,i?n.monthStartFormat:iL):"";return Object.assign(Object.assign(Object.assign({date:t.toDate(e),view:n.viewApi},s),{isMonthStart:i,dayNumberText:o}),n.extraRenderProps)}var Us=class extends pt{render(){let{props:e}=this,{seg:t}=e;return j(ui,{elTag:"div",elClasses:["fc-bg-event"],elStyle:{backgroundColor:t.eventRange.ui.backgroundColor},defaultGenerator:oL,seg:t,timeText:"",isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,disableDragging:!0,disableResizing:!0})}};function oL(n){let{title:e}=n.event;return e&&j("div",{className:"fc-event-title"},n.event.title)}function Yl(n){return j("div",{className:`fc-${n}`})}var Gl=n=>j(ur.Consumer,null,e=>{let{dateEnv:t,options:r}=e,{date:i}=n,s=r.weekNumberFormat||n.defaultFormat,o=t.computeWeekNumber(i),a=t.format(i,s);return j(Yt,Object.assign({},n,{renderProps:{num:o,text:a,date:i},generatorName:"weekNumberContent",customGenerator:r.weekNumberContent,defaultGenerator:aL,classNameGenerator:r.weekNumberClassNames,didMount:r.weekNumberDidMount,willUnmount:r.weekNumberWillUnmount}))});function aL(n){return n.text}var Vm=10,Xm=class extends pt{constructor(){super(...arguments),this.state={titleId:cr()},this.handleRootEl=e=>{this.rootEl=e,this.props.elRef&&dr(this.props.elRef,e)},this.handleDocumentMouseDown=e=>{let t=Ud(e);this.rootEl.contains(t)||this.handleCloseClick()},this.handleDocumentKeyDown=e=>{e.key==="Escape"&&this.handleCloseClick()},this.handleCloseClick=()=>{let{onClose:e}=this.props;e&&e()}}render(){let{theme:e,options:t}=this.context,{props:r,state:i}=this,s=["fc-popover",e.getClass("popover")].concat(r.extraClassNames||[]);return AT(j("div",Object.assign({},r.extraAttrs,{id:r.id,className:s.join(" "),"aria-labelledby":i.titleId,ref:this.handleRootEl}),j("div",{className:"fc-popover-header "+e.getClass("popoverHeader")},j("span",{className:"fc-popover-title",id:i.titleId},r.title),j("span",{className:"fc-popover-close "+e.getIconClass("close"),title:t.closeHint,onClick:this.handleCloseClick})),j("div",{className:"fc-popover-body "+e.getClass("popoverContent")},r.children)),r.parentEl)}componentDidMount(){document.addEventListener("mousedown",this.handleDocumentMouseDown),document.addEventListener("keydown",this.handleDocumentKeyDown),this.updateSize()}componentWillUnmount(){document.removeEventListener("mousedown",this.handleDocumentMouseDown),document.removeEventListener("keydown",this.handleDocumentKeyDown)}updateSize(){let{isRtl:e}=this.context,{alignmentEl:t,alignGridTop:r}=this.props,{rootEl:i}=this,s=bP(t);if(s){let o=i.getBoundingClientRect(),a=r?on(t,".fc-scrollgrid").getBoundingClientRect().top:s.top,c=e?s.right-o.width:s.left;a=Math.max(a,Vm),c=Math.min(c,document.documentElement.clientWidth-Vm-o.width),c=Math.max(c,Vm);let u=i.offsetParent.getBoundingClientRect();Gs(i,{top:a-u.top,left:c-u.left})}}},Zm=class extends vn{constructor(){super(...arguments),this.handleRootEl=e=>{this.rootEl=e,e?this.context.registerInteractiveComponent(this,{el:e,useEventCenter:!1}):this.context.unregisterInteractiveComponent(this)}}render(){let{options:e,dateEnv:t}=this.context,{props:r}=this,{startDate:i,todayRange:s,dateProfile:o}=r,a=t.format(i,e.dayPopoverFormat);return j(zi,{elRef:this.handleRootEl,date:i,dateProfile:o,todayRange:s},(c,u,f)=>j(Xm,{elRef:f.ref,id:r.id,title:a,extraClassNames:["fc-more-popover"].concat(f.className||[]),extraAttrs:f,parentEl:r.parentEl,alignmentEl:r.alignmentEl,alignGridTop:r.alignGridTop,onClose:r.onClose},ra(e)&&j(c,{elTag:"div",elClasses:["fc-more-popover-misc"]}),r.children))}queryHit(e,t,r,i){let{rootEl:s,props:o}=this;return e>=0&&e<r&&t>=0&&t<i?{dateProfile:o.dateProfile,dateSpan:Object.assign({allDay:!o.forceTimed,range:{start:o.startDate,end:o.endDate}},o.extraDateSpan),dayEl:s,rect:{left:0,top:0,right:r,bottom:i},layer:1}:null}},Ys=class extends pt{constructor(){super(...arguments),this.state={isPopoverOpen:!1,popoverId:cr()},this.handleLinkEl=e=>{this.linkEl=e,this.props.elRef&&dr(this.props.elRef,e)},this.handleClick=e=>{let{props:t,context:r}=this,{moreLinkClick:i}=r.options,s=qT(t).start;function o(a){let{def:c,instance:u,range:f}=a.eventRange;return{event:new xt(r,c,u),start:r.dateEnv.toDate(f.start),end:r.dateEnv.toDate(f.end),isStart:a.isStart,isEnd:a.isEnd}}typeof i=="function"&&(i=i({date:s,allDay:Boolean(t.allDayDate),allSegs:t.allSegs.map(o),hiddenSegs:t.hiddenSegs.map(o),jsEvent:e,view:r.viewApi})),!i||i==="popover"?this.setState({isPopoverOpen:!0}):typeof i=="string"&&r.calendarApi.zoomTo(s,i)},this.handlePopoverClose=()=>{this.setState({isPopoverOpen:!1})}}render(){let{props:e,state:t}=this;return j(ur.Consumer,null,r=>{let{viewApi:i,options:s,calendarApi:o}=r,{moreLinkText:a}=s,{moreCnt:c}=e,u=qT(e),f=typeof a=="function"?a.call(o,c):`+${c} ${a}`,p=Go(s.moreLinkHint,[c],f),h={num:c,shortText:`+${c}`,text:f,view:i};return j(yt,null,Boolean(e.moreCnt)&&j(Yt,{elTag:e.elTag||"a",elRef:this.handleLinkEl,elClasses:[...e.elClasses||[],"fc-more-link"],elStyle:e.elStyle,elAttrs:Object.assign(Object.assign(Object.assign({},e.elAttrs),GT(this.handleClick)),{title:p,"aria-expanded":t.isPopoverOpen,"aria-controls":t.isPopoverOpen?t.popoverId:""}),renderProps:h,generatorName:"moreLinkContent",customGenerator:s.moreLinkContent,defaultGenerator:e.defaultGenerator||lL,classNameGenerator:s.moreLinkClassNames,didMount:s.moreLinkDidMount,willUnmount:s.moreLinkWillUnmount},e.children),t.isPopoverOpen&&j(Zm,{id:t.popoverId,startDate:u.start,endDate:u.end,dateProfile:e.dateProfile,todayRange:e.todayRange,extraDateSpan:e.extraDateSpan,parentEl:this.parentEl,alignmentEl:e.alignmentElRef?e.alignmentElRef.current:this.linkEl,alignGridTop:e.alignGridTop,forceTimed:e.forceTimed,onClose:this.handlePopoverClose},e.popoverContent()))})}componentDidMount(){this.updateParentEl()}componentDidUpdate(){this.updateParentEl()}updateParentEl(){this.linkEl&&(this.parentEl=on(this.linkEl,".fc-view-harness"))}};function lL(n){return n.text}function qT(n){if(n.allDayDate)return{start:n.allDayDate,end:Ut(n.allDayDate,1)};let{hiddenSegs:e}=n;return{start:cf(e),end:uL(e)}}function cf(n){return n.reduce(cL).eventRange.range.start}function cL(n,e){return n.eventRange.range.start<e.eventRange.range.start?n:e}function uL(n){return n.reduce(dL).eventRange.range.end}function dL(n,e){return n.eventRange.range.end>e.eventRange.range.end?n:e}var Sr=class extends pt{render(){let{props:e,context:t}=this,{options:r}=t,i={view:t.viewApi};return j(Yt,Object.assign({},e,{elTag:e.elTag||"div",elClasses:[...qv(e.viewSpec),...e.elClasses||[]],renderProps:i,classNameGenerator:r.viewClassNames,generatorName:void 0,didMount:r.viewDidMount,willUnmount:r.viewWillUnmount}),()=>e.children)}};function qv(n){return[`fc-${n.type}-view`,"fc-view"]}var fL={id:String,defaultAllDay:Boolean,url:String,format:String,events:oe,eventDataTransform:oe,success:oe,failure:oe};function Vv(n,e,t=$v(e)){let r;if(typeof n=="string"?r={url:n}:typeof n=="function"||Array.isArray(n)?r={events:n}:typeof n=="object"&&n&&(r=n),r){let{refined:i,extra:s}=Zd(r,t),o=hL(i,e);if(o)return{_raw:n,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:i.defaultAllDay,eventDataTransform:i.eventDataTransform,success:i.success,failure:i.failure,publicId:i.id||"",sourceId:di(),sourceDefId:o.sourceDefId,meta:o.meta,ui:Qo(i,e),extendedProps:s}}return null}function $v(n){return Object.assign(Object.assign(Object.assign({},jd),fL),n.pluginHooks.eventSourceRefiners)}function hL(n,e){let t=e.pluginHooks.eventSourceDefs;for(let r=t.length-1;r>=0;r-=1){let s=t[r].parseMeta(n);if(s)return{sourceDefId:r,meta:s}}return null}var Ol=class{getCurrentData(){return this.currentDataManager.getCurrentData()}dispatch(e){this.currentDataManager.dispatch(e)}get view(){return this.getCurrentData().viewApi}batchRendering(e){e()}updateSize(){this.trigger("_resize",!0)}setOption(e,t){this.dispatch({type:"SET_OPTION",optionName:e,rawOptionValue:t})}getOption(e){return this.currentDataManager.currentCalendarOptionsInput[e]}getAvailableLocaleCodes(){return Object.keys(this.getCurrentData().availableRawLocales)}on(e,t){let{currentDataManager:r}=this;r.currentCalendarOptionsRefiners[e]?r.emitter.on(e,t):console.warn(`Unknown listener name '${e}'`)}off(e,t){this.currentDataManager.emitter.off(e,t)}trigger(e,...t){this.currentDataManager.emitter.trigger(e,...t)}changeView(e,t){this.batchRendering(()=>{if(this.unselect(),t)if(t.start&&t.end)this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e}),this.dispatch({type:"SET_OPTION",optionName:"visibleRange",rawOptionValue:t});else{let{dateEnv:r}=this.getCurrentData();this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e,dateMarker:r.createMarker(t)})}else this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e})})}zoomTo(e,t){let r=this.getCurrentData(),i;t=t||"day",i=r.viewSpecs[t]||this.getUnitViewSpec(t),this.unselect(),i?this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:i.type,dateMarker:e}):this.dispatch({type:"CHANGE_DATE",dateMarker:e})}getUnitViewSpec(e){let{viewSpecs:t,toolbarConfig:r}=this.getCurrentData(),i=[].concat(r.header?r.header.viewsWithButtons:[],r.footer?r.footer.viewsWithButtons:[]),s,o;for(let a in t)i.push(a);for(s=0;s<i.length;s+=1)if(o=t[i[s]],o&&o.singleUnit===e)return o;return null}prev(){this.unselect(),this.dispatch({type:"PREV"})}next(){this.unselect(),this.dispatch({type:"NEXT"})}prevYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,-1)})}nextYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,1)})}today(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:Jo(e.calendarOptions.now,e.dateEnv)})}gotoDate(e){let t=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.createMarker(e)})}incrementDate(e){let t=this.getCurrentData(),r=ht(e);r&&(this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.add(t.currentDate,r)}))}getDate(){let e=this.getCurrentData();return e.dateEnv.toDate(e.currentDate)}formatDate(e,t){let{dateEnv:r}=this.getCurrentData();return r.format(r.createMarker(e),Ct(t))}formatRange(e,t,r){let{dateEnv:i}=this.getCurrentData();return i.formatRange(i.createMarker(e),i.createMarker(t),Ct(r),r)}formatIso(e,t){let{dateEnv:r}=this.getCurrentData();return r.formatIso(r.createMarker(e),{omitTime:t})}select(e,t){let r;t==null?e.start!=null?r=e:r={start:e,end:null}:r={start:e,end:t};let i=this.getCurrentData(),s=MP(r,i.dateEnv,ht({days:1}));s&&(this.dispatch({type:"SELECT_DATES",selection:s}),af(s,null,i))}unselect(e){let t=this.getCurrentData();t.dateSelection&&(this.dispatch({type:"UNSELECT_DATES"}),TP(e,t))}addEvent(e,t){if(e instanceof xt){let o=e._def,a=e._instance;return this.getCurrentData().eventStore.defs[o.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:yl({def:o,instance:a})}),this.triggerEventAdd(e)),e}let r=this.getCurrentData(),i;if(t instanceof ji)i=t.internalEventSource;else if(typeof t=="boolean")t&&([i]=Gd(r.eventSources));else if(t!=null){let o=this.getEventSourceById(t);if(!o)return console.warn(`Could not find an event source with ID "${t}"`),null;i=o.internalEventSource}let s=sC(e,i,r,!1);if(s){let o=new xt(r,s.def,s.def.recurringDef?null:s.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:yl(s)}),this.triggerEventAdd(o),o}return null}triggerEventAdd(e){let{emitter:t}=this.getCurrentData();t.trigger("eventAdd",{event:e,relatedEvents:[],revert:()=>{this.dispatch({type:"REMOVE_EVENTS",eventStore:mC(e)})}})}getEventById(e){let t=this.getCurrentData(),{defs:r,instances:i}=t.eventStore;e=String(e);for(let s in r){let o=r[s];if(o.publicId===e){if(o.recurringDef)return new xt(t,o,null);for(let a in i){let c=i[a];if(c.defId===o.defId)return new xt(t,o,c)}}}return null}getEvents(){let e=this.getCurrentData();return Br(e.eventStore,e)}removeAllEvents(){this.dispatch({type:"REMOVE_ALL_EVENTS"})}getEventSources(){let e=this.getCurrentData(),t=e.eventSources,r=[];for(let i in t)r.push(new ji(e,t[i]));return r}getEventSourceById(e){let t=this.getCurrentData(),r=t.eventSources;e=String(e);for(let i in r)if(r[i].publicId===e)return new ji(t,r[i]);return null}addEventSource(e){let t=this.getCurrentData();if(e instanceof ji)return t.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;let r=Vv(e,t);return r?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[r]}),new ji(t,r)):null}removeAllEventSources(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})}refetchEvents(){this.dispatch({type:"FETCH_EVENT_SOURCES",isRefetch:!0})}scrollToTime(e){let t=ht(e);t&&this.trigger("_scrollRequest",{time:t})}};var pL=[],YC={code:"en",week:{dow:0,doy:4},direction:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekText:"W",weekTextLong:"Week",closeHint:"Close",timeHint:"Time",eventHint:"Event",allDayText:"all-day",moreLinkText:"more",noEventsText:"No events to display"},GC=Object.assign(Object.assign({},YC),{buttonHints:{prev:"Previous $0",next:"Next $0",today(n,e){return e==="day"?"Today":`This ${n}`}},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint(n){return`Show ${n} more event${n===1?"":"s"}`}});function gL(n){let e=n.length>0?n[0].code:"en",t=pL.concat(n),r={en:GC};for(let i of t)r[i.code]=i;return{map:r,defaultCode:e}}function KC(n,e){return typeof n=="object"&&!Array.isArray(n)?QC(n.code,[n.code],n):mL(n,e)}function mL(n,e){let t=[].concat(n||[]),r=vL(t,e)||GC;return QC(n,t,r)}function vL(n,e){for(let t=0;t<n.length;t+=1){let r=n[t].toLocaleLowerCase().split("-");for(let i=r.length;i>0;i-=1){let s=r.slice(0,i).join("-");if(e[s])return e[s]}}return null}function QC(n,e,t){let r=Yd([YC,t],["buttonText"]);delete r.code;let{week:i}=r;return delete r.week,{codeArg:n,codes:e,week:i,simpleNumberFormat:new Intl.NumberFormat(n),options:r}}function Pn(n){return{id:di(),name:n.name,premiumReleaseDate:n.premiumReleaseDate?new Date(n.premiumReleaseDate):void 0,deps:n.deps||[],reducers:n.reducers||[],isLoadingFuncs:n.isLoadingFuncs||[],contextInit:[].concat(n.contextInit||[]),eventRefiners:n.eventRefiners||{},eventDefMemberAdders:n.eventDefMemberAdders||[],eventSourceRefiners:n.eventSourceRefiners||{},isDraggableTransformers:n.isDraggableTransformers||[],eventDragMutationMassagers:n.eventDragMutationMassagers||[],eventDefMutationAppliers:n.eventDefMutationAppliers||[],dateSelectionTransformers:n.dateSelectionTransformers||[],datePointTransforms:n.datePointTransforms||[],dateSpanTransforms:n.dateSpanTransforms||[],views:n.views||{},viewPropsTransformers:n.viewPropsTransformers||[],isPropsValid:n.isPropsValid||null,externalDefTransforms:n.externalDefTransforms||[],viewContainerAppends:n.viewContainerAppends||[],eventDropTransformers:n.eventDropTransformers||[],componentInteractions:n.componentInteractions||[],calendarInteractions:n.calendarInteractions||[],themeClasses:n.themeClasses||{},eventSourceDefs:n.eventSourceDefs||[],cmdFormatter:n.cmdFormatter,recurringTypes:n.recurringTypes||[],namedTimeZonedImpl:n.namedTimeZonedImpl,initialView:n.initialView||"",elementDraggingImpl:n.elementDraggingImpl,optionChangeHandlers:n.optionChangeHandlers||{},scrollGridImpl:n.scrollGridImpl||null,listenerRefiners:n.listenerRefiners||{},optionRefiners:n.optionRefiners||{},propSetHandlers:n.propSetHandlers||{}}}function yL(n,e){let t={},r={premiumReleaseDate:void 0,reducers:[],isLoadingFuncs:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:"",elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function i(s){for(let o of s){let a=o.name,c=t[a];c===void 0?(t[a]=o.id,i(o.deps),r=EL(r,o)):c!==o.id&&console.warn(`Duplicate plugin '${a}'`)}}return n&&i(n),i(e),r}function bL(){let n=[],e=[],t;return(r,i)=>((!t||!Pr(r,n)||!Pr(i,e))&&(t=yL(r,i)),n=r,e=i,t)}function EL(n,e){return{premiumReleaseDate:_L(n.premiumReleaseDate,e.premiumReleaseDate),reducers:n.reducers.concat(e.reducers),isLoadingFuncs:n.isLoadingFuncs.concat(e.isLoadingFuncs),contextInit:n.contextInit.concat(e.contextInit),eventRefiners:Object.assign(Object.assign({},n.eventRefiners),e.eventRefiners),eventDefMemberAdders:n.eventDefMemberAdders.concat(e.eventDefMemberAdders),eventSourceRefiners:Object.assign(Object.assign({},n.eventSourceRefiners),e.eventSourceRefiners),isDraggableTransformers:n.isDraggableTransformers.concat(e.isDraggableTransformers),eventDragMutationMassagers:n.eventDragMutationMassagers.concat(e.eventDragMutationMassagers),eventDefMutationAppliers:n.eventDefMutationAppliers.concat(e.eventDefMutationAppliers),dateSelectionTransformers:n.dateSelectionTransformers.concat(e.dateSelectionTransformers),datePointTransforms:n.datePointTransforms.concat(e.datePointTransforms),dateSpanTransforms:n.dateSpanTransforms.concat(e.dateSpanTransforms),views:Object.assign(Object.assign({},n.views),e.views),viewPropsTransformers:n.viewPropsTransformers.concat(e.viewPropsTransformers),isPropsValid:e.isPropsValid||n.isPropsValid,externalDefTransforms:n.externalDefTransforms.concat(e.externalDefTransforms),viewContainerAppends:n.viewContainerAppends.concat(e.viewContainerAppends),eventDropTransformers:n.eventDropTransformers.concat(e.eventDropTransformers),calendarInteractions:n.calendarInteractions.concat(e.calendarInteractions),componentInteractions:n.componentInteractions.concat(e.componentInteractions),themeClasses:Object.assign(Object.assign({},n.themeClasses),e.themeClasses),eventSourceDefs:n.eventSourceDefs.concat(e.eventSourceDefs),cmdFormatter:e.cmdFormatter||n.cmdFormatter,recurringTypes:n.recurringTypes.concat(e.recurringTypes),namedTimeZonedImpl:e.namedTimeZonedImpl||n.namedTimeZonedImpl,initialView:n.initialView||e.initialView,elementDraggingImpl:n.elementDraggingImpl||e.elementDraggingImpl,optionChangeHandlers:Object.assign(Object.assign({},n.optionChangeHandlers),e.optionChangeHandlers),scrollGridImpl:e.scrollGridImpl||n.scrollGridImpl,listenerRefiners:Object.assign(Object.assign({},n.listenerRefiners),e.listenerRefiners),optionRefiners:Object.assign(Object.assign({},n.optionRefiners),e.optionRefiners),propSetHandlers:Object.assign(Object.assign({},n.propSetHandlers),e.propSetHandlers)}}function _L(n,e){return n===void 0?e:e===void 0?n:new Date(Math.max(n.valueOf(),e.valueOf()))}var jr=class extends ci{};jr.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"};jr.prototype.baseIconClass="fc-icon";jr.prototype.iconClasses={close:"fc-icon-x",prev:"fc-icon-chevron-left",next:"fc-icon-chevron-right",prevYear:"fc-icon-chevrons-left",nextYear:"fc-icon-chevrons-right"};jr.prototype.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"};jr.prototype.iconOverrideOption="buttonIcons";jr.prototype.iconOverrideCustomButtonOption="icon";jr.prototype.iconOverridePrefix="fc-icon-";function wL(n,e){let t={},r;for(r in n)Wv(r,t,n,e);for(r in e)Wv(r,t,n,e);return t}function Wv(n,e,t,r){if(e[n])return e[n];let i=SL(n,e,t,r);return i&&(e[n]=i),i}function SL(n,e,t,r){let i=t[n],s=r[n],o=f=>i&&i[f]!==null?i[f]:s&&s[f]!==null?s[f]:null,a=o("component"),c=o("superType"),u=null;if(c){if(c===n)throw new Error("Can't have a custom view type that references itself");u=Wv(c,e,t,r)}return!a&&u&&(a=u.component),a?{type:n,component:a,defaults:Object.assign(Object.assign({},u?u.defaults:{}),i?i.rawOptions:{}),overrides:Object.assign(Object.assign({},u?u.overrides:{}),s?s.rawOptions:{})}:null}function qC(n){return ar(n,TL)}function TL(n){let e=typeof n=="function"?{component:n}:n,{component:t}=e;return e.content?t=VC(e):t&&!(t.prototype instanceof pt)&&(t=VC(Object.assign(Object.assign({},e),{content:t}))),{superType:e.type,component:t,rawOptions:e}}function VC(n){return e=>j(ur.Consumer,null,t=>j(Yt,{elTag:"div",elClasses:qv(t.viewSpec),renderProps:Object.assign(Object.assign({},e),{nextDayThreshold:t.options.nextDayThreshold}),generatorName:void 0,customGenerator:n.content,classNameGenerator:n.classNames,didMount:n.didMount,willUnmount:n.willUnmount}))}function CL(n,e,t,r){let i=qC(n),s=qC(e.views),o=wL(i,s);return ar(o,a=>AL(a,s,e,t,r))}function AL(n,e,t,r,i){let s=n.overrides.duration||n.defaults.duration||r.duration||t.duration,o=null,a="",c="",u={};if(s&&(o=DL(s),o)){let h=ml(o);a=h.unit,h.value===1&&(c=a,u=e[a]?e[a].rawOptions:{})}let f=h=>{let y=h.buttonText||{},_=n.defaults.buttonTextKey;return _!=null&&y[_]!=null?y[_]:y[n.type]!=null?y[n.type]:y[c]!=null?y[c]:null},p=h=>{let y=h.buttonHints||{},_=n.defaults.buttonTextKey;return _!=null&&y[_]!=null?y[_]:y[n.type]!=null?y[n.type]:y[c]!=null?y[c]:null};return{type:n.type,component:n.component,duration:o,durationUnit:a,singleUnit:c,optionDefaults:n.defaults,optionOverrides:Object.assign(Object.assign({},u),n.overrides),buttonTextOverride:f(r)||f(t)||n.overrides.buttonText,buttonTextDefault:f(i)||n.defaults.buttonText||f(Yi)||n.type,buttonTitleOverride:p(r)||p(t)||n.overrides.buttonHint,buttonTitleDefault:p(i)||n.defaults.buttonHint||p(Yi)}}var $C={};function DL(n){let e=JSON.stringify(n),t=$C[e];return t===void 0&&(t=ht(n),$C[e]=t),t}function xL(n,e){switch(e.type){case"CHANGE_VIEW_TYPE":n=e.viewType}return n}function OL(n,e){switch(e.type){case"SET_OPTION":return Object.assign(Object.assign({},n),{[e.optionName]:e.rawOptionValue});default:return n}}function IL(n,e,t,r){let i;switch(e.type){case"CHANGE_VIEW_TYPE":return r.build(e.dateMarker||t);case"CHANGE_DATE":return r.build(e.dateMarker);case"PREV":if(i=r.buildPrev(n,t),i.isValid)return i;break;case"NEXT":if(i=r.buildNext(n,t),i.isValid)return i;break}return n}function kL(n,e,t){let r=e?e.activeRange:null;return ZC({},BL(n,t),r,t)}function RL(n,e,t,r){let i=t?t.activeRange:null;switch(e.type){case"ADD_EVENT_SOURCES":return ZC(n,e.sources,i,r);case"REMOVE_EVENT_SOURCE":return NL(n,e.sourceId);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return t?JC(n,i,r):n;case"FETCH_EVENT_SOURCES":return ey(n,e.sourceIds?cv(e.sourceIds):e0(n,r),i,e.isRefetch||!1,r);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return FL(n,e.sourceId,e.fetchId,e.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return n}}function ML(n,e,t){let r=e?e.activeRange:null;return ey(n,e0(n,t),r,!0,t)}function XC(n){for(let e in n)if(n[e].isFetching)return!0;return!1}function ZC(n,e,t,r){let i={};for(let s of e)i[s.sourceId]=s;return t&&(i=JC(i,t,r)),Object.assign(Object.assign({},n),i)}function NL(n,e){return ai(n,t=>t.sourceId!==e)}function JC(n,e,t){return ey(n,ai(n,r=>PL(r,e,t)),e,!1,t)}function PL(n,e,t){return t0(n,t)?!t.options.lazyFetching||!n.fetchRange||n.isFetching||e.start<n.fetchRange.start||e.end>n.fetchRange.end:!n.latestFetchId}function ey(n,e,t,r,i){let s={};for(let o in n){let a=n[o];e[o]?s[o]=LL(a,t,r,i):s[o]=a}return s}function LL(n,e,t,r){let{options:i,calendarApi:s}=r,o=r.pluginHooks.eventSourceDefs[n.sourceDefId],a=di();return o.fetch({eventSource:n,range:e,isRefetch:t,context:r},c=>{let{rawEvents:u}=c;i.eventSourceSuccess&&(u=i.eventSourceSuccess.call(s,u,c.response)||u),n.success&&(u=n.success.call(s,u,c.response)||u),r.dispatch({type:"RECEIVE_EVENTS",sourceId:n.sourceId,fetchId:a,fetchRange:e,rawEvents:u})},c=>{let u=!1;i.eventSourceFailure&&(i.eventSourceFailure.call(s,c),u=!0),n.failure&&(n.failure(c),u=!0),u||console.warn(c.message,c),r.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:n.sourceId,fetchId:a,fetchRange:e,error:c})}),Object.assign(Object.assign({},n),{isFetching:!0,latestFetchId:a})}function FL(n,e,t,r){let i=n[e];return i&&t===i.latestFetchId?Object.assign(Object.assign({},n),{[e]:Object.assign(Object.assign({},i),{isFetching:!1,fetchRange:r})}):n}function e0(n,e){return ai(n,t=>t0(t,e))}function BL(n,e){let t=$v(e),r=[].concat(n.eventSources||[]),i=[];n.initialEvents&&r.unshift(n.initialEvents),n.events&&r.unshift(n.events);for(let s of r){let o=Vv(s,e,t);o&&i.push(o)}return i}function t0(n,e){return!e.pluginHooks.eventSourceDefs[n.sourceDefId].ignoreRange}function jL(n,e){switch(e.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return e.selection;default:return n}}function HL(n,e){switch(e.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return e.eventInstanceId;default:return n}}function qL(n,e){let t;switch(e.type){case"UNSET_EVENT_DRAG":return null;case"SET_EVENT_DRAG":return t=e.state,{affectedEvents:t.affectedEvents,mutatedEvents:t.mutatedEvents,isEvent:t.isEvent};default:return n}}function VL(n,e){let t;switch(e.type){case"UNSET_EVENT_RESIZE":return null;case"SET_EVENT_RESIZE":return t=e.state,{affectedEvents:t.affectedEvents,mutatedEvents:t.mutatedEvents,isEvent:t.isEvent};default:return n}}function $L(n,e,t,r,i){let s=n.headerToolbar?zC(n.headerToolbar,n,e,t,r,i):null,o=n.footerToolbar?zC(n.footerToolbar,n,e,t,r,i):null;return{header:s,footer:o}}function zC(n,e,t,r,i,s){let o={},a=[],c=!1;for(let u in n){let f=n[u],p=zL(f,e,t,r,i,s);o[u]=p.widgets,a.push(...p.viewsWithButtons),c=c||p.hasTitle}return{sectionWidgets:o,viewsWithButtons:a,hasTitle:c}}function zL(n,e,t,r,i,s){let o=e.direction==="rtl",a=e.customButtons||{},c=t.buttonText||{},u=e.buttonText||{},f=t.buttonHints||{},p=e.buttonHints||{},h=n?n.split(" "):[],y=[],_=!1;return{widgets:h.map(E=>E.split(",").map(D=>{if(D==="title")return _=!0,{buttonName:D};let R,H,F,m,Q,le;if(R=a[D])F=J=>{R.click&&R.click.call(J.target,J,J.target)},(m=r.getCustomButtonIconClass(R))||(m=r.getIconClass(D,o))||(Q=R.text),le=R.hint||R.text;else if(H=i[D]){y.push(D),F=()=>{s.changeView(D)},(Q=H.buttonTextOverride)||(m=r.getIconClass(D,o))||(Q=H.buttonTextDefault);let J=H.buttonTextOverride||H.buttonTextDefault;le=Go(H.buttonTitleOverride||H.buttonTitleDefault||e.viewHint,[J,D],J)}else if(s[D])if(F=()=>{s[D]()},(Q=c[D])||(m=r.getIconClass(D,o))||(Q=u[D]),D==="prevYear"||D==="nextYear"){let J=D==="prevYear"?"prev":"next";le=Go(f[J]||p[J],[u.year||"year","year"],u[D])}else le=J=>Go(f[D]||p[D],[u[J]||J,J],u[D]);return{buttonName:D,buttonClick:F,buttonIcon:m,buttonText:Q,buttonHint:le}})),viewsWithButtons:y,hasTitle:_}}var Uv=class{constructor(e,t,r){this.type=e,this.getCurrentData=t,this.dateEnv=r}get calendar(){return this.getCurrentData().calendarApi}get title(){return this.getCurrentData().viewTitle}get activeStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)}get activeEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)}get currentStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)}get currentEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)}getOption(e){return this.getCurrentData().options[e]}},WL={ignoreRange:!0,parseMeta(n){return Array.isArray(n.events)?n.events:null},fetch(n,e){e({rawEvents:n.eventSource.meta})}},UL=Pn({name:"array-event-source",eventSourceDefs:[WL]}),YL={parseMeta(n){return typeof n.events=="function"?n.events:null},fetch(n,e,t){let{dateEnv:r}=n.context,i=n.eventSource.meta;xv(i.bind(null,Mv(n.range,r)),s=>e({rawEvents:s}),t)}},GL=Pn({name:"func-event-source",eventSourceDefs:[YL]}),KL={method:String,extraParams:oe,startParam:String,endParam:String,timeZoneParam:String},QL={parseMeta(n){return n.url&&(n.format==="json"||!n.format)?{url:n.url,format:"json",method:(n.method||"GET").toUpperCase(),extraParams:n.extraParams,startParam:n.startParam,endParam:n.endParam,timeZoneParam:n.timeZoneParam}:null},fetch(n,e,t){let{meta:r}=n.eventSource,i=ZL(r,n.range,n.context);jv(r.method,r.url,i).then(([s,o])=>{e({rawEvents:s,response:o})},t)}},XL=Pn({name:"json-event-source",eventSourceRefiners:KL,eventSourceDefs:[QL]});function ZL(n,e,t){let{dateEnv:r,options:i}=t,s,o,a,c,u={};return s=n.startParam,s==null&&(s=i.startParam),o=n.endParam,o==null&&(o=i.endParam),a=n.timeZoneParam,a==null&&(a=i.timeZoneParam),typeof n.extraParams=="function"?c=n.extraParams():c=n.extraParams||{},Object.assign(u,c),u[s]=r.formatIso(e.start),u[o]=r.formatIso(e.end),r.timeZone!=="local"&&(u[a]=r.timeZone),u}var JL={daysOfWeek:oe,startTime:ht,endTime:ht,duration:ht,startRecur:oe,endRecur:oe},eF={parse(n,e){if(n.daysOfWeek||n.startTime||n.endTime||n.startRecur||n.endRecur){let t={daysOfWeek:n.daysOfWeek||null,startTime:n.startTime||null,endTime:n.endTime||null,startRecur:n.startRecur?e.createMarker(n.startRecur):null,endRecur:n.endRecur?e.createMarker(n.endRecur):null},r;return n.duration&&(r=n.duration),!r&&n.startTime&&n.endTime&&(r=JT(n.endTime,n.startTime)),{allDayGuess:Boolean(!n.startTime&&!n.endTime),duration:r,typeData:t}}return null},expand(n,e,t){let r=Gn(e,{start:n.startRecur,end:n.endRecur});return r?nF(n.daysOfWeek,n.startTime,r,t):[]}},tF=Pn({name:"simple-recurring-event",recurringTypes:[eF],eventRefiners:JL});function nF(n,e,t,r){let i=n?cv(n):null,s=St(t.start),o=t.end,a=[];for(;s<o;){let c;(!i||i[s.getUTCDay()])&&(e?c=r.add(s,e):c=s,a.push(c)),s=Ut(s,1)}return a}var rF=Pn({name:"change-handler",optionChangeHandlers:{events(n,e){WC([n],e)},eventSources:WC}});function WC(n,e){let t=Gd(e.getCurrentData().eventSources);if(t.length===1&&n.length===1&&Array.isArray(t[0]._raw)&&Array.isArray(n[0])){e.dispatch({type:"RESET_RAW_EVENTS",sourceId:t[0].sourceId,rawEvents:n[0]});return}let r=[];for(let i of n){let s=!1;for(let o=0;o<t.length;o+=1)if(t[o]._raw===i){t.splice(o,1),s=!0;break}s||r.push(i)}for(let i of t)e.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:i.sourceId});for(let i of r)e.calendarApi.addEventSource(i)}function iF(n,e){e.emitter.trigger("datesSet",Object.assign(Object.assign({},Mv(n.activeRange,e.dateEnv)),{view:e.viewApi}))}function sF(n,e){let{emitter:t}=e;t.hasHandlers("eventsSet")&&t.trigger("eventsSet",Br(n,e))}var oF=[UL,GL,XL,tF,rF,Pn({name:"misc",isLoadingFuncs:[n=>XC(n.eventSources)],propSetHandlers:{dateProfile:iF,eventStore:sF}})],Yv=class{constructor(e,t){this.runTaskOption=e,this.drainedOption=t,this.queue=[],this.delayedRunner=new zs(this.drain.bind(this))}request(e,t){this.queue.push(e),this.delayedRunner.request(t)}pause(e){this.delayedRunner.pause(e)}resume(e,t){this.delayedRunner.resume(e,t)}drain(){let{queue:e}=this;for(;e.length;){let t=[],r;for(;r=e.shift();)this.runTask(r),t.push(r);this.drained(t)}}runTask(e){this.runTaskOption&&this.runTaskOption(e)}drained(e){this.drainedOption&&this.drainedOption(e)}};function aF(n,e,t){let r;return/^(year|month)$/.test(n.currentRangeUnit)?r=n.currentRange:r=n.activeRange,t.formatRange(r.start,r.end,Ct(e.titleFormat||lF(n)),{isEndExclusive:n.isRangeAllDay,defaultSeparator:e.titleRangeSeparator})}function lF(n){let{currentRangeUnit:e}=n;if(e==="year")return{year:"numeric"};if(e==="month")return{year:"numeric",month:"long"};let t=Wo(n.currentRange.start,n.currentRange.end);return t!==null&&t>1?{year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"long",day:"numeric"}}var Gv=class{constructor(e){this.computeCurrentViewData=ze(this._computeCurrentViewData),this.organizeRawLocales=ze(gL),this.buildLocale=ze(KC),this.buildPluginHooks=bL(),this.buildDateEnv=ze(cF),this.buildTheme=ze(uF),this.parseToolbars=ze($L),this.buildViewSpecs=ze(CL),this.buildDateProfileGenerator=Ko(dF),this.buildViewApi=ze(fF),this.buildViewUiProps=Ko(gF),this.buildEventUiBySource=ze(hF,Yn),this.buildEventUiBases=ze(pF),this.parseContextBusinessHours=Ko(mF),this.buildTitle=ze(aF),this.emitter=new li,this.actionRunner=new Yv(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.optionsForRefining=[],this.optionsForHandling=[],this.getCurrentData=()=>this.data,this.dispatch=h=>{this.actionRunner.request(h)},this.props=e,this.actionRunner.pause();let t={},r=this.computeOptionsData(e.optionOverrides,t,e.calendarApi),i=r.calendarOptions.initialView||r.pluginHooks.initialView,s=this.computeCurrentViewData(i,r,e.optionOverrides,t);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(s.options);let o=gC(r.calendarOptions,r.dateEnv),a=s.dateProfileGenerator.build(o);or(a.activeRange,o)||(o=a.currentRange.start);let c={dateEnv:r.dateEnv,options:r.calendarOptions,pluginHooks:r.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData};for(let h of r.pluginHooks.contextInit)h(c);let u=kL(r.calendarOptions,a,c),f={dynamicOptionOverrides:t,currentViewType:i,currentDate:o,dateProfile:a,businessHours:this.parseContextBusinessHours(c),eventSources:u,eventUiBases:{},eventStore:wn(),renderableEventStore:wn(),dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(c).selectionConfig},p=Object.assign(Object.assign({},c),f);for(let h of r.pluginHooks.reducers)Object.assign(f,h(null,null,p));zv(f,c)&&this.emitter.trigger("loading",!0),this.state=f,this.updateData(),this.actionRunner.resume()}resetOptions(e,t){let{props:r}=this;t===void 0?r.optionOverrides=e:(r.optionOverrides=Object.assign(Object.assign({},r.optionOverrides||{}),e),this.optionsForRefining.push(...t)),(t===void 0||t.length)&&this.actionRunner.request({type:"NOTHING"})}_handleAction(e){let{props:t,state:r,emitter:i}=this,s=OL(r.dynamicOptionOverrides,e),o=this.computeOptionsData(t.optionOverrides,s,t.calendarApi),a=xL(r.currentViewType,e),c=this.computeCurrentViewData(a,o,t.optionOverrides,s);t.calendarApi.currentDataManager=this,i.setThisContext(t.calendarApi),i.setOptions(c.options);let u={dateEnv:o.dateEnv,options:o.calendarOptions,pluginHooks:o.pluginHooks,calendarApi:t.calendarApi,dispatch:this.dispatch,emitter:i,getCurrentData:this.getCurrentData},{currentDate:f,dateProfile:p}=r;this.data&&this.data.dateProfileGenerator!==c.dateProfileGenerator&&(p=c.dateProfileGenerator.build(f)),f=pC(f,e),p=IL(p,e,f,c.dateProfileGenerator),(e.type==="PREV"||e.type==="NEXT"||!or(p.currentRange,f))&&(f=p.currentRange.start);let h=RL(r.eventSources,e,p,u),y=AC(r.eventStore,e,h,p,u),w=XC(h)&&!c.options.progressiveEventRendering&&r.renderableEventStore||y,{eventUiSingleBase:E,selectionConfig:D}=this.buildViewUiProps(u),R=this.buildEventUiBySource(h),H=this.buildEventUiBases(w.defs,E,R),F={dynamicOptionOverrides:s,currentViewType:a,currentDate:f,dateProfile:p,eventSources:h,eventStore:y,renderableEventStore:w,selectionConfig:D,eventUiBases:H,businessHours:this.parseContextBusinessHours(u),dateSelection:jL(r.dateSelection,e),eventSelection:HL(r.eventSelection,e),eventDrag:qL(r.eventDrag,e),eventResize:VL(r.eventResize,e)},m=Object.assign(Object.assign({},u),F);for(let J of o.pluginHooks.reducers)Object.assign(F,J(r,e,m));let Q=zv(r,u),le=zv(F,u);!Q&&le?i.trigger("loading",!0):Q&&!le&&i.trigger("loading",!1),this.state=F,t.onAction&&t.onAction(e)}updateData(){let{props:e,state:t}=this,r=this.data,i=this.computeOptionsData(e.optionOverrides,t.dynamicOptionOverrides,e.calendarApi),s=this.computeCurrentViewData(t.currentViewType,i,e.optionOverrides,t.dynamicOptionOverrides),o=this.data=Object.assign(Object.assign(Object.assign({viewTitle:this.buildTitle(t.dateProfile,s.options,i.dateEnv),calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},i),s),t),a=i.pluginHooks.optionChangeHandlers,c=r&&r.calendarOptions,u=i.calendarOptions;if(c&&c!==u){c.timeZone!==u.timeZone&&(t.eventSources=o.eventSources=ML(o.eventSources,t.dateProfile,o),t.eventStore=o.eventStore=Fv(o.eventStore,r.dateEnv,o.dateEnv),t.renderableEventStore=o.renderableEventStore=Fv(o.renderableEventStore,r.dateEnv,o.dateEnv));for(let f in a)(this.optionsForHandling.indexOf(f)!==-1||c[f]!==u[f])&&a[f](u[f],o)}this.optionsForHandling=[],e.onData&&e.onData(o)}computeOptionsData(e,t,r){if(!this.optionsForRefining.length&&e===this.stableOptionOverrides&&t===this.stableDynamicOptionOverrides)return this.stableCalendarOptionsData;let{refinedOptions:i,pluginHooks:s,localeDefaults:o,availableLocaleData:a,extra:c}=this.processRawCalendarOptions(e,t);UC(c);let u=this.buildDateEnv(i.timeZone,i.locale,i.weekNumberCalculation,i.firstDay,i.weekText,s,a,i.defaultRangeSeparator),f=this.buildViewSpecs(s.views,this.stableOptionOverrides,this.stableDynamicOptionOverrides,o),p=this.buildTheme(i,s),h=this.parseToolbars(i,this.stableOptionOverrides,p,f,r);return this.stableCalendarOptionsData={calendarOptions:i,pluginHooks:s,dateEnv:u,viewSpecs:f,theme:p,toolbarConfig:h,localeDefaults:o,availableRawLocales:a.map}}processRawCalendarOptions(e,t){let{locales:r,locale:i}=Xd([Yi,e,t]),s=this.organizeRawLocales(r),o=s.map,a=this.buildLocale(i||s.defaultCode,o).options,c=this.buildPluginHooks(e.plugins||[],oF),u=this.currentCalendarOptionsRefiners=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},gv),mv),vv),c.listenerRefiners),c.optionRefiners),f={},p=Xd([Yi,a,e,t]),h={},y=this.currentCalendarOptionsInput,_=this.currentCalendarOptionsRefined,w=!1;for(let E in p)this.optionsForRefining.indexOf(E)===-1&&(p[E]===y[E]||Gi[E]&&E in y&&Gi[E](y[E],p[E]))?h[E]=_[E]:u[E]?(h[E]=u[E](p[E]),w=!0):f[E]=y[E];return w&&(this.currentCalendarOptionsInput=p,this.currentCalendarOptionsRefined=h,this.stableOptionOverrides=e,this.stableDynamicOptionOverrides=t),this.optionsForHandling.push(...this.optionsForRefining),this.optionsForRefining=[],{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:c,availableLocaleData:s,localeDefaults:a,extra:f}}_computeCurrentViewData(e,t,r,i){let s=t.viewSpecs[e];if(!s)throw new Error(`viewType "${e}" is not available. Please make sure you've loaded all neccessary plugins`);let{refinedOptions:o,extra:a}=this.processRawViewOptions(s,t.pluginHooks,t.localeDefaults,r,i);UC(a);let c=this.buildDateProfileGenerator({dateProfileGeneratorClass:s.optionDefaults.dateProfileGeneratorClass,duration:s.duration,durationUnit:s.durationUnit,usesMinMaxTime:s.optionDefaults.usesMinMaxTime,dateEnv:t.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:o.slotMinTime,slotMaxTime:o.slotMaxTime,showNonCurrentDates:o.showNonCurrentDates,dayCount:o.dayCount,dateAlignment:o.dateAlignment,dateIncrement:o.dateIncrement,hiddenDays:o.hiddenDays,weekends:o.weekends,nowInput:o.now,validRangeInput:o.validRange,visibleRangeInput:o.visibleRange,fixedWeekCount:o.fixedWeekCount}),u=this.buildViewApi(e,this.getCurrentData,t.dateEnv);return{viewSpec:s,options:o,dateProfileGenerator:c,viewApi:u}}processRawViewOptions(e,t,r,i,s){let o=Xd([Yi,e.optionDefaults,r,i,e.optionOverrides,s]),a=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},gv),mv),vv),rC),t.listenerRefiners),t.optionRefiners),c={},u=this.currentViewOptionsInput,f=this.currentViewOptionsRefined,p=!1,h={};for(let y in o)o[y]===u[y]||Gi[y]&&Gi[y](o[y],u[y])?c[y]=f[y]:(o[y]===this.currentCalendarOptionsInput[y]||Gi[y]&&Gi[y](o[y],this.currentCalendarOptionsInput[y])?y in this.currentCalendarOptionsRefined&&(c[y]=this.currentCalendarOptionsRefined[y]):a[y]?c[y]=a[y](o[y]):h[y]=o[y],p=!0);return p&&(this.currentViewOptionsInput=o,this.currentViewOptionsRefined=c),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:h}}};function cF(n,e,t,r,i,s,o,a){let c=KC(e||o.defaultCode,o.map);return new Sl({calendarSystem:"gregory",timeZone:n,namedTimeZoneImpl:s.namedTimeZonedImpl,locale:c,weekNumberCalculation:t,firstDay:r,weekText:i,cmdFormatter:s.cmdFormatter,defaultSeparator:a})}function uF(n,e){let t=e.themeClasses[n.themeSystem]||jr;return new t(n)}function dF(n){let e=n.dateProfileGeneratorClass||Bs;return new e(n)}function fF(n,e,t){return new Uv(n,e,t)}function hF(n){return ar(n,e=>e.ui)}function pF(n,e,t){let r={"":e};for(let i in n){let s=n[i];s.sourceId&&t[s.sourceId]&&(r[i]=t[s.sourceId])}return r}function gF(n){let{options:e}=n;return{eventUiSingleBase:Qo({display:e.eventDisplay,editable:e.editable,startEditable:e.eventStartEditable,durationEditable:e.eventDurationEditable,constraint:e.eventConstraint,overlap:typeof e.eventOverlap=="boolean"?e.eventOverlap:void 0,allow:e.eventAllow,backgroundColor:e.eventBackgroundColor,borderColor:e.eventBorderColor,textColor:e.eventTextColor,color:e.eventColor},n),selectionConfig:Qo({constraint:e.selectConstraint,overlap:typeof e.selectOverlap=="boolean"?e.selectOverlap:void 0,allow:e.selectAllow},n)}}function zv(n,e){for(let t of e.pluginHooks.isLoadingFuncs)if(t(n))return!0;return!1}function mF(n){return Ev(n.options.businessHours,n)}function UC(n,e){for(let t in n)console.warn(`Unknown option '${t}'`+(e?` for view '${e}'`:""))}var Kv=class extends pt{render(){let e=this.props.widgetGroups.map(t=>this.renderWidgetGroup(t));return j("div",{className:"fc-toolbar-chunk"},...e)}renderWidgetGroup(e){let{props:t}=this,{theme:r}=this.context,i=[],s=!0;for(let o of e){let{buttonName:a,buttonClick:c,buttonText:u,buttonIcon:f,buttonHint:p}=o;if(a==="title")s=!1,i.push(j("h2",{className:"fc-toolbar-title",id:t.titleId},t.title));else{let h=a===t.activeButton,y=!t.isTodayEnabled&&a==="today"||!t.isPrevEnabled&&a==="prev"||!t.isNextEnabled&&a==="next",_=[`fc-${a}-button`,r.getClass("button")];h&&_.push(r.getClass("buttonActive")),i.push(j("button",{type:"button",title:typeof p=="function"?p(t.navUnit):p,disabled:y,"aria-pressed":h,className:_.join(" "),onClick:c},u||(f?j("span",{className:f}):"")))}}if(i.length>1){let o=s&&r.getClass("buttonGroup")||"";return j("div",{className:o},...i)}return i[0]}},uf=class extends pt{render(){let{model:e,extraClassName:t}=this.props,r=!1,i,s,o=e.sectionWidgets,a=o.center;return o.left?(r=!0,i=o.left):i=o.start,o.right?(r=!0,s=o.right):s=o.end,j("div",{className:[t||"","fc-toolbar",r?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",i||[]),this.renderSection("center",a||[]),this.renderSection("end",s||[]))}renderSection(e,t){let{props:r}=this;return j(Kv,{key:e,widgetGroups:t,title:r.title,navUnit:r.navUnit,activeButton:r.activeButton,isTodayEnabled:r.isTodayEnabled,isPrevEnabled:r.isPrevEnabled,isNextEnabled:r.isNextEnabled,titleId:r.titleId})}},Qv=class extends pt{constructor(){super(...arguments),this.state={availableWidth:null},this.handleEl=e=>{this.el=e,dr(this.props.elRef,e),this.updateAvailableWidth()},this.handleResize=()=>{this.updateAvailableWidth()}}render(){let{props:e,state:t}=this,{aspectRatio:r}=e,i=["fc-view-harness",r||e.liquid||e.height?"fc-view-harness-active":"fc-view-harness-passive"],s="",o="";return r?t.availableWidth!==null?s=t.availableWidth/r:o=`${1/r*100}%`:s=e.height||"",j("div",{"aria-labelledby":e.labeledById,ref:this.handleEl,className:i.join(" "),style:{height:s,paddingBottom:o}},e.children)}componentDidMount(){this.context.addResizeHandler(this.handleResize)}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}updateAvailableWidth(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})}},Xv=class extends wr{constructor(e){super(e),this.handleSegClick=(t,r)=>{let{component:i}=this,{context:s}=i,o=fi(r);if(o&&i.isValidSegDownEl(t.target)){let a=on(t.target,".fc-event-forced-url"),c=a?a.querySelector("a[href]").href:"";s.emitter.trigger("eventClick",{el:r,event:new xt(i.context,o.eventRange.def,o.eventRange.instance),jsEvent:t,view:s.viewApi}),c&&!t.defaultPrevented&&(window.location.href=c)}},this.destroy=tv(e.el,"click",".fc-event",this.handleSegClick)}},Zv=class extends wr{constructor(e){super(e),this.handleEventElRemove=t=>{t===this.currentSegEl&&this.handleSegLeave(null,this.currentSegEl)},this.handleSegEnter=(t,r)=>{fi(r)&&(this.currentSegEl=r,this.triggerEvent("eventMouseEnter",t,r))},this.handleSegLeave=(t,r)=>{this.currentSegEl&&(this.currentSegEl=null,this.triggerEvent("eventMouseLeave",t,r))},this.removeHoverListeners=YT(e.el,".fc-event",this.handleSegEnter,this.handleSegLeave)}destroy(){this.removeHoverListeners()}triggerEvent(e,t,r){let{component:i}=this,{context:s}=i,o=fi(r);(!t||i.isValidSegDownEl(t.target))&&s.emitter.trigger(e,{el:r,event:new xt(s,o.eventRange.def,o.eventRange.instance),jsEvent:t,view:s.viewApi})}},Jv=class extends Mr{constructor(){super(...arguments),this.buildViewContext=ze(hC),this.buildViewPropTransformers=ze(yF),this.buildToolbarProps=ze(vF),this.headerRef=nn(),this.footerRef=nn(),this.interactionsStore={},this.state={viewLabelId:cr()},this.registerInteractiveComponent=(e,t)=>{let r=_C(e,t),o=[Xv,Zv].concat(this.props.pluginHooks.componentInteractions).map(a=>new a(r));this.interactionsStore[e.uid]=o,ta[e.uid]=r},this.unregisterInteractiveComponent=e=>{let t=this.interactionsStore[e.uid];if(t){for(let r of t)r.destroy();delete this.interactionsStore[e.uid]}delete ta[e.uid]},this.resizeRunner=new zs(()=>{this.props.emitter.trigger("_resize",!0),this.props.emitter.trigger("windowResize",{view:this.props.viewApi})}),this.handleWindowResize=e=>{let{options:t}=this.props;t.handleWindowResize&&e.target===window&&this.resizeRunner.request(t.windowResizeDelay)}}render(){let{props:e}=this,{toolbarConfig:t,options:r}=e,i=this.buildToolbarProps(e.viewSpec,e.dateProfile,e.dateProfileGenerator,e.currentDate,Jo(e.options.now,e.dateEnv),e.viewTitle),s=!1,o="",a;e.isHeightAuto||e.forPrint?o="":r.height!=null?s=!0:r.contentHeight!=null?o=r.contentHeight:a=Math.max(r.aspectRatio,.5);let c=this.buildViewContext(e.viewSpec,e.viewApi,e.options,e.dateProfileGenerator,e.dateEnv,e.theme,e.pluginHooks,e.dispatch,e.getCurrentData,e.emitter,e.calendarApi,this.registerInteractiveComponent,this.unregisterInteractiveComponent),u=t.header&&t.header.hasTitle?this.state.viewLabelId:"";return j(ur.Provider,{value:c},t.header&&j(uf,Object.assign({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:t.header,titleId:u},i)),j(Qv,{liquid:s,height:o,aspectRatio:a,labeledById:u},this.renderView(e),this.buildAppendContent()),t.footer&&j(uf,Object.assign({ref:this.footerRef,extraClassName:"fc-footer-toolbar",model:t.footer,titleId:""},i)))}componentDidMount(){let{props:e}=this;this.calendarInteractions=e.pluginHooks.calendarInteractions.map(r=>new r(e)),window.addEventListener("resize",this.handleWindowResize);let{propSetHandlers:t}=e.pluginHooks;for(let r in t)t[r](e[r],e)}componentDidUpdate(e){let{props:t}=this,{propSetHandlers:r}=t.pluginHooks;for(let i in r)t[i]!==e[i]&&r[i](t[i],t)}componentWillUnmount(){window.removeEventListener("resize",this.handleWindowResize),this.resizeRunner.clear();for(let e of this.calendarInteractions)e.destroy();this.props.emitter.trigger("_unmount")}buildAppendContent(){let{props:e}=this,t=e.pluginHooks.viewContainerAppends.map(r=>r(e));return j(yt,{},...t)}renderView(e){let{pluginHooks:t}=e,{viewSpec:r}=e,i={dateProfile:e.dateProfile,businessHours:e.businessHours,eventStore:e.renderableEventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,isHeightAuto:e.isHeightAuto,forPrint:e.forPrint},s=this.buildViewPropTransformers(t.viewPropsTransformers);for(let a of s)Object.assign(i,a.transform(i,e));let o=r.component;return j(o,Object.assign({},i))}};function vF(n,e,t,r,i,s){let o=t.build(i,void 0,!1),a=t.buildPrev(e,r,!1),c=t.buildNext(e,r,!1);return{title:s,activeButton:n.type,navUnit:n.singleUnit,isTodayEnabled:o.isValid&&!or(e.currentRange,i),isPrevEnabled:a.isValid,isNextEnabled:c.isValid}}function yF(n){return n.map(e=>new e)}var df=class extends Ol{constructor(e,t={}){super(),this.isRendering=!1,this.isRendered=!1,this.currentClassNames=[],this.customContentRenderId=0,this.handleAction=r=>{switch(r.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":this.renderRunner.tryDrain()}},this.handleData=r=>{this.currentData=r,this.renderRunner.request(r.calendarOptions.rerenderDelay)},this.handleRenderRequest=()=>{if(this.isRendering){this.isRendered=!0;let{currentData:r}=this;Ov(()=>{Bi(j(Dl,{options:r.calendarOptions,theme:r.theme,emitter:r.emitter},(i,s,o,a)=>(this.setClassNames(i),this.setHeight(s),j(Lv.Provider,{value:this.customContentRenderId},j(Jv,Object.assign({isHeightAuto:o,forPrint:a},r))))),this.el)})}else this.isRendered&&(this.isRendered=!1,Bi(null,this.el),this.setClassNames([]),this.setHeight(""))},$T(e),this.el=e,this.renderRunner=new zs(this.handleRenderRequest),new Gv({optionOverrides:t,calendarApi:this,onAction:this.handleAction,onData:this.handleData})}render(){let e=this.isRendering;e?this.customContentRenderId+=1:this.isRendering=!0,this.renderRunner.request(),e&&this.updateSize()}destroy(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())}updateSize(){Ov(()=>{super.updateSize()})}batchRendering(e){this.renderRunner.pause("batchRendering"),e(),this.renderRunner.resume("batchRendering")}pauseRendering(){this.renderRunner.pause("pauseRendering")}resumeRendering(){this.renderRunner.resume("pauseRendering",!0)}resetOptions(e,t){this.currentDataManager.resetOptions(e,t)}setClassNames(e){if(!Pr(e,this.currentClassNames)){let{classList:t}=this.el;for(let r of this.currentClassNames)t.remove(r);for(let r of e)t.add(r);this.currentClassNames=e}}setHeight(e){ev(this.el,"height",e)}};var EF=':root{--fc-daygrid-event-dot-width:8px}.fc-daygrid-day-events:after,.fc-daygrid-day-events:before,.fc-daygrid-day-frame:after,.fc-daygrid-day-frame:before,.fc-daygrid-event-harness:after,.fc-daygrid-event-harness:before{clear:both;content:"";display:table}.fc .fc-daygrid-body{position:relative;z-index:1}.fc .fc-daygrid-day.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-daygrid-day-frame{min-height:100%;position:relative}.fc .fc-daygrid-day-top{display:flex;flex-direction:row-reverse}.fc .fc-day-other .fc-daygrid-day-top{opacity:.3}.fc .fc-daygrid-day-number{padding:4px;position:relative;z-index:4}.fc .fc-daygrid-month-start{font-size:1.1em;font-weight:700}.fc .fc-daygrid-day-events{margin-top:1px}.fc .fc-daygrid-body-balanced .fc-daygrid-day-events{left:0;position:absolute;right:0}.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events{min-height:2em;position:relative}.fc .fc-daygrid-body-natural .fc-daygrid-day-events{margin-bottom:1em}.fc .fc-daygrid-event-harness{position:relative}.fc .fc-daygrid-event-harness-abs{left:0;position:absolute;right:0;top:0}.fc .fc-daygrid-bg-harness{bottom:0;position:absolute;top:0}.fc .fc-daygrid-day-bg .fc-non-business{z-index:1}.fc .fc-daygrid-day-bg .fc-bg-event{z-index:2}.fc .fc-daygrid-day-bg .fc-highlight{z-index:3}.fc .fc-daygrid-event{margin-top:1px;z-index:6}.fc .fc-daygrid-event.fc-event-mirror{z-index:7}.fc .fc-daygrid-day-bottom{font-size:.85em;margin:0 2px}.fc .fc-daygrid-day-bottom:after,.fc .fc-daygrid-day-bottom:before{clear:both;content:"";display:table}.fc .fc-daygrid-more-link{border-radius:3px;cursor:pointer;line-height:1;margin-top:1px;max-width:100%;overflow:hidden;padding:2px;position:relative;white-space:nowrap;z-index:4}.fc .fc-daygrid-more-link:hover{background-color:rgba(0,0,0,.1)}.fc .fc-daygrid-week-number{background-color:var(--fc-neutral-bg-color);color:var(--fc-neutral-text-color);min-width:1.5em;padding:2px;position:absolute;text-align:center;top:0;z-index:5}.fc .fc-more-popover .fc-popover-body{min-width:220px;padding:10px}.fc-direction-ltr .fc-daygrid-event.fc-event-start,.fc-direction-rtl .fc-daygrid-event.fc-event-end{margin-left:2px}.fc-direction-ltr .fc-daygrid-event.fc-event-end,.fc-direction-rtl .fc-daygrid-event.fc-event-start{margin-right:2px}.fc-direction-ltr .fc-daygrid-more-link{float:left}.fc-direction-ltr .fc-daygrid-week-number{border-radius:0 0 3px 0;left:0}.fc-direction-rtl .fc-daygrid-more-link{float:right}.fc-direction-rtl .fc-daygrid-week-number{border-radius:0 0 0 3px;right:0}.fc-liquid-hack .fc-daygrid-day-frame{position:static}.fc-daygrid-event{border-radius:3px;font-size:var(--fc-small-font-size);position:relative;white-space:nowrap}.fc-daygrid-block-event .fc-event-time{font-weight:700}.fc-daygrid-block-event .fc-event-time,.fc-daygrid-block-event .fc-event-title{padding:1px}.fc-daygrid-dot-event{align-items:center;display:flex;padding:2px 0}.fc-daygrid-dot-event .fc-event-title{flex-grow:1;flex-shrink:1;font-weight:700;min-width:0;overflow:hidden}.fc-daygrid-dot-event.fc-event-mirror,.fc-daygrid-dot-event:hover{background:rgba(0,0,0,.1)}.fc-daygrid-dot-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-daygrid-event-dot{border:calc(var(--fc-daygrid-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-daygrid-event-dot-width)/2);box-sizing:content-box;height:0;margin:0 4px;width:0}.fc-direction-ltr .fc-daygrid-event .fc-event-time{margin-right:3px}.fc-direction-rtl .fc-daygrid-event .fc-event-time{margin-left:3px}';Wi(EF);function ff(n,e){let t=[];for(let r=0;r<e;r+=1)t[r]=[];for(let r of n)t[r.row].push(r);return t}function hf(n,e){let t=[];for(let r=0;r<e;r+=1)t[r]=[];for(let r of n)t[r.firstCol].push(r);return t}function n0(n,e){let t=[];if(n){for(let r=0;r<e;r+=1)t[r]={affectedInstances:n.affectedInstances,isEvent:n.isEvent,segs:[]};for(let r of n.segs)t[r.row].segs.push(r)}else for(let r=0;r<e;r+=1)t[r]=null;return t}var r0=Ct({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function i0(n){let{display:e}=n.eventRange.ui;return e==="list-item"||e==="auto"&&!n.eventRange.def.allDay&&n.firstCol===n.lastCol&&n.isStart&&n.isEnd}var pf=class extends pt{render(){let{props:e}=this;return j(Ws,Object.assign({},e,{elClasses:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:r0,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))}},gf=class extends pt{render(){let{props:e,context:t}=this,{options:r}=t,{seg:i}=e,s=r.eventTimeFormat||r0,o=Ki(i,s,t,!0,e.defaultDisplayEventEnd);return j(ui,Object.assign({},e,{elTag:"a",elClasses:["fc-daygrid-event","fc-daygrid-dot-event"],elAttrs:ea(e.seg,t),defaultGenerator:_F,timeText:o,isResizing:!1,isDateSelecting:!1}))}};function _F(n){return j(yt,null,j("div",{className:"fc-daygrid-event-dot",style:{borderColor:n.borderColor||n.backgroundColor}}),n.timeText&&j("div",{className:"fc-event-time"},n.timeText),j("div",{className:"fc-event-title"},n.event.title||j(yt,null,"\xA0")))}var ty=class extends pt{constructor(){super(...arguments),this.compileSegs=ze(wF)}render(){let{props:e}=this,{allSegs:t,invisibleSegs:r}=this.compileSegs(e.singlePlacements);return j(Ys,{elClasses:["fc-daygrid-more-link"],dateProfile:e.dateProfile,todayRange:e.todayRange,allDayDate:e.allDayDate,moreCnt:e.moreCnt,allSegs:t,hiddenSegs:r,alignmentElRef:e.alignmentElRef,alignGridTop:e.alignGridTop,extraDateSpan:e.extraDateSpan,popoverContent:()=>{let i=(e.eventDrag?e.eventDrag.affectedInstances:null)||(e.eventResize?e.eventResize.affectedInstances:null)||{};return j(yt,null,t.map(s=>{let o=s.eventRange.instance.instanceId;return j("div",{className:"fc-daygrid-event-harness",key:o,style:{visibility:i[o]?"hidden":""}},i0(s)?j(gf,Object.assign({seg:s,isDragging:!1,isSelected:o===e.eventSelection,defaultDisplayEventEnd:!1},Kn(s,e.todayRange))):j(pf,Object.assign({seg:s,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:o===e.eventSelection,defaultDisplayEventEnd:!1},Kn(s,e.todayRange))))}))}})}};function wF(n){let e=[],t=[];for(let r of n)e.push(r.seg),r.isVisible||t.push(r.seg);return{allSegs:e,invisibleSegs:t}}var SF=Ct({week:"narrow"}),ny=class extends vn{constructor(){super(...arguments),this.rootElRef=nn(),this.state={dayNumberId:cr()},this.handleRootEl=e=>{dr(this.rootElRef,e),dr(this.props.elRef,e)}}render(){let{context:e,props:t,state:r,rootElRef:i}=this,{options:s,dateEnv:o}=e,{date:a,dateProfile:c}=t,u=t.showDayNumber&&CF(a,c.currentRange,o);return j(zi,{elTag:"td",elRef:this.handleRootEl,elClasses:["fc-daygrid-day",...t.extraClassNames||[]],elAttrs:Object.assign(Object.assign(Object.assign({},t.extraDataAttrs),t.showDayNumber?{"aria-labelledby":r.dayNumberId}:{}),{role:"gridcell"}),defaultGenerator:TF,date:a,dateProfile:c,todayRange:t.todayRange,showDayNumber:t.showDayNumber,isMonthStart:u,extraRenderProps:t.extraRenderProps},(f,p)=>j("div",{ref:t.innerElRef,className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",style:{minHeight:t.minHeight}},t.showWeekNumber&&j(Gl,{elTag:"a",elClasses:["fc-daygrid-week-number"],elAttrs:Fr(e,a,"week"),date:a,defaultFormat:SF}),!p.isDisabled&&(t.showDayNumber||ra(s)||t.forceDayTop)?j("div",{className:"fc-daygrid-day-top"},j(f,{elTag:"a",elClasses:["fc-daygrid-day-number",u&&"fc-daygrid-month-start"],elAttrs:Object.assign(Object.assign({},Fr(e,a)),{id:r.dayNumberId})})):t.showDayNumber?j("div",{className:"fc-daygrid-day-top",style:{visibility:"hidden"}},j("a",{className:"fc-daygrid-day-number"},"\xA0")):void 0,j("div",{className:"fc-daygrid-day-events",ref:t.fgContentElRef},t.fgContent,j("div",{className:"fc-daygrid-day-bottom",style:{marginTop:t.moreMarginTop}},j(ty,{allDayDate:a,singlePlacements:t.singlePlacements,moreCnt:t.moreCnt,alignmentElRef:i,alignGridTop:!t.showDayNumber,extraDateSpan:t.extraDateSpan,dateProfile:t.dateProfile,eventSelection:t.eventSelection,eventDrag:t.eventDrag,eventResize:t.eventResize,todayRange:t.todayRange}))),j("div",{className:"fc-daygrid-day-bg"},t.bgContent)))}};function TF(n){return n.dayNumberText||j(yt,null,"\xA0")}function CF(n,e,t){let{start:r,end:i}=e,s=Rr(i,-1),o=t.getYear(r),a=t.getMonth(r),c=t.getYear(s),u=t.getMonth(s);return!(o===c&&a===u)&&Boolean(n.valueOf()===r.valueOf()||t.getDay(n)===1&&n.valueOf()<i.valueOf())}function AF(n,e,t,r,i,s,o){let a=new ry;a.allowReslicing=!0,a.strictOrder=r,e===!0||t===!0?(a.maxCoord=s,a.hiddenConsumes=!0):typeof e=="number"?a.maxStackCnt=e:typeof t=="number"&&(a.maxStackCnt=t,a.hiddenConsumes=!0);let c=[],u=[];for(let D=0;D<n.length;D+=1){let R=n[D],{instanceId:H}=R.eventRange.instance,F=i[H];F!=null?c.push({index:D,thickness:F,span:{start:R.firstCol,end:R.lastCol+1}}):u.push(R)}let f=a.addSegs(c),p=a.toRects(),{singleColPlacements:h,multiColPlacements:y,leftoverMargins:_}=DF(p,n,o),w=[],E=[];for(let D of u){y[D.firstCol].push({seg:D,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let R=D.firstCol;R<=D.lastCol;R+=1)h[R].push({seg:ia(D,R,R+1,o),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let D=0;D<o.length;D+=1)w.push(0);for(let D of f){let R=n[D.index],H=D.span;y[H.start].push({seg:ia(R,H.start,H.end,o),isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let F=H.start;F<H.end;F+=1)w[F]+=1,h[F].push({seg:ia(R,F,F+1,o),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let D=0;D<o.length;D+=1)E.push(_[D]);return{singleColPlacements:h,multiColPlacements:y,moreCnts:w,moreMarginTops:E}}function DF(n,e,t){let r=xF(n,t.length),i=[],s=[],o=[];for(let a=0;a<t.length;a+=1){let c=r[a],u=[],f=0,p=0;for(let y of c){let _=e[y.index];u.push({seg:ia(_,a,a+1,t),isVisible:!0,isAbsolute:!1,absoluteTop:y.levelCoord,marginTop:y.levelCoord-f}),f=y.levelCoord+y.thickness}let h=[];f=0,p=0;for(let y of c){let _=e[y.index],w=y.span.end-y.span.start>1,E=y.span.start===a;p+=y.levelCoord-f,f=y.levelCoord+y.thickness,w?(p+=y.thickness,E&&h.push({seg:ia(_,y.span.start,y.span.end,t),isVisible:!0,isAbsolute:!0,absoluteTop:y.levelCoord,marginTop:0})):E&&(h.push({seg:ia(_,y.span.start,y.span.end,t),isVisible:!0,isAbsolute:!1,absoluteTop:y.levelCoord,marginTop:p}),p=0)}i.push(u),s.push(h),o.push(p)}return{singleColPlacements:i,multiColPlacements:s,leftoverMargins:o}}function xF(n,e){let t=[];for(let r=0;r<e;r+=1)t.push([]);for(let r of n)for(let i=r.span.start;i<r.span.end;i+=1)t[i].push(r);return t}function ia(n,e,t,r){if(n.firstCol===e&&n.lastCol===t-1)return n;let i=n.eventRange,s=i.range,o=Gn(s,{start:r[e].date,end:Ut(r[t-1].date,1)});return Object.assign(Object.assign({},n),{firstCol:e,lastCol:t-1,eventRange:{def:i.def,ui:Object.assign(Object.assign({},i.ui),{durationEditable:!1}),instance:i.instance,range:o},isStart:n.isStart&&o.start.valueOf()===s.start.valueOf(),isEnd:n.isEnd&&o.end.valueOf()===s.end.valueOf()})}var ry=class extends js{constructor(){super(...arguments),this.hiddenConsumes=!1,this.forceHidden={}}addSegs(e){let t=super.addSegs(e),{entriesByLevel:r}=this,i=s=>!this.forceHidden[Nr(s)];for(let s=0;s<r.length;s+=1)r[s]=r[s].filter(i);return t}handleInvalidInsertion(e,t,r){let{entriesByLevel:i,forceHidden:s}=this,{touchingEntry:o,touchingLevel:a,touchingLateral:c}=e;if(this.hiddenConsumes&&o){let u=Nr(o);if(!s[u])if(this.allowReslicing){let f=Object.assign(Object.assign({},o),{span:Vl(o.span,t.span)}),p=Nr(f);s[p]=!0,i[a][c]=f,this.splitEntry(o,t,r)}else s[u]=!0,r.push(o)}return super.handleInvalidInsertion(e,t,r)}},mf=class extends vn{constructor(){super(...arguments),this.cellElRefs=new Nn,this.frameElRefs=new Nn,this.fgElRefs=new Nn,this.segHarnessRefs=new Nn,this.rootElRef=nn(),this.state={framePositions:null,maxContentHeight:null,eventInstanceHeights:{}},this.handleResize=e=>{e&&this.updateSizing(!0)}}render(){let{props:e,state:t,context:r}=this,{options:i}=r,s=e.cells.length,o=hf(e.businessHourSegs,s),a=hf(e.bgEventSegs,s),c=hf(this.getHighlightSegs(),s),u=hf(this.getMirrorSegs(),s),{singleColPlacements:f,multiColPlacements:p,moreCnts:h,moreMarginTops:y}=AF(Ks(e.fgEventSegs,i.eventOrder),e.dayMaxEvents,e.dayMaxEventRows,i.eventOrderStrict,t.eventInstanceHeights,t.maxContentHeight,e.cells),_=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{};return j("tr",{ref:this.rootElRef,role:"row"},e.renderIntro&&e.renderIntro(),e.cells.map((w,E)=>{let D=this.renderFgSegs(E,e.forPrint?f[E]:p[E],e.todayRange,_),R=this.renderFgSegs(E,OF(u[E],p),e.todayRange,{},Boolean(e.eventDrag),Boolean(e.eventResize),!1);return j(ny,{key:w.key,elRef:this.cellElRefs.createRef(w.key),innerElRef:this.frameElRefs.createRef(w.key),dateProfile:e.dateProfile,date:w.date,showDayNumber:e.showDayNumbers,showWeekNumber:e.showWeekNumbers&&E===0,forceDayTop:e.showWeekNumbers,todayRange:e.todayRange,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,extraRenderProps:w.extraRenderProps,extraDataAttrs:w.extraDataAttrs,extraClassNames:w.extraClassNames,extraDateSpan:w.extraDateSpan,moreCnt:h[E],moreMarginTop:y[E],singlePlacements:f[E],fgContentElRef:this.fgElRefs.createRef(w.key),fgContent:j(yt,null,j(yt,null,D),j(yt,null,R)),bgContent:j(yt,null,this.renderFillSegs(c[E],"highlight"),this.renderFillSegs(o[E],"non-business"),this.renderFillSegs(a[E],"bg-event")),minHeight:e.cellMinHeight})}))}componentDidMount(){this.updateSizing(!0),this.context.addResizeHandler(this.handleResize)}componentDidUpdate(e,t){let r=this.props;this.updateSizing(!Yn(e,r))}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}getHighlightSegs(){let{props:e}=this;return e.eventDrag&&e.eventDrag.segs.length?e.eventDrag.segs:e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:e.dateSelectionSegs}getMirrorSegs(){let{props:e}=this;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]}renderFgSegs(e,t,r,i,s,o,a){let{context:c}=this,{eventSelection:u}=this.props,{framePositions:f}=this.state,p=this.props.cells.length===1,h=s||o||a,y=[];if(f)for(let _ of t){let{seg:w}=_,{instanceId:E}=w.eventRange.instance,D=E+":"+e,R=_.isVisible&&!i[E],H=_.isAbsolute,F="",m="";H&&(c.isRtl?(m=0,F=f.lefts[w.lastCol]-f.lefts[w.firstCol]):(F=0,m=f.rights[w.firstCol]-f.rights[w.lastCol])),y.push(j("div",{className:"fc-daygrid-event-harness"+(H?" fc-daygrid-event-harness-abs":""),key:D,ref:h?null:this.segHarnessRefs.createRef(D),style:{visibility:R?"":"hidden",marginTop:H?"":_.marginTop,top:H?_.absoluteTop:"",left:F,right:m}},i0(w)?j(gf,Object.assign({seg:w,isDragging:s,isSelected:E===u,defaultDisplayEventEnd:p},Kn(w,r))):j(pf,Object.assign({seg:w,isDragging:s,isResizing:o,isDateSelecting:a,isSelected:E===u,defaultDisplayEventEnd:p},Kn(w,r)))))}return y}renderFillSegs(e,t){let{isRtl:r}=this.context,{todayRange:i}=this.props,{framePositions:s}=this.state,o=[];if(s)for(let a of e){let c=r?{right:0,left:s.lefts[a.lastCol]-s.lefts[a.firstCol]}:{left:0,right:s.rights[a.firstCol]-s.rights[a.lastCol]};o.push(j("div",{key:ql(a.eventRange),className:"fc-daygrid-bg-harness",style:c},t==="bg-event"?j(Us,Object.assign({seg:a},Kn(a,i))):Yl(t)))}return j(yt,{},...o)}updateSizing(e){let{props:t,state:r,frameElRefs:i}=this;if(!t.forPrint&&t.clientWidth!==null){if(e){let c=t.cells.map(u=>i.currentMap[u.key]);if(c.length){let u=this.rootElRef.current,f=new _r(u,c,!0,!1);(!r.framePositions||!r.framePositions.similarTo(f))&&this.setState({framePositions:new _r(u,c,!0,!1)})}}let s=this.state.eventInstanceHeights,o=this.queryEventInstanceHeights(),a=t.dayMaxEvents===!0||t.dayMaxEventRows===!0;this.safeSetState({eventInstanceHeights:Object.assign(Object.assign({},s),o),maxContentHeight:a?this.computeMaxContentHeight():null})}}queryEventInstanceHeights(){let e=this.segHarnessRefs.currentMap,t={};for(let r in e){let i=Math.round(e[r].getBoundingClientRect().height),s=r.split(":")[0];t[s]=Math.max(t[s]||0,i)}return t}computeMaxContentHeight(){let e=this.props.cells[0].key,t=this.cellElRefs.currentMap[e],r=this.fgElRefs.currentMap[e];return t.getBoundingClientRect().bottom-r.getBoundingClientRect().top}getCellEls(){let e=this.cellElRefs.currentMap;return this.props.cells.map(t=>e[t.key])}};mf.addStateEquality({eventInstanceHeights:Yn});function OF(n,e){if(!n.length)return[];let t=IF(e);return n.map(r=>({seg:r,isVisible:!0,isAbsolute:!0,absoluteTop:t[r.eventRange.instance.instanceId],marginTop:0}))}function IF(n){let e={};for(let t of n)for(let r of t)e[r.seg.eventRange.instance.instanceId]=r.absoluteTop;return e}var iy=class extends vn{constructor(){super(...arguments),this.splitBusinessHourSegs=ze(ff),this.splitBgEventSegs=ze(ff),this.splitFgEventSegs=ze(ff),this.splitDateSelectionSegs=ze(ff),this.splitEventDrag=ze(n0),this.splitEventResize=ze(n0),this.rowRefs=new Nn}render(){let{props:e,context:t}=this,r=e.cells.length,i=this.splitBusinessHourSegs(e.businessHourSegs,r),s=this.splitBgEventSegs(e.bgEventSegs,r),o=this.splitFgEventSegs(e.fgEventSegs,r),a=this.splitDateSelectionSegs(e.dateSelectionSegs,r),c=this.splitEventDrag(e.eventDrag,r),u=this.splitEventResize(e.eventResize,r),f=r>=7&&e.clientWidth?e.clientWidth/t.options.aspectRatio/6:null;return j(lr,{unit:"day"},(p,h)=>j(yt,null,e.cells.map((y,_)=>j(mf,{ref:this.rowRefs.createRef(_),key:y.length?y[0].date.toISOString():_,showDayNumbers:r>1,showWeekNumbers:e.showWeekNumbers,todayRange:h,dateProfile:e.dateProfile,cells:y,renderIntro:e.renderRowIntro,businessHourSegs:i[_],eventSelection:e.eventSelection,bgEventSegs:s[_].filter(kF),fgEventSegs:o[_],dateSelectionSegs:a[_],eventDrag:c[_],eventResize:u[_],dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,clientWidth:e.clientWidth,clientHeight:e.clientHeight,cellMinHeight:f,forPrint:e.forPrint}))))}componentDidMount(){let e=this.rowRefs.currentMap[0].getCellEls()[0];this.rootEl=e?e.closest(".fc-daygrid-body"):null,this.rootEl&&this.context.registerInteractiveComponent(this,{el:this.rootEl,isHitComboAllowed:this.props.isHitComboAllowed})}componentWillUnmount(){this.rootEl&&(this.context.unregisterInteractiveComponent(this),this.rootEl=null)}prepareHits(){this.rowPositions=new _r(this.rootEl,this.rowRefs.collect().map(e=>e.getCellEls()[0]),!1,!0),this.colPositions=new _r(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)}queryHit(e,t){let{colPositions:r,rowPositions:i}=this,s=r.leftToIndex(e),o=i.topToIndex(t);if(o!=null&&s!=null){let a=this.props.cells[o][s];return{dateProfile:this.props.dateProfile,dateSpan:Object.assign({range:this.getCellRange(o,s),allDay:!0},a.extraDateSpan),dayEl:this.getCellEl(o,s),rect:{left:r.lefts[s],right:r.rights[s],top:i.tops[o],bottom:i.bottoms[o]},layer:0}}return null}getCellEl(e,t){return this.rowRefs.currentMap[e].getCellEls()[t]}getCellRange(e,t){let r=this.props.cells[e][t].date,i=Ut(r,1);return{start:r,end:i}}};function kF(n){return n.eventRange.def.allDay}var sy=class extends vn{constructor(){super(...arguments),this.elRef=nn(),this.needsScrollReset=!1}render(){let{props:e}=this,{dayMaxEventRows:t,dayMaxEvents:r,expandRows:i}=e,s=r===!0||t===!0;s&&!i&&(s=!1,t=null,r=null);let o=["fc-daygrid-body",s?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",i?"":"fc-daygrid-body-natural"];return j("div",{ref:this.elRef,className:o.join(" "),style:{width:e.clientWidth,minWidth:e.tableMinWidth}},j("table",{role:"presentation",className:"fc-scrollgrid-sync-table",style:{width:e.clientWidth,minWidth:e.tableMinWidth,height:i?e.clientHeight:""}},e.colGroupNode,j("tbody",{role:"presentation"},j(iy,{dateProfile:e.dateProfile,cells:e.cells,renderRowIntro:e.renderRowIntro,showWeekNumbers:e.showWeekNumbers,clientWidth:e.clientWidth,clientHeight:e.clientHeight,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,dayMaxEvents:r,dayMaxEventRows:t,forPrint:e.forPrint,isHitComboAllowed:e.isHitComboAllowed}))))}componentDidMount(){this.requestScrollReset()}componentDidUpdate(e){e.dateProfile!==this.props.dateProfile?this.requestScrollReset():this.flushScrollReset()}requestScrollReset(){this.needsScrollReset=!0,this.flushScrollReset()}flushScrollReset(){if(this.needsScrollReset&&this.props.clientWidth){let e=RF(this.elRef.current,this.props.dateProfile);if(e){let t=e.closest(".fc-daygrid-body"),r=t.closest(".fc-scroller"),i=e.getBoundingClientRect().top-t.getBoundingClientRect().top;r.scrollTop=i?i+1:0}this.needsScrollReset=!1}}};function RF(n,e){let t;return e.currentRangeUnit.match(/year|month/)&&(t=n.querySelector(`[data-date="${fv(e.currentDate)}-01"]`)),t||(t=n.querySelector(`[data-date="${Ui(e.currentDate)}"]`)),t}var oy=class extends $s{constructor(){super(...arguments),this.forceDayIfListItem=!0}sliceRange(e,t){return t.sliceRange(e)}},Kl=class extends vn{constructor(){super(...arguments),this.slicer=new oy,this.tableRef=nn()}render(){let{props:e,context:t}=this;return j(sy,Object.assign({ref:this.tableRef},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,t,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))}},vf=class extends Bs{buildRenderRange(e,t,r){let i=super.buildRenderRange(e,t,r),{props:s}=this;return MF({currentRange:i,snapToWeek:/^(year|month)$/.test(t),fixedWeekCount:s.fixedWeekCount,dateEnv:s.dateEnv})}};function MF(n){let{dateEnv:e,currentRange:t}=n,{start:r,end:i}=t,s;if(n.snapToWeek&&(r=e.startOfWeek(r),s=e.startOfWeek(i),s.valueOf()!==i.valueOf()&&(i=Kd(s,1))),n.fixedWeekCount){let o=e.startOfWeek(e.startOfMonth(Ut(t.end,-1))),a=Math.ceil(uv(o,i));i=Kd(i,6-a)}return{start:r,end:i}}var ay=class extends vn{constructor(){super(...arguments),this.headerElRef=nn()}renderSimpleLayout(e,t){let{props:r,context:i}=this,s=[],o=Qs(i.options);return e&&s.push({type:"header",key:"header",isSticky:o,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),s.push({type:"body",key:"body",liquid:!0,chunk:{content:t}}),j(Sr,{elClasses:["fc-daygrid"],viewSpec:i.viewSpec},j($i,{liquid:!r.isHeightAuto&&!r.forPrint,collapsibleWidth:r.forPrint,cols:[],sections:s}))}renderHScrollLayout(e,t,r,i){let s=this.context.pluginHooks.scrollGridImpl;if(!s)throw new Error("No ScrollGrid implementation");let{props:o,context:a}=this,c=!o.forPrint&&Qs(a.options),u=!o.forPrint&&Wl(a.options),f=[];return e&&f.push({type:"header",key:"header",isSticky:c,chunks:[{key:"main",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),f.push({type:"body",key:"body",liquid:!0,chunks:[{key:"main",content:t}]}),u&&f.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"main",content:na}]}),j(Sr,{elClasses:["fc-daygrid"],viewSpec:a.viewSpec},j(s,{liquid:!o.isHeightAuto&&!o.forPrint,forPrint:o.forPrint,collapsibleWidth:o.forPrint,colGroups:[{cols:[{span:r,minWidth:i}]}],sections:f}))}},yf=class extends ay{constructor(){super(...arguments),this.buildDayTableModel=ze(NF),this.headerRef=nn(),this.tableRef=nn()}render(){let{options:e,dateProfileGenerator:t}=this.context,{props:r}=this,i=this.buildDayTableModel(r.dateProfile,t),s=e.dayHeaders&&j(Hs,{ref:this.headerRef,dateProfile:r.dateProfile,dates:i.headerDates,datesRepDistinctDays:i.rowCnt===1}),o=a=>j(Kl,{ref:this.tableRef,dateProfile:r.dateProfile,dayTableModel:i,businessHours:r.businessHours,dateSelection:r.dateSelection,eventStore:r.eventStore,eventUiBases:r.eventUiBases,eventSelection:r.eventSelection,eventDrag:r.eventDrag,eventResize:r.eventResize,nextDayThreshold:e.nextDayThreshold,colGroupNode:a.tableColGroupNode,tableMinWidth:a.tableMinWidth,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.weekNumbers,expandRows:!r.isHeightAuto,headerAlignElRef:this.headerElRef,clientWidth:a.clientWidth,clientHeight:a.clientHeight,forPrint:r.forPrint});return e.dayMinWidth?this.renderHScrollLayout(s,o,i.colCnt,e.dayMinWidth):this.renderSimpleLayout(s,o)}};function NF(n,e){let t=new qs(n.renderRange,e);return new Vs(t,/year|month|week/.test(n.currentRangeUnit))}var s0=Pn({name:"@fullcalendar/daygrid",initialView:"dayGridMonth",views:{dayGrid:{component:yf,dateProfileGeneratorClass:vf},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},fixedWeekCount:!0},dayGridYear:{type:"dayGrid",duration:{years:1}}}});var PF='.fc-v-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-v-event .fc-event-main{color:var(--fc-event-text-color);height:100%}.fc-v-event .fc-event-main-frame{display:flex;flex-direction:column;height:100%}.fc-v-event .fc-event-time{flex-grow:0;flex-shrink:0;max-height:100%;overflow:hidden}.fc-v-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-height:0}.fc-v-event .fc-event-title{bottom:0;max-height:100%;overflow:hidden;top:0}.fc-v-event:not(.fc-event-start){border-top-left-radius:0;border-top-right-radius:0;border-top-width:0}.fc-v-event:not(.fc-event-end){border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-width:0}.fc-v-event.fc-event-selected:before{left:-10px;right:-10px}.fc-v-event .fc-event-resizer-start{cursor:n-resize}.fc-v-event .fc-event-resizer-end{cursor:s-resize}.fc-v-event:not(.fc-event-selected) .fc-event-resizer{height:var(--fc-event-resizer-thickness);left:0;right:0}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-start{top:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer{left:50%;margin-left:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-start{top:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc .fc-timegrid .fc-daygrid-body{z-index:2}.fc .fc-timegrid-divider{padding:0 0 2px}.fc .fc-timegrid-body{min-height:100%;position:relative;z-index:1}.fc .fc-timegrid-axis-chunk{position:relative}.fc .fc-timegrid-axis-chunk>table,.fc .fc-timegrid-slots{position:relative;z-index:1}.fc .fc-timegrid-slot{border-bottom:0;height:1.5em}.fc .fc-timegrid-slot:empty:before{content:"\\00a0"}.fc .fc-timegrid-slot-minor{border-top-style:dotted}.fc .fc-timegrid-slot-label-cushion{display:inline-block;white-space:nowrap}.fc .fc-timegrid-slot-label{vertical-align:middle}.fc .fc-timegrid-axis-cushion,.fc .fc-timegrid-slot-label-cushion{padding:0 4px}.fc .fc-timegrid-axis-frame-liquid{height:100%}.fc .fc-timegrid-axis-frame{align-items:center;display:flex;justify-content:flex-end;overflow:hidden}.fc .fc-timegrid-axis-cushion{flex-shrink:0;max-width:60px}.fc-direction-ltr .fc-timegrid-slot-label-frame{text-align:right}.fc-direction-rtl .fc-timegrid-slot-label-frame{text-align:left}.fc-liquid-hack .fc-timegrid-axis-frame-liquid{bottom:0;height:auto;left:0;position:absolute;right:0;top:0}.fc .fc-timegrid-col.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-timegrid-col-frame{min-height:100%;position:relative}.fc-media-screen.fc-liquid-hack .fc-timegrid-col-frame{bottom:0;height:auto;left:0;position:absolute;right:0;top:0}.fc-media-screen .fc-timegrid-cols{bottom:0;left:0;position:absolute;right:0;top:0}.fc-media-screen .fc-timegrid-cols>table{height:100%}.fc-media-screen .fc-timegrid-col-bg,.fc-media-screen .fc-timegrid-col-events,.fc-media-screen .fc-timegrid-now-indicator-container{left:0;position:absolute;right:0;top:0}.fc .fc-timegrid-col-bg{z-index:2}.fc .fc-timegrid-col-bg .fc-non-business{z-index:1}.fc .fc-timegrid-col-bg .fc-bg-event{z-index:2}.fc .fc-timegrid-col-bg .fc-highlight{z-index:3}.fc .fc-timegrid-bg-harness{left:0;position:absolute;right:0}.fc .fc-timegrid-col-events{z-index:3}.fc .fc-timegrid-now-indicator-container{bottom:0;overflow:hidden}.fc-direction-ltr .fc-timegrid-col-events{margin:0 2.5% 0 2px}.fc-direction-rtl .fc-timegrid-col-events{margin:0 2px 0 2.5%}.fc-timegrid-event-harness{position:absolute}.fc-timegrid-event-harness>.fc-timegrid-event{bottom:0;left:0;position:absolute;right:0;top:0}.fc-timegrid-event-harness-inset .fc-timegrid-event,.fc-timegrid-event.fc-event-mirror,.fc-timegrid-more-link{box-shadow:0 0 0 1px var(--fc-page-bg-color)}.fc-timegrid-event,.fc-timegrid-more-link{border-radius:3px;font-size:var(--fc-small-font-size)}.fc-timegrid-event{margin-bottom:1px}.fc-timegrid-event .fc-event-main{padding:1px 1px 0}.fc-timegrid-event .fc-event-time{font-size:var(--fc-small-font-size);margin-bottom:1px;white-space:nowrap}.fc-timegrid-event-short .fc-event-main-frame{flex-direction:row;overflow:hidden}.fc-timegrid-event-short .fc-event-time:after{content:"\\00a0-\\00a0"}.fc-timegrid-event-short .fc-event-title{font-size:var(--fc-small-font-size)}.fc-timegrid-more-link{background:var(--fc-more-link-bg-color);color:var(--fc-more-link-text-color);cursor:pointer;margin-bottom:1px;position:absolute;z-index:9999}.fc-timegrid-more-link-inner{padding:3px 2px;top:0}.fc-direction-ltr .fc-timegrid-more-link{right:0}.fc-direction-rtl .fc-timegrid-more-link{left:0}.fc .fc-timegrid-now-indicator-line{border-color:var(--fc-now-indicator-color);border-style:solid;border-width:1px 0 0;left:0;position:absolute;right:0;z-index:4}.fc .fc-timegrid-now-indicator-arrow{border-color:var(--fc-now-indicator-color);border-style:solid;margin-top:-5px;position:absolute;z-index:4}.fc-direction-ltr .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 0 5px 6px;left:0}.fc-direction-rtl .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 6px 5px 0;right:0}';Wi(PF);var cy=class extends El{getKeyInfo(){return{allDay:{},timed:{}}}getKeysForDateSpan(e){return e.allDay?["allDay"]:["timed"]}getKeysForEventDef(e){return e.allDay?kv(e)?["timed","allDay"]:["allDay"]:["timed"]}},LF=Ct({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});function u0(n){let e=["fc-timegrid-slot","fc-timegrid-slot-label",n.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return j(ur.Consumer,null,t=>{if(!n.isLabeled)return j("td",{className:e.join(" "),"data-time":n.isoTimeStr});let{dateEnv:r,options:i,viewApi:s}=t,o=i.slotLabelFormat==null?LF:Array.isArray(i.slotLabelFormat)?Ct(i.slotLabelFormat[0]):Ct(i.slotLabelFormat),a={level:0,time:n.time,date:r.toDate(n.date),view:s,text:r.format(n.date,o)};return j(Yt,{elTag:"td",elClasses:e,elAttrs:{"data-time":n.isoTimeStr},renderProps:a,generatorName:"slotLabelContent",customGenerator:i.slotLabelContent,defaultGenerator:FF,classNameGenerator:i.slotLabelClassNames,didMount:i.slotLabelDidMount,willUnmount:i.slotLabelWillUnmount},c=>j("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},j(c,{elTag:"div",elClasses:["fc-timegrid-slot-label-cushion","fc-scrollgrid-shrink-cushion"]})))})}function FF(n){return n.text}var uy=class extends pt{render(){return this.props.slatMetas.map(e=>j("tr",{key:e.key},j(u0,Object.assign({},e))))}},BF=Ct({week:"short"}),jF=5,dy=class extends vn{constructor(){super(...arguments),this.allDaySplitter=new cy,this.headerElRef=nn(),this.rootElRef=nn(),this.scrollerElRef=nn(),this.state={slatCoords:null},this.handleScrollTopRequest=e=>{let t=this.scrollerElRef.current;t&&(t.scrollTop=e)},this.renderHeadAxis=(e,t="")=>{let{options:r}=this.context,{dateProfile:i}=this.props,s=i.renderRange,a=Lr(s.start,s.end)===1?Fr(this.context,s.start,"week"):{};return r.weekNumbers&&e==="day"?j(Gl,{elTag:"th",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},date:s.start,defaultFormat:BF},c=>j("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame","fc-timegrid-axis-frame-liquid"].join(" "),style:{height:t}},j(c,{elTag:"a",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"],elAttrs:a}))):j("th",{"aria-hidden":!0,className:"fc-timegrid-axis"},j("div",{className:"fc-timegrid-axis-frame",style:{height:t}}))},this.renderTableRowAxis=e=>{let{options:t,viewApi:r}=this.context,i={text:t.allDayText,view:r};return j(Yt,{elTag:"td",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},renderProps:i,generatorName:"allDayContent",customGenerator:t.allDayContent,defaultGenerator:HF,classNameGenerator:t.allDayClassNames,didMount:t.allDayDidMount,willUnmount:t.allDayWillUnmount},s=>j("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame",e==null?" fc-timegrid-axis-frame-liquid":""].join(" "),style:{height:e}},j(s,{elTag:"span",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"]})))},this.handleSlatCoords=e=>{this.setState({slatCoords:e})}}renderSimpleLayout(e,t,r){let{context:i,props:s}=this,o=[],a=Qs(i.options);return e&&o.push({type:"header",key:"header",isSticky:a,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),t&&(o.push({type:"body",key:"all-day",chunk:{content:t}}),o.push({type:"body",key:"all-day-divider",outerContent:j("tr",{role:"presentation",className:"fc-scrollgrid-section"},j("td",{className:"fc-timegrid-divider "+i.theme.getClass("tableCellShaded")}))})),o.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(i.options.expandRows),chunk:{scrollerElRef:this.scrollerElRef,content:r}}),j(Sr,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:i.viewSpec},j($i,{liquid:!s.isHeightAuto&&!s.forPrint,collapsibleWidth:s.forPrint,cols:[{width:"shrink"}],sections:o}))}renderHScrollLayout(e,t,r,i,s,o,a){let c=this.context.pluginHooks.scrollGridImpl;if(!c)throw new Error("No ScrollGrid implementation");let{context:u,props:f}=this,p=!f.forPrint&&Qs(u.options),h=!f.forPrint&&Wl(u.options),y=[];e&&y.push({type:"header",key:"header",isSticky:p,syncRowHeights:!0,chunks:[{key:"axis",rowContent:w=>j("tr",{role:"presentation"},this.renderHeadAxis("day",w.rowSyncHeights[0]))},{key:"cols",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),t&&(y.push({type:"body",key:"all-day",syncRowHeights:!0,chunks:[{key:"axis",rowContent:w=>j("tr",{role:"presentation"},this.renderTableRowAxis(w.rowSyncHeights[0]))},{key:"cols",content:t}]}),y.push({key:"all-day-divider",type:"body",outerContent:j("tr",{role:"presentation",className:"fc-scrollgrid-section"},j("td",{colSpan:2,className:"fc-timegrid-divider "+u.theme.getClass("tableCellShaded")}))}));let _=u.options.nowIndicator;return y.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(u.options.expandRows),chunks:[{key:"axis",content:w=>j("div",{className:"fc-timegrid-axis-chunk"},j("table",{"aria-hidden":!0,style:{height:w.expandRows?w.clientHeight:""}},w.tableColGroupNode,j("tbody",null,j(uy,{slatMetas:o}))),j("div",{className:"fc-timegrid-now-indicator-container"},j(lr,{unit:_?"minute":"day"},E=>{let D=_&&a&&a.safeComputeTop(E);return typeof D=="number"?j(Ul,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:D},isAxis:!0,date:E}):null})))},{key:"cols",scrollerElRef:this.scrollerElRef,content:r}]}),h&&y.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:na},{key:"cols",content:na}]}),j(Sr,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:u.viewSpec},j(c,{liquid:!f.isHeightAuto&&!f.forPrint,forPrint:f.forPrint,collapsibleWidth:!1,colGroups:[{width:"shrink",cols:[{width:"shrink"}]},{cols:[{span:i,minWidth:s}]}],sections:y}))}getAllDayMaxEventProps(){let{dayMaxEvents:e,dayMaxEventRows:t}=this.context.options;return(e===!0||t===!0)&&(e=void 0,t=jF),{dayMaxEvents:e,dayMaxEventRows:t}}};function HF(n){return n.text}var fy=class{constructor(e,t,r){this.positions=e,this.dateProfile=t,this.slotDuration=r}safeComputeTop(e){let{dateProfile:t}=this;if(or(t.currentRange,e)){let r=St(e),i=e.valueOf()-r.valueOf();if(i>=Un(t.slotMinTime)&&i<Un(t.slotMaxTime))return this.computeTimeTop(ht(i))}return null}computeDateTop(e,t){return t||(t=St(e)),this.computeTimeTop(ht(e.valueOf()-t.valueOf()))}computeTimeTop(e){let{positions:t,dateProfile:r}=this,i=t.els.length,s=(e.milliseconds-Un(r.slotMinTime))/Un(this.slotDuration),o,a;return s=Math.max(0,s),s=Math.min(i,s),o=Math.floor(s),o=Math.min(o,i-1),a=s-o,t.tops[o]+t.getHeight(o)*a}},hy=class extends pt{render(){let{props:e,context:t}=this,{options:r}=t,{slatElRefs:i}=e;return j("tbody",null,e.slatMetas.map((s,o)=>{let a={time:s.time,date:t.dateEnv.toDate(s.date),view:t.viewApi};return j("tr",{key:s.key,ref:i.createRef(s.key)},e.axis&&j(u0,Object.assign({},s)),j(Yt,{elTag:"td",elClasses:["fc-timegrid-slot","fc-timegrid-slot-lane",!s.isLabeled&&"fc-timegrid-slot-minor"],elAttrs:{"data-time":s.isoTimeStr},renderProps:a,generatorName:"slotLaneContent",customGenerator:r.slotLaneContent,classNameGenerator:r.slotLaneClassNames,didMount:r.slotLaneDidMount,willUnmount:r.slotLaneWillUnmount}))}))}},py=class extends pt{constructor(){super(...arguments),this.rootElRef=nn(),this.slatElRefs=new Nn}render(){let{props:e,context:t}=this;return j("div",{ref:this.rootElRef,className:"fc-timegrid-slots"},j("table",{"aria-hidden":!0,className:t.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth,height:e.minHeight}},e.tableColGroupNode,j(hy,{slatElRefs:this.slatElRefs,axis:e.axis,slatMetas:e.slatMetas})))}componentDidMount(){this.updateSizing()}componentDidUpdate(){this.updateSizing()}componentWillUnmount(){this.props.onCoords&&this.props.onCoords(null)}updateSizing(){let{context:e,props:t}=this;t.onCoords&&t.clientWidth!==null&&this.rootElRef.current.offsetHeight&&t.onCoords(new fy(new _r(this.rootElRef.current,qF(this.slatElRefs.currentMap,t.slatMetas),!1,!0),this.props.dateProfile,e.options.slotDuration))}};function qF(n,e){return e.map(t=>n[t.key])}function Ql(n,e){let t=[],r;for(r=0;r<e;r+=1)t.push([]);if(n)for(r=0;r<n.length;r+=1)t[n[r].col].push(n[r]);return t}function o0(n,e){let t=[];if(n){for(let r=0;r<e;r+=1)t[r]={affectedInstances:n.affectedInstances,isEvent:n.isEvent,segs:[]};for(let r of n.segs)t[r.col].segs.push(r)}else for(let r=0;r<e;r+=1)t[r]=null;return t}var gy=class extends pt{render(){let{props:e}=this;return j(Ys,{elClasses:["fc-timegrid-more-link"],elStyle:{top:e.top,bottom:e.bottom},allDayDate:null,moreCnt:e.hiddenSegs.length,allSegs:e.hiddenSegs,hiddenSegs:e.hiddenSegs,extraDateSpan:e.extraDateSpan,dateProfile:e.dateProfile,todayRange:e.todayRange,popoverContent:()=>d0(e.hiddenSegs,e),defaultGenerator:VF,forceTimed:!0},t=>j(t,{elTag:"div",elClasses:["fc-timegrid-more-link-inner","fc-sticky"]}))}};function VF(n){return n.shortText}function $F(n,e,t){let r=new js;e!=null&&(r.strictOrder=e),t!=null&&(r.maxStackCnt=t);let i=r.addSegs(n),s=Nv(i),o=zF(r);return o=GF(o,1),{segRects:KF(o),hiddenGroups:s}}function zF(n){let{entriesByLevel:e}=n,t=_y((r,i)=>r+":"+i,(r,i)=>{let s=YF(n,r,i),o=a0(s,t),a=e[r][i];return[Object.assign(Object.assign({},a),{nextLevelNodes:o[0]}),a.thickness+o[1]]});return a0(e.length?{level:0,lateralStart:0,lateralEnd:e[0].length}:null,t)[0]}function a0(n,e){if(!n)return[[],0];let{level:t,lateralStart:r,lateralEnd:i}=n,s=r,o=[];for(;s<i;)o.push(e(t,s)),s+=1;return o.sort(WF),[o.map(UF),o[0][1]]}function WF(n,e){return e[1]-n[1]}function UF(n){return n[0]}function YF(n,e,t){let{levelCoords:r,entriesByLevel:i}=n,s=i[e][t],o=r[e]+s.thickness,a=r.length,c=e;for(;c<a&&r[c]<o;c+=1);for(;c<a;c+=1){let u=i[c],f,p=Cl(u,s.span.start,Tl),h=p[0]+p[1],y=h;for(;(f=u[y])&&f.span.start<s.span.end;)y+=1;if(h<y)return{level:c,lateralStart:h,lateralEnd:y}}return null}function GF(n,e){let t=_y((r,i,s)=>Nr(r),(r,i,s)=>{let{nextLevelNodes:o,thickness:a}=r,c=a+s,u=a/c,f,p=[];if(!o.length)f=e;else for(let y of o)if(f===void 0){let _=t(y,i,c);f=_[0],p.push(_[1])}else{let _=t(y,f,0);p.push(_[1])}let h=(f-i)*u;return[f-h,Object.assign(Object.assign({},r),{thickness:h,nextLevelNodes:p})]});return n.map(r=>t(r,0,0)[1])}function KF(n){let e=[],t=_y((i,s,o)=>Nr(i),(i,s,o)=>{let a=Object.assign(Object.assign({},i),{levelCoord:s,stackDepth:o,stackForward:0});return e.push(a),a.stackForward=r(i.nextLevelNodes,s+i.thickness,o+1)+1});function r(i,s,o){let a=0;for(let c of i)a=Math.max(t(c,s,o),a);return a}return r(n,0,0),e}function _y(n,e){let t={};return(...r)=>{let i=n(...r);return i in t?t[i]:t[i]=e(...r)}}function l0(n,e,t=null,r=0){let i=[];if(t)for(let s=0;s<n.length;s+=1){let o=n[s],a=t.computeDateTop(o.start,e),c=Math.max(a+(r||0),t.computeDateTop(o.end,e));i.push({start:Math.round(a),end:Math.round(c)})}return i}function QF(n,e,t,r){let i=[],s=[];for(let u=0;u<n.length;u+=1){let f=e[u];f?i.push({index:u,thickness:1,span:f}):s.push(n[u])}let{segRects:o,hiddenGroups:a}=$F(i,t,r),c=[];for(let u of o)c.push({seg:n[u.index],rect:u});for(let u of s)c.push({seg:u,rect:null});return{segPlacements:c,hiddenGroups:a}}var XF=Ct({hour:"numeric",minute:"2-digit",meridiem:!1}),bf=class extends pt{render(){return j(Ws,Object.assign({},this.props,{elClasses:["fc-timegrid-event","fc-v-event",this.props.isShort&&"fc-timegrid-event-short"],defaultTimeFormat:XF}))}},my=class extends pt{constructor(){super(...arguments),this.sortEventSegs=ze(Ks)}render(){let{props:e,context:t}=this,{options:r}=t,i=r.selectMirror,s=e.eventDrag&&e.eventDrag.segs||e.eventResize&&e.eventResize.segs||i&&e.dateSelectionSegs||[],o=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{},a=this.sortEventSegs(e.fgEventSegs,r.eventOrder);return j(zi,{elTag:"td",elRef:e.elRef,elClasses:["fc-timegrid-col",...e.extraClassNames||[]],elAttrs:Object.assign({role:"gridcell"},e.extraDataAttrs),date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,extraRenderProps:e.extraRenderProps},c=>j("div",{className:"fc-timegrid-col-frame"},j("div",{className:"fc-timegrid-col-bg"},this.renderFillSegs(e.businessHourSegs,"non-business"),this.renderFillSegs(e.bgEventSegs,"bg-event"),this.renderFillSegs(e.dateSelectionSegs,"highlight")),j("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(a,o,!1,!1,!1)),j("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(s,{},Boolean(e.eventDrag),Boolean(e.eventResize),Boolean(i),"mirror")),j("div",{className:"fc-timegrid-now-indicator-container"},this.renderNowIndicator(e.nowIndicatorSegs)),ra(r)&&j(c,{elTag:"div",elClasses:["fc-timegrid-col-misc"]})))}renderFgSegs(e,t,r,i,s,o){let{props:a}=this;return a.forPrint?d0(e,a):this.renderPositionedFgSegs(e,t,r,i,s,o)}renderPositionedFgSegs(e,t,r,i,s,o){let{eventMaxStack:a,eventShortHeight:c,eventOrderStrict:u,eventMinHeight:f}=this.context.options,{date:p,slatCoords:h,eventSelection:y,todayRange:_,nowDate:w}=this.props,E=r||i||s,D=l0(e,p,h,f),{segPlacements:R,hiddenGroups:H}=QF(e,D,u,a);return j(yt,null,this.renderHiddenGroups(H,e),R.map(F=>{let{seg:m,rect:Q}=F,le=m.eventRange.instance.instanceId,J=E||Boolean(!t[le]&&Q),q=ly(Q&&Q.span),Z=!E&&Q?this.computeSegHStyle(Q):{left:0,right:0},ae=Boolean(Q)&&Q.stackForward>0,Ce=Boolean(Q)&&Q.span.end-Q.span.start<c;return j("div",{className:"fc-timegrid-event-harness"+(ae?" fc-timegrid-event-harness-inset":""),key:o||le,style:Object.assign(Object.assign({visibility:J?"":"hidden"},q),Z)},j(bf,Object.assign({seg:m,isDragging:r,isResizing:i,isDateSelecting:s,isSelected:le===y,isShort:Ce},Kn(m,_,w))))}))}renderHiddenGroups(e,t){let{extraDateSpan:r,dateProfile:i,todayRange:s,nowDate:o,eventSelection:a,eventDrag:c,eventResize:u}=this.props;return j(yt,null,e.map(f=>{let p=ly(f.span),h=ZF(f.entries,t);return j(gy,{key:Qd(cf(h)),hiddenSegs:h,top:p.top,bottom:p.bottom,extraDateSpan:r,dateProfile:i,todayRange:s,nowDate:o,eventSelection:a,eventDrag:c,eventResize:u})}))}renderFillSegs(e,t){let{props:r,context:i}=this,o=l0(e,r.date,r.slatCoords,i.options.eventMinHeight).map((a,c)=>{let u=e[c];return j("div",{key:ql(u.eventRange),className:"fc-timegrid-bg-harness",style:ly(a)},t==="bg-event"?j(Us,Object.assign({seg:u},Kn(u,r.todayRange,r.nowDate))):Yl(t))});return j(yt,null,o)}renderNowIndicator(e){let{slatCoords:t,date:r}=this.props;return t?e.map((i,s)=>j(Ul,{key:s,elClasses:["fc-timegrid-now-indicator-line"],elStyle:{top:t.computeDateTop(i.start,r)},isAxis:!1,date:r})):null}computeSegHStyle(e){let{isRtl:t,options:r}=this.context,i=r.slotEventOverlap,s=e.levelCoord,o=e.levelCoord+e.thickness,a,c;i&&(o=Math.min(1,s+(o-s)*2)),t?(a=1-o,c=s):(a=s,c=1-o);let u={zIndex:e.stackDepth+1,left:a*100+"%",right:c*100+"%"};return i&&!e.stackForward&&(u[t?"marginLeft":"marginRight"]=10*2),u}};function d0(n,{todayRange:e,nowDate:t,eventSelection:r,eventDrag:i,eventResize:s}){let o=(i?i.affectedInstances:null)||(s?s.affectedInstances:null)||{};return j(yt,null,n.map(a=>{let c=a.eventRange.instance.instanceId;return j("div",{key:c,style:{visibility:o[c]?"hidden":""}},j(bf,Object.assign({seg:a,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:c===r,isShort:!1},Kn(a,e,t))))}))}function ly(n){return n?{top:n.start,bottom:-n.end}:{top:"",bottom:""}}function ZF(n,e){return n.map(t=>e[t.index])}var vy=class extends pt{constructor(){super(...arguments),this.splitFgEventSegs=ze(Ql),this.splitBgEventSegs=ze(Ql),this.splitBusinessHourSegs=ze(Ql),this.splitNowIndicatorSegs=ze(Ql),this.splitDateSelectionSegs=ze(Ql),this.splitEventDrag=ze(o0),this.splitEventResize=ze(o0),this.rootElRef=nn(),this.cellElRefs=new Nn}render(){let{props:e,context:t}=this,r=t.options.nowIndicator&&e.slatCoords&&e.slatCoords.safeComputeTop(e.nowDate),i=e.cells.length,s=this.splitFgEventSegs(e.fgEventSegs,i),o=this.splitBgEventSegs(e.bgEventSegs,i),a=this.splitBusinessHourSegs(e.businessHourSegs,i),c=this.splitNowIndicatorSegs(e.nowIndicatorSegs,i),u=this.splitDateSelectionSegs(e.dateSelectionSegs,i),f=this.splitEventDrag(e.eventDrag,i),p=this.splitEventResize(e.eventResize,i);return j("div",{className:"fc-timegrid-cols",ref:this.rootElRef},j("table",{role:"presentation",style:{minWidth:e.tableMinWidth,width:e.clientWidth}},e.tableColGroupNode,j("tbody",{role:"presentation"},j("tr",{role:"row"},e.axis&&j("td",{"aria-hidden":!0,className:"fc-timegrid-col fc-timegrid-axis"},j("div",{className:"fc-timegrid-col-frame"},j("div",{className:"fc-timegrid-now-indicator-container"},typeof r=="number"&&j(Ul,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:r},isAxis:!0,date:e.nowDate})))),e.cells.map((h,y)=>j(my,{key:h.key,elRef:this.cellElRefs.createRef(h.key),dateProfile:e.dateProfile,date:h.date,nowDate:e.nowDate,todayRange:e.todayRange,extraRenderProps:h.extraRenderProps,extraDataAttrs:h.extraDataAttrs,extraClassNames:h.extraClassNames,extraDateSpan:h.extraDateSpan,fgEventSegs:s[y],bgEventSegs:o[y],businessHourSegs:a[y],nowIndicatorSegs:c[y],dateSelectionSegs:u[y],eventDrag:f[y],eventResize:p[y],slatCoords:e.slatCoords,eventSelection:e.eventSelection,forPrint:e.forPrint}))))))}componentDidMount(){this.updateCoords()}componentDidUpdate(){this.updateCoords()}updateCoords(){let{props:e}=this;e.onColCoords&&e.clientWidth!==null&&e.onColCoords(new _r(this.rootElRef.current,JF(this.cellElRefs.currentMap,e.cells),!0,!1))}};function JF(n,e){return e.map(t=>n[t.key])}var yy=class extends vn{constructor(){super(...arguments),this.processSlotOptions=ze(eB),this.state={slatCoords:null},this.handleRootEl=e=>{e?this.context.registerInteractiveComponent(this,{el:e,isHitComboAllowed:this.props.isHitComboAllowed}):this.context.unregisterInteractiveComponent(this)},this.handleScrollRequest=e=>{let{onScrollTopRequest:t}=this.props,{slatCoords:r}=this.state;if(t&&r){if(e.time){let i=r.computeTimeTop(e.time);i=Math.ceil(i),i&&(i+=1),t(i)}return!0}return!1},this.handleColCoords=e=>{this.colCoords=e},this.handleSlatCoords=e=>{this.setState({slatCoords:e}),this.props.onSlatCoords&&this.props.onSlatCoords(e)}}render(){let{props:e,state:t}=this;return j("div",{className:"fc-timegrid-body",ref:this.handleRootEl,style:{width:e.clientWidth,minWidth:e.tableMinWidth}},j(py,{axis:e.axis,dateProfile:e.dateProfile,slatMetas:e.slatMetas,clientWidth:e.clientWidth,minHeight:e.expandRows?e.clientHeight:"",tableMinWidth:e.tableMinWidth,tableColGroupNode:e.axis?e.tableColGroupNode:null,onCoords:this.handleSlatCoords}),j(vy,{cells:e.cells,axis:e.axis,dateProfile:e.dateProfile,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,todayRange:e.todayRange,nowDate:e.nowDate,nowIndicatorSegs:e.nowIndicatorSegs,clientWidth:e.clientWidth,tableMinWidth:e.tableMinWidth,tableColGroupNode:e.tableColGroupNode,slatCoords:t.slatCoords,onColCoords:this.handleColCoords,forPrint:e.forPrint}))}componentDidMount(){this.scrollResponder=this.context.createScrollResponder(this.handleScrollRequest)}componentDidUpdate(e){this.scrollResponder.update(e.dateProfile!==this.props.dateProfile)}componentWillUnmount(){this.scrollResponder.detach()}queryHit(e,t){let{dateEnv:r,options:i}=this.context,{colCoords:s}=this,{dateProfile:o}=this.props,{slatCoords:a}=this.state,{snapDuration:c,snapsPerSlot:u}=this.processSlotOptions(this.props.slotDuration,i.snapDuration),f=s.leftToIndex(e),p=a.positions.topToIndex(t);if(f!=null&&p!=null){let h=this.props.cells[f],y=a.positions.tops[p],_=a.positions.getHeight(p),w=(t-y)/_,E=Math.floor(w*u),D=p*u+E,R=this.props.cells[f].date,H=Nl(o.slotMinTime,lv(c,D)),F=r.add(R,H),m=r.add(F,c);return{dateProfile:o,dateSpan:Object.assign({range:{start:F,end:m},allDay:!1},h.extraDateSpan),dayEl:s.els[f],rect:{left:s.lefts[f],right:s.rights[f],top:y,bottom:y+_},layer:0}}return null}};function eB(n,e){let t=e||n,r=Pl(n,t);return r===null&&(t=n,r=1),{snapDuration:t,snapsPerSlot:r}}var by=class extends $s{sliceRange(e,t){let r=[];for(let i=0;i<t.length;i+=1){let s=Gn(e,t[i]);s&&r.push({start:s.start,end:s.end,isStart:s.start.valueOf()===e.start.valueOf(),isEnd:s.end.valueOf()===e.end.valueOf(),col:i})}return r}},Ey=class extends vn{constructor(){super(...arguments),this.buildDayRanges=ze(tB),this.slicer=new by,this.timeColsRef=nn()}render(){let{props:e,context:t}=this,{dateProfile:r,dayTableModel:i}=e,{nowIndicator:s,nextDayThreshold:o}=t.options,a=this.buildDayRanges(i,r,t.dateEnv);return j(lr,{unit:s?"minute":"day"},(c,u)=>j(yy,Object.assign({ref:this.timeColsRef},this.slicer.sliceProps(e,r,null,t,a),{forPrint:e.forPrint,axis:e.axis,dateProfile:r,slatMetas:e.slatMetas,slotDuration:e.slotDuration,cells:i.cells[0],tableColGroupNode:e.tableColGroupNode,tableMinWidth:e.tableMinWidth,clientWidth:e.clientWidth,clientHeight:e.clientHeight,expandRows:e.expandRows,nowDate:c,nowIndicatorSegs:s&&this.slicer.sliceNowDate(c,r,o,t,a),todayRange:u,onScrollTopRequest:e.onScrollTopRequest,onSlatCoords:e.onSlatCoords})))}};function tB(n,e,t){let r=[];for(let i of n.headerDates)r.push({start:t.add(i,e.slotMinTime),end:t.add(i,e.slotMaxTime)});return r}var c0=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];function nB(n,e,t,r,i){let s=new Date(0),o=n,a=ht(0),c=t||rB(r),u=[];for(;Un(o)<Un(e);){let f=i.add(s,o),p=Pl(a,c)!==null;u.push({date:f,time:o,key:f.toISOString(),isoTimeStr:hv(f),isLabeled:p}),o=Nl(o,r),a=Nl(a,r)}return u}function rB(n){let e,t,r;for(e=c0.length-1;e>=0;e-=1)if(t=ht(c0[e]),r=Pl(t,n),r!==null&&r>1)return t;return n}var Ef=class extends dy{constructor(){super(...arguments),this.buildTimeColsModel=ze(iB),this.buildSlatMetas=ze(nB)}render(){let{options:e,dateEnv:t,dateProfileGenerator:r}=this.context,{props:i}=this,{dateProfile:s}=i,o=this.buildTimeColsModel(s,r),a=this.allDaySplitter.splitProps(i),c=this.buildSlatMetas(s.slotMinTime,s.slotMaxTime,e.slotLabelInterval,e.slotDuration,t),{dayMinWidth:u}=e,f=!u,p=u,h=e.dayHeaders&&j(Hs,{dates:o.headerDates,dateProfile:s,datesRepDistinctDays:!0,renderIntro:f?this.renderHeadAxis:null}),y=e.allDaySlot!==!1&&(w=>j(Kl,Object.assign({},a.allDay,{dateProfile:s,dayTableModel:o,nextDayThreshold:e.nextDayThreshold,tableMinWidth:w.tableMinWidth,colGroupNode:w.tableColGroupNode,renderRowIntro:f?this.renderTableRowAxis:null,showWeekNumbers:!1,expandRows:!1,headerAlignElRef:this.headerElRef,clientWidth:w.clientWidth,clientHeight:w.clientHeight,forPrint:i.forPrint},this.getAllDayMaxEventProps()))),_=w=>j(Ey,Object.assign({},a.timed,{dayTableModel:o,dateProfile:s,axis:f,slotDuration:e.slotDuration,slatMetas:c,forPrint:i.forPrint,tableColGroupNode:w.tableColGroupNode,tableMinWidth:w.tableMinWidth,clientWidth:w.clientWidth,clientHeight:w.clientHeight,onSlatCoords:this.handleSlatCoords,expandRows:w.expandRows,onScrollTopRequest:this.handleScrollTopRequest}));return p?this.renderHScrollLayout(h,y,_,o.colCnt,u,c,this.state.slatCoords):this.renderSimpleLayout(h,y,_)}};function iB(n,e){let t=new qs(n.renderRange,e);return new Vs(t,!1)}var sB={allDaySlot:Boolean},f0=Pn({name:"@fullcalendar/timegrid",initialView:"timeGridWeek",optionRefiners:sB,views:{timeGrid:{component:Ef,usesMinMaxTime:!0,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}});var oB=':root{--fc-list-event-dot-width:10px;--fc-list-event-hover-bg-color:#f5f5f5}.fc-theme-standard .fc-list{border:1px solid var(--fc-border-color)}.fc .fc-list-empty{align-items:center;background-color:var(--fc-neutral-bg-color);display:flex;height:100%;justify-content:center}.fc .fc-list-empty-cushion{margin:5em 0}.fc .fc-list-table{border-style:hidden;width:100%}.fc .fc-list-table tr>*{border-left:0;border-right:0}.fc .fc-list-sticky .fc-list-day>*{background:var(--fc-page-bg-color);position:sticky;top:0}.fc .fc-list-table thead{left:-10000px;position:absolute}.fc .fc-list-table tbody>tr:first-child th{border-top:0}.fc .fc-list-table th{padding:0}.fc .fc-list-day-cushion,.fc .fc-list-table td{padding:8px 14px}.fc .fc-list-day-cushion:after{clear:both;content:"";display:table}.fc-theme-standard .fc-list-day-cushion{background-color:var(--fc-neutral-bg-color)}.fc-direction-ltr .fc-list-day-text,.fc-direction-rtl .fc-list-day-side-text{float:left}.fc-direction-ltr .fc-list-day-side-text,.fc-direction-rtl .fc-list-day-text{float:right}.fc-direction-ltr .fc-list-table .fc-list-event-graphic{padding-right:0}.fc-direction-rtl .fc-list-table .fc-list-event-graphic{padding-left:0}.fc .fc-list-event.fc-event-forced-url{cursor:pointer}.fc .fc-list-event:hover td{background-color:var(--fc-list-event-hover-bg-color)}.fc .fc-list-event-graphic,.fc .fc-list-event-time{white-space:nowrap;width:1px}.fc .fc-list-event-dot{border:calc(var(--fc-list-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-list-event-dot-width)/2);box-sizing:content-box;display:inline-block;height:0;width:0}.fc .fc-list-event-title a{color:inherit;text-decoration:none}.fc .fc-list-event.fc-event-forced-url:hover a{text-decoration:underline}';Wi(oB);var wy=class extends pt{constructor(){super(...arguments),this.state={textId:cr()}}render(){let{theme:e,dateEnv:t,options:r,viewApi:i}=this.context,{cellId:s,dayDate:o,todayRange:a}=this.props,{textId:c}=this.state,u=Bl(o,a),f=r.listDayFormat?t.format(o,r.listDayFormat):"",p=r.listDaySideFormat?t.format(o,r.listDaySideFormat):"",h=Object.assign({date:t.toDate(o),view:i,textId:c,text:f,sideText:p,navLinkAttrs:Fr(this.context,o),sideNavLinkAttrs:Fr(this.context,o,"day",!1)},u);return j(Yt,{elTag:"tr",elClasses:["fc-list-day",...Zo(u,e)],elAttrs:{"data-date":Ui(o)},renderProps:h,generatorName:"dayHeaderContent",customGenerator:r.dayHeaderContent,defaultGenerator:aB,classNameGenerator:r.dayHeaderClassNames,didMount:r.dayHeaderDidMount,willUnmount:r.dayHeaderWillUnmount},y=>j("th",{scope:"colgroup",colSpan:3,id:s,"aria-labelledby":c},j(y,{elTag:"div",elClasses:["fc-list-day-cushion",e.getClass("tableCellShaded")]})))}};function aB(n){return j(yt,null,n.text&&j("a",Object.assign({id:n.textId,className:"fc-list-day-text"},n.navLinkAttrs),n.text),n.sideText&&j("a",Object.assign({"aria-hidden":!0,className:"fc-list-day-side-text"},n.sideNavLinkAttrs),n.sideText))}var lB=Ct({hour:"numeric",minute:"2-digit",meridiem:"short"}),Sy=class extends pt{render(){let{props:e,context:t}=this,{options:r}=t,{seg:i,timeHeaderId:s,eventHeaderId:o,dateHeaderId:a}=e,c=r.eventTimeFormat||lB;return j(ui,Object.assign({},e,{elTag:"tr",elClasses:["fc-list-event",i.eventRange.def.url&&"fc-event-forced-url"],defaultGenerator:()=>cB(i,t),seg:i,timeText:"",disableDragging:!0,disableResizing:!0}),(u,f)=>j(yt,null,uB(i,c,t,s,a),j("td",{"aria-hidden":!0,className:"fc-list-event-graphic"},j("span",{className:"fc-list-event-dot",style:{borderColor:f.borderColor||f.backgroundColor}})),j(u,{elTag:"td",elClasses:["fc-list-event-title"],elAttrs:{headers:`${o} ${a}`}})))}};function cB(n,e){let t=ea(n,e);return j("a",Object.assign({},t),n.eventRange.def.title)}function uB(n,e,t,r,i){let{options:s}=t;if(s.displayEventTime!==!1){let o=n.eventRange.def,a=n.eventRange.instance,c=!1,u;if(o.allDay?c=!0:_v(n.eventRange.range)?n.isStart?u=Ki(n,e,t,null,null,a.range.start,n.end):n.isEnd?u=Ki(n,e,t,null,null,n.start,a.range.end):c=!0:u=Ki(n,e,t),c){let f={text:t.options.allDayText,view:t.viewApi};return j(Yt,{elTag:"td",elClasses:["fc-list-event-time"],elAttrs:{headers:`${r} ${i}`},renderProps:f,generatorName:"allDayContent",customGenerator:s.allDayContent,defaultGenerator:dB,classNameGenerator:s.allDayClassNames,didMount:s.allDayDidMount,willUnmount:s.allDayWillUnmount})}return j("td",{className:"fc-list-event-time"},u)}return null}function dB(n){return n.text}var _f=class extends vn{constructor(){super(...arguments),this.computeDateVars=ze(hB),this.eventStoreToSegs=ze(this._eventStoreToSegs),this.state={timeHeaderId:cr(),eventHeaderId:cr(),dateHeaderIdRoot:cr()},this.setRootEl=e=>{e?this.context.registerInteractiveComponent(this,{el:e}):this.context.unregisterInteractiveComponent(this)}}render(){let{props:e,context:t}=this,{dayDates:r,dayRanges:i}=this.computeDateVars(e.dateProfile),s=this.eventStoreToSegs(e.eventStore,e.eventUiBases,i);return j(Sr,{elRef:this.setRootEl,elClasses:["fc-list",t.theme.getClass("table"),t.options.stickyHeaderDates!==!1?"fc-list-sticky":""],viewSpec:t.viewSpec},j(Yo,{liquid:!e.isHeightAuto,overflowX:e.isHeightAuto?"visible":"hidden",overflowY:e.isHeightAuto?"visible":"auto"},s.length>0?this.renderSegList(s,r):this.renderEmptyMessage()))}renderEmptyMessage(){let{options:e,viewApi:t}=this.context,r={text:e.noEventsText,view:t};return j(Yt,{elTag:"div",elClasses:["fc-list-empty"],renderProps:r,generatorName:"noEventsContent",customGenerator:e.noEventsContent,defaultGenerator:fB,classNameGenerator:e.noEventsClassNames,didMount:e.noEventsDidMount,willUnmount:e.noEventsWillUnmount},i=>j(i,{elTag:"div",elClasses:["fc-list-empty-cushion"]}))}renderSegList(e,t){let{theme:r,options:i}=this.context,{timeHeaderId:s,eventHeaderId:o,dateHeaderIdRoot:a}=this.state,c=pB(e);return j(lr,{unit:"day"},(u,f)=>{let p=[];for(let h=0;h<c.length;h+=1){let y=c[h];if(y){let _=Ui(t[h]),w=a+"-"+_;p.push(j(wy,{key:_,cellId:w,dayDate:t[h],todayRange:f})),y=Ks(y,i.eventOrder);for(let E of y)p.push(j(Sy,Object.assign({key:_+":"+E.eventRange.instance.instanceId,seg:E,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,timeHeaderId:s,eventHeaderId:o,dateHeaderId:w},Kn(E,f,u))))}}return j("table",{className:"fc-list-table "+r.getClass("table")},j("thead",null,j("tr",null,j("th",{scope:"col",id:s},i.timeHint),j("th",{scope:"col","aria-hidden":!0}),j("th",{scope:"col",id:o},i.eventHint))),j("tbody",null,p))})}_eventStoreToSegs(e,t,r){return this.eventRangesToSegs(Uo(e,t,this.props.dateProfile.activeRange,this.context.options.nextDayThreshold).fg,r)}eventRangesToSegs(e,t){let r=[];for(let i of e)r.push(...this.eventRangeToSegs(i,t));return r}eventRangeToSegs(e,t){let{dateEnv:r}=this.context,{nextDayThreshold:i}=this.context.options,s=e.range,o=e.def.allDay,a,c,u,f=[];for(a=0;a<t.length;a+=1)if(c=Gn(s,t[a]),c&&(u={component:this,eventRange:e,start:c.start,end:c.end,isStart:e.isStart&&c.start.valueOf()===s.start.valueOf(),isEnd:e.isEnd&&c.end.valueOf()===s.end.valueOf(),dayIndex:a},f.push(u),!u.isEnd&&!o&&a+1<t.length&&s.end<r.add(t[a+1].start,i))){u.end=s.end,u.isEnd=!0;break}return f}};function fB(n){return n.text}function hB(n){let e=St(n.renderRange.start),t=n.renderRange.end,r=[],i=[];for(;e<t;)r.push(e),i.push({start:e,end:Ut(e,1)}),e=Ut(e,1);return{dayDates:r,dayRanges:i}}function pB(n){let e=[],t,r;for(t=0;t<n.length;t+=1)r=n[t],(e[r.dayIndex]||(e[r.dayIndex]=[])).push(r);return e}var gB={listDayFormat:h0,listDaySideFormat:h0,noEventsClassNames:oe,noEventsContent:oe,noEventsDidMount:oe,noEventsWillUnmount:oe};function h0(n){return n===!1?null:Ct(n)}var p0=Pn({name:"@fullcalendar/list",optionRefiners:gB,views:{list:{component:_f,buttonTextKey:"list",listDayFormat:{month:"long",day:"numeric",year:"numeric"}},listDay:{type:"list",duration:{days:1},listDayFormat:{weekday:"long"}},listWeek:{type:"list",duration:{weeks:1},listDayFormat:{weekday:"long"},listDaySideFormat:{month:"long",day:"numeric",year:"numeric"}},listMonth:{type:"list",duration:{month:1},listDaySideFormat:{weekday:"long"}},listYear:{type:"list",duration:{year:1},listDaySideFormat:{weekday:"long"}}}});zl.touchMouseIgnoreWait=500;var Ty=0,wf=0,Cy=!1,Sf=class{constructor(e){this.subjectEl=null,this.selector="",this.handleSelector="",this.shouldIgnoreMove=!1,this.shouldWatchScroll=!0,this.isDragging=!1,this.isTouchDragging=!1,this.wasTouchScroll=!1,this.handleMouseDown=t=>{if(!this.shouldIgnoreMouse()&&mB(t)&&this.tryStart(t)){let r=this.createEventFromMouse(t,!0);this.emitter.trigger("pointerdown",r),this.initScrollWatch(r),this.shouldIgnoreMove||document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp)}},this.handleMouseMove=t=>{let r=this.createEventFromMouse(t);this.recordCoords(r),this.emitter.trigger("pointermove",r)},this.handleMouseUp=t=>{document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),this.emitter.trigger("pointerup",this.createEventFromMouse(t)),this.cleanup()},this.handleTouchStart=t=>{if(this.tryStart(t)){this.isTouchDragging=!0;let r=this.createEventFromTouch(t,!0);this.emitter.trigger("pointerdown",r),this.initScrollWatch(r);let i=t.target;this.shouldIgnoreMove||i.addEventListener("touchmove",this.handleTouchMove),i.addEventListener("touchend",this.handleTouchEnd),i.addEventListener("touchcancel",this.handleTouchEnd),window.addEventListener("scroll",this.handleTouchScroll,!0)}},this.handleTouchMove=t=>{let r=this.createEventFromTouch(t);this.recordCoords(r),this.emitter.trigger("pointermove",r)},this.handleTouchEnd=t=>{if(this.isDragging){let r=t.target;r.removeEventListener("touchmove",this.handleTouchMove),r.removeEventListener("touchend",this.handleTouchEnd),r.removeEventListener("touchcancel",this.handleTouchEnd),window.removeEventListener("scroll",this.handleTouchScroll,!0),this.emitter.trigger("pointerup",this.createEventFromTouch(t)),this.cleanup(),this.isTouchDragging=!1,vB()}},this.handleTouchScroll=()=>{this.wasTouchScroll=!0},this.handleScroll=t=>{if(!this.shouldIgnoreMove){let r=window.pageXOffset-this.prevScrollX+this.prevPageX,i=window.pageYOffset-this.prevScrollY+this.prevPageY;this.emitter.trigger("pointermove",{origEvent:t,isTouch:this.isTouchDragging,subjectEl:this.subjectEl,pageX:r,pageY:i,deltaX:r-this.origPageX,deltaY:i-this.origPageY})}},this.containerEl=e,this.emitter=new li,e.addEventListener("mousedown",this.handleMouseDown),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),yB()}destroy(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),bB()}tryStart(e){let t=this.querySubjectEl(e),r=e.target;return t&&(!this.handleSelector||on(r,this.handleSelector))?(this.subjectEl=t,this.isDragging=!0,this.wasTouchScroll=!1,!0):!1}cleanup(){Cy=!1,this.isDragging=!1,this.subjectEl=null,this.destroyScrollWatch()}querySubjectEl(e){return this.selector?on(e.target,this.selector):this.containerEl}shouldIgnoreMouse(){return Ty||this.isTouchDragging}cancelTouchScroll(){this.isDragging&&(Cy=!0)}initScrollWatch(e){this.shouldWatchScroll&&(this.recordCoords(e),window.addEventListener("scroll",this.handleScroll,!0))}recordCoords(e){this.shouldWatchScroll&&(this.prevPageX=e.pageX,this.prevPageY=e.pageY,this.prevScrollX=window.pageXOffset,this.prevScrollY=window.pageYOffset)}destroyScrollWatch(){this.shouldWatchScroll&&window.removeEventListener("scroll",this.handleScroll,!0)}createEventFromMouse(e,t){let r=0,i=0;return t?(this.origPageX=e.pageX,this.origPageY=e.pageY):(r=e.pageX-this.origPageX,i=e.pageY-this.origPageY),{origEvent:e,isTouch:!1,subjectEl:this.subjectEl,pageX:e.pageX,pageY:e.pageY,deltaX:r,deltaY:i}}createEventFromTouch(e,t){let r=e.touches,i,s,o=0,a=0;return r&&r.length?(i=r[0].pageX,s=r[0].pageY):(i=e.pageX,s=e.pageY),t?(this.origPageX=i,this.origPageY=s):(o=i-this.origPageX,a=s-this.origPageY),{origEvent:e,isTouch:!0,subjectEl:this.subjectEl,pageX:i,pageY:s,deltaX:o,deltaY:a}}};function mB(n){return n.button===0&&!n.ctrlKey}function vB(){Ty+=1,setTimeout(()=>{Ty-=1},zl.touchMouseIgnoreWait)}function yB(){wf+=1,wf===1&&window.addEventListener("touchmove",m0,{passive:!1})}function bB(){wf-=1,wf||window.removeEventListener("touchmove",m0,{passive:!1})}function m0(n){Cy&&n.preventDefault()}var Ay=class{constructor(){this.isVisible=!1,this.sourceEl=null,this.mirrorEl=null,this.sourceElRect=null,this.parentNode=document.body,this.zIndex=9999,this.revertDuration=0}start(e,t,r){this.sourceEl=e,this.sourceElRect=this.sourceEl.getBoundingClientRect(),this.origScreenX=t-window.pageXOffset,this.origScreenY=r-window.pageYOffset,this.deltaX=0,this.deltaY=0,this.updateElPosition()}handleMove(e,t){this.deltaX=e-window.pageXOffset-this.origScreenX,this.deltaY=t-window.pageYOffset-this.origScreenY,this.updateElPosition()}setIsVisible(e){e?this.isVisible||(this.mirrorEl&&(this.mirrorEl.style.display=""),this.isVisible=e,this.updateElPosition()):this.isVisible&&(this.mirrorEl&&(this.mirrorEl.style.display="none"),this.isVisible=e)}stop(e,t){let r=()=>{this.cleanup(),t()};e&&this.mirrorEl&&this.isVisible&&this.revertDuration&&(this.deltaX||this.deltaY)?this.doRevertAnimation(r,this.revertDuration):setTimeout(r,0)}doRevertAnimation(e,t){let r=this.mirrorEl,i=this.sourceEl.getBoundingClientRect();r.style.transition="top "+t+"ms,left "+t+"ms",Gs(r,{left:i.left,top:i.top}),nv(r,()=>{r.style.transition="",e()})}cleanup(){this.mirrorEl&&(Il(this.mirrorEl),this.mirrorEl=null),this.sourceEl=null}updateElPosition(){this.sourceEl&&this.isVisible&&Gs(this.getMirrorEl(),{left:this.sourceElRect.left+this.deltaX,top:this.sourceElRect.top+this.deltaY})}getMirrorEl(){let e=this.sourceElRect,t=this.mirrorEl;return t||(t=this.mirrorEl=this.sourceEl.cloneNode(!0),t.style.userSelect="none",t.classList.add("fc-event-dragging"),Gs(t,{position:"fixed",zIndex:this.zIndex,visibility:"",boxSizing:"border-box",width:e.right-e.left,height:e.bottom-e.top,right:"auto",bottom:"auto",margin:0}),this.parentNode.appendChild(t)),t}},Tf=class extends Fs{constructor(e,t){super(),this.handleScroll=()=>{this.scrollTop=this.scrollController.getScrollTop(),this.scrollLeft=this.scrollController.getScrollLeft(),this.handleScrollChange()},this.scrollController=e,this.doesListening=t,this.scrollTop=this.origScrollTop=e.getScrollTop(),this.scrollLeft=this.origScrollLeft=e.getScrollLeft(),this.scrollWidth=e.getScrollWidth(),this.scrollHeight=e.getScrollHeight(),this.clientWidth=e.getClientWidth(),this.clientHeight=e.getClientHeight(),this.clientRect=this.computeClientRect(),this.doesListening&&this.getEventTarget().addEventListener("scroll",this.handleScroll)}destroy(){this.doesListening&&this.getEventTarget().removeEventListener("scroll",this.handleScroll)}getScrollTop(){return this.scrollTop}getScrollLeft(){return this.scrollLeft}setScrollTop(e){this.scrollController.setScrollTop(e),this.doesListening||(this.scrollTop=Math.max(Math.min(e,this.getMaxScrollTop()),0),this.handleScrollChange())}setScrollLeft(e){this.scrollController.setScrollLeft(e),this.doesListening||(this.scrollLeft=Math.max(Math.min(e,this.getMaxScrollLeft()),0),this.handleScrollChange())}getClientWidth(){return this.clientWidth}getClientHeight(){return this.clientHeight}getScrollWidth(){return this.scrollWidth}getScrollHeight(){return this.scrollHeight}handleScrollChange(){}},Cf=class extends Tf{constructor(e,t){super(new _l(e),t)}getEventTarget(){return this.scrollController.el}computeClientRect(){return Dv(this.scrollController.el)}},Dy=class extends Tf{constructor(e){super(new wl,e)}getEventTarget(){return window}computeClientRect(){return{left:this.scrollLeft,right:this.scrollLeft+this.clientWidth,top:this.scrollTop,bottom:this.scrollTop+this.clientHeight}}handleScrollChange(){this.clientRect=this.computeClientRect()}},g0=typeof performance=="function"?performance.now:Date.now,xy=class{constructor(){this.isEnabled=!0,this.scrollQuery=[window,".fc-scroller"],this.edgeThreshold=50,this.maxVelocity=300,this.pointerScreenX=null,this.pointerScreenY=null,this.isAnimating=!1,this.scrollCaches=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.animate=()=>{if(this.isAnimating){let e=this.computeBestEdge(this.pointerScreenX+window.pageXOffset,this.pointerScreenY+window.pageYOffset);if(e){let t=g0();this.handleSide(e,(t-this.msSinceRequest)/1e3),this.requestAnimation(t)}else this.isAnimating=!1}}}start(e,t,r){this.isEnabled&&(this.scrollCaches=this.buildCaches(r),this.pointerScreenX=null,this.pointerScreenY=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.handleMove(e,t))}handleMove(e,t){if(this.isEnabled){let r=e-window.pageXOffset,i=t-window.pageYOffset,s=this.pointerScreenY===null?0:i-this.pointerScreenY,o=this.pointerScreenX===null?0:r-this.pointerScreenX;s<0?this.everMovedUp=!0:s>0&&(this.everMovedDown=!0),o<0?this.everMovedLeft=!0:o>0&&(this.everMovedRight=!0),this.pointerScreenX=r,this.pointerScreenY=i,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(g0()))}}stop(){if(this.isEnabled){this.isAnimating=!1;for(let e of this.scrollCaches)e.destroy();this.scrollCaches=null}}requestAnimation(e){this.msSinceRequest=e,requestAnimationFrame(this.animate)}handleSide(e,t){let{scrollCache:r}=e,{edgeThreshold:i}=this,s=i-e.distance,o=s*s/(i*i)*this.maxVelocity*t,a=1;switch(e.name){case"left":a=-1;case"right":r.setScrollLeft(r.getScrollLeft()+o*a);break;case"top":a=-1;case"bottom":r.setScrollTop(r.getScrollTop()+o*a);break}}computeBestEdge(e,t){let{edgeThreshold:r}=this,i=null,s=this.scrollCaches||[];for(let o of s){let a=o.clientRect,c=e-a.left,u=a.right-e,f=t-a.top,p=a.bottom-t;c>=0&&u>=0&&f>=0&&p>=0&&(f<=r&&this.everMovedUp&&o.canScrollUp()&&(!i||i.distance>f)&&(i={scrollCache:o,name:"top",distance:f}),p<=r&&this.everMovedDown&&o.canScrollDown()&&(!i||i.distance>p)&&(i={scrollCache:o,name:"bottom",distance:p}),c<=r&&this.everMovedLeft&&o.canScrollLeft()&&(!i||i.distance>c)&&(i={scrollCache:o,name:"left",distance:c}),u<=r&&this.everMovedRight&&o.canScrollRight()&&(!i||i.distance>u)&&(i={scrollCache:o,name:"right",distance:u}))}return i}buildCaches(e){return this.queryScrollEls(e).map(t=>t===window?new Dy(!1):new Cf(t,!1))}queryScrollEls(e){let t=[];for(let r of this.scrollQuery)typeof r=="object"?t.push(r):t.push(...Array.prototype.slice.call(e.getRootNode().querySelectorAll(r)));return t}},Xs=class extends Al{constructor(e,t){super(e),this.containerEl=e,this.delay=null,this.minDistance=0,this.touchScrollAllowed=!0,this.mirrorNeedsRevert=!1,this.isInteracting=!1,this.isDragging=!1,this.isDelayEnded=!1,this.isDistanceSurpassed=!1,this.delayTimeoutId=null,this.onPointerDown=i=>{this.isDragging||(this.isInteracting=!0,this.isDelayEnded=!1,this.isDistanceSurpassed=!1,rv(document.body),sv(document.body),i.isTouch||i.origEvent.preventDefault(),this.emitter.trigger("pointerdown",i),this.isInteracting&&!this.pointer.shouldIgnoreMove&&(this.mirror.setIsVisible(!1),this.mirror.start(i.subjectEl,i.pageX,i.pageY),this.startDelay(i),this.minDistance||this.handleDistanceSurpassed(i)))},this.onPointerMove=i=>{if(this.isInteracting){if(this.emitter.trigger("pointermove",i),!this.isDistanceSurpassed){let s=this.minDistance,o,{deltaX:a,deltaY:c}=i;o=a*a+c*c,o>=s*s&&this.handleDistanceSurpassed(i)}this.isDragging&&(i.origEvent.type!=="scroll"&&(this.mirror.handleMove(i.pageX,i.pageY),this.autoScroller.handleMove(i.pageX,i.pageY)),this.emitter.trigger("dragmove",i))}},this.onPointerUp=i=>{this.isInteracting&&(this.isInteracting=!1,iv(document.body),ov(document.body),this.emitter.trigger("pointerup",i),this.isDragging&&(this.autoScroller.stop(),this.tryStopDrag(i)),this.delayTimeoutId&&(clearTimeout(this.delayTimeoutId),this.delayTimeoutId=null))};let r=this.pointer=new Sf(e);r.emitter.on("pointerdown",this.onPointerDown),r.emitter.on("pointermove",this.onPointerMove),r.emitter.on("pointerup",this.onPointerUp),t&&(r.selector=t),this.mirror=new Ay,this.autoScroller=new xy}destroy(){this.pointer.destroy(),this.onPointerUp({})}startDelay(e){typeof this.delay=="number"?this.delayTimeoutId=setTimeout(()=>{this.delayTimeoutId=null,this.handleDelayEnd(e)},this.delay):this.handleDelayEnd(e)}handleDelayEnd(e){this.isDelayEnded=!0,this.tryStartDrag(e)}handleDistanceSurpassed(e){this.isDistanceSurpassed=!0,this.tryStartDrag(e)}tryStartDrag(e){this.isDelayEnded&&this.isDistanceSurpassed&&(!this.pointer.wasTouchScroll||this.touchScrollAllowed)&&(this.isDragging=!0,this.mirrorNeedsRevert=!1,this.autoScroller.start(e.pageX,e.pageY,this.containerEl),this.emitter.trigger("dragstart",e),this.touchScrollAllowed===!1&&this.pointer.cancelTouchScroll())}tryStopDrag(e){this.mirror.stop(this.mirrorNeedsRevert,this.stopDrag.bind(this,e))}stopDrag(e){this.isDragging=!1,this.emitter.trigger("dragend",e)}setIgnoreMove(e){this.pointer.shouldIgnoreMove=e}setMirrorIsVisible(e){this.mirror.setIsVisible(e)}setMirrorNeedsRevert(e){this.mirrorNeedsRevert=e}setAutoScrollEnabled(e){this.autoScroller.isEnabled=e}},Oy=class{constructor(e){this.origRect=jl(e),this.scrollCaches=of(e).map(t=>new Cf(t,!0))}destroy(){for(let e of this.scrollCaches)e.destroy()}computeLeft(){let e=this.origRect.left;for(let t of this.scrollCaches)e+=t.origScrollLeft-t.getScrollLeft();return e}computeTop(){let e=this.origRect.top;for(let t of this.scrollCaches)e+=t.origScrollTop-t.getScrollTop();return e}isWithinClipping(e,t){let r={left:e,top:t};for(let i of this.scrollCaches)if(!EB(i.getEventTarget())&&!wv(r,i.clientRect))return!1;return!0}};function EB(n){let e=n.tagName;return e==="HTML"||e==="BODY"}var sa=class{constructor(e,t){this.useSubjectCenter=!1,this.requireInitial=!0,this.initialHit=null,this.movingHit=null,this.finalHit=null,this.handlePointerDown=r=>{let{dragging:i}=this;this.initialHit=null,this.movingHit=null,this.finalHit=null,this.prepareHits(),this.processFirstCoord(r),this.initialHit||!this.requireInitial?(i.setIgnoreMove(!1),this.emitter.trigger("pointerdown",r)):i.setIgnoreMove(!0)},this.handleDragStart=r=>{this.emitter.trigger("dragstart",r),this.handleMove(r,!0)},this.handleDragMove=r=>{this.emitter.trigger("dragmove",r),this.handleMove(r)},this.handlePointerUp=r=>{this.releaseHits(),this.emitter.trigger("pointerup",r)},this.handleDragEnd=r=>{this.movingHit&&this.emitter.trigger("hitupdate",null,!0,r),this.finalHit=this.movingHit,this.movingHit=null,this.emitter.trigger("dragend",r)},this.droppableStore=t,e.emitter.on("pointerdown",this.handlePointerDown),e.emitter.on("dragstart",this.handleDragStart),e.emitter.on("dragmove",this.handleDragMove),e.emitter.on("pointerup",this.handlePointerUp),e.emitter.on("dragend",this.handleDragEnd),this.dragging=e,this.emitter=new li}processFirstCoord(e){let t={left:e.pageX,top:e.pageY},r=t,i=e.subjectEl,s;i instanceof HTMLElement&&(s=jl(i),r=Sv(r,s));let o=this.initialHit=this.queryHitForOffset(r.left,r.top);if(o){if(this.useSubjectCenter&&s){let a=rf(s,o.rect);a&&(r=Tv(a))}this.coordAdjust=Cv(r,t)}else this.coordAdjust={left:0,top:0}}handleMove(e,t){let r=this.queryHitForOffset(e.pageX+this.coordAdjust.left,e.pageY+this.coordAdjust.top);(t||!Af(this.movingHit,r))&&(this.movingHit=r,this.emitter.trigger("hitupdate",r,!1,e))}prepareHits(){this.offsetTrackers=ar(this.droppableStore,e=>(e.component.prepareHits(),new Oy(e.el)))}releaseHits(){let{offsetTrackers:e}=this;for(let t in e)e[t].destroy();this.offsetTrackers={}}queryHitForOffset(e,t){let{droppableStore:r,offsetTrackers:i}=this,s=null;for(let o in r){let a=r[o].component,c=i[o];if(c&&c.isWithinClipping(e,t)){let u=c.computeLeft(),f=c.computeTop(),p=e-u,h=t-f,{origRect:y}=c,_=y.right-y.left,w=y.bottom-y.top;if(p>=0&&p<_&&h>=0&&h<w){let E=a.queryHit(p,h,_,w);E&&Xo(E.dateProfile.activeRange,E.dateSpan.range)&&(!s||E.layer>s.layer)&&(E.componentId=o,E.context=a.context,E.rect.left+=u,E.rect.right+=u,E.rect.top+=f,E.rect.bottom+=f,s=E)}}}return s}};function Af(n,e){return!n&&!e?!0:Boolean(n)!==Boolean(e)?!1:Rv(n.dateSpan,e.dateSpan)}function v0(n,e){let t={};for(let r of e.pluginHooks.datePointTransforms)Object.assign(t,r(n,e));return Object.assign(t,_B(n,e.dateEnv)),t}function _B(n,e){return{date:e.toDate(n.range.start),dateStr:e.formatIso(n.range.start,{omitTime:n.allDay}),allDay:n.allDay}}var Iy=class extends wr{constructor(e){super(e),this.handlePointerDown=r=>{let{dragging:i}=this,s=r.origEvent.target;i.setIgnoreMove(!this.component.isValidDateDownEl(s))},this.handleDragEnd=r=>{let{component:i}=this,{pointer:s}=this.dragging;if(!s.wasTouchScroll){let{initialHit:o,finalHit:a}=this.hitDragging;if(o&&a&&Af(o,a)){let{context:c}=i,u=Object.assign(Object.assign({},v0(o.dateSpan,c)),{dayEl:o.dayEl,jsEvent:r.origEvent,view:c.viewApi||c.calendarApi.view});c.emitter.trigger("dateClick",u)}}},this.dragging=new Xs(e.el),this.dragging.autoScroller.isEnabled=!1;let t=this.hitDragging=new sa(this.dragging,$l(e));t.emitter.on("pointerdown",this.handlePointerDown),t.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}},ky=class extends wr{constructor(e){super(e),this.dragSelection=null,this.handlePointerDown=o=>{let{component:a,dragging:c}=this,{options:u}=a.context,f=u.selectable&&a.isValidDateDownEl(o.origEvent.target);c.setIgnoreMove(!f),c.delay=o.isTouch?wB(a):null},this.handleDragStart=o=>{this.component.context.calendarApi.unselect(o)},this.handleHitUpdate=(o,a)=>{let{context:c}=this.component,u=null,f=!1;if(o){let p=this.hitDragging.initialHit;o.componentId===p.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(p,o)||(u=SB(p,o,c.pluginHooks.dateSelectionTransformers)),(!u||!Bv(u,o.dateProfile,c))&&(f=!0,u=null)}u?c.dispatch({type:"SELECT_DATES",selection:u}):a||c.dispatch({type:"UNSELECT_DATES"}),f?Rl():Ml(),a||(this.dragSelection=u)},this.handlePointerUp=o=>{this.dragSelection&&(af(this.dragSelection,o,this.component.context),this.dragSelection=null)};let{component:t}=e,{options:r}=t.context,i=this.dragging=new Xs(e.el);i.touchScrollAllowed=!1,i.minDistance=r.selectMinDistance||0,i.autoScroller.isEnabled=r.dragScroll;let s=this.hitDragging=new sa(this.dragging,$l(e));s.emitter.on("pointerdown",this.handlePointerDown),s.emitter.on("dragstart",this.handleDragStart),s.emitter.on("hitupdate",this.handleHitUpdate),s.emitter.on("pointerup",this.handlePointerUp)}destroy(){this.dragging.destroy()}};function wB(n){let{options:e}=n.context,t=e.selectLongPressDelay;return t==null&&(t=e.longPressDelay),t}function SB(n,e,t){let r=n.dateSpan,i=e.dateSpan,s=[r.range.start,r.range.end,i.range.start,i.range.end];s.sort(av);let o={};for(let a of t){let c=a(n,e);if(c===!1)return null;c&&Object.assign(o,c)}return o.range={start:s[0],end:s[3]},o.allDay=r.allDay,o}var Zs=class extends wr{constructor(e){super(e),this.subjectEl=null,this.subjectSeg=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null,this.handlePointerDown=o=>{let a=o.origEvent.target,{component:c,dragging:u}=this,{mirror:f}=u,{options:p}=c.context,h=c.context;this.subjectEl=o.subjectEl;let y=this.subjectSeg=fi(o.subjectEl),w=(this.eventRange=y.eventRange).instance.instanceId;this.relevantEvents=Fl(h.getCurrentData().eventStore,w),u.minDistance=o.isTouch?0:p.eventDragMinDistance,u.delay=o.isTouch&&w!==c.props.eventSelection?CB(c):null,p.fixedMirrorParent?f.parentNode=p.fixedMirrorParent:f.parentNode=on(a,".fc"),f.revertDuration=p.dragRevertDuration;let E=c.isValidSegDownEl(a)&&!on(a,".fc-event-resizer");u.setIgnoreMove(!E),this.isDragging=E&&o.subjectEl.classList.contains("fc-event-draggable")},this.handleDragStart=o=>{let a=this.component.context,c=this.eventRange,u=c.instance.instanceId;o.isTouch?u!==this.component.props.eventSelection&&a.dispatch({type:"SELECT_EVENT",eventInstanceId:u}):a.dispatch({type:"UNSELECT_EVENT"}),this.isDragging&&(a.calendarApi.unselect(o),a.emitter.trigger("eventDragStart",{el:this.subjectEl,event:new xt(a,c.def,c.instance),jsEvent:o.origEvent,view:a.viewApi}))},this.handleHitUpdate=(o,a)=>{if(!this.isDragging)return;let c=this.relevantEvents,u=this.hitDragging.initialHit,f=this.component.context,p=null,h=null,y=null,_=!1,w={affectedEvents:c,mutatedEvents:wn(),isEvent:!0};if(o){p=o.context;let E=p.options;f===p||E.editable&&E.droppable?(h=TB(u,o,p.getCurrentData().pluginHooks.eventDragMutationMassagers),h&&(y=Hl(c,p.getCurrentData().eventUiBases,h,p),w.mutatedEvents=y,lf(w,o.dateProfile,p)||(_=!0,h=null,y=null,w.mutatedEvents=wn()))):p=null}this.displayDrag(p,w),_?Rl():Ml(),a||(f===p&&Af(u,o)&&(h=null),this.dragging.setMirrorNeedsRevert(!h),this.dragging.setMirrorIsVisible(!o||!this.subjectEl.getRootNode().querySelector(".fc-event-mirror")),this.receivingContext=p,this.validMutation=h,this.mutatedRelevantEvents=y)},this.handlePointerUp=()=>{this.isDragging||this.cleanup()},this.handleDragEnd=o=>{if(this.isDragging){let a=this.component.context,c=a.viewApi,{receivingContext:u,validMutation:f}=this,p=this.eventRange.def,h=this.eventRange.instance,y=new xt(a,p,h),_=this.relevantEvents,w=this.mutatedRelevantEvents,{finalHit:E}=this.hitDragging;if(this.clearDrag(),a.emitter.trigger("eventDragStop",{el:this.subjectEl,event:y,jsEvent:o.origEvent,view:c}),f){if(u===a){let D=new xt(a,w.defs[p.defId],h?w.instances[h.instanceId]:null);a.dispatch({type:"MERGE_EVENTS",eventStore:w});let R={oldEvent:y,event:D,relatedEvents:Br(w,a,h),revert(){a.dispatch({type:"MERGE_EVENTS",eventStore:_})}},H={};for(let F of a.getCurrentData().pluginHooks.eventDropTransformers)Object.assign(H,F(f,a));a.emitter.trigger("eventDrop",Object.assign(Object.assign(Object.assign({},R),H),{el:o.subjectEl,delta:f.datesDelta,jsEvent:o.origEvent,view:c})),a.emitter.trigger("eventChange",R)}else if(u){let D={event:y,relatedEvents:Br(_,a,h),revert(){a.dispatch({type:"MERGE_EVENTS",eventStore:_})}};a.emitter.trigger("eventLeave",Object.assign(Object.assign({},D),{draggedEl:o.subjectEl,view:c})),a.dispatch({type:"REMOVE_EVENTS",eventStore:_}),a.emitter.trigger("eventRemove",D);let R=w.defs[p.defId],H=w.instances[h.instanceId],F=new xt(u,R,H);u.dispatch({type:"MERGE_EVENTS",eventStore:w});let m={event:F,relatedEvents:Br(w,u,H),revert(){u.dispatch({type:"REMOVE_EVENTS",eventStore:w})}};u.emitter.trigger("eventAdd",m),o.isTouch&&u.dispatch({type:"SELECT_EVENT",eventInstanceId:h.instanceId}),u.emitter.trigger("drop",Object.assign(Object.assign({},v0(E.dateSpan,u)),{draggedEl:o.subjectEl,jsEvent:o.origEvent,view:E.context.viewApi})),u.emitter.trigger("eventReceive",Object.assign(Object.assign({},m),{draggedEl:o.subjectEl,view:E.context.viewApi}))}}else a.emitter.trigger("_noEventDrop")}this.cleanup()};let{component:t}=this,{options:r}=t.context,i=this.dragging=new Xs(e.el);i.pointer.selector=Zs.SELECTOR,i.touchScrollAllowed=!1,i.autoScroller.isEnabled=r.dragScroll;let s=this.hitDragging=new sa(this.dragging,ta);s.useSubjectCenter=e.useEventCenter,s.emitter.on("pointerdown",this.handlePointerDown),s.emitter.on("dragstart",this.handleDragStart),s.emitter.on("hitupdate",this.handleHitUpdate),s.emitter.on("pointerup",this.handlePointerUp),s.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}displayDrag(e,t){let r=this.component.context,i=this.receivingContext;i&&i!==e&&(i===r?i.dispatch({type:"SET_EVENT_DRAG",state:{affectedEvents:t.affectedEvents,mutatedEvents:wn(),isEvent:!0}}):i.dispatch({type:"UNSET_EVENT_DRAG"})),e&&e.dispatch({type:"SET_EVENT_DRAG",state:t})}clearDrag(){let e=this.component.context,{receivingContext:t}=this;t&&t.dispatch({type:"UNSET_EVENT_DRAG"}),e!==t&&e.dispatch({type:"UNSET_EVENT_DRAG"})}cleanup(){this.subjectSeg=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null}};Zs.SELECTOR=".fc-event-draggable, .fc-event-resizable";function TB(n,e,t){let r=n.dateSpan,i=e.dateSpan,s=r.range.start,o=i.range.start,a={};r.allDay!==i.allDay&&(a.allDay=i.allDay,a.hasEnd=e.context.options.allDayMaintainDuration,i.allDay&&(s=St(s)));let c=Vi(s,o,n.context.dateEnv,n.componentId===e.componentId?n.largeUnit:null);c.milliseconds&&(a.allDay=!1);let u={datesDelta:c,standardProps:a};for(let f of t)f(u,n,e);return u}function CB(n){let{options:e}=n.context,t=e.eventLongPressDelay;return t==null&&(t=e.longPressDelay),t}var Ry=class extends wr{constructor(e){super(e),this.draggingSegEl=null,this.draggingSeg=null,this.eventRange=null,this.relevantEvents=null,this.validMutation=null,this.mutatedRelevantEvents=null,this.handlePointerDown=s=>{let{component:o}=this,a=this.querySegEl(s),c=fi(a),u=this.eventRange=c.eventRange;this.dragging.minDistance=o.context.options.eventDragMinDistance,this.dragging.setIgnoreMove(!this.component.isValidSegDownEl(s.origEvent.target)||s.isTouch&&this.component.props.eventSelection!==u.instance.instanceId)},this.handleDragStart=s=>{let{context:o}=this.component,a=this.eventRange;this.relevantEvents=Fl(o.getCurrentData().eventStore,this.eventRange.instance.instanceId);let c=this.querySegEl(s);this.draggingSegEl=c,this.draggingSeg=fi(c),o.calendarApi.unselect(),o.emitter.trigger("eventResizeStart",{el:c,event:new xt(o,a.def,a.instance),jsEvent:s.origEvent,view:o.viewApi})},this.handleHitUpdate=(s,o,a)=>{let{context:c}=this.component,u=this.relevantEvents,f=this.hitDragging.initialHit,p=this.eventRange.instance,h=null,y=null,_=!1,w={affectedEvents:u,mutatedEvents:wn(),isEvent:!0};s&&(s.componentId===f.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(f,s)||(h=AB(f,s,a.subjectEl.classList.contains("fc-event-resizer-start"),p.range))),h&&(y=Hl(u,c.getCurrentData().eventUiBases,h,c),w.mutatedEvents=y,lf(w,s.dateProfile,c)||(_=!0,h=null,y=null,w.mutatedEvents=null)),y?c.dispatch({type:"SET_EVENT_RESIZE",state:w}):c.dispatch({type:"UNSET_EVENT_RESIZE"}),_?Rl():Ml(),o||(h&&Af(f,s)&&(h=null),this.validMutation=h,this.mutatedRelevantEvents=y)},this.handleDragEnd=s=>{let{context:o}=this.component,a=this.eventRange.def,c=this.eventRange.instance,u=new xt(o,a,c),f=this.relevantEvents,p=this.mutatedRelevantEvents;if(o.emitter.trigger("eventResizeStop",{el:this.draggingSegEl,event:u,jsEvent:s.origEvent,view:o.viewApi}),this.validMutation){let h=new xt(o,p.defs[a.defId],c?p.instances[c.instanceId]:null);o.dispatch({type:"MERGE_EVENTS",eventStore:p});let y={oldEvent:u,event:h,relatedEvents:Br(p,o,c),revert(){o.dispatch({type:"MERGE_EVENTS",eventStore:f})}};o.emitter.trigger("eventResize",Object.assign(Object.assign({},y),{el:this.draggingSegEl,startDelta:this.validMutation.startDelta||ht(0),endDelta:this.validMutation.endDelta||ht(0),jsEvent:s.origEvent,view:o.viewApi})),o.emitter.trigger("eventChange",y)}else o.emitter.trigger("_noEventResize");this.draggingSeg=null,this.relevantEvents=null,this.validMutation=null};let{component:t}=e,r=this.dragging=new Xs(e.el);r.pointer.selector=".fc-event-resizer",r.touchScrollAllowed=!1,r.autoScroller.isEnabled=t.context.options.dragScroll;let i=this.hitDragging=new sa(this.dragging,$l(e));i.emitter.on("pointerdown",this.handlePointerDown),i.emitter.on("dragstart",this.handleDragStart),i.emitter.on("hitupdate",this.handleHitUpdate),i.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}querySegEl(e){return on(e.subjectEl,".fc-event")}};function AB(n,e,t,r){let i=n.context.dateEnv,s=n.dateSpan.range.start,o=e.dateSpan.range.start,a=Vi(s,o,i,n.largeUnit);if(t){if(i.add(r.start,a)<r.end)return{startDelta:a}}else if(i.add(r.end,a)>r.start)return{endDelta:a};return null}var My=class{constructor(e){this.context=e,this.isRecentPointerDateSelect=!1,this.matchesCancel=!1,this.matchesEvent=!1,this.onSelect=r=>{r.jsEvent&&(this.isRecentPointerDateSelect=!0)},this.onDocumentPointerDown=r=>{let i=this.context.options.unselectCancel,s=Ud(r.origEvent);this.matchesCancel=!!on(s,i),this.matchesEvent=!!on(s,Zs.SELECTOR)},this.onDocumentPointerUp=r=>{let{context:i}=this,{documentPointer:s}=this,o=i.getCurrentData();if(!s.wasTouchScroll){if(o.dateSelection&&!this.isRecentPointerDateSelect){let a=i.options.unselectAuto;a&&(!a||!this.matchesCancel)&&i.calendarApi.unselect(r)}o.eventSelection&&!this.matchesEvent&&i.dispatch({type:"UNSELECT_EVENT"})}this.isRecentPointerDateSelect=!1};let t=this.documentPointer=new Sf(document);t.shouldIgnoreMove=!0,t.shouldWatchScroll=!1,t.emitter.on("pointerdown",this.onDocumentPointerDown),t.emitter.on("pointerup",this.onDocumentPointerUp),e.emitter.on("select",this.onSelect)}destroy(){this.context.emitter.off("select",this.onSelect),this.documentPointer.destroy()}},DB={fixedMirrorParent:oe},xB={dateClick:oe,eventDragStart:oe,eventDragStop:oe,eventDrop:oe,eventResizeStart:oe,eventResizeStop:oe,eventResize:oe,drop:oe,eventReceive:oe,eventLeave:oe};zl.dataAttrPrefix="";var y0=Pn({name:"@fullcalendar/interaction",componentInteractions:[Iy,ky,Zs,Ry],calendarInteractions:[My],elementDraggingImpl:Xs,optionRefiners:DB,listenerRefiners:xB});var Ny=class extends me{connect(){var n=this.element,e=n.dataset.url,t=!1,r=[];e&&r.push(e),this.calendarInstance=new df(n,{plugins:[s0,f0,p0,y0],eventTimeFormat:{hour:"numeric",minute:"2-digit",meridiem:!0},height:"calc(100vh - 10.5rem)",themeSystem:"bootstrap5",bootstrapFontAwesome:!1,selectable:t,weekNumbers:!0,eventOverlap:!1,firstDay:1,editable:!0,eventSources:r,eventClick:i=>this.eventClick(i),select:i=>this.dateClick(i,newUrl)}),this.calendarInstance.render(),document.addEventListener("fullcalendar:reload",this._reload)}disconnect(){document.removeEventListener("fullcalendar:reload",this._reload)}async load(n,e){Turbo.visit(n,{action:"replace"}),document.getElementById("modal").querySelector(".modal-content").innerHTML=body}eventClick(n){n.jsEvent.preventDefault(),n.event.url&&(this.load(n.event.url,{}),window.location.href=n.event.url)}dateClick(n,e){let t={date_start:n.startStr,date_end:n.endStr};this.load(e,t)}_customButtons(){return{addButton:{icon:"add",click:()=>{console.log(this.newUrl),$.get(this.newUrl,{start_at:new Date().toISOString(),end_at:new Date().toISOString()},null,"script")}},filterer:{icon:"filter",click:function(){return $("#modal-filter").modal("show")}}}}_reload=()=>this.reload();reload(n){this.calendarInstance.refetchEvents(),this.calendarInstance.refetchResources()}_complete(n,e){}_error(n,e,t){$.snackbar({content:t.responseText})}};var Ly={};He(Ly,{default:()=>Xl});var b0=Tt(Po());var Xl=class extends me{initialize(){this.page=2,this.data.get("index")==2&&this.spinnerTarget.classList.add("d-none")}connect(){this.data.get("index")!=2?(this.checkEndInView=(0,b0.default)(this.endInView,300).bind(this),window.addEventListener("scroll",this.checkEndInView),this.checkEndInView()):this.endTarget.classList.remove("d-none")}disconnect(){window.removeEventListener("scroll",this.checkEndInView)}endInView(){this.endTarget.classList.contains("d-none")&&this.loadPage(this.page)}loadPage(n){fetch(`${this.urlValue}?page=${n}`,{headers:{"X-Requested-With":"XMLHttpRequest"}}).then(e=>e.text()).then(e=>{let t=document.createElement("div");if(t.innerHTML=e.trim(),this.listTarget.appendChild(t.querySelector("[data-load-more-target='list']")),this.page++,this.data.get("index")==this.page){this.spinnerTarget.classList.add("d-none"),this.endTarget.classList.remove("d-none");return}})}};we(Xl,"targets",["list","end","spinner"]),we(Xl,"values",{url:String});var By={};He(By,{default:()=>Fy});var Fy=class extends me{updateTag(n){let e=n.currentTarget.value,t=new URLSearchParams(window.location.search);e==="#"?t.delete("tag"):t.set("tag",e),Turbolinks.visit(`?${t.toString()}`,{action:"replace"})}updateKeyword(n){let e=n.currentTarget.value,t=new URLSearchParams(window.location.search);e===""?t.delete("keyword"):t.set("keyword",e),Turbolinks.visit(`?${t.toString()}`,{action:"replace"})}};var qy={};He(qy,{default:()=>Hy});var I0=Tt(C0()),k0=Tt(O0()),Hy=class extends me{connect(){this.masonry=new I0.default(this.element,{percentPosition:!0}),this.masonry.layout(),(0,k0.default)(this.element).on("progress",()=>{this.masonry.layout()})}disconnect(){this.masonry.destroy()}};var Vy={};He(Vy,{default:()=>Ff});var Ff=class extends me{connect(){this.sourceTarget.insertAdjacentHTML("afterend",this.appendToggle())}appendToggle(){return`<a class="icon-toggle" data-target="password.toggler" data-action="click->password#toggle">
              ${this.visibileIconOff}
            </a>`}toggle(n){this.sourceTarget.type==="password"?(this.sourceTarget.type="text",this.togglerTarget.innerHTML=this.visibileIconOn):(this.sourceTarget.type="password",this.togglerTarget.innerHTML=this.visibileIconOff)}get visibileIconOn(){return`<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-eye" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
              <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
              <circle cx="12" cy="12" r="2"></circle>
              <path d="M22 12c-2.667 4.667 -6 7 -10 7s-7.333 -2.333 -10 -7c2.667 -4.667 6 -7 10 -7s7.333 2.333 10 7"></path>
          </svg>`}get visibileIconOff(){return`<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-eye-off" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
              <path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
              <line x1="3" y1="3" x2="21" y2="21"></line>
              <path d="M10.584 10.587a2 2 0 0 0 2.828 2.83"></path>
              <path d="M9.363 5.365a9.466 9.466 0 0 1 2.637 -.365c4 0 7.333 2.333 10 7c-.778 1.361 -1.612 2.524 -2.503 3.488m-2.14 1.861c-1.631 1.1 -3.415 1.651 -5.357 1.651c-4 0 -7.333 -2.333 -10 -7c1.369 -2.395 2.913 -4.175 4.632 -5.341"></path>
          </svg>`}};we(Ff,"targets",["source","toggler"]);var $y={};He($y,{default:()=>Bf});var R0=Tt(On());var Bf=class extends me{connect(){this.enableRecurringUpdated()}enableRecurringUpdated(){if(!this.hasEnableRecurringTarget)return;this.enableRecurringTarget.checked?(this.recurringSectionTarget.classList.remove("d-none"),this.hasEndAtWrapperTarget&&this.endAtWrapperTarget.querySelector('input[type="text"]').setAttribute("required","required"),this.hasRepetitionTarget&&this.repetitionTarget.setAttribute("required","required")):(this.recurringSectionTarget.classList.add("d-none"),this.hasEndAtWrapperTarget&&this.endAtWrapperTarget.querySelector('input[type="text"]').removeAttribute("required"),this.hasRepetitionTarget&&this.repetitionTarget.removeAttribute("required")),window.dispatchEvent(new CustomEvent("event-update-subtotal"))}repetitionUpdated(){let n={recurring_id:this.data.get("id"),end_at:"",repetition:this.repetitionTarget.value-1};this.getCollectionDates(n)}endAtUpdated(){let n={recurring_id:this.data.get("id"),end_at:this.endAtTarget.value,repetition:""};this.getCollectionDates(n)}getCollectionDates(n){R0.default.ajax({url:"/recurrings/collection_dates",type:"GET",dataType:"json",data:new URLSearchParams(n).toString()})}};we(Bf,"targets",["enableRecurring","repetition","endAt","endAtWrapper","recurringSection"]);var zy={};He(zy,{default:()=>jf});var M0=Tt(On()),N0=Tt(Po());var jf=class extends me{initialize(){this.submitForm=(0,N0.default)(this.submitForm.bind(this),300)}submitForm(){M0.default.fire(this.formTarget,"submit")}};we(jf,"targets",["form","results"]);var Wy={};He(Wy,{default:()=>Hf});var Hf=class extends me{connect(){this.hasHiddenTarget&&this.hide()}toggle(n){this.data.get("state")==="hidden"?(this.show(),this.focusOnPassword()):this.hide()}hide(){this.hiddenTargets.forEach(n=>{n.classList.add("d-none")}),this.data.set("state","hidden")}show(){this.hiddenTargets.forEach(n=>{n.classList.remove("d-none")}),this.data.set("state","show")}focusOnPassword(){let n=document.getElementById("user_password");n!==null&&n.focus()}};we(Hf,"targets",["hidden"]);var Uy={};He(Uy,{default:()=>qf});var qf=class extends me{connect(){this.updateTickets()}updateTickets(){if(this.hasQuantityTarget&&this.hasTicketListTarget){let n=parseInt(this.quantityTarget.value),e=this.ticketListTarget.children.length,t=n-e;if(t>=0)Array(t).fill(0).forEach((r,i)=>{let s=e+parseInt(i,10)+1,o=this.ticketTemplateTarget.innerHTML;o=yd(o,"ticket-usage",s),this.ticketListTarget.insertAdjacentHTML("beforeend",o)});else{let r=Array.from(this.ticketListTarget.children).reverse();Array(Math.abs(t)).fill(0).forEach((i,s)=>{r[s].remove()})}}}};we(qf,"targets",["quantity","ticketList","ticketTemplate","ticketForm","ticketTitle"]);var Yy={};He(Yy,{default:()=>Vf});var Vf=class extends me{submit(){this.banksListTargets.forEach(n=>{n.parentNode.querySelectorAll("[required]").forEach(e=>{e.removeAttribute("required")})}),this.billFormTarget.dataset.remote="true"}};we(Vf,"targets",["banksList","billForm"]);var Gy={};He(Gy,{default:()=>$f});var $f=class extends me{connect(){this.updateTotal()}updateTotal(n){let e=n&&n.currentTarget==this.totalTarget;if(this.valueTarget.value==""||this.zakatRateTarget.value==""){this.totalHintTarget.innerHTML="";return}let t=parseInt(this.valueTarget.value),r=parseFloat(Array.from(this.zakatRateTarget.options).find(o=>o.selected).dataset.value)||1,i=parseFloat(this.totalTarget.value),s=r*t;!e||i<s?this.totalTarget.value=s.toFixed(2):this.totalTarget.value=i.toFixed(2),this.totalHintTarget.innerHTML=`Jumlah minima adalah RM ${s.toFixed(2)}`}};we($f,"targets",["value","total","totalHint","zakatRate"]);var OB=[{name:"public--bill-event",module:wm,filename:"./public/bill_event_controller.js"},{name:"public--collection-summary-mobile",module:Tm,filename:"./public/collection_summary_mobile_controller.js"},{name:"public--e-mandate",module:Cm,filename:"./public/e_mandate_controller.js"},{name:"public--e-mandate-user",module:Dm,filename:"./public/e_mandate_user_controller.js"},{name:"public--fullcalendar",module:Py,filename:"./public/fullcalendar_controller.js"},{name:"public--load-more",module:Ly,filename:"./public/load_more_controller.js"},{name:"public--marketplace-tags",module:By,filename:"./public/marketplace_tags_controller.js"},{name:"public--masonry",module:qy,filename:"./public/masonry_controller.js"},{name:"public--password",module:Vy,filename:"./public/password_controller.js"},{name:"public--recurring",module:$y,filename:"./public/recurring_controller.js"},{name:"public--search-merchant",module:zy,filename:"./public/search_merchant_controller.js"},{name:"public--session-verify",module:Wy,filename:"./public/session_verify_controller.js"},{name:"public--ticket-info",module:Uy,filename:"./public/ticket_info_controller.js"},{name:"public--voucher",module:Yy,filename:"./public/voucher_controller.js"},{name:"public--zakat-collection",module:Gy,filename:"./public/zakat_collection_controller.js"}],P0=OB;var oa=cu.start();oa.debug=!1;window.Stimulus=oa;D_.forEach(n=>{oa.register(n.name,n.module.default)});ww.forEach(n=>{oa.register(n.name.replace("application--",""),n.module.default)});P0.forEach(n=>{oa.register(n.name.replace("public--",""),n.module.default)});qS.forEach(n=>{oa.register(n.name.replace("shared--",""),n.module.default)});document.addEventListener("DOMContentLoaded",function(n){Turbolinks.scroll={},document.addEventListener("turbolinks:load",()=>{document.querySelectorAll("[data-turbolinks-scroll]").forEach(function(t){t.addEventListener("click",()=>{Turbolinks.scroll.top=document.scrollingElement.scrollTop}),t.addEventListener("submit",()=>{Turbolinks.scroll.top=document.scrollingElement.scrollTop})}),Turbolinks.scroll.top&&document.scrollingElement.scrollTo(0,Turbolinks.scroll.top),Turbolinks.scroll={}})});var Js=Tt(L0()),Qy=class{constructor(e){this.pixelId=e,this.options={autoConfig:!1},this.initialize()}initialize(){Js.default.init(this.pixelId,{},this.options),Js.default.pageView()}clickEventListener(){document.querySelectorAll(["[data-pixel-tracking=true]"]).forEach(function(e){document.addEventListener&&e.addEventListener("click",function(){Js.default.track(e.dataset.pixelAction,JSON.parse(e.dataset.pixelProps))})})}initiateCheckout(e){Js.default.track("InitiateCheckout",e)}addPaymentInfo(e){Js.default.track("AddPaymentInfo",e)}purchase(e){Js.default.track("Purchase",e)}},F0=Qy;var Kf=Tt(B0());var Zl="undefined";var Jy="object";var eb="any",tb="*";var hi="__";var Wf=typeof process<"u"?process:{},d4=Wf.env&&Wf.env.NODE_ENV||"";var Ln=typeof window<"u",f4=Ln&&window.location.hostname==="localhost",h4=Wf.versions!=null&&Wf.versions.node!=null,p4=typeof Deno<"u"&&Deno.core!==void 0,g4=typeof self=="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope",m4=Ln&&window.name==="nodejs"||typeof navigator<"u"&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom"));function j0(n,e){return e.charAt(0)[n]()+e.slice(1)}var IB=j0.bind(null,"toUpperCase"),kB=j0.bind(null,"toLowerCase");function RB(n){return q0(n)?IB("null"):typeof n=="object"?PB(n):Object.prototype.toString.call(n).slice(8,-1)}function Uf(n,e){e===void 0&&(e=!0);var t=RB(n);return e?kB(t):t}function Jl(n,e){return typeof e===n}var Tr=Jl.bind(null,"function"),pi=Jl.bind(null,"string"),eo=Jl.bind(null,"undefined");var H0=Jl.bind(null,"boolean"),v4=Jl.bind(null,"symbol");function q0(n){return n===null}function MB(n){return Uf(n)==="number"&&!isNaN(n)}function V0(n){return Uf(n)==="array"}function An(n){if(!NB(n))return!1;for(var e=n;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(n)===e}function NB(n){return n&&(typeof n=="object"||n!==null)}function PB(n){return Tr(n.constructor)?n.constructor.name:null}function LB(n){return n instanceof Error||pi(n.message)&&n.constructor&&MB(n.constructor.stackTraceLimit)}function $0(n,e){if(typeof e!="object"||q0(e))return!1;if(e instanceof n)return!0;var t=Uf(new n(""));if(LB(e))for(;e;){if(Uf(e)===t)return!0;e=Object.getPrototypeOf(e)}return!1}var y4=$0.bind(null,TypeError),b4=$0.bind(null,SyntaxError);function Yf(n,e){var t=n instanceof Element||n instanceof HTMLDocument;return t&&e?FB(n,e):t}function FB(n,e){return e===void 0&&(e=""),n&&n.nodeName===e.toUpperCase()}function Gf(n){var e=[].slice.call(arguments,1);return function(){return n.apply(void 0,[].slice.call(arguments).concat(e))}}var E4=Gf(Yf,"form"),_4=Gf(Yf,"button"),w4=Gf(Yf,"input"),S4=Gf(Yf,"select");function z0(n){try{return decodeURIComponent(n.replace(/\+/g," "))}catch{return null}}function W0(){if(Ln){var n=navigator,e=n.languages;return n.userLanguage||(e&&e.length?e[0]:n.language)}}function U0(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}function Y0(n){return function(e){for(var t,r=Object.create(null),i=/([^&=]+)=?([^&]*)/g;t=i.exec(e);){var s=z0(t[1]),o=z0(t[2]);s.substring(s.length-2)==="[]"?(r[s=s.substring(0,s.length-2)]||(r[s]=[])).push(o):r[s]=o===""||o}for(var a in r){var c=a.split("[");c.length>1&&(BB(r,c.map(function(u){return u.replace(/[?[\]\\ ]/g,"")}),r[a]),delete r[a])}return r}(function(e){if(e){var t=e.match(/\?(.*)/);return t&&t[1]?t[1].split("#")[0]:""}return Ln&&window.location.search.substring(1)}(n))}function BB(n,e,t){for(var r=e.length-1,i=0;i<r;++i){var s=e[i];if(s==="__proto__"||s==="constructor")break;s in n||(n[s]={}),n=n[s]}n[e[r]]=t}function ec(){for(var n="",e=0,t=4294967295*Math.random()|0;e++<36;){var r="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"[e-1],i=15&t;n+=r=="-"||r=="4"?r:(r=="x"?i:3&i|8).toString(16),t=e%8==0?4294967295*Math.random()|0:t>>4}return n}var aa="global",to=hi+"global"+hi,no=typeof self===Jy&&self.self===self&&self||typeof window===Jy&&window.global===window&&window||void 0;function fr(n){return no[to][n]}function hr(n,e){return no[to][n]=e}function Cr(n){delete no[to][n]}function Qi(n,e,t){var r;try{if(tc(n)){var i=window[n];r=i[e].bind(i)}}catch{}return r||t}no[to]||(no[to]={});var Qf={};function tc(n){if(typeof Qf[n]!==Zl)return Qf[n];try{var e=window[n];e.setItem(Zl,Zl),e.removeItem(Zl)}catch{return Qf[n]=!1}return Qf[n]=!0}function ot(){return ot=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},ot.apply(this,arguments)}var Zi="function",gi="undefined",jB="@@redux/"+Math.random().toString(36),G0=function(){return typeof Symbol===Zi&&Symbol.observable||"@@observable"}(),Xf=" != "+Zi;function fA(n,e,t){var r;if(typeof e===Zi&&typeof t===gi&&(t=e,e=void 0),typeof t!==gi){if(typeof t!==Zi)throw new Error("enhancer"+Xf);return t(fA)(n,e)}if(typeof n!==Zi)throw new Error("reducer"+Xf);var i=n,s=e,o=[],a=o,c=!1;function u(){a===o&&(a=o.slice())}function f(){return s}function p(y){if(typeof y!==Zi)throw new Error("Listener"+Xf);var _=!0;return u(),a.push(y),function(){if(_){_=!1,u();var w=a.indexOf(y);a.splice(w,1)}}}function h(y){if(!An(y))throw new Error("Act != obj");if(typeof y.type===gi)throw new Error("ActType "+gi);if(c)throw new Error("Dispatch in reducer");try{c=!0,s=i(s,y)}finally{c=!1}for(var _=o=a,w=0;w<_.length;w++)(0,_[w])();return y}return h({type:"@@redux/INIT"}),(r={dispatch:h,subscribe:p,getState:f,replaceReducer:function(y){if(typeof y!==Zi)throw new Error("next reducer"+Xf);i=y,h({type:"@@redux/INIT"})}})[G0]=function(){var y,_=p;return(y={subscribe:function(w){if(typeof w!="object")throw new TypeError("Observer != obj");function E(){w.next&&w.next(f())}return E(),{unsubscribe:_(E)}}})[G0]=function(){return this},y},r}function HB(n,e){var t=e&&e.type;return"action "+(t&&t.toString()||"?")+"reducer "+n+" returns "+gi}function da(){var n=[].slice.call(arguments);return n.length===0?function(e){return e}:n.length===1?n[0]:n.reduce(function(e,t){return function(){return e(t.apply(void 0,[].slice.call(arguments)))}})}function qB(){var n=arguments;return function(e){return function(t,r,i){var s,o=e(t,r,i),a=o.dispatch,c={getState:o.getState,dispatch:function(u){return a(u)}};return s=[].slice.call(n).map(function(u){return u(c)}),ot({},o,{dispatch:a=da.apply(void 0,s)(o.dispatch)})}}}var Ji=hi+"anon_id",ro=hi+"user_id",ca=hi+"user_traits";var Xi="userId",la="anonymousId",eh=["bootstrap","params","campaign","initializeStart","initialize","initializeEnd","ready","resetStart","reset","resetEnd","pageStart","page","pageEnd","pageAborted","trackStart","track","trackEnd","trackAborted","identifyStart","identify","identifyEnd","identifyAborted","userIdChanged","registerPlugins","enablePlugin","disablePlugin","online","offline","setItemStart","setItem","setItemEnd","setItemAborted","removeItemStart","removeItem","removeItemEnd","removeItemAborted"],ob=["name","EVENTS","config","loaded"],st=eh.reduce(function(n,e){return n[e]=e,n},{registerPluginType:function(n){return"registerPlugin:"+n},pluginReadyType:function(n){return"ready:"+n}}),K0=/^utm_/,Q0=/^an_prop_/,X0=/^an_trait_/;function VB(n){var e=n.storage.setItem;return function(t){return function(r){return function(i){if(i.type===st.bootstrap){var s=i.params,o=i.user,a=i.persistedUser,c=i.initialUser,u=a.userId===o.userId;a.anonymousId!==o.anonymousId&&e(Ji,o.anonymousId),u||e(ro,o.userId),c.traits&&e(ca,ot({},u&&a.traits?a.traits:{},c.traits));var f=Object.keys(i.params);if(f.length){var p=s.an_uid,h=s.an_event,y=f.reduce(function(_,w){if(w.match(K0)||w.match(/^(d|g)clid/)){var E=w.replace(K0,"");_.campaign[E==="campaign"?"name":E]=s[w]}return w.match(Q0)&&(_.props[w.replace(Q0,"")]=s[w]),w.match(X0)&&(_.traits[w.replace(X0,"")]=s[w]),_},{campaign:{},props:{},traits:{}});t.dispatch(ot({type:st.params,raw:s},y,p?{userId:p}:{})),p&&setTimeout(function(){return n.identify(p,y.traits)},0),h&&setTimeout(function(){return n.track(h,y.props)},0),Object.keys(y.campaign).length&&t.dispatch({type:st.campaign,campaign:y.campaign})}}return r(i)}}}}function $B(n){return function(e,t){if(e===void 0&&(e={}),t===void 0&&(t={}),t.type===st.setItemEnd){if(t.key===Ji)return ot({},e,{anonymousId:t.value});if(t.key===ro)return ot({},e,{userId:t.value})}switch(t.type){case st.identify:return Object.assign({},e,{userId:t.userId,traits:ot({},e.traits,t.traits)});case st.reset:return[ro,Ji,ca].forEach(function(r){n.removeItem(r)}),Object.assign({},e,{userId:null,anonymousId:null,traits:{}});default:return e}}}function Z0(n){return{userId:n.getItem(ro),anonymousId:n.getItem(Ji),traits:n.getItem(ca)}}var ab=function(n){return hi+"TEMP"+hi+n};function zB(n){var e=n.storage,t=e.setItem,r=e.removeItem,i=e.getItem;return function(s){return function(o){return function(a){var c=a.userId,u=a.traits,f=a.options;if(a.type===st.reset&&([ro,ca,Ji].forEach(function(y){r(y)}),[Xi,la,"traits"].forEach(function(y){Cr(ab(y))})),a.type===st.identify){i(Ji)||t(Ji,ec());var p=i(ro),h=i(ca)||{};p&&p!==c&&s.dispatch({type:st.userIdChanged,old:{userId:p,traits:h},new:{userId:c,traits:u},options:f}),c&&t(ro,c),u&&t(ca,ot({},h,u))}return o(a)}}}}var nc={};function J0(n,e){nc[n]&&Tr(nc[n])&&(nc[n](e),delete nc[n])}function hA(n,e,t){return new Promise(function(r,i){return e()?r(n):t<1?i(ot({},n,{queue:!0})):new Promise(function(s){return setTimeout(s,10)}).then(function(s){return hA(n,e,t-10).then(r,i)})})}function pA(n,e,t){var r=e(),i=n.getState(),s=i.plugins,o=i.queue,a=i.user;if(!i.context.offline&&o&&o.actions&&o.actions.length){var c=o.actions.reduce(function(f,p,h){return s[p.plugin].loaded?(f.process.push(p),f.processIndex.push(h)):(f.requeue.push(p),f.requeueIndex.push(h)),f},{processIndex:[],process:[],requeue:[],requeueIndex:[]});if(c.processIndex&&c.processIndex.length){c.processIndex.forEach(function(f){var p=o.actions[f],h=p.plugin,y=p.payload.type,_=r[h][y];if(_&&Tr(_)){var w=function(D,R){return D===void 0&&(D={}),R===void 0&&(R={}),[Xi,la].reduce(function(H,F){return D.hasOwnProperty(F)&&R[F]&&R[F]!==D[F]&&(H[F]=R[F]),H},D)}(p.payload,a);_({payload:w,config:s[h].config,instance:t});var E=y+":"+h;n.dispatch(ot({},w,{type:E,_:{called:E,from:"queueDrain"}}))}});var u=o.actions.filter(function(f,p){return!~c.processIndex.indexOf(p)});o.actions=u}}}var nb=function(n){var e=n.data,t=n.action,r=n.instance,i=n.state,s=n.allPlugins,o=n.allMatches,a=n.store,c=n.EVENTS;try{var u=i.plugins,f=i.context,p=t.type,h=p.match(ua),y=e.exact.map(function(E){return E.pluginName});h&&(y=o.during.map(function(E){return E.pluginName}));var _=function(E,D){return function(R,H,F){var m=H.config,Q=H.name,le=Q+"."+R.type;F&&(le=F.event);var J=R.type.match(ua)?function(q,Z,ae,Ce,Ae){return function(_e,Le){var Ve=Ce?Ce.name:q,$e=Le&&rc(Le)?Le:ae;if(Ce&&(!($e=Le&&rc(Le)?Le:[q]).includes(q)||$e.length!==1))throw new Error("Method "+Z+" can only abort "+q+" plugin. "+JSON.stringify($e)+" input valid");return ot({},Ae,{abort:{reason:_e,plugins:$e,caller:Z,_:Ve}})}}(Q,le,D,F,R):function(q,Z){return function(){throw new Error(q.type+" action not cancellable. Remove abort in "+Z)}}(R,le);return{payload:WB(R),instance:E,config:m||{},abort:J}}}(r,y),w=e.exact.reduce(function(E,D){var R=D.pluginName,H=D.methodName,F=!1;return H.match(/^initialize/)||H.match(/^reset/)||(F=!u[R].loaded),f.offline&&H.match(/^(page|track|identify)/)&&(F=!0),E[""+R]=F,E},{});return Promise.resolve(e.exact.reduce(function(E,D,R){var H=D.pluginName;return Promise.resolve(E).then(function(F){function m(){return Promise.resolve(F)}var Q=function(){if(e.namespaced&&e.namespaced[H])return Promise.resolve(e.namespaced[H].reduce(function(le,J,q){return Promise.resolve(le).then(function(Z){return J.method&&Tr(J.method)?(function(_e,Le){var Ve=oA(_e);if(Ve&&Ve.name===Le){var $e=oA(Ve.method);throw new Error([Le+" plugin is calling method "+_e,"Plugins cant call self","Use "+Ve.method+" "+($e?"or "+$e.method:"")+" in "+Le+" plugin insteadof "+_e].join(`
`))}}(J.methodName,J.pluginName),Promise.resolve(J.method({payload:Z,instance:r,abort:(ae=Z,Ce=H,Ae=J.pluginName,function(_e,Le){return ot({},ae,{abort:{reason:_e,plugins:Le||[Ce],caller:p,from:Ae||Ce}})}),config:nA(J.pluginName,u,s),plugins:u})).then(function(_e){var Le=An(_e)?_e:{};return Promise.resolve(ot({},Z,Le))})):Z;var ae,Ce,Ae})},Promise.resolve(t))).then(function(le){F[H]=le});F[H]=t}();return Q&&Q.then?Q.then(m):m()})},Promise.resolve({}))).then(function(E){return Promise.resolve(e.exact.reduce(function(D,R,H){try{var F=e.exact.length===H+1,m=R.pluginName,Q=s[m];return Promise.resolve(D).then(function(le){var J=E[m]?E[m]:{};if(h&&(J=le),ib(J,m))return rb({data:J,method:p,instance:r,pluginName:m,store:a}),Promise.resolve(le);if(ib(le,m))return F&&rb({data:le,method:p,instance:r,store:a}),Promise.resolve(le);if(w.hasOwnProperty(m)&&w[m]===!0)return a.dispatch({type:"queue",plugin:m,payload:J,_:{called:"queue",from:"queueMechanism"}}),Promise.resolve(le);var q=_(E[m],s[m]);return Promise.resolve(Q[p]({abort:q.abort,payload:J,instance:r,config:nA(m,u,s),plugins:u})).then(function(Z){var ae=An(Z)?Z:{},Ce=ot({},le,ae),Ae=E[m];if(ib(Ae,m))rb({data:Ae,method:p,instance:r,pluginName:m,store:a});else{var _e=p+":"+m;(_e.match(/:/g)||[]).length<2&&!p.match(eA)&&!p.match(tA)&&r.dispatch(ot({},h?Ce:J,{type:_e,_:{called:_e,from:"submethod"}}))}return Promise.resolve(Ce)})})}catch(le){return Promise.reject(le)}},Promise.resolve(t))).then(function(D){if(!(p.match(ua)||p.match(/^registerPlugin/)||p.match(tA)||p.match(eA)||p.match(/^params/)||p.match(/^userIdChanged/))){if(c.plugins.includes(p),D._&&D._.originalAction===p)return D;var R=ot({},D,{_:{originalAction:D.type,called:D.type,from:"engineEnd"}});gA(D,e.exact.length)&&!p.match(/End$/)&&(R=ot({},R,{type:D.type+"Aborted"})),a.dispatch(R)}return D})})}catch(E){return Promise.reject(E)}},ua=/Start$/,eA=/^bootstrap/,tA=/^ready/;function rb(n){var e=n.pluginName,t=n.method+"Aborted"+(e?":"+e:"");n.store.dispatch(ot({},n.data,{type:t,_:{called:t,from:"abort"}}))}function nA(n,e,t){var r=e[n]||t[n];return r&&r.config?r.config:{}}function rA(n,e){return e.reduce(function(t,r){return r[n]?t.concat({methodName:n,pluginName:r.name,method:r[n]}):t},[])}function iA(n,e){var t=n.replace(ua,""),r=e?":"+e:"";return[""+n+r,""+t+r,t+"End"+r]}function ib(n,e){var t=n.abort;return!!t&&(t===!0||sA(t,e)||t&&sA(t.plugins,e))}function gA(n,e){var t=n.abort;if(!t)return!1;if(t===!0||pi(t))return!0;var r=t.plugins;return rc(t)&&t.length===e||rc(r)&&r.length===e}function rc(n){return Array.isArray(n)}function sA(n,e){return!(!n||!rc(n))&&n.includes(e)}function oA(n){var e=n.match(/(.*):(.*)/);return!!e&&{method:e[1],name:e[2]}}function WB(n){return Object.keys(n).reduce(function(e,t){return t==="type"||(e[t]=An(n[t])?Object.assign({},n[t]):n[t]),e},{})}function UB(n,e,t){var r={};return function(i){return function(s){return function(o){try{var a,c=function(F){return a?F:s(p)},u=o.type,f=o.plugins,p=o;if(o.abort)return Promise.resolve(s(o));if(u===st.enablePlugin&&i.dispatch({type:st.initializeStart,plugins:f,disabled:[],fromEnable:!0,meta:o.meta}),u===st.disablePlugin&&setTimeout(function(){return J0(o.meta.rid,{payload:o})},0),u===st.initializeEnd){var h=e(),y=Object.keys(h),_=y.filter(function(F){return f.includes(F)}).map(function(F){return h[F]}),w=[],E=[],D=o.disabled,R=_.map(function(F){var m=F.name;return hA(F,F.loaded,1e4).then(function(Q){return r[m]||(i.dispatch({type:st.pluginReadyType(m),name:m,events:Object.keys(F).filter(function(le){return!ob.includes(le)})}),r[m]=!0),w=w.concat(m),F}).catch(function(Q){if(Q instanceof Error)throw new Error(Q);return E=E.concat(Q.name),Q})});Promise.all(R).then(function(F){var m={plugins:w,failed:E,disabled:D};setTimeout(function(){y.length===R.length+D.length&&i.dispatch(ot({},{type:st.ready},m))},0)})}var H=function(){if(u!==st.bootstrap)return/^ready:([^:]*)$/.test(u)&&setTimeout(function(){return pA(i,e,n)},0),Promise.resolve(function(F,m,Q,le,J){try{var q=Tr(m)?m():m,Z=F.type,ae=Z.replace(ua,"");if(F._&&F._.called)return Promise.resolve(F);var Ce=Q.getState(),Ae=(Ve=q,($e=Ce.plugins)===void 0&&($e={}),(pe=F.options)===void 0&&(pe={}),Object.keys(Ve).filter(function(ce){var Oe=pe.plugins||{};return H0(Oe[ce])?Oe[ce]:Oe.all!==!1&&(!$e[ce]||$e[ce].enabled!==!1)}).map(function(ce){return Ve[ce]}));Z===st.initializeStart&&F.fromEnable&&(Ae=Object.keys(Ce.plugins).filter(function(ce){var Oe=Ce.plugins[ce];return F.plugins.includes(ce)&&!Oe.initialized}).map(function(ce){return q[ce]}));var _e=Ae.map(function(ce){return ce.name}),Le=function(ce,Oe,Qe){var Ge=iA(ce).map(function(We){return rA(We,Oe)});return Oe.reduce(function(We,lt){var xe=lt.name,b=iA(ce,xe).map(function(K){return rA(K,Oe)}),C=b[0],O=b[1],U=b[2];return C.length&&(We.beforeNS[xe]=C),O.length&&(We.duringNS[xe]=O),U.length&&(We.afterNS[xe]=U),We},{before:Ge[0],beforeNS:{},during:Ge[1],duringNS:{},after:Ge[2],afterNS:{}})}(Z,Ae);return Promise.resolve(nb({action:F,data:{exact:Le.before,namespaced:Le.beforeNS},state:Ce,allPlugins:q,allMatches:Le,instance:Q,store:le,EVENTS:J})).then(function(ce){function Oe(){var We=function(){if(Z.match(ua))return Promise.resolve(nb({action:ot({},Qe,{type:ae+"End"}),data:{exact:Le.after,namespaced:Le.afterNS},state:Ce,allPlugins:q,allMatches:Le,instance:Q,store:le,EVENTS:J})).then(function(lt){lt.meta&&lt.meta.hasCallback&&J0(lt.meta.rid,{payload:lt})})}();return We&&We.then?We.then(function(){return ce}):ce}if(gA(ce,_e.length))return ce;var Qe,Ge=function(){if(Z!==ae)return Promise.resolve(nb({action:ot({},ce,{type:ae}),data:{exact:Le.during,namespaced:Le.duringNS},state:Ce,allPlugins:q,allMatches:Le,instance:Q,store:le,EVENTS:J})).then(function(We){Qe=We});Qe=ce}();return Ge&&Ge.then?Ge.then(Oe):Oe()})}catch(ce){return Promise.reject(ce)}var Ve,$e,pe}(o,e,n,i,t)).then(function(F){var m=s(F);return a=1,m})}();return Promise.resolve(H&&H.then?H.then(c):c(H))}catch(F){return Promise.reject(F)}}}}}function YB(n){return function(e){return function(t){return function(r){var i=r.type,s=r.key,o=r.value,a=r.options;if(i===st.setItem||i===st.removeItem){if(r.abort)return t(r);i===st.setItem?n.setItem(s,o,a):n.removeItem(s,a)}return t(r)}}}}var GB=function(){var n=this;this.before=[],this.after=[],this.addMiddleware=function(e,t){n[t]=n[t].concat(e)},this.removeMiddleware=function(e,t){var r=n[t].findIndex(function(i){return i===e});r!==-1&&(n[t]=[].concat(n[t].slice(0,r),n[t].slice(r+1)))},this.dynamicMiddlewares=function(e){return function(t){return function(r){return function(i){var s={getState:t.getState,dispatch:function(a){return t.dispatch(a)}},o=n[e].map(function(a){return a(s)});return da.apply(void 0,o)(r)(i)}}}}};function KB(n){return function(e,t){e===void 0&&(e={});var r={};if(t.type==="initialize:aborted")return e;if(/^registerPlugin:([^:]*)$/.test(t.type)){var i=aA(t.type,"registerPlugin"),s=n()[i];if(!s||!i)return e;var o=t.enabled;return r[i]={enabled:o,initialized:!!o&&Boolean(!s.initialize),loaded:!!o&&Boolean(s.loaded()),config:s.config||{}},ot({},e,r)}if(/^initialize:([^:]*)$/.test(t.type)){var a=aA(t.type,st.initialize),c=n()[a];return c&&a?(r[a]=ot({},e[a],{initialized:!0,loaded:Boolean(c.loaded())}),ot({},e,r)):e}if(/^ready:([^:]*)$/.test(t.type))return r[t.name]=ot({},e[t.name],{loaded:!0}),ot({},e,r);switch(t.type){case st.disablePlugin:return ot({},e,lA(t.plugins,!1,e));case st.enablePlugin:return ot({},e,lA(t.plugins,!0,e));default:return e}}}function aA(n,e){return n.substring(e.length+1,n.length)}function lA(n,e,t){return n.reduce(function(r,i){return r[i]=ot({},t[i],{enabled:e}),r},t)}function mA(n){try{return JSON.parse(JSON.stringify(n))}catch{}return n}var QB={last:{},history:[]};function XB(n,e){n===void 0&&(n=QB);var t=e.options,r=e.meta;if(e.type===st.track){var i=mA(ot({event:e.event,properties:e.properties},Object.keys(t).length&&{options:t},{meta:r}));return ot({},n,{last:i,history:n.history.concat(i)})}return n}var ZB={actions:[]};function JB(n,e){n===void 0&&(n=ZB);var t=e.payload;switch(e.type){case"queue":var r;return r=t&&t.type&&t.type===st.identify?[e].concat(n.actions):n.actions.concat(e),ot({},n,{actions:r});case"dequeue":return[];default:return n}}var vA=/#.*$/;function ej(n){var e=/(http[s]?:\/\/)?([^\/\s]+\/)(.*)/g.exec(n);return"/"+(e&&e[3]?e[3].split("?")[0].replace(vA,""):"")}var yA,bA,EA,_A,tj=function(n){if(n===void 0&&(n={}),!Ln)return n;var e=document,t=e.title,r=e.referrer,i=window,s=i.location,o=i.innerWidth,a=i.innerHeight,c=s.hash,u=s.search,f=function(h){var y=function(){if(Ln){for(var _,w=document.getElementsByTagName("link"),E=0;_=w[E];E++)if(_.getAttribute("rel")==="canonical")return _.getAttribute("href")}}();return y?y.match(/\?/)?y:y+h:window.location.href.replace(vA,"")}(u),p={title:t,url:f,path:ej(f),hash:c,search:u,width:o,height:a};return r&&r!==""&&(p.referrer=r),ot({},p,n)},nj={last:{},history:[]};function rj(n,e){n===void 0&&(n=nj);var t=e.options;if(e.type===st.page){var r=mA(ot({properties:e.properties,meta:e.meta},Object.keys(t).length&&{options:t}));return ot({},n,{last:r,history:n.history.concat(r)})}return n}yA=function(){if(!Ln)return!1;var n=navigator.appVersion;return~n.indexOf("Win")?"Windows":~n.indexOf("Mac")?"MacOS":~n.indexOf("X11")?"UNIX":~n.indexOf("Linux")?"Linux":"Unknown OS"}(),bA=Ln?document.referrer:null,EA=W0(),_A=U0();var cA={initialized:!1,sessionId:ec(),app:null,version:null,debug:!1,offline:!!Ln&&!navigator.onLine,os:{name:yA},userAgent:Ln?navigator.userAgent:"node",library:{name:"analytics",version:"0.11.0"},timezone:_A,locale:EA,campaign:{},referrer:bA};function ij(n,e){n===void 0&&(n=cA);var t=n.initialized,r=e.campaign;switch(e.type){case st.campaign:return ot({},n,{campaign:r});case st.offline:return ot({},n,{offline:!0});case st.online:return ot({},n,{offline:!1});default:return t?n:ot({},cA,n,{initialized:!0})}}var sj=["plugins","reducers","storage"];function oj(n,e,t){if(Ln){var r=window[(t?"add":"remove")+"EventListener"];n.split(" ").forEach(function(i){r(i,e)})}}function aj(n){var e=oj.bind(null,"online offline",function(t){return Promise.resolve(!navigator.onLine).then(n)});return e(!0),function(t){return e(!1)}}function wA(){return hr("analytics",[]),function(n){return function(e,t,r){var i=n(e,t,r),s=i.dispatch;return Object.assign(i,{dispatch:function(o){return no[to].analytics.push(o.action||o),s(o)}})}}}function uA(n){return function(){return da(da.apply(null,arguments),wA())}}function sb(n){return n?V0(n)?n:[n]:[]}function dA(n,e,t){n===void 0&&(n={});var r,i,s=ec();return e&&(nc[s]=(r=e,i=function(o){for(var a,c=o||Array.prototype.slice.call(arguments),u=0;u<c.length;u++)if(Tr(c[u])){a=c[u];break}return a}(t),function(o){i&&i(o),r(o)})),ot({},n,{rid:s,ts:new Date().getTime()},e?{hasCallback:!0}:{})}function SA(n){n===void 0&&(n={});var e=n.reducers||{},t=n.initialUser||{},r=(n.plugins||[]).reduce(function(pe,ce){if(Tr(ce))return pe.middlewares=pe.middlewares.concat(ce),pe;if(ce.NAMESPACE&&(ce.name=ce.NAMESPACE),!ce.name)throw new Error("https://lytics.dev/errors/1");var Oe=ce.EVENTS?Object.keys(ce.EVENTS).map(function(We){return ce.EVENTS[We]}):[];pe.pluginEnabled[ce.name]=!(ce.enabled===!1||ce.config&&ce.config.enabled===!1),delete ce.enabled,ce.methods&&(pe.methods[ce.name]=Object.keys(ce.methods).reduce(function(We,lt){var xe;return We[lt]=(xe=ce.methods[lt],function(){for(var b=Array.prototype.slice.call(arguments),C=new Array(xe.length),O=0;O<b.length;O++)C[O]=b[O];return C[C.length]=F,xe.apply({instance:F},C)}),We},{}),delete ce.methods);var Qe=Object.keys(ce).concat(Oe),Ge=new Set(pe.events.concat(Qe));if(pe.events=Array.from(Ge),pe.pluginsArray=pe.pluginsArray.concat(ce),pe.plugins[ce.name])throw new Error(ce.name+"AlreadyLoaded");return pe.plugins[ce.name]=ce,pe.plugins[ce.name].loaded||(pe.plugins[ce.name].loaded=function(){return!0}),pe},{plugins:{},pluginEnabled:{},methods:{},pluginsArray:[],middlewares:[],events:[]}),i=n.storage?n.storage:{getItem:fr,setItem:hr,removeItem:Cr},s=function(pe){return function(ce,Oe,Qe){return Oe.getState("user")[ce]||(Qe&&An(Qe)&&Qe[ce]?Qe[ce]:Z0(pe)[ce]||fr(ab(ce))||null)}}(i),o=r.plugins,a=r.events.filter(function(pe){return!ob.includes(pe)}).sort(),c=new Set(a.concat(eh).filter(function(pe){return!ob.includes(pe)})),u=Array.from(c).sort(),f=function(){return o},p=new GB,h=p.addMiddleware,y=p.removeMiddleware,_=p.dynamicMiddlewares,w=function(){throw new Error("Abort disabled inListener")},E=Y0(),D=Z0(i),R=ot({},D,t,E.an_uid?{userId:E.an_uid}:{},E.an_aid?{anonymousId:E.an_aid}:{});R.anonymousId||(R.anonymousId=ec());var H=ot({enable:function(pe,ce){return new Promise(function(Oe){_e.dispatch({type:st.enablePlugin,plugins:sb(pe),_:{originalAction:st.enablePlugin}},Oe,[ce])})},disable:function(pe,ce){return new Promise(function(Oe){_e.dispatch({type:st.disablePlugin,plugins:sb(pe),_:{originalAction:st.disablePlugin}},Oe,[ce])})}},r.methods),F={identify:function(pe,ce,Oe,Qe){try{var Ge=pi(pe)?pe:null,We=An(pe)?pe:ce,lt=Oe||{},xe=F.user();hr(ab(Xi),Ge);var b=Ge||We.userId||s(Xi,F,We);return Promise.resolve(new Promise(function(C){_e.dispatch(ot({type:st.identifyStart,userId:b,traits:We||{},options:lt,anonymousId:xe.anonymousId},xe.id&&xe.id!==Ge&&{previousId:xe.id}),C,[ce,Oe,Qe])}))}catch(C){return Promise.reject(C)}},track:function(pe,ce,Oe,Qe){try{var Ge=An(pe)?pe.event:pe;if(!Ge||!pi(Ge))throw new Error("EventMissing");var We=An(pe)?pe:ce||{},lt=An(Oe)?Oe:{};return Promise.resolve(new Promise(function(xe){_e.dispatch({type:st.trackStart,event:Ge,properties:We,options:lt,userId:s(Xi,F,ce),anonymousId:s(la,F,ce)},xe,[ce,Oe,Qe])}))}catch(xe){return Promise.reject(xe)}},page:function(pe,ce,Oe){try{var Qe=An(pe)?pe:{},Ge=An(ce)?ce:{};return Promise.resolve(new Promise(function(We){_e.dispatch({type:st.pageStart,properties:tj(Qe),options:Ge,userId:s(Xi,F,Qe),anonymousId:s(la,F,Qe)},We,[pe,ce,Oe])}))}catch(We){return Promise.reject(We)}},user:function(pe){if(pe===Xi||pe==="id")return s(Xi,F);if(pe===la||pe==="anonId")return s(la,F);var ce=F.getState("user");return pe?(0,Kf.default)(ce,pe):ce},reset:function(pe){return new Promise(function(ce){_e.dispatch({type:st.resetStart},ce,pe)})},ready:function(pe){return F.on(st.ready,pe)},on:function(pe,ce){if(!pe||!Tr(ce))return!1;if(pe===st.bootstrap)throw new Error(".on disabled for "+pe);var Oe=/Start$|Start:/;if(pe==="*"){var Qe=function(xe){return function(b){return function(C){return C.type.match(Oe)&&ce({payload:C,instance:F,plugins:o}),b(C)}}},Ge=function(xe){return function(b){return function(C){return C.type.match(Oe)||ce({payload:C,instance:F,plugins:o}),b(C)}}};return h(Qe,Zf),h(Ge,Jf),function(){y(Qe,Zf),y(Ge,Jf)}}var We=pe.match(Oe)?Zf:Jf,lt=function(xe){return function(b){return function(C){return C.type===pe&&ce({payload:C,instance:F,plugins:o,abort:w}),b(C)}}};return h(lt,We),function(){return y(lt,We)}},once:function(pe,ce){if(!pe||!Tr(ce))return!1;if(pe===st.bootstrap)throw new Error(".once disabled for "+pe);var Oe=F.on(pe,function(Qe){ce({payload:Qe.payload,instance:F,plugins:o,abort:w}),Oe()});return Oe},getState:function(pe){var ce=_e.getState();return pe?(0,Kf.default)(ce,pe):Object.assign({},ce)},dispatch:function(pe){var ce=pi(pe)?{type:pe}:pe;if(eh.includes(ce.type))throw new Error("reserved action "+ce.type);var Oe=ot({},ce,{_:ot({originalAction:ce.type},pe._||{})});_e.dispatch(Oe)},enablePlugin:H.enable,disablePlugin:H.disable,plugins:H,storage:{getItem:i.getItem,setItem:function(pe,ce,Oe){_e.dispatch({type:st.setItemStart,key:pe,value:ce,options:Oe})},removeItem:function(pe,ce){_e.dispatch({type:st.removeItemStart,key:pe,options:ce})}},setAnonymousId:function(pe,ce){F.storage.setItem(Ji,pe,ce)},events:{core:eh,plugins:a}},m=r.middlewares.concat([function(pe){return function(ce){return function(Oe){return Oe.meta||(Oe.meta=dA()),ce(Oe)}}},_(Zf),UB(F,f,{all:u,plugins:a}),YB(i),VB(F),zB(F),_(Jf)]),Q={context:ij,user:$B(i),page:rj,track:XB,plugins:KB(f),queue:JB},le=da,J=da;if(Ln&&n.debug){var q=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;q&&(le=q({trace:!0,traceLimit:25})),J=function(){return arguments.length===0?wA():An(typeof arguments[0])?uA():uA().apply(null,arguments)}}var Z,ae=function(pe){return Object.keys(pe).reduce(function(ce,Oe){return sj.includes(Oe)||(ce[Oe]=pe[Oe]),ce},{})}(n),Ce=r.pluginsArray.reduce(function(pe,ce){var Oe=ce.name,Qe=ce.config,Ge=ce.loaded,We=r.pluginEnabled[Oe];return pe[Oe]={enabled:We,initialized:!!We&&Boolean(!ce.initialize),loaded:Boolean(Ge()),config:Qe||{}},pe},{}),Ae={context:ae,user:R,plugins:Ce},_e=fA(function(pe){for(var ce=Object.keys(pe),Oe={},Qe=0;Qe<ce.length;Qe++){var Ge=ce[Qe];typeof pe[Ge]===Zi&&(Oe[Ge]=pe[Ge])}var We,lt=Object.keys(Oe);try{(function(xe){Object.keys(xe).forEach(function(b){var C=xe[b];if(typeof C(void 0,{type:"@@redux/INIT"})===gi||typeof C(void 0,{type:jB})===gi)throw new Error("reducer "+b+" "+gi)})})(Oe)}catch(xe){We=xe}return function(xe,b){if(xe===void 0&&(xe={}),We)throw We;for(var C=!1,O={},U=0;U<lt.length;U++){var K=lt[U],Y=xe[K],ee=(0,Oe[K])(Y,b);if(typeof ee===gi){var ge=HB(K,b);throw new Error(ge)}O[K]=ee,C=C||ee!==Y}return C?O:xe}}(ot({},Q,e)),Ae,J(le(qB.apply(void 0,m))));_e.dispatch=(Z=_e.dispatch,function(pe,ce,Oe){var Qe=ot({},pe,{meta:dA(pe.meta,ce,sb(Oe))});return Z.apply(null,[Qe])});var Le=Object.keys(o);_e.dispatch({type:st.bootstrap,plugins:Le,config:ae,params:E,user:R,initialUser:t,persistedUser:D});var Ve=Le.filter(function(pe){return r.pluginEnabled[pe]}),$e=Le.filter(function(pe){return!r.pluginEnabled[pe]});return _e.dispatch({type:st.registerPlugins,plugins:Le,enabled:r.pluginEnabled}),r.pluginsArray.map(function(pe,ce){var Oe=pe.bootstrap,Qe=pe.config,Ge=pe.name;Oe&&Tr(Oe)&&Oe({instance:F,config:Qe,payload:pe}),_e.dispatch({type:st.registerPluginType(Ge),name:Ge,enabled:r.pluginEnabled[Ge],plugin:pe}),r.pluginsArray.length===ce+1&&_e.dispatch({type:st.initializeStart,plugins:Ve,disabled:$e})}),aj(function(pe){_e.dispatch({type:pe?st.offline:st.online})}),function(pe,ce,Oe){setInterval(function(){return pA(pe,ce,Oe)},3e3)}(_e,f,F),F}var Zf="before",Jf="after";var fa="cookie",io=ub(),lb=th,TA=th;function cb(n){return io?th(n,"",-1):Cr(n)}function ub(){if(io!==void 0)return io;var n="cookiecookie";try{th(n,n),io=document.cookie.indexOf(n)!==-1,cb(n)}catch{io=!1}return io}function th(n,e,t,r,i,s){if(typeof window<"u"){var o=arguments.length>1;return io===!1&&(o?hr(n,e):fr(n)),o?document.cookie=n+"="+encodeURIComponent(e)+(t?"; expires="+new Date(+new Date+1e3*t).toUTCString()+(r?"; path="+r:"")+(i?"; domain="+i:"")+(s?"; secure":""):""):decodeURIComponent((("; "+document.cookie).split("; "+n+"=")[1]||"").split(";")[0])}}var ha="localStorage",CA=tc.bind(null,"localStorage"),F4=Qi("localStorage","getItem",fr),B4=Qi("localStorage","setItem",hr),j4=Qi("localStorage","removeItem",Cr);var pa="sessionStorage",AA=tc.bind(null,"sessionStorage"),V4=Qi("sessionStorage","getItem",fr),$4=Qi("sessionStorage","setItem",hr),z4=Qi("sessionStorage","removeItem",Cr);function ga(n){var e=n;try{if((e=JSON.parse(n))==="true")return!0;if(e==="false")return!1;if(An(e))return e;parseFloat(e)===e&&(e=parseFloat(e))}catch{}if(e!==null&&e!=="")return e}var lj=CA(),cj=AA(),uj=ub();function DA(n,e){if(n){var t=db(e),r=!gb(t),i=fb(t)?ga(localStorage.getItem(n)):void 0;if(r&&!eo(i))return i;var s=hb(t)?ga(lb(n)):void 0;if(r&&s)return s;var o=pb(t)?ga(sessionStorage.getItem(n)):void 0;if(r&&o)return o;var a=fr(n);return r?a:{localStorage:i,sessionStorage:o,cookie:s,global:a}}}function dj(n,e,t){if(n&&!eo(e)){var r={},i=db(t),s=JSON.stringify(e),o=!gb(i);return fb(i)&&(r[ha]=nh(ha,e,ga(localStorage.getItem(n))),localStorage.setItem(n,s),o)?r[ha]:hb(i)&&(r[fa]=nh(fa,e,ga(lb(n))),TA(n,s),o)?r[fa]:pb(i)&&(r[pa]=nh(pa,e,ga(sessionStorage.getItem(n))),sessionStorage.setItem(n,s),o)?r[pa]:(r[aa]=nh(aa,e,fr(n)),hr(n,e),o?r[aa]:r)}}function fj(n,e){if(n){var t=db(e),r=DA(n,tb),i={};return!eo(r.localStorage)&&fb(t)&&(localStorage.removeItem(n),i[ha]=r.localStorage),!eo(r.cookie)&&hb(t)&&(cb(n),i[fa]=r.cookie),!eo(r.sessionStorage)&&pb(t)&&(sessionStorage.removeItem(n),i[pa]=r.sessionStorage),!eo(r.global)&&rh(t,aa)&&(Cr(n),i[aa]=r.global),i}}function db(n){return n?pi(n)?n:n.storage:eb}function fb(n){return lj&&rh(n,ha)}function hb(n){return uj&&rh(n,fa)}function pb(n){return cj&&rh(n,pa)}function gb(n){return n===tb||n==="all"}function rh(n,e){return n===eb||n===e||gb(n)}function nh(n,e,t){return{location:n,current:e,previous:t}}var xA={setItem:dj,getItem:DA,removeItem:fj};function hj(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function OA(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function IA(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?OA(Object(t),!0).forEach(function(r){hj(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):OA(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function kA(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e={storage:xA};return SA(IA(IA({},e),n))}function RA(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function mi(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?RA(Object(t),!0).forEach(function(r){pj(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):RA(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function pj(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}var MA={},NA="https://www.googletagmanager.com/gtag/js",FA={debug_mode:!1,send_page_view:!1,anonymize_ip:!1,allow_google_signals:!0,allow_ad_personalization_signals:!0,cookie_flags:""},gj={gtagName:"gtag",dataLayerName:"ga4DataLayer",measurementIds:[],gtagConfig:FA};function mj(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=0,t=mb(n.measurementIds),r=mi(mi({},gj),n);return{name:"google-analytics",config:r,initialize:function(s){var o=s.config,a=s.instance,c=o.dataLayerName,u=o.customScriptSrc,f=o.gtagName,p=o.gtagConfig,h=o.debug,y=c?"&l=".concat(c):"",_=u||"".concat(NA,"?id=").concat(t[0]).concat(y);if(!LA(_)){var w=document.createElement("script");w.async=!0,w.src=_,document.body.appendChild(w)}window[c]||(window[c]=window[c]||[],window[f]=function(){window[c].push(arguments)},window[f]("js",new Date));var E=mi(mi({},FA),p||{});h===!0?E.debug_mode=!0:delete E.debug_mode;var D=a.user()||{},R=D.traits||{};Object.keys(R).length&&window[f]("set","user_properties",R);for(var H=0;H<t.length;H++)MA[t[H]]||(window[f]("config",t[H],E),MA[t[H]]=!0)},identify:function(s){var o=s.payload,a=s.config,c=a.gtagName;!window[c]||!t.length||(o.userId&&window[c]("set",{user_id:o.userId}),Object.keys(o.traits).length&&window[c]("set","user_properties",o.traits))},page:function(s){var o=s.payload,a=s.config,c=s.instance,u=a.gtagName,f=a.gtagConfig;if(!(!window[u]||!t.length)){var p=o.properties,h=p.send_to,y=c.getState("context.campaign"),_={page_title:p.title,page_location:p.url,page_path:p.path||document.location.pathname,page_hash:p.hash,page_search:p.page_search,page_referrer:p.referrer},w=PA(y),E=mi(mi(mi({},h?{send_to:h}:{}),_),w);if(f&&f.send_page_view&&e===0){e++;return}window[u]("event","page_view",E),e++}},track:function(s){var o=s.payload,a=s.config,c=s.instance,u=o.properties,f=o.event,p=c.getState("context.campaign"),h=a.gtagName;if(!(!window[h]||!t.length)){var y=PA(p),_=mi(mi({},u),y);window[h]("event",f,_)}},loaded:function(){var s=r.dataLayerName,o=r.customScriptSrc,a=s&&window[s]&&Array.prototype.push===window[s].push;return LA(o||NA)&&a},methods:{addTag:function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};window[r.gtagName]&&(window[r.gtagName]("config",s,o),t&&!t.includes(s)&&(t=t.concat(s)))},disable:function(s){for(var o=s?mb(s):t,a=0;a<t.length;a++){var c=t[a];o.includes(c)&&(window["ga-disable-".concat(c)]=!0)}},enable:function(s){for(var o=s?mb(s):t,a=0;a<t.length;a++){var c=t[a];o.includes(c)&&(window["ga-disable-".concat(c)]=!1)}}}}}function mb(n){if(!n)throw new Error("No GA Measurement ID defined");if(Array.isArray(n))return n;if(typeof n=="string")return[n];throw new Error("GA Measurement ID must be string or array of strings")}function PA(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e={},t=n.id,r=n.name,i=n.source,s=n.medium,o=n.content,a=n.keyword;return t&&(e.campaignId=t),r&&(e.campaignName=r),i&&(e.campaignSource=i),s&&(e.campaignMedium=s),o&&(e.campaignContent=o),a&&(e.campaignKeyword=a),e}function LA(n){var e=document.querySelectorAll("script[src]"),t=new RegExp("^".concat(n));return Boolean(Object.values(e).filter(function(r){return t.test(r.src)}).length)}var BA=mj;var vb=class{constructor(e){this.trackingId=e,this.initialize()}initialize(){let e=kA({app:"securepay",version:4.8,plugins:[BA({trackingId:this.trackingId})]}),t=window.location.pathname+window.location.search;e.page({url:t})}},jA=vb;window.FacebookPixel=F0||{};window.GoogleAnalytics=jA||{};HA.default.start();VA.default.start();qA.default.start();})();
/*! Bundled license information:

jquery/dist/jquery.js:
  (*!
   * jQuery JavaScript Library v3.6.3
   * https://jquery.com/
   *
   * Includes Sizzle.js
   * https://sizzlejs.com/
   *
   * Copyright OpenJS Foundation and other contributors
   * Released under the MIT license
   * https://jquery.org/license
   *
   * Date: 2022-12-20T21:28Z
   *)

nprogress/nprogress.js:
  (* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
   * @license MIT *)

flatpickr/dist/plugins/monthSelect/index.js:
  (*! *****************************************************************************
      Copyright (c) Microsoft Corporation.
  
      Permission to use, copy, modify, and/or distribute this software for any
      purpose with or without fee is hereby granted.
  
      THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
      REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
      AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
      INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
      LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
      OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
      PERFORMANCE OF THIS SOFTWARE.
      ***************************************************************************** *)

get-size/get-size.js:
  (*!
   * getSize v2.0.3
   * measure size of elements
   * MIT license
   *)

outlayer/outlayer.js:
  (*!
   * Outlayer v2.1.1
   * the brains and guts of a layout library
   * MIT license
   *)

masonry-layout/masonry.js:
  (*!
   * Masonry v4.2.2
   * Cascading grid layout library
   * https://masonry.desandro.com
   * MIT License
   * by David DeSandro
   *)

imagesloaded/imagesloaded.js:
  (*!
   * imagesLoaded v5.0.0
   * JavaScript is all like "You images are done yet or what?"
   * MIT License
   *)

bootstrap/dist/js/bootstrap.esm.js:
  (*!
    * Bootstrap v5.2.3 (https://getbootstrap.com/)
    * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
    * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
    *)

qrcode-with-logos/dist/qrcode-with-logos.es5.js:
  (*! *****************************************************************************
  Copyright (c) Microsoft Corporation.
  
  Permission to use, copy, modify, and/or distribute this software for any
  purpose with or without fee is hereby granted.
  
  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
  REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
  INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  PERFORMANCE OF THIS SOFTWARE.
  ***************************************************************************** *)
*/;
