PageSourceSearch

https://skinmc.net/build/assets/app-gr-rGbSg.js

js skinmc.net collected 2026-09-26 04:28:34 UTC 638,368 bytes, 113 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/avatar-viewer-BMgHNA2R.js","assets/vendor-three-D0asLrkT.js","assets/preload-helper-I4rgV-VL.js","assets/jquery-BI420F6r.js","assets/_commonjsHelpers-CqkleIqs.js","assets/index.esm-ih9yOVMm.js","assets/croppr-42Smh5Fn.js","assets/bind-once-fmSa6x3D.js","assets/compose-CcRPncMc.js","assets/lazy-picker-l7PCf9Y7.js","assets/chat-sync-data-qK4-msWV.js","assets/comments-DL4W2DUJ.js","assets/app-I4u8aZjr.css","assets/album-editor-Cw0M9CXW.js","assets/sortable.esm-C60Rgby5.js","assets/conversation-DTj9Uotf.js","assets/video-autoplay-Boqo60IF.js"])))=>i.map(i=>d[i]);
2import{_ as Ht}from"./preload-helper-I4rgV-VL.js";/* empty css            */import{r as fh,$ as Ag}from"./jquery-BI420F6r.js";import{g as xg}from"./_commonjsHelpers-CqkleIqs.js";import{F as Og}from"./index.esm-ih9yOVMm.js";import{C as kg}from"./croppr-42Smh5Fn.js";import{b as Ig}from"./bind-once-fmSa6x3D.js";import{c as Pg}from"./compose-CcRPncMc.js";import{c as io,s as Lg,a as ac,m as Mg,b as Rg,i as Dg}from"./chat-sync-data-qK4-msWV.js";import{c as Ng}from"./lazy-picker-l7PCf9Y7.js";import"./comments-DL4W2DUJ.js";var $g=Object.create,hh=Object.defineProperty,Fg=Object.getOwnPropertyDescriptor,ph=Object.getOwnPropertyNames,jg=Object.getPrototypeOf,Ug=Object.prototype.hasOwnProperty,Qr=(t,e)=>function(){return e||(0,t[ph(t)[0]])((e={exports:{}}).exports,e),e.exports},Bg=(t,e,i,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of ph(e))!Ug.call(t,n)&&n!==i&&hh(t,n,{get:()=>e[n],enumerable:!(r=Fg(e,n))||r.enumerable});return t},Bt=(t,e,i)=>(i=t!=null?$g(jg(t)):{},Bg(!t||!t.__esModule?hh(i,"default",{value:t,enumerable:!0}):i,t)),hi=Qr({"node_modules/alpinejs/dist/module.cjs.js"(t,e){var i=Object.create,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,o=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,_=(a,S)=>function(){return S||(0,a[s(a)[0]])((S={exports:{}}).exports,S),S.exports},b=(a,S)=>{for(var k in S)r(a,k,{get:S[k],enumerable:!0})},m=(a,S,k,R)=>{if(S&&typeof S=="object"||typeof S=="function")for(let j of s(S))!l.call(a,j)&&j!==k&&r(a,j,{get:()=>S[j],enumerable:!(R=n(S,j))||R.enumerable});return a},y=(a,S,k)=>(k=a!=null?i(o(a)):{},m(!a||!a.__esModule?r(k,"default",{value:a,enumerable:!0}):k,a)),T=a=>m(r({},"__esModule",{value:!0}),a),g=_({"node_modules/@vue/shared/dist/shared.cjs.js"(a){Object.defineProperty(a,"__esModule",{value:!0});function S(J,Me){const Ke=Object.create(null),et=J.split(",");for(let Rt=0;Rt<et.length;Rt++)Ke[et[Rt]]=!0;return Me?Rt=>!!Ke[Rt.toLowerCase()]:Rt=>!!Ke[Rt]}var k={1:"TEXT",2:"CLASS",4:"STYLE",8:"PROPS",16:"FULL_PROPS",32:"HYDRATE_EVENTS",64:"STABLE_FRAGMENT",128:"KEYED_FRAGMENT",256:"UNKEYED_FRAGMENT",512:"NEED_PATCH",1024:"DYNAMIC_SLOTS",2048:"DEV_ROOT_FRAGMENT",[-1]:"HOISTED",[-2]:"BAIL"},R={1:"STABLE",2:"DYNAMIC",3:"FORWARDED"},j="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt",q=S(j),W=2;function te(J,Me=0,Ke=J.length){let et=J.split(/(\r?\n)/);const Rt=et.filter((Ai,yi)=>yi%2===1);et=et.filter((Ai,yi)=>yi%2===0);let ei=0;const Ci=[];for(let Ai=0;Ai<et.length;Ai++)if(ei+=et[Ai].length+(Rt[Ai]&&Rt[Ai].length||0),ei>=Me){for(let yi=Ai-W;yi<=Ai+W||Ke>ei;yi++){if(yi<0||yi>=et.length)continue;const Us=yi+1;Ci.push(`${Us}${" ".repeat(Math.max(3-String(Us).length,0))}|  ${et[yi]}`);const Qn=et[yi].length,jo=Rt[yi]&&Rt[yi].length||0;if(yi===Ai){const Zn=Me-(ei-(Qn+jo)),fl=Math.max(1,Ke>ei?Qn-Zn:Ke-Me);Ci.push("   |  "+" ".repeat(Zn)+"^".repeat(fl))}else if(yi>Ai){if(Ke>ei){const Zn=Math.max(Math.min(Ke-ei,Qn),1);Ci.push("   |  "+"^".repeat(Zn))}ei+=Qn+jo}}break}return Ci.join(`
3`)}var ge="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",We=S(ge),ct=S(ge+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected"),$t=/[>/="'\u0009\u000a\u000c\u0020]/,Ct={};function Xt(J){if(Ct.hasOwnProperty(J))return Ct[J];const Me=$t.test(J);return Me&&console.error(`unsafe attribute name: ${J}`),Ct[J]=!Me}var Di={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},Or=S("animation-iteration-count,border-image-outset,border-image-slice,border-image-width,box-flex,box-flex-group,box-ordinal-group,column-count,columns,flex,flex-grow,flex-positive,flex-shrink,flex-negative,flex-order,grid-row,grid-row-end,grid-row-span,grid-row-start,grid-column,grid-column-end,grid-column-span,grid-column-start,font-weight,line-clamp,line-height,opacity,order,orphans,tab-size,widows,z-index,zoom,fill-opacity,flood-opacity,stop-opacity,stroke-dasharray,stroke-dashoffset,stroke-miterlimit,stroke-opacity,stroke-width"),ft=S("accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,c
3olspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap");function Ft(J){if(gr(J)){const Me={};for(let Ke=0;Ke<J.length;Ke++){const et=J[Ke],Rt=Ft(mn(et)?Ti(et):et);if(Rt)for(const ei in Rt)Me[ei]=Rt[ei]}return Me}else if(Ir(J))return J}var Et=/;(?![^(]*\))/g,Mt=/:(.+)/;function Ti(J){const Me={};return J.split(Et).forEach(Ke=>{if(Ke){const et=Ke.split(Mt);et.length>1&&(Me[et[0].trim()]=et[1].trim())}}),Me}function mr(J){let Me="";if(!J)return Me;for(const Ke in J){const et=J[Ke],Rt=Ke.startsWith("--")?Ke:$o(Ke);(mn(et)||typeof et=="number"&&Or(Rt))&&(Me+=`${Rt}:${et};`)}return Me}function kr(J){let Me="";if(mn(J))Me=J;else if(gr(J))for(let Ke=0;Ke<J.length;Ke++){const et=kr(J[Ke]);et&&(Me+=et+" ")}else if(Ir(J))for(const Ke in J)J[Ke]&&(Me+=Ke+" ");return Me.trim()}var Un="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",Ls="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistanceLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",Ms="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",Bn=S(Un),el=S(Ls),qn=S(Ms),tl=/["'&<>]/;function il(J){const Me=""+J,Ke=tl.exec(Me);if(!Ke)return Me;let et="",Rt,ei,Ci=0;for(ei=Ke.index;ei<Me.length;ei++){switch(Me.charCodeAt(ei)){case 34:Rt="&quot;";break;case 38:Rt="&amp;";break;case 39:Rt="&#39;";break;case 60:Rt="&lt;";break;case 62:Rt="&gt;";break;default:continue}Ci!==ei&&(et+=Me.substring(Ci,ei)),Ci=ei+1,et+=Rt}return Ci!==ei?et+Me.substring(Ci,ei):et}var To=/^-?>|<!--|-->|--!>|<!-$/g;function rl(J){return J.replace(To,"")}function nl(J,Me){if(J.length!==Me.length)return!1;let Ke=!0;for(let et=0;Ke&&et<J.length;et++)Ke=Vn(J[et],Me[et]);return Ke}function Vn(J,Me){if(J===Me)return!0;let Ke=$s(J),et=$s(Me);if(Ke||et)return Ke&&et?J.getTime()===Me.getTime():!1;if(Ke=gr(J),et=gr(Me),Ke||et)return Ke&&et?nl(J,Me):!1;if(Ke=Ir(J),et=Ir(Me),Ke||et){if(!Ke||!et)return!1;const Rt=Object.keys(J).length,ei=Object.keys(Me).length;if(Rt!==ei)return!1;for(const Ci in J){const Ai=J.hasOwnProperty(Ci),yi=Me.hasOwnProperty(Ci);if(Ai&&!yi||!Ai&&yi||!Vn(J[Ci],Me[Ci]))return!1}}return String(J)===String(Me)}function Co(J,Me){return J.findIndex(Ke=>Vn(Ke,Me))}var Ao=J=>J==null?"":Ir(J)?JSON.stringify(J,sl,2):String(J),sl=(J,Me)=>pn(Me)?{[`Map(${Me.size})`]:[...Me.entries()].reduce((Ke,[et,Rt])=>(Ke[`${et} =>`]=Rt,Ke),{})}:vr(Me)?{[`Set(${Me.size})`]:[...Me.values()]}
3:Ir(Me)&&!gr(Me)&&!Lo(Me)?String(Me):Me,ol=["bigInt","optionalChaining","nullishCoalescingOperator"],Rs=Object.freeze({}),Ds=Object.freeze([]),Ns=()=>{},Hn=()=>!1,zn=/^on[^a-z]/,Wn=J=>zn.test(J),Kn=J=>J.startsWith("onUpdate:"),xo=Object.assign,Oo=(J,Me)=>{const Ke=J.indexOf(Me);Ke>-1&&J.splice(Ke,1)},ko=Object.prototype.hasOwnProperty,Io=(J,Me)=>ko.call(J,Me),gr=Array.isArray,pn=J=>gn(J)==="[object Map]",vr=J=>gn(J)==="[object Set]",$s=J=>J instanceof Date,Fs=J=>typeof J=="function",mn=J=>typeof J=="string",al=J=>typeof J=="symbol",Ir=J=>J!==null&&typeof J=="object",Gn=J=>Ir(J)&&Fs(J.then)&&Fs(J.catch),Po=Object.prototype.toString,gn=J=>Po.call(J),ll=J=>gn(J).slice(8,-1),Lo=J=>gn(J)==="[object Object]",Mo=J=>mn(J)&&J!=="NaN"&&J[0]!=="-"&&""+parseInt(J,10)===J,Ro=S(",key,ref,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),vn=J=>{const Me=Object.create(null);return Ke=>Me[Ke]||(Me[Ke]=J(Ke))},Do=/-(\w)/g,No=vn(J=>J.replace(Do,(Me,Ke)=>Ke?Ke.toUpperCase():"")),cl=/\B([A-Z])/g,$o=vn(J=>J.replace(cl,"-$1").toLowerCase()),yn=vn(J=>J.charAt(0).toUpperCase()+J.slice(1)),ul=vn(J=>J?`on${yn(J)}`:""),js=(J,Me)=>J!==Me&&(J===J||Me===Me),dl=(J,Me)=>{for(let Ke=0;Ke<J.length;Ke++)J[Ke](Me)},Yn=(J,Me,Ke)=>{Object.defineProperty(J,Me,{configurable:!0,enumerable:!1,value:Ke})},Xn=J=>{const Me=parseFloat(J);return isNaN(Me)?J:Me},Jn,Fo=()=>Jn||(Jn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});a.EMPTY_ARR=Ds,a.EMPTY_OBJ=Rs,a.NO=Hn,a.NOOP=Ns,a.PatchFlagNames=k,a.babelParserDefaultPlugins=ol,a.camelize=No,a.capitalize=yn,a.def=Yn,a.escapeHtml=il,a.escapeHtmlComment=rl,a.extend=xo,a.generateCodeFrame=te,a.getGlobalThis=Fo,a.hasChanged=js,a.hasOwn=Io,a.hyphenate=$o,a.invokeArrayFns=dl,a.isArray=gr,a.isBooleanAttr=ct,a.isDate=$s,a.isFunction=Fs,a.isGloballyWhitelisted=q,a.isHTMLTag=Bn,a.isIntegerKey=Mo,a.isKnownAttr=ft,a.isMap=pn,a.isModelListener=Kn,a.isNoUnitNumericStyleProp=Or,a.isObject=Ir,a.isOn=Wn,a.isPlainObject=Lo,a.isPromise=Gn,a.isReservedProp=Ro,a.isSSRSafeAttrName=Xt,a.isSVGTag=el,a.isSet=vr,a.isSpecialBooleanAttr=We,a.isString=mn,a.isSymbol=al,a.isVoidTag=qn,a.looseEqual=Vn,a.looseIndexOf=Co,a.makeMap=S,a.normalizeClass=kr,a.normalizeStyle=Ft,a.objectToString=Po,a.parseStringStyle=Ti,a.propsToAttrMap=Di,a.remove=Oo,a.slotFlagsText=R,a.stringifyStyle=mr,a.toDisplayString=Ao,a.toHandlerKey=ul,a.toNumber=Xn,a.toRawType=ll,a.toTypeString=gn}}),d=_({"node_modules/@vue/shared/index.js"(a,S){S.exports=g()}}),u=_({"node_modules/@vue/reactivity/dist/reactivity.cjs.js"(a){Object.defineProperty(a,"__esModule",{value:!0});var S=d(),k=new WeakMap,R=[],j,q=Symbol("iterate"),W=Symbol("Map key iterate");function te(M){return M&&M._isEffect===!0}function ge(M,de=S.EMPTY_OBJ){te(M)&&(M=M.raw);const ye=$t(M,de);return de.lazy||ye(),ye}function We(M){M.active&&(Ct(M),M.options.onStop&&M.options.onStop(),M.active=!1)}var ct=0;function $t(M,de){const ye=function(){if(!ye.active)return M();if(!R.includes(ye)){Ct(ye);try{return ft(),R.push(ye),j=ye,M()}finally{R.pop(),Ft(),j=R[R.length-1]}}};return ye.id=ct++,ye.allowRecurse=!!de.allowRecurse,ye._isEffect=!0,ye.active=!0,ye.raw=M,ye.deps=[],ye.options=de,ye}function Ct(M){const{deps:de}=M;if(de.length){for(let ye=0;ye<de.length;ye++)de[ye].delete(M);de.length=0}}var Xt=!0,Di=[];function Or(){Di.push(Xt),Xt=!1}function ft(){Di.push(Xt),Xt=!0}function Ft(){const M=Di.pop();Xt=M===void 0?!0:M}function Et(M,de,ye){if(!Xt||j===void 0)return;let Qe=k.get(M);Qe||k.set(M,Qe=new Map);let Fe=Qe.get(ye);Fe||Qe.set(ye,Fe=new Set),Fe.has(j)||(Fe.add(j),j.deps.push(Fe),j.options.onTrack&&j.options.onTrack({effect:j,target:M,type:de,key:ye}))}function Mt(M,de,ye,Qe,Fe,ot){const St=k.get(M);if(!St)return;const si=new Set,xi=Si=>{Si&&Si.forEach(yr=>{(yr!==j||yr.allowRecurse)&&si.add(yr)})};if(de==="clear")St.forEach(xi);else if(ye==="length"&&S.isArray(M))St.forEach((Si,yr)=>{(yr==="length"||yr>=Qe)&&xi(Si)});else switch(ye!==void 0&&xi(St.get(ye)),de){case"add":S.isArray(M)?S.isIntegerKey(ye)&&xi(St.get("length")):(xi(St.get(q)),S.isMap(M)&&xi(St.get(W)));break;case"delete":S.isArray(M)||(xi(St.get(q)),S.isMap(M)&&xi(St.get(W)));break;case"set":S.isMap(M)&&xi(St.get(q));break}const Bs=Si=>{Si.options.onTrigger&&Si.options.onTrigger({effect:Si,target:M,key:ye,type:de,newValue:Qe,oldValue:Fe,oldTarget:ot}),Si.options.scheduler?Si.options.scheduler(Si):Si()};si.forEach(Bs)}var Ti=S.makeMap("__proto__,__v_isRef,__isVue"),mr=new Set(Object.getOwnPropertyNames(Symbol).map(M=>Symbol[M]).filter(S.isSymbol)),kr=qn(),Un=qn(!1,!0),Ls=qn(!0),Ms=qn(!0,!0),Bn=el();function el(){const M={};return["includes","indexOf","lastIndexOf"].forEach(de=>{M[de]=function(...ye){const Qe=J(this);for(let ot=0,St=this.length;ot<St;ot++)Et(Qe,"get",ot+"");const Fe=Qe[de](...ye);return Fe===-1||Fe===!1?Qe[de](...ye.map(J)):Fe}}),["push","pop","shift","unshift","splice"].forEach(de=>{M[de]=function(...ye){Or();const Qe=J(this)[de].apply(this,ye);return Ft(),Qe}}),M}function qn(M=!1,de=!1){return function(Qe,Fe,ot){if(Fe==="__v_isReactive")return!M;if(Fe==="__v_isReadonly")return M;if(Fe==="__v_raw"&&ot===(M?de?No:Do:de?vn:Ro).get(Qe))return Qe;const St=S.isArray(Qe);
3if(!M&&St&&S.hasOwn(Bn,Fe))return Reflect.get(Bn,Fe,ot);const si=Reflect.get(Qe,Fe,ot);return(S.isSymbol(Fe)?mr.has(Fe):Ti(Fe))||(M||Et(Qe,"get",Fe),de)?si:et(si)?!St||!S.isIntegerKey(Fe)?si.value:si:S.isObject(si)?M?js(si):yn(si):si}}var tl=To(),il=To(!0);function To(M=!1){return function(ye,Qe,Fe,ot){let St=ye[Qe];if(!M&&(Fe=J(Fe),St=J(St),!S.isArray(ye)&&et(St)&&!et(Fe)))return St.value=Fe,!0;const si=S.isArray(ye)&&S.isIntegerKey(Qe)?Number(Qe)<ye.length:S.hasOwn(ye,Qe),xi=Reflect.set(ye,Qe,Fe,ot);return ye===J(ot)&&(si?S.hasChanged(Fe,St)&&Mt(ye,"set",Qe,Fe,St):Mt(ye,"add",Qe,Fe)),xi}}function rl(M,de){const ye=S.hasOwn(M,de),Qe=M[de],Fe=Reflect.deleteProperty(M,de);return Fe&&ye&&Mt(M,"delete",de,void 0,Qe),Fe}function nl(M,de){const ye=Reflect.has(M,de);return(!S.isSymbol(de)||!mr.has(de))&&Et(M,"has",de),ye}function Vn(M){return Et(M,"iterate",S.isArray(M)?"length":q),Reflect.ownKeys(M)}var Co={get:kr,set:tl,deleteProperty:rl,has:nl,ownKeys:Vn},Ao={get:Ls,set(M,de){return console.warn(`Set operation on key "${String(de)}" failed: target is readonly.`,M),!0},deleteProperty(M,de){return console.warn(`Delete operation on key "${String(de)}" failed: target is readonly.`,M),!0}},sl=S.extend({},Co,{get:Un,set:il}),ol=S.extend({},Ao,{get:Ms}),Rs=M=>S.isObject(M)?yn(M):M,Ds=M=>S.isObject(M)?js(M):M,Ns=M=>M,Hn=M=>Reflect.getPrototypeOf(M);function zn(M,de,ye=!1,Qe=!1){M=M.__v_raw;const Fe=J(M),ot=J(de);de!==ot&&!ye&&Et(Fe,"get",de),!ye&&Et(Fe,"get",ot);const{has:St}=Hn(Fe),si=Qe?Ns:ye?Ds:Rs;if(St.call(Fe,de))return si(M.get(de));if(St.call(Fe,ot))return si(M.get(ot));M!==Fe&&M.get(de)}function Wn(M,de=!1){const ye=this.__v_raw,Qe=J(ye),Fe=J(M);return M!==Fe&&!de&&Et(Qe,"has",M),!de&&Et(Qe,"has",Fe),M===Fe?ye.has(M):ye.has(M)||ye.has(Fe)}function Kn(M,de=!1){return M=M.__v_raw,!de&&Et(J(M),"iterate",q),Reflect.get(M,"size",M)}function xo(M){M=J(M);const de=J(this);
3return Hn(de).has.call(de,M)||(de.add(M),Mt(de,"add",M,M)),this}function Oo(M,de){de=J(de);const ye=J(this),{has:Qe,get:Fe}=Hn(ye);let ot=Qe.call(ye,M);ot?Mo(ye,Qe,M):(M=J(M),ot=Qe.call(ye,M));const St=Fe.call(ye,M);return ye.set(M,de),ot?S.hasChanged(de,St)&&Mt(ye,"set",M,de,St):Mt(ye,"add",M,de),this}function ko(M){const de=J(this),{has:ye,get:Qe}=Hn(de);let Fe=ye.call(de,M);Fe?Mo(de,ye,M):(M=J(M),Fe=ye.call(de,M));const ot=Qe?Qe.call(de,M):void 0,St=de.delete(M);return Fe&&Mt(de,"delete",M,void 0,ot),St}function Io(){const M=J(this),de=M.size!==0,ye=S.isMap(M)?new Map(M):new Set(M),Qe=M.clear();return de&&Mt(M,"clear",void 0,void 0,ye),Qe}function gr(M,de){return function(Qe,Fe){const ot=this,St=ot.__v_raw,si=J(St),xi=de?Ns:M?Ds:Rs;return!M&&Et(si,"iterate",q),St.forEach((Bs,Si)=>Qe.call(Fe,xi(Bs),xi(Si),ot))}}function pn(M,de,ye){return function(...Qe){const Fe=this.__v_raw,ot=J(Fe),St=S.isMap(ot),si=M==="entries"||M===Symbol.iterator&&St,xi=M==="keys"&&St,Bs=Fe[M](...Qe),Si=ye?Ns:de?Ds:Rs;return!de&&Et(ot,"iterate",xi?W:q),{next(){const{value:yr,done:hl}=Bs.next();return hl?{value:yr,done:hl}:{value:si?[Si(yr[0]),Si(yr[1])]:Si(yr),done:hl}},[Symbol.iterator](){return this}}}}function vr(M){return function(...de){{const ye=de[0]?`on key "${de[0]}" `:"";console.warn(`${S.capitalize(M)} operation ${ye}failed: target is readonly.`,J(this))}return M==="delete"?!1:this}}function $s(){const M={get(ot){return zn(this,ot)},get size(){return Kn(this)}
3,has:Wn,add:xo,set:Oo,delete:ko,clear:Io,forEach:gr(!1,!1)},de={get(ot){return zn(this,ot,!1,!0)},get size(){return Kn(this)},has:Wn,add:xo,set:Oo,delete:ko,clear:Io,forEach:gr(!1,!0)},ye={get(ot){return zn(this,ot,!0)},get size(){return Kn(this,!0)},has(ot){return Wn.call(this,ot,!0)},add:vr("add"),set:vr("set"),delete:vr("delete"),clear:vr("clear"),forEach:gr(!0,!1)},Qe={get(ot){return zn(this,ot,!0,!0)},get size(){return Kn(this,!0)},has(ot){return Wn.call(this,ot,!0)},add:vr("add"),set:vr("set"),delete:vr("delete"),clear:vr("clear"),forEach:gr(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(ot=>{M[ot]=pn(ot,!1,!1),ye[ot]=pn(ot,!0,!1),de[ot]=pn(ot,!1,!0),Qe[ot]=pn(ot,!0,!0)}),[M,ye,de,Qe]}var[Fs,mn,al,Ir]=$s();function Gn(M,de){const ye=de?M?Ir:al:M?mn:Fs;return(Qe,Fe,ot)=>Fe==="__v_isReactive"?!M:Fe==="__v_isReadonly"?M:Fe==="__v_raw"?Qe:Reflect.get(S.hasOwn(ye,Fe)&&Fe in Qe?ye:Qe,Fe,ot)}var Po={get:Gn(!1,!1)},gn={get:Gn(!1,!0)},ll={get:Gn(!0,!1)},Lo={get:Gn(!0,!0)};function Mo(M,de,ye){const Qe=J(ye);if(Qe!==ye&&de.call(M,Qe)){const Fe=S.toRawType(M);console.warn(`Reactive ${Fe} contains both the raw and reactive versions of the same object${Fe==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}var Ro=new WeakMap,vn=new WeakMap,Do=new WeakMap,No=new WeakMap;function cl(M){switch(M){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function $o(M){return M.__v_skip||!Object.isExtensible(M)?0:cl(S.toRawType(M))}function yn(M){return M&&M.__v_isReadonly?M:Yn(M,!1,Co,Po,Ro)}function ul(M){return Yn(M,!1,sl,gn,vn)}function js(M){return Yn(M,!0,Ao,ll,Do)}function dl(M){return Yn(M,!0,ol,Lo,No)}function Yn(M,de,ye,Qe,Fe){if(!S.isObject(M))return console.warn(`value cannot be made reactive: ${String(M)}`),M;if(M.__v_raw&&!(de&&M.__v_isReactive))return M;const ot=Fe.get(M);if(ot)return ot;const St=$o(M);if(St===0)return M;const si=new Proxy(M,St===2?Qe:ye);return Fe.set(M,si),si}function Xn(M){return Jn(M)?Xn(M.__v_raw):!!(M&&M.__v_isReactive)}function Jn(M){return!!(M&&M.__v_isReadonly)}function Fo(M){return Xn(M)||Jn(M)}function J(M){return M&&J(M.__v_raw)||M}function Me(M){return S.def(M,"__v_skip",!0),M}var Ke=M=>S.isObject(M)?yn(M):M;function et(M){return!!(M&&M.__v_isRef===!0)}function Rt(M){return Ai(M)}function ei(M){return Ai(M,!0)}var Ci=class{constructor(M,de=!1){this._shallow=de,this.__v_isRef=!0,this._rawValue=de?M:J(M),this._value=de?M:Ke(M)}get value(){return Et(J(this),"get","value"),this._value}set value(M){M=this._shallow?M:J(M),S.hasChanged(M,this._rawValue)&&(this._rawValue=M,this._value=this._shallow?M:Ke(M),Mt(J(this),"set","value",M))}};function Ai(M,de=!1){return et(M)?M:new Ci(M,de)}function yi(M){Mt(J(M),"set","value",M.value)}function Us(M){return et(M)?M.value:M}var Qn={get:(M,de,ye)=>Us(Reflect.get(M,de,ye)),set:(M,de,ye,Qe)=>{const Fe=M[de];return et(Fe)&&!et(ye)?(Fe.value=ye,!0):Reflect.set(M,de,ye,Qe)}};function jo(M){return Xn(M)?M:new Proxy(M,Qn)}var Zn=class{constructor(M){this.__v_isRef=!0;const{get:de,set:ye}=M(()=>Et(this,"get","value"),()=>Mt(this,"set","value"));this._get=de,this._set=ye}get value(){return this._get()}set value(M){this._set(M)}};function fl(M){return new Zn(M)}function Eg(M){Fo(M)||console.warn("toRefs() expects a reactive object but received a plain one.");const de=S.isArray(M)?new Array(M.length):{};for(const ye in M)de[ye]=ed(M,ye);return de}var Sg=class{constructor(M,de){this._object=M,this._key=de,this.__v_isRef=!0}get value(){return this._object[this._key]}set value(M){this._object[this._key]=M}};function ed(M,de){return et(M[de])?M[de]:new Sg(M,de)}var Tg=class{constructor(M,de,ye){this._setter=de,this._dirty=!0,this.__v_isRef=!0,this.effect=ge(M,{lazy:!0,scheduler:()=>{this._dirty||(this._dirty=!0,Mt(J(this),"set","value"))}}),this.__v_isReadonly=ye}get value(){const M=J(this);return M._dirty&&(M._value=this.effect(),M._dirty=!1),Et(M,"get","value"),M._value}set value(M){this._setter(M)}};function Cg(M){let de,ye;return S.isFunction(M)?(de=M,ye=()=>{console.warn("Write operation failed: computed value is readonly")}):(de=M.get,ye=M.set),new Tg(de,ye,S.isFunction(M)||!M.set)}a.ITERATE_KEY=q,a.computed=Cg,a.customRef=fl,a.effect=ge,a.enableTracking=ft,a.isProxy=Fo,a.isReactive=Xn,a.isReadonly=Jn,a.isRef=et,a.markRaw=Me,a.pauseTracking=Or,a.proxyRefs=jo,a.reactive=yn,a.readonly=js,a.ref=Rt,a.resetTracking=Ft,a.shallowReactive=ul,a.shallowReadonly=dl,a.shallowRef=ei,a.stop=We,a.toRaw=J,a.toRef=ed,a.toRefs=Eg,a.track=Et,a.trigger=Mt,a.triggerRef=yi,a.unref=Us}}),w=_({"node_modules/@vue/reactivity/index.js"(a,S){S.exports=u()}}),h={};b(h,{Alpine:()=>Zu,default:()=>_g}),e.exports=T(h);var p=!1,c=!1,f=[],v=-1;function E(a){C(a)}
3function C(a){f.includes(a)||f.push(a),A()}function O(a){let S=f.indexOf(a);S!==-1&&S>v&&f.splice(S,1)}function A(){!c&&!p&&(p=!0,queueMicrotask(I))}function I(){p=!1,c=!0;for(let a=0;a<f.length;a++)f[a](),v=a;f.length=0,v=-1,c=!1}var N,D,U,Q,he=!0;function se(a){he=!1,a(),he=!0}function fe(a){N=a.reactive,U=a.release,D=S=>a.effect(S,{scheduler:k=>{he?E(k):k()}}),Q=a.raw}function pe(a){D=a}function st(a){let S=()=>{};return[R=>{let j=D(R);return a._x_effects||(a._x_effects=new Set,a._x_runEffects=()=>{a._x_effects.forEach(q=>q())}),a._x_effects.add(j),S=()=>{j!==void 0&&(a._x_effects.delete(j),U(j))},j},()=>{S()}]}function Ee(a,S){let k=!0,R,j=D(()=>{let q=a();JSON.stringify(q),k?R=q:queueMicrotask(()=>{S(q,R),R=q}),k=!1});return()=>U(j)}var oe=[],_e=[],Ce=[];function ke(a){Ce.push(a)}function ae(a,S){typeof S=="function"?(a._x_cleanups||(a._x_cleanups=[]),a._x_cleanups.push(S)):(S=a,_e.push(S))}function K(a){oe.push(a)}function ve(a,S,k){a._x_attributeCleanups||(a._x_attributeCleanups={}),a._x_attributeCleanups[S]||(a._x_attributeCleanups[S]=[]),a._x_attributeCleanups[S].push(k)}function Le(a,S){a._x_attributeCleanups&&Object.entries(a._x_attributeCleanups).forEach(([k,R])=>{(S===void 0||S.includes(k))&&(R.forEach(j=>j()),delete a._x_attributeCleanups[k])})}function tt(a){var S,k;for((S=a._x_effects)==null||S.forEach(O);(k=a._x_cleanups)!=null&&k.length;)a._x_cleanups.pop()()}var at=new MutationObserver(Tt),ut=!1;function ht(){at.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),ut=!0}function bt(){zt(),at.disconnect(),ut=!1}var wt=[];function zt(){let a=at.takeRecords();wt.push(()=>a.length>0&&Tt(a));let S=wt.length;queueMicrotask(()=>{if(wt.length===S)for(;wt.length>0;)wt.shift()()})}function Re(a){if(!ut)return a();bt();let S=a();return ht(),S}var le=!1,we=[];function Ze(){le=!0}function je(){le=!1,Tt(we),we=[]}function Tt(a){if(le){we=we.concat(a);return}let S=[],k=new Set,R=new Map,j=new Map;for(let q=0;q<a.length;q++)if(!a[q].target._x_ignoreMutationObserver&&(a[q].type==="childList"&&(a[q].removedNodes.forEach(W=>{W.nodeType===1&&W._x_marker&&k.add(W)}),a[q].addedNodes.forEach(W=>{if(W.nodeType===1){if(k.has(W)){k.delete(W);return}W._x_marker||S.push(W)}})),a[q].type==="attributes")){let W=a[q].target,te=a[q].attributeName,ge=a[q].oldValue,We=()=>{R.has(W)||R.set(W,[]),R.get(W).push({name:te,value:W.getAttribute(te)})},ct=()=>{j.has(W)||j.set(W,[]),j.get(W).push(te)};W.hasAttribute(te)&&ge===null?We():W.hasAttribute(te)?(ct(),We()):ct()}j.forEach((q,W)=>{Le(W,q)}),R.forEach((q,W)=>{oe.forEach(te=>te(W,q))});for(let q of k)S.some(W=>W.contains(q))||_e.forEach(W=>W(q));for(let q of S)q.isConnected&&Ce.forEach(W=>W(q));S=null,k=null,R=null,j=null}function Xe(a){return Ne(me(a))}function ne(a,S,k){return a._x_dataStack=[S,...me(k||a)],()=>{a._x_dataStack=a._x_dataStack.filter(R=>R!==S)}}function me(a){return a._x_dataStack?a._x_dataStack:typeof ShadowRoot=="function"&&a instanceof ShadowRoot?me(a.host):a.parentNode?me(a.parentNode):[]}function Ne(a){return new Proxy({objects:a},vt)}var vt={ownKeys({objects:a}){return Array.from(new Set(a.flatMap(S=>Object.keys(S))))},has({objects:a},S){return S==Symbol.unscopables?!1:a.some(k=>Object.prototype.hasOwnProperty.call(k,S)||Reflect.has(k,S))},get({objects:a},S,k){return S=="toJSON"?it:Reflect.get(a.find(R=>Reflect.has(R,S))||{},S,k)},set({objects:a},S,k,R){const j=a.find(W=>Object.prototype.hasOwnProperty.call(W,S))||a[a.length-1],q=Object.getOwnPropertyDescriptor(j,S);return q?.set&&q?.get?q.set.call(R,k)||!0:Reflect.set(j,S,k)}};function it(){return Reflect.ownKeys(this).reduce((S,k)=>(S[k]=Reflect.get(this,k),S),{})}function pt(a){let S=R=>typeof R=="object"&&!Array.isArray(R)&&R!==null,k=(R,j="")=>{Object.entries(Object.getOwnPropertyDescriptors(R)).forEach(([q,{value:W,enumerable:te}])=>{if(te===!1||W===void 0||typeof W=="object"&&W!==null&&W.__v_skip)return;let ge=j===""?q:`${j}.${q}`;typeof W=="object"&&W!==null&&W._x_interceptor?R[q]=W.initialize(a,ge,q):S(W)&&W!==R&&!(W instanceof Element)&&k(W,ge)})};return k(a)}function Dt(a,S=()=>{}){let k={initialValue:void 0,_x_interceptor:!0,initialize(R,j,q){return a(this.initialValue,()=>pi(R,j),W=>ui(R,j,W),j,q)}};return S(k),R=>{if(typeof R=="object"&&R!==null&&R._x_interceptor){let j=k.initialize.bind(k);k.initialize=(q,W,te)=>{let ge=R.initialize(q,W,te);
vendor: 24,201 bytes, lines 3-7
3return k.initialValue=ge,j(q,W,te)}}else k.initialValue=R;return k}}function pi(a,S){return S.split(".").reduce((k,R)=>k[R],a)}function ui(a,S,k){if(typeof S=="string"&&(S=S.split(".")),S.length===1)a[S[0]]=k;else{if(S.length===0)throw error;return a[S[0]]||(a[S[0]]={}),ui(a[S[0]],S.slice(1),k)}}var Mi={};function oi(a,S){Mi[a]=S}function ii(a,S){let k=Xi(S);return Object.entries(Mi).forEach(([R,j])=>{Object.defineProperty(a,`$${R}`,{get(){return j(S,k)},enumerable:!1})}),a}function Xi(a){let[S,k]=Pe(a),R={interceptor:Dt,...S};return ae(a,k),R}function Fr(a,S,k,...R){try{return k(...R)}catch(j){qi(j,a,S)}}function qi(...a){return jr(...a)}var jr=en;function Ji(a){jr=a}function en(a,S,k=void 0){a=Object.assign(a??{message:"No error message given."},{el:S,expression:k}),console.warn(`Alpine Expression Error: ${a.message}
4
5${k?'Expression: "'+k+`"
6
7`:""}`,S),setTimeout(()=>{throw a},0)}var Qi=!0;function Zi(a){let S=Qi;Qi=!1;let k=a();return Qi=S,k}function Ei(a,S,k={}){let R;return ri(a,S)(j=>R=j,k),R}function ri(...a){return dr(...a)}var dr=Sr;function dn(a){dr=a}var Er;function fn(a){Er=a}function Sr(a,S){let k={};ii(k,a);let R=[k,...me(a)],j=typeof S=="function"?tn(R,S):z(R,S,a);return Fr.bind(null,a,S,j)}function tn(a,S){return(k=()=>{},{scope:R={},params:j=[],context:q}={})=>{if(!Qi){x(k,S,Ne([R,...a]),j);return}let W=S.apply(Ne([R,...a]),j);x(k,W)}}var Tr={};function Cr(a,S){if(Tr[a])return Tr[a];let k=Object.getPrototypeOf(async function(){}).constructor,R=/^[\n\s]*if.*\(.*\)/.test(a.trim())||/^(let|const)\s/.test(a.trim())?`(async()=>{ ${a} })()`:a,q=(()=>{try{let W=new k(["__self","scope"],`with (scope) { __self.result = ${R} }; __self.finished = true; return __self.result;`);return Object.defineProperty(W,"name",{value:`[Alpine] ${a}`}),W}catch(W){return qi(W,S,a),Promise.resolve()}})();return Tr[a]=q,q}function z(a,S,k){let R=Cr(S,k);return(j=()=>{},{scope:q={},params:W=[],context:te}={})=>{R.result=void 0,R.finished=!1;let ge=Ne([q,...a]);if(typeof R=="function"){let We=R.call(te,R,ge).catch(ct=>qi(ct,k,S));R.finished?(x(j,R.result,ge,W,k),R.result=void 0):We.then(ct=>{x(j,ct,ge,W,k)}).catch(ct=>qi(ct,k,S)).finally(()=>R.result=void 0)}}}function x(a,S,k,R,j){if(Qi&&typeof S=="function"){let q=S.apply(k,R);q instanceof Promise?q.then(W=>x(a,W,k,R)).catch(W=>qi(W,j,S)):a(q)}else typeof S=="object"&&S instanceof Promise?S.then(q=>a(q)):a(S)}function P(...a){return Er(...a)}function B(a,S,k={}){var R,j;let q={};ii(q,a);let W=[q,...me(a)],te=Ne([(R=k.scope)!=null?R:{},...W]),ge=(j=k.params)!=null?j:[];if(S.includes("await")){let We=Object.getPrototypeOf(async function(){}).constructor,ct=/^[\n\s]*if.*\(.*\)/.test(S.trim())||/^(let|const)\s/.test(S.trim())?`(async()=>{ ${S} })()`:S;return new We(["scope"],`with (scope) { let __result = ${ct}; return __result }`).call(k.context,te)}else{let We=/^[\n\s]*if.*\(.*\)/.test(S.trim())||/^(let|const)\s/.test(S.trim())?`(()=>{ ${S} })()`:S,$t=new Function(["scope"],`with (scope) { let __result = ${We}; return __result }`).call(k.context,te);return typeof $t=="function"&&Qi?$t.apply(te,ge):$t}}var H="x-";function G(a=""){return H+a}function X(a){H=a}var ie={};function ee(a,S){return ie[a]=S,{before(k){if(!ie[k]){console.warn(String.raw`Cannot find directive \`${k}\`. \`${a}\` will use the default order of execution`);return}const R=_i.indexOf(k);_i.splice(R>=0?R:_i.indexOf("DEFAULT"),0,a)}}}function be(a){return Object.keys(ie).includes(a)}function Te(a,S,k){if(S=Array.from(S),a._x_virtualDirectives){let q=Object.entries(a._x_virtualDirectives).map(([te,ge])=>({name:te,value:ge})),W=qe(q);q=q.map(te=>W.find(ge=>ge.name===te.name)?{name:`x-bind:${te.name}`,value:`"${te.value}"`}:te),S=S.concat(q)}let R={};return S.map(Y((q,W)=>R[q]=W)).filter(mi).map(Oi(R,k)).sort(gi).map(q=>ze(a,q))}function qe(a){return Array.from(a).map(Y()).filter(S=>!mi(S))}var He=!1,Ve=new Map,De=Symbol();function Ae(a){He=!0;let S=Symbol();De=S,Ve.set(S,[]);let k=()=>{for(;Ve.get(S).length;)Ve.get(S).shift()();Ve.delete(S)},R=()=>{He=!1,k()};a(k),R()}function Pe(a){let S=[],k=te=>S.push(te),[R,j]=st(a);return S.push(j),[{Alpine:jn,effect:R,cleanup:k,evaluateLater:ri.bind(ri,a),evaluate:Ei.bind(Ei,a)},()=>S.forEach(te=>te())]}function ze(a,S){let k=()=>{},R=ie[S.type]||k,[j,q]=Pe(a);ve(a,S.original,q);let W=()=>{a._x_ignore||a._x_ignoreSelf||(R.inline&&R.inline(a,S,j),R=R.bind(R,a,S,j),He?Ve.get(De).push(R):R())};return W.runCleanups=q,W}var xe=(a,S)=>({name:k,value:R})=>(k.startsWith(a)&&(k=k.replace(a,S)),{name:k,value:R}),Ue=a=>a;function Y(a=()=>{}){return({name:S,value:k})=>{let{name:R,value:j}=At.reduce((q,W)=>W(q),{name:S,value:k});return R!==S&&a(R,S),{name:R,value:j}}}var At=[];function Ge(a){At.push(a)}function mi({name:a}){return wi().test(a)}var wi=()=>new RegExp(`^${H}([^:^.]+)\\b`);function Oi(a,S){return({name:k,value:R})=>{let j=k.match(wi()),q=k.match(/:([a-zA-Z0-9\-_:]+)/),W=k.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],te=S||a[k]||k;return{type:j?j[1]:null,value:q?q[1]:null,modifiers:W.map(ge=>ge.replace(".","")),expression:R,original:te}}}var Ii="DEFAULT",_i=["ignore","ref","data","id","anchor","bind","init","for","model","modelable","transition","show","if",Ii,"teleport"];function gi(a,S){let k=_i.indexOf(a.type)===-1?Ii:a.type,R=_i.indexOf(S.type)===-1?Ii:S.type;return _i.indexOf(k)-_i.indexOf(R)}function Wt(a,S,k={}){a.dispatchEvent(new CustomEvent(S,{detail:k,bubbles:!0,composed:!0,cancelable:!0}))}function li(a,S){if(typeof ShadowRoot=="function"&&a instanceof ShadowRoot){Array.from(a.children).forEach(j=>li(j,S));return}let k=!1;if(S(a,()=>k=!0),k)return;let R=a.firstElementChild;for(;R;)li(R,S),R=R.nextElementSibling}function Jt(a,...S){console.warn(`Alpine Warning: ${a}`,...S)}var F=!1;function L(){F&&Jt("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems."),F=!0,document.body||Jt("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?"),Wt(document,"alpine:init"),Wt(document,"alpine:initializing"),ht(),ke(S=>mt(S,li)),ae(S=>kt(S)),K((S,k)=>{Te(S,k).forEach(R=>R())});let a=S=>!Ye(S.parentElement,!0);Array.from(document.querySelectorAll(Oe().join(","))).filter(a).forEach(S=>{mt(S)}),Wt(document,"alpine:initialized"),setTimeout(()=>{xt()})}var V=[],ce=[];function ue(){return V.map(a=>a())}function Oe(){return V.concat(ce).map(a=>a())}function $e(a){V.push(a)}function Ie(a){ce.push(a)}function Ye(a,S=!1){return rt(a,k=>{if((S?Oe():ue()).some(j=>k.matches(j)))return!0})}function rt(a,S){if(a){if(S(a))return a;if(a._x_teleportBack&&(a=a._x_teleportBack),a.parentNode instanceof ShadowRoot)return rt(a.parentNode.host,S);if(a.parentElement)return rt(a.parentElement,S)}}function Be(a){return ue().some(S=>a.matches(S))}var Pt=[];function Kt(a){Pt.push(a)}var Ot=1;function mt(a,S=li,k=()=>{}){rt(a,R=>R._x_ignore)||Ae(()=>{S(a,(R,j)=>{R._x_marker||(k(R,j),Pt.forEach(q=>q(R,j)),Te(R,R.attributes).forEach(q=>q()),R._x_ignore||(R._x_marker=Ot++),R._x_ignore&&j())})})}function kt(a,S=li){S(a,k=>{tt(k),Le(k),delete k._x_marker})}function xt(){[["ui","dialog",["[x-dialog], [x-popover]"]],["anchor","anchor",["[x-anchor]"]],["sort","sort",["[x-sort]"]]].forEach(([S,k,R])=>{be(k)||R.some(j=>{if(document.querySelector(j))return Jt(`found "${j}", but missing ${S} plugin`),!0})})}var Gt=[],Nt=!1;function Yt(a=()=>{}){return queueMicrotask(()=>{Nt||setTimeout(()=>{dt()})}),new Promise(S=>{Gt.push(()=>{a(),S()})})}function dt(){for(Nt=!1;Gt.length;)Gt.shift()()}function jt(){Nt=!0}function It(a,S){return Array.isArray(S)?qt(a,S.join(" ")):typeof S=="object"&&S!==null?Vt(a,S):typeof S=="function"?It(a,S()):qt(a,S)}function qt(a,S){let k=j=>j.split(" ").filter(q=>!a.classList.contains(q)).filter(Boolean),R=j=>(a.classList.add(...j),()=>{a.classList.remove(...j)});return S=S===!0?S="":S||"",R(k(S))}function Vt(a,S){let k=te=>te.split(" ").filter(Boolean),R=Object.entries(S).flatMap(([te,ge])=>ge?k(te):!1).filter(Boolean),j=Object.entries(S).flatMap(([te,ge])=>ge?!1:k(te)).filter(Boolean),q=[],W=[];return j.forEach(te=>{a.classList.contains(te)&&(a.classList.remove(te),W.push(te))}),R.forEach(te=>{a.classList.contains(te)||(a.classList.add(te),q.push(te))}),()=>{W.forEach(te=>a.classList.add(te)),q.forEach(te=>a.classList.remove(te))}}function Qt(a,S){return typeof S=="object"&&S!==null?Zt(a,S):ni(a,S)}function Zt(a,S){let k={};return Object.entries(S).forEach(([R,j])=>{k[R]=a.style[R],R.startsWith("--")||(R=Vi(R)),a.style.setProperty(R,j)}),setTimeout(()=>{a.style.length===0&&a.removeAttribute("style")}),()=>{Qt(a,k)}}function ni(a,S){let k=a.getAttribute("style",S);return a.setAttribute("style",S),()=>{a.setAttribute("style",k||"")}}function Vi(a){return a.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function vi(a,S=()=>{}){let k=!1;return function(){k?S.apply(this,arguments):(k=!0,a.apply(this,arguments))}}ee("transition",(a,{value:S,modifiers:k,expression:R},{evaluate:j})=>{typeof R=="function"&&(R=j(R)),R!==!1&&(!R||typeof R=="boolean"?Ur(a,k,S):fr(a,R,S))});function fr(a,S,k){hr(a,It,""),{enter:j=>{a._x_transition.enter.during=j},"enter-start":j=>{a._x_transition.enter.start=j},"enter-end":j=>{a._x_transition.enter.end=j},leave:j=>{a._x_transition.leave.during=j},"leave-start":j=>{a._x_transition.leave.start=j},"leave-end":j=>{a._x_transition.leave.end=j}}[k](S)}function Ur(a,S,k){hr(a,Qt);let R=!S.includes("in")&&!S.includes("out")&&!k,j=R||S.includes("in")||["enter"].includes(k),q=R||S.includes("out")||["leave"].includes(k);S.includes("in")&&!R&&(S=S.filter((Ft,Et)=>Et<S.indexOf("out"))),S.includes("out")&&!R&&(S=S.filter((Ft,Et)=>Et>S.indexOf("out")));let W=!S.includes("opacity")&&!S.includes("scale"),te=W||S.includes("opacity"),ge=W||S.includes("scale"),We=te?0:1,ct=ge?tr(S,"scale",95)/100:1,$t=tr(S,"delay",0)/1e3,Ct=tr(S,"origin","center"),Xt="opacity, transform",Di=tr(S,"duration",150)/1e3,Or=tr(S,"duration",75)/1e3,ft="cubic-bezier(0.4, 0.0, 0.2, 1)";j&&(a._x_transition.enter.during={transformOrigin:Ct,transitionDelay:`${$t}s`,transitionProperty:Xt,transitionDuration:`${Di}s`,transitionTimingFunction:ft},a._x_transition.enter.start={opacity:We,transform:`scale(${ct})`},a._x_transition.enter.end={opacity:1,transform:"scale(1)"}),q&&(a._x_transition.leave.during={transformOrigin:Ct,transitionDelay:`${$t}s`,transitionProperty:Xt,transitionDuration:`${Or}s`,transitionTimingFunction:ft},a._x_transition.leave.start={opacity:1,transform:"scale(1)"},a._x_transition.leave.end={opacity:We,transform:`scale(${ct})`})}function hr(a,S,k={}){a._x_transition||(a._x_transition={enter:{during:k,start:k,end:k},leave:{during:k,start:k,end:k},in(R=()=>{},j=()=>{}){Br(a,S,{during:this.enter.during,start:this.enter.start,end:this.enter.end},R,j)},out(R=()=>{},j=()=>{}){Br(a,S,{during:this.leave.during,start:this.leave.start,end:this.leave.end},R,j)}})}window.Element.prototype._x_toggleAndCascadeWithTransitions=function(a,S,k,R){const j=document.visibilityState==="visible"?requestAnimationFrame:setTimeout;let q=()=>j(k);if(S){a._x_transition&&(a._x_transition.enter||a._x_transition.leave)?a._x_transition.enter&&(Object.entries(a._x_transition.enter.during).length||Object.entries(a._x_transition.enter.start).length||Object.entries(a._x_transition.enter.end).length)?a._x_transition.in(k):q():a._x_transition?a._x_transition.in(k):q();return}a._x_hidePromise=a._x_transition?new Promise((W,te)=>{a._x_transition.out(()=>{},()=>W(R)),a._x_transitioning&&a._x_transitioning.beforeCancel(()=>te({isFromCancelledTransition:!0}))}):Promise.resolve(R),queueMicrotask(()=>{let W=er(a);W?(W._x_hideChildren||(W._x_hideChildren=[]),W._x_hideChildren.push(a)):j(()=>{let te=ge=>{let We=Promise.all([ge._x_hidePromise,...(ge._x_hideChildren||[]).map(te)]).then(([ct])=>ct?.());return delete ge._x_hidePromise,delete ge._x_hideChildren,We};te(a).catch(ge=>{if(!ge.isFromCancelledTransition)throw ge})})})};function er(a){let S=a.parentNode;if(S)return S._x_hidePromise?S:er(S)}function Br(a,S,{during:k,start:R,end:j}={},q=()=>{},W=()=>{}){if(a._x_transitioning&&a._x_transitioning.cancel(),Object.keys(k).length===0&&Object.keys(R).length===0&&Object.keys(j).length===0){q(),W();return}let te,ge,We;Ar(a,{start(){te=S(a,R)},during(){ge=S(a,k)},before:q,end(){te(),We=S(a,j)},after:W,cleanup(){ge(),We()}})}function Ar(a,S){let k,R,j,q=vi(()=>{Re(()=>{k=!0,R||S.before(),j||(S.end(),dt()),S.after(),a.isConnected&&S.cleanup(),delete a._x_transitioning})});a._x_transitioning={beforeCancels:[],beforeCancel(W){this.beforeCancels.push(W)},cancel:vi(function(){for(;this.beforeCancels.length;)this.beforeCancels.shift()();q()}),finish:q},Re(()=>{S.start(),S.during()}),jt(),requestAnimationFrame(()=>{if(k)return;let W=Number(getComputedStyle(a).transitionDuration.replace(/,.*/,"").replace("s",""))*1e3,te=Number(getComputedStyle(a).transitionDelay.replace(/,.*/,"").replace("s",""))*1e3;W===0&&(W=Number(getComputedStyle(a).animationDuration.replace("s",""))*1e3),Re(()=>{S.before()}),R=!0,requestAnimationFrame(()=>{k||(Re(()=>{S.end()}),dt(),setTimeout(a._x_transitioning.finish,W+te),j=!0)})})}function tr(a,S,k){if(a.indexOf(S)===-1)return k;const R=a[a.indexOf(S)+1];if(!R||S==="scale"&&isNaN(R))return k;if(S==="duration"||S==="delay"){let j=R.match(/([0-9]+)ms/);if(j)return j[1]}return S==="origin"&&["top","right","left","center","bottom"].includes(a[a.indexOf(S)+2])?[R,a[a.indexOf(S)+2]].join(" "):R}var Ri=!1;function re(a,S=()=>{}){return(...k)=>Ri?S(...k):a(...k)}function Je(a){return(...S)=>Ri&&a(...S)}var nt=[];function gt(a){nt.push(a)}function _t(a,S){nt.forEach(k=>k(a,S)),Ri=!0,rn(()=>{mt(S,(k,R)=>{R(k,()=>{})})}),Ri=!1}var ai=!1;function di(a,S){S._x_dataStack||(S._x_dataStack=a._x_dataStack),Ri=!0,ai=!0,rn(()=>{ir(S)}),Ri=!1,ai=!1}function ir(a){let S=!1;mt(a,(R,j)=>{li(R,(q,W)=>{if(S&&Be(q))return W();S=!0,j(q,W)})})}function rn(a){let S=D;pe((k,R)=>{let j=S(k);return U(j),()=>{}}),a(),pe(S)}function Hi(a,S,k,R=[]){switch(a._x_bindings||(a._x_bindings=N({})),a._x_bindings[S]=k,S=R.includes("camel")?zm(S):S,S){case"value":nn(a,k);break;case"style":xr(a,k);break;case"class":qr(a,k);break;case"selected":case"checked":Ps(a,S,k);break;default:pr(a,S,k);break}}function nn(a,S){if(Du(a))a.attributes.value===void 0&&(a.value=S),window.fromModel&&(typeof S=="boolean"?a.checked=wo(a.value)===S:a.checked=Lu(a.value,S));else if(Ga(a))Number.isInteger(S)?a.value=S:!Array.isArray(S)&&typeof S!="boolean"&&![null,void 0].includes(S)?a.value=String(S):Array.isArray(S)?a.checked=S.some(k=>Lu(k,a.value)):a.checked=!!S;else if(a.tagName==="SELECT")bo(a,S);else{if(a.value===S)return;a.value=S===void 0?"":S}}function qr(a,S){a._x_undoAddedClasses&&a._x_undoAddedClasses(),a._x_undoAddedClasses=It(a,S)}function xr(a,S){a._x_undoAddedStyles&&a._x_undoAddedStyles(),a._x_undoAddedStyles=Qt(a,S)}function Ps(a,S,k){pr(a,S,k),yo(a,S,k)}function pr(a,S,k){[null,void 0,!1].includes(k)&&Km(S)?a.removeAttribute(S):(Mu(S)&&(k=S),Vr(a,S,k))}function Vr(a,S,k){a.getAttribute(S)!=k&&a.setAttribute(S,k)}function yo(a,S,k){a[S]!==k&&(a[S]=k)}function bo(a,S){const k=[].concat(S).map(R=>R+"");Array.from(a.options).forEach(R=>{R.selected=k.includes(R.value)})}function zm(a){return a.toLowerCase().replace(/-(\w)/g,(S,k)=>k.toUpperCase())}function Lu(a,S){return a==S}function wo(a){return[1,"1","true","on","yes",!0].includes(a)?!0:[0,"0","false","off","no",!1].includes(a)?!1:a?!!a:null}var Wm=new Set(["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","shadowrootclonable","shadowrootdelegatesfocus","shadowrootserializable"]);function Mu(a){return Wm.has(a)}function Km(a){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(a)}function Gm(a,S,k){return a._x_bindings&&a._x_bindings[S]!==void 0?a._x_bindings[S]:Ru(a,S,k)}function Ym(a,S,k,R=!0){if(a._x_bindings&&a._x_bindings[S]!==void 0)return a._x_bindings[S];if(a._x_inlineBindings&&a._x_inlineBindings[S]!==void 0){let j=a._x_inlineBindings[S];return j.extract=R,Zi(()=>Ei(a,j.expression))}return Ru(a,S,k)}function Ru(a,S,k){let R=a.getAttribute(S);return R===null?typeof k=="function"?k():k:R===""?!0:Mu(S)?!![S,"true"].includes(R):R}function Ga(a){return a.type==="checkbox"||a.localName==="ui-checkbox"||a.localName==="ui-switch"}function Du(a){return a.type==="radio"||a.localName==="ui-radio"}function Nu(a,S){let k;return function(){const R=this,j=arguments,q=function(){k=null,a.apply(R,j)};clearTimeout(k),k=setTimeout(q,S)}}function $u(a,S){let k;return function(){let R=this,j=arguments;k||(a.apply(R,j),k=!0,setTimeout(()=>k=!1,S))}}function Fu({get:a,set:S},{get:k,set:R}){let j=!0,q,W=D(()=>{let te=a(),ge=k();if(j)R(Ya(te)),j=!1;else{let We=JSON.stringify(te),ct=JSON.stringify(ge);We!==q?R(Ya(te)):We!==ct&&S(Ya(ge))}q=JSON.stringify(a()),JSON.stringify(k())});return()=>{U(W)}}function Ya(a){return typeof a=="object"?JSON.parse(JSON.stringify(a)):a}function Xm(a){(Array.isArray(a)?a:[a]).forEach(k=>k(jn))}var hn={},ju=!1;function Jm(a,S){if(ju||(hn=N(hn),ju=!0),S===void 0)return hn[a];hn[a]=S,pt(hn[a]),typeof S=="object"&&S!==null&&S.hasOwnProperty("init")&&typeof S.init=="function"&&hn[a].init()}function Qm(){return hn}var Uu={};function Zm(a,S){let k=typeof S!="function"?()=>S:S;return a instanceof Element?Bu(a,k()):(Uu[a]=k,()=>{})}function eg(a){return Object.entries(Uu).forEach(([S,k])=>{Object.defineProperty(a,S,{get(){return(...R)=>k(...R)}})}),a}function Bu(a,S,k){let R=[];for(;R.length;)R.pop()();let j=Object.entries(S).map(([W,te])=>({name:W,value:te})),q=qe(j);return j=j.map(W=>q.find(te=>te.name===W.name)?{name:`x-bind:${W.name}`,value:`"${W.value}"`}:W),Te(a,j,k).map(W=>{R.push(W.runCleanups),W()}),()=>{for(;R.length;)R.pop()()}}var qu={};function tg(a,S){qu[a]=S}function ig(a,S){return Object.entries(qu).forEach(([k,R])=>{Object.defineProperty(a,k,{get(){return(...j)=>R.bind(S)(...j)},enumerable:!1})}),a}var rg={get reactive(){return N},get release(){return U},get effect(){return D},get raw(){return Q},version:"3.15.3",flushAndStopDeferringMutations:je,dontAutoEvaluateFunctions:Zi,disableEffectScheduling:se,startObservingMutations:ht,stopObservingMutations:bt,setReactivityEngine:fe,onAttributeRemoved:ve,onAttributesAdded:K,closestDataStack:me,skipDuringClone:re,onlyDuringClone:Je,addRootSelector:$e,addInitSelector:Ie,setErrorHandler:Ji,interceptClone:gt,addScopeToNode:ne,deferMutations:Ze,mapAttributes:Ge,evaluateLater:ri,interceptInit:Kt,initInterceptors:pt,injectMagics:ii,setEvaluator:dn,setRawEvaluator:fn,mergeProxies:Ne,extractProp:Ym,findClosest:rt,onElRemoved:ae,closestRoot:Ye,destroyTree:kt,interceptor:Dt,transition:Br,setStyles:Qt,mutateDom:Re,directive:ee,entangle:Fu,throttle:$u,debounce:Nu,evaluate:Ei,evaluateRaw:P,initTree:mt,nextTick:Yt,prefixed:G,prefix:X,plugin:Xm,magic:oi,store:Jm,start:L,clone:di,cloneNode:_t,bound:Gm,$data:Xe,watch:Ee,walk:li,data:tg,bind:Zm},jn=rg,_o=y(w());oi("nextTick",()=>Yt),oi("dispatch",a=>Wt.bind(Wt,a)),oi("watch",(a,{evaluateLater:S,cleanup:k})=>(R,j)=>{let q=S(R),te=Ee(()=>{let ge;return q(We=>ge=We),ge},j);k(te)}),oi("store",Qm),oi("data",a=>Xe(a)),oi("root",a=>Ye(a)),oi("refs",a=>(a._x_refs_proxy||(a._x_refs_proxy=Ne(ng(a))),a._x_refs_proxy));function ng(a){let S=[];return rt(a,k=>{k._x_refs&&S.push(k._x_refs)}),S}var Xa={};function Vu(a){return Xa[a]||(Xa[a]=0),++Xa[a]}function sg(a,S){return rt(a,k=>{if(k._x_ids&&k._x_ids[S])return!0})}function og(a,S){a._x_ids||(a._x_ids={}),a._x_ids[S]||(a._x_ids[S]=Vu(S))}oi("id",(a,{cleanup:S})=>(k,R=null)=>{let j=`${k}${R?`-${R}`:""}`;return ag(a,j,S,()=>{let q=sg(a,k),W=q?q._x_ids[k]:Vu(k);return R?`${k}-${W}-${R}`:`${k}-${W}`})}),gt((a,S)=>{a._x_id&&(S._x_id=a._x_id)});function ag(a,S,k,R){if(a._x_id||(a._x_id={}),a._x_id[S])return a._x_id[S];let j=R();return a._x_id[S]=j,k(()=>{delete a._x_id[S]}),j}oi("el",a=>a),Hu("Focus","focus","focus"),Hu("Persist","persist","persist");function Hu(a,S,k){oi(S,R=>Jt(`You can't use [$${S}] without first installing the "${a}" plugin here: https://alpinejs.dev/plugins/${k}`,R))}ee("modelable",(a,{expression:S},{effect:k,evaluateLater:R,cleanup:j})=>{let q=R(S),W=()=>{let ct;return q($t=>ct=$t),ct},te=R(`${S} = __placeholder`),ge=ct=>te(()=>{},{scope:{__placeholder:ct}}),We=W();ge(We),queueMicrotask(()=>{if(!a._x_model)return;a._x_removeModelListeners.default();let ct=a._x_model.get,$t=a._x_model.set,Ct=Fu({get(){return ct()},set(Xt){$t(Xt)}},{get(){return W()},set(Xt){ge(Xt)}});j(Ct)})}),ee("teleport",(a,{modifiers:S,expression:k},{cleanup:R})=>{a.tagName.toLowerCase()!=="template"&&Jt("x-teleport can only be used on a <template> tag",a);let j=zu(k),q=a.content.cloneNode(!0).firstElementChild;a._x_teleport=q,q._x_teleportBack=a,a.setAttribute("data-teleport-template",!0),q.setAttribute("data-teleport-target",!0),a._x_forwardEvents&&a._x_forwardEvents.forEach(te=>{q.addEventListener(te,ge=>{ge.stopPropagation(),a.dispatchEvent(new ge.constructor(ge.type,ge))})}),ne(q,{},a);let W=(te,ge,We)=>{We.includes("prepend")?ge.parentNode.insertBefore(te,ge):We.includes("append")?ge.parentNode.insertBefore(te,ge.nextSibling):ge.appendChild(te)};Re(()=>{W(q,j,S),re(()=>{mt(q)})()}),a._x_teleportPutBack=()=>{let te=zu(k);Re(()=>{W(a._x_teleport,te,S)})},R(()=>Re(()=>{q.remove(),kt(q)}))});var lg=document.createElement("div");function zu(a){let S=re(()=>document.querySelector(a),()=>lg)();return S||Jt(`Cannot find x-teleport element for selector: "${a}"`),S}var Wu=()=>{};Wu.inline=(a,{modifiers:S},{cleanup:k})=>{S.includes("self")?a._x_ignoreSelf=!0:a._x_ignore=!0,k(()=>{S.includes("self")?delete a._x_ignoreSelf:delete a._x_ignore})},ee("ignore",Wu),ee("effect",re((a,{expression:S},{effect:k})=>{k(ri(a,S))}));function Ja(a,S,k,R){let j=a,q=ge=>R(ge),W={},te=(ge,We)=>ct=>We(ge,ct);if(k.includes("dot")&&(S=cg(S)),k.includes("camel")&&(S=ug(S)),k.includes("passive")&&(W.passive=!0),k.includes("capture")&&(W.capture=!0),k.includes("window")&&(j=window),k.includes("document")&&(j=document),k.includes("debounce")){let ge=k[k.indexOf("debounce")+1]||"invalid-wait",We=Eo(ge.split("ms")[0])?Number(ge.split("ms")[0]):250;q=Nu(q,We)}if(k.includes("throttle")){let ge=k[k.indexOf("throttle")+1]||"invalid-wait",We=Eo(ge.split("ms")[0])?Number(ge.split("ms")[0]):250;q=$u(q,We)}return k.includes("prevent")&&(q=te(q,(ge,We)=>{We.preventDefault(),ge(We)})),k.includes("stop")&&(q=te(q,(ge,We)=>{We.stopPropagation(),ge(We)})),k.includes("once")&&(q=te(q,(ge,We)=>{ge(We),j.removeEventListener(S,q,W)})),(k.includes("away")||k.includes("outside"))&&(j=document,q=te(q,(ge,We)=>{a.contains(We.target)||We.target.isConnected!==!1&&(a.offsetWidth<1&&a.offsetHeight<1||a._x_isShown!==!1&&ge(We))})),k.includes("self")&&(q=te(q,(ge,We)=>{We.target===a&&ge(We)})),(fg(S)||Ku(S))&&(q=te(q,(ge,We)=>{hg(We,k)||ge(We)})),j.addEventListener(S,q,W),()=>{j.removeEventListener(S,q,W)}}function cg(a){return a.replace(/-/g,".")}function ug(a){return a.toLowerCase().replace(/-(\w)/g,(S,k)=>k.toUpperCase())}function Eo(a){return!Array.isArray(a)&&!isNaN(a)}function dg(a){return[" ","_"].includes(a)?a:a.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function fg(a){return["keydown","keyup"].includes(a)}function Ku(a){return["contextmenu","click","mouse"].some(S=>a.includes(S))}function hg(a,S){let k=S.filter(q=>!["window","document","prevent","stop","once","capture","self","away","outside","passive","preserve-scroll"].includes(q));if(k.includes("debounce")){let q=k.indexOf("debounce");k.splice(q,Eo((k[q+1]||"invalid-wait").split("ms")[0])?2:1)}if(k.includes("throttle")){let q=k.indexOf("throttle");k.splice(q,Eo((k[q+1]||"invalid-wait").split("ms")[0])?2:1)}if(k.length===0||k.length===1&&Gu(a.key).includes(k[0]))return!1;const j=["ctrl","shift","alt","meta","cmd","super"].filter(q=>k.includes(q));return k=k.filter(q=>!j.includes(q)),!(j.length>0&&j.filter(W=>((W==="cmd"||W==="super")&&(W="meta"),a[`${W}Key`])).length===j.length&&(Ku(a.type)||Gu(a.key).includes(k[0])))}function Gu(a){if(!a)return[];a=dg(a);
7let S={ctrl:"control",slash:"/",space:" ",spacebar:" ",cmd:"meta",esc:"escape",up:"arrow-up",down:"arrow-down",left:"arrow-left",right:"arrow-right",period:".",comma:",",equal:"=",minus:"-",underscore:"_"};return S[a]=a,Object.keys(S).map(k=>{if(S[k]===a)return k}).filter(k=>k)}ee("model",(a,{modifiers:S,expression:k},{effect:R,cleanup:j})=>{let q=a;S.includes("parent")&&(q=a.parentNode);let W=ri(q,k),te;typeof k=="string"?te=ri(q,`${k} = __placeholder`):typeof k=="function"&&typeof k()=="string"?te=ri(q,`${k()} = __placeholder`):te=()=>{};let ge=()=>{let Ct;return W(Xt=>Ct=Xt),Yu(Ct)?Ct.get():Ct},We=Ct=>{let Xt;W(Di=>Xt=Di),Yu(Xt)?Xt.set(Ct):te(()=>{},{scope:{__placeholder:Ct}})};typeof k=="string"&&a.type==="radio"&&Re(()=>{a.hasAttribute("name")||a.setAttribute("name",k)});let ct=a.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(a.type)||S.includes("lazy")?"change":"input",$t=Ri?()=>{}:Ja(a,ct,S,Ct=>{We(Qa(a,S,Ct,ge()))});if(S.includes("fill")&&([void 0,null,""].includes(ge())||Ga(a)&&Array.isArray(ge())||a.tagName.toLowerCase()==="select"&&a.multiple)&&We(Qa(a,S,{target:a},ge())),a._x_removeModelListeners||(a._x_removeModelListeners={}),a._x_removeModelListeners.default=$t,j(()=>a._x_removeModelListeners.default()),a.form){let Ct=Ja(a.form,"reset",[],Xt=>{Yt(()=>a._x_model&&a._x_model.set(Qa(a,S,{target:a},ge())))});j(()=>Ct())}a._x_model={get(){return ge()},set(Ct){We(Ct)}},a._x_forceModelUpdate=Ct=>{Ct===void 0&&typeof k=="string"&&k.match(/\./)&&(Ct=""),window.fromModel=!0,Re(()=>Hi(a,"value",Ct)),delete window.fromModel},R(()=>{let Ct=ge();S.includes("unintrusive")&&document.activeElement.isSameNode(a)||a._x_forceModelUpdate(Ct)})});function Qa(a,S,k,R){return Re(()=>{if(k instanceof CustomEvent&&k.detail!==void 0)return k.detail!==null&&k.detail!==void 0?k.detail:k.target.value;if(Ga(a))if(Array.isArray(R)){let j=null;return S.includes("number")?j=Za(k.target.value):S.includes("boolean")?j=wo(k.target.value):j=k.target.value,k.target.checked?R.includes(j)?R:R.concat([j]):R.filter(q=>!pg(q,j))}else return k.target.checked;else{if(a.tagName.toLowerCase()==="select"&&a.multiple)return S.includes("number")?Array.from(k.target.selectedOptions).map(j=>{let q=j.value||j.text;return Za(q)}):S.includes("boolean")?Array.from(k.target.selectedOptions).map(j=>{let q=j.value||j.text;return wo(q)}):Array.from(k.target.selectedOptions).map(j=>j.value||j.text);{let j;return Du(a)?k.target.checked?j=k.target.value:j=R:j=k.target.value,S.includes("number")?Za(j):S.includes("boolean")?wo(j):S.includes("trim")?j.trim():j}}})}function Za(a){let S=a?parseFloat(a):null;return mg(S)?S:a}function pg(a,S){return a==S}function mg(a){return!Array.isArray(a)&&!isNaN(a)}function Yu(a){return a!==null&&typeof a=="object"&&typeof a.get=="function"&&typeof a.set=="function"}ee("cloak",a=>queueMicrotask(()=>Re(()=>a.removeAttribute(G("cloak"))))),Ie(()=>`[${G("init")}]`),ee("init",re((a,{expression:S},{evaluate:k})=>typeof S=="string"?!!S.trim()&&k(S,{},!1):k(S,{},!1))),ee("text",(a,{expression:S},{effect:k,evaluateLater:R})=>{let j=R(S);k(()=>{j(q=>{Re(()=>{a.textContent=q})})})}),ee("html",(a,{expression:S},{effect:k,evaluateLater:R})=>{let j=R(S);k(()=>{j(q=>{Re(()=>{a.innerHTML=q,a._x_ignoreSelf=!0,mt(a),delete a._x_ignoreSelf})})})}),Ge(xe(":",Ue(G("bind:"))));var Xu=(a,{value:S,modifiers:k,expression:R,original:j},{effect:q,cleanup:W})=>{if(!S){let ge={};eg(ge),ri(a,R)(ct=>{Bu(a,ct,j)},{scope:ge});return}if(S==="key")return gg(a,R);if(a._x_inlineBindings&&a._x_inlineBindings[S]&&a._x_inlineBindings[S].extract)return;let te=ri(a,R);q(()=>te(ge=>{ge===void 0&&typeof R=="string"&&R.match(/\./)&&(ge=""),Re(()=>Hi(a,S,ge,k))})),W(()=>{a._x_undoAddedClasses&&a._x_undoAddedClasses(),a._x_undoAddedStyles&&a._x_undoAddedStyles()})};Xu.inline=(a,{value:S,modifiers:k,expression:R})=>{S&&(a._x_inlineBindings||(a._x_inlineBindings={}),a._x_inlineBindings[S]={expression:R,extract:!1})},ee("bind",Xu);function gg(a,S){a._x_keyExpression=S}$e(()=>`[${G("data")}]`),ee("data",(a,{expression:S},{cleanup:k})=>{if(vg(a))return;S=S===""?"{}":S;let R={};ii(R,a);let j={};ig(j,R);let q=Ei(a,S,{scope:j});(q===void 0||q===!0)&&(q={}),ii(q,a);let W=N(q);pt(W);let te=ne(a,W);W.init&&Ei(a,W.init),k(()=>{W.destroy&&Ei(a,W.destroy),te()})}),gt((a,S)=>{a._x_dataStack&&(S._x_dataStack=a._x_dataStack,S.setAttribute("data-has-alpine-state",!0))});function vg(a){return Ri?ai?!0:a.hasAttribute("data-has-alpine-state"):!1}ee("show",(a,{modifiers:S,expression:k},{effect:R})=>{let j=ri(a,k);a._x_doHide||(a._x_doHide=()=>{Re(()=>{a.style.setProperty("display","none",S.includes("important")?"important":void 0)})}),a._x_doShow||(a._x_doShow=()=>{Re(()=>{a.style.length===1&&a.style.display==="none"?a.removeAttribute("style"):a.style.removeProperty("display")})});let q=()=>{a._x_doHide(),a._x_isShown=!1},W=()=>{a._x_doShow(),a._x_isShown=!0},te=()=>setTimeout(W),ge=vi($t=>$t?W():q(),$t=>{typeof a._x_toggleAndCascadeWithTransitions=="function"?a._x_toggleAndCascadeWithTransitions(a,$t,W,q):$t?te():q()}),We,ct=!0;R(()=>j($t=>{!ct&&$t===We||(S.includes("immediate")&&($t?te():q()),ge($t),We=$t,ct=!1)}))}),ee("for",(a,{expression:S},{effect:k,cleanup:R})=>{let j=bg(S),q=ri(a,j.items),W=ri(a,a._x_keyExpression||"index");a._x_prevKeys=[],a._x_lookup={},k(()=>yg(a,j,q,W)),R(()=>
7{Object.values(a._x_lookup).forEach(te=>Re(()=>{kt(te),te.remove()})),delete a._x_prevKeys,delete a._x_lookup})});function yg(a,S,k,R){let j=W=>typeof W=="object"&&!Array.isArray(W),q=a;k(W=>{wg(W)&&W>=0&&(W=Array.from(Array(W).keys(),ft=>ft+1)),W===void 0&&(W=[]);let te=a._x_lookup,ge=a._x_prevKeys,We=[],ct=[];if(j(W))W=Object.entries(W).map(([ft,Ft])=>{let Et=Ju(S,Ft,ft,W);R(Mt=>{ct.includes(Mt)&&Jt("Duplicate key on x-for",a),ct.push(Mt)},{scope:{index:ft,...Et}}),We.push(Et)});else for(let ft=0;ft<W.length;ft++){let Ft=Ju(S,W[ft],ft,W);R(Et=>{ct.includes(Et)&&Jt("Duplicate key on x-for",a),ct.push(Et)},{scope:{index:ft,...Ft}}),We.push(Ft)}let $t=[],Ct=[],Xt=[],Di=[];for(let ft=0;ft<ge.length;ft++){let Ft=ge[ft];ct.indexOf(Ft)===-1&&Xt.push(Ft)}ge=ge.filter(ft=>!Xt.includes(ft));let Or="template";for(let ft=0;ft<ct.length;ft++){let Ft=ct[ft],Et=ge.indexOf(Ft);if(Et===-1)ge.splice(ft,0,Ft),$t.push([Or,ft]);else if(Et!==ft){let Mt=ge.splice(ft,1)[0],Ti=ge.splice(Et-1,1)[0];ge.splice(ft,0,Ti),ge.splice(Et,0,Mt),Ct.push([Mt,Ti])}else Di.push(Ft);Or=Ft}for(let ft=0;ft<Xt.length;ft++){let Ft=Xt[ft];Ft in te&&(Re(()=>{kt(te[Ft]),te[Ft].remove()}),delete te[Ft])}for(let ft=0;ft<Ct.length;ft++){let[Ft,Et]=Ct[ft],Mt=te[Ft],Ti=te[Et],mr=document.createElement("div");Re(()=>{Ti||Jt('x-for ":key" is undefined or invalid',q,Et,te),Ti.after(mr),Mt.after(Ti),Ti._x_currentIfEl&&Ti.after(Ti._x_currentIfEl),mr.before(Mt),Mt._x_currentIfEl&&Mt.after(Mt._x_currentIfEl),mr.remove()}),Ti._x_refreshXForScope(We[ct.indexOf(Et)])}for(let ft=0;ft<$t.length;ft++){let[Ft,Et]=$t[ft],Mt=Ft==="template"?q:te[Ft];Mt._x_currentIfEl&&(Mt=Mt._x_currentIfEl);let Ti=We[Et],mr=ct[Et],kr=document.importNode(q.content,!0).firstElementChild,Un=N(Ti);ne(kr,Un,q),kr._x_refreshXForScope=Ls=>{Object.entries(Ls).forEach(([Ms,Bn])=>{Un[Ms]=Bn})},Re(()=>{Mt.after(kr),re(()=>mt(kr))()}),typeof mr=="object"&&Jt("x-for key cannot be an object, it must be a string or an integer",q),te[mr]=kr}for(let ft=0;ft<Di.length;ft++)te[Di[ft]]._x_refreshXForScope(We[ct.indexOf(Di[ft])]);q._x_prevKeys=ct})}function bg(a){let S=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,k=/^\s*\(|\)\s*$/g,R=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,j=a.match(R);if(!j)return;let q={};q.items=j[2].trim();let W=j[1].replace(k,"").trim(),te=W.match(S);return te?(q.item=W.replace(S,"").trim(),q.index=te[1].trim(),te[2]&&(q.collection=te[2].trim())):q.item=W,q}function Ju(a,S,k,R){let j={};return/^\[.*\]$/.test(a.item)&&Array.isArray(S)?a.item.replace("[","").replace("]","").split(",").map(W=>W.trim()).forEach((W,te)=>{j[W]=S[te]}):/^\{.*\}$/.test(a.item)&&!Array.isArray(S)&&typeof S=="object"?a.item.replace("{","").replace("}","").split(",").map(W=>W.trim()).forEach(W=>{j[W]=S[W]}):j[a.item]=S,a.index&&(j[a.index]=k),a.collection&&(j[a.collection]=R),j}function wg(a){return!Array.isArray(a)&&!isNaN(a)}function Qu(){}Qu.inline=(a,{expression:S},{cleanup:k})=>{let R=Ye(a);R._x_refs||(R._x_refs={}),R._x_refs[S]=a,k(()=>delete R._x_refs[S])},ee("ref",Qu),ee("if",(a,{expression:S},{effect:k,cleanup:R})=>{a.tagName.toLowerCase()!=="template"&&Jt("x-if can only be used on a <template> tag",a);let j=ri(a,S),q=()=>{if(a._x_currentIfEl)return a._x_currentIfEl;let te=a.content.cloneNode(!0).firstElementChild;return ne(te,{},a),Re(()=>{a.after(te),re(()=>mt(te))()}),a._x_currentIfEl=te,a._x_undoIf=()=>{Re(()=>{kt(te),te.remove()}),delete a._x_currentIfEl},te},W=()=>{a._x_undoIf&&(a._x_undoIf(),delete a._x_undoIf)};k(()=>j(te=>{te?q():W()})),R(()=>a._x_undoIf&&a._x_undoIf())}),ee("id",(a,{expression:S},{evaluate:k})=>
7{k(S).forEach(j=>og(a,j))}),gt((a,S)=>{a._x_ids&&(S._x_ids=a._x_ids)}),Ge(xe("@",Ue(G("on:")))),ee("on",re((a,{value:S,modifiers:k,expression:R},{cleanup:j})=>{let q=R?ri(a,R):()=>{};a.tagName.toLowerCase()==="template"&&(a._x_forwardEvents||(a._x_forwardEvents=[]),a._x_forwardEvents.includes(S)||a._x_forwardEvents.push(S));let W=Ja(a,S,k,te=>{q(()=>{},{scope:{$event:te},params:[te]})});j(()=>W())})),So("Collapse","collapse","collapse"),So("Intersect","intersect","intersect"),So("Focus","trap","focus"),So("Mask","mask","mask");function So(a,S,k){ee(S,R=>Jt(`You can't use [x-${S}] without first installing the "${a}" plugin here: https://alpinejs.dev/plugins/${k}`,R))}jn.setEvaluator(Sr),jn.setRawEvaluator(B),jn.setReactivityEngine({reactive:_o.reactive,effect:_o.effect,release:_o.stop,raw:_o.toRaw});var Zu=jn,_g=Zu}}),qg=Qr({"node_modules/@alpinejs/collapse/dist/module.cjs.js"(t,e){var i=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,o=(g,d)=>{for(var u in d)i(g,u,{get:d[u],enumerable:!0})},l=(g,d,u,w)=>{if(d&&typeof d=="object"||typeof d=="function")for(let h of n(d))!s.call(g,h)&&h!==u&&i(g,h,{get:()=>d[h],enumerable:!(w=r(d,h))||w.enumerable});return g},_=g=>l(i({},"__esModule",{value:!0}),g),b={};o(b,{collapse:()=>m,default:()=>T}),e.exports=_(b);function m(g){g.directive("collapse",d),d.inline=(u,{modifiers:w})=>{w.includes("min")&&(u._x_doShow=()=>{},u._x_doHide=()=>{})};function d(u,{modifiers:w}){let h=y(w,"duration",250)/1e3,p=y(w,"min",0),c=!w.includes("min");u._x_isShown||(u.style.height=`${p}px`),!u._x_isShown&&c&&(u.hidden=!0),u._x_isShown||(u.style.overflow="hidden");let f=(E,C)=>{let O=g.setStyles(E,C);return C.height?()=>{}:O},v={transitionProperty:"height",transitionDuration:`${h}s`,transitionTimingFunction:"cubic-bezier(0.4, 0.0, 0.2, 1)"};u._x_transition={in(E=()=>{},C=()=>{}){c&&(u.hidden=!1),c&&(u.style.display=null);let O=u.getBoundingClientRect().height;u.style.height="auto";let A=u.getBoundingClientRect().height;O===A&&(O=p),g.transition(u,g.setStyles,{during:v,start:{height:O+"px"},end:{height:A+"px"}},()=>u._x_isShown=!0,()=>{Math.abs(u.getBoundingClientRect().height-A)<1&&(u.style.overflow=null)})},out(E=()=>{},C=()=>{}){let O=u.getBoundingClientRect().height;g.transition(u,f,{during:v,start:{height:O+"px"},end:{height:p+"px"}},()=>u.style.overflow="hidden",()=>{u._x_isShown=!1,u.style.height==`${p}px`&&c&&(u.style.display="none",u.hidden=!0)})}}}}function y(g,d,u){if(g.indexOf(d)===-1)return u;const w=g[g.indexOf(d)+1];if(!w)return u;if(d==="duration"){let h=w.match(/([0-9]+)ms/);if(h)return h[1]}if(d==="min"){let h=w.match(/([0-9]+)px/);if(h)return h[1]}return w}var T=m}}),Vg=Qr({"node_modules/@alpinejs/focus/dist/module.cjs.js"(t,e){var i=Object.create,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,o=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,_=(C,O)=>function(){return O||(0,C[s(C)[0]])((O={exports:{}}).exports,O),O.exports},b=(C,O)=>{for(var A in O)r(C,A,{get:O[A],enumerable:!0})},m=(C,O,A,I)=>{if(O&&typeof O=="object"||typeof O=="function")for(let N of s(O))!l.call(C,N)&&N!==A&&r(C,N,{get:()=>O[N],enumerable:!(I=n(O,N))||I.enumerable});return C},y=(C,O,A)=>(A=C!=null?i(o(C)):{},m(!C||!C.__esModule?r(A,"default",{value:C,enumerable:!0}):A,C)),T=C=>m(r({},"__esModule",{value:!0}),C),g=_({"node_modules/tabbable/dist/index.js"(C){Object.defineProperty(C,"__esModule",{value:!0});var O=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],A=O.join(","),I=typeof Element>"u",N=I?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,D=!I&&Element.prototype.getRootNode?function(Re){return Re.getRootNode()}:function(Re){return Re.ownerDocument},U=function(le,we,Ze){var je=Array.prototype.slice.apply(le.querySelectorAll(A));return we&&N.call(le,A)&&je.unshift(le),je=je.filter(Ze),je},Q=function Re(le,we,Ze){for(var je=[],Tt=Array.from(le);Tt.length;){var Xe=Tt.shift();if(Xe.tagName==="SLOT"){var ne=Xe.assignedElements(),me=ne.length?ne:Xe.children,Ne=Re(me,!0,Ze);Ze.flatten?je.push.apply(je,Ne):je.push({scope:Xe,candidates:Ne})}else{var vt=N.call(Xe,A);
vendor: 3,049 bytes, line 7
7vt&&Ze.filter(Xe)&&(we||!le.includes(Xe))&&je.push(Xe);var it=Xe.shadowRoot||typeof Ze.getShadowRoot=="function"&&Ze.getShadowRoot(Xe),pt=!Ze.shadowRootFilter||Ze.shadowRootFilter(Xe);if(it&&pt){var Dt=Re(it===!0?Xe.children:it.children,!0,Ze);Ze.flatten?je.push.apply(je,Dt):je.push({scope:Xe,candidates:Dt})}else Tt.unshift.apply(Tt,Xe.children)}}return je},he=function(le,we){return le.tabIndex<0&&(we||/^(AUDIO|VIDEO|DETAILS)$/.test(le.tagName)||le.isContentEditable)&&isNaN(parseInt(le.getAttribute("tabindex"),10))?0:le.tabIndex},se=function(le,we){return le.tabIndex===we.tabIndex?le.documentOrder-we.documentOrder:le.tabIndex-we.tabIndex},fe=function(le){return le.tagName==="INPUT"},pe=function(le){return fe(le)&&le.type==="hidden"},st=function(le){var we=le.tagName==="DETAILS"&&Array.prototype.slice.apply(le.children).some(function(Ze){return Ze.tagName==="SUMMARY"});return we},Ee=function(le,we){for(var Ze=0;Ze<le.length;Ze++)if(le[Ze].checked&&le[Ze].form===we)return le[Ze]},oe=function(le){if(!le.name)return!0;var we=le.form||D(le),Ze=function(ne){return we.querySelectorAll('input[type="radio"][name="'+ne+'"]')},je;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")je=Ze(window.CSS.escape(le.name));else try{je=Ze(le.name)}catch(Xe){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",Xe.message),!1}var Tt=Ee(je,le.form);return!Tt||Tt===le},_e=function(le){return fe(le)&&le.type==="radio"},Ce=function(le){return _e(le)&&!oe(le)},ke=function(le){var we=le.getBoundingClientRect(),Ze=we.width,je=we.height;return Ze===0&&je===0},ae=function(le,we){var Ze=we.displayCheck,je=we.getShadowRoot;if(getComputedStyle(le).visibility==="hidden")return!0;var Tt=N.call(le,"details>summary:first-of-type"),Xe=Tt?le.parentElement:le;if(N.call(Xe,"details:not([open]) *"))return!0;var ne=D(le).host,me=ne?.ownerDocument.contains(ne)||le.ownerDocument.contains(le);if(!Ze||Ze==="full"){if(typeof je=="function"){for(var Ne=le;le;){var vt=le.parentElement,it=D(le);if(vt&&!vt.shadowRoot&&je(vt)===!0)return ke(le);le.assignedSlot?le=le.assignedSlot:!vt&&it!==le.ownerDocument?le=it.host:le=vt}le=Ne}if(me)return!le.getClientRects().length}else if(Ze==="non-zero-area")return ke(le);return!1},K=function(le){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(le.tagName))for(var we=le.parentElement;we;){if(we.tagName==="FIELDSET"&&we.disabled){for(var Ze=0;Ze<we.children.length;Ze++){var je=we.children.item(Ze);if(je.tagName==="LEGEND")return N.call(we,"fieldset[disabled] *")?!0:!je.contains(le)}return!0}we=we.parentElement}return!1},ve=function(le,we){return!(we.disabled||pe(we)||ae(we,le)||st(we)||K(we))},Le=function(le,we){return!(Ce(we)||he(we)<0||!ve(le,we))},tt=function(le){var we=parseInt(le.getAttribute("tabindex"),10);return!!(isNaN(we)||we>=0)},at=function Re(le){var we=[],Ze=[];return le.forEach(function(je,Tt){var Xe=!!je.scope,ne=Xe?je.scope:je,me=he(ne,Xe),Ne=Xe?Re(je.candidates):ne;
7me===0?Xe?we.push.apply(we,Ne):we.push(ne):Ze.push({documentOrder:Tt,tabIndex:me,item:je,isScope:Xe,content:Ne})}),Ze.sort(se).reduce(function(je,Tt){return Tt.isScope?je.push.apply(je,Tt.content):je.push(Tt.content),je},[]).concat(we)},ut=function(le,we){we=we||{};var Ze;return we.getShadowRoot?Ze=Q([le],we.includeContainer,{filter:Le.bind(null,we),flatten:!1,getShadowRoot:we.getShadowRoot,shadowRootFilter:tt}):Ze=U(le,we.includeContainer,Le.bind(null,we)),at(Ze)},ht=function(le,we){we=we||{};var Ze;return we.getShadowRoot?Ze=Q([le],we.includeContainer,{filter:ve.bind(null,we),flatten:!0,getShadowRoot:we.getShadowRoot}):Ze=U(le,we.includeContainer,ve.bind(null,we)),Ze},bt=function(le,we){if(we=we||{},!le)throw new Error("No node provided");return N.call(le,A)===!1?!1:Le(we,le)},wt=O.concat("iframe").join(","),zt=function(le,we){if(we=we||{},!le)throw new Error("No node provided");return N.call(le,wt)===!1?!1:ve(we,le)};C.focusable=ht,C.isFocusable=zt,C.isTabbable=bt,C.tabbable=ut}}),d=_({"node_modules/focus-trap/dist/focus-trap.js"(C){Object.defineProperty(C,"__esModule",{value:!0});var O=g();function A(oe,_e){var Ce=Object.keys(oe);if(Object.getOwnPropertySymbols){var ke=Object.getOwnPropertySymbols(oe);_e&&(ke=ke.filter(function(ae){return Object.getOwnPropertyDescriptor(oe,ae).enumerable})),Ce.push.apply(Ce,ke)}return Ce}function I(oe){for(var _e=1;_e<arguments.length;_e++){var Ce=arguments[_e]!=null?arguments[_e]:{};_e%2?A(Object(Ce),!0).forEach(function(ke){N(oe,ke,Ce[ke])}):Object.getOwnPropertyDescriptors?Object.defineProperties(oe,Object.getOwnPropertyDescriptors(Ce)):A(Object(Ce)).forEach(function(ke){Object.defineProperty(oe,ke,Object.getOwnPropertyDescriptor(Ce,ke))})}return oe}function N(oe,_e,Ce){return _e in oe?Object.defineProperty(oe,_e,{value:Ce,enumerable:!0,configurable:!0,writable:!0}):oe[_e]=Ce,oe}var D=(function(){var oe=[];return{activateTrap:function(Ce){if(oe.length>0){var ke=oe[oe.length-1];ke!==Ce&&ke.pause()}var ae=oe.indexOf(Ce);ae===-1||oe.splice(ae,1),oe.push(Ce)},deactivateTrap:function(Ce){var ke=oe.indexOf(Ce);ke!==-1&&oe.splice(ke,1),oe.length>0&&oe[oe.length-1].unpause()}}})(),U=function(_e){return _e.tagName&&_e.tagName.toLowerCase()==="input"&&typeof _e.select=="function"},Q=function(_e){return _e.key==="Escape"||_e.key==="Esc"||_e.keyCode===27},he=function(_e){return _e.key==="Tab"||_e.keyCode===9},se=function(_e){return setTimeout(_e,0)},fe=function(_e,Ce){var ke=-1;return _e.every(function(ae,K){return Ce(ae)?(ke=K,!1):!0}),ke},pe=function(_e){for(var Ce=arguments.length,ke=new Array(Ce>1?Ce-1:0),ae=1;ae<Ce;ae++)ke[ae-1]=arguments[ae];return typeof _e=="function"?_e.apply(void 0,ke):_e},st=function(_e){return _e.target.shadowRoot&&typeof _e.composedPath=="function"?_e.composedPath()[0]:_e.target},Ee=function(_e,Ce){var ke=Ce?.document||document,ae=I({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},Ce),K={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},ve,Le=function(ne,me,Ne){return ne&&ne[me]!==void 0?ne[me]:ae[Ne||me]},tt=function(ne){return K.containerGroups.findIndex(function(me){var Ne=me.container,vt=me.tabbableNodes;return Ne.contains(ne)||vt.find(function(it){return it===ne})})},at=function(ne){var me=ae[ne];if(typeof me=="function"){for(var Ne=arguments.length,vt=new Array(Ne>1?Ne-1:0),it=1;it<Ne;it++)vt[it-1]=arguments[it];me=me.apply(void 0,vt)}if(me===!0&&(me=void 0),!me){if(me===void 0||me===!1)return me;throw new Error("`".concat(ne,"` was specified but was not a node, or did not return a node"))}var pt=me;if(typeof me=="string"&&(pt=ke.querySelector(me),!pt))throw new Error("`".concat(ne,"` as selector refers to no known node"));return pt},ut=function(){var ne=at("initialFocus");if(ne===!1)return!1;if(ne===void 0)if(tt(ke.activeElement)>=0)ne=ke.activeElement;else{var me=K.tabbableGroups[0],Ne=me&&me.firstTabbableNode;ne=Ne||at("fallbackFocus")}if(!ne)throw new Error("Your focus-trap needs to have at least one focusable element");return ne},ht=function(){if(K.containerGroups=K.containers.map(function(ne){var me=O.tabbable(ne,ae.tabbableOptions),Ne=O.focusable(ne,ae.tabbableOptions);return{container:ne,tabbableNodes:me,focusableNodes:Ne,firstTabbableNode:me.length>0?me[0]:null,lastTabbableNode:me.length>0?me[me.length-1]:null,nextTabbableNode:function(it){var pt=arguments.length>
71&&arguments[1]!==void 0?arguments[1]:!0,Dt=Ne.findIndex(function(pi){return pi===it});if(!(Dt<0))return pt?Ne.slice(Dt+1).find(function(pi){return O.isTabbable(pi,ae.tabbableOptions)}):Ne.slice(0,Dt).reverse().find(function(pi){return O.isTabbable(pi,ae.tabbableOptions)})}}}),K.tabbableGroups=K.containerGroups.filter(function(ne){return ne.tabbableNodes.length>0}),K.tabbableGroups.length<=0&&!at("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},bt=function Xe(ne){if(ne!==!1&&ne!==ke.activeElement){if(!ne||!ne.focus){Xe(ut());return}ne.focus({preventScroll:!!ae.preventScroll}),K.mostRecentlyFocusedNode=ne,U(ne)&&ne.select()}},wt=function(ne){var me=at("setReturnFocus",ne);return me||(me===!1?!1:ne)},zt=function(ne){var me=st(ne);if(!(tt(me)>=0)){if(pe(ae.clickOutsideDeactivates,ne)){ve.deactivate({returnFocus:ae.returnFocusOnDeactivate&&!O.isFocusable(me,ae.tabbableOptions)});return}pe(ae.allowOutsideClick,ne)||ne.preventDefault()}},Re=function(ne){var me=st(ne),Ne=tt(me)>=0;Ne||me instanceof Document?Ne&&(K.mostRecentlyFocusedNode=me):(ne.stopImmediatePropagation(),bt(K.mostRecentlyFocusedNode||ut()))},le=function(ne){var me=st(ne);ht();var Ne=null;if(K.tabbableGroups.length>0){var vt=tt(me),it=vt>=0?K.containerGroups[vt]:void 0;if(vt<0)ne.shiftKey?Ne=K.tabbableGroups[K.tabbableGroups.length-1].lastTabbableNode:Ne=K.tabbableGroups[0].firstTabbableNode;else if(ne.shiftKey){var pt=fe(K.tabbableGroups,function(ii){var Xi=ii.firstTabbableNode;return me===Xi});if(pt<0&&(it.container===me||O.isFocusable(me,ae.tabbableOptions)&&!O.isTabbable(me,ae.tabbableOptions)&&!it.nextTabbableNode(me,!1))&&(pt=vt),pt>=0){var Dt=pt===0?K.tabbableGroups.length-1:pt-1,pi=K.tabbableGroups[Dt];Ne=pi.lastTabbableNode}}else{var ui=fe(K.tabbableGroups,function(ii){var Xi=ii.lastTabbableNode;return me===Xi});if(ui<0&&(it.container===me||O.isFocusable(me,ae.tabbableOptions)&&!O.isTabbable(me,ae.tabbableOptions)&&!it.nextTabbableNode(me))&&(ui=vt),ui>=0){var Mi=ui===K.tabbableGroups.length-1?0:ui+1,oi=K.tabbableGroups[Mi];Ne=oi.firstTabbableNode}}}else Ne=at("fallbackFocus");Ne&&(ne.preventDefault(),bt(Ne))},we=function(ne){if(Q(ne)&&pe(ae.escapeDeactivates,ne)!==!1){ne.preventDefault(),ve.deactivate();return}if(he(ne)){le(ne);return}},Ze=function(ne){var me=st(ne);tt(me)>=0||pe(ae.clickOutsideDeactivates,ne)||pe(ae.allowOutsideClick,ne)||(ne.preventDefault(),ne.stopImmediatePropagation())},je=function(){if(K.active)return D.activateTrap(ve),K.delayInitialFocusTimer=ae.delayInitialFocus?se(function(){bt(ut())}):bt(ut()),ke.addEventListener("focusin",Re,!0),ke.addEventListener("mousedown",zt,{capture:!0,passive:!1}),ke.addEventListener("touchstart",zt,{capture:!0,passive:!1}),ke.addEventListener("click",Ze,{capture:!0,passive:!1}),ke.addEventListener("keydown",we,{capture:!0,passive:!1}),ve},Tt=function(){if(K.active)return ke.removeEventListener("focusin",Re,!0),ke.removeEventListener("mousedown",zt,!0),ke.removeEventListener("touchstart",zt,!0),ke.removeEventListener("click",Ze,!0),ke.removeEventListener("keydown",we,!0),ve};return ve={get active(){return K.active},get paused(){return K.paused},activate:function(ne){if(K.active)return this;var me=Le(ne,"onActivate"),Ne=Le(ne,"onPostActivate"),vt=Le(ne,"checkCanFocusTrap");vt||ht(),K.active=!0,K.paused=!1,K.nodeFocusedBeforeActivation=ke.activeElement,me&&me();var it=function(){vt&&ht(),je(),Ne&&Ne()};return vt?(vt(K.containers.concat()).then(it,it),this):(it(),this)},deactivate:function(ne){if(!K.active)return this;var me=I({onDeactivate:ae.onDeactivate,onPostDeactivate:ae.onPostDeactivate,checkCanReturnFocus:ae.checkCanReturnFocus},ne);clearTimeout(K.delayInitialFocusTimer),K.delayInitialFocusTimer=void 0,Tt(),K.active=!1,K.paused=!1,D.deactivateTrap(ve);var Ne=Le(me,"onDeactivate"),vt=Le(me,"onPostDeactivate"),it=Le(me,"checkCanReturnFocus"),pt=Le(me,"returnFocus","returnFocusOnDeactivate");Ne&&Ne();var Dt=function(){se(function(){pt&&bt(wt(K.nodeFocusedBeforeActivation)),vt&&vt()})};return pt&&it?(it(wt(K.nodeFocusedBeforeActivation)).then(Dt,Dt),this):(Dt(),this)},pause:function(){return K.paused||!K.active?this:(K.paused=!0,Tt(),this)},unpause:function(){return!K.paused||!K.active?this:(K.paused=!1,ht(),je(),this)},updateContainerElements:function(ne){var me=[].concat(ne).filter(
7Boolean);return K.containers=me.map(function(Ne){return typeof Ne=="string"?ke.querySelector(Ne):Ne}),K.active&&ht(),this}},ve.updateContainerElements(_e),ve};C.createFocusTrap=Ee}}),u={};b(u,{default:()=>E,focus:()=>p}),e.exports=T(u);var w=y(d()),h=y(g());function p(C){let O,A;window.addEventListener("focusin",()=>{O=A,A=document.activeElement}),C.magic("focus",I=>{let N=I;return{__noscroll:!1,__wrapAround:!1,within(D){return N=D,this},withoutScrolling(){return this.__noscroll=!0,this},noscroll(){return this.__noscroll=!0,this},withWrapAround(){return this.__wrapAround=!0,this},wrap(){return this.withWrapAround()},focusable(D){return(0,h.isFocusable)(D)},previouslyFocused(){return O},lastFocused(){return O},focused(){return A},focusables(){return Array.isArray(N)?N:(0,h.focusable)(N,{displayCheck:"none"})},all(){return this.focusables()},isFirst(D){let U=this.all();return U[0]&&U[0].isSameNode(D)},isLast(D){let U=this.all();return U.length&&U.slice(-1)[0].isSameNode(D)},getFirst(){return this.all()[0]},getLast(){return this.all().slice(-1)[0]},getNext(){let D=this.all(),U=document.activeElement;if(D.indexOf(U)!==-1)return this.__wrapAround&&D.indexOf(U)===D.length-1?D[0]:D[D.indexOf(U)+1]},getPrevious(){let D=this.all(),U=document.activeElement;if(D.indexOf(U)!==-1)return this.__wrapAround&&D.indexOf(U)===0?D.slice(-1)[0]:D[D.indexOf(U)-1]},first(){this.focus(this.getFirst())},last(){this.focus(this.getLast())},next(){this.focus(this.getNext())},previous(){this.focus(this.getPrevious())},prev(){return this.previous()},focus(D){D&&setTimeout(()=>{D.hasAttribute("tabindex")||D.setAttribute("tabindex","0"),D.focus({preventScroll:this.__noscroll})})}}}),C.directive("trap",C.skipDuringClone((I,{expression:N,modifiers:D},{effect:U,evaluateLater:Q,cleanup:he})=>{let se=Q(N),fe=!1,pe={escapeDeactivates:!1,allowOutsideClick:!0,fallbackFocus:()=>I},st=()=>{};if(D.includes("noautofocus"))pe.initialFocus=!1;else{let Ce=I.querySelector("[autofocus]");Ce&&(pe.initialFocus=Ce)}D.includes("inert")&&(pe.onPostActivate=()=>{C.nextTick(()=>{st=c(I)})});let Ee=(0,w.createFocusTrap)(I,pe),oe=()=>{};const _e=()=>{st(),st=()=>{},oe(),oe=()=>{},Ee.deactivate({returnFocus:!D.includes("noreturn")})};U(()=>se(Ce=>{fe!==Ce&&(Ce&&!fe&&(D.includes("noscroll")&&(oe=v()),setTimeout(()=>{Ee.activate()},15)),!Ce&&fe&&_e(),fe=!!Ce)})),he(_e)},(I,{expression:N,modifiers:D},{evaluate:U})=>{D.includes("inert")&&U(N)&&c(I)}))}function c(C){let O=[];return f(C,A=>{let I=A.hasAttribute("aria-hidden");A.setAttribute("aria-hidden","true"),O.push(()=>I||A.removeAttribute("aria-hidden"))}),()=>{for(;O.length;)O.pop()()}}function f(C,O){C.isSameNode(document.body)||!C.parentNode||Array.from(C.parentNode.children).forEach(A=>{A.isSameNode(C)?f(C.parentNode,O):O(A)})}function v(){let C=document.documentElement.style.overflow,O=document.documentElement.style.paddingRight,A=window.innerWidth-document.documentElement.clientWidth;return document.documentElement.style.overflow="hidden",document.documentElement.style.paddingRight=`${A}px`,()=>{document.documentElement.style.overflow=C,document.documentElement.style.paddingRight=O}}var E=p}}),Hg=Qr({"node_modules/@alpinejs/intersect/dist/module.cjs.js"(t,e){var i=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,o=(u,w)=>{for(var h in w)i(u,h,{get:w[h],enumerable:!0})},l=(u,w,h,p)=>{if(w&&typeof w=="object"||typeof w=="function")for(let c of n(w))!s.call(u,c)&&c!==h&&i(u,c,{get:()=>w[c],enumerable:!(p=r(w,c))||p.enumerable});return u},_=u=>l(i({},"__esModule",{value:!0}),u),b={};o(b,{default:()=>d,intersect:()=>m}),e.exports=_(b);function m(u){u.directive("intersect",u.skipDuringClone((w,{value:h,expression:p,modifiers:c},{evaluateLater:f,cleanup:v})=>{let E=f(p),C={rootMargin:g(c),threshold:y(c)},O=new IntersectionObserver(A=>{A.forEach(I=>{I.isIntersecting!==(h==="leave")&&(E(),c.includes("once")&&O.disconnect())})},C);O.observe(w),v(()=>{O.disconnect()})}))}function y(u){if(u.includes("full"))return .99;if(u.includes("half"))return .5;if(!u.includes("threshold"))return 0;let w=u[u.indexOf("threshold")+1];return w==="100"?1:w==="0"?0:+`.${w}`}function T(u){let w=u.match(/^(-?[0-9]+)(px|%)?$/);return w?w[1]+(w[2]||"px"):void 0}function g(u){const w="margin",h="0px 0px 0px 0px",p=u.indexOf(w);if(p===-1)return h;let c=[];for(let f=1;f<5;f++)c.push(T(u[p+f]||""));return c=c.filter(f=>f!==void 0),c.length?c.join(" ").trim():h}var d=m}}),zg=Qr({"node_modules/@alpinejs/resize/dist/module.cjs.js"(t,e){var i=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,o=(h,p)=>{for(var c in p)i(h,c,{get:p[c],enumerable:!0})},l=(h,p,c,f)=>{if(p&&typeof p=="object"||typeof p=="function")for(let v of n(p))!s.call(h,v)&&v!==c&&i(h,v,{get:()=>p[v],enumerable:!(f=r(p,v))||f.enumerable});return h},_=h=>l(i({},"__esModule",{value:!0}),h),b={};o(b,{default:()=>w,resize:()=>m}),e.exports=_(b);function m(h){h.directive("resize",h.skipDuringClone((p,{value:c,expression:f,modifiers:v},{evaluateLater:E,cleanup:C})=>{let O=E(f),A=(N,D)=>{O(()=>{}
7,{scope:{$width:N,$height:D}})},I=v.includes("document")?d(A):y(p,A);C(()=>I())}))}function y(h,p){let c=new ResizeObserver(f=>{let[v,E]=u(f);p(v,E)});return c.observe(h),()=>c.disconnect()}var T,g=new Set;function d(h){return g.add(h),T||(T=new ResizeObserver(p=>{let[c,f]=u(p);g.forEach(v=>v(c,f))}),T.observe(document.documentElement)),()=>{g.delete(h)}}function u(h){let p,c;for(let f of h)p=f.borderBoxSize[0].inlineSize,c=f.borderBoxSize[0].blockSize;return[p,c]}var w=m}}),Wg=Qr({"node_modules/@alpinejs/anchor/dist/module.cjs.js"(t,e){var i=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,o=(x,P)=>{for(var B in P)i(x,B,{get:P[B],enumerable:!0})},l=(x,P,B,H)=>{if(P&&typeof P=="object"||typeof P=="function")for(let G of n(P))!s.call(x,G)&&G!==B&&i(x,G,{get:()=>P[G],enumerable:!(H=r(P,G))||H.enumerable});return x},_=x=>l(i({},"__esModule",{value:!0}),x),b={};o(b,{anchor:()=>tn,default:()=>z}),e.exports=_(b);var m=Math.min,y=Math.max,T=Math.round,g=Math.floor,d=x=>({x,y:x}),u={left:"right",right:"left",bottom:"top",top:"bottom"},w={start:"end",end:"start"};function h(x,P,B){return y(x,m(P,B))}function p(x,P){return typeof x=="function"?x(P):x}function c(x){return x.split("-")[0]}function f(x){return x.split("-")[1]}function v(x){return x==="x"?"y":"x"}function E(x){return x==="y"?"height":"width"}function C(x){return["top","bottom"].includes(c(x))?"y":"x"}function O(x){return v(C(x))}function A(x,P,B){B===void 0&&(B=!1);const H=f(x),G=O(x),X=E(G);let ie=G==="x"?H===(B?"end":"start")?"right":"left":H==="start"?"bottom":"top";return P.reference[X]>P.floating[X]&&(ie=Q(ie)),[ie,Q(ie)]}function I(x){const P=Q(x);return[N(x),P,N(P)]}function N(x){return x.replace(/start|end/g,P=>w[P])}function D(x,P,B){const H=["left","right"],G=["right","left"],X=["top","bottom"],ie=["bottom","top"];switch(x){case"top":case"bottom":return B?P?G:H:P?H:G;case"left":case"right":return P?X:ie;default:return[]}}function U(x,P,B,H){const G=f(x);let X=D(c(x),B==="start",H);return G&&(X=X.map(ie=>ie+"-"+G),P&&(X=X.concat(X.map(N)))),X}function Q(x){return x.replace(/left|right|bottom|top/g,P=>u[P])}function he(x){return{top:0,right:0,bottom:0,left:0,...x}}function se(x){return typeof x!="number"?he(x):{top:x,right:x,bottom:x,left:x}}function fe(x){return{...x,top:x.y,left:x.x,right:x.x+x.width,bottom:x.y+x.height}}function pe(x,P,B){let{reference:H,floating:G}=x;const X=C(P),ie=O(P),ee=E(ie),be=c(P),Te=X==="y",qe=H.x+H.width/2-G.width/2,He=H.y+H.height/2-G.height/2,Ve=H[ee]/2-G[ee]/2;let De;switch(be){case"top":De={x:qe,y:H.y-G.height};break;case"bottom":De={x:qe,y:H.y+H.height};break;case"right":De={x:H.x+H.width,y:He};break;case"left":De={x:H.x-G.width,y:He};break;default:De={x:H.x,y:H.y}}switch(f(P)){case"start":De[ie]-=Ve*(B&&Te?-1:1);break;case"end":De[ie]+=Ve*(B&&Te?-1:1);break}return De}var st=async(x,P,B)=>{const{placement:H="bottom",strategy:G="absolute",middleware:X=[],platform:ie}=B,ee=X.filter(Boolean),be=await(ie.isRTL==null?void 0:ie.isRTL(P));let Te=await ie.getElementRects({reference:x,floating:P,strategy:G}),{x:qe,y:He}=pe(Te,H,be),Ve=H,De={},Ae=0;for(let Pe=0;Pe<ee.length;Pe++){const{name:ze,fn:xe}=ee[Pe],{x:Ue,y:Y,data:At,reset:Ge}=await xe({x:qe,y:He,initialPlacement:H,placement:Ve,strategy:G,middlewareData:De,rects:Te,platform:ie,elements:{reference:x,floating:P}});if(qe=Ue??qe,He=Y??He,De={...De,[ze]:{...De[ze],...At}},Ge&&Ae<=50){Ae++,typeof Ge=="object"&&(Ge.placement&&(Ve=Ge.placement),Ge.rects&&(Te=Ge.rects===!0?await ie.getElementRects({reference:x,floating:P,strategy:G}):Ge.rects),{x:qe,y:He}=pe(Te,Ve,be)),Pe=-1;continue}}return{x:qe,y:He,placement:Ve,strategy:G,middlewareData:De}};async function Ee(x,P){var B;P===void 0&&(P={});const{x:H,y:G,platform:X,rects:ie,elements:ee,strategy:be}=x,{boundary:Te="clippingAncestors",rootBoundary:qe="viewport",elementContext:He="floating",altBoundary:Ve=!1,padding:De=0}=p(P,x),Ae=se(De),ze=ee[Ve?He==="floating"?"reference":"floating":He],xe=fe(await X.getClippingRect({element:(B=await(X.isElement==null?void 0:X.isElement(ze)))==null||B?ze:ze.contextElement||await(X.getDocumentElement==null?void 0:X.getDocumentElement(ee.floating)),boundary:Te,rootBoundary:qe,strategy:be})),Ue=He==="floating"?{...ie.floating,x:H,y:G}:ie.reference,Y=await(X.getOffsetParent==null?void 0:X.getOffsetParent(ee.floating)),At=await(X.isElement==null?void 0:X.isElement(Y))?await(X.getScale==null?void 0:X.getScale(Y))||{x:1,y:1}:{x:1,y:1},Ge=fe(X.convertOffsetParentRelativeRectToViewportRelativeRect?await X.convertOffsetParentRelativeRectToViewportRelativeRect({rect:Ue,offsetParent:Y,strategy:be}):Ue);return{top:(xe.top-Ge.top+Ae.top)/At.y,bottom:(Ge.bottom-xe.bottom+Ae.bottom)/At.
vendor: 8,766 bytes, line 7
7y,left:(xe.left-Ge.left+Ae.left)/At.x,right:(Ge.right-xe.right+Ae.right)/At.x}}var oe=function(x){return x===void 0&&(x={}),{name:"flip",options:x,async fn(P){var B,H;const{placement:G,middlewareData:X,rects:ie,initialPlacement:ee,platform:be,elements:Te}=P,{mainAxis:qe=!0,crossAxis:He=!0,fallbackPlacements:Ve,fallbackStrategy:De="bestFit",fallbackAxisSideDirection:Ae="none",flipAlignment:Pe=!0,...ze}=p(x,P);if((B=X.arrow)!=null&&B.alignmentOffset)return{};const xe=c(G),Ue=c(ee)===ee,Y=await(be.isRTL==null?void 0:be.isRTL(Te.floating)),At=Ve||(Ue||!Pe?[Q(ee)]:I(ee));!Ve&&Ae!=="none"&&At.push(...U(ee,Pe,Ae,Y));const Ge=[ee,...At],mi=await Ee(P,ze),wi=[];let Oi=((H=X.flip)==null?void 0:H.overflows)||[];if(qe&&wi.push(mi[xe]),He){const Wt=A(G,ie,Y);wi.push(mi[Wt[0]],mi[Wt[1]])}if(Oi=[...Oi,{placement:G,overflows:wi}],!wi.every(Wt=>Wt<=0)){var Ii,_i;const Wt=(((Ii=X.flip)==null?void 0:Ii.index)||0)+1,li=Ge[Wt];if(li)return{data:{index:Wt,overflows:Oi},reset:{placement:li}};let Jt=(_i=Oi.filter(F=>F.overflows[0]<=0).sort((F,L)=>F.overflows[1]-L.overflows[1])[0])==null?void 0:_i.placement;if(!Jt)switch(De){case"bestFit":{var gi;const F=(gi=Oi.map(L=>[L.placement,L.overflows.filter(V=>V>0).reduce((V,ce)=>V+ce,0)]).sort((L,V)=>L[1]-V[1])[0])==null?void 0:gi[0];F&&(Jt=F);break}case"initialPlacement":Jt=ee;break}if(G!==Jt)return{reset:{placement:Jt}}}return{}}}};async function _e(x,P){const{placement:B,platform:H,elements:G}=x,X=await(H.isRTL==null?void 0:H.isRTL(G.floating)),ie=c(B),ee=f(B),be=C(B)==="y",Te=["left","top"].includes(ie)?-1:1,qe=X&&be?-1:1,He=p(P,x);let{mainAxis:Ve,crossAxis:De,alignmentAxis:Ae}=typeof He=="number"?{mainAxis:He,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...He};return ee&&typeof Ae=="number"&&(De=ee==="end"?Ae*-1:Ae),be?{x:De*qe,y:Ve*Te}:{x:Ve*Te,y:De*qe}}var Ce=function(x){return x===void 0&&(x=0),{name:"offset",options:x,async fn(P){const{x:B,y:H}=P,G=await _e(P,x);return{x:B+G.x,y:H+G.y,data:G}}}},ke=function(x){return x===void 0&&(x={}),{name:"shift",options:x,async fn(P){const{x:B,y:H,placement:G}=P,{mainAxis:X=!0,crossAxis:ie=!1,limiter:ee={fn:ze=>{let{x:xe,y:Ue}=ze;return{x:xe,y:Ue}}},...be}=p(x,P),Te={x:B,y:H},qe=await Ee(P,be),He=C(c(G)),Ve=v(He);let De=Te[Ve],Ae=Te[He];if(X){const ze=Ve==="y"?"top":"left",xe=Ve==="y"?"bottom":"right",Ue=De+qe[ze],Y=De-qe[xe];De=h(Ue,De,Y)}if(ie){const ze=He==="y"?"top":"left",xe=He==="y"?"bottom":"right",Ue=Ae+qe[ze],Y=Ae-qe[xe];Ae=h(Ue,Ae,Y)}const Pe=ee.fn({...P,[Ve]:De,[He]:Ae});return{...Pe,data:{x:Pe.x-B,y:Pe.y-H}}}}};function ae(x){return Le(x)?(x.nodeName||"").toLowerCase():"#document"}function K(x){var P;return(x==null||(P=x.ownerDocument)==null?void 0:P.defaultView)||window}function ve(x){var P;return(P=(Le(x)?x.ownerDocument:x.document)||window.document)==null?void 0:P.documentElement}function Le(x){return x instanceof Node||x instanceof K(x).Node}function tt(x){return x instanceof Element||x instanceof K(x).Element}function at(x){return x instanceof HTMLElement||x instanceof K(x).HTMLElement}function ut(x){return typeof ShadowRoot>"u"?!1:x instanceof ShadowRoot||x instanceof K(x).ShadowRoot}function ht(x){const{overflow:P,overflowX:B,overflowY:H,display:G}=we(x);return/auto|scroll|overlay|hidden|clip/.test(P+H+B)&&!["inline","contents"].includes(G)}function bt(x){return["table","td","th"].includes(ae(x))}function wt(x){const P=Re(),B=we(x);return B.transform!=="none"||B.perspective!=="none"||(B.containerType?B.containerType!=="normal":!1)||!P&&(B.backdropFilter?B.backdropFilter!=="none":!1)||!P&&(B.filter?B.filter!=="none":!1)||["transform","perspective","filter"].some(H=>(B.willChange||"").includes(H))||["paint","layout","strict","content"].some(H=>(B.contain||"").includes(H))}function zt(x){let P=je(x);for(;at(P)&&!le(P);){if(wt(P))return P;P=je(P)}return null}function Re(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function le(x){return["html","body","#document"].includes(ae(x))}function we(x){return K(x).getComputedStyle(x)}function Ze(x){return tt(x)?{scrollLeft:x.scrollLeft,scrollTop:x.scrollTop}:{scrollLeft:x.pageXOffset,scrollTop:x.pageYOffset}}function je(x){if(ae(x)==="html")return x;const P=x.assignedSlot||x.parentNode||ut(x)&&x.host||ve(x);return ut(P)?P.host:P}function Tt(x){const P=je(x);return le(P)?x.ownerDocument?x.ownerDocument.body:x.body:at(P)&&ht(P)?P:Tt(P)}function Xe(x,P,B){var H;P===void 0&&(P=[]),B===void 0&&(B=!0);const G=Tt(x),X=G===((H=x.ownerDocument)==null?void 0:H.body),ie=K(G);return X?P.concat(ie,ie.visualViewport||[],ht(G)?G:[],ie.frameElement&&B?Xe(ie.frameElement):[]):P.concat(G,Xe(G,[],B))}function ne(x){const P=we(x);let B=parseFloat(P.width)||0,H=parseFloat(P.height)||0;const G=at(x),X=G?x.offsetWidth:B,ie=G?x.offsetHeight:H,ee=T(B)!==X||T(H)!==ie;return ee&&(B=X,H=ie),{width:B,height:H,$:ee}}function me(x){return tt(x)?x:x.contextElement}function Ne(x){const P=me(x);if(!at(P))return d(1);const B=P.getBoundingClientRect(),{width:H,height:G,$:X}=ne(P);let ie=(X?T(B.width):B.width)/H,ee=(X?T(B.height):B.height)/G;return(!ie||!Number.isFinite(ie))&&(ie=1),(!ee||!Number.isFinite(ee))&&(ee=1),{x:ie,y:ee}}var vt=d(0);function it(x){const P=K(x);return!Re()||!P.visualViewport?vt:{x:P.visualViewport.offsetLeft,y:P.visualViewport.offsetTop}}function pt(x,P,B){return P===void 0&&(P=!1),!B||P&&B!==K(x)?!1:P}function Dt(x,P,B,H){P===void 0&&(P=!1),B===void 0&&(B=!1);const G=x.getBoundingClientRect(),X=me(x);let ie=d(1);P&&(H?tt(H)&&(ie=Ne(H)):ie=Ne(x));const ee=pt(X,B,H)?it(X):d(0);let be=(G.left+ee.x)/ie.x,Te=(G.top+ee.y)/ie.y,qe=G.width/ie.x,He=G.height/ie.y;if(X){const Ve=K(X),De=H&&tt(H)?K(H):H;let Ae=Ve.frameElement;for(;Ae&&H&&De!==Ve;){const Pe=Ne(Ae),ze=Ae.getBoundingClientRect(),xe=we(Ae),Ue=ze.left+(Ae.clientLeft+parseFloat(xe.paddingLeft))*Pe.x,Y=ze.top+(Ae.clientTop+parseFloat(xe.paddingTop))*Pe.y;be*=Pe.x,Te*=Pe.y,qe*=Pe.x,He*=Pe.y,be+=Ue,Te+=Y,Ae=K(Ae).frameElement}}return fe({width:qe,height:He,x:be,y:Te})}function pi(x){let{rect:P,offsetParent:B,strategy:H}=x;const G=at(B),X=ve(B);if(B===X)return P;let ie={scrollLeft:0,scrollTop:0},ee=d(1);const be=d(0);if((G||!G&&H!=="fixed")&&((ae(B)!=="body"||ht(X))&&(ie=Ze(B)),at(B))){const Te=Dt(B);ee=Ne(B),be.x=Te.x+B.clientLeft,be.y=Te.y+B.clientTop}return{width:P.width*ee.x,height:P.height*ee.y,x:P.x*ee.x-ie.scrollLeft*ee.x+be.x,y:P.y*ee.y-ie.scrollTop*ee.y+be.y}}function ui(x){return Array.from(x.getClientRects())}function Mi(x){return Dt(ve(x)).left+Ze(x).scrollLeft}function oi(x){const P=ve(x),B=Ze(x),H=x.ownerDocument.body,G=y(P.scrollWidth,P.clientWidth,H.scrollWidth,H.clientWidth),X=y(P.scrollHeight,P.clientHeight,H.scrollHeight,H.clientHeight);let ie=-B.scrollLeft+Mi(x);const ee=-B.scrollTop;return we(H).direction==="rtl"&&(ie+=y(P.clientWidth,H.clientWidth)-G),{width:G,height:X,x:ie,y:ee}}function ii(x,P){const B=K(x),H=ve(x),G=B.visualViewport;let X=H.clientWidth,ie=H.clientHeight,ee=0,be=0;if(G){X=G.width,ie=G.height;const Te=Re();(!Te||Te&&P==="fixed")&&(ee=G.offsetLeft,be=G.offsetTop)}return{width:X,height:ie,x:ee,y:be}}function Xi(x,P){const B=Dt(x,!0,P==="fixed"),H=B.top+x.clientTop,G=B.left+x.clientLeft,X=at(x)?Ne(x):d(1),ie=x.clientWidth*X.x,ee=x.clientHeight*X.y,be=G*X.x,Te=H*X.y;return{width:ie,height:ee,x:be,y:Te}}function Fr(x,P,B){let H;if(P==="viewport")H=ii(x,B);else if(P==="document")H=oi(ve(x));else if(tt(P))H=Xi(P,B);else{const G=it(x);H={...P,x:P.x-G.x,y:P.y-G.y}}return fe(H)}function qi(x,P){const B=je(x);return B===P||!tt(B)||le(B)?!1:we(B).position==="fixed"||qi(B,P)}function jr(x,P){const B=P.get(x);if(B)return B;let H=Xe(x,[],!1).filter(ee=>tt(ee)&&ae(ee)!=="body"),G=null;const X=we(x).position==="fixed";let ie=X?je(x):x;for(;tt(ie)&&!le(ie);){const ee=we(ie),be=wt(ie);!be&&ee.position==="fixed"&&(G=null),(X?!be&&!G:!be&&ee.position==="static"&&!!G&&["absolute","fixed"].includes(G.position)||ht(ie)&&!be&&qi(x,ie))?H=H.filter(qe=>qe!==ie):G=ee,ie=je(ie)}return P.set(x,H),H}function Ji(x){let{element:P,boundary:B,rootBoundary:H,strategy:G}=x;const ie=[...B==="clippingAncestors"?jr(P,this._c):[].concat(B),H],ee=ie[0],be=ie.reduce((Te,qe)=>{const He=Fr(P,qe,G);return Te.top=y(He.top,Te.top),Te.right=m(He.right,Te.right),Te.bottom=m(He.bottom,Te.bottom),Te.left=y(He.left,Te.left),Te},Fr(P,ee,G));return{width:be.right-be.left,height:be.bottom-be.top,x:be.left,y:be.top}}function en(x){return ne(x)}function Qi(x,P,B){const H=at(P),G=ve(P),X=B==="fixed",ie=Dt(x,!0,X,P);let ee={scrollLeft:0,scrollTop:0};const be=d(0);if(H||!H&&!X)if((ae(P)!=="body"||ht(G))&&(ee=Ze(P)),H){const Te=Dt(P,!0,X,P);be.x=Te.x+P.clientLeft,be.y=Te.y+P.clientTop}else G&&(be.x=Mi(G));return{x:ie.left+ee.scrollLeft-be.x,y:ie.top+ee.scrollTop-be.y,width:ie.width,height:ie.he
7ight}}function Zi(x,P){return!at(x)||we(x).position==="fixed"?null:P?P(x):x.offsetParent}function Ei(x,P){const B=K(x);if(!at(x))return B;let H=Zi(x,P);for(;H&&bt(H)&&we(H).position==="static";)H=Zi(H,P);return H&&(ae(H)==="html"||ae(H)==="body"&&we(H).position==="static"&&!wt(H))?B:H||zt(x)||B}var ri=async function(x){let{reference:P,floating:B,strategy:H}=x;const G=this.getOffsetParent||Ei,X=this.getDimensions;return{reference:Qi(P,await G(B),H),floating:{x:0,y:0,...await X(B)}}};function dr(x){return we(x).direction==="rtl"}var dn={convertOffsetParentRelativeRectToViewportRelativeRect:pi,getDocumentElement:ve,getClippingRect:Ji,getOffsetParent:Ei,getElementRects:ri,getClientRects:ui,getDimensions:en,getScale:Ne,isElement:tt,isRTL:dr};function Er(x,P){let B=null,H;const G=ve(x);function X(){clearTimeout(H),B&&B.disconnect(),B=null}function ie(ee,be){ee===void 0&&(ee=!1),be===void 0&&(be=1),X();const{left:Te,top:qe,width:He,height:Ve}=x.getBoundingClientRect();if(ee||P(),!He||!Ve)return;const De=g(qe),Ae=g(G.clientWidth-(Te+He)),Pe=g(G.clientHeight-(qe+Ve)),ze=g(Te),Ue={rootMargin:-De+"px "+-Ae+"px "+-Pe+"px "+-ze+"px",threshold:y(0,m(1,be))||1};let Y=!0;function At(Ge){const mi=Ge[0].intersectionRatio;if(mi!==be){if(!Y)return ie();mi?ie(!1,mi):H=setTimeout(()=>{ie(!1,1e-7)},100)}Y=!1}try{B=new IntersectionObserver(At,{...Ue,root:G.ownerDocument})}catch{B=new IntersectionObserver(At,Ue)}B.observe(x)}return ie(!0),X}function fn(x,P,B,H){H===void 0&&(H={});const{ancestorScroll:G=!0,ancestorResize:X=!0,elementResize:ie=typeof ResizeObserver=="function",layoutShift:ee=typeof IntersectionObserver=="function",animationFrame:be=!1}=H,Te=me(x),qe=G||X?[...Te?Xe(Te):[],...Xe(P)]:[];qe.forEach(xe=>{G&&xe.addEventListener("scroll",B,{passive:!0}),X&&xe.addEventListener("resize",B)});const He=Te&&ee?Er(Te,B):null;let Ve=-1,De=null;ie&&(De=new ResizeObserver(xe=>{let[Ue]=xe;Ue&&Ue.target===Te&&De&&(De.unobserve(P),cancelAnimationFrame(Ve),Ve=requestAnimationFrame(()=>{De&&De.observe(P)})),B()}),Te&&!be&&De.observe(Te),De.observe(P));let Ae,Pe=be?Dt(x):null;be&&ze();function ze(){const xe=Dt(x);Pe&&(xe.x!==Pe.x||xe.y!==Pe.y||xe.width!==Pe.width||xe.height!==Pe.height)&&B(),Pe=xe,Ae=requestAnimationFrame(ze)}return B(),()=>{qe.forEach(xe=>{G&&xe.removeEventListener("scroll",B),X&&xe.removeEventListener("resize",B)}),He&&He(),De&&De.disconnect(),De=null,be&&cancelAnimationFrame(Ae)}}var Sr=(x,P,B)=>{const H=new Map,G={platform:dn,...B},X={...G.platform,_c:H};return st(x,P,{...G,platform:X})};function tn(x){x.magic("anchor",P=>{if(!P._x_anchor)throw"Alpine: No x-anchor directive found on element using $anchor...";return P._x_anchor}),x.interceptClone((P,B)=>{P&&P._x_anchor&&!B._x_anchor&&(B._x_anchor=P._x_anchor)}),x.directive("anchor",x.skipDuringClone((P,{expression:B,modifiers:H,value:G},{cleanup:X,evaluate:ie})=>{let{placement:ee,offsetValue:be,unstyled:Te}=Cr(H);P._x_anchor=x.reactive({x:0,y:0});let qe=ie(B);if(!qe)throw"Alpine: no element provided to x-anchor...";let He=()=>{let De;Sr(qe,P,{placement:ee,middleware:[oe(),ke({padding:5}),Ce(be)]}).then(({x:Ae,y:Pe})=>{Te||Tr(P,Ae,Pe),JSON.stringify({x:Ae,y:Pe})!==De&&(P._x_anchor.x=Ae,P._x_anchor.y=Pe),De=JSON.stringify({x:Ae,y:Pe})})},Ve=fn(qe,P,()=>He());X(()=>Ve())},(P,{expression:B,modifiers:H,value:G},{cleanup:X,evaluate:ie})=>{let{unstyled:ee}=Cr(H);P._x_anchor&&(ee||Tr(P,P._x_anchor.x,P._x_anchor.y))}))}function Tr(x,P,B){Object.assign(x.style,{left:P+"px",top:B+"px",position:"absolute"})}function Cr(x){let B=["top","top-start","top-end","right","right-start","right-end","bottom","bottom-start","bottom-end","left","left-start","left-end"].find(X=>x.includes(X)),H=0;if(x.includes("offset")){let X=x.findIndex(ie=>ie==="offset");H=x[X+1]!==void 0?Number(x[X+1]):H}let G=x.includes("no-style");return{placement:B,offsetValue:H,unstyled:G}}var z=tn}}),Kg=Qr({"node_modules/nprogress/nprogress.js"(t,e){(function(i,r){typeof define=="function"&&define.amd?define(r):typeof t=="object"?e.exports=r():i.NProgress=r()})(t,function(){var i={};i.version="0.2.0";var r=i.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>'};i.configure=function(d){var u,w;for(u in d)w=d[u],w!==void 0&&d.hasOwnProperty(u)&&(r[u]=w);return this},i.status=null,i.set=function(d){var u=i.isStarted();d=n(d,r.minimum,1),i.status=d===1?null:d;var w=i.render(!u),h=w.querySelector(r.barSelector),p=r.speed,c=r.easing;return w.offsetWidth,l(function(f){r.positionUsing===""&&(r.positionUsing=i.getPositioningCSS()),_(h,o(d,p,c)),d===1?(_(w,{transition:"none",opacity:1}),w.offsetWidth,setTimeout(function(){_(w,{transition:"all "+p+"ms linear",opacity:0}
7),setTimeout(function(){i.remove(),f()},p)},p)):setTimeout(f,p)}),this},i.isStarted=function(){return typeof i.status=="number"},i.start=function(){i.status||i.set(0);var d=function(){setTimeout(function(){i.status&&(i.trickle(),d())},r.trickleSpeed)};return r.trickle&&d(),this},i.done=function(d){return!d&&!i.status?this:i.inc(.3+.5*Math.random()).set(1)},i.inc=function(d){var u=i.status;return u?(typeof d!="number"&&(d=(1-u)*n(Math.random()*u,.1,.95)),u=n(u+d,0,.994),i.set(u)):i.start()},i.trickle=function(){return i.inc(Math.random()*r.trickleRate)},(function(){var d=0,u=0;i.promise=function(w){return!w||w.state()==="resolved"?this:(u===0&&i.start(),d++,u++,w.always(function(){u--,u===0?(d=0,i.done()):i.set((d-u)/d)}),this)}})(),i.render=function(d){if(i.isRendered())return document.getElementById("nprogress");m(document.documentElement,"nprogress-busy");var u=document.createElement("div");u.id="nprogress",u.innerHTML=r.template;var w=u.querySelector(r.barSelector),h=d?"-100":s(i.status||0),p=document.querySelector(r.parent),c;return _(w,{transition:"all 0 linear",transform:"translate3d("+h+"%,0,0)"}),r.showSpinner||(c=u.querySelector(r.spinnerSelector),c&&g(c)),p!=document.body&&m(p,"nprogress-custom-parent"),p.appendChild(u),u},i.remove=function(){y(document.documentElement,"nprogress-busy"),y(document.querySelector(r.parent),"nprogress-custom-parent");var d=document.getElementById("nprogress");d&&g(d)},i.isRendered=function(){return!!document.getElementById("nprogress")},i.getPositioningCSS=function(){var d=document.body.style,u="WebkitTransform"in d?"Webkit":"MozTransform"in d?"Moz":"msTransform"in d?"ms":"OTransform"in d?"O":"";return u+"Perspective"in d?"translate3d":u+"Transform"in d?"translate":"margin"};function n(d,u,w){return d<u?u:d>w?w:d}function s(d){return(-1+d)*100}function o(d,u,w){var h;return r.positionUsing==="translate3d"?h={transform:"translate3d("+s(d)+"%,0,0)"}:r.positionUsing==="translate"?h={transform:"translate("+s(d)+"%,0)"}:h={"margin-left":s(d)+"%"},h.transition="all "+u+"ms "+w,h}var l=(function(){var d=[];function u(){var w=d.shift();w&&w(u)}return function(w){d.push(w),d.length==1&&u()}})(),_=(function(){var d=["Webkit","O","Moz","ms"],u={};function w(f){return f.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(v,E){return E.toUpperCase()})}function h(f){var v=document.body.style;if(f in v)return f;for(var E=d.length,C=f.charAt(0).toUpperCase()+f.slice(1),O;E--;)if(O=d[E]+C,O in v)return O;return f}function p(f){return f=w(f),u[f]||(u[f]=h(f))}function c(f,v,E){v=p(v),f.style[v]=E}return function(f,v){var E=arguments,C,O;if(E.length==2)for(C in v)O=v[C],O!==void 0&&v.hasOwnProperty(C)&&c(f,C,O);else c(f,E[1],E[2])}})();function b(d,u){var w=typeof d=="string"?d:T(d);return w.indexOf(" "+u+" ")>=0}function m(d,u){var w=T(d),h=w+u;b(w,u)||(d.className=h.substring(1))}function y(d,u){var w=T(d),h;b(d,u)&&(h=w.replace(" "+u+" "," "),d.className=h.substring(1,h.length-1))}function T(d){return(" "+(d.className||"")+" ").replace(/\s+/gi," ")}function g(d){d&&d.parentNode&&d.parentNode.removeChild(d)}return i})}}),Gg=Qr({"node_modules/@alpinejs/morph/dist/module.cjs.js"(t,e){var i=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,o=(A,I)=>{for(var N in I)i(A,N,{get:I[N],enumerable:!0})},l=(A,I,N,D)=>{if(I&&typeof I=="object"||typeof I=="function")for(let U of n(I))!s.call(A,U)&&U!==N&&i(A,U,{get:()=>I[U],enumerable:!(D=r(I,U))||D.enumerable});return A},_=A=>l(i({},"__esModule",{value:!0}),A),b={};o(b,{default:()=>O,morph:()=>C}),e.exports=_(b);function m(A,I,N){v();let D=T(N),U=typeof I=="string"?w(I):I;return window.Alpine&&window.Alpine.closestDataStack&&!A._x_dataStack&&(U._x_dataStack=window.Alpine.closestDataStack(A),U._x_dataStack&&window.Alpine.cloneNode(A,U)),D.patch(A,U),A}function y(A,I,N,D={}){v();let U=T(D),Q=A.parentNode,he=new p(A,I),se=typeof N=="string"?(()=>{let Ee=document.createElement("div");return Ee.insertAdjacentHTML("beforeend",N),Ee})():N,fe=document.createComment("[morph-start]"),pe=document.createComment("[morph-end]");se.insertBefore(fe,se.firstChild),se.appendChild(pe);
vendor: 4,128 bytes, line 7
7let st=new p(fe,pe);window.Alpine&&window.Alpine.closestDataStack&&(se._x_dataStack=window.Alpine.closestDataStack(Q),se._x_dataStack&&window.Alpine.cloneNode(Q,se)),U.patchChildren(he,st)}function T(A={}){let I=U=>U.getAttribute("key"),N=()=>{},D={key:A.key||I,lookahead:A.lookahead||!1,updating:A.updating||N,updated:A.updated||N,removing:A.removing||N,removed:A.removed||N,adding:A.adding||N,added:A.added||N};return D.patch=function(U,Q){if(D.differentElementNamesTypesOrKeys(U,Q))return D.swapElements(U,Q);let he=!1,se=!1,fe=pe=>D.skipUntilCondition=pe;if(!d(D.updating,()=>se=!0,fe,U,Q,()=>he=!0)){if(U.nodeType===1&&window.Alpine&&(window.Alpine.cloneNode(U,Q),U._x_teleport&&Q._x_teleport&&D.patch(U._x_teleport,Q._x_teleport)),h(Q)){D.patchNodeValue(U,Q),D.updated(U,Q);return}he||D.patchAttributes(U,Q),D.updated(U,Q),se||D.patchChildren(U,Q)}},D.differentElementNamesTypesOrKeys=function(U,Q){return U.nodeType!=Q.nodeType||U.nodeName!=Q.nodeName||D.getKey(U)!=D.getKey(Q)},D.swapElements=function(U,Q){if(g(D.removing,U))return;let he=Q.cloneNode(!0);g(D.adding,he)||(U.replaceWith(he),D.removed(U),D.added(he))},D.patchNodeValue=function(U,Q){let he=Q.nodeValue;U.nodeValue!==he&&(U.nodeValue=he)},D.patchAttributes=function(U,Q){if(U._x_transitioning||U._x_isShown&&!Q._x_isShown||!U._x_isShown&&Q._x_isShown)return;let he=Array.from(U.attributes),se=Array.from(Q.attributes);for(let fe=he.length-1;fe>=0;fe--){let pe=he[fe].name;Q.hasAttribute(pe)||U.removeAttribute(pe)}for(let fe=se.length-1;fe>=0;fe--){let pe=se[fe].name,st=se[fe].value;U.getAttribute(pe)!==st&&U.setAttribute(pe,st)}},D.patchChildren=function(U,Q){let he=D.keyToMap(U.children),se={},fe=c(Q),pe=c(U);for(;fe;){E(fe,pe);let Ee=D.getKey(fe),oe=D.getKey(pe);if(D.skipUntilCondition){let ae=!pe||D.skipUntilCondition(pe),K=!fe||D.skipUntilCondition(fe);if(ae&&K)D.skipUntilCondition=null;else{ae||(pe=pe&&f(U,pe)),K||(fe=fe&&f(Q,fe));continue}}if(!pe)if(Ee&&se[Ee]){let ae=se[Ee];U.appendChild(ae),pe=ae,oe=D.getKey(pe)}else{if(!g(D.adding,fe)){let ae=fe.cloneNode(!0);U.appendChild(ae),D.added(ae)}fe=f(Q,fe);continue}let _e=ae=>ae&&ae.nodeType===8&&ae.textContent==="[if BLOCK]><![endif]",Ce=ae=>ae&&ae.nodeType===8&&ae.textContent==="[if ENDBLOCK]><![endif]";if(_e(fe)&&_e(pe)){let ae=0,K=pe;for(;pe;){let ht=f(U,pe);if(_e(ht))ae++;else if(Ce(ht)&&ae>0)ae--;else if(Ce(ht)&&ae===0){pe=ht;break}pe=ht}let ve=pe;ae=0;let Le=fe;for(;fe;){let ht=f(Q,fe);if(_e(ht))ae++;else if(Ce(ht)&&ae>0)ae--;else if(Ce(ht)&&ae===0){fe=ht;break}fe=ht}let tt=fe,at=new p(K,ve),ut=new p(Le,tt);D.patchChildren(at,ut);continue}if(pe.nodeType===1&&D.lookahead&&!pe.isEqualNode(fe)){let ae=f(Q,fe),K=!1;for(;!K&&ae;)ae.nodeType===1&&pe.isEqualNode(ae)&&(K=!0,pe=D.addNodeBefore(U,fe,pe),oe=D.getKey(pe)),ae=f(Q,ae)}if(Ee!==oe){if(!Ee&&oe){se[oe]=pe,pe=D.addNodeBefore(U,fe,pe),se[oe].remove(),pe=f(U,pe),fe=f(Q,fe);continue}if(Ee&&!oe&&he[Ee]&&(pe.replaceWith(he[Ee]),pe=he[Ee],oe=D.getKey(pe)),Ee&&oe){let ae=he[Ee];if(ae)se[oe]=pe,pe.replaceWith(ae),pe=ae,oe=D.getKey(pe);else{se[oe]=pe,pe=D.addNodeBefore(U,fe,pe),se[oe].remove(),pe=f(U,pe),fe=f(Q,fe);continue}}}let ke=pe&&f(U,pe);D.patch(pe,fe),fe=fe&&f(Q,fe),pe=ke}let st=[];for(;pe;)g(D.removing,pe)||st.push(pe),pe=f(U,pe);for(;st.length;){let Ee=st.shift();Ee.remove(),D.removed(Ee)}},D.getKey=function(U){return U&&U.nodeType===1&&D.key(U)},D.keyToMap=function(U){let Q={};for(let he of U){let se=D.getKey(he);se&&(Q[se]=he)}return Q},D.addNodeBefore=function(U,Q,he){if(!g(D.adding,Q)){let se=Q.cloneNode(!0);return U.insertBefore(se,he),D.added(se),se}return Q},D}m.step=()=>{},m.log=()=>{};function g(A,...I){let N=!1;return A(...I,()=>N=!0),N}function d(A,I,N,...D){let U=!1;return A(...D,()=>U=!0,I,N),U}var u=!1;function w(A){const I=document.createElement("template");return I.innerHTML=A,I.content.firstElementChild}function h(A){return A.nodeType===3||A.nodeType===8}var p=class{constructor(A,I){this.startComment=A,this.endComment=I}get children(){let A=[],I=this.startComment.nextSibling;for(;I&&I!==this.endComment;)A.push(I),I=I.nextSibling;return A}appendChild(A){this.endComment.before(A)}
7get firstChild(){let A=this.startComment.nextSibling;if(A!==this.endComment)return A}nextNode(A){let I=A.nextSibling;if(I!==this.endComment)return I}insertBefore(A,I){return I.before(A),A}};function c(A){return A.firstChild}function f(A,I){let N;return A instanceof p?N=A.nextNode(I):N=I.nextSibling,N}function v(){if(u)return;u=!0;let A=Element.prototype.setAttribute,I=document.createElement("div");Element.prototype.setAttribute=function(D,U){if(!D.includes("@"))return A.call(this,D,U);I.innerHTML=`<span ${D}="${U}"></span>`;let Q=I.firstElementChild.getAttributeNode(D);I.firstElementChild.removeAttributeNode(Q),this.setAttributeNode(Q)}}function E(A,I){let N=I&&I._x_bindings&&I._x_bindings.id;N&&A.setAttribute&&(A.setAttribute("id",N),A.id=N)}function C(A){A.morph=m,A.morphBetween=y}var O=C}}),Yg=Qr({"node_modules/@alpinejs/mask/dist/module.cjs.js"(t,e){var i=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,o=(w,h)=>{for(var p in h)i(w,p,{get:h[p],enumerable:!0})},l=(w,h,p,c)=>{if(h&&typeof h=="object"||typeof h=="function")for(let f of n(h))!s.call(w,f)&&f!==p&&i(w,f,{get:()=>h[f],enumerable:!(c=r(h,f))||c.enumerable});return w},_=w=>l(i({},"__esModule",{value:!0}),w),b={};o(b,{default:()=>u,mask:()=>m,stripDown:()=>T}),e.exports=_(b);function m(w){w.directive("mask",(h,{value:p,expression:c},{effect:f,evaluateLater:v,cleanup:E})=>{let C=()=>c,O="";queueMicrotask(()=>{if(["function","dynamic"].includes(p)){let D=v(c);f(()=>{C=U=>{let Q;return w.dontAutoEvaluateFunctions(()=>{D(he=>{Q=typeof he=="function"?he(U):he},{scope:{$input:U,$money:d.bind({el:h})}})}),Q},I(h,!1)})}else I(h,!1);if(h._x_model){if(h._x_model.get()===h.value||h._x_model.get()===null&&h.value==="")return;h._x_model.set(h.value)}});const A=new AbortController;E(()=>{A.abort()}),h.addEventListener("input",()=>I(h),{signal:A.signal,capture:!0}),h.addEventListener("blur",()=>I(h,!1),{signal:A.signal});function I(D,U=!0){let Q=D.value,he=C(Q);if(!he||he==="false")return!1;if(O.length-D.value.length===1)return O=D.value;let se=()=>{O=D.value=N(Q,he)};U?y(D,he,()=>{se()}):se()}function N(D,U){if(D==="")return"";let Q=T(U,D);return g(U,Q)}}).before("model")}function y(w,h,p){let c=w.selectionStart,f=w.value;p();let v=f.slice(0,c),E=g(h,T(h,v)).length;w.setSelectionRange(E,E)}function T(w,h){let p=h,c="",f={9:/[0-9]/,a:/[a-zA-Z]/,"*":/[a-zA-Z0-9]/},v="";for(let E=0;E<w.length;E++){if(["9","a","*"].includes(w[E])){v+=w[E];continue}for(let C=0;C<p.length;C++)if(p[C]===w[E]){p=p.slice(0,C)+p.slice(C+1);break}}for(let E=0;E<v.length;E++){let C=!1;for(let O=0;O<p.length;O++)if(f[v[E]].test(p[O])){c+=p[O],p=p.slice(0,O)+p.slice(O+1),C=!0;break}if(!C)break}return c}function g(w,h){let p=Array.from(h),c="";for(let f=0;f<w.length;f++){if(!["9","a","*"].includes(w[f])){c+=w[f];continue}if(p.length===0)break;c+=p.shift()}return c}function d(w,h=".",p,c=2){if(w==="-")return"-";if(/^\D+$/.test(w))return"9";p==null&&(p=h===","?".":",");let f=(O,A)=>{let I="",N=0;for(let D=O.length-1;D>=0;D--)O[D]!==A&&(N===3?(I=O[D]+A+I,N=0):I=O[D]+I,N++);return I},v=w.startsWith("-")?"-":"",E=w.replaceAll(new RegExp(`[^0-9\\${h}]`,"g"),""),C=Array.from({length:E.split(h)[0].length}).fill("9").join("");return C=`${v}${f(C,p)}`,c>0&&w.includes(h)&&(C+=`${h}`+"9".repeat(c)),queueMicrotask(()=>{this.el.value.endsWith(h)||this.el.value[this.el.selectionStart-1]===h&&this.el.setSelectionRange(this.el.selectionStart-1,this.el.selectionStart-1)}),C}var u=m}}),Xg=class{constructor(){this.arrays={}}add(t,e){this.arrays[t]||(this.arrays[t]=[]),this.arrays[t].push(e)}remove(t){this.arrays[t]&&delete this.arrays[t]}get(t){return this.arrays[t]||[]}each(t,e){return this.get(t).forEach(e)}},mh=class{constructor(){this.arrays=new WeakMap}add(t,e){this.arrays.has(t)||this.arrays.set(t,[]),this.arrays.get(t).push(e)}remove(t){this.arrays.has(t)&&this.arrays.delete(t,[])}get(t){return this.arrays.has(t)?this.arrays.get(t):[]}each(t,e){return this.get(t).forEach(e)}};function pl(t,e,i={},r=!0){t.dispatchEvent(new CustomEvent(e,{detail:i,bubbles:r,composed:!0,cancelable:!0}))}function ml(t,e,i){return t.addEventListener(e,i),()=>t.removeEventListener(e,i)}function Bc(t){return typeof t=="object"&&t!==null}function td(t){return Bc(t)&&!lc(t)}function lc(t){return Array.isArray(t)}function gh(t){return typeof t=="function"}function id(t){return typeof t!="object"||t===null}function bn(t){return JSON.parse(JSON.stringify(t))}function Wr(t,e){return e===""?t:e.split(".").reduce((i,r)=>i?.[r],t)}function Ma(t,e,i){let r=e.split(".");if(r.length===1)return t[e]=i;let n=r.shift(),s=r.join(".");t[n]===void 0&&(t[n]={}),Ma(t[n],s,i)}function qc(t,e,i={},r=""){if(t===e)return i;if(typeof t!=typeof e||td(t)&&lc(e)||lc(t)&&td(e)||id(t)||id(e))return i[r]=e,i;let n=Object.keys(t);return Object.entries(e).forEach(([s,o])=>{i={...i,...qc(t[s],e[s],i,r===""?s:`${r}.${s}`)},n=n.filter(l=>l!==s)}
7),n.forEach(s=>{i[`${r}.${s}`]="__rm__"}),i}function as(t){let e=rd(t)?t[0]:t;return rd(t)&&t[1],Bc(e)&&Object.entries(e).forEach(([i,r])=>{e[i]=as(r)}),e}function rd(t){return Array.isArray(t)&&t.length===2&&typeof t[1]=="object"&&Object.keys(t[1]).includes("s")}function vh(){if(document.querySelector('meta[name="csrf-token"]'))return document.querySelector('meta[name="csrf-token"]').getAttribute("content");if(document.querySelector("[data-csrf]"))return document.querySelector("[data-csrf]").getAttribute("data-csrf");if(window.livewireScriptConfig.csrf??!1)return window.livewireScriptConfig.csrf;throw"Livewire: No CSRF token detected"}var es;function Jg(){if(es)return es;if(window.livewireScriptConfig&&(window.livewireScriptConfig.nonce??!1))return es=window.livewireScriptConfig.nonce,es;const t=document.querySelector("style[data-livewire-style][nonce]");return t?(es=t.nonce,es):null}function Qg(){return document.querySelector("[data-update-uri]")?.getAttribute("data-update-uri")??window.livewireScriptConfig.uri??null}function yh(t){return!!t.match(/<script>Sfdump\(".+"\)<\/script>/)}function Zg(t){let e=t.match(/.*<script>Sfdump\(".+"\)<\/script>/s);return[e,t.replace(e,"")]}var gl=new WeakMap;function ro(t){if(!gl.has(t)){let e=new tv(t);gl.set(t,e),e.registerListeners()}return gl.get(t)}function ev(t,e,i,r){let n=ro(i),s=()=>t.dispatchEvent(new CustomEvent("livewire-upload-start",{bubbles:!0,detail:{id:i.id,property:e}})),o=()=>t.dispatchEvent(new CustomEvent("livewire-upload-finish",{bubbles:!0,detail:{id:i.id,property:e}})),l=()=>t.dispatchEvent(new CustomEvent("livewire-upload-error",{bubbles:!0,detail:{id:i.id,property:e}})),_=()=>t.dispatchEvent(new CustomEvent("livewire-upload-cancel",{bubbles:!0,detail:{id:i.id,property:e}})),b=T=>{var g=Math.round(T.loaded*100/T.total);t.dispatchEvent(new CustomEvent("livewire-upload-progress",{bubbles:!0,detail:{progress:g}}))},m=T=>{if(T.target.files.length!==0)if(s(),T.target.multiple){let g=["ui-file-upload"].includes(T.target.tagName.toLowerCase());n.uploadMultiple(e,T.target.files,o,l,b,_,g)}else n.upload(e,T.target.files[0],o,l,b,_)};t.addEventListener("change",m),i.$wire.$watch(e,T=>{t.isConnected&&((T===null||T==="")&&(t.value=""),t.multiple&&Array.isArray(T)&&T.length===0&&(t.value=""))});let y=()=>{t.value=null};t.addEventListener("click",y),t.addEventListener("livewire-upload-cancel",y),r(()=>{t.removeEventListener("change",m),t.removeEventListener("click",y)})}var tv=class{constructor(t){this.component=t,this.uploadBag=new nd,this.removeBag=new nd}registerListeners(){this.component.$wire.$on("upload:generatedSignedUrl",({name:t,url:e})=>{this.component,this.handleSignedUrl(t,e)}),this.component.$wire.$on("upload:generatedSignedUrlForS3",({name:t,payload:e})=>{this.component,this.handleS3PreSignedUrl(t,e)}),this.component.$wire.$on("upload:finished",({name:t,tmpFilenames:e})=>this.markUploadFinished(t,e)),this.component.$wire.$on("upload:errored",({name:t})=>this.markUploadErrored(t)),this.component.$wire.$on("upload:removed",({name:t,tmpFilename:e})=>this.removeBag.shift(t).finishCallback(e))}upload(t,e,i,r,n,s){this.setUpload(t,{files:[e],multiple:!1,finishCallback:i,errorCallback:r,progressCallback:n,cancelledCallback:s,append:!1})}uploadMultiple(t,e,i,r,n,s,o=!1){this.setUpload(t,{files:Array.from(e),multiple:!0,finishCallback:i,errorCallback:r,progressCallback:n,cancelledCallback:s,append:o})}removeUpload(t,e,i){this.removeBag.push(t,{tmpFilename:e,finishCallback:i}),this.component.$wire.call("_removeUpload",t,e)}setUpload(t,e){this.uploadBag.add(t,e),this.uploadBag.get(t).length===1&&this.startUpload(t,e)}handleSignedUrl(t,e){let i=new FormData;Array.from(this.uploadBag.first(t).files).forEach(s=>i.append("files[]",s,s.name));let r={Accept:"application/json"},n=vh();n&&(r["X-CSRF-TOKEN"]=n),this.makeRequest(t,i,"post",e,r,s=>s.paths)}handleS3PreSignedUrl(t,e){let i=this.uploadBag.first(t).files[0],r=e.headers;"Host"in r&&delete r.Host;let n=e.url;this.makeRequest(t,i,"put",n,r,s=>[e.path])}makeRequest(t,e,i,r,n,s){let o=new XMLHttpRequest;
7o.open(i,r),Object.entries(n).forEach(([l,_])=>{o.setRequestHeader(l,_)}),o.upload.addEventListener("progress",l=>{l.detail={},l.detail.progress=Math.floor(l.loaded*100/l.total),this.uploadBag.first(t).progressCallback(l)}),o.addEventListener("load",()=>{if((o.status+"")[0]==="2"){let _=s(o.response&&JSON.parse(o.response));this.component.$wire.call("_finishUpload",t,_,this.uploadBag.first(t).multiple,this.uploadBag.first(t).append);return}let l=null;o.status===422&&(l=o.response),this.component.$wire.call("_uploadErrored",t,l,this.uploadBag.first(t).multiple)}),this.uploadBag.first(t).request=o,o.send(e)}startUpload(t,e){let i=e.files.map(r=>({name:r.name,size:r.size,type:r.type}));this.component.$wire.call("_startUpload",t,i,e.multiple),this.component}markUploadFinished(t,e){this.component;let i=this.uploadBag.shift(t);i.finishCallback(i.multiple?e:e[0]),this.uploadBag.get(t).length>0&&this.startUpload(t,this.uploadBag.last(t))}markUploadErrored(t){this.component,this.uploadBag.shift(t).errorCallback(),this.uploadBag.get(t).length>0&&this.startUpload(t,this.uploadBag.last(t))}cancelUpload(t,e=null){this.component;let i=this.uploadBag.first(t);i&&(i.request&&i.request.abort(),this.uploadBag.shift(t).cancelledCallback(),e&&e())}},nd=class{constructor(){this.bag={}}add(t,e){this.bag[t]||(this.bag[t]=[]),this.bag[t].push(e)}push(t,e){this.add(t,e)}first(t){return this.bag[t]?this.bag[t][0]:null}last(t){return this.bag[t].slice(-1)[0]}get(t){return this.bag[t]}shift(t){return this.bag[t].shift()}call(t,...e){(this.listeners[t]||[]).forEach(i=>{i(...e)})}has(t){return Object.keys(this.listeners).includes(t)}};function iv(t,e,i,r=()=>{},n=()=>{},s=()=>{},o=()=>{}){ro(t).upload(e,i,r,n,s,o)}function rv(t,e,i,r=()=>{},n=()=>{},s=()=>{},o=()=>{},l=!1){ro(t).uploadMultiple(e,i,r,n,s,o,l)}function nv(t,e,i,r=()=>{},n=()=>{}){ro(t).removeUpload(e,i,r,n)}function sv(t,e,i=()=>{}){ro(t).cancelUpload(e,i)}var sd=Bt(hi());function bh(t,e){return e||(e=()=>{}),(i,r=!1)=>{let n=r,s=i,o=t.$wire,l=o.get(s);return sd.default.interceptor((b,m,y,T,g)=>{if(typeof l>"u"){console.error(`Livewire Entangle Error: Livewire property ['${s}'] cannot be found on component: ['${t.name}']`);return}let d=sd.default.entangle({get(){return o.get(i)},set(u){o.set(i,u,n)}},{get(){return m()},set(u){y(u)}});return e(()=>d()),ov(o.get(i))},b=>{Object.defineProperty(b,"live",{get(){return n=!0,b}})})(l)}}function ov(t){return typeof t=="object"?JSON.parse(JSON.stringify(t)):t}var En=[];function Lt(t,e){return En[t]||(En[t]=[]),En[t].push(e),()=>{En[t]=En[t].filter(i=>i!==e)}}function ti(t,...e){let i=En[t]||[],r=[];for(let n=0;n<i.length;n++){let s=i[n](...e);gh(s)&&r.push(s)}return n=>_h(r,n)}async function wh(t,...e){let i=En[t]||[],r=[];for(let n=0;n<i.length;n++){let s=await i[n](...e);gh(s)&&r.push(s)}return n=>_h(r,n)}function _h(t,e){let i=e;for(let r=0;r<t.length;r++){let n=t[r](i);n!==void 0&&(i=n)}return i}function Eh(t){let e=document.createElement("html");e.innerHTML=t,e.querySelectorAll("a").forEach(n=>n.setAttribute("target","_top"));let i=document.getElementById("livewire-error");typeof i<"u"&&i!=null?i.innerHTML="":(i=document.createElement("dialog"),i.id="livewire-error",i.style.margin="50px",i.style.width="calc(100% - 100px)",i.style.height="calc(100% - 100px)",i.style.borderRadius="5px",i.style.padding="0px");let r=document.createElement("iframe");r.style.backgroundColor="#17161A",r.style.borderRadius="5px",r.style.width="100%",r.style.height="100%",i.appendChild(r),document.body.prepend(i),document.body.style.overflow="hidden",r.contentWindow.document.open(),r.contentWindow.document.write(e.outerHTML),r.contentWindow.document.close(),i.addEventListener("click",()=>av(i)),i.addEventListener("close",()=>lv(i)),i.showModal(),i.focus(),i.blur()}function av(t){t.close()}function lv(t){t.outerHTML="",document.body.style.overflow="visible"}var cv=class{constructor(){this.commits=new Set}add(t){this.commits.add(t)}delete(t){this.commits.delete(t)}hasCommitFor(t){return!!this.findCommitByComponent(t)}findCommitByComponent(t){for(let[e,i]of this.commits.entries())if(i.component===t)return i}shouldHoldCommit(t){return!t.isolate}empty(){return this.commits.size===0}async send(){this.prepare(),await pv(this)}
7prepare(){this.commits.forEach(t=>t.prepare())}payload(){let t=[],e=[],i=[];return this.commits.forEach(s=>{let[o,l,_]=s.toRequestPayload();t.push(o),e.push(l),i.push(_)}),[t,s=>e.forEach(o=>o(s.shift())),()=>i.forEach(s=>s())]}},uv=class{constructor(t){this.component=t,this.isolate=!1,this.calls=[],this.receivers=[],this.resolvers=[]}addResolver(t){this.resolvers.push(t)}addCall(t,e,i){this.calls.push({path:"",method:t,params:e,handleReturn(r){i(r)}})}prepare(){ti("commit.prepare",{component:this.component})}getEncodedSnapshotWithLatestChildrenMergedIn(){let{snapshotEncoded:t,children:e,snapshot:i}=this.component,r=e.map(s=>s.id),n=Object.fromEntries(Object.entries(i.memo.children).filter(([s,o])=>r.includes(o[1])));return t.replace(/"children":\{[^}]*\}/,`"children":${JSON.stringify(n)}`)}toRequestPayload(){let t=qc(this.component.canonical,this.component.ephemeral),e=this.component.mergeQueuedUpdates(t),r={snapshot:this.getEncodedSnapshotWithLatestChildrenMergedIn(),updates:e,calls:this.calls.map(g=>({path:g.path,method:g.method,params:g.params}))},n=[],s=[],o=[],l=g=>n.forEach(d=>d(g)),_=()=>s.forEach(g=>g()),b=()=>o.forEach(g=>g()),m=ti("commit",{component:this.component,commit:r,succeed:g=>{n.push(g)},fail:g=>{s.push(g)},respond:g=>{o.push(g)}});return[r,g=>{let{snapshot:d,effects:u}=g;if(b(),this.component.mergeNewSnapshot(d,u,e),this.component.processEffects(this.component.effects),u.returns){let h=u.returns;this.calls.map(({handleReturn:c})=>c).forEach((c,f)=>{c(h[f])})}let w=JSON.parse(d);m({snapshot:w,effects:u}),this.resolvers.forEach(h=>h()),l(g)},()=>{b(),_()}]}},dv=class{constructor(){this.commits=new Set,this.pools=new Set}add(t){let e=this.findCommitOr(t,()=>{let i=new uv(t);return this.commits.add(i),i});return fv(e,()=>{this.findPoolWithComponent(e.component)||this.createAndSendNewPool()}),e}findCommitOr(t,e){for(let[i,r]of this.commits.entries())if(r.component===t)return r;return e()}findPoolWithComponent(t){for(let[e,i]of this.pools.entries())if(i.hasCommitFor(t))return i}createAndSendNewPool(){ti("commit.pooling",{commits:this.commits});let t=this.corraleCommitsIntoPools();ti("commit.pooled",{pools:t}),t.forEach(e=>{e.empty()||(this.pools.add(e),e.send().then(()=>{this.pools.delete(e),queueMicrotask(()=>{this.sendAnyQueuedCommits()})}))})}corraleCommitsIntoPools(){let t=new Set;for(let[e,i]of this.commits.entries()){if(this.findPoolWithComponent(i.component))continue;let r=!1;if(t.forEach(n=>{n.shouldHoldCommit(i)&&(n.add(i),r=!0)}),!r){let n=new cv;n.add(i),t.add(n)}this.commits.delete(i)}return t}sendAnyQueuedCommits(){this.commits.size>0&&this.createAndSendNewPool()}},vl=new WeakMap;function fv(t,e){vl.has(t)||vl.set(t,setTimeout(()=>{e(),vl.delete(t)},5))}var Sh=new dv;async function Th(t){let e=Sh.add(t),i=new Promise(r=>{e.addResolver(r)});return i.commit=e,i}async function hv(t,e,i){let r=Sh.add(t),n=new Promise(s=>{r.addCall(e,i,o=>s(o))});return n.commit=r,n}async function pv(t){let[e,i,r]=t.payload(),n={method:"POST",body:JSON.stringify({_token:vh(),components:e}),headers:{"Content-type":"application/json","X-Livewire":""}},s=[],o=[],l=[],_=p=>s.forEach(c=>c(p)),b=p=>o.forEach(c=>c(p)),m=p=>l.forEach(c=>c(p)),y=ti("request.profile",n),T=Qg();ti("request",{url:T,options:n,payload:n.body,respond:p=>l.push(p),succeed:p=>s.push(p),fail:p=>o.push(p)});let g;try{g=await fetch(T,n)}catch{y({content:"{}",failed:!0}),r(),b({status:503,content:null,preventDefault:()=>{}});return}let d={status:g.status,response:g};m(d),g=d.response;let u=await g.text();if(!g.ok){y({content:"{}",failed:!0});let p=!1;return r(),b({status:g.status,content:u,preventDefault:()=>p=!0}
7),p?void 0:(g.status===419&&mv(),gv(u))}if(g.redirected&&(window.location.href=g.url),yh(u)){let p;[p,u]=Zg(u),Eh(p),y({content:"{}",failed:!0})}else y({content:u,failed:!1});let{components:w,assets:h}=JSON.parse(u);await wh("payload.intercept",{components:w,assets:h}),await i(w),_({status:g.status,json:JSON.parse(u)})}function mv(){confirm(`This page has expired.
8Would you like to refresh the page?`)&&window.location.reload()}function gv(t){Eh(t)}var Ch=Bt(hi()),Vc={},Ah;function ci(t,e,i=null){Vc[t]=e}function vv(t){Ah=t}var od={on:"$on",el:"$el",id:"$id",js:"$js",get:"$get",set:"$set",call:"$call",hook:"$hook",commit:"$commit",watch:"$watch",entangle:"$entangle",dispatch:"$dispatch",dispatchTo:"$dispatchTo",dispatchSelf:"$dispatchSelf",upload:"$upload",uploadMultiple:"$uploadMultiple",removeUpload:"$removeUpload",cancelUpload:"$cancelUpload"};function yv(t,e){return new Proxy({},{get(i,r){if(r==="__instance")return t;if(r in od)return ad(t,od[r]);if(r in Vc)return ad(t,r);if(r in e)return e[r];if(!["then"].includes(r))return bv(t)(r)},set(i,r,n){return r in e&&(e[r]=n),!0}})}function ad(t,e){return Vc[e](t)}function bv(t){return Ah(t)}Ch.default.magic("wire",(t,{cleanup:e})=>{let i;return new Proxy({},{get(r,n){return i||(i=Yr(t)),["$entangle","entangle"].includes(n)?bh(i,e):i.$wire[n]},set(r,n,s){return i||(i=Yr(t)),i.$wire[n]=s,!0}})});ci("__instance",t=>t);ci("$get",t=>(e,i=!0)=>Wr(i?t.reactive:t.ephemeral,e));ci("$el",t=>t.el);ci("$id",t=>t.id);ci("$js",t=>{let e=t.addJsAction.bind(t),i=t.getJsActions();
8return Object.keys(i).forEach(r=>{e[r]=t.getJsAction(r)}),e});ci("$set",t=>async(e,i,r=!0)=>(Ma(t.reactive,e,i),r?(t.queueUpdate(e,i),await Th(t)):Promise.resolve()));ci("$call",t=>async(e,...i)=>await t.$wire[e](...i));ci("$entangle",t=>(e,i=!1)=>bh(t)(e,i));ci("$toggle",t=>(e,i=!0)=>t.$wire.set(e,!t.$wire.get(e),i));ci("$watch",t=>(e,i)=>{let r=()=>Wr(t.reactive,e),n=Ch.default.watch(r,i);t.addCleanup(n)});ci("$refresh",t=>t.$wire.$commit);ci("$commit",t=>async()=>await Th(t));ci("$on",t=>(...e)=>Iv(t,...e));ci("$hook",t=>(e,i)=>{let r=Lt(e,({component:n,...s})=>{if(n===void 0)return i(s);if(n.id===t.id)return i({component:n,...s})});return t.addCleanup(r),r});ci("$dispatch",t=>(...e)=>kh(t,...e));ci("$dispatchSelf",t=>(...e)=>hs(t,...e));ci("$dispatchTo",()=>(...t)=>Hc(...t));ci("$upload",t=>(...e)=>iv(t,...e));ci("$uploadMultiple",t=>(...e)=>rv(t,...e));ci("$removeUpload",t=>(...e)=>nv(t,...e));ci("$cancelUpload",t=>(...e)=>sv(t,...e));var yl=new WeakMap;ci("$parent",t=>{if(yl.has(t))return yl.get(t).$wire;let e=t.parent;return yl.set(t,e),e.$wire});var fs=new WeakMap;function wv(t,e,i){fs.has(t)||fs.set(t,{});let r=fs.get(t);r[e]=i,fs.set(t,r)}vv(t=>e=>async(...i)=>{if(i.length===1&&i[0]instanceof Event&&(i=[]),fs.has(t)){let r=fs.get(t);if(typeof r[e]=="function")return r[e](i)}return await hv(t,e,i)});var _v=class{constructor(t){if(t.__livewire)throw"Component already initialized";if(t.__livewire=this,this.el=t,this.id=t.getAttribute("wire:id"),this.__livewireId=this.id,this.snapshotEncoded=t.getAttribute("wire:snapshot"),this.snapshot=JSON.parse(this.snapshotEncoded),!this.snapshot)throw"Snapshot missing on Livewire component with id: "+this.id;this.name=this.snapshot.memo.name,this.effects=JSON.parse(t.getAttribute("wire:effects")),this.originalEffects=bn(this.effects),this.canonical=as(bn(this.snapshot.data)),this.ephemeral=as(bn(this.snapshot.data)),this.reactive=Alpine.reactive(this.ephemeral),this.queuedUpdates={},this.jsActions={},this.$wire=yv(this,this.reactive),this.cleanups=[],this.processEffects(this.effects)}mergeNewSnapshot(t,e,i={}){let r=JSON.parse(t),n=bn(this.canonical),s=this.applyUpdates(n,i),o=as(bn(r.data)),l=qc(s,o);this.snapshotEncoded=t,this.snapshot=r,this.effects=e,this.canonical=as(bn(r.data));let _=as(bn(r.data));return Object.entries(l).forEach(([b,m])=>{let y=b.split(".")[0];this.reactive[y]=_[y]}),l}queueUpdate(t,e){this.queuedUpdates[t]=e}mergeQueuedUpdates(t){return Object.entries(this.queuedUpdates).forEach(([e,i])=>{Object.entries(t).forEach(([r,n])=>{r.startsWith(i)&&delete t[r]}),t[e]=i}),this.queuedUpdates=[],t}applyUpdates(t,e){for(let i in e)Ma(t,i,e[i]);return t}replayUpdate(t,e){let i={...this.effects,html:e};this.mergeNewSnapshot(JSON.stringify(t),i),this.processEffects({html:e})}processEffects(t){ti("effects",this,t),ti("effect",{component:this,effects:t,cleanup:e=>this.addCleanup(e)})}get children(){let t=this.snapshot.memo;return Object.values(t.children).map(i=>i[1]).filter(i=>xh(i)).map(i=>Tv(i))}get parent(){return Yr(this.el.parentElement)}inscribeSnapshotAndEffectsOnElement(){let t=this.el;t.setAttribute("wire:snapshot",this.snapshotEncoded);let e=this.originalEffects.listeners?{listeners:this.originalEffects.listeners}:{};this.originalEffects.url&&(e.url=this.originalEffects.url),this.originalEffects.scripts&&(e.scripts=this.originalEffects.scripts),t.setAttribute("wire:effects",JSON.stringify(e))}addJsAction(t,e){this.jsActions[t]=e}hasJsAction(t){return this.jsActions[t]!==void 0}getJsAction(t){return this.jsActions[t].bind(this.$wire)}getJsActions(){return this.jsActions}addCleanup(t){this.cleanups.push(t)}cleanup(){for(delete this.el.__livewire;this.cleanups.length>0;)this.cleanups.pop()()}},Dr={};function Ev(t){let e=new _v(t);if(Dr[e.id])throw"Component already registered";return ti("component.init",{component:e,cleanup:r=>e.addCleanup(r)}),Dr[e.id]=e,e}function Sv(t){let e=Dr[t];e&&(e.cleanup(),delete Dr[t])}function xh(t){return!!Dr[t]}function Tv(t){let e=Dr[t];if(!e)throw"Component not found: "+t;return e}function Yr(t,e=!0){let i=Alpine.findClosest(t,r=>r.__livewire);if(!i){if(e)throw"Could not find Livewire component in DOM tree";return}return i.__livewire}function Oh(t){return Object.values(Dr).filter(e=>t==e.name)}function Cv(t){return Oh(t).map(e=>e.$wire)}function Av(t){let e=Dr[t];return e&&e.$wire}function xv(){return Object.values(Dr)[0].$wire}function Ov(){return Object.values(Dr)}function kh(t,e,i){Ra(t.el,e,i)}function kv(t,e){Ra(window,t,e)}function hs(t,e,i){Ra(t.el,e,i,!1)}
8function Hc(t,e,i){Oh(t).forEach(n=>{Ra(n.el,e,i,!1)})}function Iv(t,e,i){t.el.addEventListener(e,r=>{i(r.detail)})}function Pv(t,e){let i=r=>{r.__livewire&&e(r.detail)};return window.addEventListener(t,i),()=>{window.removeEventListener(t,i)}}function Ra(t,e,i,r=!0){typeof i=="string"&&(i=[i]);let n=new CustomEvent(e,{bubbles:r,detail:i});n.__livewire={name:e,params:i,receivedBy:[]},t.dispatchEvent(n)}var eo=new Set;function _n(t){return t.match(new RegExp("wire:"))}function ca(t,e){let[i,...r]=e.replace(new RegExp("wire:"),"").split(".");return new Dv(i,r,e,t)}function cr(t,e){eo.has(t)||(eo.add(t),Lt("directive.init",({el:i,component:r,directive:n,cleanup:s})=>{n.value===t&&e({el:i,directive:n,component:r,$wire:r.$wire,cleanup:s})}))}function Lv(t,e){eo.has(t)||(eo.add(t),Lt("directive.global.init",({el:i,directive:r,cleanup:n})=>{r.value===t&&e({el:i,directive:r,cleanup:n})}))}function zc(t){return new Rv(t)}function Mv(t){return eo.has(t)}var Rv=class{constructor(t){this.el=t,this.directives=this.extractTypeModifiersAndValue()}all(){return this.directives}has(t){return this.directives.map(e=>e.value).includes(t)}missing(t){return!this.has(t)}get(t){return this.directives.find(e=>e.value===t)}extractTypeModifiersAndValue(){return Array.from(this.el.getAttributeNames().filter(t=>_n(t)).map(t=>ca(this.el,t)))}},Dv=class{constructor(t,e,i,r){this.rawName=this.raw=i,this.el=r,this.eventContext,this.value=t,this.modifiers=e,this.expression=this.el.getAttribute(this.rawName)}get method(){return this.parseOutMethodsAndParams(this.expression)[0].method}get methods(){return this.parseOutMethodsAndParams(this.expression)}get params(){return this.parseOutMethodsAndParams(this.expression)[0].params}parseOutMethodsAndParams(t){let e=[],i=this.splitAndParseMethods(t);for(let{method:r,paramString:n}of i){let s=[];if(n.length>0){let o=function(){for(var l=arguments.length,_=new Array(l),b=0;b<l;b++)_[b]=arguments[b];return[].concat(_)};try{s=Alpine.evaluate(document,"argumentsToArray("+n+")",{scope:{argumentsToArray:o}})}catch(l){console.warn("Failed to parse parameters:",n,l),s=[]}}e.push({method:r,params:s})}return e}splitAndParseMethods(t){let e=[],i="",r=0,n=!1,s=null,o=t.trim();for(let l=0;l<o.length;l++){let _=o[l];n?(_===s&&o[l-1]!=="\\"&&(n=!1,s=null),i+=_):_==='"'||_==="'"?(n=!0,s=_,i+=_):_==="("?(r++,i+=_):_===")"?(r--,i+=_):_===","&&r===0?(e.push(this.parseMethodCall(i.trim())),i=""):i+=_}return i.trim().length>0&&e.push(this.parseMethodCall(i.trim())),e}parseMethodCall(t){let e=t.match(/^([^(]+)\(/);if(!e)return{method:t.trim(),paramString:""};let i=e[1].trim(),r=e[0].length-1,n=t.lastIndexOf(")");if(n===-1)throw new Error(`Missing closing parenthesis for method "${i}"`);let s=t.slice(r+1,n).trim();return{method:i,paramString:s}}},Nv=Bt(qg()),$v=Bt(Vg());function Fv(t){let e=()=>{let i,r;try{r=localStorage}catch(n){console.error(n),console.warn("Alpine: $persist is using temporary storage since localStorage is unavailable.");let s=new Map;r={getItem:s.get.bind(s),setItem:s.set.bind(s)}}return t.interceptor((n,s,o,l,_)=>{let b=i||`_x_${l}`,m=ld(b,r)?cd(b,r):n;return o(m),t.effect(()=>{let y=s();ud(b,y,r),o(y)}),m},n=>{n.as=s=>(i=s,n),n.using=s=>(r=s,n)})};Object.defineProperty(t,"$persist",{get:()=>e()}),t.magic("persist",e),t.persist=(i,{get:r,set:n},s=localStorage)=>{let o=ld(i,s)?cd(i,s):r();n(o),t.effect(()=>{let l=r();ud(i,l,s),n(l)})}}function ld(t,e){return e.getItem(t)!==null}function cd(t,e){let i=e.getItem(t);if(i!==void 0)return JSON.parse(i)}function ud(t,e,i){i.setItem(t,JSON.stringify(e))}var jv=Fv,Uv=Bt(Hg()),Bv=Bt(zg()),qv=Bt(Wg()),cc=class{constructor(t,e){this.url=t,this.html=e}},Mr={currentKey:null,currentUrl:null,keys:[],lookup:{},limit:10,has(t){return this.lookup[t]!==void 0},retrieve(t){let e=this.lookup[t];if(e===void 0)throw"No back button cache found for current location: "+t;return e},replace(t,e){this.has(t)?this.lookup[t]=e:this.push(t,e)},push(t,e){this.lookup[t]=e;let i=this.keys.indexOf(t);i>-1&&this.keys.splice(i,1),this.keys.unshift(t),this.trim()},trim(){for(let t of this.keys.splice(this.limit))delete this.lookup[t]}},ua=null;function Ih(t){ua=t}function Vv(){let t=new URL(window.location.href,document.baseURI);Ph(t,document.documentElement.outerHTML)}function Hv(t,e){let i=document.documentElement.outerHTML;Mr.replace(t,new cc(e,i))}function zv(t,e){let i;t(r=>i=r),window.addEventListener("popstate",r=>{let n=r.state||{},s=n.alpine||{};if(ua&&(ua<200||ua>=300))return window.location.href=s.url;if(Object.keys(n).length!==0&&s.snapshotIdx)if(Mr.has(s.snapshotIdx)){let o=Mr.retrieve(s.snapshotIdx);e(o.html,o.url,Mr.currentUrl,Mr.currentKey)}else i(s.url)})}function Wv(t,e){Kv(e,t)}function Kv(t,e){Lh("pushState",t,e)}function Ph(t,e){Lh("replaceState",t,e)}function Lh(t,e,i){let r=e.toString()+"-"+Math.random();t==="pushState"?Mr.push(r,new cc(e,i)):Mr.replace(r=Mr.currentKey??r,new cc(e,i));let n=history.state||{};n.alpine||(n.alpine={}),n.alpine.snapshotIdx=r,n.alpine.url=e.toString();try{history[t](n,JSON.stringify(document.title),e),Mr.currentKey=r,Mr.currentUrl=e}catch(s){s instanceof DOMException&&s.name==="SecurityError"&&console.error("Livewire: You can't use wire:navigate with a link to a different root domain: "+e),console.error(s)}}function Gv(t,e){let i=s=>!s.isTrusted,r=s=>s.which>1||s.altKey||s.ctrlKey||s.metaKey||s.shiftKey,n=s=>s.which!==13||s.altKey||s.ctrlKey||s.metaKey||s.shiftKey;
8t.addEventListener("click",s=>{if(i(s)){s.preventDefault(),e(o=>o());return}r(s)||s.preventDefault()}),t.addEventListener("mousedown",s=>{r(s)||(s.preventDefault(),e(o=>{let l=_=>{_.preventDefault(),o(),t.removeEventListener("mouseup",l)};t.addEventListener("mouseup",l)}))}),t.addEventListener("keydown",s=>{n(s)||(s.preventDefault(),e(o=>o()))})}function Yv(t,e=60,i){t.addEventListener("mouseenter",r=>{let n=setTimeout(()=>{i(r)},e),s=()=>{clearTimeout(n),t.removeEventListener("mouseleave",s)};t.addEventListener("mouseleave",s)})}function dd(t){return ms(t.getAttribute("href"))}function ms(t){return t!==null&&new URL(t,document.baseURI)}function Da(t){return t.pathname+t.search+t.hash}function Xv(t,e){let i=Da(t);Mh(i,(r,n,s)=>{Ih(s),e(r,n)})}function Mh(t,e){let i={headers:{"X-Livewire-Navigate":""}};ti("navigate.request",{url:t,options:i});let r,n;fetch(t,i).then(s=>{let o=ms(t);return r=ms(s.url),o.pathname+o.search===r.pathname+r.search&&(r.hash=o.hash),n=s.status,s.text()}).then(s=>{e(s,r,n)})}var zi={},Jv=3e4;function fd(t,e){let i=Da(t);zi[i]||(zi[i]={finished:!1,html:null,whenFinished:()=>setTimeout(()=>delete zi[i],Jv)},Mh(i,(r,n,s)=>{Ih(s),e(r,n)}))}function hd(t,e,i){let r=zi[Da(e)];r.html=t,r.finished=!0,r.finalDestination=i,r.whenFinished()}function Qv(t,e,i){let r=Da(t);if(!zi[r])return i();if(zi[r].finished){let n=zi[r].html,s=zi[r].finalDestination;return delete zi[r],e(n,s)}else zi[r].whenFinished=()=>{let n=zi[r].html,s=zi[r].finalDestination;delete zi[r],e(n,s)}}var Wc=Bt(hi());function pd(t){Wc.default.mutateDom(()=>{t.querySelectorAll("[data-teleport-template]").forEach(e=>e._x_teleport.remove())})}function md(t){Wc.default.mutateDom(()=>{t.querySelectorAll("[data-teleport-target]").forEach(e=>e.remove())})}function gd(t){Wc.default.walk(t,(e,i)=>{e._x_teleport&&(e._x_teleportPutBack(),i())})}function Zv(t){return t.hasAttribute("data-teleport-target")}function vd(){document.body.setAttribute("data-scroll-x",document.body.scrollLeft),document.body.setAttribute("data-scroll-y",document.body.scrollTop),document.querySelectorAll(["[x-navigate\\:scroll]","[wire\\:scroll]"]).forEach(t=>{t.setAttribute("data-scroll-x",t.scrollLeft),t.setAttribute("data-scroll-y",t.scrollTop)})}function yd(){let t=e=>{e.hasAttribute("data-scroll-x")?(e.scrollTo({top:Number(e.getAttribute("data-scroll-y")),left:Number(e.getAttribute("data-scroll-x")),behavior:"instant"}),e.removeAttribute("data-scroll-x"),e.removeAttribute("data-scroll-y")):window.scrollTo({top:0,left:0,behavior:"instant"})};queueMicrotask(()=>{queueMicrotask(()=>{t(document.body),document.querySelectorAll(["[x-navigate\\:scroll]","[wire\\:scroll]"]).forEach(t)})})}var uc=Bt(hi()),Xs={};function bd(t){Xs={},document.querySelectorAll("[x-persist]").forEach(e=>{Xs[e.getAttribute("x-persist")]=e,t(e),uc.default.mutateDom(()=>{e.remove()})})}function wd(t){let e=[];document.querySelectorAll("[x-persist]").forEach(i=>{let r=Xs[i.getAttribute("x-persist")];r&&(e.push(i.getAttribute("x-persist")),r._x_wasPersisted=!0,t(r,i),uc.default.mutateDom(()=>{i.replaceWith(r)}))}
8),Object.entries(Xs).forEach(([i,r])=>{e.includes(i)||uc.default.destroyTree(r)}),Xs={}}function ey(t){return t.hasAttribute("x-persist")}var Na=Bt(Kg());Na.default.configure({minimum:.1,trickleSpeed:200,showSpinner:!1,parent:"body"});ny();var dc=!1;function ty(){dc=!0,setTimeout(()=>{dc&&Na.default.start()},150)}function iy(){dc=!1,Na.default.done()}function ry(){Na.default.remove()}function ny(){let t=document.createElement("style");t.innerHTML=`/* Make clicks pass-through */
9
10    #nprogress {
11      pointer-events: none;
12    }
13
14    #nprogress .bar {
15      background: var(--livewire-progress-bar-color, #29d);
16
17      position: fixed;
18      z-index: 1031;
19      top: 0;
20      left: 0;
21
22      width: 100%;
23      height: 2px;
24    }
25
26    /* Fancy blur effect */
27    #nprogress .peg {
28      display: block;
29      position: absolute;
30      right: 0px;
31      width: 100px;
32      height: 100%;
33      box-shadow: 0 0 10px var(--livewire-progress-bar-color, #29d), 0 0 5px var(--livewire-progress-bar-color, #29d);
34      opacity: 1.0;
35
36      -webkit-transform: rotate(3deg) translate(0px, -4px);
37          -ms-transform: rotate(3deg) translate(0px, -4px);
38              transform: rotate(3deg) translate(0px, -4px);
39    }
40
41    /* Remove these to get rid of the spinner */
42    #nprogress .spinner {
43      display: block;
44      position: fixed;
45      z-index: 1031;
46      top: 15px;
47      right: 15px;
48    }
49
50    #nprogress .spinner-icon {
51      width: 18px;
52      height: 18px;
53      box-sizing: border-box;
54
55      border: solid 2px transparent;
56      border-top-color: var(--livewire-progress-bar-color, #29d);
57      border-left-color: var(--livewire-progress-bar-color, #29d);
58      border-radius: 50%;
59
60      -webkit-animation: nprogress-spinner 400ms linear infinite;
61              animation: nprogress-spinner 400ms linear infinite;
62    }
63
64    .nprogress-custom-parent {
65      overflow: hidden;
66      position: relative;
67    }
68
69    .nprogress-custom-parent #nprogress .spinner,
70    .nprogress-custom-parent #nprogress .bar {
71      position: absolute;
72    }
73
74    @-webkit-keyframes nprogress-spinner {
75      0%   { -webkit-transform: rotate(0deg); }
76      100% { -webkit-transform: rotate(360deg); }
77    }
78    @keyframes nprogress-spinner {
79      0%   { transform: rotate(0deg); }
80      100% { transform: rotate(360deg); }
81    }
82    `;let e=Jg();e&&(t.nonce=e),document.head.appendChild(t)}function _d(t){Rh()&&t.querySelectorAll(":popover-open").forEach(e=>{e.setAttribute("data-navigate-popover-open","");let i=e.getAnimations();e._pausedAnimations=i.map(r=>({keyframes:r.effect.getKeyframes(),options:{duration:r.effect.getTiming().duration,easing:r.effect.getTiming().easing,fill:r.effect.getTiming().fill,iterations:r.effect.getTiming().iterations},currentTime:r.currentTime,playState:r.playState}
82)),i.forEach(r=>r.pause())})}function Ed(t){Rh()&&t.querySelectorAll("[data-navigate-popover-open]").forEach(e=>{e.removeAttribute("data-navigate-popover-open"),queueMicrotask(()=>{e.isConnected&&(e.showPopover(),e.getAnimations().forEach(i=>i.finish()),e._pausedAnimations&&(e._pausedAnimations.forEach(({keyframes:i,options:r,currentTime:n,now:s,playState:o})=>{let l=e.animate(i,r);l.currentTime=n}),delete e._pausedAnimations))})})}function Rh(){return typeof document.createElement("div").showPopover=="function"}var bl=[],Dh=["data-csrf","nonce","aria-hidden"];function Sd(t,e){let i=new DOMParser().parseFromString(t,"text/html"),r=i.documentElement,n=document.adoptNode(i.body),s=document.adoptNode(i.head);bl=bl.concat(Array.from(document.body.querySelectorAll("script")).map(_=>jh(Uh(_.outerHTML,Dh))));let o=()=>{};oy(r),ay(s).finally(()=>{o()}),sy(n,bl);let l=document.body;document.body.replaceWith(n),Alpine.destroyTree(l),e(_=>o=_)}function sy(t,e){t.querySelectorAll("script").forEach(i=>{if(i.hasAttribute("data-navigate-once")){let r=jh(Uh(i.outerHTML,Dh));if(e.includes(r))return}i.replaceWith(Nh(i))})}function oy(t){let e=document.documentElement;Array.from(t.attributes).forEach(i=>{const r=i.name,n=i.value;e.getAttribute(r)!==n&&e.setAttribute(r,n)}),Array.from(e.attributes).forEach(i=>{t.hasAttribute(i.name)||e.removeAttribute(i.name)})}function ay(t){let e=Array.from(document.head.children),i=e.map(s=>s.outerHTML),r=document.createDocumentFragment(),n=[];for(let s of Array.from(t.children))if(Cd(s))if(i.includes(s.outerHTML))r.appendChild(s);else if($h(s)&&cy(s,e)&&setTimeout(()=>window.location.reload()),Fh(s))try{n.push(ly(Nh(s)))}catch{}else document.head.appendChild(s);for(let s of Array.from(document.head.children))Cd(s)||s.remove();for(let s of Array.from(t.children))s.tagName.toLowerCase()!=="noscript"&&document.head.appendChild(s);return Promise.all(n)}async function ly(t){return new Promise((e,i)=>{t.src?(t.onload=()=>e(),t.onerror=()=>i()):e(),document.head.appendChild(t)})}function Nh(t){let e=document.createElement("script");e.textContent=t.textContent,e.async=t.async;for(let i of t.attributes)e.setAttribute(i.name,i.value);return e}function $h(t){return t.hasAttribute("data-navigate-track")}function cy(t,e){let[i,r]=Td(t);return e.some(n=>{if(!$h(n))return!1;let[s,o]=Td(n);if(s===i&&r!==o)return!0})}function Td(t){return(Fh(t)?t.src:t.href).split("?")}function Cd(t){return t.tagName.toLowerCase()==="link"&&t.getAttribute("rel").toLowerCase()==="stylesheet"||t.tagName.toLowerCase()==="style"||t.tagName.toLowerCase()==="script"}function Fh(t){return t.tagName.toLowerCase()==="script"}function jh(t){return t.split("").reduce((e,i)=>(e=(e<<5)-e+i.charCodeAt(0),e&e),0)}function Uh(t,e){let i=t;return e.forEach(r=>{const n=new RegExp(`${r}="[^"]*"|${r}='[^']*'`,"g");i=i.replace(n,"")}),i=i.replaceAll(" ",""),i.trim()}var wl=!0;function uy(t){t.navigate=(i,r={})=>{let{preserveScroll:n=!1}=r,s=ms(i);Hr("alpine:navigate",{url:s,history:!1,cached:!1})||e(s,{preserveScroll:n})},t.navigate.disableProgressBar=()=>{wl=!1},t.addInitSelector(()=>`[${t.prefixed("navigate")}]`),t.directive("navigate",(i,{modifiers:r})=>{let n=r.includes("hover"),s=r.includes("preserve-scroll");n&&Yv(i,60,()=>{let o=dd(i);o&&fd(o,(l,_)=>{hd(l,o,_)})}),Gv(i,o=>{let l=dd(i);l&&(fd(l,(_,b)=>{hd(_,l,b)}),o(()=>{Hr("alpine:navigate",{url:l,history:!1,cached:!1})||e(l,{preserveScroll:s})}))})});function e(i,{preserveScroll:r=!1,shouldPushToHistoryState:n=!0}){wl&&ty(),dy(i,(s,o)=>{Hr("alpine:navigating"),vd(),fy(),Vv(),Ad(t,l=>{bd(_=>{pd(_),_d(_)}),n?Wv(s,o):Ph(o,s),Sd(s,_=>{md(document.body),wd((b,m)=>{gd(b),Ed(b)}),!r&&yd(),_(()=>{l(()=>{setTimeout(()=>{}),xd(t),Hr("alpine:navigated"),wl&&iy()})})})})})}zv(i=>{i(r=>{let n=ms(r);Hr("alpine:navigate",{url:n,history:!0,cached:!1})||e(n,{shouldPushToHistoryState:!1})})},(i,r,n,s)=>{let o=ms(r);Hr("alpine:navigate",{url:o,history:!0,cached:!0})||(vd(),Hr("alpine:navigating"),Hv(n,s),Ad(t,_=>{bd(b=>{pd(b),_d(b)}),Sd(i,()=>{ry(),md(document.body),wd((b,m)=>{gd(b),Ed(b)}),yd(),_(()=>{xd(t),Hr("alpine:navigated")})})}))}),setTimeout(()=>{Hr("alpine:navigated")})}function dy(t,e){Qv(t,e,()=>{Xv(t,e)})}function Ad(t,e){t.stopObservingMutations(),e(i=>{t.startObservingMutations(),queueMicrotask(()=>{i()})})}function Hr(t,e){let i=new CustomEvent(t,{cancelable:!0,bubbles:!0,detail:e});return document.dispatchEvent(i),i.defaultPrevented}function xd(t){t.initTree(document.body,void 0,(e,i)=>{e._x_wasPersisted&&i()})}function fy(){let t=function(e,i){Alpine.walk(e,(r,n)=>{ey(r)&&n(),Zv(r)?n():i(r,n)})};Alpine.destroyTree(document.body,t)}function hy(t){t.magic("queryString",(e,{interceptor:i})=>{let r,n=!1,s=!1;return i((o,l,_,b,m)=>{let y=r||b,{initial:T,replace:g,push:d,pop:u}=fc(y,o,n);return _(T),s?(t.effect(()=>d(l())),u(async w=>{_(w),await Promise.resolve()})):t.effect(()=>g(l())),T},o=>{o.alwaysShow=()=>(n=!0,o),o.usePush=()=>(s=!0,o),o.as=l=>(r=l,o)})}),t.history={track:fc}}function fc(t,e,i=!1,r=null){let{has:n,get:s,set:o,remove:l}=my(),_=new URL(window.location.href),b=n(_,t),m=b?s(_,t):e,y=JSON.stringify(m),T=[!1,null,void 0].includes(r)?e:JSON.stringify(r),g=h=>JSON.stringify(h)===y,d=h=>JSON.stringify(h)===T;i&&(_=o(_,t,m)),Od(_,t,{value:m});let u=!1,w=(h,p)=>{if(u)return;let c=new URL(window.location.href);!i&&!b&&g(p)||p===void 0||!i&&d(p)?c=l(c,t):c=o(c,t,p),h(c,t,{value:p})};return{initial:m,replace(h){w(Od,h)},push(h){w(py,h)},pop(h){let p=c=>{!c.state||!c.state.alpine||Object.entries(c.state.alpine).forEach(([f,{value:v}])=>{if(f!==t)return;u=!0;let E=h(v);E instanceof Promise?E.finally(()=>u=!1):u=!1})};return window.addEventListener("popstate",p),()=>window.removeEventListener("popstate",p)}}}function Od(t,e,i){let r=window.history.state||{};r.alpine||(r.alpine={}),r.alpine[e]=Kc(i);try{window.history.replaceState(r,"",t.toString())}catch(n){console.error(n)}}function py(t,e,i){let r=window.history.state||{};r.alpine||(r.alpine={}),r={alpine:{...r.alpine,[e]:Kc(i)}};try{window.history.pushState(r,"",t.toString())}catch(n){console.error(n)}}function Kc(t){if(t!==void 0)return JSON.parse(JSON.stringify(t))}function my(){return{has(t,e){let i=t.search;if(!i)return!1;let r=Uo(i,e);return Object.keys(r).includes(e)},get(t,e){let i=t.search;return i?Uo(i,e)[e]:!1},set(t,e,i){let r=Uo(t.search,e);return r[e]=Bh(Kc(i)),t.search=kd(r),t},remove(t,e){let i=Uo(t.search,e);return delete i[e],t.search=kd(i),t}}}function Bh(t){if(!Bc(t))return t;for(let e in t)t[e]===null?delete t[e]:t[e]=Bh(t[e]);return t}function kd(t){let e=n=>typeof n=="object"&&n!==null,i=(n,s={},o="")=>
82(Object.entries(n).forEach(([l,_])=>{let b=o===""?l:`${o}[${l}]`;_===null?s[b]="":e(_)?s={...s,...i(_,s,b)}:s[b]=encodeURIComponent(_).replaceAll("%20","+").replaceAll("%2C",",")}),s),r=i(t);return Object.entries(r).map(([n,s])=>`${n}=${s}`).join("&")}function Uo(t,e){if(t=t.replace("?",""),t==="")return{};let i=(s,o,l)=>{let[_,b,...m]=s.split(".");if(!b)return l[s]=o;l[_]===void 0&&(l[_]=isNaN(b)?{}:[]),i([b,...m].join("."),o,l[_])},r=t.split("&").map(s=>s.split("=")),n=Object.create(null);return r.forEach(([s,o])=>{if(typeof o>"u")return;o=decodeURIComponent(o.replaceAll("+","%20"));let l=decodeURIComponent(s);if(!(l.includes("[")&&l.startsWith(e)))n[s]=o;else{let b=l.replaceAll("[",".").replaceAll("]","");i(b,o,n)}}),n}var gy=Bt(Gg()),vy=Bt(Yg()),bi=Bt(hi());function yy(){setTimeout(()=>by()),pl(document,"livewire:init"),pl(document,"livewire:initializing"),bi.default.plugin(gy.default),bi.default.plugin(hy),bi.default.plugin(Uv.default),bi.default.plugin(Bv.default),bi.default.plugin(Nv.default),bi.default.plugin(qv.default),bi.default.plugin($v.default),bi.default.plugin(jv),bi.default.plugin(uy),bi.default.plugin(vy.default),bi.default.addRootSelector(()=>"[wire\\:id]"),bi.default.onAttributesAdded((t,e)=>{if(!Array.from(e).some(r=>_n(r.name)))return;let i=Yr(t,!1);i&&e.forEach(r=>{if(!_n(r.name))return;let n=ca(t,r.name);ti("directive.init",{el:t,component:i,directive:n,cleanup:s=>{bi.default.onAttributeRemoved(t,n.raw,s)}})})}),bi.default.interceptInit(bi.default.skipDuringClone(t=>{if(!Array.from(t.attributes).some(r=>_n(r.name)))return;if(t.hasAttribute("wire:id")&&!t.__livewire&&!xh(t.getAttribute("wire:id"))){let r=Ev(t);bi.default.onAttributeRemoved(t,"wire:id",()=>{Sv(r.id)})}let e=Array.from(t.getAttributeNames()).filter(r=>_n(r)).map(r=>ca(t,r));e.forEach(r=>{ti("directive.global.init",{el:t,directive:r,cleanup:n=>{bi.default.onAttributeRemoved(t,r.raw,n)}})});let i=Yr(t,!1);i&&(ti("element.init",{el:t,component:i}),e.forEach(r=>{ti("directive.init",{el:t,component:i,directive:r,cleanup:n=>{bi.default.onAttributeRemoved(t,r.raw,n)}})}))},t=>{if(!Array.from(t.attributes).some(i=>_n(i.name)))return;Array.from(t.getAttributeNames()).filter(i=>_n(i)).map(i=>ca(t,i)).forEach(i=>{ti("directive.global.init",{el:t,directive:i,cleanup:r=>{bi.default.onAttributeRemoved(t,i.raw,r)}})})})),bi.default.start(),setTimeout(()=>window.Livewire.initialRenderIsFinished=!0),pl(document,"livewire:initialized")}function by(){let t=document.querySelector("script[data-update-uri][data-csrf]");if(!t)return;let e=t.closest("[wire\\:id]");e&&console.warn("Livewire: missing closing tags found. Ensure your template elements contain matching closing tags.",e)}var Gc=Bt(hi());Lt("effect",({component:t,effects:e})=>{wy(t,e.listeners||[])});function wy(t,e){e.forEach(i=>{let r=n=>{n.__livewire&&n.__livewire.receivedBy.push(t),t.$wire.call("__dispatch",i,n.detail||{})};window.addEventListener(i,r),t.addCleanup(()=>window.removeEventListener(i,r)),t.el.addEventListener(i,n=>{n.__livewire&&(n.bubbles||(n.__livewire&&n.__livewire.receivedBy.push(t.id),t.$wire.call("__dispatch",i,n.detail||{})))})})}var Id=Bt(hi()),ts=new WeakMap,wa=new Set;Lt("payload.intercept",async({assets:t})=>{if(t)for(let[e,i]of Object.entries(t))await Sy(e,async()=>{await Ty(i)})});Lt("component.init",({component:t})=>{let e=t.snapshot.memo.assets;e&&e.forEach(i=>{wa.has(i)||wa.add(i)})});Lt("effect",({component:t,effects:e})=>{let i=e.scripts;i&&Object.entries(i).forEach(([r,n])=>{_y(t,r,()=>{let s=Ey(n);Id.default.dontAutoEvaluateFunctions(()=>{Id.default.evaluate(t.el,s,{$wire:t.$wire,$js:t.$wire.$js})})})})});function _y(t,e,i){if(ts.has(t)&&ts.get(t).includes(e))return;i(),ts.has(t)||ts.set(t,[]);let r=ts.get(t);r.push(e),ts.set(t,r)}function Ey(t){let i=/<script\b[^>]*>([\s\S]*?)<\/script>/gm.exec(t);return i&&i[1]?i[1].trim():""}async function Sy(t,e){wa.has(t)||(await e(),wa.add(t))}async function Ty(t){let e=new DOMParser().parseFromString(t,"text/html"),i=document.adoptNode(e.head);for(let r of i.children)try{await Cy(r)}catch{}}async function Cy(t){return new Promise((e,i)=>{if(Ay(t)){let r=xy(t);r.src?(r.onload=()=>e(),r.onerror=()=>i()):e(),document.head.appendChild(r)}else document.head.appendChild(t),e()})}function Ay(t){return t.tagName.toLowerCase()==="script"}function xy(t){let e=document.createElement("script");e.textContent=t.textContent,e.async=t.async;for(let i of t.attributes)e.setAttribute(i.name,i.value);return e}var hc=Bt(hi());hc.default.magic("js",t=>Yr(t).$wire.js);Lt("effect",({component:t,effects:e})=>{let i=e.js,r=e.xjs;
82i&&Object.entries(i).forEach(([n,s])=>{wv(t,n,()=>{hc.default.evaluate(t.el,s)})}),r&&r.forEach(({expression:n,params:s})=>{s=Object.values(s),hc.default.evaluate(t.el,n,{scope:t.jsActions,params:s})})});var Oy=Bt(hi());function ky(t,e,i){let r=e.parentElement?e.parentElement.tagName.toLowerCase():"div",n=customElements.get(r);r=n?n.name:r;let s=document.createElement(r);s.innerHTML=i;let o;try{o=Yr(e.parentElement)}catch{}o&&(s.__livewire=o);let l=s.firstElementChild;l.setAttribute("wire:snapshot",t.snapshotEncoded);let _={...t.effects};delete _.html,l.setAttribute("wire:effects",JSON.stringify(_)),l.__livewire=t,ti("morph",{el:e,toEl:l,component:t});let b={};e.querySelectorAll("[wire\\:id]").forEach(m=>{b[m.getAttribute("wire:id")]=m}),l.querySelectorAll("[wire\\:id]").forEach(m=>{if(m.hasAttribute("wire:snapshot"))return;let y=m.getAttribute("wire:id"),T=b[y];T&&m.replaceWith(T.cloneNode(!0))}),Oy.default.morph(e,l,{updating:(m,y,T,g,d)=>{if(!is(m)){if(ti("morph.updating",{el:m,toEl:y,component:t,skip:g,childrenOnly:T,skipChildren:d}),m.__livewire_replace===!0&&(m.innerHTML=y.innerHTML),m.__livewire_replace_self===!0)return m.outerHTML=y.outerHTML,g();if(m.__livewire_ignore===!0)return g();if(m.__livewire_ignore_self===!0&&T(),m.__livewire_ignore_children===!0)return d();if(Pd(m)&&m.getAttribute("wire:id")!==t.id)return g();Pd(m)&&(y.__livewire=t)}},updated:m=>{is(m)||ti("morph.updated",{el:m,component:t})},removing:(m,y)=>{is(m)||ti("morph.removing",{el:m,component:t,skip:y})},removed:m=>{is(m)||ti("morph.removed",{el:m,component:t})},adding:m=>{ti("morph.adding",{el:m,component:t})},added:m=>{is(m)||(Yr(m).id,ti("morph.added",{el:m}))},key:m=>{if(!is(m))return m.hasAttribute("wire:key")?m.getAttribute("wire:key"):m.hasAttribute("wire:id")?m.getAttribute("wire:id"):m.id},lookahead:!1}),ti("morphed",{el:e,component:t})}function is(t){return typeof t.hasAttribute!="function"}function Pd(t){return t.hasAttribute("wire:id")}Lt("effect",({component:t,effects:e})=>{let i=e.html;i&&queueMicrotask(()=>{queueMicrotask(()=>{ky(t,t.el,i)})})});Lt("effect",({component:t,effects:e})=>{queueMicrotask(()=>{queueMicrotask(()=>{queueMicrotask(()=>{Iy(t,e.dispatches||[])})})})});function Iy(t,e){e.forEach(({name:i,params:r={},self:n=!1,to:s})=>{n?hs(t,i,r):s?Hc(s,i,r):kh(t,i,r)})}var Py=Bt(hi()),pc=new Xg;Lt("directive.init",({el:t,directive:e,cleanup:i,component:r})=>setTimeout(()=>{e.value==="submit"&&t.addEventListener("submit",()=>{let n=e.expression.startsWith("$parent")?r.parent.id:r.id,s=Ly(t);pc.add(n,s)})}));Lt("commit",({component:t,respond:e})=>{e(()=>{pc.each(t.id,i=>i()),pc.remove(t.id)})});function Ly(t){let e=[];return Py.default.walk(t,(i,r)=>{if(t.contains(i)){if(i.hasAttribute("wire:ignore"))return r();My(i)?e.push(Dy(i)):Ry(i)&&e.push(Ny(i))}}),()=>{for(;e.length>0;)e.shift()()}}function My(t){let e=t.tagName.toLowerCase();return e==="select"||e==="button"&&t.type==="submit"||e==="input"&&(t.type==="checkbox"||t.type==="radio")}function Ry(t){return["input","textarea"].includes(t.tagName.toLowerCase())}function Dy(t){let e=t.disabled?()=>{}:()=>t.disabled=!1;return t.disabled=!0,e}function Ny(t){let e=t.readOnly?()=>{}:()=>t.readOnly=!1;return t.readOnly=!0,e}Lt("commit.pooling",({commits:t})=>{t.forEach(e=>{let i=e.component;qh(i,r=>{r.$wire.$commit()})})});Lt("commit.pooled",({pools:t})=>{$y(t).forEach(i=>{let r=i.component;qh(r,n=>{Fy(t,r,n)})})});function $y(t){let e=[];return t.forEach(i=>{i.commits.forEach(r=>{e.push(r)})}),e}function Fy(t,e,i){let r=Ld(t,e),n=Ld(t,i),s=n.findCommitByComponent(i);n.delete(s),r.add(s),t.forEach(o=>{o.empty()&&t.delete(o)})}function Ld(t,e){for(let[i,r]of t.entries())if(r.hasCommitFor(e))return r}function qh(t,e){Vh(t,i=>{(jy(i)||Uy(i))&&e(i)})}function jy(t){return!!t.snapshot.memo.props}function Uy(t){return!!t.snapshot.memo.bindings}function Vh(t,e){t.children.forEach(i=>{e(i),Vh(i,e)})}Lt("commit",({succeed:t})=>{t(({effects:e})=>{let i=e.download;if(!i)return;let r=window.webkitURL||window.URL,n=r.createObjectURL(By(i.content,i.contentType)),s=document.createElement("a");s.style.display="none",s.href=n,s.download=i.name,document.body.appendChild(s),s.click(),setTimeout(function(){r.revokeObjectURL(n)},0)})});function By(t,e="",i=512){const r=atob(t),n=[];e===null&&(e="");for(let s=0;s<r.length;s+=i){let o=r.slice(s,s+i),l=new Array(o.length);for(let b=0;b<o.length;
82b++)l[b]=o.charCodeAt(b);let _=new Uint8Array(l);n.push(_)}return new Blob(n,{type:e})}var mc=new WeakSet,gc=new WeakSet;Lt("component.init",({component:t})=>{let e=t.snapshot.memo;e.lazyLoaded!==void 0&&(gc.add(t),e.lazyIsolated!==void 0&&e.lazyIsolated===!1&&mc.add(t))});Lt("commit.pooling",({commits:t})=>{t.forEach(e=>{gc.has(e.component)&&(mc.has(e.component)?(e.isolate=!1,mc.delete(e.component)):e.isolate=!0,gc.delete(e.component))})});var Md=Bt(hi());Lt("effect",({component:t,effects:e,cleanup:i})=>{let r=e.url;r&&Object.entries(r).forEach(([n,s])=>{let{name:o,as:l,use:_,alwaysShow:b,except:m}=qy(n,s);l||(l=o);let y=[!1,null,void 0].includes(m)?Wr(t.ephemeral,o):m,{replace:T,push:g,pop:d}=fc(l,y,b,m);if(_==="replace"){let u=Md.default.effect(()=>{T(Wr(t.reactive,o))});i(()=>Md.default.release(u))}else if(_==="push"){let u=Lt("commit",({component:h,succeed:p})=>{if(t!==h)return;let c=Wr(t.canonical,o);p(()=>{let f=Wr(t.canonical,o);JSON.stringify(c)!==JSON.stringify(f)&&g(f)})}),w=d(async h=>{await t.$wire.set(o,h),document.querySelectorAll("input").forEach(p=>{p._x_forceModelUpdate&&p._x_forceModelUpdate(p._x_model.get())})});i(()=>{u(),w()})}})});function qy(t,e){let i={use:"replace",alwaysShow:!1};return typeof e=="string"?{...i,name:e,as:e}:{...{...i,name:t,as:t},...e}}Lt("request",({options:t})=>{window.Echo&&(t.headers["X-Socket-ID"]=window.Echo.socketId())});Lt("effect",({component:t,effects:e})=>{(e.listeners||[]).forEach(r=>{if(r.startsWith("echo")){if(typeof window.Echo>"u"){console.warn("Laravel Echo cannot be found");return}let n=r.split(/(echo:|echo-)|:|,/);n[1]=="echo:"&&n.splice(2,0,"channel",void 0),n[2]=="notification"&&n.push(void 0,void 0);let[s,o,l,_,b,m,y]=n;if(["channel","private","encryptedPrivate"].includes(l)){let T=g=>hs(t,r,[g]);window.Echo[l](b).listen(y,T),t.addCleanup(()=>{window.Echo[l](b).stopListening(y,T)})}else if(l=="presence")if(["here","joining","leaving"].includes(y))window.Echo.join(b)[y](T=>{hs(t,r,[T])});else{let T=g=>hs(t,r,[g]);window.Echo.join(b).listen(y,T),t.addCleanup(()=>{window.Echo.leaveChannel(b)})}else l=="notification"?window.Echo.private(b).notification(T=>{hs(t,r,[T])}):console.warn("Echo channel type not yet supported")}})});var Hh=new WeakSet;Lt("component.init",({component:t})=>{t.snapshot.memo.isolate===!0&&Hh.add(t)});Lt("commit.pooling",({commits:t})=>{t.forEach(e=>{Hh.has(e.component)&&(e.isolate=!0)})});Hy()&&Alpine.navigate.disableProgressBar();document.addEventListener("alpine:navigate",t=>Yc("livewire:navigate",t));document.addEventListener("alpine:navigating",t=>Yc("livewire:navigating",t));document.addEventListener("alpine:navigated",t=>Yc("livewire:navigated",t));function Yc(t,e){let i=new CustomEvent(t,{cancelable:!0,bubbles:!0,detail:e.detail});document.dispatchEvent(i),i.defaultPrevented&&e.preventDefault()}
82function Vy(t,e,i){t.redirectUsingNavigate?Alpine.navigate(e):i()}function Hy(){return!!(document.querySelector("[data-no-progress-bar]")||window.livewireScriptConfig&&window.livewireScriptConfig.progressBar===!1)}Lt("effect",({effects:t})=>{if(!t.redirect)return;let e=t.redirect;Vy(t,e,()=>{window.location.href=e})});var _l=Bt(hi());Lt("morph.added",({el:t})=>{t.__addedByMorph=!0});cr("transition",({el:t,directive:e,component:i,cleanup:r})=>{for(let o=0;o<t.attributes.length;o++)if(t.attributes[o].name.startsWith("wire:show")){_l.default.bind(t,{[e.rawName.replace("wire:transition","x-transition")]:e.expression});return}let n=_l.default.reactive({state:!t.__addedByMorph});_l.default.bind(t,{[e.rawName.replace("wire:","x-")]:"","x-show"(){return n.state}}),t.__addedByMorph&&setTimeout(()=>n.state=!0);let s=[];s.push(Lt("morph.removing",({el:o,skip:l})=>{l(),o.addEventListener("transitionend",()=>{o.remove()}),n.state=!1,s.push(Lt("morph",({component:_})=>{_===i&&(o.remove(),s.forEach(b=>b()))}))})),r(()=>s.forEach(o=>o()))});var zy=new mh;function Wy(t,e){zy.each(t,i=>{i.callback(),i.callback=()=>{}}),e()}var Rd=Bt(hi());Lt("directive.init",({el:t,directive:e,cleanup:i,component:r})=>{if(["snapshot","effects","model","init","loading","poll","ignore","id","data","key","target","dirty"].includes(e.value)||Mv(e.value))return;let n=e.rawName.replace("wire:","x-on:");e.value==="submit"&&!e.modifiers.includes("prevent")&&(n=n+".prevent");let s=Rd.default.bind(t,{[n](o){let l=()=>{Wy(r,()=>{Rd.default.evaluate(t,"$wire."+e.expression,{scope:{$event:o}})})};t.__livewire_confirm?t.__livewire_confirm(()=>{l()},()=>{o.stopImmediatePropagation()}):l()}});i(s)});var rr=Bt(hi());rr.default.addInitSelector(()=>"[wire\\:navigate]");rr.default.addInitSelector(()=>"[wire\\:navigate\\.hover]");rr.default.addInitSelector(()=>"[wire\\:navigate\\.preserve-scroll]");rr.default.addInitSelector(()=>"[wire\\:navigate\\.preserve-scroll\\.hover]");rr.default.addInitSelector(()=>"[wire\\:navigate\\.hover\\.preserve-scroll]");rr.default.interceptInit(rr.default.skipDuringClone(t=>{t.hasAttribute("wire:navigate")?rr.default.bind(t,{"x-navigate":!0}):t.hasAttribute("wire:navigate.hover")?rr.default.bind(t,{"x-navigate.hover":!0}):t.hasAttribute("wire:navigate.preserve-scroll")?rr.default.bind(t,{"x-navigate.preserve-scroll":!0}):t.hasAttribute("wire:navigate.preserve-scroll.hover")?rr.default.bind(t,{"x-navigate.preserve-scroll.hover":!0}):t.hasAttribute("wire:navigate.hover.preserve-scroll")&&rr.default.bind(t,{"x-navigate.hover.preserve-scroll":!0})}));document.addEventListener("alpine:navigating",()=>{Livewire.all().forEach(t=>{t.inscribeSnapshotAndEffectsOnElement()})});cr("confirm",({el:t,directive:e})=>{let i=e.expression,r=e.modifiers.includes("prompt");i=i.replaceAll("\\n",`
83`),i===""&&(i="Are you sure?"),t.__livewire_confirm=(n,s)=>{if(r){let[o,l]=i.split("|");l?prompt(o)===l?n():s():console.warn("Livewire: Must provide expectation with wire:confirm.prompt")}else confirm(i)?n():s()}});var Ky=Bt(hi());Ky.default.addInitSelector(()=>"[wire\\:current]");var vc=new Map;document.addEventListener("livewire:navigated",()=>{vc.forEach(t=>t(new URL(window.location.href)))});Lv("current",({el:t,directive:e,cleanup:i})=>{let r=e.expression,n={exact:e.modifiers.includes("exact"),strict:e.modifiers.includes("strict"),ignore:e.modifiers.includes("ignore")};if(n.ignore||r.startsWith("#")||!t.hasAttribute("href"))return;let s=t.getAttribute("href"),o=new URL(s,window.location.href),l=r.split(" ").filter(String),_=b=>{Gy(o,b,n)?(t.classList.add(...l),t.setAttribute("data-current","")):(t.classList.remove(...l),t.removeAttribute("data-current"))};_(new URL(window.location.href)),vc.set(t,_),i(()=>vc.delete(t))});function Gy(t,e,i){if(t.hostname!==e.hostname)return!1;let r=i.strict?t.pathname:t.pathname.replace(/\/+$/,""),n=i.strict?e.pathname:e.pathname.replace(/\/+$/,"");if(i.exact)return r===n;let s=r.split("/"),o=n.split("/");for(let l=0;l<s.length;l++)if(s[l]!==o[l])return!1;return!0}function Sn(t,e,i,r=null){if(i=e.modifiers.includes("remove")?!i:i,e.modifiers.includes("class")){let n=e.expression.split(" ").filter(String);i?t.classList.add(...n):t.classList.remove(...n)}else if(e.modifiers.includes("attr"))i?t.setAttribute(e.expression,!0):t.removeAttribute(e.expression);else{let n=r??window.getComputedStyle(t,null).getPropertyValue("display"),s=["inline","block","table","flex","grid","inline-flex"].filter(o=>e.modifiers.includes(o))[0]||"inline-block";s=e.modifiers.includes("remove")&&!i?n:s,t.style.display=i?s:"none"}}var yc=new Set,bc=new Set;window.addEventListener("offline",()=>yc.forEach(t=>t()));window.addEventListener("online",()=>
83bc.forEach(t=>t()));cr("offline",({el:t,directive:e,cleanup:i})=>{let r=()=>Sn(t,e,!0),n=()=>Sn(t,e,!1);yc.add(r),bc.add(n),i(()=>{yc.delete(r),bc.delete(n)})});cr("loading",({el:t,directive:e,component:i,cleanup:r})=>{let{targets:n,inverted:s}=Zy(t),[o,l]=Yy(e),_=Xy(i,n,s,[()=>o(()=>Sn(t,e,!0)),()=>l(()=>Sn(t,e,!1))]),b=Jy(i,n,[()=>o(()=>Sn(t,e,!0)),()=>l(()=>Sn(t,e,!1))]);r(()=>{_(),b()})});function Yy(t){if(!t.modifiers.includes("delay")||t.modifiers.includes("none"))return[s=>s(),s=>s()];let e=200,i={shortest:50,shorter:100,short:150,default:200,long:300,longer:500,longest:1e3};Object.keys(i).some(s=>{if(t.modifiers.includes(s))return e=i[s],!0});let r,n=!1;return[s=>{r=setTimeout(()=>{s(),n=!0},e)},async s=>{n?(await s(),n=!1):clearTimeout(r)}]}function Xy(t,e,i,[r,n]){return Lt("commit",({component:s,commit:o,respond:l})=>{s===t&&(e.length>0&&Qy(o,e)===i||(r(),l(()=>{n()})))})}function Jy(t,e,[i,r]){let n=_=>{let{id:b,property:m}=_.detail;return b!==t.id||e.length>0&&!e.map(y=>y.target).includes(m)},s=ml(window,"livewire-upload-start",_=>{n(_)||i()}),o=ml(window,"livewire-upload-finish",_=>{n(_)||r()}),l=ml(window,"livewire-upload-error",_=>{n(_)||r()});return()=>{s(),o(),l()}}function Qy(t,e){let{updates:i,calls:r}=t;return e.some(({target:n,params:s})=>{if(s)return r.some(({method:l,params:_})=>n===l&&s===zh(JSON.stringify(_)));if(Object.keys(i).some(l=>l.includes(".")&&l.split(".")[0]===n?!0:l===n)||r.map(l=>l.method).includes(n))return!0})}function Zy(t){let e=zc(t),i=[],r=!1;if(e.has("target")){let n=e.get("target");n.modifiers.includes("except")&&(r=!0),n.methods.forEach(({method:s,params:o})=>{i.push({target:s,params:o&&o.length>0?zh(JSON.stringify(o)):void 0})})}else{let n=["init","dirty","offline","target","loading","poll","ignore","key","id"];e.all().filter(s=>!n.includes(s.value)).map(s=>s.expression.split("(")[0]).forEach(s=>i.push({target:s}))}return{targets:i,inverted:r}}function zh(t){return btoa(encodeURIComponent(t))}cr("stream",({el:t,directive:e,cleanup:i})=>{let{expression:r,modifiers:n}=e,s=Lt("stream",({name:o,content:l,replace:_})=>{o===r&&(n.includes("replace")||_?t.innerHTML=l:t.insertAdjacentHTML("beforeend",l))});i(s)});Lt("request",({respond:t})=>{t(e=>{let i=e.response;i.headers.has("X-Livewire-Stream")&&(e.response={ok:!0,redirected:!1,status:200,async text(){let r=await eb(i,n=>{ti("stream",n)});return yh(r)&&(this.ok=!1),r}})})});async function eb(t,e){let i=t.body.getReader(),r="";for(;;){let{done:n,value:s}=await i.read(),l=new TextDecoder().decode(s),[_,b]=tb(r+l);if(_.forEach(m=>{e(m)}),r=b,n)return r}}function tb(t){let e=/({"stream":true.*?"endStream":true})/g,i=t.match(e),r=[];if(i)for(let s=0;s<i.length;s++)r.push(JSON.parse(i[s]).body);let n=t.replace(e,"");return[r,n]}cr("replace",({el:t,directive:e})=>{e.modifiers.includes("self")?t.__livewire_replace_self=!0:t.__livewire_replace=!0});cr("ignore",({el:t,directive:e})=>{e.modifiers.includes("self")?t.__livewire_ignore_self=!0:e.modifiers.includes("children")?t.__livewire_ignore_children=!0:t.__livewire_ignore=!0});var Dd=Bt(hi());Dd.default.interceptInit(t=>{t.hasAttribute("wire:cloak")&&Dd.default.mutateDom(()=>t.removeAttribute("wire:cloak"))});var Wh=new mh;Lt("commit",({component:t,respond:e})=>{e(()=>{setTimeout(()=>{Wh.each(t,i=>i(!1))})})});cr("dirty",({el:t,directive:e,component:i})=>{let r=ib(t),n=!1,s=t.style.display,o=l=>{Sn(t,e,l,s),n=l};Wh.add(i,o),Alpine.effect(()=>{let l=!1;if(r.length===0)l=JSON.stringify(i.canonical)!==JSON.stringify(i.reactive);else for(let _=0;_<r.length&&!l;_++){let b=r[_];l=JSON.stringify(Wr(i.canonical,b))!==JSON.stringify(Wr(i.reactive,b))}n!==l&&o(l),n=l})});function ib(t){let e=zc(t),i=[];return e.has("model")&&i.push(e.get("model").expression),e.has("target")&&(i=i.concat(e.get("target").expression.split(",").map(r=>r.trim()))),i}var rb=Bt(hi());cr("model",({el:t,directive:e,component:i,cleanup:r})=>{let{expression:n,modifiers:s}=e;if(!n)return console.warn("Livewire: [wire:model] is missing a value.",t);if(Kh(i,n))return console.warn('Livewire: [wire:model="'+n+'"] property does not exist on component: ['+i.name+"]",t);if(t.type&&t.type.toLowerCase()==="file")return ev(t,n,i,r);let o=s.includes("live"),l=s.includes("lazy")||s.includes("change"),_=s.includes("blur"),b=s.includes("debounce"),m=n.startsWith("$parent")?()=>i.$wire.$parent.$commit():()=>i.$wire.$commit(),y=sb(t)&&!b&&o?ob(m,150):m;rb.default.bind(t,{"@change"(){l&&m()},"@blur"(){_&&m()},["x-model"+nb(s)](){return{get(){return Wr(i.$wire,n)},set(T){Ma(i.$wire,n,T),o&&!l&&!_&&y()}}}})});function nb(t){return t=t.filter(e=>!["lazy","defer"].includes(e)),t.length===0?"":"."+t.join(".")}
83function sb(t){return["INPUT","TEXTAREA"].includes(t.tagName.toUpperCase())&&!["checkbox","radio"].includes(t.type)||t.tagName.toUpperCase()==="UI-SLIDER"}function Kh(t,e){if(e.startsWith("$parent")){let r=Yr(t.el.parentElement,!1);return r?Kh(r,e.split("$parent.")[1]):!0}let i=e.split(".")[0];return!Object.keys(t.canonical).includes(i)}function ob(t,e){var i;return function(){var r=this,n=arguments,s=function(){i=null,t.apply(r,n)};clearTimeout(i),i=setTimeout(s,e)}}var ab=Bt(hi());cr("init",({el:t,directive:e})=>{let i=e.expression??"$refresh";ab.default.evaluate(t,`$wire.${i}`)});var lb=Bt(hi());cr("poll",({el:t,directive:e})=>{let i=bb(e.modifiers,2e3),{start:r,pauseWhile:n,throttleWhile:s,stopWhen:o}=ub(()=>{cb(t,e)},i);r(),s(()=>hb()&&mb(e)),n(()=>gb(e)&&vb(t)),n(()=>pb(t)),n(()=>fb()),o(()=>yb(t))});function cb(t,e){lb.default.evaluate(t,e.expression?"$wire."+e.expression:"$wire.$commit()")}function ub(t,e=2e3){let i=[],r=[],n=[];return{start(){let s=db(e,()=>{if(n.some(o=>o()))return s();i.some(o=>o())||r.some(o=>o())&&Math.random()<.95||t()})},pauseWhile(s){i.push(s)},throttleWhile(s){r.push(s)},stopWhen(s){n.push(s)}}}var wn=[];function db(t,e){if(!wn[t]){let i={timer:setInterval(()=>i.callbacks.forEach(r=>r()),t),callbacks:new Set};wn[t]=i}return wn[t].callbacks.add(e),()=>{wn[t].callbacks.delete(e),wn[t].callbacks.size===0&&(clearInterval(wn[t].timer),delete wn[t])}}var Xc=!1;window.addEventListener("offline",()=>Xc=!0);window.addEventListener("online",()=>Xc=!1);function fb(){return Xc}var Gh=!1;document.addEventListener("visibilitychange",()=>{Gh=document.hidden},!1);function hb(){return Gh}function pb(t){return!zc(t).has("poll")}function mb(t){return!t.modifiers.includes("keep-alive")}function gb(t){return t.modifiers.includes("visible")}function vb(t){let e=t.getBoundingClientRect();return!(e.top<(window.innerHeight||document.documentElement.clientHeight)&&e.left<(window.innerWidth||document.documentElement.clientWidth)&&e.bottom>0&&e.right>0)}function yb(t){return t.isConnected===!1}function bb(t,e){let i,r=t.find(s=>s.match(/([0-9]+)ms/)),n=t.find(s=>s.match(/([0-9]+)s/));return r?i=Number(r.replace("ms","")):n&&(i=Number(n.replace("s",""))*1e3),i||e}var El=Bt(hi());El.default.interceptInit(t=>{for(let e=0;e<t.attributes.length;e++)if(t.attributes[e].name.startsWith("wire:show")){let{name:i,value:r}=t.attributes[e],n=i.split("wire:show")[1],s=r.startsWith("!")?"!$wire."+r.slice(1).trim():"$wire."+r.trim();El.default.bind(t,{["x-show"+n](){return El.default.evaluate(t,s)}})}});var Sl=Bt(hi());Sl.default.interceptInit(t=>{for(let e=0;e<t.attributes.length;e++)if(t.attributes[e].name.startsWith("wire:text")){let{name:i,value:r}=t.attributes[e],n=i.split("wire:text")[1],s=r.startsWith("!")?"!$wire."+r.slice(1).trim():"$wire."+r.trim();Sl.default.bind(t,{["x-text"+n](){return Sl.default.evaluate(t,s)}})}});var br={directive:cr,dispatchTo:Hc,start:yy,first:xv,find:Av,getByName:Cv,all:Ov,hook:Lt,trigger:ti,triggerAsync:wh,dispatch:kv,on:Pv,get navigate(){return Gc.default.navigate}},Jc=t=>console.warn(`Detected multiple instances of ${t} running`);window.Livewire&&Jc("Livewire");window.Alpine&&Jc("Alpine");window.Livewire=br;window.Alpine=Gc.default;window.livewireScriptConfig===void 0&&(window.Alpine.__fromLivewire=!0,document.addEventListener("DOMContentLoaded",()=>{window.Alpine.__fromLivewire===void 0&&Jc("Alpine"),br.start()}));var Ut=Gc.default;let wc=()=>{};const Nd=(t,e=void 0)=>(typeof t=="function"&&(t=t()),typeof t=="object"&&(t=JSON.stringify(t)),e!==void 0?window.navigator.clipboard.write([new ClipboardItem({[e]:new Blob([t],{type:e})})]).then(wc):window.navigator.clipboard.writeText(t).then(wc));function _a(t){t.magic("clipboard",()=>Nd),t.directive("clipboard",(e,{modifiers:i,expression:r},{evaluateLater:n,cleanup:s})=>{const o=i.includes("raw")?_=>_(r):n(r),l=()=>
83o(Nd);e.addEventListener("click",l),s(()=>{e.removeEventListener("click",l)})})}_a.configure=t=>(t.hasOwnProperty("onCopy")&&typeof t.onCopy=="function"&&(wc=t.onCopy),_a);var wb=Object.create,Qc=Object.defineProperty,_b=Object.getPrototypeOf,Eb=Object.prototype.hasOwnProperty,Sb=Object.getOwnPropertyNames,Tb=Object.getOwnPropertyDescriptor,Cb=t=>Qc(t,"__esModule",{value:!0}),Yh=(t,e)=>()=>(e||(e={exports:{}},t(e.exports,e)),e.exports),Ab=(t,e,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Sb(e))!Eb.call(t,r)&&r!=="default"&&Qc(t,r,{get:()=>e[r],enumerable:!(i=Tb(e,r))||i.enumerable});return t},Xh=t=>Ab(Cb(Qc(t!=null?wb(_b(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t),xb=Yh(t=>{Object.defineProperty(t,"__esModule",{value:!0});function e(F){var L=F.getBoundingClientRect();return{width:L.width,height:L.height,top:L.top,right:L.right,bottom:L.bottom,left:L.left,x:L.left,y:L.top}}function i(F){if(F==null)return window;if(F.toString()!=="[object Window]"){var L=F.ownerDocument;return L&&L.defaultView||window}return F}function r(F){var L=i(F),V=L.pageXOffset,ce=L.pageYOffset;return{scrollLeft:V,scrollTop:ce}}function n(F){var L=i(F).Element;return F instanceof L||F instanceof Element}function s(F){var L=i(F).HTMLElement;return F instanceof L||F instanceof HTMLElement}function o(F){if(typeof ShadowRoot>"u")return!1;var L=i(F).ShadowRoot;return F instanceof L||F instanceof ShadowRoot}function l(F){return{scrollLeft:F.scrollLeft,scrollTop:F.scrollTop}}function _(F){return F===i(F)||!s(F)?r(F):l(F)}function b(F){return F?(F.nodeName||"").toLowerCase():null}function m(F){return((n(F)?F.ownerDocument:F.document)||window.document).documentElement}function y(F){return e(m(F)).left+r(F).scrollLeft}function T(F){return i(F).getComputedStyle(F)}function g(F){var L=T(F),V=L.overflow,ce=L.overflowX,ue=L.overflowY;return/auto|scroll|overlay|hidden/.test(V+ue+ce)}function d(F,L,V){V===void 0&&(V=!1);var ce=m(L),ue=e(F),Oe=s(L),$e={scrollLeft:0,scrollTop:0},Ie={x:0,y:0};return(Oe||!Oe&&!V)&&((b(L)!=="body"||g(ce))&&($e=_(L)),s(L)?(Ie=e(L),Ie.x+=L.clientLeft,Ie.y+=L.clientTop):ce&&(Ie.x=y(ce))),{x:ue.left+$e.scrollLeft-Ie.x,y:ue.top+$e.scrollTop-Ie.y,width:ue.width,height:ue.height}}function u(F){var L=e(F),V=F.offsetWidth,ce=F.offsetHeight;return Math.abs(L.width-V)<=1&&(V=L.width),Math.abs(L.height-ce)<=1&&(ce=L.height),{x:F.offsetLeft,y:F.offsetTop,width:V,height:ce}}function w(F){return b(F)==="html"?F:F.assignedSlot||F.parentNode||(o(F)?F.host:null)||m(F)}function h(F){return["html","body","#document"].indexOf(b(F))>=0?F.ownerDocument.body:s(F)&&g(F)?F:h(w(F))}function p(F,L){var V;L===void 0&&(L=[]);var ce=h(F),ue=ce===((V=F.ownerDocument)==null?void 0:V.body),Oe=i(ce),$e=ue?[Oe].concat(Oe.visualViewport||[],g(ce)?ce:[]):ce,Ie=L.concat($e);return ue?Ie:Ie.concat(p(w($e)))}function c(F){return["table","td","th"].indexOf(b(F))>=0}function f(F){return!s(F)||T(F).position==="fixed"?null:F.offsetParent}function v(F){var L=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,V=navigator.userAgent.indexOf("Trident")!==-1;if(V&&s(F)){var ce=T(F);if(ce.position==="fixed")return null}for(var ue=w(F);s(ue)&&["html","body"].indexOf(b(ue))<0;){var Oe=T(ue);if(Oe.transform!=="none"||Oe.perspective!=="none"||Oe.contain==="paint"||["transform","perspective"].indexOf(Oe.willChange)!==-1||L&&Oe.willChange==="filter"||L&&Oe.filter&&Oe.filter!=="none")return ue;ue=ue.parentNode}return null}function E(F){for(var L=i(F),V=f(F);V&&c(V)&&T(V).position==="static";)V=f(V);return V&&(b(V)==="html"||b(V)==="body"&&T(V).position==="static")?L:V||v(F)||L}var C="top",O="bottom",A="right",I="left",N="auto",D=[C,O,A,I],U="start",Q="end",he="clippingParents",se="viewport",fe="popper",pe="reference",st=D.reduce(function(F,L){return F.concat([L+"-"+U,L+"-"+Q])},[]),Ee=[].concat(D,[N]).reduce(function(F,L){return F.concat([L,L+"-"+U,L+"-"+Q])},[]),oe="beforeRead",_e="read",Ce="afterRead",ke="beforeMain",ae="main",K="afterMain",ve="beforeWrite",Le="write",tt="afterWrite",at=[oe,_e,Ce,ke,ae,K,ve,Le,tt];function ut(F){var L=new Map,V=new Set,ce=[];F.forEach(function(Oe){L.set(Oe.name,Oe)});function ue(Oe){V.add(Oe.name);var $e=[].concat(Oe.requires||[],Oe.requiresIfExists||[]);$e.forEach(function(Ie){if(!V.has(Ie)){var Ye=L.get(Ie);Ye&&ue(Ye)}}),ce.push(Oe)}return F.forEach(function(Oe){V.has(Oe.name)||ue(Oe)}),ce}function ht(F){var L=ut(F);return at.reduce(function(V,ce){return V.concat(L.filter(function(ue){return ue.phase===ce}))},[])}function bt(F){var L;return function(){return L||(L=new Promise(function(V){Promise.resolve().then(function(){L=void 0,V(F())})})),L}}function wt(F){for(var L=arguments.length,V=new Array(L>1?L-1:0),ce=1;ce<L;ce++)V[ce-1]=arguments[ce];return[].concat(V).reduce(function(ue,Oe){return ue.replace(/%s/,Oe)},F)}
vendor: 18,524 bytes, lines 83-87
83var zt='Popper: modifier "%s" provided an invalid %s property, expected %s but got %s',Re='Popper: modifier "%s" requires "%s", but "%s" modifier is not available',le=["name","enabled","phase","fn","effect","requires","options"];function we(F){F.forEach(function(L){Object.keys(L).forEach(function(V){switch(V){case"name":typeof L.name!="string"&&console.error(wt(zt,String(L.name),'"name"','"string"','"'+String(L.name)+'"'));break;case"enabled":typeof L.enabled!="boolean"&&console.error(wt(zt,L.name,'"enabled"','"boolean"','"'+String(L.enabled)+'"'));case"phase":at.indexOf(L.phase)<0&&console.error(wt(zt,L.name,'"phase"',"either "+at.join(", "),'"'+String(L.phase)+'"'));break;case"fn":typeof L.fn!="function"&&console.error(wt(zt,L.name,'"fn"','"function"','"'+String(L.fn)+'"'));break;case"effect":typeof L.effect!="function"&&console.error(wt(zt,L.name,'"effect"','"function"','"'+String(L.fn)+'"'));break;case"requires":Array.isArray(L.requires)||console.error(wt(zt,L.name,'"requires"','"array"','"'+String(L.requires)+'"'));break;case"requiresIfExists":Array.isArray(L.requiresIfExists)||console.error(wt(zt,L.name,'"requiresIfExists"','"array"','"'+String(L.requiresIfExists)+'"'));break;case"options":case"data":break;default:console.error('PopperJS: an invalid property has been provided to the "'+L.name+'" modifier, valid properties are '+le.map(function(ce){return'"'+ce+'"'}).join(", ")+'; but "'+V+'" was provided.')}L.requires&&L.requires.forEach(function(ce){F.find(function(ue){return ue.name===ce})==null&&console.error(wt(Re,String(L.name),ce,ce))})})})}function Ze(F,L){var V=new Set;return F.filter(function(ce){var ue=L(ce);if(!V.has(ue))return V.add(ue),!0})}function je(F){return F.split("-")[0]}function Tt(F){var L=F.reduce(function(V,ce){var ue=V[ce.name];return V[ce.name]=ue?Object.assign({},ue,ce,{options:Object.assign({},ue.options,ce.options),data:Object.assign({},ue.data,ce.data)}):ce,V},{});return Object.keys(L).map(function(V){return L[V]})}function Xe(F){var L=i(F),V=m(F),ce=L.visualViewport,ue=V.clientWidth,Oe=V.clientHeight,$e=0,Ie=0;return ce&&(ue=ce.width,Oe=ce.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||($e=ce.offsetLeft,Ie=ce.offsetTop)),{width:ue,height:Oe,x:$e+y(F),y:Ie}}var ne=Math.max,me=Math.min,Ne=Math.round;function vt(F){var L,V=m(F),ce=r(F),ue=(L=F.ownerDocument)==null?void 0:L.body,Oe=ne(V.scrollWidth,V.clientWidth,ue?ue.scrollWidth:0,ue?ue.clientWidth:0),$e=ne(V.scrollHeight,V.clientHeight,ue?ue.scrollHeight:0,ue?ue.clientHeight:0),Ie=-ce.scrollLeft+y(F),Ye=-ce.scrollTop;return T(ue||V).direction==="rtl"&&(Ie+=ne(V.clientWidth,ue?ue.clientWidth:0)-Oe),{width:Oe,height:$e,x:Ie,y:Ye}}function it(F,L){var V=L.getRootNode&&L.getRootNode();if(F.contains(L))return!0;if(V&&o(V)){var ce=L;do{if(ce&&F.isSameNode(ce))return!0;ce=ce.parentNode||ce.host}while(ce)}return!1}function pt(F){return Object.assign({},F,{left:F.x,top:F.y,right:F.x+F.width,bottom:F.y+F.height})}function Dt(F){var L=e(F);return L.top=L.top+F.clientTop,L.left=L.left+F.clientLeft,L.bottom=L.top+F.clientHeight,L.right=L.left+F.clientWidth,L.width=F.clientWidth,L.height=F.clientHeight,L.x=L.left,L.y=L.top,L}function pi(F,L){return L===se?pt(Xe(F)):s(L)?Dt(L):pt(vt(m(F)))}function ui(F){var L=p(w(F)),V=["absolute","fixed"].indexOf(T(F).position)>=0,ce=V&&s(F)?E(F):F;return n(ce)?L.filter(function(ue){return n(ue)&&it(ue,ce)&&b(ue)!=="body"}):[]}function Mi(F,L,V){var ce=L==="clippingParents"?ui(F):[].concat(L),ue=[].concat(ce,[V]),Oe=ue[0],$e=ue.reduce(function(Ie,Ye){var rt=pi(F,Ye);return Ie.top=ne(rt.top,Ie.top),Ie.right=me(rt.right,Ie.right),Ie.bottom=me(rt.bottom,Ie.bottom),Ie.left=ne(rt.left,Ie.left),Ie},pi(F,Oe));return $e.width=$e.right-$e.left,$e.height=$e.bottom-$e.top,$e.x=$e.left,$e.y=$e.top,$e}function oi(F){return F.split("-")[1]}function ii(F){return["top","bottom"].indexOf(F)>=0?"x":"y"}function Xi(F){var L=F.reference,V=F.element,ce=F.placement,ue=ce?je(ce):null,Oe=ce?oi(ce):null,$e=L.x+L.width/2-V.width/2,Ie=L.y+L.height/2-V.height/2,Ye;switch(ue){case C:Ye={x:$e,y:L.y-V.height};break;case O:Ye={x:$e,y:L.y+L.height};break;case A:Ye={x:L.x+L.width,y:Ie};break;case I:Ye={x:L.x-V.width,y:Ie};break;default:Ye={x:L.x,y:L.y}}var rt=ue?ii(ue):null;if(rt!=null){var Be=rt==="y"?"height":"width";switch(Oe){case U:Ye[rt]=Ye[rt]-(L[Be]/2-V[Be]/2);break;case Q:Ye[rt]=Ye[rt]+(L[Be]/2-V[Be]/2);break}}return Ye}function Fr(){return{top:0,right:0,bottom:0,left:0}}function qi(F){return Object.assign({},Fr(),F)}function jr(F,L){return L.reduce(function(V,ce){return V[ce]=F,V},{})}function Ji(F,L){L===void 0&&(L={});var V=L,ce=V.placement,ue=ce===void 0?F.placement:ce,Oe=V.boundary,$e=Oe===void 0?he:Oe,Ie=V.rootBoundary,Ye=Ie===void 0?se:Ie,rt=V.elementContext,Be=rt===void 0?fe:rt,Pt=V.altBoundary,Kt=Pt===void 0?!1:Pt,Ot=V.padding,mt=Ot===void 0?0:Ot,kt=qi(typeof mt!="number"?mt:jr(mt,D)),xt=Be===fe?pe:fe,Gt=F.elements.reference,Nt=F.rects.popper,Yt=F.elements[Kt?xt:Be],dt=Mi(n(Yt)?Yt:Yt.contextElement||m(F.elements.popper),$e,Ye),jt=e(Gt),It=Xi({reference:jt,element:Nt,placement:ue}),qt=pt(Object.assign({},Nt,It)),Vt=Be===fe?qt:jt,Qt={top:dt.top-Vt.top+kt.top,bottom:Vt.bottom-dt.bottom+kt.bottom,left:dt.left-Vt.left+kt.left,right:Vt.right-dt.right+kt.right},Zt=F.modifiersData.offset;if(Be===fe&&Zt){var ni=Zt[ue];Object.keys(Qt).forEach(function(Vi){var vi=[A,O].indexOf(Vi)>=0?1:-1,fr=[C,O].indexOf(Vi)>=0?"y":"x";Qt[Vi]+=ni[fr]*vi})}return Qt}var en="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",Qi="Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.",Zi={placement:"bottom",modifiers:[],strategy:"absolute"};function Ei(){for(var F=arguments.length,L=new Array(F),V=0;V<F;V++)L[V]=arguments[V];return!L.some(function(ce){return!(ce&&typeof ce.getBoundingClientRect=="function")})}function ri(F){F===void 0&&(F={});var L=F,V=L.defaultModifiers,ce=V===void 0?[]:V,ue=L.defaultOptions,Oe=ue===void 0?Zi:ue;return function(Ie,Ye,rt){rt===void 0&&(rt=Oe);var Be={placement:"bottom",orderedModifiers:[],options:Object.assign({},Zi,Oe),modifiersData:{},elements:{reference:Ie,popper:Ye},attributes:{},styles:{}},Pt=[],Kt=!1,Ot={state:Be,setOptions:function(Gt){kt(),Be.options=Object.assign({},Oe,Be.options,Gt),Be.scrollParents={reference:n(Ie)?p(Ie):Ie.contextElement?p(Ie.contextElement):[],popper:p(Ye)};var Nt=ht(Tt([].concat(ce,Be.options.modifiers)));Be.orderedModifiers=Nt.filter(function(Zt){return Zt.enabled});{var Yt=Ze([].concat(Nt,Be.options.modifiers),function(Zt){var ni=Zt.name;return ni});if(we(Yt),je(Be.options.placement)===N){var dt=Be.orderedModifiers.find(function(Zt){var ni=Zt.name;return ni==="flip"});dt||console.error(['Popper: "auto" placements require the "flip" modifier be',"present and enabled to work."].join(" "))}var jt=T(Ye),It=jt.marginTop,qt=jt.marginRight,Vt=jt.marginBottom,Qt=jt.marginLeft;[It,qt,Vt,Qt].some(function(Zt){return parseFloat(Zt)})&&console.warn(['Popper: CSS "margin" styles cannot be used to apply padding',"between the popper and its reference element or boundary.","To replicate margin, use the `offset` modifier, as well as","the `padding` option in the `preventOverflow` and `flip`","modifiers."].join(" "))}return mt(),Ot.update()},forceUpdate:function(){if(!Kt){var Gt=Be.elements,Nt=Gt.reference,Yt=Gt.popper;if(!Ei(Nt,Yt)){console.error(en);return}Be.rects={reference:d(Nt,E(Yt),Be.options.strategy==="fixed"),popper:u(Yt)},Be.reset=!1,Be.placement=Be.options.placement,Be.orderedModifiers.forEach(function(ni){return Be.modifiersData[ni.name]=Object.assign({},ni.data)});for(var dt=0,jt=0;jt<Be.orderedModifiers.length;jt++){if(dt+=1,dt>100){console.error(Qi);break}if(Be.reset===!0){Be.reset=!1,jt=-1;continue}var It=Be.orderedModifiers[jt],qt=It.fn,Vt=It.options,Qt=Vt===void 0?{}:Vt,Zt=It.name;typeof qt=="function"&&(Be=qt({state:Be,options:Qt,name:Zt,instance:Ot})||Be)}}},update:bt(function(){return new Promise(function(xt){Ot.forceUpdate(),xt(Be)})}),destroy:function(){kt(),Kt=!0}};if(!Ei(Ie,Ye))return console.error(en),Ot;Ot.setOptions(rt).then(function(xt){!Kt&&rt.onFirstUpdate&&rt.onFirstUpdate(xt)});function mt(){Be.orderedModifiers.forEach(function(xt){var Gt=xt.name,Nt=xt.options,Yt=Nt===void 0?{}:Nt,dt=xt.effect;if(typeof dt=="function"){var jt=dt({state:Be,name:Gt,instance:Ot,options:Yt}),It=function(){};Pt.push(jt||It)}})}function kt(){Pt.forEach(function(xt){return xt()}),Pt=[]}return Ot}}var dr={passive:!0};function dn(F){var L=F.state,V=F.instance,ce=F.options,ue=ce.scroll,Oe=ue===void 0?!0:ue,$e=ce.resize,Ie=$e===void 0?!0:$e,Ye=i(L.elements.popper),rt=[].concat(L.scrollParents.reference,L.scrollParents.popper);return Oe&&rt.forEach(function(Be){Be.addEventListener("scroll",V.update,dr)}),Ie&&Ye.addEventListener("resize",V.update,dr),function(){Oe&&rt.forEach(function(Be){Be.removeEventListener("scroll",V.update,dr)}),Ie&&Ye.removeEventListener("resize",V.update,dr)}}var Er={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:dn,data:{}};function fn(F){var L=F.state,V=F.name;L.modifiersData[V]=Xi({reference:L.rects.reference,element:L.rects.popper,placement:L.placement})}var Sr={name:"popperOffsets",enabled:!0,phase:"read",fn,data:{}},tn={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Tr(F){var L=F.x,V=F.y,ce=window,ue=ce.devicePixelRatio||1;return{x:Ne(Ne(L*ue)/ue)||0,y:Ne(Ne(V*ue)/ue)||0}}function Cr(F){var L,V=F.popper,ce=F.popperRect,ue=F.placement,Oe=F.offsets,$e=F.position,Ie=F.gpuAcceleration,Ye=F.adaptive,rt=F.roundOffsets,Be=rt===!0?Tr(Oe):typeof rt=="function"?rt(Oe):Oe,Pt=Be.x,Kt=Pt===void 0?0:Pt,Ot=Be.y,mt=Ot===void 0?0:Ot,kt=Oe.hasOwnProperty("x"),xt=Oe.hasOwnProperty("y"),Gt=I,Nt=C,Yt=window;if(Ye){var dt=E(V),jt="clientHeight",It="clientWidth";dt===i(V)&&(dt=m(V),T(dt).position!=="static"&&(jt="scrollHeight",It="scrollWidth")),dt=dt,ue===C&&(Nt=O,mt-=dt[jt]-ce.height,mt*=Ie?1:-1),ue===I&&(Gt=A,Kt-=dt[It]-ce.width,Kt*=Ie?1:-1)}var qt=Object.assign({position:$e},Ye&&tn);if(Ie){var Vt;return Object.assign({},qt,(Vt={},Vt[Nt]=xt?"0":"",Vt[Gt]=kt?"0":"",Vt.transform=(Yt.devicePixelRatio||1)<2?"translate("+Kt+"px, "+mt+"px)":"translate3d("+Kt+"px, "+mt+"px, 0)",Vt))}return Object.assign({},qt,(L={},L[Nt]=xt?mt+"px":"",L[Gt]=kt?Kt+"px":"",L.transform="",L))}function z(F){var L=F.state,V=F.options,ce=V.gpuAcceleration,ue=ce===void 0?!0:ce,Oe=V.adaptive,$e=Oe===void 0?!0:Oe,Ie=V.roundOffsets,Ye=Ie===void 0?!0:Ie;{var rt=T(L.elements.popper).transitionProperty||"";$e&&["transform","top","right","bottom","left"].some(function(Pt){return rt.indexOf(Pt)>=0})&&console.warn(["Popper: Detected CSS transitions on at least one of the following",'CSS properties: "transform", "top", "right", "bottom", "left".',`
84
85`,'Disable the "computeStyles" modifier\'s `adaptive` option to allow',"for smooth transitions, or remove these properties from the CSS","transition declaration on the popper element if only transitioning","opacity or background-color for example.",`
86
87`,"We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "))}var Be={placement:je(L.placement),popper:L.elements.popper,popperRect:L.rects.popper,gpuAcceleration:ue};L.modifiersData.popperOffsets!=null&&(L.styles.popper=Object.assign({},L.styles.popper,Cr(Object.assign({},Be,{offsets:L.modifiersData.popperOffsets,position:L.options.strategy,adaptive:$e,roundOffsets:Ye})))),L.modifiersData.arrow!=null&&(L.styles.arrow=Object.assign({},L.styles.arrow,Cr(Object.assign({},Be,{offsets:L.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:Ye})))),L.attributes.popper=Object.assign({},L.attributes.popper,{"data-popper-placement":L.placement})}var x={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:z,data:{}};function P(F){var L=F.state;Object.keys(L.elements).forEach(function(V){var ce=L.styles[V]||{},ue=L.attributes[V]||{},Oe=L.elements[V];!s(Oe)||!b(Oe)||(Object.assign(Oe.style,ce),Object.keys(ue).forEach(function($e){var Ie=ue[$e];Ie===!1?Oe.removeAttribute($e):Oe.setAttribute($e,Ie===!0?"":Ie)}))})}function B(F){var L=F.state,V={popper:{position:L.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(L.elements.popper.style,V.popper),L.styles=V,L.elements.arrow&&Object.assign(L.elements.arrow.style,V.arrow),function(){Object.keys(L.elements).forEach(function(ce){var ue=L.elements[ce],Oe=L.attributes[ce]||{},$e=Object.keys(L.styles.hasOwnProperty(ce)?L.styles[ce]:V[ce]),Ie=$e.reduce(function(Ye,rt){return Ye[rt]="",Ye},{});!s(ue)||!b(ue)||(Object.assign(ue.style,Ie),Object.keys(Oe).forEach(function(Ye){ue.removeAttribute(Ye)}))})}}var H={name:"applyStyles",enabled:!0,phase:"write",fn:P,effect:B,requires:["computeStyles"]};function G(F,L,V){var ce=je(F),ue=[I,C].indexOf(ce)>=0?-1:1,Oe=typeof V=="function"?V(Object.assign({},L,{placement:F})):V,$e=Oe[0],Ie=Oe[1];return $e=$e||0,Ie=(Ie||0)*ue,[I,A].indexOf(ce)>=0?{x:Ie,y:$e}:{x:$e,y:Ie}}function X(F){var L=F.state,V=F.options,ce=F.name,ue=V.offset,Oe=ue===void 0?[0,0]:ue,$e=Ee.reduce(function(Be,Pt){return Be[Pt]=G(Pt,L.rects,Oe),Be},{}),Ie=$e[L.placement],Ye=Ie.x,rt=Ie.y;L.modifiersData.popperOffsets!=null&&(L.modifiersData.popperOffsets.x+=Ye,L.modifiersData.popperOffsets.y+=rt),L.modifiersData[ce]=$e}var ie={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:X},ee={left:"right",right:"left",bottom:"top",top:"bottom"};function be(F){return F.replace(/left|right|bottom|top/g,function(L){return ee[L]})}var Te={start:"end",end:"start"};function qe(F){return F.replace(/start|end/g,function(L){return Te[L]})}function He(F,L){L===void 0&&(L={});var V=L,ce=V.placement,ue=V.boundary,Oe=V.rootBoundary,$e=V.padding,Ie=V.flipVariations,Ye=V.allowedAutoPlacements,rt=Ye===void 0?Ee:Ye,Be=oi(ce),Pt=Be?Ie?st:st.filter(function(mt){return oi(mt)===Be}):D,Kt=Pt.filter(function(mt){return rt.indexOf(mt)>=0});Kt.length===0&&(Kt=Pt,console.error(["Popper: The `allowedAutoPlacements` option did not allow any","placements. Ensure the `placement` option matches the variation","of the allowed placements.",'For example, "auto" cannot be used to allow "bottom-start".','Use "auto-start" instead.'].join(" ")));var Ot=Kt.reduce(function(mt,kt){return mt[kt]=Ji(F,{placement:kt,boundary:ue,rootBoundary:Oe,padding:$e})[je(kt)],mt},{});return Object.keys(Ot).sort(function(mt,kt){return Ot[mt]-Ot[kt]})}function Ve(F){if(je(F)===N)return[];var L=be(F);return[qe(F),L,qe(L)]}function De(F){var L=F.state,V=F.options,ce=F.name;if(!L.modifiersData[ce]._skip){for(var ue=V.mainAxis,Oe=ue===void 0?!0:ue,$e=V.altAxis,Ie=$e===void 0?!0:$e,Ye=V.fallbackPlacements,rt=V.padding,Be=V.boundary,Pt=V.rootBoundary,Kt=V.altBoundary,Ot=V.flipVariations,mt=Ot===void 0?!0:Ot,kt=V.allowedAutoPlacements,xt=L.options.placement,Gt=je(xt),Nt=Gt===xt,Yt=Ye||(Nt||!mt?[be(xt)]:Ve(xt)),dt=[xt].concat(Yt).reduce(function(nt,gt){return nt.concat(je(gt)===N?He(L,{placement:gt,boundary:Be,rootBoundary:Pt,padding:rt,flipVariations:mt,allowedAutoPlacements:kt}):gt)},[]),jt=L.rects.reference,It=L.rects.popper,qt=new Map,Vt=!0,Qt=dt[0],Zt=0;Zt<dt.length;Zt++){var ni=dt[Zt],Vi=je(ni),vi=oi(ni)===U,fr=[C,O].indexOf(Vi)>=0,Ur=fr?"width":"height",hr=Ji(L,{placement:ni,boundary:Be,rootBoundary:Pt,altBoundary:Kt,padding:rt}),er=fr?vi?A:I:vi?O:C;jt[Ur]>It[Ur]&&(er=be(er));var Br=be(er),Ar=[];if(Oe&&Ar.push(hr[Vi]<=0),Ie&&Ar.push(hr[er]<=0,hr[Br]<=0),Ar.every(function(nt){return nt})){Qt=ni,Vt=!1;break}qt.set(ni,Ar)}if(Vt)for(var tr=mt?3:1,Ri=function(gt){var _t=dt.find(function(ai){var di=qt.get(ai);if(di)return di.slice(0,gt).every(function(ir){return ir})});if(_t)return Qt=_t,"break"},re=tr;re>0;re--){var Je=Ri(re);if(Je==="break")break}L.placement!==Qt&&(L.modifiersData[ce]._skip=!0,L.placement=Qt,L.reset=!0)}}var Ae={name:"flip",enabled:!0,phase:"main",fn:De,requiresIfExists:["offset"],data:{_skip:!1}};function Pe(F){return F==="x"?"y":"x"}function ze(F,L,V){return ne(F,me(L,V))}function xe(F){var L=F.state,V=F.options,ce=F.name,ue=V.mainAxis,Oe=ue===void 0?!0:ue,$e=V.altAxis,Ie=$e===void 0?!1:$e,Ye=V.boundary,rt=V.rootBoundary,Be=V.altBoundary,Pt=V.padding,Kt=V.tether,Ot=Kt===void 0?!0:Kt,mt=V.tetherOffset,kt=mt===void 0?0:mt,xt=Ji(L,{boundary:Ye,rootBoundary:rt,padding:Pt,altBoundary:Be}),Gt=je(L.placement),Nt=oi(L.placement),Yt=!Nt,dt=ii(Gt),jt=Pe(dt),It=L.modifiersData.popperOffsets,qt=L.rects.reference,Vt=L.rects.popper,Qt=typeof kt=="function"?kt(Object.assign({},L.rects,{placement:L.placement})):kt,Zt={x:0,y:0};if(It){if(Oe||Ie){var ni=dt==="y"?C:I,Vi=dt==="y"?O:A,vi=dt==="y"?"height":"width",fr=It[dt],Ur=It[dt]+xt[ni],hr=It[dt]-xt[Vi],er=Ot?-Vt[vi]/2:0,Br=Nt===U?qt[vi]:Vt[vi],Ar=Nt===U?-Vt[vi]:-qt[vi],tr=L.elements.arrow,Ri=Ot&&tr?u(tr):{width:0,height:0},re=L.modifiersData["arrow#persistent"]?L.modifiersData["arrow#persistent"].padding:Fr(),Je=re[ni],nt=re[Vi],gt=ze(0,qt[vi],Ri[vi]),_t=Yt?qt[vi]/2-er-gt-Je-Qt:Br-gt-Je-Qt,ai=Yt?-qt[vi]/2+er+gt+nt+Qt:Ar+gt+nt+Qt,di=L.elements.arrow&&E(L.elements.arrow),ir=di?dt==="y"?di.clientTop||0:di.clientLeft||0:0,rn=L.modifiersData.offset?L.modifiersData.offset[L.placement][dt]:0,Hi=It[dt]+_t-rn-ir,nn=It[dt]+ai-rn;if(Oe){var qr=ze(Ot?me(Ur,Hi):Ur,fr,Ot?ne(hr,nn):hr);It[dt]=qr,Zt[dt]=qr-fr}if(Ie){var xr=dt==="x"?C:I,Ps=dt==="x"?O:A,pr=It[jt],Vr=pr+xt[xr],yo=pr-xt[Ps],bo=ze(Ot?me(Vr,Hi):Vr,pr,Ot?ne(yo,nn):yo);It[jt]=bo,Zt[jt]=bo-pr}}L.modifiersData[ce]=Zt}}var Ue={name:"preventOverflow",enabled:!0,phase:"main",fn:xe,requiresIfExists:["offset"]},Y=function(L,V){return L=typeof L=="function"?L(Object.assign({},V.rects,{placement:V.placement})):L,qi(typeof L!="number"?L:jr(L,D))};function At(F){var L,V=F.state,ce=F.name,ue=F.options,Oe=V.elements.arrow,$e=V.modifiersData.popperOffsets,Ie=je(V.placement),Ye=ii(Ie),rt=[I,A].indexOf(Ie)>=0,Be=rt?"height":"width";if(!(!Oe||!$e)){var Pt=Y(ue.padding,V),Kt=u(Oe),Ot=Ye==="y"?C:I,mt=Ye==="y"?O:A,kt=V.rects.reference[Be]+V.rects.reference[Ye]-$e[Ye]-V.rects.popper[Be],xt=$e[Ye]-V.rects.reference[Ye],Gt=E(Oe),Nt=Gt?Ye==="y"?Gt.clientHeight||0:Gt.clientWidth||0:0,Yt=kt/2-xt/2,dt=Pt[Ot],jt=Nt-Kt[Be]-Pt[mt],It=Nt/2-Kt[Be]/2+Yt,qt=ze(dt,It,jt),Vt=Ye;V.modifiersData[ce]=(L={},L[Vt]=qt,L.centerOffset=qt-It,L)}}function Ge(F){var L=F.state,V=F.options,ce=V.element,ue=ce===void 0?"[data-popper-arrow]":ce;if(ue!=null&&!(typeof ue=="string"&&(ue=L.elements.popper.querySelector(ue),!ue))){if
87(s(ue)||console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).',"To use an SVG arrow, wrap it in an HTMLElement that will be used as","the arrow."].join(" ")),!it(L.elements.popper,ue)){console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper',"element."].join(" "));return}L.elements.arrow=ue}}var mi={name:"arrow",enabled:!0,phase:"main",fn:At,effect:Ge,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function wi(F,L,V){return V===void 0&&(V={x:0,y:0}),{top:F.top-L.height-V.y,right:F.right-L.width+V.x,bottom:F.bottom-L.height+V.y,left:F.left-L.width-V.x}}function Oi(F){return[C,A,O,I].some(function(L){return F[L]>=0})}function Ii(F){var L=F.state,V=F.name,ce=L.rects.reference,ue=L.rects.popper,Oe=L.modifiersData.preventOverflow,$e=Ji(L,{elementContext:"reference"}),Ie=Ji(L,{altBoundary:!0}),Ye=wi($e,ce),rt=wi(Ie,ue,Oe),Be=Oi(Ye),Pt=Oi(rt);L.modifiersData[V]={referenceClippingOffsets:Ye,popperEscapeOffsets:rt,isReferenceHidden:Be,hasPopperEscaped:Pt},L.attributes.popper=Object.assign({},L.attributes.popper,{"data-popper-reference-hidden":Be,"data-popper-escaped":Pt})}var _i={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Ii},gi=[Er,Sr,x,H],Wt=ri({defaultModifiers:gi}),li=[Er,Sr,x,H,ie,Ae,Ue,mi,_i],Jt=ri({defaultModifiers:li});t.applyStyles=H,t.arrow=mi,t.computeStyles=x,t.createPopper=Jt,t.createPopperLite=Wt,t.defaultModifiers=li,t.detectOverflow=Ji,t.eventListeners=Er,t.flip=Ae,t.hide=_i,t.offset=ie,t.popperGenerator=ri,t.popperOffsets=Sr,t.preventOverflow=Ue}),Jh=Yh(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=xb(),i='<svg width="16" height="6" xmlns="http://www.w3.org/2000/svg"><path d="M0 6s1.796-.013 4.67-3.615C5.851.9 6.93.006 8 0c1.07-.006 2.148.887 3.343 2.385C14.233 6.005 16 6 16 6H0z"></svg>',r="tippy-box",n="tippy-content",s="tippy-backdrop",o="tippy-arrow",l="tippy-svg-arrow",_={passive:!0,capture:!0};function b(z,x){return{}.hasOwnProperty.call(z,x)}function m(z,x,P){if(Array.isArray(z)){var B=z[x];return B??(Array.isArray(P)?P[x]:P)}return z}function y(z,x){var P={}.toString.call(z);return P.indexOf("[object")===0&&P.indexOf(x+"]")>-1}function T(z,x){return typeof z=="function"?z.apply(void 0,x):z}function g(z,x){if(x===0)return z;var P;return function(B){clearTimeout(P),P=setTimeout(function(){z(B)},x)}}function d(z,x){var P=Object.assign({},z);return x.forEach(function(B){delete P[B]}),P}function u(z){return z.split(/\s+/).filter(Boolean)}function w(z){return[].concat(z)}function h(z,x){z.indexOf(x)===-1&&z.push(x)}function p(z){return z.filter(function(x,P){return z.indexOf(x)===P})}function c(z){return z.split("-")[0]}function f(z){return[].slice.call(z)}function v(z){return Object.keys(z).reduce(function(x,P){return z[P]!==void 0&&(x[P]=z[P]),x},{})}function E(){return document.createElement("div")}function C(z){return["Element","Fragment"].some(function(x){return y(z,x)})}function O(z){return y(z,"NodeList")}function A(z){return y(z,"MouseEvent")}function I(z){return!!(z&&z._tippy&&z._tippy.reference===z)}function N(z){return C(z)?[z]:O(z)?f(z):Array.isArray(z)?z:f(document.querySelectorAll(z))}function D(z,x){z.forEach(function(P){P&&(P.style.transitionDuration=x+"ms")})}function U(z,x){z.forEach(function(P){P&&P.setAttribute("data-state",x)})}function Q(z){var x,P=w(z),B=P[0];return!(B==null||(x=B.ownerDocument)==null)&&x.body?B.ownerDocument:document}function he(z,x){var P=x.clientX,B=x.clientY;return z.every(function(H){var G=H.popperRect,X=H.popperState,ie=H.props,ee=ie.interactiveBorder,be=c(X.placement),Te=X.modifiersData.offset;if(!Te)return!0;var qe=be==="bottom"?Te.top.y:0,He=be==="top"?Te.bottom.y:0,Ve=be==="right"?Te.left.x:0,De=be==="left"?Te.right.x:0,Ae=G.top-B+qe>ee,Pe=B-G.bottom-He>ee,ze=G.left-P+Ve>ee,xe=P-G.right-De>ee;return Ae||Pe||ze||xe})}function se(z,x,P){var B=x+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(H){z[B](H,P)})}var fe={isTouch:!1},pe=0;function st(){fe.isTouch||(fe.isTouch=!0,window.performance&&document.addEventListener("mousemove",Ee))}function Ee(){var z=performance.now();z-pe<20&&(fe.isTouch=!1,document.removeEventListener("mousemove",Ee)),pe=z}function oe(){var z=document.activeElement;if(I(z)){var x=z._tippy;z.blur&&!x.state.isVisible&&z.blur()}}function _e(){document.addEventListener("touchstart",st,_),window.addEventListener("blur",oe)}var Ce=typeof window<"u"&&typeof document<"u",ke=Ce?navigator.userAgent:"",ae=/MSIE |Trident\//.test(ke);function K(z){var x=z==="destroy"?"n already-":" ";
vendor: 4,299 bytes, lines 87-96
87return[z+"() was called on a"+x+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function ve(z){var x=/[ \t]{2,}/g,P=/^[ \t]*/gm;return z.replace(x," ").replace(P,"").trim()}function Le(z){return ve(`
88  %ctippy.js
89
90  %c`+ve(z)+`
91
92  %c👷‍ This is a development-only message. It will be removed in production.
93  `)}function tt(z){return[Le(z),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var at;ut();function ut(){at=new Set}function ht(z,x){if(z&&!at.has(x)){var P;at.add(x),(P=console).warn.apply(P,tt(x))}}function bt(z,x){if(z&&!at.has(x)){var P;at.add(x),(P=console).error.apply(P,tt(x))}}function wt(z){var x=!z,P=Object.prototype.toString.call(z)==="[object Object]"&&!z.addEventListener;bt(x,["tippy() was passed","`"+String(z)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),bt(P,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var zt={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Re={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},le=Object.assign({appendTo:function(){return document.body},aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},zt,{},Re),we=Object.keys(le),Ze=function(x){ne(x,[]);var P=Object.keys(x);P.forEach(function(B){le[B]=x[B]})};function je(z){var x=z.plugins||[],P=x.reduce(function(B,H){var G=H.name,X=H.defaultValue;return G&&(B[G]=z[G]!==void 0?z[G]:X),B},{});return Object.assign({},z,{},P)}function Tt(z,x){var P=x?Object.keys(je(Object.assign({},le,{plugins:x}))):we,B=P.reduce(function(H,G){var X=(z.getAttribute("data-tippy-"+G)||"").trim();if(!X)return H;if(G==="content")H[G]=X;else try{H[G]=JSON.parse(X)}catch{H[G]=X}return H},{});return B}function Xe(z,x){var P=Object.assign({},x,{content:T(x.content,[z])},x.ignoreAttributes?{}:Tt(z,x.plugins));return P.aria=Object.assign({},le.aria,{},P.aria),P.aria={expanded:P.aria.expanded==="auto"?x.interactive:P.aria.expanded,content:P.aria.content==="auto"?x.interactive?null:"describedby":P.aria.content},P}function ne(z,x){z===void 0&&(z={}),x===void 0&&(x=[]);var P=Object.keys(z);P.forEach(function(B){var H=d(le,Object.keys(zt)),G=!b(H,B);G&&(G=x.filter(function(X){return X.name===B}).length===0),ht(G,["`"+B+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",`
94
95`,`All props: https://atomiks.github.io/tippyjs/v6/all-props/
96`,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var me=function(){return"innerHTML"};function Ne(z,x){z[me()]=x}function vt(z){var x=E();return z===!0?x.className=o:(x.className=l,C(z)?x.appendChild(z):Ne(x,z)),x}function it(z,x){C(x.content)?(Ne(z,""),z.appendChild(x.content)):typeof x.content!="function"&&(x.allowHTML?Ne(z,x.content):z.textContent=x.content)}function pt(z){var x=z.firstElementChild,P=f(x.children);return{box:x,content:P.find(function(B){return B.classList.contains(n)}),arrow:P.find(function(B){return B.classList.contains(o)||B.classList.contains(l)}),backdrop:P.find(function(B){return B.classList.contains(s)})}}function Dt(z){var x=E(),P=E();P.className=r,P.setAttribute("data-state","hidden"),P.setAttribute("tabindex","-1");var B=E();B.className=n,B.setAttribute("data-state","hidden"),it(B,z.props),x.appendChild(P),P.appendChild(B),H(z.props,z.props);function H(G,X){var ie=pt(x),ee=ie.box,be=ie.content,Te=ie.arrow;X.theme?ee.setAttribute("data-theme",X.theme):ee.removeAttribute("data-theme"),typeof X.animation=="str
96ing"?ee.setAttribute("data-animation",X.animation):ee.removeAttribute("data-animation"),X.inertia?ee.setAttribute("data-inertia",""):ee.removeAttribute("data-inertia"),ee.style.maxWidth=typeof X.maxWidth=="number"?X.maxWidth+"px":X.maxWidth,X.role?ee.setAttribute("role",X.role):ee.removeAttribute("role"),(G.content!==X.content||G.allowHTML!==X.allowHTML)&&it(be,z.props),X.arrow?Te?G.arrow!==X.arrow&&(ee.removeChild(Te),ee.appendChild(vt(X.arrow))):ee.appendChild(vt(X.arrow)):Te&&ee.removeChild(Te)}return{popper:x,onUpdate:H}}Dt.$$tippy=!0;var pi=1,ui=[],Mi=[];function oi(z,x){var P=Xe(z,Object.assign({},le,{},je(v(x)))),B,H,G,X=!1,ie=!1,ee=!1,be=!1,Te,qe,He,Ve=[],De=g(Nt,P.interactiveDebounce),Ae,Pe=pi++,ze=null,xe=p(P.plugins),Ue={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},Y={id:Pe,reference:z,popper:E(),popperInstance:ze,props:P,state:Ue,plugins:xe,clearDelayTimeouts:fr,setProps:Ur,setContent:hr,show:er,hide:Br,hideWithInteractivity:Ar,enable:Vi,disable:vi,unmount:tr,destroy:Ri};if(!P.render)return bt(!0,"render() function has not been supplied."),Y;var At=P.render(Y),Ge=At.popper,mi=At.onUpdate;Ge.setAttribute("data-tippy-root",""),Ge.id="tippy-"+Y.id,Y.popper=Ge,z._tippy=Y,Ge._tippy=Y;var wi=xe.map(function(re){return re.fn(Y)}),Oi=z.hasAttribute("aria-expanded");return kt(),ue(),L(),V("onCreate",[Y]),P.showOnCreate&&Zt(),Ge.addEventListener("mouseenter",function(){Y.props.interactive&&Y.state.isVisible&&Y.clearDelayTimeouts()}),Ge.addEventListener("mouseleave",function(re){Y.props.interactive&&Y.props.trigger.indexOf("mouseenter")>=0&&(li().addEventListener("mousemove",De),De(re))}),Y;function Ii(){var re=Y.props.touch;return Array.isArray(re)?re:[re,0]}function _i(){return Ii()[0]==="hold"}function gi(){var re;return!!((re=Y.props.render)!=null&&re.$$tippy)}function Wt(){return Ae||z}function li(){var re=Wt().parentNode;return re?Q(re):document}function Jt(){return pt(Ge)}function F(re){return Y.state.isMounted&&!Y.state.isVisible||fe.isTouch||Te&&Te.type==="focus"?0:m(Y.props.delay,re?0:1,le.delay)}function L(){Ge.style.pointerEvents=Y.props.interactive&&Y.state.isVisible?"":"none",Ge.style.zIndex=""+Y.props.zIndex}function V(re,Je,nt){if(nt===void 0&&(nt=!0),wi.forEach(function(_t){_t[re]&&_t[re].apply(void 0,Je)}),nt){var gt;(gt=Y.props)[re].apply(gt,Je)}}function ce(){var re=Y.props.aria;if(re.content){var Je="aria-"+re.content,nt=Ge.id,gt=w(Y.props.triggerTarget||z);gt.forEach(function(_t){var ai=_t.getAttribute(Je);if(Y.state.isVisible)_t.setAttribute(Je,ai?ai+" "+nt:nt);else{var di=ai&&ai.replace(nt,"").trim();di?_t.setAttribute(Je,di):_t.removeAttribute(Je)}})}}function ue(){if(!(Oi||!Y.props.aria.expanded)){var re=w(Y.props.triggerTarget||z);re.forEach(function(Je){Y.props.interactive?Je.setAttribute("aria-expanded",Y.state.isVisible&&Je===Wt()?"true":"false"):Je.removeAttribute("aria-expanded")})}}function Oe(){li().removeEventListener("mousemove",De),ui=ui.filter(function(re){return re!==De})}function $e(re){if(!(fe.isTouch&&(ee||re.type==="mousedown"))&&!(Y.props.interactive&&Ge.contains(re.target))){if(Wt().contains(re.target)){if(fe.isTouch||Y.state.isVisible&&Y.props.trigger.indexOf("click")>=0)return}else V("onClickOutside",[Y,re]);Y.props.hideOnClick===!0&&(Y.clearDelayTimeouts(),Y.hide(),ie=!0,setTimeout(function(){ie=!1}),Y.state.isMounted||Be())}}function Ie(){ee=!0}function Ye(){ee=!1}function rt(){var re=li();re.addEventListener("mousedown",$e,!0),re.addEventListener("touchend",$e,_),re.addEventListener("touchstart",Ye,_),re.addEventListener("touchmove",Ie,_)}function Be(){var re=li();re.removeEventListener("mousedown",$e,!0),re.removeEventListener("touchend",$e,_),re.removeEventListener("touchstart",Ye,_),re.removeEventListener("touchmove",Ie,_)}function Pt(re,Je){Ot(re,function(){!Y.state.isVisible&&Ge.parentNode&&Ge.parentNode.contains(Ge)&&Je()})}function Kt(re,Je){Ot(re,Je)}function Ot(re,Je){var nt=Jt().box;function gt(_t){_t.target===nt&&(se(nt,"remove",gt),Je())}if(re===0)return Je();se(nt,"remove",qe),se(nt,"add",gt),qe=gt}function mt(re,Je,nt){nt===void 0&&(nt=!1);var gt=w(Y.props.triggerTarget||z);gt.forEach(function(_t){_t.addEventListener(re,Je,nt),Ve.push({node:_t,eventType:re,handler:Je,options:nt})})}function kt(){_i()&&(mt("touchstart",Gt,{passive:!0}),mt("touchend",Yt,{passive:!0})),u(Y.props.trigger).forEach(function(re){if(re!=="manual")switch(mt(re,Gt),re){case"mouseenter":mt("mouseleave",Yt);break;
vendor: 5,712 bytes, lines 96-102
96case"focus":mt(ae?"focusout":"blur",dt);break;case"focusin":mt("focusout",dt);break}})}function xt(){Ve.forEach(function(re){var Je=re.node,nt=re.eventType,gt=re.handler,_t=re.options;Je.removeEventListener(nt,gt,_t)}),Ve=[]}function Gt(re){var Je,nt=!1;if(!(!Y.state.isEnabled||jt(re)||ie)){var gt=((Je=Te)==null?void 0:Je.type)==="focus";Te=re,Ae=re.currentTarget,ue(),!Y.state.isVisible&&A(re)&&ui.forEach(function(_t){return _t(re)}),re.type==="click"&&(Y.props.trigger.indexOf("mouseenter")<0||X)&&Y.props.hideOnClick!==!1&&Y.state.isVisible?nt=!0:Zt(re),re.type==="click"&&(X=!nt),nt&&!gt&&ni(re)}}function Nt(re){var Je=re.target,nt=Wt().contains(Je)||Ge.contains(Je);if(!(re.type==="mousemove"&&nt)){var gt=Qt().concat(Ge).map(function(_t){var ai,di=_t._tippy,ir=(ai=di.popperInstance)==null?void 0:ai.state;return ir?{popperRect:_t.getBoundingClientRect(),popperState:ir,props:P}:null}).filter(Boolean);he(gt,re)&&(Oe(),ni(re))}}function Yt(re){var Je=jt(re)||Y.props.trigger.indexOf("click")>=0&&X;if(!Je){if(Y.props.interactive){Y.hideWithInteractivity(re);return}ni(re)}}function dt(re){Y.props.trigger.indexOf("focusin")<0&&re.target!==Wt()||Y.props.interactive&&re.relatedTarget&&Ge.contains(re.relatedTarget)||ni(re)}function jt(re){return fe.isTouch?_i()!==re.type.indexOf("touch")>=0:!1}function It(){qt();var re=Y.props,Je=re.popperOptions,nt=re.placement,gt=re.offset,_t=re.getReferenceClientRect,ai=re.moveTransition,di=gi()?pt(Ge).arrow:null,ir=_t?{getBoundingClientRect:_t,contextElement:_t.contextElement||Wt()}:z,rn={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(qr){var xr=qr.state;if(gi()){var Ps=Jt(),pr=Ps.box;["placement","reference-hidden","escaped"].forEach(function(Vr){Vr==="placement"?pr.setAttribute("data-placement",xr.placement):xr.attributes.popper["data-popper-"+Vr]?pr.setAttribute("data-"+Vr,""):pr.removeAttribute("data-"+Vr)}),xr.attributes.popper={}}}},Hi=[{name:"offset",options:{offset:gt}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!ai}},rn];gi()&&di&&Hi.push({name:"arrow",options:{element:di,padding:3}}),Hi.push.apply(Hi,Je?.modifiers||[]),Y.popperInstance=e.createPopper(ir,Ge,Object.assign({},Je,{placement:nt,onFirstUpdate:He,modifiers:Hi}))}function qt(){Y.popperInstance&&(Y.popperInstance.destroy(),Y.popperInstance=null)}function Vt(){var re=Y.props.appendTo,Je,nt=Wt();Y.props.interactive&&re===le.appendTo||re==="parent"?Je=nt.parentNode:Je=T(re,[nt]),Je.contains(Ge)||Je.appendChild(Ge),It(),ht(Y.props.interactive&&re===le.appendTo&&nt.nextElementSibling!==Ge,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
97
98`,"Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.",`
99
100`,"Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.",`
101
102`,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function Qt(){return f(Ge.querySelectorAll("[data-tippy-root]"))}function Zt(re){Y.clearDelayTimeouts(),re&&V("onTrigger",[Y,re]),rt();var Je=F(!0),nt=Ii(),gt=nt[0],_t=nt[1];fe.isTouch&&gt==="hold"&&_t&&(Je=_t),Je?B=setTimeout(function(){Y.show()},Je):Y.show()}function ni(re){if(Y.clearDelayTimeouts(),V("onUntrigger",[Y,re]),!Y.state.isVisible){Be();return}if(!(Y.props.trigger.indexOf("mouseenter")>=0&&Y.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(re.type)>=0&&X)){var Je=F(!1);Je?H=setTimeout(function(){Y.state.isVisible&&Y.hide()},Je):G=requestAnimationFrame(function(){Y.hide()})}}function Vi(){Y.state.isEnabled=!0}function vi(){Y.hide(),Y.state.isEnabled=!1}function fr(){clearTimeout(B),clearTimeout(H),cancelAnimationFrame(G)}function Ur(re){if(ht(Y.state.isDestroyed,K("setProps")),!Y.state.isDestroyed){V("onBeforeUpdate",[Y,re]),xt();var Je=Y.props,nt=Xe(z,Object.assign({},Y.props,{},re,{ignoreAttributes:!0}));Y.props=nt,kt(),Je.interactiveDebounce!==nt.interactiveDebounce&&(Oe(),De=g(Nt,nt.interactiveDebounce)),Je.triggerTarget&&!nt.triggerTarget?w(Je.triggerTarget).forEach(function(gt){gt.removeAttribute("aria-expanded")}):nt.triggerTarget&&z.removeAttribute("aria-expanded"),ue(),L(),mi&&mi(Je,nt),Y.popperInstance&&(It(),Qt().forEach(function(gt){requestAnimationFrame(gt._tippy.popperInstance.forceUpdate)})),V("onAfterUpdate",[Y,re])}}function hr(re){Y.setProps({content:re})}function er(){ht(Y.state.isDestroyed,K("show"));var re=Y.state.isVisible,Je=Y.state.isDestroyed,nt=!Y.state.isEnabled,gt=fe.isTouch&&!Y.props.touch,_t=m(Y.props.duration,0,le.duration);if(!(re||Je||nt||gt)&&!Wt().hasAttribute("disabled")&&(V("onShow",[Y],!1),Y.props.onShow(Y)!==!1)){if(Y.state.isVisible=!0,gi()&&(Ge.style.visibility="visible"),L(),rt(),Y.state.isMounted||(Ge.style.transition="none"),gi()){var ai=Jt(),di=ai.box,ir=ai.content;D([di,ir],0)}He=function(){var Hi;if(!(!Y.state.isVisible||be)){if(be=!0,Ge.offsetHeight,Ge.style.transition=Y.props.moveTransition,gi()&&Y.props.animation){var nn=Jt(),qr=nn.box,xr=nn.content;D([qr,xr],_t),U([qr,xr],"visible")}ce(),ue(),h(Mi,Y),(Hi=Y.popperInstance)==null||Hi.forceUpdate(),Y.state.isMounted=!0,V("onMount",[Y]),Y.props.animation&&gi()&&Kt(_t,function(){Y.state.isShown=!0,V("onShown",[Y])})}},Vt()}}function Br(){ht(Y.state.isDestroyed,K("hide"));var re=!Y.state.isVisible,Je=Y.state.isDestroyed,nt=!Y.state.isEnabled,gt=m(Y.props.duration,1,le.duration);if(!(re||Je||nt)&&(V("onHide",[Y],!1),Y.props.onHide(Y)!==!1)){if
102(Y.state.isVisible=!1,Y.state.isShown=!1,be=!1,X=!1,gi()&&(Ge.style.visibility="hidden"),Oe(),Be(),L(),gi()){var _t=Jt(),ai=_t.box,di=_t.content;Y.props.animation&&(D([ai,di],gt),U([ai,di],"hidden"))}ce(),ue(),Y.props.animation?gi()&&Pt(gt,Y.unmount):Y.unmount()}}function Ar(re){ht(Y.state.isDestroyed,K("hideWithInteractivity")),li().addEventListener("mousemove",De),h(ui,De),De(re)}function tr(){ht(Y.state.isDestroyed,K("unmount")),Y.state.isVisible&&Y.hide(),Y.state.isMounted&&(qt(),Qt().forEach(function(re){re._tippy.unmount()}),Ge.parentNode&&Ge.parentNode.removeChild(Ge),Mi=Mi.filter(function(re){return re!==Y}),Y.state.isMounted=!1,V("onHidden",[Y]))}function Ri(){ht(Y.state.isDestroyed,K("destroy")),!Y.state.isDestroyed&&(Y.clearDelayTimeouts(),Y.unmount(),xt(),delete z._tippy,Y.state.isDestroyed=!0,V("onDestroy",[Y]))}}function ii(z,x){x===void 0&&(x={});var P=le.plugins.concat(x.plugins||[]);wt(z),ne(x,P),_e();var B=Object.assign({},x,{plugins:P}),H=N(z);{var G=C(B.content),X=H.length>1;ht(G&&X,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.",`
103
104`,"Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.",`
105
106`,`1) content: element.innerHTML
107`,"2) content: () => element.cloneNode(true)"].join(" "))}var ie=H.reduce(function(ee,be){var Te=be&&oi(be,B);return Te&&ee.push(Te),ee},[]);return C(z)?ie[0]:ie}ii.defaultProps=le,ii.setDefaultProps=Ze,ii.currentInput=fe;var Xi=function(x){var P=x===void 0?{}:x,B=P.exclude,H=P.duration;Mi.forEach(function(G){var X=!1;if(B&&(X=I(B)?G.reference===B:G.popper===B.popper),!X){var ie=G.props.duration;G.setProps({duration:H}),G.hide(),G.state.isDestroyed||G.setProps({duration:ie})}})},Fr=Object.assign({},e.applyStyles,{effect:function(x){var P=x.state,B={popper:{position:P.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(P.elements.popper.style,B.popper),P.styles=B,P.elements.arrow&&Object.assign(P.elements.arrow.style,B.arrow)}}),qi=function(x,P){var B;P===void 0&&(P={}),bt(!Array.isArray(x),["The first argument passed to createSingleton() must be an array of","tippy instances. The passed value was",String(x)].join(" "));var H=x,G=[],X,ie=P.overrides,ee=[],be=!1;function Te(){G=H.map(function(xe){return xe.reference})}function qe(xe){H.forEach(function(Ue){xe?Ue.enable():Ue.disable()})}function He(xe){return H.map(function(Ue){var Y=Ue.setProps;return Ue.setProps=function(At){Y(At),Ue.reference===X&&xe.setProps(At)},function(){Ue.setProps=Y}})}function Ve(xe,Ue){var Y=G.indexOf(Ue);if(Ue!==X){X=Ue;var At=(ie||[]).concat("content").reduce(function(Ge,mi){return Ge[mi]=H[Y].props[mi],Ge},{});xe.setProps(Object.assign({},At,{getReferenceClientRect:typeof At.getReferenceClientRect=="function"?At.getReferenceClientRect:function(){return Ue.getBoundingClientRect()}}))}}qe(!1),Te();var De={fn:function(){return{onDestroy:function(){qe(!0)},onHidden:function(){X=null},onClickOutside:function(Y){Y.props.showOnCreate&&!be&&(be=!0,X=null)},onShow:function(Y){Y.props.showOnCreate&&!be&&(be=!0,Ve(Y,G[0]))},onTrigger:function(Y,At){Ve(Y,At.currentTarget)}}}},Ae=ii(E(),Object.assign({},d(P,["overrides"]),{plugins:[De].concat(P.plugins||[]),triggerTarget:G,popperOptions:Object.assign({},P.popperOptions,{modifiers:[].concat(((B=P.popperOptions)==null?void 0:B.modifiers)||[],[Fr])})})),Pe=Ae.show;Ae.show=function(xe){if(Pe(),!X&&xe==null)return Ve(Ae,G[0]);if(!(X&&xe==null)){if(typeof xe=="number")return G[xe]&&Ve(Ae,G[xe]);if(H.includes(xe)){var Ue=xe.reference;return Ve(Ae,Ue)}if(G.includes(xe))return Ve(Ae,xe)}},Ae.showNext=function(){var xe=G[0];if(!X)return Ae.show(0);var Ue=G.indexOf(X);Ae.show(G[Ue+1]||xe)},Ae.showPrevious=function(){var xe=G[G.length-1];if(!X)return Ae.show(xe);var Ue=G.indexOf(X),Y=G[Ue-1]||xe;Ae.show(Y)};var ze=Ae.setProps;return Ae.setProps=function(xe){ie=xe.overrides||ie,ze(xe)},Ae.setInstances=function(xe){qe(!0),ee.forEach(function(Ue){return Ue()}),H=xe,qe(!1),Te(),He(Ae),Ae.setProps({triggerTarget:G})},ee=He(Ae),Ae}
vendor: 5,014 bytes, line 107
107,jr={mouseover:"mouseenter",focusin:"focus",click:"click"};function Ji(z,x){bt(!(x&&x.target),["You must specity a `target` prop indicating a CSS selector string matching","the target elements that should receive a tippy."].join(" "));var P=[],B=[],H=!1,G=x.target,X=d(x,["target"]),ie=Object.assign({},X,{trigger:"manual",touch:!1}),ee=Object.assign({},X,{showOnCreate:!0}),be=ii(z,ie),Te=w(be);function qe(Pe){if(!(!Pe.target||H)){var ze=Pe.target.closest(G);if(ze){var xe=ze.getAttribute("data-tippy-trigger")||x.trigger||le.trigger;if(!ze._tippy&&!(Pe.type==="touchstart"&&typeof ee.touch=="boolean")&&!(Pe.type!=="touchstart"&&xe.indexOf(jr[Pe.type])<0)){var Ue=ii(ze,ee);Ue&&(B=B.concat(Ue))}}}}function He(Pe,ze,xe,Ue){Ue===void 0&&(Ue=!1),Pe.addEventListener(ze,xe,Ue),P.push({node:Pe,eventType:ze,handler:xe,options:Ue})}function Ve(Pe){var ze=Pe.reference;He(ze,"touchstart",qe,_),He(ze,"mouseover",qe),He(ze,"focusin",qe),He(ze,"click",qe)}function De(){P.forEach(function(Pe){var ze=Pe.node,xe=Pe.eventType,Ue=Pe.handler,Y=Pe.options;ze.removeEventListener(xe,Ue,Y)}),P=[]}function Ae(Pe){var ze=Pe.destroy,xe=Pe.enable,Ue=Pe.disable;Pe.destroy=function(Y){Y===void 0&&(Y=!0),Y&&B.forEach(function(At){At.destroy()}),B=[],De(),ze()},Pe.enable=function(){xe(),B.forEach(function(Y){return Y.enable()}),H=!1},Pe.disable=function(){Ue(),B.forEach(function(Y){return Y.disable()}),H=!0},Ve(Pe)}return Te.forEach(Ae),be}var en={name:"animateFill",defaultValue:!1,fn:function(x){var P;if(!((P=x.props.render)!=null&&P.$$tippy))return bt(x.props.animateFill,"The `animateFill` plugin requires the default render function."),{};var B=pt(x.popper),H=B.box,G=B.content,X=x.props.animateFill?Qi():null;return{onCreate:function(){X&&(H.insertBefore(X,H.firstElementChild),H.setAttribute("data-animatefill",""),H.style.overflow="hidden",x.setProps({arrow:!1,animation:"shift-away"}))},onMount:function(){if(X){var ee=H.style.transitionDuration,be=Number(ee.replace("ms",""));G.style.transitionDelay=Math.round(be/10)+"ms",X.style.transitionDuration=ee,U([X],"visible")}},onShow:function(){X&&(X.style.transitionDuration="0ms")},onHide:function(){X&&U([X],"hidden")}}}};function Qi(){var z=E();return z.className=s,U([z],"hidden"),z}var Zi={clientX:0,clientY:0},Ei=[];function ri(z){var x=z.clientX,P=z.clientY;Zi={clientX:x,clientY:P}}function dr(z){z.addEventListener("mousemove",ri)}function dn(z){z.removeEventListener("mousemove",ri)}var Er={name:"followCursor",defaultValue:!1,fn:function(x){var P=x.reference,B=Q(x.props.triggerTarget||P),H=!1,G=!1,X=!0,ie=x.props;function ee(){return x.props.followCursor==="initial"&&x.state.isVisible}function be(){B.addEventListener("mousemove",He)}function Te(){B.removeEventListener("mousemove",He)}function qe(){H=!0,x.setProps({getReferenceClientRect:null}),H=!1}function He(Ae){var Pe=Ae.target?P.contains(Ae.target):!0,ze=x.props.followCursor,xe=Ae.clientX,Ue=Ae.clientY,Y=P.getBoundingClientRect(),At=xe-Y.left,Ge=Ue-Y.top;(Pe||!x.props.interactive)&&x.setProps({getReferenceClientRect:function(){var wi=P.getBoundingClientRect(),Oi=xe,Ii=Ue;ze==="initial"&&(Oi=wi.left+At,Ii=wi.top+Ge);var _i=ze==="horizontal"?wi.top:Ii,gi=ze==="vertical"?wi.right:Oi,Wt=ze==="horizontal"?wi.bottom:Ii,li=ze==="vertical"?wi.left:Oi;return{width:gi-li,height:Wt-_i,top:_i,right:gi,bottom:Wt,left:li}}})}function Ve(){x.props.followCursor&&(Ei.push({instance:x,doc:B}),dr(B))}function De(){Ei=Ei.filter(function(Ae){return Ae.instance!==x}),Ei.filter(function(Ae){return Ae.doc===B}).length===0&&dn(B)}return{onCreate:Ve,onDestroy:De,onBeforeUpdate:function(){ie=x.props},onAfterUpdate:function(Pe,ze){var xe=ze.followCursor;H||xe!==void 0&&ie.followCursor!==xe&&(De(),xe?(Ve(),x.state.isMounted&&!G&&!ee()&&be()):(Te(),qe()))},onMount:function(){x.props.followCursor&&!G&&(X&&(He(Zi),X=!1),ee()||be())},onTrigger:function(Pe,ze){A(ze)&&(Zi={clientX:ze.clientX,clientY:ze.clientY}),G=ze.type==="focus"},onHidden:function(){x.props.followCursor&&(qe(),Te(),X=!0)}}}};function fn(z,x){var P;return{popperOptions:Object.assign({},z.popperOptions,{modifiers:[].concat((((P=z.popperOptions)==null?void 0:P.modifiers)||[]).filter(function(B){var H=B.name;return H!==x.name}),[x])})}}var Sr={name:"inlinePositioning",defaultValue:!1,fn:function(x){var P=x.reference;function B(){return!!x.props.inlinePositioning}var H,G=-1,X=!1,ie={name:"tippyInlinePositioning",enabled:!0,phase:"afterWrite",fn:function(He){var Ve=He.state;B()&&(H!==Ve.placement&&x.setProps({getReferenceClientRect:function(){return ee(Ve.placement)}}),H=Ve.placement)}};function ee(qe){return tn(c(qe),P.getBoundingClientRect(),f(P.getClientRects()),G)}function be(qe){X=!0,x.setProps(qe),X=!1}function Te(){X||be(fn(x.props,ie))}return{onCreate:Te,onAfterUpdate:Te,onTrigger:function(He,Ve){if(A(Ve)){var De=f(x.reference.getClientRects()),Ae=De.find(function(Pe){return Pe.left-2<=Ve.clientX&&Pe.right+2>=Ve.clientX&&Pe.top-2<=Ve.clientY&&Pe.bottom+2>=Ve.clientY});G=De.indexOf(Ae)}},onUntrigger:function(){G=-1}}}};
107function tn(z,x,P,B){if(P.length<2||z===null)return x;if(P.length===2&&B>=0&&P[0].left>P[1].right)return P[B]||x;switch(z){case"top":case"bottom":{var H=P[0],G=P[P.length-1],X=z==="top",ie=H.top,ee=G.bottom,be=X?H.left:G.left,Te=X?H.right:G.right,qe=Te-be,He=ee-ie;return{top:ie,bottom:ee,left:be,right:Te,width:qe,height:He}}case"left":case"right":{var Ve=Math.min.apply(Math,P.map(function(Ge){return Ge.left})),De=Math.max.apply(Math,P.map(function(Ge){return Ge.right})),Ae=P.filter(function(Ge){return z==="left"?Ge.left===Ve:Ge.right===De}),Pe=Ae[0].top,ze=Ae[Ae.length-1].bottom,xe=Ve,Ue=De,Y=Ue-xe,At=ze-Pe;return{top:Pe,bottom:ze,left:xe,right:Ue,width:Y,height:At}}default:return x}}var Tr={name:"sticky",defaultValue:!1,fn:function(x){var P=x.reference,B=x.popper;function H(){return x.popperInstance?x.popperInstance.state.elements.reference:P}function G(be){return x.props.sticky===!0||x.props.sticky===be}var X=null,ie=null;function ee(){var be=G("reference")?H().getBoundingClientRect():null,Te=G("popper")?B.getBoundingClientRect():null;(be&&Cr(X,be)||Te&&Cr(ie,Te))&&x.popperInstance&&x.popperInstance.update(),X=be,ie=Te,x.state.isMounted&&requestAnimationFrame(ee)}return{onMount:function(){x.props.sticky&&ee()}}}};function Cr(z,x){return z&&x?z.top!==x.top||z.right!==x.right||z.bottom!==x.bottom||z.left!==x.left:!0}ii.setDefaultProps({render:Dt}),t.animateFill=en,t.createSingleton=qi,t.default=ii,t.delegate=Ji,t.followCursor=Er,t.hideAll=Xi,t.inlinePositioning=Sr,t.roundArrow=i,t.sticky=Tr}),_c=Xh(Jh()),Ob=Xh(Jh()),kb=t=>{const e={plugins:[]},i=n=>t[t.indexOf(n)+1];if(t.includes("animation")&&(e.animation=i("animation")),t.includes("duration")&&(e.duration=parseInt(i("duration"))),t.includes("delay")){const n=i("delay");e.delay=n.includes("-")?n.split("-").map(s=>parseInt(s)):parseInt(n)}if(t.includes("cursor")){e.plugins.push(Ob.followCursor);const n=i("cursor");["x","initial"].includes(n)?e.followCursor=n==="x"?"horizontal":"initial":e.followCursor=!0}t.includes("on")&&(e.trigger=i("on")),t.includes("arrowless")&&(e.arrow=!1),t.includes("html")&&(e.allowHTML=!0),t.includes("interactive")&&(e.interactive=!0),t.includes("border")&&e.interactive&&(e.interactiveBorder=parseInt(i("border"))),t.includes("debounce")&&e.interactive&&(e.interactiveDebounce=parseInt(i("debounce"))),t.includes("max-width")&&(e.maxWidth=parseInt(i("max-width"))),t.includes("theme")&&(e.theme=i("theme")),t.includes("placement")&&(e.placement=i("placement"));const r={};return t.includes("no-flip")&&(r.modifiers||(r.modifiers=[]),r.modifiers.push({name:"flip",enabled:!1})),e.popperOptions=r,e};function Ec(t){t.magic("tooltip",e=>(i,r={})=>{const n=r.timeout;delete r.timeout;const s=(0,_c.default)(e,{content:i,trigger:"manual",...r});s.show(),setTimeout(()=>{s.hide(),setTimeout(()=>s.destroy(),r.duration||300)},n||2e3)}),t.directive("tooltip",(e,{modifiers:i,expression:r},{evaluateLater:n,effect:s,cleanup:o})=>{const l=i.length>0?kb(i):{};e.__x_tippy||(e.__x_tippy=(0,_c.default)(e,l)),o(()=>{e.__x_tippy&&(e.__x_tippy.destroy(),delete e.__x_tippy)});const _=()=>e.__x_tippy.enable(),b=()=>e.__x_tippy.disable(),m=y=>{y?(_(),e.__x_tippy.setContent(y)):b()};if(i.includes("raw"))m(r);else{const y=n(r);s(()=>{y(T=>{typeof T=="object"?(e.__x_tippy.setProps(T),_()):m(T)})})}})}Ec.defaultProps=t=>(_c.default.setDefaultProps(t),Ec);var Ib=Ec,Pb=Ib,Pi="top",Ki="bottom",Gi="right",Li="left",$a="auto",Cs=[Pi,Ki,Gi,Li],In="start",ys="end",Qh="clippingParents",Zc="viewport",ls="popper",Zh="reference",Sc=Cs.reduce(function(t,e){return t.concat([e+"-"+In,e+"-"+ys])},[]),eu=[].concat(Cs,[$a]).reduce(function(t,e){return t.concat([e,e+"-"+In,e+"-"+ys])},[]),ep="beforeRead",tp="read",ip="afterRead",rp="beforeMain",np="main",sp="afterMain",op="beforeWrite",ap="write",lp="afterWrite",cp=[ep,tp,ip,rp,np,sp,op,ap,lp];function Nr(t){return t?(t.nodeName||"").toLowerCase():null}function Yi(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Pn(t){var e=Yi(t).Element;return t instanceof e||t instanceof Element}function or(t){var e=Yi(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function tu(t){if(typeof ShadowRoot>"u")return!1;var e=Yi(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}
vendor: 16,560 bytes, line 107
107function Lb(t){var e=t.state;Object.keys(e.elements).forEach(function(i){var r=e.styles[i]||{},n=e.attributes[i]||{},s=e.elements[i];!or(s)||!Nr(s)||(Object.assign(s.style,r),Object.keys(n).forEach(function(o){var l=n[o];l===!1?s.removeAttribute(o):s.setAttribute(o,l===!0?"":l)}))})}function Mb(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach(function(r){var n=e.elements[r],s=e.attributes[r]||{},o=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:i[r]),l=o.reduce(function(_,b){return _[b]="",_},{});!or(n)||!Nr(n)||(Object.assign(n.style,l),Object.keys(s).forEach(function(_){n.removeAttribute(_)}))})}}const iu={name:"applyStyles",enabled:!0,phase:"write",fn:Lb,effect:Mb,requires:["computeStyles"]};function Rr(t){return t.split("-")[0]}var On=Math.max,Ea=Math.min,bs=Math.round;function Tc(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function up(){return!/^((?!chrome|android).)*safari/i.test(Tc())}function ws(t,e,i){e===void 0&&(e=!1),i===void 0&&(i=!1);var r=t.getBoundingClientRect(),n=1,s=1;e&&or(t)&&(n=t.offsetWidth>0&&bs(r.width)/t.offsetWidth||1,s=t.offsetHeight>0&&bs(r.height)/t.offsetHeight||1);var o=Pn(t)?Yi(t):window,l=o.visualViewport,_=!up()&&i,b=(r.left+(_&&l?l.offsetLeft:0))/n,m=(r.top+(_&&l?l.offsetTop:0))/s,y=r.width/n,T=r.height/s;return{width:y,height:T,top:m,right:b+y,bottom:m+T,left:b,x:b,y:m}}function ru(t){var e=ws(t),i=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:r}}function dp(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&tu(i)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Xr(t){return Yi(t).getComputedStyle(t)}function Rb(t){return["table","td","th"].indexOf(Nr(t))>=0}function ln(t){return((Pn(t)?t.ownerDocument:t.document)||window.document).documentElement}function Fa(t){return Nr(t)==="html"?t:t.assignedSlot||t.parentNode||(tu(t)?t.host:null)||ln(t)}function $d(t){return!or(t)||Xr(t).position==="fixed"?null:t.offsetParent}function Db(t){var e=/firefox/i.test(Tc()),i=/Trident/i.test(Tc());if(i&&or(t)){var r=Xr(t);if(r.position==="fixed")return null}var n=Fa(t);for(tu(n)&&(n=n.host);or(n)&&["html","body"].indexOf(Nr(n))<0;){var s=Xr(n);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 n;n=n.parentNode}return null}function no(t){for(var e=Yi(t),i=$d(t);i&&Rb(i)&&Xr(i).position==="static";)i=$d(i);return i&&(Nr(i)==="html"||Nr(i)==="body"&&Xr(i).position==="static")?e:i||Db(t)||e}function nu(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Js(t,e,i){return On(t,Ea(e,i))}function Nb(t,e,i){var r=Js(t,e,i);return r>i?i:r}function fp(){return{top:0,right:0,bottom:0,left:0}}function hp(t){return Object.assign({},fp(),t)}function pp(t,e){return e.reduce(function(i,r){return i[r]=t,i},{})}var $b=function(e,i){return e=typeof e=="function"?e(Object.assign({},i.rects,{placement:i.placement})):e,hp(typeof e!="number"?e:pp(e,Cs))};function Fb(t){var e,i=t.state,r=t.name,n=t.options,s=i.elements.arrow,o=i.modifiersData.popperOffsets,l=Rr(i.placement),_=nu(l),b=[Li,Gi].indexOf(l)>=0,m=b?"height":"width";if(!(!s||!o)){var y=$b(n.padding,i),T=ru(s),g=_==="y"?Pi:Li,d=_==="y"?Ki:Gi,u=i.rects.reference[m]+i.rects.reference[_]-o[_]-i.rects.popper[m],w=o[_]-i.rects.reference[_],h=no(s),p=h?_==="y"?h.clientHeight||0:h.clientWidth||0:0,c=u/2-w/2,f=y[g],v=p-T[m]-y[d],E=p/2-T[m]/2+c,C=Js(f,E,v),O=_;i.modifiersData[r]=(e={},e[O]=C,e.centerOffset=C-E,e)}}function jb(t){var e=t.state,i=t.options,r=i.element,n=r===void 0?"[data-popper-arrow]":r;n!=null&&(typeof n=="string"&&(n=e.elements.popper.querySelector(n),!n)||dp(e.elements.popper,n)&&(e.elements.arrow=n))}const mp={name:"arrow",enabled:!0,phase:"main",fn:Fb,effect:jb,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function _s(t){return t.split("-")[1]}var Ub={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Bb(t,e){var i=t.x,r=t.y,n=e.devicePixelRatio||1;return{x:bs(i*n)/n||0,y:bs(r*n)/n||0}}function Fd(t){var e,i=t.popper,r=t.popperRect,n=t.placement,s=t.variation,o=t.offsets,l=t.position,_=t.gpuAcceleration,b=t.adaptive,m=t.roundOffsets,y=t.isFixed,T=o.x,g=T===void 0?0:T,d=o.y,u=d===void 0?0:d,w=typeof m=="function"?m({x:g,y:u}):{x:g,y:u};g=w.x,u=w.y;var h=o.hasOwnProperty("x"),p=o.hasOwnProperty("y"),c=Li,f=Pi,v=window;if(b){var E=no(i),C="clientHeight",O="clientWidth";if(E===Yi(i)&&(E=ln(i),Xr(E).position!=="static"&&l==="absolute"&&(C="scrollHeight",O="scrollWidth")),E=E,n===Pi||(n===Li||n===Gi)&&s===ys){f=Ki;var A=y&&E===v&&v.visualViewport?v.visualViewport.height:E[C];u-=A-r.height,u*=_?1:-1}if(n===Li||(n===Pi||n===Ki)&&s===ys){c=Gi;var I=y&&E===v&&v.visualViewport?v.visualViewport.width:E[O];g-=I-r.width,g*=_?1:-1}}var N=Object.assign({position:l},b&&Ub),D=m===!0?Bb({x:g,y:u},Yi(i)):{x:g,y:u};if(g=D.x,u=D.y,_){var U;return Object.assign({},N,(U={},U[f]=p?"0":"",U[c]=h?"0":"",U.transform=(v.devicePixelRatio||1)<=1?"translate("+g+"px, "+u+"px)":"translate3d("+g+"px, "+u+"px, 0)",U))}return Object.assign({},N,(e={},e[f]=p?u+"px":"",e[c]=h?g+"px":"",e.transform="",e))}function qb(t){var e=t.state,i=t.options,r=i.gpuAcceleration,n=r===void 0?!0:r,s=i.adaptive,o=s===void 0?!0:s,l=i.roundOffsets,_=l===void 0?!0:l,b={placement:Rr(e.placement),variation:_s(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:n,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Fd(Object.assign({},b,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:_})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Fd(Object.assign({},b,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:_})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const su={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:qb,data:{}};var Bo={passive:!0};function Vb(t){var e=t.state,i=t.instance,r=t.options,n=r.scroll,s=n===void 0?!0:n,o=r.resize,l=o===void 0?!0:o,_=Yi(e.elements.popper),b=[].concat(e.scrollParents.reference,e.scrollParents.popper);return s&&b.forEach(function(m){m.addEventListener("scroll",i.update,Bo)}),l&&_.addEventListener("resize",i.update,Bo),function(){s&&b.forEach(function(m){m.removeEventListener("scroll",i.update,Bo)}),l&&_.removeEventListener("resize",i.update,Bo)}}const ou={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Vb,data:{}};var Hb={left:"right",right:"left",bottom:"top",top:"bottom"};function da(t){return t.replace(/left|right|bottom|top/g,function(e){return Hb[e]})}var zb={start:"end",end:"start"};function jd(t){return t.replace(/start|end/g,function(e){return zb[e]})}function au(t){var e=Yi(t),i=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:i,scrollTop:r}}function lu(t){return ws(ln(t)).left+au(t).scrollLeft}function Wb(t,e){var i=Yi(t),r=ln(t),n=i.visualViewport,s=r.clientWidth,o=r.clientHeight,l=0,_=0;if(n){s=n.width,o=n.height;var b=up();(b||!b&&e==="fixed")&&(l=n.offsetLeft,_=n.offsetTop)}return{width:s,height:o,x:l+lu(t),y:_}}function Kb(t){var e,i=ln(t),r=au(t),n=(e=t.ownerDocument)==null?void 0:e.body,s=On(i.scrollWidth,i.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),o=On(i.scrollHeight,i.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),l=-r.scrollLeft+lu(t),_=-r.scrollTop;return Xr(n||i).direction==="rtl"&&(l+=On(i.clientWidth,n?n.clientWidth:0)-s),{width:s,height:o,x:l,y:_}}function cu(t){var e=Xr(t),i=e.overflow,r=e.overflowX,n=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+n+r)}function gp(t){return["html","body","#document"].indexOf(Nr(t))>=0?t.ownerDocument.body:or(t)&&cu(t)?t:gp(Fa(t))}function Qs(t,e){var i;e===void 0&&(e=[]);var r=gp(t),n=r===((i=t.ownerDocument)==null?void 0:i.body),s=Yi(r),o=n?[s].concat(s.visualViewport||[],cu(r)?r:[]):r,l=e.concat(o);return n?l:l.concat(Qs(Fa(o)))}function Cc(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Gb(t,e){var i=ws(t,!1,e==="fixed");return i.top=i.top+t.clientTop,i.left=i.left+t.clientLeft,i.bottom=i.top+t.clientHeight,i.right=i.left+t.clientWidth,i.width=t.clientWidth,i.height=t.clientHeight,i.x=i.left,i.y=i.top,i}function Ud(t,e,i){return e===Zc?Cc(Wb(t,i)):Pn(e)?Gb(e,i):Cc(Kb(ln(t)))}function Yb(t){var e=Qs(Fa(t)),i=["absolute","fixed"].indexOf(Xr(t).position)>=0,r=i&&or(t)?no(t):t;return Pn(r)?e.filter(function(n){return Pn(n)&&dp(n,r)&&Nr(n)!=="body"}):[]}function Xb(t,e,i,r){var n=e==="clippingParents"?Yb(t):[].concat(e),s=[].concat(n,[i]),o=s[0],l=s.reduce(function(_,b){var m=Ud(t,b,r);return _.top=On(m.top,_.top),_.right=Ea(m.right,_.right),_.bottom=Ea(m.bottom,_.bottom),_.left=On(m.left,_.left),_},Ud(t,o,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function vp(t){var e=t.reference,i=t.element,r=t.placement,n=r?Rr(r):null,s=r?_s(r):null,o=e.x+e.width/2-i.width/2,l=e.y+e.height/2-i.height/2,_;switch(n){case Pi:_={x:o,y:e.y-i.height};break;case Ki:_={x:o,y:e.y+e.height};break;case Gi:_={x:e.x+e.width,y:l};break;case Li:_={x:e.x-i.width,y:l};break;default:_={x:e.x,y:e.y}}var b=n?nu(n):null;if(b!=null){var m=b==="y"?"height":"width";switch(s){case In:_[b]=_[b]-(e[m]/2-i[m]/2);break;case ys:_[b]=_[b]+(e[m]/2-i[m]/2);break}}return _}function Es(t,e){e===void 0&&(e={});var i=e,r=i.placement,n=r===void 0?t.placement:r,s=i.strategy,o=s===void 0?t.strategy:s,l=i.boundary,_=l===void 0?Qh:l,b=i.rootBoundary,m=b===void 0?Zc:b,y=i.elementContext,T=y===void 0?ls:y,g=i.altBoundary,d=g===void 0?!1:g,u=i.padding,w=u===void 0?0:u,h=hp(typeof w!="number"?w:pp(w,Cs)),p=T===ls?Zh:ls,c=t.rects.popper,f=t.elements[d?p:T],v=Xb(Pn(f)?f:f.contextElement||ln(t.elements.popper),_,m,o),E=ws(t.elements.reference),C=vp({reference:E,element:c,placement:n}),O=Cc(Object.assign({},c,C)),A=T===ls?O:E,I={top:v.top-A.top+h.top,bottom:A.bottom-v.bottom+h.bottom,left:v.left-A.left+h.left,right:A.right-v.right+h.right},N=t.modifiersData.offset;if(T===ls&&N){var D=N[n];Object.keys(I).forEach(function(U){var Q=[Gi,Ki].indexOf(U)>=0?1:-1,he=[Pi,Ki].indexOf(U)>=0?"y":"x";I[U]+=D[he]*Q})}return I}function Jb(t,e){e===void 0&&(e={});var i=e,r=i.placement,n=i.boundary,s=i.rootBoundary,o=i.padding,l=i.flipVariations,_=i.allowedAutoPlacements,b=_===void 0?eu:_,m=_s(r),y=m?l?Sc:Sc.filter(function(d){return _s(d)===m}):Cs,T=y.filter(function(d){return b.indexOf(d)>=0});T.length===0&&(T=y);var g=T.reduce(function(d,u){return d[u]=Es(t,{placement:u,boundary:n,rootBoundary:s,padding:o})[Rr(u)],d},{});return Object.keys(g).sort(function(d,u){return g[d]-g[u]})}function Qb(t){if(Rr(t)===$a)return[];var e=da(t);return[jd(t),e,jd(e)]}function Zb(t){var e=t.state,i=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var n=i.mainAxis,s=n===void 0?!0:n,o=i.altAxis,l=o===void 0?!0:o,_=i.fallbackPlacements,b=i.padding,m=i.boundary,y=i.rootBoundary,T=i.altBoundary,g=i.flipVariations,d=g===void 0?!0:g,u=i.allowedAutoPlacements,w=e.options.placement,h=Rr(w),p=h===w,c=_||(p||!d?[da(w)]:Qb(w)),f=[w].concat(c).reduce(function(ke,ae){return ke.concat(Rr(ae)===$a?Jb(e,{placement:ae,boundary:m,rootBoundary:y,padding:b,flipVariations:d,allowedAutoPlacements:u}):ae)},[]),v=e.rects.reference,E=e.rects.popper,C=new Map,O=!0,A=f[0],I=0;I<f.length;I++){var N=f[I],D=Rr(N),U=_s(N)===In,Q=[Pi,Ki].indexOf(D)>=0,he=Q?"width":"height",se=Es(e,{placement:N,boundary:m,rootBoundary:y,altBoundary:T,padding:b}),fe=Q?U?Gi:Li:U?Ki:Pi;v[he]>E[he]&&(fe=da(fe));var pe=da(fe),st=[];if(s&&st.push(se[D]<=0),l&&st.push(se[fe]<=0,se[pe]<=0),st.every(function(ke){return ke})){A=N,O=!1;break}C.set(N,st)}if(O)for(var Ee=d?3:1,oe=function(ae){var K=f.find(function(ve){var Le=C.get(ve);if(Le)return Le.slice(0,ae).every(function(tt){return tt})});if(K)return A=K,"break"},_e=Ee;_e>0;_e--){var Ce=oe(_e);if(Ce==="break")break}e.placement!==A&&(e.modifiersData[r]._skip=!0,e.placement=A,e.reset=!0)}}const yp={name:"flip",enabled:!0,phase:"main",fn:Zb,requiresIfExists:["offset"],data:{_skip:!1}};function Bd(t,e,i){return i===void 0&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function qd(t){return[Pi,Gi,Ki,Li].some(function(e){return t[e]>=0})}function ew(t){var e=t.state,i=t.name,r=e.rects.reference,n=e.rects.popper,s=e.modifiersData.preventOverflow,o=Es(e,{elementContext:"reference"}),l=Es(e,{altBoundary:!0}),_=Bd(o,r),b=Bd(l,n,s),m=qd(_),y=qd(b);e.modifiersData[i]={referenceClippingOffsets:_,popperEscapeOffsets:b,isReferenceHidden:m,hasPopperEscaped:y},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":m,"data-popper-escaped":y})}const bp={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:ew};function tw(t,e,i){var r=Rr(t),n=[Li,Pi].indexOf(r)>=0?-1:1,s=typeof i=="function"?i(Object.assign({},e,{placement:t})):i,o=s[0],l=s[1];return o=o||0,l=(l||0)*n,[Li,Gi].indexOf(r)>=0?{x:l,y:o}:{x:o,y:l}}function iw(t){var e=t.state,i=t.options,r=t.name,n=i.offset,s=n===void 0?[0,0]:n,o=eu.reduce(function(m,y){return m[y]=tw(y,e.rects,s),m},{}),l=o[e.placement],_=l.x,b=l.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=_,e.modifiersData.popperOffsets.y+=b),e.modifiersData[r]=o}const wp={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:iw};function rw(t){var e=t.state,i=t.name;e.modifiersData[i]=vp({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const uu={name:"popperOffsets",enabled:!0,phase:"read",fn:rw,data:{}};function nw(t){return t==="x"?"y":"x"}function sw(t){var e=t.state,i=t.options,r=t.name,n=i.mainAxis,s=n===void 0?!0:n,o=i.altAxis,l=o===void 0?!1:o,_=i.boundary,b=i.rootBoundary,m=i.altBoundary,y=i.padding,T=i.tether,g=T===void 0?!0:T,d=i.tetherOffset,u=d===void 0?0:d,w=Es(e,{boundary:_,rootBoundary:b,padding:y,altBoundary:m}),h=Rr(e.placement),p=_s(e.placement),c=!p,f=nu(h),v=nw(f),E=e.modifiersData.popperOffsets,C=e.rects.reference,O=e.rects.popper,A=typeof u=="function"?u(Object.assign({},e.rects,{placement:e.placement})):u,I=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),N=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,D={x:0,y:0};if(E){if(s){var U,Q=f==="y"?Pi:Li,he=f==="y"?Ki:Gi,se=f==="y"?"height":"width",fe=E[f],pe=fe+w[Q],st=fe-w[he],Ee=g?-O[se]/2:0,oe=p===In?C[se]:O[se],_e=p===In?-O[se]:-C[se],Ce=e.elements.arrow,ke=g&&Ce?ru(Ce):{width:0,height:0},ae=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:fp(),K=ae[Q],ve=ae[he],Le=Js(0,C[se],ke[se]),tt=c?C[se]/2-Ee-Le-K-I.mainAxis:oe-Le-K-I.mainAxis,at=c?-C[se]/2+Ee+Le+ve+I.mainAxis:_e+Le+ve+I.mainAxis,ut=e.elements.arrow&&no(e.elements.arrow),ht=ut?f==="y"?ut.clientTop||0:ut.clientLeft||0:0,bt=(U=N?.[f])!=null?U:0,wt=fe+tt-bt-ht,zt=fe+at-bt,Re=Js(g?Ea(pe,wt):pe,fe,g?On(st,zt):st);E[f]=Re,D[f]=Re-fe}if(l){var le,we=f==="x"?Pi:Li,Ze=f==="x"?Ki:Gi,je=E[v],Tt=v==="y"?"height":"width",Xe=je+w[we],ne=je-w[Ze],me=[Pi,Li].indexOf(h)!==-1,Ne=(le=N?.[v])!=null?le:0,vt=me?Xe:je-C[Tt]-O[Tt]-Ne+I.altAxis,it=me?je+C[Tt]+O[Tt]-Ne-I.altAxis:ne,pt=g&&me?Nb(vt,je,it):Js(g?vt:Xe,je,g?it:ne);E[v]=pt,D[v]=pt-je}e.modifiersData[r]=D}}const _p={name:"preventOverflow",enabled:!0,phase:"main",fn:sw,requiresIfExists:["offset"]};function ow(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function aw(t){return t===Yi(t)||!or(t)?au(t):ow(t)}function lw(t){var e=t.getBoundingClientRect(),i=bs(e.width)/t.offsetWidth||1,r=bs(e.height)/t.offsetHeight||1;return i!==1||r!==1}function cw(t,e,i){i===void 0&&(i=!1);var r=or(e),n=or(e)&&lw(e),s=ln(e),o=ws(t,n,i),l={scrollLeft:0,scrollTop:0},_={x:0,y:0};return(r||!r&&!i)&&((Nr(e)!=="body"||cu(s))&&(l=aw(e)),or(e)?(_=ws(e,!0),_.x+=e.clientLeft,_.y+=e.clientTop):s&&(_.x=lu(s))),{x:o.left+l.scrollLeft-_.x,y:o.top+l.scrollTop-_.y,width:o.width,height:o.height}}function uw(t){var e=new Map,i=new Set,r=[];
vendor: 5,715 bytes, line 107
107t.forEach(function(s){e.set(s.name,s)});function n(s){i.add(s.name);var o=[].concat(s.requires||[],s.requiresIfExists||[]);o.forEach(function(l){if(!i.has(l)){var _=e.get(l);_&&n(_)}}),r.push(s)}return t.forEach(function(s){i.has(s.name)||n(s)}),r}function dw(t){var e=uw(t);return cp.reduce(function(i,r){return i.concat(e.filter(function(n){return n.phase===r}))},[])}function fw(t){var e;return function(){return e||(e=new Promise(function(i){Promise.resolve().then(function(){e=void 0,i(t())})})),e}}function hw(t){var e=t.reduce(function(i,r){var n=i[r.name];return i[r.name]=n?Object.assign({},n,r,{options:Object.assign({},n.options,r.options),data:Object.assign({},n.data,r.data)}):r,i},{});return Object.keys(e).map(function(i){return e[i]})}var Vd={placement:"bottom",modifiers:[],strategy:"absolute"};function Hd(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function ja(t){t===void 0&&(t={});var e=t,i=e.defaultModifiers,r=i===void 0?[]:i,n=e.defaultOptions,s=n===void 0?Vd:n;return function(l,_,b){b===void 0&&(b=s);var m={placement:"bottom",orderedModifiers:[],options:Object.assign({},Vd,s),modifiersData:{},elements:{reference:l,popper:_},attributes:{},styles:{}},y=[],T=!1,g={state:m,setOptions:function(h){var p=typeof h=="function"?h(m.options):h;u(),m.options=Object.assign({},s,m.options,p),m.scrollParents={reference:Pn(l)?Qs(l):l.contextElement?Qs(l.contextElement):[],popper:Qs(_)};var c=dw(hw([].concat(r,m.options.modifiers)));return m.orderedModifiers=c.filter(function(f){return f.enabled}),d(),g.update()},forceUpdate:function(){if(!T){var h=m.elements,p=h.reference,c=h.popper;if(Hd(p,c)){m.rects={reference:cw(p,no(c),m.options.strategy==="fixed"),popper:ru(c)},m.reset=!1,m.placement=m.options.placement,m.orderedModifiers.forEach(function(I){return m.modifiersData[I.name]=Object.assign({},I.data)});for(var f=0;f<m.orderedModifiers.length;f++){if(m.reset===!0){m.reset=!1,f=-1;continue}var v=m.orderedModifiers[f],E=v.fn,C=v.options,O=C===void 0?{}:C,A=v.name;typeof E=="function"&&(m=E({state:m,options:O,name:A,instance:g})||m)}}}},update:fw(function(){return new Promise(function(w){g.forceUpdate(),w(m)})}),destroy:function(){u(),T=!0}};if(!Hd(l,_))return g;g.setOptions(b).then(function(w){!T&&b.onFirstUpdate&&b.onFirstUpdate(w)});function d(){m.orderedModifiers.forEach(function(w){var h=w.name,p=w.options,c=p===void 0?{}:p,f=w.effect;if(typeof f=="function"){var v=f({state:m,name:h,instance:g,options:c}),E=function(){};y.push(v||E)}})}function u(){y.forEach(function(w){return w()}),y=[]}return g}}var pw=ja(),mw=[ou,uu,su,iu],gw=ja({defaultModifiers:mw}),vw=[ou,uu,su,iu,wp,yp,_p,mp,bp],du=ja({defaultModifiers:vw});const Ep=Object.freeze(Object.defineProperty({__proto__:null,afterMain:sp,afterRead:ip,afterWrite:lp,applyStyles:iu,arrow:mp,auto:$a,basePlacements:Cs,beforeMain:rp,beforeRead:ep,beforeWrite:op,bottom:Ki,clippingParents:Qh,computeStyles:su,createPopper:du,createPopperBase:pw,createPopperLite:gw,detectOverflow:Es,end:ys,eventListeners:ou,flip:yp,hide:bp,left:Li,main:np,modifierPhases:cp,offset:wp,placements:eu,popper:ls,popperGenerator:ja,popperOffsets:uu,preventOverflow:_p,read:tp,reference:Zh,right:Gi,start:In,top:Pi,variationPlacements:Sc,viewport:Zc,write:ap},Symbol.toStringTag,{value:"Module"}));const sn=new Map,Tl={set(t,e,i){sn.has(t)||sn.set(t,new Map);const r=sn.get(t);if(!r.has(e)&&r.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(r.keys())[0]}.`);return}r.set(e,i)},get(t,e){return sn.has(t)&&sn.get(t).get(e)||null},remove(t,e){if(!sn.has(t))return;const i=sn.get(t);i.delete(e),i.size===0&&sn.delete(t)}},yw=1e6,bw=1e3,Ac="transitionend",Sp=t=>(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,(e,i)=>`#${CSS.escape(i)}`)),t),ww=t=>t==null?`${t}`:Object.prototype.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase(),_w=t=>{do t+=Math.floor(Math.random()*yw);while(document.getElementById(t));return t},Ew=t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const r=Number.parseFloat(e),n=Number.parseFloat(i);return!r&&!n?0:(e=e.split(",")[0],i=i.split(",")[0],(Number.parseFloat(e)+Number.parseFloat(i))*bw)},Tp=t=>{t.dispatchEvent(new Event(Ac))},Kr=t=>!t||typeof t!="object"?!1:(typeof t.jquery<"u"&&(t=t[0]),typeof t.nodeType<"u"),on=t=>Kr(t)?t.jquery?t[0]:t:typeof t=="string"&&t.length>0?document.querySelector(Sp(t)):null,As=t=>{if(!Kr(t)||t.getClientRects().length===0)return!1;const e=getComputedStyle(t).getPropertyValue("visibility")==="visible",i=t.closest("details:not([open])");if(!i)return e;if(i!==t){const r=t.closest("summary");if(r&&r.parentNode!==i||r===null)return!1}return e},an=t=>!t||t.nodeType!==Node.ELEMENT_NODE||t.classList.contains("disabled")?!0:typeof t.disabled<"u"?t.disabled:t.hasAttribute("disabled")&&t.getAttribute("disabled")!=="false",Cp=t=>{if(!document.documentElement.attachShadow)return null;if(typeof t.getRootNode=="function"){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?Cp(t.parentNode):null},Sa=()=>{},so=t=>{t.offsetHeight},Ap=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,Cl=[],Sw=t=>{document.readyState==="loading"?(Cl.length||document.addEventListener("DOMContentLoaded",()=>{for(const e of Cl)e()}),Cl.push(t)):t()},ar=()=>document.documentElement.dir==="rtl",ur=t=>{Sw(()=>{const e=Ap();if(e){const i=t.NAME,r=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=r,t.jQueryInterface)}})},$i=(t,e=[],i=t)=>
107typeof t=="function"?t.call(...e):i,xp=(t,e,i=!0)=>{if(!i){$i(t);return}const n=Ew(e)+5;let s=!1;const o=({target:l})=>{l===e&&(s=!0,e.removeEventListener(Ac,o),$i(t))};e.addEventListener(Ac,o),setTimeout(()=>{s||Tp(e)},n)},fu=(t,e,i,r)=>{const n=t.length;let s=t.indexOf(e);return s===-1?!i&&r?t[n-1]:t[0]:(s+=i?1:-1,r&&(s=(s+n)%n),t[Math.max(0,Math.min(s,n-1))])},Tw=/[^.]*(?=\..*)\.|.*/,Cw=/\..*/,Aw=/::\d+$/,Al={};let zd=1;const Op={mouseenter:"mouseover",mouseleave:"mouseout"},xw=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 kp(t,e){return e&&`${e}::${zd++}`||t.uidEvent||zd++}function Ip(t){const e=kp(t);return t.uidEvent=e,Al[e]=Al[e]||{},Al[e]}function Ow(t,e){return function i(r){return hu(r,{delegateTarget:t}),i.oneOff&&Se.off(t,r.type,e),e.apply(t,[r])}}function kw(t,e,i){return function r(n){const s=t.querySelectorAll(e);for(let{target:o}=n;o&&o!==this;o=o.parentNode)for(const l of s)if(l===o)return hu(n,{delegateTarget:o}),r.oneOff&&Se.off(t,n.type,e,i),i.apply(o,[n])}}function Pp(t,e,i=null){return Object.values(t).find(r=>r.callable===e&&r.delegationSelector===i)}function Lp(t,e,i){const r=typeof e=="string",n=r?i:e||i;let s=Mp(t);return xw.has(s)||(s=t),[r,n,s]}function Wd(t,e,i,r,n){if(typeof e!="string"||!t)return;let[s,o,l]=Lp(e,i,r);e in Op&&(o=(d=>function(u){if(!u.relatedTarget||u.relatedTarget!==u.delegateTarget&&!u.delegateTarget.contains(u.relatedTarget))return d.call(this,u)})(o));const _=Ip(t),b=_[l]||(_[l]={}),m=Pp(b,o,s?i:null);if(m){m.oneOff=m.oneOff&&n;return}const y=kp(o,e.replace(Tw,"")),T=s?kw(t,i,o):Ow(t,o);T.delegationSelector=s?i:null,T.callable=o,T.oneOff=n,T.uidEvent=y,b[y]=T,t.addEventListener(l,T,s)}function xc(t,e,i,r,n){const s=Pp(e[i],r,n);s&&(t.removeEventListener(i,s,!!n),delete e[i][s.uidEvent])}function Iw(t,e,i,r){const n=e[i]||{};for(const[s,o]of Object.entries(n))s.includes(r)&&xc(t,e,i,o.callable,o.delegationSelector)}function Mp(t){return t=t.replace(Cw,""),Op[t]||t}const Se={on(t,e,i,r){Wd(t,e,i,r,!1)},one(t,e,i,r){Wd(t,e,i,r,!0)},off(t,e,i,r){if(typeof e!="string"||!t)return;const[n,s,o]=Lp(e,i,r),l=o!==e,_=Ip(t),b=_[o]||{},m=e.startsWith(".");if(typeof s<"u"){if(!Object.keys(b).length)return;xc(t,_,o,s,n?i:null);return}if(m)for(const y of Object.keys(_))Iw(t,_,y,e.slice(1));for(const[y,T]of Object.entries(b)){const g=y.replace(Aw,"");(!l||e.includes(g))&&xc(t,_,o,T.callable,T.delegationSelector)}},trigger(t,e,i){if(typeof e!="string"||!t)return null;const r=Ap(),n=Mp(e),s=e!==n;let o=null,l=!0,_=!0,b=!1;s&&r&&(o=r.Event(e,i),r(t).trigger(o),l=!o.isPropagationStopped(),_=!o.isImmediatePropagationStopped(),b=o.isDefaultPrevented());const m=hu(new Event(e,{bubbles:l,cancelable:!0}),i);return b&&m.preventDefault(),_&&t.dispatchEvent(m),m.defaultPrevented&&o&&o.preventDefault(),m}};function hu(t,e={}){for(const[i,r]of Object.entries(e))try{t[i]=r}catch{Object.defineProperty(t,i,{configurable:!0,get(){return r}})}return t}function Kd(t){if(t==="true")return!0;if(t==="false")return!1;if(t===Number(t).toString())return Number(t);if(t===""||t==="null")return null;if(typeof t!="string")return t;try{return JSON.parse(decodeURIComponent(t))}catch{return t}}function xl(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}const Gr={setDataAttribute(t,e,i){t.setAttribute(`data-bs-${xl(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${xl(e)}`)},getDataAttributes(t){if(!t)return{};const e={},i=Object.keys(t.dataset).filter(r=>r.startsWith("bs")&&!r.startsWith("bsConfig"));for(const r of i){let n=r.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1),e[n]=Kd(t.dataset[r])}return e},getDataAttribute(t,e){return Kd(t.getAttribute(`data-bs-${xl(e)}`))}};class oo{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,i){const r=Kr(i)?Gr.getDataAttribute(i,"config"):{};return{...this.constructor.Default,...typeof r=="object"?r:{},...Kr(i)?Gr.getDataAttributes(i):{},...typeof e=="object"?e:{}}}_typeCheckConfig(e,i=this.constructor.DefaultType){for(const[r,n]of Object.entries(i)){const s=e[r],o=Kr(s)?"element":ww(s);if(!new RegExp(n).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${r}" provided type "${o}" but expected type "${n}".`)}}}const Pw="5.3.8";class wr extends oo{constructor(e,i){super(),e=on(e),e&&(this._element=e,this._config=this._getConfig(i),Tl.set(this._element,this.constructor.DATA_KEY,this))}dispose(){Tl.remove(this._element,this.constructor.DATA_KEY),Se.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,i,r=!0){xp(e,i,r)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return Tl.get(on(e),this.DATA_KEY)}static getOrCreateInstance(e,i={}){return this.getInstance(e)||new this(e,typeof i=="object"?i:null)}static get VERSION(){return Pw}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}}const Ol=t=>{let e=t.getAttribute("data-bs-target");if(!e||e==="#"){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),e=i&&i!=="#"?i.trim():null}return e?e.split(",").map(i=>Sp(i)).join(","):null},lt={find(t,e=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(e,t))},findOne(t,e=document.documentElement){return Element.prototype.querySelector.call(e,t)},children(t,e){return[].concat(...t.children).filter(i=>i.matches(e))},parents(t,e){const i=[];let r=t.parentNode.closest(e);for(;r;)i.push(r),r=r.parentNode.closest(e);return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(i=>`${i}:not([tabindex^="-"])`).join(",");return this.find(e,t).filter(i=>!an(i)&&As(i))},getSelectorFromElement(t){const e=Ol(t);return e&&lt.findOne(e)?e:null},getElementFromSelector(t){const e=Ol(t);return e?lt.findOne(e):null},getMultipleElementsFromSelector(t){const e=Ol(t);return e?lt.find(e):[]}},Ua=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,r=t.NAME;Se.on(document,i,`[data-bs-dismiss="${r}"]`,function(n){if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),an(this))return;const s=lt.getElementFromSelector(this)||this.closest(`.${r}`);t.getOrCreateInstance(s)[e]()})},Lw="alert",Mw="bs.alert",Rp=`.${Mw}`,Rw=`close${Rp}`,Dw=`closed${Rp}`,Nw="fade",$w="show";class ao extends wr{static get NAME(){return Lw}close(){if(Se.trigger(this._element,Rw).defaultPrevented)return;this._element.classList.remove($w);const i=this._element.classList.contains(Nw);this._queueCallback(()=>this._destroyElement(),this._element,i)}_destroyElement(){this._element.remove(),Se.trigger(this._element,Dw),this.dispose()}static jQueryInterface(e){return this.each(function(){const i=ao.getOrCreateInstance(this);if(typeof e=="string"){if(i[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method n
107amed "${e}"`);i[e](this)}})}}Ua(ao,"close");ur(ao);const Fw="button",jw="bs.button",Uw=`.${jw}`,Bw=".data-api",qw="active",Gd='[data-bs-toggle="button"]',Vw=`click${Uw}${Bw}`;class lo extends wr{static get NAME(){return Fw}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(qw))}static jQueryInterface(e){return this.each(function(){const i=lo.getOrCreateInstance(this);e==="toggle"&&i[e]()})}}Se.on(document,Vw,Gd,t=>{t.preventDefault();const e=t.target.closest(Gd);lo.getOrCreateInstance(e).toggle()});ur(lo);const Hw="swipe",xs=".bs.swipe",zw=`touchstart${xs}`,Ww=`touchmove${xs}`,Kw=`touchend${xs}`,Gw=`pointerdown${xs}`,Yw=`pointerup${xs}`,Xw="touch",Jw="pen",Qw="pointer-event",Zw=40,e_={endCallback:null,leftCallback:null,rightCallback:null},t_={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Ta extends oo{constructor(e,i){super(),this._element=e,!(!e||!Ta.isSupported())&&(this._config=this._getConfig(i),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return e_}static get DefaultType(){return t_}static get NAME(){return Hw}dispose(){Se.off(this._element,xs)}_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(),$i(this._config.endCallback)}_move(e){this._deltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this._deltaX}_handleSwipe(){const e=Math.abs(this._deltaX);if(e<=Zw)return;const i=e/this._deltaX;this._deltaX=0,i&&$i(i>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(Se.on(this._element,Gw,e=>this._start(e)),Se.on(this._element,Yw,e=>this._end(e)),this._element.classList.add(Qw)):(Se.on(this._element,zw,e=>this._start(e)),Se.on(this._element,Ww,e=>this._move(e)),Se.on(this._element,Kw,e=>this._end(e)))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&(e.pointerType===Jw||e.pointerType===Xw)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const i_="carousel",r_="bs.carousel",cn=`.${r_}`,Dp=".data-api",n_="ArrowLeft",s_="ArrowRight",o_=500,qs="next",rs="prev",cs="left",fa="right",a_=`slide${cn}`,kl=`slid${cn}`,l_=`keydown${cn}`,c_=`mouseenter${cn}`,u_=`mouseleave${cn}`,d_=`dragstart${cn}`,f_=`load${cn}${Dp}`,h_=`click${cn}${Dp}`,Np="carousel",qo="active",p_="slide",m_="carousel-item-end",g_="carousel-item-start",v_="carousel-item-next",y_="carousel-item-prev",$p=".active",Fp=".carousel-item",b_=$p+Fp,w_=".carousel-item img",__=".carousel-indicators",E_="[data-bs-slide], [data-bs-slide-to]",S_='[data-bs-ride="carousel"]',T_={[n_]:fa,[s_]:cs},C_={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},A_={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Os extends wr{constructor(e,i){super(e,i),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=lt.findOne(__,this._element),this._addEventListeners(),this._config.ride===Np&&this.cycle()}static get Default(){return C_}static get DefaultType(){return A_}static get NAME(){return i_}next(){this._slide(qs)}nextWhenVisible(){!document.hidden&&As(this._element)&&this.next()}prev(){this._slide(rs)}pause(){this._isSliding&&Tp(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){Se.one(this._element,kl,()=>this.cycle());return}this.cycle()}}to(e){const i=this._getItems();if(e>i.length-1||e<0)return;if(this._isSliding){Se.one(this._element,kl,()=>this.to(e));return}const r=this._getItemIndex(this._getActive());if(r===e)return;const n=e>r?qs:rs;this._slide(n,i[e])}
vendor: 23,813 bytes, line 107
107dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&&Se.on(this._element,l_,e=>this._keydown(e)),this._config.pause==="hover"&&(Se.on(this._element,c_,()=>this.pause()),Se.on(this._element,u_,()=>this._maybeEnableCycle())),this._config.touch&&Ta.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const r of lt.find(w_,this._element))Se.on(r,d_,n=>n.preventDefault());const i={leftCallback:()=>this._slide(this._directionToOrder(cs)),rightCallback:()=>this._slide(this._directionToOrder(fa)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),o_+this._config.interval))}};this._swipeHelper=new Ta(this._element,i)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const i=T_[e.key];i&&(e.preventDefault(),this._slide(this._directionToOrder(i)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;const i=lt.findOne($p,this._indicatorsElement);i.classList.remove(qo),i.removeAttribute("aria-current");const r=lt.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);r&&(r.classList.add(qo),r.setAttribute("aria-current","true"))}_updateInterval(){const e=this._activeElement||this._getActive();if(!e)return;const i=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=i||this._config.defaultInterval}_slide(e,i=null){if(this._isSliding)return;const r=this._getActive(),n=e===qs,s=i||fu(this._getItems(),r,n,this._config.wrap);if(s===r)return;const o=this._getItemIndex(s),l=g=>Se.trigger(this._element,g,{relatedTarget:s,direction:this._orderToDirection(e),from:this._getItemIndex(r),to:o});if(l(a_).defaultPrevented||!r||!s)return;const b=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=s;const m=n?g_:m_,y=n?v_:y_;s.classList.add(y),so(s),r.classList.add(m),s.classList.add(m);const T=()=>{s.classList.remove(m,y),s.classList.add(qo),r.classList.remove(qo,y,m),this._isSliding=!1,l(kl)};this._queueCallback(T,r,this._isAnimated()),b&&this.cycle()}_isAnimated(){return this._element.classList.contains(p_)}_getActive(){return lt.findOne(b_,this._element)}_getItems(){return lt.find(Fp,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return ar()?e===cs?rs:qs:e===cs?qs:rs}_orderToDirection(e){return ar()?e===rs?cs:fa:e===rs?fa:cs}static jQueryInterface(e){return this.each(function(){const i=Os.getOrCreateInstance(this,e);if(typeof e=="number"){i.to(e);return}if(typeof e=="string"){if(i[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);i[e]()}})}}Se.on(document,h_,E_,function(t){const e=lt.getElementFromSelector(this);if(!e||!e.classList.contains(Np))return;t.preventDefault();const i=Os.getOrCreateInstance(e),r=this.getAttribute("data-bs-slide-to");if(r){i.to(r),i._maybeEnableCycle();return}if(Gr.getDataAttribute(this,"slide")==="next"){i.next(),i._maybeEnableCycle();return}i.prev(),i._maybeEnableCycle()});Se.on(window,f_,()=>{const t=lt.find(S_);for(const e of t)Os.getOrCreateInstance(e)});ur(Os);const x_="collapse",O_="bs.collapse",co=`.${O_}`,k_=".data-api",I_=`show${co}`,P_=`shown${co}`,L_=`hide${co}`,M_=`hidden${co}`,R_=`click${co}${k_}`,Il="show",ps="collapse",Vo="collapsing",D_="collapsed",N_=`:scope .${ps} .${ps}`,$_="collapse-horizontal",F_="width",j_="height",U_=".collapse.show, .collapse.collapsing",Oc='[data-bs-toggle="collapse"]',B_={parent:null,toggle:!0},q_={parent:"(null|element)",toggle:"boolean"};class Ss extends wr{constructor(e,i){super(e,i),this._isTransitioning=!1,this._triggerArray=[];const r=lt.find(Oc);for(const n of r){const s=lt.getSelectorFromElement(n),o=lt.find(s).filter(l=>l===this._element);s!==null&&o.length&&this._triggerArray.push(n)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return B_}static get DefaultType(){return q_}static get NAME(){return x_}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(U_).filter(l=>l!==this._element).map(l=>Ss.getOrCreateInstance(l,{toggle:!1}))),e.length&&e[0]._isTransitioning||Se.trigger(this._element,I_).defaultPrevented)return;for(const l of e)l.hide();const r=this._getDimension();this._element.classList.remove(ps),this._element.classList.add(Vo),this._element.style[r]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const n=()=>{this._isTransitioning=!1,this._element.classList.remove(Vo),this._element.classList.add(ps,Il),this._element.style[r]="",Se.trigger(this._element,P_)},o=`scroll${r[0].toUpperCase()+r.slice(1)}`;this._queueCallback(n,this._element,!0),this._element.style[r]=`${this._element[o]}px`}hide(){if(this._isTransitioning||!this._isShown()||Se.trigger(this._element,L_).defaultPrevented)return;const i=this._getDimension();this._element.style[i]=`${this._element.getBoundingClientRect()[i]}px`,so(this._element),this._element.classList.add(Vo),this._element.classList.remove(ps,Il);for(const n of this._triggerArray){const s=lt.getElementFromSelector(n);s&&!this._isShown(s)&&this._addAriaAndCollapsedClass([n],!1)}this._isTransitioning=!0;const r=()=>{this._isTransitioning=!1,this._element.classList.remove(Vo),this._element.classList.add(ps),Se.trigger(this._element,M_)};this._element.style[i]="",this._queueCallback(r,this._element,!0)}_isShown(e=this._element){return e.classList.contains(Il)}_configAfterMerge(e){return e.toggle=!!e.toggle,e.parent=on(e.parent),e}_getDimension(){return this._element.classList.contains($_)?F_:j_}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren(Oc);for(const i of e){const r=lt.getElementFromSelector(i);r&&this._addAriaAndCollapsedClass([i],this._isShown(r))}}_getFirstLevelChildren(e){const i=lt.find(N_,this._config.parent);return lt.find(e,this._config.parent).filter(r=>!i.includes(r))}_addAriaAndCollapsedClass(e,i){if(e.length)for(const r of e)r.classList.toggle(D_,!i),r.setAttribute("aria-expanded",i)}static jQueryInterface(e){const i={};return typeof e=="string"&&/show|hide/.test(e)&&(i.toggle=!1),this.each(function(){const r=Ss.getOrCreateInstance(this,i);if(typeof e=="string"){if(typeof r[e]>"u")throw new TypeError(`No method named "${e}"`);r[e]()}})}}Se.on(document,R_,Oc,function(t){(t.target.tagName==="A"||t.delegateTarget&&t.delegateTarget.tagName==="A")&&t.preventDefault();for(const e of lt.getMultipleElementsFromSelector(this))Ss.getOrCreateInstance(e,{toggle:!1}).toggle()});ur(Ss);const Yd="dropdown",V_="bs.dropdown",$n=`.${V_}`,pu=".data-api",H_="Escape",Xd="Tab",z_="ArrowUp",Jd="ArrowDown",W_=2,K_=`hide${$n}`,G_=`hidden${$n}`,Y_=`show${$n}`,X_=`shown${$n}`,jp=`click${$n}${pu}`,Up=`keydown${$n}${pu}`,J_=`keyup${$n}${pu}`,us="show",Q_="dropup",Z_="dropend",eE="dropstart",tE="dropup-center",iE="dropdown-center",Tn='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',rE=`${Tn}.${us}`,ha=".dropdown-menu",nE=".navbar",sE=".navbar-nav",oE=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",aE=ar()?"top-end":"top-start",lE=ar()?"top-start":"top-end",cE=ar()?"bottom-end":"bottom-start",uE=ar()?"bottom-start":"bottom-end",dE=ar()?"left-start":"right-start",fE=ar()?"right-start":"left-start",hE="top",pE="bottom",mE={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},gE={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class ji extends wr{constructor(e,i){super(e,i),this._popper=null,this._parent=this._element.parentNode,this._menu=lt.next(this._element,ha)[0]||lt.prev(this._element,ha)[0]||lt.findOne(ha,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return mE}static get DefaultType(){return gE}static get NAME(){return Yd}toggle(){return this._isShown()?this.hide():this.show()}show(){if(an(this._element)||this._isShown())return;const e={relatedTarget:this._element};if(!Se.trigger(this._element,Y_,e).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(sE))for(const r of[].concat(...document.body.children))Se.on(r,"mouseover",Sa);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(us),this._element.classList.add(us),Se.trigger(this._element,X_,e)}}hide(){if(an(this._element)||!this._isShown())return;const e={relatedTarget:this._element};this._completeHide(e)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(e){if(!Se.trigger(this._element,K_,e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const r of[].concat(...document.body.children))Se.off(r,"mouseover",Sa);this._popper&&this._popper.destroy(),this._menu.classList.remove(us),this._element.classList.remove(us),this._element.setAttribute("aria-expanded","false"),Gr.removeDataAttribute(this._menu,"popper"),Se.trigger(this._element,G_,e)}}_getConfig(e){if(e=super._getConfig(e),typeof e.reference=="object"&&!Kr(e.reference)&&typeof e.reference.getBoundingClientRect!="function")throw new TypeError(`${Yd.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(){if(typeof Ep>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org/docs/v2/)");let e=this._element;this._config.reference==="parent"?e=this._parent:Kr(this._config.reference)?e=on(this._config.reference):typeof this._config.reference=="object"&&(e=this._config.reference);const i=this._getPopperConfig();this._popper=du(e,this._menu,i)}_isShown(){return this._menu.classList.contains(us)}_getPlacement(){const e=this._parent;if(e.classList.contains(Z_))return dE;if(e.classList.contains(eE))return fE;if(e.classList.contains(tE))return hE;if(e.classList.contains(iE))return pE;const i=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return e.classList.contains(Q_)?i?lE:aE:i?uE:cE}_detectNavbar(){return this._element.closest(nE)!==null}_getOffset(){const{offset:e}=this._config;return typeof e=="string"?e.split(",").map(i=>Number.parseInt(i,10)):typeof e=="function"?i=>e(i,this._element):e}_getPopperConfig(){const e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(Gr.setDataAttribute(this._menu,"popper","static"),e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,...$i(this._config.popperConfig,[void 0,e])}}_selectMenuItem({key:e,target:i}){const r=lt.find(oE,this._menu).filter(n=>As(n));r.length&&fu(r,i,e===Jd,!r.includes(i)).focus()}static jQueryInterface(e){return this.each(function(){const i=ji.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof i[e]>"u")throw new TypeError(`No method named "${e}"`);i[e]()}})}static clearMenus(e){if(e.button===W_||e.type==="keyup"&&e.key!==Xd)return;const i=lt.find(rE);for(const r of i){const n=ji.getInstance(r);if(!n||n._config.autoClose===!1)continue;const s=e.composedPath(),o=s.includes(n._menu);if(s.includes(n._element)||n._config.autoClose==="inside"&&!o||n._config.autoClose==="outside"&&o||n._menu.contains(e.target)&&(e.type==="keyup"&&e.key===Xd||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;const l={relatedTarget:n._element};e.type==="click"&&(l.clickEvent=e),n._completeHide(l)}}static dataApiKeydownHandler(e){const i=/input|textarea/i.test(e.target.tagName),r=e.key===H_,n=[z_,Jd].includes(e.key);if(!n&&!r||i&&!r)return;e.preventDefault();const s=this.matches(Tn)?this:lt.prev(this,Tn)[0]||lt.next(this,Tn)[0]||lt.findOne(Tn,e.delegateTarget.parentNode),o=ji.getOrCreateInstance(s);if(n){e.stopPropagation(),o.show(),o._selectMenuItem(e);return}o._isShown()&&(e.stopPropagation(),o.hide(),s.focus())}}Se.on(document,Up,Tn,ji.dataApiKeydownHandler);Se.on(document,Up,ha,ji.dataApiKeydownHandler);Se.on(document,jp,ji.clearMenus);Se.on(document,J_,ji.clearMenus);Se.on(document,jp,Tn,function(t){t.preventDefault(),ji.getOrCreateInstance(this).toggle()});ur(ji);const Bp="backdrop",vE="fade",Qd="show",Zd=`mousedown.bs.${Bp}`,yE={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},bE={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class qp extends oo{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return yE}static get DefaultType(){return bE}static get NAME(){return Bp}show(e){if(!this._config.isVisible){$i(e);return}this._append();const i=this._getElement();this._config.isAnimated&&so(i),i.classList.add(Qd),this._emulateAnimation(()=>{$i(e)})}hide(e){if(!this._config.isVisible){$i(e);return}this._getElement().classList.remove(Qd),this._emulateAnimation(()=>{this.dispose(),$i(e)})}dispose(){this._isAppended&&(Se.off(this._element,Zd),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add(vE),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=on(e.rootElement),e}_append(){if(this._isAppended)return;const e=this._getElement();this._config.rootElement.append(e),Se.on(e,Zd,()=>{$i(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(e){xp(e,this._getElement(),this._config.isAnimated)}}const wE="focustrap",_E="bs.focustrap",Ca=`.${_E}`,EE=`focusin${Ca}`,SE=`keydown.tab${Ca}`,TE="Tab",CE="forward",ef="backward",AE={autofocus:!0,trapElement:null},xE={autofocus:"boolean",trapElement:"element"};class Vp extends oo{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return AE}static get DefaultType(){return xE}static get NAME(){return wE}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),Se.off(document,Ca),Se.on(document,EE,e=>this._handleFocusin(e)),Se.on(document,SE,e=>this._handleKeydown(e)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,Se.off(document,Ca))}_handleFocusin(e){const{trapElement:i}=this._config;if(e.target===document||e.target===i||i.contains(e.target))return;const r=lt.focusableChildren(i);r.length===0?i.focus():this._lastTabNavDirection===ef?r[r.length-1].focus():r[0].focus()}_handleKeydown(e){e.key===TE&&(this._lastTabNavDirection=e.shiftKey?ef:CE)}}const tf=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",rf=".sticky-top",Ho="padding-right",nf="margin-right";class kc{constructor(){this._element=document.body}getWidth(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,Ho,i=>i+e),this._setElementAttributes(tf,Ho,i=>i+e),this._setElementAttributes(rf,nf,i=>i-e)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,Ho),this._resetElementAttributes(tf,Ho),this._resetElementAttributes(rf,nf)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,i,r){const n=this.getWidth(),s=o=>{if(o!==this._element&&window.innerWidth>o.clientWidth+n)return;this._saveInitialAttribute(o,i);const l=window.getComputedStyle(o).getPropertyValue(i);o.style.setProperty(i,`${r(Number.parseFloat(l))}px`)};this._applyManipulationCallback(e,s)}_saveInitialAttribute(e,i){const r=e.style.getPropertyValue(i);r&&Gr.setDataAttribute(e,i,r)}_resetElementAttributes(e,i){const r=n=>{const s=Gr.getDataAttribute(n,i);if(s===null){n.style.removeProperty(i);return}Gr.removeDataAttribute(n,i),n.style.setProperty(i,s)};this._applyManipulationCallback(e,r)}_applyManipulationCallback(e,i){if(Kr(e)){i(e);return}for(const r of lt.find(e,this._element))i(r)}}const OE="modal",kE="bs.modal",lr=`.${kE}`,IE=".data-api",PE="Escape",LE=`hide${lr}`,ME=`hidePrevented${lr}`,Hp=`hidden${lr}`,zp=`show${lr}`,RE=`shown${lr}`,DE=`resize${lr}`,NE=`click.dismiss${lr}`,$E=`mousedown.dismiss${lr}`,FE=`keydown.dismiss${lr}`,jE=`click${lr}${IE}`,sf="modal-open",UE="fade",of="show",Pl="modal-static",BE=".modal.show",qE=".modal-dialog",VE=".modal-body",HE='[data-bs-toggle="modal"]',zE={backdrop:!0,focus:!0,keyboard:!0},WE={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Ln extends wr{constructor(e,i){super(e,i),this._dialog=lt.findOne(qE,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new kc,this._addEventListeners()}static get Default(){return zE}static get DefaultType(){return WE}static get NAME(){return OE}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||this._isTransitioning||Se.trigger(this._element,zp,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(sf),this._adjustDialog(),this._backdrop.show(()=>this._showElement(e)))}hide(){!this._isShown||this._isTransitioning||Se.trigger(this._element,LE).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(of),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){Se.off(window,lr),Se.off(this._dialog,lr),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new qp({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Vp({trapElement:this._element})}_showElement(e){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const i=lt.findOne(VE,this._dialog);i&&(i.scrollTop=0),so(this._element),this._element.classList.add(of);const r=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,Se.trigger(this._element,RE,{relatedTarget:e})};this._queueCallback(r,this._dialog,this._isAnimated())}_addEventListeners(){Se.on(this._element,FE,e=>{if(e.key===PE){if(this._config.keyboard){this.hide();return}this._triggerBackdropTransition()}}),Se.on(window,DE,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),Se.on(this._element,$E,e=>{Se.one(this._element,NE,i=>{if(!(this._element!==e.target||this._element!==i.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(sf),this._resetAdjustments(),this._scrollBar.reset(),Se.trigger(this._element,Hp)})}_isAnimated(){return this._element.classList.contains(UE)}_triggerBackdropTransition(){if(Se.trigger(this._element,ME).defaultPrevented)return;const i=this._element.scrollHeight>document.documentElement.clientHeight,r=this._element.style.overflowY;r==="hidden"||this._element.classList.contains(Pl)||(i||(this._element.style.overflowY="hidden"),this._element.classList.add(Pl),this._queueCallback(()=>{this._element.classList.remove(Pl),this._queueCallback(()=>{this._element.style.overflowY=r},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,i=this._scrollBar.getWidth(),r=i>0;if(r&&!e){const n=ar()?"paddingLeft":"paddingRight";this._element.style[n]=`${i}px`}if(!r&&e){const n=ar()?"paddingRight":"paddingLeft";this._element.style[n]=`${i}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,i){return this.each(function(){const r=Ln.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof r[e]>"u")throw new TypeError(`No method named "${e}"`);r[e](i)}})}}Se.on(document,jE,HE,function(t){const e=lt.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),Se.one(e,zp,n=>{n.defaultPrevented||Se.one(e,Hp,()=>{As(this)&&this.focus()})});const i=lt.findOne(BE);i&&Ln.getInstance(i).hide(),Ln.getOrCreateInstance(e).toggle(this)});Ua(Ln);ur(Ln);const KE="offcanvas",GE="bs.offcanvas",Zr=`.${GE}`,Wp=".data-api",YE=`load${Zr}${Wp}`,XE="Escape",af="show",lf="showing",cf="hiding",JE="offcanvas-backdrop",Kp=".offcanvas.show",QE=`show${Zr}`,ZE=`shown${Zr}`,eS=`hide${Zr}`,uf=`hidePrevented${Zr}`,Gp=`hidden${Zr}`,tS=`resize${Zr}`,iS=`click${Zr}${Wp}`,rS=`keydown.dismiss${Zr}`,nS='[data-bs-toggle="offcanvas"]',sS={backdrop:!0,keyboard:!0,scroll:!1},oS={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Jr extends wr{constructor(e,i){super(e,i),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return sS}static get DefaultType(){return oS}static get NAME(){return KE}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown||Se.trigger(this._element,QE,{relatedTarget:e}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new kc().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(lf);const r=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(af),this._element.classList.remove(lf),Se.trigger(this._element,ZE,{relatedTarget:e})};this._queueCallback(r,this._element,!0)}hide(){if(!this._isShown||Se.trigger(this._element,eS).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(cf),this._backdrop.hide();const i=()=>{this._element.classList.remove(af,cf),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new kc().reset(),Se.trigger(this._element,Gp)};this._queueCallback(i,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const e=()=>{if(this._config.backdrop==="static"){Se.trigger(this._element,uf);return}this.hide()},i=!!this._config.backdrop;return new qp({className:JE,isVisible:i,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:i?e:null})}_initializeFocusTrap(){return new Vp({trapElement:this._element})}_addEventListeners(){Se.on(this._element,rS,e=>{if(e.key===XE){if(this._config.keyboard){this.hide();return}Se.trigger(this._element,uf)}})}static jQueryInterface(e){return this.each(function(){const i=Jr.getOrCreateInstance(this,e);if(typeof e=="string"){if(i[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method n
107amed "${e}"`);i[e](this)}})}}Se.on(document,iS,nS,function(t){const e=lt.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),an(this))return;Se.one(e,Gp,()=>{As(this)&&this.focus()});const i=lt.findOne(Kp);i&&i!==e&&Jr.getInstance(i).hide(),Jr.getOrCreateInstance(e).toggle(this)});Se.on(window,YE,()=>{for(const t of lt.find(Kp))Jr.getOrCreateInstance(t).show()});Se.on(window,tS,()=>{for(const t of lt.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(t).position!=="fixed"&&Jr.getOrCreateInstance(t).hide()});Ua(Jr);ur(Jr);const aS=/^aria-[\w-]*$/i,Yp={"*":["class","dir","id","lang","role",aS],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},lS=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),cS=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,uS=(t,e)=>{const i=t.nodeName.toLowerCase();return e.includes(i)?lS.has(i)?!!cS.test(t.nodeValue):!0:e.filter(r=>r instanceof RegExp).some(r=>r.test(i))};function dS(t,e,i){if(!t.length)return t;if(i&&typeof i=="function")return i(t);const n=new window.DOMParser().parseFromString(t,"text/html"),s=[].concat(...n.body.querySelectorAll("*"));for(const o of s){const l=o.nodeName.toLowerCase();if(!Object.keys(e).includes(l)){o.remove();continue}const _=[].concat(...o.attributes),b=[].concat(e["*"]||[],e[l]||[]);for(const m of _)uS(m,b)||o.removeAttribute(m.nodeName)}return n.body.innerHTML}const fS="TemplateFactory",hS={allowList:Yp,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},pS={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},mS={entry:"(string|element|function|null)",selector:"(string|element)"};class gS extends oo{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return hS}static get DefaultType(){return pS}static get NAME(){return fS}getContent(){return Object.values(this._config.content).map(e=>this._resolvePossibleFunction(e)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(e){return this._checkContent(e),this._config.content={...this._config.content,...e},this}toHtml(){const e=document.createElement("div");e.innerHTML=this._maybeSanitize(this._config.template);for(const[n,s]of Object.entries(this._config.content))this._setContent(e,s,n);const i=e.children[0],r=this._resolvePossibleFunction(this._config.extraClass);return r&&i.classList.add(...r.split(" ")),i}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(const[i,r]of Object.entries(e))super._typeCheckConfig({selector:i,entry:r},mS)}_setContent(e,i,r){const n=lt.findOne(r,e);if(n){if(i=this._resolvePossibleFunction(i),!i){n.remove();return}if(Kr(i)){this._putElementInTemplate(on(i),n);return}if(this._config.html){n.innerHTML=this._maybeSanitize(i);return}n.textContent=i}}_maybeSanitize(e){return this._config.sanitize?dS(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return $i(e,[void 0,this])}_putElementInTemplate(e,i){if(this._config.html){i.innerHTML="",i.append(e);return}i.textContent=e.textContent}}const vS="tooltip",yS=new Set(["sanitize","allowList","sanitizeFn"]),Ll="fade",bS="modal",zo="show",wS=".tooltip-inner",df=`.${bS}`,ff="hide.bs.modal",Vs="hover",Ml="focus",Rl="click",_S="manual",ES="hide",SS="hidden",TS="show",CS="shown",AS="inserted",xS="click",OS="focusin",kS="focusout",IS="mouseenter",PS="mouseleave",LS={AUTO:"auto",TOP:"top",RIGHT:ar()?"left":"right",BOTTOM:"bottom",LEFT:ar()?"right":"left"},MS={allowList:Yp,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"}
vendor: 4,809 bytes, line 107
107,RS={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class $r extends wr{constructor(e,i){if(typeof Ep>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org/docs/v2/)");super(e,i),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 MS}static get DefaultType(){return RS}static get NAME(){return vS}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),Se.off(this._element.closest(df),ff,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this._isWithContent()&&this._isEnabled))return;const e=Se.trigger(this._element,this.constructor.eventName(TS)),r=(Cp(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(e.defaultPrevented||!r)return;this._disposePopper();const n=this._getTipElement();this._element.setAttribute("aria-describedby",n.getAttribute("id"));const{container:s}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(s.append(n),Se.trigger(this._element,this.constructor.eventName(AS))),this._popper=this._createPopper(n),n.classList.add(zo),"ontouchstart"in document.documentElement)for(const l of[].concat(...document.body.children))Se.on(l,"mouseover",Sa);const o=()=>{Se.trigger(this._element,this.constructor.eventName(CS)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(o,this.tip,this._isAnimated())}hide(){if(!this._isShown()||Se.trigger(this._element,this.constructor.eventName(ES)).defaultPrevented)return;if(this._getTipElement().classList.remove(zo),"ontouchstart"in document.documentElement)for(const n of[].concat(...document.body.children))Se.off(n,"mouseover",Sa);this._activeTrigger[Rl]=!1,this._activeTrigger[Ml]=!1,this._activeTrigger[Vs]=!1,this._isHovered=null;const r=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),Se.trigger(this._element,this.constructor.eventName(SS)))};this._queueCallback(r,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(e){const i=this._getTemplateFactory(e).toHtml();if(!i)return null;i.classList.remove(Ll,zo),i.classList.add(`bs-${this.constructor.NAME}-auto`);const r=_w(this.constructor.NAME).toString();return i.setAttribute("id",r),this._isAnimated()&&i.classList.add(Ll),i}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new gS({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[wS]: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(Ll)}_isShown(){return this.tip&&this.tip.classList.contains(zo)}_createPopper(e){const i=$i(this._config.placement,[this,e,this._element]),r=LS[i.toUpperCase()];return du(this._element,e,this._getPopperConfig(r))}_getOffset(){const{offset:e}=this._config;return typeof e=="string"?e.split(",").map(i=>Number.parseInt(i,10)):typeof e=="function"?i=>e(i,this._element):e}_resolvePossibleFunction(e){return $i(e,[this._element,this._element])}_getPopperConfig(e){const i={placement:e,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}}
107,{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{...i,...$i(this._config.popperConfig,[void 0,i])}}_setListeners(){const e=this._config.trigger.split(" ");for(const i of e)if(i==="click")Se.on(this._element,this.constructor.eventName(xS),this._config.selector,r=>{const n=this._initializeOnDelegatedTarget(r);n._activeTrigger[Rl]=!(n._isShown()&&n._activeTrigger[Rl]),n.toggle()});else if(i!==_S){const r=i===Vs?this.constructor.eventName(IS):this.constructor.eventName(OS),n=i===Vs?this.constructor.eventName(PS):this.constructor.eventName(kS);Se.on(this._element,r,this._config.selector,s=>{const o=this._initializeOnDelegatedTarget(s);o._activeTrigger[s.type==="focusin"?Ml:Vs]=!0,o._enter()}),Se.on(this._element,n,this._config.selector,s=>{const o=this._initializeOnDelegatedTarget(s);o._activeTrigger[s.type==="focusout"?Ml:Vs]=o._element.contains(s.relatedTarget),o._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},Se.on(this._element.closest(df),ff,this._hideModalHandler)}_fixTitle(){const e=this._element.getAttribute("title");e&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",e),this._element.setAttribute("data-bs-original-title",e),this._element.removeAttribute("title"))}_enter(){if(this._isShown()||this._isHovered){this._isHovered=!0;return}this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show)}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(e,i){clearTimeout(this._timeout),this._timeout=setTimeout(e,i)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){const i=Gr.getDataAttributes(this._element);for(const r of Object.keys(i))yS.has(r)&&delete i[r];return e={...i,...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:on(e.container),typeof e.delay=="number"&&(e.delay={show:e.delay,hide:e.delay}),typeof e.title=="number"&&(e.title=e.title.toString()),typeof e.content=="number"&&(e.content=e.content.toString()),e}_getDelegateConfig(){const e={};for(const[i,r]of Object.entries(this._config))this.constructor.Default[i]!==r&&(e[i]=r);return e.selector=!1,e.trigger="manual",e}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(e){return this.each(function(){const i=$r.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof i[e]>"u")throw new TypeError(`No method named "${e}"`);i[e]()}})}}ur($r);const DS="popover",NS=".popover-header",$S=".popover-body",FS={...$r.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"},jS={...$r.DefaultType,content:"(null|string|element|function)"};class Mn extends $r{static get Default(){return FS}static get DefaultType(){return jS}static get NAME(){return DS}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[NS]:this._getTitle(),[$S]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each(function(){const i=Mn.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof i[e]>"u")throw new TypeError(`No method named "${e}"`);i[e]()}})}}ur(Mn);const US="scrollspy",BS="bs.scrollspy",mu=`.${BS}`,qS=".data-api",VS=`activate${mu}`,hf=`click${mu}`,HS=`load${mu}${qS}`,zS="dropdown-item",ns="active",WS='[data-bs-spy="scroll"]',Dl="[href]",KS=".nav, .list-group",pf=".nav-link",GS=".nav-item",YS=".list-group-item",XS=`${pf}, ${GS} > ${pf}, ${YS}`,JS=".dropdown",QS=".dropdown-toggle",ZS={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},eT={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class uo extends wr{constructor(e,i){super(e,i),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 ZS}static get DefaultType(){return eT}static get NAME(){return US}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const e of this._observableSections.values())this._observer.observe(e)}dispose(){this._observer.disconnect(),super.dispose()}
vendor: 4,275 bytes, line 107
107_configAfterMerge(e){return e.target=on(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(i=>Number.parseFloat(i))),e}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(Se.off(this._config.target,hf),Se.on(this._config.target,hf,Dl,e=>{const i=this._observableSections.get(e.target.hash);if(i){e.preventDefault();const r=this._rootElement||window,n=i.offsetTop-this._element.offsetTop;if(r.scrollTo){r.scrollTo({top:n,behavior:"smooth"});return}r.scrollTop=n}}))}_getNewObserver(){const e={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(i=>this._observerCallback(i),e)}_observerCallback(e){const i=o=>this._targetLinks.get(`#${o.target.id}`),r=o=>{this._previousScrollData.visibleEntryTop=o.target.offsetTop,this._process(i(o))},n=(this._rootElement||document.documentElement).scrollTop,s=n>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=n;for(const o of e){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(i(o));continue}const l=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(s&&l){if(r(o),!n)return;continue}!s&&!l&&r(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const e=lt.find(Dl,this._config.target);for(const i of e){if(!i.hash||an(i))continue;const r=lt.findOne(decodeURI(i.hash),this._element);As(r)&&(this._targetLinks.set(decodeURI(i.hash),i),this._observableSections.set(i.hash,r))}}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._config.target),this._activeTarget=e,e.classList.add(ns),this._activateParents(e),Se.trigger(this._element,VS,{relatedTarget:e}))}_activateParents(e){if(e.classList.contains(zS)){lt.findOne(QS,e.closest(JS)).classList.add(ns);return}for(const i of lt.parents(e,KS))for(const r of lt.prev(i,XS))r.classList.add(ns)}_clearActiveClass(e){e.classList.remove(ns);const i=lt.find(`${Dl}.${ns}`,e);for(const r of i)r.classList.remove(ns)}static jQueryInterface(e){return this.each(function(){const i=uo.getOrCreateInstance(this,e);if(typeof e=="string"){if(i[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);i[e]()}})}}Se.on(window,HS,()=>{for(const t of lt.find(WS))uo.getOrCreateInstance(t)});ur(uo);const tT="tab",iT="bs.tab",Fn=`.${iT}`,rT=`hide${Fn}`,nT=`hidden${Fn}`,sT=`show${Fn}`,oT=`shown${Fn}`,aT=`click${Fn}`,lT=`keydown${Fn}`,cT=`load${Fn}`,uT="ArrowLeft",mf="ArrowRight",dT="ArrowUp",gf="ArrowDown",Nl="Home",vf="End",Cn="active",yf="fade",$l="show",fT="dropdown",Xp=".dropdown-toggle",hT=".dropdown-menu",Fl=`:not(${Xp})`,pT='.list-group, .nav, [role="tablist"]',mT=".nav-item, .list-group-item",gT=`.nav-link${Fl}, .list-group-item${Fl}, [role="tab"]${Fl}`,Jp='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',jl=`${gT}, ${Jp}`,vT=`.${Cn}[data-bs-toggle="tab"], .${Cn}[data-bs-toggle="pill"], .${Cn}[data-bs-toggle="list"]`;class Rn extends wr{constructor(e){super(e),this._parent=this._element.closest(pT),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),Se.on(this._element,lT,i=>this._keydown(i)))}static get NAME(){return tT}show(){const e=this._element;if(this._elemIsActive(e))return;const i=this._getActiveElem(),r=i?Se.trigger(i,rT,{relatedTarget:e}):null;Se.trigger(e,sT,{relatedTarget:i}).defaultPrevented||r&&r.defaultPrevented||(this._deactivate(i,e),this._activate(e,i))}_activate(e,i){if(!e)return;e.classList.add(Cn),this._activate(lt.getElementFromSelector(e));const r=()=>{if(e.getAttribute("role")!=="tab"){e.classList.add($l);return}e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),Se.trigger(e,oT,{relatedTarget:i})};this._queueCallback(r,e,e.classList.contains(yf))}_deactivate(e,i){if(!e)return;e.classList.remove(Cn),e.blur(),this._deactivate(lt.getElementFromSelector(e));const r=()=>{if(e.getAttribute("role")!=="tab"){e.classList.remove($l);return}e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),Se.trigger(e,nT,{relatedTarget:i})};this._queueCallback(r,e,e.classList.contains(yf))}
107_keydown(e){if(![uT,mf,dT,gf,Nl,vf].includes(e.key))return;e.stopPropagation(),e.preventDefault();const i=this._getChildren().filter(n=>!an(n));let r;if([Nl,vf].includes(e.key))r=i[e.key===Nl?0:i.length-1];else{const n=[mf,gf].includes(e.key);r=fu(i,e.target,n,!0)}r&&(r.focus({preventScroll:!0}),Rn.getOrCreateInstance(r).show())}_getChildren(){return lt.find(jl,this._parent)}_getActiveElem(){return this._getChildren().find(e=>this._elemIsActive(e))||null}_setInitialAttributes(e,i){this._setAttributeIfNotExists(e,"role","tablist");for(const r of i)this._setInitialAttributesOnChild(r)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);const i=this._elemIsActive(e),r=this._getOuterElement(e);e.setAttribute("aria-selected",i),r!==e&&this._setAttributeIfNotExists(r,"role","presentation"),i||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){const i=lt.getElementFromSelector(e);i&&(this._setAttributeIfNotExists(i,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(i,"aria-labelledby",`${e.id}`))}_toggleDropDown(e,i){const r=this._getOuterElement(e);if(!r.classList.contains(fT))return;const n=(s,o)=>{const l=lt.findOne(s,r);l&&l.classList.toggle(o,i)};n(Xp,Cn),n(hT,$l),r.setAttribute("aria-expanded",i)}_setAttributeIfNotExists(e,i,r){e.hasAttribute(i)||e.setAttribute(i,r)}_elemIsActive(e){return e.classList.contains(Cn)}_getInnerElement(e){return e.matches(jl)?e:lt.findOne(jl,e)}_getOuterElement(e){return e.closest(mT)||e}static jQueryInterface(e){return this.each(function(){const i=Rn.getOrCreateInstance(this);if(typeof e=="string"){if(i[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);i[e]()}})}}Se.on(document,aT,Jp,function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),!an(this)&&Rn.getOrCreateInstance(this).show()});Se.on(window,cT,()=>{for(const t of lt.find(vT))Rn.getOrCreateInstance(t)});ur(Rn);const yT="toast",bT="bs.toast",un=`.${bT}`,wT=`mouseover${un}`,_T=`mouseout${un}`,ET=`focusin${un}`,ST=`focusout${un}`,TT=`hide${un}`,CT=`hidden${un}`,AT=`show${un}`,xT=`shown${un}`,OT="fade",bf="hide",Wo="show",Ko="showing",kT={animation:"boolean",autohide:"boolean",delay:"number"},IT={animation:!0,autohide:!0,delay:5e3};class fo extends wr{constructor(e,i){super(e,i),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return IT}static get DefaultType(){return kT}static get NAME(){return yT}show(){if(Se.trigger(this._element,AT).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(OT);const i=()=>{this._element.classList.remove(Ko),Se.trigger(this._element,xT),this._maybeScheduleHide()};this._element.classList.remove(bf),so(this._element),this._element.classList.add(Wo,Ko),this._queueCallback(i,this._element,this._config.animation)}hide(){if(!this.isShown()||Se.trigger(this._element,TT).defaultPrevented)return;const i=()=>{this._element.classList.add(bf),this._element.classList.remove(Ko,Wo),Se.trigger(this._element,CT)};this._element.classList.add(Ko),this._queueCallback(i,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(Wo),super.dispose()}isShown(){return this._element.classList.contains(Wo)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(e,i){switch(e.type){case"mouseover":case"mouseout":{this._hasMouseInteraction=i;break}case"focusin":case"focusout":{this._hasKeyboardInteraction=i;break}}if(i){this._clearTimeout();return}const r=e.relatedTarget;this._element===r||this._element.contains(r)||this._maybeScheduleHide()}_setListeners(){Se.on(this._element,wT,e=>this._onInteraction(e,!0)),Se.on(this._element,_T,e=>this._onInteraction(e,!1)),Se.on(this._element,ET,e=>this._onInteraction(e,!0)),Se.on(this._element,ST,e=>this._onInteraction(e,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each(function(){const i=fo.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof i[e]>
107"u")throw new TypeError(`No method named "${e}"`);i[e](this)}})}}Ua(fo);ur(fo);const PT=Object.freeze(Object.defineProperty({__proto__:null,Alert:ao,Button:lo,Carousel:Os,Collapse:Ss,Dropdown:ji,Modal:Ln,Offcanvas:Jr,Popover:Mn,ScrollSpy:uo,Tab:Rn,Toast:fo,Tooltip:$r},Symbol.toStringTag,{value:"Module"}));var pa={exports:{}};var LT=pa.exports,wf;function MT(){return wf||(wf=1,(function(t){(function(e,i){t.exports?t.exports=i(fh()):e.Bloodhound=i(e.jQuery)})(LT,function(e){var i=(function(){return{isMsie:function(){return/(msie|trident)/i.test(navigator.userAgent)?navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]:!1},isBlankString:function(g){return!g||/^\s*$/.test(g)},escapeRegExChars:function(g){return g.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(g){return typeof g=="string"},isNumber:function(g){return typeof g=="number"},isArray:e.isArray,isFunction:e.isFunction,isObject:e.isPlainObject,isUndefined:function(g){return typeof g>"u"},isElement:function(g){return!!(g&&g.nodeType===1)},isJQuery:function(g){return g instanceof e},toStr:function(d){return i.isUndefined(d)||d===null?"":d+""},bind:e.proxy,each:function(g,d){e.each(g,u);function u(w,h){return d(h,w)}},map:e.map,filter:e.grep,every:function(g,d){var u=!0;return g?(e.each(g,function(w,h){if(!(u=d.call(null,h,w,g)))return!1}),!!u):u},some:function(g,d){var u=!1;
107return g?(e.each(g,function(w,h){if(u=d.call(null,h,w,g))return!1}),!!u):u},mixin:e.extend,identity:function(g){return g},clone:function(g){return e.extend(!0,{},g)},getIdGenerator:function(){var g=0;return function(){return g++}},templatify:function(d){return e.isFunction(d)?d:u;function u(){return String(d)}},defer:function(g){setTimeout(g,0)},debounce:function(g,d,u){var w,h;return function(){var p=this,c=arguments,f,v;return f=function(){w=null,u||(h=g.apply(p,c))},v=u&&!w,clearTimeout(w),w=setTimeout(f,d),v&&(h=g.apply(p,c)),h}},throttle:function(g,d){var u,w,h,p,c,f;return c=0,f=function(){c=new Date,h=null,p=g.apply(u,w)},function(){var v=new Date,E=d-(v-c);return u=this,w=arguments,E<=0?(clearTimeout(h),h=null,c=v,p=g.apply(u,w)):h||(h=setTimeout(f,E)),p}},stringify:function(g){return i.isString(g)?g:JSON.stringify(g)},guid:function(){function g(d){var u=(Math.random().toString(16)+"000000000").substr(2,8);return d?"-"+u.substr(0,4)+"-"+u.substr(4,4):u}return"tt-"+g()+g(!0)+g(!0)+g()},noop:function(){}}})(),r="1.3.3",n=(function(){return{nonword:d,whitespace:g,ngram:u,obj:{nonword:w(d),whitespace:w(g),ngram:w(u)}};function g(h){return h=i.toStr(h),h?h.split(/\s+/):[]}function d(h){return h=i.toStr(h),h?h.split(/\W+/):[]}function u(h){h=i.toStr(h);var p=[],c="";return i.each(h.split(""),function(f){f.match(/\s+/)?c="":(p.push(c+f),c+=f)}),p}function w(h){return function(c){return c=i.isArray(c)?c:[].slice.call(arguments,0),function(v){var E=[];return i.each(c,function(C){E=E.concat(h(i.toStr(v[C])))}),E}}}})(),s=(function(){function g(w){this.maxSize=i.isNumber(w)?w:100,this.reset(),this.maxSize<=0&&(this.set=this.get=e.noop)}i.mixin(g.prototype,{set:function(h,p){var c=this.list.tail,f;this.size>=this.maxSize&&(this.list.remove(c),delete this.hash[c.key],this.size--),(f=this.hash[h])?(f.val=p,this.list.moveToFront(f)):(f=new u(h,p),this.list.add(f),this.hash[h]=f,this.size++)},get:function(h){var p=this.hash[h];if(p)return this.list.moveToFront(p),p.val},reset:function(){this.size=0,this.hash={},this.list=new d}});function d(){this.head=this.tail=null}i.mixin(d.prototype,{add:function(h){this.head&&(h.next=this.head,this.head.prev=h),this.head=h,this.tail=this.tail||h},remove:function(h){h.prev?h.prev.next=h.next:this.head=h.next,h.next?h.next.prev=h.prev:this.tail=h.prev},moveToFront:function(w){this.remove(w),this.add(w)}});function u(w,h){this.key=w,this.val=h,this.prev=this.next=null}return g})(),o=(function(){var g;try{g=window.localStorage,g.setItem("~~~","!"),g.removeItem("~~~")}catch{g=null}function d(c,f){this.prefix=["__",c,"__"].join(""),this.ttlKey="__ttl__",this.keyMatcher=new RegExp("^"+i.escapeRegExChars(this.prefix)),this.ls=f||g,!this.ls&&this._noop()}return i.mixin(d.prototype,{_prefix:function(c){return this.prefix+c},_ttlKey:function(c){return this._prefix(c)+this.ttlKey},_noop:function(){this.get=this.set=this.remove=this.clear=this.isExpired=i.noop},_safeSet:function(c,f){try{this.ls.setItem(c,f)}catch(v){v.name==="QuotaExceededError"&&(this.clear(),this._noop())}},get:function(c){return this.isExpired(c)&&this.remove(c),h(this.ls.getItem(this._prefix(c)))},set:function(c,f,v){return i.isNumber(v)?this._safeSet(this._ttlKey(c),w(u()+v)):this.ls.removeItem(this._ttlKey(c)),this._safeSet(this._prefix(c),w(f))},remove:function(c){return this.ls.removeItem(this._ttlKey(c)),this.ls.removeItem(this._prefix(c)),this},clear:function(){var c,f=p(this.keyMatcher);for(c=f.length;c--;)this.remove(f[c]);return this},isExpired:function(c){var f=h(this.ls.getItem(this._ttlKey(c)));return!!(i.isNumber(f)&&u()>f)}}),d;function u(){return new Date().getTime()}function w(c){return JSON.stringify(i.isUndefined(c)?null:c)}function h(c){return e.parseJSON(c)}function p(c){var f,v,E=[],C=g.length;for(f=0;f<C;f++)(v=g.key(f)).match(c)&&E.push(v.replace(c,""));return E}})(),l=(function(){var g=0,d={},u=new s(10);function w(h){h=h||{},this.maxPendingRequests=h.maxPendingRequests||6,this.cancelled=!1,this.lastReq=null,this._send=h.transport,this._get=h.limiter?h.limiter(this._get):this._get,this._cache=h.cache===!1?new s(0):u}
107return w.setMaxPendingRequests=function(p){this.maxPendingRequests=p},w.resetCache=function(){u.reset()},i.mixin(w.prototype,{_fingerprint:function(p){return p=p||{},p.url+p.type+e.param(p.data||{})},_get:function(h,p){var c=this,f,v;if(f=this._fingerprint(h),this.cancelled||f!==this.lastReq)return;(v=d[f])?v.done(E).fail(C):g<this.maxPendingRequests?(g++,d[f]=this._send(h).done(E).fail(C).always(O)):this.onDeckRequestArgs=[].slice.call(arguments,0);function E(A){p(null,A),c._cache.set(f,A)}function C(){p(!0)}function O(){g--,delete d[f],c.onDeckRequestArgs&&(c._get.apply(c,c.onDeckRequestArgs),c.onDeckRequestArgs=null)}},get:function(h,p){var c,f;p=p||e.noop,h=i.isString(h)?{url:h}:h||{},f=this._fingerprint(h),this.cancelled=!1,this.lastReq=f,(c=this._cache.get(f))?p(null,c):this._get(h,p)},cancel:function(){this.cancelled=!0}}),w})(),_=window.SearchIndex=(function(){var g="c",d="i";function u(f){f=f||{},(!f.datumTokenizer||!f.queryTokenizer)&&e.error("datumTokenizer and queryTokenizer are both required"),this.identify=f.identify||i.stringify,this.datumTokenizer=f.datumTokenizer,this.queryTokenizer=f.queryTokenizer,this.matchAnyQueryToken=f.matchAnyQueryToken,this.reset()}return i.mixin(u.prototype,{bootstrap:function(v){this.datums=v.datums,this.trie=v.trie},add:function(f){var v=this;f=i.isArray(f)?f:[f],i.each(f,function(E){var C,O;v.datums[C=v.identify(E)]=E,O=w(v.datumTokenizer(E)),i.each(O,function(A){var I,N,D;for(I=v.trie,N=A.split("");D=N.shift();)I=I[g][D]||(I[g][D]=h()),I[d].push(C)})})},get:function(v){var E=this;return i.map(v,function(C){return E.datums[C]})},search:function(v){var E=this,C,O;return C=w(this.queryTokenizer(v)),i.each(C,function(A){var I,N,D,U;if(O&&O.length===0&&!E.matchAnyQueryToken)return!1;for(I=E.trie,N=A.split("");I&&(D=N.shift());)I=I[g][D];if(I&&N.length===0)U=I[d].slice(0),O=O?c(O,U):U;else if(!E.matchAnyQueryToken)return O=[],!1}),O?i.map(p(O),function(A){return E.datums[A]}):[]},all:function(){var v=[];for(var E in this.datums)v.push(this.datums[E]);return v},reset:function(){this.datums={},this.trie=h()},serialize:function(){return{datums:this.datums,trie:this.trie}}}),u;function w(f){return f=i.filter(f,function(v){return!!v}),f=i.map(f,function(v){return v.toLowerCase()}),f}function h(){var f={};return f[d]=[],f[g]={},f}function p(f){for(var v={},E=[],C=0,O=f.length;C<O;C++)v[f[C]]||(v[f[C]]=!0,E.push(f[C]));return E}function c(f,v){var E=0,C=0,O=[];f=f.sort(),v=v.sort();for(var A=f.length,I=v.length;E<A&&C<I;)f[E]<v[C]?E++:(f[E]>v[C]||(O.push(f[E]),E++),C++);return O}})(),b=(function(){var g;g={data:"data",protocol:"protocol",thumbprint:"thumbprint"};function d(u){this.url=u.url,this.ttl=u.ttl,this.cache=u.cache,this.prepare=u.prepare,this.transform=u.transform,this.transport=u.transport,this.thumbprint=u.thumbprint,this.storage=new o(u.cacheKey)}return i.mixin(d.prototype,{_settings:function(){return{url:this.url,type:"GET",dataType:"json"}},store:function(w){this.cache&&(this.storage.set(g.data,w,this.ttl),this.storage.set(g.protocol,location.protocol,this.ttl),this.storage.set(g.thumbprint,this.thumbprint,this.ttl))},fromCache:function(){var w={},h;return this.cache?(w.data=this.storage.get(g.data),w.protocol=this.storage.get(g.protocol),w.thumbprint=this.storage.get(g.thumbprint),h=w.thumbprint!==this.thumbprint||w.protocol!==location.protocol,w.data&&!h?w.data:null):null},fromNetwork:function(u){var w=this,h;if(!u)return;h=this.prepare(this._settings()),this.transport(h).fail(p).done(c);function p(){u(!0)}function c(f){u(null,w.transform(f))}},clear:function(){return this.storage.clear(),this}}),d})(),m=(function(){function g(d){this.url=d.url,this.prepare=d.prepare,this.transform=d.transform,this.indexResponse=d.indexResponse,this.transport=new l({cache:d.cache,limiter:d.limiter,transport:d.transport,maxPendingRequests:d.maxPendingRequests})}return i.mixin(g.prototype,{_settings:function(){return{url:this.url,type:"GET",dataType:"json"}},get:function(u,w){var h=this,p;if(!w)return;return u=u||"",p=this.prepare(u,this._settings()),this.transport.get(p,c);function c(f,v){w(f?[]:h.transform(v))}}
107,cancelLastRequest:function(){this.transport.cancel()}}),g})(),y=(function(){return function(c){var f,v;return f={initialize:!0,identify:i.stringify,datumTokenizer:null,queryTokenizer:null,matchAnyQueryToken:!1,sufficient:5,indexRemote:!1,sorter:null,local:[],prefetch:null,remote:null},c=i.mixin(f,c||{}),!c.datumTokenizer&&e.error("datumTokenizer is required"),!c.queryTokenizer&&e.error("queryTokenizer is required"),v=c.sorter,c.sorter=v?function(E){return E.sort(v)}:i.identity,c.local=i.isFunction(c.local)?c.local():c.local,c.prefetch=g(c.prefetch),c.remote=d(c.remote),c};function g(p){var c;return p?(c={url:null,ttl:1440*60*1e3,cache:!0,cacheKey:null,thumbprint:"",prepare:i.identity,transform:i.identity,transport:null},p=i.isString(p)?{url:p}:p,p=i.mixin(c,p),!p.url&&e.error("prefetch requires url to be set"),p.transform=p.filter||p.transform,p.cacheKey=p.cacheKey||p.url,p.thumbprint=r+p.thumbprint,p.transport=p.transport?h(p.transport):e.ajax,p):null}function d(p){var c;if(p)return c={url:null,cache:!0,prepare:null,replace:null,wildcard:null,limiter:null,rateLimitBy:"debounce",rateLimitWait:300,transform:i.identity,transport:null},p=i.isString(p)?{url:p}:p,p=i.mixin(c,p),!p.url&&e.error("remote requires url to be set"),p.transform=p.filter||p.transform,p.prepare=u(p),p.limiter=w(p),p.transport=p.transport?h(p.transport):e.ajax,delete p.replace,delete p.wildcard,delete p.rateLimitBy,delete p.rateLimitWait,p}function u(p){var c,f,v;if(c=p.prepare,f=p.replace,v=p.wildcard,c)return c;return f?c=E:p.wildcard?c=C:c=O,c;function E(A,I){return I.url=f(I.url,A),I}function C(A,I){return I.url=I.url.replace(v,encodeURIComponent(A)),I}function O(A,I){return I}}function w(p){var c,f,v;return c=p.limiter,f=p.rateLimitBy,v=p.rateLimitWait,c||(c=/^throttle$/i.test(f)?C(v):E(v)),c;function E(O){return function(I){return i.debounce(I,O)}}function C(O){return function(I){return i.throttle(I,O)}}}function h(p){return function(f){var v=e.Deferred();return p(f,E,C),v;function E(O){i.defer(function(){v.resolve(O)})}function C(O){i.defer(function(){v.reject(O)})}}}})(),T=(function(){var g;g=window&&window.Bloodhound;function d(u){u=y(u),this.sorter=u.sorter,this.identify=u.identify,this.sufficient=u.sufficient,this.indexRemote=u.indexRemote,this.local=u.local,this.remote=u.remote?new m(u.remote):null,this.prefetch=u.prefetch?new b(u.prefetch):null,this.index=new _({identify:this.identify,datumTokenizer:u.datumTokenizer,queryTokenizer:u.queryTokenizer}),u.initialize!==!1&&this.initialize()}return d.noConflict=function(){return window&&(window.Bloodhound=g),d}
107,d.tokenizers=n,i.mixin(d.prototype,{__ttAdapter:function(){var w=this;return this.remote?h:p;function h(c,f,v){return w.search(c,f,v)}function p(c,f){return w.search(c,f)}},_loadPrefetch:function(){var w=this,h,p;return h=e.Deferred(),this.prefetch?(p=this.prefetch.fromCache())?(this.index.bootstrap(p),h.resolve()):this.prefetch.fromNetwork(c):h.resolve(),h.promise();function c(f,v){if(f)return h.reject();w.add(v),w.prefetch.store(w.index.serialize()),h.resolve()}},_initialize:function(){var w=this;return this.clear(),(this.initPromise=this._loadPrefetch()).done(h),this.initPromise;function h(){w.add(w.local)}},initialize:function(w){return!this.initPromise||w?this._initialize():this.initPromise},add:function(w){return this.index.add(w),this},get:function(w){return w=i.isArray(w)?w:[].slice.call(arguments),this.index.get(w)},search:function(w,h,p){var c=this,f;return h=h||i.noop,p=p||i.noop,f=this.sorter(this.index.search(w)),h(this.remote?f.slice():f),this.remote&&f.length<this.sufficient?this.remote.get(w,v):this.remote&&this.remote.cancelLastRequest(),this;function v(E){var C=[];i.each(E,function(O){!i.some(f,function(A){return c.identify(O)===c.identify(A)})&&C.push(O)}),c.indexRemote&&c.add(C),p(C)}},all:function(){return this.index.all()},clear:function(){return this.index.reset(),this},clearPrefetchCache:function(){return this.prefetch&&this.prefetch.clear(),this},clearRemoteCache:function(){return l.resetCache(),this},ttAdapter:function(){return this.__ttAdapter()}}),d})();return T})})(pa)),pa.exports}var RT=MT();const DT=xg(RT);var ma={exports:{}};var NT=ma.exports,_f;function $T(){return _f||(_f=1,(function(t){(function(e,i){t.exports?t.exports=i(fh()):i(e.jQuery)})(NT,function(e){var i=(function(){return{isMsie:function(){return/(msie|trident)/i.test(navigator.userAgent)?navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]:!1},isBlankString:function(g){return!g||/^\s*$/.test(g)},escapeRegExChars:function(g){return g.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(g){return typeof g=="string"},isNumber:function(g){return typeof g=="number"},isArray:e.isArray,isFunction:e.isFunction,isObject:e.isPlainObject,isUndefined:function(g){return typeof g>"u"},isElement:function(g){return!!(g&&g.nodeType===1)},isJQuery:function(g){return g instanceof e},toStr:function(d){return i.isUndefined(d)||d===null?"":d+""},bind:e.proxy,each:function(g,d){e.each(g,u);function u(w,h){return d(h,w)}},map:e.map,filter:e.grep,every:function(g,d){var u=!0;return g?(e.each(g,function(w,h){if(!(u=d.call(null,h,w,g)))return!1}),!!u):u},some:function(g,d){var u=!1;
107return g?(e.each(g,function(w,h){if(u=d.call(null,h,w,g))return!1}),!!u):u},mixin:e.extend,identity:function(g){return g},clone:function(g){return e.extend(!0,{},g)},getIdGenerator:function(){var g=0;return function(){return g++}},templatify:function(d){return e.isFunction(d)?d:u;function u(){return String(d)}},defer:function(g){setTimeout(g,0)},debounce:function(g,d,u){var w,h;return function(){var p=this,c=arguments,f,v;return f=function(){w=null,u||(h=g.apply(p,c))},v=u&&!w,clearTimeout(w),w=setTimeout(f,d),v&&(h=g.apply(p,c)),h}},throttle:function(g,d){var u,w,h,p,c,f;return c=0,f=function(){c=new Date,h=null,p=g.apply(u,w)},function(){var v=new Date,E=d-(v-c);return u=this,w=arguments,E<=0?(clearTimeout(h),h=null,c=v,p=g.apply(u,w)):h||(h=setTimeout(f,E)),p}},stringify:function(g){return i.isString(g)?g:JSON.stringify(g)},guid:function(){function g(d){var u=(Math.random().toString(16)+"000000000").substr(2,8);return d?"-"+u.substr(0,4)+"-"+u.substr(4,4):u}return"tt-"+g()+g(!0)+g(!0)+g()},noop:function(){}}})(),r=(function(){var g={wrapper:"twitter-typeahead",input:"tt-input",hint:"tt-hint",menu:"tt-menu",dataset:"tt-dataset",suggestion:"tt-suggestion",selectable:"tt-selectable",empty:"tt-empty",open:"tt-open",cursor:"tt-cursor",highlight:"tt-highlight"};return d;function d(p){var c,f;return f=i.mixin({},g,p),c={css:h(),classes:f,html:u(f),selectors:w(f)},{css:c.css,html:c.html,classes:c.classes,selectors:c.selectors,mixin:function(v){i.mixin(v,c)}}}function u(p){return{wrapper:'<span class="'+p.wrapper+'"></span>',menu:'<div role="listbox" class="'+p.menu+'"></div>'}}function w(p){var c={};return i.each(p,function(f,v){c[v]="."+f}),c}function h(){var p={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none",opacity:"1"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},menu:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:" 0"}};return i.isMsie()&&i.mixin(p.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),p}})(),n=(function(){var g,d;g="typeahead:",d={render:"rendered",cursorchange:"cursorchanged",select:"selected",autocomplete:"autocompleted"};function u(w){(!w||!w.el)&&e.error("EventBus initialized without el"),this.$el=e(w.el)}return i.mixin(u.prototype,{_trigger:function(w,h){var p=e.Event(g+w);return this.$el.trigger.call(this.$el,p,h||[]),p},before:function(w){var h,p;return h=[].slice.call(arguments,1),p=this._trigger("before"+w,h),p.isDefaultPrevented()},trigger:function(w){var h;this._trigger(w,[].slice.call(arguments,1)),(h=d[w])&&this._trigger(h,[].slice.call(arguments,1))}}),u})(),s=(function(){var g=/\s+/,d=v();return{onSync:h,onAsync:w,off:p,trigger:c};function u(C,O,A,I){var N;if(!A)return this;for(O=O.split(g),A=I?E(A,I):A,this._callbacks=this._callbacks||{};N=O.shift();)this._callbacks[N]=this._callbacks[N]||{sync:[],async:[]},this._callbacks[N][C].push(A);return this}function w(C,O,A){return u.call(this,"async",C,O,A)}function h(C,O,A){return u.call(this,"sync",C,O,A)}function p(C){var O;if(!this._callbacks)return this;for(C=C.split(g);O=C.shift();)delete this._callbacks[O];return this}function c(C){var O,A,I,N,D;if(!this._callbacks)return this;for(C=C.split(g),I=[].slice.call(arguments,1);(O=C.shift())&&(A=this._callbacks[O]);)N=f(A.sync,this,[O].concat(I)),D=f(A.async,this,[O].concat(I)),N()&&d(D);return this}function f(C,O,A){return I;function I(){for(var N,D=0,U=C.length;!N&&D<U;D+=1)N=C[D].apply(O,A)===!1;return!N}}function v(){var C;return window.setImmediate?C=function(A){setImmediate(function(){A()})}:C=function(A){setTimeout(function(){A()},0)},C}function E(C,O){return C.bind?C.bind(O):function(){C.apply(O,[].slice.call(arguments,0))}}})(),o=(function(g){var d={node:null,pattern:null,tagName:"strong",className:null,wordsOnly:!1,caseSensitive:!1,diacriticInsensitive:!1},u={A:"[AaªÀ-Åà-åĀ-ąǍǎȀ-ȃȦȧᴬᵃḀḁẚẠ-ảₐ℀℁℻⒜Ⓐⓐ㍱-㍴㎀-㎄㎈㎉㎩-㎯㏂㏊㏟㏿Aa]",B:"[BbᴮᵇḂ-ḇℬ⒝Ⓑⓑ㍴㎅-㎇㏃㏈㏔㏝Bb]",C:"[CcÇçĆ-čᶜ℀ℂ℃℅℆ℭⅭⅽ⒞Ⓒⓒ㍶㎈㎉㎝㎠㎤㏄-㏇Cc]",D:"[DdĎďDŽ-džDZ-dzᴰᵈḊ-ḓⅅⅆⅮⅾ⒟Ⓓⓓ㋏㍲㍷-㍹㎗㎭-㎯㏅㏈Dd]",E:"[EeÈ-Ëè-ëĒ-ěȄ-ȇȨȩᴱᵉḘ-ḛẸ-ẽₑ℡ℯℰⅇ⒠Ⓔⓔ㉐㋍㋎Ee]",F:"[FfᶠḞḟ℉ℱ℻⒡Ⓕⓕ㎊-㎌㎙ff-fflFf]",G:"[GgĜ-ģǦǧǴǵᴳᵍḠḡℊ⒢Ⓖⓖ㋌㋍㎇㎍-㎏㎓㎬㏆㏉㏒㏿Gg]",H:"[HhĤĥȞȟʰᴴḢ-ḫẖℋ-ℎ⒣Ⓗⓗ㋌㍱㎐-㎔㏊㏋㏗Hh]",I:"[IiÌ-Ïì-ïĨ-İIJijǏǐȈ-ȋᴵᵢḬḭỈ-ịⁱℐℑℹⅈⅠ-ⅣⅥ-ⅨⅪⅫⅰ-ⅳⅵ-ⅸⅺⅻ⒤Ⓘⓘ㍺㏌㏕fiffiIi]",J:"[JjIJ-ĵLJ-njǰʲᴶⅉ⒥ⒿⓙⱼJj]",K:"[KkĶķǨǩᴷᵏḰ-ḵK⒦Ⓚⓚ㎄㎅㎉㎏㎑㎘㎞㎢㎦㎪㎸㎾㏀㏆㏍-㏏Kk]",L:"[LlĹ-ŀLJ-ljˡᴸḶḷḺ-ḽℒℓ℡Ⅼⅼ⒧Ⓛⓛ㋏㎈㎉㏐-㏓㏕㏖㏿flfflLl]",M:"[MmᴹᵐḾ-ṃ℠™ℳⅯⅿ⒨Ⓜⓜ㍷-㍹㎃㎆㎎㎒㎖㎙-㎨㎫㎳㎷㎹㎽㎿㏁㏂㏎㏐㏔-㏖㏘㏙㏞㏟Mm]",N:"[NnÑñŃ-ʼnNJ-njǸǹᴺṄ-ṋⁿℕ№⒩Ⓝⓝ㎁㎋㎚㎱㎵㎻㏌㏑Nn]",O:"[OoºÒ-Öò-öŌ-őƠơǑǒǪǫȌ-ȏȮȯᴼᵒỌ-ỏₒ℅№ℴ⒪Ⓞⓞ㍵㏇㏒㏖Oo]",P:"[PpᴾᵖṔ-ṗℙ⒫Ⓟⓟ㉐㍱㍶㎀㎊㎩-㎬㎰㎴㎺㏋㏗-㏚Pp]",Q:"[Qqℚ⒬Ⓠⓠ㏃Qq]",R:"[RrŔ-řȐ-ȓʳᴿᵣṘ-ṛṞṟ₨ℛ-ℝ⒭Ⓡⓡ㋍㍴㎭-㎯㏚㏛Rr]",S:"[SsŚ-šſȘșˢṠ
107-ṣ₨℁℠⒮Ⓢⓢ㎧㎨㎮-㎳㏛㏜stSs]",T:"[TtŢ-ťȚțᵀᵗṪ-ṱẗ℡™⒯Ⓣⓣ㉐㋏㎔㏏ſtstTt]",U:"[UuÙ-Üù-üŨ-ųƯưǓǔȔ-ȗᵁᵘᵤṲ-ṷỤ-ủ℆⒰Ⓤⓤ㍳㍺Uu]",V:"[VvᵛᵥṼ-ṿⅣ-Ⅷⅳ-ⅷ⒱Ⓥⓥⱽ㋎㍵㎴-㎹㏜㏞Vv]",W:"[WwŴŵʷᵂẀ-ẉẘ⒲Ⓦⓦ㎺-㎿㏝Ww]",X:"[XxˣẊ-ẍₓ℻Ⅸ-Ⅻⅸ-ⅻ⒳Ⓧⓧ㏓Xx]",Y:"[YyÝýÿŶ-ŸȲȳʸẎẏẙỲ-ỹ⒴Ⓨⓨ㏉Yy]",Z:"[ZzŹ-žDZ-dzᶻẐ-ẕℤℨ⒵Ⓩⓩ㎐-㎔Zz]"};return function(c){var f;if(c=i.mixin({},d,c),!c.node||!c.pattern)return;c.pattern=i.isArray(c.pattern)?c.pattern:[c.pattern],f=h(c.pattern,c.caseSensitive,c.wordsOnly,c.diacriticInsensitive),E(c.node,v);function v(C){var O,A,I;return(O=f.exec(C.data))&&(I=g.createElement(c.tagName),c.className&&(I.className=c.className),A=C.splitText(O.index),A.splitText(O[0].length),I.appendChild(A.cloneNode(!0)),C.parentNode.replaceChild(I,A)),!!O}function E(C,O){for(var A,I=3,N=0;N<C.childNodes.length;N++)A=C.childNodes[N],A.nodeType===I?N+=O(A)?1:0:E(A,O)}};function w(p){return u[p.toUpperCase()]||p}function h(p,c,f,v){for(var E=[],C,O=0,A=p.length;O<A;O++){var I=i.escapeRegExChars(p[O]);v&&(I=I.replace(/\S/g,w)),E.push(I)}return C=f?"\\b("+E.join("|")+")\\b":"("+E.join("|")+")",c?new RegExp(C):new RegExp(C,"i")}})(window.document),l=(function(){var g;g={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"};function d(p,c){var f;p=p||{},p.input||e.error("input is missing"),c.mixin(this),this.$hint=e(p.hint),this.$input=e(p.input),this.$menu=e(p.menu),f=this.$input.attr("id")||i.guid(),this.$menu.attr("id",f+"_listbox"),this.$hint.attr({"aria-hidden":!0}),this.$input.attr({"aria-owns":f+"_listbox","aria-controls":f+"_listbox",role:"combobox","aria-autocomplete":"list","aria-expanded":!1}),this.query=this.$input.val(),this.queryWhenFocused=this.hasFocus()?this.query:null,this.$overflowHelper=u(this.$input),this._checkLanguageDirection(),this.$hint.length===0&&(this.setHint=this.getHint=this.clearHint=this.clearHintIfInvalid=i.noop),this.onSync("cursorchange",this._updateDescendent)}return d.normalizeQuery=function(p){return i.toStr(p).replace(/^\s*/g,"").replace(/\s{2,}/g," ")},i.mixin(d.prototype,s,{_onBlur:function(){this.resetInputValue(),this.trigger("blurred")},_onFocus:function(){this.queryWhenFocused=this.query,this.trigger("focused")},_onKeydown:function(c){var f=g[c.which||c.keyCode];this._managePreventDefault(f,c),f&&this._shouldTrigger(f,c)&&this.trigger(f+"Keyed",c)},_onInput:function(){this._setQuery(this.getInputValue()),this.clearHintIfInvalid(),this._checkLanguageDirection()},_managePreventDefault:function(c,f){var v;switch(c){case"up":case"down":v=!h(f);break;default:v=!1}v&&f.preventDefault()},_shouldTrigger:function(c,f){var v;return c==="tab"?v=!h(f):v=!0,v},_checkLanguageDirection:function(){var c=(this.$input.css("direction")||"ltr").toLowerCase();this.dir!==c&&(this.dir=c,this.$hint.attr("dir",c),this.trigger("langDirChanged",c))},_setQuery:function(c,f){var v,E;v=w(c,this.query),E=v?this.query.length!==c.length:!1,this.query=c,!f&&!v?this.trigger("queryChanged",this.query):!f&&E&&this.trigger("whitespaceChanged",this.query)},_updateDescendent:function(c,f){this.$input.attr("aria-activedescendant",f)},bind:function(){var p=this,c,f,v,E;return c=i.bind(this._onBlur,this),f=i.bind(this._onFocus,this),v=i.bind(this._onKeydown,this),E=i.bind(this._onInput,this),this.$input.on("blur.tt",c).on("focus.tt",f).on("keydown.tt",v),!i.isMsie()||i.isMsie()>9?this.$input.on("input.tt",E):this.$input.on("keydown.tt keypress.tt cut.tt paste.tt",function(C){g[C.which||C.keyCode]||i.defer(i.bind(p._onInput,p,C))}),this},focus:function(){this.$input.focus()},blur:function(){this.$input.blur()},getLangDir:function(){return this.dir},getQuery:function(){return this.query||""},setQuery:function(c,f){this.setInputValue(c),this._setQuery(c,f)},hasQueryChangedSinceLastFocus:function(){return this.query!==this.queryWhenFocused},getInputValue:function(){return this.$input.val()},setInputValue:function(c){this.$input.val(c),this.clearHintIfInvalid(),this._checkLanguageDirection()},resetInputValue:function(){this.setInputValue(this.query)},getHint:function(){return this.$hint.val()},setHint:function(c){this.$hint.val(c)},clearHint:function(){this.setHint("")},clearHintIfInvalid:function(){var c,f,v,E;c=this.getInputValue(),f=this.getHint(),v=c!==f&&f.indexOf(c)===0,E=c!==""&&v&&!this.hasOverflow(),!E&&this.clearHint()},hasFocus:function(){return this.$input.is(":focus")},hasOverflow:function(){var c=this.$input.width()-2;return this.$overflowHelper.text(this.getInputValue()),this.$overflowHelper.width()>=c},isCursorAtEnd:function(){var p,c,f;return p=this.$input.val().length,c=this.$input[0].selectionStart,i.isNumber(c)?c===p:document.selection?(f=document.selection.createRange(),f.moveStart("character",-p),p===f.text.length):!0},destroy:function(){this.$hint.off(".tt"),this.$input.off(".tt"),this.$overflowHelper.remove(),this.$hint=this.$input
vendor: 4,284 bytes, line 107
107=this.$overflowHelper=e("<div>")},setAriaExpanded:function(c){this.$input.attr("aria-expanded",c)}}),d;function u(p){return e('<pre aria-hidden="true"></pre>').css({position:"absolute",visibility:"hidden",whiteSpace:"pre",fontFamily:p.css("font-family"),fontSize:p.css("font-size"),fontStyle:p.css("font-style"),fontVariant:p.css("font-variant"),fontWeight:p.css("font-weight"),wordSpacing:p.css("word-spacing"),letterSpacing:p.css("letter-spacing"),textIndent:p.css("text-indent"),textRendering:p.css("text-rendering"),textTransform:p.css("text-transform")}).insertAfter(p)}function w(p,c){return d.normalizeQuery(p)===d.normalizeQuery(c)}function h(p){return p.altKey||p.ctrlKey||p.metaKey||p.shiftKey}})(),_=(function(){var g,d;g={dataset:"tt-selectable-dataset",val:"tt-selectable-display",obj:"tt-selectable-object"},d=i.getIdGenerator();function u(c,f){c=c||{},c.templates=c.templates||{},c.templates.notFound=c.templates.notFound||c.templates.empty,c.source||e.error("missing source"),c.node||e.error("missing node"),c.name&&!p(c.name)&&e.error("invalid dataset name: "+c.name),f.mixin(this),this.highlight=!!c.highlight,this.name=i.toStr(c.name||d()),this.limit=c.limit||5,this.displayFn=w(c.display||c.displayKey),this.templates=h(c.templates,this.displayFn),this.source=c.source.__ttAdapter?c.source.__ttAdapter():c.source,this.async=i.isUndefined(c.async)?this.source.length>2:!!c.async,this._resetLastSuggestion(),this.$el=e(c.node).attr("role","presentation").addClass(this.classes.dataset).addClass(this.classes.dataset+"-"+this.name)}return u.extractData=function(f){var v=e(f);return v.data(g.obj)?{dataset:v.data(g.dataset)||"",val:v.data(g.val)||"",obj:v.data(g.obj)||null}:null},i.mixin(u.prototype,s,{_overwrite:function(f,v){v=v||[],v.length?this._renderSuggestions(f,v):this.async&&this.templates.pending?this._renderPending(f):!this.async&&this.templates.notFound?this._renderNotFound(f):this._empty(),this.trigger("rendered",v,!1,this.name)},_append:function(f,v){v=v||[],v.length&&this.$lastSuggestion.length?this._appendSuggestions(f,v):v.length?this._renderSuggestions(f,v):!this.$lastSuggestion.length&&this.templates.notFound&&this._renderNotFound(f),this.trigger("rendered",v,!0,this.name)},_renderSuggestions:function(f,v){var E;E=this._getSuggestionsFragment(f,v),this.$lastSuggestion=E.children().last(),this.$el.html(E).prepend(this._getHeader(f,v)).append(this._getFooter(f,v))},_appendSuggestions:function(f,v){var E,C;E=this._getSuggestionsFragment(f,v),C=E.children().last(),this.$lastSuggestion.after(E),this.$lastSuggestion=C},_renderPending:function(f){var v=this.templates.pending;this._resetLastSuggestion(),v&&this.$el.html(v({query:f,dataset:this.name}))},_renderNotFound:function(f){var v=this.templates.notFound;this._resetLastSuggestion(),v&&this.$el.html(v({query:f,dataset:this.name}))},_empty:function(){this.$el.empty(),this._resetLastSuggestion()},_getSuggestionsFragment:function(f,v){var E=this,C;return C=document.createDocumentFragment(),i.each(v,function(A){var I,N;N=E._injectQuery(f,A),I=e(E.templates.suggestion(N)).data(g.dataset,E.name).data(g.obj,A).data(g.val,E.displayFn(A)).addClass(E.classes.suggestion+" "+E.classes.selectable),C.appendChild(I[0])}),this.highlight&&o({className:this.classes.highlight,node:C,pattern:f}),e(C)},_getFooter:function(f,v){return this.templates.footer?this.templates.footer({query:f,suggestions:v,dataset:this.name}):null},_getHeader:function(f,v){return this.templates.header?this.templates.header({query:f,suggestions:v,dataset:this.name}):null},_resetLastSuggestion:function(){this.$lastSuggestion=e()},_injectQuery:function(f,v){return i.isObject(v)?i.mixin({_query:f},v):v},update:function(f){var v=this,E=!1,C=!1,O=0;this.cancel(),this.cancel=function(){E=!0,v.cancel=e.noop,v.async&&v.trigger("asyncCanceled",f,v.name)},this.source(f,A,I),!C&&A([]);function A(N){C||(C=!0,N=(N||[]).slice(0,v.limit),O=N.length,v._overwrite(f,N),O<v.limit&&v.async&&v.trigger("asyncRequested",f,v.name))}function I(N){if(N=N||[],!E&&O<v.limit){v.cancel=e.noop;var D=Math.abs(O-v.limit);O+=D,v._append(f,N.slice(0,D)),v.async&&v.trigger("asyncReceived",f,v.name)}}},cancel:e.noop,clear:function(){this._empty(),this.cancel(),this.trigger("cleared")},isEmpty:function(){return this.$el.is(":empty")}
107,destroy:function(){this.$el=e("<div>")}}),u;function w(c){return c=c||i.stringify,i.isFunction(c)?c:f;function f(v){return v[c]}}function h(c,f){return{notFound:c.notFound&&i.templatify(c.notFound),pending:c.pending&&i.templatify(c.pending),header:c.header&&i.templatify(c.header),footer:c.footer&&i.templatify(c.footer),suggestion:c.suggestion?v:E};function v(C){var O=c.suggestion;return e(O(C)).attr("id",i.guid())}function E(C){return e('<div role="option">').attr("id",i.guid()).text(f(C))}}function p(c){return/^[_a-zA-Z0-9-]+$/.test(c)}})(),b=(function(){function g(d,u){var w=this;d=d||{},d.node||e.error("node is required"),u.mixin(this),this.$node=e(d.node),this.query=null,this.datasets=i.map(d.datasets,h);function h(p){var c=w.$node.find(p.node).first();return p.node=c.length?c:e("<div>").appendTo(w.$node),new _(p,u)}}return i.mixin(g.prototype,s,{_onSelectableClick:function(u){this.trigger("selectableClicked",e(u.currentTarget))},_onRendered:function(u,w,h,p){this.$node.toggleClass(this.classes.empty,this._allDatasetsEmpty()),this.trigger("datasetRendered",w,h,p)},_onCleared:function(){this.$node.toggleClass(this.classes.empty,this._allDatasetsEmpty()),this.trigger("datasetCleared")},_propagate:function(){this.trigger.apply(this,arguments)},_allDatasetsEmpty:function(){return i.every(this.datasets,i.bind(function(w){var h=w.isEmpty();return this.$node.attr("aria-expanded",!h),h},this))},_getSelectables:function(){return this.$node.find(this.selectors.selectable)},_removeCursor:function(){var u=this.getActiveSelectable();u&&u.removeClass(this.classes.cursor)},_ensureVisible:function(u){var w,h,p,c;w=u.position().top,h=w+u.outerHeight(!0),p=this.$node.scrollTop(),c=this.$node.height()+parseInt(this.$node.css("paddingTop"),10)+parseInt(this.$node.css("paddingBottom"),10),w<0?this.$node.scrollTop(p+w):c<h&&this.$node.scrollTop(p+(h-c))},bind:function(){var d=this,u;return u=i.bind(this._onSelectableClick,this),this.$node.on("click.tt",this.selectors.selectable,u),this.$node.on("mouseover",this.selectors.selectable,function(){d.setCursor(e(this))}),this.$node.on("mouseleave",function(){d._removeCursor()}),i.each(this.datasets,function(w){w.onSync("asyncRequested",d._propagate,d).onSync("asyncCanceled",d._propagate,d).onSync("asyncReceived",d._propagate,d).onSync("rendered",d._onRendered,d).onSync("cleared",d._onCleared,d)}),this},isOpen:function(){return this.$node.hasClass(this.classes.open)},open:function(){this.$node.scrollTop(0),this.$node.addClass(this.classes.open)},close:function(){this.$node.attr("aria-expanded",!1),this.$node.removeClass(this.classes.open),this._removeCursor()},setLanguageDirection:function(u){this.$node.attr("dir",u)},selectableRelativeToCursor:function(u){var w,h,p,c;return h=this.getActiveSelectable(),w=this._getSelectables(),p=h?w.index(h):-1,c=p+u,c=(c+1)%(w.length+1)-1,c=c<-1?w.length-1:c,c===-1?null:w.eq(c)},setCursor:function(u){this._removeCursor(),(u=u&&u.first())&&(u.addClass(this.classes.cursor),this._ensureVisible(u))},getSelectableData:function(u){return u&&u.length?_.extractData(u):null},getActiveSelectable:function(){var u=this._getSelectables().filter(this.selectors.cursor).first();return u.length?u:null},getTopSelectable:function(){var u=this._getSelectables().first();return u.length?u:null},update:function(u){var w=u!==this.query;return w&&(this.query=u,i.each(this.datasets,h)),w;function h(p){p.update(u)}},empty:function(){i.each(this.datasets,u),this.query=null,this.$node.addClass(this.classes.empty);function u(w){w.clear()}},destroy:function(){this.$node.off(".tt"),this.$node=e("<div>"),i.each(this.datasets,u);function u(w){w.destroy()}}}),g})(),m=(function(){function g(d){this.$el=e("<span></span>",{role:"status","aria-live":"polite"}).css({position:"absolute",padding:"0",border:"0",height:"1px",width:"1px","margin-bottom":"-1px","margin-right":"-1px",overflow:"hidden",clip:"rect(0 0 0 0)","white-space":"nowrap"}),d.$input.after(this.$el),i.each(d.menu.datasets,i.bind(function(u){u.onSync&&(u.onSync("rendered",i.bind(this.update,this)),u.onSync("cleared",i.bind(this.cleared,this)))},this))}return i.mixin(g.prototype,{update:function(u,w){var h=w.length,p;h===1?p={result:"result",is:"is"}:p={result:"results",is:"are"},this.$el.text(h+" "+p.result+" "+p.is+" available, use up and down arrow keys to navigate.")},cleared:function(){this.$el.text("")}}),g})(),y=(function(){var g=b.prototype;function d(){b.apply(this,[].slice.call(arguments,0))}return i.mixin(d.prototype,b.prototype,{open:function(){return!this._allDatasetsEmpty()&&this._show(),g.open.apply(this,[].slice.call(arguments,0))},close:function(){return this._hide(),g.close.apply(this,[].slice.call(arguments,0))},_onRendered:function(){return this._allDatasetsEmpty()?this._hide():this.isOpen()&&this._show(),g._onRendered.apply(this,[].slice.call(arguments,0))},_onCleared:function(){return this._allDatasetsEmpty()?this._hide():this.isOpen()&&this._show(),g._onCleared.apply(this,[].slice.call(arguments,0))}
107,setLanguageDirection:function(w){return this.$node.css(w==="ltr"?this.css.ltr:this.css.rtl),g.setLanguageDirection.apply(this,[].slice.call(arguments,0))},_hide:function(){this.$node.hide()},_show:function(){this.$node.css("display","block")}}),d})(),T=(function(){function g(u,w){var h,p,c,f,v,E,C,O,A,I,N;u=u||{},u.input||e.error("missing input"),u.menu||e.error("missing menu"),u.eventBus||e.error("missing event bus"),w.mixin(this),this.eventBus=u.eventBus,this.minLength=i.isNumber(u.minLength)?u.minLength:1,this.input=u.input,this.menu=u.menu,this.enabled=!0,this.autoselect=!!u.autoselect,this.active=!1,this.input.hasFocus()&&this.activate(),this.dir=this.input.getLangDir(),this._hacks(),this.menu.bind().onSync("selectableClicked",this._onSelectableClicked,this).onSync("asyncRequested",this._onAsyncRequested,this).onSync("asyncCanceled",this._onAsyncCanceled,this).onSync("asyncReceived",this._onAsyncReceived,this).onSync("datasetRendered",this._onDatasetRendered,this).onSync("datasetCleared",this._onDatasetCleared,this),h=d(this,"activate","open","_onFocused"),p=d(this,"deactivate","_onBlurred"),c=d(this,"isActive","isOpen","_onEnterKeyed"),f=d(this,"isActive","isOpen","_onTabKeyed"),v=d(this,"isActive","_onEscKeyed"),E=d(this,"isActive","open","_onUpKeyed"),C=d(this,"isActive","open","_onDownKeyed"),O=d(this,"isActive","isOpen","_onLeftKeyed"),A=d(this,"isActive","isOpen","_onRightKeyed"),I=d(this,"_openIfActive","_onQueryChanged"),N=d(this,"_openIfActive","_onWhitespaceChanged"),this.input.bind().onSync("focused",h,this).onSync("blurred",p,this).onSync("enterKeyed",c,this).onSync("tabKeyed",f,this).onSync("escKeyed",v,this).onSync("upKeyed",E,this).onSync("downKeyed",C,this).onSync("leftKeyed",O,this).onSync("rightKeyed",A,this).onSync("queryChanged",I,this).onSync("whitespaceChanged",N,this).onSync("langDirChanged",this._onLangDirChanged,this)}return i.mixin(g.prototype,{_hacks:function(){var w,h;w=this.input.$input||e("<div>"),h=this.menu.$node||e("<div>"),w.on("blur.tt",function(p){var c,f,v;c=document.activeElement,f=h.is(c),v=h.has(c).length>0,i.isMsie()&&(f||v)&&(p.preventDefault(),p.stopImmediatePropagation(),i.defer(function(){w.focus()}))}),h.on("mousedown.tt",function(p){p.preventDefault()})},_onSelectableClicked:function(w,h){this.select(h)},_onDatasetCleared:function(){this._updateHint()},_onDatasetRendered:function(w,h,p,c){if(this._updateHint(),this.autoselect){var f=this.selectors.cursor.substr(1);this.menu.$node.find(this.selectors.suggestion).first().addClass(f)}this.eventBus.trigger("render",h,p,c)},_onAsyncRequested:function(w,h,p){this.eventBus.trigger("asyncrequest",p,h)},_onAsyncCanceled:function(w,h,p){this.eventBus.trigger("asynccancel",p,h)},_onAsyncReceived:function(w,h,p){this.eventBus.trigger("asyncreceive",p,h)},_onFocused:function(){this._minLengthMet()&&this.menu.update(this.input.getQuery())},_onBlurred:function(){this.input.hasQueryChangedSinceLastFocus()&&this.eventBus.trigger("change",this.input.getQuery())},_onEnterKeyed:function(w,h){var p;(p=this.menu.getActiveSelectable())?this.select(p)&&(h.preventDefault(),h.stopPropagation()):this.autoselect&&this.select(this.menu.getTopSelectable())&&(h.preventDefault(),h.stopPropagation())},_onTabKeyed:function(w,h){var p;(p=this.menu.getActiveSelectable())?this.select(p)&&h.preventDefault():this.autoselect&&(p=this.menu.getTopSelectable())&&this.autocomplete(p)&&h.preventDefault()},_onEscKeyed:function(){this.close()},_onUpKeyed:function(){this.moveCursor(-1)},_onDownKeyed:function(){this.moveCursor(1)},_onLeftKeyed:function(){this.dir==="rtl"&&this.input.isCursorAtEnd()&&this.autocomplete(this.menu.getActiveSelectable()||this.menu.getTopSelectable())},_onRightKeyed:function(){this.dir==="ltr"&&this.input.isCursorAtEnd()&&this.autocomplete(this.menu.getActiveSelectable()||this.menu.getTopSelectable())},_onQueryChanged:function(w,h){this._minLengthMet(h)?this.menu.update(h):this.menu.empty()},_onWhitespaceChanged:function(){this._updateHint()},_onLangDirChanged:function(w,h){this.dir!==h&&(this.dir=h,this.menu.setLanguageDirection(h))},_openIfActive:function(){this.isActive()&&this.open()},_minLengthMet:function(w){return w=i.isString(w)?w:this.input.getQuery()||"",w.length>=this.minLength},_updateHint:function(){var w,h,p,c,f,v,E;w=this.menu.getTopSelectable(),h=this.menu.getSelectableData(w),p=this.input.getInputValue(),h&&!i.isBlankString(p)&&!this.input.hasOverflow()?(c=l.normalizeQuery(p),f=i.escapeRegExChars(c),v=new RegExp("^(?:"+f+")(.+$)","i"),E=v.exec(h.val),E&&this.input.setHint(p+E[1])):this.input.clearHint()},isEnabled:function(){return this.enabled},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},isActive:function(){return this.active},activate:function(){return this.isActive()?!0:!this.isEnabled()||this.eventBus.before("active")?!1:(this.active=!0,this.eventBus.trigger("active"),!0)},deactivate:function(){return this.isActive()?this.eventBus.before("idle")?!1:(this.active=!1,this.close(),this.eventBus.trigger("idle"),!0):!0},isOpen:function(){return this.menu.isOpen()},open:function(){return!this.isOpen()&&!this.eventBus.before("open")&&(this.input.setAriaExpanded(!0),this.menu.open(),this._updateHint(),this.eventBus.trigger("open")),this.isOpen()},close:function(){return this.isOpen()&&!this.eventBus.before("close")&&(this.input.setAriaExpanded(!1),this.menu.close(),this.input.clearHint(),this.input.resetInputValue(),this.eventBus.trigger("close")),!this.isOpen()},setVal:function(w){this.input.setQuery(i.toStr(w))},getVal:function(){return this.input.getQuery()},select:function(w){var h=this.menu.getSelectableData(w);return h&&!this.eventBus.before("select",h.obj,h.dataset)?(this.input.setQuery(h.val,!0),this.eventBus.trigger("select",h.obj,h.dataset),this.close(),!0):!1},autocomplete:function(w){var h,p,c;return h=this.input.getQuery(),p=this.menu.getSelectableData(w),c=p&&h!==p.val,c&&
107!this.eventBus.before("autocomplete",p.obj,p.dataset)?(this.input.setQuery(p.val),this.eventBus.trigger("autocomplete",p.obj,p.dataset),!0):!1},moveCursor:function(w){var h,p,c,f,v,E,C;return h=this.input.getQuery(),p=this.menu.selectableRelativeToCursor(w),c=this.menu.getSelectableData(p),f=c?c.obj:null,v=c?c.dataset:null,C=p?p.attr("id"):null,this.input.trigger("cursorchange",C),E=this._minLengthMet()&&this.menu.update(h),!E&&!this.eventBus.before("cursorchange",f,v)?(this.menu.setCursor(p),c?typeof c.val=="string"&&this.input.setInputValue(c.val):(this.input.resetInputValue(),this._updateHint()),this.eventBus.trigger("cursorchange",f,v),!0):!1},destroy:function(){this.input.destroy(),this.menu.destroy()}}),g;function d(u){var w=[].slice.call(arguments,1);return function(){var h=[].slice.call(arguments);i.each(w,function(p){return u[p].apply(u,h)})}}})();(function(){var g,d,u;g=e.fn.typeahead,d={www:"tt-www",attrs:"tt-attrs",typeahead:"tt-typeahead"},u={initialize:function(C,O){var A;return O=i.isArray(O)?O:[].slice.call(arguments,1),C=C||{},A=r(C.classNames),this.each(I);function I(){var N,D,U,Q,he,se,fe,pe,st,Ee,oe;i.each(O,function(_e){_e.highlight=!!C.highlight}),N=e(this),D=e(A.html.wrapper),U=v(C.hint),Q=v(C.menu),he=C.hint!==!1&&!U,se=C.menu!==!1&&!Q,he&&(U=h(N,A)),se&&(Q=e(A.html.menu).css(A.css.menu)),U&&U.val(""),N=p(N,A),(he||se)&&(D.css(A.css.wrapper),N.css(he?A.css.input:A.css.inputWithNoHint),N.wrap(D).parent().prepend(he?U:null).append(se?Q:null)),oe=se?y:b,fe=new n({el:N}),pe=new l({hint:U,input:N,menu:Q},A),st=new oe({node:Q,datasets:O},A),new m({$input:N,menu:st}),Ee=new T({input:pe,menu:st,eventBus:fe,minLength:C.minLength,autoselect:C.autoselect},A),N.data(d.www,A),N.data(d.typeahead,Ee)}},isEnabled:function(){var C;return w(this.first(),function(O){C=O.isEnabled()}),C},enable:function(){return w(this,function(C){C.enable()}),this},disable:function(){return w(this,function(C){C.disable()}),this},isActive:function(){var C;return w(this.first(),function(O){C=O.isActive()}),C},activate:function(){return w(this,function(C){C.activate()}),this},deactivate:function(){return w(this,function(C){C.deactivate()}),this},isOpen:function(){var C;return w(this.first(),function(O){C=O.isOpen()}),C},open:function(){return w(this,function(C){C.open()}),this},close:function(){return w(this,function(C){C.close()}),this},select:function(C){var O=!1,A=e(C);return w(this.first(),function(I){O=I.select(A)}),O},autocomplete:function(C){var O=!1,A=e(C);return w(this.first(),function(I){O=I.autocomplete(A)}),O},moveCursor:function(C){var O=!1;return w(this.first(),function(A){O=A.moveCursor(C)}),O},val:function(C){var O;return arguments.length?(w(this,function(A){A.setVal(i.toStr(C))}),this):(w(this.first(),function(A){O=A.getVal()}),O)},destroy:function(){return w(this,function(C,O){f(O),C.destroy()}),this}},e.fn.typeahead=function(E){return u[E]?u[E].apply(this,[].slice.call(arguments,1)):u.initialize.apply(this,arguments)},e.fn.typeahead.noConflict=function(){return e.fn.typeahead=g,this};function w(E,C){E.each(function(){var O=e(this),A;(A=O.data(d.typeahead))&&C(A,O)})}function h(E,C){return E.clone().addClass(C.classes.hint).removeData().css(C.css.hint).css(c(E)).prop({readonly:!0,required:!1}).removeAttr("id name placeholder").removeClass("required").attr({spellcheck:"false",tabindex:-1})}function p(E,C){E.data(d.attrs,{dir:E.attr("dir"),autocomplete:E.attr("autocomplete"),spellcheck:E.attr("spellcheck"),style:E.attr("style")}),E.addClass(C.classes.input).attr({spellcheck:!1});try{!E.attr("dir")&&E.attr("dir","auto")}catch{}return E}function c(E){return{backgroundAttachment:E.css("background-attachment"),backgroundClip:E.css("background-clip"),backgroundColor:E.css("background-color"),backgroundImage:E.css("background-image"),backgroundOrigin:E.css("background-origin"),backgroundPosition:E.css("background-position"),backgroundRepeat:E.css("background-repeat"),backgroundSize:E.css("background-size")}}function f(E){var C,O;C=E.data(d.www),O=E.parent().filter(C.selectors.wrapper),i.each(E.data(d.attrs),function(A,I){i.isUndefined(A)?E.removeAttr(I):E.attr(I,A)}),E.removeData(d.typeahead).removeData(d.www).removeData(d.attr).removeClass(C.classes.input),O.length&&(E.detach().insertAfter(O),O.remove())}function v(E){var C,O;
vendor: 4,133 bytes, line 107
107return C=i.isJQuery(E)||i.isElement(E),O=C?e(E).first():[],O.length?O:null}})()})})(ma)),ma.exports}$T();function Qp(t,e){return function(){return t.apply(e,arguments)}}const{toString:FT}=Object.prototype,{getPrototypeOf:gu}=Object,{iterator:Ba,toStringTag:Zp}=Symbol,qa=(t=>e=>{const i=FT.call(e);return t[i]||(t[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),_r=t=>(t=t.toLowerCase(),e=>qa(e)===t),Va=t=>e=>typeof e===t,{isArray:ks}=Array,Ts=Va("undefined");function ho(t){return t!==null&&!Ts(t)&&t.constructor!==null&&!Ts(t.constructor)&&Ui(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const em=_r("ArrayBuffer");function jT(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&em(t.buffer),e}const UT=Va("string"),Ui=Va("function"),tm=Va("number"),po=t=>t!==null&&typeof t=="object",BT=t=>t===!0||t===!1,ga=t=>{if(qa(t)!=="object")return!1;const e=gu(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Zp in t)&&!(Ba in t)},qT=t=>{if(!po(t)||ho(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},VT=_r("Date"),HT=_r("File"),zT=_r("Blob"),WT=_r("FileList"),KT=t=>po(t)&&Ui(t.pipe),GT=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Ui(t.append)&&((e=qa(t))==="formdata"||e==="object"&&Ui(t.toString)&&t.toString()==="[object FormData]"))},YT=_r("URLSearchParams"),[XT,JT,QT,ZT]=["ReadableStream","Request","Response","Headers"].map(_r),eC=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function mo(t,e,{allOwnKeys:i=!1}={}){if(t===null||typeof t>"u")return;let r,n;if(typeof t!="object"&&(t=[t]),ks(t))for(r=0,n=t.length;r<n;r++)e.call(null,t[r],r,t);else{if(ho(t))return;const s=i?Object.getOwnPropertyNames(t):Object.keys(t),o=s.length;let l;for(r=0;r<o;r++)l=s[r],e.call(null,t[l],l,t)}}function im(t,e){if(ho(t))return null;e=e.toLowerCase();const i=Object.keys(t);let r=i.length,n;for(;r-- >0;)if(n=i[r],e===n.toLowerCase())return n;return null}const An=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,rm=t=>!Ts(t)&&t!==An;function Ic(){const{caseless:t,skipUndefined:e}=rm(this)&&this||{},i={},r=(n,s)=>{const o=t&&im(i,s)||s;ga(i[o])&&ga(n)?i[o]=Ic(i[o],n):ga(n)?i[o]=Ic({},n):ks(n)?i[o]=n.slice():(!e||!Ts(n))&&(i[o]=n)};for(let n=0,s=arguments.length;n<s;n++)arguments[n]&&mo(arguments[n],r);return i}const tC=(t,e,i,{allOwnKeys:r}={})=>(mo(e,(n,s)=>{i&&Ui(n)?t[s]=Qp(n,i):t[s]=n},{allOwnKeys:r}),t),iC=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),rC=(t,e,i,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),i&&Object.assign(t.prototype,i)},nC=(t,e,i,r)=>{let n,s,o;const l={};if(e=e||{},t==null)return e;do{for(n=Object.getOwnPropertyNames(t),s=n.length;s-- >0;)o=n[s],(!r||r(o,t,e))&&!l[o]&&(e[o]=t[o],l[o]=!0);t=i!==!1&&gu(t)}while(t&&(!i||i(t,e))&&t!==Object.prototype);return e},sC=(t,e,i)=>{t=String(t),(i===void 0||i>t.length)&&(i=t.length),i-=e.length;const r=t.indexOf(e,i);return r!==-1&&r===i},oC=t=>{if(!t)return null;if(ks(t))return t;let e=t.length;if(!tm(e))return null;const i=new Array(e);for(;e-- >0;)i[e]=t[e];return i},aC=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&gu(Uint8Array)),lC=(t,e)=>{const r=(t&&t[Ba]).call(t);let n;for(;(n=r.next())&&!n.done;){const s=n.value;e.call(t,s[0],s[1])}},cC=(t,e)=>{let i;const r=[];for(;(i=t.exec(e))!==null;)r.push(i);return r},uC=_r("HTMLFormElement"),dC=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(i,r,n){return r.toUpperCase()+n}),Ef=(({hasOwnProperty:t})=>(e,i)=>t.call(e,i))(Object.prototype),fC=_r("RegExp"),nm=(t,e)=>{const i=Object.getOwnPropertyDescriptors(t),r={};mo(i,(n,s)=>{let o;(o=e(n,s,t))!==!1&&(r[s]=o||n)}),Object.defineProperties(t,r)},hC=t=>{nm(t,(e,i)=>{if(Ui(t)&&["arguments","caller","callee"].indexOf(i)!==-1)return!1;const r=t[i];if(Ui(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")})}})},pC=(t,e)=>{const i={},r=n=>
vendor: 1,219 bytes, line 107
107{n.forEach(s=>{i[s]=!0})};return ks(t)?r(t):r(String(t).split(e)),i},mC=()=>{},gC=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function vC(t){return!!(t&&Ui(t.append)&&t[Zp]==="FormData"&&t[Ba])}const yC=t=>{const e=new Array(10),i=(r,n)=>{if(po(r)){if(e.indexOf(r)>=0)return;if(ho(r))return r;if(!("toJSON"in r)){e[n]=r;const s=ks(r)?[]:{};return mo(r,(o,l)=>{const _=i(o,n+1);!Ts(_)&&(s[l]=_)}),e[n]=void 0,s}}return r};return i(t,0)},bC=_r("AsyncFunction"),wC=t=>t&&(po(t)||Ui(t))&&Ui(t.then)&&Ui(t.catch),sm=((t,e)=>t?setImmediate:e?((i,r)=>(An.addEventListener("message",({source:n,data:s})=>{n===An&&s===i&&r.length&&r.shift()()},!1),n=>{r.push(n),An.postMessage(i,"*")}))(`axios@${Math.random()}`,[]):i=>setTimeout(i))(typeof setImmediate=="function",Ui(An.postMessage)),_C=typeof queueMicrotask<"u"?queueMicrotask.bind(An):typeof process<"u"&&process.nextTick||sm,EC=t=>t!=null&&Ui(t[Ba]),Z={isArray:ks,isArrayBuffer:em,isBuffer:ho,isFormData:GT,isArrayBufferView:jT,isString:UT,isNumber:tm,isBoolean:BT,isObject:po,isPlainObject:ga,isEmptyObject:qT,isReadableStream:XT,isRequest:JT,isResponse:QT,isHeaders:ZT,isUndefined:Ts,isDate:VT,isFile:HT,isBlob:zT,isRegExp:fC,isFunction:Ui,isStream:KT,isURLSearchParams:YT,
vendor: 3,609 bytes, line 107
107isTypedArray:aC,isFileList:WT,forEach:mo,merge:Ic,extend:tC,trim:eC,stripBOM:iC,inherits:rC,toFlatObject:nC,kindOf:qa,kindOfTest:_r,endsWith:sC,toArray:oC,forEachEntry:lC,matchAll:cC,isHTMLForm:uC,hasOwnProperty:Ef,hasOwnProp:Ef,reduceDescriptors:nm,freezeMethods:hC,toObjectSet:pC,toCamelCase:dC,noop:mC,toFiniteNumber:gC,findKey:im,global:An,isContextDefined:rm,isSpecCompliantForm:vC,toJSONObject:yC,isAsyncFn:bC,isThenable:wC,setImmediate:sm,asap:_C,isIterable:EC};function yt(t,e,i,r,n){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),i&&(this.config=i),r&&(this.request=r),n&&(this.response=n,this.status=n.status?n.status:null)}Z.inherits(yt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Z.toJSONObject(this.config),code:this.code,status:this.status}}});const om=yt.prototype,am={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{am[t]={value:t}});Object.defineProperties(yt,am);Object.defineProperty(om,"isAxiosError",{value:!0});yt.from=(t,e,i,r,n,s)=>{const o=Object.create(om);Z.toFlatObject(t,o,function(m){return m!==Error.prototype},b=>b!=="isAxiosError");const l=t&&t.message?t.message:"Error",_=e==null&&t?t.code:e;return yt.call(o,l,_,i,r,n),t&&o.cause==null&&Object.defineProperty(o,"cause",{value:t,configurable:!0}),o.name=t&&t.name||"Error",s&&Object.assign(o,s),o};const SC=null;function Pc(t){return Z.isPlainObject(t)||Z.isArray(t)}function lm(t){return Z.endsWith(t,"[]")?t.slice(0,-2):t}function Sf(t,e,i){return t?t.concat(e).map(function(n,s){return n=lm(n),!i&&s?"["+n+"]":n}).join(i?".":""):e}function TC(t){return Z.isArray(t)&&!t.some(Pc)}const CC=Z.toFlatObject(Z,{},null,function(e){return/^is[A-Z]/.test(e)});function Ha(t,e,i){if(!Z.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,i=Z.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,function(u,w){return!Z.isUndefined(w[u])});const r=i.metaTokens,n=i.visitor||m,s=i.dots,o=i.indexes,_=(i.Blob||typeof Blob<"u"&&Blob)&&Z.isSpecCompliantForm(e);if(!Z.isFunction(n))throw new TypeError("visitor must be a function");function b(d){if(d===null)return"";if(Z.isDate(d))return d.toISOString();if(Z.isBoolean(d))return d.toString();if(!_&&Z.isBlob(d))throw new yt("Blob is not supported. Use a Buffer instead.");return Z.isArrayBuffer(d)||Z.isTypedArray(d)?_&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function m(d,u,w){let h=d;if(d&&!w&&typeof d=="object"){if(Z.endsWith(u,"{}"))u=r?u:u.slice(0,-2),d=JSON.stringify(d);else if(Z.isArray(d)&&TC(d)||(Z.isFileList(d)||Z.endsWith(u,"[]"))&&(h=Z.toArray(d)))return u=lm(u),h.forEach(function(c,f){!(Z.isUndefined(c)||c===null)&&e.append(o===!0?Sf([u],f,s):o===null?u:u+"[]",b(c))}),!1}return Pc(d)?!0:(e.append(Sf(w,u,s),b(d)),!1)}const y=[],T=Object.assign(CC,{defaultVisitor:m,convertValue:b,isVisitable:Pc});function g(d,u){if(!Z.isUndefined(d)){if(y.indexOf(d)!==-1)throw Error("Circular reference detected in "+u.join("."));y.push(d),Z.forEach(d,function(h,p){(!(Z.isUndefined(h)||h===null)&&n.call(e,h,Z.isString(p)?p.trim():p,u,T))===!0&&g(h,u?u.concat(p):[p])}),y.pop()}}if(!Z.isObject(t))throw new TypeError("data must be an object");return g(t),e}
vendor: 16,752 bytes, lines 107-109
107function Tf(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function vu(t,e){this._pairs=[],t&&Ha(t,this,e)}const cm=vu.prototype;cm.append=function(e,i){this._pairs.push([e,i])};cm.toString=function(e){const i=e?function(r){return e.call(this,r,Tf)}:Tf;return this._pairs.map(function(n){return i(n[0])+"="+i(n[1])},"").join("&")};function AC(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function um(t,e,i){if(!e)return t;const r=i&&i.encode||AC;Z.isFunction(i)&&(i={serialize:i});const n=i&&i.serialize;let s;if(n?s=n(e,i):s=Z.isURLSearchParams(e)?e.toString():new vu(e,i).toString(r),s){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class Cf{constructor(){this.handlers=[]}use(e,i,r){return this.handlers.push({fulfilled:e,rejected:i,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Z.forEach(this.handlers,function(r){r!==null&&e(r)})}}const dm={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},xC=typeof URLSearchParams<"u"?URLSearchParams:vu,OC=typeof FormData<"u"?FormData:null,kC=typeof Blob<"u"?Blob:null,IC={isBrowser:!0,classes:{URLSearchParams:xC,FormData:OC,Blob:kC},protocols:["http","https","file","blob","url","data"]},yu=typeof window<"u"&&typeof document<"u",Lc=typeof navigator=="object"&&navigator||void 0,PC=yu&&(!Lc||["ReactNative","NativeScript","NS"].indexOf(Lc.product)<0),LC=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",MC=yu&&window.location.href||"http://localhost",RC=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:yu,hasStandardBrowserEnv:PC,hasStandardBrowserWebWorkerEnv:LC,navigator:Lc,origin:MC},Symbol.toStringTag,{value:"Module"})),ki={...RC,...IC};function DC(t,e){return Ha(t,new ki.classes.URLSearchParams,{visitor:function(i,r,n,s){return ki.isNode&&Z.isBuffer(i)?(this.append(r,i.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...e})}function NC(t){return Z.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function $C(t){const e={},i=Object.keys(t);let r;const n=i.length;let s;for(r=0;r<n;r++)s=i[r],e[s]=t[s];return e}function fm(t){function e(i,r,n,s){let o=i[s++];if(o==="__proto__")return!0;const l=Number.isFinite(+o),_=s>=i.length;return o=!o&&Z.isArray(n)?n.length:o,_?(Z.hasOwnProp(n,o)?n[o]=[n[o],r]:n[o]=r,!l):((!n[o]||!Z.isObject(n[o]))&&(n[o]=[]),e(i,r,n[o],s)&&Z.isArray(n[o])&&(n[o]=$C(n[o])),!l)}if(Z.isFormData(t)&&Z.isFunction(t.entries)){const i={};return Z.forEachEntry(t,(r,n)=>{e(NC(r),n,i,0)}),i}return null}function FC(t,e,i){if(Z.isString(t))try{return(e||JSON.parse)(t),Z.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(i||JSON.stringify)(t)}const go={transitional:dm,adapter:["xhr","http","fetch"],transformRequest:[function(e,i){const r=i.getContentType()||"",n=r.indexOf("application/json")>-1,s=Z.isObject(e);if(s&&Z.isHTMLForm(e)&&(e=new FormData(e)),Z.isFormData(e))return n?JSON.stringify(fm(e)):e;if(Z.isArrayBuffer(e)||Z.isBuffer(e)||Z.isStream(e)||Z.isFile(e)||Z.isBlob(e)||Z.isReadableStream(e))return e;if(Z.isArrayBufferView(e))return e.buffer;if(Z.isURLSearchParams(e))return i.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let l;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return DC(e,this.formSerializer).toString();if((l=Z.isFileList(e))||r.indexOf("multipart/form-data")>-1){const _=this.env&&this.env.FormData;return Ha(l?{"files[]":e}:e,_&&new _,this.formSerializer)}}return s||n?(i.setContentType("application/json",!1),FC(e)):e}],transformResponse:[function(e){const i=this.transitional||go.transitional,r=i&&i.forcedJSONParsing,n=this.responseType==="json";if(Z.isResponse(e)||Z.isReadableStream(e))return e;if(e&&Z.isString(e)&&(r&&!this.responseType||n)){const o=!(i&&i.silentJSONParsing)&&n;try{return JSON.parse(e,this.parseReviver)}catch(l){if(o)throw l.name==="SyntaxError"?yt.from(l,yt.ERR_BAD_RESPONSE,this,null,this.response):l}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ki.classes.FormData,Blob:ki.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Z.forEach(["delete","get","head","post","put","patch"],t=>{go.headers[t]={}});const jC=Z.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),UC=t=>{const e={};let i,r,n;return t&&t.split(`
108`).forEach(function(o){n=o.indexOf(":"),i=o.substring(0,n).trim().toLowerCase(),r=o.substring(n+1).trim(),!(!i||e[i]&&jC[i])&&(i==="set-cookie"?e[i]?e[i].push(r):e[i]=[r]:e[i]=e[i]?e[i]+", "+r:r)}),e},Af=Symbol("internals");function Hs(t){return t&&String(t).trim().toLowerCase()}function va(t){return t===!1||t==null?t:Z.isArray(t)?t.map(va):String(t)}function BC(t){const e=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=i.exec(t);)e[r[1]]=r[2];return e}const qC=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Ul(t,e,i,r,n){if(Z.isFunction(r))return r.call(this,e,i);if(n&&(e=i),!!Z.isString(e)){if(Z.isString(r))return e.indexOf(r)!==-1;if(Z.isRegExp(r))return r.test(e)}}function VC(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,i,r)=>i.toUpperCase()+r)}function HC(t,e){const i=Z.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+i,{value:function(n,s,o){return this[r].call(this,e,n,s,o)},configurable:!0})})}let Bi=class{constructor(e){e&&this.set(e)}set(e,i,r){const n=this;function s(l,_,b){const m=Hs(_);if(!m)throw new Error("header name must be a non-empty string");const y=Z.findKey(n,m);(!y||n[y]===void 0||b===!0||b===void 0&&n[y]!==!1)&&(n[y||_]=va(l))}const o=(l,_)=>Z.forEach(l,(b,m)=>s(b,m,_));if(Z.isPlainObject(e)||e instanceof this.constructor)o(e,i);else if(Z.isString(e)&&(e=e.trim())&&!qC(e))o(UC(e),i);else if(Z.isObject(e)&&Z.isIterable(e)){let l={},_,b;for(const m of e){if(!Z.isArray(m))throw TypeError("Object iterator must return a key-value pair");l[b=m[0]]=(_=l[b])?Z.isArray(_)?[..._,m[1]]:[_,m[1]]:m[1]}o(l,i)}else e!=null&&s(i,e,r);return this}get(e,i){if(e=Hs(e),e){const r=Z.findKey(this,e);if(r){const n=this[r];if(!i)return n;if(i===!0)return BC(n);if(Z.isFunction(i))return i.call(this,n,r);if(Z.isRegExp(i))return i.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,i){if(e=Hs(e),e){const r=Z.findKey(this,e);return!!(r&&this[r]!==void 0&&(!i||Ul(this,this[r],r,i)))}return!1}delete(e,i){const r=this;let n=!1;function s(o){if(o=Hs(o),o){const l=Z.findKey(r,o);l&&(!i||Ul(r,r[l],l,i))&&(delete r[l],n=!0)}}return Z.isArray(e)?e.forEach(s):s(e),n}clear(e){const i=Object.keys(this);let r=i.length,n=!1;for(;r--;){const s=i[r];(!e||Ul(this,this[s],s,e,!0))&&(delete this[s],n=!0)}return n}normalize(e){const i=this,r={};return Z.forEach(this,(n,s)=>{const o=Z.findKey(r,s);if(o){i[o]=va(n),delete i[s];return}const l=e?VC(s):String(s).trim();l!==s&&delete i[s],i[l]=va(n),r[l]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const i=Object.create(null);return Z.forEach(this,(r,n)=>{r!=null&&r!==!1&&(i[n]=e&&Z.isArray(r)?r.join(", "):r)}),i}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,i])=>e+": "+i).join(`
109`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...i){const r=new this(e);return i.forEach(n=>r.set(n)),r}static accessor(e){const r=(this[Af]=this[Af]={accessors:{}}).accessors,n=this.prototype;function s(o){const l=Hs(o);r[l]||(HC(n,o),r[l]=!0)}return Z.isArray(e)?e.forEach(s):s(e),this}};Bi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Z.reduceDescriptors(Bi.prototype,({value:t},e)=>{let i=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[i]=r}}});Z.freezeMethods(Bi);function Bl(t,e){const i=this||go,r=e||i,n=Bi.from(r.headers);let s=r.data;return Z.forEach(t,function(l){s=l.call(i,s,n.normalize(),e?e.status:void 0)}),n.normalize(),s}function hm(t){return!!(t&&t.__CANCEL__)}function Is(t,e,i){yt.call(this,t??"canceled",yt.ERR_CANCELED,e,i),this.name="CanceledError"}Z.inherits(Is,yt,{__CANCEL__:!0});function pm(t,e,i){const r=i.config.validateStatus;!i.status||!r||r(i.status)?t(i):e(new yt("Request failed with status code "+i.status,[yt.ERR_BAD_REQUEST,yt.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i))}function zC(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function WC(t,e){t=t||10;const i=new Array(t),r=new Array(t);let n=0,s=0,o;return e=e!==void 0?e:1e3,function(_){const b=Date.now(),m=r[s];o||(o=b),i[n]=_,r[n]=b;let y=s,T=0;for(;y!==n;)T+=i[y++],y=y%t;if(n=(n+1)%t,n===s&&(s=(s+1)%t),b-o<e)return;const g=m&&b-m;return g?Math.round(T*1e3/g):void 0}}function KC(t,e){let i=0,r=1e3/e,n,s;const o=(b,m=Date.now())=>{i=m,n=null,s&&(clearTimeout(s),s=null),t(...b)};return[(...b)=>{const m=Date.now(),y=m-i;y>=r?o(b,m):(n=b,s||(s=setTimeout(()=>{s=null,o(n)},r-y)))},()=>n&&o(n)]}const Aa=(t,e,i=3)=>{let r=0;const n=WC(50,250);return KC(s=>{const o=s.loaded,l=s.lengthComputable?s.total:void 0,_=o-r,b=n(_),m=o<=l;r=o;const y={loaded:o,total:l,progress:l?o/l:void 0,bytes:_,rate:b||void 0,estimated:b&&l&&m?(l-o)/b:void 0,event:s,lengthComputable:l!=null,[e?"download":"upload"]:!0};t(y)},i)},xf=(t,e)=>{const i=t!=null;return[r=>e[0]({lengthComputable:i,total:t,loaded:r}),e[1]]},Of=t=>(...e)=>Z.asap(()=>t(...e)),GC=ki.hasStandardBrowserEnv?((t,e)=>i=>(i=new URL(i,ki.origin),t.protocol===i.protocol&&t.host===i.host&&(e||t.port===i.port)))(new URL(ki.origin),ki.navigator&&/(msie|trident)/i.test(ki.navigator.userAgent)):()=>!0,YC=ki.hasStandardBrowserEnv?{write(t,e,i,r,n,s,o){if(typeof document>"u")return;const l=[`${t}=${encodeURIComponent(e)}`];Z.isNumber(i)&&l.push(`expires=${new Date(i).toUTCString()}`),Z.isString(r)&&l.push(`path=${r}`),Z.isString(n)&&l.push(`domain=${n}`),s===!0&&l.push("secure"),Z.isString(o)&&l.push(`SameSite=${o}`),document.cookie=l.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function XC(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function JC(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function mm(t,e,i){let r=!XC(e);return t&&(r||i==!1)?JC(t,e):e}const kf=t=>t instanceof Bi?{...t}:t;function Dn(t,e){e=e||{};const i={};function r(b,m,y,T){return Z.isPlainObject(b)&&Z.isPlainObject(m)?Z.merge.call({caseless:T},b,m):Z.isPlainObject(m)?Z.merge({},m):Z.isArray(m)?m.slice():m}function n(b,m,y,T){if(Z.isUndefined(m)){if(!Z.isUndefined(b))return r(void 0,b,y,T)}else return r(b,m,y,T)}function s(b,m){if(!Z.isUndefined(m))return r(void 0,m)}function o(b,m){if(Z.isUndefined(m)){if(!Z.isUndefined(b))return r(void 0,b)}else return r(void 0,m)}function l(b,m,y){if(y in e)return r(b,m);if(y in t)return r(void 0,b)}const _={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:l,headers:(b,m,y)=>n(kf(b),kf(m),y,!0)};return Z.forEach(Object.keys({...t,...e}),function(m){const y=_[m]||n,T=y(t[m],e[m],m);Z.isUndefined(T)&&y!==l||(i[m]=T)}),i}const gm=t=>{const e=Dn({},t);let{data:i,withXSRFToken:r,xsrfHeaderName:n,xsrfCookieName:s,headers:o,auth:l}=e;if(e.headers=o=Bi.from(o),e.url=um(mm(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),l&&o.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),Z.isFormData(i)){if(ki.hasStandardBrowserEnv||ki.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(Z.isFunction(i.getHeaders)){const _=i.getHeaders(),b=["content-type","content-length"];Object.entries(_).forEach(([m,y])=>{b.includes(m.toLowerCase())&&o.set(m,y)})}}if(ki.hasStandardBrowserEnv&&(r&&Z.isFunction(r)&&(r=r(e)),r||r!==!1&&GC(e.url))){const _=n&&s&&YC.read(s);_&&o.set(n,_)}return e},QC=typeof XMLHttpRequest<"u",ZC=QC&&function(t){return new Promise(function(i,r){const n=gm(t);let s=n.data;const o=Bi.from(n.headers).normalize();let{responseType:l,onUploadProgress:_,onDownloadProgress:b}=n,m,y,T,g,d;function u(){g&&g(),d&&d(),n.cancelToken&&n.cancelToken.unsubscribe(m),n.signal&&n.signal.removeEventListener("abort",m)}let w=new XMLHttpRequest;w.open(n.method.toUpperCase(),n.url,!0),w.timeout=n.timeout;function h(){if(!w)return;const c=Bi.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),v={data:!l||l==="text"||l==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:c,config:t,request:w};pm(function(C){i(C),u()},function(C){r(C),u()},v),w=null}"onloadend"in w?w.onloadend=h:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(h)},w.onabort=function(){w&&(r(new yt("Request aborted",yt.ECONNABORTED,t,w)),w=null)},w.onerror=function(f){const v=f&&f.message?f.message:"Network Error",E=new yt(v,yt.ERR_NETWORK,t,w);E.event=f||null,r(E),w=null},w.ontimeout=function(){let f=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const v=n.transitional||dm;n.timeoutErrorMessage&&(f=n.timeoutErrorMessage),r(new yt(f,v.clarifyTimeoutError?yt.ETIMEDOUT:yt.ECONNABORTED,t,w)),w=null},s===void 0&&o.setContentType(null),"setRequestHeader"in w&&Z.forEach(o.toJSON(),function(f,v){w.setRequestHeader(v,f)}),Z.isUndefined(n.withCredentials)||(w.withCredentials=!!n.withCredentials),l&&l!=="json"&&(w.responseType=n.responseType),b&&([T,d]=Aa(b,!0),w.addEventListener("progress",T)),_&&w.upload&&([y,g]=Aa(_),w.upload.addEventListener("progress",y),w.upload.addEventListener("loadend",g)),(n.cancelToken||n.signal)&&(m=c=>{w&&(r(!c||c.type?new Is(null,t,w):c),w.abort(),w=null)},n.cancelToken&&n.cancelToken.subscribe(m),n.signal&&(n.signal.aborted?m():n.signal.addEventListener("abort",m)));const p=zC(n.url);if(p&&ki.protocols.indexOf(p)===-1){r(new yt("Unsupported protocol "+p+":",yt.ERR_BAD_REQUEST,t));return}w.send(s||null)})},eA=(t,e)=>{const{length:i}=t=t?t.filter(Boolean):[];if(e||i){let r=new AbortController,n;const s=function(b){if(!n){n=!0,l();const m=b instanceof Error?b:this.reason;r.abort(m instanceof yt?m:new Is(m instanceof Error?m.message:m))}};let o=e&&setTimeout(()=>{o=null,s(new yt(`timeout ${e} of ms exceeded`,yt.ETIMEDOUT))},e);const l=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(b=>{b.unsubscribe?b.unsubscribe(s):b.removeEventListener("abort",s)}),t=null)};t.forEach(b=>b.addEventListener("abort",s));const{signal:_}=r;return _.unsubscribe=()=>Z.asap(l),_}},tA=function*(t,e){let i=t.byteLength;if(i<e){yield t;return}let r=0,n;for(;r<i;)n=r+e,yield t.slice(r,n),r=n},iA=async function*(t,e){for await(const i of rA(t))yield*tA(i,e)},rA=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:i,value:r}=await e.read();if(i)break;yield r}}finally{await e.cancel()}},If=(t,e,i,r)=>{const n=iA(t,e);let s=0,o,l=_=>{o||(o=!0,r&&r(_))};return new ReadableStream({async pull(_){try{const{done:b,value:m}=await n.next();if(b){l(),_.close();return}let y=m.byteLength;if(i){let T=s+=y;i(T)}_.enqueue(new Uint8Array(m))}catch(b){throw l(b),b}},cancel(_){return l(_),n.return()}},{highWaterMark:2})},Pf=64*1024,{isFunction:Go}=Z,nA=(({Request:t,Response:e})=>({Request:t,Response:e}))(Z.global),{ReadableStream:Lf,TextEncoder:Mf}=Z.global,Rf=(t,...e)=>{try{return!!t(...e)}catch{return!1}},sA=t=>{t=Z.merge.call({skipUndefined:!0},nA,t);const{fetch:e,Request:i,Response:r}=t,n=e?Go(e):typeof fetch=="function",s=Go(i),o=Go(r);if(!n)return!1;const l=n&&Go(Lf),_=n&&(typeof Mf=="function"?(d=>u=>d.encode(u))(new Mf):async d=>
vendor: 8,877 bytes, lines 109-112
109new Uint8Array(await new i(d).arrayBuffer())),b=s&&l&&Rf(()=>{let d=!1;const u=new i(ki.origin,{body:new Lf,method:"POST",get duplex(){return d=!0,"half"}}).headers.has("Content-Type");return d&&!u}),m=o&&l&&Rf(()=>Z.isReadableStream(new r("").body)),y={stream:m&&(d=>d.body)};n&&["text","arrayBuffer","blob","formData","stream"].forEach(d=>{!y[d]&&(y[d]=(u,w)=>{let h=u&&u[d];if(h)return h.call(u);throw new yt(`Response type '${d}' is not supported`,yt.ERR_NOT_SUPPORT,w)})});const T=async d=>{if(d==null)return 0;if(Z.isBlob(d))return d.size;if(Z.isSpecCompliantForm(d))return(await new i(ki.origin,{method:"POST",body:d}).arrayBuffer()).byteLength;if(Z.isArrayBufferView(d)||Z.isArrayBuffer(d))return d.byteLength;if(Z.isURLSearchParams(d)&&(d=d+""),Z.isString(d))return(await _(d)).byteLength},g=async(d,u)=>{const w=Z.toFiniteNumber(d.getContentLength());return w??T(u)};return async d=>{let{url:u,method:w,data:h,signal:p,cancelToken:c,timeout:f,onDownloadProgress:v,onUploadProgress:E,responseType:C,headers:O,withCredentials:A="same-origin",fetchOptions:I}=gm(d),N=e||fetch;C=C?(C+"").toLowerCase():"text";let D=eA([p,c&&c.toAbortSignal()],f),U=null;const Q=D&&D.unsubscribe&&(()=>{D.unsubscribe()});let he;try{if(E&&b&&w!=="get"&&w!=="head"&&(he=await g(O,h))!==0){let oe=new i(u,{method:"POST",body:h,duplex:"half"}),_e;if(Z.isFormData(h)&&(_e=oe.headers.get("content-type"))&&O.setContentType(_e),oe.body){const[Ce,ke]=xf(he,Aa(Of(E)));h=If(oe.body,Pf,Ce,ke)}}Z.isString(A)||(A=A?"include":"omit");const se=s&&"credentials"in i.prototype,fe={...I,signal:D,method:w.toUpperCase(),headers:O.normalize().toJSON(),body:h,duplex:"half",credentials:se?A:void 0};U=s&&new i(u,fe);let pe=await(s?N(U,I):N(u,fe));const st=m&&(C==="stream"||C==="response");if(m&&(v||st&&Q)){const oe={};["status","statusText","headers"].forEach(ae=>{oe[ae]=pe[ae]});const _e=Z.toFiniteNumber(pe.headers.get("content-length")),[Ce,ke]=v&&xf(_e,Aa(Of(v),!0))||[];pe=new r(If(pe.body,Pf,Ce,()=>{ke&&ke(),Q&&Q()}),oe)}C=C||"text";let Ee=await y[Z.findKey(y,C)||"text"](pe,d);return!st&&Q&&Q(),await new Promise((oe,_e)=>{pm(oe,_e,{data:Ee,headers:Bi.from(pe.headers),status:pe.status,statusText:pe.statusText,config:d,request:U})})}catch(se){throw Q&&Q(),se&&se.name==="TypeError"&&/Load failed|fetch/i.test(se.message)?Object.assign(new yt("Network Error",yt.ERR_NETWORK,d,U),{cause:se.cause||se}):yt.from(se,se&&se.code,d,U)}}},oA=new Map,vm=t=>{let e=t&&t.env||{};const{fetch:i,Request:r,Response:n}=e,s=[r,n,i];let o=s.length,l=o,_,b,m=oA;for(;l--;)_=s[l],b=m.get(_),b===void 0&&m.set(_,b=l?new Map:sA(e)),m=b;return b};vm();const bu={http:SC,xhr:ZC,fetch:{get:vm}};Z.forEach(bu,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Df=t=>`- ${t}`,aA=t=>Z.isFunction(t)||t===null||t===!1;function lA(t,e){t=Z.isArray(t)?t:[t];const{length:i}=t;let r,n;const s={};for(let o=0;o<i;o++){r=t[o];let l;if(n=r,!aA(r)&&(n=bu[(l=String(r)).toLowerCase()],n===void 0))throw new yt(`Unknown adapter '${l}'`);if(n&&(Z.isFunction(n)||(n=n.get(e))))break;s[l||"#"+o]=n}if(!n){const o=Object.entries(s).map(([_,b])=>`adapter ${_} `+(b===!1?"is not supported by the environment":"is not available in the build"));let l=i?o.length>1?`since :
110`+o.map(Df).join(`
111`):" "+Df(o[0]):"as no adapter specified";throw new yt("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return n}const ym={getAdapter:lA,adapters:bu};function ql(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Is(null,t)}function Nf(t){return ql(t),t.headers=Bi.from(t.headers),t.data=Bl.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),ym.getAdapter(t.adapter||go.adapter,t)(t).then(function(r){return ql(t),r.data=Bl.call(t,t.transformResponse,r),r.headers=Bi.from(r.headers),r},function(r){return hm(r)||(ql(t),r&&r.response&&(r.response.data=Bl.call(t,t.transformResponse,r.response),r.response.headers=Bi.from(r.response.headers))),Promise.reject(r)})}const bm="1.13.2",za={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{za[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const $f={};za.transitional=function(e,i,r){function n(s,o){return"[Axios v"+bm+"] Transitional option '"+s+"'"+o+(r?". "+r:"")}return(s,o,l)=>{if(e===!1)throw new yt(n(o," has been removed"+(i?" in "+i:"")),yt.ERR_DEPRECATED);return i&&!$f[o]&&($f[o]=!0,console.warn(n(o," has been deprecated since v"+i+" and will be removed in the near future"))),e?e(s,o,l):!0}};za.spelling=function(e){return(i,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function cA(t,e,i){if(typeof t!="object")throw new yt("options must be an object",yt.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let n=r.length;for(;n-- >0;){const s=r[n],o=e[s];if(o){const l=t[s],_=l===void 0||o(l,s,t);if(_!==!0)throw new yt("option "+s+" must be "+_,yt.ERR_BAD_OPTION_VALUE);continue}if(i!==!0)throw new yt("Unknown option "+s,yt.ERR_BAD_OPTION)}}const ya={assertOptions:cA,validators:za},Pr=ya.validators;let kn=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Cf,response:new Cf}}async request(e,i){try{return await this._request(e,i)}catch(r){if(r instanceof Error){let n={};Error.captureStackTrace?Error.captureStackTrace(n):n=new Error;const s=n.stack?n.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
112`+s):r.stack=s}catch{}}throw r}}_request(e,i){typeof e=="string"?(i=i||{},i.url=e):i=e||{},i=Dn(this.defaults,i);const{transitional:r,paramsSerializer:n,headers:s}=i;r!==void 0&&ya.assertOptions(r,{silentJSONParsing:Pr.transitional(Pr.boolean),forcedJSONParsing:Pr.transitional(Pr.boolean),clarifyTimeoutError:Pr.transitional(Pr.boolean)},!1),n!=null&&(Z.isFunction(n)?i.paramsSerializer={serialize:n}:ya.assertOptions(n,{encode:Pr.function,serialize:Pr.function},!0)),i.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?i.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:i.allowAbsoluteUrls=!0),ya.assertOptions(i,{baseUrl:Pr.spelling("baseURL"),withXsrfToken:Pr.spelling("withXSRFToken")},!0),i.method=(i.method||this.defaults.method||"get").toLowerCase();let o=s&&Z.merge(s.common,s[i.method]);s&&Z.forEach(["delete","get","head","post","put","patch","common"],d=>{delete s[d]}),i.headers=Bi.concat(o,s);const l=[];let _=!0;this.interceptors.request.forEach(function(u){typeof u.runWhen=="function"&&u.runWhen(i)===!1||(_=_&&u.synchronous,l.unshift(u.fulfilled,u.rejected))});const b=[];this.interceptors.response.forEach(function(u){b.push(u.fulfilled,u.rejected)});let m,y=0,T;if(!_){const d=[Nf.bind(this),void 0];for(d.unshift(...l),d.push(...b),T=d.length,m=Promise.resolve(i);y<T;)m=m.then(d[y++],d[y++]);return m}T=l.length;let g=i;for(;y<T;){const d=l[y++],u=l[y++];try{g=d(g)}catch(w){u.call(this,w);break}}try{m=Nf.call(this,g)}catch(d){return Promise.reject(d)}for(y=0,T=b.length;y<T;)m=m.then(b[y++],b[y++]);return m}getUri(e){e=Dn(this.defaults,e);const i=mm(e.baseURL,e.url,e.allowAbsoluteUrls);return um(i,e.params,e.paramsSerializer)}};Z.forEach(["delete","get","head","options"],function(e){kn.prototype[e]=function(i,r){return this.request(Dn(r||{},{method:e,url:i,data:(r||{}).data}))}});Z.forEach(["post","put","patch"],function(e){function i(r){return function(s,o,l){return this.request(Dn(l||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}kn.prototype[e]=i(),kn.prototype[e+"Form"]=i(!0)});let uA=class wm{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let i;this.promise=new Promise(function(s){i=s});const r=this;this.promise.then(n=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](n);r._listeners=null}),this.promise.then=n=>{let s;const o=new Promise(l=>{r.subscribe(l),s=l}).then(n);return o.cancel=function(){r.unsubscribe(s)},o},e(function(s,o,l){r.reason||(r.reason=new Is(s,o,l),i(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const i=this._listeners.indexOf(e);i!==-1&&this._listeners.splice(i,1)}toAbortSignal(){const e=new AbortController,i=r=>{e.abort(r)};return this.subscribe(i),e.signal.unsubscribe=()=>this.unsubscribe(i),e.signal}static source(){let e;return{token:new wm(function(n){e=n}),cancel:e}}};function dA(t){return function(i){return t.apply(null,i)}}function fA(t){return Z.isObject(t)&&t.isAxiosError===!0}const Mc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,Re
112setContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};
112Object.entries(Mc).forEach(([t,e])=>{Mc[e]=t});function _m(t){const e=new kn(t),i=Qp(kn.prototype.request,e);return Z.extend(i,kn.prototype,e,{allOwnKeys:!0}),Z.extend(i,e,null,{allOwnKeys:!0}),i.create=function(n){return _m(Dn(t,n))},i}const fi=_m(go);fi.Axios=kn;fi.CanceledError=Is;fi.CancelToken=uA;fi.isCancel=hm;fi.VERSION=bm;fi.toFormData=Ha;fi.AxiosError=yt;fi.Cancel=fi.CanceledError;fi.all=function(e){return Promise.all(e)};fi.spread=dA;fi.isAxiosError=fA;fi.mergeConfig=Dn;fi.AxiosHeaders=Bi;fi.formToJSON=t=>fm(Z.isHTMLForm(t)?new FormData(t):t);fi.getAdapter=ym.getAdapter;fi.HttpStatusCode=Mc;fi.default=fi;const{Axios:sO,AxiosError:oO,CanceledError:aO,isCancel:lO,CancelToken:cO,VERSION:uO,all:dO,Cancel:fO,isAxiosError:hO,spread:pO,toFormData:mO,AxiosHeaders:gO,HttpStatusCode:vO,formToJSON:yO,getAdapter:bO,mergeConfig:wO}=fi;window.bootstrap=PT;window.jQuery=window.$=Ag;window.Bloodhound=DT;window.axios=fi;window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";window.FastAverageColor=Og;window.Croppr=kg;function Rc(t,e){for(const i of e){const r=t.getAttribute(i);if(typeof r=="string"&&r.trim()!=="")return r}return null}function hA(t){return Rc(t,["data-bs-title","data-bs-original-title","title","aria-label"])}function pA(t){const e=Rc(t,["data-bs-title","data-bs-original-title","title"]),i=Rc(t,["data-bs-content"]);if(!e&&!i)return null;const r={};return e&&(r.title=e),i&&(r.content=i),r}function mA(t){if(!$r)return null;const e=hA(t);return e?$r.getOrCreateInstance(t,{title:e}):null}function gA(t){if(!Mn)return null;const e=pA(t);return e?Mn.getOrCreateInstance(t,e):null}const Vl=new WeakSet;function Hl(t){Vl.has(t)||!window.Alpine?.onElRemoved||(Vl.add(t),window.Alpine.onElRemoved(t,()=>{Vl.delete(t);for(const e of[$r,Mn,ji])e?.getInstance(t)?.dispose()}))}function vA(t=document){t?.querySelectorAll&&(t.querySelectorAll('[data-bs-toggle="tooltip"]').forEach(e=>{mA(e)&&Hl(e)}),t.querySelectorAll('[data-bs-toggle="popover"]').forEach(e=>{gA(e)&&Hl(e)}),t.querySelectorAll('[data-bs-toggle="dropdown"]').forEach(e=>{ji&&(ji.getOrCreateInstance(e),Hl(e))}))}const Gs=new WeakMap,Dc=globalThis.matchMedia?.("(prefers-reduced-motion: reduce)");Dc?.addEventListener("change",()=>{Dc.matches&&document.querySelectorAll(".elevated-card").forEach(t=>Gs.get(t)?.reset())});function zl(t){const e=t.__cardEffectTargets;return e?.elevate&&Object.values(e).every(i=>!i||t.contains(i))?e:t.__cardEffectTargets={elevate:t.querySelector(".elevate"),elevateSecondary:t.querySelector(".elevate-secondary"),elevateSecondaryLarger:t.querySelector(".elevate-secondary-larger"),glare:t.querySelector(".glare")}}function yA(t,{requestFrame:e=requestAnimationFrame,cancelFrame:i=cancelAnimationFrame,motion:r=Dc}={}){if(Gs.has(t))return Gs.get(t).destroy;let n=null,s=null;const o=()=>{n!==null&&i(n),n=null,s=null},l=T=>{r?.matches||(s={x:T.clientX,y:T.clientY},n===null&&(n=e(()=>{if(n=null,!t.isConnected||!s)return;if(r?.matches){b();return}const{elevate:g,elevateSecondary:d,elevateSecondaryLarger:u,glare:w}=zl(t);if(!g)return;const h=t.getBoundingClientRect();if(!h.width||!h.height)return;const p=s.x-h.left,c=s.y-h.top,f=(p/h.width-.5)*10,v=(c/h.height-.5)*10;g.style.transform=`rotateX(${v}deg) rotateY(${-f}deg) scale(1.04)`,d&&(d.style.transform=`translateX(${f}px) translateY(${v}px) scale(1.02)`),u&&(u.style.transform=`translateX(${f}px) translateY(${v}px) scale(1.05)`),w&&(w.style.transform=`translate(-50%, -50%) translate(${p}px, ${c}px)`)})))},_=T=>{if(r?.matches)return;o();const{elevate:g}=zl(t);g&&(g.style.transform=`scale(${T})`)},b=()=>{o();const{elevate:T,elevateSecondary:g,elevateSecondaryLarger:d}=zl(t);T&&(T.style.transform="rotateX(0deg) rotateY(0deg) scale(1)"),g&&(g.style.transform="translateX(0) translateY(0) scale(1)"),d&&(d.style.transform="translateX(0) translateY(0) scale(1)")},m={mousemove:l,mousedown:()=>_(1.01),mouseup:()=>_(1.04),mouseleave:b};for(const[T,g]of Object.entries(m))t.addEventListener(T,g);const y=()=>{b();for(const[T,g]of Object.entries(m))t.removeEventListener(T,g);Gs.delete(t)};return Gs.set(t,{destroy:y,reset:b}),y}function Em(t=document){t.querySelectorAll(".elevated-card").forEach(e
112=>yA(e))}function bA(t,{doc:e=document,win:i=window,Observer:r=IntersectionObserver}={}){const n=i.matchMedia("(prefers-reduced-motion: reduce)"),s=i.navigator.connection||i.navigator.mozConnection||i.navigator.webkitConnection,o=["slow-2g","2g"].includes(s?.effectiveType);let l=!1,_=!1;o&&(t.preload="none");const b=()=>{if(!_){if(n.matches&&t.removeAttribute("autoplay"),!l||e.hidden||n.matches||!t.isConnected){t.pause();return}t.preload=o?"metadata":"auto",t.play()?.catch(()=>{})}},m=new r(T=>{for(const g of T)l=g.isIntersecting&&(!o||g.intersectionRatio>=.5),b()},{rootMargin:"50px",threshold:o?.5:.1});m.observe(t),b();const y=()=>{t.style.display="none";const T=e.getElementById("hero-fallback");T&&(T.style.display="block")};return e.addEventListener("visibilitychange",b),n.addEventListener("change",b),t.addEventListener("error",y),()=>{_=!0,m.disconnect(),e.removeEventListener("visibilitychange",b),n.removeEventListener("change",b),t.removeEventListener("error",y),t.pause()}}function wA({readColor:t,doc:e=document,win:i=window,Observer:r=i.IntersectionObserver,now:n=Date.now,cacheLimit:s=128,cacheTtl:o=3e5}){const l=new Map,_=new Set,b=new Map;let m=null,y=null,T=0;const g=typeof i.requestIdleCallback=="function",d=O=>O.currentSrc||O.getAttribute("src")||"";function u(){y!==null&&(g?i.cancelIdleCallback(y):i.clearTimeout(y),y=null)}function w(){if(y!==null||!_.size||e.hidden)return;const O=T,A=()=>{if(O!==T||(y=null,e.hidden))return;const I=_.values().next().value;_.delete(I),I&&c(I),w()};y=g?i.requestIdleCallback(A,{timeout:1500}):i.setTimeout(A,32)}function h(O){return O.visible&&O.container.isConnected&&O.image.isConnected&&O.container.querySelector("img")===O.image&&O.image.complete&&O.image.naturalWidth>0}function p(O){if(!h(O))return;const A=d(O.image);!A||O.processedSource===A||(_.add(O),w())}function c(O){if(!h(O))return;const A=d(O.image);if(!A||O.processedSource===A)return;let I=b.get(A);if(!I||I.expires<=n()){let N=null;try{N=t(O.image)}catch{}I={color:N,expires:n()+o}}b.delete(A),b.set(A,I),b.size>s&&b.delete(b.keys().next().value),O.processedSource=A,I.color&&(O.container.style.backgroundColor=I.color,O.container.style.backgroundImage="linear-gradient(0deg, transparent, #ffffff0d)")}function f(O){O.image.removeEventListener("load",O.onLoad),m?.unobserve(O.container),_.delete(O),l.delete(O.container)}function v(O=e){for(const A of l.values())(!A.container.isConnected||A.container.querySelector("img")!==A.image)&&f(A);if(!m&&r){const A=T;m=new r(I=>{if(A===T)for(const N of I){const D=l.get(N.target);D&&(D.visible=N.isIntersecting,D.visible?p(D):_.delete(D))}},{rootMargin:"0px",threshold:0})}O.querySelectorAll(".vibrant").forEach(A=>{const I=A.querySelector("img");if(!I)return;let N=l.get(A);N||(N={container:A,image:I,visible:!r,processedSource:null},N.onLoad=()=>{N.processedSource=null,p(N)},l.set(A,N),I.addEventListener("load",N.onLoad),m?.observe(A)),p(N)})}function E(){T++,u();for(const O of l.values())f(O);m?.disconnect(),m=null}const C=()=>{e.hidden?u():w()};return e.addEventListener("visibilitychange",C),{scan:v,reset:E,destroy(){E(),b.clear(),e.removeEventListener("visibilitychange",C)}}}function Sm({win:t=window}={}){let e=!0;const i=new Map,r=new Set;function n(o){const l=i.get(o);l&&(i.delete(o),l.cancel(l.id))}function s(o,l,_,b,m=!1){if(n(o),!e)return;const y={cancel:b,id:null};i.set(o,y),y.id=_(()=>{!e||i.get(o)!==y||(m||i.delete(o),l())})}return{get active(){return e},cancel:n,timeout(o,l,_){s(o,l,b=>t.setTimeout(b,_),b=>t.clearTimeout(b))},interval(o,l,_){s(o,l,b=>t.setInterval(b,_),b=>t.clearInterval(b),!0)},frame(o,l){i.has(o)||s(o,l,_=>t.requestAnimationFrame(_),_=>t.cancelAnimationFrame(_))},listen(o,l,_,b){if(!e||!o)return;const m=(...T)=>{e&&_(...T)};o.addEventListener(l,m,b);const y=()=>o.removeEventListener(l,m,b);r.add(y)},destroy(){if(e){e=!1;for(const o of i.keys())n(o);for(const o of r)o();r.clear()}}}}function _A(t,{doc:e=document}={}){let i=!1,r=!1,n=null,s="";const o=new Map,l="a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]";function _(m){if(!i||m.key!=="Tab"||m.defaultPrevented)return;const y=[...t.querySelectorAll(l)].filter(d=>d.tabIndex>=0&&!d.closest("[inert]")&&d.getClientRects().length>0),T=y[0],g=y[y.length-1];T?m.shiftKey&&(e.activeElement===T||e.activeElement===t)?(m.preventDefault(),g.focu
112s({preventScroll:!0})):!m.shiftKey&&(e.activeElement===g||e.activeElement===t)&&(m.preventDefault(),T.focus({preventScroll:!0})):(m.preventDefault(),t.focus({preventScroll:!0}))}function b({restoreFocus:m=!0}={}){if(i){i=!1,t.removeEventListener("keydown",_);for(const[y,T]of o)y.inert=T;o.clear(),e.body.style.overflow=s,m&&n?.isConnected&&n.focus({preventScroll:!0}),n=null}}return{open(){if(r)return!1;if(i)return!0;if([...e.querySelectorAll('dialog[open], [role="dialog"][aria-modal="true"]')].some(y=>y!==t&&!t.contains(y)&&y.getClientRects().length>0))return!1;i=!0,n=e.activeElement,s=e.body.style.overflow,e.body.style.overflow="hidden";for(let y=t;y&&y!==e.body;y=y.parentElement)for(const T of y.parentElement?.children||[])T===y||!("inert"in T)||(o.set(T,T.inert),T.inert=!0);return t.addEventListener("keydown",_),!0},focus(m){i&&!r&&m?.isConnected&&m.focus({preventScroll:!0})},close:b,destroy(){r=!0,b({restoreFocus:!1})}}}function EA({win:t=window}={}){const e=Sm({win:t});return{compact:!1,init(){const i=()=>{this.compact=t.scrollY>5};i(),e.listen(t,"scroll",()=>e.frame("scroll",i),{passive:!0})},destroy(){e.destroy()}}}const Ff=new Set(["image/jpeg","image/png","image/webp"]);function xa(t){return new Promise((e,i)=>{if(!(t instanceof Blob)){i(new Error("Expected image file input."));return}const r=new FileReader;r.onload=n=>e(String(n?.target?.result||"")),r.onerror=()=>i(new Error("Could not read image file.")),r.readAsDataURL(t)})}async function Oa(t,e,i={}){if(!(t instanceof Blob))throw new Error("Expected image file input.");const r=await xA(t),n={width:r.naturalWidth||r.width,height:r.naturalHeight||r.height},s=SA(e,n.width,n.height),o=document.createElement("canvas");o.width=s.width,o.height=s.height;const l=o.getContext("2d");if(!l)throw new Error("Could not initialize image canvas context.");l.drawImage(r,s.x,s.y,s.width,s.height,0,0,s.width,s.height);const _=TA(t,i),b=Number.isFinite(i.quality)?i.quality:.9,m=await AA(o,_,b);return new File([m],CA(t.name,_),{type:_,lastModified:Date.now()})}function wu(t,e,i={}){if(!t||typeof t.getValue!="function")return!1;const r=Number(e);if(!Number.isFinite(r)||r<=0)return!1;const n=t.getValue("raw");if(!n||typeof n!="object")return!1;const s=Number(n.width),o=Number(n.height),l=Number(n.x),_=Number(n.y);if(!Number.isFinite(s)||!Number.isFinite(o)||!Number.isFinite(l)||!Number.isFinite(_)||s<=0||o<=0)return!1;const b=Math.max(1,Number(t.cropperEl?.offsetWidth||0)),m=Math.max(1,Number(t.cropperEl?.offsetHeight||0)),y=Math.max(1,Number(i.minSize||24)),T=Math.max(y/s,y/o),g=Math.min(b/s,m/o),d=Math.min(g,Math.max(T,r)),u=Math.max(y,s*d),w=Math.max(y,o*d),h=l+s/2,p=_+o/2,c=Math.max(0,b-u),f=Math.max(0,m-w),v=Math.min(c,Math.max(0,h-u/2)),E=Math.min(f,Math.max(0,p-w/2));return!t.box||typeof t.box.set!="function"||typeof t.redraw!="function"?!1:(t.box.set(v,E,v+u,E+w),t.redraw(),typeof t.options?.onCropEnd=="function"&&t.options.onCropEnd(t.getValue()),!0)}function SA(t,e,i){const r={x:0,y:0,width:Math.max(1,Math.floor(e)),height:Math.max(1,Math.floor(i))};if(!t||typeof t!="object")return r;const n=Math.max(0,Math.floor(Number(t.x)||0)),s=Math.max(0,Math.floor(Number(t.y)||0)),o=Math.max(1,r.width-n),l=Math.max(1,r.height-s),_=Math.min(o,Math.max(1,Math.floor(Number(t.width)||o))),b=Math.min(l,Math.max(1,Math.floor(Number(t.height)||l)));return{x:n,y:s,width:_,height:b}}function TA(t,e){const i=e.outputType;if(typeof i=="string"&&Ff.has(i))return i;const r=typeof t.type=="string"?t.type.toLowerCase():"";return Ff.has(r)?r:"image/jpeg"}function CA(t,e){const r={"image/jpeg":"jpg","image/png":"png","image/webp":"webp"}[e]||"jpg";return`${String(t||"image").replace(/\.[a-z0-9]+$/i,"").trim()||"image"}-cropped.${r}`}function AA(t,e,i){return new Promise((r,n)=>{t.toBlob(s=>{if(!s){n(new Error("Could not encode cropped image."));return}r(s)},e,i)})}function xA(t){return new Promise((e,i)=>{const r=URL.createObjectURL(t),n=new Image;n.onload=()=>{URL.revokeObjectURL(r),e(n)},n.onerror=()=>{URL.revokeObjectURL(r),i(new Error("Could not decode image file."))},n.src=r})}function jf(t,e){const i=new Set(["https://skinmc.net","https://www.skinmc.net",e]);for(const r of String(t||"").matchAll(/https?:\/\/[^\s<>"']+/gi)){const n=r[0].replace(/[.,!?;:)\]}]+$/,"");try{const s=new URL(n);if(i.has(s.origin)&&!s.username&&!s.password&&/^\/(?:skins(?:\/creations)?|banner|cape|server)\/[^/]+\/?$/.test(s.pathname))return n}catch{}}return""}function OA(t,e={}){const i=e.fetch||globalThis.fetch,r=e.setTimeout||globalThis.setTimeout,n=e.clearTimeout||globalThis.clearTimeout,s=new Set;let o="",l="",_=null,b=null,m=!1;function y(){n(_),_=null,b?.abort(),b=null,t.loading(!1)}async function T(g){if(_=null,m||!t.canAttach())return;const d=new AbortController;b=d,t.loading(!0);try{const u=await i(`${t.endpoint}?${new URLSearchParams({url:g})}`,{headers:{Accept:"application/json"},signal:d.signal});if(!u.ok)return;const w=await u.json();if(m||d.signal.aborted||o!==g||jf(t.getText(),t.origin)!==g||!t.canAttach()||!w?.data?.type||!w?.data?.id)return;l=g,t.select(w.data)}catch{}finally{b===d&&(b=null,t.loading(!1))}}return{sync(){if(m)return;const g=jf(t.getText(),t.origin);g!==o&&(y(),o=g,l&&l!==g&&(l="",t.clear()),t.autoAttach(!s.has(g)),g&&!s.has(g)&&t.canAttach()&&(_=r(()=>T(g),300)))},dismiss(){o&&s.add(o),l="",y(),t.autoAttach(!1)},useManualAttachment(){l="",y()},destroy(){m=!0,y()}}}let Yo;function kA(){return Yo??(Yo=new Promise((t,e)=>{const i=indexedDB.open("skinmc-feed-drafts",1);let r=!1;const n=setTimeout(()=>{r=!0,e(new Error("Draft storage timed out."))},3e3);i.onupgradeneeded=()=>i.result.createObjectStore("drafts"),i.onsuccess=()=>
112{if(clearTimeout(n),r){i.result.close();return}i.result.onversionchange=()=>{i.result.close(),Yo=null},t(i.result)},i.onerror=()=>{clearTimeout(n),e(i.error)},i.onblocked=()=>{clearTimeout(n),r=!0,e(new Error("Draft storage is blocked."))}}).catch(t=>{throw Yo=null,t})),Yo}function IA(t){function e(r){try{return localStorage.setItem(t,JSON.stringify(r,(n,s)=>s instanceof Blob?{missingFile:!0,name:s.name,size:s.size,lastModified:s.lastModified}:s)),!0}catch{return!1}}async function i(r,n){const s=await kA();return new Promise((o,l)=>{const _=s.transaction("drafts",r),b=n(_.objectStore("drafts")),m=setTimeout(()=>{_.abort(),l(new Error("Saving the draft timed out."))},3e3);_.oncomplete=()=>{clearTimeout(m),o(b.result)},_.onerror=_.onabort=()=>{clearTimeout(m),l(_.error)}})}return{backup:e,async read(){let r=null;try{r=JSON.parse(localStorage.getItem(t))}catch{}try{const n=await i("readonly",b=>b.get(t));if((n?.updatedAt||0)>=(r?.updatedAt||0))return n;const s=new Map,o=b=>`${b.name}:${b.size}:${b.lastModified}`,l=b=>{b instanceof File?s.set(o(b),b):b&&typeof b=="object"&&Object.values(b).forEach(l)};l(n);const _=b=>b?.missingFile?s.get(o(b))||b:Array.isArray(b)?b.map(_):b&&typeof b=="object"?Object.fromEntries(Object.entries(b).map(([m,y])=>[m,_(y)])):b;return _(r)}catch{return r}},async write(r){try{return await i("readwrite",n=>n.put(r,t)),!0}catch{return!1}}}}const Wl=new Map;function ka(t){return t instanceof Blob?t:Array.isArray(t)?t.map(ka):t&&typeof t=="object"?Object.fromEntries(Object.entries(t).map(([e,i])=>[e,ka(i)])):t}const Xo=()=>({body:"",audience:"everyone",contentWarning:"",images:[],descriptions:[],video:null,gif:null,attachment:null,poll:null,autoAttachLink:!0});function PA({storage:t,labels:e={},fetch:i=globalThis.fetch,uuid:r=()=>crypto.randomUUID(),csrf:n=()=>document.querySelector('meta[name="csrf-token"]')?.content||"",onPublished:s=()=>{},now:o=Date.now,timeoutMs:l=12e4,audience:_="everyone"}={}){const b=new Set,m={draft:{...Xo(),audience:_},pending:null,status:"loading",error:"",durable:!0,saving:!1};let y=!1,T=Promise.resolve(),g=null,d=0;const u=v=>b.forEach(E=>E(m,v)),w=()=>ka({draft:m.draft,pending:m.pending,updatedAt:d=Math.max(o(),d+1)});function h(){clearTimeout(g);const v=w();return m.saving=!0,t.backup?.(v),T=T.catch(()=>{}).then(async()=>{let E=!1;try{E=await t.write(v)}catch{}v.updatedAt===d&&(m.durable=E,m.saving=!1,u())}),T}const p=Promise.resolve().then(()=>t.read()).then(v=>{v?.draft&&(m.draft={...Xo(),...v.draft}),v?.pending?.id&&Array.isArray(v.pending.entries)&&(m.pending=v.pending)}).catch(()=>{m.durable=!1}).finally(()=>{m.status=m.pending?"failed":"idle",m.pending&&(m.error=e.uncertain),u()});async function c(v){m.pending=null,m.draft={...Xo(),audience:m.draft.audience},m.status="idle",m.error=v.deleted?e.already_deleted:"";const E=h();s(v),await E,u()}async function f(v){if(y||!m.pending)return;y=!0,m.status="sending",m.error="",u();const E=new AbortController,C=setTimeout(()=>E.abort(),l);try{const O={Accept:"application/json","X-CSRF-TOKEN":n()};if(v){const D=await i(`/api/feed/submissions/${encodeURIComponent(m.pending.id)}`,{headers:O,signal:E.signal});if(D.ok||D.status===410){await c(await D.json());return}if(D.status!==404)throw new Error(e.uncertain)}if(m.pending.entries.some(([,D])=>D?.missingFile)){m.pending=null,m.status="idle",m.error=e.reattach;return}const A=new FormData;for(const[D,U]of m.pending.entries)A.append(D,U);A.set("client_request_id",m.pending.id);const I=await i("/feed/compose",{method:"POST",headers:O,body:A,signal:E.signal});let N;try{N=await I.json()}catch{throw new Error(e.uncertain)}if(I.ok&&N.url){await c(N);return}if(I.status===410){await c(N);return}if([422,413].includes(I.status))m.pending=null,m.status="idle",m.error=Object.values(N.errors||{}).flat().join(" ")||N.message||e.failed;else throw new Error(e.uncertain)}catch{m.status="failed",m.error=e.uncertain}finally{clearTimeout(C),y=!1,await h(),u()}}return{ready:p,subscribe(v){return b.add(v),v(m),()=>b.delete(v)},update(v,E){m.pending||m.status==="loading"||(m.draft=ka(v),m.saving=!0,t.backup?.(w()),clearTimeout(g),g=setTimeout(()=>{h()},300),u(E))},async publish(v){if(await p,!(y||m.status==="sending"))return m.pending?f(!0):(m.pending={id:r(),entries:[...v.entries()].filter(([E,C])=>E!=="_token"&&E!=="client_request_id"&&!(C instanceof File&&C.name===""&&C.size===0))},m.status="sending",u(),await h(),f(!1))},retry:()=>f(!0),async flush(){return await p,h()},discard(){y||["sending","loading"].includes(m.status)||(m.pending=null,m.draft={...Xo(),audience:m.draft.audience},m.status="idle",m.error="",h(),u())}}}function LA(t,e,i){const r=`skinmc.feed.draft.v1:${t}`;return Wl.has(r)||Wl.set(r,PA({storage:IA(r),labels:e,audience:i,onPublished:n=>{if(n.deleted)return;n.message&&window.dispatchEvent(new CustomEvent("toast",{detail:{message:n.message}}));const s=document.getElementById("composePost");s&&window.bootstrap?.Modal.getInstance(s)?.hide(),window.Livewire?.dispatch("feed-post-published",{postId:n.id})}})),Wl.get(r)}function MA(t={}){let e=null,i=null,r=!1,n=null,s=null,o=!1,l=null,_=null,b=null;const m=Symbol("composer");return{postBody:"",audience:t.initialAudience||"everyone",contentWarning:"",showContentWarning:!1,imageDescriptions:[],imageDescriptionText:"",imageDescriptionPreview:"",pollDuration:1,isSubmitting:!1,draftLocked:!!t.userId,draftReady:!t.userId,draftError:"",draftStatus:"loading",draftDurable:!0,draftSaving:!1,draftHasContent:!1,missingDraftFiles:!1,initialShareType:t.initialShareType||"",initialShareQuery:t.initialShareQuery||"",skinUploadUrl:t.skinUploadUrl||"",capeUploadUrl:t.capeUploadUrl||"",maxImageBytes:Number.isFinite(t.maxImageBytes)?Number(t.maxImageBytes):10*1024*1024,maxVideoBytes:Number.isFinite(t.maxVideoBytes)?Number(t.maxVideoBytes):100*1024*1024,maxVideoDurationSeconds:Number.isFinite(t.maxVideoDurationSeconds)?Number(t.maxVideoDurationSeconds):30,videoErrorMessages:{unsupported:t.videoErrorMessages?.unsupported||"Please choose an MP4, MOV, WebM, or M4V video.",tooLarge:t.videoErrorMessages?.tooLarge||"Please choose a smaller video.",unreadable:t.videoErrorMessages?.unreadable||"We could not read that video. Please try a different file.",tooLong:t.videoErrorMessages?.tooLong||"Please choose a shorter video."},imageFiles:[],imagePreviews:[],oversizedImageCount:0,videoFile:null,videoPreviewUrl:"",videoFileName:"",videoDurationSeconds:0,videoError:"",videoValidating:!1,videoValidationToken:0,textureHintIndexes:[],maxImageAttachments:Number.isFinite(t.maxImageAttachments)?Number(t.maxImageAttachments):4,showTextureUploadHint:!1,imageDetectionToken:0,isImageEditorOpen:!1,isImageEditorBusy:!1,imageEditorIndex:-1,imageEditorPreviewSrc:"",imageEditorCroppr:null,imageEditorTargetEl:null,imageEditorCropData:null,imageEditorCropError:"",imageEditorAspectRatio:"free",imageEditorAspectRatioOptions:[{key:"free",label:"Free",value:null},{key:"square",label:"1:1",value:1},{key:"portrait",label:"4:5",value:4/5},{key:"landscape",label:"16:9",value:16/9}],imageEditorZoomLevel:1,imageEditorZoomMin:1,imageEditorZoomMax:4,imageEditorZoomStep:.1,imageEditorReferenceArea:null,showPoll:!1,composeInstanceId:Math.random().toString(36).slice(2,10),pollOptionCounter:0,pollOptions:[],showGifPicker:!1,gifSearch:"",gifs:[],gifCategories:[],gifLoading:!1,selectedGif:null,gifUrl:"",showAttachmentPicker:!1,attachmentType:"skin_creation",attachmentSearch:"",attachmentCommittedSearch:"",attachmentLoading:!1,attachmentError:"",selectedAttachment:null,attachmentResults:[],attachmentAbort:null,attachmentSearchTimer:null,attachmentSearchDebounceMs:280,autoAttachLink:!0,linkPreviewLoading:!1,showMentions:!1,mentions:[],mentionIndex:0,mentionLoading:!1,mentionAbort:null,showHashtags:!1,hashtags:[],hashtagIndex:0,hashtagLoading:!1,hashtagAbort:null,init(){this.resetPollOptions(),this.$nextTick(()=>
112{if(!r)if(e=Pg(this.$el),i=OA({origin:window.location.origin,endpoint:t.attachmentPreviewUrl||"/api/feed/attachments/preview",getText:()=>this.$el.querySelector('textarea[name="body"]')?.value||"",canAttach:()=>!this.draftLocked&&!this.selectedAttachment&&!this.showPoll&&!this.selectedGif&&!this.videoFile&&!this.$el.querySelector('input[name="video"]')?.files?.length&&this.$el.querySelector("form")?.dataset.submitting!=="true",select:T=>this.selectAttachment(T,{fromLink:!0}),clear:()=>{this.selectedAttachment=null,document.dispatchEvent(new CustomEvent("attachment-selected"))},autoAttach:T=>{this.autoAttachLink=T},loading:T=>{this.linkPreviewLoading=T}}),i.sync(),t.userId){n=LA(t.userId,t.labels||{},t.initialAudience),s=n.subscribe((T,g)=>{this.draftReady=T.status!=="loading",this.draftStatus=T.status,this.draftLocked=!!T.pending||!this.draftReady,this.isSubmitting=T.status==="sending",this.draftError=T.error,this.draftDurable=T.durable,this.draftSaving=T.saving,this.draftHasContent=!!(T.draft.body?.trim()||T.draft.images?.length||T.draft.video||T.draft.gif||T.draft.attachment||T.draft.poll||T.draft.contentWarning?.trim()),this.draftReady&&l!==T.draft&&(l=T.draft,g!==m&&this.restoreDraft(T.draft))});for(const T of["postBody","audience","contentWarning","imageFiles","imageDescriptions","videoFile","selectedGif","selectedAttachment","showPoll","pollOptions","pollDuration","autoAttachLink"])this.$watch(T,()=>this.saveDraft());n.ready.then(()=>{!r&&!this.draftLocked&&!this.draftHasContent&&this.initialShareType&&this.initialShareQuery&&this.prefillSharedAttachment()})}else this.initialShareType&&this.initialShareQuery&&this.prefillSharedAttachment()}),!(!this.initialShareType||!this.initialShareQuery||!["skin","skin_creation","server","banner","cape"].includes(this.initialShareType))&&(this.attachmentType=this.initialShareType,this.attachmentSearch=this.initialShareQuery)},saveDraft(){if(!n||o||!this.draftReady||this.draftLocked||r)return;const y=T=>T?JSON.parse(JSON.stringify(T)):null;n.update({body:this.postBody,audience:this.audience,contentWarning:this.contentWarning,images:Array.from(this.imageFiles),descriptions:Array.from(this.imageDescriptions),video:this.videoFile,gif:y(this.selectedGif),attachment:y(this.selectedAttachment),poll:this.showPoll?{duration:this.pollDuration,options:this.pollOptions.map(T=>({text:T.text,file:T.imageFile||null}))}:null,autoAttachLink:this.autoAttachLink},m)},restoreDraft(y){o=!0,this.postBody=y.body||"",this.audience=y.audience||"everyone",this.contentWarning=y.contentWarning||"",this.showContentWarning=!!this.contentWarning;const T=(y.images||[]).filter(d=>d instanceof File);this.missingDraftFiles=T.length!==(y.images||[]).length||!!y.video?.missingFile||!!y.poll?.options?.some(d=>d.file?.missingFile),T.map(d=>this.fileSignature(d)).join("|")!==this.imageFiles.map(d=>this.fileSignature(d)).join("|")&&(this.imageFiles=T,this.syncImageInput(T),this.updateImagePreviews(T)),this.imageDescriptions=Array.from(y.descriptions||[]);const g=y.video instanceof File?y.video:null;g!==this.videoFile&&(this.videoError="",this.videoDurationSeconds=0,this.videoPreviewUrl&&URL.revokeObjectURL(this.videoPreviewUrl),this.videoFile=g,this.videoPreviewUrl=g?URL.createObjectURL(g):"",this.videoFileName=g?.name||""),g||this.clearVideo(),this.selectedGif=y.gif?{...y.gif}:null,this.gifUrl=y.gif?.url||"",this.selectedAttachment=y.attachment?{...y.attachment}:null,this.showPoll=!!y.poll,this.pollDuration=y.poll?.duration||1,this.releasePollOptionImagePreviews(),this.pollOptions=y.poll?y.poll.options.map(d=>({...this.createPollOption(d.text),imageFile:d.file instanceof File?d.file:null,imagePreviewUrl:d.file instanceof File?URL.createObjectURL(d.file):""})):[this.createPollOption(),this.createPollOption()],this.autoAttachLink=y.autoAttachLink!==!1,this.$nextTick(()=>{r||(i?.sync(),y.autoAttachLink===!1&&i?.dismiss(),e?.handleInput(),o=!1)})},async startSubmit(y){if(y.preventDefault(),!n||this.draftLocked||this.isSubmitting||this.videoValidating||this.isImageEditorBusy)return;this.saveDraft();const T=y.currentTarget;await this.$nextTick();const g=new FormData(T);
112g.delete("images[]"),this.imageFiles.forEach(d=>g.append("images[]",d)),g.delete("video"),this.videoFile&&g.append("video",this.videoFile);for(const d of[...g.keys()])d.startsWith("poll_option_images[")&&g.delete(d);this.showPoll&&this.pollOptions.forEach((d,u)=>{d.imageFile&&g.append(`poll_option_images[${u}]`,d.imageFile)}),await n.publish(g)},retryPost(){return n?.retry()},discardDraft(){n?.discard()},toggleContentWarning(){this.draftLocked||(this.showContentWarning=!this.showContentWarning,this.showContentWarning?this.$nextTick(()=>this.$refs.contentWarningInput?.focus()):this.contentWarning="")},destroy(){this.saveDraft(),n?.flush(),r=!0,this.closeImageDescriptionEditor(!1),s?.(),e?.destroy(),i?.destroy(),this.attachmentAbort?.abort(),this.mentionAbort?.abort(),this.hashtagAbort?.abort(),clearTimeout(this.attachmentSearchTimer),this.imageDetectionToken++,this.releaseImagePreviewUrls(),this.releasePollOptionImagePreviews(),this.destroyImageEditorCroppr(),this.videoPreviewUrl&&URL.revokeObjectURL(this.videoPreviewUrl)},syncLinkPreview(){i?.sync()},openImageDescriptionEditor(y,T){this.draftLocked||!this.imageFiles[y]||(_=this.imageFiles[y],b=T,this.imageDescriptionText=this.imageDescriptions[y]||"",this.imageDescriptionPreview=this.imagePreviews[y]?.url||"",this.$refs.imageDescriptionDialog.showModal(),this.$nextTick(()=>this.$refs.imageDescriptionInput.focus()))},saveImageDescription(){const y=this.imageFiles.indexOf(_);if(this.draftLocked||y<0){this.closeImageDescriptionEditor();return}this.imageDescriptions[y]=this.imageDescriptionText.trim().slice(0,1e3),this.saveDraft(),this.closeImageDescriptionEditor()},closeImageDescriptionEditor(y=!0){this.$refs?.imageDescriptionDialog?.close(),y&&b?.isConnected&&b.focus({preventScroll:!0}),_=null,b=null,this.imageDescriptionPreview="",this.imageDescriptionText=""},async openImageEditor(y){if(y<0||y>=this.imageFiles.length)return;const T=this.imageFiles[y];if(T){this.destroyImageEditorCroppr(),this.imageEditorIndex=y,this.imageEditorCropData=null,this.imageEditorCropError="",this.imageEditorAspectRatio="free",this.imageEditorZoomLevel=this.imageEditorZoomMin,this.imageEditorReferenceArea=null,this.imageEditorTargetEl=null,this.isImageEditorBusy=!1;try{this.imageEditorPreviewSrc=await xa(T)}catch{this.imageEditorCropError="Could not load this image for editing.";return}this.isImageEditorOpen=!0,this.$nextTick(()=>{this.initImageEditorCroppr()})}},initImageEditorCroppr(){const y=this.imageEditorCroppr?._restore?.element||null,T=this.imageEditorTargetEl?.isConnected?this.imageEditorTargetEl:null,g=y||this.$refs.imageEditorTarget||T;if(this.destroyImageEditorCroppr(),typeof window.Croppr!="function"){this.imageEditorCropError="Image editor is unavailable right now.";return}if(!g){this.imageEditorCropError="Could not start image editor.";return}this.imageEditorTargetEl=g;const d=this.currentImageEditorAspectRatio();this.imageEditorCroppr=new window.Croppr(g,{aspectRatio:d,startSize:[100,100],onInitialize:u=>{this.imageEditorCropData=u.getValue(),this.imageEditorReferenceArea=this.getCropArea(u.getValue("raw")),this.imageEditorZoomLevel=this.imageEditorZoomMin},onCropEnd:u=>{this.imageEditorCropData=u,this.syncImageEditorZoomLevel()}})},currentImageEditorAspectRatio(){return this.imageEditorAspectRatioOptions.find(T=>T.key===this.imageEditorAspectRatio)?.value??null},setImageEditorAspectRatio(y){this.imageEditorAspectRatioOptions.some(T=>T.key===y)&&this.imageEditorAspectRatio!==y&&(this.imageEditorAspectRatio=y,this.$nextTick(()=>{this.initImageEditorCroppr()}))},zoomImageEditorIn(){this.setImageEditorZoom(this.imageEditorZoomLevel+this.imageEditorZoomStep)},zoomImageEditorOut(){this.setImageEditorZoom(this.imageEditorZoomLevel-this.imageEditorZoomStep)},setImageEditorZoom(y){if(!this.imageEditorCroppr)return;const T=this.clampImageEditorZoom(y),d=this.getImageEditorCurrentZoomLevel()/T;if(!wu(this.imageEditorCroppr,d,{minSize:24})){this.imageEditorCropError="Could not adjust zoom. Please try again.";return}this.imageEditorCropError="",this.syncImageEditorZoomLevel()},syncImageEditorZoomLevel(){this.imageEditorZoomLevel=this.getImageEditorCurrentZoomLevel()},getImageEditorCurrentZoomLevel(){const y=this.imageEditorCroppr?.getValue?.("raw"),T=this.getCropArea(y);if(!T)return this.imageEditorZoomMin;const g=Math.max(1,Number.isFinite(this.imageEditorReferenceArea)?this.imageEditorReferenceArea:T),d=Math.sqrt(g/T);return this.clampImageEditorZoom(d)},clampImageEditorZoom(y){const T=Number(y);return Number.isFinite(T)?Math.min(this.imageEditorZoomMax,Math.max(this.imageEditorZoomMin,T)):this.imageEditorZoomMin},getCropArea(y){if(!y||typeof y!="object")return null;const T=Number(y.width),g=Number(y.height);return!Number.isFinite(T)||!Number.isFinite(g)||T<=0||g<=0?null:T*g},closeImageEditor(){this.destroyImageEditorCroppr(),this.isImageEditorOpen=!1,this.isImageEditorBusy=!1,this.imageEditorIndex=-1,this.imageEditorPreviewSrc="",this.imageEditorTargetEl=null,this.imageEditorCropData=null,this.imageEditorCropError="",this.imageEditorZoomLevel=this.imageEditorZoomMin,this.imageEditorReferenceArea=null},destroyImageEditorCroppr(){this.imageEditorCroppr&&(this.imageEditorCroppr.destroy(),this.imageEditorCroppr=null)},async applyImageEditor(){if(this.imageEditorIndex<0||this.imageEditorIndex>=this.imageFiles.length||!this.imageEditorCropData)return;const y=this.imageFiles[this.imageEditorIndex];if(y){if(typeof DataTransfer>"u"){this.imageEditorCropError="Image editing is not supported in this browser.";return}this.isImageEditorBusy=!0,this.imageEditorCropError="";try{const T=await Oa(y,this.imageEditorCropData,{outputType:y.type||"image/jpeg"});this.imageFiles.splice(this.imageEditorIndex,1,T),this.syncImageInput(this.imageFiles),this.updateImagePreviews(this.imageFiles),this.showTextureUploadHint=!1,this.textureHintIndexes=[],this.imageDetectionToken+=1;const g=this.imageDetectionToken;this.detectTextureUploadHints(this.imageFiles,g),this.closeImageEditor()}catch{this.imageEditorCropError="Could not apply crop. Please try again.",this.isImageEditorBusy=!1}}},previewImage(y=null){if(!!y?.target&&(this.showPoll||this.selectedGif||this.videoPreviewUrl)){y?.target&&(y.target.value=""),this.notifyUploadError("You can only attach one item per post.");return}this.showTextureUploadHint=!1,this.oversizedImageCount=0,this.textureHintIndexes=[],this.imageDetectionToken+=1;const g=Array.from(this.$refs.image?.files||[]);g.some(h=>!this.isSupportedUploadImage(h))&&this.notifyUploadError("Only JPEG, PNG, and WebP images are supported.");const u=g.filter(h=>this.isSupportedUploadImage(h));if(typeof DataTransfer>"u")this.imageDescriptions=[],this.imageFiles=u.slice(0,this.maxImageAttachments);else{const h=new Set,p=[];for(const c of[...this.imageFiles,...u]){const f=this.fileSignature(c);if(!h.has(f)&&(h.add(f),p.push(c),p.length>=this.maxImageAttachments))break}this.imageFiles=p,this.syncImageInput(this.imageFiles)}this.updateImagePreviews(this.imageFiles);const w=this.imageDetectionToken;this.detectTextureUploadHints(this.imageFiles,w)},async previewVideo(y=null){if(!y?.target)return;const T=++this.videoValidationToken;if(this.videoValidating=!1,this.showPoll||this.selectedGif||this.selectedAttachment||this.imagePreviews.length>0){y.target.value="",this.notifyUploadError("You can only attach one item per post.");return}const g=y.target.files?.[0]||null;if(!(g instanceof File)){this.clearVideo();return}this.videoError="";const d=()=>{y.target.value="",this.$refs.video&&this.$refs.video!==y.target&&(this.$refs.video.value="")},u=(h,p=0)=>{this.videoPreviewUrl&&URL.revokeObjectURL(this.videoPreviewUrl),this.videoFile=null,this.videoPreviewUrl=URL.createObjectURL(h),this.videoFileName=h.name,this.videoDurationSeconds=p};if(!this.isSupportedUploadVideo(g)){d(),this.clearVideo(),this.videoError=this.videoErrorMessages.unsupported;return}if(g.size>this.maxVideoBytes){u(g),d(),this.videoError=this.videoErrorMessages.tooLarge,document.dispatchEvent(new CustomEvent("video-selected"));return}this.videoValidating=!0;const w=await this.readVideoDuration(g);if(!(r||T!==this.videoValidationToken)){if(this.videoValidating=!1,!Number.isFinite(w)||w<=0){u(g),d(),this.videoError=this.videoErrorMessages.unreadable,document.dispatchEvent(new CustomEvent("video-selected"));return}if(w>this.maxVideoDurationSeconds){u(g,w),d(),this.videoError=this.videoErrorMessages.tooLong,document.dispatchEvent(new CustomEvent("video-selected"));return}this.clearImage(),this.clearGif(),this.resetPoll(),this.clearAttachment(),this.videoPreviewUrl&&URL.revokeObjectURL(this.videoPreviewUrl),this.videoFile=g,this.videoFileName=g.name,this.videoDurationSeconds=w,this.videoPreviewUrl=URL.createObjectURL(g),this.videoError="",document.dispatchEvent(new CustomEvent("video-selected"))}},clearImage(){this.closeImageDescriptionEditor(),this.imageDescriptions=[],this.closeImageEditor(),this.imageFiles=[],this.releaseImagePreviewUrls(),this.imagePreviews=[],this.oversizedImageCount=0,this.textureHintIndexes=[],this.showTextureUploadHint=!1,this.imageDetectionToken+=1,this.$refs.image&&(this.$refs.image.value="")},clearVideo(){this.videoValidationToken++,this.videoValidating=!1,this.videoPreviewUrl&&URL.revokeObjectURL(this.videoPreviewUrl),this.videoFile=null,this.videoPreviewUrl="",this.videoFileName="",this.videoDurationSeconds=0,this.videoError="",this.$refs.video&&(this.$refs.video.value=""),document.dispatchEvent(new CustomEvent("video-selected"))},removeImage(y){if(!(y<0||y>=this.imageFiles.length)){if(this.imageFiles[y]===_&&this.closeImageDescriptionEditor(),this.isImageEditorOpen&&this.imageEditorIndex===y&&this.closeImageEditor(),typeof DataTransfer>"u"){this.clearImage();return}this.imageFiles.splice(y,1),this.imageDescriptions.splice(y,1),this.syncImageInput(this.imageFiles),this.previewImage()}},updateImagePreviews(y){this.releaseImagePreviewUrls(),this.imagePreviews=y.map((T,g)=>({id:`${T.name}-${T.lastModified}-${g}`,name:T.name,size:T.size,url:URL.createObjectURL(T),isTextureLike:!1})),this.oversizedImageCount=y.filter(T=>T.size>this.maxImageBytes).length},fileSignature(y){return`${y.name}-${y.size}-${y.lastModified}`},releaseImagePreviewUrls(){this.imagePreviews.forEach(y=>{y?.url&&URL.revokeObjectURL(y.url)})},syncImageInput(y){if(!this.$refs.image)return;if(typeof DataTransfer>"u"){y.length===0&&(this.$refs.image.value="");return}const T=new DataTransfer;
112y.forEach(g=>{T.items.add(g)}),this.$refs.image.files=T.files},async detectTextureUploadHints(y,T){if(!Array.isArray(y)||y.length===0)return;const g=await Promise.all(y.map(async d=>{const u=await this.readImageDimensions(d);return u?this.isLikelySkinOrCapeTexture(u.width,u.height):!1}));T===this.imageDetectionToken&&(this.textureHintIndexes=g.map((d,u)=>d?u:-1).filter(d=>d>=0),this.showTextureUploadHint=this.textureHintIndexes.length>0,this.imagePreviews=this.imagePreviews.map((d,u)=>({...d,isTextureLike:this.textureHintIndexes.includes(u)})))},readImageDimensions(y){return new Promise(T=>{const g=URL.createObjectURL(y),d=new Image;d.onload=()=>{const u={width:d.naturalWidth||d.width,height:d.naturalHeight||d.height};URL.revokeObjectURL(g),T(u)},d.onerror=()=>{URL.revokeObjectURL(g),T(null)},d.src=g})},isSupportedUploadImage(y){if(!(y instanceof File))return!1;const T=String(y.type||"").toLowerCase().trim();if(T!=="")return["image/jpeg","image/png","image/webp"].includes(T);const g=String(y.name||"").split(".").pop()?.toLowerCase();return["jpg","jpeg","png","webp"].includes(g||"")},isSupportedUploadVideo(y){if(!(y instanceof File))return!1;const T=String(y.type||"").toLowerCase().trim();if(T!=="")return["video/mp4","video/quicktime","video/webm","video/x-m4v"].includes(T);const g=String(y.name||"").split(".").pop()?.toLowerCase();return["mp4","mov","webm","m4v"].includes(g||"")},readVideoDuration(y){return new Promise(T=>{const g=URL.createObjectURL(y),d=document.createElement("video");d.preload="metadata";let u=!1;const w=p=>{u||(u=!0,clearTimeout(h),d.onloadedmetadata=d.onerror=null,URL.revokeObjectURL(g),d.removeAttribute("src"),T(p))},h=setTimeout(()=>w(0),15e3);d.onloadedmetadata=()=>{const p=Number(d.duration);w(Number.isFinite(p)?p:0)},d.onerror=()=>w(0),d.src=g})},notifyUploadError(y){window.dispatchEvent(new CustomEvent("toast",{detail:{message:y}}))},isLikelySkinOrCapeTexture(y,T){if(!Number.isInteger(y)||!Number.isInteger(T)||y<=0||T<=0)return!1;const g=256;if(y>g||T>g)return!1;const d=y/64,u=y/46,w=this.isTextureScaleSupported(d)&&(T===64*d||T===32*d),h=this.isTextureScaleSupported(d)&&T===32*d,p=this.isTextureScaleSupported(u)&&T===22*u;return w||h||p},isTextureScaleSupported(y){return[1,2,4,8,16].includes(y)},createPollOption(y=""){return this.pollOptionCounter+=1,{id:this.pollOptionCounter,text:y,imagePreviewUrl:"",imageInputId:`poll-option-image-${this.composeInstanceId}-${this.pollOptionCounter}`}},resetPollOptions(){this.releasePollOptionImagePreviews(),this.pollOptions=[this.createPollOption(),this.createPollOption()]},resetPoll(){this.showPoll=!1,this.resetPollOptions()},releasePollOptionImagePreviews(){this.pollOptions.forEach(y=>{y?.imagePreviewUrl&&URL.revokeObjectURL(y.imagePreviewUrl)})},setPollOptionImage(y,T){const g=this.pollOptions[T];if(!g)return;const u=y?.target?.files?.[0];if(!u){this.clearPollOptionImage(T);return}if(!this.isSupportedUploadImage(u)){this.notifyUploadError("Only JPEG, PNG, and WebP images are supported."),this.clearPollOptionImage(T);return}if(u.size>this.maxImageBytes){const w=(this.maxImageBytes/1048576).toFixed(2).replace(/\.?0+$/,"");this.notifyUploadError(`Each poll option image must be ${w} MB or smaller.`),this.clearPollOptionImage(T);return}g.imagePreviewUrl&&URL.revokeObjectURL(g.imagePreviewUrl),g.imagePreviewUrl=URL.createObjectURL(u),g.imageFile=u},clearPollOptionImage(y){const T=this.pollOptions[y];if(!T)return;T.imagePreviewUrl&&URL.revokeObjectURL(T.imagePreviewUrl),T.imagePreviewUrl="",T.imageFile=null;const g=document.getElementById(T.imageInputId);g&&(g.value="")},addOption(){this.pollOptions.length<4&&this.pollOptions.push(this.createPollOption())},removeOption(y){if(this.pollOptions.length<=2)return;const[T]=this.pollOptions.splice(y,1);T?.imagePreviewUrl&&URL.revokeObjectURL(T.imagePreviewUrl)},togglePoll(){this.showPoll=!this.showPoll,this.showPoll&&(this.clearImage(),this.clearGif(),this.clearVideo())},async openGifPicker(){this.showGifPicker=!0,this.gifSearch="",await Promise.all([this.loadCategories(),this.loadTrendingGifs()])},async loadCategories(){try{const y=await fetch("/api/gifs/categories");this.gifCategories=(await y.json()).data||[]}catch{this.gifCategories=[]}},async loadTrendingGifs(){this.gifLoading=!0;try{const y=await fetch("/api/gifs/trending?per_page=12");this.gifs=(await y.json()).data||[]}catch{this.gifs=[]}this.gifLoading=!1},async searchGifs(){if(this.gifSearch.length<2)return this.loadTrendingGifs();this.gifLoading=!0;try{const y=await fetch(`/api/gifs/search?q=${encodeURIComponent(this.gifSearch)}&per_page=30`);this.gifs=(await y.json()).data||[]}catch{this.gifs=[]}this.gifLoading=!1},async searchByCategory(y){this.gifSearch=y,await this.searchGifs()},selectGif(y){this.selectedGif=y,this.gifUrl=y.url||"",this.showGifPicker=!1,this.clearImage(),this.clearVideo(),this.resetPoll(),document.dispatchEvent(new CustomEvent("gif-selected"))},clearGif(){this.selectedGif=null,this.gifUrl="",document.dispatchEvent(new CustomEvent("gif-selected"))},openAttachmentPicker(){this.showAttachmentPicker=!0,this.attachmentError="",this.attachmentSearch="",this.attachmentCommittedSearch="",this.attachmentResults=[],this.searchAttachments()},setAttachmentType(y){this.attachmentType!==y&&(this.attachmentType=y,this.attachmentError="",this.attachmentResults=[],this.attachmentCommittedSearch=this.attachmentSearch.trim(),this.searchAttachments())},triggerAttachmentSearch(){this.attachmentSearchTimer&&clearTimeout(this.attachmentSearchTimer),this.attachmentSearchTimer=setTimeout(()=>{this.attachmentCommittedSearch=this.attachmentSearch.trim(),this.searchAttachments()},this.attachmentSearchDebounceMs)},async prefillSharedAttachment(){const y=String(this.initialShareQuery||"").trim();if(y){this.attachmentLoading=!0,this.attachmentError="";try{const T=new URLSearchParams({type:this.initialShareType,query:y}),g=await fetch(`/api/feed/attachments/prefill?${T.toString()}`,{headers:{Accept:"application/json"}});let d=null;try{d=await g.json()}catch{d=null}if(g.ok&&d?.data?.type&&d?.data?.id){this.selectAttachment(d.data);return}}catch{}finally{this.attachmentLoading=!1}this.attachmentCommittedSearch=y,this.searchAttachments({selectFirstResult:!0})}},attachmentHintText(){return{skin:"Search by skin tags or UUID",skin_creation:"Search by title, description, tags, or creator username",server:"Search by server name, IP, country, or category",banner:"Search by banner title or creator username",cape:"Search by cape title, name, API name, or description"}[this.attachmentType]||"Search by name"},hasAttachmentQuery(){return this.attachmentCommittedSearch.length>0},showRelevantAttachmentTitle(){return!this.hasAttachmentQuery()||this.attachmentLoading},attachmentPanelStyle(){return`max-height: 360px; height: ${this.attachmentPanelHeight()}px; overflow: hidden; transition: height 180ms ease;`},attachmentPanelHeight(){return this.attachmentLoading?this.attachmentResults.length>0?this.attachmentResultsHeight():328:this.attachmentResults.length===0?328:this.attachmentResultsHeight()},attachmentResultsHeight(){const y=Math.min(this.attachmentResults.length,4),w=(this.showRelevantAttachmentTitle()?26:0)+y*72+(y-1)*8+10;return Math.min(Math.max(w,150),328)},async searchAttachments(y={}){const T=y.selectFirstResult===!0,g=this.attachmentCommittedSearch;this.attachmentAbort?.abort(),this.attachmentAbort=new AbortController,this.attachmentLoading=!0,this.attachmentError="";try{const d=new URLSearchParams({type:this.attachmentType,limit:"8"});g&&d.set("query",g);const u=await fetch(`/api/feed/attachments/search?${d.toString()}`,{headers:{Accept:"application/json"},signal:this.attachmentAbort.signal});let w=null;try{w=await u.json()}catch{w=null}if(!u.ok){this.attachmentError=w?.message||"Could not load attachments right now.",this.attachmentResults=[];return}this.attachmentResults=Array.isArray(w?.data)?w.data:[],T&&this.attachmentResults.length>0&&this.selectAttachment(this.attachmentResults[0])}catch(d){d?.name!=="AbortError"&&(this.attachmentError="Could not load attachments right now.",this.attachmentResults=[])}finally{this.attachmentLoading=!1}},selectAttachment(y,T={}){r||!y?.type||!y?.id||(T.fromLink||i?.useManualAttachment(),this.selectedAttachment=y,this.showAttachmentPicker=!1,this.attachmentSearch="",this.attachmentCommittedSearch="",this.attachmentResults=[],this.attachmentError="",this.clearGif(),this.clearVideo(),this.resetPoll(),document.dispatchEvent(new CustomEvent("attachment-selected")))},clearAttachment(){i?.dismiss(),this.selectedAttachment=null,this.attachmentError="",this.attachmentSearch="",this.attachmentCommittedSearch="",this.attachmentResults=[],document.dispatchEvent(new CustomEvent("attachment-selected"))},checkMention(y){const T=y.target,g=T.value.substring(0,T.selectionStart);if(g.match(/#(\w*)$/)){this.showMentions=!1;return}const u=g.match(/@(\w+)$/);u&&u[1].length>=1?this.searchMentions(u[1]):this.showMentions=!1},async searchMentions(y){this.mentionAbort?.abort(),this.mentionAbort=new AbortController,this.mentionLoading=!0,this.showMentions=!0;try{const T=await fetch(`/autocomplete/mention?query=${encodeURIComponent(y)}`,{signal:this.mentionAbort.signal});this.mentions=await T.json(),this.mentionIndex=0}catch(T){T.name!=="AbortError"&&(this.mentions=[])}this.mentionLoading=!1},selectMention(y){const T=this.$refs.postInput,g=T.selectionStart,d=T.value.substring(0,g).replace(/@\w*$/,"@"+y+" "),u=T.value.substring(g);T.value=d+u,T.selectionStart=T.selectionEnd=d.length,this.showMentions=!1,T.focus(),T.dispatchEvent(new Event("input",{bubbles:!0}))},handleMentionKey(y){!this.showMentions||!this.mentions.length||(y.key==="ArrowDown"?(y.preventDefault(),this.mentionIndex=Math.min(this.mentionIndex+1,this.mentions.length-1)):y.key==="ArrowUp"?(y.preventDefault(),this.mentionIndex=Math.max(this.mentionIndex-1,0)):y.key==="Enter"||y.key==="Tab"?(y.preventDefault(),this.selectMention(this.mentions[this.mentionIndex].username)):y.key==="Escape"&&(this.showMentions=!1))},checkHashtag(y){const T=y.target,g=T.value.substring(0,T.selectionStart);if(g.match(/@(\w+)$/)){this.showHashtags=!1;return}const u=g.match(/#(\S*)$/);if(u){const w=u[1]||"";this.searchHashtags(w)}else this.showHashtags=!1},async searchHashtags(y){if(!y||y.trim().length===0){this.hashtags=[],this.showHashtags=!1,this.hashtagLoading=!1;return}this.hashtagAbort?.abort(),this.hashtagAbort=new AbortController,this.hashtagLoading=!0,this.showHashtags=!0;try{const T=`/autocomplete/hashtag?query=${encodeURIComponent(y)}`,g=await fetch(T,{signal:this.hashtagAbort.signal});this.hashtags=await g.json(),this.hashtagIndex=0}catch(T){T.name!=="AbortError"&&(this.hashtags=[])}this.hashtagLoading=!1},selectHashtag(y){const T=this.$refs.postInput,g=T.selectionStart,d=T.value.substring(0,g).replace(/#\w*$/,"#"+y+" "),u=T.value.substring(g);T.value=d+u,T.selectionStart=T.selectionEnd=d.length,this.showHashtags=!1,T.focus(),T.dispatchEvent(new Event("input",{bubbles:!0}))},handleHashtagKey(y){!this.showHashtags||!this.hashtags.length||(y.key==="ArrowDown"?(y.preventDefault(),this.hashtagIndex=Math.min(this.hashtagIndex+1,this.hashtags.length-1)):y.key==="ArrowUp"?(y.preventDefault(),this.hashtagIndex=Math.max(this.hashtagIndex-1,0)):y.key==="Enter"||y.key==="Tab"?(y.preventDefault(),this.selectHashtag(this.hashtags[this.hashtagIndex].name)):y.key==="Escape"&&(this.showHashtags=!1))}}}function RA(t={}){let e=()=>{},i=()=>{},r=()=>{};
112return{restoring:!1,refreshing:!1,headerHeight:0,async init(){const n=this.$el,s=`skinmc.feed.position.v1:${t.scope}`,o=n.closest("[data-feed-scroll-root]")||window,l=()=>o===window?0:o.getBoundingClientRect().top,_=()=>parseFloat(getComputedStyle(n).scrollMarginTop)||0,b=n.parentElement?.querySelector(":scope > .feed-header"),m=()=>{this.headerHeight=b&&getComputedStyle(b).position==="sticky"?b.getBoundingClientRect().height:0};m();const y=b?new ResizeObserver(m):null;y?.observe(b),window.addEventListener("resize",m,{passive:!0}),r=()=>{n.isConnected&&o.scrollTo({top:0,behavior:"instant"})};const T=()=>{if(this.restoring||this.refreshing||!n.isConnected)return;const h=[...n.querySelectorAll("[data-feed-id]")].find(p=>p.getBoundingClientRect().bottom>l()+_());if(h)try{sessionStorage.setItem(s,JSON.stringify({id:h.dataset.feedId,offset:h.getBoundingClientRect().top-l(),pages:Math.min(20,Number(n.dataset.pages)||1),savedAt:Date.now()}))}catch{}};let g,d,u=!1;i=()=>{u=!0,this.restoring=!1,g?.disconnect(),clearTimeout(d)},document.addEventListener("livewire:navigating",T),window.addEventListener("pagehide",T),window.addEventListener("wheel",i,{passive:!0}),window.addEventListener("touchstart",i,{passive:!0}),window.addEventListener("keydown",i),e=()=>{T(),i(),document.removeEventListener("livewire:navigating",T),window.removeEventListener("pagehide",T),window.removeEventListener("wheel",i),window.removeEventListener("touchstart",i),window.removeEventListener("keydown",i),window.removeEventListener("resize",m),y?.disconnect()};let w;try{w=JSON.parse(sessionStorage.getItem(s))}catch{}if(!(!w||Date.now()-w.savedAt>864e5||!/^\d+$/.test(w.id)||!Number.isFinite(w.offset))){this.restoring=!0;try{if(await this.$wire.restorePages(Math.min(20,Math.max(1,Number(w.pages)||1))),await this.$nextTick(),u||!n.isConnected)return;const h=()=>{if(u||!n.isConnected)return;const p=n.querySelector(`[data-feed-id="${w.id}"]`);p&&o.scrollBy({top:p.getBoundingClientRect().top-l()-w.offset,behavior:"instant"})};h(),g=new ResizeObserver(h),g.observe(n),d=setTimeout(i,2e3)}catch{i()}}},async showNewPosts(){if(!this.refreshing){i(),this.refreshing=!0;try{sessionStorage.removeItem(`skinmc.feed.position.v1:${t.scope}`)}catch{}try{await this.$wire.refreshFeed(),await this.$nextTick(),r()}finally{this.refreshing=!1}}},onPostPublished(){i();try{sessionStorage.removeItem(`skinmc.feed.position.v1:${t.scope}`)}catch{}},destroy(){e()}}}function DA({images:t=[],descriptions:e=[]}={}){let i=null,r=null;return{images:t,descriptions:e,lightboxOpen:!1,activeImageIndex:0,imageAnimation:"fade",slideDirection:"next",slideAnimationKey:0,openAt(n,s=document.activeElement){this.images[n]&&(i=s,this.activeImageIndex=n,this.imageAnimation="fade",this.slideAnimationKey=0,this.lightboxOpen=!0,this.$nextTick(()=>{this.lightboxOpen&&(this.$refs.lightboxDialog.showModal(),this.$refs.closeLightbox.focus({preventScroll:!0}))}))},closeLightbox(n=!0){this.lightboxOpen=!1,r=null,this.$refs.lightboxDialog?.close(),n&&i?.isConnected&&i.focus({preventScroll:!0}),i=null},setActiveImage(n,s=null){!Number.isInteger(n)||!this.images[n]||n===this.activeImageIndex||(this.slideDirection=s||(n>this.activeImageIndex?"next":"prev"),this.activeImageIndex=n,this.imageAnimation="slide",this.slideAnimationKey++)},nextImage(){this.setActiveImage((this.activeImageIndex+1)%this.images.length,"next")},previousImage(){this.setActiveImage((this.activeImageIndex-1+this.images.length)%this.images.length,"prev")},currentImageUrl(){return this.images[this.activeImageIndex]||""},currentDescription(){return(this.descriptions[this.activeImageIndex]||"").trim()},startSwipe(n){if(r=null,!this.lightboxOpen||this.images.length<2||n.touches.length!==1||(window.visualViewport?.scale||1)>1)return;const s=n.touches[0];r={x:s.clientX,y:s.clientY,id:s.identifier}},moveSwipe(n){n.touches.length!==1&&(r=null)},cancelSwipe(){r=null},endSwipe(n){const s=r;if(r=null,!s||n.touches.length||(window.visualViewport?.scale||1)>1)return;const o=[...n.changedTouches].find(b=>b.identifier===s.id);if(!o)return;const l=o.clientX-s.x,_=o.clientY-s.y;Math.abs(l)<50||Math.abs(l)<Math.abs(_)*1.5||(l<0?this.nextImage():this.previousImage())},destroy(){this.closeLightbox(!1)}}}function NA(t={}){return{maxImageBytes:Number.isFinite(t.maxImageBytes)?Number(t.maxImageBytes):10*1024*1024,imgStorySrc:"",imgStoryOriginalSrc:"",imgStorySize:"",croppedImage:"",isImageEditorOpen:!1,isImageEditorBusy:!1,imageEditorPreviewSrc:"",imageEditorCroppr:null,imageEditorTargetEl:null,imageEditorCropData:null,imageEditorCropError:"",imageEditorAspectRatio:"story",imageEditorAspectRatioOptions:[{key:"story",label:"16:9",value:16/9}],imageEditorZoomLevel:1,imageEditorZoomMin:1,imageEditorZoomMax:4,imageEditorZoomStep:.1,imageEditorReferenceArea:null,init(){const e=document.getElementById("uploadImage");e&&e.addEventListener("hidden.bs.modal",()=>{this.reset()})},async previewImage(){this.imgStorySrc="",this.imgStoryOriginalSrc="",this.croppedImage="",this.imageEditorCropData=null;const e=this.$refs.image?.files?.[0];if(!this.isSupportedUploadImage(e)){this.notifyUploadError("Only JPEG, PNG, and WebP images are supported."),this.$refs.image&&(this.$refs.image.value="");return}try{const r=await xa(e);this.imgStoryOriginalSrc=r,this.imgStorySrc=r}catch{return}const i=e.size/1024;this.imgStorySize=e.size>this.maxImageBytes?(i/1024).toFixed(2):"",this.openImageEditor()},openImageEditor(){this.imgStorySrc&&(this.destroyImageEditorCroppr(),this.imageEditorPreviewSrc=this.imgStoryOriginalSrc||this.imgStorySrc,this.imageEditorCropError="",this.imageEditorZoomLevel=this.imageEditorZoomMin,this.imageEditorReferenceArea=null,this.imageEditorTargetEl=null,this.isImageEditorBusy=!1,this.isImageEditorOpen=!0,this.$nextTick(()=>{this.initImageEditorCroppr()}))},initImageEditorCroppr(){const e=this.imageEditorCroppr?._restore?.element||null,i=this.imageEditorTargetEl?.isConnected?this.imageEditorTargetEl:null,r=e||this.$refs.imageEditorTarget||i;if(this.destroyImageEditorCroppr(),typeof window.Croppr!="function"){this.imageEditorCropError="Image editor is unavailable right now.";return}if(!r){this.imageEditorCropError="Could not start image editor.";return}this.imageEditorTargetEl=r,this.imageEditorCroppr=new window.Croppr(r,{aspectRatio:16/9,startSize:[100,100],onInitialize:n=>{this.imageEditorCropData=n.getValue(),this.croppedImage=JSON.stringify(n.getValue()),this.imageEditorReferenceArea=this.getCropArea(n.getValue("raw")),this.imageEditorZoomLevel=this.imageEditorZoomMin},onCropEnd:n=>{this.imageEditorCropData=n,this.syncImageEditorZoomLevel()}})},setImageEditorAspectRatio(){},zoomImageEditorIn(){this.setImageEditorZoom(this.imageEditorZoomLevel+this.imageEditorZoomStep)},zoomImageEditorOut(){this.setImageEditorZoom(this.imageEditorZoomLevel-this.imageEditorZoomStep)},setImageEditorZoom(e){if(!this.imageEditorCroppr)return;const i=this.clampImageEditorZoom(e),n=this.getImageEditorCurrentZoomLevel()/i;if(!wu(this.imageEditorCroppr,n,{minSize:24})){this.imageEditorCropError="Could not adjust zoom. Please try again.";return}this.imageEditorCropError="",this.syncImageEditorZoomLevel()},syncImageEditorZoomLevel(){this.imageEditorZoomLevel=this.getImageEditorCurrentZoomLevel()},getImageEditorCurrentZoomLevel(){const e=this.imageEditorCroppr?.getValue?.("raw"),i=this.getCropArea(e);if(!i)return this.imageEditorZoomMin;const r=Math.max(1,Number.isFinite(this.imageEditorReferenceArea)?this.imageEditorReferenceArea:i),n=Math.sqrt(r/i);return this.clampImageEditorZoom(n)},clampImageEditorZoom(e){const i=Number(e);return Number.isFinite(i)?Math.min(this.imageEditorZoomMax,Math.max(this.imageEditorZoomMin,i)):this.imageEditorZoomMin},getCropArea(e){if(!e||typeof e!="object")return null;const i=Number(e.width),r=Number(e.height);return!Number.isFinite(i)||!Number.isFinite(r)||i<=0||r<=0?null:i*r},async applyImageEditor(){if(!this.imageEditorCropData){this.closeImageEditor();return}this.isImageEditorBusy=!0,this.imageEditorCropError="";try{this.croppedImage=JSON.stringify(this.imageEditorCropData);const e=this.$refs.image?.files?.[0];if(this.isSupportedUploadImage(e)){const i=await Oa(e,this.imageEditorCropData,{outputType:e.type||"image/jpeg"});this.imgStorySrc=await xa(i)}this.closeImageEditor()}catch{this.imageEditorCropError="Could not apply crop. Please try again.",this.isImageEditorBusy=!1}},closeImageEditor(){this.destroyImageEditorCroppr(),this.isImageEditorOpen=!1,this.isImageEditorBusy=!1,this.imageEditorPreviewSrc="",this.imageEditorTargetEl=null,this.imageEditorCropError="",this.imageEditorCropData=null,this.imageEditorZoomLevel=this.imageEditorZoomMin,this.imageEditorReferenceArea=null},destroyImageEditorCroppr(){this.imageEditorCroppr&&(this.imageEditorCroppr.destroy(),this.imageEditorCroppr=null)},reset(){this.closeImageEditor(),this.imgStorySrc="",this.imgStoryOriginalSrc="",this.imgStorySize="",this.croppedImage="",this.imageEditorCropData=null,this.$refs.image&&(this.$refs.image.value="")},isSupportedUploadImage(e){if(!(e instanceof File))return!1;const i=String(e.type||"").toLowerCase().trim();if(i!=="")return["image/jpeg","image/png","image/webp"].includes(i);const r=String(e.name||"").split(".").pop()?.toLowerCase();return["jpg","jpeg","png","webp"].includes(r||"")},notifyUploadError(e){window.dispatchEvent(new CustomEvent("toast",{detail:{message:e}}))}}}const $A=/^[\da-f]{8}-(?:[\da-f]{4}-){3}[\da-f]{12}$/i;function _u(t){return t?.is_group===!0?typeof t.chat_uuid=="string"&&$A.test(t.chat_uuid)?{chat_uuid:t.chat_uuid.toLowerCase()}:null:t?.chat_uuid||t?.is_group?null:Number.isSafeInteger(t?.id)&&t.id>0?{receiver_id:t.id}:null}function Ys(t){const e=_u(t);return e?e.chat_uuid?`group:${e.chat_uuid}`:`person:${e.receiver_id}`:null}function FA(){return globalThis.crypto?.randomUUID?globalThis.crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const e=Math.floor(Math.random()*16);return(t==="x"?e:e&3|8).toString(16)})}function jA(t={},e={}){const i=e.window||globalThis.window,r=e.document||globalThis.document,n=e.fetch||globalThis.fetch,s=e.uuid||FA,o=new Set,l=[];let _=0,b=null,m=null,y=null,T=null,g=!1,d=null;const u=new Map,w=p=>{const c=setTimeout(()=>p.abort(),15e3);return o.add(c),()=>{clearTimeout(c),o.delete(c)}},h=()=>{b?.abort(),m?.abort(),b=null,m=null};return{chatEnabled:!!(t.chatRecipientsUrl&&t.chatSendUrl),chatRecipients:[],chatLoading:!1,chatError:"",chatSendingId:null,chatSentIds:[],chatStatus:"",chatUrl:null,chatFailedRecipient:null,chatRecipientKey:Ys,initChatSharing(){const p=(c,f,v)=>{c?.addEventListener?.(f,v),l.push(()=>c?.removeEventListener?.(f,v))};p(i,"messages:recipient-picked",c=>{if(!(!y||c.detail?.requestId!==y||g)&&(y=null,this.modalInstance()?.show(),c.detail.person)){const f=c.detail.person;this.chatRecipients.some(v=>Ys(v)===Ys(f))||this.chatRecipients.unshift(f),this.sendToChat(f)}}),p(this.$refs?.modal||this.$el?.querySelector?.("#global-share-dialog"),"hidden.bs.modal",()=>{h(),this.chatLoading=!1,this.chatSendingId=null}),p(r,"livewire:navigating",()=>{_++,y=null,T?.(),h()})},destroyChatSharing(){g=!0,_++,y=null,T?.(),h(),l.splice(0).forEac
112h(p=>p()),o.forEach(p=>clearTimeout(p)),o.clear(),u.clear()},prepareChatShare(p){_++,y=null,T?.(),h(),d={url:this.shareUrl},p.shareType&&p.shareQuery!==null&&p.shareQuery!==void 0&&p.shareQuery!==""&&(d.type=String(p.shareType),d.query=String(p.shareQuery)),this.chatRecipients=[],this.chatLoading=!1,this.chatError="",this.chatSendingId=null,this.chatSentIds=[],this.chatStatus="",this.chatUrl=null,this.chatFailedRecipient=null},async loadChatRecipients(){if(!this.chatEnabled||g)return;b?.abort();const p=new AbortController,c=_,f=w(p);b=p,this.chatLoading=!0,this.chatError="";try{const v=await n(t.chatRecipientsUrl,{credentials:"same-origin",cache:"no-store",headers:{Accept:"application/json"},signal:p.signal});if(!v.ok)throw new Error("Recipients unavailable");const E=await v.json();if(g||c!==_||p.signal.aborted)return;this.chatRecipients=Array.isArray(E.data)?E.data.slice(0,12):[]}catch{!g&&c===_&&b===p&&(this.chatError=t.chatLoadError)}finally{f(),b===p&&(b=null,this.chatLoading=!1)}},pickChatRecipient(){if(!this.chatEnabled||this.chatSendingId!==null||g)return;const p=this.$refs?.modal,c=this.modalInstance();if(!p||!c)return;y=s();const f=y,v=()=>{T=null,!(g||y!==f)&&i.dispatchEvent(new CustomEvent("messages:pick-recipient",{detail:{requestId:f,title:t.chatPickerTitle}}))};T?.(),p.addEventListener("hidden.bs.modal",v,{once:!0}),T=()=>p.removeEventListener("hidden.bs.modal",v),c.hide()},async sendToChat(p){const c=_u(p),f=Ys(p);if(!this.chatEnabled||g||!d||this.chatSendingId!==null||!c||this.chatSentIds.includes(f))return!1;const v=_,E=new AbortController,C=w(E),O=JSON.stringify({...c,...d});u.has(O)||(u.size>=32&&u.delete(u.keys().next().value),u.set(O,{...c,id:s(),...d}));const A=u.get(O);m=E,this.chatSendingId=f,this.chatError="",this.chatStatus="",this.chatFailedRecipient=null;const I=this.$refs?.modal;I?.contains?.(r.activeElement)&&I.focus({preventScroll:!0});try{const N=await n(t.chatSendUrl,{method:"POST",credentials:"same-origin",signal:E.signal,headers:{Accept:"application/json","Content-Type":"application/json",...io({document:r,window:i,form:this.$refs?.modal})},body:JSON.stringify(A)}),D=await N.json();if(g||v!==_||m!==E||E.signal.aborted)return!1;if(!N.ok||D.status!=="sent")return this.chatError=D.error||D.message||Object.values(D.errors||{}).flat().find(Q=>typeof Q=="string")||t.chatSendError,this.chatFailedRecipient=p,!1;this.chatSentIds.push(f),u.delete(O),this.chatStatus=t.chatSentMessage;const U=D.url?new URL(D.url,i.location.href):null;return this.chatUrl=U?.origin===i.location.origin&&U.pathname.startsWith("/messages/")?U.href:null,i.dispatchEvent(new CustomEvent("messages:sent",{detail:{clientId:D.clientId||A.id,messageId:D.messageId??null}})),!0}catch{return!g&&v===_&&m===E&&(this.chatError=t.chatSendError,this.chatFailedRecipient=p),!1}finally{C(),m===E&&(m=null,this.chatSendingId=null)}}}}function UA(t={}){let e=!1,i=0;return{...jA(t),shareUrl:t.shareUrl||window.location.href,shareTitle:t.shareTitle||document.title,shareText:t.shareText||document.title,feedShareUrl:t.feedShareUrl||null,showFeedOption:!!(t.showFeedOption&&t.feedShareUrl),copiedMessage:t.copiedMessage||"Link copied",copyFailedMessage:t.copyFailedMessage||"Could not copy the link. Please try again.",nativeFailedMessage:t.nativeFailedMessage||"Could not open share menu.",nativeUnsupportedMessage:t.nativeUnsupportedMessage||"Native share is not available on this device.",nativeSupported:!1,init(){this.nativeSupported=typeof navigator<"u"&&typeof navigator.share=="function",this.initChatSharing()},destroy(){e=!0,i++,this.destroyChatSharing(),window.bootstrap?.Modal?.getInstance(this.$refs?.modal)?.dispose()},open(r={}){if(e)return;i++,this.feedShareUrl=null,this.showFeedOption=!1,this.shareUrl=r.shareUrl||window.location.href,this.shareTitle=r.shareTitle||document.title,this.shareText=r.shareText||this.shareTitle,this.feedShareUrl=r.feedShareUrl||null,this.showFeedOption=(r.showFeedOption===!0||r.showFeedOption===1||r.showFeedOption==="1")&&!!this.feedShareUrl,this.prepareChatShare(r);const n=this.modalInstance();n&&(n.show(),this.loadChatRecipients())},close(){const r=this.modalInstance();r&&r.hide()},async copyLink(){if(e)return;const r=i;try{if(navigator?.clipboard?.writeText)await navigator.clipboard.writeText(this.shareUrl);else{const n=document.createElement("input");n.value=this.shareUrl;try{if(document.body.appendChild(n),n.select(),!document.execCommand("copy"))throw new Error("Copy failed")}finally{n.remove()}}!e&&r===i&&this.notify(this.copiedMessage)}catch{!e&&r===i&&this.notify(this.copyFailedMessage)}},async nativeShare(){if(e)return;const r=i;if(!this.nativeSupported){this.notify(this.nativeUnsupportedMessage);return}try{await navigator.share({title:this.shareTitle,text:this.shareText,url:this.shareUrl})}
112catch(n){!e&&r===i&&n?.name!=="AbortError"&&this.notify(this.nativeFailedMessage)}},socialUrl(r){const n=encodeURIComponent(this.shareUrl||""),s=encodeURIComponent(this.shareText||"");switch(r){case"bluesky":return`https://bsky.app/intent/compose?text=${s}%20${n}`;case"pinterest":return`https://www.pinterest.com/pin/create/link/?url=${n}&description=${s}`;case"x":return`https://twitter.com/intent/tweet?text=${s}&url=${n}`;case"facebook":return`https://www.facebook.com/sharer/sharer.php?u=${n}`;case"reddit":return`https://www.reddit.com/submit?url=${n}&title=${s}`;case"whatsapp":return`https://wa.me/?text=${s}%20${n}`;case"telegram":return`https://t.me/share/url?url=${n}&text=${s}`;case"email":return`mailto:?subject=${s}&body=${encodeURIComponent(`${this.shareText||""}
113${this.shareUrl||""}`)}`;default:return this.shareUrl||window.location.href}},modalInstance(){const r=this.$refs?.modal||document.getElementById("global-share-dialog");return!r||!window.bootstrap?.Modal?null:window.bootstrap.Modal.getOrCreateInstance(r)},notify(r){if(!e){if(typeof this.$tooltip=="function"){this.$tooltip(r);return}console.info(r)}}}}const BA=Object.freeze({stickersLoadError:"Could not load stickers. Please try again.",emojisLoadError:"Could not load emojis. Please try again.",gifCategoriesLoadError:"Could not load categories. Please try again.",mediaLoadError:"Could not load results. Please try again.",messageSendError:"Message could not be sent.",stickerLabel:"Sticker",gifLabel:"GIF"});function Wa(t={}){return Object.fromEntries(Object.entries(BA).map(([e,i])=>[e,typeof t?.[e]=="string"&&t[e].trim()?t[e]:i]))}const qA=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,Uf=t=>JSON.parse(JSON.stringify(t)),VA=["skin","skin_creation","server","banner","cape"];function HA(t){if(!t||typeof t!="object")return;const e={};for(const i of["title","subtitle"])typeof t[i]=="string"&&(e[i]=t[i].slice(0,256));for(const i of["url","preview"])typeof t[i]=="string"&&/^(https?:\/\/|\/(?!\/))/.test(t[i])&&(e[i]=t[i].slice(0,2048));return Object.freeze(e)}function Bf(t,e){if(!t||!qA.test(t.id)||!["text","sticker","gif","attachment"].includes(t.type)||t.type==="text"&&typeof t.text!="string"||["sticker","gif"].includes(t.type)&&typeof t.url!="string"||t.type==="attachment"&&(!VA.includes(t.attachmentType)||!Number.isSafeInteger(t.attachmentId)||t.attachmentId<=0))return null;const i={id:t.id,type:t.type};return t.type==="text"&&(i.text=t.text),["sticker","gif"].includes(t.type)&&Object.assign(i,{url:t.url,preview:t.preview||t.url,title:t.title||(t.type==="gif"?e.gifLabel:e.stickerLabel)}),t.type==="attachment"&&Object.assign(i,{attachmentType:t.attachmentType,attachmentId:t.attachmentId}),t.type==="attachment"&&t.mediaPreview&&(i.mediaPreview=HA(t.mediaPreview)),i.replyId=Number.isSafeInteger(t.replyId)&&t.replyId>0?t.replyId:null,i.replyId&&t.replyPreview&&(i.replyPreview=Object.freeze({author:String(t.replyPreview.author||""),text:String(t.replyPreview.text||"")})),Object.freeze(i)}function zA({key:t,storage:e=null,send:i,onChange:r=()=>{},onSent:n=()=>{},isOnline:s=()=>!0,listen:o=()=>()=>{},now:l=Date.now,setTimer:_=setTimeout,clearTimer:b=clearTimeout,withLock:m=async g=>g(),sendTimeoutMs:y=25e3,translations:T={}}={}){const g=Wa(T),d=`${t}:item:`;let u=new Map;const w=new Set,h=new Set;let p=!!e&&!!t,c=!1,f=!1,v=!1,E=null,C=null,O=null,A=null,I=[];const N=()=>[...u.values()].sort((Ee,oe)=>Ee.enqueuedAt-oe.enqueuedAt||Ee.payload.id.localeCompare(oe.payload.id)),D=()=>{f||r(Uf(N()),{isSending:E!==null,durable:p})};function U(Ee){try{if(!e||!t)throw new Error("Storage unavailable");e.setItem(d+Ee.payload.id,JSON.stringify(Ee)),w.delete(Ee.payload.id),p=w.size===0&&h.size===0}catch{w.add(Ee.payload.id),p=!1}}function Q(){try{if(!e||!t)throw new Error("Storage unavailable");for(const Ce of h)try{e.removeItem(d+Ce),h.delete(Ce)}catch{}const Ee=new Map,oe=[];for(let Ce=0;Ce<e.length;Ce++){const ke=e.key(Ce);if(!ke?.startsWith(d)||h.has(ke.slice(d.length)))continue;let ae;try{ae=JSON.parse(e.getItem(ke))}catch{oe.push(ke);continue}const K=Bf(ae?.payload,g);if(!K||ke!==d+K.id){oe.push(ke);continue}Ee.set(K.id,{payload:K,status:["failed","retrying","sending"].includes(ae.status)?ae.status:"queued",error:typeof ae.error=="string"?ae.error:null,retryAt:Number.isFinite(ae.retryAt)?ae.retryAt:0,enqueuedAt:Number.isFinite(ae.enqueuedAt)?ae.enqueuedAt:l(),attempts:Number.isSafeInteger(ae.attempts)?Math.max(0,ae.attempts):0})}let _e=!1;for(const Ce of oe)try{e.removeItem(Ce)}catch{_e=!0}for(const Ce of w)u.has(Ce)&&Ee.set(Ce,u.get(Ce));u=Ee,p=w.size===0&&h.size===0&&!_e}catch{p=!1}}function he(Ee){try{e&&t&&e.removeItem(d+Ee)}catch{h.add(Ee),p=!1}u.delete(Ee),w.delete(Ee)}function se(){O!==null&&b(O),O=null}function fe(Ee=0){if(!c||f||v||!s())return;se();const oe=N().find(_e=>_e.status!=="failed");oe&&(O=_(()=>{O=null,pe()},Math.max(Ee,oe.retryAt-l(),0)))}async function pe(){if(!c||f||v||!s())return;v=!0;let Ee=!1;
113try{await m(async()=>{if(Ee=!0,f||!s())return;Q();const oe=N().find(Le=>Le.status!=="failed");if(!oe||oe.retryAt>l())return;E=oe.payload.id,C=new AbortController,oe.status="sending",oe.error=null,oe.attempts++,U(oe),D();let _e,Ce;const ke=new Promise((Le,tt)=>{Ce=tt}),ae=()=>Ce(new DOMException("Send interrupted","AbortError")),K=C;K.signal.addEventListener("abort",ae,{once:!0}),A=_(()=>K.abort(),y);try{_e=await Promise.race([i(Uf(oe.payload),K.signal),ke])}catch{_e={status:"retry"}}finally{A!==null&&b(A),A=null,K.signal.removeEventListener("abort",ae)}if(f)return;Q();const ve=u.get(oe.payload.id);if(ve){if(_e?.status==="sent"&&_e.clientId===oe.payload.id)he(oe.payload.id),n(_e);else if(_e?.status==="failed")ve.status="failed",ve.error=typeof _e.message=="string"?_e.message:g.messageSendError,ve.retryAt=0,U(ve);else if(ve.status!=="failed"){ve.status="retrying",ve.error=null;const Le=Number(_e?.retryAfter),tt=Number.isFinite(Le)&&Le>0?Math.min(Le*1e3,36e5):Math.min(3e4,1e3*2**Math.min(ve.attempts-1,5));ve.retryAt=l()+tt,U(ve)}}})}catch{}finally{v=!1,E=null,C=null,f||(D(),fe(Ee?0:1e3))}}function st(){f||(Q(),D(),fe())}return{start(){if(!(c||f)){c=!0,Q();for(const Ee of u.values())Ee.status==="sending"&&(Ee.status="queued");I=[o("online",st),o("offline",()=>{se(),C?.abort(),D()}),o("storage",Ee=>
113{Ee.key!==null&&!Ee.key?.startsWith(d)||(Q(),D(),fe())})],D(),fe()}},enqueue(Ee){if(f)return!1;const oe=Bf(Ee,g);if(!oe)return!1;if(Q(),u.has(oe.id)||h.has(oe.id))return!0;const _e=Math.max(l(),...N().map(ke=>ke.enqueuedAt+1)),Ce={payload:oe,status:"queued",error:null,retryAt:0,enqueuedAt:_e,attempts:0};return u.set(oe.id,Ce),U(Ce),D(),fe(),!0},failPending(Ee){if(!f){se(),Q();for(const oe of u.values())oe.status!=="failed"&&(oe.status="failed",oe.error=Ee||g.messageSendError,oe.retryAt=0,U(oe));C?.abort(),D()}},retry(Ee){if(f||Ee===E)return;Q();const oe=u.get(Ee);oe&&(oe.status="queued",oe.error=null,oe.retryAt=0,U(oe),D(),fe())},discard(Ee){return f||Ee===E||!u.has(Ee)?!1:(he(Ee),D(),fe(),!0)},acknowledge(Ee){if(f)return;let oe=!1;for(const _e of Ee)u.has(_e)&&(he(_e),oe=!0,_e===E&&(C?.abort(),n({status:"sent",clientId:_e})));oe&&(D(),fe())},destroy(){if(!f&&(f=!0,se(),C?.abort(),A!==null&&b(A),A=null,I.forEach(Ee=>Ee?.()),I=[],E&&u.has(E))){const Ee=u.get(E);Ee.status="queued",Ee.retryAt=0,U(Ee)}}}}function WA(t,e,i){return Lg(t,()=>KA(t,e,i),i)}async function KA(t,e,i){if(i?.aborted)throw new DOMException("Conversation closed","AbortError");let r=null,n;const s=new Promise((l,_)=>{n=_}),o=()=>n(new DOMException("Conversation closed","AbortError"));i?.addEventListener("abort",o,{once:!0});try{return r=t.$hook?.("commit",({commit:l,fail:_})=>{l.calls?.some(b=>b.method==="sendQueuedMessage"&&b.params?.[0]?.id===e.id)&&_(()=>n(new Error("Message transport failed")))}),await Promise.race([t.sendQueuedMessage(e),s])}finally{r?.(),i?.removeEventListener("abort",o)}}const Kl=["skin","skin_creation","server","banner","cape"],zs=t=>typeof t=="string"&&t.length<=2048&&/^(https?:\/\/|\/(?!\/))/.test(t)?t:"";function GA(t={}){const e=Wa(t.translations),i=t.mediaOptions||{},r=i.fetch||((...E)=>fetch(...E)),n=i.setTimer||setTimeout,s=i.clearTimer||clearTimeout;let o=!1,l=0,_=0,b=null,m=null,y=null,T=null,g=null,d=null,u=null,w=null,h=!1;const p=new Map,c=new Map;function f(){l++,b?.abort(),b=null,s(y),s(T),y=T=null,d=u=null}function v(){_++,m?.abort(),m=null,s(g),g=null,w=null}return{mediaPickerOpen:!1,mediaPickerMode:"attachments",mediaQuery:"",mediaResults:[],mediaLoading:!1,mediaError:"",attachmentType:"all",gifCategories:[],gifCategoriesLoading:!1,gifCategoriesError:"",gifCategoryQuery:"",destroyMedia(){o=!0,this.pauseMedia(),p.clear(),c.clear()},pauseMedia(){f(),v(),this.mediaPickerOpen=!1,this.mediaLoading=this.gifCategoriesLoading=!1},closeMediaPicker(){this.pauseMedia()},openMediaPicker(E="attachments",C=null){return this.openComposerMenu?this.openComposerMenu(E,C):this.activateMediaPanel(E)},activateMediaPanel(E){if(!(o||!["attachments","gifs"].includes(E))){if(E!==this.mediaPickerMode){c.set(this.mediaPickerMode,{query:this.mediaQuery,results:this.mediaResults,error:this.mediaError});const C=c.get(E);this.mediaQuery=C?.query||"",this.mediaResults=C?.results||[],this.mediaError=C?.error||""}this.mediaPickerMode=E,this.mediaPickerOpen=!0,this.showGifCategories()?this.fetchGifCategories():this.fetchMediaResults()}},showGifCategories(){return this.mediaPickerMode==="gifs"&&!String(this.mediaQuery||"").trim()},async fetchGifCategories(E=!1){if(o||!this.mediaPickerOpen)return;if(E&&(h=!1),h){this.gifCategoriesLoading=!1;return}if(w)return w;v();const C=_,O=new AbortController;return m=O,this.gifCategoriesLoading=!0,this.gifCategoriesError="",g=n(()=>O.abort(),5e3),w=(async()=>{try{const A=await r("/api/gifs/categories",{headers:{Accept:"application/json"},signal:O.signal}),I=await A.json();if(o||C!==_||O.signal.aborted)return;if(!A.ok)throw new Error("Categories unavailable");this.gifCategories=(Array.isArray(I?.data)?I.data:[]).filter(N=>N&&typeof N.name=="string"&&typeof N.query=="string"&&zs(N.preview)).slice(0,30),h=!0}catch{!o&&C===_&&(this.gifCategoriesError=e.gifCategoriesLoadError)}finally{C===_&&(s(g),g=null,m=null,w=null,o||(this.gifCategoriesLoading=!1))}})(),w},selectGifCategory(E){!E?.query||o||(this.captureComposerPanel?.(),this.gifCategoryQuery=String(E.query).slice(0,100),this.mediaQuery=this.gifCategoryQuery,this.mediaResults=[],v(),this.fetchMediaResults(),this.restoreComposerPanel?.({direction:"forward",focus:!0}))},backToGifCategories(){this.captureComposerPanel?.(),f(),this.mediaQuery="",this.gifCategoryQuery="",this.mediaLoading=!1,this.mediaError="",this.fetchGifCategories(),this.restoreComposerPanel?.({direction:"back",focus:!0})},setMediaAttachmentType(E){!["all",...Kl].includes(E)||E===this.attachmentType||(this.attachmentType=E,this.mediaResults=[],this.fetchMediaResults())},searchMedia(){if(f(),v(),this.mediaResults=[],this.mediaError="",this.gifCategoryQuery="",this.showGifCategories()){this.mediaLoading=!1,this.fetchGifCategories();return}this.mediaLoading=!0,y=n(()=>{y=null,this.fetchMediaResults()},250)},async fetchMediaResults(){if(o||!this.mediaPickerOpen)return;if(this.showGifCategories())return this.fetchGifCategories();const E=this.mediaPickerMode,C=String(this.mediaQuery||"").trim().slice(0,E==="gifs"?100:120),O=`${E}:${this.attachmentType}:${C.toLowerCase()}`;if(d===O&&u)return u;
113if(f(),this.mediaError="",p.has(O)){this.mediaResults=p.get(O),this.mediaLoading=!1;return}const A=l,I=new AbortController;b=I,d=O,this.mediaLoading=!0;const N=E==="gifs"?new URLSearchParams({per_page:"24",q:C}):new URLSearchParams({type:this.attachmentType,limit:"12",...C?{query:C}:{}}),D=E==="gifs"?"/api/gifs/search":t.attachmentSearchUrl||"/messages/attachments";return T=n(()=>I.abort(),5e3),u=(async()=>{try{const U=await r(`${D}?${N}`,{headers:{Accept:"application/json"},credentials:"same-origin",signal:I.signal}),Q=await U.json();if(o||A!==l||I.signal.aborted)return;if(!U.ok)throw new Error("Results unavailable");const he=(Array.isArray(Q?.data)?Q.data:[]).filter(se=>se&&(E==="gifs"?zs(se.url):Kl.includes(se.type)&&Number.isSafeInteger(Number(se.id))&&Number(se.id)>0)).slice(0,E==="gifs"?24:12);p.set(O,he),p.size>20&&p.delete(p.keys().next().value),this.mediaResults=he}catch{if(o||A!==l)return;this.mediaResults=[],this.mediaError=e.mediaLoadError}finally{A===l&&(s(T),T=null,b=null,d=u=null,o||(this.mediaLoading=!1))}})(),u},selectMediaResult(E){if(o)return!1;if(this.mediaPickerMode==="gifs")return zs(E?.url)?this.enqueueMedia({type:"gif",url:E.url,preview:zs(E.preview)||E.url,title:String(E.title||e.gifLabel).slice(0,255)}):!1;const C=Number(E?.id);return!Kl.includes(E?.type)||!Number.isSafeInteger(C)||C<=0?!1:this.enqueueMedia({type:"attachment",attachmentType:E.type,attachmentId:C,mediaPreview:{title:E.title,subtitle:E.subtitle,preview:zs(E.preview)}})}}}const Tm={ar:()=>Ht(()=>import("./ar-BNKVqaLE.js"),[]),be:()=>Ht(()=>import("./be-BrmtRz9y.js"),[]),cs:()=>Ht(()=>import("./cs-Cx1pcg6_.js"),[]),de:()=>Ht(()=>import("./de-CqNKyZ8q.js"),[]),en:()=>Ht(()=>import("./en-B8YES1q-.js"),[]),es:()=>Ht(()=>import("./es-N24QZuob.js"),[]),fa:()=>Ht(()=>import("./fa-DIMlnmBE.js"),[]),fi:()=>Ht(()=>import("./fi-DnLbsY2x.js"),[]),fr:()=>Ht(()=>import("./fr-DZT8BvMf.js"),[]),hi:()=>Ht(()=>import("./hi-BgckaBoa.js"),[]),it:()=>Ht(()=>import("./it-Bi5f5P7y.js"),[]),ja:()=>Ht(()=>import("./ja-Bdpvq46_.js"),[]),ko:()=>Ht(()=>import("./ko--JacpoLV.js"),[]),nl:()=>Ht(()=>import("./nl-Bz72Z8bp.js"),[]),pl:()=>Ht(()=>import("./pl-Ck12sG4e.js"),[]),pt:()=>Ht(()=>import("./pt-dU1baCKj.js"),[]),ru:()=>Ht(()=>import("./ru-C5C18JJ1.js"),[]),sa:()=>Ht(()=>import("./sa-ClHn0Q1Y.js"),[]),tr:()=>Ht(()=>import("./tr-DK5b6YPT.js"),[]),uk:()=>Ht(()=>import("./uk-0IVUIUr8.js"),[]),vi:()=>Ht(()=>import("./vi-B3neGKlw.js"),[]),zh:()=>Ht(()=>import("./zh-B_NXpyvP.js"),[])};function YA(t){const e=String(t||"en").toLowerCase().split(/[-_]/)[0];return Object.prototype.hasOwnProperty.call(Tm,e)?e:"en"}async function Cm(t){const e=YA(t),i=await Tm[e]();return{locale:e,i18n:i.default||i}}const XA=["home","emoji","stickers","gifs","attachments"],JA={home:254,emoji:464,stickers:434,gifs:516,attachments:378};function QA(t,e,i,r){const n=Math.max(1,Math.min(t==="home"?246:338,i.width-16)),s=Math.min(e.top-12,i.top+i.height-8),o=Math.max(1,Math.min(JA[t]||378,s-i.top-8));return{position:"fixed",left:`${Math.round(Math.max(i.left+8,Math.min(e.left-8,i.left+i.width-n-8)))}px`,bottom:`${Math.round(r-Math.max(i.top+8+o,s))}px`,width:`${Math.round(n)}px`,height:`${Math.round(o)}px`,"--chat-menu-height":`${Math.round(o)}px`}}function ZA(t={}){const e=Wa(t.translations),i=t.menuOptions||{},r=i.window||globalThis.window,n=i.document||globalThis.document,s=i.requestFrame||(f=>r?.requestAnimationFrame?r.requestAnimationFrame(f):setTimeout(f,0)),o=i.cancelFrame||(f=>r?.cancelAnimationFrame?r.cancelAnimationFrame(f):clearTimeout(f)),l=i.loadEmoji||(()=>Promise.all([Ht(()=>import("./vendor-emoji-Dzaypqj9.js").then(f=>f.m),[]),Ht(()=>import("./vendor-emoji-Dzaypqj9.js").then(f=>f.n),[])])),_=i.loadEmojiLocale||Cm,b=new Map;let m=!1,y=!1,T=null,g=null,d=null,u=null;const w=[],h=()=>(r?.innerWidth??1024)<576,p=()=>n?.documentElement?.dataset?.bsTheme==="dark"?"dark":"light",c=f=>!!f&&!f.disabled&&!f.closest?.("[inert]")&&(typeof f.getClientRects!="function"||f.getClientRects().length>0);return{menuOpen:!1,menuPanel:"home",menuDirection:"forward",menuStyle:{}
113,emojiLoading:!1,emojiError:"",initComposerMenu(){if(y||m)return;y=!0;const f=(E,C,O)=>{E?.addEventListener?.(C,O,{passive:!0}),w.push(()=>E?.removeEventListener?.(C,O))},v=()=>{!this.menuOpen||g!==null||(g=s(()=>{g=null,m||this.positionComposerMenu()}))};f(r,"resize",v),f(r,"scroll",v),f(r?.visualViewport,"resize",v),f(r?.visualViewport,"scroll",v),f(n,"livewire:navigating",()=>this.closeComposerMenu()),f(r,"messages:workspace-changed",()=>this.closeComposerMenu())},destroyComposerMenu(){this.closeComposerMenu(),m=!0,w.splice(0).forEach(f=>f()),g!==null&&o(g),g=null,d?.remove(),d=null,b.clear()},toggleComposerMenu(f){const v=h()||this.$el?.closest?.('[data-chat-mode="dock"]');this.openComposerMenu(v?"home":"attachments",f)},openComposerMenu(f="home",v=null){if(!(m||!XA.includes(f))){if(v&&this.menuOpen&&this.menuPanel===f)return this.closeComposerMenu();this.initComposerMenu(),(!this.menuOpen||v&&!this.$refs?.composerMenu?.contains?.(v))&&(T=v||this.$refs?.composerMenuAnchor),this.captureComposerPanel(),this.pauseComposerPanel(),this.menuOpen=!0,this.menuPanel=f,this.menuDirection="forward",f==="stickers"&&this.activateStickerPanel(),(f==="gifs"||f==="attachments")&&this.activateMediaPanel(f),this.positionComposerMenu(),this.restoreComposerPanel({focus:!0}),f==="emoji"&&this.$nextTick(()=>{!m&&this.menuOpen&&this.menuPanel==="emoji"&&this.ensureComposerEmoji()})}},pauseComposerPanel(){this.pauseStickerPicker?.(),this.pauseMedia?.()},closeComposerMenu({restoreFocus:f=!1}={}){this.captureComposerPanel(),this.menuOpen=!1,this.pauseComposerPanel(),g!==null&&o(g),g=null,f&&T?.isConnected!==!1&&T?.focus?.({preventScroll:!0})},backComposerMenu(){if(this.menuPanel==="gifs"&&!this.showGifCategories())return this.backToGifCategories();const f=this.menuPanel;this.captureComposerPanel(),this.pauseComposerPanel(),this.menuPanel="home",this.menuDirection="back",this.positionComposerMenu(),this.$nextTick(()=>{if(!this.menuOpen||m)return;this.$refs?.composerMenu?.querySelector?.(`[data-composer-open="${f}"]`)?.focus?.({preventScroll:!0})})},composerPanelKey(){return this.menuPanel==="gifs"?`gifs:${this.showGifCategories()?"categories":"results"}`:this.menuPanel},captureComposerPanel(){if(!this.menuOpen)return;const f=this.$refs?.composerMenu?.querySelector?.(`[data-composer-panel="${this.menuPanel}"]`),v=f?.querySelector?.("[data-composer-scroll]"),E=n?.activeElement;let C=null;E&&f?.contains?.(E)&&E.hasAttribute?.("data-gif-category")&&(C={category:E.getAttribute("data-gif-category")}),b.set(this.composerPanelKey(),{scroll:v?.scrollTop||0,focus:C})},restoreComposerPanel({direction:f="forward",focus:v=!1}={}){this.menuDirection=f,this.$nextTick(()=>{if(m||!this.menuOpen)return;const E=this.$refs?.composerMenu?.querySelector?.(`[data-composer-panel="${this.menuPanel}"]`),C=b.get(this.composerPanelKey()),O=E?.querySelector?.("[data-composer-scroll]");if(O&&(O.scrollTop=C?.scroll||0),!v)return;([...E?.querySelectorAll?.("[data-gif-category]")||[]].find(D=>D.getAttribute("data-gif-category")===C?.focus?.category)||E?.querySelector?.("[data-composer-back]")||E?.querySelector?.("button"))?.focus?.({preventScroll:!0})})},positionComposerMenu(){const f=this.$refs?.composerMenuAnchor||T;if(!this.menuOpen||!f?.getBoundingClientRect||!r)return;const v=r.visualViewport;this.menuStyle=QA(this.menuPanel,f.getBoundingClientRect(),{left:v?.offsetLeft||0,top:v?.offsetTop||0,width:v?.width||r.innerWidth,height:v?.height||r.innerHeight},r.innerHeight)},retryComposerPanel(f){return m||!this.menuOpen||typeof f!="function"?!1:(this.$refs?.composerMenu?.querySelector?.(`[data-composer-panel="${this.menuPanel}"]`)?.querySelector?.("[data-composer-back]")?.focus?.({preventScroll:!0}),f())},composerMenuKeydown(f){if(!this.menuOpen)return;if(f.key==="Escape"){f.preventDefault(),f.stopPropagation(),this.closeComposerMenu({restoreFocus:!0});return}const v=this.$refs?.composerMenu;if(this.menuPanel==="home"&&["ArrowDown","ArrowUp","Home","End"].includes(f.key)){const E=[...v?.querySelectorAll?.("[data-composer-open]")||[]].filter(c);if(!E.length)return;f.preventDefault();const C=E.indexOf(n?.activeElement),O=f.key==="Home"?0:f.key==="End"?E.length-1:(C+(f.key==="ArrowDown"?1:-1)+E.length)%E.length;E[O]?.focus()}if(f.key==="Tab"){const E=[],C=I=>{for(const N of I?.querySelectorAll?.("button, input, select, a[href], [tabindex]")||[])c(N)&&N.tabIndex!==-1&&E.push(N);for(const N of I?.querySelectorAll?.("*")||[])N.shadowRoot&&C(N.shadowRoot)};C(v);let O=n?.activeElement;for(;O?.shadowRoot?.activeElement;)O=O.shadowRoot.activeElement;if(!E.length){f.preventDefault();return}const A=E.indexOf(O);(f.shiftKey&&A<=0||!f.shiftKey&&(A===E.length-1||A===-1))&&(f.preventDefault(),E[f.shiftKey?E.length-1:0].focus())}},async ensureComposerEmoji(){if(m||!this.menuOpen||this.menuPanel!=="emoji")return;const f=this.$refs?.composerEmojiHost;if(f){if(d){d.update({theme:p()}),f.contains(d)||f.appendChild(d);return}return u||(this.emojiLoading=!0,this.emojiError="",u=(async()=>{try{const[[v,E],C]=await Promise.all([l(),_(t.locale)]);if(m||!f.isConnected||!this.menuOpen||this.menuPanel!=="emoji")return;d=new v.Picker({data:E.default||E,...C,autoFocus:!1,dynamicWidth:!0,theme:p(),emojiButtonSize:32,emojiSize:24,previewPosition:"bottom",onEmojiSelect:O=>this.insertComposerEmoji(O)}),Object.assign(d.style,{width:"100%",height:"100%",minHeight:"0"}),f.appendChild(d)}catch{m||(this.emojiError=e.emojisLoadError)}finally{u=null,m||(this.emojiLoading=!1)}})(),u)}},insertComposerEmoji(f){if(m||typeof f?.native!="string")return!1;const v=this.$refs?.messageInput,E=this.messageText||"",C=Math.max(0,Math.min(v?.selectionStart??E.length,E.length)),O=Math.max(C,Math.min(v?.selectionEnd??C,E.length)),A=E.slice(0,C)+f.native+E.slice(O);return Array.from(A).length>2048?!1:(this.messageText=A,v&&(v.value=A,v.setSelectionRange?.(C+f.native.length,C+f.native.length)),this.persistDraft?.(),this.resizeMessageInput?.(),this.notifyTyping?.(A),!0)}}}function Am(t){return t.key==="Enter"&&!t.shiftKey&&!t.isComposing&&t.keyCode!==229}function xm(t){!t||t.getClientRects?.().length===0||(t.style.height="5
113px",t.style.height=`${t.scrollHeight}px`)}function Jo(t){return Array.isArray(t)?t.filter(e=>e&&(e.url||e.preview)):[]}function Gl(){if(globalThis.crypto.randomUUID)return globalThis.crypto.randomUUID();const t=globalThis.crypto.getRandomValues(new Uint8Array(16));t[6]=t[6]&15|64,t[8]=t[8]&63|128;const e=Array.from(t,i=>i.toString(16).padStart(2,"0")).join("");return`${e.slice(0,8)}-${e.slice(8,12)}-${e.slice(12,16)}-${e.slice(16,20)}-${e.slice(20)}`}function e0(t={}){const e=Wa(t.translations),i=Number.isFinite(t.minStickerQueryLength)?Number(t.minStickerQueryLength):2,r=Number.isFinite(t.maxStickerCacheEntries)?Number(t.maxStickerCacheEntries):30;let n=null,s=null,o=null,l=0,_=null,b=null,m=null,y=0,T=!1,g=null,d=null,u=null,w=!1,h=!1;const p=new Map;return{...GA(t),...ZA(t),messageText:"",isSending:!1,outboxItems:[],outboxStorageAvailable:!0,trendingStickers:Jo(t.trendingStickers),pickerStickers:[],pickerOpen:!1,pickerLoading:!1,pickerError:"",pickerQuery:"",init(){w||(w=!0,this.initComposerMenu(),this.restoreDraft(),this.ensureOutbox(),u&&(g.enqueue({...u,replyId:u.replyId??null}),this.outboxStorageAvailable&&(u=null),this.persistDraft()),this.pickerStickers=this.trendingStickers,this.$watch("messageText",()=>this.persistDraft()),this.$nextTick(()=>this.resizeMessageInput()))},destroy(){this.stopTyping(),h=!0,this.destroyComposerMenu(),this.destroyMedia(),clearTimeout(n),this.cancelStickerSearch(),b?.abort(),g?.destroy(),d?.disconnect()},restoreDraft(){if(t.draftKey)try{const c=JSON.parse(sessionStorage.getItem(t.draftKey));typeof c?.text=="string"&&(this.messageText=Array.from(c.text).slice(0,2048).join(""));const f=c?.submission;f&&typeof f.id=="string"&&/^(text|sticker)$/.test(f.type)&&(f.type==="text"?typeof f.text=="string":typeof f.url=="string")&&(u=f)}catch{}},persistDraft(){if(!(h||!t.draftKey))try{!this.messageText&&!u?sessionStorage.removeItem(t.draftKey):sessionStorage.setItem(t.draftKey,JSON.stringify({text:this.messageText,submission:u}))}catch{}},resizeMessageInput(){xm(this.$refs.messageInput)},notifyTyping(c=this.messageText){h||!t.chatUuid||this.contactUnavailable&&c?.trim()||window.dispatchEvent(new CustomEvent("messages:typing-state",{detail:{chatUuid:t.chatUuid,isTyping:!!c?.trim()}}))},stopTyping(){this.notifyTyping("")},stickerItems(c){return Jo(c)},pickerStickerItems(){return this.stickerItems(this.pickerStickers)},stickerKey(c,f,v){const E=f?.id||f?.url||f?.preview||"sticker";return`${c}-${E}-${v}`},normalizeStickerQuery(c){return(c||"").trim().toLowerCase()},getCachedStickers(c){if(!p.has(c))return null;const f=p.get(c);return p.delete(c),p.set(c,f),f},setCachedStickers(c,f){p.delete(c),p.set(c,f),p.size>r&&p.delete(p.keys().next().value)},cancelStickerSearch(){l++,s?.abort(),s=null,clearTimeout(o),o=null},resetPickerSearch(){clearTimeout(n),this.cancelStickerSearch(),this.pickerLoading=!1,this.pickerError="",this.pickerStickers=this.trendingStickers,this.pickerOpen&&this.ensureTrending()},requestThreadScrollToBottom(){this.$nextTick(()=>{window.dispatchEvent(new CustomEvent("messages:scroll-bottom"))})},submit(c){Am(c)&&(c.preventDefault(),this.submitForm())},ensureOutbox(){if(g||h)return g;let c=null;try{c=globalThis.localStorage}catch{}const f=t.draftKey?`${t.draftKey}:outbox`:null;g=zA({key:f,storage:c,translations:e,isOnline:()=>globalThis.navigator?.onLine!==!1,listen:(E,C)=>(globalThis.addEventListener?.(E,C),()=>globalThis.removeEventListener?.(E,C)),withLock:async E=>{if(!f||!globalThis.navigator?.locks?.request)return E();let C=!1;try{return await globalThis.navigator.locks.request(f,{ifAvailable:!0},O=>O?(C=!0,E()):!1)}catch(O){if(C)throw O;return E()}},...t.outboxOptions,send:(E,C)=>WA(this.$wire,E,C),onChange:(E,C)=>{h||(this.outboxItems=E,this.isSending=C.isSending,this.outboxStorageAvailable=C.durable,this.$dispatch("messages:outbox-updated",{items:E}))},onSent:E=>{u?.id===E.clientId&&(u=null,this.persistDraft()),this.$dispatch("messages:outbox-sent",E),this.$dispatch("messages:sent",{clientId:E.clientId,messageId:E.messageId})}}),g.start(),this.reconcileDisplayedMessages();const v=this.$el?.closest?.("[wire\\:id]");return v&&globalThis.MutationObserver&&(d=new MutationObserver(()=>this.reconcileDisplayedMessages()),d.observe(v,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-client-message-id"]})),g},reconcileDisplayedMessages(){if(h||!g)return;const c=this.$el?.closest?.("[wire\\:id]");c&&g.acknowledge([...c.querySelectorAll("[data-client-message-id]")].map(f=>f.getAttribute("data-client-message-id")))},replyPayload(){const c=this.currentReply,f=Number.isSafeInteger(c?.id)&&c.id>0?c.id:null;return f?{replyId:f,replyPreview:{author:String(c.author||""),text:String(c.text||"")}}:{replyId:null}},enqueueSubmission(c){return this.contactUnavailable||h||!this.ensureOutbox()?.enqueue(c)?!1:(this.stopTyping(),this.closeComposerMenu(),this.$dispatch("messages:clear-reply",{id:c.replyId}),this.requestThreadScrollToBottom(),!0)}
113,submitForm(){const c=(this.messageText||"").trim();return!c||Array.from(c).length>2048||!this.enqueueSubmission({id:Gl(),type:"text",text:this.messageText,...this.replyPayload()})?!1:(this.messageText="",this.persistDraft(),this.$nextTick(()=>this.resizeMessageInput()),!0)},canSubmit(){const c=(this.messageText||"").trim();return!this.contactUnavailable&&!!c&&Array.from(c).length<=2048},enqueueMedia(c){return this.enqueueSubmission({...c,id:Gl(),...this.replyPayload()})},restrictContact(){this.stopTyping(),this.closeComposerMenu(),this.ensureOutbox()?.failPending(t.unavailableMessage)},retryOutboxMessage(c){this.contactUnavailable||this.ensureOutbox()?.retry(c)},discardOutboxMessage(c){return this.ensureOutbox()?.discard(c)===!0},async ensureTrending(){if(this.trendingStickers.length>0||T||h)return;if(this.pickerOpen&&this.normalizeStickerQuery(this.pickerQuery).length<i&&(this.pickerLoading=!0,this.pickerError=""),_)return _;const c=new AbortController;b=c;const f=++y,v=setTimeout(()=>c.abort(),2500);return m=v,_=(async()=>{try{const E=await fetch("/api/stickers/trending?per_page=20",{signal:c.signal});if(!E.ok)throw new Error("Sticker request failed");const C=await E.json();if(h||f!==y||c.signal.aborted)return;this.trendingStickers=Jo(C.data||[]),T=!0,this.normalizeStickerQuery(this.pickerQuery).length<i&&(this.pickerStickers=this.trendingStickers)}catch{!h&&f===y&&this.pickerOpen&&this.normalizeStickerQuery(this.pickerQuery).length<i&&(this.pickerError=e.stickersLoadError)}finally{clearTimeout(v),f===y&&(_=null,b=null,m=null,!h&&this.normalizeStickerQuery(this.pickerQuery).length<i&&(this.pickerLoading=!1))}})(),_},async fetchStickers(c){const f=this.normalizeStickerQuery(c);if(h||f.length<i)return;this.cancelStickerSearch(),this.pickerError="";const v=this.getCachedStickers(f);if(v!==null){this.pickerStickers=v,this.pickerLoading=!1;return}const E=l,C=new AbortController;s=C,this.pickerLoading=!0,o=setTimeout(()=>C.abort(),5e3);try{const O=await fetch(`/api/stickers/search?q=${encodeURIComponent(f)}&per_page=24`,{signal:C.signal});if(!O.ok)throw new Error("Sticker request failed");const A=await O.json();if(h||E!==l)return;const I=Jo(A.data||[]);this.setCachedStickers(f,I),this.pickerStickers=I}catch{if(h||E!==l)return;this.pickerStickers=[],this.pickerError=e.stickersLoadError}finally{!h&&E===l&&(clearTimeout(o),o=null,this.pickerLoading=!1,s=null)}},closeStickerPicker(){this.pauseStickerPicker()},activateStickerPanel(){this.pickerOpen=!0,this.pickerError="",this.normalizeStickerQuery(this.pickerQuery).length>=i?this.fetchStickers(this.pickerQuery):(this.pickerStickers=this.trendingStickers,this.ensureTrending())},pauseStickerPicker(){this.pickerOpen=!1,clearTimeout(n),n=null,this.cancelStickerSearch(),y++,b?.abort(),b=null,_=null,clearTimeout(m),m=null,this.pickerLoading=!1},toggleStickerPicker(c=null){this.menuOpen&&this.menuPanel==="stickers"?this.closeComposerMenu():this.openComposerMenu("stickers",c)},retryStickerPicker(){if(!(!this.pickerOpen||h))return this.pickerError="",this.normalizeStickerQuery(this.pickerQuery).length>=i?this.fetchStickers(this.pickerQuery):this.ensureTrending()},searchPicker(){clearTimeout(n),this.cancelStickerSearch(),this.pickerError="";const c=this.normalizeStickerQuery(this.pickerQuery);if(c.length<i){this.resetPickerSearch();return}const f=this.getCachedStickers(c);if(f!==null){this.pickerStickers=f,this.pickerLoading=!1;return}this.pickerStickers=[],this.pickerLoading=!0,n=setTimeout(()=>{n=null,this.fetchStickers(c)},250)},selectSticker(c){return c?.url?this.enqueueSubmission({id:Gl(),type:"sticker",url:c.url,preview:c.preview||c.url,title:c.title||e.stickerLabel,...this.replyPayload()}):!1}}}const qf=String.raw`(?:\p{Regional_Indicator}{2}|[#*0-9]\uFE0F?\u20E3|\p{Extended_Pictographic}[\uFE0E\uFE0F]?\p{Emoji_Modifier}?(?:[\u{E0020}-\u{E007E}]+\u{E007F})?)`,t0=new RegExp(String.raw`^\s*(?:${qf}(?:\u200D${qf})*\s*)+$`,"u");function i0(t){return typeof t=="string"&&t0.test(t)}const r0='a, button, input, textarea, select, [contenteditable]:not([contenteditable="false"]), [role="button"]';function n0({openMenu:t,selection:e=()=>String(window.getSelection?.()??""),reducedMotion:i=()=>window.matchMedia?.("(prefers-reduced-motion: reduce)").matches??!1,schedule:r=(o,l)=>setTimeout(o,l),unschedule:n=o=>clearTimeout(o),now:s=()=>Date.now()}={}){let o=null,l=null;const _=()=>{o&&(n(o.timer),o.row.style.removeProperty("--chat-swipe-offset"),o.row.classList.remove("is-swiping"),o.row.hasPointerCapture?.(o.pointerId)&&o.row.releasePointerCapture(o.pointerId),o=null)},b=y=>{l={row:y,until:s()+800}},m=y=>{if(!y.row.isConnected||e())return _();y.longPressed=!0,b(y.row),t(Number(y.row.dataset.messageId),y.row.querySelector("[data-message-menu-action]"))};return{start(y){if(_(),y.pointerType!=="touch"||y.isPrimary===!1||e())return;const T=y.target.closest?.("[data-message-id]");if(!T||T.dataset.messageRemoved==="true"||y.target.closest(r0)||!y.target.closest(".chat-message-bubble"))return;const g=o={row:T,pointerId:y.pointerId,x:y.clientX,y:y.clientY,distance:0,swiping:!1,longPressed:!1};g.timer=r(()=>{o===g&&m(g)},500)},move(y){if(!o||y.pointerId!==o.pointerId)return;const T=y.clientX-o.x,g=Math.abs(y.clientY-o.y);if((Math.abs(T)>10||g>10)&&n(o.timer),!o.longPressed){if(e()||g>10&&g>=Math.abs(T)||T<-12)return _();!o.swiping&&T>12&&T>g*1.5&&(o.swiping=!0,o.row.classList.add("is-swiping"),o.row.setPointerCapture?.(o.pointerId)),o.swiping&&(y.cancelable&&y.preventDefault(),o.distance=T,i()||o.row.style.setProperty("--chat-swipe-offset",`${Math.min(72,Math.max(0,T*.65))}px`))}},end(y){if(!o||y.pointerId!==o.pointerId)return;const T=o,g=T.swiping&&T.distance>=64&&!e();(T.swiping||T.longPressed)&&b(T.row),_(),g&&T.row.isConnected&&T.row.querySelector("[data-reply-action]")?.click()},contextMenu(y){!o||o.swiping||e()||y.target.closest?.("[data-message-id]")===o.row&&(y.preventDefault(),n(o.timer),o.longPressed||m(o))},click(y){if(!l||y.isTrusted===!1)return;const T=l;l=null,s()<=T.until&&y.target.closest?.("[data-message-id]")===T.row&&(y.preventDefault(),y.stopImmediatePropagation())},cancel:_,dispose(){_(),l=null}}}function s0(t,e,i,{margin:r=8,gap:n=8}={}){const s=Math.max(0,i.width-r*2),o=Math.max(0,i.height-r*2),l=Math.min(e.width,s),_=Math.min(e.height,o),b=i.left+r,m=i.top+r,y=i.left+i.width-r,T=i.top+i.height-r,g=T-t.bottom-n,d=t.to
113p-n-m,u=g>=_||g>=d;return{left:Math.max(b,Math.min((t.left+t.right-l)/2,y-l)),top:Math.max(m,Math.min(u?t.bottom+n:t.top-n-_,T-_)),maxWidth:s,maxHeight:o}}function o0(){const t=window.visualViewport;return{left:t?.offsetLeft??0,top:t?.offsetTop??0,width:t?.width??window.innerWidth,height:t?.height??window.innerHeight}}function a0(t,e,i){if(!t||typeof MutationObserver>"u")return()=>{};const r=new MutationObserver(e);r.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-message-editable","data-message-removed"]});const n=typeof ResizeObserver>"u"?null:new ResizeObserver(i);n?.observe(t);const s=globalThis.window?.visualViewport;return s?.addEventListener("resize",i),()=>{r.disconnect(),n?.disconnect(),s?.removeEventListener("resize",i)}}function l0(t,e,i=8){const r=e.top+i,n=e.bottom-i;return n<=r?0:t.top<r?t.top-r:t.bottom>n?Math.min(t.bottom-n,t.top-r):0}function c0({request:t=ac,viewport:e=o0,clipboard:i=o=>navigator.clipboard.writeText(o),gestureOptions:r={},observeEditor:n=a0,touchKeyboard:s=()=>window.matchMedia?.("(pointer: coarse)").matches??!1}={}){let o=null,l=0,_=null,b=null,m=null,y=null,T=0,g=null,d=null,u=null,w=null,h=null;const p=new Set,c=n0({...r,openMenu:(v,E)=>h?.openMessageMenu(v,E)});return{reactionMessageId:null,menuMessageId:null,messageActionsStyle:{},messageActionFailed:!1,conversationPreferencePending:!1,conversationPreferenceFailed:!1,actionMessageOwn:!1,actionMessageEditable:!1,actionMessageText:"",actionMessageCopyable:!1,messageTool:null,messageToolId:null,messageToolText:"",messageToolOriginal:"",messageToolPending:!1,messageToolError:"",messageToolFailed:!1,isEmojiOnly:i0,isEditingMessage(v){return this.messageTool==="edit"&&this.messageToolId===Number(v)},resizeMessageEdit(v){v?.style&&(v.style.height="auto",v.style.height=`${v.scrollHeight}px`,this.revealMessageEditor())},revealMessageEditor(){const v=u?.querySelector(".chat-message-editor");if(!v?.getBoundingClientRect||!d?.getBoundingClientRect)return;const E=e(),C=d.getBoundingClientRect(),O=d.parentElement?.querySelector(".chat-thread-header")?.getBoundingClientRect(),A=l0(v.getBoundingClientRect(),{top:Math.max(C.top,E.top,O?.bottom??0),bottom:Math.min(C.bottom,E.top+E.height)});A&&(d.scrollTop+=A)},messageEditKeydown(v){v.isComposing||v.keyCode===229||(v.key==="Escape"?(v.preventDefault(),v.stopPropagation(),this.closeMessageTool()):v.key==="Enter"&&v.target?.matches?.("[data-message-edit-input]")&&!v.shiftKey&&(!s()||v.ctrlKey||v.metaKey)&&(v.preventDefault(),v.stopPropagation(),this.submitMessageTool()))},reconcileMessageEditor(){if(this.messageTool!=="edit")return;const v=d?.querySelector(`[data-message-id="${this.messageToolId}"]`)??u;if(v?.isConnected&&v.dataset.messageEditable==="true"&&v.dataset.messageRemoved!=="true"){u=v;return}if(this.messageToolPending&&v?.isConnected&&v.dataset.messageRemoved!=="true")return;g?.abort(),this.messageToolPending=!1;const E=this.$refs?.messageToolDialog?.dataset?.editUnavailable;this.closeMessageTool(!1),E&&this.$dispatch("toast",{message:E,type:"error"})},messagePointerDown(v){this.isEditingMessage(v.target?.closest?.("[data-message-id]")?.dataset.messageId)||(h=this,c.start(v))},messagePointerMove(v){c.move(v)},messagePointerUp(v){c.end(v)},cancelMessageGesture(){c.cancel()},messageContextMenu(v){c.contextMenu(v)},messageGestureClick(v){c.click(v)},async copyActionMessage(v,E){if(!this.actionMessageCopyable)return!1;const C=this.actionMessageText;this.closeMessageActions(!0);try{return await i(C),this.$dispatch("toast",{message:v,type:"success"}),!0}catch{return this.$dispatch("toast",{message:E,type:"error"}),!1}},openMessageTool(v){if(!this.actionMessageOwn||!["edit","delete"].includes(v)||v==="edit"&&!this.actionMessageEditable)return;if(this.messageTool){this.closeMessageActions(),this.focusMessageTool();return}const E=o?.closest?.("[data-message-id]");if(!Number.isSafeInteger(this.menuMessageId)||E?.dataset.messageId!==String(this.menuMessageId)||E.dataset.messageRemoved==="true"||E.dataset.messageIncoming!=="false"||v==="edit"&&E.dataset.messageEditable!=="true")return;const C=this.$refs?.messageToolDialog;if(v==="delete"&&(!C||!window.bootstrap?.Modal))return;if(v==="delete"&&m!==C){y?.abort(),m=C,y=new AbortController;const A={signal:y.signal};C.addEventListener("shown.bs.modal",()=>this.focusMessageTool(),A),C.addEventListener("hidden.bs.modal",()=>this.closeMessageTool(),A),C.addEventListener("hide.bs.modal",I=>{this.messageToolPending&&I.preventDefault()},A)}this.messageToolId=this.menuMessageId,this.messageTool=v,this.messageToolText=this.actionMessageText,this.messageToolOriginal=this.actionMessageText,this.messageToolError="",this.messageToolFailed=!1;const O=++T;b=o,this.closeMessageActions(),v==="edit"?(c.cancel(),u=E,d=E.closest?.(".conversation-thread"),w=n(d,()=>this.reconcileMessageEditor(),()=>{u?.querySelector("[data-message-edit-input]")===globalThis.document?.activeElement&&this.revealMessageEditor()}),this.$nextTick(()=>{O===T&&this.focusMessageTool()})):window.bootstrap.Modal.getOrCreateInstance(C).show()},focusMessageTool(){const v=this.messageTool==="edit"?u?.querySelector("[data-message-edit-input]"):this.$refs?.messageToolCancel;this.messageTool==="edit"&&this.resizeMessageEdit(v),v?.focus({preventScroll:!0})},closeMessageTool(v=!0){if(this.messageToolPending)return!1;T++,w?.(),w=null;const E=b?.isConnected?b:u?.querySelector("[data-message-menu-action]");return this.messageTool=null,this.messageToolId=null,this.messageToolText="",this.messageToolOriginal="",this.messageToolFailed=!1,this.messageToolError="",v&&E?.isConnected&&this.$nextTick(()=>E.isConnected&&E.focus({preventScroll:!0})),b=null,u=null,d=null,!0}
113,async submitMessageTool(){if(this.messageToolPending||!Number.isSafeInteger(this.messageToolId)||!["edit","delete"].includes(this.messageTool))return!1;const v=this.messageTool,E=this.messageToolId;if(v==="edit"&&!this.messageToolText.trim())return!1;if(v==="edit"&&this.messageToolText.trim()===this.messageToolOriginal)return this.closeMessageTool(),!0;const C=T,O=v==="edit"?[E,this.messageToolText,this.messageToolOriginal]:[E],A=new AbortController;g=A,p.add(A),this.messageToolPending=!0,this.messageToolError="",this.messageToolFailed=!1;try{const I=await t(this.$wire,v==="edit"?"editMessage":"deleteMessage",O,A.signal);return A.signal.aborted||C!==T?!1:I?.status!=="saved"?(this.messageToolError=typeof I?.message=="string"?I.message:"",this.messageToolFailed=!0,v==="edit"&&this.$nextTick(()=>C===T&&this.revealMessageEditor()),!1):(v==="delete"&&this.currentReply?.id===E&&this.$dispatch("messages:clear-reply"),this.messageToolPending=!1,v==="edit"?this.closeMessageTool():window.bootstrap?.Modal.getInstance(this.$refs?.messageToolDialog)?.hide(),!0)}catch{return!A.signal.aborted&&C===T&&(this.messageToolFailed=!0,v==="edit"&&this.$nextTick(()=>C===T&&this.revealMessageEditor())),!1}finally{p.delete(A),g===A&&(g=null),C===T&&(this.messageToolPending=!1,v==="edit"&&this.reconcileMessageEditor())}},async refreshConversationPreferences(v){if(v=Number(v),!Number.isSafeInteger(v)||v<=0)return!1;const E=new AbortController;p.add(E);try{return await t(this.$wire,"refreshChatPreferences",[v],E.signal),!E.signal.aborted}catch{return!1}finally{p.delete(E)}},async updateConversationPreference(v){if(this.conversationPreferencePending||!["pinChat","unpinChat","archiveChat","unarchiveChat"].includes(v))return!1;this.conversationPreferencePending=!0,this.conversationPreferenceFailed=!1;const E=new AbortController;p.add(E);try{return await t(this.$wire,v,[],E.signal),!E.signal.aborted}catch{return E.signal.aborted||(this.conversationPreferenceFailed=!0),!1}finally{p.delete(E),this.conversationPreferencePending=!1}},openMessageReactions(v,E){this.openMessageActions("reactions",v,E)},openMessageMenu(v,E){this.openMessageActions("menu",v,E)},replyToActionMessage(){const v=o?.closest?.("[data-message-id]"),E=v?.dataset.messageId===String(this.menuMessageId)?v.querySelector("[data-reply-action]"):null;this.closeMessageActions(),E?.click()},openReactionsFromMenu(){const v=this.menuMessageId,E=o?.closest?.("[data-message-id]");if(E?.dataset.messageId!==String(v))return this.closeMessageActions();const C=E.querySelector("[data-reaction-action]"),O=C?.getBoundingClientRect(),A=O?.width&&O?.height?C:o;this.openMessageReactions(v,A)},openMessageActions(v,E,C){if(E=Number(E),!Number.isSafeInteger(E)||E<=0||!C?.isConnected||!C.getBoundingClientRect)return;const O=v==="reactions"?this.reactionMessageId===E:this.menuMessageId===E;if(this.closeMessageActions(O),O)return;o=C,this.messageActionFailed=!1,this.reactionMessageId=v==="reactions"?E:null,this.menuMessageId=v==="menu"?E:null;const A=C.closest?.("[data-message-id]"),I=A?.querySelector(".directMessageText");this.actionMessageOwn=A?.dataset.messageIncoming==="false",this.actionMessageEditable=A?.dataset.messageEditable==="true",this.actionMessageText=I?.dataset?.messageSource??I?.textContent??"",this.actionMessageCopyable=!!(I&&A?.dataset.messageRemoved!=="true");const N=++l,D=v==="reactions"?"messageReactionPanel":"messageMenuPanel",U=()=>{if(N!==l)return;if(!o?.isConnected){this.closeMessageActions();return}const Q=this.$refs?.[D],he=Q?.getBoundingClientRect(),se=s0(o.getBoundingClientRect(),{width:he?.width||(v==="reactions"?320:200),height:he?.height||(v==="reactions"?112:64)},e());return this.messageActionsStyle={position:"fixed",left:`${Math.round(se.left)}px`,top:`${Math.round(se.top)}px`,maxWidth:`${Math.floor(se.maxWidth)}px`,maxHeight:`${Math.floor(se.maxHeight)}px`,overflowY:"auto"},Q};_=U,U(),this.$nextTick(()=>{U()?.querySelector('button:not([disabled]), a[href], [tabindex="0"]')?.focus({preventScroll:!0})})},closeMessageActions(v=!1){l++,_=null,this.reactionMessageId=null,this.menuMessageId=null,this.messageActionsStyle={},v&&o?.isConnected&&o.focus({preventScroll:!0}),o=null},repositionMessageActions(){_?.()},disposeMessageActions(){c.dispose(),h=null,this.closeMessageActions(),p.forEach(v=>v.abort()),p.clear(),this.messageToolPending=!1,this.closeMessageTool(!1),typeof window<"u"&&window.bootstrap?.Modal.getInstance(this.$refs?.messageToolDialog)?.hide(),y?.abort(),y=null,m=null,b=null},messageActionsKeydown(v){const E=v.currentTarget;if(v.key==="Escape"){v.preventDefault(),v.stopPropagation(),this.closeMessageActions(!0);return}if(v.key==="Tab"){this.closeMessageActions(!0);return}const C=Array.from(E.querySelectorAll('button:not([disabled]), a[href], [tabindex="0"]')).filter(D=>!D.getClientRects||D.getClientRects().length>0);if(!C.length)return;const O=Math.max(0,C.findIndex(D=>D===v.target||D.contains(v.target))),A=Math.max(1,Number(E.dataset.actionColumns)||1),I={ArrowRight:1,ArrowLeft:-1,ArrowDown:A,ArrowUp:-A}[v.key];let N;if(v.key==="Home")N=0;else if(v.key==="End")N=C.length-1;else if(I!==void 0)N=((O+I)%C.length+C.length)%C.length;else return;v.preventDefault(),v.stopPropagation(),C[N].focus({preventScroll:!0})},async reactToMessage(v){const E=this.reactionMessageId;if(!Number.isSafeInteger(E)||typeof v!="string"||!v)return!1;const C=this.$wire;this.closeMessageActions(!0);const O=new AbortController;p.add(O);try{return await t(C,"toggleReaction",[E,v],O.signal),!O.signal.aborted}catch{return O.signal.aborted||(this.messageActionFailed=!0),!1}finally{p.delete(O)}}}}function u0(t={},e={}){const i=e.window||globalThis.window,r=e.document||globalThis.document,n=e.fetch||globalThis.fetch,s=e.setTimeout||globalThis.setTimeout,o=e.clearTimeout||globalThis.clearTimeout,l=e.n
113avigate||((f,v=!1)=>i.Livewire?.navigate?i.Livewire.navigate(f,{replace:v}):i.location.assign(f)),_=[];let b=null,m=null,y=null,T=0,g=!1,d=!1,u=null,w=null,h=null,p=!1;function c(){T++,y!==null&&o(y),y=null,b?.abort(),b=null}return{open:!1,query:"",results:[],loading:!1,error:"",activeIndex:-1,sendingId:null,selectionTitle:"",pickingRecipient:!1,recipientKey:Ys,init(){h=this.$el;const f=(E,C,O)=>{E?.addEventListener(C,O),_.push(()=>E?.removeEventListener(C,O))};f(h,"show.bs.modal",()=>{this.open=!0,this.updateRecipientViewport(),this.searchRecipients()}),f(h,"shown.bs.modal",()=>{p?i.bootstrap.Modal.getOrCreateInstance(h).hide():this.$refs.recipientSearch?.focus({preventScroll:!0})}),f(h,"hide.bs.modal",()=>{this.open=!1,c();const E=m;m=null,E?.abort(),this.loading=!1,this.sendingId=null}),f(h,"hidden.bs.modal",()=>{if(p){p=!1,!d&&!g&&i.dispatchEvent(new CustomEvent("messages:group",{detail:{resumeCreate:!0,returnToPicker:!0}}));return}if(u){const E={requestId:u,person:w};u=null,w=null,this.selectionTitle="",this.pickingRecipient=!1,!d&&!g&&i.dispatchEvent(new CustomEvent("messages:recipient-picked",{detail:E}));return}t.returnToInboxOnClose&&!d&&!g&&l(t.inboxUrl,!0)}),f(i,"messages:pick-recipient",E=>{const C=E.detail||{};g||!/^[\da-f]{8}-(?:[\da-f]{4}-){3}[\da-f]{12}$/i.test(C.requestId||"")||(u=C.requestId,w=null,this.pickingRecipient=!0,this.selectionTitle=typeof C.title=="string"?C.title:"",this.query="",i.bootstrap.Modal.getOrCreateInstance(h).show())}),f(i,"messages:resume-new-message",()=>{g||d||u||this.sendingId!==null||(p=!1,i.bootstrap.Modal.getOrCreateInstance(h).show())}),f(r,"livewire:navigating",()=>{d=!0,c(),m?.abort()});const v=()=>{this.open&&!g&&this.updateRecipientViewport()};
113f(i,"resize",v),f(i?.visualViewport,"resize",v),f(i?.visualViewport,"scroll",v),this.$watch("query",()=>{c(),this.activeIndex=-1,this.results=[],this.error="",!(!this.open||g)&&(this.loading=!0,y=s(()=>{y=null,this.searchRecipients()},200))}),t.openOnLoad&&this.$nextTick(()=>{g||i.bootstrap.Modal.getOrCreateInstance(h).show()})},destroy(){g=!0,d=!0,u=null,w=null,c(),m?.abort(),m=null,_.splice(0).forEach(f=>f()),h?.style?.removeProperty("--chat-recipient-viewport-height"),h?.style?.removeProperty("--chat-recipient-viewport-top"),i?.bootstrap?.Modal?.getInstance(h)?.dispose()},updateRecipientViewport(){const f=i?.visualViewport?.height||i?.innerHeight;!Number.isFinite(f)||f<=0||(h?.style?.setProperty("--chat-recipient-viewport-height",`${f}px`),h?.style?.setProperty("--chat-recipient-viewport-top",`${i.visualViewport?.offsetTop||0}px`))},startGroup(){!this.open||p||u||this.sendingId!==null||g||d||(p=!0,i.bootstrap.Modal.getOrCreateInstance(h).hide())},async searchRecipients(){if(c(),g||!this.open)return;const f=T,v=new AbortController;b=v,this.loading=!0,this.error="",this.activeIndex=-1;const E=s(()=>v.abort(),1e4);try{const C=new URL(u&&t.shareUrl?t.shareUrl:t.url,i.location.href);u&&t.shareUrl&&C.searchParams.set("picker","1");const O=this.query.trim();O&&C.searchParams.set("query",O);const A=await n(C.toString(),{headers:{Accept:"application/json"},credentials:"same-origin",cache:"no-store",signal:v.signal});if(!A.ok)throw new Error("Recipients unavailable");const I=await A.json();if(g||!this.open||T!==f)return;this.results=Array.isArray(I.data)?I.data.slice(0,21):[]}catch{!g&&this.open&&T===f&&(this.results=[],this.error=u&&t.shareSearchError||t.searchError)}finally{o(E),T===f&&(b=null,this.loading=!1)}},recipientKeydown(f){if(!(f.isComposing||f.keyCode===229)&&!(!this.results.length||this.loading||this.sendingId!==null)){if(f.key==="Enter"){f.preventDefault(),this.startConversation(this.results[this.activeIndex]||(this.results.length===1?this.results[0]:null));return}(f.key==="ArrowDown"||f.key==="ArrowUp")&&(f.preventDefault(),this.activeIndex=this.activeIndex<0?f.key==="ArrowDown"?0:this.results.length-1:(this.activeIndex+(f.key==="ArrowDown"?1:-1)+this.results.length)%this.results.length,this.$nextTick(()=>this.$refs.recipientResults?.querySelector(`[data-recipient-index="${this.activeIndex}"]`)?.scrollIntoView({block:"nearest"})))}},async startConversation(f){const v=_u(f);if(g||!this.open||this.sendingId!==null||!v)return!1;if(u)return w=v.chat_uuid?{...v,is_group:!0,name:f.name,members:f.members,member_count:f.member_count}:{id:f.id,username:f.username,avatar:f.avatar,self:!!f.self},i.bootstrap.Modal.getOrCreateInstance(h).hide(),!0;if(v.chat_uuid)return!1;const E=new AbortController;m=E,this.sendingId=f.id,this.error="",h?.contains?.(r.activeElement)&&h.focus({preventScroll:!0});const C=s(()=>E.abort(),15e3);try{const O=await n(t.storeUrl,{method:"POST",credentials:"same-origin",signal:E.signal,headers:{Accept:"application/json","Content-Type":"application/json",...io({document:r,window:i,form:h})},body:JSON.stringify({receiver_id:f.id})}),A=await O.json();if(g||!this.open||m!==E||E.signal.aborted)return!1;if(!O.ok)return this.error=Object.values(A.errors||{}).flat().find(N=>typeof N=="string")||t.sendError,!1;const I=new URL(A.url,i.location.href);if(I.origin!==i.location.origin||!I.pathname.startsWith("/messages/"))throw new Error("Invalid destination");return i.Alpine?.store("chatDock")?.openUrl(I.href)?(i.bootstrap.Modal.getOrCreateInstance(h).hide(),!0):(d=!0,l(I.href),!0)}catch{return!g&&this.open&&m===E&&(this.error=t.sendError),!1}finally{o(C),m===E&&(m=null,this.sendingId=null)}}}}function d0(t={},e={}){const i=e.window||globalThis.window,r=e.document||globalThis.document,n=e.fetch||globalThis.fetch,s=e.setTimeout||globalThis.setTimeout,o=e.clearTimeout||globalThis.clearTimeout,l=e.navigate||(c=>i.Livewire?.navigate?i.Livewire.navigate(c):i.location.assign(c));let _=null,b=null,m=null,y=null,T=!1,g=!1,d=!1,u=0;const w=[],h=(c,f)=>{const v=++u;c.errorAnnouncement="",c.$nextTick(()=>{!T&&!g&&v===u&&(c.errorAnnouncement=f)}),i.dispatchEvent(new CustomEvent("toast",{detail:{message:f}}))};function p(){u++;const c=b;b=null,c?.abort(),m!==null&&o(m),m=null,y!==null&&o(y),y=null}return{busy:!1,errorAnnouncement:"",init(){_=this.$el;const c=(E,C,O)=>{E?.addEventListener(C,O),w.push(()=>E?.removeEventListener(C,O))};c(r,"livewire:navigating",()=>{g=!0,d=!0,p(),this.busy=!1});const f=()=>{!T&&d&&(d=!1,g=!1,this.busy=!1)};c(r,"livewire:navigated",f),c(i,"pagehide",()=>{g=!0,d=!0,p(),this.busy=!1}),c(i,"pageshow",f);const v=u;t.initialError&&this.$nextTick(()=>{!T&&!g&&v===u&&h(this,t.initialError)})}
113,destroy(){T=!0,g=!0,p(),w.splice(0).forEach(c=>c())},async startConversation(){if(T||g||this.busy)return!1;u++,this.errorAnnouncement="";const c=new AbortController;b=c,this.busy=!0,m=s(()=>c.abort(),15e3);try{const f=await n(t.storeUrl,{method:"POST",credentials:"same-origin",signal:c.signal,headers:{Accept:"application/json","Content-Type":"application/json",...io({document:r,window:i,form:_})},body:JSON.stringify({receiver_id:t.receiverId})}),v=await f.json();if(T||g||b!==c||c.signal.aborted)return!1;if(!f.ok)return h(this,Object.values(v.errors||{}).flat().find(C=>typeof C=="string")||t.errorMessage),!1;if(typeof v.url!="string")throw new Error("Missing destination");const E=new URL(v.url,i.location.href);if(E.origin!==i.location.origin||!E.pathname.startsWith("/messages/"))throw new Error("Invalid destination");return i.Alpine?.store("chatDock")?.openUrl(E.href)||(g=!0,y=s(()=>{y=null,!T&&g&&!d&&(g=!1,this.busy=!1,h(this,t.errorMessage))},15e3),l(E.href)),!0}catch{return!T&&b===c&&(y!==null&&o(y),y=null,g=!1,h(this,t.errorMessage)),!1}finally{b===c&&(m!==null&&o(m),m=null,b=null,g||(this.busy=!1))}}}}function f0(){return{states:{},update(t,e){this.states[t]={blocked:!!e.blocked,unavailable:!!e.unavailable}}}}function h0(t={}){let e=null,i=!1,r=null;return{target:null,busy:!1,error:"",opener:null,init(){r=this.$el},destroy(){i=!0,e?.abort(),window.bootstrap.Modal.getInstance(r)?.hide()},open(n){if(this.busy||!Number.isSafeInteger(n?.userId)||!n?.url)return;const s=new URL(n.url,window.location.origin);s.origin===window.location.origin&&(this.target={...n,url:s.href},this.error="",this.opener=document.activeElement?.closest?.(".dropdown, .dropstart")?.querySelector('[data-bs-toggle="dropdown"]')||document.activeElement,document.querySelectorAll?.('[data-bs-toggle="dropdown"][aria-expanded="true"]').forEach(o=>window.bootstrap.Dropdown?.getInstance(o)?.hide()),window.bootstrap.Modal.getOrCreateInstance(r).show(),r.addEventListener("shown.bs.modal",()=>r.querySelector("button")?.focus({preventScroll:!0}),{once:!0}))},close(){this.busy||(r.addEventListener("hidden.bs.modal",()=>{this.opener?.isConnected&&this.opener.getClientRects().length&&this.opener.focus({preventScroll:!0})},{once:!0}),window.bootstrap.Modal.getOrCreateInstance(r).hide())},async submit(){if(this.busy||!this.target)return;this.busy=!0,this.error="",e=new AbortController;const n=setTimeout(()=>e?.abort(),15e3);try{const s=await fetch(this.target.url,{method:this.target.blocked?"DELETE":"PUT",credentials:"same-origin",signal:e.signal,headers:{Accept:"application/json","X-CSRF-TOKEN":document.querySelector('meta[name="csrf-token"]')?.content||""}}),o=await s.json().catch(()=>null);if(i)return;if(!s.ok||!o||o.user_id!==this.target.userId){this.error=o?.message||t.error;return}this.$store.userBlocks.update(o.user_id,o),this.busy=!1,this.close(),window.dispatchEvent(new CustomEvent("user-blocks-saved",{detail:o})),window.dispatchEvent(new CustomEvent("toast",{detail:{message:o.message}}))}catch{i||(this.error=t.error)}finally{clearTimeout(n),e=null,this.busy=!1}}}}function p0(t,e){let i=!1,r=!1,n=0;const s=()=>document.querySelector("[data-blocking-user]"),o=()=>`skinmc:user-blocks:${s()?.dataset.blockingUser||""}`;async function l(){const m=s()?.dataset.blockingStatusUrl;if(!m)return!1;const y=n,T=s()?.dataset.blockingUser;let g=!1;const d=[...new Set([...document.querySelectorAll("[data-block-user-id]")].map(h=>h.dataset.blockUserId).filter(h=>/^[1-9][0-9]*$/.test(h)))],u=new AbortController,w=setTimeout(()=>u.abort(),15e3);try{for(let h=0;h<d.length;h+=100){const p=new URL(m,window.location.origin);d.slice(h,h+100).forEach(v=>p.searchParams.append("ids[]",v));const c=await fetch(p,{credentials:"same-origin",headers:{Accept:"application/json"},cache:"no-store",signal:u.signal});if(!c.ok)return g;const f=await c.json();if(n!==y||s()?.dataset.blockingUser!==T)return!1;Object.entries(f.states||{}).forEach(([v,E])=>{const C=t.store("userBlocks").states[v];g||(g=!!C?.blocked!=!!E.blocked||!!C?.unavailable!=!!E.unavailable),t.store("userBlocks").update(v,E)})}return g}finally{clearTimeout(w)}}function _(){e.dispatch("user-blocks-changed"),e.dispatch("feed-visibility-updated"),window.dispatchEvent(new CustomEvent("messages:blocks-updated")),window.dispatchEvent(new CustomEvent("profile-status:invalidate"))}async function b(m=null){if(m?.user_id){n++,t.store("userBlocks").update(m.user_id,m),_();return}if(i){r=!0;return}i=!0;try{do r=!1,await l()&&_();while(r)}catch{}finally{i=!1}}setInterval(()=>{s()&&document.visibilityState==="visible"&&b()},6e4),window.addEventListener("user-blocks-saved",m=>{b(m.detail);try{localStorage.setItem(o(),`${Date.now()}:${Math.random()}`)}catch{}}),window.addEventListener("storage",m=>{m.key===o()&&b()}),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&b()})}const Qo=new WeakMap;
113function Om({document:t=globalThis.document,getRefs:e}){let i=null;const r=n=>n.entries.forEach((s,o)=>{s.overlay&&(s.overlay.inert=o!==n.entries.length-1,s.overlay.style.zIndex=String(1300+o*10))});return{open(){if(i||!t.body)return;let n=Qo.get(t);n||(n={entries:[],overflow:t.body.style.overflow},Qo.set(t,n)),i={overlay:e().modal,opener:e().trigger||t.activeElement},n.entries.push(i),t.body.style.overflow="hidden",r(n)},close(n=!0){if(!i)return;const s=Qo.get(t),o=s?.entries.at(-1)===i,l=i.opener;i.overlay&&(i.overlay.inert=!1),s&&(s.entries=s.entries.filter(_=>_!==i),s.entries.length?r(s):(t.body.style.overflow=s.overflow,Qo.delete(t))),i=null,n&&o&&l?.isConnected&&l.focus({preventScroll:!0})},trapFocus(n){const s=e().dialog;if(!s)return;const o=y=>[...y.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]), textarea:not([disabled]), select:not([disabled]), [tabindex="0"], em-emoji-picker')].flatMap(T=>T.shadowRoot?o(T.shadowRoot):[T]).filter(T=>T.tabIndex>=0&&T.getClientRects().length&&!T.closest("[inert]")),l=o(s);let _=t.activeElement;for(;_?.shadowRoot?.activeElement;)_=_.shadowRoot.activeElement;const b=l[0],m=l.at(-1);n.shiftKey&&_===b?(n.preventDefault(),m?.focus()):!n.shiftKey&&_===m&&(n.preventDefault(),b?.focus())}}}const Yl=(t,e,i)=>Math.max(e,Math.min(t,i)),km=(t,e)=>Math.max(0,Math.min(t.bottom+24,e.top+e.height-8)-(e.top+8));
113function Vf(t,e,i,r="bubble",n=null,s=null){const l=Math.max(1,Math.min(r==="picker"?338:328,i.width-16)),_=Math.max(1,i.height-16),b=Math.max(1,Math.min(e.height,_)),m=i.left+8,y=i.left+i.width-8,T=i.top+8,g=i.top+i.height-8,d=Yl(t.left+t.width/2-l/2,m,Math.max(m,y-l));if(r==="picker"){const he=g-t.bottom,se=t.top-T,fe=he<b&&se>he?"top":"bottom",pe=fe==="top"?t.top-b-8:t.bottom+8;return{width:l,height:b,left:d,top:Yl(pe,T,Math.max(T,g-b)),maxHeight:_,side:fe}}const u=Math.min(t.bottom+24,g),w=n||t,h=Math.max(T,w.bottom+8),p=Math.max(m,w.right+8),c=w.left-8-l,f=[{side:"top",left:d,maxHeight:km(t,i),fitsWidth:!0},{side:"right",left:p,maxHeight:_,fitsWidth:p+l<=y},{side:"left",left:c,maxHeight:_,fitsWidth:c>=m},{side:"bottom",left:d,maxHeight:Math.max(0,g-h),fitsWidth:!0}],v=f.find(he=>he.side===s&&he.fitsWidth&&he.maxHeight>=128),E=v?.maxHeight>=b?v:null,C=f.slice(0,3).find(he=>he.fitsWidth&&he.maxHeight>=b),O=f[0].maxHeight>=128?f[0]:null,A=f[3].maxHeight>=Math.min(128,b)?f[3]:null,I=f.filter(he=>he.fitsWidth).reduce((he,se)=>se.maxHeight>he.maxHeight?se:he),N=E||C||v||O||A||I,D=Math.max(1,N.maxHeight),U=Math.min(b,D),Q=N.side==="bottom"?h:N.side==="top"?u-U:t.bottom+24-U;return{width:l,height:U,left:N.left,top:Yl(Q,T,Math.max(T,g-U)),maxHeight:D,side:N.side}}function Hf({window:t,document:e,element:i,anchor:r,obstacle:n=()=>null,visibilityAnchor:s=r,scroller:o=()=>null,kind:l="bubble",onAnchorHidden:_=()=>{},onPosition:b=()=>{},onWidthChange:m=()=>{}}){let y=!1,T=null,g=null,d=null,u=null,w=null;const h=[],p=()=>({left:t.visualViewport?.offsetLeft||0,top:t.visualViewport?.offsetTop||0,width:t.visualViewport?.width||t.innerWidth,height:t.visualViewport?.height||t.innerHeight});function c(C,O,A){if(!C.isConnected||C.closest?.("[inert]")||!O.width||!O.height||O.bottom<=A.top||O.top>=A.top+A.height||O.right<=A.left||O.left>=A.left+A.width)return!1;for(let I=C.parentElement;I&&I!==e.body&&!(I.showPopover&&I.matches?.(":popover-open"));I=I.parentElement){const N=t.getComputedStyle(I),D=/^(auto|scroll|hidden|clip)$/.test(N.overflowX),U=/^(auto|scroll|hidden|clip)$/.test(N.overflowY);if(!D&&!U)continue;const Q=I.getBoundingClientRect();if(U&&(O.bottom<=Q.top||O.top>=Q.bottom)||D&&(O.right<=Q.left||O.left>=Q.right))return!1}return!0}function f(){if(!y)return;const C=i(),O=r();if(!C?.isConnected||!O)return _();const A=O.getBoundingClientRect(),I=p(),N={left:0,top:0,width:t.innerWidth,height:t.innerHeight},D=s()||O;if(!O.isConnected||!A.width||!A.height||!c(D,D.getBoundingClientRect(),N))return _();const Q=u&&(A.left!==u.left||A.top!==u.top)?null:d,he=C.getBoundingClientRect(),se=o(),fe=se?.scrollTop,pe=n(),st=pe?.getBoundingClientRect?.()||pe,Ee=Math.max(1,I.height-16),oe=K=>{l==="bubble"&&(C.dataset.compact=String(K<180))},_e=K=>{C.style.maxHeight=`${K}px`,C.style.setProperty?.("--status-panel-max-height",`${K}px`),oe(K)},Ce=Math.max(1,Math.min(l==="picker"?338:328,I.width-16));C.style.width=`${Ce}px`,w!==Ce&&(w=Ce,m(Ce)),_e(Ee),l==="picker"&&(C.style.height=`${Math.min(380,Ee)}px`),oe(km(A,I));const ke=Vf(A,C.getBoundingClientRect(),I,l,st,Q);_e(ke.maxHeight);const ae=Vf(A,C.getBoundingClientRect(),I,l,st,ke.side);return _e(ae.maxHeight),C.style.left=`${Math.round(ae.left)}px`,C.style.top=`${Math.round(ae.top)}px`,se&&se.scrollTop!==fe&&(se.scrollTop=fe),d=ae.side,u={left:A.left,top:A.top},b({panel:C,anchor:A,placement:ae,previous:he}),ae}function v(){!y||T!==null||(T=t.requestAnimationFrame(()=>{T=null,f()}))}function E(){y=!1,d=null,u=null,w=null,T!==null&&t.cancelAnimationFrame(T),T=null,g?.disconnect(),g=null,h.splice(0).forEach(O=>O());const C=i();C?.hidePopover&&C.matches?.(":popover-open")&&C.hidePopover(),C&&!C.showPopover&&(C.style.display="none")}return{open(){const C=i(),O=r();if(y)return f(),y;
113if(!C?.isConnected||!O?.isConnected||(y=!0,C.style.visibility="hidden",C.showPopover?C.showPopover({source:O}):C.style.display="block",f(),C.style.visibility="",!y))return!1;const A=(I,N,D)=>{I?.addEventListener(N,v,D),h.push(()=>I?.removeEventListener(N,v,D))};return A(e,"scroll",{capture:!0,passive:!0}),A(t,"resize",{passive:!0}),A(t.visualViewport,"resize",{passive:!0}),A(t.visualViewport,"scroll",{passive:!0}),t.ResizeObserver&&(g=new t.ResizeObserver(v),g.observe(C),g.observe(O)),!0},position:f,close:E}}const m0="cubic-bezier(.4, 0, .2, 1)",zf=(t,e)=>t&&e&&["left","top","width","height"].every(i=>Math.abs(t[i]-e[i])<.5);function g0({window:t,panel:e,surface:i,content:r,controls:n=()=>null,anchor:s}){let o="hidden",l=0,_=[],b=null,m=null,y="top";const T=()=>t.matchMedia?.("(prefers-reduced-motion: reduce)").matches,g=()=>{l++,_.splice(0).forEach(h=>h.cancel())},d=h=>{const p=h?.getBoundingClientRect();return p&&{left:p.left,top:p.top,width:p.width,height:p.height}},u=h=>{const p=d(e());return{left:`${h.left-p.left}px`,top:`${h.top-p.top}px`,width:`${h.width}px`,height:`${h.height}px`}};function w(h,p,{closing:c=!1,reveal:f=!1,done:v=()=>{}}={}){const E=i(),C=r(),O=[C,n()].filter(Boolean),A=O.map(he=>f&&!_.length?"0":t.getComputedStyle(he).opacity);if(g(),b=p,!E||!C||!h||!p)return v();const I=u(h),N=u(p);if(Object.assign(E.style,N),O.forEach(he=>{he.style.opacity=c?"0":"1"}),T()||!E.animate||zf(h,p))return v();const D=l,U=[I,N];if((y==="left"||y==="right")&&Math.abs(h.left-p.left)>=.5){const he=c?h:p,se=Math.min(h.width,p.width);U.splice(1,0,{...u({left:y==="left"?he.left+he.width-se:he.left,top:Math.min(h.top,p.top),width:se,height:Math.min(h.height,p.height)}),offset:.5})}const Q=E.animate(U,{duration:c?180:260,easing:m0,fill:"both"});_.push(Q,...O.map((he,se)=>he.animate([{opacity:A[se]},{opacity:c?0:1}],{duration:c?90:160,delay:c?0:50,easing:"ease-out",fill:"both"}))),Q.finished.then(()=>{l===D&&(_.splice(0).forEach(he=>he.cancel()),v())}).catch(()=>{})}return{open(){const h=o==="hidden",p=d(h?s():i());o="open",m=d(s()),w(p,d(r()),{reveal:h})},position({previous:h,placement:p}){if(p?.side&&(y=p.side),o!=="open")return;const c=d(r()),f=d(s()),v=d(e());if(!c||!f||!v)return;const E=m?f.left-m.left:0,C=m?f.top-m.top:0;if(zf(c,b&&{...b,left:b.left+E,top:b.top+C})){b=c,m=f;return}if(E||C){m=f,w(c,c);return}const O=d(i()),A=O&&{...O,left:O.left+(h?.left??v.left)-v.left,top:O.top+(h?.top??v.top)-v.top};m=f,w(A,c)},close({animate:h=!0,done:p=()=>{}}={}){if(o==="closing"&&h)return;const c=()=>{o="hidden",b=null,m=null,p()};if(o==="hidden"||!h){g(),c();return}const f=d(i());o="closing",w(f,d(s()),{closing:!0,done:c})},destroy(){g(),o="hidden",b=null,m=null,y="top"}}}function v0(t={},e={}){const i=e.window||globalThis.window,r=e.document||globalThis.document,n=e.fetch||globalThis.fetch,s=e.setTimeout||globalThis.setTimeout,o=e.clearTimeout||globalThis.clearTimeout,l=e.requestAnimationFrame||i.requestAnimationFrame?.bind(i)||(v=>v());let _=null,b=null,m=null,y=null,T=null,g=null,d=null,u=null,w=!1,h=0,p=0;const c=new Set,f=[];return{profileUuid:t.profileUuid,ownerId:t.ownerId,viewerId:t.viewerId,status:t.status||null,expanded:!1,bubbleVisible:!1,editing:!1,placement:t.placement||"avatar",replyOpen:!1,replyMessage:"",sending:!1,sendingKind:"",sentKind:"",announcement:"",pendingInteraction:null,busy:!1,loading:!1,canInteract:t.canInteract===!0,permissionsKnown:typeof t.canInteract=="boolean",error:"",message:"",emoji:"",duration:"day",pickerOpen:!1,pickerMode:"status",get isOwner(){return!!this.viewerId&&this.viewerId===this.ownerId},get replyLength(){return Array.from(this.replyMessage).length},get messageLength(){return Array.from(this.message).length},get expiryLabel(){if(!this.status?.expires_at)return t.labels.forever;const v=new Date(this.status.expires_at).toLocaleString(r.documentElement.lang||"en",{dateStyle:"medium",timeStyle:"short"});return t.labels.expires.replace(":time",v)},init(){T=Om({document:r,getRefs:()=>this.$refs});const v=()=>this.$el?.closest?.(".chat-list-avatar")||this.$el?.closest?.(".profile-status-avatar")?.querySelector("[data-profile-status-avatar]");u=g0({window:i,panel:()=>this.$refs.panel,surface:()=>this.$refs.morphSurface,content:()=>this.$refs.expandedBubble,controls:()=>this.$refs.actions,anchor:()=>this.$refs.trigger?.parentElement}),g=Hf({window:i,document:r,element:()=>this.$refs.panel,anchor:()=>this.$refs.trigger?.parentElement||this.$refs.trigger,obstacle:v,visibilityAnchor:v,scroller:()=>this.$refs.expandedBubble,onWidthChange:()=>{this.replyOpen&&this.resizeReply()},onPosition:C=>{u.position(C),this.keepReplyVisible()},onAnchorHidden:()=>this.collapse(!1,!1)}),d=Hf({window:i,document:r,kind:"picker",element:()=>this.pickerMode==="status"?this.$refs.picker:this.$refs.interactionPicker,anchor:()=>y,onAnchorHidden:()=>this.hidePicker()});const E=(C,O,A)=>{C.addEventListener(O,A),f.push(()=>C.removeEventListener(O,A))};E(i,"profile-status:invalidate",()=>{this.isOwner||(this.collapse(!1,!1),this.setStatus(null),this.canInteract=!1,this.profileUuid&&this.refresh())}),E(i,"profile-status-updated",C=>{C.detail.profileUuid===this.profileUuid&&(h++,this.loading=!1,this.setStatus(C.detail.status))}),E(r,"visibilitychange",()=>{r.visibilityState==="visible"&&this.setStatus(this.status)}),E(r,"livewire:navigating",()=>{this.hidePicker(),u.destroy(),g.close(),this.bubbleVisible=!1,this.expanded=!1,this.editing=!1,T.close(!1)}),E(i,"profile-status-opened",C=>{C.detail!==this.$el&&this.collapse(!1,!1)}),E(r,"pointerdown",C=>
113{if(!this.pickerOpen)return;!(this.pickerMode==="status"?this.$refs.picker:this.$refs.interactionPicker)?.contains(C.target)&&!y?.contains(C.target)&&this.hidePicker()}),this.setStatus(this.status)},destroy(){w=!0,o(_),o(b),c.forEach(v=>v.abort()),p++,d?.close(),u?.destroy(),g?.close(),m?.destroy(),T?.close(!1),f.splice(0).forEach(v=>v())},setStatus(v){if(o(_),this.status?.uuid!==v?.uuid&&(this.replyMessage="",this.replyOpen=!1,this.sentKind="",this.announcement="",o(b),this.pendingInteraction=null,this.editing||this.hidePicker()),this.status=v,v||(this.canInteract=!1,u?.destroy(),g?.close(),this.bubbleVisible=!1,this.expanded=!1,this.replyOpen=!1),!v?.expires_at)return;const E=Date.parse(v.expires_at)-Date.now();E<=0?(this.status=null,this.canInteract=!1,u?.destroy(),g?.close(),this.bubbleVisible=!1,this.expanded=!1,this.replyOpen=!1,this.editing||this.hidePicker()):_=s(()=>this.setStatus(this.status),Math.min(E,2147483647))},async request(v,E="GET",C){const O=new AbortController;c.add(O);const A=s(()=>O.abort(),15e3);try{const I=await n(v,{method:E,credentials:"same-origin",signal:O.signal,headers:{Accept:"application/json","Content-Type":"application/json",...io({document:r,window:i})},...C===void 0?{}:{body:JSON.stringify(C)}}),N=await I.json().catch(()=>{throw new Error(t.labels.error)});if(w||O.signal.aborted)throw new Error(t.labels.error);if(!I.ok){const D=Object.values(N.errors||{}).flat().find(U=>typeof U=="string");throw Object.assign(new Error(D||(I.status===404?t.labels.unavailable:t.labels.error)),{status:I.status})}return N}finally{o(A),c.delete(O)}},async toggle(){if(!this.status&&this.isOwner)return this.edit();if(this.expanded)return this.collapse();i.dispatchEvent(new CustomEvent("profile-status-opened",{detail:this.$el})),this.expanded=!0,this.error="",this.$nextTick(()=>{w||!this.expanded||g?.open()&&(this.bubbleVisible=!0,u.open(),this.$refs.panelTrigger?.focus({preventScroll:!0}))}),await this.refresh()},positionBubble(){g?.position(),d?.position()},edit(){!this.isOwner||this.busy||(this.collapse(!1,!1),this.hidePicker(),T?.open(),this.editing=!0,this.error="",this.message=this.status?.message||"",this.emoji=this.status?.emoji||"",this.duration=this.status?.duration||"day",this.$nextTick(()=>l(()=>{!w&&this.editing&&this.$refs.message?.focus({preventScroll:!0})}
113)))},collapse(v=!0,E=!0){this.busy||this.editing||(this.hidePicker(),this.expanded=!1,u?.close({animate:E,done:()=>{g?.close(),this.bubbleVisible=!1,v&&this.$nextTick(()=>{!w&&!this.expanded&&!this.editing&&this.$refs.trigger?.focus({preventScroll:!0})})}}))},escape(){this.pickerOpen?this.hidePicker(!0):this.editing?this.close():this.collapse()},clearDraft(){this.message="",this.emoji="",this.hidePicker(),this.$refs.message?.focus({preventScroll:!0})},toggleReply(){this.replyOpen=!this.replyOpen,this.hidePicker(),this.replyOpen&&this.$nextTick(()=>l(()=>{!w&&this.replyOpen&&(this.resizeReply(),this.positionBubble(),this.$refs.reply?.focus({preventScroll:!0}),this.keepReplyVisible())}))},resizeReply(){xm(this.$refs.reply)},keepReplyVisible(){if(!this.replyOpen||r.activeElement!==this.$refs.reply)return;const v=this.$refs.expandedBubble,E=this.$refs.reply?.closest?.(".profile-status-reply");if(!v||!E)return;const C=v.getBoundingClientRect(),O=E.getBoundingClientRect();O.bottom>C.bottom-12&&(v.scrollTop+=O.bottom-C.bottom+12)},submitReply(v){if(Am(v))return v.preventDefault(),this.sendReply()},async refresh(){const v=++h;this.loading=!0;try{const E=await this.request(t.showUrl.replace("__PROFILE__",this.profileUuid));!w&&v===h&&(this.setStatus(E.status),this.permissionsKnown=!0,this.canInteract=!!E.status&&!!E.can_interact&&!this.isOwner,!E.status&&!this.isOwner&&(this.error=t.labels.unavailable))}catch(E){!w&&v===h&&(this.error=E.status?E.message:t.labels.error)}finally{!w&&v===h&&(this.loading=!1)}},close(v=!0){this.busy||(this.editing=!1,this.hidePicker(),T?.close(v))},trapFocus(v){T?.trapFocus(v)},hidePicker(v=!1){const E=y;p++,d?.close(),this.pickerOpen=!1,m?.hide(),y=null,v&&E?.isConnected&&E.focus({preventScroll:!0})},async togglePicker(v,E=r.activeElement){if(this.pickerOpen&&this.pickerMode===v)return this.hidePicker(!0);this.hidePicker();const C=++p;y=E,this.pickerMode=v,this.pickerOpen=!0,this.error="";try{const O=await Cm(r.documentElement.lang);if(w||!this.pickerOpen||C!==p||(m??(m=Ng({destroyOnHide:!0,getOptions:()=>({...O,theme:r.documentElement.dataset.bsTheme||"auto",previewPosition:"none",skinTonePosition:"search",dynamicWidth:!0,onEmojiSelect:A=>{if(this.pickerMode==="reaction")this.react(A.native);else if(this.pickerMode==="reply"){const I=this.$refs.reply,N=I?.selectionStart??this.replyMessage.length,D=I?.selectionEnd??N;this.replyMessage=this.replyMessage.slice(0,N)+A.native+this.replyMessage.slice(D),this.$nextTick(()=>{this.resizeReply(),I?.focus({preventScroll:!0}),I?.setSelectionRange(N+A.native.length,N+A.native.length)})}else this.emoji=A.native;this.hidePicker(this.pickerMode==="status")}}),onError:()=>{this.hidePicker(),this.error=t.labels.pickerError}})),await this.$nextTick(),!this.pickerOpen||C!==p))return;if(!d?.open()){this.hidePicker();return}await m.show(v==="status"?this.$refs.picker:this.$refs.interactionPicker),this.pickerOpen&&C===p&&d?.position()}catch{C===p&&(this.hidePicker(),this.error=t.labels.pickerError)}},async mutate(v,E,C,O,A=!1){if(!(this.busy||w)){this.busy=!0,this.error="",h++,this.loading=!1;try{const I=await this.request(v,E,C);if(w)return;this.setStatus(I.status),i.dispatchEvent(new CustomEvent("profile-status-updated",{detail:{profileUuid:this.profileUuid,status:I.status}})),i.dispatchEvent(new CustomEvent("toast",{detail:{message:O}})),this.busy=!1,A&&(this.close(),this.collapse())}catch(I){w||(this.error=I.status?I.message:t.labels.error,I.status===404&&(this.setStatus(null),this.canInteract=!1))}finally{w||(this.busy=!1)}}},save(){if(!(!this.isOwner||this.messageLength>140))return!this.message.trim()&&!this.emoji?this.status?this.clearStatus():void 0:this.mutate(t.updateUrl,"PUT",{message:this.message.trim(),emoji:this.emoji||null,duration:this.duration},t.labels.saved,!0)},clearStatus(){if(this.isOwner)return this.mutate(t.updateUrl,"DELETE",void 0,t.labels.cleared,!0)},react(v){return this.sendInteraction("reaction",v)},sendReply(){if(!(!this.replyMessage.trim()||this.replyLength>2048))return this.sendInteraction("reply",this.replyMessage.trim())},async sendInteraction(v,E){if(!this.status||!this.canInteract||this.sending||w)return;const C=this.status.uuid,O=JSON.stringify([C,v,E]);this.pendingInteraction?.key!==O&&(this.pendingInteraction={key:O,id:(e.randomUUID||(()=>i.crypto.randomUUID()))()});const A=(v==="reaction"?t.reactUrl:t.replyUrl).replace("__STATUS__",C),I=this.pendingInteraction.id,N=this.replyMessage;let D=r.activeElement;this.sending=!0,this.sendingKind=v,this.error="",this.sentKind="",this.announcement=t.labels.sending,o(b),this.hidePicker(),v==="reaction"&&this.expanded&&(this.$refs.panelTrigger?.focus({preventScroll:!0}),D=r.activeElement);try{const U=await this.request(A,v==="reaction"?"PUT":"POST",{id:I,...v==="reaction"?{emoji:E}:{message:E}});if(w)return;if(!U.sent||typeof U.url!="string")throw new Error(t.labels.error);const Q=new URL(U.url,i.location.href);if(Q.origin!==i.location.origin||!Q.pathname.startsWith("/messages/"))throw new Error(t.labels.error);if(i.dispatchEvent(new CustomEvent("messages:sent",{detail:{clientId:I,messageId:U.message_id??null}})),i.dispatchEvent(new CustomEvent("messages:new")),this.status?.uuid!==C)return;this.sentKind=v,this.announcement=v==="reaction"?t.labels.reacted:t.labels.replied,b=s(()=>{this.sentKind=""},2e3),this.pendingInteraction=null,v==="reply"&&this.replyMessage===N&&(this.replyMessage="",this.$nextTick(()=>this.resizeReply()))}catch(U){!w&&this.status?.uuid===C&&(this.announcement="",this.error=U.status===404||U.status===422?U.message:U.status===429?t.labels.rateLimited:U.status===403?t.labels.restricted:t.labels.sendError,U.status===404&&(this.setStatus(null),this.canInteract=!1),U.status===403&&(this.canInteract=!1))}finally{w||(this.sending=!1,this.$nextTick(()=>
113{if(w||!this.expanded||this.status?.uuid!==C)return;const U=r.activeElement;(U===r.body||U===D||!U?.isConnected)&&(v==="reply"&&this.replyOpen?this.$refs.reply?.focus({preventScroll:!0}):v==="reaction"&&this.$refs.reactionButton?.focus({preventScroll:!0}))}))}}}}function y0(){let t,e=null,i;const r=new Map;return{isOpen:!1,loading:!1,error:null,data:null,profileUuid:null,requestVersion:0,init(){t=Om({getRefs:()=>this.$refs}),i=()=>this.close(!1),document.addEventListener("livewire:navigating",i),window.addEventListener("messages:blocks-updated",i)},destroy(){this.requestVersion++,e?.abort(),t?.close(!1),document.removeEventListener("livewire:navigating",i),window.removeEventListener("messages:blocks-updated",i)},async open(s){const o=s?.userId||r.get(s?.profileUuid);if(this.$store?.userBlocks?.states[o]?.unavailable){this.close(!1);return}const l=++this.requestVersion;e?.abort();const _=new AbortController;if(e=_,this.profileUuid=s?.profileUuid||null,t.open(),this.isOpen=!0,this.loading=!!this.profileUuid,this.error=this.profileUuid?null:"Profile UUID is required.",this.data=null,this.$nextTick(()=>requestAnimationFrame(()=>{this.isOpen&&l===this.requestVersion&&this.$refs.closeButton?.focus()})),!!this.profileUuid)try{const b=new URLSearchParams({profile_uuid:this.profileUuid}),m=await fetch(`/api/v1/profile/passport?${b}`,{signal:_.signal,credentials:"same-origin",cache:"no-store",headers:{Accept:"application/json"}});if(!m.ok)throw new Error("Failed to load profile");const y=await m.json();if(l!==this.requestVersion)return;if(r.set(this.profileUuid,y.user_id),this.$store?.userBlocks?.states[y.user_id]?.unavailable){this.close(!1);return}this.data=y}catch{l===this.requestVersion&&!_.signal.aborted&&(this.error="Failed to load profile information.")}finally{l===this.requestVersion&&(this.loading=!1),e===_&&(e=null)}},close(s=!0){this.requestVersion++,e?.abort(),this.isOpen=!1,this.data=null,this.error=null,this.loading=!1,t?.close(s)},trapFocus(s){t?.trapFocus(s)},formatDate(s){return s?new Date(s).toLocaleDateString(document.documentElement.lang||"en",{month:"long",year:"numeric"}):""}}}const b0=/^[\da-f]{8}-(?:[\da-f]{4}-){3}[\da-f]{12}$/i;function w0(t={},e={}){const i=e.window||globalThis.window,r=e.document||globalThis.document,n=e.fetch||globalThis.fetch,s=e.setTimeout||globalThis.setTimeout,o=e.clearTimeout||globalThis.clearTimeout,l=e.navigate||(A=>{i.Alpine?.store("chatDock")?.openUrl(A)||(i.Livewire?.navigate?i.Livewire.navigate(A):i.location.assign(A))}),_=e.uuid||(()=>i.crypto.randomUUID());let b=!1,m=0,y=0,T=null,g=null,d=null,u=null,w="hidden",h=!1,p=null,c=null,f=!1,v=!1,E=null;const C=[];function O(A){const I=new URL(A,i.location.href);if(I.origin!==i.location.origin||!/^\/messages(?:\/|$)/.test(I.pathname))throw new Error("Invalid destination");return I.href}return{open:!1,screen:"create",group:null,invitations:[],name:"",query:"",people:[],selected:[],loading:!1,searching:!1,busy:!1,error:"",searchError:"",confirmation:null,creationId:null,selectedUuid:null,get selecting(){return this.screen==="create"||this.screen==="invite"},get selectionLimit(){return Math.max(0,50-(this.group?this.group.members.length+this.group.invitations.length:1))},get candidates(){const A=new Set([...(this.group?.members||[]).map(I=>I.id),...(this.group?.invitations||[]).map(I=>I.user_id)]);return this.people.filter(I=>!I.self&&!A.has(I.id))},init(){u=this.$el;const A=(I,N,D)=>{I?.addEventListener(N,D),C.push(()=>I?.removeEventListener(N,D))};A(i,"messages:group",I=>{const N=I.detail?.chatUuid;N&&!b0.test(N)||this.openGroup(N||null,I.detail?.screen==="invitations"?"invitations":"create",{resumeCreate:I.detail?.resumeCreate===!0,returnToPicker:I.detail?.returnToPicker===!0})}),A(u,"show.bs.modal",()=>{w="showing"}),A(u,"shown.bs.modal",()=>{w="shown",h&&i.bootstrap.Modal.getOrCreateInstance(u).hide()}),A(u,"hide.bs.modal",I=>{if(this.busy){I.preventDefault();return}w="hiding",this.screen==="create"&&v&&!p&&(this.rememberCreateDraft(),p=()=>i.dispatchEvent(new CustomEvent("messages:resume-new-message"))),this.open=!1,m++,y++,g?.abort(),d?.abort(),o(T),this.loading=!1,this.searching=!1}),A(u,"hidden.bs.modal",()=>{w="hidden",h=!1;const I=p,N=c;p=null,c=null,!(b||f)&&(N?this.openGroup(...N):I?.())}),A(r,"livewire:navigating",()=>{f=!0,p=null,c=null,h=!1,m++,y++,g?.abort(),d?.abort(),o(T)}),this.$watch("query",()=>{y++,d?.abort(),o(T),this.people=[],this.searchError="",!(!this.open||!this.selecting)&&(this.searching=!0,T=s(()=>this.searchPeople(),200))})},destroy(){b=!0,f=!0,m++,y++,p=null,c=null,h=!1,E=null,g?.abort(),d?.abort(),o(T),C.splice(0).forEac
113h(A=>A()),i.bootstrap?.Modal?.getInstance(u)?.dispose()},async openGroup(A,I="create",N={}){if(!(b||f||this.busy)){if(w==="hiding"||h){c=[A,I,N];return}m++,g?.abort(),d?.abort(),o(T),y++,p=null,this.open=!0,this.group=null,this.confirmation=null,this.error="",this.name="",this.loading=!1,this.selectedUuid=A,this.query="",this.people=[],this.selected=[],this.invitations=[],this.searching=!1,this.searchError="",this.screen=A?"details":I,v=this.screen==="create"&&N.returnToPicker===!0,this.screen==="create"&&(N.resumeCreate&&E?(this.name=E.name,this.query=E.query,this.selected=E.selected.map(D=>({...D})),this.creationId=E.creationId):(E=null,this.creationId=_())),i.bootstrap.Modal.getOrCreateInstance(u).show(),A?await this.loadGroup(A):I==="invitations"?await this.loadInvitations():await this.searchPeople()}},async request(A,I="GET",N=null){const D=m,U=new AbortController;g?.abort(),g=U;const Q=s(()=>U.abort(),15e3);try{const he=await n(A,{method:I,credentials:"same-origin",cache:"no-store",signal:U.signal,headers:{Accept:"application/json",...I==="GET"?{}:{"Content-Type":"application/json",...io({document:r,window:i,form:u})}},...N===null?{}:{body:JSON.stringify(N)}});if(b||!this.open||D!==m||U.signal.aborted)return null;const se=he.status===204?{}:await he.json();if(b||!this.open||D!==m||U.signal.aborted)return null;if(!he.ok){const fe=new Error(Object.values(se.errors||{}).flat().find(pe=>typeof pe=="string")||t.error);throw fe.userMessage=!0,fe}return se}finally{o(Q),g===U&&(g=null)}},groupUrl(A=""){return`${t.baseUrl}/${this.group.uuid}/group${A}`},async loadGroup(A=this.group?.uuid||this.selectedUuid){if(!A||this.busy)return;const I=m;this.loading=!0,this.error="";try{const N=await this.request(`${t.baseUrl}/${A}/group`);N&&(this.group=N.chat||N,this.name=this.group.name)}catch{!b&&this.open&&I===m&&(this.error=t.error)}finally{I===m&&(this.loading=!1)}},async loadInvitations(){const A=m;this.loading=!0,this.error="";try{const I=await this.request(t.invitationsUrl);I&&(this.invitations=I.data||[])}catch{!b&&this.open&&A===m&&(this.error=t.error)}finally{A===m&&(this.loading=!1)}},async searchPeople(){if(b||!this.open||!this.selecting)return;o(T),d?.abort();const A=++y,I=new AbortController;d=I,this.searching=!0,this.searchError="";const N=s(()=>I.abort(),1e4);try{const D=new URL(t.recipientsUrl,i.location.href);D.searchParams.set("groups","1"),this.query.trim()&&D.searchParams.set("query",this.query.trim());const U=await n(D,{headers:{Accept:"application/json"},credentials:"same-origin",cache:"no-store",signal:I.signal});if(!U.ok)throw new Error;const Q=await U.json();!b&&this.open&&this.selecting&&A===y&&(this.people=(Q.data||[]).slice(0,21))}catch{!b&&this.open&&A===y&&(this.searchError=t.searchError)}finally{o(N),A===y&&(this.searching=!1)}},selectedPerson(A){return this.selected.some(I=>I.id===A)},togglePerson(A){this.busy||(this.selectedPerson(A.id)?this.selected=this.selected.filter(I=>I.id!==A.id):this.selected.length<this.selectionLimit&&(this.selected=[...this.selected,A]))},inviteScreen(){this.screen="invite",this.confirmation=null,this.query="",this.people=[],this.selected=[],this.error="",this.searchPeople()},back(){if(!(this.busy||b||f)){if(this.confirmation){this.confirmation=null;return}this.screen==="invite"?(this.screen="details",y++,d?.abort(),o(T)):this.screen==="create"?(this.rememberCreateDraft(),this.closeGroup(()=>i.dispatchEvent(new CustomEvent("messages:resume-new-message")))):this.closeGroup()}},rememberCreateDraft(){E={name:this.name,query:this.query,selected:this.selected.map(A=>({...A})),creationId:this.creationId}},closeGroup(A=null){if(!(this.busy||b||f)&&(p=A,w!=="hiding")){if(w==="showing"){h=!0;return}i.bootstrap.Modal.getOrCreateInstance(u).hide()}},async mutate(A,I,N,{go:D=!1,close:U=!1}={}){if(this.busy||b)return!1;this.busy=!0,this.error="";try{const Q=await this.request(A,I,N);if(!Q)return!1;if(this.confirmation=null,D||U){const he=O(Q.url||t.inboxUrl);this.busy=!1,E=null,v=!1,this.closeGroup(()=>l(he))}else this.screen==="invitations"?(this.busy=!1,await this.loadInvitations()):(this.busy=!1,this.screen="details",this.selected=[],Q.chat?(this.group=Q.chat,this.name=this.group.name):await this.loadGroup());return i.dispatchEvent(new CustomEvent("messages:groups-updated")),!0}catch(Q){return!b&&this.open&&(this.error=Q.userMessage?Q.message:t.error),!1}finally{this.busy=!1}},submitSelection(){if(!this.selected.length)return;const A=this.selected.map(I=>I.id);return this.screen==="create"?this.name.trim()?this.mutate(t.createUrl,"POST",{name:this.name.trim(),recipient_ids:A,client_id:this.creationId},{go:!0}):void 0:this.mutate(this.groupUrl("/invitations"),"POST",{recipient_ids:A})},rename(){if(this.name.trim())return this.mutate(this.groupUrl(),"PATCH",{name:this.name.trim()})},respond(A,I){return this.mutate(`${t.invitationsUrl}/${A.id}/${I?"accept":"decline"}`,"POST",{},{go:I})},confirm(A,I=null){this.confirmation={action:A,person:I},this.error=""},confirmAction(){const A=this.confirmation;if(A){if(A.action==="leave")return this.mutate(this.groupUrl("/leave"),"POST",{},{close:!0});if(A.action==="transfer")return this.mutate(this.groupUrl("/ownership"),"POST",{user_id:A.person.id});if(A.action==="remove")return this.mutate(this.groupUrl(`/members/${A.person.id}`),"DELETE",{})}}
113,changeRole(A){return this.mutate(this.groupUrl(`/members/${A.id}/role`),"PATCH",{role:A.role==="admin"?"member":"admin"})},cancelInvitation(A){return this.mutate(this.groupUrl(`/invitations/${A.id}`),"DELETE",{})}}}const _0=500,Wf=Object.freeze({notification:{frequency:420,endFrequency:880,duration:.1,volume:.04},sent:{frequency:440,endFrequency:660,duration:.12,volume:.045},received:{frequency:620,endFrequency:480,duration:.1,volume:.04}});function E0(){try{return globalThis.localStorage}catch{return null}}function Xl(t){return t&&typeof t=="object"&&!Array.isArray(t)&&Object.values(t).every(e=>Number.isSafeInteger(e)&&e>=0)}function S0({subscribe:t=m=>Mg().subscribe(m),win:e=globalThis.window,doc:i=globalThis.document,storage:r=E0(),locks:n=globalThis.navigator?.locks,AudioContextApi:s=globalThis.AudioContext||globalThis.webkitAudioContext,now:o=Date.now,setTimer:l=globalThis.setTimeout,clearTimer:_=globalThis.clearTimeout,activeChat:b=()=>{if(i.visibilityState==="hidden"||!i.hasFocus?.())return null;const m=i.querySelector(".chat-conversation[data-chat-uuid]");return m?.getClientRects().length&&!m.closest("[inert]")?m.dataset.chatUuid:null}}={}){let m=null,y=null,T=0,g=null,d=null,u=null,w=Promise.resolve(),h=null,p=0,c=null;const f=new Map;let v=[],E=null,C=null,O=null,A=null,I=null,N=null;const D=new Set,U=K=>`skinmc.messages.${u}.${K}`;function Q(K,ve=null){try{return JSON.parse(r?.getItem(U(K))??"null")??ve}catch{return ve}}function he(K,ve,Le){try{if(!r)throw new Error("Storage unavailable");r.setItem(U(ve),JSON.stringify(Le))}catch{K.storageAvailable=!1}}function se(K,ve,Le,tt){K.addEventListener(ve,Le,tt),v.push(()=>K.removeEventListener(ve,Le,tt))}function fe(K){i.title!==N&&(I=i.title),N=K.unreadCount>0?`(${K.badge}) ${I}`:I,i.title=N}function pe(){const K=b();if(!K||e.navigator?.onLine===!1||i.querySelector(".modal.show, .offcanvas.show"))return null;const ve=i.querySelector(".chat-conversation[data-chat-uuid]")?.querySelector(".conversation-thread");return ve?.dataset.followLatest==="true"&&ve.dataset.hasNewer!=="true"&&ve.getAttribute("aria-busy")!=="true"?K:null}function st(K){if(!m)return;let ve=K.enabled?h?Ee(h):p:0;if(K.enabled&&h){const Le=pe(),tt=Le&&h.cursors[Le];Le&&tt>Math.max(h.readCursors[Le],f.get(Le)??0)&&!h.muted.includes(Le)&&ve--}K.unreadCount=Math.max(0,ve),fe(K)}function Ee(K){if(!K.enabled)return 0;if(!f.size)return K.unreadCount;const ve=new Set(K.muted);let Le=0;for(const[tt,at]of f){const ut=K.cursors[tt];!ve.has(tt)&&ut>K.readCursors[tt]&&ut<=at&&Le++}return Math.max(0,K.unreadCount-Le)}function oe(K){if(!e.requestAnimationFrame)return st(K);c===null&&(c=e.requestAnimationFrame(()=>{c=null,st(K)}))}function _e(K){K.sound=Q("preferences",{}).sound!==!1}function Ce(K=!1){try{if(!s)return Promise.resolve(!1);if((!E||E.state==="closed")&&(E=new s,A=null,C=null,O=null),E.state==="running")return Promise.resolve(!0);if(C&&!K)return O||Promise.resolve(!1);const ve=E,Le=Promise.resolve(ve.resume()).then(()=>ve.state==="running",()=>!1);if(O)return O;C=Le,Le.then(()=>{C===Le&&(C=null)});let tt;const at=Promise.race([Le,new Promise(ut=>{tt=l(()=>ut(!1),_0)})]).then(()=>ve.state==="running");return O=at,at.finally(()=>{_(tt),O===at&&(O=null)}),at}catch{return Promise.resolve(!1)}}function ke(K){const ve=Wf[K];if(E?.state!=="running"||!ve)return!1;try{const Le=E.currentTime,{frequency:tt,endFrequency:at,duration:ut,volume:ht}=ve,bt=E.createGain(),wt=E.createOscillator();return ve.timbre==="bell"?(A??(A=E.createPeriodicWave(new Float32Array(5),new Float32Array([0,1,.3,.1,.025]))),wt.setPeriodicWave(A)):wt.type="sine",wt.frequency.setValueAtTime(tt,Le),wt.frequency.exponentialRampToValueAtTime(at,Le+ut*.45),bt.gain.setValueAtTime(0,Le),ve.timbre==="bell"?(bt.gain.linearRampToValueAtTime(ht,Le+.003),bt.gain.exponentialRampToValueAtTime(ht*.35,Le+.06),bt.gain.exponentialRampToValueAtTime(1e-4,Le+ut-.005),bt.gain.linearRampToValueAtTime(0,Le+ut)):(bt.gain.linearRampToValueAtTime(ht,Le+.012),bt.gain.exponentialRampToValueAtTime(.001,Le+ut)),wt.connect(bt),bt.connect(E.destination),wt.onended=()=>{wt.disconnect(),bt.disconnect()},wt.start(Le),wt.stop(Le+ut),!0}catch{return!1}}async function ae(K,ve,Le){if(!m||Le!==T||!Number.isSafeInteger(ve?.unreadCount)||ve.unreadCount<0||typeof ve.enabled!="boolean"||!Array.isArray(ve.muted)||!Xl(ve.cursors)||!Xl(ve.readCursors)||ve.baselines!==void 0&&!Xl(ve.baselines)||Object.keys(ve.cursors).some(ne=>!Object.hasOwn(ve.readCursors,ne)))return;const tt=d;K.enabled=ve.enabled;const at=Ee(ve);d=at,h=ve,st(K);const ut=g;if(g=Object.fromEntries(Object.entries(ve.cursors).map(([ne,me])=>[ne,Math.max(ut?.[ne]??0,me)])),ut===null||!K.enabled)return;const ht=new Set(ve.muted),bt=Object.entries(ve.cursors).filter(([ne,me])=>me>Math.max(ut[ne]??0,ve.baselines?.[ne]??0)&&!ht.has(ne));if(!bt.length)return;const wt=pe();K.unreadCount>0&&bt.some(([ne,me])=>ne!==wt&&me>Math.max(ve.readCursors[ne],f.get(ne)??0))&&K.arrivalVersion++;
113const zt=bt.filter(([ne,me])=>me>Math.max(ve.readCursors[ne],f.get(ne)??0)),Re=b(),le=zt.filter(([ne])=>ne!==Re),we=K.sound&&tt!==null&&at>tt&&le.length>0,Ze=K.sound&&Re&&bt.some(([ne])=>ne===Re),je=(we||Ze)&&await Ce();if(!m||Le!==T||!K.enabled)return;const Tt=je&&K.sound&&Ze&&b()===Re&&ke("received");if(!zt.length&&!Tt)return;const Xe=()=>{if(!m||Le!==T||!K.enabled)return;const ne=Q("delivered",{}),me=ne&&typeof ne=="object"&&!Array.isArray(ne)?ne:{};let Ne=!1;if(Tt){const it=ve.cursors[Re],pt=Math.max(Number(me[Re]?.id)||0,it);me[Re]={id:pt,through:Math.max(Number(me[Re]?.through)||0,pt),at:o()},Ne=!0}const vt=zt.filter(([it,pt])=>{const Dt=Number(me[it]?.id)||0,pi=Math.max(Dt,Number(me[it]?.through)||0),ui=ve.readCursors[it]<pi;return ui&&pt>pi&&(me[it]={...me[it],through:pt,at:o()},Ne=!0),pt>Dt&&!ui}).filter(([it,pt])=>it!==Re&&pt>(f.get(it)??0));we&&je&&K.sound&&vt.length&&ke("notification")&&(vt.forEach(([it,pt])=>{me[it]={id:pt,through:pt,at:o()}}),Ne=!0),Ne&&he(K,"delivered",Object.fromEntries(Object.entries(me).sort((it,pt)=>(pt[1]?.at||0)-(it[1]?.at||0)).slice(0,256)))};if(n?.request&&K.storageAvailable)try{await n.request(U("delivery"),Xe)}catch{}else Xe()}return{available:!1,enabled:!0,unreadCount:0,arrivalVersion:0,sound:!0,storageAvailable:!!r,get badge(){return this.unreadCount>99?"99+":String(this.unreadCount)},get unreadLabel(){return((this.unreadCount===1?m?.unreadLabelOne:m?.unreadLabel)||":count").replace(":count",()=>String(this.unreadCount))},start(K){this.stop(),u!==K.userId&&(g=null,d=null,h=null,this.arrivalVersion=0,D.clear(),f.clear()),u=K.userId,m=K,this.available=!0,this.storageAvailable=!!r,p=Number(K.unreadCount)||0,this.enabled=K.enabled!==!1,_e(this),he(this,"available",!0);const ve=T;y=t({url:K.url,userId:K.userId,realtime:K.realtime,channel:"notifications",background:!0,onSnapshot:ut=>this.receive(ut,ve)});const Le=()=>{st(this),i.visibilityState!=="hidden"&&E&&this.sound&&this.enabled&&E.state!=="running"&&Ce(!0)};se(i,"visibilitychange",Le),se(e,"focus",Le);const tt=()=>oe(this);for(const ut of["blur","online","offline","messages:workspace-changed","messages:viewport-changed"])se(e,ut,tt);for(const ut of["shown.bs.modal","hidden.bs.modal","shown.bs.offcanvas","hidden.bs.offcanvas"])se(i,ut,tt);se(e,"messages:read",ut=>this.confirmRead(ut.detail));const at=()=>{this.sound&&this.enabled&&E?.state!=="running"&&Ce(!0)};se(i,"pointerdown",at,{capture:!0,passive:!0}),se(i,"pointerup",at,{capture:!0,passive:!0}),se(i,"touchend",at,{capture:!0,passive:!0}),se(i,"click",at,{capture:!0}),se(i,"keydown",at,{capture:!0}),se(e,"storage",ut=>{ut.key===U("preferences")&&_e(this)}),se(e,"messages:sent",ut=>this.messageSent(ut.detail)),st(this)},confirmRead(K){!m||!K||String(K.userId)!==String(u)||typeof K.chatUuid!="string"||!K.chatUuid||!Number.isSafeInteger(K.messageId)||K.messageId<=0||K.messageId<=(f.get(K.chatUuid)??0)||(f.delete(K.chatUuid),f.set(K.chatUuid,K.messageId),f.size>256&&f.delete(f.keys().next().value),h&&d!==null&&(d=Ee(h)),st(this))},receive(K,ve=T){return w=w.then(()=>ae(this,K,ve)).catch(()=>{}),w},messageSent(K){if(!m||!K)return;const ve=typeof K.clientId=="string"&&K.clientId?`client:${K.clientId}`:Number.isSafeInteger(K.messageId)&&K.messageId>0?`message:${K.messageId}`:null;if(!(!ve||D.has(ve))&&(D.add(ve),D.size>100&&D.delete(D.values().next().value),this.sound&&this.enabled&&!ke("sent"))){const Le=T;return Ce().then(tt=>{tt&&m&&Le===T&&this.sound&&this.enabled&&ke("sent")})}},stop(){T++,c!==null&&e.cancelAnimationFrame(c),c=null,y?.(),y=null,v.forEach(K=>K()),v=[],N!==null&&i.title===N&&(i.title=I),N=null,I=null,m=null,this.available=!1},toggleSound(){this.sound=!this.sound,he(this,"preferences",{sound:this.sound}),this.sound&&Ce(!0)},async testSound(K="notification"){if(!Object.hasOwn(Wf,K))return;const ve=T;await Ce(!0)&&ve===T&&m&&ke(K)}}}function T0(t){return{init(){this.$store.messageNotifications.start(t)},destroy(){this.$store.messageNotifications.stop()}}}function C0(t={}){const i=(t.window||globalThis.window)?.matchMedia?.("(prefers-reduced-motion: reduce)");let r=[],n=!1,s=!1;
113function o(){r.splice(0).forEach(_=>_.cancel())}const l=()=>{i.matches&&o()};return{init(){i?.addEventListener?.("change",l),this.$watch("$store.messageNotifications.arrivalVersion",(_,b)=>{n||_<=b||s||(s=!0,this.$nextTick(()=>{s=!1;const m=this.$store.messageNotifications;if(n||i?.matches||!this.$el.isConnected||!m.available||m.unreadCount<=0||!this.$el.animate)return;o(),r.push(this.$el.animate([{transform:"scale(1)",offset:0},{transform:"scale(1.16)",offset:.4},{transform:"scale(0.98)",offset:.75},{transform:"scale(1)",offset:1}],{duration:380,easing:"cubic-bezier(0.2, 0.7, 0.3, 1)"}));const y=this.$refs.messageBadgeNumber;y?.animate&&r.push(y.animate([{transform:"translateY(2px)",opacity:.55},{transform:"translateY(0)",opacity:1}],{duration:240,easing:"ease-out"}))}))})},destroy(){n=!0,i?.removeEventListener?.("change",l),o()}}}const Kf="[data-chat-modal-resize]",Zo="chat-modal-resize-ready",Gf="--chat-recipient-viewport-height",Yf="--chat-recipient-viewport-top",ea=new WeakMap;function A0(t={}){const e=t.window||globalThis.window,i=t.document||globalThis.document;if(!e||!i)return{refresh(){},destroy(){}};if(ea.has(i))return ea.get(i);const r=t.ResizeObserver??e.ResizeObserver,n=t.requestAnimationFrame||e.requestAnimationFrame.bind(e),s=t.cancelAnimationFrame||e.cancelAnimationFrame.bind(e),o=new Map,l=[];let _=!1;function b(h,p){return[h,p,h.getPropertyValue(p),h.getPropertyPriority(p)]}function m(h,p,c){h.getPropertyValue(p)!==c&&h.setProperty(p,c)}function y(h){if(_||o.get(h.modal)!==h)return;if(!h.modal.isConnected){d(h.modal);return}
113const p=e.visualViewport?.height||e.innerHeight;if(!Number.isFinite(p)||p<=0||(m(h.modal.style,Gf,`${p}px`),m(h.modal.style,Yf,`${e.visualViewport?.offsetTop||0}px`),!h.observer))return;const c=h.inner.offsetHeight;if(!Number.isFinite(c)||c<=0)return;const f=e.getComputedStyle(h.dialog),v=e.getComputedStyle(h.content),E=I=>Number.parseFloat(I)||0,C=E(f.marginTop)+E(f.marginBottom),O=E(v.paddingTop)+E(v.paddingBottom)+E(v.borderTopWidth)+E(v.borderBottomWidth),A=Math.min(Math.ceil(c+O),Math.max(0,Math.floor(p-C)));h.height!==A&&(h.height=A,m(h.content.style,"height",`${A}px`),!h.content.classList.contains(Zo)&&h.readyFrame===null&&(h.readyFrame=n(()=>{h.readyFrame=null,o.get(h.modal)===h&&h.content.classList.add(Zo)})))}function T(h){_||o.get(h.modal)!==h||h.frame!==null||(h.frame=n(()=>{h.frame=null,y(h)}))}function g(h){if(_||!h?.matches?.(Kf))return;const p=o.get(h);if(p){T(p);return}const c=h.querySelector(".modal-dialog"),f=h.querySelector(".modal-content"),v=f?.querySelector(".chat-modal-inner");if(!c||!v)return;const E={modal:h,dialog:c,content:f,inner:v,observer:null,frame:null,readyFrame:null,height:null,original:[b(f.style,"height"),b(h.style,Gf),b(h.style,Yf)]};o.set(h,E),f.classList.remove(Zo),r&&(E.observer=new r(()=>T(E)),E.observer.observe(v)),T(E)}function d(h){const p=o.get(h);if(p){o.delete(h),p.observer?.disconnect(),p.frame!==null&&s(p.frame),p.readyFrame!==null&&s(p.readyFrame),p.content.classList.remove(Zo);for(const[c,f,v,E]of p.original)v?c.setProperty(f,v,E):c.removeProperty(f)}}function u(h,p,c){h?.addEventListener(p,c),l.push(()=>h?.removeEventListener(p,c))}const w={refresh(h=null){if(h){const p=o.get(h);p&&T(p)}else o.forEach(T)},destroy(){_||(_=!0,[...o.keys()].forEach(d),l.splice(0).forEach(h=>h()),ea.delete(i))}};return u(i,"show.bs.modal",h=>{h.defaultPrevented||g(h.target)}),u(i,"shown.bs.modal",h=>g(h.target)),u(i,"hidden.bs.modal",h=>d(h.target)),u(i,"livewire:navigating",()=>[...o.keys()].forEach(d)),u(e,"resize",()=>w.refresh()),u(e.visualViewport,"resize",()=>w.refresh()),u(e.visualViewport,"scroll",()=>w.refresh()),i.querySelectorAll(`${Kf}.show`).forEach(g),ea.set(i,w),w}function x0(){let t=null,e=null,i=null;const r=[];return{init(){const n=()=>{t===null&&(t=requestAnimationFrame(()=>{t=null,this.fitViewport()}))},s=(o,l)=>{o?.addEventListener(l,n,{passive:!0}),r.push(()=>o?.removeEventListener(l,n))};s(window,"resize"),s(window,"messages:workspace-changed"),s(window.visualViewport,"resize"),s(window.visualViewport,"scroll"),window.ResizeObserver&&(e=new ResizeObserver(n),e.observe(document.body),e.observe(this.$el),document.querySelectorAll(".main-nav, .navigation-announcement, .mobile-back-button, .tab-bar").forEach(o=>e.observe(o))),i=new MutationObserver(n),i.observe(document.body,{attributes:!0,attributeFilter:["class","style"],childList:!0}),this.fitViewport()},fitViewport(){if(!this.$el.isConnected)return;const n=window.visualViewport;if(n&&Math.abs(n.scale-1)>.01)return;const s=window.innerWidth<768&&this.$el.querySelector(".chat-conversation"),o=s?n?.offsetTop??0:this.$el.getBoundingClientRect().top+window.scrollY;let l=(n?.offsetTop??0)+(n?.height??window.innerHeight);const _=document.querySelector(".tab-bar");!s&&_?.getClientRects().length&&(l=Math.min(l,_.getBoundingClientRect().top-8));const b={"--chat-layout-height":`${Math.max(0,Math.floor(l-o))}px`,"--chat-layout-top":`${Math.round(o)}px`};for(const[m,y]of Object.entries(b))this.$el.style.getPropertyValue(m)!==y&&this.$el.style.setProperty(m,y)},destroy(){t!==null&&cancelAnimationFrame(t),e?.disconnect(),i?.disconnect(),r.forEach(n=>n())}}}const Im=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,Jl=(t,e,i)=>{t?.style&&t.style.getPropertyValue(e)!==i&&t.style.setProperty(e,i)}
113,xn={default:400,min:340,max:520},Ql=t=>Math.round(Math.min(xn.max,Math.max(xn.min,Number(t)||xn.default)));function O0(t){return[[1400,1320],[1200,1140],[992,960],[768,720],[576,540]].find(([e])=>t>=e)?.[1]??t}function Zl(t,e){try{const i=new URL(t,e);if(i.origin!==new URL(e).origin||i.hash)return null;const r=i.pathname.match(/^\/messages\/?(?:([^/]+)\/?)?$/);return!r||r[1]&&!Im.test(r[1])?null:{uuid:r[1]||null,filter:i.searchParams.get("archived")==="1"?"archived":i.searchParams.get("unread")==="1"?"unread":"all"}}catch{return null}}function k0({win:t=globalThis.window,doc:e=globalThis.document}={}){let i=null,r=null,n="/feed",s=Promise.resolve(),o=0,l=null,_=null,b=null;const m=()=>`skinmc.messages.${i}.dock`,y=()=>t.dispatchEvent(new CustomEvent("messages:workspace-changed")),T=()=>e.querySelector("[data-chat-workspace]")?.__livewire?.$wire,g=new WeakSet;return{available:!1,open:!1,full:!1,desktop:!1,busy:!1,error:!1,chatUuid:null,width:xn.default,filter:"all",search:"",resizing:!1,get visible(){return this.available&&(this.full||this.desktop&&this.open)},get docked(){return this.visible&&!this.full},init(){const d=t.matchMedia("(min-width: 1100px)");this.desktop=d.matches,d.addEventListener("change",h=>{this.desktop=h.matches,l?.(),this.updateLayout(),this.sync()}),e.addEventListener("livewire:navigated",()=>this.reconcile()),e.addEventListener("livewire:navigating",()=>l?.()),t.addEventListener("pageshow",()=>this.reconcile());const u=()=>{!this.docked||b!==null||(b=t.requestAnimationFrame(()=>{b=null,this.fitDock()}))};t.addEventListener("resize",u,{passive:!0}),t.addEventListener("scroll",u,{passive:!0}),t.visualViewport?.addEventListener("resize",u,{passive:!0}),t.addEventListener("messages:dock-close",()=>this.close()),t.addEventListener("messages:dock-collapse",()=>this.collapse()),t.addEventListener("messages:dock-expand",()=>this.expand()),t.addEventListener("messages:inbox-filter-changed",h=>{if(this.filter=["all","unread","archived"].includes(h.detail.filter)?h.detail.filter:"all",this.save(),this.full){const p=new URL(t.location.href);p.searchParams.delete("archived"),p.searchParams.delete("unread"),this.filter!=="all"&&p.searchParams.set(this.filter,"1"),t.history.replaceState(t.history.state,"",p.href)}});const w=h=>{if(!this.desktop||!this.available||this.full||h.button>0||h.metaKey||h.ctrlKey||h.shiftKey||h.altKey)return null;const p=h.target.closest?.("a[href]");return!p||p.hasAttribute("download")||p.target&&p.target!=="_self"||p.hasAttribute("data-bs-toggle")||p.hasAttribute("data-chat-full-page")?null:Zl(p.href,t.location.href)?p:null};e.addEventListener("mousedown",h=>{w(h)&&h.stopPropagation()},!0),e.addEventListener("keydown",h=>{h.key==="Enter"&&w(h)&&h.stopPropagation(),h.key==="Escape"&&this.docked&&[...e.querySelectorAll('.modal.show, .offcanvas.show, .dropdown-menu.show, #app-chat [role="dialog"], #app-chat [role="menu"]')].some(p=>p.getClientRects().length)&&g.add(h)},!0),e.addEventListener("keydown",h=>{h.key!=="Escape"||h.defaultPrevented||g.has(h)||!this.docked||h.target.closest?.("#app-chat")&&(h.preventDefault(),this.close())}),e.addEventListener("click",h=>{const p=w(h);if(!p)return;h.preventDefault(),h.stopPropagation(),_=p;const c=p.closest(".chat-thread-header .mobile-back-button");p.hasAttribute("data-chat-launcher")&&this.docked?this.close():c?this.openInbox():this.openUrl(p.href,{resume:!p.closest("[data-chat-workspace]")});const f=p.closest(".dropdown")?.querySelector('[data-bs-toggle="dropdown"]');f&&t.bootstrap?.Dropdown?.getInstance(f)?.hide()},!0)},connect(d,u){if(r=d,i!==String(u.userId)){i=String(u.userId),this.open=!1,this.chatUuid=null,this.width=xn.default,this.filter="all",this.search="";try{const w=JSON.parse(t.localStorage.getItem(m())||"null");w&&(this.open=w.open===!0,this.chatUuid=Im.test(w.chatUuid||"")?w.chatUuid:null,this.width=Ql(w.width),this.filter=["all","unread","archived"].includes(w.filter)?w.filter:"all",this.search=typeof w.search=="string"?w.search.slice(0,100):""),n=t.sessionStorage.getItem(`${m()}.return`)||"/feed"}catch{}}this.available=!0,this.reconcile()},reconcile(){if(i!==null){if(!r?.isConnected&&(r=e.querySelector("[data-chat-shell]"),!r)){this.available=!1;return}if(this.full=!!e.querySelector("[data-messages-page]"),this.full){const d=new URL(t.location.href);d.hash="";const u=Zl(d.href,t.location.href);this.chatUuid=u?.uuid??null,this.filter=u?.filter??"all"}else{n=t.location.pathname+t.location.search;try{t.sessionStorage.setItem(`${m()}.return`,n)}catch{}}this.save(),this.updateLayout(),this.sync()}},save(){if(i)try{t.localStorage.setItem(m(),JSON.stringify({open:this.open,chatUuid:this.chatUuid,width:this.width,filter:this.filter,search:this.search}))}catch{}},rememberSearch(d){this.search=String(d).slice(0,100),this.save()},updateLayout(){if(!r)return;const d=this.full?"full":this.docked?"dock":"closed";r.dataset.chatMode!==d&&(r.dataset.chatMode=d),t.chatDockPresentation={userId:i,open:this.open,width:this.width};const u=e.documentElement;u?.getAttribute("data-chat-mode")!==d&&u?.setAttribute("data-chat-mode",d),Jl(u,"--chat-dock-width",`${this.width}px`),this.fitDock(),y()},fitDock(){if(!r||!this.docked)return;const d=r.getBoundingClientRect?.(),u=(d?.width??e.documentElement?.clientWidth??t.innerWidth)-this.width,w=(d?.top??0)+(t.scrollY||0),h=e.documentElement;Jl(r,"--chat-shell-top",`${Math.round(w)}px`),Jl(h,"--chat-page-container-width",`${O0(u)}px`);const p=u<992;h?.hasAttribute("data-chat-compact-nav")!==p&&h?.toggleAttribute("data-chat-compact-nav",p)},sync(){const d=++o,u=this.visible,w=this.chatUuid,h=this.filter;return this.busy=u,this.error=!1,s=s.catch(()=>{}).then(async()=>
113{if(d!==o)return;const p=T();try{if(!p)return;u?(!p.enabled||p.activeChatUuid!==w||p.filter!==h)&&await ac(p,"activate",[w,h])===!1&&d===o&&(this.chatUuid=null,this.save()):p.enabled&&await ac(p,"deactivate")}catch{d===o&&(this.error=!0)}finally{d===o&&(this.busy=!1,y())}}),s},openUrl(d,{resume:u=!1}={}){if(!this.available||!this.desktop||this.full)return!1;const w=Zl(d,t.location.href);return w?((!u||w.uuid)&&(this.chatUuid=w.uuid),(!u||w.uuid||w.filter!=="all")&&(this.filter=w.filter),this.open=!0,this.chatUuid&&t.dispatchEvent(new CustomEvent("messages:conversation-opened",{detail:{chatUuid:this.chatUuid}})),this.save(),this.updateLayout(),this.sync().then(()=>this.focusChat()),!0):!1},openInbox(){this.chatUuid=null,this.open=!0,this.save(),this.updateLayout(),this.sync().then(()=>this.focusChat())},focusChat(){if(!this.visible||this.busy||this.error)return;e.querySelector(this.chatUuid?"[data-chat-workspace] .inbox-textarea":'[data-chat-workspace] input[type="search"]')?.focus({preventScroll:!0})},close(){this.open=!1,l?.(),this.save(),this.updateLayout(),this.sync();const d=e.querySelector("[data-chat-launcher]"),u=_?.isConnected&&!_.closest("[data-chat-workspace]")?_:d;(u?.closest?.(".dropdown")?.querySelector('[data-bs-toggle="dropdown"]')||u)?.focus({preventScroll:!0})},toggleLayout(){this.full?this.collapse():this.expand()},collapse(){if(!this.desktop)return;this.open=!0,this.save();let d;try{d=new URL(n,t.location.href)}catch{d=new URL("/feed",t.location.href)}(d.origin!==t.location.origin||/^\/messages(?:\/|$)/.test(d.pathname))&&(d=new URL("/feed",t.location.href)),t.Livewire?.navigate?t.Livewire.navigate(d.href):t.location.assign(d.href)},expand(){const d=new URL(`/messages${this.chatUuid?"/"+this.chatUuid:""}`,t.location.href);this.filter!=="all"&&d.searchParams.set(this.filter,"1"),this.open=!0,this.save(),t.Livewire?.navigate?t.Livewire.navigate(d.href):t.location.assign(d.href)},resizeBy(d){this.width=Ql(this.width+d),this.updateLayout(),this.save()},resizeKey(d){const u={ArrowLeft:20,ArrowRight:-20,Home:xn.min-this.width,End:xn.max-this.width};d.key in u&&(d.preventDefault(),this.resizeBy(u[d.key]))},startResize(d){if(d.button!==0||!this.docked)return;d.preventDefault(),l?.();const u=d.clientX,w=this.width,h=d.currentTarget;this.resizing=!0,h.setPointerCapture(d.pointerId);let p=null,c=w;const f=()=>{p=null,this.width!==c&&(this.width=c,this.updateLayout())},v=C=>{c=Ql(w+u-C.clientX),p===null&&c!==this.width&&(p=t.requestAnimationFrame(f))},E=()=>{p!==null&&(t.cancelAnimationFrame(p),f()),h.removeEventListener("pointermove",v),h.removeEventListener("pointerup",E),h.removeEventListener("pointercancel",E),h.removeEventListener("lostpointercapture",E),h.hasPointerCapture(d.pointerId)&&h.releasePointerCapture(d.pointerId),this.resizing=!1,l=null,this.save()};l=E,h.addEventListener("pointermove",v),h.addEventListener("pointerup",E),h.addEventListener("pointercancel",E),h.addEventListener("lostpointercapture",E)}}}function I0(t){return{init(){this.$store.chatDock.connect(this.$el,t)}}}const P0=new Set(["image/jpeg","image/png","image/webp"]),L0=new Set(["jpg","jpeg","png","webp"]),ta=1920,ia=1080,M0=1.5,Xf=16/9,ra=720,na=1280,R0=1.5,ec=9/16,D0=.02;function ss(t,e=""){return typeof t=="string"?t:e}function N0(t){return String(t||"").split(".").pop()?.toLowerCase().trim()||""}function $0(t={}){const e=ss(t.desktopPreview),i=ss(t.mobilePreview),r=Number.isFinite(t.maxFileBytes)&&Number(t.maxFileBytes)>0?Number(t.maxFileBytes):20*1024*1024,n={unsupportedImageType:"Only JPEG, PNG, and WebP images are supported.",desktopTooLarge:"Desktop image exceeds the current upload limit.",mobileTooLarge:"Mobile image exceeds the current upload limit.",desktopPreviewFailed:"Could not preview desktop image.",mobilePreviewFailed:"Could not preview mobile image.",chooseMobileBeforeCrop:"Choose an image first before cropping.",editorPreviewFailed:"Could not load image editor preview.",editorUnavailable:"Image editor is unavailable right now.",editorStartFailed:"Could not start image editor.",zoomFailed:"Could not adjust zoom. Please try again.",cropApplyFailed:"Could not apply crop. Please try again.",desktopDimensionsUnreadable:"Could not read desktop image dimensions.",desktopTooSmall:"Desktop image is too small (:widthx:height). Minimum is :min_widthx:min_height.",desktopMustBeLandscape:"Desktop image must be landscape.",desktopMustBeWidescreen:"Desktop image must use a 16:9 aspect ratio.",mobileDimensionsUnreadable:"Could not read mobile image dimensions.",mobileTooSmall:"Mobile image is too small (:widthx:height). Minimum is :min_widthx:min_height."},s=typeof t.messages=="object"&&t.messages!==null?t.messages:{},o=Object.fromEntries(Object.entries(n).map(([l,_])=>[l,ss(s[l],_)]));return{initialDesktopPreview:e,initialMobilePreview:i,maxFileBytes:r,messages:o,desktopPreview:e,mobilePreview:i,desktopPreviewObjectUrl:null,mobilePreviewObjectUrl:null,desktopCropData:ss(t.desktopCropData),mobileCropData:ss(t.mobileCropData),desktopFileName:"",mobileFileName:"",desktopDragging:!1,mobileDragging:!1,desktopClientError:"",mobileClientError:"",mobileUsesDesktop:!1,pendingImageSelections:0,isSubmitting:!1,get isPreparingImages(){return this.pendingImageSelections>0},isImageEditorOpen:!1,isImageEditorBusy:!1,imageEditorPreviewSrc:"",imageEditorPreviewObjectUrl:null,imageEditorCroppr:null,imageEditorTargetEl:null,imageEditorCropData:null,imageEditorCropError:"",imageEditorVariant:null,imageEditorAspectRatio:"desktop",imageEditorAspectRatioOptions:[{key:"desktop",label:"16:9",value:9/16}],imageEditorZoomLevel:1,imageEditorZoomMin:1,imageEditorZoomMax:4,imageEditorZoomStep:.1,imageEditorReferenceArea:null,init(){typeof this.desktopCropData!="string"&&(this.desktopCropData=""),typeof this.mobileCropData!="string"&&(this.mobileCropData=""),window.addEventListener("beforeunload",()=>{this.revokeDesktopPreviewUrl(),this.revokeMobilePreviewUrl(),this.revokeImageEditorPreviewUrl()})},startSubmit(l){if(l.defaultPrevented||this.isSubmitting||this.isPreparingImages||this.isImageEditorBusy||this.desktopClientError||this.mobileClientError){l.preventDefault();return}this.isSubmitting=!0},async onDesktopDrop(l){this.desktopDragging=!1;const _=l?.dataTransfer?.files?.[0];await this.selectDesktopFile(_,{assignToInput:!0})},async onDesktopInputChange(l){const _=l?.target?.files?.[0];await this.selectDesktopFile(_)},async selectDesktopFile(l,_={}){if(l instanceof File){if(!this.isSupportedUploadImage(l)){this.desktopClientError=this.messages.unsupportedImageType,this.$refs.desktopInput&&(this.$refs.desktopInput.value="");return}if(l.size>this.maxFileBytes){this.desktopClientError=this.messages.desktopTooLarge,this.$refs.desktopInput&&(this.$refs.desktopInput.value="");return}_.assignToInput&&this.assignFileToInput(this.$refs.desktopInput,l),this.mobileUsesDesktop&&this.clearMobileSelection(),this.desktopClientError="",this.desktopFileName=l.name,this.desktopCropData="",this.pendingImageSelections++;try{const[b,m]=await Promise.all([this.createPreviewSource(l),this.readImageDimensions(l)]);if(this.$refs.desktopInput?.files?.[0]!==l){b.shouldRevoke&&this.revokeObjectUrl(b.url);return}this.setDesktopPreview(b);const y=this.getDesktopSelectionState(m.width,m.height);if(this.desktopClientError=y.error,!y.error&&!this.$refs.mobileInput?.files?.length&&await this.selectMobileFile(l,{assignToInput:!0,useDesktop:!0}),this.$refs.desktopInput?.files?.[0]!==l)return;y.shouldOpenEditor&&await this.openDesktopImageEditor()}catch{this.$refs.desktopInput?.files?.[0]===l&&(this.desktopClientError=this.messages.desktopPreviewFailed)}finally{this.pendingImageSelections--}}},clearDesktopSelection(){this.$refs.desktopInput&&(this.$refs.desktopInput.value=""),this.mobileUsesDesktop&&this.clearMobileSelection(),this.revokeDesktopPreviewUrl(),this.desktopPreview=this.initialDesktopPreview,this.desktopFileName="",this.desktopClientError="",this.desktopCropData="",this.closeImageEditor()},async onMobileDrop(l){this.mobileDragging=!1;const _=l?.dataTransfer?.files?.[0];await this.selectMobileFile(_,{assignToInput:!0})},async onMobileInputChange(l){const _=l?.target?.files?.[0];await this.selectMobileFile(_)},async selectMobileFile(l,_={}){if(!(l instanceof File))return;if(!this.isSupportedUploadImage(l)){this.mobileClientError=this.messages.unsupportedImageType,this.$refs.mobileInput&&(this.$refs.mobileInput.value="");return}if(l.size>this.maxFileBytes){this.mobileClientError=this.messages.mobileTooLarge,this.$refs.mobileInput&&(this.$refs.mobileInput.value="");return}if(_.assignToInput&&this.assignFileToInput(this.$refs.mobileInput,l),this.$refs.mobileInput?.files?.[0]!==l)return;this.mobileUsesDesktop=_.useDesktop===!0,this.mobileClientError="",this.mobileFileName=l.name,this.mobileCropData="",this.pendingImageSelections++;let b;try{const m=await this.readImageDimensions(l);let y="",T;if(_.useDesktop){const g=this.getLargestCropDimensions(m.width,m.height,ec);if(!g)throw new Error("Could not calculate mobile crop.");const d={x:Math.floor((m.width-g.width)/2),y:Math.floor((m.height-g.height)/2),...g},u=await Oa(l,d);b=await this.createPreviewSource(u),y=JSON.stringify(d),T={error:this.getMobileCropValidationMessage(d.width,d.height),shouldOpenEditor:!1}}
113else b=await this.createPreviewSource(l),T=this.getMobileSelectionState(m.width,m.height);if(this.$refs.mobileInput?.files?.[0]!==l){b.shouldRevoke&&this.revokeObjectUrl(b.url);return}this.setMobilePreview(b),this.mobileCropData=y,this.mobileClientError=T.error,T.shouldOpenEditor&&await this.openImageEditor()}catch{this.$refs.mobileInput?.files?.[0]===l&&(this.mobileClientError=this.messages.mobilePreviewFailed)}finally{this.pendingImageSelections--}},clearMobileSelection(){this.$refs.mobileInput&&(this.$refs.mobileInput.value=""),this.revokeMobilePreviewUrl(),this.mobilePreview=this.initialMobilePreview,this.mobileFileName="",this.mobileUsesDesktop=!1,this.mobileClientError="",this.mobileCropData="",this.closeImageEditor()},async openDesktopImageEditor(){await this.openImageEditorForVariant("desktop")},async openImageEditor(){await this.openImageEditorForVariant("mobile")},async openImageEditorForVariant(l){const _=this.getImageEditorVariantConfig(l),b=this.getImageEditorFile(_.key);if(!this.isSupportedUploadImage(b)){this[_.errorKey]=this.messages.chooseMobileBeforeCrop;return}this.destroyImageEditorCroppr(),this.imageEditorCropError="",this.imageEditorZoomLevel=this.imageEditorZoomMin,this.imageEditorReferenceArea=null,this.imageEditorTargetEl=null,this.imageEditorVariant=_.key,this.imageEditorAspectRatio=_.key,this.imageEditorAspectRatioOptions=[_.option],this[_.errorKey]="";try{this.setImageEditorPreview(await this.createPreviewSource(b))}catch{this[_.errorKey]=this.messages.editorPreviewFailed;return}this.isImageEditorBusy=!1,this.isImageEditorOpen=!0,this.$nextTick(()=>{this.initImageEditorCroppr()})},getImageEditorVariantConfig(l){return l==="mobile"?{key:"mobile",errorKey:"mobileClientError",option:{key:"mobile",label:"9:16",value:16/9}}:{key:"desktop",errorKey:"desktopClientError",option:{key:"desktop",label:"16:9",value:9/16}}},getImageEditorFile(l){return l==="mobile"?this.$refs.mobileInput?.files?.[0]:this.$refs.desktopInput?.files?.[0]},getImageEditorAspectRatioValue(){return this.imageEditorVariant==="mobile"?16/9:9/16},initImageEditorCroppr(){const l=this.imageEditorCroppr?._restore?.element||null,_=this.imageEditorTargetEl?.isConnected?this.imageEditorTargetEl:null,b=l||this.$refs.imageEditorTarget||_;if(this.destroyImageEditorCroppr(),typeof window.Croppr!="function"){this.imageEditorCropError=this.messages.editorUnavailable;return}if(!b){this.imageEditorCropError=this.messages.editorStartFailed;return}this.imageEditorTargetEl=b,this.imageEditorCroppr=new window.Croppr(b,{aspectRatio:this.getImageEditorAspectRatioValue(),startSize:[100,100],onInitialize:m=>{this.imageEditorCropData=m.getValue(),this.imageEditorReferenceArea=this.getCropArea(m.getValue("raw")),this.imageEditorZoomLevel=this.imageEditorZoomMin},onCropEnd:m=>{this.imageEditorCropData=m,this.syncImageEditorZoomLevel()}})},setImageEditorAspectRatio(){},zoomImageEditorIn(){this.setImageEditorZoom(this.imageEditorZoomLevel+this.imageEditorZoomStep)},zoomImageEditorOut(){this.setImageEditorZoom(this.imageEditorZoomLevel-this.imageEditorZoomStep)},setImageEditorZoom(l){if(!this.imageEditorCroppr)return;const _=this.clampImageEditorZoom(l),m=this.getImageEditorCurrentZoomLevel()/_;if(!wu(this.imageEditorCroppr,m,{minSize:24})){this.imageEditorCropError=this.messages.zoomFailed;return}this.imageEditorCropError="",this.syncImageEditorZoomLevel()},syncImageEditorZoomLevel(){this.imageEditorZoomLevel=this.getImageEditorCurrentZoomLevel()},getImageEditorCurrentZoomLevel(){const l=this.imageEditorCroppr?.getValue?.("raw"),_=this.getCropArea(l);if(!_)return this.imageEditorZoomMin;const b=Math.max(1,Number.isFinite(this.imageEditorReferenceArea)?this.imageEditorReferenceArea:_),m=Math.sqrt(b/_);return this.clampImageEditorZoom(m)},clampImageEditorZoom(l){const _=Number(l);return Number.isFinite(_)?Math.min(this.imageEditorZoomMax,Math.max(this.imageEditorZoomMin,_)):this.imageEditorZoomMin},getCropArea(l){if(!l||typeof l!="object")return null;const _=Number(l.width),b=Number(l.height);return!Number.isFinite(_)||!Number.isFinite(b)||_<=0||b<=0?null:_*b},async applyImageEditor(){if(!this.imageEditorCropData){this.closeImageEditor();return}const l=this.imageEditorVariant==="mobile"?"mobile":"desktop",_=this.getImageEditorFile(l);
113if(!this.isSupportedUploadImage(_)){const b=l==="mobile"?"mobileClientError":"desktopClientError";this[b]=this.messages.chooseMobileBeforeCrop,this.closeImageEditor();return}this.isImageEditorBusy=!0,this.imageEditorCropError="";try{const b=await Oa(_,this.imageEditorCropData,{outputType:_.type||"image/jpeg"}),m=await this.createPreviewSource(b),y=await this.readImageDimensions(b),T=JSON.stringify(this.imageEditorCropData);l==="mobile"?(this.setMobilePreview(m),this.mobileClientError=this.getMobileCropValidationMessage(y.width,y.height),this.mobileCropData=T):(this.setDesktopPreview(m),this.desktopClientError=this.getDesktopCropValidationMessage(y.width,y.height),this.desktopCropData=T),this.closeImageEditor()}catch{this.imageEditorCropError=this.messages.cropApplyFailed,this.isImageEditorBusy=!1}},closeImageEditor(){this.destroyImageEditorCroppr(),this.isImageEditorOpen=!1,this.isImageEditorBusy=!1,this.revokeImageEditorPreviewUrl(),this.imageEditorPreviewSrc="",this.imageEditorTargetEl=null,this.imageEditorCropError="",this.imageEditorCropData=null,this.imageEditorVariant=null,this.imageEditorZoomLevel=this.imageEditorZoomMin,this.imageEditorReferenceArea=null,this.imageEditorAspectRatio="desktop",this.imageEditorAspectRatioOptions=[{key:"desktop",label:"16:9",value:9/16}]},destroyImageEditorCroppr(){this.imageEditorCroppr&&(this.imageEditorCroppr.destroy(),this.imageEditorCroppr=null)},getDesktopSelectionState(l,_){const b=Math.floor(Number(l)||0),m=Math.floor(Number(_)||0);if(b<=0||m<=0)return{error:this.messages.desktopDimensionsUnreadable,shouldOpenEditor:!1};const y=this.isDesktopAtLeastMinimum(b,m),T=this.isValidDesktopAspectRatio(b,m);return y&&T?{error:"",shouldOpenEditor:!1}:this.canRecoverDesktopImageByCropping(b,m)?{error:"",shouldOpenEditor:!0}:y?{error:this.getDesktopValidationMessage(b,m),shouldOpenEditor:!1}:{error:this.getDesktopValidationMessage(b,m),shouldOpenEditor:!1}},getDesktopValidationMessage(l,_){const b=Math.floor(Number(l)||0),m=Math.floor(Number(_)||0);return b<=0||m<=0?this.messages.desktopDimensionsUnreadable:b<ta||m<ia?this.interpolateMessage(this.messages.desktopTooSmall,{width:b,height:m,min_width:ta,min_height:ia}):b<=m?this.messages.desktopMustBeLandscape:this.isValidDesktopAspectRatio(b,m)?"":this.messages.desktopMustBeWidescreen},getDesktopCropValidationMessage(l,_){const b=Math.floor(Number(l)||0),m=Math.floor(Number(_)||0);return b<=0||m<=0?this.messages.desktopDimensionsUnreadable:b<=m?this.messages.desktopMustBeLandscape:this.isDesktopAtLeastMinimum(b,m)&&this.isValidDesktopAspectRatio(b,m)||this.isValidDesktopAspectRatio(b,m)&&this.canUpscaleToDesktopMinimum(b,m)?"":this.getDesktopValidationMessage(b,m)},isDesktopAtLeastMinimum(l,_){const b=Math.floor(Number(l)||0),m=Math.floor(Number(_)||0);return b>=ta&&m>=ia},canUpscaleToDesktopMinimum(l,_){const b=Math.floor(Number(l)||0),m=Math.floor(Number(_)||0);if(b<=0||m<=0)return!1;const y=Math.max(ta/b,ia/m);return Number.isFinite(y)&&y<=M0},canRecoverDesktopImageByCropping(l,_){const b=this.getLargestCropDimensions(l,_,Xf);return b?this.isDesktopAtLeastMinimum(b.width,b.height)?!0:this.canUpscaleToDesktopMinimum(b.width,b.height):!1},getMobileSelectionState(l,_){const b=Math.floor(Number(l)||0),m=Math.floor(Number(_)||0);if(b<=0||m<=0)return{error:this.messages.mobileDimensionsUnreadable,shouldOpenEditor:!1};const y=this.isMobileAtLeastMinimum(b,m),T=this.isValidMobileAspectRatio(b,m);return y&&T?{error:"",shouldOpenEditor:!1}:this.canRecoverMobileImageByCropping(b,m)?{error:"",shouldOpenEditor:!0}:y?{error:"",shouldOpenEditor:!0}:{error:this.getMobileValidationMessage(b,m),shouldOpenEditor:!1}},getMobileValidationMessage(l,_){const b=Math.floor(Number(l)||0),m=Math.floor(Number(_)||0);return b<=0||m<=0?this.messages.mobileDimensionsUnreadable:b<ra||m<na?this.interpolateMessage(this.messages.mobileTooSmall,{width:b,height:m,min_width:ra,min_height:na}):""},getMobileCropValidationMessage(l,_){const b=Math.floor(Number(l)||0),m=Math.floor(Number(_)||0);return b<=0||m<=0?this.messages.mobileDimensionsUnreadable:this.isMobileAtLeastMinimum(b,m)||this.canUpscaleToMobileMinimum(b,m)?"":this.getMobileValidationMessage(b,m)},isMobileAtLeastMinimum(l,_){const b=Math.floor(Number(l)||0),m=Math.floor(Number(_)||0);return b>=ra&&m>=na},canUpscaleToMobileMinimum(l,_){const b=Math.floor(Number(l)||0),m=Math.floor(Number(_)||0);if(b<=0||m<=0)return!1;const y=Math.max(ra/b,na/m);return Number.isFinite(y)&&y<=R0},canRecoverMobileImageByCropping(l,_){const b=this.getLargestCropDimensions(l,_,ec);return b?this.isMobileAtLeastMinimum(b.width,b.height)?!0:this.canUpscaleToMobileMinimum(b.width,b.height):!1},getLargestCropDimensions(l,_,b){const m=Math.floor(Number(l)||0),y=Math.floor(Number(_)||0);if(m<=0||y<=0)return null;const T=m/y;let g,d;return T>b?(d=y,g=Math.floor(d*b)):(g=m,d=Math.floor(g/b)),g<=0||d<=0?null:{width:g,height:d}},interpolateMessage(l,_={}){let b=ss(l);return Object.entries(_).forEach(([m,y])=>{b=b.split(`:${m}`).join(String(y))}),b},isValidMobileAspectRatio(l,_){return this.isValidAspectRatio(l,_,ec)},isValidDesktopAspectRatio(l,_){return this.isValidAspectRatio(l,_,Xf)},isValidAspectRatio(l,_,b){const m=Number(l),y=Number(_);if(!Number.isFinite(m)||!Number.isFinite(y)||m<=0||y<=0)return!1;const T=m/y;return Math.abs(T-b)<=D0},readImageDimensions(l){return new Promise((_,b)=>{if(!(l instanceof Blob)){b(new Error("Expected image file input."));return}const m=URL.createObjectURL(l),y=new Image;y.onload=()=>
113{const T=y.naturalWidth||y.width,g=y.naturalHeight||y.height;URL.revokeObjectURL(m),_({width:T,height:g})},y.onerror=()=>{URL.revokeObjectURL(m),b(new Error("Could not decode image file."))},y.src=m})},isSupportedUploadImage(l){if(!(l instanceof File))return!1;const _=String(l.type||"").toLowerCase().trim();return _!==""?P0.has(_):L0.has(N0(l.name))},assignFileToInput(l,_){if(!(!(_ instanceof File)||!l))try{const b=new DataTransfer;b.items.add(_),l.files=b.files}catch{}},async createPreviewSource(l){if(!(l instanceof Blob))throw new Error("Expected file-like object.");return typeof URL<"u"&&typeof URL.createObjectURL=="function"?{url:URL.createObjectURL(l),shouldRevoke:!0}:{url:await xa(l),shouldRevoke:!1}},setDesktopPreview(l){this.revokeDesktopPreviewUrl(),this.desktopPreviewObjectUrl=l.shouldRevoke?l.url:null,this.desktopPreview=l.url},setMobilePreview(l){this.revokeMobilePreviewUrl(),this.mobilePreviewObjectUrl=l.shouldRevoke?l.url:null,this.mobilePreview=l.url},setImageEditorPreview(l){this.revokeImageEditorPreviewUrl(),this.imageEditorPreviewObjectUrl=l.shouldRevoke?l.url:null,this.imageEditorPreviewSrc=l.url},revokeDesktopPreviewUrl(){this.revokeObjectUrl(this.desktopPreviewObjectUrl),this.desktopPreviewObjectUrl=null},revokeMobilePreviewUrl(){this.revokeObjectUrl(this.mobilePreviewObjectUrl),this.mobilePreviewObjectUrl=null},revokeImageEditorPreviewUrl(){this.revokeObjectUrl(this.imageEditorPreviewObjectUrl),this.imageEditorPreviewObjectUrl=null},revokeObjectUrl(l){typeof l!="string"||l===""||typeof URL>"u"||typeof URL.revokeObjectURL!="function"||URL.revokeObjectURL(l)}}}const Eu=Object.freeze(["head","body","leftArm","rightArm","leftLeg","rightLeg"]),Su=Object.freeze(["head","leftArm","rightArm","leftLeg","rightLeg"]),F0=Object.freeze(["x","y","z"]),Nc=Object.freeze({head:Object.freeze({x:[-60,60],y:[-85,85],z:[-45,45]}),body:Object.freeze({x:[-30,30],y:[-180,180],z:[-30,30]}),leftArm:Object.freeze({x:[-180,180],y:[-90,90],z:[-180,180]}),rightArm:Object.freeze({x:[-180,180],y:[-90,90],z:[-180,180]}),leftLeg:Object.freeze({x:[-180,180],y:[-90,90],z:[-180,180]}),rightLeg:Object.freeze({x:[-180,180],y:[-90,90],z:[-180,180]})}),Ia=Object.freeze({straight:Object.freeze({}),turn_left:Object.freeze({body:Object.freeze({y:-25}),head:Object.freeze({y:25})}),turn_right:Object.freeze({body:Object.freeze({y:25}),head:Object.freeze({y:-25})})}),j0=Object.freeze([...Object.keys(Ia),"custom"]);function U0(t,e,i){const r=Number(t);return Number.isFinite(r)?Math.round(Math.min(i,Math.max(e,r))*10)/10:0}function sa(t){return Su.includes(t)}function _O(t){return t==="bust_3d"?[...Su]:[]}function $c(){return Object.fromEntries(Eu.map(t=>[t,{x:0,y:0,z:0}]))}function Pm(t){const e=$c(),i=Ia[t]||Ia.straight;for(const[r,n]of Object.entries(i))Object.assign(e[r],n);return e}function ds(t={},e="straight"){const i=Pm(e);for(const r of Eu)for(const n of F0){const[s,o]=Nc[r][n],l=t?.[r]?.[n];Number.isFinite(Number(l))&&(i[r][n]=U0(l,s,o))}return i}function EO(t){const e=ds(t);return Object.fromEntries(Eu.map(i=>[i,{...e[i]}]))}const os=Object.freeze({positionX:0,positionY:0,scale:1}),sr=100,Jf=Object.freeze({min:1,max:3});function Zs(t,e,i,r){const n=Number(t);return Number.isFinite(n)?Math.min(i,Math.max(e,n)):r}function B0(t){return{width:Number(t?.naturalWidth||t?.videoWidth||t?.width||0),height:Number(t?.naturalHeight||t?.videoHeight||t?.height||0)}}function Fi(t={}){const e=t&&typeof t=="object"?t:{};return{positionX:Zs(e.positionX,-sr,sr,0),positionY:Zs(e.positionY,-sr,sr,0),scale:Zs(e.scale,Jf.min,Jf.max,1)}}function vo(t,e,i,r={}){const n=B0(t),s=Math.max(0,Number(e)||0),o=Math.max(0,Number(i)||0),l=Fi(r);if(!n.width||!n.height||!s||!o)return{x:0,y:0,width:0,height:0};const _=Math.max(s/n.width,o/n.height),b=n.width*_*l.scale,m=n.height*_*l.scale,y=Math.max(0,(b-s)/2),T=Math.max(0,(m-o)/2);return{x:(s-b)/2+l.positionX/sr*y,y:(o-m)/2+l.positionY/sr*T,width:b,height:m}}
113function q0(t,e,i,r,n,s){const o=Fi(t),l=Math.max(0,Number(n)||0),_=Math.max(0,Number(s)||0),b=Number.isFinite(Number(e))?Number(e):0,m=Number.isFinite(Number(i))?Number(i):0,y=vo(r,l,_,o),T=Math.max(0,(y.width-l)/2),g=Math.max(0,(y.height-_)/2);return Fi({...o,positionX:T>0?o.positionX+b/T*sr:0,positionY:g>0?o.positionY+m/g*sr:0})}function V0(t,e,i,r,n,s,o){const l=Fi(t),_=Math.max(0,Number(s)||0),b=Math.max(0,Number(o)||0),m=vo(n,_,b,l);if(!m.width||!m.height)return l;const y=Fi({...l,scale:e});if(y.scale===l.scale)return l;const T=Zs(i,0,_,_/2),g=Zs(r,0,b,b/2),d=y.scale/l.scale,u=m.width*d,w=m.height*d,h=(T-m.x)/m.width,p=(g-m.y)/m.height,c=T-h*u,f=g-p*w,v=Math.max(0,(u-_)/2),E=Math.max(0,(w-b)/2);return Fi({scale:y.scale,positionX:v>0?(c+u/2-_/2)/v*sr:0,positionY:E>0?(f+w/2-b/2)/E*sr:0})}function H0(t,e,i,r,n,s,o){const l=Fi(t);if(!["nw","ne","se","sw"].includes(e))return l;const _=Math.max(0,Number(s)||0),b=Math.max(0,Number(o)||0),m=Number.isFinite(Number(i))?Number(i):0,y=Number.isFinite(Number(r))?Number(r):0,T=vo(n,_,b,l);if(!T.width||!T.height)return l;const g=e.includes("e"),d=e.includes("s"),u=((g?m:-m)*T.width+(d?y:-y)*T.height)/(T.width**2+T.height**2),w=Fi({...l,scale:l.scale*(1+u)}),h=w.scale/l.scale,p=T.width*h,c=T.height*h,f=g?T.x:T.x+T.width,v=d?T.y:T.y+T.height,E=g?f:f-p,C=d?v:v-c,O=Math.max(0,(p-_)/2),A=Math.max(0,(c-b)/2);return Fi({scale:w.scale,positionX:O>0?(E+p/2-_/2)/O*sr:0,positionY:A>0?(C+c/2-b/2)/A*sr:0})}function SO(t,e,i,r,n={}){const s=vo(e,i,r,n);return t.clearRect(0,0,i,r),!s.width||!s.height||t.drawImage(e,s.x,s.y,s.width,s.height),s}const z0="skinmc.avatar.3dCamera.v2",W0="skinmc.avatar.3dEditor.v2",K0="skinmc.avatar.3dEditor.v1",Qf=["transparent","solid","gradient","image"],G0=15e3;let Ni=null,tc="",oa=0,Zf=null;const Y0=[{key:"front",label:"Front"},{key:"isometric",label:"Isometric"},{key:"three_quarter",label:"45° side"},{key:"looking_up",label:"Low angle"}],X0=[{key:"straight",label:"Straight"},{key:"turn_left",label:"Turn left"},{key:"turn_right",label:"Turn right"}],J0={head:"Head",leftArm:"Left arm",rightArm:"Right arm",leftLeg:"Left leg",rightLeg:"Right leg"},Q0=Su.map(t=>({key:t,label:J0[t]})),eh=[{key:"x",label:"X"},{key:"y",label:"Y"},{key:"z",label:"Z"}],Z0=[{key:"x",label:"X",min:-64,max:64,step:.1,precision:1},{key:"y",label:"Y",min:-32,max:64,step:.1,precision:1}];function ex(t={}){return Y0.map(e=>({...e,label:t[e.key]||e.label}))}function tx(t={}){return X0.map(e=>({...e,label:t[e.key]||e.label}))}function ix(t={}){return Q0.map(e=>({...e,label:t[e.key]||e.label}))}function rx(){return Zf||(Zf=Ht(()=>import("./avatar-viewer-BMgHNA2R.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]))),Zf}function th(){return{version:2,modes:{}}}function nx(t){return new Promise((e,i)=>{const r=URL.createObjectURL(t),n=new Image;n.onload=()=>{URL.revokeObjectURL(r),e(n)},n.onerror=()=>{URL.revokeObjectURL(r),i(new Error("The selected background image could not be loaded."))},n.src=r})}function ic(t,e){return/^#[0-9a-f]{6}$/i.test(t)?t:e}function sx(t={}){return{type:t.type,showNametag:!1,loading3d:!1,loadingClassic:!1,classicImageError:!1,classicLoadSequence:0,classicLoadTimeout:null,loadingBackground:!1,backgroundImageError:!1,exporting3d:!1,skinUrl:t.skinUrl||"",username:t.username||"",avatarUrl:t.avatarUrl||"",avatarViewer:null,initTimeout:null,viewerInitId:0,viewerError:!1,cameraStorageKey:z0,cameraPresets:ex(t.presetLabels),posePresets:tx(t.poseLabels),bodyParts:ix(t.bodyPartLabels),cameraAxes:Z0,camera:{fov:50,x:0,y:13.4,z:20,targetX:0,targetY:12,targetZ:0},activeCameraPreset:"front",cameraChangeUnsubscribe:null,cameraSaveTimeout:null,isApplyingCameraState:!1,editorStorageKey:W0,legacyEditorStorageKey:K0,backgroundMode:"transparent",backgroundColor:"#6c5ce7",gradientStart:"#6c5ce7",gradientEnd:"#00cec9",gradientAngle:135,backgroundImageName:tc,hasBackgroundImage:Ni!==null,backgroundPositionX:os.positionX,backgroundPositionY:os.positionY,backgroundScale:os.scale,backgroundEditing:!1,backgroundTransformDrag:null,backgroundChangeUnsubscribe:null,backgroundSaveTimeout:null,antialiasing:!0,activePose:"straight",fineControlOpen:!1,selectedPart:null,rigState:$c(),rigChangeUnsubscribe:null,partSelectUnsubscribe:null,rigSaveTimeout:null,isApplyingRigState:!1,init(){this.restoreEditorSettings(),this.$watch("type",e=>{e!=="bust_3d"&&(this.fineControlOpen=!1),["headshot_3d","bust_3d"].includes(e)||this.setBackgroun
113dEditing(!1),(e==="headshot_3d"||e==="bust_3d")&&(this.cancelClassicLoad(),this.viewerError=!1,this.$nextTick(()=>this.updateViewerMode()))}),this.$watch("showNametag",()=>this.updateNametag()),this.$watch("antialiasing",()=>this.updateAntialiasing())},destroy(){this.cancelClassicLoad(),this.disposeViewer()},is3d(){return this.type==="headshot_3d"||this.type==="bust_3d"},handleModeEffect(){if(this.is3d()){this.avatarViewer?this.updateNametag():!this.viewerError&&!this.loading3d&&!this.initTimeout&&this.start3dLoad();return}this.loading3d=!1,this.setBackgroundEditing(!1),this.disposeViewer(),this.$nextTick(()=>this.$nextTick(()=>{this.getServerData(),this.startClassicLoad()}))},getServerData(){const e=this.$el.querySelector("[data-avatar-server]");e&&(this.skinUrl=e.dataset.skinUrl||"",this.username=e.dataset.username||"",this.avatarUrl=e.dataset.avatarUrl||"")},startClassicLoad(){const e=++this.classicLoadSequence;this.classicLoadTimeout&&clearTimeout(this.classicLoadTimeout),this.classicLoadTimeout=null,this.classicImageError=!1,this.loadingClassic=!this.is3d()&&!!this.avatarUrl,this.loadingClassic&&this.$nextTick(()=>{if(e!==this.classicLoadSequence||this.is3d())return;const i=this.$refs.classicImage;if(i?.complete&&(i.currentSrc||i.src)){this.finishClassicLoad(!i.naturalWidth,e);return}this.classicLoadTimeout=setTimeout(()=>{e===this.classicLoadSequence&&this.finishClassicLoad(!0,e)},G0)})},finishClassicLoad(e=!1,i=this.classicLoadSequence){i===this.classicLoadSequence&&(this.classicLoadTimeout&&clearTimeout(this.classicLoadTimeout),this.classicLoadTimeout=null,this.loadingClassic=!1,this.classicImageError=!!e)},cancelClassicLoad(){this.classicLoadSequence+=1,this.classicLoadTimeout&&clearTimeout(this.classicLoadTimeout),this.classicLoadTimeout=null,this.loadingClassic=!1,this.classicImageError=!1},restoreEditorSettings(){try{const e=window.localStorage.getItem(this.editorStorageKey),i=e?null:window.localStorage.getItem(this.legacyEditorStorageKey),r=JSON.parse(e||i||"{}"),n=Qf.includes(r.backgroundMode)?r.backgroundMode:"transparent";this.backgroundMode=n==="image"&&!Ni?"transparent":n,this.backgroundColor=ic(r.backgroundColor,this.backgroundColor),this.gradientStart=ic(r.gradientStart,this.gradientStart),this.gradientEnd=ic(r.gradientEnd,this.gradientEnd),this.gradientAngle=Math.min(360,Math.max(0,this.roundCameraValue(r.gradientAngle??this.gradientAngle,0)));const s=Fi(r.backgroundImageTransform);this.backgroundPositionX=s.positionX,this.backgroundPositionY=s.positionY,this.backgroundScale=s.scale,this.antialiasing=r.antialiasing!==!1,this.activePose=j0.includes(r.pose)?r.pose:"straight",this.rigState=ds(r.rigState,this.activePose==="custom"?"straight":this.activePose),this.selectedPart=null,this.backgroundEditing=!1,this.backgroundImageName=tc,this.hasBackgroundImage=Ni!==null,!e&&i&&this.persistEditorSettings()}catch{}},persistEditorSettings(){try{window.localStorage.setItem(this.editorStorageKey,JSON.stringify({version:2,backgroundMode:this.backgroundMode,backgroundColor:this.backgroundColor,gradientStart:this.gradientStart,gradientEnd:this.gradientEnd,gradientAngle:this.gradientAngle,backgroundImageTransform:this.getBackgroundImageTransform(),antialiasing:this.antialiasing,pose:this.activePose,rigState:ds(this.rigState)}))}catch{}},getBackgroundConfig(){return{type:this.backgroundMode,color:this.backgroundColor,start:this.gradientStart,end:this.gradientEnd,angle:this.gradientAngle,source:this.backgroundMode==="image"?Ni:null,...this.getBackgroundImageTransform()}},getBackgroundImageTransform(){return Fi({positionX:this.backgroundPositionX,positionY:this.backgroundPositionY,scale:this.backgroundScale})},syncBackgroundState(e){if(!e||e.type!=="image")return;const i=Fi(e);this.backgroundPositionX=i.positionX,this.backgroundPositionY=i.positionY,this.backgroundScale=i.scale},queueBackgroundSave(){this.backgroundSaveTimeout&&clearTimeout(this.backgroundSaveTimeout),this.backgroundSaveTimeout=setTimeout(()=>{this.backgroundSaveTimeout=null,this.persistEditorSettings()},150)},applyBackground(e=!0){e&&this.persistEditorSettings(),!(!this.avatarViewer||typeof this.avatarViewer.setBackgroun
113d!="function")&&this.syncBackgroundState(this.avatarViewer.setBackground(this.getBackgroundConfig()))},setBackgroundMode(e){if(Qf.includes(e)){if(e==="image"&&!Ni){this.$nextTick(()=>this.$refs.backgroundImageInput?.click());return}this.backgroundMode=e,e!=="image"&&this.setBackgroundEditing(!1),this.applyBackground()}},setBackgroundColor(e,i){/^#[0-9a-f]{6}$/i.test(i)&&["backgroundColor","gradientStart","gradientEnd"].includes(e)&&(this[e]=i,this.applyBackground())},setGradientAngle(e){const i=Number(e);Number.isFinite(i)&&(this.gradientAngle=Math.min(360,Math.max(0,i)),this.applyBackground())},async handleBackgroundImage(e){const i=e.target.files?.[0];if(e.target.value="",!i||!i.type.startsWith("image/"))return;const r=++oa;this.loadingBackground=!0,this.backgroundImageError=!1;try{const n=await nx(i);if(r!==oa)return;Ni=n,tc=i.name,this.backgroundImageName=i.name,this.hasBackgroundImage=!0,this.resetBackgroundImage(!1),this.backgroundMode="image",this.applyBackground(),this.setBackgroundEditing(!0)}catch{if(r!==oa)return;this.backgroundImageError=!0}finally{r===oa&&(this.loadingBackground=!1)}},setBackgroundImageValue(e,i){if(!["positionX","positionY","scale"].includes(e))return;const r=Fi({...this.getBackgroundImageTransform(),[e]:i});this.applyBackgroundImageTransform(r)},applyBackgroundImageTransform(e){const i=Fi(e);this.backgroundPositionX=i.positionX,this.backgroundPositionY=i.positionY,this.backgroundScale=i.scale,this.avatarViewer&&typeof this.avatarViewer.setBackgroundTransform=="function"?this.syncBackgroundState(this.avatarViewer.setBackgroundTransform(i)):this.applyBackground(!1),this.queueBackgroundSave()},getBackgroundSelectionStyle(){if(!Ni)return{};const e=vo(Ni,100,100,this.getBackgroundImageTransform());return{left:`${e.x}%`,top:`${e.y}%`,width:`${e.width}%`,height:`${e.height}%`}},handleArtboardPointerDown(e){this.backgroundEditing||!e.shiftKey||this.backgroundMode!=="image"||!this.hasBackgroundImage||(e.preventDefault(),e.stopImmediatePropagation(),this.setBackgroundEditing(!0))},startBackgroundTransform(e,i="move",r=null){if(e.button!==0||!this.backgroundEditing||!Ni)return;const n=this.$refs.avatarArtboard,s=this.$refs.backgroundSelection,o=n?.getBoundingClientRect();if(!o?.width||!o?.height||!s)return;e.preventDefault(),e.stopPropagation();const l=e.currentTarget||s;try{l.setPointerCapture?.(e.pointerId)}catch{}this.backgroundTransformDrag={action:i,handle:r,pointerId:e.pointerId,captureTarget:l,startX:e.clientX,startY:e.clientY,targetWidth:o.width,targetHeight:o.height,transform:this.getBackgroundImageTransform()}},moveBackgroundTransform(e){const i=this.backgroundTransformDrag;if(!i||i.pointerId!==e.pointerId||!Ni)return;e.preventDefault();const r=e.clientX-i.startX,n=e.clientY-i.startY,s=i.action==="resize"?H0(i.transform,i.handle,r,n,Ni,i.targetWidth,i.targetHeight):q0(i.transform,r,n,Ni,i.targetWidth,i.targetHeight);this.applyBackgroundImageTransform(s)},zoomBackgroundImage(e){if(!this.backgroundEditing||!Ni||!e.deltaY)return;const i=this.$refs.avatarArtboard?.getBoundingClientRect();if(!i?.width||!i?.height)return;const r=e.clientX-i.left,n=e.clientY-i.top;if(r<0||n<0||r>i.width||n>i.height)return;const s=e.deltaMode===1?16:e.deltaMode===2?i.height:1,o=Math.max(-240,Math.min(240,Number(e.deltaY)*s));if(!o)return;e.preventDefault(),e.stopPropagation();const l=V0(this.getBackgroundImageTransform(),this.backgroundScale*Math.exp(-o*.0015),r,n,Ni,i.width,i.height);this.applyBackgroundImageTransform(l)},endBackgroundTransform(e){const i=this.backgroundTransformDrag;if(!(!i||i.pointerId!==e.pointerId)){try{i.captureTarget?.hasPointerCapture?.(e.pointerId)&&i.captureTarget.releasePointerCapture(e.pointerId)}catch{}this.backgroundTransformDrag=null,this.persistEditorSettings()}},enterBackgroundEditing(){this.backgroundMode!=="image"||!this.hasBackgroundImage||this.setBackgroundEditing(!0)},resetBackgroundImage(e=!0){this.backgroundPositionX=os.positionX,this.backgroundPositionY=os.positionY,this.backgroundScale=os.scale,e&&(this.applyBackground(!1),this.persistEditorSettings())},setBackgroundEditing(e){if(this.backgroundEditing=!!e&&this.is3d()&&this.backgroundMode==="image"&&this.hasBackgroun
113dImage,this.avatarViewer&&typeof this.avatarViewer.setBackgroundEditMode=="function"&&(this.backgroundEditing=this.avatarViewer.setBackgroundEditMode(this.backgroundEditing)),!this.backgroundEditing&&this.backgroundTransformDrag){try{const i=this.backgroundTransformDrag;i.captureTarget?.hasPointerCapture?.(i.pointerId)&&i.captureTarget.releasePointerCapture(i.pointerId)}catch{}this.backgroundTransformDrag=null}},unbindBackgroundState(){this.backgroundChangeUnsubscribe&&(this.backgroundChangeUnsubscribe(),this.backgroundChangeUnsubscribe=null)},bindBackgroundState(){if(this.unbindBackgroundState(),!this.avatarViewer||typeof this.avatarViewer.onBackgroundChange!="function")return;let e=!0;this.backgroundChangeUnsubscribe=this.avatarViewer.onBackgroundChange(i=>{if(this.syncBackgroundState(i),e){e=!1;return}this.queueBackgroundSave()})},updateAntialiasing(){this.persistEditorSettings(),!(!this.avatarViewer||typeof this.avatarViewer.setAntialias!="function")&&this.avatarViewer.setAntialias(this.antialiasing)},setPose(e){Object.prototype.hasOwnProperty.call(Ia,e)&&(this.activePose=e,this.isApplyingRigState=!0,this.avatarViewer&&typeof this.avatarViewer.setPose=="function"?this.syncRigState(this.avatarViewer.setPose(e)):this.rigState=Pm(e),this.persistEditorSettings(),this.$nextTick(()=>{this.isApplyingRigState=!1}))},getAvailableBodyParts(){return this.type==="bust_3d"?this.bodyParts:[]},getJointAxes(){const e=Nc[this.selectedPart]||Nc.head;return eh.map(i=>({...i,min:e[i.key][0],max:e[i.key][1],step:1}))},getJointValue(e){return this.roundCameraValue(this.rigState?.[this.selectedPart]?.[e]||0,1)},syncRigState(e,i=void 0){e&&(this.rigState=ds(e)),i!==void 0&&(this.selectedPart=sa(i)?i:null)},queueRigSave(){this.rigSaveTimeout&&clearTimeout(this.rigSaveTimeout),this.rigSaveTimeout=setTimeout(()=>{this.rigSaveTimeout=null,this.persistEditorSettings()},150)},unbindRigState(){this.rigChangeUnsubscribe&&(this.rigChangeUnsubscribe(),this.rigChangeUnsubscribe=null),this.partSelectUnsubscribe&&(this.partSelectUnsubscribe(),this.partSelectUnsubscribe=null)},bindRigState(){if(this.unbindRigState(),!this.avatarViewer)return;let e=!0;typeof this.avatarViewer.onRigChange=="function"&&(this.rigChangeUnsubscribe=this.avatarViewer.onRigChange((i,r)=>{if(this.syncRigState(i,r),e||this.isApplyingRigState){e=!1;return}this.activePose="custom",this.queueRigSave()})),typeof this.avatarViewer.onPartSelect=="function"&&(this.partSelectUnsubscribe=this.avatarViewer.onPartSelect(i=>{this.selectedPart=sa(i)?i:null}))},selectBodyPart(e){const i=this.getAvailableBodyParts().some(r=>r.key===e)?e:null;i&&this.backgroundEditing&&this.setBackgroundEditing(!1),this.selectedPart=i,this.avatarViewer&&typeof this.avatarViewer.selectPart=="function"&&(this.selectedPart=this.avatarViewer.selectPart(i))},toggleBodyPart(e){this.selectBodyPart(this.selectedPart===e?null:e)},setJointRotation(e,i){if(!eh.some(s=>s.key===e)||!sa(this.selectedPart))return;const r=this.rigState?.[this.selectedPart]||{x:0,y:0,z:0},n=ds({...this.rigState,[this.selectedPart]:{...r,[e]:i}});this.activePose="custom",this.rigState=n,this.avatarViewer&&typeof this.avatarViewer.setJointRotation=="function"&&this.syncRigState(this.avatarViewer.setJointRotation(this.selectedPart,n[this.selectedPart])),this.queueRigSave()},resetSelectedPart(){sa(this.selectedPart)&&(this.activePose="custom",this.avatarViewer&&typeof this.avatarViewer.resetPart=="function"?this.syncRigState(this.avatarViewer.resetPart(this.selectedPart)):this.rigState=ds({...this.rigState,[this.selectedPart]:{x:0,y:0,z:0}}),this.persistEditorSettings())},resetRig(){this.activePose="straight",this.isApplyingRigState=!0,this.avatarViewer&&typeof this.avatarViewer.resetRig=="function"?this.syncRigState(this.avatarViewer.resetRig()):this.rigState=$c(),this.persistEditorSettings(),this.$nextTick(()=>{this.isApplyingRigState=!1})},readCameraStorage(){try{const e=JSON.parse(window.localStorage.getItem(this.cameraStorageKey)||"{}");return e&&typeof e=="object"?e:th()}catch{return th()}},getStoredCameraSettings(){const e=this.readCameraStorage();return e.modes&&typeof e.modes=="object"&&e.modes[this.type]||null},writeCameraStorage(e){try{const i=this.readCameraStorage();i.version=2,i.modes=i.modes&&typeof i.modes=="object"?i.modes:{},i.modes[this.type]=e,window.localStorage.setItem(this.cameraStorageKey,JSON.stringify(i))}catch{}},clearStoredCameraSettings(){try{const e=this.readCameraStorage();e.modes=e.modes&&typeof e.modes=="object"?e.modes:{},delete e.modes[this.type],window.localStorage.setItem(this.cameraStorageKey,JSON.stringify(e))}catch{}},roundCameraValue(e,i=1){const r=Number(e);if(!Number.isFinite(r))return 0;const n=10**i;return Math.round(r*n)/n},formatCameraValue(e,i=1){return this.roundCameraValue(e,i).toFixed(i)},syncCameraState(e){e&&(this.camera={fov:this.roundCameraValue(e.fov,1),x:this.roundCameraValue(e.x,1),y:this.roundCameraValue(e.y,1),z:this.roundCameraValue(e.z,1),targetX:this.roundCameraValue(e.targetX,1
113),targetY:this.roundCameraValue(e.targetY,1),targetZ:this.roundCameraValue(e.targetZ,1)})},persistCameraState(){this.is3d()&&this.writeCameraStorage({preset:this.activeCameraPreset,state:{...this.camera}})},queueCameraSave(){this.cameraSaveTimeout&&clearTimeout(this.cameraSaveTimeout),this.cameraSaveTimeout=setTimeout(()=>{this.cameraSaveTimeout=null,this.persistCameraState()},150)},unbindCameraState(){this.cameraChangeUnsubscribe&&(this.cameraChangeUnsubscribe(),this.cameraChangeUnsubscribe=null)},bindCameraState(){if(this.unbindCameraState(),!this.avatarViewer||typeof this.avatarViewer.onCameraChange!="function")return;let e=!0;this.cameraChangeUnsubscribe=this.avatarViewer.onCameraChange(i=>{if(this.syncCameraState(i),e||this.isApplyingCameraState){e=!1;return}this.activeCameraPreset="custom",this.queueCameraSave()})},disposeViewer(){this.viewerInitId+=1,this.initTimeout&&(clearTimeout(this.initTimeout),this.initTimeout=null),this.cameraSaveTimeout&&(clearTimeout(this.cameraSaveTimeout),this.cameraSaveTimeout=null),this.rigSaveTimeout&&(clearTimeout(this.rigSaveTimeout),this.rigSaveTimeout=null),this.backgroundSaveTimeout&&(clearTimeout(this.backgroundSaveTimeout),this.backgroundSaveTimeout=null),this.unbindCameraState(),this.unbindRigState(),this.unbindBackgroundState(),this.backgroundEditing=!1,this.avatarViewer&&(this.avatarViewer.dispose(),this.avatarViewer=null)},async initViewer(){this.getServerData();const e=this.$refs.avatarCanvas;if(!e){this.loading3d=!1;return}const i=this.backgroundEditing;this.disposeViewer();const r=this.viewerInitId;try{const{initAvatarViewer:n}=await rx();if(r!==this.viewerInitId||!this.is3d())return;const s=this.getStoredCameraSettings();this.activeCameraPreset=s?.preset||"front";const o=n(e,{skinUrl:this.skinUrl,username:this.username,mode:this.t
113ype,showNametag:this.showNametag,cameraState:s?.state||null,background:this.getBackgroundConfig(),antialias:this.antialiasing,rigState:this.rigState});if(!o||r!==this.viewerInitId){o?.dispose();return}this.avatarViewer=o,this.bindCameraState(),this.bindRigState(),this.bindBackgroundState(),this.setBackgroundEditing(i||this.backgroundEditing),typeof o.getCameraState=="function"&&this.syncCameraState(o.getCameraState()),await o.ready}catch(n){if(r!==this.viewerInitId)return;this.viewerError=!0,console.error("Avatar 3D viewer failed to load.",n)}finally{r===this.viewerInitId&&(this.loading3d=!1)}},retryViewer(){this.viewerError=!1,this.start3dLoad()},async download3d(){if(this.exporting3d||!this.avatarViewer||typeof this.avatarViewer.captureAndDownload!="function")return window.dispatchEvent(new CustomEvent("avatar-download-finished")),!1;this.exporting3d=!0;try{return await this.avatarViewer.captureAndDownload("skinmc-avatar.png")}catch(e){return console.error("Avatar export failed.",e),!1}finally{this.exporting3d=!1,window.dispatchEvent(new CustomEvent("avatar-download-finished"))}},updateViewerMode(){if(!this.avatarViewer||!this.is3d())return;this.backgroundEditing=!1;const e=this.getStoredCameraSettings();this.activeCameraPreset=e?.preset||"front",this.isApplyingCameraState=!0;const i=this.avatarViewer.setMode(this.type,e?.state||null);this.syncCameraState(i),this.$nextTick(()=>{this.isApplyingCameraState=!1})},updateNametag(){if(!this.avatarViewer)return;this.isApplyingCameraState=!0;const e=this.avatarViewer.setNametag(this.showNametag,this.username);this.syncCameraState(e),this.$nextTick(()=>{this.isApplyingCameraState=!1})},setCameraValue(e,i){const r=Number(i);Number.isFinite(r)&&(this.camera={...this.camera,[e]:r},this.applyCameraState())},applyCameraState(){if(!this.avatarViewer||typeof this.avatarViewer.setCameraState!="function")return;this.activeCameraPreset="custom",this.isApplyingCameraState=!0;const e=this.avatarViewer.setCameraState(this.camera);this.syncCameraState(e),this.persistCameraState(),this.$nextTick(()=>{this.isApplyingCameraState=!1})},applyCameraPreset(e){if(!this.avatarViewer||typeof this.avatarViewer.applyCameraPreset!="function")return;this.activeCameraPreset=e,this.isApplyingCameraState=!0;const i=this.avatarViewer.applyCameraPreset(e);this.syncCameraState(i),this.persistCameraState(),this.$nextTick(()=>{this.isApplyingCameraState=!1})},resetCamera(){if(!this.avatarViewer||typeof this.avatarViewer.resetCamera!="function")return;this.activeCameraPreset="front",this.clearStoredCameraSettings(),this.isApplyingCameraState=!0;const e=this.avatarViewer.resetCamera();this.syncCameraState(e),this.$nextTick(()=>{this.isApplyingCameraState=!1})},start3dLoad(){this.initTimeout&&clearTimeout(this.initTimeout),this.loading3d=!0,this.initTimeout=setTimeout(()=>{this.initTimeout=null,this.$nextTick(()=>{this.$nextTick(()=>{this.initViewer()})})},0)}}}function ox(t={}){return{username:t.username||"",autocompleteUrl:t.autocompleteUrl||"",faceUrlTemplate:t.faceUrlTemplate||"",suggestions:[],selectedIndex:-1,showSuggestions:!1,isLoading:!1,debounceTimer:null,requestId:0,abortController:null,destroy(){this.debounceTimer&&clearTimeout(this.debounceTimer),this.abortController?.abort()},profileFaceUrl(e){return this.faceUrlTemplate.replace("__USERNAME__",encodeURIComponent(e))},handleInput(){this.debounceTimer&&clearTimeout(this.debounceTimer);const e=this.username.trim();if(this.selectedIndex=-1,e.length<2){this.closeSuggestions(),this.suggestions=[],this.isLoading=!1,this.abortController?.abort();return}this.isLoading=!0,this.showSuggestions=!0,this.debounceTimer=setTimeout(()=>{this.debounceTimer=null,this.fetchSuggestions(e)},200)},handleFocus(){if(this.suggestions.length>0){this.showSuggestions=!0;return}this.username.trim().length>=2&&this.handleInput()},async fetchSuggestions(e){const i=++this.requestId;this.abortController?.abort(),this.abortController=new AbortController;try{const r=`${this.autocompleteUrl}?query=${encodeURIComponent(e)}`,n=await fetch(r,{signal:this.abortController.signal,headers:{Accept:"application/json"}});if(!n.ok||i!==this.requestId)return;const s=await n.json();if(i!==this.requestId||e!==this.username.trim())return;this.suggestions=(Array.isArray(s)?s:[]).map(o=>
113typeof o=="string"?{type:"profile",label:o,value:o,image:this.profileFaceUrl(o)}:o).filter(o=>o?.type==="profile"&&(o.value||o.label)).slice(0,6),this.showSuggestions=this.suggestions.length>0}catch(r){r.name!=="AbortError"&&i===this.requestId&&(this.suggestions=[],this.showSuggestions=!1)}finally{i===this.requestId&&(this.isLoading=!1)}},handleKeydown(e){if(e.key==="Escape"){this.closeSuggestions();return}!this.showSuggestions||this.suggestions.length===0||(e.key==="ArrowDown"?(e.preventDefault(),this.selectedIndex=(this.selectedIndex+1)%this.suggestions.length):e.key==="ArrowUp"?(e.preventDefault(),this.selectedIndex=(this.selectedIndex-1+this.suggestions.length)%this.suggestions.length):e.key==="Enter"&&this.selectedIndex>=0&&(e.preventDefault(),this.selectSuggestion(this.suggestions[this.selectedIndex])))},selectSuggestion(e){this.username=e.value||e.label,this.closeSuggestions(),this.$nextTick(()=>this.$wire.generate())},closeSuggestions(){this.showSuggestions=!1,this.selectedIndex=-1},submit(){this.closeSuggestions(),this.$wire.generate()}}}const Lr=["message","detail","action_label","image_alt","label"],Fc=["detail","action_label","image_alt"];function nr(t){return typeof t=="string"?t:""}function ih(t){return Object.fromEntries([["source_locale",nr(t?.source_locale)],...Lr.map(e=>{const i=nr(t?.[e]).trim();return[e,Fc.includes(e)&&!i?null:i]})])}function ax(t){const e=nr(t?.message).trim();return e&&e.length<=500&&!/<\/?[a-z][^>]*>/i.test(e)?e:""}function lx(t){const i={401:"Sign in again before retrying auto-translation.",403:"You do not have permission to translate this announcement.",419:"Your session expired. Refresh the page before retrying auto-translation.",429:"Too many translation requests. Wait a moment before retrying missing languages.",503:"Auto-translation is temporarily unavailable. Please try again later."}[t]||"The translation request failed. Please try again.";return Number.isInteger(t)?`${i} (HTTP ${t})`:i}function rh(t){return!t||!/^\d{4}-(0[1-9]|1[0-2])$/.test(nr(t.month))||!Number.isSafeInteger(t.used)||t.used<0||!Number.isSafeInteger(t.limit)||t.limit<0||t.limit>5e5||!Number.isSafeInteger(t.remaining)||t.remaining<0||t.remaining>t.limit||!nr(t.resets_at)||!Number.isFinite(Date.parse(t.resets_at))?null:{month:t.month,used:t.used,limit:t.limit,remaining:t.remaining,resets_at:t.resets_at}}function cx(t){const e=Array.isArray(t.languages)?t.languages.filter(n=>typeof n?.code=="string"&&typeof n?.name=="string"):[],i={enabled:!!t.announcement?.enabled,source_locale:e.some(({code:n})=>n===t.announcement?.source_locale)?t.announcement.source_locale:"en",...Object.fromEntries([...Lr,"message_url","action_url","image_url"].map(n=>[n,nr(t.announcement?.[n])]))},r={};for(const{code:n}of e){const s=t.announcement?.translations?.[n];if(n!==i.source_locale&&s&&typeof s=="object"&&!Array.isArray(s)){const o=Object.fromEntries(Lr.map(l=>[l,nr(s[l])]));Object.values(o).some(l=>l.trim())&&(r[n]=o)}}return{announcement:i,languages:e,translations:r,translationConfigured:t.translationConfigured!==!1,translationBudget:rh(t.translationBudget),translationSource:ih(t.translationSource||i),selectedLocale:i.source_locale,translating:!1,progress:{completed:0,total:0},failures:[],status:"",updateTranslationBudget(n){const s=rh(n);!s||this.translationBudget&&s.month<this.translationBudget.month||(this.translationBudget=this.translationBudget?.month===s.month?{...s,used:Math.max(this.translationBudget.used,s.used),remaining:Math.min(this.translationBudget.remaining,s.remaining)}:s)},get budgetSummary(){if(!this.translationBudget)return"";const n=new Intl.NumberFormat("en-US");return`${n.format(this.translationBudget.used)} of ${n.format(this.translationBudget.limit)} monthly characters reserved · ${n.format(this.translationBudget.remaining)} remaining`},get budgetResetLabel(){return this.translationBudget?`Resets ${new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",timeZone:"America/Los_Angeles",timeZoneName:"short"}).format(new Date(this.translationBudget.resets_at))} (Pacific time).`:""},sourceSnapshot(){return ih(this.announcement)},get translationsStale(){return Object.keys(this.translations).length>0&&JSON.stringify(this.translationSource)!==JSON.stringify(this.sourceSnapshot())},get translationsJson(){return JSON.stringify(this.translationsStale?{}:this.translations)},get translationSourceJson(){return JSON.stringify(this.sourceSnapshot())},get targetLanguages(){return this.languages.filter(({code:n})=>n!==this.announcement.source_locale)},hasTranslation(n){return!this.translationsStale&&Lr.some(s=>nr(this.translations[n]?.[s]).trim())},get translatedCount(){return this.targetLanguages.filter(({code:n})=>this.hasTranslation(n)).length},get missingLanguages(){return this.targetLanguages.filter(({code:n})=>!this.hasTranslation(n))},get preview(){const n=this.selectedLocale!==this.announcement.source_locale&&!this.translationsStale?this.translations[this.selectedLocale]:null;return{...this.announcement,...Object.fromEntries(Lr.map(s=>[s,Fc.includes(s)&&!this.announcement[s].trim()?this.announcement[s]:nr(n?.[s]).trim()||this.announcement[s]]))}},get previewDirection(){return["ar","he","fa"].includes(this.selectedLocale)?"rtl":"ltr"},translationValue(n){return nr(this.translations[this.selectedLocale]?.[n])},editTranslation(n,s){this.translating||this.translationsStale||this.selectedLocale===this.announcement.source_locale||!Lr.includes(n)||Fc.includes(n)&&!this.announcement[n].trim()||(this.translationSource=this.sourceSnapshot(),this.translations[this.selectedLocale]={...Object.fromEntries(Lr.map(o=>[o,this.translationValue(o)])),[n]:nr(s)},Lr.some(o=>this.translations[this.selectedLocale][o].trim())||delete this.translations[this.selectedLocale])},resetTranslations(){this.translating||(this.translations={},this.translationSource=this.sourceSnapshot(),this.failures=[],this.status="")},async autoTranslate(){if(this.translating||!this.translationConfigured)return;if(!this.announcement.message.trim()||!this.announcement.label.trim()){this.status="Add a main message and accessible banner label before translating.";return}this.translationsStale&&this.resetTranslations();const n=this.sourceSnapshot(),s=[...this.missingLanguages];if(!s.length)return;this.translationSource=n,this.translating=!0,this.failures=[],this.status="",this.progress={completed:0,total:s.length};let o="",l="";const _=async()=>{for(;s.length;
113){if(JSON.stringify(n)!==JSON.stringify(this.sourceSnapshot())){s.length=0;return}const b=s.shift(),m=new AbortController,y=setTimeout(()=>m.abort(),45e3);let T="";try{const g=await fetch(t.translateUrl,{method:"POST",credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json","X-CSRF-TOKEN":t.csrfToken},body:JSON.stringify({...n,target_locale:b.code}),signal:m.signal});let d=null;try{d=await g.json()}catch(u){if(g.ok&&u?.name==="AbortError")throw u}if(this.updateTranslationBudget(d?.budget),!g.ok)throw T=ax(d)||lx(g.status),(d?.stop_batch===!0||[401,403,419,429,503].includes(g.status)||["translation_budget_exceeded","translation_budget_rollover","translation_budget_unavailable"].includes(d?.code))&&(s.length=0,o||(o=T)),new Error("Translation request failed.");if(!d||typeof d!="object"||Array.isArray(d))throw T=Number.isInteger(g.status)?`The translation server returned an invalid response (HTTP ${g.status}). Please try again.`:"The translation server returned an invalid response. Please try again.",new Error("Invalid translation response.");if(!d.translation||Lr.some(u=>n[u]?typeof d.translation[u]!="string"||!d.translation[u].trim():d.translation[u]!==null&&typeof d.translation[u]!="string"))throw T="The translation server returned an incomplete translation. Please retry this language.",new Error("Incomplete translation.");JSON.stringify(n)===JSON.stringify(this.sourceSnapshot())&&(this.translations[b.code]=Object.fromEntries(Lr.map(u=>[u,nr(d.translation[u])])))}catch(g){l||(l=T||(g?.name==="AbortError"?"The translation request timed out. Please retry this language.":"The translation request could not reach the server. Check your connection and try again.")),this.failures.push(b.name)}finally{clearTimeout(y),this.progress.completed+=1}}};try{await Promise.all(Array.from({length:Math.min(3,s.length)},_))}finally{this.translating=!1,this.status=JSON.stringify(n)!==JSON.stringify(this.sourceSnapshot())?"The original text changed during translation. Translate again before saving.":o||(this.failures.length?`${l} Completed translations are kept; try again to fill the missing languages.`:"Translations are ready to review. Save the announcement to publish them.")}},safeImageUrl(){const n=this.announcement.image_url.trim();if(!n||/[\s\\]/.test(n))return null;if(n.startsWith("/")&&!n.startsWith("//"))return n;try{const s=new URL(n);return["http:","https:"].includes(s.protocol)?n:null}catch{return null}}}}async function ux(){if(document.querySelector("[data-album-editor]"))try{const{bootAlbumEditors:t}=await Ht(async()=>{const{bootAlbumEditors:e}=await import("./album-editor-Cw0M9CXW.js");return{bootAlbumEditors:e}},__vite__mapDeps([13,14]));t()}catch(t){console.error("Failed to load the album editor:",t)}}const Lm=1,dx=7,fx=755,Mm=700,hx=["usnat","usca","usva","usco","usut","usct","usia","usin","ustn","usfl","usor","ustx","usde","usne","usnj","usnh","usmn","usmt"],px=new Set(["saleoptout","sharingoptout","targetedadvertisingoptout"]);function Pa(t,e){if(!t||!t.purpose)return!1;const i=String(e);return(t.purpose.consents||{})[i]===!0}function Rm(t,e){if(!t||!t.vendor)return!1;const i=String(e);return(t.vendor.consents||{})[i]===!0}function Tu(t){return!!(t&&t.gdprApplies===!1)}function mx(t){if(!t||typeof t!="object")return!1;if(t.eventStatus)return!0;const e=t.cmpStatus;return typeof e=="string"&&e!=="stub"&&e!=="loading"&&e!=="error"}function rc(t){if(!t||!t.tcData)return!1;const e=mx(t.tcData),i=t.ready===!0||e,r=t.success===!0||e;return i&&r}function gx(){try{return navigator.globalPrivacyControl===!0}catch{return!1}}function vx(t){if(typeof t!="string")return{normalized:null,optedOutSaleShare:!1};const e=t.trim().toUpperCase();if(e.length<4)return{normalized:null,optedOutSaleShare:!1};const i=e.charAt(2)==="Y";return{normalized:e,optedOutSaleShare:i}}function yx(t){return t===!0||t===1||t==="1"||t==="Y"}function bx(t){return String(t||"").replace(/[^a-z]/gi,"").toLowerCase()}function nh(t){return!t||typeof t!="object"?!1:Object.entries(t).some(([e,i])=>px.has(bx(e))&&yx(i))}function sh(t,e){return new Promise(i=>{let r=!1;const n=o=>{r||(r=!0,i(o||null))},s=window.setTimeout(()=>{n(null)},Mm);if(typeof window.__gpp!="function"){window.clearTimeout(s),n(null);return}try{const o=(...l)=>{if(window.clearTimeout(s),!l.length){n(null);return}if(typeof l[1]=="boolean"&&l[1]===!1){n(null);return}n(l[0]||null)};typeof e>"u"?window.__gpp(t,o):window.__gpp(t,o,e)}catch{window.clearTimeout(s),n(null)}})}function nc(t,e){if(typeof e=="string"&&e.trim()!==""){t.add(e.trim());return}typeof e=="number"&&Number.isFinite(e)&&t.add(e)}
113function wx(t){const e=new Set(hx);return t&&Array.isArray(t.applicableSections)&&t.applicableSections.forEach(i=>nc(e,i)),t&&Array.isArray(t.sectionList)&&t.sectionList.forEach(i=>nc(e,i)),t&&t.parsedSections&&typeof t.parsedSections=="object"&&Object.keys(t.parsedSections).forEach(i=>nc(e,i)),Array.from(e)}async function _x(){if(typeof window.__gpp!="function")return null;const t=await sh("getGPPData"),e=wx(t),r=(await Promise.all(e.map(s=>sh("getSection",s)))).some(s=>nh(s));let n=!1;return t&&t.parsedSections&&typeof t.parsedSections=="object"&&(n=Object.values(t.parsedSections).some(s=>nh(s))),{gppString:t&&typeof t.gppString=="string"?t.gppString:null,optedOutSaleShare:r||n}}function Ex(){return new Promise(t=>{let e=!1;const i=n=>{e||(e=!0,t(n||null))},r=window.setTimeout(()=>{i(null)},Mm);if(typeof window.__uspapi!="function"){window.clearTimeout(r),i(null);return}try{window.__uspapi("getUSPData",1,(n,s)=>{if(window.clearTimeout(r),!s||!n){i(null);return}const o=vx(n.uspString||"");i({uspString:o.normalized,optedOutSaleShare:o.optedOutSaleShare})})}catch{window.clearTimeout(r),i(null)}})}const Wi={ready:!1,gpcEnabled:!1,uspString:null,gppString:null,optedOutSaleShare:!1};let Ws=null;async function Sx(){if(Ws)return Ws;Ws=(async()=>{Wi.gpcEnabled=gx();const[t,e]=await Promise.all([Ex(),_x()]);return Wi.uspString=t&&t.uspString?t.uspString:null,Wi.gppString=e&&e.gppString?e.gppString:null,Wi.optedOutSaleShare=!!(Wi.gpcEnabled||t&&t.optedOutSaleShare===!0||e&&e.optedOutSaleShare===!0),Wi.ready=!0,window.dispatchEvent(new CustomEvent("cmp:us-privacy-updated",{detail:{...Wi}})),{...Wi}})();try{return await Ws}finally{Ws=null}}function Tx(){return{...Wi}}function Cu(){return Wi.ready&&Wi.optedOutSaleShare}function oh(t){return Tu(t)?Wi.ready?!Cu():!1:Pa(t,Lm)}function ah(t){return Tu(t)?Wi.ready?!Cu():!1:Pa(t,Lm)&&Pa(t,dx)&&Rm(t,fx)}const Cx={hasPurposeConsent:Pa,hasVendorConsent:Rm,isGdprOutOfScope:Tu,isReadyState:rc,canUseFunctional:oh,canUseAnalytics:ah,getUsPrivacyState:Tx,isUsOptOutActive:Cu,refreshUsPrivacyState:Sx,canUseFunctionalFromState:t=>rc(t)&&oh(t.tcData),canUseAnalyticsFromState:t=>rc(t)&&ah(t.tcData)};window.__cmpPolicy=window.__cmpPolicy||Cx;window.__cmpPolicy.refreshUsPrivacyState().catch(()=>{});const gs=window.__cmpPolicy,Au=window.__cmpRuntimeConfig||{},lh=Au.gaMeasurementId||"G-W2JGJ16CQV",Ax=Au.clarityProjectId||"hysn3ktezl",xx=!!Au.isAuthenticated,Nn={analytics:!1,clarity:!1,oneTap:!1};let vs=null,ch=0;const Ox=150,kx=40;window.dataLayer=window.dataLayer||[];window.__cmpAnalyticsActive=window.__cmpAnalyticsActive||!1;window.gtag=window.gtag||function(){const e=arguments[0];(e==="consent"||e==="js"||e==="config"||window.__cmpAnalyticsActive===!0)&&window.dataLayer.push(arguments)};function Ix(t){window.gtag("consent","update",{analytics_storage:t?"granted":"denied",ad_storage:"denied",ad_user_data:"denied",ad_personalization:"denied"})}window.gtag("consent","default",{analytics_storage:"denied",ad_storage:"denied",ad_user_data:"denied",ad_personalization:"denied",wait_for_update:500});function Dm(t,e){if(document.getElementById(t))return!0;const i=document.createElement("script");i.id=t,i.async=!0,i.src=e,i.onerror=function(){};const r=document.head||document.body;return r?(r.appendChild(i),!0):!1}function Px(){Nn.analytics||(Dm("ga-gtag-js",`https://www.googletagmanager.com/gtag/js?id=${lh}`),window.gtag("js",new Date),window.gtag("config",lh),Nn.analytics=!0)}function Lx(){Nn.clarity||((function(e,i,r,n,s,o,l){e[r]=e[r]||function(){(e[r].q=e[r].q||[]).push(arguments)},o=i.createElement(n),o.async=1,o.src=`https://www.clarity.ms/tag/${s}`,o.onerror=function(){},l=i.getElementsByTagName(n)[0],l&&l.parentNode&&l.parentNode.insertBefore(o,l)})(window,document,"clarity","script",Ax),Nn.clarity=!0)}function Nm(){if(Nn.oneTap||xx||!Dm("google-one-tap-js","https://accounts.google.com/gsi/client"))return;const t=document.getElementById("g_id_onload");if(!t){if(vs||ch>=kx)return;vs=window.setTimeout(()=>{vs=null,ch+=1,Nm()},Ox);return}t.style.display="block",Nn.oneTap=!0}function xu(t){if(!gs.isReadyState(t))return;const e=t.tcData,i=gs.canUseAnalytics(e),r=gs.canUseFunctional(e);if(window.__cmpAnalyticsActive=i,Ix(i),i&&(Px(),Lx()),r)Nm();else{vs&&(window.clearTimeout(vs),vs=null),Nn.oneTap=!1;const n=document.getElementById("g_id_onload");n&&(n.style.display="none")}}async function Mx(t){const e=t||null,i=e&&e.tcData?e.tcData:null;gs.isGdprOutOfScope(i)&&await gs.refreshUsPrivacyState(),xu(e)}
113function $m(t){Mx(t).catch(()=>{xu(t||null)})}window.addEventListener("cmp:consent-updated",t=>{$m(t&&t.detail?t.detail:null)});window.addEventListener("cmp:us-privacy-updated",()=>{window.__cmpConsentState&&window.__cmpConsentState.ready&&xu(window.__cmpConsentState)});window.__cmpConsentState&&window.__cmpConsentState.ready&&$m(window.__cmpConsentState);if(!window.__consentYoutubeInit){let i=function(c){if(!c||typeof c!="object")return!1;if(c.eventStatus)return!0;const f=c.cmpStatus;return typeof f=="string"&&f!=="stub"&&f!=="loading"&&f!=="error"},r=function(c,f){const v=c&&typeof c=="object"?c:null,E=i(v);return{tcData:v,success:!!f||E,ready:E}},n=function(c){return!!(c&&(c.ready===!0||i(c.tcData)))},s=function(c){if(!c||typeof c!="object")return;if(!t){t=c;return}const f=n(t);if(n(c)){t=c;return}f||c.tcData&&(t=c)},o=function(){window.__consentYoutubeTcfListenerInit||typeof window.__tcfapi!="function"||(window.__consentYoutubeTcfListenerInit=!0,window.__tcfapi("addEventListener",2,(c,f)=>{s(r(c,f)),h()}))},l=function(){window.__cmpConsentState&&s(window.__cmpConsentState)},_=function(c){return gs.canUseFunctionalFromState(c)},b=function(c){return String(c).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")},m=function(c){return c.getAttribute("data-button-text")||"Enable cookies to view this video"},y=function(c){return c.getAttribute("data-thumbnail-alt")||"Preview"},T=function(c){c.getAttribute("data-youtube-mounted")!=="1"&&c.querySelector("[data-youtube-placeholder]")||(c.innerHTML='<div class="bg-dark d-flex h-100" data-youtube-placeholder><button type="button" class="btn btn-white py-2 px-4 border-12 my-auto mx-auto" data-open-consent-ui>'+b(m(c))+"</button></div>",c.setAttribute("data-youtube-mounted","0"))},g=function(c,f){let v=c.querySelector("img[data-youtube-thumbnail]");v||(v=document.createElement("img"),v.setAttribute("data-youtube-thumbnail","1"),v.className="img-fluid rounded-start h-100",v.style.objectFit="cover",c.innerHTML="",c.appendChild(v),c.setAttribute("data-youtube-mounted","1")),v.getAttribute("data-videoid")!==f&&(v.setAttribute("src",`https://i.ytimg.com/vi/${f}/hqdefault.jpg`),v.setAttribute("data-videoid",f));const E=y(c);v.getAttribute("alt")!==E&&v.setAttribute("alt",E)},d=function(c,f){if(c.getAttribute("data-youtube-mounted")==="1"){const E=c.querySelector("lite-youtube");E&&E.getAttribute("videoid")!==f&&E.setAttribute("videoid",f);return}const v=document.createElement("lite-youtube");v.setAttribute("videoid",f),c.innerHTML="",c.appendChild(v),c.setAttribute("data-youtube-mounted","1")},u=function(c){if(!_(t)){T(c);return}const f=(c.getAttribute("data-videoid")||"").trim();if(!f){T(c);return}if((c.getAttribute("data-mode")||"embed")==="thumbnail"){g(c,f);return}d(c,f)},w=function(c){if(e.has(c))return;const f=new MutationObserver(v=>{for(let E=0;E<v.length;E+=1)if(v[E].attributeName==="data-videoid"){u(c);break}});f.observe(c,{attributes:!0,attributeFilter:["data-videoid"]}),e.set(c,f)},h=function(){l(),document.querySelectorAll("[data-consent-youtube]").forEach(f=>{w(f),u(f)})},p=function(){if(o(),typeof window.__tcfapi=="function"){window.__tcfapi("displayConsentUi",2,function(){}),window.setTimeout(h,300),window.setTimeout(h,1200),window.setTimeout(h,2500);return}typeof window.update_popup=="function"&&(window.update_popup(),window.setTimeout(h,300),window.setTimeout(h,1200),window.setTimeout(h,2500))};window.__consentYoutubeInit=!0;let t=null;const e=new WeakMap;document.addEventListener("click",c=>{!c.target||!c.target.closest||!c.target.closest("[data-open-consent-ui]")||(c.preventDefault(),p())}),window.addEventListener("cmp:consent-updated",c=>{s(c&&c.detail?c.detail:null),h()}),window.addEventListener("cmp:us-privacy-updated",()=>{h()}),document.addEventListener("livewire:navigated",()=>{l(),h()}),o(),l(),h()}Ut.plugin(_a);Ut.plugin(Pb);Ut.plugin(_a.configure({onCopy:()=>{console.log("Copied!")}}));Ut.data("feedComposeData",MA);Ut.data("feedTimelinePosition",RA);Ut.data("feedImageGallery",DA);Ut.data("imgStoryPreview",NA);Ut.data("shareDialogData",UA);Ut.data("conversationComposer",e0);Ut.data("chatSync",Rg);Ut.data("chatMessageActions",c0);Ut.data("chatRecipientPicker",u0);Ut.data("profileMessage",d0);Ut.store("userBlocks",f0());Ut.data("userBlockDialog",h0);p0(Ut,br);Ut.data("profileStatus",v0);Ut.data("profilePassport",y0);Ut.data("chatGroupManager",w0);Ut.store("messageNotifications",S0());Ut.data("messageNotifications",T0);Ut.data("messageBadge",C0);A0();Ut.data("chatLayout",x0);Ut.store("chatDock",k0());Ut.data("chatDockShell",I0);Ut.data("wallpaperUploadData",$0);Ut.data("avatarPreviewData",sx);Ut.data("avatarUsernameAutocomplete",ox);Ut.data("announcementEditor",cx);Ut.data("scrollCompact",EA);Object.assign(window,{createSearchLifecycle:Sm,installMobileSearchDialog:_A});br.directive("scroll",()=>{});Dg(br);let sc=null;const Ka=()=>{sc||!document.querySelector(".chat-conversation")||(sc=Ht(()=>import("./conversation-DTj9Uotf.js"),__vite__mapDeps([15,10,2])).catch(t=>{sc=null,console.error("Failed to load conversation runtime.",t)}))};br.hook("component.init",({component:t})=>{t.name==="messages.conversation"&&queueMicrotask(Ka)});br.hook("morphed",({component:t})=>{(t.name==="messages.workspace"||t.name==="messages.conversation")&&Ka()});document.addEventListener("livewire:navigated",Ka);br.start();Ka();const Rx='[data-feed-video-runtime="true"]';let Ks=null;function Dx(t=document){return typeof t?.querySelector=="function"&&t.querySelector(Rx)!==null}function Nx(t=document){return Ks||!Dx(t)||(Ks=Ht(()=>import("./video-autoplay-Boqo60IF.js"),__vite__mapDeps([16,2])).catch(e=>{Ks=null,console.error("Failed to load feed video runtime.",e)})),Ks}function $x(){const t=()=>{Nx()};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",t,{once:!0}):t(),document.addEventListener("livewire:navigated",t),br.hook("morphed",t)}$x();const Fm="xp-gained",ba=[],to=new Intl.NumberFormat,Ou=window.matchMedia("(prefers-reduced-motion: reduce)");function Fx(){return document.querySelector('[data-xp-nav-trigger][aria-expanded="true"]')?.closest(".dropdown")||null}function jm(t){if(!t||typeof t!="object")return null;const e=t.payload&&typeof t.payload=="object"?t.payload:t,i=Math.trunc(Number(e.points)||0);if(i<=0)return null;const r=Number(e.before_total_xp),n=Number(e.after_total_xp),s=Number(e.after_required_xp);return{points:i,beforeTotalXp:Number.isFinite(r)?r:null,afterTotalXp:Number.isFinite(n)?n:null,afterRequiredXp:Number.isFinite(s)?s:null}}function jx(t){window.dispatchEvent(new CustomEvent(Fm,{detail:{payload:t}}
113))}function Ux(t,e,i,r){if(!t)return;if(Ou.matches||r<=0){t.textContent=`${to.format(i)} XP`;return}const n=performance.now(),s=i-e;function o(l){const _=Math.min((l-n)/r,1),b=1-Math.pow(1-_,3),m=Math.round(e+s*b);t.textContent=`${to.format(m)} XP`,_<1&&requestAnimationFrame(o)}requestAnimationFrame(o)}function Bx(t){if(Ou.matches)return;document.querySelectorAll("[data-xp-anchor]").forEach(i=>{const r=i.getBoundingClientRect();if(!r.width||!r.height)return;const n=i.dataset.xpAnchor||"default",s=document.createElement("div");s.className="xp-gain-burst",s.dataset.anchor=n,s.textContent=`+${t.points} XP`,s.style.left=`${Math.round(r.left+r.width/2)}px`,s.style.top=`${Math.round(n==="desktop"?r.bottom+14:r.top+r.height/2)}px`,document.body.appendChild(s),requestAnimationFrame(()=>s.classList.add("is-active"));const o=2e3,l=2600;window.setTimeout(()=>{s.classList.add("is-merge"),i.classList.add("xp-gain-glow")},o),window.setTimeout(()=>{i.classList.remove("xp-gain-glow"),s.remove()},l)})}function qx(t,e){const i=t?.querySelector("[data-xp-progress-bar]");if(!i)return;const r=Number(t.dataset.requiredXp)||0,n=r>0?Math.min(100,Math.max(0,e/r*100)):100,s=Math.round(n*100)/100,o=`${to.format(Math.max(0,Math.round(e)))} XP`,l=r>0?` of ${to.format(r)} XP`:"",_=`${o}${l}`;i.style.width=`${s}%`,i.setAttribute("aria-valuenow",`${s}`),i.setAttribute("title",_),i.setAttribute("data-bs-original-title",_);const b=window.bootstrap?.Tooltip?.getInstance(i);b?.setContent&&b.setContent({".tooltip-inner":_})}function Um(t){if(!t||ba.length===0)return;const e=t.querySelector("[data-xp-progress]");if(!e)return;const i=ba.splice(0,ba.length),r=i.reduce((y,T)=>y+T.points,0);if(r<=0)return;const n=i[0],s=i[i.length-1],o=Number.isFinite(n?.beforeTotalXp)&&Number.isFinite(s?.afterTotalXp),l=o?Number(n.beforeTotalXp):Number(e.dataset.currentXp)||0,_=o?Number(s.afterTotalXp):l+r;Number.isFinite(s?.afterRequiredXp)&&(e.dataset.requiredXp=`${Number(s.afterRequiredXp)}`);const b=e.querySelector("[data-xp-progress-label]");Ux(b,l,_,900);const m=e.querySelector("[data-xp-required-label]");if(m){const y=Number(e.dataset.requiredXp)||0;m.textContent=y>0?`${to.format(y)} XP`:"Max level"}e.dataset.currentXp=`${_}`,qx(e,_)}window.addEventListener(Fm,t=>{const e=jm(t.detail);if(!e)return;ba.push(e),Bx(e);const i=Fx();i&&Um(i)});document.addEventListener("shown.bs.dropdown",t=>{const e=t.target,i=e?.closest?.(".dropdown")||e,r=i?.matches?.("[data-xp-nav-trigger]")||i?.querySelector?.("[data-xp-nav-trigger]");!i||!r||Um(i)});function Bm(){const t=Array.isArray(window.__xpGainQueue)?window.__xpGainQueue:[];t.length!==0&&(window.__xpGainQueue=[],t.forEach((e,i)=>{const r=jm(e);if(!r)return;const n=Ou.matches?0:i*140;window.setTimeout(()=>jx(r),n)}))}document.addEventListener("DOMContentLoaded",Bm);document.addEventListener("livewire:navigated",Bm);(()=>{const t=()=>localStorage.getItem("theme")||"light",e=function(n){n==="auto"&&window.matchMedia("(prefers-color-scheme: dark)").matches?document.documentElement.setAttribute("data-bs-theme","dark"):document.documentElement.setAttribute("data-bs-theme",n)};e(t());const i=n=>{const s=document.querySelector(".theme-icon-active"),o=document.querySelector(`[data-bs-theme-value="${n}"]`);if(!s||!o)return;const l=o.querySelector("span")?.innerText;l&&(s.innerHTML=l)};window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{t()==="auto"&&e(t())});const r=()=>{e(t()),i(t()),document.querySelectorAll("[data-bs-theme-value]").forEach(n=>{Ig(n,"theme-toggle","click",()=>{const s=n.getAttribute("data-bs-theme-value");localStorage.setItem("theme",s),e(s),i(s)})})};window.addEventListener("DOMContentLoaded",r),document.addEventListener("livewire:navigated",r)})();document.querySelectorAll(".btn-primary").forEach(function(t){const e=t;t.onmousemove=function(i){e&&(this.x=i.layerX,this.y=i.layerY,e.style.setProperty("--x",this.x+"px"),e.style.setProperty("--y",this.y+"px"))}});document.querySelectorAll(".btn-load").forEach(function(t){let e=$(t),i=e.html();e.on("click",function(r){e.addClass("disabled"),e.addClass("position-relative"),e.html('<span id="loading" class="position-absolute top-50 start-50 translate-middle"><span>&bull;</span><span>&bull;</span><span>&bull;</span></span> <span style="visibility: hidden">'+i+"</span>"),setTimeout(()=>{e.html(i),e.removeClass("disabled")},2e3)})});document.querySelectorAll(".btn-load-long").forEach(function(t){let e=$(t),i=e.html();e.on("click",function(r){e.addClass("disabled"),e.addClass("position-relative"),e.html('<span id="loading" class="position-absolute top-50 start-50 translate-middle"><span>&bull;</span><span>&bull;</span><span>&bull;</span></span> <span style="visibility: hidden">'+i+"</span>"),setTimeout(()=>{e.html(i),e.removeClass("disabled")},1e4)})});$(".auth-input-group").each(function(t,e){$(e).on("input",function(){$(e).removeClass("error")})});const Vx=new FastAverageColor,ku=wA({readColor(t){const e=Vx.getColor(t,{silent:!0});return e.error?null:e.rgba}});function qm(){ku.scan()}document.addEventListener("livewire:navigating",()=>ku.reset());window.addEventListener("pagehide",()=>ku.reset());$(function(){$("#achievementFaceForm").hide(),$('input[name="achievementFace"]').on("click",function(){$(this).prop("checked")?($("#achievementFaceForm").fadeIn(),$("#achievementFaceUsername").trigger("focus"),$("#achievementIcon").prop("disabled",!0)):($("#achievementFaceForm").hide(),$("#achievementIcon").prop("disabled",!1))})});let zr=document.getElementById("scrolling-wrapper-trending-tags"),uh=document.getElementById("scrollBarFadeLeft"),Hx=document.getElementById("stickyBackwardButton"),aa=document.getElementById("stickyBackwardButtonGroup");document.getElementById("scrollBarFadeRight");let zx=document.getElementById("stickyForwardButton"),la=document.getElementById("stickyForwardButtonGroup");if(zr){let t=zr.scrollWidth/100*33;zr.onscroll=function(){zr.scrollLeft<32?(uh.classList.remove("show"),aa.style.pointerEvents="none",aa.classList.remove("show")):(uh.classList.add("show"),aa.classList.add("show"),aa.style.pointerEvents="auto"),Math.abs(zr.scrollLeft)>zr.scrollWidth-zr.clientWidth-12?(la.classList.remove("show"),la.style.pointerEvents="none"):(la.classList.add("show"),la.style.pointerEvents="auto")},zx.onclick=function(){zr.scrollLeft+=t},Hx.onclick=function(){zr.scrollLeft-=t}}const dh=["😆","😅","🤣","😂","😀","🤑","🤨","🙂","😊","😗","😛","😏","🤥","😴","🥺","😧","🤗","🤩","😎","🥳","😍","😱","🤓","😷","🥴","😳","🤯","🤫","🤑","😪","😴","😵"];document.addEventListener("mouseover",t=>{const e=t.target.closest(".emoji-button:not([data-static-emoji-icon]), #emoji-button:not([data-static-emoji-icon])");e&&(e.innerText=dh[Math.floor(Math.random()*dh.length)])});function Vm(){document.querySelectorAll(".modal-backdrop, .offcanvas-backdrop").forEach(t=>{t.remove()}),document.querySelectorAll(".modal.show").forEach(t=>{t.classList.remove("show"),t.style.display="none",t.setAttribute("aria-hidden","true"),window.bootstrap?.Modal?.getInstance(t)?.dispose()}),document.querySelectorAll(".offcanvas.show").forEach(t=>{t.classList.remove("show"),t.setAttribute("aria-hidden","true"),window.bootstrap?.Offcanvas?.getInstance(t)?.dispose()}),document.body.classList.remove("modal-open"),document.body.style.removeProperty("overflow"),document.body.style.removeProperty("padding-right")}function Iu(){ux(),Vm(),Em(),vA(),qm(),typeof window.initNavDropdowns=="function"&&window.initNavDropdowns(),typeof window.initNavUserDropdown=="function"&&window.initNavUserDropdown()}Iu();let oc=null;function Hm(){oc===null&&(oc=requestAnimationFrame(()=>{oc=null,Em(),qm()}))}br.hook("component.init",Hm);br.hook("morphed",Hm);document.addEventListener("livewire:navigate",Vm);document.addEventListener("livewire:navigated",Iu);window.addEventListener("pageshow",t=>{t.persisted&&Iu()});let jc=null,Uc=null;function Pu(){Uc?.(),Uc=null,jc=null}function La(){const t=document.getElementById("hero-video");t&&t===jc||(Pu(),t&&(jc=t,Uc=bA(t)))}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",La,{once:!0}):La();document.addEventListener("livewire:navigating",Pu);document.addEventListener("livewire:navigated",La);window.addEventListener("pagehide",Pu);window.addEventListener("pageshow",La);export{Fi as a,$c as b,Pm as c,SO as d,EO as e,_O as g,sa as i,q0 as m,ds as n};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.