@pipelab/ui 2.0.1-beta.18 → 2.0.1-beta.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/Layout-CZu1Y4Q6.css +1 -0
- package/assets/Layout-DEa40xy5.js +559 -0
- package/assets/{accordion-DBTBFLg1.js → accordion-Bims3UDM.js} +3 -3
- package/assets/column-BL1r4P0x.js +763 -0
- package/assets/{editor-CL51bp-d.js → editor-DT6Eyux4.js} +13 -13
- package/assets/{editor-BOMFiSYH.css → editor-h9B-iYjg.css} +1 -1
- package/assets/index-D-cJaOxT.js +281 -0
- package/assets/pages-CkHXpNsr.css +1 -0
- package/assets/pages-DkBCoB7t.js +192 -0
- package/assets/purify-g1tOOzKG.js +3 -0
- package/assets/{radiobutton-Cde1K4jB.js → radiobutton-CMEjerCX.js} +1 -1
- package/assets/{simple-editor-CqzqSqib.js → simple-editor-D2w6ATCh.js} +1 -1
- package/assets/useTour-ChlX-Tm_.js +368 -0
- package/assets/useTour-QEAJLxtI.css +1 -0
- package/assets/useconfirm-BSnWngV-.js +52 -0
- package/assets/usetoast-7I0RTgek.css +1 -0
- package/assets/usetoast-BzemnOip.js +1992 -0
- package/index.html +7 -7
- package/package.json +1 -1
- package/assets/Layout-B1lNzRj9.js +0 -663
- package/assets/Layout-Qqlu6uy0.css +0 -1
- package/assets/column-D7q_1oPa.js +0 -763
- package/assets/index-DHsQae2y.js +0 -6
- package/assets/pages-XPhK3wzd.css +0 -1
- package/assets/pages-iuidRoIo.js +0 -192
- package/assets/purify-C0IDOR8K.js +0 -2
- package/assets/useTour-DqUgdRnH.js +0 -501
- package/assets/useTour-JbHCn35m.css +0 -1
- package/assets/useconfirm-6BubW4wf.js +0 -527
- package/assets/usetoast-DWS76osA.js +0 -1797
- package/assets/usetoast-Qjw9yjKR.css +0 -1
|
@@ -0,0 +1,1992 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/module-6F3E5H7Y-ndcQ2bTZ.js","assets/chunk-JTKJZQYV-Hqavc1pN.js","assets/emscripten-module-VHMWRAJ2-DFzKlAfo.js","assets/chunk-B3K2TuZy.js","assets/preload-helper-DzyYoeor.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{n as e,t}from"./chunk-B3K2TuZy.js";import{$ as n,A as r,At as i,B as a,C as o,Ct as s,Dt as c,E as l,Et as u,F as d,G as f,H as p,I as m,J as h,K as g,L as _,M as v,N as y,O as b,Ot as x,P as S,Q as C,R as w,S as T,St as ee,T as E,Tt as D,U as te,V as ne,W as re,X as ie,Y as ae,Z as oe,_ as se,_t as ce,a as le,at as ue,b as de,bt as fe,c as pe,ct as me,d as he,et as ge,f as _e,ft as ve,gt as ye,h as be,ht as xe,i as Se,it as O,j as Ce,jt as we,k as Te,kt as Ee,l as De,lt as Oe,m as ke,mt as Ae,n as je,nt as Me,o as Ne,p as k,pt as Pe,q as Fe,r as Ie,rt as Le,s as Re,st as ze,t as Be,tt as Ve,u as A,ut as He,v as Ue,vt as We,w as Ge,wt as Ke,x as qe,xt as Je,y as Ye,yt as Xe,z as Ze}from"./_plugin-vue_export-helper-CUG653SX.js";import{o as Qe,t as $e}from"./chunk-JTKJZQYV-Hqavc1pN.js";import{t as et}from"./preload-helper-DzyYoeor.js";var tt=void 0,nt=typeof window<`u`&&window.trustedTypes;if(nt)try{tt=nt.createPolicy(`vue`,{createHTML:e=>e})}catch{}var rt=tt?e=>tt.createHTML(e):e=>e,it=`http://www.w3.org/2000/svg`,at=`http://www.w3.org/1998/Math/MathML`,ot=typeof document<`u`?document:null,st=ot&&ot.createElement(`template`),ct={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?ot.createElementNS(it,e):t===`mathml`?ot.createElementNS(at,e):n?ot.createElement(e,{is:n}):ot.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>ot.createTextNode(e),createComment:e=>ot.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ot.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===a||!(i=i.nextSibling)););else{st.innerHTML=rt(r===`svg`?`<svg>${e}</svg>`:r===`mathml`?`<math>${e}</math>`:e);let i=st.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},lt=`transition`,ut=`animation`,dt=Symbol(`_vtc`),ft={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},pt=ye({},Ie,ft),mt=(e=>(e.displayName=`Transition`,e.props=pt,e))((e,{slots:t})=>T(je,_t(e),t)),ht=(e,t=[])=>{Xe(e)?e.forEach(e=>e(...t)):e&&e(...t)},gt=e=>e?Xe(e)?e.some(e=>e.length>1):e.length>1:!1;function _t(e){let t={};for(let n in e)n in ft||(t[n]=e[n]);if(e.css===!1)return t;let{name:n=`v`,type:r,duration:i,enterFromClass:a=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:c=a,appearActiveClass:l=o,appearToClass:u=s,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,m=vt(i),h=m&&m[0],g=m&&m[1],{onBeforeEnter:_,onEnter:v,onEnterCancelled:y,onLeave:b,onLeaveCancelled:x,onBeforeAppear:S=_,onAppear:C=v,onAppearCancelled:w=y}=t,T=(e,t,n,r)=>{e._enterCancelled=r,xt(e,t?u:s),xt(e,t?l:o),n&&n()},ee=(e,t)=>{e._isLeaving=!1,xt(e,d),xt(e,p),xt(e,f),t&&t()},E=e=>(t,n)=>{let i=e?C:v,o=()=>T(t,e,n);ht(i,[t,o]),St(()=>{xt(t,e?c:a),bt(t,e?u:s),gt(i)||wt(t,r,h,o)})};return ye(t,{onBeforeEnter(e){ht(_,[e]),bt(e,a),bt(e,o)},onBeforeAppear(e){ht(S,[e]),bt(e,c),bt(e,l)},onEnter:E(!1),onAppear:E(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>ee(e,t);bt(e,d),e._enterCancelled?(bt(e,f),Ot()):(Ot(),bt(e,f)),St(()=>{e._isLeaving&&(xt(e,d),bt(e,p),gt(b)||wt(e,r,g,n))}),ht(b,[e,n])},onEnterCancelled(e){T(e,!1,void 0,!0),ht(y,[e])},onAppearCancelled(e){T(e,!0,void 0,!0),ht(w,[e])},onLeaveCancelled(e){ee(e),ht(x,[e])}})}function vt(e){if(e==null)return null;if(ee(e))return[yt(e.enter),yt(e.leave)];{let t=yt(e);return[t,t]}}function yt(e){return we(e)}function bt(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[dt]||(e[dt]=new Set)).add(t)}function xt(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[dt];n&&(n.delete(t),n.size||(e[dt]=void 0))}function St(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}var Ct=0;function wt(e,t,n,r){let i=e._endId=++Ct,a=()=>{i===e._endId&&r()};if(n!=null)return setTimeout(a,n);let{type:o,timeout:s,propCount:c}=Tt(e,t);if(!o)return r();let l=o+`end`,u=0,d=()=>{e.removeEventListener(l,f),a()},f=t=>{t.target===e&&++u>=c&&d()};setTimeout(()=>{u<c&&d()},s+1),e.addEventListener(l,f)}function Tt(e,t){let n=window.getComputedStyle(e),r=e=>(n[e]||``).split(`, `),i=r(`${lt}Delay`),a=r(`${lt}Duration`),o=Et(i,a),s=r(`${ut}Delay`),c=r(`${ut}Duration`),l=Et(s,c),u=null,d=0,f=0;t===lt?o>0&&(u=lt,d=o,f=a.length):t===ut?l>0&&(u=ut,d=l,f=c.length):(d=Math.max(o,l),u=d>0?o>l?lt:ut:null,f=u?u===lt?a.length:c.length:0);let p=u===lt&&/\b(transform|all)(,|$)/.test(r(`${lt}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:p}}function Et(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((t,n)=>Dt(t)+Dt(e[n])))}function Dt(e){return e===`auto`?0:Number(e.slice(0,-1).replace(`,`,`.`))*1e3}function Ot(){return document.body.offsetHeight}function kt(e,t,n){let r=e[dt];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var At=Symbol(`_vod`),jt=Symbol(`_vsh`),Mt={beforeMount(e,{value:t},{transition:n}){e[At]=e.style.display===`none`?``:e.style.display,n&&t?n.beforeEnter(e):Nt(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Nt(e,!0),r.enter(e)):r.leave(e,()=>{Nt(e,!1)}):Nt(e,t))},beforeUnmount(e,{value:t}){Nt(e,t)}};function Nt(e,t){e.style.display=t?e[At]:`none`,e[jt]=!t}var Pt=Symbol(``);function Ft(e){let t=de();if(!t)return;let n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(e=>Lt(e,n))},i=()=>{let r=e(t.proxy);t.ce?Lt(t.ce,r):It(t.subTree,r),n(r)};b(()=>{S(i)}),Te(()=>{f(i,Pe,{flush:`post`});let e=new MutationObserver(i);e.observe(t.subTree.el.parentNode,{childList:!0}),r(()=>e.disconnect())})}function It(e,t){if(e.shapeFlag&128){let n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{It(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)Lt(e.el,t);else if(e.type===Se)e.children.forEach(e=>It(e,t));else if(e.type===le){let{el:n,anchor:r}=e;for(;n&&(Lt(n,t),n!==r);)n=n.nextSibling}}function Lt(e,t){if(e.nodeType===1){let n=e.style,r=``;for(let e in t)n.setProperty(`--${e}`,t[e]),r+=`--${e}: ${t[e]};`;n[Pt]=r}}var Rt=/(^|;)\s*display\s*:/;function zt(e,t,n){let r=e.style,i=D(n),a=!1;if(n&&!i){if(t)if(D(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??Vt(r,t,``)}else for(let e in t)n[e]??Vt(r,e,``);for(let e in n)e===`display`&&(a=!0),Vt(r,e,n[e])}else if(i){if(t!==n){let e=r[Pt];e&&(n+=`;`+e),r.cssText=n,a=Rt.test(n)}}else t&&e.removeAttribute(`style`);At in e&&(e[At]=a?r.display:``,e[jt]&&(r.display=`none`))}var Bt=/\s*!important$/;function Vt(e,t,n){if(Xe(n))n.forEach(n=>Vt(e,t,n));else if(n??=``,t.startsWith(`--`))e.setProperty(t,n);else{let r=Wt(e,t);Bt.test(n)?e.setProperty(ce(r),n.replace(Bt,``),`important`):e[r]=n}}var Ht=[`Webkit`,`Moz`,`ms`],Ut={};function Wt(e,t){let n=Ut[t];if(n)return n;let r=Ae(t);if(r!==`filter`&&r in e)return Ut[t]=r;r=xe(r);for(let n=0;n<Ht.length;n++){let i=Ht[n]+r;if(i in e)return Ut[t]=i}return t}var Gt=`http://www.w3.org/1999/xlink`;function Kt(e,t,n,r,i,a=Ke(t)){r&&t.startsWith(`xlink:`)?n==null?e.removeAttributeNS(Gt,t.slice(6,t.length)):e.setAttributeNS(Gt,t,n):n==null||a&&!We(n)?e.removeAttribute(t):e.setAttribute(t,a?``:u(n)?String(n):n)}function qt(e,t,n,r,i){if(t===`innerHTML`||t===`textContent`){n!=null&&(e[t]=t===`innerHTML`?rt(n):n);return}let a=e.tagName;if(t===`value`&&a!==`PROGRESS`&&!a.includes(`-`)){let r=a===`OPTION`?e.getAttribute(`value`)||``:e.value,i=n==null?e.type===`checkbox`?`on`:``:String(n);(r!==i||!(`_value`in e))&&(e.value=i),n??e.removeAttribute(t),e._value=n;return}let o=!1;if(n===``||n==null){let r=typeof e[t];r===`boolean`?n=We(n):n==null&&r===`string`?(n=``,o=!0):r===`number`&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(i||t)}function Jt(e,t,n,r){e.addEventListener(t,n,r)}function Yt(e,t,n,r){e.removeEventListener(t,n,r)}var Xt=Symbol(`_vei`);function Zt(e,t,n,r,i=null){let a=e[Xt]||(e[Xt]={}),o=a[t];if(r&&o)o.value=r;else{let[n,s]=$t(t);r?Jt(e,n,a[t]=rn(r,i),s):o&&(Yt(e,n,o,s),a[t]=void 0)}}var Qt=/(?:Once|Passive|Capture)$/;function $t(e){let t;if(Qt.test(e)){t={};let n;for(;n=e.match(Qt);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===`:`?e.slice(3):ce(e.slice(2)),t]}var en=0,tn=Promise.resolve(),nn=()=>en||=(tn.then(()=>en=0),Date.now());function rn(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;pe(an(e,n.value),t,5,[e])};return n.value=e,n.attached=nn(),n}function an(e,t){if(Xe(t)){let n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(e=>t=>!t._stopped&&e&&e(t))}else return t}var on=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,sn=(e,t,n,r,i,a)=>{let o=i===`svg`;t===`class`?kt(e,r,o):t===`style`?zt(e,n,r):s(t)?Je(t)||Zt(e,t,n,r,a):(t[0]===`.`?(t=t.slice(1),!0):t[0]===`^`?(t=t.slice(1),!1):cn(e,t,r,o))?(qt(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&Kt(e,t,r,o,a,t!==`value`)):e._isVueCE&&(/[A-Z]/.test(t)||!D(r))?qt(e,Ae(t),r,a,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),Kt(e,t,r,o))};function cn(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&on(t)&&fe(n));if(t===`spellcheck`||t===`draggable`||t===`translate`||t===`form`||t===`list`&&e.tagName===`INPUT`||t===`type`&&e.tagName===`TEXTAREA`)return!1;if(t===`width`||t===`height`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return on(t)&&D(n)?!1:t in e}var ln=new WeakMap,un=new WeakMap,dn=Symbol(`_moveCb`),fn=Symbol(`_enterCb`),pn=(e=>(delete e.props.mode,e))({name:`TransitionGroup`,props:ye({},pt,{tag:String,moveClass:String}),setup(e,{slots:t}){let n=de(),r=re(),i,o;return Ce(()=>{if(!i.length)return;let t=e.moveClass||`${e.name||`v`}-move`;if(!_n(i[0].el,n.vnode.el,t))return;i.forEach(mn),i.forEach(hn);let r=i.filter(gn);Ot(),r.forEach(e=>{let n=e.el,r=n.style;bt(n,t),r.transform=r.webkitTransform=r.transitionDuration=``;let i=n[dn]=e=>{e&&e.target!==n||(!e||/transform$/.test(e.propertyName))&&(n.removeEventListener(`transitionend`,i),n[dn]=null,xt(n,t))};n.addEventListener(`transitionend`,i)})}),()=>{let s=me(e),c=_t(s),l=s.tag||Se;if(i=[],o)for(let e=0;e<o.length;e++){let t=o[e];t.el&&t.el instanceof Element&&(i.push(t),ne(t,a(t,c,r,n)),ln.set(t,t.el.getBoundingClientRect()))}o=t.default?qe(t.default()):[];for(let e=0;e<o.length;e++){let t=o[e];t.key!=null&&ne(t,a(t,c,r,n))}return Ue(l,null,o)}}});function mn(e){let t=e.el;t[dn]&&t[dn](),t[fn]&&t[fn]()}function hn(e){un.set(e,e.el.getBoundingClientRect())}function gn(e){let t=ln.get(e),n=un.get(e),r=t.left-n.left,i=t.top-n.top;if(r||i){let t=e.el.style;return t.transform=t.webkitTransform=`translate(${r}px,${i}px)`,t.transitionDuration=`0s`,e}}function _n(e,t,n){let r=e.cloneNode(),i=e[dt];i&&i.forEach(e=>{e.split(/\s+/).forEach(e=>e&&r.classList.remove(e))}),n.split(/\s+/).forEach(e=>e&&r.classList.add(e)),r.style.display=`none`;let a=t.nodeType===1?t:t.parentNode;a.appendChild(r);let{hasTransform:o}=Tt(r);return a.removeChild(r),o}var vn=[`ctrl`,`shift`,`alt`,`meta`],yn={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>`button`in e&&e.button!==0,middle:e=>`button`in e&&e.button!==1,right:e=>`button`in e&&e.button!==2,exact:(e,t)=>vn.some(n=>e[`${n}Key`]&&!t.includes(n))},bn=(e,t)=>{let n=e._withMods||={},r=t.join(`.`);return n[r]||(n[r]=(n,...r)=>{for(let e=0;e<t.length;e++){let r=yn[t[e]];if(r&&r(n,t))return}return e(n,...r)})},xn={esc:`escape`,space:` `,up:`arrow-up`,left:`arrow-left`,right:`arrow-right`,down:`arrow-down`,delete:`backspace`},Sn=(e,t)=>{let n=e._withKeys||={},r=t.join(`.`);return n[r]||(n[r]=n=>{if(!(`key`in n))return;let r=ce(n.key);if(t.some(e=>e===r||xn[e]===r))return e(n)})},Cn=ye({patchProp:sn},ct),wn;function Tn(){return wn||=ke(Cn)}var En=(...e)=>{let t=Tn().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=On(e);if(!r)return;let i=t._component;!fe(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,Dn(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t};function Dn(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function On(e){return D(e)?document.querySelector(e):e}function kn(...e){if(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n];if(!r)continue;let i=typeof r;if(i===`string`||i===`number`)t.push(r);else if(i===`object`){let e=Array.isArray(r)?[kn(...r)]:Object.entries(r).map(([e,t])=>t?e:void 0);t=e.length?t.concat(e.filter(e=>!!e)):t}}return t.join(` `).trim()}}function An(e,t){return e?e.classList?e.classList.contains(t):RegExp(`(^| )`+t+`( |$)`,`gi`).test(e.className):!1}function jn(e,t){if(e&&t){let n=t=>{An(e,t)||(e.classList?e.classList.add(t):e.className+=` `+t)};[t].flat().filter(Boolean).forEach(e=>e.split(` `).forEach(n))}}function Mn(){return window.innerWidth-document.documentElement.offsetWidth}function Nn(e){typeof e==`string`?jn(document.body,e||`p-overflow-hidden`):(e!=null&&e.variableName&&document.body.style.setProperty(e.variableName,Mn()+`px`),jn(document.body,e?.className||`p-overflow-hidden`))}function Pn(e){if(e){let t=document.createElement(`a`);if(t.download!==void 0){let{name:n,src:r}=e;return t.setAttribute(`href`,r),t.setAttribute(`download`,n),t.style.display=`none`,document.body.appendChild(t),t.click(),document.body.removeChild(t),!0}}return!1}function Fn(e,t){let n=new Blob([e],{type:`application/csv;charset=utf-8;`});window.navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(n,t+`.csv`):Pn({name:t+`.csv`,src:URL.createObjectURL(n)})||(e=`data:text/csv;charset=utf-8,`+e,window.open(encodeURI(e)))}function In(e,t){if(e&&t){let n=t=>{e.classList?e.classList.remove(t):e.className=e.className.replace(RegExp(`(^|\\b)`+t.split(` `).join(`|`)+`(\\b|$)`,`gi`),` `)};[t].flat().filter(Boolean).forEach(e=>e.split(` `).forEach(n))}}function Ln(e){typeof e==`string`?In(document.body,e||`p-overflow-hidden`):(e!=null&&e.variableName&&document.body.style.removeProperty(e.variableName),In(document.body,e?.className||`p-overflow-hidden`))}function Rn(e){for(let t of document==null?void 0:document.styleSheets)try{for(let n of t?.cssRules)for(let t of n?.style)if(e.test(t))return{name:t,value:n.style.getPropertyValue(t).trim()}}catch{}return null}function zn(e){let t={width:0,height:0};if(e){let[n,r]=[e.style.visibility,e.style.display],i=e.getBoundingClientRect();e.style.visibility=`hidden`,e.style.display=`block`,t.width=i.width||e.offsetWidth,t.height=i.height||e.offsetHeight,e.style.display=r,e.style.visibility=n}return t}function Bn(){let e=window,t=document,n=t.documentElement,r=t.getElementsByTagName(`body`)[0];return{width:e.innerWidth||n.clientWidth||r.clientWidth,height:e.innerHeight||n.clientHeight||r.clientHeight}}function Vn(e){return e?Math.abs(e.scrollLeft):0}function Hn(){let e=document.documentElement;return(window.pageXOffset||Vn(e))-(e.clientLeft||0)}function Un(){let e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)}function Wn(e){return e?getComputedStyle(e).direction===`rtl`:!1}function Gn(e,t,n=!0){if(e){let r=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:zn(e),i=r.height,a=r.width,o=t.offsetHeight,s=t.offsetWidth,c=t.getBoundingClientRect(),l=Un(),u=Hn(),d=Bn(),f,p,m=`top`;c.top+o+i>d.height?(f=c.top+l-i,m=`bottom`,f<0&&(f=l)):f=o+c.top+l,p=c.left+a>d.width?Math.max(0,c.left+u+s-a):c.left+u,Wn(e)?e.style.insetInlineEnd=p+`px`:e.style.insetInlineStart=p+`px`,e.style.top=f+`px`,e.style.transformOrigin=m,n&&(e.style.marginTop=m===`bottom`?`calc(${Rn(/-anchor-gutter$/)?.value??`2px`} * -1)`:Rn(/-anchor-gutter$/)?.value??``)}}function Kn(e,t){e&&(typeof t==`string`?e.style.cssText=t:Object.entries(t||{}).forEach(([t,n])=>e.style[t]=n))}function qn(e,t){if(e instanceof HTMLElement){let n=e.offsetWidth;if(t){let t=getComputedStyle(e);n+=parseFloat(t.marginLeft)+parseFloat(t.marginRight)}return n}return 0}function Jn(e,t,n=!0,r=void 0){if(e){let i=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:zn(e),a=t.offsetHeight,o=t.getBoundingClientRect(),s=Bn(),c,l,u=r??`top`;if(!r&&o.top+a+i.height>s.height?(c=-1*i.height,u=`bottom`,o.top+c<0&&(c=-1*o.top)):c=a,l=i.width>s.width?o.left*-1:o.left+i.width>s.width?(o.left+i.width-s.width)*-1:0,e.style.top=c+`px`,e.style.insetInlineStart=l+`px`,e.style.transformOrigin=u,n){let t=Rn(/-anchor-gutter$/)?.value;e.style.marginTop=u===`bottom`?`calc(${t??`2px`} * -1)`:t??``}}}function Yn(e){if(e){let t=e.parentNode;return t&&t instanceof ShadowRoot&&t.host&&(t=t.host),t}return null}function Xn(e){return!!(e!=null&&e.nodeName&&Yn(e))}function Zn(e){return typeof Element<`u`?e instanceof Element:typeof e==`object`&&!!e&&e.nodeType===1&&typeof e.nodeName==`string`}function Qn(){if(window.getSelection){let e=window.getSelection()||{};e.empty?e.empty():e.removeAllRanges&&e.rangeCount>0&&e.getRangeAt(0).getClientRects().length>0&&e.removeAllRanges()}}function $n(e,t={}){if(Zn(e)){let n=(t,r)=>{var i;let a=(i=e?.$attrs)!=null&&i[t]?[e?.$attrs?.[t]]:[];return[r].flat().reduce((e,r)=>{if(r!=null){let i=typeof r;if(i===`string`||i===`number`)e.push(r);else if(i===`object`){let i=Array.isArray(r)?n(t,r):Object.entries(r).map(([e,n])=>t===`style`&&(n||n===0)?`${e.replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}:${n}`:n?e:void 0);e=i.length?e.concat(i.filter(e=>!!e)):e}}return e},a)};Object.entries(t).forEach(([t,r])=>{if(r!=null){let i=t.match(/^on(.+)/);i?e.addEventListener(i[1].toLowerCase(),r):t===`p-bind`||t===`pBind`?$n(e,r):(r=t===`class`?[...new Set(n(`class`,r))].join(` `).trim():t===`style`?n(`style`,r).join(`;`).trim():r,(e.$attrs=e.$attrs||{})&&(e.$attrs[t]=r),e.setAttribute(t,r))}})}}function er(e,t={},...n){if(e){let r=document.createElement(e);return $n(r,t),r.append(...n),r}}function tr(e,t){if(e){e.style.opacity=`0`;let n=+new Date,r=`0`,i=function(){r=`${+e.style.opacity+(new Date().getTime()-n)/t}`,e.style.opacity=r,n=+new Date,+r<1&&(`requestAnimationFrame`in window?requestAnimationFrame(i):setTimeout(i,16))};i()}}function nr(e,t){return Zn(e)?Array.from(e.querySelectorAll(t)):[]}function rr(e,t){return Zn(e)?e.matches(t)?e:e.querySelector(t):null}function ir(e,t){e&&document.activeElement!==e&&e.focus(t)}function ar(e,t){if(Zn(e)){let n=e.getAttribute(t);return isNaN(n)?n===`true`||n===`false`?n===`true`:n:+n}}function or(e,t=``){let n=nr(e,`button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
|
|
3
|
+
[href]:not([tabindex = "-1"]):not([style*="display:none"]):not([hidden])${t},
|
|
4
|
+
input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
|
|
5
|
+
select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
|
|
6
|
+
textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
|
|
7
|
+
[tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
|
|
8
|
+
[contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t}`),r=[];for(let e of n)getComputedStyle(e).display!=`none`&&getComputedStyle(e).visibility!=`hidden`&&r.push(e);return r}function sr(e,t){let n=or(e,t);return n.length>0?n[0]:null}function cr(e){if(e){let t=e.offsetHeight,n=getComputedStyle(e);return t-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)+parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),t}return 0}function lr(e){if(e){let[t,n]=[e.style.visibility,e.style.display];e.style.visibility=`hidden`,e.style.display=`block`;let r=e.offsetHeight;return e.style.display=n,e.style.visibility=t,r}return 0}function ur(e){if(e){let[t,n]=[e.style.visibility,e.style.display];e.style.visibility=`hidden`,e.style.display=`block`;let r=e.offsetWidth;return e.style.display=n,e.style.visibility=t,r}return 0}function dr(e){if(e){let t=Yn(e)?.childNodes,n=0;if(t)for(let r=0;r<t.length;r++){if(t[r]===e)return n;t[r].nodeType===1&&n++}}return-1}function fr(e,t){let n=or(e,t);return n.length>0?n[n.length-1]:null}function pr(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}return null}function mr(e){if(e){let t=e.getBoundingClientRect();return{top:t.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:t.left+(window.pageXOffset||Vn(document.documentElement)||Vn(document.body)||0)}}return{top:`auto`,left:`auto`}}function hr(e,t){if(e){let n=e.offsetHeight;if(t){let t=getComputedStyle(e);n+=parseFloat(t.marginTop)+parseFloat(t.marginBottom)}return n}return 0}function gr(e,t=[]){let n=Yn(e);return n===null?t:gr(n,t.concat([n]))}function _r(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}return null}function vr(e){let t=[];if(e){let n=gr(e),r=/(auto|scroll)/,i=e=>{try{let t=window.getComputedStyle(e,null);return r.test(t.getPropertyValue(`overflow`))||r.test(t.getPropertyValue(`overflowX`))||r.test(t.getPropertyValue(`overflowY`))}catch{return!1}};for(let e of n){let n=e.nodeType===1&&e.dataset.scrollselectors;if(n){let r=n.split(`,`);for(let n of r){let r=rr(e,n);r&&i(r)&&t.push(r)}}e.nodeType!==9&&i(e)&&t.push(e)}}return t}function yr(){if(window.getSelection)return window.getSelection().toString();if(document.getSelection)return document.getSelection().toString()}function br(e){if(e){let t=e.offsetWidth,n=getComputedStyle(e);return t-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)+parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth),t}return 0}function xr(e,t,n){let r=e[t];typeof r==`function`&&r.apply(e,n??[])}function Sr(){return/(android)/i.test(navigator.userAgent)}function Cr(e){if(e){let t=e.nodeName,n=e.parentElement&&e.parentElement.nodeName;return t===`INPUT`||t===`TEXTAREA`||t===`BUTTON`||t===`A`||n===`INPUT`||n===`TEXTAREA`||n===`BUTTON`||n===`A`||!!e.closest(`.p-button, .p-checkbox, .p-radiobutton`)}return!1}function wr(){return!!(typeof window<`u`&&window.document&&window.document.createElement)}function Tr(e,t=``){return Zn(e)?e.matches(`button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
|
|
9
|
+
[href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
|
|
10
|
+
input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
|
|
11
|
+
select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
|
|
12
|
+
textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
|
|
13
|
+
[tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
|
|
14
|
+
[contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t}`):!1}function Er(e){return!!(e&&e.offsetParent!=null)}function Dr(){return`ontouchstart`in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}function Or(e,t=``,n){Zn(e)&&n!=null&&e.setAttribute(t,n)}function kr(){let e=new Map;return{on(t,n){let r=e.get(t);return r?r.push(n):r=[n],e.set(t,r),this},off(t,n){let r=e.get(t);return r&&r.splice(r.indexOf(n)>>>0,1),this},emit(t,n){let r=e.get(t);r&&r.forEach(e=>{e(n)})},clear(){e.clear()}}}var Ar=Object.defineProperty,jr=Object.getOwnPropertySymbols,Mr=Object.prototype.hasOwnProperty,Nr=Object.prototype.propertyIsEnumerable,Pr=(e,t,n)=>t in e?Ar(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Fr=(e,t)=>{for(var n in t||={})Mr.call(t,n)&&Pr(e,n,t[n]);if(jr)for(var n of jr(t))Nr.call(t,n)&&Pr(e,n,t[n]);return e};function Ir(e){return e==null||e===``||Array.isArray(e)&&e.length===0||!(e instanceof Date)&&typeof e==`object`&&Object.keys(e).length===0}function Lr(e,t,n,r=1){let i=-1,a=Ir(e),o=Ir(t);return i=a&&o?0:a?r:o?-r:typeof e==`string`&&typeof t==`string`?n(e,t):e<t?-1:+(e>t),i}function Rr(e,t,n=new WeakSet){if(e===t)return!0;if(!e||!t||typeof e!=`object`||typeof t!=`object`||n.has(e)||n.has(t))return!1;n.add(e).add(t);let r=Array.isArray(e),i=Array.isArray(t),a,o,s;if(r&&i){if(o=e.length,o!=t.length)return!1;for(a=o;a--!==0;)if(!Rr(e[a],t[a],n))return!1;return!0}if(r!=i)return!1;let c=e instanceof Date,l=t instanceof Date;if(c!=l)return!1;if(c&&l)return e.getTime()==t.getTime();let u=e instanceof RegExp,d=t instanceof RegExp;if(u!=d)return!1;if(u&&d)return e.toString()==t.toString();let f=Object.keys(e);if(o=f.length,o!==Object.keys(t).length)return!1;for(a=o;a--!==0;)if(!Object.prototype.hasOwnProperty.call(t,f[a]))return!1;for(a=o;a--!==0;)if(s=f[a],!Rr(e[s],t[s],n))return!1;return!0}function zr(e,t){return Rr(e,t)}function Br(e){return typeof e==`function`&&`call`in e&&`apply`in e}function j(e){return!Ir(e)}function Vr(e,t){if(!e||!t)return null;try{let n=e[t];if(j(n))return n}catch{}if(Object.keys(e).length){if(Br(t))return t(e);if(t.indexOf(`.`)===-1)return e[t];{let n=t.split(`.`),r=e;for(let e=0,t=n.length;e<t;++e){if(r==null)return null;r=r[n[e]]}return r}}return null}function Hr(e,t,n){return n?Vr(e,n)===Vr(t,n):zr(e,t)}function Ur(e,t){if(e!=null&&t&&t.length){for(let n of t)if(Hr(e,n))return!0}return!1}function Wr(e,t=!0){return e instanceof Object&&e.constructor===Object&&(t||Object.keys(e).length!==0)}function Gr(e={},t={}){let n=Fr({},e);return Object.keys(t).forEach(r=>{let i=r;Wr(t[i])&&i in e&&Wr(e[i])?n[i]=Gr(e[i],t[i]):n[i]=t[i]}),n}function Kr(...e){return e.reduce((e,t,n)=>n===0?t:Gr(e,t),{})}function qr(e,t){let n=-1;if(t){for(let r=0;r<t.length;r++)if(t[r]===e){n=r;break}}return n}function Jr(e,t){let n=-1;if(j(e))try{n=e.findLastIndex(t)}catch{n=e.lastIndexOf([...e].reverse().find(t))}return n}function Yr(e,...t){return Br(e)?e(...t):e}function Xr(e,t=!0){return typeof e==`string`&&(t||e!==``)}function Zr(e){return Xr(e)?e.replace(/(-|_)/g,``).toLowerCase():e}function Qr(e,t=``,n={}){let r=Zr(t).split(`.`),i=r.shift();return i?Wr(e)?Qr(Yr(e[Object.keys(e).find(e=>Zr(e)===i)||``],n),r.join(`.`),n):void 0:Yr(e,n)}function $r(e,t=!0){return Array.isArray(e)&&(t||e.length!==0)}function ei(e){return j(e)&&!isNaN(e)}function ti(e=``){return j(e)&&e.length===1&&!!e.match(/\S| /)}function ni(){return new Intl.Collator(void 0,{numeric:!0}).compare}function ri(e,t){if(t){let n=t.test(e);return t.lastIndex=0,n}return!1}function ii(...e){return Kr(...e)}function ai(e){return e&&e.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g,``).replace(/ {2,}/g,` `).replace(/ ([{:}]) /g,`$1`).replace(/([;,]) /g,`$1`).replace(/ !/g,`!`).replace(/: /g,`:`).trim()}function oi(e){if(e&&/[\xC0-\xFF\u0100-\u017E]/.test(e)){let t={A:/[\xC0-\xC5\u0100\u0102\u0104]/g,AE:/[\xC6]/g,C:/[\xC7\u0106\u0108\u010A\u010C]/g,D:/[\xD0\u010E\u0110]/g,E:/[\xC8-\xCB\u0112\u0114\u0116\u0118\u011A]/g,G:/[\u011C\u011E\u0120\u0122]/g,H:/[\u0124\u0126]/g,I:/[\xCC-\xCF\u0128\u012A\u012C\u012E\u0130]/g,IJ:/[\u0132]/g,J:/[\u0134]/g,K:/[\u0136]/g,L:/[\u0139\u013B\u013D\u013F\u0141]/g,N:/[\xD1\u0143\u0145\u0147\u014A]/g,O:/[\xD2-\xD6\xD8\u014C\u014E\u0150]/g,OE:/[\u0152]/g,R:/[\u0154\u0156\u0158]/g,S:/[\u015A\u015C\u015E\u0160]/g,T:/[\u0162\u0164\u0166]/g,U:/[\xD9-\xDC\u0168\u016A\u016C\u016E\u0170\u0172]/g,W:/[\u0174]/g,Y:/[\xDD\u0176\u0178]/g,Z:/[\u0179\u017B\u017D]/g,a:/[\xE0-\xE5\u0101\u0103\u0105]/g,ae:/[\xE6]/g,c:/[\xE7\u0107\u0109\u010B\u010D]/g,d:/[\u010F\u0111]/g,e:/[\xE8-\xEB\u0113\u0115\u0117\u0119\u011B]/g,g:/[\u011D\u011F\u0121\u0123]/g,i:/[\xEC-\xEF\u0129\u012B\u012D\u012F\u0131]/g,ij:/[\u0133]/g,j:/[\u0135]/g,k:/[\u0137,\u0138]/g,l:/[\u013A\u013C\u013E\u0140\u0142]/g,n:/[\xF1\u0144\u0146\u0148\u014B]/g,p:/[\xFE]/g,o:/[\xF2-\xF6\xF8\u014D\u014F\u0151]/g,oe:/[\u0153]/g,r:/[\u0155\u0157\u0159]/g,s:/[\u015B\u015D\u015F\u0161]/g,t:/[\u0163\u0165\u0167]/g,u:/[\xF9-\xFC\u0169\u016B\u016D\u016F\u0171\u0173]/g,w:/[\u0175]/g,y:/[\xFD\xFF\u0177]/g,z:/[\u017A\u017C\u017E]/g};for(let n in t)e=e.replace(t[n],n)}return e}function si(e,t,n){e&&t!==n&&(n>=e.length&&(n%=e.length,t%=e.length),e.splice(n,0,e.splice(t,1)[0]))}function ci(e,t,n=1,r,i=1){let a=Lr(e,t,r,n),o=n;return(Ir(e)||Ir(t))&&(o=i===1?n:i),o*a}function li(e){return Xr(e,!1)?e[0].toUpperCase()+e.slice(1):e}function ui(e){return Xr(e)?e.replace(/(_)/g,`-`).replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase():e}var di={};function fi(e=`pui_id_`){return Object.hasOwn(di,e)||(di[e]=0),di[e]++,`${e}${di[e]}`}function pi(){let e=[],t=(t,n,r=999)=>{let a=i(t,n,r),o=a.value+(a.key===t?0:r)+1;return e.push({key:t,value:o}),o},n=t=>{e=e.filter(e=>e.value!==t)},r=(e,t)=>i(e,t).value,i=(t,n,r=0)=>[...e].reverse().find(e=>n?!0:e.key===t)||{key:t,value:r},a=e=>e&&parseInt(e.style.zIndex,10)||0;return{get:a,set:(e,n,r)=>{n&&(n.style.zIndex=String(t(e,!0,r)))},clear:e=>{e&&(n(a(e)),e.style.zIndex=``)},getCurrent:e=>r(e,!0)}}var mi=pi(),hi=Object.defineProperty,gi=Object.defineProperties,_i=Object.getOwnPropertyDescriptors,vi=Object.getOwnPropertySymbols,yi=Object.prototype.hasOwnProperty,bi=Object.prototype.propertyIsEnumerable,xi=(e,t,n)=>t in e?hi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Si=(e,t)=>{for(var n in t||={})yi.call(t,n)&&xi(e,n,t[n]);if(vi)for(var n of vi(t))bi.call(t,n)&&xi(e,n,t[n]);return e},Ci=(e,t)=>gi(e,_i(t)),wi=(e,t)=>{var n={};for(var r in e)yi.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&vi)for(var r of vi(e))t.indexOf(r)<0&&bi.call(e,r)&&(n[r]=e[r]);return n},Ti=kr(),Ei=/{([^}]*)}/g,Di=/(\d+\s+[\+\-\*\/]\s+\d+)/g,Oi=/var\([^)]+\)/g;function ki(e){return Xr(e)?e.replace(/[A-Z]/g,(e,t)=>t===0?e:`.`+e.toLowerCase()).toLowerCase():e}function Ai(e){return Wr(e)&&e.hasOwnProperty(`$value`)&&e.hasOwnProperty(`$type`)?e.$value:e}function ji(e){return e.replaceAll(/ /g,``).replace(/[^\w]/g,`-`)}function Mi(e=``,t=``){return ji(`${Xr(e,!1)&&Xr(t,!1)?`${e}-`:e}${t}`)}function Ni(e=``,t=``){return`--${Mi(e,t)}`}function Pi(e=``){return((e.match(/{/g)||[]).length+(e.match(/}/g)||[]).length)%2!=0}function Fi(e,t=``,n=``,r=[],i){if(Xr(e)){let t=e.trim();if(Pi(t))return;if(ri(t,Ei)){let e=t.replaceAll(Ei,e=>`var(${Ni(n,ui(e.replace(/{|}/g,``).split(`.`).filter(e=>!r.some(t=>ri(e,t))).join(`-`)))}${j(i)?`, ${i}`:``})`);return ri(e.replace(Oi,`0`),Di)?`calc(${e})`:e}return t}else if(ei(e))return e}function Ii(e,t,n){Xr(t,!1)&&e.push(`${t}:${n};`)}function Li(e,t){return e?`${e}{${t}}`:``}function Ri(e,t){if(e.indexOf(`dt(`)===-1)return e;function n(e,t){let n=[],i=0,a=``,o=null,s=0;for(;i<=e.length;){let c=e[i];if((c===`"`||c===`'`||c==="`")&&e[i-1]!==`\\`&&(o=o===c?null:c),!o&&(c===`(`&&s++,c===`)`&&s--,(c===`,`||i===e.length)&&s===0)){let e=a.trim();e.startsWith(`dt(`)?n.push(Ri(e,t)):n.push(r(e)),a=``,i++;continue}c!==void 0&&(a+=c),i++}return n}function r(e){let t=e[0];if((t===`"`||t===`'`||t==="`")&&e[e.length-1]===t)return e.slice(1,-1);let n=Number(e);return isNaN(n)?e:n}let i=[],a=[];for(let t=0;t<e.length;t++)if(e[t]===`d`&&e.slice(t,t+3)===`dt(`)a.push(t),t+=2;else if(e[t]===`)`&&a.length>0){let e=a.pop();a.length===0&&i.push([e,t])}if(!i.length)return e;for(let r=i.length-1;r>=0;r--){let[a,o]=i[r],s=t(...n(e.slice(a+3,o),t));e=e.slice(0,a)+s+e.slice(o+1)}return e}var zi=e=>{let t=Gi.getTheme(),n=Vi(t,e,void 0,`variable`);return{name:n?.match(/--[\w-]+/g)?.[0],variable:n,value:Vi(t,e,void 0,`value`)}},Bi=(...e)=>Vi(Gi.getTheme(),...e),Vi=(e={},t,n,r)=>{if(t){let{variable:i,options:a}=Gi.defaults||{},{prefix:o,transform:s}=e?.options||a||{},c=ri(t,Ei)?t:`{${t}}`;return r===`value`||Ir(r)&&s===`strict`?Gi.getTokenValue(t):Fi(c,void 0,o,[i.excludedKeyRegex],n)}return``};function Hi(e,...t){return e instanceof Array?Ri(e.reduce((e,n,r)=>e+n+(Yr(t[r],{dt:Bi})??``),``),Bi):Yr(e,{dt:Bi})}function Ui(e,t={}){let n=Gi.defaults.variable,{prefix:r=n.prefix,selector:i=n.selector,excludedKeyRegex:a=n.excludedKeyRegex}=t,o=[],s=[],c=[{node:e,path:r}];for(;c.length;){let{node:e,path:t}=c.pop();for(let n in e){let i=e[n],l=Ai(i),u=ri(n,a)?Mi(t):Mi(t,ui(n));if(Wr(l))c.push({node:l,path:u});else{Ii(s,Ni(u),Fi(l,u,r,[a]));let e=u;r&&e.startsWith(r+`-`)&&(e=e.slice(r.length+1)),o.push(e.replace(/-/g,`.`))}}}let l=s.join(``);return{value:s,tokens:o,declarations:l,css:Li(i,l)}}var Wi={regex:{rules:{class:{pattern:/^\.([a-zA-Z][\w-]*)$/,resolve(e){return{type:`class`,selector:e,matched:this.pattern.test(e.trim())}}},attr:{pattern:/^\[(.*)\]$/,resolve(e){return{type:`attr`,selector:`:root${e},:host${e}`,matched:this.pattern.test(e.trim())}}},media:{pattern:/^@media (.*)$/,resolve(e){return{type:`media`,selector:e,matched:this.pattern.test(e.trim())}}},system:{pattern:/^system$/,resolve(e){return{type:`system`,selector:`@media (prefers-color-scheme: dark)`,matched:this.pattern.test(e.trim())}}},custom:{resolve(e){return{type:`custom`,selector:e,matched:!0}}}},resolve(e){let t=Object.keys(this.rules).filter(e=>e!==`custom`).map(e=>this.rules[e]);return[e].flat().map(e=>t.map(t=>t.resolve(e)).find(e=>e.matched)??this.rules.custom.resolve(e))}},_toVariables(e,t){return Ui(e,{prefix:t?.prefix})},getCommon({name:e=``,theme:t={},params:n,set:r,defaults:i}){let{preset:a,options:o}=t,s,c,l,u,d,f,p;if(j(a)&&o.transform!==`strict`){let{primitive:t,semantic:n,extend:m}=a,h=n||{},{colorScheme:g}=h,_=wi(h,[`colorScheme`]),v=m||{},{colorScheme:y}=v,b=wi(v,[`colorScheme`]),x=g||{},{dark:S}=x,C=wi(x,[`dark`]),w=y||{},{dark:T}=w,ee=wi(w,[`dark`]),E=j(t)?this._toVariables({primitive:t},o):{},D=j(_)?this._toVariables({semantic:_},o):{},te=j(C)?this._toVariables({light:C},o):{},ne=j(S)?this._toVariables({dark:S},o):{},re=j(b)?this._toVariables({semantic:b},o):{},ie=j(ee)?this._toVariables({light:ee},o):{},ae=j(T)?this._toVariables({dark:T},o):{},[oe,se]=[E.declarations??``,E.tokens],[ce,le]=[D.declarations??``,D.tokens||[]],[ue,de]=[te.declarations??``,te.tokens||[]],[fe,pe]=[ne.declarations??``,ne.tokens||[]],[me,he]=[re.declarations??``,re.tokens||[]],[ge,_e]=[ie.declarations??``,ie.tokens||[]],[ve,ye]=[ae.declarations??``,ae.tokens||[]];s=this.transformCSS(e,oe,`light`,`variable`,o,r,i),c=se,l=`${this.transformCSS(e,`${ce}${ue}`,`light`,`variable`,o,r,i)}${this.transformCSS(e,`${fe}`,`dark`,`variable`,o,r,i)}`,u=[...new Set([...le,...de,...pe])],d=`${this.transformCSS(e,`${me}${ge}color-scheme:light`,`light`,`variable`,o,r,i)}${this.transformCSS(e,`${ve}color-scheme:dark`,`dark`,`variable`,o,r,i)}`,f=[...new Set([...he,..._e,...ye])],p=Yr(a.css,{dt:Bi})}return{primitive:{css:s,tokens:c},semantic:{css:l,tokens:u},global:{css:d,tokens:f},style:p}},getPreset({name:e=``,preset:t={},options:n,params:r,set:i,defaults:a,selector:o}){let s,c,l;if(j(t)&&n.transform!==`strict`){let r=e.replace(`-directive`,``),u=t,{colorScheme:d,extend:f,css:p}=u,m=wi(u,[`colorScheme`,`extend`,`css`]),h=f||{},{colorScheme:g}=h,_=wi(h,[`colorScheme`]),v=d||{},{dark:y}=v,b=wi(v,[`dark`]),x=g||{},{dark:S}=x,C=wi(x,[`dark`]),w=j(m)?this._toVariables({[r]:Si(Si({},m),_)},n):{},T=j(b)?this._toVariables({[r]:Si(Si({},b),C)},n):{},ee=j(y)?this._toVariables({[r]:Si(Si({},y),S)},n):{},[E,D]=[w.declarations??``,w.tokens||[]],[te,ne]=[T.declarations??``,T.tokens||[]],[re,ie]=[ee.declarations??``,ee.tokens||[]];s=`${this.transformCSS(r,`${E}${te}`,`light`,`variable`,n,i,a,o)}${this.transformCSS(r,re,`dark`,`variable`,n,i,a,o)}`,c=[...new Set([...D,...ne,...ie])],l=Yr(p,{dt:Bi})}return{css:s,tokens:c,style:l}},getPresetC({name:e=``,theme:t={},params:n,set:r,defaults:i}){let{preset:a,options:o}=t,s=a?.components?.[e];return this.getPreset({name:e,preset:s,options:o,params:n,set:r,defaults:i})},getPresetD({name:e=``,theme:t={},params:n,set:r,defaults:i}){let a=e.replace(`-directive`,``),{preset:o,options:s}=t,c=o?.components?.[a]||o?.directives?.[a];return this.getPreset({name:a,preset:c,options:s,params:n,set:r,defaults:i})},applyDarkColorScheme(e){return!(e.darkModeSelector===`none`||e.darkModeSelector===!1)},getColorSchemeOption(e,t){return this.applyDarkColorScheme(e)?this.regex.resolve(e.darkModeSelector===!0?t.options.darkModeSelector:e.darkModeSelector??t.options.darkModeSelector):[]},getLayerOrder(e,t={},n,r){let{cssLayer:i}=t;return i?`@layer ${Yr(i.order||i.name||`primeui`,n)}`:``},getCommonStyleSheet({name:e=``,theme:t={},params:n,props:r={},set:i,defaults:a}){let o=this.getCommon({name:e,theme:t,params:n,set:i,defaults:a}),s=Object.entries(r).reduce((e,[t,n])=>e.push(`${t}="${n}"`)&&e,[]).join(` `);return Object.entries(o||{}).reduce((e,[t,n])=>{if(Wr(n)&&Object.hasOwn(n,`css`)){let r=ai(n.css),i=`${t}-variables`;e.push(`<style type="text/css" data-primevue-style-id="${i}" ${s}>${r}</style>`)}return e},[]).join(``)},getStyleSheet({name:e=``,theme:t={},params:n,props:r={},set:i,defaults:a}){let o={name:e,theme:t,params:n,set:i,defaults:a},s=(e.includes(`-directive`)?this.getPresetD(o):this.getPresetC(o))?.css,c=Object.entries(r).reduce((e,[t,n])=>e.push(`${t}="${n}"`)&&e,[]).join(` `);return s?`<style type="text/css" data-primevue-style-id="${e}-variables" ${c}>${ai(s)}</style>`:``},createTokens(e={},t,n=``,r=``,i={}){let a=function(e,t={},n=[]){if(n.includes(this.path))return console.warn(`Circular reference detected at ${this.path}`),{colorScheme:e,path:this.path,paths:t,value:void 0};n.push(this.path),t.name=this.path,t.binding||={};let r=this.value;if(typeof this.value==`string`&&Ei.test(this.value)){let i=this.value.trim().replace(Ei,r=>{let i=r.slice(1,-1),a=this.tokens[i];if(!a)return console.warn(`Token not found for path: ${i}`),`__UNRESOLVED__`;let o=a.computed(e,t,n);return Array.isArray(o)&&o.length===2?`light-dark(${o[0].value},${o[1].value})`:o?.value??`__UNRESOLVED__`});r=Di.test(i.replace(Oi,`0`))?`calc(${i})`:i}return Ir(t.binding)&&delete t.binding,n.pop(),{colorScheme:e,path:this.path,paths:t,value:r.includes(`__UNRESOLVED__`)?void 0:r}},o=(e,n,r)=>{Object.entries(e).forEach(([e,s])=>{let c=ri(e,t.variable.excludedKeyRegex)?n:n?`${n}.${ki(e)}`:ki(e),l=r?`${r}.${e}`:e;Wr(s)?o(s,c,l):(i[c]||(i[c]={paths:[],computed:(e,t={},n=[])=>{if(i[c].paths.length===1)return i[c].paths[0].computed(i[c].paths[0].scheme,t.binding,n);if(e&&e!==`none`)for(let r=0;r<i[c].paths.length;r++){let a=i[c].paths[r];if(a.scheme===e)return a.computed(e,t.binding,n)}return i[c].paths.map(e=>e.computed(e.scheme,t[e.scheme],n))}}),i[c].paths.push({path:l,value:s,scheme:l.includes(`colorScheme.light`)?`light`:l.includes(`colorScheme.dark`)?`dark`:`none`,computed:a,tokens:i}))})};return o(e,n,r),i},getTokenValue(e,t,n){let r=(e=>e.split(`.`).filter(e=>!ri(e.toLowerCase(),n.variable.excludedKeyRegex)).join(`.`))(t),i=t.includes(`colorScheme.light`)?`light`:t.includes(`colorScheme.dark`)?`dark`:void 0,a=[e[r]?.computed(i)].flat().filter(e=>e);return a.length===1?a[0].value:a.reduce((e={},t)=>{let n=t,{colorScheme:r}=n;return e[r]=wi(n,[`colorScheme`]),e},void 0)},getSelectorRule(e,t,n,r){return n===`class`||n===`attr`?Li(j(t)?`${e}${t},${e} ${t}`:e,r):Li(e,Li(t??`:root,:host`,r))},transformCSS(e,t,n,r,i={},a,o,s){if(j(t)){let{cssLayer:c}=i;if(r!==`style`){let e=this.getColorSchemeOption(i,o);t=n===`dark`?e.reduce((e,{type:n,selector:r})=>(j(r)&&(e+=r.includes(`[CSS]`)?r.replace(`[CSS]`,t):this.getSelectorRule(r,s,n,t)),e),``):Li(s??`:root,:host`,t)}if(c){let n={name:`primeui`,order:`primeui`};Wr(c)&&(n.name=Yr(c.name,{name:e,type:r})),j(n.name)&&(t=Li(`@layer ${n.name}`,t),a?.layerNames(n.name))}return t}return``}},Gi={defaults:{variable:{prefix:`p`,selector:`:root,:host`,excludedKeyRegex:/^(primitive|semantic|components|directives|variables|colorscheme|light|dark|common|root|states|extend|css)$/gi},options:{prefix:`p`,darkModeSelector:`system`,cssLayer:!1}},_theme:void 0,_layerNames:new Set,_loadedStyleNames:new Set,_loadingStyles:new Set,_tokens:{},update(e={}){let{theme:t}=e;t&&(this._theme=Ci(Si({},t),{options:Si(Si({},this.defaults.options),t.options)}),this._tokens=Wi.createTokens(this.preset,this.defaults),this.clearLoadedStyleNames())},get theme(){return this._theme},get preset(){return this.theme?.preset||{}},get options(){return this.theme?.options||{}},get tokens(){return this._tokens},getTheme(){return this.theme},setTheme(e){this.update({theme:e}),Ti.emit(`theme:change`,e)},getPreset(){return this.preset},setPreset(e){this._theme=Ci(Si({},this.theme),{preset:e}),this._tokens=Wi.createTokens(e,this.defaults),this.clearLoadedStyleNames(),Ti.emit(`preset:change`,e),Ti.emit(`theme:change`,this.theme)},getOptions(){return this.options},setOptions(e){this._theme=Ci(Si({},this.theme),{options:e}),this.clearLoadedStyleNames(),Ti.emit(`options:change`,e),Ti.emit(`theme:change`,this.theme)},getLayerNames(){return[...this._layerNames]},setLayerNames(e){this._layerNames.add(e)},getLoadedStyleNames(){return this._loadedStyleNames},isStyleNameLoaded(e){return this._loadedStyleNames.has(e)},setLoadedStyleName(e){this._loadedStyleNames.add(e)},deleteLoadedStyleName(e){this._loadedStyleNames.delete(e)},clearLoadedStyleNames(){this._loadedStyleNames.clear()},getTokenValue(e){return Wi.getTokenValue(this.tokens,e,this.defaults)},getCommon(e=``,t){return Wi.getCommon({name:e,theme:this.theme,params:t,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},getComponent(e=``,t){let n={name:e,theme:this.theme,params:t,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return Wi.getPresetC(n)},getDirective(e=``,t){let n={name:e,theme:this.theme,params:t,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return Wi.getPresetD(n)},getCustomPreset(e=``,t,n,r){let i={name:e,preset:t,options:this.options,selector:n,params:r,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return Wi.getPreset(i)},getLayerOrderCSS(e=``){return Wi.getLayerOrder(e,this.options,{names:this.getLayerNames()},this.defaults)},transformCSS(e=``,t,n=`style`,r){return Wi.transformCSS(e,t,r,n,this.options,{layerNames:this.setLayerNames.bind(this)},this.defaults)},getCommonStyleSheet(e=``,t,n={}){return Wi.getCommonStyleSheet({name:e,theme:this.theme,params:t,props:n,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},getStyleSheet(e,t,n={}){return Wi.getStyleSheet({name:e,theme:this.theme,params:t,props:n,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},onStyleMounted(e){this._loadingStyles.add(e)},onStyleUpdated(e){this._loadingStyles.add(e)},onStyleLoaded(e,{name:t}){this._loadingStyles.size&&(this._loadingStyles.delete(t),Ti.emit(`theme:${t}:load`,e),!this._loadingStyles.size&&Ti.emit(`theme:load`))}},Ki={_loadedStyleNames:new Set,getLoadedStyleNames:function(){return this._loadedStyleNames},isStyleNameLoaded:function(e){return this._loadedStyleNames.has(e)},setLoadedStyleName:function(e){this._loadedStyleNames.add(e)},deleteLoadedStyleName:function(e){this._loadedStyleNames.delete(e)},clearLoadedStyleNames:function(){this._loadedStyleNames.clear()}},qi=`
|
|
15
|
+
*,
|
|
16
|
+
::before,
|
|
17
|
+
::after {
|
|
18
|
+
box-sizing: border-box;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.p-collapsible-enter-active {
|
|
22
|
+
animation: p-animate-collapsible-expand 0.2s ease-out;
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.p-collapsible-leave-active {
|
|
27
|
+
animation: p-animate-collapsible-collapse 0.2s ease-out;
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@keyframes p-animate-collapsible-expand {
|
|
32
|
+
from {
|
|
33
|
+
grid-template-rows: 0fr;
|
|
34
|
+
}
|
|
35
|
+
to {
|
|
36
|
+
grid-template-rows: 1fr;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@keyframes p-animate-collapsible-collapse {
|
|
41
|
+
from {
|
|
42
|
+
grid-template-rows: 1fr;
|
|
43
|
+
}
|
|
44
|
+
to {
|
|
45
|
+
grid-template-rows: 0fr;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.p-disabled,
|
|
50
|
+
.p-disabled * {
|
|
51
|
+
cursor: default;
|
|
52
|
+
pointer-events: none;
|
|
53
|
+
user-select: none;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.p-disabled,
|
|
57
|
+
.p-component:disabled {
|
|
58
|
+
opacity: dt('disabled.opacity');
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.pi {
|
|
62
|
+
font-size: dt('icon.size');
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.p-icon {
|
|
66
|
+
width: dt('icon.size');
|
|
67
|
+
height: dt('icon.size');
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.p-overlay-mask {
|
|
71
|
+
background: var(--px-mask-background, dt('mask.background'));
|
|
72
|
+
color: dt('mask.color');
|
|
73
|
+
position: fixed;
|
|
74
|
+
top: 0;
|
|
75
|
+
left: 0;
|
|
76
|
+
width: 100%;
|
|
77
|
+
height: 100%;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.p-overlay-mask-enter-active {
|
|
81
|
+
animation: p-animate-overlay-mask-enter dt('mask.transition.duration') forwards;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.p-overlay-mask-leave-active {
|
|
85
|
+
animation: p-animate-overlay-mask-leave dt('mask.transition.duration') forwards;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
@keyframes p-animate-overlay-mask-enter {
|
|
89
|
+
from {
|
|
90
|
+
background: transparent;
|
|
91
|
+
}
|
|
92
|
+
to {
|
|
93
|
+
background: var(--px-mask-background, dt('mask.background'));
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
@keyframes p-animate-overlay-mask-leave {
|
|
97
|
+
from {
|
|
98
|
+
background: var(--px-mask-background, dt('mask.background'));
|
|
99
|
+
}
|
|
100
|
+
to {
|
|
101
|
+
background: transparent;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.p-anchored-overlay-enter-active {
|
|
106
|
+
animation: p-animate-anchored-overlay-enter 300ms cubic-bezier(.19,1,.22,1);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.p-anchored-overlay-leave-active {
|
|
110
|
+
animation: p-animate-anchored-overlay-leave 300ms cubic-bezier(.19,1,.22,1);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
@keyframes p-animate-anchored-overlay-enter {
|
|
114
|
+
from {
|
|
115
|
+
opacity: 0;
|
|
116
|
+
transform: scale(0.93);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
@keyframes p-animate-anchored-overlay-leave {
|
|
121
|
+
to {
|
|
122
|
+
opacity: 0;
|
|
123
|
+
transform: scale(0.93);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
`;function Ji(e){"@babel/helpers - typeof";return Ji=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Ji(e)}function Yi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Xi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Yi(Object(n),!0).forEach(function(t){Zi(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yi(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Zi(e,t,n){return(t=Qi(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qi(e){var t=$i(e,`string`);return Ji(t)==`symbol`?t:t+``}function $i(e,t){if(Ji(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ji(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function ea(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;de()&&de().components?Te(e):t?e():l(e)}var ta=0;function na(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=O(!1),r=O(e),i=O(null),a=wr()?window.document:void 0,o=t.document,s=o===void 0?a:o,c=t.immediate,l=c===void 0?!0:c,u=t.manual,d=u===void 0?!1:u,p=t.name,m=p===void 0?`style_${++ta}`:p,h=t.id,g=h===void 0?void 0:h,_=t.media,v=_===void 0?void 0:_,y=t.nonce,b=y===void 0?void 0:y,x=t.first,S=x===void 0?!1:x,C=t.onMounted,w=C===void 0?void 0:C,T=t.onUpdated,ee=T===void 0?void 0:T,E=t.onLoad,D=E===void 0?void 0:E,te=t.props,ne=te===void 0?{}:te,re=function(){},ie=function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(s){var o=Xi(Xi({},ne),a),c=o.name||m,l=o.id||g,u=o.nonce||b;i.value=s.querySelector(`style[data-primevue-style-id="${c}"]`)||s.getElementById(l)||s.createElement(`style`),i.value.isConnected||(r.value=t||e,$n(i.value,{type:`text/css`,id:l,media:v,nonce:u}),S?s.head.prepend(i.value):s.head.appendChild(i.value),Or(i.value,`data-primevue-style-id`,c),$n(i.value,o),i.value.onload=function(e){return D?.(e,{name:c})},w?.(c)),!n.value&&(re=f(r,function(e){i.value.textContent=e,ee?.(c)},{immediate:!0}),n.value=!0)}};return l&&!d&&ea(ie),{id:g,name:m,el:i,css:r,unload:function(){!s||!n.value||(re(),Xn(i.value)&&s.head.removeChild(i.value),n.value=!1,i.value=null)},load:ie,isLoaded:Le(n)}}function ra(e){"@babel/helpers - typeof";return ra=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},ra(e)}var ia,aa,oa,sa;function ca(e,t){return pa(e)||fa(e,t)||ua(e,t)||la()}function la(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
127
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ua(e,t){if(e){if(typeof e==`string`)return da(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?da(e,t):void 0}}function da(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function fa(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function pa(e){if(Array.isArray(e))return e}function ma(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ha(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ma(Object(n),!0).forEach(function(t){ga(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ma(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ga(e,t,n){return(t=_a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _a(e){var t=va(e,`string`);return ra(t)==`symbol`?t:t+``}function va(e,t){if(ra(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ra(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function ya(e,t){return t||=e.slice(0),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var ba={name:`base`,css:function(e){var t=e.dt;return`
|
|
128
|
+
.p-hidden-accessible {
|
|
129
|
+
border: 0;
|
|
130
|
+
clip: rect(0 0 0 0);
|
|
131
|
+
height: 1px;
|
|
132
|
+
margin: -1px;
|
|
133
|
+
opacity: 0;
|
|
134
|
+
overflow: hidden;
|
|
135
|
+
padding: 0;
|
|
136
|
+
pointer-events: none;
|
|
137
|
+
position: absolute;
|
|
138
|
+
white-space: nowrap;
|
|
139
|
+
width: 1px;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.p-overflow-hidden {
|
|
143
|
+
overflow: hidden;
|
|
144
|
+
padding-right: ${t(`scrollbar.width`)};
|
|
145
|
+
}
|
|
146
|
+
`},style:qi,classes:{},inlineStyles:{},load:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=(arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(e){return e})(Hi(ia||=ya([``,``]),e));return j(n)?na(ai(n),ha({name:this.name},t)):{}},loadCSS:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.load(this.css,e)},loadStyle:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:``;return this.load(this.style,t,function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:``;return Gi.transformCSS(t.name||e.name,`${r}${Hi(aa||=ya([``,``]),n)}`)})},getCommonTheme:function(e){return Gi.getCommon(this.name,e)},getComponentTheme:function(e){return Gi.getComponent(this.name,e)},getDirectiveTheme:function(e){return Gi.getDirective(this.name,e)},getPresetTheme:function(e,t,n){return Gi.getCustomPreset(this.name,e,t,n)},getLayerOrderThemeCSS:function(){return Gi.getLayerOrderCSS(this.name)},getStyleSheet:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:``,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.css){var n=Yr(this.css,{dt:Bi})||``,r=ai(Hi(oa||=ya([``,``,``]),n,e)),i=Object.entries(t).reduce(function(e,t){var n=ca(t,2),r=n[0],i=n[1];return e.push(`${r}="${i}"`)&&e},[]).join(` `);return j(r)?`<style type="text/css" data-primevue-style-id="${this.name}" ${i}>${r}</style>`:``}return``},getCommonThemeStyleSheet:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Gi.getCommonStyleSheet(this.name,e,t)},getThemeStyleSheet:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[Gi.getStyleSheet(this.name,e,t)];if(this.style){var r=this.name===`base`?`global-style`:`${this.name}-style`,i=Hi(sa||=ya([``,``]),Yr(this.style,{dt:Bi})),a=ai(Gi.transformCSS(r,i)),o=Object.entries(t).reduce(function(e,t){var n=ca(t,2),r=n[0],i=n[1];return e.push(`${r}="${i}"`)&&e},[]).join(` `);j(a)&&n.push(`<style type="text/css" data-primevue-style-id="${r}" ${o}>${a}</style>`)}return n.join(``)},extend:function(e){return ha(ha({},this),{},{css:void 0,style:void 0},e)}};function xa(){return`${arguments.length>0&&arguments[0]!==void 0?arguments[0]:`pc`}${te().replace(`v-`,``).replaceAll(`-`,`_`)}`}var Sa=ba.extend({name:`common`});function Ca(e){"@babel/helpers - typeof";return Ca=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Ca(e)}function wa(e){return ja(e)||Ta(e)||Oa(e)||Da()}function Ta(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Ea(e,t){return ja(e)||Aa(e,t)||Oa(e,t)||Da()}function Da(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
147
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Oa(e,t){if(e){if(typeof e==`string`)return ka(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ka(e,t):void 0}}function ka(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Aa(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function ja(e){if(Array.isArray(e))return e}function Ma(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Ma(Object(n),!0).forEach(function(t){Na(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ma(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Na(e,t,n){return(t=Pa(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pa(e){var t=Fa(e,`string`);return Ca(t)==`symbol`?t:t+``}function Fa(e,t){if(Ca(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ca(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Ia={name:`BaseComponent`,props:{pt:{type:Object,default:void 0},ptOptions:{type:Object,default:void 0},unstyled:{type:Boolean,default:void 0},dt:{type:Object,default:void 0}},inject:{$parentInstance:{default:void 0}},watch:{isUnstyled:{immediate:!0,handler:function(e){Ti.off(`theme:change`,this._loadCoreStyles),e||(this._loadCoreStyles(),this._themeChangeListener(this._loadCoreStyles))}},dt:{immediate:!0,handler:function(e,t){var n=this;Ti.off(`theme:change`,this._themeScopedListener),e?(this._loadScopedThemeStyles(e),this._themeScopedListener=function(){return n._loadScopedThemeStyles(e)},this._themeChangeListener(this._themeScopedListener)):this._unloadScopedThemeStyles()}}},scopedStyleEl:void 0,rootEl:void 0,uid:void 0,$attrSelector:void 0,beforeCreate:function(){var e,t,n,r,i,a,o,s,c,l,u=this.pt?._usept,d=u?(e=this.pt)==null||(e=e.originalValue)==null?void 0:e[this.$.type.name]:void 0;(n=(u?(t=this.pt)==null||(t=t.value)==null?void 0:t[this.$.type.name]:this.pt)||d)==null||(n=n.hooks)==null||(r=n.onBeforeCreate)==null||r.call(n);var f=(i=this.$primevueConfig)==null||(i=i.pt)==null?void 0:i._usept,p=f?(a=this.$primevue)==null||(a=a.config)==null||(a=a.pt)==null?void 0:a.originalValue:void 0;(c=(f?(o=this.$primevue)==null||(o=o.config)==null||(o=o.pt)==null?void 0:o.value:(s=this.$primevue)==null||(s=s.config)==null?void 0:s.pt)||p)==null||(c=c[this.$.type.name])==null||(c=c.hooks)==null||(l=c.onBeforeCreate)==null||l.call(c),this.$attrSelector=xa(),this.uid=this.$attrs.id||this.$attrSelector.replace(`pc`,`pv_id_`)},created:function(){this._hook(`onCreated`)},beforeMount:function(){this.rootEl=rr(Zn(this.$el)?this.$el:this.$el?.parentElement,`[${this.$attrSelector}]`),this.rootEl&&(this.rootEl.$pc=M({name:this.$.type.name,attrSelector:this.$attrSelector},this.$params)),this._loadStyles(),this._hook(`onBeforeMount`)},mounted:function(){this._hook(`onMounted`)},beforeUpdate:function(){this._hook(`onBeforeUpdate`)},updated:function(){this._hook(`onUpdated`)},beforeUnmount:function(){this._hook(`onBeforeUnmount`)},unmounted:function(){this._removeThemeListeners(),this._unloadScopedThemeStyles(),this._hook(`onUnmounted`)},methods:{_hook:function(e){if(!this.$options.hostName){var t=this._usePT(this._getPT(this.pt,this.$.type.name),this._getOptionValue,`hooks.${e}`),n=this._useDefaultPT(this._getOptionValue,`hooks.${e}`);t?.(),n?.()}},_mergeProps:function(e){var t=[...arguments].slice(1);return Br(e)?e.apply(void 0,t):E.apply(void 0,t)},_load:function(){Ki.isStyleNameLoaded(`base`)||(ba.loadCSS(this.$styleOptions),this._loadGlobalStyles(),Ki.setLoadedStyleName(`base`)),this._loadThemeStyles()},_loadStyles:function(){this._load(),this._themeChangeListener(this._load)},_loadCoreStyles:function(){var e;!Ki.isStyleNameLoaded(this.$style?.name)&&(e=this.$style)!=null&&e.name&&(Sa.loadCSS(this.$styleOptions),this.$options.style&&this.$style.loadCSS(this.$styleOptions),Ki.setLoadedStyleName(this.$style.name))},_loadGlobalStyles:function(){var e=this._useGlobalPT(this._getOptionValue,`global.css`,this.$params);j(e)&&ba.load(e,M({name:`global`},this.$styleOptions))},_loadThemeStyles:function(){var e;if(!(this.isUnstyled||this.$theme===`none`)){if(!Gi.isStyleNameLoaded(`common`)){var t,n,r=((t=this.$style)==null||(n=t.getCommonTheme)==null?void 0:n.call(t))||{},i=r.primitive,a=r.semantic,o=r.global,s=r.style;ba.load(i?.css,M({name:`primitive-variables`},this.$styleOptions)),ba.load(a?.css,M({name:`semantic-variables`},this.$styleOptions)),ba.load(o?.css,M({name:`global-variables`},this.$styleOptions)),ba.loadStyle(M({name:`global-style`},this.$styleOptions),s),Gi.setLoadedStyleName(`common`)}if(!Gi.isStyleNameLoaded(this.$style?.name)&&(e=this.$style)!=null&&e.name){var c,l,u,d,f=((c=this.$style)==null||(l=c.getComponentTheme)==null?void 0:l.call(c))||{},p=f.css,m=f.style;(u=this.$style)==null||u.load(p,M({name:`${this.$style.name}-variables`},this.$styleOptions)),(d=this.$style)==null||d.loadStyle(M({name:`${this.$style.name}-style`},this.$styleOptions),m),Gi.setLoadedStyleName(this.$style.name)}if(!Gi.isStyleNameLoaded(`layer-order`)){var h,g,_=(h=this.$style)==null||(g=h.getLayerOrderThemeCSS)==null?void 0:g.call(h);ba.load(_,M({name:`layer-order`,first:!0},this.$styleOptions)),Gi.setLoadedStyleName(`layer-order`)}}},_loadScopedThemeStyles:function(e){var t,n,r=(((t=this.$style)==null||(n=t.getPresetTheme)==null?void 0:n.call(t,e,`[${this.$attrSelector}]`))||{}).css;this.scopedStyleEl=(this.$style?.load(r,M({name:`${this.$attrSelector}-${this.$style.name}`},this.$styleOptions))).el},_unloadScopedThemeStyles:function(){var e;(e=this.scopedStyleEl)==null||(e=e.value)==null||e.remove()},_themeChangeListener:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){};Ki.clearLoadedStyleNames(),Ti.on(`theme:change`,e)},_removeThemeListeners:function(){Ti.off(`theme:change`,this._loadCoreStyles),Ti.off(`theme:change`,this._load),Ti.off(`theme:change`,this._themeScopedListener)},_getHostInstance:function(e){return e?this.$options.hostName?e.$.type.name===this.$options.hostName?e:this._getHostInstance(e.$parentInstance):e.$parentInstance:void 0},_getPropValue:function(e){return this[e]||this._getHostInstance(this)?.[e]},_getOptionValue:function(e){return Qr(e,arguments.length>1&&arguments[1]!==void 0?arguments[1]:``,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{})},_getPTValue:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:``,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=/./g.test(t)&&!!n[t.split(`.`)[0]],a=this._getPropValue(`ptOptions`)||this.$primevueConfig?.ptOptions||{},o=a.mergeSections,s=o===void 0?!0:o,c=a.mergeProps,l=c===void 0?!1:c,u=r?i?this._useGlobalPT(this._getPTClassValue,t,n):this._useDefaultPT(this._getPTClassValue,t,n):void 0,d=i?void 0:this._getPTSelf(e,this._getPTClassValue,t,M(M({},n),{},{global:u||{}})),f=this._getPTDatasets(t);return s||!s&&d?l?this._mergeProps(l,u,d,f):M(M(M({},u),d),f):M(M({},d),f)},_getPTSelf:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=[...arguments].slice(1);return E(this._usePT.apply(this,[this._getPT(e,this.$name)].concat(t)),this._usePT.apply(this,[this.$_attrsPT].concat(t)))},_getPTDatasets:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:``,t=`data-pc-`,n=e===`root`&&j(this.pt?.[`data-pc-section`]);return e!==`transition`&&M(M({},e===`root`&&M(M(Na({},`${t}name`,Zr(n?this.pt?.[`data-pc-section`]:this.$.type.name)),n&&Na({},`${t}extend`,Zr(this.$.type.name))),{},Na({},`${this.$attrSelector}`,``))),{},Na({},`${t}section`,Zr(e)))},_getPTClassValue:function(){var e=this._getOptionValue.apply(this,arguments);return Xr(e)||$r(e)?{class:e}:e},_getPT:function(e){var t=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:``,r=arguments.length>2?arguments[2]:void 0,i=function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=r?r(e):e,o=Zr(n),s=Zr(t.$name);return(i&&o===s?void 0:a?.[o])??a};return e!=null&&e.hasOwnProperty(`_usept`)?{_usept:e._usept,originalValue:i(e.originalValue),value:i(e.value)}:i(e,!0)},_usePT:function(e,t,n,r){var i=function(e){return t(e,n,r)};if(e!=null&&e.hasOwnProperty(`_usept`)){var a=e._usept||this.$primevueConfig?.ptOptions||{},o=a.mergeSections,s=o===void 0?!0:o,c=a.mergeProps,l=c===void 0?!1:c,u=i(e.originalValue),d=i(e.value);return u===void 0&&d===void 0?void 0:Xr(d)?d:Xr(u)?u:s||!s&&d?l?this._mergeProps(l,u,d):M(M({},u),d):d}return i(e)},_useGlobalPT:function(e,t,n){return this._usePT(this.globalPT,e,t,n)},_useDefaultPT:function(e,t,n){return this._usePT(this.defaultPT,e,t,n)},ptm:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:``,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this._getPTValue(this.pt,e,M(M({},this.$params),t))},ptmi:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:``,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=E(this.$_attrsWithoutPT,this.ptm(e,t));return n!=null&&n.hasOwnProperty(`id`)&&(n.id??=this.$id),n},ptmo:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:``,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this._getPTValue(e,t,M({instance:this},n),!1)},cx:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:``,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.isUnstyled?void 0:this._getOptionValue(this.$style.classes,e,M(M({},this.$params),t))},sx:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:``,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(t){var r=this._getOptionValue(this.$style.inlineStyles,e,M(M({},this.$params),n));return[this._getOptionValue(Sa.inlineStyles,e,M(M({},this.$params),n)),r]}}},computed:{globalPT:function(){var e=this;return this._getPT(this.$primevueConfig?.pt,void 0,function(t){return Yr(t,{instance:e})})},defaultPT:function(){var e=this;return this._getPT(this.$primevueConfig?.pt,void 0,function(t){return e._getOptionValue(t,e.$name,M({},e.$params))||Yr(t,M({},e.$params))})},isUnstyled:function(){return this.unstyled===void 0?this.$primevueConfig?.unstyled:this.unstyled},$id:function(){return this.$attrs.id||this.uid},$inProps:function(){var e=Object.keys(this.$.vnode?.props||{});return Object.fromEntries(Object.entries(this.$props).filter(function(t){var n=Ea(t,1)[0];return e?.includes(n)}))},$theme:function(){return this.$primevueConfig?.theme},$style:function(){return M(M({classes:void 0,inlineStyles:void 0,load:function(){},loadCSS:function(){},loadStyle:function(){}},(this._getHostInstance(this)||{}).$style),this.$options.style)},$styleOptions:function(){var e;return{nonce:(e=this.$primevueConfig)==null||(e=e.csp)==null?void 0:e.nonce}},$primevueConfig:function(){return this.$primevue?.config},$name:function(){return this.$options.hostName||this.$.type.name},$params:function(){var e=this._getHostInstance(this)||this.$parent;return{instance:this,props:this.$props,state:this.$data,attrs:this.$attrs,parent:{instance:e,props:e?.$props,state:e?.$data,attrs:e?.$attrs}}},$_attrsPT:function(){return Object.entries(this.$attrs||{}).filter(function(e){return Ea(e,1)[0]?.startsWith(`pt:`)}).reduce(function(e,t){var n=Ea(t,2),r=n[0],i=n[1];return ka(wa(r.split(`:`))).slice(1)?.reduce(function(e,t,n,r){return!e[t]&&(e[t]=n===r.length-1?i:{}),e[t]},e),e},{})},$_attrsWithoutPT:function(){return Object.entries(this.$attrs||{}).filter(function(e){var t=Ea(e,1)[0];return!(t!=null&&t.startsWith(`pt:`))}).reduce(function(e,t){var n=Ea(t,2),r=n[0];return e[r]=n[1],e},{})}}},La,Ra=e=>La=e,za=Symbol();function Ba(e){return e&&typeof e==`object`&&Object.prototype.toString.call(e)===`[object Object]`&&typeof e.toJSON!=`function`}var Va;(function(e){e.direct=`direct`,e.patchObject=`patch object`,e.patchFunction=`patch function`})(Va||={});var Ha=typeof window<`u`,Ua=typeof window==`object`&&window.window===window?window:typeof self==`object`&&self.self===self?self:typeof global==`object`&&global.global===global?global:typeof globalThis==`object`?globalThis:{HTMLElement:null};function Wa(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([``,e],{type:e.type}):e}function Ga(e,t,n){let r=new XMLHttpRequest;r.open(`GET`,e),r.responseType=`blob`,r.onload=function(){Xa(r.response,t,n)},r.onerror=function(){console.error(`could not download file`)},r.send()}function Ka(e){let t=new XMLHttpRequest;t.open(`HEAD`,e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function qa(e){try{e.dispatchEvent(new MouseEvent(`click`))}catch{let t=document.createEvent(`MouseEvents`);t.initMouseEvent(`click`,!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var Ja=typeof navigator==`object`?navigator:{userAgent:``},Ya=/Macintosh/.test(Ja.userAgent)&&/AppleWebKit/.test(Ja.userAgent)&&!/Safari/.test(Ja.userAgent),Xa=Ha?typeof HTMLAnchorElement<`u`&&`download`in HTMLAnchorElement.prototype&&!Ya?Za:`msSaveOrOpenBlob`in Ja?Qa:$a:()=>{};function Za(e,t=`download`,n){let r=document.createElement(`a`);r.download=t,r.rel=`noopener`,typeof e==`string`?(r.href=e,r.origin===location.origin?qa(r):Ka(r.href)?Ga(e,t,n):(r.target=`_blank`,qa(r))):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){qa(r)},0))}function Qa(e,t=`download`,n){if(typeof e==`string`)if(Ka(e))Ga(e,t,n);else{let t=document.createElement(`a`);t.href=e,t.target=`_blank`,setTimeout(function(){qa(t)})}else navigator.msSaveOrOpenBlob(Wa(e,n),t)}function $a(e,t,n,r){if(r||=open(``,`_blank`),r&&(r.document.title=r.document.body.innerText=`downloading...`),typeof e==`string`)return Ga(e,t,n);let i=e.type===`application/octet-stream`,a=/constructor/i.test(String(Ua.HTMLElement))||`safari`in Ua,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&a||Ya)&&typeof FileReader<`u`){let t=new FileReader;t.onloadend=function(){let e=t.result;if(typeof e!=`string`)throw r=null,Error(`Wrong reader.result type`);e=o?e:e.replace(/^data:[^;]*;/,`data:attachment/file;`),r?r.location.href=e:location.assign(e),r=null},t.readAsDataURL(e)}else{let t=URL.createObjectURL(e);r?r.location.assign(t):location.href=t,r=null,setTimeout(function(){URL.revokeObjectURL(t)},4e4)}}var{assign:eo}=Object;function to(){let e=ie(!0),t=e.run(()=>O({})),n=[],r=[],i=ge({install(e){Ra(i),i._a=e,e.provide(za,i),e.config.globalProperties.$pinia=i,r.forEach(e=>n.push(e)),r=[]},use(e){return this._a?n.push(e):r.push(e),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return i}var no=()=>{};function ro(e,t,n,r=no){e.push(t);let i=()=>{let n=e.indexOf(t);n>-1&&(e.splice(n,1),r())};return!n&&oe()&&Ve(i),i}function io(e,...t){e.slice().forEach(e=>{e(...t)})}var ao=e=>e(),oo=Symbol(),so=Symbol();function co(e,t){e instanceof Map&&t instanceof Map?t.forEach((t,n)=>e.set(n,t)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(let r in t){if(!t.hasOwnProperty(r))continue;let i=t[r],a=e[r];Ba(a)&&Ba(i)&&e.hasOwnProperty(r)&&!n(i)&&!C(i)?e[r]=co(a,i):e[r]=i}return e}var lo=Symbol();function uo(e){return!Ba(e)||!e.hasOwnProperty(lo)}var{assign:fo}=Object;function po(e){return!!(n(e)&&e.effect)}function mo(e,t,n,r){let{state:i,actions:a,getters:o}=t,s=n.state.value[e],c;function l(){return s||(n.state.value[e]=i?i():{}),fo(He(n.state.value[e]),a,Object.keys(o||{}).reduce((t,r)=>(t[r]=ge(De(()=>{Ra(n);let t=n._s.get(e);return o[r].call(t,t)})),t),{}))}return c=ho(e,l,t,n,r,!0),c}function ho(e,t,r={},i,a,o){let s,c=fo({actions:{}},r),u={deep:!0},d,p,m=[],h=[],g=i.state.value[e];!o&&!g&&(i.state.value[e]={}),O({});let _;function v(t){let n;d=p=!1,typeof t==`function`?(t(i.state.value[e]),n={type:Va.patchFunction,storeId:e,events:void 0}):(co(i.state.value[e],t),n={type:Va.patchObject,payload:t,storeId:e,events:void 0});let r=_=Symbol();l().then(()=>{_===r&&(d=!0)}),p=!0,io(m,n,i.state.value[e])}let y=o?function(){let{state:e}=r,t=e?e():{};this.$patch(e=>{fo(e,t)})}:no;function b(){s.stop(),m=[],h=[],i._s.delete(e)}let x=(t,n=``)=>{if(oo in t)return t[so]=n,t;let r=function(){Ra(i);let n=Array.from(arguments),a=[],o=[];function s(e){a.push(e)}function c(e){o.push(e)}io(h,{args:n,name:r[so],store:S,after:s,onError:c});let l;try{l=t.apply(this&&this.$id===e?this:S,n)}catch(e){throw io(o,e),e}return l instanceof Promise?l.then(e=>(io(a,e),e)).catch(e=>(io(o,e),Promise.reject(e))):(io(a,l),l)};return r[oo]=!0,r[so]=n,r},S=Me({_p:i,$id:e,$onAction:ro.bind(null,h),$patch:v,$reset:y,$subscribe(t,n={}){let r=ro(m,t,n.detached,()=>a()),a=s.run(()=>f(()=>i.state.value[e],r=>{(n.flush===`sync`?p:d)&&t({storeId:e,type:Va.direct,events:void 0},r)},fo({},u,n)));return r},$dispose:b});i._s.set(e,S);let w=(i._a&&i._a.runWithContext||ao)(()=>i._e.run(()=>(s=ie()).run(()=>t({action:x}))));for(let t in w){let r=w[t];n(r)&&!po(r)||C(r)?o||(g&&uo(r)&&(n(r)?r.value=g[t]:co(r,g[t])),i.state.value[e][t]=r):typeof r==`function`&&(w[t]=x(r,t),c.actions[t]=r)}return fo(S,w),fo(me(S),w),Object.defineProperty(S,`$state`,{get:()=>i.state.value[e],set:e=>{v(t=>{fo(t,e)})}}),i._p.forEach(e=>{fo(S,s.run(()=>e({store:S,app:i._a,pinia:i,options:c})))}),g&&o&&r.hydrate&&r.hydrate(S.$state,g),d=!0,p=!0,S}function go(e,t,n){let r,i,a=typeof t==`function`;typeof e==`string`?(r=e,i=a?n:t):(i=e,r=e.id);function s(e,n){let s=o();return e||=s?Ge(za,null):null,e&&Ra(e),e=La,e._s.has(r)||(a?ho(r,t,i,e):mo(r,i,e)),e._s.get(r)}return s.$id=r,s}function _o(e){{e=me(e);let t={};for(let r in e){let i=e[r];(n(i)||C(i))&&(t[r]=Oe(e,r))}return t}}function vo(e){return oe()?(Ve(e),!0):!1}function yo(){let e=new Set,t=t=>{e.delete(t)};return{on:n=>{e.add(n);let r=()=>t(n);return vo(r),{off:r}},off:t,trigger:(...t)=>Promise.all(Array.from(e).map(e=>e(...t)))}}function bo(e){return typeof e==`function`?e():ve(e)}var xo={mounted:`mounted`,updated:`updated`,unmounted:`unmounted`},So=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;var Co=e=>e!=null,wo=Object.prototype.toString,To=e=>wo.call(e)===`[object Object]`,Eo=()=>{},Do=Oo();function Oo(){return So&&(window==null?void 0:window.navigator)?.userAgent&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||(window==null?void 0:window.navigator)?.maxTouchPoints>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function ko(e,t){function n(...n){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(r).catch(i)})}return n}var Ao=e=>e();function jo(e,t={}){let n,r,i=Eo,a=e=>{clearTimeout(e),i(),i=Eo};return o=>{let s=bo(e),c=bo(t.maxWait);return n&&a(n),s<=0||c!==void 0&&c<=0?(r&&=(a(r),null),Promise.resolve(o())):new Promise((e,l)=>{i=t.rejectOnCancel?l:e,c&&!r&&(r=setTimeout(()=>{n&&a(n),r=null,e(o())},c)),n=setTimeout(()=>{r&&a(r),r=null,e(o())},s)})}}function Mo(...e){let t=0,r,i=!0,a=Eo,o,s,c,l,u;!n(e[0])&&typeof e[0]==`object`?{delay:s,trailing:c=!0,leading:l=!0,rejectOnCancel:u=!1}=e[0]:[s,c=!0,l=!0,u=!1]=e;let d=()=>{r&&(clearTimeout(r),r=void 0,a(),a=Eo)};return e=>{let n=bo(s),f=Date.now()-t,p=()=>o=e();return d(),n<=0?(t=Date.now(),p()):(f>n&&(l||!i)?(t=Date.now(),p()):c&&(o=new Promise((e,o)=>{a=u?o:e,r=setTimeout(()=>{t=Date.now(),i=!0,e(p()),d()},Math.max(0,n-f))})),!l&&!r&&(r=setTimeout(()=>i=!0,n)),i=!1,o)}}function No(e){return e||de()}function Po(...e){if(e.length!==1)return Oe(...e);let t=e[0];return typeof t==`function`?Le(ae(()=>({get:t,set:Eo}))):O(t)}function Fo(e,t=200,n={}){return ko(jo(t,n),e)}function Io(e,t=200,n=!1,r=!0,i=!1){return ko(Mo(t,n,r,i),e)}function Lo(e,t,n={}){let{eventFilter:r=Ao,...i}=n;return f(e,ko(r,t),i)}function Ro(e,t=!0,n){No()?Te(e,n):t?e():l(e)}function zo(e,t){No(t)&&r(e,t)}function Bo(e,t,n={}){let{throttle:r=0,trailing:i=!0,leading:a=!0,...o}=n;return Lo(e,t,{...o,eventFilter:Mo(r,i,a)})}function Vo(e,t,r){let i;i=n(r)?{evaluating:r}:r||{};let{lazy:a=!1,evaluating:o=void 0,shallow:s=!0,onError:c=Eo}=i,l=O(!a),u=s?ze(t):O(t),d=0;return g(async t=>{if(!l.value)return;d++;let n=d,r=!1;o&&Promise.resolve().then(()=>{o.value=!0});try{let i=await e(e=>{t(()=>{o&&(o.value=!1),r||e()})});n===d&&(u.value=i)}catch(e){c(e)}finally{o&&n===d&&(o.value=!1),r=!0}}),a?De(()=>(l.value=!0,u.value)):u}So&&window.document,So&&window.navigator,So&&window.location;function Ho(e){return{version:e.version,up:async(t,n)=>{let r=await e.up(t,n);return r.version=n,r},down:async(t,n)=>{let r=await e.down(t,n);return r.version=n,r}}}var Uo=()=>{throw Error(`Unable to go down on the initial version!`)},Wo=()=>{throw Error(`Unable to go up on the final version!`)},Go=t(((e,t)=>{var n=`2.0.0`,r=256;t.exports={MAX_LENGTH:r,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:r-6,MAX_SAFE_INTEGER:2**53-1||9007199254740991,RELEASE_TYPES:[`major`,`premajor`,`minor`,`preminor`,`patch`,`prepatch`,`prerelease`],SEMVER_SPEC_VERSION:n,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}})),Ko=t(((e,t)=>{t.exports=typeof process==`object`&&{}.NODE_DEBUG&&/\bsemver\b/i.test({}.NODE_DEBUG)?(...e)=>console.error(`SEMVER`,...e):()=>{}})),qo=t(((e,t)=>{var{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=Go(),a=Ko();e=t.exports={};var o=e.re=[],s=e.safeRe=[],c=e.src=[],l=e.safeSrc=[],u=e.t={},d=0,f=`[a-zA-Z0-9-]`,p=[[`\\s`,1],[`\\d`,i],[f,r]],m=e=>{for(let[t,n]of p)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e},h=(e,t,n)=>{let r=m(t),i=d++;a(e,i,t),u[e]=i,c[i]=t,l[i]=r,o[i]=new RegExp(t,n?`g`:void 0),s[i]=new RegExp(r,n?`g`:void 0)};h(`NUMERICIDENTIFIER`,`0|[1-9]\\d*`),h(`NUMERICIDENTIFIERLOOSE`,`\\d+`),h(`NONNUMERICIDENTIFIER`,`\\d*[a-zA-Z-]${f}*`),h(`MAINVERSION`,`(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`),h(`MAINVERSIONLOOSE`,`(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`),h(`PRERELEASEIDENTIFIER`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIER]})`),h(`PRERELEASEIDENTIFIERLOOSE`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIERLOOSE]})`),h(`PRERELEASE`,`(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.PRERELEASEIDENTIFIER]})*))`),h(`PRERELEASELOOSE`,`(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`),h(`BUILDIDENTIFIER`,`${f}+`),h(`BUILD`,`(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`),h(`FULLPLAIN`,`v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`),h(`FULL`,`^${c[u.FULLPLAIN]}$`),h(`LOOSEPLAIN`,`[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`),h(`LOOSE`,`^${c[u.LOOSEPLAIN]}$`),h(`GTLT`,`((?:<|>)?=?)`),h(`XRANGEIDENTIFIERLOOSE`,`${c[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h(`XRANGEIDENTIFIER`,`${c[u.NUMERICIDENTIFIER]}|x|X|\\*`),h(`XRANGEPLAIN`,`[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`),h(`XRANGEPLAINLOOSE`,`[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`),h(`XRANGE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}$`),h(`XRANGELOOSE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`),h(`COERCEPLAIN`,`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h(`COERCE`,`${c[u.COERCEPLAIN]}(?:$|[^\\d])`),h(`COERCEFULL`,c[u.COERCEPLAIN]+`(?:${c[u.PRERELEASE]})?(?:${c[u.BUILD]})?(?:$|[^\\d])`),h(`COERCERTL`,c[u.COERCE],!0),h(`COERCERTLFULL`,c[u.COERCEFULL],!0),h(`LONETILDE`,`(?:~>?)`),h(`TILDETRIM`,`(\\s*)${c[u.LONETILDE]}\\s+`,!0),e.tildeTrimReplace=`$1~`,h(`TILDE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}$`),h(`TILDELOOSE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`),h(`LONECARET`,`(?:\\^)`),h(`CARETTRIM`,`(\\s*)${c[u.LONECARET]}\\s+`,!0),e.caretTrimReplace=`$1^`,h(`CARET`,`^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`),h(`CARETLOOSE`,`^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`),h(`COMPARATORLOOSE`,`^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`),h(`COMPARATOR`,`^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`),h(`COMPARATORTRIM`,`(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace=`$1$2$3`,h(`HYPHENRANGE`,`^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`),h(`HYPHENRANGELOOSE`,`^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`),h(`STAR`,`(<|>)?=?\\s*\\*`),h(`GTE0`,`^\\s*>=\\s*0\\.0\\.0\\s*$`),h(`GTE0PRE`,`^\\s*>=\\s*0\\.0\\.0-0\\s*$`)})),Jo=t(((e,t)=>{var n=Object.freeze({loose:!0}),r=Object.freeze({});t.exports=e=>e?typeof e==`object`?e:n:r})),Yo=t(((e,t)=>{var n=/^[0-9]+$/,r=(e,t)=>{if(typeof e==`number`&&typeof t==`number`)return e===t?0:e<t?-1:1;let r=n.test(e),i=n.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1};t.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}})),Xo=t(((e,t)=>{var n=Ko(),{MAX_LENGTH:r,MAX_SAFE_INTEGER:i}=Go(),{safeRe:a,t:o}=qo(),s=Jo(),{compareIdentifiers:c}=Yo();t.exports=class e{constructor(t,c){if(c=s(c),t instanceof e){if(t.loose===!!c.loose&&t.includePrerelease===!!c.includePrerelease)return t;t=t.version}else if(typeof t!=`string`)throw TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>r)throw TypeError(`version is longer than ${r} characters`);n(`SemVer`,t,c),this.options=c,this.loose=!!c.loose,this.includePrerelease=!!c.includePrerelease;let l=t.trim().match(c.loose?a[o.LOOSE]:a[o.FULL]);if(!l)throw TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+l[1],this.minor=+l[2],this.patch=+l[3],this.major>i||this.major<0)throw TypeError(`Invalid major version`);if(this.minor>i||this.minor<0)throw TypeError(`Invalid minor version`);if(this.patch>i||this.patch<0)throw TypeError(`Invalid patch version`);l[4]?this.prerelease=l[4].split(`.`).map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<i)return t}return e}):this.prerelease=[],this.build=l[5]?l[5].split(`.`):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(`.`)}`),this.version}toString(){return this.version}compare(t){if(n(`SemVer.compare`,this.version,this.options,t),!(t instanceof e)){if(typeof t==`string`&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:+(this.patch>t.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{let e=this.prerelease[r],i=t.prerelease[r];if(n(`prerelease compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e===i)continue;return c(e,i)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{let e=this.build[r],i=t.build[r];if(n(`build compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e===i)continue;return c(e,i)}while(++r)}inc(e,t,n){if(e.startsWith(`pre`)){if(!t&&n===!1)throw Error(`invalid increment argument: identifier is empty`);if(t){let e=`-${t}`.match(this.options.loose?a[o.PRERELEASELOOSE]:a[o.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case`premajor`:this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(`pre`,t,n);break;case`preminor`:this.prerelease.length=0,this.patch=0,this.minor++,this.inc(`pre`,t,n);break;case`prepatch`:this.prerelease.length=0,this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`prerelease`:this.prerelease.length===0&&this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`release`:if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case`major`:(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case`minor`:(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case`patch`:this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case`pre`:{let e=+!!Number(n);if(this.prerelease.length===0)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]==`number`&&(this.prerelease[r]++,r=-2);if(r===-1){if(t===this.prerelease.join(`.`)&&n===!1)throw Error(`invalid increment argument: identifier already exists`);this.prerelease.push(e)}}if(t){let r=[t,e];n===!1&&(r=[t]),c(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(`.`)}`),this}}})),Zo=t(((e,t)=>{var n=Xo();t.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}})),Qo=t(((e,t)=>{var n=Zo();t.exports=(e,t)=>{let r=n(e,t);return r?r.version:null}})),$o=t(((e,t)=>{var n=Zo();t.exports=(e,t)=>{let r=n(e.trim().replace(/^[=v]+/,``),t);return r?r.version:null}})),es=t(((e,t)=>{var n=Xo();t.exports=(e,t,r,i,a)=>{typeof r==`string`&&(a=i,i=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,i,a).version}catch{return null}}})),ts=t(((e,t)=>{var n=Zo();t.exports=(e,t)=>{let r=n(e,null,!0),i=n(t,null,!0),a=r.compare(i);if(a===0)return null;let o=a>0,s=o?r:i,c=o?i:r,l=!!s.prerelease.length;if(c.prerelease.length&&!l){if(!c.patch&&!c.minor)return`major`;if(c.compareMain(s)===0)return c.minor&&!c.patch?`minor`:`patch`}let u=l?`pre`:``;return r.major===i.major?r.minor===i.minor?r.patch===i.patch?`prerelease`:u+`patch`:u+`minor`:u+`major`}})),ns=t(((e,t)=>{var n=Xo();t.exports=(e,t)=>new n(e,t).major})),rs=t(((e,t)=>{var n=Xo();t.exports=(e,t)=>new n(e,t).minor})),is=t(((e,t)=>{var n=Xo();t.exports=(e,t)=>new n(e,t).patch})),as=t(((e,t)=>{var n=Zo();t.exports=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}})),os=t(((e,t)=>{var n=Xo();t.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))})),ss=t(((e,t)=>{var n=os();t.exports=(e,t,r)=>n(t,e,r)})),cs=t(((e,t)=>{var n=os();t.exports=(e,t)=>n(e,t,!0)})),ls=t(((e,t)=>{var n=Xo();t.exports=(e,t,r)=>{let i=new n(e,r),a=new n(t,r);return i.compare(a)||i.compareBuild(a)}})),us=t(((e,t)=>{var n=ls();t.exports=(e,t)=>e.sort((e,r)=>n(e,r,t))})),ds=t(((e,t)=>{var n=ls();t.exports=(e,t)=>e.sort((e,r)=>n(r,e,t))})),fs=t(((e,t)=>{var n=os();t.exports=(e,t,r)=>n(e,t,r)>0})),ps=t(((e,t)=>{var n=os();t.exports=(e,t,r)=>n(e,t,r)<0})),ms=t(((e,t)=>{var n=os();t.exports=(e,t,r)=>n(e,t,r)===0})),hs=t(((e,t)=>{var n=os();t.exports=(e,t,r)=>n(e,t,r)!==0})),gs=t(((e,t)=>{var n=os();t.exports=(e,t,r)=>n(e,t,r)>=0})),_s=t(((e,t)=>{var n=os();t.exports=(e,t,r)=>n(e,t,r)<=0})),vs=t(((e,t)=>{var n=ms(),r=hs(),i=fs(),a=gs(),o=ps(),s=_s();t.exports=(e,t,c,l)=>{switch(t){case`===`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e===c;case`!==`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e!==c;case``:case`=`:case`==`:return n(e,c,l);case`!=`:return r(e,c,l);case`>`:return i(e,c,l);case`>=`:return a(e,c,l);case`<`:return o(e,c,l);case`<=`:return s(e,c,l);default:throw TypeError(`Invalid operator: ${t}`)}}})),ys=t(((e,t)=>{var n=Xo(),r=Zo(),{safeRe:i,t:a}=qo();t.exports=(e,t)=>{if(e instanceof n)return e;if(typeof e==`number`&&(e=String(e)),typeof e!=`string`)return null;t||={};let o=null;if(!t.rtl)o=e.match(t.includePrerelease?i[a.COERCEFULL]:i[a.COERCE]);else{let n=t.includePrerelease?i[a.COERCERTLFULL]:i[a.COERCERTL],r;for(;(r=n.exec(e))&&(!o||o.index+o[0].length!==e.length);)(!o||r.index+r[0].length!==o.index+o[0].length)&&(o=r),n.lastIndex=r.index+r[1].length+r[2].length;n.lastIndex=-1}if(o===null)return null;let s=o[2];return r(`${s}.${o[3]||`0`}.${o[4]||`0`}${t.includePrerelease&&o[5]?`-${o[5]}`:``}${t.includePrerelease&&o[6]?`+${o[6]}`:``}`,t)}})),bs=t(((e,t)=>{t.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}})),xs=t(((e,t)=>{var n=/\s+/g;t.exports=class e{constructor(t,r){if(r=i(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof a)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t.trim().replace(n,` `),this.set=this.raw.split(`||`).map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let e=this.set[0];if(this.set=this.set.filter(e=>!h(e[0])),this.set.length===0)this.set=[e];else if(this.set.length>1){for(let e of this.set)if(e.length===1&&g(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted=``;for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+=`||`);let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=` `),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let t=((this.options.includePrerelease&&p)|(this.options.loose&&m))+`:`+e,n=r.get(t);if(n)return n;let i=this.options.loose,s=i?c[l.HYPHENRANGELOOSE]:c[l.HYPHENRANGE];e=e.replace(s,D(this.options.includePrerelease)),o(`hyphen replace`,e),e=e.replace(c[l.COMPARATORTRIM],u),o(`comparator trim`,e),e=e.replace(c[l.TILDETRIM],d),o(`tilde trim`,e),e=e.replace(c[l.CARETTRIM],f),o(`caret trim`,e);let g=e.split(` `).map(e=>v(e,this.options)).join(` `).split(/\s+/).map(e=>E(e,this.options));i&&(g=g.filter(e=>(o(`loose invalid filter`,e,this.options),!!e.match(c[l.COMPARATORLOOSE])))),o(`range list`,g);let _=new Map,y=g.map(e=>new a(e,this.options));for(let e of y){if(h(e))return[e];_.set(e.value,e)}_.size>1&&_.has(``)&&_.delete(``);let b=[..._.values()];return r.set(t,b),b}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Range is required`);return this.set.some(e=>_(e,n)&&t.set.some(t=>_(t,n)&&e.every(e=>t.every(t=>e.intersects(t,n)))))}test(e){if(!e)return!1;if(typeof e==`string`)try{e=new s(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(te(this.set[t],e,this.options))return!0;return!1}};var r=new(bs()),i=Jo(),a=Ss(),o=Ko(),s=Xo(),{safeRe:c,t:l,comparatorTrimReplace:u,tildeTrimReplace:d,caretTrimReplace:f}=qo(),{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:m}=Go(),h=e=>e.value===`<0.0.0-0`,g=e=>e.value===``,_=(e,t)=>{let n=!0,r=e.slice(),i=r.pop();for(;n&&r.length;)n=r.every(e=>i.intersects(e,t)),i=r.pop();return n},v=(e,t)=>(e=e.replace(c[l.BUILD],``),o(`comp`,e,t),e=S(e,t),o(`caret`,e),e=b(e,t),o(`tildes`,e),e=w(e,t),o(`xrange`,e),e=ee(e,t),o(`stars`,e),e),y=e=>!e||e.toLowerCase()===`x`||e===`*`,b=(e,t)=>e.trim().split(/\s+/).map(e=>x(e,t)).join(` `),x=(e,t)=>{let n=t.loose?c[l.TILDELOOSE]:c[l.TILDE];return e.replace(n,(t,n,r,i,a)=>{o(`tilde`,e,t,n,r,i,a);let s;return y(n)?s=``:y(r)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:y(i)?s=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:a?(o(`replaceTilde pr`,a),s=`>=${n}.${r}.${i}-${a} <${n}.${+r+1}.0-0`):s=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,o(`tilde return`,s),s})},S=(e,t)=>e.trim().split(/\s+/).map(e=>C(e,t)).join(` `),C=(e,t)=>{o(`caret`,e,t);let n=t.loose?c[l.CARETLOOSE]:c[l.CARET],r=t.includePrerelease?`-0`:``;return e.replace(n,(t,n,i,a,s)=>{o(`caret`,e,t,n,i,a,s);let c;return y(n)?c=``:y(i)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:y(a)?c=n===`0`?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:s?(o(`replaceCaret pr`,s),c=n===`0`?i===`0`?`>=${n}.${i}.${a}-${s} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${s} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${s} <${+n+1}.0.0-0`):(o(`no pr`),c=n===`0`?i===`0`?`>=${n}.${i}.${a}${r} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),o(`caret return`,c),c})},w=(e,t)=>(o(`replaceXRanges`,e,t),e.split(/\s+/).map(e=>T(e,t)).join(` `)),T=(e,t)=>{e=e.trim();let n=t.loose?c[l.XRANGELOOSE]:c[l.XRANGE];return e.replace(n,(n,r,i,a,s,c)=>{o(`xRange`,e,n,r,i,a,s,c);let l=y(i),u=l||y(a),d=u||y(s),f=d;return r===`=`&&f&&(r=``),c=t.includePrerelease?`-0`:``,l?n=r===`>`||r===`<`?`<0.0.0-0`:`*`:r&&f?(u&&(a=0),s=0,r===`>`?(r=`>=`,u?(i=+i+1,a=0,s=0):(a=+a+1,s=0)):r===`<=`&&(r=`<`,u?i=+i+1:a=+a+1),r===`<`&&(c=`-0`),n=`${r+i}.${a}.${s}${c}`):u?n=`>=${i}.0.0${c} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${a}.0${c} <${i}.${+a+1}.0-0`),o(`xRange return`,n),n})},ee=(e,t)=>(o(`replaceStars`,e,t),e.trim().replace(c[l.STAR],``)),E=(e,t)=>(o(`replaceGTE0`,e,t),e.trim().replace(c[t.includePrerelease?l.GTE0PRE:l.GTE0],``)),D=e=>(t,n,r,i,a,o,s,c,l,u,d,f)=>(n=y(r)?``:y(i)?`>=${r}.0.0${e?`-0`:``}`:y(a)?`>=${r}.${i}.0${e?`-0`:``}`:o?`>=${n}`:`>=${n}${e?`-0`:``}`,c=y(l)?``:y(u)?`<${+l+1}.0.0-0`:y(d)?`<${l}.${+u+1}.0-0`:f?`<=${l}.${u}.${d}-${f}`:e?`<${l}.${u}.${+d+1}-0`:`<=${c}`,`${n} ${c}`.trim()),te=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(o(e[n].semver),e[n].semver!==a.ANY&&e[n].semver.prerelease.length>0){let r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}})),Ss=t(((e,t)=>{var n=Symbol(`SemVer ANY`);t.exports=class e{static get ANY(){return n}constructor(t,i){if(i=r(i),t instanceof e){if(t.loose===!!i.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(` `),s(`comparator`,t,i),this.options=i,this.loose=!!i.loose,this.parse(t),this.semver===n?this.value=``:this.value=this.operator+this.semver.version,s(`comp`,this)}parse(e){let t=this.options.loose?i[a.COMPARATORLOOSE]:i[a.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=r[1]===void 0?``:r[1],this.operator===`=`&&(this.operator=``),r[2]?this.semver=new c(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(s(`Comparator.test`,e,this.options.loose),this.semver===n||e===n)return!0;if(typeof e==`string`)try{e=new c(e,this.options)}catch{return!1}return o(e,this.operator,this.semver,this.options)}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Comparator is required`);return this.operator===``?this.value===``?!0:new l(t.value,n).test(this.value):t.operator===``?t.value===``?!0:new l(this.value,n).test(t.semver):(n=r(n),n.includePrerelease&&(this.value===`<0.0.0-0`||t.value===`<0.0.0-0`)||!n.includePrerelease&&(this.value.startsWith(`<0.0.0`)||t.value.startsWith(`<0.0.0`))?!1:!!(this.operator.startsWith(`>`)&&t.operator.startsWith(`>`)||this.operator.startsWith(`<`)&&t.operator.startsWith(`<`)||this.semver.version===t.semver.version&&this.operator.includes(`=`)&&t.operator.includes(`=`)||o(this.semver,`<`,t.semver,n)&&this.operator.startsWith(`>`)&&t.operator.startsWith(`<`)||o(this.semver,`>`,t.semver,n)&&this.operator.startsWith(`<`)&&t.operator.startsWith(`>`)))}};var r=Jo(),{safeRe:i,t:a}=qo(),o=vs(),s=Ko(),c=Xo(),l=xs()})),Cs=t(((e,t)=>{var n=xs();t.exports=(e,t,r)=>{try{t=new n(t,r)}catch{return!1}return t.test(e)}})),ws=t(((e,t)=>{var n=xs();t.exports=(e,t)=>new n(e,t).set.map(e=>e.map(e=>e.value).join(` `).trim().split(` `))})),Ts=t(((e,t)=>{var n=Xo(),r=xs();t.exports=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===-1)&&(a=e,o=new n(a,i))}),a}})),Es=t(((e,t)=>{var n=Xo(),r=xs();t.exports=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===1)&&(a=e,o=new n(a,i))}),a}})),Ds=t(((e,t)=>{var n=Xo(),r=xs(),i=fs();t.exports=(e,t)=>{e=new r(e,t);let a=new n(`0.0.0`);if(e.test(a)||(a=new n(`0.0.0-0`),e.test(a)))return a;a=null;for(let t=0;t<e.set.length;++t){let r=e.set[t],o=null;r.forEach(e=>{let t=new n(e.semver.version);switch(e.operator){case`>`:t.prerelease.length===0?t.patch++:t.prerelease.push(0),t.raw=t.format();case``:case`>=`:(!o||i(t,o))&&(o=t);break;case`<`:case`<=`:break;default:throw Error(`Unexpected operation: ${e.operator}`)}}),o&&(!a||i(a,o))&&(a=o)}return a&&e.test(a)?a:null}})),Os=t(((e,t)=>{var n=xs();t.exports=(e,t)=>{try{return new n(e,t).range||`*`}catch{return null}}})),ks=t(((e,t)=>{var n=Xo(),r=Ss(),{ANY:i}=r,a=xs(),o=Cs(),s=fs(),c=ps(),l=_s(),u=gs();t.exports=(e,t,d,f)=>{e=new n(e,f),t=new a(t,f);let p,m,h,g,_;switch(d){case`>`:p=s,m=l,h=c,g=`>`,_=`>=`;break;case`<`:p=c,m=u,h=s,g=`<`,_=`<=`;break;default:throw TypeError(`Must provide a hilo val of "<" or ">"`)}if(o(e,t,f))return!1;for(let n=0;n<t.set.length;++n){let a=t.set[n],o=null,s=null;if(a.forEach(e=>{e.semver===i&&(e=new r(`>=0.0.0`)),o||=e,s||=e,p(e.semver,o.semver,f)?o=e:h(e.semver,s.semver,f)&&(s=e)}),o.operator===g||o.operator===_||(!s.operator||s.operator===g)&&m(e,s.semver)||s.operator===_&&h(e,s.semver))return!1}return!0}})),As=t(((e,t)=>{var n=ks();t.exports=(e,t,r)=>n(e,t,`>`,r)})),js=t(((e,t)=>{var n=ks();t.exports=(e,t,r)=>n(e,t,`<`,r)})),Ms=t(((e,t)=>{var n=xs();t.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))})),Ns=t(((e,t)=>{var n=Cs(),r=os();t.exports=(e,t,i)=>{let a=[],o=null,s=null,c=e.sort((e,t)=>r(e,t,i));for(let e of c)n(e,t,i)?(s=e,o||=e):(s&&a.push([o,s]),s=null,o=null);o&&a.push([o,null]);let l=[];for(let[e,t]of a)e===t?l.push(e):!t&&e===c[0]?l.push(`*`):t?e===c[0]?l.push(`<=${t}`):l.push(`${e} - ${t}`):l.push(`>=${e}`);let u=l.join(` || `),d=typeof t.raw==`string`?t.raw:String(t);return u.length<d.length?u:t}})),Ps=t(((e,t)=>{var n=xs(),r=Ss(),{ANY:i}=r,a=Cs(),o=os(),s=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let i=!1;OUTER:for(let n of e.set){for(let e of t.set){let t=u(n,e,r);if(i||=t!==null,t)continue OUTER}if(i)return!1}return!0},c=[new r(`>=0.0.0-0`)],l=[new r(`>=0.0.0`)],u=(e,t,n)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===i){if(t.length===1&&t[0].semver===i)return!0;e=n.includePrerelease?c:l}if(t.length===1&&t[0].semver===i){if(n.includePrerelease)return!0;t=l}let r=new Set,s,u;for(let t of e)t.operator===`>`||t.operator===`>=`?s=d(s,t,n):t.operator===`<`||t.operator===`<=`?u=f(u,t,n):r.add(t.semver);if(r.size>1)return null;let p;if(s&&u&&(p=o(s.semver,u.semver,n),p>0||p===0&&(s.operator!==`>=`||u.operator!==`<=`)))return null;for(let e of r){if(s&&!a(e,String(s),n)||u&&!a(e,String(u),n))return null;for(let r of t)if(!a(e,String(r),n))return!1;return!0}let m,h,g,_,v=u&&!n.includePrerelease&&u.semver.prerelease.length?u.semver:!1,y=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1;v&&v.prerelease.length===1&&u.operator===`<`&&v.prerelease[0]===0&&(v=!1);for(let e of t){if(_=_||e.operator===`>`||e.operator===`>=`,g=g||e.operator===`<`||e.operator===`<=`,s){if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),e.operator===`>`||e.operator===`>=`){if(m=d(s,e,n),m===e&&m!==s)return!1}else if(s.operator===`>=`&&!a(s.semver,String(e),n))return!1}if(u){if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),e.operator===`<`||e.operator===`<=`){if(h=f(u,e,n),h===e&&h!==u)return!1}else if(u.operator===`<=`&&!a(u.semver,String(e),n))return!1}if(!e.operator&&(u||s)&&p!==0)return!1}return!(s&&g&&!u&&p!==0||u&&_&&!s&&p!==0||y||v)},d=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r>0?e:r<0||t.operator===`>`&&e.operator===`>=`?t:e},f=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r<0?e:r>0||t.operator===`<`&&e.operator===`<=`?t:e};t.exports=s})),Fs=e(t(((e,t)=>{var n=qo(),r=Go(),i=Xo(),a=Yo();t.exports={parse:Zo(),valid:Qo(),clean:$o(),inc:es(),diff:ts(),major:ns(),minor:rs(),patch:is(),prerelease:as(),compare:os(),rcompare:ss(),compareLoose:cs(),compareBuild:ls(),sort:us(),rsort:ds(),gt:fs(),lt:ps(),eq:ms(),neq:hs(),gte:gs(),lte:_s(),cmp:vs(),coerce:ys(),Comparator:Ss(),Range:xs(),satisfies:Cs(),toComparators:ws(),maxSatisfying:Ts(),minSatisfying:Es(),minVersion:Ds(),validRange:Os(),outside:ks(),gtr:As(),ltr:js(),intersects:Ms(),simplifyRange:Ns(),subset:Ps(),SemVer:i,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:r.SEMVER_SPEC_VERSION,RELEASE_TYPES:r.RELEASE_TYPES,compareIdentifiers:a.compareIdentifiers,rcompareIdentifiers:a.rcompareIdentifiers}}))(),1),Is=Object.keys;function Ls(e){if(typeof e!=`object`)return e;var t,n,r=Object.prototype.toString.call(e);if(r===`[object Object]`){if(e.constructor!==Object&&typeof e.constructor==`function`)for(t in n=new e.constructor,e)e.hasOwnProperty(t)&&n[t]!==e[t]&&(n[t]=Ls(e[t]));else for(t in n={},e)t===`__proto__`?Object.defineProperty(n,t,{value:Ls(e[t]),configurable:!0,enumerable:!0,writable:!0}):n[t]=Ls(e[t]);return n}if(r===`[object Array]`){for(t=e.length,n=Array(t);t--;)n[t]=Ls(e[t]);return n}return r===`[object Set]`?(n=new Set,e.forEach(function(e){n.add(Ls(e))}),n):r===`[object Map]`?(n=new Map,e.forEach(function(e,t){n.set(Ls(t),Ls(e))}),n):r===`[object Date]`?new Date(+e):r===`[object RegExp]`?(n=new RegExp(e.source,e.flags),n.lastIndex=e.lastIndex,n):r===`[object DataView]`?new e.constructor(Ls(e.buffer)):r===`[object ArrayBuffer]`?e.slice(0):r.slice(-6)===`Array]`?new e.constructor(e):e}var Rs=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu,zs;function Bs(e){return{lang:e?.lang??zs?.lang,message:e?.message,abortEarly:e?.abortEarly??zs?.abortEarly,abortPipeEarly:e?.abortPipeEarly??zs?.abortPipeEarly}}var Vs;function Hs(e){return Vs?.get(e)}var Us;function Ws(e){return Us?.get(e)}var Gs;function Ks(e,t){return Gs?.get(e)?.get(t)}function qs(e){let t=typeof e;return t===`string`?`"${e}"`:t===`number`||t===`bigint`||t===`boolean`?`${e}`:t===`object`||t===`function`?(e&&Object.getPrototypeOf(e)?.constructor?.name)??`null`:t}function Js(e,t,n,r,i){let a=i&&`input`in i?i.input:n.value,o=i?.expected??e.expects??null,s=i?.received??qs(a),c={kind:e.kind,type:e.type,input:a,expected:o,received:s,message:`Invalid ${t}: ${o?`Expected ${o} but r`:`R`}eceived ${s}`,requirement:e.requirement,path:i?.path,issues:i?.issues,lang:r.lang,abortEarly:r.abortEarly,abortPipeEarly:r.abortPipeEarly},l=e.kind===`schema`,u=i?.message??e.message??Ks(e.reference,c.lang)??(l?Ws(c.lang):null)??r.message??Hs(c.lang);u&&(c.message=typeof u==`function`?u(c):u),l&&(n.typed=!1),n.issues?n.issues.push(c):n.issues=[c]}function Ys(e,t){return Object.hasOwn(e,t)&&t!==`__proto__`&&t!==`prototype`&&t!==`constructor`}function Xs(e,t){let n=[...new Set(e)];return n.length>1?`(${n.join(` ${t} `)})`:n[0]??`never`}var Zs=class extends Error{issues;constructor(e){super(e[0].message),this.name=`ValiError`,this.issues=e}};function Qs(e){return{kind:`metadata`,type:`description`,reference:Qs,description:e}}function $s(e){return{kind:`validation`,type:`email`,reference:$s,expects:null,async:!1,requirement:Rs,message:e,_run(e,t){return e.typed&&!this.requirement.test(e.value)&&Js(this,`email`,e,t),e}}}function ec(e,t){return{kind:`validation`,type:`min_length`,reference:ec,async:!1,expects:`>=${e}`,requirement:e,message:t,_run(e,t){return e.typed&&e.value.length<this.requirement&&Js(this,`length`,e,t,{received:`${e.value.length}`}),e}}}function tc(e){return{kind:`validation`,type:`non_empty`,reference:tc,async:!1,expects:`!0`,message:e,_run(e,t){return e.typed&&e.value.length===0&&Js(this,`length`,e,t,{received:`0`}),e}}}function nc(e,t){return{kind:`validation`,type:`regex`,reference:nc,async:!1,expects:`${e}`,requirement:e,message:t,_run(e,t){return e.typed&&!this.requirement.test(e.value)&&Js(this,`format`,e,t),e}}}function rc(e,t,n){return typeof e.default==`function`?e.default(t,n):e.default}function ic(){return{kind:`schema`,type:`any`,reference:ic,expects:`any`,async:!1,_run(e){return e.typed=!0,e}}}function ac(e,t){return{kind:`schema`,type:`array`,reference:ac,expects:`Array`,async:!1,item:e,message:t,_run(e,t){let n=e.value;if(Array.isArray(n)){e.typed=!0,e.value=[];for(let r=0;r<n.length;r++){let i=n[r],a=this.item._run({typed:!1,value:i},t);if(a.issues){let o={type:`array`,origin:`value`,input:n,key:r,value:i};for(let t of a.issues)t.path?t.path.unshift(o):t.path=[o],e.issues?.push(t);if(e.issues||=a.issues,t.abortEarly){e.typed=!1;break}}a.typed||(e.typed=!1),e.value.push(a.value)}}else Js(this,`type`,e,t);return e}}}function oc(e){return{kind:`schema`,type:`boolean`,reference:oc,expects:`boolean`,async:!1,message:e,_run(e,t){return typeof e.value==`boolean`?e.typed=!0:Js(this,`type`,e,t),e}}}function sc(e,t){return{kind:`schema`,type:`custom`,reference:sc,expects:`unknown`,async:!1,check:e,message:t,_run(e,t){return this.check(e.value)?e.typed=!0:Js(this,`type`,e,t),e}}}function cc(e){return{kind:`schema`,type:`lazy`,reference:cc,expects:`unknown`,async:!1,getter:e,_run(e,t){return this.getter(e.value)._run(e,t)}}}function N(e,t){return{kind:`schema`,type:`literal`,reference:N,expects:qs(e),async:!1,literal:e,message:t,_run(e,t){return e.value===this.literal?e.typed=!0:Js(this,`type`,e,t),e}}}function lc(e){return{kind:`schema`,type:`number`,reference:lc,expects:`number`,async:!1,message:e,_run(e,t){return typeof e.value==`number`&&!isNaN(e.value)?e.typed=!0:Js(this,`type`,e,t),e}}}function uc(e,t){return{kind:`schema`,type:`object`,reference:uc,expects:`Object`,async:!1,entries:e,message:t,_run(e,t){let n=e.value;if(n&&typeof n==`object`){e.typed=!0,e.value={};for(let r in this.entries){let i=n[r],a=this.entries[r]._run({typed:!1,value:i},t);if(a.issues){let o={type:`object`,origin:`value`,input:n,key:r,value:i};for(let t of a.issues)t.path?t.path.unshift(o):t.path=[o],e.issues?.push(t);if(e.issues||=a.issues,t.abortEarly){e.typed=!1;break}}a.typed||(e.typed=!1),(a.value!==void 0||r in n)&&(e.value[r]=a.value)}}else Js(this,`type`,e,t);return e}}}function dc(e,...t){let n={kind:`schema`,type:`optional`,reference:dc,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,_run(e,t){return e.value===void 0&&(`default`in this&&(e.value=rc(this,e,t)),e.value===void 0)?(e.typed=!0,e):this.wrapped._run(e,t)}};return 0 in t&&(n.default=t[0]),n}function fc(e,t,n){return{kind:`schema`,type:`record`,reference:fc,expects:`Object`,async:!1,key:e,value:t,message:n,_run(e,t){let n=e.value;if(n&&typeof n==`object`){e.typed=!0,e.value={};for(let r in n)if(Ys(n,r)){let i=n[r],a=this.key._run({typed:!1,value:r},t);if(a.issues){let o={type:`object`,origin:`key`,input:n,key:r,value:i};for(let t of a.issues)t.path=[o],e.issues?.push(t);if(e.issues||=a.issues,t.abortEarly){e.typed=!1;break}}let o=this.value._run({typed:!1,value:i},t);if(o.issues){let a={type:`object`,origin:`value`,input:n,key:r,value:i};for(let t of o.issues)t.path?t.path.unshift(a):t.path=[a],e.issues?.push(t);if(e.issues||=o.issues,t.abortEarly){e.typed=!1;break}}(!a.typed||!o.typed)&&(e.typed=!1),a.typed&&(e.value[a.value]=o.value)}}else Js(this,`type`,e,t);return e}}}function P(e){return{kind:`schema`,type:`string`,reference:P,expects:`string`,async:!1,message:e,_run(e,t){return typeof e.value==`string`?e.typed=!0:Js(this,`type`,e,t),e}}}function pc(e){let t;if(e)for(let n of e)t?t.push(...n.issues):t=n.issues;return t}function mc(e,t){return{kind:`schema`,type:`union`,reference:mc,expects:Xs(e.map(e=>e.expects),`|`),async:!1,options:e,message:t,_run(e,t){let n,r,i;for(let a of this.options){let o=a._run({typed:!1,value:e.value},t);if(o.typed)if(o.issues)r?r.push(o):r=[o];else{n=o;break}else i?i.push(o):i=[o]}if(n)return n;if(r){if(r.length===1)return r[0];Js(this,`type`,e,t,{issues:pc(r)}),e.typed=!0}else if(i?.length===1)return i[0];else Js(this,`type`,e,t,{issues:pc(i)});return e}}}function hc(){return{kind:`schema`,type:`unknown`,reference:hc,expects:`unknown`,async:!1,_run(e){return e.typed=!0,e}}}function gc(e,t,n){return{kind:`schema`,type:`variant`,reference:gc,expects:`Object`,async:!1,key:e,options:t,message:n,_run(e,t){let n=e.value;if(n&&typeof n==`object`){let r,i=0,a=this.key,o=[],s=(e,c)=>{for(let l of e.options){if(l.type===`variant`)s(l,new Set(c).add(l.key));else{let e=!0,s=0;for(let r of c){if(l.entries[r]._run({typed:!1,value:n[r]},t).issues){e=!1,a!==r&&(i<s||i===s&&r in n&&!(a in n))&&(i=s,a=r,o=[]),a===r&&o.push(l.entries[r].expects);break}s++}if(e){let e=l._run({typed:!1,value:n},t);(!r||!r.typed&&e.typed)&&(r=e)}}if(r&&!r.issues)break}};if(s(this,new Set([this.key])),r)return r;Js(this,`type`,e,t,{input:n[a],expected:Xs(o,`|`),path:[{type:`object`,origin:`value`,input:n,key:a,value:n[a]}]})}else Js(this,`type`,e,t);return e}}}function _c(e,t,n){let r=e._run({typed:!1,value:t},Bs(n));if(r.issues)throw new Zs(r.issues);return r.value}function vc(...e){return{...e[0],pipe:e,_run(t,n){for(let r of e)if(r.kind!==`metadata`){if(t.issues&&(r.kind===`schema`||r.kind===`transformation`)){t.typed=!1;break}(!t.issues||!n.abortEarly&&!n.abortPipeEarly)&&(t=r._run(t,n))}return t}}}var yc=class{current;migrations={};coerce;defaultValue;constructor(e){e.migrations.forEach(e=>{this.migrations[e.version]=e}),this.defaultValue=e?.defaultValue??{};let t=this.getVersions();this.current=t[t.length-1],this.coerce=e?.coerce??!0}getVersions(){let e=Is(this.migrations);return Fs.sort(e)}async migrate(e,t){let n=e??this.defaultValue,r=this.tryCoerce(n.version),i=this.tryCoerce(t?.target??this.current);t?.debug&&console.log(`Migrating from`,r,`to`,i);let a=Ls(n),o=this.getVersions(),s=o.indexOf(r),c=o.indexOf(i);if(s===-1)throw Error(`Current version "${r}" not found in migrations`);if(c===-1)throw Error(`Target version "${i}" not found in migrations`);if(s===c)return a;let l=s<c,u=l?1:-1,d=l?`up`:`down`;for(let e=s;l?e<c:e>c;e+=u){let n=o[e],r=o[e+u];t?.debug&&console.log(` Migrating to version:`,r);let i=n,s=this.migrations[i],{version:c,...l}=a;a={...await s[d](l,n),version:r},t?.debug&&console.log(` Migrated state:`,a)}return a}tryCoerce(e){return this.coerce?(0,Fs.coerce)(e)?.version??e:e}needMigration(e){let t=this.tryCoerce(e);return Fs.lt(t,this.current)}},bc=()=>({createDefault(e){return e},createMigrations(e){return new yc(e)}}),xc=bc(),Sc=xc.createDefault({cacheFolder:``,clearTemporaryFoldersOnPipelineEnd:!1,locale:`en-US`,theme:`light`,version:`7.0.0`,autosave:!0,agents:[],tours:{dashboard:{step:0,completed:!1},editor:{step:0,completed:!1}}});xc.createMigrations({defaultValue:Sc,migrations:[Ho({version:`1.0.0`,up:e=>e,down:Uo}),Ho({version:`2.0.0`,up:e=>({...e,clearTemporaryFoldersOnPipelineEnd:!1}),down:()=>{throw Error(`Can't migrate down from 2.0.0`)}}),Ho({version:`3.0.0`,up:e=>({...e,locale:`en-US`}),down:e=>{let{locale:t,...n}=e;return n}}),Ho({version:`4.0.0`,up:e=>({...e,tours:{dashboard:{step:0,completed:!1},editor:{step:0,completed:!1}}}),down:e=>{let{tours:t,...n}=e;return n}}),Ho({version:`5.0.0`,up:e=>({...e,autosave:!0}),down:e=>{let{autosave:t,...n}=e;return n}}),Ho({version:`6.0.0`,up:e=>({...e,agents:[]}),down:e=>{let{agents:t,...n}=e;return n}}),Ho({version:`7.0.0`,up:Wo,down:()=>{throw Error(`Can't migrate down from 7.0.0`)}})]});var Cc=bc(),wc=Cc.createDefault({version:`2.0.0`,projects:[{id:`main`,name:`Default project`,description:`The initial default project`}],pipelines:[],proxies:[]});Cc.createMigrations({defaultValue:wc,migrations:[Ho({version:`1.0.0`,up:e=>({version:`2.0.0`,projects:[{id:`main`,name:`Default project`,description:`The initial default project`}],pipelines:Object.entries(e.data||{}).map(([e,t])=>({...t,id:e,project:`main`})),proxies:[]}),down:Uo}),Ho({version:`2.0.0`,up:Wo,down:e=>{throw Error(`Cannot downgrade to version 1.0.0`)}})]});var Tc=bc(),Ec=Tc.createDefault({canvas:{triggers:[],blocks:[]},description:``,name:``,variables:[],type:`default`,version:`4.0.0`});Tc.createMigrations({defaultValue:Ec,migrations:[Ho({version:`1.0.0`,up:e=>{let t=e.canvas.blocks,n=[],r=[];for(let e of t)e.type===`event`?n.push(e):r.push(e);return{canvas:{blocks:r,triggers:n},description:e.description,name:e.name,variables:e.variables}},down:Uo}),Ho({version:`2.0.0`,up:e=>{let{canvas:t,...n}=e,{blocks:r,triggers:i}=t,a=[];for(let e of r){let t={};for(let n of Object.entries(e.params))if(n===void 0)throw Error(`Can't migrate block with undefined params`);else{let[e,r]=n;t[e]={editor:`editor`,value:r}}a.push({...e,params:t})}return{...n,canvas:{triggers:i,blocks:a}}},down:()=>{throw Error(`Migration down not implemented`)}}),Ho({version:`3.0.0`,up:e=>({...e,type:`default`}),down:()=>{throw Error(`Migration down not implemented`)}}),Ho({version:`4.0.0`,up:Wo,down:()=>{throw Error(`Migration down not implemented`)}})]});var Dc=[`dialog:showOpenDialog`,`dialog:showSaveDialog`];mc([N(`light`),N(`dark`)]),N(`1.0.0`),mc([N(`light`),N(`dark`)]),N(`2.0.0`),mc([N(`light`),N(`dark`)]),N(`3.0.0`),mc([N(`light`),N(`dark`)]),N(`4.0.0`),mc([N(`en-US`),N(`fr-FR`),N(`pt-BR`),N(`zh-CN`),N(`es-ES`),N(`de-DE`)]),mc([N(`light`),N(`dark`)]),N(`5.0.0`),mc([N(`en-US`),N(`fr-FR`),N(`pt-BR`),N(`zh-CN`),N(`es-ES`),N(`de-DE`)]),mc([N(`light`),N(`dark`)]),N(`6.0.0`),mc([N(`en-US`),N(`fr-FR`),N(`pt-BR`),N(`zh-CN`),N(`es-ES`),N(`de-DE`)]),mc([N(`light`),N(`dark`)]),N(`7.0.0`),mc([N(`en-US`),N(`fr-FR`),N(`pt-BR`),N(`zh-CN`),N(`es-ES`),N(`de-DE`)]);var Oc={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]};function kc(e,t,n,r=!1){let i=String(t),a=(e,t)=>`\u001b[${t[0]}m${e}\u001b[${t[1]}m`,o=(e,t)=>t!=null&&typeof t==`string`?a(e,Oc[t]):t!=null&&Array.isArray(t)?t.reduce((e,t)=>o(e,t),e):t!=null&&t[e.trim()]!=null?o(e,t[e.trim()]):t!=null&&t[`*`]!=null?o(e,t[`*`]):e;return i.replace(/{{(.+?)}}/g,(t,i)=>{let s=n[i]==null?r?``:t:String(n[i]);return e.stylePrettyLogs?o(s,e?.prettyLogStyles?.[i]??null)+a(``,Oc.reset):s})}function Ac(e,t=2,n=0){return e!=null&&isNaN(e)?``:(e=e==null?e:e+n,t===2?e==null?`--`:e<10?`0`+e:e.toString():e==null?`---`:e<10?`00`+e:e<100?`0`+e:e.toString())}function jc(e){return{href:e.href,protocol:e.protocol,username:e.username,password:e.password,host:e.host,hostname:e.hostname,port:e.port,pathname:e.pathname,search:e.search,searchParams:[...e.searchParams].map(([e,t])=>({key:e,value:t})),hash:e.hash,origin:e.origin}}function Mc(e){let t=new Set;return JSON.stringify(e,(e,n)=>{if(typeof n==`object`&&n){if(t.has(n))return`[Circular]`;t.add(n)}return typeof n==`bigint`?`${n}`:n})}function Nc(e,t){let n={seen:[],stylize:Ic};return t!=null&&tl(n,t),Fc(n.showHidden)&&(n.showHidden=!1),Fc(n.depth)&&(n.depth=2),Fc(n.colors)&&(n.colors=!0),Fc(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=Lc),Zc(n,e,n.depth)}Nc.colors=Oc,Nc.styles={special:`cyan`,number:`yellow`,boolean:`yellow`,undefined:`grey`,null:`bold`,string:`green`,date:`magenta`,regexp:`red`};function Pc(e){return typeof e==`boolean`}function Fc(e){return e===void 0}function Ic(e){return e}function Lc(e,t){let n=Nc.styles[t];return n!=null&&Nc?.colors?.[n]?.[0]!=null&&Nc?.colors?.[n]?.[1]!=null?`\x1B[`+Nc.colors[n][0]+`m`+e+`\x1B[`+Nc.colors[n][1]+`m`:e}function Rc(e){return typeof e==`function`}function zc(e){return typeof e==`string`}function Bc(e){return typeof e==`number`}function Vc(e){return e===null}function Hc(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Uc(e){return Wc(e)&&qc(e)===`[object RegExp]`}function Wc(e){return typeof e==`object`&&!!e}function Gc(e){return Wc(e)&&(qc(e)===`[object Error]`||e instanceof Error)}function Kc(e){return Wc(e)&&qc(e)===`[object Date]`}function qc(e){return Object.prototype.toString.call(e)}function Jc(e){let t={};return e.forEach(e=>{t[e]=!0}),t}function Yc(e,t,n,r,i){let a=[];for(let i=0,o=t.length;i<o;++i)Hc(t,String(i))?a.push(Qc(e,t,n,r,String(i),!0)):a.push(``);return i.forEach(i=>{i.match(/^\d+$/)||a.push(Qc(e,t,n,r,i,!0))}),a}function Xc(e){return`[`+Error.prototype.toString.call(e)+`]`}function Zc(e,t,n=0){if(e.customInspect&&t!=null&&Rc(t)&&t?.inspect!==Nc&&!(t?.constructor&&t?.constructor.prototype===t)){if(typeof t.inspect!=`function`&&t.toString!=null)return t.toString();let r=t?.inspect(n,e);return zc(r)||(r=Zc(e,r,n)),r}let r=$c(e,t);if(r)return r;let i=Object.keys(t),a=Jc(i);try{e.showHidden&&Object.getOwnPropertyNames&&(i=Object.getOwnPropertyNames(t))}catch{}if(Gc(t)&&(i.indexOf(`message`)>=0||i.indexOf(`description`)>=0))return Xc(t);if(i.length===0)if(Rc(e.stylize)){if(Rc(t)){let n=t.name?`: `+t.name:``;return e.stylize(`[Function`+n+`]`,`special`)}if(Uc(t))return e.stylize(RegExp.prototype.toString.call(t),`regexp`);if(Kc(t))return e.stylize(Date.prototype.toISOString.call(t),`date`);if(Gc(t))return Xc(t)}else return t;let o=``,s=!1,c=[`{
|
|
148
|
+
`,`
|
|
149
|
+
}`];if(Array.isArray(t)&&(s=!0,c=[`[
|
|
150
|
+
`,`
|
|
151
|
+
]`]),Rc(t)&&(o=` [Function`+(t.name?`: `+t.name:``)+`]`),Uc(t)&&(o=` `+RegExp.prototype.toString.call(t)),Kc(t)&&(o=` `+Date.prototype.toUTCString.call(t)),Gc(t)&&(o=` `+Xc(t)),i.length===0&&(!s||t.length==0))return c[0]+o+c[1];if(n<0)return Uc(t)?e.stylize(RegExp.prototype.toString.call(t),`regexp`):e.stylize(`[Object]`,`special`);e.seen.push(t);let l;return l=s?Yc(e,t,n,a,i):i.map(r=>Qc(e,t,n,a,r,s)),e.seen.pop(),el(l,o,c)}function Qc(e,t,n,r,i,a){let o,s,c={value:void 0};try{c.value=t[i]}catch{}try{Object.getOwnPropertyDescriptor&&(c=Object.getOwnPropertyDescriptor(t,i)||c)}catch{}if(c.get?s=c.set?e.stylize(`[Getter/Setter]`,`special`):e.stylize(`[Getter]`,`special`):c.set&&(s=e.stylize(`[Setter]`,`special`)),Hc(r,i)||(o=`[`+i+`]`),s||(e.seen.indexOf(c.value)<0?(s=Vc(n)?Zc(e,c.value,void 0):Zc(e,c.value,n-1),s.indexOf(`
|
|
152
|
+
`)>-1&&(s=a?s.split(`
|
|
153
|
+
`).map(e=>` `+e).join(`
|
|
154
|
+
`).substr(2):`
|
|
155
|
+
`+s.split(`
|
|
156
|
+
`).map(e=>` `+e).join(`
|
|
157
|
+
`))):s=e.stylize(`[Circular]`,`special`)),Fc(o)){if(a&&i.match(/^\d+$/))return s;o=JSON.stringify(``+i),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,`name`)):(o=o.replace(/'/g,`\\'`).replace(/\\"/g,`\\'`).replace(/(^"|"$)/g,`'`),o=e.stylize(o,`string`))}return o+`: `+s}function $c(e,t){if(Fc(t))return e.stylize(`undefined`,`undefined`);if(zc(t)){let n=`'`+JSON.stringify(t).replace(/^"|"$/g,``).replace(/'/g,`\\'`).replace(/\\"/g,`\\'`)+`'`;return e.stylize(n,`string`)}if(Bc(t))return e.stylize(``+t,`number`);if(Pc(t))return e.stylize(``+t,`boolean`);if(Vc(t))return e.stylize(`null`,`null`)}function el(e,t,n){return n[0]+(t===``?``:t+`
|
|
158
|
+
`)+` `+e.join(`,
|
|
159
|
+
`)+` `+n[1]}function tl(e,t){let n={...e};if(!t||!Wc(t))return e;let r={...t},i=Object.keys(t),a=i.length;for(;a--;)n[i[a]]=r[i[a]];return n}function nl(e,...t){let n={seen:[],stylize:Ic};e!=null&&tl(n,e);let r=t[0],i=0,a=``,o=``;if(typeof r==`string`){if(t.length===1)return r;let s,c=0;for(let o=0;o<r.length-1;o++)if(r.charCodeAt(o)===37){let l=r.charCodeAt(++o);if(i+1!==t.length){switch(l){case 115:{let r=t[++i];s=typeof r==`number`||typeof r==`bigint`?$c(n,r):typeof r!=`object`||!r?String(r):Nc(r,{...e,compact:3,colors:!1,depth:0});break}case 106:s=Mc(t[++i]);break;case 100:{let e=t[++i];s=typeof e==`bigint`?$c(n,e):typeof e==`symbol`?`NaN`:$c(n,e);break}case 79:s=Nc(t[++i],e);break;case 111:s=Nc(t[++i],{...e,showHidden:!0,showProxy:!0,depth:4});break;case 105:{let e=t[++i];s=typeof e==`bigint`?$c(n,e):typeof e==`symbol`?`NaN`:$c(n,parseInt(s));break}case 102:{let e=t[++i];s=typeof e==`symbol`?`NaN`:$c(n,parseInt(e));break}case 99:i+=1,s=``;break;case 37:a+=r.slice(c,o),c=o+1;continue;default:continue}c!==o-1&&(a+=r.slice(c,o-1)),a+=s,c=o+1}else l===37&&(a+=r.slice(c,o),c=o+1)}c!==0&&(i++,o=` `,c<r.length&&(a+=r.slice(c)))}for(;i<t.length;){let n=t[i];a+=o,a+=typeof n==`string`?n:Nc(n,e),o=` `,i++}return a}var rl={getCallerStackFrame:sl,getErrorTrace:cl,getMeta:ol,transportJSON:ml,transportFormatted:pl,isBuffer:hl,isError:ul,prettyFormatLogObj:dl,prettyFormatErrorObj:fl},il={runtime:[typeof window,typeof document].includes(`undefined`)?`Generic`:`Browser`,browser:globalThis?.navigator?.userAgent},al=/(?:(?:file|https?|global code|[^@]+)@)?(?:file:)?((?:\/[^:/]+){2,})(?::(\d+))?(?::(\d+))?/;function ol(e,t,n,r,i,a){return Object.assign({},il,{name:i,parentNames:a,date:new Date,logLevelId:e,logLevelName:t,path:r?void 0:sl(n)})}function sl(e,t=Error()){return ll(t?.stack?.split(`
|
|
160
|
+
`)?.filter(e=>!e.includes(`Error: `))?.[e])}function cl(e){return(e?.stack?.split(`
|
|
161
|
+
`)??[])?.filter(e=>!e.includes(`Error: `))?.reduce((e,t)=>(e.push(ll(t)),e),[])}function ll(e){let t=globalThis?.location?.origin,n={fullFilePath:void 0,fileName:void 0,fileNameWithLine:void 0,fileColumn:void 0,fileLine:void 0,filePath:void 0,filePathWithLine:void 0,method:void 0};if(e!=null){let r=e.match(al);if(r){n.filePath=r[1].replace(/\?.*$/,``),n.fullFilePath=`${t}${n.filePath}`;let e=n.filePath.split(`/`);n.fileName=e[e.length-1],n.fileLine=r[2],n.fileColumn=r[3],n.filePathWithLine=`${n.filePath}:${n.fileLine}`,n.fileNameWithLine=`${n.fileName}:${n.fileLine}`}}return n}function ul(e){return e instanceof Error}function dl(e,t){return e.reduce((e,n)=>(ul(n)?e.errors.push(fl(n,t)):e.args.push(n),e),{args:[],errors:[]})}function fl(e,t){let n=cl(e).map(e=>kc(t,t.prettyErrorStackTemplate,{...e},!0)),r={errorName:` ${e.name} `,errorMessage:Object.getOwnPropertyNames(e).reduce((t,n)=>(n!==`stack`&&t.push(e[n]),t),[]).join(`, `),errorStack:n.join(`
|
|
162
|
+
`)};return kc(t,t.prettyErrorTemplate,r)}function pl(e,t,n,r){let i=(n.length>0&&t.length>0?`
|
|
163
|
+
`:``)+n.join(`
|
|
164
|
+
`);r.prettyInspectOptions.colors=r.stylePrettyLogs,console.log(e+nl(r.prettyInspectOptions,...t)+i)}function ml(e){console.log(Mc(e))}function hl(e){return!1}var gl=class{constructor(e,t,n=4){this.logObj=t,this.stackDepthLevel=n,this.runtime=rl,this.settings={type:e?.type??`pretty`,name:e?.name,parentNames:e?.parentNames,minLevel:e?.minLevel??0,argumentsArrayName:e?.argumentsArrayName,hideLogPositionForProduction:e?.hideLogPositionForProduction??!1,prettyLogTemplate:e?.prettyLogTemplate??`{{yyyy}}.{{mm}}.{{dd}} {{hh}}:{{MM}}:{{ss}}:{{ms}} {{logLevelName}} {{filePathWithLine}}{{nameWithDelimiterPrefix}} `,prettyErrorTemplate:e?.prettyErrorTemplate??`
|
|
165
|
+
{{errorName}} {{errorMessage}}
|
|
166
|
+
error stack:
|
|
167
|
+
{{errorStack}}`,prettyErrorStackTemplate:e?.prettyErrorStackTemplate??` • {{fileName}} {{method}}
|
|
168
|
+
{{filePathWithLine}}`,prettyErrorParentNamesSeparator:e?.prettyErrorParentNamesSeparator??`:`,prettyErrorLoggerNameDelimiter:e?.prettyErrorLoggerNameDelimiter??` `,stylePrettyLogs:e?.stylePrettyLogs??!0,prettyLogTimeZone:e?.prettyLogTimeZone??`UTC`,prettyLogStyles:e?.prettyLogStyles??{logLevelName:{"*":[`bold`,`black`,`bgWhiteBright`,`dim`],SILLY:[`bold`,`white`],TRACE:[`bold`,`whiteBright`],DEBUG:[`bold`,`green`],INFO:[`bold`,`blue`],WARN:[`bold`,`yellow`],ERROR:[`bold`,`red`],FATAL:[`bold`,`redBright`]},dateIsoStr:`white`,filePathWithLine:`white`,name:[`white`,`bold`],nameWithDelimiterPrefix:[`white`,`bold`],nameWithDelimiterSuffix:[`white`,`bold`],errorName:[`bold`,`bgRedBright`,`whiteBright`],fileName:[`yellow`],fileNameWithLine:`white`},prettyInspectOptions:e?.prettyInspectOptions??{colors:!0,compact:!1,depth:1/0},metaProperty:e?.metaProperty??`_meta`,maskPlaceholder:e?.maskPlaceholder??`[***]`,maskValuesOfKeys:e?.maskValuesOfKeys??[`password`],maskValuesOfKeysCaseInsensitive:e?.maskValuesOfKeysCaseInsensitive??!1,maskValuesRegEx:e?.maskValuesRegEx,prefix:[...e?.prefix??[]],attachedTransports:[...e?.attachedTransports??[]],overwrite:{mask:e?.overwrite?.mask,toLogObj:e?.overwrite?.toLogObj,addMeta:e?.overwrite?.addMeta,addPlaceholders:e?.overwrite?.addPlaceholders,formatMeta:e?.overwrite?.formatMeta,formatLogObj:e?.overwrite?.formatLogObj,transportFormatted:e?.overwrite?.transportFormatted,transportJSON:e?.overwrite?.transportJSON}}}log(e,t,...n){if(e<this.settings.minLevel)return;let r=[...this.settings.prefix,...n],i=this.settings.overwrite?.mask==null?this.settings.maskValuesOfKeys!=null&&this.settings.maskValuesOfKeys.length>0?this._mask(r):r:this.settings.overwrite?.mask(r),a=this.logObj==null?void 0:this._recursiveCloneAndExecuteFunctions(this.logObj),o=this.settings.overwrite?.toLogObj==null?this._toLogObj(i,a):this.settings.overwrite?.toLogObj(i,a),s=this.settings.overwrite?.addMeta==null?this._addMetaToLogObj(o,e,t):this.settings.overwrite?.addMeta(o,e,t),c,l;return this.settings.overwrite?.formatMeta!=null&&(c=this.settings.overwrite?.formatMeta(s?.[this.settings.metaProperty])),this.settings.overwrite?.formatLogObj!=null&&(l=this.settings.overwrite?.formatLogObj(i,this.settings)),this.settings.type===`pretty`&&(c??=this._prettyFormatLogObjMeta(s?.[this.settings.metaProperty]),l??=this.runtime.prettyFormatLogObj(i,this.settings)),c!=null&&l!=null?this.settings.overwrite?.transportFormatted==null?this.runtime.transportFormatted(c,l.args,l.errors,this.settings):this.settings.overwrite?.transportFormatted(c,l.args,l.errors,this.settings):this.settings.overwrite?.transportJSON==null?this.settings.type!==`hidden`&&this.runtime.transportJSON(s):this.settings.overwrite?.transportJSON(s),this.settings.attachedTransports!=null&&this.settings.attachedTransports.length>0&&this.settings.attachedTransports.forEach(e=>{e(s)}),s}attachTransport(e){this.settings.attachedTransports.push(e)}getSubLogger(e,t){let n={...this.settings,...e,parentNames:this.settings?.parentNames!=null&&this.settings?.name!=null?[...this.settings.parentNames,this.settings.name]:this.settings?.name==null?void 0:[this.settings.name],prefix:[...this.settings.prefix,...e?.prefix??[]]};return new this.constructor(n,t??this.logObj,this.stackDepthLevel)}_mask(e){let t=this.settings.maskValuesOfKeysCaseInsensitive===!0?this.settings.maskValuesOfKeys.map(e=>e.toLowerCase()):this.settings.maskValuesOfKeys;return e?.map(e=>this._recursiveCloneAndMaskValuesOfKeys(e,t))}_recursiveCloneAndMaskValuesOfKeys(e,t,n=[]){if(n.includes(e))return{...e};if(typeof e==`object`&&e&&n.push(e),this.runtime.isError(e)||this.runtime.isBuffer(e))return e;if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);if(Array.isArray(e))return e.map(e=>this._recursiveCloneAndMaskValuesOfKeys(e,t,n));if(e instanceof Date)return new Date(e.getTime());if(e instanceof URL)return jc(e);if(typeof e==`object`&&e){let r=this.runtime.isError(e)?this._cloneError(e):Object.create(Object.getPrototypeOf(e));return Object.getOwnPropertyNames(e).reduce((r,i)=>(r[i]=t.includes(this.settings?.maskValuesOfKeysCaseInsensitive===!0?i.toLowerCase():i)?this.settings.maskPlaceholder:(()=>{try{return this._recursiveCloneAndMaskValuesOfKeys(e[i],t,n)}catch{return null}})(),r),r)}else{if(typeof e==`string`){let t=e;for(let e of this.settings?.maskValuesRegEx||[])t=t.replace(e,this.settings?.maskPlaceholder||``);return t}return e}}_recursiveCloneAndExecuteFunctions(e,t=[]){return this.isObjectOrArray(e)&&t.includes(e)?this.shallowCopy(e):(this.isObjectOrArray(e)&&t.push(e),Array.isArray(e)?e.map(e=>this._recursiveCloneAndExecuteFunctions(e,t)):e instanceof Date?new Date(e.getTime()):this.isObject(e)?Object.getOwnPropertyNames(e).reduce((n,r)=>{let i=Object.getOwnPropertyDescriptor(e,r);if(i){Object.defineProperty(n,r,i);let a=e[r];n[r]=typeof a==`function`?a():this._recursiveCloneAndExecuteFunctions(a,t)}return n},Object.create(Object.getPrototypeOf(e))):e)}isObjectOrArray(e){return typeof e==`object`&&!!e}isObject(e){return typeof e==`object`&&!Array.isArray(e)&&e!==null}shallowCopy(e){return Array.isArray(e)?[...e]:{...e}}_toLogObj(e,t={}){return e=e?.map(e=>this.runtime.isError(e)?this._toErrorObject(e):e),t=this.settings.argumentsArrayName==null?e.length===1&&!Array.isArray(e[0])&&this.runtime.isBuffer(e[0])!==!0&&!(e[0]instanceof Date)?typeof e[0]==`object`&&e[0]!=null?{...e[0],...t}:{0:e[0],...t}:{...t,...e}:{...t,[this.settings.argumentsArrayName]:e},t}_cloneError(e){let t=new e.constructor;return Object.getOwnPropertyNames(e).forEach(n=>{t[n]=e[n]}),t}_toErrorObject(e){return{nativeError:e,name:e.name??`Error`,message:e.message,stack:this.runtime.getErrorTrace(e)}}_addMetaToLogObj(e,t,n){return{...e,[this.settings.metaProperty]:this.runtime.getMeta(t,n,this.stackDepthLevel,this.settings.hideLogPositionForProduction,this.settings.name,this.settings.parentNames)}}_prettyFormatLogObjMeta(e){if(e==null)return``;let t=this.settings.prettyLogTemplate,n={};t.includes(`{{yyyy}}.{{mm}}.{{dd}} {{hh}}:{{MM}}:{{ss}}:{{ms}}`)?t=t.replace(`{{yyyy}}.{{mm}}.{{dd}} {{hh}}:{{MM}}:{{ss}}:{{ms}}`,`{{dateIsoStr}}`):this.settings.prettyLogTimeZone===`UTC`?(n.yyyy=e?.date?.getUTCFullYear()??`----`,n.mm=Ac(e?.date?.getUTCMonth(),2,1),n.dd=Ac(e?.date?.getUTCDate(),2),n.hh=Ac(e?.date?.getUTCHours(),2),n.MM=Ac(e?.date?.getUTCMinutes(),2),n.ss=Ac(e?.date?.getUTCSeconds(),2),n.ms=Ac(e?.date?.getUTCMilliseconds(),3)):(n.yyyy=e?.date?.getFullYear()??`----`,n.mm=Ac(e?.date?.getMonth(),2,1),n.dd=Ac(e?.date?.getDate(),2),n.hh=Ac(e?.date?.getHours(),2),n.MM=Ac(e?.date?.getMinutes(),2),n.ss=Ac(e?.date?.getSeconds(),2),n.ms=Ac(e?.date?.getMilliseconds(),3));let r=this.settings.prettyLogTimeZone===`UTC`?e?.date:new Date(e?.date?.getTime()-e?.date?.getTimezoneOffset()*6e4);n.rawIsoStr=r?.toISOString(),n.dateIsoStr=r?.toISOString().replace(`T`,` `).replace(`Z`,``),n.logLevelName=e?.logLevelName,n.fileNameWithLine=e?.path?.fileNameWithLine??``,n.filePathWithLine=e?.path?.filePathWithLine??``,n.fullFilePath=e?.path?.fullFilePath??``;let i=this.settings.parentNames?.join(this.settings.prettyErrorParentNamesSeparator);return i=i!=null&&e?.name!=null?i+this.settings.prettyErrorParentNamesSeparator:void 0,n.name=e?.name!=null||i!=null?(i??``)+e?.name??``:``,n.nameWithDelimiterPrefix=n.name.length>0?this.settings.prettyErrorLoggerNameDelimiter+n.name:``,n.nameWithDelimiterSuffix=n.name.length>0?n.name+this.settings.prettyErrorLoggerNameDelimiter:``,this.settings.overwrite?.addPlaceholders!=null&&this.settings.overwrite?.addPlaceholders(e,n),kc(this.settings,t,n)}},_l=new class extends gl{constructor(e,t){let n=typeof window<`u`&&typeof document<`u`,r=n?window.chrome!==void 0&&window.CSS!==void 0&&window.CSS.supports(`color`,`green`):!1,i=n?/^((?!chrome|android).)*safari/i.test(navigator.userAgent):!1;e||={},e.stylePrettyLogs=e.stylePrettyLogs&&n&&!r?!1:e.stylePrettyLogs,super(e,t,i?4:5)}log(e,t,...n){return super.log(e,t,...n)}silly(...e){return super.log(0,`SILLY`,...e)}trace(...e){return super.log(1,`TRACE`,...e)}debug(...e){return super.log(2,`DEBUG`,...e)}info(...e){return super.log(3,`INFO`,...e)}warn(...e){return super.log(4,`WARN`,...e)}error(...e){return super.log(5,`ERROR`,...e)}fatal(...e){return super.log(6,`FATAL`,...e)}getSubLogger(e,t){return super.getSubLogger(e,t)}}({minLevel:3,hideLogPositionForProduction:!1}),vl=()=>({logger:()=>_l,attachTransport:e=>{_l.attachTransport(e)}});async function yl(e){let t=bl(await e),[n,r,{QuickJSWASMModule:i}]=await Promise.all([t.importModuleLoader().then(bl),t.importFFI(),et(()=>import(`./module-6F3E5H7Y-ndcQ2bTZ.js`).then(bl),__vite__mapDeps([0,1]))]),a=await n();return a.type=`sync`,new i(a,new r(a))}function bl(e){return e&&`default`in e&&e.default?e.default&&`default`in e.default&&e.default.default?e.default.default:e.default:e}function xl(e,t){return{...e,async importModuleLoader(){let n=bl(await e.importModuleLoader());return async function(){let e=t.emscriptenModule?{...t.emscriptenModule}:{},r=t.log??((...e)=>Qe(`newVariant moduleLoader:`,...e)),i=(e,t)=>(r(...e,t),t),a=e=>typeof e==`function`?e():e;(t.wasmLocation||t.wasmSourceMapLocation||t.locateFile)&&(e.locateFile=(e,n)=>{let r={fileName:e,relativeTo:n};if(e.endsWith(`.wasm`)&&t.wasmLocation!==void 0)return i([`locateFile .wasm: provide wasmLocation`,r],t.wasmLocation);if(e.endsWith(`.map`)){if(t.wasmSourceMapLocation!==void 0)return i([`locateFile .map: provide wasmSourceMapLocation`,r],t.wasmSourceMapLocation);if(t.wasmLocation&&!t.locateFile)return i([`locateFile .map: infer from wasmLocation`,r],t.wasmLocation+`.map`)}return t.locateFile?i([`locateFile: use provided fn`,r],t.locateFile(e,n)):i([`locateFile: unhandled, passthrough`,r],e)}),t.wasmBinary&&(e.wasmBinary=await a(t.wasmBinary)),t.wasmMemory&&(e.wasmMemory=await a(t.wasmMemory));let o=t.wasmModule,s;o&&(e.instantiateWasm=async(e,t)=>{s??=Promise.resolve(a(o));let n=await s;if(!n)throw new $e(`options.wasmModule returned ${String(n)}`);let r=await WebAssembly.instantiate(n,e);return t(r),r.exports}),e.monitorRunDependencies=e=>{r(`monitorRunDependencies:`,e)},e.quickjsEmscriptenInit=()=>Sl(r);let c=n(e),l=e.quickjsEmscriptenInit?.(r);if(o&&l?.receiveWasmOffsetConverter&&!l.existingWasmOffsetConverter){let e=await a(t.wasmBinary)??new ArrayBuffer(0);s??=Promise.resolve(a(o));let n=await s;if(!n)throw new $e(`options.wasmModule returned ${String(n)}`);l.receiveWasmOffsetConverter(e,n)}if(l?.receiveSourceMapJSON){let e=await a(t.wasmSourceMapData);typeof e==`string`?l.receiveSourceMapJSON(JSON.parse(e)):e?l.receiveSourceMapJSON(e):l.receiveSourceMapJSON({version:3,names:[],sources:[],mappings:``})}return c}}}}function Sl(e){let t=`mock called, emscripten module may not be initialized yet`;return{mock:!0,removeRunDependency(n){e(`${t}: removeRunDependency called:`,n)},receiveSourceMapJSON(n){e(`${t}: receiveSourceMapJSON called:`,n)},WasmOffsetConverter:void 0,receiveWasmOffsetConverter(n,r){e(`${t}: receiveWasmOffsetConverter called:`,n,r)}}}var Cl=Object.defineProperty,wl=(e,t,n)=>t in e?Cl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,F=(e,t,n)=>wl(e,typeof t==`symbol`?t:t+``,n),Tl=e=>{let t=new El(e);return new Proxy(e,{get(e,n,r){return n in t?t[n]:Reflect.get(e,n,r)}})},El=class{constructor(e){F(this,`context`),F(this,`fn`),F(this,`fnGenerator`),F(this,`fnCounter`,-(2**53-1)),F(this,`fnMap`,new Map),F(this,`newFunction`,(e,t)=>{this.fnCounter++;let n=this.fnCounter;return this.fnMap.set(n,t),this.context.unwrapResult(this.context.callFunction(this.fnGenerator,this.context.undefined,this.context.newString(e),this.context.newNumber(t.length),this.context.newNumber(n),this.fn))}),this.context=e;let t=this.fnMap;this.fn=this.context.newFunction(``,function(n,...r){let i=e.getNumber(n),a=t.get(i);if(!a)throw Error(`function is not registered`);return a.call(this,...r)}),this.fnGenerator=e.unwrapResult(e.evalCode(`((name, length, id, f) => {
|
|
169
|
+
const fn = function(...args) {
|
|
170
|
+
return f.call(this, id, ...args);
|
|
171
|
+
};
|
|
172
|
+
fn.name = name;
|
|
173
|
+
fn.length = length;
|
|
174
|
+
return fn;
|
|
175
|
+
})`))}disposeEx(){this.fnGenerator.dispose(),this.fn.dispose()}},Dl=[[Symbol,`Symbol`],[Symbol.prototype,`Symbol.prototype`],[Object,`Object`],[Object.prototype,`Object.prototype`],[Function,`Function`],[Function.prototype,`Function.prototype`],[Boolean,`Boolean`],[Boolean.prototype,`Boolean.prototype`],[Array,`Array`],[Array.prototype,`Array.prototype`],[Error,`Error`],[Error.prototype,`Error.prototype`],[EvalError,`EvalError`],[EvalError.prototype,`EvalError.prototype`],[RangeError,`RangeError`],[RangeError.prototype,`RangeError.prototype`],[ReferenceError,`ReferenceError`],[ReferenceError.prototype,`ReferenceError.prototype`],[SyntaxError,`SyntaxError`],[SyntaxError.prototype,`SyntaxError.prototype`],[TypeError,`TypeError`],[TypeError.prototype,`TypeError.prototype`],[URIError,`URIError`],[URIError.prototype,`URIError.prototype`],...Object.getOwnPropertyNames(Symbol).filter(e=>typeof Symbol[e]==`symbol`).map(e=>[Symbol[e],`Symbol.${e}`])];function Ol(e,t){let n=e.unwrapResult(e.evalCode(t)),r=(t,...r)=>e.unwrapResult(e.callFunction(n,t??e.undefined,...r));return r.dispose=()=>n.dispose(),r.alive=!0,Object.defineProperty(r,`alive`,{get:()=>n.alive}),r}function kl(e,t,n,...r){let i=Ol(e,t);try{return i(n,...r)}finally{i.dispose()}}function Al(e,t,n){return e.dump(kl(e,`Object.is`,void 0,t,n))}function jl(e,t,n){return e.dump(kl(e,`(a, b) => a instanceof b`,void 0,t,n))}function Ml(e,t){return e.dump(kl(e,`a => typeof a === "object" && a !== null || typeof a === "function"`,void 0,t))}function Nl(e,t){let n=JSON.stringify(t);return n?kl(e,`JSON.parse`,void 0,e.newString(n)):e.undefined}function Pl([e,t],n){try{return n(e)}finally{t&&e.dispose()}}function Fl(e,t){try{return t(...e.map(e=>e[0]))}finally{for(let[t,n]of e)n&&t.dispose()}}function Il(e){return`handle`in e}function Ll(e){return Il(e)?e.handle:e}function Rl(e,t,n,r){let i;for(let n of r)if(i=n(t,e),i)break;return i?n(t,i)??i:void 0}function zl(e,t){return typeof e==`symbol`?kl(t,`d => Symbol(d)`,void 0,e.description?t.newString(e.description):t.undefined):void 0}function Bl(e,t){return e instanceof Date?kl(t,`d => new Date(d)`,void 0,t.newNumber(e.getTime())):void 0}var Vl=[zl,Bl];function Hl(e){return typeof e==`function`&&/^class\s/.test(Function.prototype.toString.call(e))}function Ul(e){return typeof e==`function`||typeof e==`object`&&!!e}function Wl(e,t){let n=new Set,r=e=>{if(!(!Ul(e)||n.has(e)||t?.(e,n)===!1)){if(n.add(e),Array.isArray(e)){for(let t of e)r(t);return}if(typeof e==`object`){let t=Object.getPrototypeOf(e);t&&t!==Object.prototype&&r(t)}for(let t of Object.values(Object.getOwnPropertyDescriptors(e)))`value`in t&&r(t.value),`get`in t&&r(t.get),`set`in t&&r(t.set)}};return r(e),n}function Gl(){let e=()=>{},t=()=>{};return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}function Kl(e,t,n,r){let i=e.newObject(),a=(t,n)=>{let a=r(t),o=n.value===void 0?void 0:r(n.value),s=n.get===void 0?void 0:r(n.get),c=n.set===void 0?void 0:r(n.set);e.newObject().consume(t=>{Object.entries(n).forEach(([n,r])=>{let i=n===`value`?o:n===`get`?s:n===`set`?c:r?e.true:e.false;i&&e.setProp(t,n,i)}),e.setProp(i,a,t)})},o=Object.getOwnPropertyDescriptors(t);Object.entries(o).forEach(([e,t])=>a(e,t)),Object.getOwnPropertySymbols(o).forEach(e=>a(e,o[e])),kl(e,`Object.defineProperties`,void 0,n,i).dispose(),i.dispose()}function ql(e,t,n,r,i,a){if(typeof t!=`function`)return;let o=e.newFunction(t.name,function(...i){let o=r(this),s=i.map(e=>r(e));if(Hl(t)&&Ul(o)){let r=new t(...s);return Object.entries(r).forEach(([t,r])=>{e.setProp(this,t,n(r))}),this}return n(a?a(t,o,s):t.apply(o,s))}).consume(t=>kl(e,`Cls => {
|
|
176
|
+
const fn = function(...args) { return Cls.apply(this, args); };
|
|
177
|
+
fn.name = Cls.name;
|
|
178
|
+
fn.length = Cls.length;
|
|
179
|
+
return fn;
|
|
180
|
+
}`,void 0,t)),s=i(t,o)??o;return Kl(e,t,o,n),s}function Jl(e,t,n){let r=Nl(e,t);return n(t,r)??r}function Yl(e,t,n,r){if(typeof t!=`object`||!t)return;let i=Array.isArray(t)?e.newArray():e.newObject(),a=r(t,i)??i,o=Object.getPrototypeOf(t),s=o&&o!==Object.prototype&&o!==Array.prototype?n(o):void 0;return s&&kl(e,`Object.setPrototypeOf`,void 0,a,s).dispose(),Kl(e,t,i,n),a}function Xl(e,t){switch(typeof t){case`undefined`:return e.undefined;case`number`:return e.newNumber(t);case`string`:return e.newString(t);case`boolean`:return t?e.true:e.false;case`object`:return t===null?e.null:void 0}}function Zl(e,t,n,r){if(!(t instanceof Promise))return;let i=e.newPromise();return t.then(e=>i.resolve(n(e)),e=>i.reject(n(e))),r(t,i)??i.handle}function Ql(e,t){let{ctx:n,unmarshal:r,isMarshalable:i,find:a,pre:o}=t;{let t=Xl(n,e);if(t)return t}{let t=a(e);if(t)return t}let s=i?.(e);if(s===!1)return n.undefined;let c=(e,t)=>o(e,t,s);if(s===`json`)return Jl(n,e,c);let l=e=>Ql(e,t);return Rl(n,e,c,[...Vl,...t.custom??[]])??Zl(n,e,l,c)??ql(n,e,l,r,c,t.preApply)??Yl(n,e,l,c)??n.undefined}function $l(e,t,n,r){let i;for(let n of r)if(i=n(t,e),i)break;return i?n(i,t)??i:void 0}function eu(e,t){if(t.typeof(e)!==`symbol`)return;let n=t.getString(t.getProp(e,`description`));return Symbol(n)}function tu(e,t){if(!t.dump(kl(t,`a => a instanceof Date`,void 0,e)))return;let n=t.getNumber(kl(t,`a => a.getTime()`,void 0,e));return new Date(n)}var nu=[eu,tu];function ru(e,t,n,r){e.newFunction(``,(t,i)=>{let[a]=r(t);if(typeof a!=`string`&&typeof a!=`number`&&typeof a!=`symbol`)return;let o=[[`value`,!0],[`get`,!0],[`set`,!0],[`configurable`,!1],[`enumerable`,!1],[`writable`,!1]].reduce((t,[n,a])=>{let o=e.getProp(i,n),s=e.typeof(o);if(s===`undefined`)return t;if(!a&&s===`boolean`)return t[n]=e.dump(e.getProp(i,n)),t;let[c,l]=r(o);return l&&o.dispose(),t[n]=c,t},{});Object.defineProperty(n,a,o)}).consume(n=>{kl(e,`(o, fn) => {
|
|
181
|
+
const descs = Object.getOwnPropertyDescriptors(o);
|
|
182
|
+
Object.entries(descs).forEach(([k, v]) => fn(k, v));
|
|
183
|
+
Object.getOwnPropertySymbols(descs).forEach(k => fn(k, descs[k]));
|
|
184
|
+
}`,void 0,t,n).dispose()})}function iu(e,t,n,r,i){if(e.typeof(t)!==`function`)return;let a=function(...i){return Fl([n(this),...i.map(e=>n(e))],(n,...i)=>{if(new.target){let[a]=r(kl(e,`(Cls, ...args) => new Cls(...args)`,n,t,...i));return Object.defineProperties(this,Object.getOwnPropertyDescriptors(a)),this}let a=e.unwrapResult(e.callFunction(t,n,...i)),[o,s]=r(a);return s&&a.dispose(),o})},o=i(a,t)??a;return ru(e,t,a,r),o}function au(e,t,n,r){if(e.typeof(t)!==`object`||e.unwrapResult(e.evalCode(`o => o === null`)).consume(n=>e.dump(e.unwrapResult(e.callFunction(n,e.undefined,t)))))return;let i=kl(e,`Array.isArray`,void 0,t).consume(t=>e.dump(t))?[]:{},a=r(i,t)??i,o=kl(e,`o => {
|
|
185
|
+
const p = Object.getPrototypeOf(o);
|
|
186
|
+
return !p || p === Object.prototype || p === Array.prototype ? undefined : p;
|
|
187
|
+
}`,void 0,t).consume(t=>{if(e.typeof(t)===`undefined`)return;let[r]=n(t);return r});return typeof o==`object`&&Object.setPrototypeOf(a,o),ru(e,t,i,n),a}function ou(e,t){let n=e.typeof(t);return n===`undefined`||n===`number`||n===`string`||n===`boolean`?[e.dump(t),!0]:n===`object`&&e.unwrapResult(e.evalCode(`a => a === null`)).consume(n=>e.dump(e.unwrapResult(e.callFunction(n,e.undefined,t))))?[null,!0]:[void 0,!1]}function su(e,t,n,r){if(!cu(e,t))return;let i=Gl(),[a,o]=n(i.resolve),[s,c]=n(i.reject);return kl(e,`(p, res, rej) => { p.then(res, rej); }`,void 0,t,a,s),o&&a.dispose(),c&&s.dispose(),r(i.promise,t)??i.promise}function cu(e,t){return t.owner?e.unwrapResult(e.evalCode(`Promise`)).consume(n=>t.owner?jl(e,t,n):!1):!1}function lu(e,t){let[n]=uu(e,t);return n}function uu(e,t){let{ctx:n,marshal:r,find:i,pre:a}=t;{let[t,r]=ou(n,e);if(r)return[t,!1]}{let t=i(e);if(t)return[t,!0]}let o=e=>uu(e,t);return[$l(n,e,a,[...nu,...t.custom??[]])??su(n,e,r,a)??iu(n,e,r,o,a)??au(n,e,o,a),!1]}var du=class{constructor(e){F(this,`ctx`),F(this,`_map1`,new Map),F(this,`_map2`,new Map),F(this,`_map3`,new Map),F(this,`_map4`,new Map),F(this,`_counterMap`,new Map),F(this,`_disposables`,new Set),F(this,`_mapGet`),F(this,`_mapSet`),F(this,`_mapDelete`),F(this,`_mapClear`),F(this,`_counter`,-(2**53-1)),this.ctx=e;let t=e.unwrapResult(e.evalCode(`() => {
|
|
188
|
+
const mapSym = new Map();
|
|
189
|
+
let map = new WeakMap();
|
|
190
|
+
let map2 = new WeakMap();
|
|
191
|
+
const isObj = o => typeof o === "object" && o !== null || typeof o === "function";
|
|
192
|
+
return {
|
|
193
|
+
get: key => mapSym.get(key) ?? map.get(key) ?? map2.get(key) ?? -1,
|
|
194
|
+
set: (key, value, key2) => {
|
|
195
|
+
if (typeof key === "symbol") mapSym.set(key, value);
|
|
196
|
+
if (isObj(key)) map.set(key, value);
|
|
197
|
+
if (isObj(key2)) map2.set(key2, value);
|
|
198
|
+
},
|
|
199
|
+
delete: (key, key2) => {
|
|
200
|
+
mapSym.delete(key);
|
|
201
|
+
map.delete(key);
|
|
202
|
+
map2.delete(key2);
|
|
203
|
+
},
|
|
204
|
+
clear: () => {
|
|
205
|
+
mapSym.clear();
|
|
206
|
+
map = new WeakMap();
|
|
207
|
+
map2 = new WeakMap();
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
}`)).consume(e=>this._call(e,void 0));this._mapGet=e.getProp(t,`get`),this._mapSet=e.getProp(t,`set`),this._mapDelete=e.getProp(t,`delete`),this._mapClear=e.getProp(t,`clear`),t.dispose(),this._disposables.add(this._mapGet),this._disposables.add(this._mapSet),this._disposables.add(this._mapDelete),this._disposables.add(this._mapClear)}set(e,t,n,r){if(!t.alive||r&&!r.alive)return!1;let i=this.get(e)??this.get(n);if(i)return i===t||i===r;let a=this._counter++;return this._map1.set(e,a),this._map3.set(a,t),this._counterMap.set(a,e),n&&(this._map2.set(n,a),r&&this._map4.set(a,r)),this.ctx.newNumber(a).consume(e=>{this._call(this._mapSet,void 0,t,e,r??this.ctx.undefined)}),!0}merge(e){if(e)for(let t of e)t&&t[1]&&this.set(t[0],t[1],t[2],t[3])}get(e){let t=this._map1.get(e)??this._map2.get(e),n=typeof t==`number`?this._map3.get(t):void 0;if(n){if(!n.alive){this.delete(e);return}return n}}getByHandle(e){if(e.alive)return this._counterMap.get(this.ctx.getNumber(this._call(this._mapGet,void 0,e)))}has(e){return!!this.get(e)}hasHandle(e){return this.getByHandle(e)!==void 0}keys(){return this._map1.keys()}delete(e,t){let n=this._map1.get(e)??this._map2.get(e);if(n===void 0)return;let r=this._map3.get(n),i=this._map4.get(n);this._call(this._mapDelete,void 0,...[r,i].filter(e=>!!(e!=null&&e.alive))),this._map1.delete(e),this._map2.delete(e),this._map3.delete(n),this._map4.delete(n);for(let[e,t]of this._map1)if(t===n){this._map1.delete(e);break}for(let[e,t]of this._map2)if(t===n){this._map2.delete(e);break}for(let[t,n]of this._counterMap)if(n===e){this._counterMap.delete(t);break}t&&(r!=null&&r.alive&&r.dispose(),i!=null&&i.alive&&i.dispose())}deleteByHandle(e,t){let n=this.getByHandle(e);n!==void 0&&this.delete(n,t)}clear(){this._counter=0,this._map1.clear(),this._map2.clear(),this._map3.clear(),this._map4.clear(),this._counterMap.clear(),this._mapClear.alive&&this._call(this._mapClear,void 0)}dispose(){for(let e of this._disposables.values())e.alive&&e.dispose();for(let e of this._map3.values())e.alive&&e.dispose();for(let e of this._map4.values())e.alive&&e.dispose();this._disposables.clear(),this.clear()}get size(){return this._map1.size}[Symbol.iterator](){let e=this._map1.keys();return{next:()=>{for(;;){let t=e.next();if(t.done)return{value:void 0,done:!0};let n=this._map1.get(t.value);if(n===void 0)continue;let r=this._map3.get(n),i=this._map4.get(n);if(!r)continue;let a=this._get2(n);return{value:[t.value,r,a,i],done:!1}}}}}_get2(e){for(let[t,n]of this._map2)if(n===e)return t}_call(e,t,...n){return this.ctx.unwrapResult(this.ctx.callFunction(e,t===void 0?this.ctx.undefined:t,...n))}};function fu(e,t,n,r,i,a,o){if(!Ul(t)||t instanceof Promise||t instanceof Date||o&&!o(t))return;if(gu(t,n))return t;let s=new Proxy(t,{get(e,t){return t===n?e:Reflect.get(e,t)},set(t,o,s,c){let l=mu(s,n),u=a?.(c)??`host`;return u!==`vm`&&!Reflect.set(t,o,l,c)||u===`host`||!e.alive||Fl([i(c),i(o),i(l)],(t,n,i)=>{let[a,o]=hu(e,t,r);o?a.consume(t=>e.setProp(t,n,i)):e.setProp(a,n,i)}),!0},deleteProperty(t,n){let o=a?.(s)??`host`;return Fl([i(s),i(n)],(i,a)=>{let[s,c]=hu(e,i,r);if(o===`vm`||Reflect.deleteProperty(t,n)){if(o===`host`||!e.alive)return!0;c?s.consume(t=>kl(e,`(a, b) => delete a[b]`,void 0,t,a)):kl(e,`(a, b) => delete a[b]`,void 0,s,a)}return!0})}});return s}function pu(e,t,n,r,i,a,o){if(!Ml(e,t)||o&&!o(t,e))return[void 0,!1];if(_u(e,t,r))return[t,!1];let s=t=>{let n=a?.(i(t));return typeof n==`string`?e.newString(n):e.undefined},c=(e,t,r)=>{let a=i(e);if(!a)return;let o=i(t);if(o===`__proto__`)return;let s=i(r);mu(a,n)[o]=s},l=(e,t)=>{let r=i(e);if(!r)return;let a=i(t);delete mu(r,n)[a]};return e.newFunction(`proxyFuncs`,(t,...n)=>{switch(e.getNumber(t)){case 1:return s(n[0]);case 2:return c(n[0],n[1],n[2]);case 3:return l(n[0],n[1])}return e.undefined}).consume(n=>[kl(e,`(target, sym, proxyFuncs) => {
|
|
211
|
+
const rec = new Proxy(target, {
|
|
212
|
+
get(obj, key, receiver) {
|
|
213
|
+
return key === sym ? obj : Reflect.get(obj, key, receiver)
|
|
214
|
+
},
|
|
215
|
+
set(obj, key, value, receiver) {
|
|
216
|
+
const v = typeof value === "object" && value !== null || typeof value === "function"
|
|
217
|
+
? value[sym] ?? value
|
|
218
|
+
: value;
|
|
219
|
+
const sync = proxyFuncs(1, receiver) ?? "vm";
|
|
220
|
+
if (sync === "host" || Reflect.set(obj, key, v, receiver)) {
|
|
221
|
+
if (sync !== "vm") {
|
|
222
|
+
proxyFuncs(2, receiver, key, v);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
return true;
|
|
226
|
+
},
|
|
227
|
+
deleteProperty(obj, key) {
|
|
228
|
+
const sync = proxyFuncs(1, rec) ?? "vm";
|
|
229
|
+
if (sync === "host" || Reflect.deleteProperty(obj, key)) {
|
|
230
|
+
if (sync !== "vm") {
|
|
231
|
+
proxyFuncs(3, rec, key);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
return true;
|
|
235
|
+
},
|
|
236
|
+
});
|
|
237
|
+
return rec;
|
|
238
|
+
}`,void 0,t,r,n),!0])}function mu(e,t){var n;return Ul(e)&&(n=e[t])!=null?n:e}function hu(e,t,n){return _u(e,t,n)?[e.getProp(t,n),!0]:[t,!1]}function gu(e,t){return Ul(e)&&!!e[t]}function _u(e,t,n){return!!e.dump(kl(e,`(a, s) => (a instanceof Promise) || (a instanceof Date) || (typeof a === "object" && a !== null || typeof a === "function") && !!a[s]`,void 0,t,n))}var vu=class{constructor(e,t){F(this,`context`),F(this,`_map`),F(this,`_registeredMap`),F(this,`_registeredMapDispose`,new Set),F(this,`_sync`,new Set),F(this,`_temporalSync`,new Set),F(this,`_symbol`,Symbol()),F(this,`_symbolHandle`),F(this,`_options`),F(this,`_isMarshalable`,e=>{let t=this._options?.isMarshalable;return(typeof t==`function`?t(this._unwrap(e)):t)??`json`}),F(this,`_marshalFind`,e=>{let t=this._unwrap(e);return this._registeredMap.get(e)??(t===e?void 0:this._registeredMap.get(t))??this._map.get(e)??(t===e?void 0:this._map.get(t))}),F(this,`_marshalPre`,(e,t,n)=>{if(n!==`json`)return this._register(e,Ll(t),this._map)?.[1]}),F(this,`_marshalPreApply`,(e,t,n)=>{let r=Ul(t)?this._unwrap(t):void 0;r&&this._temporalSync.add(r);try{return e.apply(t,n)}finally{r&&this._temporalSync.delete(r)}}),F(this,`_marshal`,e=>{let t=this._registeredMap.get(e);if(t)return[t,!1];let n=Ql(this._wrap(e)??e,{ctx:this.context,unmarshal:this._unmarshal,isMarshalable:this._isMarshalable,find:this._marshalFind,pre:this._marshalPre,preApply:this._marshalPreApply,custom:this._options?.customMarshaller});return[n,!this._map.hasHandle(n)]}),F(this,`_preUnmarshal`,(e,t)=>this._register(e,t,void 0,!0)?.[0]),F(this,`_unmarshalFind`,e=>this._registeredMap.getByHandle(e)??this._map.getByHandle(e)),F(this,`_unmarshal`,e=>{let t=this._registeredMap.getByHandle(e);if(t!==void 0)return t;let[n]=this._wrapHandle(e);return lu(n??e,{ctx:this.context,marshal:this._marshal,find:this._unmarshalFind,pre:this._preUnmarshal,custom:this._options?.customUnmarshaller})}),F(this,`_syncMode`,e=>{let t=this._unwrap(e);return this._sync.has(t)||this._temporalSync.has(t)?`both`:void 0}),F(this,`_unwrapIfNotSynced`,e=>{let t=this._unwrap(e);return t instanceof Promise||!this._sync.has(t)?t:e}),t!=null&&t.compat&&!(`runtime`in e)&&(e.runtime={hasPendingJob:()=>e.hasPendingJob(),executePendingJobs:t=>e.executePendingJobs(t)}),this.context=t!=null&&t.experimentalContextEx?Tl(e):e,this._options=t,this._symbolHandle=e.unwrapResult(e.evalCode(`Symbol()`)),this._map=new du(e),this._registeredMap=new du(e),this.registerAll(t?.registeredObjects??Dl)}dispose(){var e,t;this._map.dispose(),this._registeredMap.dispose(),this._symbolHandle.dispose(),(t=(e=this.context).disposeEx)==null||t.call(e)}evalCode(e){let t=this.context.evalCode(e);return this._unwrapResultAndUnmarshal(t)}evalModule(e,t=`module.js`){let n=this.context.evalCode(e,t,{type:`module`});this._unwrapResultAndUnmarshal(n)}executePendingJobs(e){let t=this.context.runtime.executePendingJobs(e);if(`value`in t)return t.value;throw this._unwrapIfNotSynced(t.error.consume(this._unmarshal))}setMemoryLimit(e){this.context.runtime.setMemoryLimit(e)}setMaxStackSize(e){this.context.runtime.setMaxStackSize(e)}getMemoryUsage(){let e=this.context.runtime.computeMemoryUsage();try{return this.context.dump(e)}finally{e.dispose()}}dumpMemoryUsage(){return this.context.runtime.dumpMemoryUsage()}expose(e){for(let[t,n]of Object.entries(e))Pl(this._marshal(n),e=>{this.context.setProp(this.context.global,t,e)})}sync(e){let t=this._wrap(e);return t===void 0?e:(Wl(t,e=>{let t=this._unwrap(e);this._sync.add(t)}),t)}register(e,t){if(this._registeredMap.has(e))return;let n=typeof t==`string`?this._unwrapResult(this.context.evalCode(t)):t;Al(this.context,n,this.context.undefined)||(typeof t==`string`&&this._registeredMapDispose.add(e),this._registeredMap.set(e,n))}registerAll(e){for(let[t,n]of e)this.register(t,n)}unregister(e,t){this._registeredMap.delete(e,this._registeredMapDispose.has(e)||t),this._registeredMapDispose.delete(e)}unregisterAll(e,t){for(let n of e)this.unregister(n,t)}startSync(e){if(!Ul(e))return;let t=this._unwrap(e);this._sync.add(t)}endSync(e){this._sync.delete(this._unwrap(e))}_unwrapResult(e){if(`value`in e)return e.value;throw this._unwrapIfNotSynced(e.error.consume(this._unmarshal))}_unwrapResultAndUnmarshal(e){if(e)return this._unwrapIfNotSynced(this._unwrapResult(e).consume(this._unmarshal))}_register(e,t,n=this._map,r){if(this._registeredMap.has(e)||this._registeredMap.hasHandle(t))return;let i=this._wrap(e),[a]=this._wrapHandle(t),o=e instanceof Promise;if(!a||!i&&!o)return;o&&(i=e);let s=this._unwrap(e),[c,l]=this._unwrapHandle(t);if(n.set(i,a,s,c))r&&this._sync.add(s);else throw l&&c.dispose(),Error(`already registered`);return[i,a]}_wrap(e){return fu(this.context,e,this._symbol,this._symbolHandle,this._marshal,this._syncMode,this._options?.isWrappable)}_unwrap(e){return mu(e,this._symbol)}_wrapHandle(e){return pu(this.context,e,this._symbol,this._symbolHandle,this._unmarshal,this._syncMode,this._options?.isHandleWrappable)}_unwrapHandle(e){return hu(this.context,e,this._symbolHandle)}},yu={param:(e,t,n=``)=>`<span class="param ${t||``}">${e||n}</span>`},bu={type:`sync`,importFFI:()=>et(()=>import(`./ffi-BuQiTq62.js`).then(e=>e.QuickJSFFI),[]),importModuleLoader:()=>et(()=>import(`./emscripten-module-VHMWRAJ2-DFzKlAfo.js`).then(e=>e.default),__vite__mapDeps([2,3,4]))},xu=class extends Error{constructor(e,t){super(t),this.name=e,this.description=t,this.name=e}},Su=async e=>{let{logger:t}=vl(),n=await yl(e),r=()=>{let e=n.newContext(),r=new vu(e,{isMarshalable:!0});return{run:(e,n)=>{let i={fmt:yu,...n};r.expose(i);let a=`(() => {
|
|
239
|
+
return ${e};
|
|
240
|
+
})()`;try{return r.evalCode(a)}catch(e){throw t().error(`error`,e),t().error(`Final code was`,a),new xu(e.name,e.message)}},dispose:()=>{try{r.dispose()}catch(e){t().error(`Failed to dispose arena`,e)}try{e.dispose()}catch(e){t().error(`Failed to dispose VM`,e)}}}};return{run:(e,n)=>{let i=r();try{return i.run(e,n)}finally{try{i.dispose()}catch(e){t().error(`Failed to dispose context`,e)}}},createContext:r}},Cu=()=>Su(bu),wu=async(e,t=e=>e,n)=>{let{logger:r}=vl(),i=n??await Cu(),a={},o=`createContext`in i?i.createContext():null;for(let[n,s]of Object.entries(e.params))try{let r=(s.value??``).toString();try{a[n]=JSON.parse(r);continue}catch{}let c={steps:e.steps,params:{},variables:e.variables};a[n]=t(o?o.run(r,c):await i.run(r,c))}catch(e){r().error(`error`,e),a[n]=``}return o&&o.dispose(),a},Tu=async(e,t)=>{let n={};for(let r of t){console.log(`variable.value`,r.value);let t=await e.run(r.value,{params:{}});n[r.id]=t}return n},Eu=uc({pluginId:P(),nodeId:P()});N(`action`),dc(oc());var Du=mc([N(`simple`),N(`editor`)]),Ou=uc({type:N(`action`),uid:P(),name:vc(dc(P()),Qs(`A custom name provided by the user`)),disabled:dc(oc()),params:fc(P(),uc({editor:Du,value:hc()})),origin:Eu});N(`condition`),N(`loop`);var ku=uc({type:N(`event`),uid:P(),origin:Eu,params:fc(P(),ic())});N(`comment`);var Au=uc({blocks:ac(gc(`type`,[Ou])),triggers:ac(ku)}),ju=sc(()=>!0);N(`1.0.0`),N(`2.0.0`),N(`3.0.0`);var Mu=mc([uc({version:N(`4.0.0`),type:N(`default`),name:P(),description:P(),canvas:Au,variables:ac(ju)}),uc({version:N(`4.0.0`),type:N(`simple`),name:P(),description:P(),source:uc({type:mc([N(`c3-html`),N(`c3-nwjs`),N(`godot`),N(`html`)]),path:P()}),packaging:uc({enabled:oc()}),publishing:uc({steam:uc({enabled:oc(),appId:dc(P())}),itch:uc({enabled:oc(),project:dc(P())}),poki:uc({enabled:oc(),gameId:dc(P())})})})]);ze([]);var Nu=uc({id:P(),project:P(),lastModified:P(),type:N(`internal`),configName:P()}),Pu=mc([uc({id:P(),project:P(),path:P(),lastModified:P(),type:N(`external`),summary:uc({plugins:ac(P()),name:P(),description:P()})}),Nu,uc({id:P(),project:P(),type:N(`pipelab-cloud`)})]);function Fu(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Iu(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}var Lu=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),Ru=class extends Error{constructor(e,t=`FunctionsError`,n){super(e),this.name=t,this.context=n}},zu=class extends Ru{constructor(e){super(`Failed to send a request to the Edge Function`,`FunctionsFetchError`,e)}},Bu=class extends Ru{constructor(e){super(`Relay Error invoking the Edge Function`,`FunctionsRelayError`,e)}},Vu=class extends Ru{constructor(e){super(`Edge Function returned a non-2xx status code`,`FunctionsHttpError`,e)}},Hu;(function(e){e.Any=`any`,e.ApNortheast1=`ap-northeast-1`,e.ApNortheast2=`ap-northeast-2`,e.ApSouth1=`ap-south-1`,e.ApSoutheast1=`ap-southeast-1`,e.ApSoutheast2=`ap-southeast-2`,e.CaCentral1=`ca-central-1`,e.EuCentral1=`eu-central-1`,e.EuWest1=`eu-west-1`,e.EuWest2=`eu-west-2`,e.EuWest3=`eu-west-3`,e.SaEast1=`sa-east-1`,e.UsEast1=`us-east-1`,e.UsWest1=`us-west-1`,e.UsWest2=`us-west-2`})(Hu||={});var Uu=class{constructor(e,{headers:t={},customFetch:n,region:r=Hu.Any}={}){this.url=e,this.headers=t,this.region=r,this.fetch=Lu(n)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return Iu(this,arguments,void 0,function*(e,t={}){let n,r;try{let{headers:i,method:a,body:o,signal:s,timeout:c}=t,l={},{region:u}=t;u||=this.region;let d=new URL(`${this.url}/${e}`);u&&u!==`any`&&(l[`x-region`]=u,d.searchParams.set(`forceFunctionRegion`,u));let f;o&&(i&&!Object.prototype.hasOwnProperty.call(i,`Content-Type`)||!i)?typeof Blob<`u`&&o instanceof Blob||o instanceof ArrayBuffer?(l[`Content-Type`]=`application/octet-stream`,f=o):typeof o==`string`?(l[`Content-Type`]=`text/plain`,f=o):typeof FormData<`u`&&o instanceof FormData?f=o:(l[`Content-Type`]=`application/json`,f=JSON.stringify(o)):f=o&&typeof o!=`string`&&!(typeof Blob<`u`&&o instanceof Blob)&&!(o instanceof ArrayBuffer)&&!(typeof FormData<`u`&&o instanceof FormData)?JSON.stringify(o):o;let p=s;c&&(r=new AbortController,n=setTimeout(()=>r.abort(),c),s?(p=r.signal,s.addEventListener(`abort`,()=>r.abort())):p=r.signal);let m=yield this.fetch(d.toString(),{method:a||`POST`,headers:Object.assign(Object.assign(Object.assign({},l),this.headers),i),body:f,signal:p}).catch(e=>{throw new zu(e)}),h=m.headers.get(`x-relay-error`);if(h&&h===`true`)throw new Bu(m);if(!m.ok)throw new Vu(m);let g=(m.headers.get(`Content-Type`)??`text/plain`).split(`;`)[0].trim(),_;return _=g===`application/json`?yield m.json():g===`application/octet-stream`||g===`application/pdf`?yield m.blob():g===`text/event-stream`?m:g===`multipart/form-data`?yield m.formData():yield m.text(),{data:_,error:null,response:m}}catch(e){return{data:null,error:e,response:e instanceof Vu||e instanceof Bu?e.context:void 0}}finally{n&&clearTimeout(n)}})}},Wu=class extends Error{constructor(e){super(e.message),this.name=`PostgrestError`,this.details=e.details,this.hint=e.hint,this.code=e.code}},Gu=class{constructor(e){this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=e.shouldThrowOnError??!1,this.signal=e.signal,this.isMaybeSingle=e.isMaybeSingle??!1,this.urlLengthLimit=e.urlLengthLimit??8e3,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}then(e,t){var n=this;this.schema===void 0||([`GET`,`HEAD`].includes(this.method)?this.headers.set(`Accept-Profile`,this.schema):this.headers.set(`Content-Profile`,this.schema)),this.method!==`GET`&&this.method!==`HEAD`&&this.headers.set(`Content-Type`,`application/json`);let r=this.fetch,i=r(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async e=>{let t=null,r=null,i=null,a=e.status,o=e.statusText;if(e.ok){if(n.method!==`HEAD`){let t=await e.text();t===``||(r=n.headers.get(`Accept`)===`text/csv`||n.headers.get(`Accept`)&&n.headers.get(`Accept`)?.includes(`application/vnd.pgrst.plan+text`)?t:JSON.parse(t))}let s=n.headers.get(`Prefer`)?.match(/count=(exact|planned|estimated)/),c=e.headers.get(`content-range`)?.split(`/`);s&&c&&c.length>1&&(i=parseInt(c[1])),n.isMaybeSingle&&n.method===`GET`&&Array.isArray(r)&&(r.length>1?(t={code:`PGRST116`,details:`Results contain ${r.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:`JSON object requested, multiple (or no) rows returned`},r=null,i=null,a=406,o=`Not Acceptable`):r=r.length===1?r[0]:null)}else{var s;let i=await e.text();try{t=JSON.parse(i),Array.isArray(t)&&e.status===404&&(r=[],t=null,a=200,o=`OK`)}catch{e.status===404&&i===``?(a=204,o=`No Content`):t={message:i}}if(t&&n.isMaybeSingle&&!(t==null||(s=t.details)==null)&&s.includes(`0 rows`)&&(t=null,a=200,o=`OK`),t&&n.shouldThrowOnError)throw new Wu(t)}return{error:t,data:r,count:i,status:a,statusText:o}});return this.shouldThrowOnError||(i=i.catch(e=>{let t=``,n=``,r=``,i=e?.cause;if(i){let n=i?.message??``,r=i?.code??``;t=`${e?.name??`FetchError`}: ${e?.message}`,t+=`\n\nCaused by: ${i?.name??`Error`}: ${n}`,r&&(t+=` (${r})`),i?.stack&&(t+=`\n${i.stack}`)}else t=e?.stack??``;let a=this.url.toString().length;return e?.name===`AbortError`||e?.code===`ABORT_ERR`?(r=``,n=`Request was aborted (timeout or manual cancellation)`,a>this.urlLengthLimit&&(n+=`. Note: Your request URL is ${a} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):(i?.name===`HeadersOverflowError`||i?.code===`UND_ERR_HEADERS_OVERFLOW`)&&(r=``,n=`HTTP headers exceeded server limits (typically 16KB)`,a>this.urlLengthLimit&&(n+=`. Your request URL is ${a} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{error:{message:`${e?.name??`FetchError`}: ${e?.message}`,details:t,hint:n,code:r},data:null,count:null,status:0,statusText:``}})),i.then(e,t)}returns(){return this}overrideTypes(){return this}},Ku=class extends Gu{select(e){let t=!1,n=(e??`*`).split(``).map(e=>/\s/.test(e)&&!t?``:(e===`"`&&(t=!t),e)).join(``);return this.url.searchParams.set(`select`,n),this.headers.append(`Prefer`,`return=representation`),this}order(e,{ascending:t=!0,nullsFirst:n,foreignTable:r,referencedTable:i=r}={}){let a=i?`${i}.order`:`order`,o=this.url.searchParams.get(a);return this.url.searchParams.set(a,`${o?`${o},`:``}${e}.${t?`asc`:`desc`}${n===void 0?``:n?`.nullsfirst`:`.nullslast`}`),this}limit(e,{foreignTable:t,referencedTable:n=t}={}){let r=n===void 0?`limit`:`${n}.limit`;return this.url.searchParams.set(r,`${e}`),this}range(e,t,{foreignTable:n,referencedTable:r=n}={}){let i=r===void 0?`offset`:`${r}.offset`,a=r===void 0?`limit`:`${r}.limit`;return this.url.searchParams.set(i,`${e}`),this.url.searchParams.set(a,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set(`Accept`,`application/vnd.pgrst.object+json`),this}maybeSingle(){return this.method===`GET`?this.headers.set(`Accept`,`application/json`):this.headers.set(`Accept`,`application/vnd.pgrst.object+json`),this.isMaybeSingle=!0,this}csv(){return this.headers.set(`Accept`,`text/csv`),this}geojson(){return this.headers.set(`Accept`,`application/geo+json`),this}explain({analyze:e=!1,verbose:t=!1,settings:n=!1,buffers:r=!1,wal:i=!1,format:a=`text`}={}){let o=[e?`analyze`:null,t?`verbose`:null,n?`settings`:null,r?`buffers`:null,i?`wal`:null].filter(Boolean).join(`|`),s=this.headers.get(`Accept`)??`application/json`;return this.headers.set(`Accept`,`application/vnd.pgrst.plan+${a}; for="${s}"; options=${o};`),this}rollback(){return this.headers.append(`Prefer`,`tx=rollback`),this}returns(){return this}maxAffected(e){return this.headers.append(`Prefer`,`handling=strict`),this.headers.append(`Prefer`,`max-affected=${e}`),this}},qu=RegExp(`[,()]`),Ju=class extends Ku{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(`,`)}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(`,`)}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(`,`)}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(`,`)}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){let n=Array.from(new Set(t)).map(e=>typeof e==`string`&&qu.test(e)?`"${e}"`:`${e}`).join(`,`);return this.url.searchParams.append(e,`in.(${n})`),this}notIn(e,t){let n=Array.from(new Set(t)).map(e=>typeof e==`string`&&qu.test(e)?`"${e}"`:`${e}`).join(`,`);return this.url.searchParams.append(e,`not.in.(${n})`),this}contains(e,t){return typeof t==`string`?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(`,`)}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t==`string`?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(`,`)}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t==`string`?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(`,`)}}`),this}textSearch(e,t,{config:n,type:r}={}){let i=``;r===`plain`?i=`pl`:r===`phrase`?i=`ph`:r===`websearch`&&(i=`w`);let a=n===void 0?``:`(${n})`;return this.url.searchParams.append(e,`${i}fts${a}.${t}`),this}match(e){return Object.entries(e).filter(([e,t])=>t!==void 0).forEach(([e,t])=>{this.url.searchParams.append(e,`eq.${t}`)}),this}not(e,t,n){return this.url.searchParams.append(e,`not.${t}.${n}`),this}or(e,{foreignTable:t,referencedTable:n=t}={}){let r=n?`${n}.or`:`or`;return this.url.searchParams.append(r,`(${e})`),this}filter(e,t,n){return this.url.searchParams.append(e,`${t}.${n}`),this}},Yu=class{constructor(e,{headers:t={},schema:n,fetch:r,urlLengthLimit:i=8e3}){this.url=e,this.headers=new Headers(t),this.schema=n,this.fetch=r,this.urlLengthLimit=i}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){let{head:n=!1,count:r}=t??{},i=n?`HEAD`:`GET`,a=!1,o=(e??`*`).split(``).map(e=>/\s/.test(e)&&!a?``:(e===`"`&&(a=!a),e)).join(``),{url:s,headers:c}=this.cloneRequestState();return s.searchParams.set(`select`,o),r&&c.append(`Prefer`,`count=${r}`),new Ju({method:i,url:s,headers:c,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}insert(e,{count:t,defaultToNull:n=!0}={}){let{url:r,headers:i}=this.cloneRequestState();if(t&&i.append(`Prefer`,`count=${t}`),n||i.append(`Prefer`,`missing=default`),Array.isArray(e)){let t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]);if(t.length>0){let e=[...new Set(t)].map(e=>`"${e}"`);r.searchParams.set(`columns`,e.join(`,`))}}return new Ju({method:`POST`,url:r,headers:i,schema:this.schema,body:e,fetch:this.fetch??fetch,urlLengthLimit:this.urlLengthLimit})}upsert(e,{onConflict:t,ignoreDuplicates:n=!1,count:r,defaultToNull:i=!0}={}){let{url:a,headers:o}=this.cloneRequestState();if(o.append(`Prefer`,`resolution=${n?`ignore`:`merge`}-duplicates`),t!==void 0&&a.searchParams.set(`on_conflict`,t),r&&o.append(`Prefer`,`count=${r}`),i||o.append(`Prefer`,`missing=default`),Array.isArray(e)){let t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]);if(t.length>0){let e=[...new Set(t)].map(e=>`"${e}"`);a.searchParams.set(`columns`,e.join(`,`))}}return new Ju({method:`POST`,url:a,headers:o,schema:this.schema,body:e,fetch:this.fetch??fetch,urlLengthLimit:this.urlLengthLimit})}update(e,{count:t}={}){let{url:n,headers:r}=this.cloneRequestState();return t&&r.append(`Prefer`,`count=${t}`),new Ju({method:`PATCH`,url:n,headers:r,schema:this.schema,body:e,fetch:this.fetch??fetch,urlLengthLimit:this.urlLengthLimit})}delete({count:e}={}){let{url:t,headers:n}=this.cloneRequestState();return e&&n.append(`Prefer`,`count=${e}`),new Ju({method:`DELETE`,url:t,headers:n,schema:this.schema,fetch:this.fetch??fetch,urlLengthLimit:this.urlLengthLimit})}};function Xu(e){"@babel/helpers - typeof";return Xu=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Xu(e)}function Zu(e,t){if(Xu(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Xu(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Qu(e){var t=Zu(e,`string`);return Xu(t)==`symbol`?t:t+``}function $u(e,t,n){return(t=Qu(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ed(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function td(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ed(Object(n),!0).forEach(function(t){$u(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ed(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var nd=class e{constructor(e,{headers:t={},schema:n,fetch:r,timeout:i,urlLengthLimit:a=8e3}={}){this.url=e,this.headers=new Headers(t),this.schemaName=n,this.urlLengthLimit=a;let o=r??globalThis.fetch;i!==void 0&&i>0?this.fetch=(e,t)=>{let n=new AbortController,r=setTimeout(()=>n.abort(),i),a=t?.signal;if(a){if(a.aborted)return clearTimeout(r),o(e,t);let i=()=>{clearTimeout(r),n.abort()};return a.addEventListener(`abort`,i,{once:!0}),o(e,td(td({},t),{},{signal:n.signal})).finally(()=>{clearTimeout(r),a.removeEventListener(`abort`,i)})}return o(e,td(td({},t),{},{signal:n.signal})).finally(()=>clearTimeout(r))}:this.fetch=o}from(e){if(!e||typeof e!=`string`||e.trim()===``)throw Error(`Invalid relation name: relation must be a non-empty string.`);return new Yu(new URL(`${this.url}/${e}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}schema(t){return new e(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}rpc(e,t={},{head:n=!1,get:r=!1,count:i}={}){let a,o=new URL(`${this.url}/rpc/${e}`),s,c=e=>typeof e==`object`&&!!e&&(!Array.isArray(e)||e.some(c)),l=n&&Object.values(t).some(c);l?(a=`POST`,s=t):n||r?(a=n?`HEAD`:`GET`,Object.entries(t).filter(([e,t])=>t!==void 0).map(([e,t])=>[e,Array.isArray(t)?`{${t.join(`,`)}}`:`${t}`]).forEach(([e,t])=>{o.searchParams.append(e,t)})):(a=`POST`,s=t);let u=new Headers(this.headers);return l?u.set(`Prefer`,i?`count=${i},return=minimal`:`return=minimal`):i&&u.set(`Prefer`,`count=${i}`),new Ju({method:a,url:o,headers:u,schema:this.schemaName,body:s,fetch:this.fetch??fetch,urlLengthLimit:this.urlLengthLimit})}},rd=class{constructor(){}static detectEnvironment(){if(typeof WebSocket<`u`)return{type:`native`,constructor:WebSocket};if(typeof globalThis<`u`&&globalThis.WebSocket!==void 0)return{type:`native`,constructor:globalThis.WebSocket};if(typeof global<`u`&&global.WebSocket!==void 0)return{type:`native`,constructor:global.WebSocket};if(typeof globalThis<`u`&&globalThis.WebSocketPair!==void 0&&globalThis.WebSocket===void 0)return{type:`cloudflare`,error:`Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.`,workaround:`Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime.`};if(typeof globalThis<`u`&&globalThis.EdgeRuntime||typeof navigator<`u`&&navigator.userAgent?.includes(`Vercel-Edge`))return{type:`unsupported`,error:`Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.`,workaround:`Use serverless functions or a different deployment target for WebSocket functionality.`};let e=globalThis.process;if(e){let t=e.versions;if(t&&t.node){let e=t.node,n=parseInt(e.replace(/^v/,``).split(`.`)[0]);return n>=22?globalThis.WebSocket===void 0?{type:`unsupported`,error:`Node.js ${n} detected but native WebSocket not found.`,workaround:`Provide a WebSocket implementation via the transport option.`}:{type:`native`,constructor:globalThis.WebSocket}:{type:`unsupported`,error:`Node.js ${n} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
|
|
241
|
+
import ws from "ws"
|
|
242
|
+
new RealtimeClient(url, { transport: ws })`}}}return{type:`unsupported`,error:`Unknown JavaScript runtime without WebSocket support.`,workaround:`Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation.`}}static getWebSocketConstructor(){let e=this.detectEnvironment();if(e.constructor)return e.constructor;let t=e.error||`WebSocket not supported in this environment.`;throw e.workaround&&(t+=`\n\nSuggested solution: ${e.workaround}`),Error(t)}static createWebSocket(e,t){return new(this.getWebSocketConstructor())(e,t)}static isWebSocketSupported(){try{let e=this.detectEnvironment();return e.type===`native`||e.type===`ws`}catch{return!1}}},id=`realtime-js/2.99.3`,ad=`1.0.0`,od=`2.0.0`,sd=od,cd=1e4,ld;(function(e){e[e.connecting=0]=`connecting`,e[e.open=1]=`open`,e[e.closing=2]=`closing`,e[e.closed=3]=`closed`})(ld||={});var ud;(function(e){e.closed=`closed`,e.errored=`errored`,e.joined=`joined`,e.joining=`joining`,e.leaving=`leaving`})(ud||={});var dd;(function(e){e.close=`phx_close`,e.error=`phx_error`,e.join=`phx_join`,e.reply=`phx_reply`,e.leave=`phx_leave`,e.access_token=`access_token`})(dd||={});var fd;(function(e){e.websocket=`websocket`})(fd||={});var pd;(function(e){e.Connecting=`connecting`,e.Open=`open`,e.Closing=`closing`,e.Closed=`closed`})(pd||={});var md=class{constructor(e){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT=`broadcast`,this.allowedMetadataKeys=[],this.allowedMetadataKeys=e??[]}encode(e,t){if(e.event===this.BROADCAST_EVENT&&!(e.payload instanceof ArrayBuffer)&&typeof e.payload.event==`string`)return t(this._binaryEncodeUserBroadcastPush(e));let n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(e){return this._isArrayBuffer(e.payload?.payload)?this._encodeBinaryUserBroadcastPush(e):this._encodeJsonUserBroadcastPush(e)}_encodeBinaryUserBroadcastPush(e){let t=e.payload?.payload??new ArrayBuffer(0);return this._encodeUserBroadcastPush(e,this.BINARY_ENCODING,t)}_encodeJsonUserBroadcastPush(e){let t=e.payload?.payload??{},n=new TextEncoder().encode(JSON.stringify(t)).buffer;return this._encodeUserBroadcastPush(e,this.JSON_ENCODING,n)}_encodeUserBroadcastPush(e,t,n){let r=e.topic,i=e.ref??``,a=e.join_ref??``,o=e.payload.event,s=this.allowedMetadataKeys?this._pick(e.payload,this.allowedMetadataKeys):{},c=Object.keys(s).length===0?``:JSON.stringify(s);if(a.length>255)throw Error(`joinRef length ${a.length} exceeds maximum of 255`);if(i.length>255)throw Error(`ref length ${i.length} exceeds maximum of 255`);if(r.length>255)throw Error(`topic length ${r.length} exceeds maximum of 255`);if(o.length>255)throw Error(`userEvent length ${o.length} exceeds maximum of 255`);if(c.length>255)throw Error(`metadata length ${c.length} exceeds maximum of 255`);let l=this.USER_BROADCAST_PUSH_META_LENGTH+a.length+i.length+r.length+o.length+c.length,u=new ArrayBuffer(this.HEADER_LENGTH+l),d=new DataView(u),f=0;d.setUint8(f++,this.KINDS.userBroadcastPush),d.setUint8(f++,a.length),d.setUint8(f++,i.length),d.setUint8(f++,r.length),d.setUint8(f++,o.length),d.setUint8(f++,c.length),d.setUint8(f++,t),Array.from(a,e=>d.setUint8(f++,e.charCodeAt(0))),Array.from(i,e=>d.setUint8(f++,e.charCodeAt(0))),Array.from(r,e=>d.setUint8(f++,e.charCodeAt(0))),Array.from(o,e=>d.setUint8(f++,e.charCodeAt(0))),Array.from(c,e=>d.setUint8(f++,e.charCodeAt(0)));var p=new Uint8Array(u.byteLength+n.byteLength);return p.set(new Uint8Array(u),0),p.set(new Uint8Array(n),u.byteLength),p.buffer}decode(e,t){if(this._isArrayBuffer(e))return t(this._binaryDecode(e));if(typeof e==`string`){let[n,r,i,a,o]=JSON.parse(e);return t({join_ref:n,ref:r,topic:i,event:a,payload:o})}return t({})}_binaryDecode(e){let t=new DataView(e),n=t.getUint8(0),r=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(e,t,r)}}_decodeUserBroadcast(e,t,n){let r=t.getUint8(1),i=t.getUint8(2),a=t.getUint8(3),o=t.getUint8(4),s=this.HEADER_LENGTH+4,c=n.decode(e.slice(s,s+r));s+=r;let l=n.decode(e.slice(s,s+i));s+=i;let u=n.decode(e.slice(s,s+a));s+=a;let d=e.slice(s,e.byteLength),f=o===this.JSON_ENCODING?JSON.parse(n.decode(d)):d,p={type:this.BROADCAST_EVENT,event:l,payload:f};return a>0&&(p.meta=JSON.parse(u)),{join_ref:null,ref:null,topic:c,event:this.BROADCAST_EVENT,payload:p}}_isArrayBuffer(e){return e instanceof ArrayBuffer||e?.constructor?.name===`ArrayBuffer`}_pick(e,t){return!e||typeof e!=`object`?{}:Object.fromEntries(Object.entries(e).filter(([e])=>t.includes(e)))}},hd=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0,this.callback=e,this.timerCalc=t}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries+=1,this.callback()},this.timerCalc(this.tries+1))}},gd;(function(e){e.abstime=`abstime`,e.bool=`bool`,e.date=`date`,e.daterange=`daterange`,e.float4=`float4`,e.float8=`float8`,e.int2=`int2`,e.int4=`int4`,e.int4range=`int4range`,e.int8=`int8`,e.int8range=`int8range`,e.json=`json`,e.jsonb=`jsonb`,e.money=`money`,e.numeric=`numeric`,e.oid=`oid`,e.reltime=`reltime`,e.text=`text`,e.time=`time`,e.timestamp=`timestamp`,e.timestamptz=`timestamptz`,e.timetz=`timetz`,e.tsrange=`tsrange`,e.tstzrange=`tstzrange`})(gd||={});var _d=(e,t,n={})=>{let r=n.skipTypes??[];return t?Object.keys(t).reduce((n,i)=>(n[i]=vd(i,e,t,r),n),{}):{}},vd=(e,t,n,r)=>{let i=t.find(t=>t.name===e)?.type,a=n[e];return i&&!r.includes(i)?yd(i,a):bd(a)},yd=(e,t)=>{if(e.charAt(0)===`_`)return wd(t,e.slice(1,e.length));switch(e){case gd.bool:return xd(t);case gd.float4:case gd.float8:case gd.int2:case gd.int4:case gd.int8:case gd.numeric:case gd.oid:return Sd(t);case gd.json:case gd.jsonb:return Cd(t);case gd.timestamp:return Td(t);case gd.abstime:case gd.date:case gd.daterange:case gd.int4range:case gd.int8range:case gd.money:case gd.reltime:case gd.text:case gd.time:case gd.timestamptz:case gd.timetz:case gd.tsrange:case gd.tstzrange:return bd(t);default:return bd(t)}},bd=e=>e,xd=e=>{switch(e){case`t`:return!0;case`f`:return!1;default:return e}},Sd=e=>{if(typeof e==`string`){let t=parseFloat(e);if(!Number.isNaN(t))return t}return e},Cd=e=>{if(typeof e==`string`)try{return JSON.parse(e)}catch{return e}return e},wd=(e,t)=>{if(typeof e!=`string`)return e;let n=e.length-1,r=e[n];if(e[0]===`{`&&r===`}`){let r,i=e.slice(1,n);try{r=JSON.parse(`[`+i+`]`)}catch{r=i?i.split(`,`):[]}return r.map(e=>yd(t,e))}return e},Td=e=>typeof e==`string`?e.replace(` `,`T`):e,Ed=e=>{let t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,`http`),t.pathname=t.pathname.replace(/\/+$/,``).replace(/\/socket\/websocket$/i,``).replace(/\/socket$/i,``).replace(/\/websocket$/i,``),t.pathname===``||t.pathname===`/`?t.pathname=`/api/broadcast`:t.pathname+=`/api/broadcast`,t.href},Dd=class{constructor(e,t,n={},r=cd){this.channel=e,this.event=t,this.payload=n,this.timeout=r,this.sent=!1,this.timeoutTimer=void 0,this.ref=``,this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(e){this.timeout=e,this._cancelRefEvent(),this.ref=``,this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived(`timeout`)||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(e){this.payload=Object.assign(Object.assign({},this.payload),e)}receive(e,t){return this._hasReceived(e)&&t(this.receivedResp?.response),this.recHooks.push({status:e,callback:t}),this}startTimeout(){this.timeoutTimer||=(this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref),this.channel._on(this.refEvent,{},e=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=e,this._matchReceive(e)}),setTimeout(()=>{this.trigger(`timeout`,{})},this.timeout))}trigger(e,t){this.refEvent&&this.channel._trigger(this.refEvent,{status:e,response:t})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:e,response:t}){this.recHooks.filter(t=>t.status===e).forEach(e=>e.callback(t))}_hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}},Od;(function(e){e.SYNC=`sync`,e.JOIN=`join`,e.LEAVE=`leave`})(Od||={});var kd=class e{constructor(t,n){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};let r=n?.events||{state:`presence_state`,diff:`presence_diff`};this.channel._on(r.state,{},t=>{let{onJoin:n,onLeave:r,onSync:i}=this.caller;this.joinRef=this.channel._joinRef(),this.state=e.syncState(this.state,t,n,r),this.pendingDiffs.forEach(t=>{this.state=e.syncDiff(this.state,t,n,r)}),this.pendingDiffs=[],i()}),this.channel._on(r.diff,{},t=>{let{onJoin:n,onLeave:r,onSync:i}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(t):(this.state=e.syncDiff(this.state,t,n,r),i())}),this.onJoin((e,t,n)=>{this.channel._trigger(`presence`,{event:`join`,key:e,currentPresences:t,newPresences:n})}),this.onLeave((e,t,n)=>{this.channel._trigger(`presence`,{event:`leave`,key:e,currentPresences:t,leftPresences:n})}),this.onSync(()=>{this.channel._trigger(`presence`,{event:`sync`})})}static syncState(e,t,n,r){let i=this.cloneDeep(e),a=this.transformState(t),o={},s={};return this.map(i,(e,t)=>{a[e]||(s[e]=t)}),this.map(a,(e,t)=>{let n=i[e];if(n){let r=t.map(e=>e.presence_ref),i=n.map(e=>e.presence_ref),a=t.filter(e=>i.indexOf(e.presence_ref)<0),c=n.filter(e=>r.indexOf(e.presence_ref)<0);a.length>0&&(o[e]=a),c.length>0&&(s[e]=c)}else o[e]=t}),this.syncDiff(i,{joins:o,leaves:s},n,r)}static syncDiff(e,t,n,r){let{joins:i,leaves:a}={joins:this.transformState(t.joins),leaves:this.transformState(t.leaves)};return n||=()=>{},r||=()=>{},this.map(i,(t,r)=>{let i=e[t]??[];if(e[t]=this.cloneDeep(r),i.length>0){let n=e[t].map(e=>e.presence_ref),r=i.filter(e=>n.indexOf(e.presence_ref)<0);e[t].unshift(...r)}n(t,i,r)}),this.map(a,(t,n)=>{let i=e[t];if(!i)return;let a=n.map(e=>e.presence_ref);i=i.filter(e=>a.indexOf(e.presence_ref)<0),e[t]=i,r(t,i,n),i.length===0&&delete e[t]}),e}static map(e,t){return Object.getOwnPropertyNames(e).map(n=>t(n,e[n]))}static transformState(e){return e=this.cloneDeep(e),Object.getOwnPropertyNames(e).reduce((t,n)=>{let r=e[n];return`metas`in r?t[n]=r.metas.map(e=>(e.presence_ref=e.phx_ref,delete e.phx_ref,delete e.phx_ref_prev,e)):t[n]=r,t},{})}static cloneDeep(e){return JSON.parse(JSON.stringify(e))}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}},Ad;(function(e){e.ALL=`*`,e.INSERT=`INSERT`,e.UPDATE=`UPDATE`,e.DELETE=`DELETE`})(Ad||={});var jd;(function(e){e.BROADCAST=`broadcast`,e.PRESENCE=`presence`,e.POSTGRES_CHANGES=`postgres_changes`,e.SYSTEM=`system`})(jd||={});var Md;(function(e){e.SUBSCRIBED=`SUBSCRIBED`,e.TIMED_OUT=`TIMED_OUT`,e.CLOSED=`CLOSED`,e.CHANNEL_ERROR=`CHANNEL_ERROR`})(Md||={});var Nd=class e{constructor(e,t={config:{}},n){if(this.topic=e,this.params=t,this.socket=n,this.bindings={},this.state=ud.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=e.replace(/^realtime:/i,``),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:``,enabled:!1},private:!1},t.config),this.timeout=this.socket.timeout,this.joinPush=new Dd(this,dd.join,this.params,this.timeout),this.rejoinTimer=new hd(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive(`ok`,()=>{this.state=ud.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(e=>e.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log(`channel`,`close ${this.topic} ${this._joinRef()}`),this.state=ud.closed,this.socket._remove(this)}),this._onError(e=>{this._isLeaving()||this._isClosed()||(this.socket.log(`channel`,`error ${this.topic}`,e),this.state=ud.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive(`timeout`,()=>{this._isJoining()&&(this.socket.log(`channel`,`timeout ${this.topic}`,this.joinPush.timeout),this.state=ud.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive(`error`,e=>{this._isLeaving()||this._isClosed()||(this.socket.log(`channel`,`error ${this.topic}`,e),this.state=ud.errored,this.rejoinTimer.scheduleTimeout())}),this._on(dd.reply,{},(e,t)=>{this._trigger(this._replyEventName(t),e)}),this.presence=new kd(this),this.broadcastEndpointURL=Ed(this.socket.endPoint),this.private=this.params.config.private||!1,!this.private&&this.params.config?.broadcast?.replay)throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(t,n=this.timeout){if(this.socket.isConnected()||this.socket.connect(),this.state==ud.closed){let{config:{broadcast:r,presence:i,private:a}}=this.params,o=this.bindings.postgres_changes?.map(e=>e.filter)??[],s=!!this.bindings[jd.PRESENCE]&&this.bindings[jd.PRESENCE].length>0||this.params.config.presence?.enabled===!0,c={},l={broadcast:r,presence:Object.assign(Object.assign({},i),{enabled:s}),postgres_changes:o,private:a};this.socket.accessTokenValue&&(c.access_token=this.socket.accessTokenValue),this._onError(e=>t?.(Md.CHANNEL_ERROR,e)),this._onClose(()=>t?.(Md.CLOSED)),this.updateJoinPayload(Object.assign({config:l},c)),this.joinedOnce=!0,this._rejoin(n),this.joinPush.receive(`ok`,async({postgres_changes:n})=>{if(this.socket._isManualToken()||this.socket.setAuth(),n===void 0){t?.(Md.SUBSCRIBED);return}else{let r=this.bindings.postgres_changes,i=r?.length??0,a=[];for(let o=0;o<i;o++){let i=r[o],{filter:{event:s,schema:c,table:l,filter:u}}=i,d=n&&n[o];if(d&&d.event===s&&e.isFilterValueEqual(d.schema,c)&&e.isFilterValueEqual(d.table,l)&&e.isFilterValueEqual(d.filter,u))a.push(Object.assign(Object.assign({},i),{id:d.id}));else{this.unsubscribe(),this.state=ud.errored,t?.(Md.CHANNEL_ERROR,Error(`mismatch between server and client bindings for postgres changes`));return}}this.bindings.postgres_changes=a,t&&t(Md.SUBSCRIBED);return}}).receive(`error`,e=>{this.state=ud.errored,t?.(Md.CHANNEL_ERROR,Error(JSON.stringify(Object.values(e).join(`, `)||`error`)))}).receive(`timeout`,()=>{t?.(Md.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(e,t={}){return await this.send({type:`presence`,event:`track`,payload:e},t.timeout||this.timeout)}async untrack(e={}){return await this.send({type:`presence`,event:`untrack`},e)}on(e,t,n){return this.state===ud.joined&&e===jd.PRESENCE&&(this.socket.log(`channel`,`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(async()=>await this.subscribe())),this._on(e,t,n)}async httpSend(e,t,n={}){if(t==null)return Promise.reject(`Payload is required for httpSend()`);let r={apikey:this.socket.apiKey?this.socket.apiKey:``,"Content-Type":`application/json`};this.socket.accessTokenValue&&(r.Authorization=`Bearer ${this.socket.accessTokenValue}`);let i={method:`POST`,headers:r,body:JSON.stringify({messages:[{topic:this.subTopic,event:e,payload:t,private:this.private}]})},a=await this._fetchWithTimeout(this.broadcastEndpointURL,i,n.timeout??this.timeout);if(a.status===202)return{success:!0};let o=a.statusText;try{let e=await a.json();o=e.error||e.message||o}catch{}return Promise.reject(Error(o))}async send(e,t={}){if(!this._canPush()&&e.type===`broadcast`){console.warn(`Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.`);let{event:n,payload:r}=e,i={apikey:this.socket.apiKey?this.socket.apiKey:``,"Content-Type":`application/json`};this.socket.accessTokenValue&&(i.Authorization=`Bearer ${this.socket.accessTokenValue}`);let a={method:`POST`,headers:i,body:JSON.stringify({messages:[{topic:this.subTopic,event:n,payload:r,private:this.private}]})};try{let e=await this._fetchWithTimeout(this.broadcastEndpointURL,a,t.timeout??this.timeout);return await e.body?.cancel(),e.ok?`ok`:`error`}catch(e){return e.name===`AbortError`?`timed out`:`error`}}else return new Promise(n=>{let r=this._push(e.type,e,t.timeout||this.timeout);e.type===`broadcast`&&!this.params?.config?.broadcast?.ack&&n(`ok`),r.receive(`ok`,()=>n(`ok`)),r.receive(`error`,()=>n(`error`)),r.receive(`timeout`,()=>n(`timed out`))})}updateJoinPayload(e){this.joinPush.updatePayload(e)}unsubscribe(e=this.timeout){this.state=ud.leaving;let t=()=>{this.socket.log(`channel`,`leave ${this.topic}`),this._trigger(dd.close,`leave`,this._joinRef())};this.joinPush.destroy();let n=null;return new Promise(r=>{n=new Dd(this,dd.leave,{},e),n.receive(`ok`,()=>{t(),r(`ok`)}).receive(`timeout`,()=>{t(),r(`timed out`)}).receive(`error`,()=>{r(`error`)}),n.send(),this._canPush()||n.trigger(`ok`,{})}).finally(()=>{n?.destroy()})}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=ud.closed,this.bindings={}}async _fetchWithTimeout(e,t,n){let r=new AbortController,i=setTimeout(()=>r.abort(),n),a=await this.socket.fetch(e,Object.assign(Object.assign({},t),{signal:r.signal}));return clearTimeout(i),a}_push(e,t,n=this.timeout){if(!this.joinedOnce)throw`tried to push '${e}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let r=new Dd(this,e,t,n);return this._canPush()?r.send():this._addToPushBuffer(r),r}_addToPushBuffer(e){if(e.startTimeout(),this.pushBuffer.push(e),this.pushBuffer.length>100){let e=this.pushBuffer.shift();e&&(e.destroy(),this.socket.log(`channel`,`discarded push due to buffer overflow: ${e.event}`,e.payload))}}_onMessage(e,t,n){return t}_isMember(e){return this.topic===e}_joinRef(){return this.joinPush.ref}_trigger(e,t,n){var r,i;let a=e.toLocaleLowerCase(),{close:o,error:s,leave:c,join:l}=dd;if(n&&[o,s,c,l].indexOf(a)>=0&&n!==this._joinRef())return;let u=this._onMessage(a,t,n);if(t&&!u)throw`channel onMessage callbacks must return the payload, modified or unmodified`;[`insert`,`update`,`delete`].includes(a)?(r=this.bindings.postgres_changes)==null||r.filter(e=>e.filter?.event===`*`||(e.filter?.event)?.toLocaleLowerCase()===a).map(e=>e.callback(u,n)):(i=this.bindings[a])==null||i.filter(e=>{if([`broadcast`,`presence`,`postgres_changes`].includes(a))if(`id`in e){let n=e.id,r=e.filter?.event;return n&&t.ids?.includes(n)&&(r===`*`||r?.toLocaleLowerCase()===t.data?.type.toLocaleLowerCase())}else{let n=(e?.filter?.event)?.toLocaleLowerCase();return n===`*`||n===(t?.event)?.toLocaleLowerCase()}else return e.type.toLocaleLowerCase()===a}).map(e=>{if(typeof u==`object`&&`ids`in u){let e=u.data,{schema:t,table:n,commit_timestamp:r,type:i,errors:a}=e;u=Object.assign(Object.assign({},{schema:t,table:n,commit_timestamp:r,eventType:i,new:{},old:{},errors:a}),this._getPayloadRecords(e))}e.callback(u,n)})}_isClosed(){return this.state===ud.closed}_isJoined(){return this.state===ud.joined}_isJoining(){return this.state===ud.joining}_isLeaving(){return this.state===ud.leaving}_replyEventName(e){return`chan_reply_${e}`}_on(e,t,n){let r=e.toLocaleLowerCase(),i={type:r,filter:t,callback:n};return this.bindings[r]?this.bindings[r].push(i):this.bindings[r]=[i],this}_off(t,n){let r=t.toLocaleLowerCase();return this.bindings[r]&&(this.bindings[r]=this.bindings[r].filter(t=>!(t.type?.toLocaleLowerCase()===r&&e.isEqual(t.filter,n)))),this}static isEqual(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}static isFilterValueEqual(e,t){return(e??void 0)===(t??void 0)}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(e){this._on(dd.close,{},e)}_onError(e){this._on(dd.error,{},t=>e(t))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(e=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=ud.joining,this.joinPush.resend(e))}_getPayloadRecords(e){let t={new:{},old:{}};return(e.type===`INSERT`||e.type===`UPDATE`)&&(t.new=_d(e.columns,e.record)),(e.type===`UPDATE`||e.type===`DELETE`)&&(t.old=_d(e.columns,e.old_record)),t}},Pd=()=>{},Fd={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},Id=[1e3,2e3,5e3,1e4],Ld=1e4,Rd=`
|
|
243
|
+
addEventListener("message", (e) => {
|
|
244
|
+
if (e.data.event === "start") {
|
|
245
|
+
setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
|
|
246
|
+
}
|
|
247
|
+
});`,zd=class{constructor(e,t){if(this.accessTokenValue=null,this.apiKey=null,this._manuallySetToken=!1,this.channels=[],this.endPoint=``,this.httpEndpoint=``,this.headers={},this.params={},this.timeout=cd,this.transport=null,this.heartbeatIntervalMs=Fd.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=Pd,this.ref=0,this.reconnectTimer=null,this.vsn=sd,this.logger=Pd,this.conn=null,this.sendBuffer=[],this.serializer=new md,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState=`disconnected`,this._wasManualDisconnect=!1,this._authPromise=null,this._heartbeatSentAt=null,this._resolveFetch=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),!t?.params?.apikey)throw Error(`API key is required to connect to Realtime`);this.apiKey=t.params.apikey,this.endPoint=`${e}/${fd.websocket}`,this.httpEndpoint=Ed(e),this._initializeOptions(t),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(t?.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState(`connecting`),this.accessToken&&!this._authPromise&&this._setAuthSafely(`connect`),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=rd.createWebSocket(this.endpointURL())}catch(e){this._setConnectionState(`disconnected`);let t=e.message;throw t.includes(`Node.js`)?Error(`${t}\n\nTo use Realtime in Node.js, you need to provide a WebSocket implementation:
|
|
248
|
+
|
|
249
|
+
Option 1: Use Node.js 22+ which has native WebSocket support
|
|
250
|
+
Option 2: Install and provide the "ws" package:
|
|
251
|
+
|
|
252
|
+
npm install ws
|
|
253
|
+
|
|
254
|
+
import ws from "ws"
|
|
255
|
+
const client = new RealtimeClient(url, {
|
|
256
|
+
...options,
|
|
257
|
+
transport: ws
|
|
258
|
+
})`):Error(`WebSocket not available: ${t}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:this.vsn}))}disconnect(e,t){if(!this.isDisconnecting())if(this._setConnectionState(`disconnecting`,!0),this.conn){let n=setTimeout(()=>{this._setConnectionState(`disconnected`)},100);this.conn.onclose=()=>{clearTimeout(n),this._setConnectionState(`disconnected`)},typeof this.conn.close==`function`&&(e?this.conn.close(e,t??``):this.conn.close()),this._teardownConnection()}else this._setConnectionState(`disconnected`)}getChannels(){return this.channels}async removeChannel(e){let t=await e.unsubscribe();return this.channels.length===0&&this.disconnect(),t}async removeAllChannels(){let e=await Promise.all(this.channels.map(e=>e.unsubscribe()));return this.channels=[],this.disconnect(),e}log(e,t,n){this.logger(e,t,n)}connectionState(){switch(this.conn&&this.conn.readyState){case ld.connecting:return pd.Connecting;case ld.open:return pd.Open;case ld.closing:return pd.Closing;default:return pd.Closed}}isConnected(){return this.connectionState()===pd.Open}isConnecting(){return this._connectionState===`connecting`}isDisconnecting(){return this._connectionState===`disconnecting`}channel(e,t={config:{}}){let n=`realtime:${e}`,r=this.getChannels().find(e=>e.topic===n);if(r)return r;{let n=new Nd(`realtime:${e}`,t,this);return this.channels.push(n),n}}push(e){let{topic:t,event:n,payload:r,ref:i}=e,a=()=>{this.encode(e,e=>{var t;(t=this.conn)==null||t.send(e)})};this.log(`push`,`${t} ${n} (${i})`,r),this.isConnected()?a():this.sendBuffer.push(a)}async setAuth(e=null){this._authPromise=this._performAuth(e);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){var e;if(!this.isConnected()){try{this.heartbeatCallback(`disconnected`)}catch(e){this.log(`error`,`error in heartbeat callback`,e)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this._heartbeatSentAt=null,this.log(`transport`,`heartbeat timeout. Attempting to re-establish connection`);try{this.heartbeatCallback(`timeout`)}catch(e){this.log(`error`,`error in heartbeat callback`,e)}this._wasManualDisconnect=!1,(e=this.conn)==null||e.close(1e3,`heartbeat timeout`),setTimeout(()=>{var e;this.isConnected()||(e=this.reconnectTimer)==null||e.scheduleTimeout()},Fd.HEARTBEAT_TIMEOUT_FALLBACK);return}this._heartbeatSentAt=Date.now(),this.pendingHeartbeatRef=this._makeRef(),this.push({topic:`phoenix`,event:`heartbeat`,payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback(`sent`)}catch(e){this.log(`error`,`error in heartbeat callback`,e)}this._setAuthSafely(`heartbeat`)}onHeartbeat(e){this.heartbeatCallback=e}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}_makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}_leaveOpenTopic(e){let t=this.channels.find(t=>t.topic===e&&(t._isJoined()||t._isJoining()));t&&(this.log(`transport`,`leaving duplicate topic "${e}"`),t.unsubscribe())}_remove(e){this.channels=this.channels.filter(t=>t.topic!==e.topic)}_onConnMessage(e){this.decode(e.data,e=>{if(e.topic===`phoenix`&&e.event===`phx_reply`&&e.ref&&e.ref===this.pendingHeartbeatRef){let t=this._heartbeatSentAt?Date.now()-this._heartbeatSentAt:void 0;try{this.heartbeatCallback(e.payload.status===`ok`?`ok`:`error`,t)}catch(e){this.log(`error`,`error in heartbeat callback`,e)}this._heartbeatSentAt=null,this.pendingHeartbeatRef=null}let{topic:t,event:n,payload:r,ref:i}=e,a=i?`(${i})`:``,o=r.status||``;this.log(`receive`,`${o} ${t} ${n} ${a}`.trim(),r),this.channels.filter(e=>e._isMember(t)).forEach(e=>e._trigger(n,r,i)),this._triggerStateCallbacks(`message`,e)})}_clearTimer(e){var t;e===`heartbeat`&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):e===`reconnect`&&((t=this.reconnectTimer)==null||t.reset())}_clearAllTimers(){this._clearTimer(`heartbeat`),this._clearTimer(`reconnect`)}_setupConnectionHandlers(){this.conn&&(`binaryType`in this.conn&&(this.conn.binaryType=`arraybuffer`),this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=e=>this._onConnError(e),this.conn.onmessage=e=>this._onConnMessage(e),this.conn.onclose=e=>this._onConnClose(e),this.conn.readyState===ld.open&&this._onConnOpen())}_teardownConnection(){if(this.conn){if(this.conn.readyState===ld.open||this.conn.readyState===ld.connecting)try{this.conn.close()}catch(e){this.log(`error`,`Error closing connection`,e)}this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null}this._clearAllTimers(),this._terminateWorker(),this.channels.forEach(e=>e.teardown())}_onConnOpen(){this._setConnectionState(`connected`),this.log(`transport`,`connected to ${this.endpointURL()}`),(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).then(()=>{this.accessTokenValue&&(this.channels.forEach(e=>{e.updateJoinPayload({access_token:this.accessTokenValue})}),this.sendBuffer=[],this.channels.forEach(e=>{e._isJoining()&&(e.joinPush.sent=!1,e.joinPush.send())})),this.flushSendBuffer()}).catch(e=>{this.log(`error`,`error waiting for auth on connect`,e),this.flushSendBuffer()}),this._clearTimer(`reconnect`),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks(`open`)}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log(`worker`,`starting worker for from ${this.workerUrl}`):this.log(`worker`,`starting default worker`);let e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=e=>{this.log(`worker`,`worker error`,e.message),this._terminateWorker()},this.workerRef.onmessage=e=>{e.data.event===`keepAlive`&&this.sendHeartbeat()},this.workerRef.postMessage({event:`start`,interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&=(this.log(`worker`,`terminating worker`),this.workerRef.terminate(),void 0)}_onConnClose(e){var t;this._setConnectionState(`disconnected`),this.log(`transport`,`close`,e),this._triggerChanError(),this._clearTimer(`heartbeat`),this._wasManualDisconnect||(t=this.reconnectTimer)==null||t.scheduleTimeout(),this._triggerStateCallbacks(`close`,e)}_onConnError(e){this._setConnectionState(`disconnected`),this.log(`transport`,`${e}`),this._triggerChanError(),this._triggerStateCallbacks(`error`,e);try{this.heartbeatCallback(`error`)}catch(e){this.log(`error`,`error in heartbeat callback`,e)}}_triggerChanError(){this.channels.forEach(e=>e._trigger(dd.error))}_appendParams(e,t){return Object.keys(t).length===0?e:`${e}${e.match(/\?/)?`&`:`?`}${new URLSearchParams(t)}`}_workerObjectUrl(e){let t;if(e)t=e;else{let e=new Blob([Rd],{type:`application/javascript`});t=URL.createObjectURL(e)}return t}_setConnectionState(e,t=!1){this._connectionState=e,e===`connecting`?this._wasManualDisconnect=!1:e===`disconnecting`&&(this._wasManualDisconnect=t)}async _performAuth(e=null){let t,n=!1;if(e)t=e,n=!0;else if(this.accessToken)try{t=await this.accessToken()}catch(e){this.log(`error`,`Error fetching access token from callback`,e),t=this.accessTokenValue}else t=this.accessTokenValue;n?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=t&&(this.accessTokenValue=t,this.channels.forEach(e=>{let n={access_token:t,version:id};t&&e.updateJoinPayload(n),e.joinedOnce&&e._isJoined()&&e._push(dd.access_token,{access_token:t})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e=`general`){this._isManualToken()||this.setAuth().catch(t=>{this.log(`error`,`Error setting auth in ${e}`,t)})}_triggerStateCallbacks(e,t){try{this.stateChangeCallbacks[e].forEach(n=>{try{n(t)}catch(t){this.log(`error`,`error in ${e} callback`,t)}})}catch(t){this.log(`error`,`error triggering ${e} callbacks`,t)}}_setupReconnectionTimer(){this.reconnectTimer=new hd(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},Fd.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(e){switch(this.transport=e?.transport??null,this.timeout=e?.timeout??cd,this.heartbeatIntervalMs=e?.heartbeatIntervalMs??Fd.HEARTBEAT_INTERVAL,this.worker=e?.worker??!1,this.accessToken=e?.accessToken??null,this.heartbeatCallback=e?.heartbeatCallback??Pd,this.vsn=e?.vsn??sd,e?.params&&(this.params=e.params),e?.logger&&(this.logger=e.logger),(e?.logLevel||e?.log_level)&&(this.logLevel=e.logLevel||e.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=e?.reconnectAfterMs??(e=>Id[e-1]||Ld),this.vsn){case ad:this.encode=e?.encode??((e,t)=>t(JSON.stringify(e))),this.decode=e?.decode??((e,t)=>t(JSON.parse(e)));break;case od:this.encode=e?.encode??this.serializer.encode.bind(this.serializer),this.decode=e?.decode??this.serializer.decode.bind(this.serializer);break;default:throw Error(`Unsupported serializer version: ${this.vsn}`)}if(this.worker){if(typeof window<`u`&&!window.Worker)throw Error(`Web Worker is not supported`);this.workerUrl=e?.workerUrl}}},Bd=class extends Error{constructor(e,t){super(e),this.name=`IcebergError`,this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType===`CommitStateUnknownException`||[500,502,504].includes(t.status)&&t.icebergType?.includes(`CommitState`)===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function Vd(e,t,n){let r=new URL(t,e);if(n)for(let[e,t]of Object.entries(n))t!==void 0&&r.searchParams.set(e,t);return r.toString()}async function Hd(e){return!e||e.type===`none`?{}:e.type===`bearer`?{Authorization:`Bearer ${e.token}`}:e.type===`header`?{[e.name]:e.value}:e.type===`custom`?await e.getHeaders():{}}function Ud(e){let t=e.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:i,body:a,headers:o}){let s=Vd(e.baseUrl,r,i),c=await Hd(e.auth),l=await t(s,{method:n,headers:{...a?{"Content-Type":`application/json`}:{},...c,...o},body:a?JSON.stringify(a):void 0}),u=await l.text(),d=(l.headers.get(`content-type`)||``).includes(`application/json`),f=d&&u?JSON.parse(u):u;if(!l.ok){let e=d?f:void 0,t=e?.error;throw new Bd(t?.message??`Request failed with status ${l.status}`,{status:l.status,icebergType:t?.type,icebergCode:t?.code,details:e})}return{status:l.status,headers:l.headers,data:f}}}}function Wd(e){return e.join(``)}var Gd=class{constructor(e,t=``){this.client=e,this.prefix=t}async listNamespaces(e){let t=e?{parent:Wd(e.namespace)}:void 0;return(await this.client.request({method:`GET`,path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(e=>({namespace:e}))}async createNamespace(e,t){let n={namespace:e.namespace,properties:t?.properties};return(await this.client.request({method:`POST`,path:`${this.prefix}/namespaces`,body:n})).data}async dropNamespace(e){await this.client.request({method:`DELETE`,path:`${this.prefix}/namespaces/${Wd(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:`GET`,path:`${this.prefix}/namespaces/${Wd(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:`HEAD`,path:`${this.prefix}/namespaces/${Wd(e.namespace)}`}),!0}catch(e){if(e instanceof Bd&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(e){if(e instanceof Bd&&e.status===409)return;throw e}}};function Kd(e){return e.join(``)}var qd=class{constructor(e,t=``,n){this.client=e,this.prefix=t,this.accessDelegation=n}async listTables(e){return(await this.client.request({method:`GET`,path:`${this.prefix}/namespaces/${Kd(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){let n={};return this.accessDelegation&&(n[`X-Iceberg-Access-Delegation`]=this.accessDelegation),(await this.client.request({method:`POST`,path:`${this.prefix}/namespaces/${Kd(e.namespace)}/tables`,body:t,headers:n})).data.metadata}async updateTable(e,t){let n=await this.client.request({method:`POST`,path:`${this.prefix}/namespaces/${Kd(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":n.data[`metadata-location`],metadata:n.data.metadata}}async dropTable(e,t){await this.client.request({method:`DELETE`,path:`${this.prefix}/namespaces/${Kd(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String(t?.purge??!1)}})}async loadTable(e){let t={};return this.accessDelegation&&(t[`X-Iceberg-Access-Delegation`]=this.accessDelegation),(await this.client.request({method:`GET`,path:`${this.prefix}/namespaces/${Kd(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){let t={};this.accessDelegation&&(t[`X-Iceberg-Access-Delegation`]=this.accessDelegation);try{return await this.client.request({method:`HEAD`,path:`${this.prefix}/namespaces/${Kd(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(e){if(e instanceof Bd&&e.status===404)return!1;throw e}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(n){if(n instanceof Bd&&n.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw n}}},Jd=class{constructor(e){let t=`v1`;e.catalogName&&(t+=`/${e.catalogName}`),this.client=Ud({baseUrl:e.baseUrl.endsWith(`/`)?e.baseUrl:`${e.baseUrl}/`,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=e.accessDelegation?.join(`,`),this.namespaceOps=new Gd(this.client,t),this.tableOps=new qd(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}},Yd=class extends Error{constructor(e,t=`storage`,n,r){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t===`vectors`?`StorageVectorsError`:`StorageError`,this.status=n,this.statusCode=r}};function Xd(e){return typeof e==`object`&&!!e&&`__isStorageError`in e}var Zd=class extends Yd{constructor(e,t,n,r=`storage`){super(e,r,t,n),this.name=r===`vectors`?`StorageVectorsApiError`:`StorageApiError`,this.status=t,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},Qd=class extends Yd{constructor(e,t,n=`storage`){super(e,n),this.name=n===`vectors`?`StorageVectorsUnknownError`:`StorageUnknownError`,this.originalError=t}},$d=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),ef=e=>{if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},tf=e=>{if(Array.isArray(e))return e.map(e=>tf(e));if(typeof e==`function`||e!==Object(e))return e;let t={};return Object.entries(e).forEach(([e,n])=>{let r=e.replace(/([-_][a-z])/gi,e=>e.toUpperCase().replace(/[-_]/g,``));t[r]=tf(n)}),t},nf=e=>!e||typeof e!=`string`||e.length===0||e.length>100||e.trim()!==e||e.includes(`/`)||e.includes(`\\`)?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e);function rf(e){"@babel/helpers - typeof";return rf=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},rf(e)}function af(e,t){if(rf(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(rf(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function of(e){var t=af(e,`string`);return rf(t)==`symbol`?t:t+``}function sf(e,t,n){return(t=of(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function I(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?cf(Object(n),!0).forEach(function(t){sf(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cf(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var lf=e=>e.msg||e.message||e.error_description||(typeof e.error==`string`?e.error:e.error?.message)||JSON.stringify(e),uf=async(e,t,n,r)=>{if(typeof e==`object`&&e&&typeof e.json==`function`){let n=e,i=parseInt(n.status,10);Number.isFinite(i)||(i=500),n.json().then(e=>{let n=e?.statusCode||e?.code||i+``;t(new Zd(lf(e),i,n,r))}).catch(()=>{let e=i+``;t(new Zd(n.statusText||`HTTP ${i} error`,i,e,r))})}else t(new Qd(lf(e),e,r))},df=(e,t,n,r)=>{let i={method:e,headers:t?.headers||{}};return e===`GET`||e===`HEAD`||!r?I(I({},i),n):(ef(r)?(i.headers=I({"Content-Type":`application/json`},t?.headers),i.body=JSON.stringify(r)):i.body=r,t?.duplex&&(i.duplex=t.duplex),I(I({},i),n))};async function ff(e,t,n,r,i,a,o){return new Promise((s,c)=>{e(n,df(t,r,i,a)).then(e=>{if(!e.ok)throw e;if(r?.noResolveJson)return e;if(o===`vectors`){let t=e.headers.get(`content-type`);if(e.headers.get(`content-length`)===`0`||e.status===204||!t||!t.includes(`application/json`))return{}}return e.json()}).then(e=>s(e)).catch(e=>uf(e,c,r,o))})}function pf(e=`storage`){return{get:async(t,n,r,i)=>ff(t,`GET`,n,r,i,void 0,e),post:async(t,n,r,i,a)=>ff(t,`POST`,n,i,a,r,e),put:async(t,n,r,i,a)=>ff(t,`PUT`,n,i,a,r,e),head:async(t,n,r,i)=>ff(t,`HEAD`,n,I(I({},r),{},{noResolveJson:!0}),i,void 0,e),remove:async(t,n,r,i,a)=>ff(t,`DELETE`,n,i,a,r,e)}}var{get:mf,post:hf,put:gf,head:_f,remove:vf}=pf(`storage`),yf=pf(`vectors`),bf=class{constructor(e,t={},n,r=`storage`){this.shouldThrowOnError=!1,this.url=e,this.headers=t,this.fetch=$d(n),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=I(I({},this.headers),{},{[e]:t}),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(Xd(e))return{data:null,error:e};throw e}}},xf=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t}then(e,t){return this.execute().then(e,t)}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Xd(t))return{data:null,error:t};throw t}}},Sf=Symbol.toStringTag,Cf=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[Sf]=`BlobDownloadBuilder`,this.promise=null}asStream(){return new xf(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||=this.execute(),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Xd(t))return{data:null,error:t};throw t}}},wf={limit:100,offset:0,sortBy:{column:`name`,order:`asc`}},Tf={cacheControl:`3600`,contentType:`text/plain;charset=UTF-8`,upsert:!1},Ef=class extends bf{constructor(e,t={},n,r){super(e,t,r,`storage`),this.bucketId=n}async uploadOrUpdate(e,t,n,r){var i=this;return i.handleOperation(async()=>{let a,o=I(I({},Tf),r),s=I(I({},i.headers),e===`POST`&&{"x-upsert":String(o.upsert)}),c=o.metadata;typeof Blob<`u`&&n instanceof Blob?(a=new FormData,a.append(`cacheControl`,o.cacheControl),c&&a.append(`metadata`,i.encodeMetadata(c)),a.append(``,n)):typeof FormData<`u`&&n instanceof FormData?(a=n,a.has(`cacheControl`)||a.append(`cacheControl`,o.cacheControl),c&&!a.has(`metadata`)&&a.append(`metadata`,i.encodeMetadata(c))):(a=n,s[`cache-control`]=`max-age=${o.cacheControl}`,s[`content-type`]=o.contentType,c&&(s[`x-metadata`]=i.toBase64(i.encodeMetadata(c))),(typeof ReadableStream<`u`&&a instanceof ReadableStream||a&&typeof a==`object`&&`pipe`in a&&typeof a.pipe==`function`)&&!o.duplex&&(o.duplex=`half`)),r?.headers&&(s=I(I({},s),r.headers));let l=i._removeEmptyFolders(t),u=i._getFinalPath(l),d=await(e==`PUT`?gf:hf)(i.fetch,`${i.url}/object/${u}`,a,I({headers:s},o?.duplex?{duplex:o.duplex}:{}));return{path:l,id:d.Id,fullPath:d.Key}})}async upload(e,t,n){return this.uploadOrUpdate(`POST`,e,t,n)}async uploadToSignedUrl(e,t,n,r){var i=this;let a=i._removeEmptyFolders(e),o=i._getFinalPath(a),s=new URL(i.url+`/object/upload/sign/${o}`);return s.searchParams.set(`token`,t),i.handleOperation(async()=>{let e,t=I({upsert:Tf.upsert},r),o=I(I({},i.headers),{"x-upsert":String(t.upsert)});return typeof Blob<`u`&&n instanceof Blob?(e=new FormData,e.append(`cacheControl`,t.cacheControl),e.append(``,n)):typeof FormData<`u`&&n instanceof FormData?(e=n,e.append(`cacheControl`,t.cacheControl)):(e=n,o[`cache-control`]=`max-age=${t.cacheControl}`,o[`content-type`]=t.contentType),{path:a,fullPath:(await gf(i.fetch,s.toString(),e,{headers:o})).Key}})}async createSignedUploadUrl(e,t){var n=this;return n.handleOperation(async()=>{let r=n._getFinalPath(e),i=I({},n.headers);t?.upsert&&(i[`x-upsert`]=`true`);let a=await hf(n.fetch,`${n.url}/object/upload/sign/${r}`,{},{headers:i}),o=new URL(n.url+a.url),s=o.searchParams.get(`token`);if(!s)throw new Yd(`No token returned by API`);return{signedUrl:o.toString(),path:e,token:s}})}async update(e,t,n){return this.uploadOrUpdate(`PUT`,e,t,n)}async move(e,t,n){var r=this;return r.handleOperation(async()=>await hf(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,destinationBucket:n?.destinationBucket},{headers:r.headers}))}async copy(e,t,n){var r=this;return r.handleOperation(async()=>({path:(await hf(r.fetch,`${r.url}/object/copy`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,destinationBucket:n?.destinationBucket},{headers:r.headers})).Key}))}async createSignedUrl(e,t,n){var r=this;return r.handleOperation(async()=>{let i=r._getFinalPath(e),a=typeof n?.transform==`object`&&n.transform!==null&&Object.keys(n.transform).length>0,o=await hf(r.fetch,`${r.url}/object/sign/${i}`,I({expiresIn:t},a?{transform:n.transform}:{}),{headers:r.headers}),s=n?.download?`&download=${n.download===!0?``:n.download}`:``,c=a&&o.signedURL.includes(`/object/sign/`)?o.signedURL.replace(`/object/sign/`,`/render/image/sign/`):o.signedURL;return{signedUrl:encodeURI(`${r.url}${c}${s}`)}})}async createSignedUrls(e,t,n){var r=this;return r.handleOperation(async()=>{let i=await hf(r.fetch,`${r.url}/object/sign/${r.bucketId}`,{expiresIn:t,paths:e},{headers:r.headers}),a=n?.download?`&download=${n.download===!0?``:n.download}`:``;return i.map(e=>I(I({},e),{},{signedUrl:e.signedURL?encodeURI(`${r.url}${e.signedURL}${a}`):null}))})}download(e,t,n){let r=t?.transform===void 0?`object`:`render/image/authenticated`,i=this.transformOptsToQueryString(t?.transform||{}),a=i?`?${i}`:``,o=this._getFinalPath(e);return new Cf(()=>mf(this.fetch,`${this.url}/${r}/${o}${a}`,{headers:this.headers,noResolveJson:!0},n),this.shouldThrowOnError)}async info(e){var t=this;let n=t._getFinalPath(e);return t.handleOperation(async()=>tf(await mf(t.fetch,`${t.url}/object/info/${n}`,{headers:t.headers})))}async exists(e){var t=this;let n=t._getFinalPath(e);try{return await _f(t.fetch,`${t.url}/object/${n}`,{headers:t.headers}),{data:!0,error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(Xd(e)){let t=e instanceof Zd?e.status:e instanceof Qd?e.originalError?.status:void 0;if(t!==void 0&&[400,404].includes(t))return{data:!1,error:e}}throw e}}getPublicUrl(e,t){let n=this._getFinalPath(e),r=[],i=t?.download?`download=${t.download===!0?``:t.download}`:``;i!==``&&r.push(i);let a=t?.transform===void 0?`object`:`render/image`,o=this.transformOptsToQueryString(t?.transform||{});o!==``&&r.push(o);let s=r.join(`&`);return s!==``&&(s=`?${s}`),{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${n}${s}`)}}}async remove(e){var t=this;return t.handleOperation(async()=>await vf(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,n){var r=this;return r.handleOperation(async()=>{let i=I(I(I({},wf),t),{},{prefix:e||``});return await hf(r.fetch,`${r.url}/object/list/${r.bucketId}`,i,{headers:r.headers},n)})}async listV2(e,t){var n=this;return n.handleOperation(async()=>{let r=I({},e);return await hf(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,r,{headers:n.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<`u`?Buffer.from(e).toString(`base64`):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,``)}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,``).replace(/\/+/g,`/`)}transformOptsToQueryString(e){let t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join(`&`)}},Df={"X-Client-Info":`storage-js/2.99.3`},Of=class extends bf{constructor(e,t={},n,r){let i=new URL(e);r?.useNewHostname&&/supabase\.(co|in|red)$/.test(i.hostname)&&!i.hostname.includes(`storage.supabase.`)&&(i.hostname=i.hostname.replace(`supabase.`,`storage.supabase.`));let a=i.href.replace(/\/$/,``),o=I(I({},Df),t);super(a,o,n,`storage`)}async listBuckets(e){var t=this;return t.handleOperation(async()=>{let n=t.listBucketOptionsToQueryString(e);return await mf(t.fetch,`${t.url}/bucket${n}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await mf(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var n=this;return n.handleOperation(async()=>await hf(n.fetch,`${n.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async updateBucket(e,t){var n=this;return n.handleOperation(async()=>await gf(n.fetch,`${n.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await hf(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await vf(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}listBucketOptionsToQueryString(e){let t={};return e&&(`limit`in e&&(t.limit=String(e.limit)),`offset`in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?`?`+new URLSearchParams(t).toString():``}},kf=class extends bf{constructor(e,t={},n){let r=e.replace(/\/$/,``),i=I(I({},Df),t);super(r,i,n,`storage`)}async createBucket(e){var t=this;return t.handleOperation(async()=>await hf(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{let n=new URLSearchParams;e?.limit!==void 0&&n.set(`limit`,e.limit.toString()),e?.offset!==void 0&&n.set(`offset`,e.offset.toString()),e?.sortColumn&&n.set(`sortColumn`,e.sortColumn),e?.sortOrder&&n.set(`sortOrder`,e.sortOrder),e?.search&&n.set(`search`,e.search);let r=n.toString(),i=r?`${t.url}/bucket?${r}`:`${t.url}/bucket`;return await mf(t.fetch,i,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await vf(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!nf(e))throw new Yd(`Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.`);let n=new Jd({baseUrl:this.url,catalogName:e,auth:{type:`custom`,getHeaders:async()=>t.headers},fetch:this.fetch}),r=this.shouldThrowOnError;return new Proxy(n,{get(e,t){let n=e[t];return typeof n==`function`?async(...t)=>{try{return{data:await n.apply(e,t),error:null}}catch(e){if(r)throw e;return{data:null,error:e}}}:n}})}},Af=class extends bf{constructor(e,t={},n){let r=e.replace(/\/$/,``),i=I(I({},Df),{},{"Content-Type":`application/json`},t);super(r,i,n,`vectors`)}async createIndex(e){var t=this;return t.handleOperation(async()=>await yf.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var n=this;return n.handleOperation(async()=>await yf.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await yf.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var n=this;return n.handleOperation(async()=>await yf.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers})||{})}},jf=class extends bf{constructor(e,t={},n){let r=e.replace(/\/$/,``),i=I(I({},Df),{},{"Content-Type":`application/json`},t);super(r,i,n,`vectors`)}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw Error(`Vector batch size must be between 1 and 500 items`);return t.handleOperation(async()=>await yf.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await yf.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw Error(`segmentCount must be between 1 and 16`);if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await yf.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await yf.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw Error(`Keys batch size must be between 1 and 500 items`);return t.handleOperation(async()=>await yf.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},Mf=class extends bf{constructor(e,t={},n){let r=e.replace(/\/$/,``),i=I(I({},Df),{},{"Content-Type":`application/json`},t);super(r,i,n,`vectors`)}async createBucket(e){var t=this;return t.handleOperation(async()=>await yf.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await yf.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await yf.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await yf.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},Nf=class extends Mf{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new Pf(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,n=this;return t().call(n,e)}async getBucket(e){var t=()=>super.getBucket,n=this;return t().call(n,e)}async listBuckets(e={}){var t=()=>super.listBuckets,n=this;return t().call(n,e)}async deleteBucket(e){var t=()=>super.deleteBucket,n=this;return t().call(n,e)}},Pf=class extends Af{constructor(e,t,n,r){super(e,t,r),this.vectorBucketName=n}async createIndex(e){var t=()=>super.createIndex,n=this;return t().call(n,I(I({},e),{},{vectorBucketName:n.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,n=this;return t().call(n,I(I({},e),{},{vectorBucketName:n.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,n=this;return t().call(n,n.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,n=this;return t().call(n,n.vectorBucketName,e)}index(e){return new Ff(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},Ff=class extends jf{constructor(e,t,n,r,i){super(e,t,i),this.vectorBucketName=n,this.indexName=r}async putVectors(e){var t=()=>super.putVectors,n=this;return t().call(n,I(I({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(e){var t=()=>super.getVectors,n=this;return t().call(n,I(I({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,n=this;return t().call(n,I(I({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,n=this;return t().call(n,I(I({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,n=this;return t().call(n,I(I({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},If=class extends Of{constructor(e,t={},n,r){super(e,t,n,r)}from(e){return new Ef(this.url,this.headers,e,this.fetch)}get vectors(){return new Nf(this.url+`/vector`,{headers:this.headers,fetch:this.fetch})}get analytics(){return new kf(this.url+`/iceberg`,this.headers,this.fetch)}},Lf=`2.99.3`,Rf=30*1e3,zf=3*Rf,Bf=`http://localhost:9999`,Vf=`supabase.auth.token`,Hf={"X-Client-Info":`gotrue-js/${Lf}`},Uf=`X-Supabase-Api-Version`,Wf={"2024-01-01":{timestamp:Date.parse(`2024-01-01T00:00:00.0Z`),name:`2024-01-01`}},Gf=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,Kf=class extends Error{constructor(e,t,n){super(e),this.__isAuthError=!0,this.name=`AuthError`,this.status=t,this.code=n}};function L(e){return typeof e==`object`&&!!e&&`__isAuthError`in e}var qf=class extends Kf{constructor(e,t,n){super(e,t,n),this.name=`AuthApiError`,this.status=t,this.code=n}};function Jf(e){return L(e)&&e.name===`AuthApiError`}var Yf=class extends Kf{constructor(e,t){super(e),this.name=`AuthUnknownError`,this.originalError=t}},Xf=class extends Kf{constructor(e,t,n,r){super(e,n,r),this.name=t,this.status=n}},Zf=class extends Xf{constructor(){super(`Auth session missing!`,`AuthSessionMissingError`,400,void 0)}};function Qf(e){return L(e)&&e.name===`AuthSessionMissingError`}var $f=class extends Xf{constructor(){super(`Auth session or user missing`,`AuthInvalidTokenResponseError`,500,void 0)}},ep=class extends Xf{constructor(e){super(e,`AuthInvalidCredentialsError`,400,void 0)}},tp=class extends Xf{constructor(e,t=null){super(e,`AuthImplicitGrantRedirectError`,500,void 0),this.details=null,this.details=t}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}};function np(e){return L(e)&&e.name===`AuthImplicitGrantRedirectError`}var rp=class extends Xf{constructor(e,t=null){super(e,`AuthPKCEGrantCodeExchangeError`,500,void 0),this.details=null,this.details=t}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}},ip=class extends Xf{constructor(){super(`PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.`,`AuthPKCECodeVerifierMissingError`,400,`pkce_code_verifier_not_found`)}},ap=class extends Xf{constructor(e,t){super(e,`AuthRetryableFetchError`,t,void 0)}};function op(e){return L(e)&&e.name===`AuthRetryableFetchError`}var sp=class extends Xf{constructor(e,t,n){super(e,`AuthWeakPasswordError`,t,`weak_password`),this.reasons=n}},cp=class extends Xf{constructor(e){super(e,`AuthInvalidJwtError`,400,`invalid_jwt`)}},lp=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`.split(``),up=`
|
|
259
|
+
\r=`.split(``),dp=(()=>{let e=Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<up.length;t+=1)e[up[t].charCodeAt(0)]=-2;for(let t=0;t<lp.length;t+=1)e[lp[t].charCodeAt(0)]=t;return e})();function fp(e,t,n){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;)n(lp[t.queue>>t.queuedBits-6&63]),t.queuedBits-=6;else if(t.queuedBits>0)for(t.queue<<=6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;)n(lp[t.queue>>t.queuedBits-6&63]),t.queuedBits-=6}function pp(e,t,n){let r=dp[e];if(r>-1)for(t.queue=t.queue<<6|r,t.queuedBits+=6;t.queuedBits>=8;)n(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else if(r===-2)return;else throw Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}function mp(e){let t=[],n=e=>{t.push(String.fromCodePoint(e))},r={utf8seq:0,codepoint:0},i={queue:0,queuedBits:0},a=e=>{_p(e,r,n)};for(let t=0;t<e.length;t+=1)pp(e.charCodeAt(t),i,a);return t.join(``)}function hp(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function gp(e,t){for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r>55295&&r<=56319){let t=(r-55296)*1024&65535;r=(e.charCodeAt(n+1)-56320&65535|t)+65536,n+=1}hp(r,t)}}function _p(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let n=1;n<6;n+=1)if(!(e>>7-n&1)){t.utf8seq=n;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw Error(`Invalid UTF-8 sequence`);--t.utf8seq}else if(t.utf8seq>0){if(e<=127)throw Error(`Invalid UTF-8 sequence`);t.codepoint=t.codepoint<<6|e&63,--t.utf8seq,t.utf8seq===0&&n(t.codepoint)}}function vp(e){let t=[],n={queue:0,queuedBits:0},r=e=>{t.push(e)};for(let t=0;t<e.length;t+=1)pp(e.charCodeAt(t),n,r);return new Uint8Array(t)}function yp(e){let t=[];return gp(e,e=>t.push(e)),new Uint8Array(t)}function bp(e){let t=[],n={queue:0,queuedBits:0},r=e=>{t.push(e)};return e.forEach(e=>fp(e,n,r)),fp(null,n,r),t.join(``)}function xp(e){return Math.round(Date.now()/1e3)+e}function Sp(){return Symbol(`auth-callback`)}var Cp=()=>typeof window<`u`&&typeof document<`u`,wp={tested:!1,writable:!1},Tp=()=>{if(!Cp())return!1;try{if(typeof globalThis.localStorage!=`object`)return!1}catch{return!1}if(wp.tested)return wp.writable;let e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),wp.tested=!0,wp.writable=!0}catch{wp.tested=!0,wp.writable=!1}return wp.writable};function Ep(e){let t={},n=new URL(e);if(n.hash&&n.hash[0]===`#`)try{new URLSearchParams(n.hash.substring(1)).forEach((e,n)=>{t[n]=e})}catch{}return n.searchParams.forEach((e,n)=>{t[n]=e}),t}var Dp=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),Op=e=>typeof e==`object`&&!!e&&`status`in e&&`ok`in e&&`json`in e&&typeof e.json==`function`,kp=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},Ap=async(e,t)=>{let n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return n}},jp=async(e,t)=>{await e.removeItem(t)},Mp=class e{constructor(){this.promise=new e.promiseConstructor((e,t)=>{this.resolve=e,this.reject=t})}};Mp.promiseConstructor=Promise;function Np(e){let t=e.split(`.`);if(t.length!==3)throw new cp(`Invalid JWT structure`);for(let e=0;e<t.length;e++)if(!Gf.test(t[e]))throw new cp(`JWT not in base64url format`);return{header:JSON.parse(mp(t[0])),payload:JSON.parse(mp(t[1])),signature:vp(t[2]),raw:{header:t[0],payload:t[1]}}}async function Pp(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function Fp(e,t){return new Promise((n,r)=>{(async()=>{for(let i=0;i<1/0;i++)try{let r=await e(i);if(!t(i,null,r)){n(r);return}}catch(e){if(!t(i,e)){r(e);return}}})()})}function Ip(e){return(`0`+e.toString(16)).substr(-2)}function Lp(){let e=new Uint32Array(56);if(typeof crypto>`u`){let e=``;for(let t=0;t<56;t++)e+=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~`.charAt(Math.floor(Math.random()*66));return e}return crypto.getRandomValues(e),Array.from(e,Ip).join(``)}async function Rp(e){let t=new TextEncoder().encode(e),n=await crypto.subtle.digest(`SHA-256`,t),r=new Uint8Array(n);return Array.from(r).map(e=>String.fromCharCode(e)).join(``)}async function zp(e){if(!(typeof crypto<`u`&&crypto.subtle!==void 0&&typeof TextEncoder<`u`))return console.warn(`WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256.`),e;let t=await Rp(e);return btoa(t).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}async function Bp(e,t,n=!1){let r=Lp(),i=r;n&&(i+=`/PASSWORD_RECOVERY`),await kp(e,`${t}-code-verifier`,i);let a=await zp(r);return[a,r===a?`plain`:`s256`]}var Vp=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function Hp(e){let t=e.headers.get(Uf);if(!t||!t.match(Vp))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function Up(e){if(!e)throw Error(`Missing exp claim`);if(e<=Math.floor(Date.now()/1e3))throw Error(`JWT has expired`)}function Wp(e){switch(e){case`RS256`:return{name:`RSASSA-PKCS1-v1_5`,hash:{name:`SHA-256`}};case`ES256`:return{name:`ECDSA`,namedCurve:`P-256`,hash:{name:`SHA-256`}};default:throw Error(`Invalid alg claim`)}}var Gp=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Kp(e){if(!Gp.test(e))throw Error(`@supabase/auth-js: Expected parameter to be UUID but is not`)}function qp(){return new Proxy({},{get:(e,t)=>{if(t===`__isUserNotAvailableProxy`)return!0;if(typeof t==`symbol`){let e=t.toString();if(e===`Symbol(Symbol.toPrimitive)`||e===`Symbol(Symbol.toStringTag)`||e===`Symbol(util.inspect.custom)`)return}throw Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${t}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,t)=>{throw Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${t}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e,t)=>{throw Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${t}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function Jp(e,t){return new Proxy(e,{get:(e,n,r)=>{if(n===`__isInsecureUserWarningProxy`)return!0;if(typeof n==`symbol`){let t=n.toString();if(t===`Symbol(Symbol.toPrimitive)`||t===`Symbol(Symbol.toStringTag)`||t===`Symbol(util.inspect.custom)`||t===`Symbol(nodejs.util.inspect.custom)`)return Reflect.get(e,n,r)}return!t.value&&typeof n==`string`&&(console.warn(`Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server.`),t.value=!0),Reflect.get(e,n,r)}})}function Yp(e){return JSON.parse(JSON.stringify(e))}var Xp=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),Zp=[502,503,504];async function Qp(e){if(!Op(e))throw new ap(Xp(e),0);if(Zp.includes(e.status))throw new ap(Xp(e),e.status);let t;try{t=await e.json()}catch(e){throw new Yf(Xp(e),e)}let n,r=Hp(e);if(r&&r.getTime()>=Wf[`2024-01-01`].timestamp&&typeof t==`object`&&t&&typeof t.code==`string`?n=t.code:typeof t==`object`&&t&&typeof t.error_code==`string`&&(n=t.error_code),!n){if(typeof t==`object`&&t&&typeof t.weak_password==`object`&&t.weak_password&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.reasons.reduce((e,t)=>e&&typeof t==`string`,!0))throw new sp(Xp(t),e.status,t.weak_password.reasons)}else if(n===`weak_password`)throw new sp(Xp(t),e.status,t.weak_password?.reasons||[]);else if(n===`session_not_found`)throw new Zf;throw new qf(Xp(t),e.status||500,n)}var $p=(e,t,n,r)=>{let i={method:e,headers:t?.headers||{}};return e===`GET`?i:(i.headers=Object.assign({"Content-Type":`application/json;charset=UTF-8`},t?.headers),i.body=JSON.stringify(r),Object.assign(Object.assign({},i),n))};async function R(e,t,n,r){let i=Object.assign({},r?.headers);i[`X-Supabase-Api-Version`]||(i[Uf]=Wf[`2024-01-01`].name),r?.jwt&&(i.Authorization=`Bearer ${r.jwt}`);let a=r?.query??{};r?.redirectTo&&(a.redirect_to=r.redirectTo);let o=await em(e,t,n+(Object.keys(a).length?`?`+new URLSearchParams(a).toString():``),{headers:i,noResolveJson:r?.noResolveJson},{},r?.body);return r?.xform?r?.xform(o):{data:Object.assign({},o),error:null}}async function em(e,t,n,r,i,a){let o=$p(t,r,i,a),s;try{s=await e(n,Object.assign({},o))}catch(e){throw console.error(e),new ap(Xp(e),0)}if(s.ok||await Qp(s),r?.noResolveJson)return s;try{return await s.json()}catch(e){await Qp(e)}}function tm(e){let t=null;sm(e)&&(t=Object.assign({},e),e.expires_at||(t.expires_at=xp(e.expires_in)));let n=e.user??e;return{data:{session:t,user:n},error:null}}function nm(e){let t=tm(e);return!t.error&&e.weak_password&&typeof e.weak_password==`object`&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message==`string`&&e.weak_password.reasons.reduce((e,t)=>e&&typeof t==`string`,!0)&&(t.data.weak_password=e.weak_password),t}function rm(e){return{data:{user:e.user??e},error:null}}function im(e){return{data:e,error:null}}function am(e){let{action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:a}=e,o=Fu(e,[`action_link`,`email_otp`,`hashed_token`,`redirect_to`,`verification_type`]);return{data:{properties:{action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:a},user:Object.assign({},o)},error:null}}function om(e){return e}function sm(e){return e.access_token&&e.refresh_token&&e.expires_in}var cm=[`global`,`local`,`others`],lm=class{constructor({url:e=``,headers:t={},fetch:n}){this.url=e,this.headers=t,this.fetch=Dp(n),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)}}async signOut(e,t=cm[0]){if(cm.indexOf(t)<0)throw Error(`@supabase/auth-js: Parameter scope must be one of ${cm.join(`, `)}`);try{return await R(this.fetch,`POST`,`${this.url}/logout?scope=${t}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(e){if(L(e))return{data:null,error:e};throw e}}async inviteUserByEmail(e,t={}){try{return await R(this.fetch,`POST`,`${this.url}/invite`,{body:{email:e,data:t.data},headers:this.headers,redirectTo:t.redirectTo,xform:rm})}catch(e){if(L(e))return{data:{user:null},error:e};throw e}}async generateLink(e){try{let{options:t}=e,n=Fu(e,[`options`]),r=Object.assign(Object.assign({},n),t);return`newEmail`in n&&(r.new_email=n?.newEmail,delete r.newEmail),await R(this.fetch,`POST`,`${this.url}/admin/generate_link`,{body:r,headers:this.headers,xform:am,redirectTo:t?.redirectTo})}catch(e){if(L(e))return{data:{properties:null,user:null},error:e};throw e}}async createUser(e){try{return await R(this.fetch,`POST`,`${this.url}/admin/users`,{body:e,headers:this.headers,xform:rm})}catch(e){if(L(e))return{data:{user:null},error:e};throw e}}async listUsers(e){try{let t={nextPage:null,lastPage:0,total:0},n=await R(this.fetch,`GET`,`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(e?.page)?.toString()??``,per_page:(e?.perPage)?.toString()??``},xform:om});if(n.error)throw n.error;let r=await n.json(),i=n.headers.get(`x-total-count`)??0,a=n.headers.get(`link`)?.split(`,`)??[];return a.length>0&&(a.forEach(e=>{let n=parseInt(e.split(`;`)[0].split(`=`)[1].substring(0,1)),r=JSON.parse(e.split(`;`)[1].split(`=`)[1]);t[`${r}Page`]=n}),t.total=parseInt(i)),{data:Object.assign(Object.assign({},r),t),error:null}}catch(e){if(L(e))return{data:{users:[]},error:e};throw e}}async getUserById(e){Kp(e);try{return await R(this.fetch,`GET`,`${this.url}/admin/users/${e}`,{headers:this.headers,xform:rm})}catch(e){if(L(e))return{data:{user:null},error:e};throw e}}async updateUserById(e,t){Kp(e);try{return await R(this.fetch,`PUT`,`${this.url}/admin/users/${e}`,{body:t,headers:this.headers,xform:rm})}catch(e){if(L(e))return{data:{user:null},error:e};throw e}}async deleteUser(e,t=!1){Kp(e);try{return await R(this.fetch,`DELETE`,`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:t},xform:rm})}catch(e){if(L(e))return{data:{user:null},error:e};throw e}}async _listFactors(e){Kp(e.userId);try{let{data:t,error:n}=await R(this.fetch,`GET`,`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:e=>({data:{factors:e},error:null})});return{data:t,error:n}}catch(e){if(L(e))return{data:null,error:e};throw e}}async _deleteFactor(e){Kp(e.userId),Kp(e.id);try{return{data:await R(this.fetch,`DELETE`,`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(e){if(L(e))return{data:null,error:e};throw e}}async _listOAuthClients(e){try{let t={nextPage:null,lastPage:0,total:0},n=await R(this.fetch,`GET`,`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(e?.page)?.toString()??``,per_page:(e?.perPage)?.toString()??``},xform:om});if(n.error)throw n.error;let r=await n.json(),i=n.headers.get(`x-total-count`)??0,a=n.headers.get(`link`)?.split(`,`)??[];return a.length>0&&(a.forEach(e=>{let n=parseInt(e.split(`;`)[0].split(`=`)[1].substring(0,1)),r=JSON.parse(e.split(`;`)[1].split(`=`)[1]);t[`${r}Page`]=n}),t.total=parseInt(i)),{data:Object.assign(Object.assign({},r),t),error:null}}catch(e){if(L(e))return{data:{clients:[]},error:e};throw e}}async _createOAuthClient(e){try{return await R(this.fetch,`POST`,`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(L(e))return{data:null,error:e};throw e}}async _getOAuthClient(e){try{return await R(this.fetch,`GET`,`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(L(e))return{data:null,error:e};throw e}}async _updateOAuthClient(e,t){try{return await R(this.fetch,`PUT`,`${this.url}/admin/oauth/clients/${e}`,{body:t,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(L(e))return{data:null,error:e};throw e}}async _deleteOAuthClient(e){try{return await R(this.fetch,`DELETE`,`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(e){if(L(e))return{data:null,error:e};throw e}}async _regenerateOAuthClientSecret(e){try{return await R(this.fetch,`POST`,`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(L(e))return{data:null,error:e};throw e}}async _listCustomProviders(e){try{let t={};return e?.type&&(t.type=e.type),await R(this.fetch,`GET`,`${this.url}/admin/custom-providers`,{headers:this.headers,query:t,xform:e=>({data:{providers:e?.providers??[]},error:null})})}catch(e){if(L(e))return{data:{providers:[]},error:e};throw e}}async _createCustomProvider(e){try{return await R(this.fetch,`POST`,`${this.url}/admin/custom-providers`,{body:e,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(L(e))return{data:null,error:e};throw e}}async _getCustomProvider(e){try{return await R(this.fetch,`GET`,`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(L(e))return{data:null,error:e};throw e}}async _updateCustomProvider(e,t){try{return await R(this.fetch,`PUT`,`${this.url}/admin/custom-providers/${e}`,{body:t,headers:this.headers,xform:e=>({data:e,error:null})})}catch(e){if(L(e))return{data:null,error:e};throw e}}async _deleteCustomProvider(e){try{return await R(this.fetch,`DELETE`,`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(e){if(L(e))return{data:null,error:e};throw e}}};function um(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}var dm={debug:!!(globalThis&&Tp()&&globalThis.localStorage&&globalThis.localStorage.getItem(`supabase.gotrue-js.locks.debug`)===`true`)},fm=class extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}},pm=class extends fm{};async function mm(e,t,n){dm.debug&&console.log(`@supabase/gotrue-js: navigatorLock: acquire lock`,e,t);let r=new globalThis.AbortController,i;t>0&&(i=setTimeout(()=>{r.abort(),dm.debug&&console.log(`@supabase/gotrue-js: navigatorLock acquire timed out`,e)},t)),await Promise.resolve();try{return await globalThis.navigator.locks.request(e,t===0?{mode:`exclusive`,ifAvailable:!0}:{mode:`exclusive`,signal:r.signal},async r=>{if(r){clearTimeout(i),dm.debug&&console.log(`@supabase/gotrue-js: navigatorLock: acquired`,e,r.name);try{return await n()}finally{dm.debug&&console.log(`@supabase/gotrue-js: navigatorLock: released`,e,r.name)}}else if(t===0)throw dm.debug&&console.log(`@supabase/gotrue-js: navigatorLock: not immediately available`,e),new pm(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);else{if(dm.debug)try{let e=await globalThis.navigator.locks.query();console.log(`@supabase/gotrue-js: Navigator LockManager state`,JSON.stringify(e,null,` `))}catch(e){console.warn(`@supabase/gotrue-js: Error when querying Navigator LockManager state`,e)}return console.warn(`@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request`),clearTimeout(i),await n()}})}catch(a){if(t>0&&clearTimeout(i),a?.name===`AbortError`&&t>0){if(r.signal.aborted)return dm.debug&&console.log(`@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock`,e),console.warn(`@supabase/gotrue-js: Lock "${e}" was not released within ${t}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,{mode:`exclusive`,steal:!0},async t=>{if(t){dm.debug&&console.log(`@supabase/gotrue-js: navigatorLock: recovered (stolen)`,e,t.name);try{return await n()}finally{dm.debug&&console.log(`@supabase/gotrue-js: navigatorLock: released (stolen)`,e,t.name)}}else return console.warn(`@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true`),await n()}));throw dm.debug&&console.log(`@supabase/gotrue-js: navigatorLock: lock was stolen by another request`,e),new pm(`Lock "${e}" was released because another request stole it`)}throw a}}function hm(){if(typeof globalThis!=`object`)try{Object.defineProperty(Object.prototype,`__magic__`,{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<`u`&&(self.globalThis=self)}}function gm(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function _m(e){return parseInt(e,16)}function vm(e){let t=new TextEncoder().encode(e);return`0x`+Array.from(t,e=>e.toString(16).padStart(2,`0`)).join(``)}function ym(e){let{chainId:t,domain:n,expirationTime:r,issuedAt:i=new Date,nonce:a,notBefore:o,requestId:s,resources:c,scheme:l,uri:u,version:d}=e;if(!Number.isInteger(t))throw Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${t}`);if(!n)throw Error(`@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.`);if(a&&a.length<8)throw Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${a}`);if(!u)throw Error(`@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.`);if(d!==`1`)throw Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${d}`);if(e.statement?.includes(`
|
|
260
|
+
`))throw Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`);let f=gm(e.address),p=`${l?`${l}://${n}`:n} wants you to sign in with your Ethereum account:\n${f}\n\n${e.statement?`${e.statement}\n`:``}`,m=`URI: ${u}\nVersion: ${d}\nChain ID: ${t}${a?`\nNonce: ${a}`:``}\nIssued At: ${i.toISOString()}`;if(r&&(m+=`\nExpiration Time: ${r.toISOString()}`),o&&(m+=`\nNot Before: ${o.toISOString()}`),s&&(m+=`\nRequest ID: ${s}`),c){let e=`
|
|
261
|
+
Resources:`;for(let t of c){if(!t||typeof t!=`string`)throw Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${t}`);e+=`\n- ${t}`}m+=e}return`${p}\n${m}`}var bm=class extends Error{constructor({message:e,code:t,cause:n,name:r}){super(e,{cause:n}),this.__isWebAuthnError=!0,this.name=r??(n instanceof Error?n.name:void 0)??`Unknown Error`,this.code=t}},xm=class extends bm{constructor(e,t){super({code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:t,message:e}),this.name=`WebAuthnUnknownError`,this.originalError=t}};function Sm({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new bm({message:`Registration ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`ConstraintError`){if(n.authenticatorSelection?.requireResidentKey===!0)return new bm({message:`Discoverable credentials were required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT`,cause:e});if(t.mediation===`conditional`&&n.authenticatorSelection?.userVerification===`required`)return new bm({message:`User verification was required during automatic registration but it could not be performed`,code:`ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE`,cause:e});if(n.authenticatorSelection?.userVerification===`required`)return new bm({message:`User verification was required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT`,cause:e})}else if(e.name===`InvalidStateError`)return new bm({message:`The authenticator was previously registered`,code:`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`,cause:e});else if(e.name===`NotAllowedError`)return new bm({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`NotSupportedError`)return n.pubKeyCredParams.filter(e=>e.type===`public-key`).length===0?new bm({message:`No entry in pubKeyCredParams was of type "public-key"`,code:`ERROR_MALFORMED_PUBKEYCREDPARAMS`,cause:e}):new bm({message:`No available authenticator supported any of the specified pubKeyCredParams algorithms`,code:`ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG`,cause:e});else if(e.name===`SecurityError`){let t=window.location.hostname;if(!km(t))return new bm({message:`${window.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rp.id!==t)return new bm({message:`The RP ID "${n.rp.id}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`TypeError`){if(n.user.id.byteLength<1||n.user.id.byteLength>64)return new bm({message:`User ID was not between 1 and 64 characters`,code:`ERROR_INVALID_USER_ID_LENGTH`,cause:e})}else if(e.name===`UnknownError`)return new bm({message:`The authenticator was unable to process the specified options, or could not create a new credential`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return new bm({message:`a Non-Webauthn related error has occurred`,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e})}function Cm({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new bm({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new bm({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=window.location.hostname;if(!km(t))return new bm({message:`${window.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new bm({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`UnknownError`)return new bm({message:`The authenticator was unable to process the specified options, or could not create a new assertion signature`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return new bm({message:`a Non-Webauthn related error has occurred`,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e})}var wm=new class{createNewAbortSignal(){if(this.controller){let e=Error(`Cancelling existing WebAuthn API call for new one`);e.name=`AbortError`,this.controller.abort(e)}let e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){let e=Error(`Manually cancelling existing WebAuthn API call`);e.name=`AbortError`,this.controller.abort(e),this.controller=void 0}}};function Tm(e){if(!e)throw Error(`Credential creation options are required`);if(typeof PublicKeyCredential<`u`&&`parseCreationOptionsFromJSON`in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON==`function`)return PublicKeyCredential.parseCreationOptionsFromJSON(e);let{challenge:t,user:n,excludeCredentials:r}=e,i=Fu(e,[`challenge`,`user`,`excludeCredentials`]),a=vp(t).buffer,o=Object.assign(Object.assign({},n),{id:vp(n.id).buffer}),s=Object.assign(Object.assign({},i),{challenge:a,user:o});if(r&&r.length>0){s.excludeCredentials=Array(r.length);for(let e=0;e<r.length;e++){let t=r[e];s.excludeCredentials[e]=Object.assign(Object.assign({},t),{id:vp(t.id).buffer,type:t.type||`public-key`,transports:t.transports})}}return s}function Em(e){if(!e)throw Error(`Credential request options are required`);if(typeof PublicKeyCredential<`u`&&`parseRequestOptionsFromJSON`in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON==`function`)return PublicKeyCredential.parseRequestOptionsFromJSON(e);let{challenge:t,allowCredentials:n}=e,r=Fu(e,[`challenge`,`allowCredentials`]),i=vp(t).buffer,a=Object.assign(Object.assign({},r),{challenge:i});if(n&&n.length>0){a.allowCredentials=Array(n.length);for(let e=0;e<n.length;e++){let t=n[e];a.allowCredentials[e]=Object.assign(Object.assign({},t),{id:vp(t.id).buffer,type:t.type||`public-key`,transports:t.transports})}}return a}function Dm(e){if(`toJSON`in e&&typeof e.toJSON==`function`)return e.toJSON();let t=e;return{id:e.id,rawId:e.id,response:{attestationObject:bp(new Uint8Array(e.response.attestationObject)),clientDataJSON:bp(new Uint8Array(e.response.clientDataJSON))},type:`public-key`,clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:t.authenticatorAttachment??void 0}}function Om(e){if(`toJSON`in e&&typeof e.toJSON==`function`)return e.toJSON();let t=e,n=e.getClientExtensionResults(),r=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:bp(new Uint8Array(r.authenticatorData)),clientDataJSON:bp(new Uint8Array(r.clientDataJSON)),signature:bp(new Uint8Array(r.signature)),userHandle:r.userHandle?bp(new Uint8Array(r.userHandle)):void 0},type:`public-key`,clientExtensionResults:n,authenticatorAttachment:t.authenticatorAttachment??void 0}}function km(e){return e===`localhost`||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function Am(){return!!(Cp()&&`PublicKeyCredential`in window&&window.PublicKeyCredential&&`credentials`in navigator&&typeof(navigator==null?void 0:navigator.credentials)?.create==`function`&&typeof(navigator==null?void 0:navigator.credentials)?.get==`function`)}async function jm(e){try{let t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new xm(`Browser returned unexpected credential type`,t)}:{data:null,error:new xm(`Empty credential response`,t)}}catch(t){return{data:null,error:Sm({error:t,options:e})}}}async function Mm(e){try{let t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new xm(`Browser returned unexpected credential type`,t)}:{data:null,error:new xm(`Empty credential response`,t)}}catch(t){return{data:null,error:Cm({error:t,options:e})}}}var Nm={hints:[`security-key`],authenticatorSelection:{authenticatorAttachment:`cross-platform`,requireResidentKey:!1,userVerification:`preferred`,residentKey:`discouraged`},attestation:`direct`},Pm={userVerification:`preferred`,hints:[`security-key`],attestation:`direct`};function Fm(...e){let t=e=>typeof e==`object`&&!!e&&!Array.isArray(e),n=e=>e instanceof ArrayBuffer||ArrayBuffer.isView(e),r={};for(let i of e)if(i)for(let e in i){let a=i[e];if(a!==void 0)if(Array.isArray(a))r[e]=a;else if(n(a))r[e]=a;else if(t(a)){let n=r[e];t(n)?r[e]=Fm(n,a):r[e]=Fm(a)}else r[e]=a}return r}function Im(e,t){return Fm(Nm,e,t||{})}function Lm(e,t){return Fm(Pm,e,t||{})}var Rm=class{constructor(e){this.client=e,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(e){return this.client.mfa.enroll(Object.assign(Object.assign({},e),{factorType:`webauthn`}))}async _challenge({factorId:e,webauthn:t,friendlyName:n,signal:r},i){try{let{data:a,error:o}=await this.client.mfa.challenge({factorId:e,webauthn:t});if(!a)return{data:null,error:o};let s=r??wm.createNewAbortSignal();if(a.webauthn.type===`create`){let{user:e}=a.webauthn.credential_options.publicKey;if(!e.name){let t=n;if(t)e.name=`${e.id}:${t}`;else{let t=(await this.client.getUser()).data.user,n=t?.user_metadata?.name||t?.email||t?.id||`User`;e.name=`${e.id}:${n}`}}e.displayName||=e.name}switch(a.webauthn.type){case`create`:{let{data:t,error:n}=await jm({publicKey:Im(a.webauthn.credential_options.publicKey,i?.create),signal:s});return t?{data:{factorId:e,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:t}},error:null}:{data:null,error:n}}case`request`:{let t=Lm(a.webauthn.credential_options.publicKey,i?.request),{data:n,error:r}=await Mm(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:t,signal:s}));return n?{data:{factorId:e,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:n}},error:null}:{data:null,error:r}}}}catch(e){return L(e)?{data:null,error:e}:{data:null,error:new Yf(`Unexpected error in challenge`,e)}}}async _verify({challengeId:e,factorId:t,webauthn:n}){return this.client.mfa.verify({factorId:t,challengeId:e,webauthn:n})}async _authenticate({factorId:e,webauthn:{rpId:t=typeof window<`u`?window.location.hostname:void 0,rpOrigins:n=typeof window<`u`?[window.location.origin]:void 0,signal:r}={}},i){if(!t)return{data:null,error:new Kf(`rpId is required for WebAuthn authentication`)};try{if(!Am())return{data:null,error:new Yf(`Browser does not support WebAuthn`,null)};let{data:a,error:o}=await this.challenge({factorId:e,webauthn:{rpId:t,rpOrigins:n},signal:r},{request:i});if(!a)return{data:null,error:o};let{webauthn:s}=a;return this._verify({factorId:e,challengeId:a.challengeId,webauthn:{type:s.type,rpId:t,rpOrigins:n,credential_response:s.credential_response}})}catch(e){return L(e)?{data:null,error:e}:{data:null,error:new Yf(`Unexpected error in authenticate`,e)}}}async _register({friendlyName:e,webauthn:{rpId:t=typeof window<`u`?window.location.hostname:void 0,rpOrigins:n=typeof window<`u`?[window.location.origin]:void 0,signal:r}={}},i){if(!t)return{data:null,error:new Kf(`rpId is required for WebAuthn registration`)};try{if(!Am())return{data:null,error:new Yf(`Browser does not support WebAuthn`,null)};let{data:a,error:o}=await this._enroll({friendlyName:e});if(!a)return await this.client.mfa.listFactors().then(t=>t.data?.all.find(t=>t.factor_type===`webauthn`&&t.friendly_name===e&&t.status!==`unverified`)).then(e=>e?this.client.mfa.unenroll({factorId:e?.id}):void 0),{data:null,error:o};let{data:s,error:c}=await this._challenge({factorId:a.id,friendlyName:a.friendly_name,webauthn:{rpId:t,rpOrigins:n},signal:r},{create:i});return s?this._verify({factorId:a.id,challengeId:s.challengeId,webauthn:{rpId:t,rpOrigins:n,type:s.webauthn.type,credential_response:s.webauthn.credential_response}}):{data:null,error:c}}catch(e){return L(e)?{data:null,error:e}:{data:null,error:new Yf(`Unexpected error in register`,e)}}}};hm();var zm={url:Bf,storageKey:Vf,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:Hf,flowType:`implicit`,debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1};async function Bm(e,t,n){return await n()}var Vm={},Hm=class e{get jwks(){return Vm[this.storageKey]?.jwks??{keys:[]}}set jwks(e){Vm[this.storageKey]=Object.assign(Object.assign({},Vm[this.storageKey]),{jwks:e})}get jwks_cached_at(){return Vm[this.storageKey]?.cachedAt??-(2**53-1)}set jwks_cached_at(e){Vm[this.storageKey]=Object.assign(Object.assign({},Vm[this.storageKey]),{cachedAt:e})}constructor(t){var n;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;let r=Object.assign(Object.assign({},zm),t);if(this.storageKey=r.storageKey,this.instanceID=e.nextInstanceID[this.storageKey]??0,e.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!r.debug,typeof r.debug==`function`&&(this.logger=r.debug),this.instanceID>0&&Cp()){let e=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(e),this.logDebugMessages&&console.trace(e)}if(this.persistSession=r.persistSession,this.autoRefreshToken=r.autoRefreshToken,this.admin=new lm({url:r.url,headers:r.headers,fetch:r.fetch}),this.url=r.url,this.headers=r.headers,this.fetch=Dp(r.fetch),this.lock=r.lock||Bm,this.detectSessionInUrl=r.detectSessionInUrl,this.flowType=r.flowType,this.hasCustomAuthorizationHeader=r.hasCustomAuthorizationHeader,this.throwOnError=r.throwOnError,this.lockAcquireTimeout=r.lockAcquireTimeout,r.lock?this.lock=r.lock:this.persistSession&&Cp()&&(globalThis==null?void 0:globalThis.navigator)?.locks?this.lock=mm:this.lock=Bm,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=-(2**53-1)),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new Rm(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.persistSession?(r.storage?this.storage=r.storage:Tp()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=um(this.memoryStorage)),r.userStorage&&(this.userStorage=r.userStorage)):(this.memoryStorage={},this.storage=um(this.memoryStorage)),Cp()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(e){console.error(`Failed to create a new BroadcastChannel, multi-tab state changes will not be available`,e)}(n=this.broadcastChannel)==null||n.addEventListener(`message`,async e=>{this._debug(`received broadcast notification from other tab or client`,e);try{await this._notifyAllSubscribers(e.data.event,e.data.session,!1)}catch(e){this._debug(`#broadcastChannel`,`error`,e)}})}r.skipAutoInitialize||this.initialize().catch(e=>{this._debug(`#initialize()`,`error`,e)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${Lf}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),this}async initialize(){return this.initializePromise||=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise}async _initialize(){try{let e={},t=`none`;if(Cp()&&(e=Ep(window.location.href),this._isImplicitGrantCallback(e)?t=`implicit`:await this._isPKCECallback(e)&&(t=`pkce`)),Cp()&&this.detectSessionInUrl&&t!==`none`){let{data:n,error:r}=await this._getSessionFromURL(e,t);if(r){if(this._debug(`#_initialize()`,`error detecting session from URL`,r),np(r)){let e=r.details?.code;if(e===`identity_already_exists`||e===`identity_not_found`||e===`single_identity_not_deletable`)return{error:r}}return{error:r}}let{session:i,redirectType:a}=n;return this._debug(`#_initialize()`,`detected session in URL`,i,`redirect type`,a),await this._saveSession(i),setTimeout(async()=>{a===`recovery`?await this._notifyAllSubscribers(`PASSWORD_RECOVERY`,i):await this._notifyAllSubscribers(`SIGNED_IN`,i)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(e){return L(e)?this._returnResult({error:e}):this._returnResult({error:new Yf(`Unexpected error during initialization`,e)})}finally{await this._handleVisibilityChange(),this._debug(`#_initialize()`,`end`)}}async signInAnonymously(e){try{let{data:t,error:n}=await R(this.fetch,`POST`,`${this.url}/signup`,{headers:this.headers,body:{data:e?.options?.data??{},gotrue_meta_security:{captcha_token:e?.options?.captchaToken}},xform:tm});if(n||!t)return this._returnResult({data:{user:null,session:null},error:n});let r=t.session,i=t.user;return t.session&&(await this._saveSession(t.session),await this._notifyAllSubscribers(`SIGNED_IN`,r)),this._returnResult({data:{user:i,session:r},error:null})}catch(e){if(L(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signUp(e){try{let t;if(`email`in e){let{email:n,password:r,options:i}=e,a=null,o=null;this.flowType===`pkce`&&([a,o]=await Bp(this.storage,this.storageKey)),t=await R(this.fetch,`POST`,`${this.url}/signup`,{headers:this.headers,redirectTo:i?.emailRedirectTo,body:{email:n,password:r,data:i?.data??{},gotrue_meta_security:{captcha_token:i?.captchaToken},code_challenge:a,code_challenge_method:o},xform:tm})}else if(`phone`in e){let{phone:n,password:r,options:i}=e;t=await R(this.fetch,`POST`,`${this.url}/signup`,{headers:this.headers,body:{phone:n,password:r,data:i?.data??{},channel:i?.channel??`sms`,gotrue_meta_security:{captcha_token:i?.captchaToken}},xform:tm})}else throw new ep(`You must provide either an email or phone number and a password`);let{data:n,error:r}=t;if(r||!n)return await jp(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:r});let i=n.session,a=n.user;return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers(`SIGNED_IN`,i)),this._returnResult({data:{user:a,session:i},error:null})}catch(e){if(await jp(this.storage,`${this.storageKey}-code-verifier`),L(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithPassword(e){try{let t;if(`email`in e){let{email:n,password:r,options:i}=e;t=await R(this.fetch,`POST`,`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:n,password:r,gotrue_meta_security:{captcha_token:i?.captchaToken}},xform:nm})}else if(`phone`in e){let{phone:n,password:r,options:i}=e;t=await R(this.fetch,`POST`,`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:n,password:r,gotrue_meta_security:{captcha_token:i?.captchaToken}},xform:nm})}else throw new ep(`You must provide either an email or phone number and a password`);let{data:n,error:r}=t;if(r)return this._returnResult({data:{user:null,session:null},error:r});if(!n||!n.session||!n.user){let e=new $f;return this._returnResult({data:{user:null,session:null},error:e})}return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers(`SIGNED_IN`,n.session)),this._returnResult({data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:r})}catch(e){if(L(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithOAuth(e){return await this._handleProviderSignIn(e.provider,{redirectTo:e.options?.redirectTo,scopes:e.options?.scopes,queryParams:e.options?.queryParams,skipBrowserRedirect:e.options?.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e))}async signInWithWeb3(e){let{chain:t}=e;switch(t){case`ethereum`:return await this.signInWithEthereum(e);case`solana`:return await this.signInWithSolana(e);default:throw Error(`@supabase/auth-js: Unsupported chain "${t}"`)}}async signInWithEthereum(e){let t,n;if(`message`in e)t=e.message,n=e.signature;else{let{chain:r,wallet:i,statement:a,options:o}=e,s;if(!Cp()){if(typeof i!=`object`||!o?.url)throw Error(`@supabase/auth-js: Both wallet and url must be specified in non-browser environments.`);s=i}else if(typeof i==`object`)s=i;else{let e=window;if(`ethereum`in e&&typeof e.ethereum==`object`&&`request`in e.ethereum&&typeof e.ethereum.request==`function`)s=e.ethereum;else throw Error(`@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.`)}let c=new URL(o?.url??window.location.href),l=await s.request({method:`eth_requestAccounts`}).then(e=>e).catch(()=>{throw Error(`@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid`)});if(!l||l.length===0)throw Error(`@supabase/auth-js: No accounts available. Please ensure the wallet is connected.`);let u=gm(l[0]),d=o?.signInWithEthereum?.chainId;d||=_m(await s.request({method:`eth_chainId`})),t=ym({domain:c.host,address:u,statement:a,uri:c.href,version:`1`,chainId:d,nonce:o?.signInWithEthereum?.nonce,issuedAt:o?.signInWithEthereum?.issuedAt??new Date,expirationTime:o?.signInWithEthereum?.expirationTime,notBefore:o?.signInWithEthereum?.notBefore,requestId:o?.signInWithEthereum?.requestId,resources:o?.signInWithEthereum?.resources}),n=await s.request({method:`personal_sign`,params:[vm(t),u]})}try{let{data:r,error:i}=await R(this.fetch,`POST`,`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:`ethereum`,message:t,signature:n},e.options?.captchaToken?{gotrue_meta_security:{captcha_token:e.options?.captchaToken}}:null),xform:tm});if(i)throw i;if(!r||!r.session||!r.user){let e=new $f;return this._returnResult({data:{user:null,session:null},error:e})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers(`SIGNED_IN`,r.session)),this._returnResult({data:Object.assign({},r),error:i})}catch(e){if(L(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithSolana(e){let t,n;if(`message`in e)t=e.message,n=e.signature;else{let{chain:r,wallet:i,statement:a,options:o}=e,s;if(!Cp()){if(typeof i!=`object`||!o?.url)throw Error(`@supabase/auth-js: Both wallet and url must be specified in non-browser environments.`);s=i}else if(typeof i==`object`)s=i;else{let e=window;if(`solana`in e&&typeof e.solana==`object`&&(`signIn`in e.solana&&typeof e.solana.signIn==`function`||`signMessage`in e.solana&&typeof e.solana.signMessage==`function`))s=e.solana;else throw Error(`@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.`)}let c=new URL(o?.url??window.location.href);if(`signIn`in s&&s.signIn){let e=await s.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},o?.signInWithSolana),{version:`1`,domain:c.host,uri:c.href}),a?{statement:a}:null)),r;if(Array.isArray(e)&&e[0]&&typeof e[0]==`object`)r=e[0];else if(e&&typeof e==`object`&&`signedMessage`in e&&`signature`in e)r=e;else throw Error(`@supabase/auth-js: Wallet method signIn() returned unrecognized value`);if(`signedMessage`in r&&`signature`in r&&(typeof r.signedMessage==`string`||r.signedMessage instanceof Uint8Array)&&r.signature instanceof Uint8Array)t=typeof r.signedMessage==`string`?r.signedMessage:new TextDecoder().decode(r.signedMessage),n=r.signature;else throw Error(`@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields`)}else{if(!(`signMessage`in s)||typeof s.signMessage!=`function`||!(`publicKey`in s)||typeof s!=`object`||!s.publicKey||!(`toBase58`in s.publicKey)||typeof s.publicKey.toBase58!=`function`)throw Error(`@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API`);t=[`${c.host} wants you to sign in with your Solana account:`,s.publicKey.toBase58(),...a?[``,a,``]:[``],`Version: 1`,`URI: ${c.href}`,`Issued At: ${o?.signInWithSolana?.issuedAt??new Date().toISOString()}`,...o?.signInWithSolana?.notBefore?[`Not Before: ${o.signInWithSolana.notBefore}`]:[],...o?.signInWithSolana?.expirationTime?[`Expiration Time: ${o.signInWithSolana.expirationTime}`]:[],...o?.signInWithSolana?.chainId?[`Chain ID: ${o.signInWithSolana.chainId}`]:[],...o?.signInWithSolana?.nonce?[`Nonce: ${o.signInWithSolana.nonce}`]:[],...o?.signInWithSolana?.requestId?[`Request ID: ${o.signInWithSolana.requestId}`]:[],...o?.signInWithSolana?.resources?.length?[`Resources`,...o.signInWithSolana.resources.map(e=>`- ${e}`)]:[]].join(`
|
|
262
|
+
`);let e=await s.signMessage(new TextEncoder().encode(t),`utf8`);if(!e||!(e instanceof Uint8Array))throw Error(`@supabase/auth-js: Wallet signMessage() API returned an recognized value`);n=e}}try{let{data:r,error:i}=await R(this.fetch,`POST`,`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:`solana`,message:t,signature:bp(n)},e.options?.captchaToken?{gotrue_meta_security:{captcha_token:e.options?.captchaToken}}:null),xform:tm});if(i)throw i;if(!r||!r.session||!r.user){let e=new $f;return this._returnResult({data:{user:null,session:null},error:e})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers(`SIGNED_IN`,r.session)),this._returnResult({data:Object.assign({},r),error:i})}catch(e){if(L(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async _exchangeCodeForSession(e){let[t,n]=(await Ap(this.storage,`${this.storageKey}-code-verifier`)??``).split(`/`);try{if(!t&&this.flowType===`pkce`)throw new ip;let{data:r,error:i}=await R(this.fetch,`POST`,`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:t},xform:tm});if(await jp(this.storage,`${this.storageKey}-code-verifier`),i)throw i;if(!r||!r.session||!r.user){let e=new $f;return this._returnResult({data:{user:null,session:null,redirectType:null},error:e})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers(`SIGNED_IN`,r.session)),this._returnResult({data:Object.assign(Object.assign({},r),{redirectType:n??null}),error:i})}catch(e){if(await jp(this.storage,`${this.storageKey}-code-verifier`),L(e))return this._returnResult({data:{user:null,session:null,redirectType:null},error:e});throw e}}async signInWithIdToken(e){try{let{options:t,provider:n,token:r,access_token:i,nonce:a}=e,{data:o,error:s}=await R(this.fetch,`POST`,`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:r,access_token:i,nonce:a,gotrue_meta_security:{captcha_token:t?.captchaToken}},xform:tm});if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!o||!o.session||!o.user){let e=new $f;return this._returnResult({data:{user:null,session:null},error:e})}return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers(`SIGNED_IN`,o.session)),this._returnResult({data:o,error:s})}catch(e){if(L(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithOtp(e){try{if(`email`in e){let{email:t,options:n}=e,r=null,i=null;this.flowType===`pkce`&&([r,i]=await Bp(this.storage,this.storageKey));let{error:a}=await R(this.fetch,`POST`,`${this.url}/otp`,{headers:this.headers,body:{email:t,data:n?.data??{},create_user:n?.shouldCreateUser??!0,gotrue_meta_security:{captcha_token:n?.captchaToken},code_challenge:r,code_challenge_method:i},redirectTo:n?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:a})}if(`phone`in e){let{phone:t,options:n}=e,{data:r,error:i}=await R(this.fetch,`POST`,`${this.url}/otp`,{headers:this.headers,body:{phone:t,data:n?.data??{},create_user:n?.shouldCreateUser??!0,gotrue_meta_security:{captcha_token:n?.captchaToken},channel:n?.channel??`sms`}});return this._returnResult({data:{user:null,session:null,messageId:r?.message_id},error:i})}throw new ep(`You must provide either an email or phone number.`)}catch(e){if(await jp(this.storage,`${this.storageKey}-code-verifier`),L(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async verifyOtp(e){try{let t,n;`options`in e&&(t=e.options?.redirectTo,n=e.options?.captchaToken);let{data:r,error:i}=await R(this.fetch,`POST`,`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:n}}),redirectTo:t,xform:tm});if(i)throw i;if(!r)throw Error(`An error occurred on token verification.`);let a=r.session,o=r.user;return a?.access_token&&(await this._saveSession(a),await this._notifyAllSubscribers(e.type==`recovery`?`PASSWORD_RECOVERY`:`SIGNED_IN`,a)),this._returnResult({data:{user:o,session:a},error:null})}catch(e){if(L(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async signInWithSSO(e){try{let t=null,n=null;this.flowType===`pkce`&&([t,n]=await Bp(this.storage,this.storageKey));let r=await R(this.fetch,`POST`,`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},`providerId`in e?{provider_id:e.providerId}:null),`domain`in e?{domain:e.domain}:null),{redirect_to:e.options?.redirectTo??void 0}),e?.options?.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:t,code_challenge_method:n}),headers:this.headers,xform:im});return r.data?.url&&Cp()&&!e.options?.skipBrowserRedirect&&window.location.assign(r.data.url),this._returnResult(r)}catch(e){if(await jp(this.storage,`${this.storageKey}-code-verifier`),L(e))return this._returnResult({data:null,error:e});throw e}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{let{data:{session:t},error:n}=e;if(n)throw n;if(!t)throw new Zf;let{error:r}=await R(this.fetch,`GET`,`${this.url}/reauthenticate`,{headers:this.headers,jwt:t.access_token});return this._returnResult({data:{user:null,session:null},error:r})})}catch(e){if(L(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){try{let t=`${this.url}/resend`;if(`email`in e){let{email:n,type:r,options:i}=e,{error:a}=await R(this.fetch,`POST`,t,{headers:this.headers,body:{email:n,type:r,gotrue_meta_security:{captcha_token:i?.captchaToken}},redirectTo:i?.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:a})}else if(`phone`in e){let{phone:n,type:r,options:i}=e,{data:a,error:o}=await R(this.fetch,`POST`,t,{headers:this.headers,body:{phone:n,type:r,gotrue_meta_security:{captcha_token:i?.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:a?.message_id},error:o})}throw new ep(`You must provide either an email or phone number and a type`)}catch(e){if(L(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async e=>e))}async _acquireLock(e,t){this._debug(`#_acquireLock`,`begin`,e);try{if(this.lockAcquired){let e=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),n=(async()=>(await e,await t()))();return this.pendingInLock.push((async()=>{try{await n}catch{}})()),n}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug(`#_acquireLock`,`lock acquired for storage key`,this.storageKey);try{this.lockAcquired=!0;let e=t();for(this.pendingInLock.push((async()=>{try{await e}catch{}})()),await e;this.pendingInLock.length;){let e=[...this.pendingInLock];await Promise.all(e),this.pendingInLock.splice(0,e.length)}return await e}finally{this._debug(`#_acquireLock`,`lock released for storage key`,this.storageKey),this.lockAcquired=!1}})}finally{this._debug(`#_acquireLock`,`end`)}}async _useSession(e){this._debug(`#_useSession`,`begin`);try{return await e(await this.__loadSession())}finally{this._debug(`#_useSession`,`end`)}}async __loadSession(){this._debug(`#__loadSession()`,`begin`),this.lockAcquired||this._debug(`#__loadSession()`,`used outside of an acquired lock!`,Error().stack);try{let e=null,t=await Ap(this.storage,this.storageKey);if(this._debug(`#getSession()`,`session from storage`,t),t!==null&&(this._isValidSession(t)?e=t:(this._debug(`#getSession()`,`session from storage is not valid`),await this._removeSession())),!e)return{data:{session:null},error:null};let n=e.expires_at?e.expires_at*1e3-Date.now()<zf:!1;if(this._debug(`#__loadSession()`,`session has${n?``:` not`} expired`,`expires_at`,e.expires_at),!n){if(this.userStorage){let t=await Ap(this.userStorage,this.storageKey+`-user`);t?.user?e.user=t.user:e.user=qp()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){let t={value:this.suppressGetSessionWarning};e.user=Jp(e.user,t),t.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}let{data:r,error:i}=await this._callRefreshToken(e.refresh_token);return i?this._returnResult({data:{session:null},error:i}):this._returnResult({data:{session:r},error:null})}finally{this._debug(`#__loadSession()`,`end`)}}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;let t=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return t.data.user&&(this.suppressGetSessionWarning=!0),t}async _getUser(e){try{return e?await R(this.fetch,`GET`,`${this.url}/user`,{headers:this.headers,jwt:e,xform:rm}):await this._useSession(async e=>{let{data:t,error:n}=e;if(n)throw n;return!t.session?.access_token&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Zf}:await R(this.fetch,`GET`,`${this.url}/user`,{headers:this.headers,jwt:t.session?.access_token??void 0,xform:rm})})}catch(e){if(L(e))return Qf(e)&&(await this._removeSession(),await jp(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:e});throw e}}async updateUser(e,t={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,t))}async _updateUser(e,t={}){try{return await this._useSession(async n=>{let{data:r,error:i}=n;if(i)throw i;if(!r.session)throw new Zf;let a=r.session,o=null,s=null;this.flowType===`pkce`&&e.email!=null&&([o,s]=await Bp(this.storage,this.storageKey));let{data:c,error:l}=await R(this.fetch,`PUT`,`${this.url}/user`,{headers:this.headers,redirectTo:t?.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:o,code_challenge_method:s}),jwt:a.access_token,xform:rm});if(l)throw l;return a.user=c.user,await this._saveSession(a),await this._notifyAllSubscribers(`USER_UPDATED`,a),this._returnResult({data:{user:a.user},error:null})})}catch(e){if(await jp(this.storage,`${this.storageKey}-code-verifier`),L(e))return this._returnResult({data:{user:null},error:e});throw e}}async setSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new Zf;let t=Date.now()/1e3,n=t,r=!0,i=null,{payload:a}=Np(e.access_token);if(a.exp&&(n=a.exp,r=n<=t),r){let{data:t,error:n}=await this._callRefreshToken(e.refresh_token);if(n)return this._returnResult({data:{user:null,session:null},error:n});if(!t)return{data:{user:null,session:null},error:null};i=t}else{let{data:r,error:a}=await this._getUser(e.access_token);if(a)return this._returnResult({data:{user:null,session:null},error:a});i={access_token:e.access_token,refresh_token:e.refresh_token,user:r.user,token_type:`bearer`,expires_in:n-t,expires_at:n},await this._saveSession(i),await this._notifyAllSubscribers(`SIGNED_IN`,i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(e){if(L(e))return this._returnResult({data:{session:null,user:null},error:e});throw e}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async t=>{if(!e){let{data:n,error:r}=t;if(r)throw r;e=n.session??void 0}if(!e?.refresh_token)throw new Zf;let{data:n,error:r}=await this._callRefreshToken(e.refresh_token);return r?this._returnResult({data:{user:null,session:null},error:r}):n?this._returnResult({data:{user:n.user,session:n},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(e){if(L(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async _getSessionFromURL(e,t){try{if(!Cp())throw new tp(`No browser detected.`);if(e.error||e.error_description||e.error_code)throw new tp(e.error_description||`Error in URL with unspecified error_description`,{error:e.error||`unspecified_error`,code:e.error_code||`unspecified_code`});switch(t){case`implicit`:if(this.flowType===`pkce`)throw new rp(`Not a valid PKCE flow url.`);break;case`pkce`:if(this.flowType===`implicit`)throw new tp(`Not a valid implicit grant flow url.`);break;default:}if(t===`pkce`){if(this._debug(`#_initialize()`,`begin`,`is PKCE flow`,!0),!e.code)throw new rp(`No code detected.`);let{data:t,error:n}=await this._exchangeCodeForSession(e.code);if(n)throw n;let r=new URL(window.location.href);return r.searchParams.delete(`code`),window.history.replaceState(window.history.state,``,r.toString()),{data:{session:t.session,redirectType:null},error:null}}let{provider_token:n,provider_refresh_token:r,access_token:i,refresh_token:a,expires_in:o,expires_at:s,token_type:c}=e;if(!i||!o||!a||!c)throw new tp(`No session defined in URL`);let l=Math.round(Date.now()/1e3),u=parseInt(o),d=l+u;s&&(d=parseInt(s));let f=d-l;f*1e3<=3e4&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${f}s, should have been closer to ${u}s`);let p=d-u;l-p>=120?console.warn(`@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale`,p,d,l):l-p<0&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew`,p,d,l);let{data:m,error:h}=await this._getUser(i);if(h)throw h;let g={provider_token:n,provider_refresh_token:r,access_token:i,expires_in:u,expires_at:d,refresh_token:a,token_type:c,user:m.user};return window.location.hash=``,this._debug(`#_getSessionFromURL()`,`clearing window.location.hash`),this._returnResult({data:{session:g,redirectType:e.type},error:null})}catch(e){if(L(e))return this._returnResult({data:{session:null,redirectType:null},error:e});throw e}}_isImplicitGrantCallback(e){return typeof this.detectSessionInUrl==`function`?this.detectSessionInUrl(new URL(window.location.href),e):!!(e.access_token||e.error_description)}async _isPKCECallback(e){let t=await Ap(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&t)}async signOut(e={scope:`global`}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:`global`}){return await this._useSession(async t=>{let{data:n,error:r}=t;if(r&&!Qf(r))return this._returnResult({error:r});let i=n.session?.access_token;if(i){let{error:t}=await this.admin.signOut(i,e);if(t&&!(Jf(t)&&(t.status===404||t.status===401||t.status===403)||Qf(t)))return this._returnResult({error:t})}return e!==`others`&&(await this._removeSession(),await jp(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(e){let t=Sp(),n={id:t,callback:e,unsubscribe:()=>{this._debug(`#unsubscribe()`,`state change callback with id removed`,t),this.stateChangeEmitters.delete(t)}};return this._debug(`#onAuthStateChange()`,`registered callback with id`,t),this.stateChangeEmitters.set(t,n),(async()=>{await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(t)})})(),{data:{subscription:n}}}async _emitInitialSession(e){return await this._useSession(async t=>{try{let{data:{session:n},error:r}=t;if(r)throw r;await this.stateChangeEmitters.get(e)?.callback(`INITIAL_SESSION`,n),this._debug(`INITIAL_SESSION`,`callback id`,e,`session`,n)}catch(t){await this.stateChangeEmitters.get(e)?.callback(`INITIAL_SESSION`,null),this._debug(`INITIAL_SESSION`,`callback id`,e,`error`,t),console.error(t)}})}async resetPasswordForEmail(e,t={}){let n=null,r=null;this.flowType===`pkce`&&([n,r]=await Bp(this.storage,this.storageKey,!0));try{return await R(this.fetch,`POST`,`${this.url}/recover`,{body:{email:e,code_challenge:n,code_challenge_method:r,gotrue_meta_security:{captcha_token:t.captchaToken}},headers:this.headers,redirectTo:t.redirectTo})}catch(e){if(await jp(this.storage,`${this.storageKey}-code-verifier`),L(e))return this._returnResult({data:null,error:e});throw e}}async getUserIdentities(){try{let{data:e,error:t}=await this.getUser();if(t)throw t;return this._returnResult({data:{identities:e.user.identities??[]},error:null})}catch(e){if(L(e))return this._returnResult({data:null,error:e});throw e}}async linkIdentity(e){return`token`in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){try{let{data:t,error:n}=await this._useSession(async t=>{let{data:n,error:r}=t;if(r)throw r;let i=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:e.options?.redirectTo,scopes:e.options?.scopes,queryParams:e.options?.queryParams,skipBrowserRedirect:!0});return await R(this.fetch,`GET`,i,{headers:this.headers,jwt:n.session?.access_token??void 0})});if(n)throw n;return Cp()&&!e.options?.skipBrowserRedirect&&window.location.assign(t?.url),this._returnResult({data:{provider:e.provider,url:t?.url},error:null})}catch(t){if(L(t))return this._returnResult({data:{provider:e.provider,url:null},error:t});throw t}}async linkIdentityIdToken(e){return await this._useSession(async t=>{try{let{error:n,data:{session:r}}=t;if(n)throw n;let{options:i,provider:a,token:o,access_token:s,nonce:c}=e,{data:l,error:u}=await R(this.fetch,`POST`,`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:r?.access_token??void 0,body:{provider:a,id_token:o,access_token:s,nonce:c,link_identity:!0,gotrue_meta_security:{captcha_token:i?.captchaToken}},xform:tm});return u?this._returnResult({data:{user:null,session:null},error:u}):!l||!l.session||!l.user?this._returnResult({data:{user:null,session:null},error:new $f}):(l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers(`USER_UPDATED`,l.session)),this._returnResult({data:l,error:u}))}catch(e){if(await jp(this.storage,`${this.storageKey}-code-verifier`),L(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}})}async unlinkIdentity(e){try{return await this._useSession(async t=>{let{data:n,error:r}=t;if(r)throw r;return await R(this.fetch,`DELETE`,`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:n.session?.access_token??void 0})})}catch(e){if(L(e))return this._returnResult({data:null,error:e});throw e}}async _refreshAccessToken(e){let t=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(t,`begin`);try{let n=Date.now();return await Fp(async n=>(n>0&&await Pp(200*2**(n-1)),this._debug(t,`refreshing attempt`,n),await R(this.fetch,`POST`,`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:tm})),(e,t)=>{let r=200*2**e;return t&&op(t)&&Date.now()+r-n<3e4})}catch(e){if(this._debug(t,`error`,e),L(e))return this._returnResult({data:{session:null,user:null},error:e});throw e}finally{this._debug(t,`end`)}}_isValidSession(e){return typeof e==`object`&&!!e&&`access_token`in e&&`refresh_token`in e&&`expires_at`in e}async _handleProviderSignIn(e,t){let n=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:t.redirectTo,scopes:t.scopes,queryParams:t.queryParams});return this._debug(`#_handleProviderSignIn()`,`provider`,e,`options`,t,`url`,n),Cp()&&!t.skipBrowserRedirect&&window.location.assign(n),{data:{provider:e,url:n},error:null}}async _recoverAndRefresh(){let e=`#_recoverAndRefresh()`;this._debug(e,`begin`);try{let t=await Ap(this.storage,this.storageKey);if(t&&this.userStorage){let e=await Ap(this.userStorage,this.storageKey+`-user`);!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!e&&(e={user:t.user},await kp(this.userStorage,this.storageKey+`-user`,e)),t.user=e?.user??qp()}else if(t&&!t.user&&!t.user){let e=await Ap(this.storage,this.storageKey+`-user`);e&&e?.user?(t.user=e.user,await jp(this.storage,this.storageKey+`-user`),await kp(this.storage,this.storageKey,t)):t.user=qp()}if(this._debug(e,`session from storage`,t),!this._isValidSession(t)){this._debug(e,`session is not valid`),t!==null&&await this._removeSession();return}let n=(t.expires_at??1/0)*1e3-Date.now()<zf;if(this._debug(e,`session has${n?``:` not`} expired with margin of ${zf}s`),n){if(this.autoRefreshToken&&t.refresh_token){let{error:n}=await this._callRefreshToken(t.refresh_token);n&&(console.error(n),op(n)||(this._debug(e,`refresh failed with a non-retryable error, removing the session`,n),await this._removeSession()))}}else if(t.user&&t.user.__isUserNotAvailableProxy===!0)try{let{data:n,error:r}=await this._getUser(t.access_token);!r&&n?.user?(t.user=n.user,await this._saveSession(t),await this._notifyAllSubscribers(`SIGNED_IN`,t)):this._debug(e,`could not get user data, skipping SIGNED_IN notification`)}catch(t){console.error(`Error getting user data:`,t),this._debug(e,`error getting user data, skipping SIGNED_IN notification`,t)}else await this._notifyAllSubscribers(`SIGNED_IN`,t)}catch(t){this._debug(e,`error`,t),console.error(t);return}finally{this._debug(e,`end`)}}async _callRefreshToken(e){var t,n;if(!e)throw new Zf;if(this.refreshingDeferred)return this.refreshingDeferred.promise;let r=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(r,`begin`);try{this.refreshingDeferred=new Mp;let{data:t,error:n}=await this._refreshAccessToken(e);if(n)throw n;if(!t.session)throw new Zf;await this._saveSession(t.session),await this._notifyAllSubscribers(`TOKEN_REFRESHED`,t.session);let r={data:t.session,error:null};return this.refreshingDeferred.resolve(r),r}catch(e){if(this._debug(r,`error`,e),L(e)){let n={data:null,error:e};return op(e)||await this._removeSession(),(t=this.refreshingDeferred)==null||t.resolve(n),n}throw(n=this.refreshingDeferred)==null||n.reject(e),e}finally{this.refreshingDeferred=null,this._debug(r,`end`)}}async _notifyAllSubscribers(e,t,n=!0){let r=`#_notifyAllSubscribers(${e})`;this._debug(r,`begin`,t,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:e,session:t});let r=[],i=Array.from(this.stateChangeEmitters.values()).map(async n=>{try{await n.callback(e,t)}catch(e){r.push(e)}});if(await Promise.all(i),r.length>0){for(let e=0;e<r.length;e+=1)console.error(r[e]);throw r[0]}}finally{this._debug(r,`end`)}}async _saveSession(e){this._debug(`#_saveSession()`,e),this.suppressGetSessionWarning=!0,await jp(this.storage,`${this.storageKey}-code-verifier`);let t=Object.assign({},e),n=t.user&&t.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&t.user&&await kp(this.userStorage,this.storageKey+`-user`,{user:t.user});let e=Object.assign({},t);delete e.user;let r=Yp(e);await kp(this.storage,this.storageKey,r)}else{let e=Yp(t);await kp(this.storage,this.storageKey,e)}}async _removeSession(){this._debug(`#_removeSession()`),this.suppressGetSessionWarning=!1,await jp(this.storage,this.storageKey),await jp(this.storage,this.storageKey+`-code-verifier`),await jp(this.storage,this.storageKey+`-user`),this.userStorage&&await jp(this.userStorage,this.storageKey+`-user`),await this._notifyAllSubscribers(`SIGNED_OUT`,null)}_removeVisibilityChangedCallback(){this._debug(`#_removeVisibilityChangedCallback()`);let e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&Cp()&&window!=null&&window.removeEventListener&&window.removeEventListener(`visibilitychange`,e)}catch(e){console.error(`removing visibilitychange callback failed`,e)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug(`#_startAutoRefresh()`);let e=setInterval(()=>this._autoRefreshTokenTick(),Rf);this.autoRefreshTicker=e,e&&typeof e==`object`&&typeof e.unref==`function`?e.unref():typeof Deno<`u`&&typeof Deno.unrefTimer==`function`&&Deno.unrefTimer(e);let t=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=t,t&&typeof t==`object`&&typeof t.unref==`function`?t.unref():typeof Deno<`u`&&typeof Deno.unrefTimer==`function`&&Deno.unrefTimer(t)}async _stopAutoRefresh(){this._debug(`#_stopAutoRefresh()`);let e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e);let t=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,t&&clearTimeout(t)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug(`#_autoRefreshTokenTick()`,`begin`);try{await this._acquireLock(0,async()=>{try{let e=Date.now();try{return await this._useSession(async t=>{let{data:{session:n}}=t;if(!n||!n.refresh_token||!n.expires_at){this._debug(`#_autoRefreshTokenTick()`,`no session`);return}let r=Math.floor((n.expires_at*1e3-e)/Rf);this._debug(`#_autoRefreshTokenTick()`,`access token expires in ${r} ticks, a tick lasts ${Rf}ms, refresh threshold is 3 ticks`),r<=3&&await this._callRefreshToken(n.refresh_token)})}catch(e){console.error(`Auto refresh tick failed with error. This is likely a transient error.`,e)}}finally{this._debug(`#_autoRefreshTokenTick()`,`end`)}})}catch(e){if(e.isAcquireTimeout||e instanceof fm)this._debug(`auto refresh token tick lock not available`);else throw e}}async _handleVisibilityChange(){if(this._debug(`#_handleVisibilityChange()`),!Cp()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(e){this._debug(`#visibilityChangedCallback`,`error`,e)}},window==null||window.addEventListener(`visibilitychange`,this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error(`_handleVisibilityChange`,e)}}async _onVisibilityChanged(e){let t=`#_onVisibilityChanged(${e})`;this._debug(t,`visibilityState`,document.visibilityState),document.visibilityState===`visible`?(this.autoRefreshToken&&this._startAutoRefresh(),e||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!==`visible`){this._debug(t,`acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting`);return}await this._recoverAndRefresh()}))):document.visibilityState===`hidden`&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,t,n){let r=[`provider=${encodeURIComponent(t)}`];if(n?.redirectTo&&r.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n?.scopes&&r.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType===`pkce`){let[e,t]=await Bp(this.storage,this.storageKey),n=new URLSearchParams({code_challenge:`${encodeURIComponent(e)}`,code_challenge_method:`${encodeURIComponent(t)}`});r.push(n.toString())}if(n?.queryParams){let e=new URLSearchParams(n.queryParams);r.push(e.toString())}return n?.skipBrowserRedirect&&r.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${e}?${r.join(`&`)}`}async _unenroll(e){try{return await this._useSession(async t=>{let{data:n,error:r}=t;return r?this._returnResult({data:null,error:r}):await R(this.fetch,`DELETE`,`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:n?.session?.access_token})})}catch(e){if(L(e))return this._returnResult({data:null,error:e});throw e}}async _enroll(e){try{return await this._useSession(async t=>{let{data:n,error:r}=t;if(r)return this._returnResult({data:null,error:r});let i=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType===`phone`?{phone:e.phone}:e.factorType===`totp`?{issuer:e.issuer}:{}),{data:a,error:o}=await R(this.fetch,`POST`,`${this.url}/factors`,{body:i,headers:this.headers,jwt:n?.session?.access_token});return o?this._returnResult({data:null,error:o}):(e.factorType===`totp`&&a.type===`totp`&&a?.totp?.qr_code&&(a.totp.qr_code=`data:image/svg+xml;utf-8,${a.totp.qr_code}`),this._returnResult({data:a,error:null}))})}catch(e){if(L(e))return this._returnResult({data:null,error:e});throw e}}async _verify(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async t=>{let{data:n,error:r}=t;if(r)return this._returnResult({data:null,error:r});let i=Object.assign({challenge_id:e.challengeId},`webauthn`in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type===`create`?Dm(e.webauthn.credential_response):Om(e.webauthn.credential_response)})}:{code:e.code}),{data:a,error:o}=await R(this.fetch,`POST`,`${this.url}/factors/${e.factorId}/verify`,{body:i,headers:this.headers,jwt:n?.session?.access_token});return o?this._returnResult({data:null,error:o}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+a.expires_in},a)),await this._notifyAllSubscribers(`MFA_CHALLENGE_VERIFIED`,a),this._returnResult({data:a,error:o}))})}catch(e){if(L(e))return this._returnResult({data:null,error:e});throw e}})}async _challenge(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async t=>{let{data:n,error:r}=t;if(r)return this._returnResult({data:null,error:r});let i=await R(this.fetch,`POST`,`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:n?.session?.access_token});if(i.error)return i;let{data:a}=i;if(a.type!==`webauthn`)return{data:a,error:null};switch(a.webauthn.type){case`create`:return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:Tm(a.webauthn.credential_options.publicKey)})})}),error:null};case`request`:return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:Em(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(e){if(L(e))return this._returnResult({data:null,error:e});throw e}})}async _challengeAndVerify(e){let{data:t,error:n}=await this._challenge({factorId:e.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:e.factorId,challengeId:t.id,code:e.code})}async _listFactors(){let{data:{user:e},error:t}=await this.getUser();if(t)return{data:null,error:t};let n={all:[],phone:[],totp:[],webauthn:[]};for(let t of e?.factors??[])n.all.push(t),t.status===`verified`&&n[t.factor_type].push(t);return{data:n,error:null}}async _getAuthenticatorAssuranceLevel(e){if(e)try{let{payload:t}=Np(e),n=null;t.aal&&(n=t.aal);let r=n,{data:{user:i},error:a}=await this.getUser(e);if(a)return this._returnResult({data:null,error:a});((i?.factors)?.filter(e=>e.status===`verified`)??[]).length>0&&(r=`aal2`);let o=t.amr||[];return{data:{currentLevel:n,nextLevel:r,currentAuthenticationMethods:o},error:null}}catch(e){if(L(e))return this._returnResult({data:null,error:e});throw e}let{data:{session:t},error:n}=await this.getSession();if(n)return this._returnResult({data:null,error:n});if(!t)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};let{payload:r}=Np(t.access_token),i=null;r.aal&&(i=r.aal);let a=i;(t.user.factors?.filter(e=>e.status===`verified`)??[]).length>0&&(a=`aal2`);let o=r.amr||[];return{data:{currentLevel:i,nextLevel:a,currentAuthenticationMethods:o},error:null}}async _getAuthorizationDetails(e){try{return await this._useSession(async t=>{let{data:{session:n},error:r}=t;return r?this._returnResult({data:null,error:r}):n?await R(this.fetch,`GET`,`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:n.access_token,xform:e=>({data:e,error:null})}):this._returnResult({data:null,error:new Zf})})}catch(e){if(L(e))return this._returnResult({data:null,error:e});throw e}}async _approveAuthorization(e,t){try{return await this._useSession(async n=>{let{data:{session:r},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!r)return this._returnResult({data:null,error:new Zf});let a=await R(this.fetch,`POST`,`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:r.access_token,body:{action:`approve`},xform:e=>({data:e,error:null})});return a.data&&a.data.redirect_url&&Cp()&&!t?.skipBrowserRedirect&&window.location.assign(a.data.redirect_url),a})}catch(e){if(L(e))return this._returnResult({data:null,error:e});throw e}}async _denyAuthorization(e,t){try{return await this._useSession(async n=>{let{data:{session:r},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!r)return this._returnResult({data:null,error:new Zf});let a=await R(this.fetch,`POST`,`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:r.access_token,body:{action:`deny`},xform:e=>({data:e,error:null})});return a.data&&a.data.redirect_url&&Cp()&&!t?.skipBrowserRedirect&&window.location.assign(a.data.redirect_url),a})}catch(e){if(L(e))return this._returnResult({data:null,error:e});throw e}}async _listOAuthGrants(){try{return await this._useSession(async e=>{let{data:{session:t},error:n}=e;return n?this._returnResult({data:null,error:n}):t?await R(this.fetch,`GET`,`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:t.access_token,xform:e=>({data:e,error:null})}):this._returnResult({data:null,error:new Zf})})}catch(e){if(L(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async t=>{let{data:{session:n},error:r}=t;return r?this._returnResult({data:null,error:r}):n?(await R(this.fetch,`DELETE`,`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Zf})})}catch(e){if(L(e))return this._returnResult({data:null,error:e});throw e}}async fetchJwk(e,t={keys:[]}){let n=t.keys.find(t=>t.kid===e);if(n)return n;let r=Date.now();if(n=this.jwks.keys.find(t=>t.kid===e),n&&this.jwks_cached_at+6e5>r)return n;let{data:i,error:a}=await R(this.fetch,`GET`,`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(a)throw a;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=r,n=i.keys.find(t=>t.kid===e),!n)?null:n}async getClaims(e,t={}){try{let n=e;if(!n){let{data:e,error:t}=await this.getSession();if(t||!e.session)return this._returnResult({data:null,error:t});n=e.session.access_token}let{header:r,payload:i,signature:a,raw:{header:o,payload:s}}=Np(n);t?.allowExpired||Up(i.exp);let c=!r.alg||r.alg.startsWith(`HS`)||!r.kid||!(`crypto`in globalThis&&`subtle`in globalThis.crypto)?null:await this.fetchJwk(r.kid,t?.keys?{keys:t.keys}:t?.jwks);if(!c){let{error:e}=await this.getUser(n);if(e)throw e;return{data:{claims:i,header:r,signature:a},error:null}}let l=Wp(r.alg),u=await crypto.subtle.importKey(`jwk`,c,l,!0,[`verify`]);if(!await crypto.subtle.verify(l,u,a,yp(`${o}.${s}`)))throw new cp(`Invalid JWT signature`);return{data:{claims:i,header:r,signature:a},error:null}}catch(e){if(L(e))return this._returnResult({data:null,error:e});throw e}}};Hm.nextInstanceID={};var Um=Hm,Wm=`2.99.3`,Gm=``;Gm=typeof Deno<`u`?`deno`:typeof document<`u`?`web`:typeof navigator<`u`&&navigator.product===`ReactNative`?`react-native`:`node`;var Km={headers:{"X-Client-Info":`supabase-js-${Gm}/${Wm}`}},qm={schema:`public`},Jm={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:`implicit`},Ym={};function Xm(e){"@babel/helpers - typeof";return Xm=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Xm(e)}function Zm(e,t){if(Xm(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(Xm(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Qm(e){var t=Zm(e,`string`);return Xm(t)==`symbol`?t:t+``}function $m(e,t,n){return(t=Qm(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function th(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?eh(Object(n),!0).forEach(function(t){$m(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var nh=e=>e?(...t)=>e(...t):(...e)=>fetch(...e),rh=()=>Headers,ih=(e,t,n)=>{let r=nh(n),i=rh();return async(n,a)=>{let o=await t()??e,s=new i(a?.headers);return s.has(`apikey`)||s.set(`apikey`,e),s.has(`Authorization`)||s.set(`Authorization`,`Bearer ${o}`),r(n,th(th({},a),{},{headers:s}))}};function ah(e){return e.endsWith(`/`)?e:e+`/`}function oh(e,t){let{db:n,auth:r,realtime:i,global:a}=e,{db:o,auth:s,realtime:c,global:l}=t,u={db:th(th({},o),n),auth:th(th({},s),r),realtime:th(th({},c),i),storage:{},global:th(th(th({},l),a),{},{headers:th(th({},l?.headers??{}),a?.headers??{})}),accessToken:async()=>``};return e.accessToken?u.accessToken=e.accessToken:delete u.accessToken,u}function sh(e){let t=e?.trim();if(!t)throw Error(`supabaseUrl is required.`);if(!t.match(/^https?:\/\//i))throw Error(`Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.`);try{return new URL(ah(t))}catch{throw Error(`Invalid supabaseUrl: Provided URL is malformed.`)}}var ch=class extends Um{constructor(e){super(e)}},lh=class{constructor(e,t,n){this.supabaseUrl=e,this.supabaseKey=t;let r=sh(e);if(!t)throw Error(`supabaseKey is required.`);this.realtimeUrl=new URL(`realtime/v1`,r),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace(`http`,`ws`),this.authUrl=new URL(`auth/v1`,r),this.storageUrl=new URL(`storage/v1`,r),this.functionsUrl=new URL(`functions/v1`,r);let i=`sb-${r.hostname.split(`.`)[0]}-auth-token`,a={db:qm,realtime:Ym,auth:th(th({},Jm),{},{storageKey:i}),global:Km},o=oh(n??{},a);this.storageKey=o.auth.storageKey??``,this.headers=o.global.headers??{},o.accessToken?(this.accessToken=o.accessToken,this.auth=new Proxy({},{get:(e,t)=>{throw Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(t)} is not possible`)}})):this.auth=this._initSupabaseAuthClient(o.auth??{},this.headers,o.global.fetch),this.fetch=ih(t,this._getAccessToken.bind(this),o.global.fetch),this.realtime=this._initRealtimeClient(th({headers:this.headers,accessToken:this._getAccessToken.bind(this)},o.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(e=>this.realtime.setAuth(e)).catch(e=>console.warn(`Failed to set initial Realtime auth token:`,e)),this.rest=new nd(new URL(`rest/v1`,r).href,{headers:this.headers,schema:o.db.schema,fetch:this.fetch,timeout:o.db.timeout,urlLengthLimit:o.db.urlLengthLimit}),this.storage=new If(this.storageUrl.href,this.headers,this.fetch,n?.storage),o.accessToken||this._listenForAuthEvents()}get functions(){return new Uu(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,n)}channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this;if(e.accessToken)return await e.accessToken();let{data:t}=await e.auth.getSession();return t.session?.access_token??e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:i,storageKey:a,flowType:o,lock:s,debug:c,throwOnError:l},u,d){let f={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new ch({url:this.authUrl.href,headers:th(th({},f),u),storageKey:a,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:i,flowType:o,lock:s,debug:c,throwOnError:l,fetch:d,hasCustomAuthorizationHeader:Object.keys(this.headers).some(e=>e.toLowerCase()===`authorization`)})}_initRealtimeClient(e){return new zd(this.realtimeUrl.href,th(th({},e),{},{params:th(th({},{apikey:this.supabaseKey}),e?.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,`CLIENT`,t?.access_token)})}_handleTokenChanged(e,t,n){(e===`TOKEN_REFRESHED`||e===`SIGNED_IN`)&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):e===`SIGNED_OUT`&&(this.realtime.setAuth(),t==`STORAGE`&&this.auth.signOut(),this.changedAccessToken=void 0)}},uh=(e,t,n)=>new lh(e,t,n);function dh(){if(typeof window<`u`)return!1;let e=globalThis.process;if(!e)return!1;let t=e.version;if(t==null)return!1;let n=t.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=18:!1}dh()&&console.warn(`⚠️ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217`);var fh=()=>({url:`https://uehmyyeqheqnxmzhctcd.supabase.co`,anonKey:`eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InVlaG15eWVxaGVxbnhtemhjdGNkIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MTg2MjA3NDMsImV4cCI6MjAzNDE5Njc0M30.a6tyestJTPSQ6ZdpjRGrataTSn_8_REHJC0SnoCaY2Y`}),ph=()=>{let{url:e,anonKey:t}=fh();return!!(e&&t)},mh=e=>{let{url:t,anonKey:n}=fh();return!t||!n?(console.warn(`Supabase environment variables are not configured. Supabase will not be available.`),null):uh(t,n,e)},hh=e=>e.required===!0,gh=class extends Error{constructor(e,t,n){super(e),this.code=t,this.requestId=n,this.name=`WebSocketError`}},_h=class extends gh{constructor(e,t){super(e),this.url=t,this.name=`WebSocketConnectionError`}},vh=e=>e&&typeof e.channel==`string`&&e.requestId,yh=e=>e&&e.type===`response`&&e.requestId&&e.events,bh=e=>e&&e.type===`error`&&e.requestId&&e.error;N(`1.0.0`),dc(fc(P(),Pu),{}),N(`2.0.0`),dc(ac(Pu),[]),N(`1.0.0`),dc(fc(P(),Pu),{}),N(`2.0.0`),dc(ac(Pu),[]);var xh=wc,Sh=33753,Ch=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`,wh=(e=21)=>{let t=``,n=crypto.getRandomValues(new Uint8Array(e));for(;e--;)t+=Ch[n[e]&63];return t},Th=class{ws=null;listeners=new Map;eventListeners=new Map;reconnectAttempts=0;maxReconnectAttempts=1/0;reconnectDelay=1e3;maxReconnectDelay=3e4;isConnecting=!1;connectionState=`disconnected`;stateChangeListeners=new Set;messageQueue=[];reconnectTimeout=null;currentUrl;constructor(e={}){this.config=e;let t=`ws://localhost:${Sh}`;typeof window<`u`&&window.location.port!==`5173`&&(t=`${window.location.protocol===`https:`?`wss:`:`ws:`}//${window.location.host}`);let{url:n=t,maxReconnectAttempts:r=1/0,reconnectDelay:i=1e3}=e;this.maxReconnectAttempts=r,this.reconnectDelay=i,this.currentUrl=n,this.isRenderer=typeof window<`u`}connect(e){let t=e||this.currentUrl;if(this.currentUrl=t,this.reconnectTimeout&&=(clearTimeout(this.reconnectTimeout),null),!(this.isConnecting||this.ws?.readyState===WebSocket.OPEN)){this.isConnecting=!0,this.connectionState=`connecting`,this.notifyStateChange();try{this.ws=new WebSocket(t),this.ws.onopen=()=>{console.log(`WebSocket connected to`,t),this.isConnecting=!1,this.reconnectAttempts=0,this.connectionState=`connected`,this.reconnectTimeout&&=(clearTimeout(this.reconnectTimeout),null),this.notifyStateChange();let{logger:e}=vl();e().debug(`WebSocket client connected successfully`),this.flushQueue()},this.ws.onmessage=e=>{this.handleMessage(e)},this.ws.onclose=e=>{console.log(`WebSocket disconnected`,{code:e.code,reason:e.reason}),this.isConnecting=!1,this.connectionState=`disconnected`,this.notifyStateChange(),this.scheduleReconnect()},this.ws.onerror=e=>{console.error(`WebSocket error:`,e),this.isConnecting=!1,this.connectionState=`error`,this.notifyStateChange()}}catch(e){console.error(`Failed to create WebSocket connection:`,e),this.isConnecting=!1,this.connectionState=`error`,this.notifyStateChange(),this.scheduleReconnect()}}}notifyStateChange(){this.stateChangeListeners.forEach(e=>{try{e(this.connectionState)}catch(e){console.error(`Error in state change listener:`,e)}})}scheduleReconnect(){if(this.reconnectAttempts>=this.maxReconnectAttempts){console.error(`Max reconnection attempts reached`),this.clearQueue();return}this.reconnectAttempts++;let e=Math.min(this.reconnectDelay*2**(this.reconnectAttempts-1),this.maxReconnectDelay),t=this.maxReconnectAttempts===1/0?`∞`:this.maxReconnectAttempts;this.reconnectTimeout=setTimeout(()=>{this.reconnectTimeout=null,console.log(`Attempting to reconnect (${this.reconnectAttempts}/${t}) in ${e}ms`),this.connect()},e)}handleMessage(e){try{let t=JSON.parse(e.data);if(yh(t)||bh(t))this.listeners.has(t.requestId)&&this.listeners.get(t.requestId)(t);else if(t.type===`event`&&`channel`in t){let e=t.channel,n=this.eventListeners.get(e);n&&n.forEach(n=>{try{n(t.data)}catch(t){console.error(`Error in event listener for channel ${e}:`,t)}})}else vh(t)&&console.log(`Received request message:`,t)}catch(e){console.error(`Failed to parse WebSocket message:`,e)}}send(e,t,n){return new Promise(async(r,i)=>{let{logger:a}=vl();if(!this.ws||this.ws.readyState!==WebSocket.OPEN){a().debug(`WebSocket not ready, queuing message:`,{channel:e,hasData:!!t});let o=wh();this.messageQueue.push({channel:e,data:me(Ls(t)),resolve:r,reject:i,requestId:o,listener:n});return}this.sendMessage(e,t,r,i,wh,n)})}sendMessage(e,t,n,r,i,a){let{logger:o}=vl();if(!this.ws||this.ws.readyState!==WebSocket.OPEN){o().error(`WebSocket send failed: connection not open`),r(new _h(`WebSocket is not connected`));return}let s=i(),c={channel:e,requestId:s,data:me(Ls(t))};o().debug(`Sending WebSocket message:`,{channel:e,requestId:s,hasData:!!t}),this.listeners.set(s,e=>{if(bh(e))this.listeners.delete(s),r(new gh(e.error,e.code,e.requestId));else if(yh(e)){let t=e.events;t.type===`end`?(this.listeners.delete(s),n(t.data)):a?a(t):o().info(`Received intermediate event:`,{requestId:s,eventType:t.type,hasData:!!t.data})}});try{this.ws.send(JSON.stringify(c))}catch(e){this.listeners.delete(s),r(new gh(`Failed to send message: ${e instanceof Error?e.message:`Unknown error`}`))}}async flushQueue(){let{logger:e}=vl();if(this.messageQueue.length===0)return;e().debug(`Flushing ${this.messageQueue.length} queued messages`);let t=[...this.messageQueue];this.messageQueue=[];for(let e of t)this.sendMessage(e.channel,e.data,e.resolve,e.reject,wh,e.listener)}clearQueue(){let{logger:e}=vl();if(this.messageQueue.length!==0){e().debug(`Clearing ${this.messageQueue.length} queued messages due to connection error/disconnect`);for(let e of this.messageQueue)e.reject(new _h(`WebSocket connection lost`));this.messageQueue=[]}}isConnected(){return this.ws?.readyState===WebSocket.OPEN}disconnect(e={clearQueue:!0}){this.connectionState=`disconnected`,this.notifyStateChange(),this.reconnectTimeout&&=(clearTimeout(this.reconnectTimeout),null),e.clearQueue&&this.clearQueue(),this.ws&&=(this.ws.close(),null),this.listeners.clear(),this.reconnectAttempts=0}getConnectionState(){return this.connectionState}onStateChange(e){return this.stateChangeListeners.add(e),()=>{this.stateChangeListeners.delete(e)}}reconnect(e){this.disconnect({clearQueue:!1}),this.connect(e)}on(e,t){return this.eventListeners.has(e)||this.eventListeners.set(e,new Set),this.eventListeners.get(e).add(t),()=>{this.eventListeners.get(e)?.delete(t)}}},Eh=null,Dh=()=>(Eh||=new Th,Eh),Oh=()=>{let{logger:e}=vl(),t=Dh();return{execute:async(n,r,i)=>{try{return await t.send(n,r,i)}catch(t){throw e().error(`WebSocket API error:`,t),t}},isConnected:t.isConnected.bind(t),disconnect:t.disconnect.bind(t),on:t.on.bind(t)}},kh=go(`ui`,()=>{let e=O(!1),t=O(null),n=O(null);return{isFilePickerVisible:e,filePickerOptions:t,showFilePicker:r=>(e.value=!0,t.value=r,new Promise(e=>{n.value=e})),resolveFilePicker:t=>{e.value=!1,n.value&&=(n.value(t),null)}}}),Ah=()=>{let{logger:e}=vl(),{execute:t,isConnected:n,on:r}=Oh(),i=kh(),a=async(n,r,a)=>{if(Dc.includes(n)){if(window.electron){e().debug(`Routing to Electron IPC:`,n);let t=Math.random().toString(36).substring(7);return new Promise((e,i)=>{let o=window.electron.ipcRenderer.on(n,(t,n)=>{n.type===`end`?(o(),e(n.data)):a?.(n)});window.electron.ipcRenderer.send(n,{requestId:t,data:r})})}else if(n===`dialog:showOpenDialog`)return e().debug(`Falling back to web file picker (open):`,r),{type:`success`,result:await i.showFilePicker({...r,mode:`open`})};else if(n===`dialog:showSaveDialog`)return e().debug(`Falling back to web file picker (save):`,r),{type:`success`,result:await i.showFilePicker({...r,mode:`save`})}}try{return await t(n,r,a)}catch(t){throw e().error(`API execution error:`,t),t}};return{send:(t,n)=>(e().warn(`useAPI.send() is deprecated. Use useAPI.execute() instead.`),a(t,n)),on:(e,t)=>r(e,t),execute:a,isConnected:n}},jh=(e,t)=>window.electron?window.electron.ipcRenderer.on(e,(e,n)=>{let{data:r,requestId:i}=n;return t(e,{send:e=>window.electron.ipcRenderer.send(i,e),value:r})}):(console.warn(`[Handlers] Electron not available, skipping handler for channel: ${e}`),()=>{}),Mh,z=typeof window<`u`?window:void 0,Nh=typeof globalThis<`u`?globalThis:z,Ph=Array.prototype,Fh=Ph.forEach,Ih=Ph.indexOf,Lh=Nh?.navigator,B=Nh?.document,Rh=Nh?.location,zh=Nh?.fetch,Bh=Nh!=null&&Nh.XMLHttpRequest&&`withCredentials`in new Nh.XMLHttpRequest?Nh.XMLHttpRequest:void 0,Vh=Nh?.AbortController,Hh=Lh?.userAgent,V=z??{},Uh={DEBUG:!1,LIB_VERSION:`1.215.0`},Wh=`$copy_autocapture`,Gh=[`$snapshot`,`$pageview`,`$pageleave`,`$set`,`survey dismissed`,`survey sent`,`survey shown`,`$identify`,`$groupidentify`,`$create_alias`,`$$client_ingestion_warning`,`$web_experiment_applied`,`$feature_enrollment_update`,`$feature_flag_called`];(function(e){e.GZipJS=`gzip-js`,e.Base64=`base64`})(Mh||={});var Kh={};function qh(e,t,n){if(pg(e)){if(Fh&&e.forEach===Fh)e.forEach(t,n);else if(`length`in e&&e.length===+e.length){for(var r=0,i=e.length;r<i;r++)if(r in e&&t.call(n,e[r],r)===Kh)return}}}function Jh(e,t,n){if(!bg(e)){if(pg(e))return qh(e,t,n);if(Cg(e)){for(var r of e.entries())if(t.call(n,r[1],r[0])===Kh)return}else for(var i in e)if(dg.call(e,i)&&t.call(n,e[i],i)===Kh)return}}var Yh=function(e){return qh([...arguments].slice(1),(function(t){for(var n in t)t[n]!==void 0&&(e[n]=t[n])})),e},Xh=function(e){return qh([...arguments].slice(1),(function(t){qh(t,(function(t){e.push(t)}))})),e};function Zh(e){for(var t=Object.keys(e),n=t.length,r=Array(n);n--;)r[n]=[t[n],e[t[n]]];return r}var Qh=function(e){try{return e()}catch{return}},$h=function(e){return function(){try{var t=[...arguments];return e.apply(this,t)}catch(e){W.critical(`Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A.`),W.critical(e)}}},eg=function(e){var t={};return Jh(e,(function(e,n){_g(e)&&e.length>0&&(t[n]=e)})),t};function tg(e,t){return n=e,r=e=>_g(e)&&!yg(t)?e.slice(0,t):e,i=new Set,function e(t,n){return t===Object(t)?i.has(t)?void 0:(i.add(t),pg(t)?(a=[],qh(t,(t=>{a.push(e(t))}))):(a={},Jh(t,((t,n)=>{i.has(t)||(a[n]=e(t,n))}))),a):r?r(t,n):t;var a}(n);var n,r,i}var ng=[`herokuapp.com`,`vercel.app`,`netlify.app`];function rg(e){var t=e?.hostname;if(!_g(t))return!1;var n=t.split(`.`).slice(-2).join(`.`);for(var r of ng)if(n===r)return!1;return!0}function ig(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]}function ag(e,t,n,r){var{capture:i=!1,passive:a=!0}=r??{};e?.addEventListener(t,n,{capture:i,passive:a})}function H(e,t){return e.indexOf(t)!==-1}var og=function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``)},sg=function(e){return e.replace(/^\$/,``)},cg=function(e,t){if(!function(e){try{new RegExp(e)}catch{return!1}return!0}(t))return!1;try{return new RegExp(t).test(e)}catch{return!1}},lg=Array.isArray,ug=Object.prototype,dg=ug.hasOwnProperty,fg=ug.toString,pg=lg||function(e){return fg.call(e)===`[object Array]`},mg=e=>typeof e==`function`,hg=e=>e===Object(e)&&!pg(e),gg=e=>{if(hg(e)){for(var t in e)if(dg.call(e,t))return!1;return!0}return!1},U=e=>e===void 0,_g=e=>fg.call(e)==`[object String]`,vg=e=>_g(e)&&e.trim().length===0,yg=e=>e===null,bg=e=>U(e)||yg(e),xg=e=>fg.call(e)==`[object Number]`,Sg=e=>fg.call(e)===`[object Boolean]`,Cg=e=>e instanceof FormData,wg=e=>H(Gh,e),Tg=e=>{var t={_log:function(t){if(z&&(Uh.DEBUG||V.POSTHOG_DEBUG)&&!U(z.console)&&z.console){for(var n=(`__rrweb_original__`in z.console[t])?z.console[t].__rrweb_original__:z.console[t],r=arguments.length,i=Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];n(e,...i)}},info:function(){var e=[...arguments];t._log(`log`,...e)},warn:function(){var e=[...arguments];t._log(`warn`,...e)},error:function(){var e=[...arguments];t._log(`error`,...e)},critical:function(){console.error(e,...arguments)},uninitializedWarning:e=>{t.error(`You must initialize PostHog before calling ${e}`)},createLogger:t=>Tg(`${e} ${t}`)};return t},W=Tg(`[PostHog.js]`),Eg=W.createLogger,Dg=Eg(`[ExternalScriptsLoader]`),Og=(e,t,n)=>{if(e.config.disable_external_dependency_loading)return Dg.warn(`${t} was requested but loading of external scripts is disabled.`),n(`Loading of external scripts is disabled`);var r=()=>{if(!B)return n(`document not found`);var r=B.createElement(`script`);if(r.type=`text/javascript`,r.crossOrigin=`anonymous`,r.src=t,r.onload=e=>n(void 0,e),r.onerror=e=>n(e),e.config.prepare_external_dependency_script&&(r=e.config.prepare_external_dependency_script(r)),!r)return n(`prepare_external_dependency_script returned null`);var i,a=B.querySelectorAll(`body > script`);a.length>0?(i=a[0].parentNode)==null||i.insertBefore(r,a[0]):B.body.appendChild(r)};B!=null&&B.body?r():B?.addEventListener(`DOMContentLoaded`,r)};function kg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function G(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?kg(Object(n),!0).forEach((function(t){K(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function K(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ag(e,t){if(e==null)return{};var n,r,i=function(e,t){if(e==null)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}V.__PosthogExtensions__=V.__PosthogExtensions__||{},V.__PosthogExtensions__.loadExternalDependency=(e,t,n)=>{var r=`/static/${t}.js?v=${e.version}`;if(t===`remote-config`&&(r=`/array/${e.config.token}/config.js`),t===`toolbar`){var i=3e5,a=Math.floor(Date.now()/i)*i;r=`${r}&t=${a}`}Og(e,e.requestRouter.endpointFor(`assets`,r),n)},V.__PosthogExtensions__.loadSiteApp=(e,t,n)=>{Og(e,e.requestRouter.endpointFor(`api`,t),n)};var jg=`$people_distinct_id`,Mg=`__alias`,Ng=`__timers`,Pg=`$autocapture_disabled_server_side`,Fg=`$heatmaps_enabled_server_side`,Ig=`$exception_capture_enabled_server_side`,Lg=`$web_vitals_enabled_server_side`,Rg=`$dead_clicks_enabled_server_side`,zg=`$web_vitals_allowed_metrics`,Bg=`$session_recording_enabled_server_side`,Vg=`$console_log_recording_enabled_server_side`,Hg=`$session_recording_network_payload_capture`,Ug=`$session_recording_canvas_recording`,Wg=`$replay_sample_rate`,Gg=`$replay_minimum_duration`,Kg=`$replay_script_config`,qg=`$sesid`,Jg=`$session_is_sampled`,Yg=`$session_recording_url_trigger_activated_session`,Xg=`$session_recording_event_trigger_activated_session`,Zg=`$enabled_feature_flags`,Qg=`$early_access_features`,$g=`$stored_person_properties`,e_=`$stored_group_properties`,t_=`$surveys`,n_=`$surveys_activated`,r_=`$flag_call_reported`,i_=`$user_state`,a_=`$client_session_props`,o_=`$capture_rate_limit`,s_=`$initial_campaign_params`,c_=`$initial_referrer_info`,l_=`$initial_person_info`,u_=`$epp`,d_=`__POSTHOG_TOOLBAR__`,f_=`$posthog_cookieless`,p_=[jg,Mg,`__cmpns`,Ng,Bg,Fg,qg,Zg,i_,Qg,e_,$g,t_,r_,a_,o_,s_,c_,u_],m_=Eg(`[FeatureFlags]`),h_=`$active_feature_flags`,g_=`$override_feature_flags`,__=`$feature_flag_payloads`,v_=`$override_feature_flag_payloads`,y_=e=>{var t={};for(var[n,r]of Zh(e||{}))r&&(t[n]=r);return t},b_=class{constructor(e){K(this,`_override_warning`,!1),K(this,`_hasLoadedFlags`,!1),K(this,`_requestInFlight`,!1),K(this,`_reloadingDisabled`,!1),K(this,`_additionalReloadRequested`,!1),K(this,`_decideCalled`,!1),K(this,`_flagsLoadedFromRemote`,!1),this.instance=e,this.featureFlagEventHandlers=[]}decide(){if(this.instance.config.__preview_remote_config)this._decideCalled=!0;else{var e=!this._reloadDebouncer&&(this.instance.config.advanced_disable_feature_flags||this.instance.config.advanced_disable_feature_flags_on_first_load);this._callDecideEndpoint({disableFlags:e})}}get hasLoadedFlags(){return this._hasLoadedFlags}getFlags(){return Object.keys(this.getFlagVariants())}getFlagVariants(){var e=this.instance.get_property(Zg),t=this.instance.get_property(g_);if(!t)return e||{};for(var n=Yh({},e),r=Object.keys(t),i=0;i<r.length;i++)n[r[i]]=t[r[i]];return this._override_warning||=(m_.warn(` Overriding feature flags!`,{enabledFlags:e,overriddenFlags:t,finalFlags:n}),!0),n}getFlagPayloads(){var e=this.instance.get_property(__),t=this.instance.get_property(v_);if(!t)return e||{};for(var n=Yh({},e||{}),r=Object.keys(t),i=0;i<r.length;i++)n[r[i]]=t[r[i]];return this._override_warning||=(m_.warn(` Overriding feature flag payloads!`,{flagPayloads:e,overriddenPayloads:t,finalPayloads:n}),!0),n}reloadFeatureFlags(){this._reloadingDisabled||this.instance.config.advanced_disable_feature_flags||this._reloadDebouncer||(this._reloadDebouncer=setTimeout((()=>{this._callDecideEndpoint()}),5))}clearDebouncer(){clearTimeout(this._reloadDebouncer),this._reloadDebouncer=void 0}ensureFlagsLoaded(){this._hasLoadedFlags||this._requestInFlight||this._reloadDebouncer||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this._reloadingDisabled=e}_callDecideEndpoint(e){if(this.clearDebouncer(),!this.instance.config.advanced_disable_decide)if(this._requestInFlight)this._additionalReloadRequested=!0;else{var t={token:this.instance.config.token,distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:this.instance.get_property($g),group_properties:this.instance.get_property(e_)};(e!=null&&e.disableFlags||this.instance.config.advanced_disable_feature_flags)&&(t.disable_flags=!0),this._requestInFlight=!0,this.instance._send_request({method:`POST`,url:this.instance.requestRouter.endpointFor(`api`,`/decide/?v=3`),data:t,compression:this.instance.config.disable_compression?void 0:Mh.Base64,timeout:this.instance.config.feature_flag_request_timeout_ms,callback:e=>{var n=!0;(e.statusCode===200&&(this.$anon_distinct_id=void 0,n=!1),this._requestInFlight=!1,this._decideCalled)||(this._decideCalled=!0,this.instance._onRemoteConfig(e.json??{})),t.disable_flags||(this._flagsLoadedFromRemote=!n,this.receivedFeatureFlags(e.json??{},n),this._additionalReloadRequested&&(this._additionalReloadRequested=!1,this._callDecideEndpoint()))}})}}getFeatureFlag(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this._hasLoadedFlags||this.getFlags()&&this.getFlags().length>0){var n,r,i,a,o,s=this.getFlagVariants()[e],c=`${s}`,l=this.instance.get_property(r_)||{};return(t.send_event||!(`send_event`in t))&&(!(e in l)||!l[e].includes(c))&&(pg(l[e])?l[e].push(c):l[e]=[c],(n=this.instance.persistence)==null||n.register({[r_]:l}),this.instance.capture(`$feature_flag_called`,{$feature_flag:e,$feature_flag_response:s,$feature_flag_payload:this.getFeatureFlagPayload(e)||null,$feature_flag_bootstrapped_response:((r=this.instance.config.bootstrap)==null||(i=r.featureFlags)==null?void 0:i[e])||null,$feature_flag_bootstrapped_payload:((a=this.instance.config.bootstrap)==null||(o=a.featureFlagPayloads)==null?void 0:o[e])||null,$used_bootstrap_value:!this._flagsLoadedFromRemote})),s}m_.warn(`getFeatureFlag for key "`+e+`" failed. Feature flags didn't load in time.`)}getFeatureFlagPayload(e){return this.getFlagPayloads()[e]}isFeatureEnabled(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this._hasLoadedFlags||this.getFlags()&&this.getFlags().length>0)return!!this.getFeatureFlag(e,t);m_.warn(`isFeatureEnabled for key "`+e+`" failed. Feature flags didn't load in time.`)}addFeatureFlagsHandler(e){this.featureFlagEventHandlers.push(e)}removeFeatureFlagsHandler(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter((t=>t!==e))}receivedFeatureFlags(e,t){if(this.instance.persistence){this._hasLoadedFlags=!0;var n=this.getFlagVariants(),r=this.getFlagPayloads();(function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=e.featureFlags,a=e.featureFlagPayloads;if(i)if(pg(i)){var o={};if(i)for(var s=0;s<i.length;s++)o[i[s]]=!0;t&&t.register({[h_]:i,[Zg]:o})}else{var c=i,l=a;e.errorsWhileComputingFlags&&(c=G(G({},n),c),l=G(G({},r),l)),t&&t.register({[h_]:Object.keys(y_(c)),[Zg]:c||{},[__]:l||{}})}})(e,this.instance.persistence,n,r),this._fireFeatureFlagsCallbacks(t)}}override(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];m_.warn(`override is deprecated. Please use overrideFeatureFlags instead.`),this.overrideFeatureFlags({flags:e,suppressWarning:t})}overrideFeatureFlags(e){if(!this.instance.__loaded||!this.instance.persistence)return m_.uninitializedWarning(`posthog.feature_flags.overrideFeatureFlags`);if(!1===e)return this.instance.persistence.unregister(g_),this.instance.persistence.unregister(v_),void this._fireFeatureFlagsCallbacks();if(e&&typeof e==`object`&&(`flags`in e||`payloads`in e)){var t,n=e;if(this._override_warning=!!((t=n.suppressWarning)!=null&&t),`flags`in n){if(!1===n.flags)this.instance.persistence.unregister(g_);else if(n.flags)if(pg(n.flags)){for(var r={},i=0;i<n.flags.length;i++)r[n.flags[i]]=!0;this.instance.persistence.register({[g_]:r})}else this.instance.persistence.register({[g_]:n.flags})}`payloads`in n&&(!1===n.payloads?this.instance.persistence.unregister(v_):n.payloads&&this.instance.persistence.register({[v_]:n.payloads})),this._fireFeatureFlagsCallbacks();return}this._fireFeatureFlagsCallbacks()}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this._hasLoadedFlags){var{flags:t,flagVariants:n}=this._prepareFeatureFlagsForCallbacks();e(t,n)}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,t){var n,r=(this.instance.get_property(Qg)||[]).find((t=>t.flagKey===e)),i={[`\$feature_enrollment/${e}`]:t},a={$feature_flag:e,$feature_enrollment:t,$set:i};r&&(a.$early_access_feature_name=r.name),this.instance.capture(`$feature_enrollment_update`,a),this.setPersonPropertiesForFlags(i,!1);var o=G(G({},this.getFlagVariants()),{},{[e]:t});(n=this.instance.persistence)==null||n.register({[h_]:Object.keys(y_(o)),[Zg]:o}),this._fireFeatureFlagsCallbacks()}getEarlyAccessFeatures(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=this.instance.get_property(Qg);if(n&&!t)return e(n);this.instance._send_request({url:this.instance.requestRouter.endpointFor(`api`,`/api/early_access_features/?token=${this.instance.config.token}`),method:`GET`,callback:t=>{var n;if(t.json){var r=t.json.earlyAccessFeatures;return(n=this.instance.persistence)==null||n.register({[Qg]:r}),e(r)}}})}_prepareFeatureFlagsForCallbacks(){var e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter((e=>t[e])),flagVariants:Object.keys(t).filter((e=>t[e])).reduce(((e,n)=>(e[n]=t[n],e)),{})}}_fireFeatureFlagsCallbacks(e){var{flags:t,flagVariants:n}=this._prepareFeatureFlagsForCallbacks();this.featureFlagEventHandlers.forEach((r=>r(t,n,{errorsLoading:e})))}setPersonPropertiesForFlags(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],n=this.instance.get_property($g)||{};this.instance.register({[$g]:G(G({},n),e)}),t&&this.instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this.instance.unregister($g)}setGroupPropertiesForFlags(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],n=this.instance.get_property(e_)||{};Object.keys(n).length!==0&&Object.keys(n).forEach((t=>{n[t]=G(G({},n[t]),e[t]),delete e[t]})),this.instance.register({[e_]:G(G({},n),e)}),t&&this.instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var t=this.instance.get_property(e_)||{};this.instance.register({[e_]:G(G({},t),{},{[e]:{}})})}else this.instance.unregister(e_)}};Math.trunc||(Math.trunc=function(e){return e<0?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return xg(e)&&isFinite(e)&&Math.floor(e)===e});var x_=`0123456789abcdef`,S_=class e{constructor(e){if(this.bytes=e,e.length!==16)throw TypeError(`not 128-bit length`)}static fromFieldsV7(t,n,r,i){if(!Number.isInteger(t)||!Number.isInteger(n)||!Number.isInteger(r)||!Number.isInteger(i)||t<0||n<0||r<0||i<0||t>0xffffffffffff||n>4095||r>1073741823||i>4294967295)throw RangeError(`invalid field value`);var a=new Uint8Array(16);return a[0]=t/2**40,a[1]=t/2**32,a[2]=t/2**24,a[3]=t/2**16,a[4]=t/2**8,a[5]=t,a[6]=112|n>>>8,a[7]=n,a[8]=128|r>>>24,a[9]=r>>>16,a[10]=r>>>8,a[11]=r,a[12]=i>>>24,a[13]=i>>>16,a[14]=i>>>8,a[15]=i,new e(a)}toString(){for(var e=``,t=0;t<this.bytes.length;t++)e=e+x_.charAt(this.bytes[t]>>>4)+x_.charAt(15&this.bytes[t]),t!==3&&t!==5&&t!==7&&t!==9||(e+=`-`);if(e.length!==36)throw Error(`Invalid UUIDv7 was generated`);return e}clone(){return new e(this.bytes.slice(0))}equals(e){return this.compareTo(e)===0}compareTo(e){for(var t=0;t<16;t++){var n=this.bytes[t]-e.bytes[t];if(n!==0)return Math.sign(n)}return 0}},C_=class{constructor(){K(this,`timestamp`,0),K(this,`counter`,0),K(this,`random`,new E_)}generate(){var e=this.generateOrAbort();if(U(e)){this.timestamp=0;var t=this.generateOrAbort();if(U(t))throw Error(`Could not generate UUID after timestamp reset`);return t}return e}generateOrAbort(){var e=Date.now();if(e>this.timestamp)this.timestamp=e,this.resetCounter();else{if(!(e+1e4>this.timestamp))return;this.counter++,this.counter>4398046511103&&(this.timestamp++,this.resetCounter())}return S_.fromFieldsV7(this.timestamp,Math.trunc(this.counter/2**30),this.counter&2**30-1,this.random.nextUint32())}resetCounter(){this.counter=1024*this.random.nextUint32()+(1023&this.random.nextUint32())}},w_,T_=e=>{if(typeof UUIDV7_DENY_WEAK_RNG<`u`&&UUIDV7_DENY_WEAK_RNG)throw Error(`no cryptographically strong RNG available`);for(var t=0;t<e.length;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};z&&!U(z.crypto)&&crypto.getRandomValues&&(T_=e=>crypto.getRandomValues(e));var E_=class{constructor(){K(this,`buffer`,new Uint32Array(8)),K(this,`cursor`,1/0)}nextUint32(){return this.cursor>=this.buffer.length&&(T_(this.buffer),this.cursor=0),this.buffer[this.cursor++]}},D_=()=>O_().toString(),O_=()=>(w_||=new C_).generate(),k_=`Thu, 01 Jan 1970 00:00:00 GMT`,A_=``,j_=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i;function M_(e,t){if(t){var n=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:B;if(A_)return A_;if(!t||[`localhost`,`127.0.0.1`].includes(e))return``;for(var n=e.split(`.`),r=Math.min(n.length,8),i=`dmn_chk_`+D_(),a=RegExp(`(^|;)\\s*`+i+`=1`);!A_&&r--;){var o=n.slice(r).join(`.`),s=i+`=1;domain=.`+o;t.cookie=s,a.test(t.cookie)&&(t.cookie=s+`;expires=`+k_,A_=o)}return A_}(e);if(!n){var r=(e=>{var t=e.match(j_);return t?t[0]:``})(e);r!==n&&W.info(`Warning: cookie subdomain discovery mismatch`,r,n),n=r}return n?`; domain=.`+n:``}return``}var N_={is_supported:()=>!!B,error:function(e){W.error(`cookieStore error: `+e)},get:function(e){if(B){try{for(var t=e+`=`,n=B.cookie.split(`;`).filter((e=>e.length)),r=0;r<n.length;r++){for(var i=n[r];i.charAt(0)==` `;)i=i.substring(1,i.length);if(i.indexOf(t)===0)return decodeURIComponent(i.substring(t.length,i.length))}}catch{}return null}},parse:function(e){var t;try{t=JSON.parse(N_.get(e))||{}}catch{}return t},set:function(e,t,n,r,i){if(B)try{var a=``,o=``,s=M_(B.location.hostname,r);if(n){var c=new Date;c.setTime(c.getTime()+24*n*60*60*1e3),a=`; expires=`+c.toUTCString()}i&&(o=`; secure`);var l=e+`=`+encodeURIComponent(JSON.stringify(t))+a+`; SameSite=Lax; path=/`+s+o;return l.length>3686.4&&W.warn(`cookieStore warning: large cookie, len=`+l.length),B.cookie=l,l}catch{return}},remove:function(e,t){try{N_.set(e,``,-1,t)}catch{return}}},P_=null,F_={is_supported:function(){if(!yg(P_))return P_;var e=!0;if(U(z))e=!1;else try{var t=`__mplssupport__`;F_.set(t,`xyz`),F_.get(t)!==`"xyz"`&&(e=!1),F_.remove(t)}catch{e=!1}return e||W.error(`localStorage unsupported; falling back to cookie store`),P_=e,e},error:function(e){W.error(`localStorage error: `+e)},get:function(e){try{return z?.localStorage.getItem(e)}catch(e){F_.error(e)}return null},parse:function(e){try{return JSON.parse(F_.get(e))||{}}catch{}return null},set:function(e,t){try{z?.localStorage.setItem(e,JSON.stringify(t))}catch(e){F_.error(e)}},remove:function(e){try{z?.localStorage.removeItem(e)}catch(e){F_.error(e)}}},I_=[`distinct_id`,qg,Jg,u_,l_],L_=G(G({},F_),{},{parse:function(e){try{var t={};try{t=N_.parse(e)||{}}catch{}var n=Yh(t,JSON.parse(F_.get(e)||`{}`));return F_.set(e,n),n}catch{}return null},set:function(e,t,n,r,i,a){try{F_.set(e,t,void 0,void 0,a);var o={};I_.forEach((e=>{t[e]&&(o[e]=t[e])})),Object.keys(o).length&&N_.set(e,o,n,r,i,a)}catch(e){F_.error(e)}},remove:function(e,t){try{z?.localStorage.removeItem(e),N_.remove(e,t)}catch(e){F_.error(e)}}}),R_={},z_={is_supported:function(){return!0},error:function(e){W.error(`memoryStorage error: `+e)},get:function(e){return R_[e]||null},parse:function(e){return R_[e]||null},set:function(e,t){R_[e]=t},remove:function(e){delete R_[e]}},B_=null,V_={is_supported:function(){if(!yg(B_))return B_;if(B_=!0,U(z))B_=!1;else try{var e=`__support__`;V_.set(e,`xyz`),V_.get(e)!==`"xyz"`&&(B_=!1),V_.remove(e)}catch{B_=!1}return B_},error:function(e){W.error(`sessionStorage error: `,e)},get:function(e){try{return z?.sessionStorage.getItem(e)}catch(e){V_.error(e)}return null},parse:function(e){try{return JSON.parse(V_.get(e))||null}catch{}return null},set:function(e,t){try{z?.sessionStorage.setItem(e,JSON.stringify(t))}catch(e){V_.error(e)}},remove:function(e){try{z?.sessionStorage.removeItem(e)}catch(e){V_.error(e)}}},H_=[`localhost`,`127.0.0.1`],U_=e=>{var t=B?.createElement(`a`);return U(t)?null:(t.href=e,t)},W_=function(e){var t,n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`&`,i=[];return Jh(e,(function(e,r){U(e)||U(r)||r===`undefined`||(t=encodeURIComponent((e=>e instanceof File)(e)?e.name:e.toString()),n=encodeURIComponent(r),i[i.length]=n+`=`+t)})),i.join(r)},G_=function(e,t){for(var n,r=((e.split(`#`)[0]||``).split(`?`)[1]||``).split(`&`),i=0;i<r.length;i++){var a=r[i].split(`=`);if(a[0]===t){n=a;break}}if(!pg(n)||n.length<2)return``;var o=n[1];try{o=decodeURIComponent(o)}catch{W.error(`Skipping decoding for malformed query param: `+o)}return o.replace(/\+/g,` `)},K_=function(e,t,n){if(!e||!t||!t.length)return e;for(var r=e.split(`#`),i=r[0]||``,a=r[1],o=i.split(`?`),s=o[1],c=o[0],l=(s||``).split(`&`),u=[],d=0;d<l.length;d++){var f=l[d].split(`=`);pg(f)&&(t.includes(f[0])?u.push(f[0]+`=`+n):u.push(l[d]))}var p=c;return s!=null&&(p+=`?`+u.join(`&`)),a!=null&&(p+=`#`+a),p},q_=function(e,t){var n=e.match(RegExp(t+`=([^&]*)`));return n?n[1]:null},J_=`Mobile`,Y_=`iOS`,X_=`Android`,Z_=`Tablet`,Q_=X_+` `+Z_,$_=`iPad`,ev=`Apple`,tv=ev+` Watch`,nv=`Safari`,rv=`BlackBerry`,iv=`Samsung`,av=iv+`Browser`,ov=iv+` Internet`,sv=`Chrome`,cv=sv+` OS`,lv=sv+` `+Y_,uv=`Internet Explorer`,dv=uv+` `+J_,fv=`Opera`,pv=fv+` Mini`,mv=`Edge`,hv=`Microsoft `+mv,gv=`Firefox`,_v=gv+` `+Y_,vv=`Nintendo`,yv=`PlayStation`,bv=`Xbox`,xv=X_+` `+J_,Sv=J_+` `+nv,Cv=`Windows`,wv=Cv+` Phone`,Tv=`Nokia`,Ev=`Ouya`,Dv=`Generic`,Ov=Dv+` `+J_.toLowerCase(),kv=Dv+` `+Z_.toLowerCase(),Av=`Konqueror`,jv=`(\\d+(\\.\\d+)?)`,Mv=RegExp(`Version/`+jv),Nv=new RegExp(bv,`i`),Pv=RegExp(yv+` \\w+`,`i`),Fv=RegExp(vv+` \\w+`,`i`),Iv=RegExp(rv+`|PlayBook|BB10`,`i`),Lv={"NT3.51":`NT 3.11`,"NT4.0":`NT 4.0`,"5.0":`2000`,5.1:`XP`,5.2:`XP`,"6.0":`Vista`,6.1:`7`,6.2:`8`,6.3:`8.1`,6.4:`10`,"10.0":`10`},Rv=(e,t)=>t&&H(t,ev)||function(e){return H(e,nv)&&!H(e,sv)&&!H(e,X_)}(e),zv=function(e,t){return t||=``,H(e,` OPR/`)&&H(e,`Mini`)?pv:H(e,` OPR/`)?fv:Iv.test(e)?rv:H(e,`IE`+J_)||H(e,`WPDesktop`)?dv:H(e,av)?ov:H(e,mv)||H(e,`Edg/`)?hv:H(e,`FBIOS`)?`Facebook `+J_:H(e,`UCWEB`)||H(e,`UCBrowser`)?`UC Browser`:H(e,`CriOS`)?lv:H(e,`CrMo`)||H(e,sv)?sv:H(e,X_)&&H(e,nv)?xv:H(e,`FxiOS`)?_v:H(e.toLowerCase(),Av.toLowerCase())?Av:Rv(e,t)?H(e,J_)?Sv:nv:H(e,gv)?gv:H(e,`MSIE`)||H(e,`Trident/`)?uv:H(e,`Gecko`)?gv:``},Bv={[dv]:[RegExp(`rv:`+jv)],[hv]:[RegExp(mv+`?\\/`+jv)],[sv]:[RegExp(`(`+sv+`|CrMo)\\/`+jv)],[lv]:[RegExp(`CriOS\\/`+jv)],"UC Browser":[RegExp(`(UCBrowser|UCWEB)\\/`+jv)],[nv]:[Mv],[Sv]:[Mv],[fv]:[RegExp(`(Opera|OPR)\\/`+jv)],[gv]:[RegExp(gv+`\\/`+jv)],[_v]:[RegExp(`FxiOS\\/`+jv)],[Av]:[RegExp(`Konqueror[:/]?`+jv,`i`)],[rv]:[RegExp(rv+` `+jv),Mv],[xv]:[RegExp(`android\\s`+jv,`i`)],[ov]:[RegExp(av+`\\/`+jv)],[uv]:[RegExp(`(rv:|MSIE )`+jv)],Mozilla:[RegExp(`rv:`+jv)]},Vv=[[RegExp(bv+`; `+bv+` (.*?)[);]`,`i`),e=>[bv,e&&e[1]||``]],[new RegExp(vv,`i`),[vv,``]],[new RegExp(yv,`i`),[yv,``]],[Iv,[rv,``]],[new RegExp(Cv,`i`),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[wv,``];if(new RegExp(J_).test(t)&&!/IEMobile\b/.test(t))return[Cv+` `+J_,``];var n=/Windows NT ([0-9.]+)/i.exec(t);if(n&&n[1]){var r=Lv[n[1]]||``;return/arm/i.test(t)&&(r=`RT`),[Cv,r]}return[Cv,``]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>e&&e[3]?[Y_,[e[3],e[4],e[5]||`0`].join(`.`)]:[Y_,``]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t=``;return e&&e.length>=3&&(t=U(e[2])?e[3]:e[2]),[`watchOS`,t]}],[RegExp(`(`+X_+` (\\d+)\\.(\\d+)\\.?(\\d+)?|`+X_+`)`,`i`),e=>e&&e[2]?[X_,[e[2],e[3],e[4]||`0`].join(`.`)]:[X_,``]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var t=[`Mac OS X`,``];return e&&e[1]&&(t[1]=[e[1],e[2],e[3]||`0`].join(`.`)),t}],[/Mac/i,[`Mac OS X`,``]],[/CrOS/,[cv,``]],[/Linux|debian/i,[`Linux`,``]]],Hv=function(e){return Fv.test(e)?vv:Pv.test(e)?yv:Nv.test(e)?bv:new RegExp(Ev,`i`).test(e)?Ev:RegExp(`(`+wv+`|WPDesktop)`,`i`).test(e)?wv:/iPad/.test(e)?$_:/iPod/.test(e)?`iPod Touch`:/iPhone/.test(e)?`iPhone`:/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?tv:Iv.test(e)?rv:/(kobo)\s(ereader|touch)/i.test(e)?`Kobo`:new RegExp(Tv,`i`).test(e)?Tv:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?`Kindle Fire`:/(Android|ZTE)/i.test(e)?!new RegExp(J_).test(e)||/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)?/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?X_:Q_:X_:RegExp(`(pda|`+J_+`)`,`i`).test(e)?Ov:new RegExp(Z_,`i`).test(e)&&!RegExp(Z_+` pc`,`i`).test(e)?kv:``},Uv=`https?://(.*)`,Wv=[`gclid`,`gclsrc`,`dclid`,`gbraid`,`wbraid`,`fbclid`,`msclkid`,`twclid`,`li_fat_id`,`igshid`,`ttclid`,`rdt_cid`,`irclid`,`_kx`],Gv=Xh([`utm_source`,`utm_medium`,`utm_campaign`,`utm_content`,`utm_term`,`gad_source`,`mc_cid`],Wv),Kv=`<masked>`,qv={campaignParams:function(){var{customTrackedParams:e,maskPersonalDataProperties:t,customPersonalDataProperties:n}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!B)return{};var r=t?Xh([],Wv,n||[]):[];return this._campaignParamsFromUrl(K_(B.URL,r,Kv),e)},_campaignParamsFromUrl:function(e,t){var n=Gv.concat(t||[]),r={};return Jh(n,(function(t){r[t]=G_(e,t)||null})),r},_searchEngine:function(e){return e?e.search(Uv+`google.([^/?]*)`)===0?`google`:e.search(Uv+`bing.com`)===0?`bing`:e.search(Uv+`yahoo.com`)===0?`yahoo`:e.search(Uv+`duckduckgo.com`)===0?`duckduckgo`:null:null},_searchInfoFromReferrer:function(e){var t=qv._searchEngine(e),n=t==`yahoo`?`p`:`q`,r={};if(!yg(t)){r.$search_engine=t;var i=B?G_(B.referrer,n):``;i.length&&(r.ph_keyword=i)}return r},searchInfo:function(){var e=B?.referrer;return e?this._searchInfoFromReferrer(e):{}},browser:zv,browserVersion:function(e,t){var n=Bv[zv(e,t)];if(U(n))return null;for(var r=0;r<n.length;r++){var i=n[r],a=e.match(i);if(a)return parseFloat(a[a.length-2])}return null},browserLanguage:function(){return navigator.language||navigator.userLanguage},browserLanguagePrefix:function(){var e=this.browserLanguage();return typeof e==`string`?e.split(`-`)[0]:void 0},os:function(e){for(var t=0;t<Vv.length;t++){var[n,r]=Vv[t],i=n.exec(e),a=i&&(mg(r)?r(i,e):r);if(a)return a}return[``,``]},device:Hv,deviceType:function(e){var t=Hv(e);return t===$_||t===Q_||t===`Kobo`||t===`Kindle Fire`||t===kv?Z_:t===vv||t===bv||t===yv||t===Ev?`Console`:t===tv?`Wearable`:t?J_:`Desktop`},referrer:function(){return B?.referrer||`$direct`},referringDomain:function(){return B!=null&&B.referrer&&U_(B.referrer)?.host||`$direct`},referrerInfo:function(){return{$referrer:this.referrer(),$referring_domain:this.referringDomain()}},initialPersonInfo:function(){return{r:this.referrer().substring(0,1e3),u:Rh?.href.substring(0,1e3)}},initialPersonPropsFromInfo:function(e){var{r:t,u:n}=e,r={$initial_referrer:t,$initial_referring_domain:t==null?void 0:t==`$direct`?`$direct`:U_(t)?.host};if(n){r.$initial_current_url=n;var i=U_(n);r.$initial_host=i?.host,r.$initial_pathname=i?.pathname,Jh(this._campaignParamsFromUrl(n),(function(e,t){r[`$initial_`+sg(t)]=e}))}return t&&Jh(this._searchInfoFromReferrer(t),(function(e,t){r[`$initial_`+sg(t)]=e})),r},timezone:function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}},timezoneOffset:function(){try{return new Date().getTimezoneOffset()}catch{return}},properties:function(){var{maskPersonalDataProperties:e,customPersonalDataProperties:t}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!Hh)return{};var n=e?Xh([],Wv,t||[]):[],[r,i]=qv.os(Hh);return Yh(eg({$os:r,$os_version:i,$browser:qv.browser(Hh,navigator.vendor),$device:qv.device(Hh),$device_type:qv.deviceType(Hh),$timezone:qv.timezone(),$timezone_offset:qv.timezoneOffset()}),{$current_url:K_(Rh?.href,n,Kv),$host:Rh?.host,$pathname:Rh?.pathname,$raw_user_agent:Hh.length>1e3?Hh.substring(0,997)+`...`:Hh,$browser_version:qv.browserVersion(Hh,navigator.vendor),$browser_language:qv.browserLanguage(),$browser_language_prefix:qv.browserLanguagePrefix(),$screen_height:z?.screen.height,$screen_width:z?.screen.width,$viewport_height:z?.innerHeight,$viewport_width:z?.innerWidth,$lib:`web`,$lib_version:Uh.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})},people_properties:function(){if(!Hh)return{};var[e,t]=qv.os(Hh);return Yh(eg({$os:e,$os_version:t,$browser:qv.browser(Hh,navigator.vendor)}),{$browser_version:qv.browserVersion(Hh,navigator.vendor)})}},Jv=[`cookie`,`localstorage`,`localstorage+cookie`,`sessionstorage`,`memory`],Yv=class{constructor(e){this.config=e,this.props={},this.campaign_params_saved=!1,this.name=(e=>{var t=``;return e.token&&(t=e.token.replace(/\+/g,`PL`).replace(/\//g,`SL`).replace(/=/g,`EQ`)),e.persistence_name?`ph_`+e.persistence_name:`ph_`+t+`_posthog`})(e),this.storage=this.buildStorage(e),this.load(),e.debug&&W.info(`Persistence loaded`,e.persistence,G({},this.props)),this.update_config(e,e),this.save()}buildStorage(e){Jv.indexOf(e.persistence.toLowerCase())===-1&&(W.critical(`Unknown persistence type `+e.persistence+`; falling back to localStorage+cookie`),e.persistence=`localStorage+cookie`);var t=e.persistence.toLowerCase();return t===`localstorage`&&F_.is_supported()?F_:t===`localstorage+cookie`&&L_.is_supported()?L_:t===`sessionstorage`&&V_.is_supported()?V_:t===`memory`?z_:t===`cookie`?N_:L_.is_supported()?L_:N_}properties(){var e={};return Jh(this.props,(function(t,n){if(n===Zg&&hg(t))for(var r=Object.keys(t),i=0;i<r.length;i++)e[`\$feature/${r[i]}`]=t[r[i]];else o=n,s=!1,(yg(a=p_)?s:Ih&&a.indexOf===Ih?a.indexOf(o)!=-1:(Jh(a,(function(e){if(s||=e===o)return Kh})),s))||(e[n]=t);var a,o,s})),e}load(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=Yh({},e))}}save(){this.disabled||this.storage.set(this.name,this.props,this.expire_days,this.cross_subdomain,this.secure,this.config.debug)}remove(){this.storage.remove(this.name,!1),this.storage.remove(this.name,!0)}clear(){this.remove(),this.props={}}register_once(e,t,n){if(hg(e)){U(t)&&(t=`None`),this.expire_days=U(n)?this.default_expiry:n;var r=!1;if(Jh(e,((e,n)=>{this.props.hasOwnProperty(n)&&this.props[n]!==t||(this.props[n]=e,r=!0)})),r)return this.save(),!0}return!1}register(e,t){if(hg(e)){this.expire_days=U(t)?this.default_expiry:t;var n=!1;if(Jh(e,((t,r)=>{e.hasOwnProperty(r)&&this.props[r]!==t&&(this.props[r]=t,n=!0)})),n)return this.save(),!0}return!1}unregister(e){e in this.props&&(delete this.props[e],this.save())}update_campaign_params(){if(!this.campaign_params_saved){var e=qv.campaignParams({customTrackedParams:this.config.custom_campaign_params,maskPersonalDataProperties:this.config.mask_personal_data_properties,customPersonalDataProperties:this.config.custom_personal_data_properties});gg(eg(e))||this.register(e),this.campaign_params_saved=!0}}update_search_keyword(){this.register(qv.searchInfo())}update_referrer_info(){this.register_once(qv.referrerInfo(),void 0)}set_initial_person_info(){this.props[s_]||this.props[c_]||this.register_once({[l_]:qv.initialPersonInfo()},void 0)}get_referrer_info(){return eg({$referrer:this.props.$referrer,$referring_domain:this.props.$referring_domain})}get_initial_props(){var e={};Jh([c_,s_],(t=>{var n=this.props[t];n&&Jh(n,(function(t,n){e[`$initial_`+sg(n)]=t}))}));var t=this.props[l_];return t&&Yh(e,qv.initialPersonPropsFromInfo(t)),e}safe_merge(e){return Jh(this.props,(function(t,n){n in e||(e[n]=t)})),e}update_config(e,t){if(this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie),e.persistence!==t.persistence){var n=this.buildStorage(e),r=this.props;this.clear(),this.storage=n,this.props=r,this.save()}}set_disabled(e){this.disabled=e,this.disabled?this.remove():this.save()}set_cross_subdomain(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())}get_cross_subdomain(){return!!this.cross_subdomain}set_secure(e){e!==this.secure&&(this.secure=e,this.remove(),this.save())}set_event_timer(e,t){var n=this.props[Ng]||{};n[e]=t,this.props[Ng]=n,this.save()}remove_event_timer(e){var t=(this.props[Ng]||{})[e];return U(t)||(delete this.props[Ng][e],this.save()),t}get_property(e){return this.props[e]}set_property(e,t){this.props[e]=t,this.save()}};function Xv(e){var t;return JSON.stringify(e,(t=[],function(e,n){if(hg(n)){for(;t.length>0&&t[t.length-1]!==this;)t.pop();return t.includes(n)?`[Circular]`:(t.push(n),n)}return n}))?.length||0}function Zv(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6606028.8;if(e.size>=t&&e.data.length>1){var n=Math.floor(e.data.length/2),r=e.data.slice(0,n),i=e.data.slice(n);return[Zv({size:Xv(r),data:r,sessionId:e.sessionId,windowId:e.windowId}),Zv({size:Xv(i),data:i,sessionId:e.sessionId,windowId:e.windowId})].flatMap((e=>e))}return[e]}var Qv=(e=>(e[e.DomContentLoaded=0]=`DomContentLoaded`,e[e.Load=1]=`Load`,e[e.FullSnapshot=2]=`FullSnapshot`,e[e.IncrementalSnapshot=3]=`IncrementalSnapshot`,e[e.Meta=4]=`Meta`,e[e.Custom=5]=`Custom`,e[e.Plugin=6]=`Plugin`,e))(Qv||{}),$v=(e=>(e[e.Mutation=0]=`Mutation`,e[e.MouseMove=1]=`MouseMove`,e[e.MouseInteraction=2]=`MouseInteraction`,e[e.Scroll=3]=`Scroll`,e[e.ViewportResize=4]=`ViewportResize`,e[e.Input=5]=`Input`,e[e.TouchMove=6]=`TouchMove`,e[e.MediaInteraction=7]=`MediaInteraction`,e[e.StyleSheetRule=8]=`StyleSheetRule`,e[e.CanvasMutation=9]=`CanvasMutation`,e[e.Font=10]=`Font`,e[e.Log=11]=`Log`,e[e.Drag=12]=`Drag`,e[e.StyleDeclaration=13]=`StyleDeclaration`,e[e.Selection=14]=`Selection`,e[e.AdoptedStyleSheet=15]=`AdoptedStyleSheet`,e[e.CustomElement=16]=`CustomElement`,e))($v||{});function ey(e){var t;return e instanceof Element&&(e.id===d_||!((t=e.closest)==null||!t.call(e,`.toolbar-global-fade-container`)))}function ty(e){return!!e&&e.nodeType===1}function ny(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function ry(e){return!!e&&e.nodeType===3}function iy(e){return!!e&&e.nodeType===11}function ay(e){return e?og(e).split(/\s+/):[]}function oy(e){var t=z?.location.href;return!!(t&&e&&e.some((e=>t.match(e))))}function sy(e){var t=``;switch(typeof e.className){case`string`:t=e.className;break;case`object`:t=(e.className&&`baseVal`in e.className?e.className.baseVal:null)||e.getAttribute(`class`)||``;break;default:t=``}return ay(t)}function cy(e){return bg(e)?null:og(e).split(/(\s+)/).filter((e=>Sy(e))).join(``).replace(/[\r\n]/g,` `).replace(/[ ]+/g,` `).substring(0,255)}function ly(e){var t=``;return my(e)&&!hy(e)&&e.childNodes&&e.childNodes.length&&Jh(e.childNodes,(function(e){ry(e)&&e.textContent&&(t+=cy(e.textContent)??``)})),og(t)}function uy(e){return U(e.target)?e.srcElement||null:(t=e.target)!=null&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}var dy=[`a`,`button`,`form`,`input`,`select`,`textarea`,`label`];function fy(e){var t=e.parentNode;return!(!t||!ty(t))&&t}function py(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;if(!z||!e||ny(e,`html`)||!ty(e)||n!=null&&n.url_allowlist&&!oy(n.url_allowlist)||n!=null&&n.url_ignorelist&&oy(n.url_ignorelist))return!1;if(n!=null&&n.dom_event_allowlist){var a=n.dom_event_allowlist;if(a&&!a.some((e=>t.type===e)))return!1}for(var o=!1,s=[e],c=!0,l=e;l.parentNode&&!ny(l,`body`);)if(iy(l.parentNode))s.push(l.parentNode.host),l=l.parentNode.host;else{if(!(c=fy(l)))break;if(r||dy.indexOf(c.tagName.toLowerCase())>-1)o=!0;else{var u=z.getComputedStyle(c);u&&u.getPropertyValue(`cursor`)===`pointer`&&(o=!0)}s.push(c),l=c}if(!function(e,t){var n=t?.element_allowlist;if(U(n))return!0;var r=function(e){if(n.some((t=>e.tagName.toLowerCase()===t)))return{v:!0}};for(var i of e){var a=r(i);if(typeof a==`object`)return a.v}return!1}(s,n)||!function(e,t){var n=t?.css_selector_allowlist;if(U(n))return!0;var r=function(e){if(n.some((t=>e.matches(t))))return{v:!0}};for(var i of e){var a=r(i);if(typeof a==`object`)return a.v}return!1}(s,n))return!1;var d=z.getComputedStyle(e);if(d&&d.getPropertyValue(`cursor`)===`pointer`&&t.type===`click`)return!0;var f=e.tagName.toLowerCase();switch(f){case`html`:return!1;case`form`:return(i||[`submit`]).indexOf(t.type)>=0;case`input`:case`select`:case`textarea`:return(i||[`change`,`click`]).indexOf(t.type)>=0;default:return o?(i||[`click`]).indexOf(t.type)>=0:(i||[`click`]).indexOf(t.type)>=0&&(dy.indexOf(f)>-1||e.getAttribute(`contenteditable`)===`true`)}}function my(e){for(var t=e;t.parentNode&&!ny(t,`body`);t=t.parentNode){var n=sy(t);if(H(n,`ph-sensitive`)||H(n,`ph-no-capture`))return!1}if(H(sy(e),`ph-include`))return!0;var r=e.type||``;if(_g(r))switch(r.toLowerCase()){case`hidden`:case`password`:return!1}var i=e.name||e.id||``;return!(_g(i)&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(i.replace(/[^a-zA-Z0-9]/g,``)))}function hy(e){return!!(ny(e,`input`)&&![`button`,`checkbox`,`submit`,`reset`].includes(e.type)||ny(e,`select`)||ny(e,`textarea`)||e.getAttribute(`contenteditable`)===`true`)}var gy=`(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})`,_y=RegExp(`^(?:${gy})\$`),vy=new RegExp(gy),yy=`\\d{3}-?\\d{2}-?\\d{4}`,by=RegExp(`^(${yy})\$`),xy=RegExp(`(${yy})`);function Sy(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];return!(bg(e)||_g(e)&&(e=og(e),(t?_y:vy).test((e||``).replace(/[- ]/g,``))||(t?by:xy).test(e)))}function Cy(e){var t=ly(e);return Sy(t=`${t} ${wy(e)}`.trim())?t:``}function wy(e){var t=``;return e&&e.childNodes&&e.childNodes.length&&Jh(e.childNodes,(function(e){if(e&&e.tagName?.toLowerCase()===`span`)try{var n=ly(e);t=`${t} ${n}`.trim(),e.childNodes&&e.childNodes.length&&(t=`${t} ${wy(e)}`.trim())}catch(e){W.error(`[AutoCapture]`,e)}})),t}function Ty(e){return function(e){return e.map((e=>{var t=``;if(e.tag_name&&(t+=e.tag_name),e.attr_class)for(var n of(e.attr_class.sort(),e.attr_class))t+=`.${n.replace(/"/g,``)}`;var r=G(G(G(G({},e.text?{text:e.text}:{}),{},{"nth-child":e.nth_child??0,"nth-of-type":e.nth_of_type??0},e.href?{href:e.href}:{}),e.attr_id?{attr_id:e.attr_id}:{}),e.attributes),i={};return Zh(r).sort(((e,t)=>{var[n]=e,[r]=t;return n.localeCompare(r)})).forEach((e=>{var[t,n]=e;return i[Ey(t.toString())]=Ey(n.toString())})),t+=`:`,t+=Zh(r).map((e=>{var[t,n]=e;return`${t}="${n}"`})).join(``)})).join(`;`)}(function(e){return e.map((e=>{var t={text:e.$el_text?.slice(0,400),tag_name:e.tag_name,href:e.attr__href?.slice(0,2048),attr_class:Dy(e),attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return Zh(e).filter((e=>{var[t]=e;return t.indexOf(`attr__`)===0})).forEach((e=>{var[n,r]=e;return t.attributes[n]=r})),t}))}(e))}function Ey(e){return e.replace(/"|\\"/g,`\\"`)}function Dy(e){var t=e.attr__class;return t?pg(t)?t:ay(t):void 0}var Oy=`[SessionRecording]`,ky=`redacted`,Ay={initiatorTypes:[`audio`,`beacon`,`body`,`css`,`early-hint`,`embed`,`fetch`,`frame`,`iframe`,`icon`,`image`,`img`,`input`,`link`,`navigation`,`object`,`ping`,`script`,`track`,`video`,`xmlhttprequest`],maskRequestFn:e=>e,recordHeaders:!1,recordBody:!1,recordInitialRequests:!1,recordPerformance:!1,performanceEntryTypeToObserve:[`first-input`,`navigation`,`paint`,`resource`],payloadSizeLimitBytes:1e6,payloadHostDenyList:[`.lr-ingest.io`,`.ingest.sentry.io`,`.clarity.ms`,`analytics.google.com`]},jy=[`authorization`,`x-forwarded-for`,`authorization`,`cookie`,`set-cookie`,`x-api-key`,`x-real-ip`,`remote-addr`,`forwarded`,`proxy-authorization`,`x-csrf-token`,`x-csrftoken`,`x-xsrf-token`],My=[`password`,`secret`,`passwd`,`api_key`,`apikey`,`auth`,`credentials`,`mysql_pwd`,`privatekey`,`private_key`,`token`],Ny=[`/s/`,`/e/`,`/i/`];function Py(e,t,n,r){if(bg(e))return e;var i=t?.[`content-length`]||function(e){return new Blob([e]).size}(e);return _g(i)&&(i=parseInt(i)),i>n?Oy+` ${r} body too large to record (${i} bytes)`:e}function Fy(e,t){if(bg(e))return e;var n=e;return Sy(n,!1)||(n=Oy+` `+t+` body `+ky),Jh(My,(e=>{var r;(r=n)!=null&&r.length&&n?.indexOf(e)!==-1&&(n=Oy+` `+t+` body `+ky+` as might contain: `+e)})),n}var Iy=(e,t)=>{var n,r,i={payloadSizeLimitBytes:Ay.payloadSizeLimitBytes,performanceEntryTypeToObserve:[...Ay.performanceEntryTypeToObserve],payloadHostDenyList:[...t.payloadHostDenyList||[],...Ay.payloadHostDenyList]},a=!1!==e.session_recording.recordHeaders&&t.recordHeaders,o=!1!==e.session_recording.recordBody&&t.recordBody,s=!1!==e.capture_performance&&t.recordPerformance,c=(n=i,r=Math.min(1e6,n.payloadSizeLimitBytes??1e6),e=>(e!=null&&e.requestBody&&(e.requestBody=Py(e.requestBody,e.requestHeaders,r,`Request`)),e!=null&&e.responseBody&&(e.responseBody=Py(e.responseBody,e.responseHeaders,r,`Response`)),e)),l=t=>{return c(((e,t)=>{var n=U_(e.name),r=t.indexOf(`http`)===0?U_(t)?.pathname:t;r===`/`&&(r=``);var i=n?.pathname.replace(r||``,``);if(!(n&&i&&Ny.some((e=>i.indexOf(e)===0))))return e})((r=(n=t).requestHeaders,bg(r)||Jh(Object.keys(r??{}),(e=>{jy.includes(e.toLowerCase())&&(r[e]=ky)})),n),e.api_host));var n,r},u=mg(e.session_recording.maskNetworkRequestFn);return u&&mg(e.session_recording.maskCapturedNetworkRequestFn)&&W.warn("Both `maskNetworkRequestFn` and `maskCapturedNetworkRequestFn` are defined. `maskNetworkRequestFn` will be ignored."),u&&(e.session_recording.maskCapturedNetworkRequestFn=t=>{var n=e.session_recording.maskNetworkRequestFn({url:t.name});return G(G({},t),{},{name:n?.url})}),i.maskRequestFn=mg(e.session_recording.maskCapturedNetworkRequestFn)?t=>{var n,r,i=l(t);return i&&(n=(r=e.session_recording).maskCapturedNetworkRequestFn?.call(r,i))!=null?n:void 0}:e=>function(e){if(!U(e))return e.requestBody=Fy(e.requestBody,`Request`),e.responseBody=Fy(e.responseBody,`Response`),e}(l(e)),G(G(G({},Ay),i),{},{recordHeaders:a,recordBody:o,recordPerformance:s,recordInitialRequests:s})};function Ly(e,t,n,r,i){return t>n&&(W.warn(`min cannot be greater than max.`),t=n),xg(e)?e>n?(r&&W.warn(r+` cannot be greater than max: `+n+`. Using max value instead.`),n):e<t?(r&&W.warn(r+` cannot be less than min: `+t+`. Using min value instead.`),t):e:(r&&W.warn(r+` must be a number. using max or fallback. max: `+n+`, fallback: `+i),Ly(i||n,t,n,r))}var Ry=class{constructor(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};K(this,`bucketSize`,100),K(this,`refillRate`,10),K(this,`mutationBuckets`,{}),K(this,`loggedTracker`,{}),K(this,`refillBuckets`,(()=>{Object.keys(this.mutationBuckets).forEach((e=>{this.mutationBuckets[e]=this.mutationBuckets[e]+this.refillRate,this.mutationBuckets[e]>=this.bucketSize&&delete this.mutationBuckets[e]}))})),K(this,`getNodeOrRelevantParent`,(e=>{var t=this.rrweb.mirror.getNode(e);if(t?.nodeName!==`svg`&&t instanceof Element){var n=t.closest(`svg`);if(n)return[this.rrweb.mirror.getId(n),n]}return[e,t]})),K(this,`numberOfChanges`,(e=>(e.removes?.length??0)+(e.attributes?.length??0)+(e.texts?.length??0)+(e.adds?.length??0))),K(this,`throttleMutations`,(e=>{if(e.type!==3||e.data.source!==0)return e;var t=e.data,n=this.numberOfChanges(t);t.attributes&&=t.attributes.filter((e=>{var t,n,[r,i]=this.getNodeOrRelevantParent(e.id);return this.mutationBuckets[r]===0?!1:((this.mutationBuckets[r]=this.mutationBuckets[r]??this.bucketSize,this.mutationBuckets[r]=Math.max(this.mutationBuckets[r]-1,0),this.mutationBuckets[r]===0)&&(this.loggedTracker[r]||(this.loggedTracker[r]=!0,(t=(n=this.options).onBlockedNode)==null||t.call(n,r,i))),e)}));var r=this.numberOfChanges(t);return r!==0||n===r?e:void 0})),this.rrweb=e,this.options=t,this.refillRate=Ly(this.options.refillRate??this.refillRate,0,100,`mutation throttling refill rate`),this.bucketSize=Ly(this.options.bucketSize??this.bucketSize,0,100,`mutation throttling bucket size`),setInterval((()=>{this.refillBuckets()}),1e3)}},zy=Uint8Array,By=Uint16Array,Vy=Uint32Array,Hy=new zy([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Uy=new zy([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Wy=new zy([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Gy=function(e,t){for(var n=new By(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var i=new Vy(n[30]);for(r=1;r<30;++r)for(var a=n[r];a<n[r+1];++a)i[a]=a-n[r]<<5|r;return[n,i]},Ky=Gy(Hy,2),qy=Ky[0],Jy=Ky[1];qy[28]=258,Jy[258]=28;for(var Yy=Gy(Uy,0)[1],Xy=new By(32768),Zy=0;Zy<32768;++Zy){var Qy=(43690&Zy)>>>1|(21845&Zy)<<1;Qy=(61680&(Qy=(52428&Qy)>>>2|(13107&Qy)<<2))>>>4|(3855&Qy)<<4,Xy[Zy]=((65280&Qy)>>>8|(255&Qy)<<8)>>>1}var $y=function(e,t,n){for(var r=e.length,i=0,a=new By(t);i<r;++i)++a[e[i]-1];var o,s=new By(t);for(i=0;i<t;++i)s[i]=s[i-1]+a[i-1]<<1;if(n){o=new By(1<<t);var c=15-t;for(i=0;i<r;++i)if(e[i])for(var l=i<<4|e[i],u=t-e[i],d=s[e[i]-1]++<<u,f=d|(1<<u)-1;d<=f;++d)o[Xy[d]>>>c]=l}else for(o=new By(r),i=0;i<r;++i)o[i]=Xy[s[e[i]-1]++]>>>15-e[i];return o},eb=new zy(288);for(Zy=0;Zy<144;++Zy)eb[Zy]=8;for(Zy=144;Zy<256;++Zy)eb[Zy]=9;for(Zy=256;Zy<280;++Zy)eb[Zy]=7;for(Zy=280;Zy<288;++Zy)eb[Zy]=8;var tb=new zy(32);for(Zy=0;Zy<32;++Zy)tb[Zy]=5;var nb=$y(eb,9,0),rb=$y(tb,5,0),ib=function(e){return(e/8>>0)+(7&e&&1)},ab=function(e,t,n){(n==null||n>e.length)&&(n=e.length);var r=new(e instanceof By?By:e instanceof Vy?Vy:zy)(n-t);return r.set(e.subarray(t,n)),r},ob=function(e,t,n){n<<=7&t;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8},sb=function(e,t,n){n<<=7&t;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},cb=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,a=n.slice();if(!i)return[new zy(0),0];if(i==1){var o=new zy(n[0].s+1);return o[n[0].s]=1,[o,1]}n.sort((function(e,t){return e.f-t.f})),n.push({s:-1,f:25001});var s=n[0],c=n[1],l=0,u=1,d=2;for(n[0]={s:-1,f:s.f+c.f,l:s,r:c};u!=i-1;)s=n[n[l].f<n[d].f?l++:d++],c=n[l!=u&&n[l].f<n[d].f?l++:d++],n[u++]={s:-1,f:s.f+c.f,l:s,r:c};var f=a[0].s;for(r=1;r<i;++r)a[r].s>f&&(f=a[r].s);var p=new By(f+1),m=lb(n[u-1],p,0);if(m>t){r=0;var h=0,g=m-t,_=1<<g;for(a.sort((function(e,t){return p[t.s]-p[e.s]||e.f-t.f}));r<i;++r){var v=a[r].s;if(!(p[v]>t))break;h+=_-(1<<m-p[v]),p[v]=t}for(h>>>=g;h>0;){var y=a[r].s;p[y]<t?h-=1<<t-p[y]++-1:++r}for(;r>=0&&h;--r){var b=a[r].s;p[b]==t&&(--p[b],++h)}m=t}return[new zy(p),m]},lb=function(e,t,n){return e.s==-1?Math.max(lb(e.l,t,n+1),lb(e.r,t,n+1)):t[e.s]=n},ub=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new By(++t),r=0,i=e[0],a=1,o=function(e){n[r++]=e},s=1;s<=t;++s)if(e[s]==i&&s!=t)++a;else{if(!i&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(i),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(i);a=1,i=e[s]}return[n.subarray(0,r),t]},db=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},fb=function(e,t,n){var r=n.length,i=ib(t+2);e[i]=255&r,e[i+1]=r>>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var a=0;a<r;++a)e[i+a+4]=n[a];return 8*(i+4+r)},pb=function(e,t,n,r,i,a,o,s,c,l,u){ob(t,u++,n),++i[256];for(var d=cb(i,15),f=d[0],p=d[1],m=cb(a,15),h=m[0],g=m[1],_=ub(f),v=_[0],y=_[1],b=ub(h),x=b[0],S=b[1],C=new By(19),w=0;w<v.length;++w)C[31&v[w]]++;for(w=0;w<x.length;++w)C[31&x[w]]++;for(var T=cb(C,7),ee=T[0],E=T[1],D=19;D>4&&!ee[Wy[D-1]];--D);var te,ne,re,ie,ae=l+5<<3,oe=db(i,eb)+db(a,tb)+o,se=db(i,f)+db(a,h)+o+14+3*D+db(C,ee)+(2*C[16]+3*C[17]+7*C[18]);if(ae<=oe&&ae<=se)return fb(t,u,e.subarray(c,c+l));if(ob(t,u,1+(se<oe)),u+=2,se<oe){te=$y(f,p,0),ne=f,re=$y(h,g,0),ie=h;var ce=$y(ee,E,0);for(ob(t,u,y-257),ob(t,u+5,S-1),ob(t,u+10,D-4),u+=14,w=0;w<D;++w)ob(t,u+3*w,ee[Wy[w]]);u+=3*D;for(var le=[v,x],ue=0;ue<2;++ue){var de=le[ue];for(w=0;w<de.length;++w){var fe=31&de[w];ob(t,u,ce[fe]),u+=ee[fe],fe>15&&(ob(t,u,de[w]>>>5&127),u+=de[w]>>>12)}}}else te=nb,ne=eb,re=rb,ie=tb;for(w=0;w<s;++w)if(r[w]>255){fe=r[w]>>>18&31,sb(t,u,te[fe+257]),u+=ne[fe+257],fe>7&&(ob(t,u,r[w]>>>23&31),u+=Hy[fe]);var pe=31&r[w];sb(t,u,re[pe]),u+=ie[pe],pe>3&&(sb(t,u,r[w]>>>5&8191),u+=Uy[pe])}else sb(t,u,te[r[w]]),u+=ne[r[w]];return sb(t,u,te[256]),u+ne[256]},mb=new Vy([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),hb=function(){for(var e=new Vy(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(1&n&&3988292384)^n>>>1;e[t]=n}return e}(),gb=function(){var e=4294967295;return{p:function(t){for(var n=e,r=0;r<t.length;++r)n=hb[255&n^t[r]]^n>>>8;e=n},d:function(){return 4294967295^e}}},_b=function(e,t,n,r,i){return function(e,t,n,r,i,a){var o=e.length,s=new zy(r+o+5*(1+Math.floor(o/7e3))+i),c=s.subarray(r,s.length-i),l=0;if(!t||o<8)for(var u=0;u<=o;u+=65535){var d=u+65535;d<o?l=fb(c,l,e.subarray(u,d)):(c[u]=a,l=fb(c,l,e.subarray(u,o)))}else{for(var f=mb[t-1],p=f>>>13,m=8191&f,h=(1<<n)-1,g=new By(32768),_=new By(h+1),v=Math.ceil(n/3),y=2*v,b=function(t){return(e[t]^e[t+1]<<v^e[t+2]<<y)&h},x=new Vy(25e3),S=new By(288),C=new By(32),w=0,T=0,ee=(u=0,0),E=0,D=0;u<o;++u){var te=b(u),ne=32767&u,re=_[te];if(g[ne]=re,_[te]=ne,E<=u){var ie=o-u;if((w>7e3||ee>24576)&&ie>423){l=pb(e,c,0,x,S,C,T,ee,D,u-D,l),ee=w=T=0,D=u;for(var ae=0;ae<286;++ae)S[ae]=0;for(ae=0;ae<30;++ae)C[ae]=0}var oe=2,se=0,ce=m,le=ne-re&32767;if(ie>2&&te==b(u-le))for(var ue=Math.min(p,ie)-1,de=Math.min(32767,u),fe=Math.min(258,ie);le<=de&&--ce&&ne!=re;){if(e[u+oe]==e[u+oe-le]){for(var pe=0;pe<fe&&e[u+pe]==e[u+pe-le];++pe);if(pe>oe){if(oe=pe,se=le,pe>ue)break;var me=Math.min(le,pe-2),he=0;for(ae=0;ae<me;++ae){var ge=u-le+ae+32768&32767,_e=ge-g[ge]+32768&32767;_e>he&&(he=_e,re=ge)}}}le+=(ne=re)-(re=g[ne])+32768&32767}if(se){x[ee++]=268435456|Jy[oe]<<18|Yy[se];var ve=31&Jy[oe],ye=31&Yy[se];T+=Hy[ve]+Uy[ye],++S[257+ve],++C[ye],E=u+oe,++w}else x[ee++]=e[u],++S[e[u]]}}l=pb(e,c,a,x,S,C,T,ee,D,u-D,l)}return ab(s,0,r+ib(l)+i)}(e,t.level==null?6:t.level,t.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,n,r,!i)},vb=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},yb=function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:t.level==9?2:0,e[9]=3,t.mtime!=0&&vb(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;r<=n.length;++r)e[r+10]=n.charCodeAt(r)}},bb=function(e){return 10+(e.filename&&e.filename.length+1||0)};function xb(e,t){t===void 0&&(t={});var n=gb(),r=e.length;n.p(e);var i=_b(e,t,bb(t),8),a=i.length;return yb(i,t),vb(i,a-8,n.d()),vb(i,a-4,r),i}function Sb(e,t){var n=e.length;if(typeof TextEncoder<`u`)return new TextEncoder().encode(e);for(var r=new zy(e.length+(e.length>>>1)),i=0,a=function(e){r[i++]=e},o=0;o<n;++o){if(i+5>r.length){var s=new zy(i+8+(n-o<<1));s.set(r),r=s}var c=e.charCodeAt(o);c<128||t?a(c):c<2048?(a(192|c>>>6),a(128|63&c)):c>55295&&c<57344?(a(240|(c=65536+(1047552&c)|1023&e.charCodeAt(++o))>>>18),a(128|c>>>12&63),a(128|c>>>6&63),a(128|63&c)):(a(224|c>>>12),a(128|c>>>6&63),a(128|63&c))}return ab(r,0,i)}function Cb(e,t){return function(e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return Math.abs(t)}(e)%100<Ly(100*t,0,100)}var wb=`[SessionRecording]`,Tb=Eg(wb),Eb=3e5,Db=[$v.MouseMove,$v.MouseInteraction,$v.Scroll,$v.ViewportResize,$v.Input,$v.TouchMove,$v.MediaInteraction,$v.Drag],Ob=e=>({rrwebMethod:e,enqueuedAt:Date.now(),attempt:1});function kb(e){return function(e,t){for(var n=``,r=0;r<e.length;){var i=e[r++];i<128||t?n+=String.fromCharCode(i):i<224?n+=String.fromCharCode((31&i)<<6|63&e[r++]):i<240?n+=String.fromCharCode((15&i)<<12|(63&e[r++])<<6|63&e[r++]):(i=((15&i)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++])-65536,n+=String.fromCharCode(55296|i>>10,56320|1023&i))}return n}(xb(Sb(JSON.stringify(e))),!0)}function Ab(e){return e.type===Qv.Custom&&e.data.tag===`sessionIdle`}function jb(e,t){return t.some((t=>t.matching===`regex`&&new RegExp(t.url).test(e)))}var Mb=class{get sessionIdleThresholdMilliseconds(){return this.instance.config.session_recording.session_idle_threshold_ms||3e5}get rrwebRecord(){var e,t;return V==null||(e=V.__PosthogExtensions__)==null||(t=e.rrweb)==null?void 0:t.record}get started(){return this._captureStarted}get sessionManager(){if(!this.instance.sessionManager)throw Error(wb+` must be started with a valid sessionManager.`);return this.instance.sessionManager}get fullSnapshotIntervalMillis(){return this.triggerStatus===`trigger_pending`?6e4:this.instance.config.session_recording?.full_snapshot_interval_millis??Eb}get isSampled(){var e=this.instance.get_property(Jg);return Sg(e)?e:null}get sessionDuration(){var e=this.buffer?.data[this.buffer?.data.length-1],{sessionStartTimestamp:t}=this.sessionManager.checkAndGetSessionAndWindowId(!0);return e?e.timestamp-t:null}get isRecordingEnabled(){var e=!!this.instance.get_property(Bg),t=!this.instance.config.disable_session_recording;return z&&e&&t}get isConsoleLogCaptureEnabled(){var e=!!this.instance.get_property(Vg);return this.instance.config.enable_recording_console_log??e}get canvasRecording(){var e,t=this.instance.config.session_recording.captureCanvas,n=this.instance.get_property(Ug),r=(e=t?.recordCanvas??n?.enabled)!=null&&e,i=t?.canvasFps??n?.fps??0,a=t?.canvasQuality??n?.quality??0;return{enabled:r,fps:Ly(i,0,12,`canvas recording fps`),quality:Ly(a,0,1,`canvas recording quality`)}}get networkPayloadCapture(){var e=this.instance.get_property(Hg),t={recordHeaders:this.instance.config.session_recording?.recordHeaders,recordBody:this.instance.config.session_recording?.recordBody},n=t?.recordHeaders||e?.recordHeaders,r=t?.recordBody||e?.recordBody,i=hg(this.instance.config.capture_performance)?this.instance.config.capture_performance.network_timing:this.instance.config.capture_performance,a=!!(Sg(i)?i:e?.capturePerformance);return n||r||a?{recordHeaders:n,recordBody:r,recordPerformance:a}:void 0}get sampleRate(){var e=this.instance.get_property(Wg);return xg(e)?e:null}get minimumDuration(){var e=this.instance.get_property(Gg);return xg(e)?e:null}get status(){return this.receivedDecide?this.isRecordingEnabled?!1===this.isSampled?`disabled`:this._urlBlocked?`paused`:bg(this._linkedFlag)||this._linkedFlagSeen?this.triggerStatus===`trigger_pending`?`buffering`:Sg(this.isSampled)?this.isSampled?`sampled`:`disabled`:`active`:`buffering`:`disabled`:`buffering`}get urlTriggerStatus(){return this._urlTriggers.length===0?`trigger_disabled`:this.instance?.get_property(Yg)===this.sessionId?`trigger_activated`:`trigger_pending`}get eventTriggerStatus(){return this._eventTriggers.length===0?`trigger_disabled`:this.instance?.get_property(Xg)===this.sessionId?`trigger_activated`:`trigger_pending`}get triggerStatus(){var e=this.eventTriggerStatus===`trigger_activated`||this.urlTriggerStatus===`trigger_activated`,t=this.eventTriggerStatus===`trigger_pending`||this.urlTriggerStatus===`trigger_pending`;return e?`trigger_activated`:t?`trigger_pending`:`trigger_disabled`}constructor(e){if(K(this,`queuedRRWebEvents`,[]),K(this,`isIdle`,!1),K(this,`_linkedFlagSeen`,!1),K(this,`_lastActivityTimestamp`,Date.now()),K(this,`_linkedFlag`,null),K(this,`_removePageViewCaptureHook`,void 0),K(this,`_onSessionIdListener`,void 0),K(this,`_persistDecideOnSessionListener`,void 0),K(this,`_samplingSessionListener`,void 0),K(this,`_urlTriggers`,[]),K(this,`_urlBlocklist`,[]),K(this,`_urlBlocked`,!1),K(this,`_eventTriggers`,[]),K(this,`_removeEventTriggerCaptureHook`,void 0),K(this,`_forceAllowLocalhostNetworkCapture`,!1),K(this,`_onBeforeUnload`,(()=>{this._flushBuffer()})),K(this,`_onOffline`,(()=>{this._tryAddCustomEvent(`browser offline`,{})})),K(this,`_onOnline`,(()=>{this._tryAddCustomEvent(`browser online`,{})})),K(this,`_onVisibilityChange`,(()=>{if(B!=null&&B.visibilityState){var e=`window `+B.visibilityState;this._tryAddCustomEvent(e,{})}})),this.instance=e,this._captureStarted=!1,this._endpoint=`/s/`,this.stopRrweb=void 0,this.receivedDecide=!1,!this.instance.sessionManager)throw Tb.error(`started without valid sessionManager`),Error(wb+` started without valid sessionManager. This is a bug.`);if(this.instance.config.__preview_experimental_cookieless_mode)throw Error(wb+` cannot be used with __preview_experimental_cookieless_mode.`);var{sessionId:t,windowId:n}=this.sessionManager.checkAndGetSessionAndWindowId();this.sessionId=t,this.windowId=n,this.buffer=this.clearBuffer(),this.sessionIdleThresholdMilliseconds>=this.sessionManager.sessionTimeoutMs&&Tb.warn(`session_idle_threshold_ms (${this.sessionIdleThresholdMilliseconds}) is greater than the session timeout (${this.sessionManager.sessionTimeoutMs}). Session will never be detected as idle`)}startIfEnabledOrStop(e){this.isRecordingEnabled?(this._startCapture(e),ag(z,`beforeunload`,this._onBeforeUnload),ag(z,`offline`,this._onOffline),ag(z,`online`,this._onOnline),ag(z,`visibilitychange`,this._onVisibilityChange),this._setupSampling(),this._addEventTriggerListener(),bg(this._removePageViewCaptureHook)&&(this._removePageViewCaptureHook=this.instance.on(`eventCaptured`,(e=>{try{if(e.event===`$pageview`){var t=e!=null&&e.properties.$current_url?this._maskUrl(e?.properties.$current_url):``;if(!t)return;this._tryAddCustomEvent(`$pageview`,{href:t})}}catch(e){Tb.error(`Could not add $pageview to rrweb session`,e)}}))),this._onSessionIdListener||=this.sessionManager.onSessionId(((e,t,n)=>{var r,i,a,o;n&&(this._tryAddCustomEvent(`$session_id_change`,{sessionId:e,windowId:t,changeReason:n}),(r=this.instance)==null||(i=r.persistence)==null||i.unregister(Xg),(a=this.instance)==null||(o=a.persistence)==null||o.unregister(Yg))}))):this.stopRecording()}stopRecording(){var e,t,n,r;this._captureStarted&&this.stopRrweb&&(this.stopRrweb(),this.stopRrweb=void 0,this._captureStarted=!1,z?.removeEventListener(`beforeunload`,this._onBeforeUnload),z?.removeEventListener(`offline`,this._onOffline),z?.removeEventListener(`online`,this._onOnline),z?.removeEventListener(`visibilitychange`,this._onVisibilityChange),this.clearBuffer(),clearInterval(this._fullSnapshotTimer),(e=this._removePageViewCaptureHook)==null||e.call(this),this._removePageViewCaptureHook=void 0,(t=this._removeEventTriggerCaptureHook)==null||t.call(this),this._removeEventTriggerCaptureHook=void 0,(n=this._onSessionIdListener)==null||n.call(this),this._onSessionIdListener=void 0,(r=this._samplingSessionListener)==null||r.call(this),this._samplingSessionListener=void 0,Tb.info(`stopped`))}makeSamplingDecision(e){var t,n=this.sessionId!==e,r=this.sampleRate;if(xg(r)){var i=this.isSampled,a=n||!Sg(i),o=a?Cb(e,r):i;a&&(o?this._reportStarted(`sampled`):Tb.warn(`Sample rate (${r}) has determined that this sessionId (${e}) will not be sent to the server.`),this._tryAddCustomEvent(`samplingDecisionMade`,{sampleRate:r,isSampled:o})),(t=this.instance.persistence)==null||t.register({[Jg]:o})}else{var s;(s=this.instance.persistence)==null||s.register({[Jg]:null})}}onRemoteConfig(e){var t,n,r,i;if((this._tryAddCustomEvent(`$remote_config_received`,e),this._persistRemoteConfig(e),this._linkedFlag=e.sessionRecording?.linkedFlag||null,(t=e.sessionRecording)!=null&&t.endpoint)&&(this._endpoint=e.sessionRecording?.endpoint),this._setupSampling(),!bg(this._linkedFlag)&&!this._linkedFlagSeen){var a=_g(this._linkedFlag)?this._linkedFlag:this._linkedFlag.flag,o=_g(this._linkedFlag)?null:this._linkedFlag.variant;this.instance.onFeatureFlags(((e,t)=>{var n=hg(t)&&a in t,r=o?t[a]===o:n;r&&this._reportStarted(`linked_flag_matched`,{linkedFlag:a,linkedVariant:o}),this._linkedFlagSeen=r}))}(n=e.sessionRecording)!=null&&n.urlTriggers&&(this._urlTriggers=e.sessionRecording.urlTriggers),(r=e.sessionRecording)!=null&&r.urlBlocklist&&(this._urlBlocklist=e.sessionRecording.urlBlocklist),(i=e.sessionRecording)!=null&&i.eventTriggers&&(this._eventTriggers=e.sessionRecording.eventTriggers),this.receivedDecide=!0,this.startIfEnabledOrStop()}_setupSampling(){xg(this.sampleRate)&&bg(this._samplingSessionListener)&&(this._samplingSessionListener=this.sessionManager.onSessionId((e=>{this.makeSamplingDecision(e)})))}_persistRemoteConfig(e){if(this.instance.persistence){var t,n=this.instance.persistence,r=()=>{var t=e.sessionRecording?.sampleRate,r=bg(t)?null:parseFloat(t),i=e.sessionRecording?.minimumDurationMilliseconds;n.register({[Bg]:!!e.sessionRecording,[Vg]:e.sessionRecording?.consoleLogRecordingEnabled,[Hg]:G({capturePerformance:e.capturePerformance},e.sessionRecording?.networkPayloadCapture),[Ug]:{enabled:e.sessionRecording?.recordCanvas,fps:e.sessionRecording?.canvasFps,quality:e.sessionRecording?.canvasQuality},[Wg]:r,[Gg]:U(i)?null:i,[Kg]:e.sessionRecording?.scriptConfig})};r(),(t=this._persistDecideOnSessionListener)==null||t.call(this),this._persistDecideOnSessionListener=this.sessionManager.onSessionId(r)}}log(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`log`;(t=this.instance.sessionRecording)==null||t.onRRwebEmit({type:6,data:{plugin:`rrweb/console@1`,payload:{level:n,trace:[],payload:[JSON.stringify(e)]}},timestamp:Date.now()})}_startCapture(e){if(!U(Object.assign)&&!U(Array.from)&&!(this._captureStarted||this.instance.config.disable_session_recording||this.instance.consent.isOptedOut())){var t,n;this._captureStarted=!0,this.sessionManager.checkAndGetSessionAndWindowId(),this.rrwebRecord?this._onScriptLoaded():(t=V.__PosthogExtensions__)==null||(n=t.loadExternalDependency)==null||n.call(t,this.instance,this.scriptName,(e=>{if(e)return Tb.error(`could not load recorder`,e);this._onScriptLoaded()})),Tb.info(`starting`),this.status===`active`&&this._reportStarted(e||`recording_initialized`)}}get scriptName(){var e,t,n;return((e=this.instance)==null||(t=e.persistence)==null||(n=t.get_property(Kg))==null?void 0:n.script)||`recorder`}isInteractiveEvent(e){return e.type===3&&Db.indexOf(e.data?.source)!==-1}_updateWindowAndSessionIds(e){var t=this.isInteractiveEvent(e);t||this.isIdle||e.timestamp-this._lastActivityTimestamp>this.sessionIdleThresholdMilliseconds&&(this.isIdle=!0,clearInterval(this._fullSnapshotTimer),this._tryAddCustomEvent(`sessionIdle`,{eventTimestamp:e.timestamp,lastActivityTimestamp:this._lastActivityTimestamp,threshold:this.sessionIdleThresholdMilliseconds,bufferLength:this.buffer.data.length,bufferSize:this.buffer.size}),this._flushBuffer());var n=!1;if(t&&(this._lastActivityTimestamp=e.timestamp,this.isIdle&&(this.isIdle=!1,this._tryAddCustomEvent(`sessionNoLongerIdle`,{reason:`user activity`,type:e.type}),n=!0)),!this.isIdle){var{windowId:r,sessionId:i}=this.sessionManager.checkAndGetSessionAndWindowId(!t,e.timestamp),a=this.sessionId!==i,o=this.windowId!==r;this.windowId=r,this.sessionId=i,a||o?(this.stopRecording(),this.startIfEnabledOrStop(`session_id_changed`)):n&&this._scheduleFullSnapshot()}}_tryRRWebMethod(e){try{return e.rrwebMethod(),!0}catch(t){return this.queuedRRWebEvents.length<10?this.queuedRRWebEvents.push({enqueuedAt:e.enqueuedAt||Date.now(),attempt:e.attempt++,rrwebMethod:e.rrwebMethod}):Tb.warn(`could not emit queued rrweb event.`,t,e),!1}}_tryAddCustomEvent(e,t){return this._tryRRWebMethod(Ob((()=>this.rrwebRecord.addCustomEvent(e,t))))}_tryTakeFullSnapshot(){return this._tryRRWebMethod(Ob((()=>this.rrwebRecord.takeFullSnapshot())))}_onScriptLoaded(){var e={blockClass:`ph-no-capture`,blockSelector:void 0,ignoreClass:`ph-ignore-input`,maskTextClass:`ph-mask`,maskTextSelector:void 0,maskTextFn:void 0,maskAllInputs:!0,maskInputOptions:{password:!0},maskInputFn:void 0,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0,recordCrossOriginIframes:!1},t=this.instance.config.session_recording;for(var[n,r]of Object.entries(t||{}))n in e&&(n===`maskInputOptions`?e.maskInputOptions=G({password:!0},r):e[n]=r);if(this.canvasRecording&&this.canvasRecording.enabled&&(e.recordCanvas=!0,e.sampling={canvas:this.canvasRecording.fps},e.dataURLOptions={type:`image/webp`,quality:this.canvasRecording.quality}),this.rrwebRecord){this.mutationRateLimiter=this.mutationRateLimiter??new Ry(this.rrwebRecord,{refillRate:this.instance.config.session_recording.__mutationRateLimiterRefillRate,bucketSize:this.instance.config.session_recording.__mutationRateLimiterBucketSize,onBlockedNode:(e,t)=>{var n=`Too many mutations on node '${e}'. Rate limiting. This could be due to SVG animations or something similar`;Tb.info(n,{node:t}),this.log(wb+` `+n,`warn`)}});var i=this._gatherRRWebPlugins();this.stopRrweb=this.rrwebRecord(G({emit:e=>{this.onRRwebEmit(e)},plugins:i},e)),this._lastActivityTimestamp=Date.now(),this.isIdle=!1,this._tryAddCustomEvent(`$session_options`,{sessionRecordingOptions:e,activePlugins:i.map((e=>e?.name))}),this._tryAddCustomEvent(`$posthog_config`,{config:this.instance.config})}else Tb.error(`onScriptLoaded was called but rrwebRecord is not available. This indicates something has gone wrong.`)}_scheduleFullSnapshot(){if(this._fullSnapshotTimer&&clearInterval(this._fullSnapshotTimer),!this.isIdle){var e=this.fullSnapshotIntervalMillis;e&&(this._fullSnapshotTimer=setInterval((()=>{this._tryTakeFullSnapshot()}),e))}}_gatherRRWebPlugins(){var e,t,n,r,i=[],a=(e=V.__PosthogExtensions__)==null||(t=e.rrwebPlugins)==null?void 0:t.getRecordConsolePlugin;a&&this.isConsoleLogCaptureEnabled&&i.push(a());var o=(n=V.__PosthogExtensions__)==null||(r=n.rrwebPlugins)==null?void 0:r.getRecordNetworkPlugin;return this.networkPayloadCapture&&mg(o)&&(!H_.includes(location.hostname)||this._forceAllowLocalhostNetworkCapture?i.push(o(Iy(this.instance.config,this.networkPayloadCapture))):Tb.info(`NetworkCapture not started because we are on localhost.`)),i}onRRwebEmit(e){var t;if(this._processQueuedEvents(),e&&hg(e)){if(e.type===Qv.Meta){var n=this._maskUrl(e.data.href);if(this._lastHref=n,!n)return;e.data.href=n}else this._pageViewFallBack();if(this._checkUrlTriggerConditions(),this.status!==`paused`||function(e){return e.type===Qv.Custom&&e.data.tag===`recording paused`}(e)){e.type===Qv.FullSnapshot&&this._scheduleFullSnapshot(),e.type===Qv.FullSnapshot&&this.triggerStatus===`trigger_pending`&&this.clearBuffer();var r=this.mutationRateLimiter?this.mutationRateLimiter.throttleMutations(e):e;if(r){var i=function(e){var t=e;if(t&&hg(t)&&t.type===6&&hg(t.data)&&t.data.plugin===`rrweb/console@1`){t.data.payload.payload.length>10&&(t.data.payload.payload=t.data.payload.payload.slice(0,10),t.data.payload.payload.push(`...[truncated]`));for(var n=[],r=0;r<t.data.payload.payload.length;r++)t.data.payload.payload[r]&&t.data.payload.payload[r].length>2e3?n.push(t.data.payload.payload[r].slice(0,2e3)+`...[truncated]`):n.push(t.data.payload.payload[r]);return t.data.payload.payload=n,e}return e}(r);if(this._updateWindowAndSessionIds(i),!this.isIdle||Ab(i)){if(Ab(i)){var a=i.data.payload;a&&(i.timestamp=a.lastActivityTimestamp+a.threshold)}var o=(t=this.instance.config.session_recording.compress_events)==null||t?function(e){if(Xv(e)<1024)return e;try{if(e.type===Qv.FullSnapshot)return G(G({},e),{},{data:kb(e.data),cv:`2024-10`});if(e.type===Qv.IncrementalSnapshot&&e.data.source===$v.Mutation)return G(G({},e),{},{cv:`2024-10`,data:G(G({},e.data),{},{texts:kb(e.data.texts),attributes:kb(e.data.attributes),removes:kb(e.data.removes),adds:kb(e.data.adds)})});if(e.type===Qv.IncrementalSnapshot&&e.data.source===$v.StyleSheetRule)return G(G({},e),{},{cv:`2024-10`,data:G(G({},e.data),{},{adds:kb(e.data.adds),removes:kb(e.data.removes)})})}catch(e){Tb.error(`could not compress event - will use uncompressed event`,e)}return e}(i):i,s={$snapshot_bytes:Xv(o),$snapshot_data:o,$session_id:this.sessionId,$window_id:this.windowId};this.status===`disabled`?this.clearBuffer():this._captureSnapshotBuffered(s)}}}}}_pageViewFallBack(){if(!this.instance.config.capture_pageview&&z){var e=this._maskUrl(z.location.href);this._lastHref!==e&&(this._tryAddCustomEvent(`$url_changed`,{href:e}),this._lastHref=e)}}_processQueuedEvents(){if(this.queuedRRWebEvents.length){var e=[...this.queuedRRWebEvents];this.queuedRRWebEvents=[],e.forEach((e=>{Date.now()-e.enqueuedAt<=2e3&&this._tryRRWebMethod(e)}))}}_maskUrl(e){var t=this.instance.config.session_recording;if(t.maskNetworkRequestFn){var n={url:e};return(n=t.maskNetworkRequestFn(n))?.url}return e}clearBuffer(){return this.buffer={size:0,data:[],sessionId:this.sessionId,windowId:this.windowId},this.buffer}_flushBuffer(){this.flushBufferTimer&&=(clearTimeout(this.flushBufferTimer),void 0);var e=this.minimumDuration,t=this.sessionDuration,n=xg(t)&&t>=0,r=xg(e)&&n&&t<e;return this.status===`buffering`||this.status===`paused`||r?(this.flushBufferTimer=setTimeout((()=>{this._flushBuffer()}),2e3),this.buffer):(this.buffer.data.length>0&&Zv(this.buffer).forEach((e=>{this._captureSnapshot({$snapshot_bytes:e.size,$snapshot_data:e.data,$session_id:e.sessionId,$window_id:e.windowId,$lib:`web`,$lib_version:Uh.LIB_VERSION})})),this.clearBuffer())}_captureSnapshotBuffered(e){var t=2+(this.buffer?.data.length||0);!this.isIdle&&(this.buffer.size+e.$snapshot_bytes+t>943718.4||this.buffer.sessionId!==this.sessionId)&&(this.buffer=this._flushBuffer()),this.buffer.size+=e.$snapshot_bytes,this.buffer.data.push(e.$snapshot_data),this.flushBufferTimer||this.isIdle||(this.flushBufferTimer=setTimeout((()=>{this._flushBuffer()}),2e3))}_captureSnapshot(e){this.instance.capture(`$snapshot`,e,{_url:this.instance.requestRouter.endpointFor(`api`,this._endpoint),_noTruncate:!0,_batchKey:`recordings`,skip_client_rate_limiting:!0})}_checkUrlTriggerConditions(){if(z!==void 0&&z.location.href){var e=z.location.href,t=this.status===`paused`,n=jb(e,this._urlBlocklist);n&&!t?this._pauseRecording():!n&&t&&this._resumeRecording(),jb(e,this._urlTriggers)&&this._activateTrigger(`url`)}}_activateTrigger(e){var t,n;this.triggerStatus===`trigger_pending`&&((t=this.instance)==null||(n=t.persistence)==null||n.register({[e===`url`?Yg:Xg]:this.sessionId}),this._flushBuffer(),this._reportStarted(e+`_trigger_matched`))}_pauseRecording(){this.status!==`paused`&&(this._urlBlocked=!0,clearInterval(this._fullSnapshotTimer),Tb.info(`recording paused due to URL blocker`),this._tryAddCustomEvent(`recording paused`,{reason:`url blocker`}))}_resumeRecording(){this.status===`paused`&&(this._urlBlocked=!1,this._tryTakeFullSnapshot(),this._scheduleFullSnapshot(),this._tryAddCustomEvent(`recording resumed`,{reason:`left blocked url`}),Tb.info(`recording resumed`))}_addEventTriggerListener(){this._eventTriggers.length!==0&&bg(this._removeEventTriggerCaptureHook)&&(this._removeEventTriggerCaptureHook=this.instance.on(`eventCaptured`,(e=>{try{this._eventTriggers.includes(e.event)&&this._activateTrigger(`event`)}catch(e){Tb.error(`Could not activate event trigger`,e)}})))}overrideLinkedFlag(){this._linkedFlagSeen=!0,this._tryTakeFullSnapshot(),this._reportStarted(`linked_flag_overridden`)}overrideSampling(){var e;(e=this.instance.persistence)==null||e.register({[Jg]:!0}),this._tryTakeFullSnapshot(),this._reportStarted(`sampling_overridden`)}overrideTrigger(e){this._activateTrigger(e)}_reportStarted(e,t){this.instance.register_for_session({$session_recording_start_reason:e}),Tb.info(e.replace(`_`,` `),t),H([`recording_initialized`,`session_id_changed`],e)||this._tryAddCustomEvent(e,t)}},Nb=Eg(`[RemoteConfig]`),Pb=class{constructor(e){this.instance=e}get remoteConfig(){var e,t;return(e=V._POSTHOG_REMOTE_CONFIG)==null||(t=e[this.instance.config.token])==null?void 0:t.config}_loadRemoteConfigJs(e){var t,n,r;(t=V.__PosthogExtensions__)!=null&&t.loadExternalDependency?(n=V.__PosthogExtensions__)==null||(r=n.loadExternalDependency)==null||r.call(n,this.instance,`remote-config`,(()=>e(this.remoteConfig))):(Nb.error(`PostHog Extensions not found. Cannot load remote config.`),e())}_loadRemoteConfigJSON(e){this.instance._send_request({method:`GET`,url:this.instance.requestRouter.endpointFor(`assets`,`/array/${this.instance.config.token}/config`),callback:t=>{e(t.json)}})}load(){try{if(this.remoteConfig)return Nb.info(`Using preloaded remote config`,this.remoteConfig),void this.onRemoteConfig(this.remoteConfig);if(this.instance.config.advanced_disable_decide)return void Nb.warn(`Remote config is disabled. Falling back to local config.`);this._loadRemoteConfigJs((e=>{if(!e)return Nb.info(`No config found after loading remote JS config. Falling back to JSON.`),void this._loadRemoteConfigJSON((e=>{this.onRemoteConfig(e)}));this.onRemoteConfig(e)}))}catch(e){Nb.error(`Error loading remote config`,e)}}onRemoteConfig(e){e?this.instance.config.__preview_remote_config?(this.instance._onRemoteConfig(e),!1!==e.hasFeatureFlags&&this.instance.featureFlags.ensureFlagsLoaded()):Nb.info(`__preview_remote_config is disabled. Logging config instead`,e):Nb.error(`Failed to fetch remote config from PostHog.`)}},Fb,Ib=z!=null&&z.location?q_(z.location.hash,`__posthog`)||q_(location.hash,`state`):null,Lb=`_postHogToolbarParams`,Rb=Eg(`[Toolbar]`);(function(e){e[e.UNINITIALIZED=0]=`UNINITIALIZED`,e[e.LOADING=1]=`LOADING`,e[e.LOADED=2]=`LOADED`})(Fb||={});var zb=class{constructor(e){this.instance=e}setToolbarState(e){V.ph_toolbar_state=e}getToolbarState(){return V.ph_toolbar_state??Fb.UNINITIALIZED}maybeLoadToolbar(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;if(!z||!B)return!1;e??=z.location,n??=z.history;try{if(!t){try{z.localStorage.setItem(`test`,`test`),z.localStorage.removeItem(`test`)}catch{return!1}t=z?.localStorage}var r,i=Ib||q_(e.hash,`__posthog`)||q_(e.hash,`state`),a=i?Qh((()=>JSON.parse(atob(decodeURIComponent(i)))))||Qh((()=>JSON.parse(decodeURIComponent(i)))):null;return a&&a.action===`ph_authorize`?((r=a).source=`url`,r&&Object.keys(r).length>0&&(a.desiredHash?e.hash=a.desiredHash:n?n.replaceState(n.state,``,e.pathname+e.search):e.hash=``)):((r=JSON.parse(t.getItem(Lb)||`{}`)).source=`localstorage`,delete r.userIntent),!(!r.token||this.instance.config.token!==r.token)&&(this.loadToolbar(r),!0)}catch{return!1}}_callLoadToolbar(e){var t=V.ph_load_toolbar||V.ph_load_editor;!bg(t)&&mg(t)?t(e,this.instance):Rb.warn(`No toolbar load function found`)}loadToolbar(e){var t=!(B==null||!B.getElementById(d_));if(!z||t)return!1;var n=this.instance.requestRouter.region===`custom`&&this.instance.config.advanced_disable_toolbar_metrics,r=G(G({token:this.instance.config.token},e),{},{apiURL:this.instance.requestRouter.endpointFor(`ui`)},n?{instrument:!1}:{});if(z.localStorage.setItem(Lb,JSON.stringify(G(G({},r),{},{source:void 0}))),this.getToolbarState()===Fb.LOADED)this._callLoadToolbar(r);else if(this.getToolbarState()===Fb.UNINITIALIZED){var i,a;this.setToolbarState(Fb.LOADING),(i=V.__PosthogExtensions__)==null||(a=i.loadExternalDependency)==null||a.call(i,this.instance,`toolbar`,(e=>{if(e)return Rb.error(`[Toolbar] Failed to load`,e),void this.setToolbarState(Fb.UNINITIALIZED);this.setToolbarState(Fb.LOADED),this._callLoadToolbar(r)})),ag(z,`turbolinks:load`,(()=>{this.setToolbarState(Fb.UNINITIALIZED),this.loadToolbar(r)}))}return!0}_loadEditor(e){return this.loadToolbar(e)}maybeLoadEditor(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;return this.maybeLoadToolbar(e,t,n)}},Bb=3e3,Vb=class{constructor(e,t){K(this,`isPaused`,!0),K(this,`queue`,[]),this.flushTimeoutMs=Ly(t?.flush_interval_ms||Bb,250,5e3,`flush interval`,Bb),this.sendRequest=e}enqueue(e){this.queue.push(e),this.flushTimeout||this.setFlushTimeout()}unload(){this.clearFlushTimeout();var e=this.queue.length>0?this.formatQueue():{},t=Object.values(e);[...t.filter((e=>e.url.indexOf(`/e`)===0)),...t.filter((e=>e.url.indexOf(`/e`)!==0))].map((e=>{this.sendRequest(G(G({},e),{},{transport:`sendBeacon`}))}))}enable(){this.isPaused=!1,this.setFlushTimeout()}setFlushTimeout(){var e=this;this.isPaused||(this.flushTimeout=setTimeout((()=>{if(this.clearFlushTimeout(),this.queue.length>0){var t=this.formatQueue(),n=function(n){var r=t[n],i=new Date().getTime();r.data&&pg(r.data)&&Jh(r.data,(e=>{e.offset=Math.abs(e.timestamp-i),delete e.timestamp})),e.sendRequest(r)};for(var r in t)n(r)}}),this.flushTimeoutMs))}clearFlushTimeout(){clearTimeout(this.flushTimeout),this.flushTimeout=void 0}formatQueue(){var e={};return Jh(this.queue,(t=>{var n,r=t,i=(r?r.batchKey:null)||r.url;U(e[i])&&(e[i]=G(G({},r),{},{data:[]})),(n=e[i].data)==null||n.push(r.data)})),this.queue=[],e}},Hb=function(e){var t,n,r,i,a=``;for(t=n=0,r=(e=(e+``).replace(/\r\n/g,`
|
|
263
|
+
`).replace(/\r/g,`
|
|
264
|
+
`)).length,i=0;i<r;i++){var o=e.charCodeAt(i),s=null;o<128?n++:s=o>127&&o<2048?String.fromCharCode(o>>6|192,63&o|128):String.fromCharCode(o>>12|224,o>>6&63|128,63&o|128),yg(s)||(n>t&&(a+=e.substring(t,n)),a+=s,t=n=i+1)}return n>t&&(a+=e.substring(t,e.length)),a},Ub=!!Bh||!!zh,Wb=`text/plain`,Gb=(e,t)=>{var[n,r]=e.split(`?`),i=G({},t);r?.split(`&`).forEach((e=>{var[t]=e.split(`=`);delete i[t]}));var a=W_(i);return a=a?(r?r+`&`:``)+a:r,`${n}?${a}`},Kb=(e,t)=>JSON.stringify(e,((e,t)=>typeof t==`bigint`?t.toString():t),t),qb=e=>{var{data:t,compression:n}=e;if(t){if(n===Mh.GZipJS){var r=xb(Sb(Kb(t)),{mtime:0}),i=new Blob([r],{type:Wb});return{contentType:Wb,body:i,estimatedSize:i.size}}if(n===Mh.Base64){var a=(e=>`data=`+encodeURIComponent(typeof e==`string`?e:Kb(e)))(function(e){var t,n,r,i,a,o=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`,s=0,c=0,l=``,u=[];if(!e)return e;e=Hb(e);do t=(a=e.charCodeAt(s++)<<16|e.charCodeAt(s++)<<8|e.charCodeAt(s++))>>18&63,n=a>>12&63,r=a>>6&63,i=63&a,u[c++]=o.charAt(t)+o.charAt(n)+o.charAt(r)+o.charAt(i);while(s<e.length);switch(l=u.join(``),e.length%3){case 1:l=l.slice(0,-2)+`==`;break;case 2:l=l.slice(0,-1)+`=`}return l}(Kb(t)));return{contentType:`application/x-www-form-urlencoded`,body:a,estimatedSize:new Blob([a]).size}}var o=Kb(t);return{contentType:`application/json`,body:o,estimatedSize:new Blob([o]).size}}},Jb=[];zh&&Jb.push({transport:`fetch`,method:e=>{var{contentType:t,body:n,estimatedSize:r}=qb(e)??{},i=new Headers;Jh(e.headers,(function(e,t){i.append(t,e)})),t&&i.append(`Content-Type`,t);var a=e.url,o=null;if(Vh){var s=new Vh;o={signal:s.signal,timeout:setTimeout((()=>s.abort()),e.timeout)}}zh(a,G({method:e?.method||`GET`,headers:i,keepalive:e.method===`POST`&&(r||0)<52428.8,body:n,signal:o?.signal},e.fetchOptions)).then((t=>t.text().then((n=>{var r,i={statusCode:t.status,text:n};if(t.status===200)try{i.json=JSON.parse(n)}catch(e){W.error(e)}(r=e.callback)==null||r.call(e,i)})))).catch((t=>{var n;W.error(t),(n=e.callback)==null||n.call(e,{statusCode:0,text:t})})).finally((()=>o?clearTimeout(o.timeout):null))}}),Bh&&Jb.push({transport:`XHR`,method:e=>{var t=new Bh;t.open(e.method||`GET`,e.url,!0);var{contentType:n,body:r}=qb(e)??{};Jh(e.headers,(function(e,n){t.setRequestHeader(n,e)})),n&&t.setRequestHeader(`Content-Type`,n),e.timeout&&(t.timeout=e.timeout),t.withCredentials=!0,t.onreadystatechange=()=>{if(t.readyState===4){var n,r={statusCode:t.status,text:t.responseText};if(t.status===200)try{r.json=JSON.parse(t.responseText)}catch{}(n=e.callback)==null||n.call(e,r)}},t.send(r)}}),Lh!=null&&Lh.sendBeacon&&Jb.push({transport:`sendBeacon`,method:e=>{var t=Gb(e.url,{beacon:`1`});try{var{contentType:n,body:r}=qb(e)??{},i=typeof r==`string`?new Blob([r],{type:n}):r;Lh.sendBeacon(t,i)}catch{}}});var Yb=[`retriesPerformedSoFar`],Xb=class{constructor(e){K(this,`isPolling`,!1),K(this,`pollIntervalMs`,3e3),K(this,`queue`,[]),this.instance=e,this.queue=[],this.areWeOnline=!0,!U(z)&&`onLine`in z.navigator&&(this.areWeOnline=z.navigator.onLine,ag(z,`online`,(()=>{this.areWeOnline=!0,this.flush()})),ag(z,`offline`,(()=>{this.areWeOnline=!1})))}retriableRequest(e){var{retriesPerformedSoFar:t}=e,n=Ag(e,Yb);xg(t)&&t>0&&(n.url=Gb(n.url,{retry_count:t})),this.instance._send_request(G(G({},n),{},{callback:e=>{var r;e.statusCode!==200&&(e.statusCode<400||e.statusCode>=500)&&(t??0)<10?this.enqueue(G({retriesPerformedSoFar:t},n)):(r=n.callback)==null||r.call(n,e)}}))}enqueue(e){var t=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=t+1;var n=function(e){var t=3e3*2**e,n=t/2,r=Math.min(18e5,t),i=(Math.random()-.5)*(r-n);return Math.ceil(r+i)}(t),r=Date.now()+n;this.queue.push({retryAt:r,requestOptions:e});var i=`Enqueued failed request for retry in ${n}`;navigator.onLine||(i+=` (Browser is offline)`),W.warn(i),this.isPolling||(this.isPolling=!0,this.poll())}poll(){this.poller&&clearTimeout(this.poller),this.poller=setTimeout((()=>{this.areWeOnline&&this.queue.length>0&&this.flush(),this.poll()}),this.pollIntervalMs)}flush(){var e=Date.now(),t=[],n=this.queue.filter((n=>n.retryAt<e||(t.push(n),!1)));if(this.queue=t,n.length>0)for(var{requestOptions:r}of n)this.retriableRequest(r)}unload(){for(var{requestOptions:e}of(this.poller&&=(clearTimeout(this.poller),void 0),this.queue))try{this.instance._send_request(G(G({},e),{},{transport:`sendBeacon`}))}catch(e){W.error(e)}this.queue=[]}},Zb,Qb=Eg(`[SessionId]`),$b=class{constructor(e,t,n){var r;if(K(this,`_sessionIdChangedHandlers`,[]),!e.persistence)throw Error(`SessionIdManager requires a PostHogPersistence instance`);if(e.config.__preview_experimental_cookieless_mode)throw Error(`SessionIdManager cannot be used with __preview_experimental_cookieless_mode`);this.config=e.config,this.persistence=e.persistence,this._windowId=void 0,this._sessionId=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this._sessionIdGenerator=t||D_,this._windowIdGenerator=n||D_;var i=this.config.persistence_name||this.config.token;if(this._sessionTimeoutMs=1e3*Ly(this.config.session_idle_timeout_seconds||1800,60,36e3,`session_idle_timeout_seconds`,1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.resetIdleTimer(),this._window_id_storage_key=`ph_`+i+`_window_id`,this._primary_window_exists_storage_key=`ph_`+i+`_primary_window_exists`,this._canUseSessionStorage()){var a=V_.parse(this._window_id_storage_key),o=V_.parse(this._primary_window_exists_storage_key);a&&!o?this._windowId=a:V_.remove(this._window_id_storage_key),V_.set(this._primary_window_exists_storage_key,!0)}if((r=this.config.bootstrap)!=null&&r.sessionID)try{var s=(e=>{var t=e.replace(/-/g,``);if(t.length!==32)throw Error(`Not a valid UUID`);if(t[12]!==`7`)throw Error(`Not a UUIDv7`);return parseInt(t.substring(0,12),16)})(this.config.bootstrap.sessionID);this._setSessionId(this.config.bootstrap.sessionID,new Date().getTime(),s)}catch(e){Qb.error(`Invalid sessionID in bootstrap`,e)}this._listenToReloadWindow()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return U(this._sessionIdChangedHandlers)&&(this._sessionIdChangedHandlers=[]),this._sessionIdChangedHandlers.push(e),this._sessionId&&e(this._sessionId,this._windowId),()=>{this._sessionIdChangedHandlers=this._sessionIdChangedHandlers.filter((t=>t!==e))}}_canUseSessionStorage(){return this.config.persistence!==`memory`&&!this.persistence.disabled&&V_.is_supported()}_setWindowId(e){e!==this._windowId&&(this._windowId=e,this._canUseSessionStorage()&&V_.set(this._window_id_storage_key,e))}_getWindowId(){return this._windowId?this._windowId:this._canUseSessionStorage()?V_.parse(this._window_id_storage_key):null}_setSessionId(e,t,n){e===this._sessionId&&t===this._sessionActivityTimestamp&&n===this._sessionStartTimestamp||(this._sessionStartTimestamp=n,this._sessionActivityTimestamp=t,this._sessionId=e,this.persistence.register({[qg]:[t,e,n]}))}_getSessionId(){if(this._sessionId&&this._sessionActivityTimestamp&&this._sessionStartTimestamp)return[this._sessionActivityTimestamp,this._sessionId,this._sessionStartTimestamp];var e=this.persistence.props[qg];return pg(e)&&e.length===2&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this._setSessionId(null,null,null)}_listenToReloadWindow(){ag(z,`beforeunload`,(()=>{this._canUseSessionStorage()&&V_.remove(this._primary_window_exists_storage_key)}),{capture:!1})}checkAndGetSessionAndWindowId(){var e=arguments.length>0&&arguments[0]!==void 0&&arguments[0],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.config.__preview_experimental_cookieless_mode)throw Error(`checkAndGetSessionAndWindowId should not be called in __preview_experimental_cookieless_mode`);var n=t||new Date().getTime(),[r,i,a]=this._getSessionId(),o=this._getWindowId(),s=xg(a)&&a>0&&Math.abs(n-a)>864e5,c=!1,l=!i,u=!e&&Math.abs(n-r)>this.sessionTimeoutMs;l||u||s?(i=this._sessionIdGenerator(),o=this._windowIdGenerator(),Qb.info(`new session ID generated`,{sessionId:i,windowId:o,changeReason:{noSessionId:l,activityTimeout:u,sessionPastMaximumLength:s}}),a=n,c=!0):o||(o=this._windowIdGenerator(),c=!0);var d=r===0||!e||s?n:r,f=a===0?new Date().getTime():a;return this._setWindowId(o),this._setSessionId(i,d,f),e||this.resetIdleTimer(),c&&this._sessionIdChangedHandlers.forEach((e=>e(i,o,c?{noSessionId:l,activityTimeout:u,sessionPastMaximumLength:s}:void 0))),{sessionId:i,windowId:o,sessionStartTimestamp:f,changeReason:c?{noSessionId:l,activityTimeout:u,sessionPastMaximumLength:s}:void 0,lastActivityTimestamp:r}}resetIdleTimer(){clearTimeout(this._enforceIdleTimeout),this._enforceIdleTimeout=setTimeout((()=>{this.resetSessionId()}),1.1*this.sessionTimeoutMs)}};(function(e){e.US=`us`,e.EU=`eu`,e.CUSTOM=`custom`})(Zb||={});var ex=`i.posthog.com`,tx=class{constructor(e){K(this,`_regionCache`,{}),this.instance=e}get apiHost(){var e=this.instance.config.api_host.trim().replace(/\/$/,``);return e===`https://app.posthog.com`?`https://us.i.posthog.com`:e}get uiHost(){var e=this.instance.config.ui_host?.replace(/\/$/,``);return e||=this.apiHost.replace(`.${ex}`,`.posthog.com`),e===`https://app.posthog.com`?`https://us.posthog.com`:e}get region(){return this._regionCache[this.apiHost]||(/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this._regionCache[this.apiHost]=Zb.US:/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this._regionCache[this.apiHost]=Zb.EU:this._regionCache[this.apiHost]=Zb.CUSTOM),this._regionCache[this.apiHost]}endpointFor(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:``;if(t&&=t[0]===`/`?t:`/${t}`,e===`ui`)return this.uiHost+t;if(this.region===Zb.CUSTOM)return this.apiHost+t;var n=ex+t;switch(e){case`assets`:return`https://${this.region}-assets.${n}`;case`api`:return`https://${this.region}.${n}`}}},nx=`posthog-js`;function rx(e){var{organization:t,projectId:n,prefix:r,severityAllowList:i=[`error`]}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return a=>{if(!(i===`*`||i.includes(a.level))||!e.__loaded)return a;a.tags||={};var o=e.requestRouter.endpointFor(`ui`,`/project/${e.config.token}/person/${e.get_distinct_id()}`);a.tags[`PostHog Person URL`]=o,e.sessionRecordingStarted()&&(a.tags[`PostHog Recording URL`]=e.get_session_replay_url({withTimestamp:!0}));var s=a.exception?.values||[];s.forEach((e=>{e.stacktrace&&(e.stacktrace.type=`raw`,e.stacktrace.frames.forEach((e=>{e.platform=`web:javascript`})))}));var c={$exception_message:s[0]?.value||a.message,$exception_type:s[0]?.type,$exception_personURL:o,$exception_level:a.level,$exception_list:s,$sentry_event_id:a.event_id,$sentry_exception:a.exception,$sentry_exception_message:s[0]?.value||a.message,$sentry_exception_type:s[0]?.type,$sentry_tags:a.tags};return t&&n&&(c.$sentry_url=(r||`https://sentry.io/organizations/`)+t+`/issues/?project=`+n+`&query=`+a.event_id),e.exceptions.sendExceptionEvent(c),a}}var ix=class{constructor(e,t,n,r,i){this.name=nx,this.setupOnce=function(a){a(rx(e,{organization:t,projectId:n,prefix:r,severityAllowList:i}))}}},ax=Eg(`[SegmentIntegration]`);function ox(e,t){var n=e.config.segment;if(!n)return t();(function(e,t){var n=e.config.segment;if(!n)return t();var r=n=>{var r=()=>n.anonymousId()||D_();e.config.get_device_id=r,n.id()&&(e.register({distinct_id:n.id(),$device_id:r()}),e.persistence.set_property(i_,`identified`)),t()},i=n.user();`then`in i&&mg(i.then)?i.then((e=>r(e))):r(i)})(e,(()=>{n.register((e=>{Promise&&Promise.resolve||ax.warn(`This browser does not have Promise support, and can not use the segment integration`);var t=(t,n)=>{if(!n)return t;t.event.userId||t.event.anonymousId===e.get_distinct_id()||(ax.info(`No userId set, resetting PostHog`),e.reset()),t.event.userId&&t.event.userId!==e.get_distinct_id()&&(ax.info(`UserId set, identifying with PostHog`),e.identify(t.event.userId));var r=e._calculate_event_properties(n,t.event.properties??{},new Date);return t.event.properties=Object.assign({},r,t.event.properties),t};return{name:`PostHog JS`,type:`enrichment`,version:`1.0.0`,isLoaded:()=>!0,load:()=>Promise.resolve(),track:e=>t(e,e.event.event),page:e=>t(e,`$pageview`),identify:e=>t(e,`$identify`),screen:e=>t(e,`$screen`)}})(e)).then((()=>{t()}))}))}var sx=class{constructor(e){this._instance=e}doPageView(e,t){var n=this._previousPageViewProperties(e,t);return this._currentPageview={pathname:z?.location.pathname??``,pageViewId:t,timestamp:e},this._instance.scrollManager.resetContext(),n}doPageLeave(e){return this._previousPageViewProperties(e,this._currentPageview?.pageViewId)}doEvent(){return{$pageview_id:this._currentPageview?.pageViewId}}_previousPageViewProperties(e,t){var n=this._currentPageview;if(!n)return{$pageview_id:t};var r={$pageview_id:t,$prev_pageview_id:n.pageViewId},i=this._instance.scrollManager.getContext();if(i&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:a,lastScrollY:o,maxScrollY:s,maxContentHeight:c,lastContentY:l,maxContentY:u}=i;if(!(U(a)||U(o)||U(s)||U(c)||U(l)||U(u))){a=Math.ceil(a),o=Math.ceil(o),s=Math.ceil(s),c=Math.ceil(c),l=Math.ceil(l),u=Math.ceil(u);var d=a<=1?1:Ly(o/a,0,1),f=a<=1?1:Ly(s/a,0,1),p=c<=1?1:Ly(l/c,0,1),m=c<=1?1:Ly(u/c,0,1);r=Yh(r,{$prev_pageview_last_scroll:o,$prev_pageview_last_scroll_percentage:d,$prev_pageview_max_scroll:s,$prev_pageview_max_scroll_percentage:f,$prev_pageview_last_content:l,$prev_pageview_last_content_percentage:p,$prev_pageview_max_content:u,$prev_pageview_max_content_percentage:m})}}return n.pathname&&(r.$prev_pageview_pathname=n.pathname),n.timestamp&&(r.$prev_pageview_duration=(e.getTime()-n.timestamp.getTime())/1e3),r}},cx,lx,ux,dx,fx,px,mx,hx,gx={},_x=[],vx=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,yx=Array.isArray;function bx(e,t){for(var n in t)e[n]=t[n];return e}function xx(e){var t=e.parentNode;t&&t.removeChild(e)}function Sx(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i??++ux,__i:-1,__u:0};return i==null&&lx.vnode!=null&&lx.vnode(a),a}function Cx(e){return e.children}function wx(e,t){this.props=e,this.context=t}function Tx(e,t){if(t==null)return e.__?Tx(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?Tx(e):null}function Ex(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return Ex(e)}}function Dx(e){(!e.__d&&(e.__d=!0)&&dx.push(e)&&!Ox.__r++||fx!==lx.debounceRendering)&&((fx=lx.debounceRendering)||px)(Ox)}function Ox(){var e,t,n,r,i,a,o,s,c;for(dx.sort(mx);e=dx.shift();)e.__d&&(t=dx.length,r=void 0,a=(i=(n=e).__v).__e,s=[],c=[],(o=n.__P)&&((r=bx({},i)).__v=i.__v+1,lx.vnode&&lx.vnode(r),Lx(o,r,i,n.__n,o.ownerSVGElement!==void 0,32&i.__u?[a]:null,s,a??Tx(i),!!(32&i.__u),c),r.__.__k[r.__i]=r,Rx(s,r,c),r.__e!=a&&Ex(r)),dx.length>t&&dx.sort(mx));Ox.__r=0}function kx(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g=r&&r.__k||_x,_=t.length;for(n.__d=c,Ax(n,t,g),c=n.__d,d=0;d<_;d++)(p=n.__k[d])!=null&&typeof p!=`boolean`&&typeof p!=`function`&&(f=p.__i===-1?gx:g[p.__i]||gx,p.__i=d,Lx(e,p,f,i,a,o,s,c,l,u),m=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&Bx(f.ref,null,p),u.push(p.ref,p.__c||m,p)),h==null&&m!=null&&(h=m),65536&p.__u||f.__k===p.__k?c=jx(p,c,e):typeof p.type==`function`&&p.__d!==void 0?c=p.__d:m&&(c=m.nextSibling),p.__d=void 0,p.__u&=-196609);n.__d=c,n.__e=h}function Ax(e,t,n){var r,i,a,o,s,c=t.length,l=n.length,u=l,d=0;for(e.__k=[],r=0;r<c;r++)(i=e.__k[r]=(i=t[r])==null||typeof i==`boolean`||typeof i==`function`?null:typeof i==`string`||typeof i==`number`||typeof i==`bigint`||i.constructor==String?Sx(null,i,null,null,i):yx(i)?Sx(Cx,{children:i},null,null,null):i.constructor===void 0&&i.__b>0?Sx(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)==null?(a=n[r])&&a.key==null&&a.__e&&(a.__e==e.__d&&(e.__d=Tx(a)),Vx(a,a,!1),n[r]=null,u--):(i.__=e,i.__b=e.__b+1,s=Mx(i,n,o=r+d,u),i.__i=s,a=null,s!==-1&&(u--,(a=n[s])&&(a.__u|=131072)),a==null||a.__v===null?(s==-1&&d--,typeof i.type!=`function`&&(i.__u|=65536)):s!==o&&(s===o+1?d++:s>o?u>c-o?d+=s-o:d--:d=s<o&&s==o-1?s-o:0,s!==r+d&&(i.__u|=65536)));if(u)for(r=0;r<l;r++)(a=n[r])!=null&&!(131072&a.__u)&&(a.__e==e.__d&&(e.__d=Tx(a)),Vx(a,a))}function jx(e,t,n){var r,i;if(typeof e.type==`function`){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=jx(r[i],t,n));return t}return e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e),t&&t.nextSibling}function Mx(e,t,n,r){var i=e.key,a=e.type,o=n-1,s=n+1,c=t[n];if(c===null||c&&i==c.key&&a===c.type)return n;if(r>+(c!=null&&!(131072&c.__u)))for(;o>=0||s<t.length;){if(o>=0){if((c=t[o])&&!(131072&c.__u)&&i==c.key&&a===c.type)return o;o--}if(s<t.length){if((c=t[s])&&!(131072&c.__u)&&i==c.key&&a===c.type)return s;s++}}return-1}function Nx(e,t,n){t[0]===`-`?e.setProperty(t,n??``):e[t]=n==null?``:typeof n!=`number`||vx.test(t)?n:n+`px`}function Px(e,t,n,r,i){var a;e:if(t===`style`)if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||Nx(e.style,t,``);if(n)for(t in n)r&&n[t]===r[t]||Nx(e.style,t,n[t])}else if(t[0]===`o`&&t[1]===`n`)a=t!==(t=t.replace(/(PointerCapture)$|Capture$/,`$1`)),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||={},e.l[t+a]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,a?Ix:Fx,a)):e.removeEventListener(t,a?Ix:Fx,a);else{if(i)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!==`width`&&t!==`height`&&t!==`href`&&t!==`list`&&t!==`form`&&t!==`tabIndex`&&t!==`download`&&t!==`rowSpan`&&t!==`colSpan`&&t!==`role`&&t in e)try{e[t]=n??``;break e}catch{}typeof n==`function`||(n==null||!1===n&&t[4]!==`-`?e.removeAttribute(t):e.setAttribute(t,n))}}function Fx(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(lx.event?lx.event(e):e)}function Ix(e){return this.l[e.type+!0](lx.event?lx.event(e):e)}function Lx(e,t,n,r,i,a,o,s,c,l){var u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),a=[s=t.__e=n.__e]),(u=lx.__b)&&u(t);e:if(typeof T==`function`)try{if(_=t.props,v=(u=T.contextType)&&r[u.__c],y=u?v?v.props.value:u.__:r,n.__c?g=(d=t.__c=n.__c).__=d.__E:(`prototype`in T&&T.prototype.render?t.__c=d=new T(_,y):(t.__c=d=new wx(_,y),d.constructor=T,d.render=Hx),v&&v.sub(d),d.props=_,d.state||={},d.context=y,d.__n=r,f=d.__d=!0,d.__h=[],d._sb=[]),d.__s??=d.state,T.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=bx({},d.__s)),bx(d.__s,T.getDerivedStateFromProps(_,d.__s))),p=d.props,m=d.state,d.__v=t,f)T.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(T.getDerivedStateFromProps==null&&_!==p&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(_,y),!d.__e&&(d.shouldComponentUpdate!=null&&!1===d.shouldComponentUpdate(_,d.__s,y)||t.__v===n.__v)){for(t.__v!==n.__v&&(d.props=_,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),b=0;b<d._sb.length;b++)d.__h.push(d._sb[b]);d._sb=[],d.__h.length&&o.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(_,d.__s,y),d.componentDidUpdate!=null&&d.__h.push((function(){d.componentDidUpdate(p,m,h)}))}if(d.context=y,d.props=_,d.__P=e,d.__e=!1,x=lx.__r,S=0,`prototype`in T&&T.prototype.render){for(d.state=d.__s,d.__d=!1,x&&x(t),u=d.render(d.props,d.state,d.context),C=0;C<d._sb.length;C++)d.__h.push(d._sb[C]);d._sb=[]}else do d.__d=!1,x&&x(t),u=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++S<25);d.state=d.__s,d.getChildContext!=null&&(r=bx(bx({},r),d.getChildContext())),f||d.getSnapshotBeforeUpdate==null||(h=d.getSnapshotBeforeUpdate(p,m)),kx(e,yx(w=u!=null&&u.type===Cx&&u.key==null?u.props.children:u)?w:[w],t,n,r,i,a,o,s,c,l),d.base=t.__e,t.__u&=-161,d.__h.length&&o.push(d),g&&(d.__E=d.__=null)}catch(e){t.__v=null,c||a!=null?(t.__e=s,t.__u|=c?160:32,a[a.indexOf(s)]=null):(t.__e=n.__e,t.__k=n.__k),lx.__e(e,t,n)}else a==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=zx(n.__e,t,n,r,i,a,o,c,l);(u=lx.diffed)&&u(t)}function Rx(e,t,n){t.__d=void 0;for(var r=0;r<n.length;r++)Bx(n[r],n[++r],n[++r]);lx.__c&&lx.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){lx.__e(e,t.__v)}}))}function zx(e,t,n,r,i,a,o,s,c){var l,u,d,f,p,m,h,g=n.props,_=t.props,v=t.type;if(v===`svg`&&(i=!0),a!=null){for(l=0;l<a.length;l++)if((p=a[l])&&`setAttribute`in p==!!v&&(v?p.localName===v:p.nodeType===3)){e=p,a[l]=null;break}}if(e==null){if(v===null)return document.createTextNode(_);e=i?document.createElementNS(`http://www.w3.org/2000/svg`,v):document.createElement(v,_.is&&_),a=null,s=!1}if(v===null)g===_||s&&e.data===_||(e.data=_);else{if(a&&=cx.call(e.childNodes),g=n.props||gx,!s&&a!=null)for(g={},l=0;l<e.attributes.length;l++)g[(p=e.attributes[l]).name]=p.value;for(l in g)p=g[l],l==`children`||(l==`dangerouslySetInnerHTML`?d=p:l===`key`||l in _||Px(e,l,null,p,i));for(l in _)p=_[l],l==`children`?f=p:l==`dangerouslySetInnerHTML`?u=p:l==`value`?m=p:l==`checked`?h=p:l===`key`||s&&typeof p!=`function`||g[l]===p||Px(e,l,p,g[l],i);if(u)s||d&&(u.__html===d.__html||u.__html===e.innerHTML)||(e.innerHTML=u.__html),t.__k=[];else if(d&&(e.innerHTML=``),kx(e,yx(f)?f:[f],t,n,r,i&&v!==`foreignObject`,a,o,a?a[0]:n.__k&&Tx(n,0),s,c),a!=null)for(l=a.length;l--;)a[l]!=null&&xx(a[l]);s||(l=`value`,m!==void 0&&(m!==e[l]||v===`progress`&&!m||v===`option`&&m!==g[l])&&Px(e,l,m,g[l],!1),l=`checked`,h!==void 0&&h!==e[l]&&Px(e,l,h,g[l],!1))}return e}function Bx(e,t,n){try{typeof e==`function`?e(t):e.current=t}catch(e){lx.__e(e,n)}}function Vx(e,t,n){var r,i;if(lx.unmount&&lx.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Bx(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){lx.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Vx(r[i],t,n||typeof e.type!=`function`);n||e.__e==null||xx(e.__e),e.__=e.__e=e.__d=void 0}function Hx(e,t,n){return this.constructor(e,n)}cx=_x.slice,lx={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},ux=0,wx.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=bx({},this.state);typeof e==`function`&&(e=e(bx({},n),this.props)),e&&bx(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Dx(this))},wx.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Dx(this))},wx.prototype.render=Cx,dx=[],px=typeof Promise==`function`?Promise.prototype.then.bind(Promise.resolve()):setTimeout,mx=function(e,t){return e.__v.__b-t.__v.__b},Ox.__r=0,hx=0;var Ux,Wx,Gx;(function(e,t){var n={__c:t=`__cC`+ hx++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some((function(e){e.__e=!0,Dx(e)}))},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};n.Provider.__=n.Consumer.contextType=n})({isPreviewMode:!1,previewPageIndex:0,handleCloseSurveyPopup:()=>{},isPopup:!0,onPreviewSubmit:()=>{}}),function(e){e.Popover=`popover`,e.API=`api`,e.Widget=`widget`}(Ux||={}),function(e){e.Open=`open`,e.MultipleChoice=`multiple_choice`,e.SingleChoice=`single_choice`,e.Rating=`rating`,e.Link=`link`}(Wx||={}),function(e){e.NextQuestion=`next_question`,e.End=`end`,e.ResponseBased=`response_based`,e.SpecificQuestion=`specific_question`}(Gx||={});var Kx=class{constructor(){K(this,`events`,{}),this.events={}}on(e,t){return this.events[e]||(this.events[e]=[]),this.events[e].push(t),()=>{this.events[e]=this.events[e].filter((e=>e!==t))}}emit(e,t){for(var n of this.events[e]||[])n(t);for(var r of this.events[`*`]||[])r(e,t)}},qx=class e{constructor(e){K(this,`_debugEventEmitter`,new Kx),K(this,`checkStep`,((e,t)=>this.checkStepEvent(e,t)&&this.checkStepUrl(e,t)&&this.checkStepElement(e,t))),K(this,`checkStepEvent`,((e,t)=>t==null||!t.event||e?.event===t?.event)),this.instance=e,this.actionEvents=new Set,this.actionRegistry=new Set}init(){if(!U(this.instance?._addCaptureHook)){var e;(e=this.instance)==null||e._addCaptureHook(((e,t)=>{this.on(e,t)}))}}register(e){var t;if(!U(this.instance?._addCaptureHook)&&(e.forEach((e=>{var t,n;(t=this.actionRegistry)==null||t.add(e),(n=e.steps)==null||n.forEach((e=>{var t;(t=this.actionEvents)==null||t.add(e?.event||``)}))})),(t=this.instance)!=null&&t.autocapture)){var n,r=new Set;e.forEach((e=>{var t;(t=e.steps)==null||t.forEach((e=>{e!=null&&e.selector&&r.add(e?.selector)}))})),(n=this.instance)==null||n.autocapture.setElementSelectors(r)}}on(e,t){t!=null&&e.length!=0&&(this.actionEvents.has(e)||this.actionEvents.has(t?.event))&&this.actionRegistry&&this.actionRegistry?.size>0&&this.actionRegistry.forEach((e=>{this.checkAction(t,e)&&this._debugEventEmitter.emit(`actionCaptured`,e.name)}))}_addActionHook(e){this.onAction(`actionCaptured`,(t=>e(t)))}checkAction(e,t){if(t?.steps==null)return!1;for(var n of t.steps)if(this.checkStep(e,n))return!0;return!1}onAction(e,t){return this._debugEventEmitter.on(e,t)}checkStepUrl(t,n){if(n!=null&&n.url){var r,i=t==null||(r=t.properties)==null?void 0:r.$current_url;if(!i||typeof i!=`string`||!e.matchString(i,n?.url,n?.url_matching||`contains`))return!1}return!0}static matchString(t,n,r){switch(r){case`regex`:return!!z&&cg(t,n);case`exact`:return n===t;case`contains`:return cg(t,e.escapeStringRegexp(n).replace(/_/g,`.`).replace(/%/g,`.*`));default:return!1}}static escapeStringRegexp(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}checkStepElement(t,n){if((n!=null&&n.href||n!=null&&n.tag_name||n!=null&&n.text)&&!this.getElementsList(t).some((t=>!(n!=null&&n.href&&!e.matchString(t.href||``,n?.href,n?.href_matching||`exact`))&&(n==null||!n.tag_name||t.tag_name===n?.tag_name)&&!(n!=null&&n.text&&!e.matchString(t.text||``,n?.text,n?.text_matching||`exact`)&&!e.matchString(t.$el_text||``,n?.text,n?.text_matching||`exact`)))))return!1;if(n!=null&&n.selector){var r,i=t==null||(r=t.properties)==null?void 0:r.$element_selectors;if(!i||!i.includes(n?.selector))return!1}return!0}getElementsList(e){return e?.properties.$elements==null?[]:e?.properties.$elements}},Jx=class e{constructor(e){this.instance=e,this.eventToSurveys=new Map,this.actionToSurveys=new Map}register(e){U(this.instance?._addCaptureHook)||(this.setupEventBasedSurveys(e),this.setupActionBasedSurveys(e))}setupActionBasedSurveys(e){var t=e.filter((e=>{var t,n,r;return e.conditions?.actions&&((t=e.conditions)==null||(n=t.actions)==null||(r=n.values)==null?void 0:r.length)>0}));t.length!==0&&(this.actionMatcher??(this.actionMatcher=new qx(this.instance),this.actionMatcher.init(),this.actionMatcher._addActionHook((e=>{this.onAction(e)}))),t.forEach((e=>{var t,n,r,i,a,o,s,c,l,u;e.conditions&&(t=e.conditions)!=null&&t.actions&&(n=e.conditions)!=null&&(r=n.actions)!=null&&r.values&&((i=e.conditions)==null||(a=i.actions)==null||(o=a.values)==null?void 0:o.length)>0&&((s=this.actionMatcher)==null||s.register(e.conditions.actions.values),(c=e.conditions)==null||(l=c.actions)==null||(u=l.values)==null||u.forEach((t=>{if(t&&t.name){var n=this.actionToSurveys.get(t.name);n&&n.push(e.id),this.actionToSurveys.set(t.name,n||[e.id])}})))})))}setupEventBasedSurveys(e){var t;e.filter((e=>{var t,n,r;return e.conditions?.events&&((t=e.conditions)==null||(n=t.events)==null||(r=n.values)==null?void 0:r.length)>0})).length!==0&&((t=this.instance)==null||t._addCaptureHook(((e,t)=>{this.onEvent(e,t)})),e.forEach((e=>{var t,n,r;(t=e.conditions)==null||(n=t.events)==null||(r=n.values)==null||r.forEach((t=>{if(t&&t.name){var n=this.eventToSurveys.get(t.name);n&&n.push(e.id),this.eventToSurveys.set(t.name,n||[e.id])}}))})))}onEvent(t,n){var r,i,a=((r=this.instance)==null||(i=r.persistence)==null?void 0:i.props[n_])||[];if(e.SURVEY_SHOWN_EVENT_NAME==t&&n&&a.length>0){var o,s=n==null||(o=n.properties)==null?void 0:o.$survey_id;if(s){var c=a.indexOf(s);c>=0&&(a.splice(c,1),this._updateActivatedSurveys(a))}}else this.eventToSurveys.has(t)&&this._updateActivatedSurveys(a.concat(this.eventToSurveys.get(t)||[]))}onAction(e){var t,n,r=((t=this.instance)==null||(n=t.persistence)==null?void 0:n.props[n_])||[];this.actionToSurveys.has(e)&&this._updateActivatedSurveys(r.concat(this.actionToSurveys.get(e)||[]))}_updateActivatedSurveys(e){var t,n;(t=this.instance)==null||(n=t.persistence)==null||n.register({[n_]:[...new Set(e)]})}getSurveys(){var e,t;return((e=this.instance)==null||(t=e.persistence)==null?void 0:t.props[n_])||[]}getEventToSurveys(){return this.eventToSurveys}_getActionMatcher(){return this.actionMatcher}};K(Jx,`SURVEY_SHOWN_EVENT_NAME`,`survey shown`);var Yx=Eg(`[Surveys]`),Xx={icontains:(e,t)=>e.some((e=>t.toLowerCase().includes(e.toLowerCase()))),not_icontains:(e,t)=>e.every((e=>!t.toLowerCase().includes(e.toLowerCase()))),regex:(e,t)=>e.some((e=>cg(t,e))),not_regex:(e,t)=>e.every((e=>!cg(t,e))),exact:(e,t)=>e.some((e=>t===e)),is_not:(e,t)=>e.every((e=>t!==e))};function Zx(e,t,n){var r,i=e.questions[t],a=t+1;if((r=i.branching)==null||!r.type)return t===e.questions.length-1?Gx.End:a;if(i.branching.type===Gx.End)return Gx.End;if(i.branching.type===Gx.SpecificQuestion){if(Number.isInteger(i.branching.index))return i.branching.index}else if(i.branching.type===Gx.ResponseBased){if(i.type===Wx.SingleChoice){var o,s,c=i.choices.indexOf(`${n}`);if((o=i.branching)!=null&&(s=o.responseValues)!=null&&s.hasOwnProperty(c)){var l=i.branching.responseValues[c];return Number.isInteger(l)?l:l===Gx.End?Gx.End:a}}else if(i.type===Wx.Rating){var u,d;if(typeof n!=`number`||!Number.isInteger(n))throw Error(`The response type must be an integer`);var f=function(e,t){if(t===3){if(e<1||e>3)throw Error(`The response must be in range 1-3`);return e===1?`negative`:e===2?`neutral`:`positive`}if(t===5){if(e<1||e>5)throw Error(`The response must be in range 1-5`);return e<=2?`negative`:e===3?`neutral`:`positive`}if(t===7){if(e<1||e>7)throw Error(`The response must be in range 1-7`);return e<=3?`negative`:e===4?`neutral`:`positive`}if(t===10){if(e<0||e>10)throw Error(`The response must be in range 0-10`);return e<=6?`detractors`:e<=8?`passives`:`promoters`}throw Error(`The scale must be one of: 3, 5, 7, 10`)}(n,i.scale);if((u=i.branching)!=null&&(d=u.responseValues)!=null&&d.hasOwnProperty(f)){var p=i.branching.responseValues[f];return Number.isInteger(p)?p:p===Gx.End?Gx.End:a}}return a}return Yx.warn(`Falling back to next question index due to unexpected branching type`),a}function Qx(e){return e??`icontains`}var $x=class{constructor(e){K(this,`getNextSurveyStep`,Zx),this.instance=e,this._surveyEventReceiver=null}onRemoteConfig(e){this._decideServerResponse=!!e.surveys,Yx.info(`decideServerResponse set to ${this._decideServerResponse}`),this.loadIfEnabled()}reset(){localStorage.removeItem(`lastSeenSurveyDate`),(()=>{for(var e=[],t=0;t<localStorage.length;t++){var n=localStorage.key(t);n!=null&&n.startsWith(`seenSurvey_`)&&e.push(n)}return e})().forEach((e=>localStorage.removeItem(e)))}loadIfEnabled(){if(!this._surveyManager)if(this.instance.config.disable_surveys)Yx.info(`Disabled. Not loading surveys.`);else{var e=V?.__PosthogExtensions__;if(e){var t=e.generateSurveys;if(this._decideServerResponse)if(this._surveyEventReceiver??=new Jx(this.instance),t)this._surveyManager=t(this.instance);else{var n=e.loadExternalDependency;n?n(this.instance,`surveys`,(t=>{t?Yx.error(`Could not load surveys script`,t):this._surveyManager=e.generateSurveys?.call(e,this.instance)})):Yx.error(`PostHog loadExternalDependency extension not found. Cannot load remote config.`)}else Yx.warn(`Decide not loaded yet. Not loading surveys.`)}else Yx.error(`PostHog Extensions not found.`)}}getSurveys(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(this.instance.config.disable_surveys)return Yx.info(`Disabled. Not loading surveys.`),e([]);this._surveyEventReceiver??=new Jx(this.instance);var n=this.instance.get_property(t_);if(n&&!t)return e(n);this.instance._send_request({url:this.instance.requestRouter.endpointFor(`api`,`/api/surveys/?token=${this.instance.config.token}`),method:`GET`,callback:t=>{var n,r=t.statusCode;if(r!==200||!t.json)return Yx.error(`Surveys API could not be loaded, status: ${r}`),e([]);var i,a=t.json.surveys||[],o=a.filter((e=>{var t,n,r,i,a,o,s,c,l,u;return e.conditions?.events&&((t=e.conditions)==null||(n=t.events)==null?void 0:n.values)&&((r=e.conditions)==null||(i=r.events)==null||(a=i.values)==null?void 0:a.length)>0||e.conditions?.actions&&((o=e.conditions)==null||(s=o.actions)==null?void 0:s.values)&&((c=e.conditions)==null||(l=c.actions)==null||(u=l.values)==null?void 0:u.length)>0}));return o.length>0&&((i=this._surveyEventReceiver)==null||i.register(o)),(n=this.instance.persistence)==null||n.register({[t_]:a}),e(a)}})}getActiveMatchingSurveys(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.getSurveys((t=>{var n=t.filter((e=>!(!e.start_date||e.end_date))).filter((e=>{var t;if(!e.conditions)return!0;var n=function(e){var t,n;if((t=e.conditions)==null||!t.url)return!0;var r=z==null||(n=z.location)==null?void 0:n.href;if(!r)return!1;var i=[e.conditions.url];return Xx[Qx(e.conditions?.urlMatchType)](i,r)}(e),r=(t=e.conditions)==null||!t.selector||B?.querySelector(e.conditions.selector),i=function(e){var t;if((t=e.conditions)==null||!t.deviceTypes)return!0;if(!Hh)return!1;var n=qv.deviceType(Hh);return Xx[Qx(e.conditions?.deviceTypesMatchType)](e.conditions.deviceTypes,n)}(e);return n&&r&&i})),r=this._surveyEventReceiver?.getSurveys();return e(n.filter((e=>{var t,n,i,a,o,s,c,l,u;if(!(e.linked_flag_key||e.targeting_flag_key||e.internal_targeting_flag_key||(t=e.feature_flag_keys)!=null&&t.length))return!0;var d=!e.linked_flag_key||this.instance.featureFlags.isFeatureEnabled(e.linked_flag_key),f=!e.targeting_flag_key||this.instance.featureFlags.isFeatureEnabled(e.targeting_flag_key),p=e.conditions?.events&&((n=e.conditions)==null||(i=n.events)==null?void 0:i.values)&&((a=e.conditions)==null||(o=a.events)==null?void 0:o.values.length)>0,m=e.conditions?.actions&&((s=e.conditions)==null||(c=s.actions)==null?void 0:c.values)&&((l=e.conditions)==null||(u=l.actions)==null?void 0:u.values.length)>0,h=!p&&!m||r?.includes(e.id),g=this._canActivateRepeatedly(e),_=!(e.internal_targeting_flag_key&&!g)||this.instance.featureFlags.isFeatureEnabled(e.internal_targeting_flag_key),v=this.checkFlags(e);return d&&f&&_&&h&&v})))}),t)}checkFlags(e){var t;return(t=e.feature_flag_keys)==null||!t.length||e.feature_flag_keys.every((e=>{var{key:t,value:n}=e;return!t||!n||this.instance.featureFlags.isFeatureEnabled(n)}))}_canActivateRepeatedly(e){return bg(V.__PosthogExtensions__?.canActivateRepeatedly)?(Yx.warn(`init was not called`),!1):V.__PosthogExtensions__.canActivateRepeatedly(e)}canRenderSurvey(e){bg(this._surveyManager)?Yx.warn(`init was not called`):this.getSurveys((t=>{var n=t.filter((t=>t.id===e))[0];this._surveyManager.canRenderSurvey(n)}))}renderSurvey(e,t){bg(this._surveyManager)?Yx.warn(`init was not called`):this.getSurveys((n=>{var r=n.filter((t=>t.id===e))[0];this._surveyManager.renderSurvey(r,B?.querySelector(t))}))}},eS=Eg(`[RateLimiter]`),tS=class{constructor(e){K(this,`serverLimits`,{}),K(this,`lastEventRateLimited`,!1),K(this,`checkForLimiting`,(e=>{var t=e.text;if(t&&t.length)try{(JSON.parse(t).quota_limited||[]).forEach((e=>{eS.info(`${e||`events`} is quota limited.`),this.serverLimits[e]=new Date().getTime()+6e4}))}catch(e){eS.warn(`could not rate limit - continuing. Error: "${e?.message}"`,{text:t});return}})),this.instance=e,this.captureEventsPerSecond=e.config.rate_limiting?.events_per_second||10,this.captureEventsBurstLimit=Math.max(e.config.rate_limiting?.events_burst_limit||10*this.captureEventsPerSecond,this.captureEventsPerSecond),this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}clientRateLimitContext(){var e,t=arguments.length>0&&arguments[0]!==void 0&&arguments[0],n=new Date().getTime(),r=this.instance.persistence?.get_property(o_)??{tokens:this.captureEventsBurstLimit,last:n};r.tokens+=(n-r.last)/1e3*this.captureEventsPerSecond,r.last=n,r.tokens>this.captureEventsBurstLimit&&(r.tokens=this.captureEventsBurstLimit);var i=r.tokens<1;return i||t||(r.tokens=Math.max(0,r.tokens-1)),!i||this.lastEventRateLimited||t||this.instance.capture(`$$client_ingestion_warning`,{$$client_ingestion_warning_message:`posthog-js client rate limited. Config is set to ${this.captureEventsPerSecond} events per second and ${this.captureEventsBurstLimit} events burst limit.`},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=i,(e=this.instance.persistence)==null||e.set_property(o_,r),{isRateLimited:i,remainingTokens:r.tokens}}isServerRateLimited(e){var t=this.serverLimits[e||`events`]||!1;return!1!==t&&new Date().getTime()<t}},nS=e=>{var t=e?.config;return G({initialPathName:Rh?.pathname||``,referringDomain:qv.referringDomain()},qv.campaignParams({customTrackedParams:t?.custom_campaign_params,maskPersonalDataProperties:t?.mask_personal_data_properties,customPersonalDataProperties:t?.custom_personal_data_properties}))},rS=class{constructor(e,t,n,r){K(this,`_onSessionIdCallback`,(e=>{var t=this._getStoredProps();if(!t||t.sessionId!==e){var n={sessionId:e,props:this._sessionSourceParamGenerator(this.instance)};this._persistence.register({[a_]:n})}})),this.instance=e,this._sessionIdManager=t,this._persistence=n,this._sessionSourceParamGenerator=r||nS,this._sessionIdManager.onSessionId(this._onSessionIdCallback)}_getStoredProps(){return this._persistence.props[a_]}getSessionProps(){var e=this._getStoredProps()?.props;return e?{$client_session_initial_referring_host:e.referringDomain,$client_session_initial_pathname:e.initialPathName,$client_session_initial_utm_source:e.utm_source,$client_session_initial_utm_campaign:e.utm_campaign,$client_session_initial_utm_medium:e.utm_medium,$client_session_initial_utm_content:e.utm_content,$client_session_initial_utm_term:e.utm_term}:{}}},iS=`ahrefsbot,ahrefssiteaudit,applebot,baiduspider,better uptime bot,bingbot,bingpreview,bot.htm,bot.php,crawler,deepscan,duckduckbot,facebookexternal,facebookcatalog,http://yandex.com/bots,hubspot,ia_archiver,linkedinbot,mj12bot,msnbot,nessus,petalbot,pinterest,prerender,rogerbot,screaming frog,semrushbot,sitebulb,slurp,turnitin,twitterbot,vercelbot,yahoo! slurp,yandexbot,gptbot,oai-searchbot,chatgpt-user,headlesschrome,cypress,Google-HotelAdsVerifier,adsbot-google,apis-google,duplexweb-google,feedfetcher-google,google favicon,google web preview,google-read-aloud,googlebot,googleweblight,mediapartners-google,storebot-google,Bytespider;`.split(`,`),aS=function(e,t){if(!e)return!1;var n=e.toLowerCase();return iS.concat(t||[]).some((e=>{var t=e.toLowerCase();return n.indexOf(t)!==-1}))},oS=function(e,t){if(!e)return!1;var n=e.userAgent;if(n&&aS(n,t))return!0;try{var r=e?.userAgentData;if(r!=null&&r.brands&&r.brands.some((e=>aS(e?.brand,t))))return!0}catch{}return!!e.webdriver},sS=class{constructor(){this.clicks=[]}isRageClick(e,t,n){var r=this.clicks[this.clicks.length-1];if(r&&Math.abs(e-r.x)+Math.abs(t-r.y)<30&&n-r.timestamp<1e3){if(this.clicks.push({x:e,y:t,timestamp:n}),this.clicks.length===3)return!0}else this.clicks=[{x:e,y:t,timestamp:n}];return!1}},cS=Eg(`[Dead Clicks]`),lS=()=>!0,uS=e=>{var t,n=!((t=e.instance.persistence)==null||!t.get_property(Rg)),r=e.instance.config.capture_dead_clicks;return Sg(r)?r:n},dS=class{get lazyLoadedDeadClicksAutocapture(){return this._lazyLoadedDeadClicksAutocapture}constructor(e,t,n){this.instance=e,this.isEnabled=t,this.onCapture=n,this.startIfEnabled()}onRemoteConfig(e){this.instance.persistence&&this.instance.persistence.register({[Rg]:e?.captureDeadClicks}),this.startIfEnabled()}startIfEnabled(){this.isEnabled(this)&&this.loadScript((()=>{this.start()}))}loadScript(e){var t,n,r;(t=V.__PosthogExtensions__)!=null&&t.initDeadClicksAutocapture&&e(),(n=V.__PosthogExtensions__)==null||(r=n.loadExternalDependency)==null||r.call(n,this.instance,`dead-clicks-autocapture`,(t=>{t?cS.error(`failed to load script`,t):e()}))}start(){var e;if(B){if(!this._lazyLoadedDeadClicksAutocapture&&(e=V.__PosthogExtensions__)!=null&&e.initDeadClicksAutocapture){var t=hg(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};t.__onCapture=this.onCapture,this._lazyLoadedDeadClicksAutocapture=V.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,t),this._lazyLoadedDeadClicksAutocapture.start(B),cS.info(`starting...`)}}else cS.error("`document` not found. Cannot start.")}stop(){this._lazyLoadedDeadClicksAutocapture&&(this._lazyLoadedDeadClicksAutocapture.stop(),this._lazyLoadedDeadClicksAutocapture=void 0,cS.info(`stopping...`))}},fS=Eg(`[Heatmaps]`);function pS(e){return hg(e)&&`clientX`in e&&`clientY`in e&&xg(e.clientX)&&xg(e.clientY)}var mS=class{constructor(e){var t;K(this,`rageclicks`,new sS),K(this,`_enabledServerSide`,!1),K(this,`_initialized`,!1),K(this,`_flushInterval`,null),this.instance=e,this._enabledServerSide=!((t=this.instance.persistence)==null||!t.props[Fg]),ag(z,`beforeunload`,this.flush)}get flushIntervalMilliseconds(){var e=5e3;return hg(this.instance.config.capture_heatmaps)&&this.instance.config.capture_heatmaps.flush_interval_milliseconds&&(e=this.instance.config.capture_heatmaps.flush_interval_milliseconds),e}get isEnabled(){return U(this.instance.config.capture_heatmaps)?U(this.instance.config.enable_heatmaps)?this._enabledServerSide:this.instance.config.enable_heatmaps:!1!==this.instance.config.capture_heatmaps}startIfEnabled(){if(this.isEnabled){if(this._initialized)return;fS.info(`starting...`),this._setupListeners(),this._flushInterval=setInterval(this.flush.bind(this),this.flushIntervalMilliseconds)}else{var e;clearInterval(this._flushInterval??void 0),(e=this.deadClicksCapture)==null||e.stop(),this.getAndClearBuffer()}}onRemoteConfig(e){var t=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[Fg]:t}),this._enabledServerSide=t,this.startIfEnabled()}getAndClearBuffer(){var e=this.buffer;return this.buffer=void 0,e}_onDeadClick(e){this._onClick(e.originalEvent,`deadclick`)}_setupListeners(){z&&B&&(ag(B,`click`,(e=>this._onClick(e||z?.event)),{capture:!0}),ag(B,`mousemove`,(e=>this._onMouseMove(e||z?.event)),{capture:!0}),this.deadClicksCapture=new dS(this.instance,lS,this._onDeadClick.bind(this)),this.deadClicksCapture.startIfEnabled(),this._initialized=!0)}_getProperties(e,t){var n=this.instance.scrollManager.scrollY(),r=this.instance.scrollManager.scrollX(),i=this.instance.scrollManager.scrollElement(),a=function(e,t,n){for(var r=e;r&&ty(r)&&!ny(r,`body`);){if(r===n)return!1;if(H(t,z?.getComputedStyle(r).position))return!0;r=fy(r)}return!1}(uy(e),[`fixed`,`sticky`],i);return{x:e.clientX+(a?0:r),y:e.clientY+(a?0:n),target_fixed:a,type:t}}_onClick(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`click`;if(!ey(e.target)&&pS(e)){var r=this._getProperties(e,n);(t=this.rageclicks)!=null&&t.isRageClick(e.clientX,e.clientY,new Date().getTime())&&this._capture(G(G({},r),{},{type:`rageclick`})),this._capture(r)}}_onMouseMove(e){!ey(e.target)&&pS(e)&&(clearTimeout(this._mouseMoveTimeout),this._mouseMoveTimeout=setTimeout((()=>{this._capture(this._getProperties(e,`mousemove`))}),500))}_capture(e){if(z){var t=z.location.href;this.buffer=this.buffer||{},this.buffer[t]||(this.buffer[t]=[]),this.buffer[t].push(e)}}flush(){this.buffer&&!gg(this.buffer)&&this.instance.capture(`$$heatmap`,{$heatmap_data:this.getAndClearBuffer()})}},hS=class{constructor(e){K(this,`_updateScrollData`,(()=>{this.context||={};var e=this.scrollElement(),t=this.scrollY(),n=e?Math.max(0,e.scrollHeight-e.clientHeight):0,r=t+(e?.clientHeight||0),i=e?.scrollHeight||0;this.context.lastScrollY=Math.ceil(t),this.context.maxScrollY=Math.max(t,this.context.maxScrollY??0),this.context.maxScrollHeight=Math.max(n,this.context.maxScrollHeight??0),this.context.lastContentY=r,this.context.maxContentY=Math.max(r,this.context.maxContentY??0),this.context.maxContentHeight=Math.max(i,this.context.maxContentHeight??0)})),this.instance=e}getContext(){return this.context}resetContext(){var e=this.context;return setTimeout(this._updateScrollData,0),e}startMeasuringScrollPosition(){ag(z,`scroll`,this._updateScrollData,{capture:!0}),ag(z,`scrollend`,this._updateScrollData,{capture:!0}),ag(z,`resize`,this._updateScrollData)}scrollElement(){if(!this.instance.config.scroll_root_selector)return z?.document.documentElement;for(var e of pg(this.instance.config.scroll_root_selector)?this.instance.config.scroll_root_selector:[this.instance.config.scroll_root_selector]){var t=z?.document.querySelector(e);if(t)return t}}scrollY(){if(this.instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollTop||0}return z&&(z.scrollY||z.pageYOffset||z.document.documentElement.scrollTop)||0}scrollX(){if(this.instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollLeft||0}return z&&(z.scrollX||z.pageXOffset||z.document.documentElement.scrollLeft)||0}},gS=Eg(`[AutoCapture]`);function _S(e,t){return t.length>e?t.slice(0,e)+`...`:t}function vS(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!ty(t));return t}function yS(e,t,n,r){var i=e.tagName.toLowerCase(),a={tag_name:i};dy.indexOf(i)>-1&&!n&&(i.toLowerCase()===`a`||i.toLowerCase()===`button`?a.$el_text=_S(1024,Cy(e)):a.$el_text=_S(1024,ly(e)));var o=sy(e);o.length>0&&(a.classes=o.filter((function(e){return e!==``}))),Jh(e.attributes,(function(n){var i;if((!hy(e)||[`name`,`id`,`class`,`aria-label`].indexOf(n.name)!==-1)&&(r==null||!r.includes(n.name))&&!t&&Sy(n.value)&&(i=n.name,!_g(i)||i.substring(0,10)!==`_ngcontent`&&i.substring(0,7)!==`_nghost`)){var o=n.value;n.name===`class`&&(o=ay(o).join(` `)),a[`attr__`+n.name]=_S(1024,o)}}));for(var s=1,c=1,l=e;l=vS(l);)s++,l.tagName===e.tagName&&c++;return a.nth_child=s,a.nth_of_type=c,a}function bS(e,t){for(var n,{e:r,maskAllElementAttributes:i,maskAllText:a,elementAttributeIgnoreList:o,elementsChainAsString:s}=t,c=[e],l=e;l.parentNode&&!ny(l,`body`);)iy(l.parentNode)?(c.push(l.parentNode.host),l=l.parentNode.host):(c.push(l.parentNode),l=l.parentNode);var u,d=[],f={},p=!1,m=!1;if(Jh(c,(e=>{var t=my(e);e.tagName.toLowerCase()===`a`&&(p=e.getAttribute(`href`),p=t&&p&&Sy(p)&&p),H(sy(e),`ph-no-capture`)&&(m=!0),d.push(yS(e,i,a,o)),Yh(f,function(e){if(!my(e))return{};var t={};return Jh(e.attributes,(function(e){if(e.name&&e.name.indexOf(`data-ph-capture-attribute`)===0){var n=e.name.replace(`data-ph-capture-attribute-`,``),r=e.value;n&&r&&Sy(r)&&(t[n]=r)}})),t}(e))})),m)return{props:{},explicitNoCapture:m};if(a||(e.tagName.toLowerCase()===`a`||e.tagName.toLowerCase()===`button`?d[0].$el_text=Cy(e):d[0].$el_text=ly(e)),p){var h;d[0].attr__href=p;var g=U_(p)?.host,_=z==null||(h=z.location)==null?void 0:h.host;g&&_&&g!==_&&(u=p)}return{props:Yh({$event_type:r.type,$ce_version:1},s?{}:{$elements:d},{$elements_chain:Ty(d)},(n=d[0])!=null&&n.$el_text?{$el_text:d[0]?.$el_text}:{},u&&r.type===`click`?{$external_click_url:u}:{},f)}}var xS=class{constructor(e){K(this,`_initialized`,!1),K(this,`_isDisabledServerSide`,null),K(this,`rageclicks`,new sS),K(this,`_elementsChainAsString`,!1),this.instance=e,this._elementSelectors=null}get config(){var e=hg(this.instance.config.autocapture)?this.instance.config.autocapture:{};return e.url_allowlist=e.url_allowlist?.map((e=>new RegExp(e))),e.url_ignorelist=e.url_ignorelist?.map((e=>new RegExp(e))),e}_addDomEventHandlers(){if(this.isBrowserSupported()){if(z&&B){var e=e=>{e||=z?.event;try{this._captureEvent(e)}catch(e){gS.error(`Failed to capture event`,e)}};if(ag(B,`submit`,e,{capture:!0}),ag(B,`change`,e,{capture:!0}),ag(B,`click`,e,{capture:!0}),this.config.capture_copied_text){var t=e=>{e||=z?.event,this._captureEvent(e,Wh)};ag(B,`copy`,t,{capture:!0}),ag(B,`cut`,t,{capture:!0})}}}else gS.info(`Disabling Automatic Event Collection because this browser is not supported`)}startIfEnabled(){this.isEnabled&&!this._initialized&&(this._addDomEventHandlers(),this._initialized=!0)}onRemoteConfig(e){e.elementsChainAsString&&(this._elementsChainAsString=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[Pg]:!!e.autocapture_opt_out}),this._isDisabledServerSide=!!e.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(e){this._elementSelectors=e}getElementSelectors(e){var t,n=[];return(t=this._elementSelectors)==null||t.forEach((t=>{(B?.querySelectorAll(t))?.forEach((r=>{e===r&&n.push(t)}))})),n}get isEnabled(){var e=this.instance.persistence?.props[Pg],t=this._isDisabledServerSide;if(yg(t)&&!Sg(e)&&!this.instance.config.advanced_disable_decide)return!1;var n=this._isDisabledServerSide??!!e;return!!this.instance.config.autocapture&&!n}_captureEvent(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`$autocapture`;if(this.isEnabled){var n,r=uy(e);ry(r)&&(r=r.parentNode||null),t===`$autocapture`&&e.type===`click`&&e instanceof MouseEvent&&this.instance.config.rageclick&&(n=this.rageclicks)!=null&&n.isRageClick(e.clientX,e.clientY,new Date().getTime())&&this._captureEvent(e,`$rageclick`);var i=t===Wh;if(r&&py(r,e,this.config,i,i?[`copy`,`cut`]:void 0)){var{props:a,explicitNoCapture:o}=bS(r,{e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.config.element_attribute_ignorelist,elementsChainAsString:this._elementsChainAsString});if(o)return!1;var s=this.getElementSelectors(r);if(s&&s.length>0&&(a.$element_selectors=s),t===`$copy_autocapture`){var c,l=cy(z==null||(c=z.getSelection())==null?void 0:c.toString()),u=e.type||`clipboard`;if(!l)return!1;a.$selected_content=l,a.$copy_type=u}return this.instance.capture(t,a),!0}}}isBrowserSupported(){return mg(B?.querySelectorAll)}},SS=Eg(`[TracingHeaders]`),CS=class{constructor(e){K(this,`_restoreXHRPatch`,void 0),K(this,`_restoreFetchPatch`,void 0),K(this,`_startCapturing`,(()=>{var e,t,n,r;U(this._restoreXHRPatch)&&((e=V.__PosthogExtensions__)==null||(t=e.tracingHeadersPatchFns)==null||t._patchXHR(this.instance.sessionManager)),U(this._restoreFetchPatch)&&((n=V.__PosthogExtensions__)==null||(r=n.tracingHeadersPatchFns)==null||r._patchFetch(this.instance.sessionManager))})),this.instance=e}_loadScript(e){var t,n,r;(t=V.__PosthogExtensions__)!=null&&t.tracingHeadersPatchFns&&e(),(n=V.__PosthogExtensions__)==null||(r=n.loadExternalDependency)==null||r.call(n,this.instance,`tracing-headers`,(t=>{if(t)return SS.error(`failed to load script`,t);e()}))}startIfEnabledOrStop(){var e,t;this.instance.config.__add_tracing_headers?this._loadScript(this._startCapturing):((e=this._restoreXHRPatch)==null||e.call(this),(t=this._restoreFetchPatch)==null||t.call(this),this._restoreXHRPatch=void 0,this._restoreFetchPatch=void 0)}},wS;(function(e){e[e.PENDING=-1]=`PENDING`,e[e.DENIED=0]=`DENIED`,e[e.GRANTED=1]=`GRANTED`})(wS||={});var TS=class{constructor(e){this.instance=e}get config(){return this.instance.config}get consent(){return this.getDnt()?wS.DENIED:this.storedConsent}isOptedOut(){return this.consent===wS.DENIED||this.consent===wS.PENDING&&this.config.opt_out_capturing_by_default}isOptedIn(){return!this.isOptedOut()}optInOut(e){this.storage.set(this.storageKey,+!!e,this.config.cookie_expiration,this.config.cross_subdomain_cookie,this.config.secure_cookie)}reset(){this.storage.remove(this.storageKey,this.config.cross_subdomain_cookie)}get storageKey(){var{token:e,opt_out_capturing_cookie_prefix:t}=this.instance.config;return(t||`__ph_opt_in_out_`)+e}get storedConsent(){var e=this.storage.get(this.storageKey);return e===`1`?wS.GRANTED:e===`0`?wS.DENIED:wS.PENDING}get storage(){if(!this._storage){var e=this.config.opt_out_capturing_persistence_type;this._storage=e===`localStorage`?F_:N_;var t=e===`localStorage`?N_:F_;t.get(this.storageKey)&&(this._storage.get(this.storageKey)||this.optInOut(t.get(this.storageKey)===`1`),t.remove(this.storageKey,this.config.cross_subdomain_cookie))}return this._storage}getDnt(){return!!this.config.respect_dnt&&!!ig([Lh?.doNotTrack,Lh?.msDoNotTrack,V.doNotTrack],(e=>H([!0,1,`1`,`yes`],e)))}},ES=Eg(`[ExceptionAutocapture]`),DS=class{constructor(e){var t;K(this,`originalOnUnhandledRejectionHandler`,void 0),K(this,`startCapturing`,(()=>{var e,t,n,r;if(z&&this.isEnabled&&!this.hasHandlers&&!this.isCapturing){var i=(e=V.__PosthogExtensions__)==null||(t=e.errorWrappingFunctions)==null?void 0:t.wrapOnError,a=(n=V.__PosthogExtensions__)==null||(r=n.errorWrappingFunctions)==null?void 0:r.wrapUnhandledRejection;if(i&&a)try{this.unwrapOnError=i(this.captureException.bind(this)),this.unwrapUnhandledRejection=a(this.captureException.bind(this))}catch(e){ES.error(`failed to start`,e),this.stopCapturing()}else ES.error(`failed to load error wrapping functions - cannot start`)}})),this.instance=e,this.remoteEnabled=!((t=this.instance.persistence)==null||!t.props[Ig]),this.startIfEnabled()}get isEnabled(){var e;return(e=this.remoteEnabled)!=null&&e}get isCapturing(){var e;return!(z==null||(e=z.onerror)==null||!e.__POSTHOG_INSTRUMENTED__)}get hasHandlers(){return this.originalOnUnhandledRejectionHandler||this.unwrapOnError}startIfEnabled(){this.isEnabled&&!this.isCapturing&&(ES.info(`enabled, starting...`),this.loadScript(this.startCapturing))}loadScript(e){var t,n;this.hasHandlers&&e(),(t=V.__PosthogExtensions__)==null||(n=t.loadExternalDependency)==null||n.call(t,this.instance,`exception-autocapture`,(t=>{if(t)return ES.error(`failed to load script`,t);e()}))}stopCapturing(){var e,t;(e=this.unwrapOnError)==null||e.call(this),(t=this.unwrapUnhandledRejection)==null||t.call(this)}onRemoteConfig(e){this.remoteEnabled=!!e.autocaptureExceptions||!1,this.instance.persistence&&this.instance.persistence.register({[Ig]:this.remoteEnabled}),this.startIfEnabled()}captureException(e){e.$exception_personURL=`${this.instance.requestRouter.endpointFor(`ui`)}/project/${this.instance.config.token}/person/${this.instance.get_distinct_id()}`,this.instance.exceptions.sendExceptionEvent(e)}},OS=Eg(`[Web Vitals]`),kS=9e5,AS=class{constructor(e){var t;K(this,`_enabledServerSide`,!1),K(this,`_initialized`,!1),K(this,`buffer`,{url:void 0,metrics:[],firstMetricTimestamp:void 0}),K(this,`_flushToCapture`,(()=>{clearTimeout(this._delayedFlushTimer),this.buffer.metrics.length!==0&&(this.instance.capture(`$web_vitals`,this.buffer.metrics.reduce(((e,t)=>G(G({},e),{},{[`\$web_vitals_${t.name}_event`]:G({},t),[`\$web_vitals_${t.name}_value`]:t.value})),{})),this.buffer={url:void 0,metrics:[],firstMetricTimestamp:void 0})})),K(this,`_addToBuffer`,(e=>{var t=this.instance.sessionManager?.checkAndGetSessionAndWindowId(!0);if(U(t))OS.error(`Could not read session ID. Dropping metrics!`);else{this.buffer=this.buffer||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var n=this._currentURL();U(n)||(bg(e?.name)||bg(e?.value)?OS.error(`Invalid metric received`,e):this._maxAllowedValue&&e.value>=this._maxAllowedValue?OS.error(`Ignoring metric with value >= `+this._maxAllowedValue,e):(this.buffer.url!==n&&(this._flushToCapture(),this._delayedFlushTimer=setTimeout(this._flushToCapture,this.flushToCaptureTimeoutMs)),U(this.buffer.url)&&(this.buffer.url=n),this.buffer.firstMetricTimestamp=U(this.buffer.firstMetricTimestamp)?Date.now():this.buffer.firstMetricTimestamp,e.attribution&&e.attribution.interactionTargetElement&&(e.attribution.interactionTargetElement=void 0),this.buffer.metrics.push(G(G({},e),{},{$current_url:n,$session_id:t.sessionId,$window_id:t.windowId,timestamp:Date.now()})),this.buffer.metrics.length===this.allowedMetrics.length&&this._flushToCapture()))}})),K(this,`_startCapturing`,(()=>{var e,t,n,r,i=V.__PosthogExtensions__;U(i)||U(i.postHogWebVitalsCallbacks)||({onLCP:e,onCLS:t,onFCP:n,onINP:r}=i.postHogWebVitalsCallbacks),e&&t&&n&&r?(this.allowedMetrics.indexOf(`LCP`)>-1&&e(this._addToBuffer.bind(this)),this.allowedMetrics.indexOf(`CLS`)>-1&&t(this._addToBuffer.bind(this)),this.allowedMetrics.indexOf(`FCP`)>-1&&n(this._addToBuffer.bind(this)),this.allowedMetrics.indexOf(`INP`)>-1&&r(this._addToBuffer.bind(this)),this._initialized=!0):OS.error(`web vitals callbacks not loaded - not starting`)})),this.instance=e,this._enabledServerSide=!((t=this.instance.persistence)==null||!t.props[Lg]),this.startIfEnabled()}get allowedMetrics(){var e=hg(this.instance.config.capture_performance)?this.instance.config.capture_performance?.web_vitals_allowed_metrics:void 0;return U(e)?this.instance.persistence?.props[zg]||[`CLS`,`FCP`,`INP`,`LCP`]:e}get flushToCaptureTimeoutMs(){return(hg(this.instance.config.capture_performance)?this.instance.config.capture_performance.web_vitals_delayed_flush_ms:void 0)||5e3}get _maxAllowedValue(){var e=hg(this.instance.config.capture_performance)&&xg(this.instance.config.capture_performance.__web_vitals_max_value)?this.instance.config.capture_performance.__web_vitals_max_value:kS;return 0<e&&e<=6e4?kS:e}get isEnabled(){var e=hg(this.instance.config.capture_performance)?this.instance.config.capture_performance.web_vitals:void 0;return Sg(e)?e:this._enabledServerSide}startIfEnabled(){this.isEnabled&&!this._initialized&&(OS.info(`enabled, starting...`),this.loadScript(this._startCapturing))}onRemoteConfig(e){var t=hg(e.capturePerformance)&&!!e.capturePerformance.web_vitals,n=hg(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this.instance.persistence&&(this.instance.persistence.register({[Lg]:t}),this.instance.persistence.register({[zg]:n})),this._enabledServerSide=t,this.startIfEnabled()}loadScript(e){var t,n,r;(t=V.__PosthogExtensions__)!=null&&t.postHogWebVitalsCallbacks&&e(),(n=V.__PosthogExtensions__)==null||(r=n.loadExternalDependency)==null||r.call(n,this.instance,`web-vitals`,(t=>{t?OS.error(`failed to load script`,t):e()}))}_currentURL(){var e=z?z.location.href:void 0;return e||OS.error(`Could not determine current URL`),e}},jS={icontains:(e,t)=>!!z&&t.href.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,t)=>!!z&&t.href.toLowerCase().indexOf(e.toLowerCase())===-1,regex:(e,t)=>!!z&&cg(t.href,e),not_regex:(e,t)=>!!z&&!cg(t.href,e),exact:(e,t)=>t.href===e,is_not:(e,t)=>t.href!==e},MS=class e{constructor(t){var n=this;K(this,`getWebExperimentsAndEvaluateDisplayLogic`,(function(){var t=arguments.length>0&&arguments[0]!==void 0&&arguments[0];n.getWebExperiments((t=>{e.logInfo(`retrieved web experiments from the server`),n._flagToExperiments=new Map,t.forEach((t=>{if(t.feature_flag_key){var r;n._flagToExperiments&&(e.logInfo(`setting flag key `,t.feature_flag_key,` to web experiment `,t),(r=n._flagToExperiments)==null||r.set(t.feature_flag_key,t));var i=n.instance.getFeatureFlag(t.feature_flag_key);_g(i)&&t.variants[i]&&n.applyTransforms(t.name,i,t.variants[i].transforms)}else if(t.variants)for(var a in t.variants){var o=t.variants[a];e.matchesTestVariant(o)&&n.applyTransforms(t.name,a,o.transforms)}}))}),t)})),this.instance=t,this.instance.onFeatureFlags((e=>{this.onFeatureFlags(e)}))}onFeatureFlags(t){if(this._is_bot())e.logInfo(`Refusing to render web experiment since the viewer is a likely bot`);else if(!this.instance.config.disable_web_experiments){if(bg(this._flagToExperiments))return this._flagToExperiments=new Map,this.loadIfEnabled(),void this.previewWebExperiment();e.logInfo(`applying feature flags`,t),t.forEach((e=>{var t;if(this._flagToExperiments&&(t=this._flagToExperiments)!=null&&t.has(e)){var n=this.instance.getFeatureFlag(e),r=this._flagToExperiments?.get(e);n&&r!=null&&r.variants[n]&&this.applyTransforms(r.name,n,r.variants[n].transforms)}}))}}previewWebExperiment(){var t=e.getWindowLocation();if(t!=null&&t.search){var n=G_(t?.search,`__experiment_id`),r=G_(t?.search,`__experiment_variant`);n&&r&&(e.logInfo(`previewing web experiments ${n} && ${r}`),this.getWebExperiments((e=>{this.showPreviewWebExperiment(parseInt(n),r,e)}),!1,!0))}}loadIfEnabled(){this.instance.config.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(e,t,n){if(this.instance.config.disable_web_experiments&&!n)return e([]);var r=this.instance.get_property(`$web_experiments`);if(r&&!t)return e(r);this.instance._send_request({url:this.instance.requestRouter.endpointFor(`api`,`/api/web_experiments/?token=${this.instance.config.token}`),method:`GET`,callback:t=>t.statusCode!==200||!t.json?e([]):e(t.json.experiments||[])})}showPreviewWebExperiment(t,n,r){var i=r.filter((e=>e.id===t));i&&i.length>0&&(e.logInfo(`Previewing web experiment [${i[0].name}] with variant [${n}]`),this.applyTransforms(i[0].name,n,i[0].variants[n].transforms))}static matchesTestVariant(t){return!bg(t.conditions)&&e.matchUrlConditions(t)&&e.matchUTMConditions(t)}static matchUrlConditions(t){if(bg(t.conditions)||bg(t.conditions?.url))return!0;var n,r=e.getWindowLocation();return!!r&&((n=t.conditions)==null||!n.url||jS[t.conditions?.urlMatchType??`icontains`](t.conditions.url,r))}static getWindowLocation(){return z?.location}static matchUTMConditions(e){if(bg(e.conditions)||bg(e.conditions?.utm))return!0;var t=qv.campaignParams();if(t.utm_source){var n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v=(n=e.conditions)==null||(r=n.utm)==null||!r.utm_campaign||((i=e.conditions)==null||(a=i.utm)==null?void 0:a.utm_campaign)==t.utm_campaign,y=(o=e.conditions)==null||(s=o.utm)==null||!s.utm_source||((c=e.conditions)==null||(l=c.utm)==null?void 0:l.utm_source)==t.utm_source,b=(u=e.conditions)==null||(d=u.utm)==null||!d.utm_medium||((f=e.conditions)==null||(p=f.utm)==null?void 0:p.utm_medium)==t.utm_medium,x=(m=e.conditions)==null||(h=m.utm)==null||!h.utm_term||((g=e.conditions)==null||(_=g.utm)==null?void 0:_.utm_term)==t.utm_term;return v&&b&&x&&y}return!1}static logInfo(e){var t=[...arguments].slice(1);W.info(`[WebExperiments] ${e}`,t)}applyTransforms(t,n,r){this._is_bot()?e.logInfo(`Refusing to render web experiment since the viewer is a likely bot`):n===`control`?e.logInfo(`Control variants leave the page unmodified.`):r.forEach((r=>{r.selector&&(e.logInfo(`applying transform of variant ${n} for experiment ${t} `,r),(document?.querySelectorAll(r.selector))?.forEach((e=>{var t=e;r.attributes&&r.attributes.forEach((e=>{switch(e.name){case`text`:t.innerText=e.value;break;case`html`:t.innerHTML=e.value;break;case`cssClass`:t.className=e.value;break;default:t.setAttribute(e.name,e.value)}})),r.text&&(t.innerText=r.text),r.html&&(t.parentElement?t.parentElement.innerHTML=r.html:t.innerHTML=r.html),r.css&&t.setAttribute(`style`,r.css)})))}))}_is_bot(){return Lh&&this.instance?oS(Lh,this.instance.config.custom_blocked_useragents):void 0}},NS=class{constructor(e){this.instance=e}sendExceptionEvent(e){this.instance.capture(`$exception`,e,{_noTruncate:!0,_batchKey:`exceptionEvent`})}},PS=[`$set_once`,`$set`],FS=Eg(`[SiteApps]`),IS=class{constructor(e){this.instance=e,this.bufferedInvocations=[],this.apps={}}get isEnabled(){return!!this.instance.config.opt_in_site_apps}eventCollector(e,t){if(t){var n=this.globalsForEvent(t);this.bufferedInvocations.push(n),this.bufferedInvocations.length>1e3&&(this.bufferedInvocations=this.bufferedInvocations.slice(10))}}get siteAppLoaders(){var e,t;return(e=V._POSTHOG_REMOTE_CONFIG)==null||(t=e[this.instance.config.token])==null?void 0:t.siteApps}init(){if(this.isEnabled){var e=this.instance._addCaptureHook(this.eventCollector.bind(this));this.stopBuffering=()=>{e(),this.bufferedInvocations=[],this.stopBuffering=void 0}}}globalsForEvent(e){if(!e)throw Error(`Event payload is required`);var t={},n=this.instance.get_property(`$groups`)||[],r=this.instance.get_property(`$stored_group_properties`)||{};for(var[i,a]of Object.entries(r))t[i]={id:n[i],type:i,properties:a};var{$set_once:o,$set:s}=e;return{event:G(G({},Ag(e,PS)),{},{properties:G(G(G({},e.properties),s?{$set:G(G({},e.properties?.$set??{}),s)}:{}),o?{$set_once:G(G({},e.properties?.$set_once??{}),o)}:{}),elements_chain:e.properties?.$elements_chain??``,distinct_id:e.properties?.distinct_id}),person:{properties:this.instance.get_property(`$stored_person_properties`)},groups:t}}setupSiteApp(e){var t={id:e.id,loaded:!1,errored:!1};this.apps[e.id]=t;var n=n=>{var r;for(var i of(this.apps[e.id].errored=!n,this.apps[e.id].loaded=!0,FS.info(`Site app with id ${e.id} ${n?`loaded`:`errored`}`),n&&this.bufferedInvocations.length&&(FS.info(`Processing ${this.bufferedInvocations.length} events for site app with id ${e.id}`),this.bufferedInvocations.forEach((e=>t.processEvent?.call(t,e)))),Object.values(this.apps)))if(!i.loaded)return;(r=this.stopBuffering)==null||r.call(this)};try{var{processEvent:r}=e.init({posthog:this.instance,callback:e=>{n(e)}});r&&(t.processEvent=r)}catch(t){FS.error(`Error while initializing PostHog app with config id ${e.id}`,t),n(!1)}}onCapturedEvent(e){if(Object.keys(this.apps).length!==0){var t=this.globalsForEvent(e);for(var n of Object.values(this.apps))try{var r;(r=n.processEvent)==null||r.call(n,t)}catch(t){FS.error(`Error while processing event ${e.event} for site app ${n.id}`,t)}}}onRemoteConfig(e){var t,n,r,i=this;if((t=this.siteAppLoaders)!=null&&t.length){if(!this.isEnabled)return void FS.error(`PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.`);for(var a of this.siteAppLoaders)this.setupSiteApp(a);this.instance.on(`eventCaptured`,(e=>this.onCapturedEvent(e)))}else if((n=this.stopBuffering)==null||n.call(this),(r=e.siteApps)!=null&&r.length)if(this.isEnabled){var o=function(e,t){var n,r;V[`__\$\$ph_site_app_${e}`]=i.instance,(n=V.__PosthogExtensions__)==null||(r=n.loadSiteApp)==null||r.call(n,i.instance,t,(t=>{if(t)return FS.error(`Error while initializing PostHog app with config id ${e}`,t)}))};for(var{id:s,url:c}of e.siteApps)o(s,c)}else FS.error(`PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.`)}};function LS(e,t,n){return Kb({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:n})}var RS={},zS=()=>{},BS=`posthog`,VS=!Ub&&Hh?.indexOf(`MSIE`)===-1&&Hh?.indexOf(`Mozilla`)===-1,HS=()=>{var e;return{api_host:`https://us.i.posthog.com`,ui_host:null,token:``,autocapture:!0,rageclick:!0,cross_subdomain_cookie:rg(B?.location),persistence:`localStorage+cookie`,persistence_name:``,loaded:zS,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageview:!0,capture_pageleave:`if_capture_pageview`,debug:Rh&&_g(Rh?.search)&&Rh.search.indexOf(`__posthog_debug=true`)!==-1||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:(z==null||(e=z.location)==null?void 0:e.protocol)===`https:`,ip:!0,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:`localStorage`,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,session_recording:{},mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,on_request_error:e=>{var t=`Bad HTTP status: `+e.statusCode+` `+e.text;W.error(t)},get_device_id:e=>e,capture_performance:void 0,name:`posthog`,bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:`identified_only`,before_send:void 0,request_queue_config:{flush_interval_ms:Bb},_onCapture:zS}},US=e=>{var t={};U(e.process_person)||(t.person_profiles=e.process_person),U(e.xhr_headers)||(t.request_headers=e.xhr_headers),U(e.cookie_name)||(t.persistence_name=e.cookie_name),U(e.disable_cookie)||(t.disable_persistence=e.disable_cookie),U(e.store_google)||(t.save_campaign_params=e.store_google),U(e.verbose)||(t.debug=e.verbose);var n=Yh({},t,e);return pg(e.property_blacklist)&&(U(e.property_denylist)?n.property_denylist=e.property_blacklist:pg(e.property_denylist)?n.property_denylist=[...e.property_blacklist,...e.property_denylist]:W.error(`Invalid value for property_denylist config: `+e.property_denylist)),n},WS=class{constructor(){K(this,`__forceAllowLocalhost`,!1)}get _forceAllowLocalhost(){return this.__forceAllowLocalhost}set _forceAllowLocalhost(e){W.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}},GS=class e{get decideEndpointWasHit(){var e;return(e=this.featureFlags?.hasLoadedFlags)!=null&&e}constructor(){K(this,`webPerformance`,new WS),K(this,`version`,Uh.LIB_VERSION),K(this,`_internalEventEmitter`,new Kx),this.config=HS(),this.SentryIntegration=ix,this.sentryIntegration=e=>function(e,t){var n=rx(e,t);return{name:nx,processEvent:e=>n(e)}}(this,e),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint=`/e/`,this._initialPageviewCaptured=!1,this._initialPersonProfilesConfig=null,this._cachedIdentify=null,this.featureFlags=new b_(this),this.toolbar=new zb(this),this.scrollManager=new hS(this),this.pageViewManager=new sx(this),this.surveys=new $x(this),this.experiments=new MS(this),this.exceptions=new NS(this),this.rateLimiter=new tS(this),this.requestRouter=new tx(this),this.consent=new TS(this),this.people={set:(e,t,n)=>{var r=_g(e)?{[e]:t}:e;this.setPersonProperties(r),n?.({})},set_once:(e,t,n)=>{var r=_g(e)?{[e]:t}:e;this.setPersonProperties(void 0,r),n?.({})}},this.on(`eventCaptured`,(e=>W.info(`send "${e?.event}"`,e)))}init(t,n,r){if(r&&r!==BS){var i=RS[r]??new e;return i._init(t,n,r),RS[r]=i,RS[BS][r]=i,i}return this._init(t,n,r)}_init(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;if(U(e)||vg(e))return W.critical(`PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()`),this;if(this.__loaded)return W.warn(`You have already initialized PostHog! Re-initializing is a no-op`),this;this.__loaded=!0,this.config={},this._triggered_notifs=[],n.person_profiles&&(this._initialPersonProfilesConfig=n.person_profiles),this.set_config(Yh({},HS(),US(n),{name:r,token:e})),this.config.on_xhr_error&&W.error(`on_xhr_error is deprecated. Use on_request_error instead`),this.compression=n.disable_compression?void 0:Mh.GZipJS,this.persistence=new Yv(this.config),this.sessionPersistence=this.config.persistence===`sessionStorage`||this.config.persistence===`memory`?this.persistence:new Yv(G(G({},this.config),{},{persistence:`sessionStorage`}));var i=G({},this.persistence.props),a=G({},this.sessionPersistence.props);if(this._requestQueue=new Vb((e=>this._send_retriable_request(e)),this.config.request_queue_config),this._retryQueue=new Xb(this),this.__request_queue=[],this.config.__preview_experimental_cookieless_mode||(this.sessionManager=new $b(this),this.sessionPropsManager=new rS(this,this.sessionManager,this.persistence)),new CS(this).startIfEnabledOrStop(),this.siteApps=new IS(this),(t=this.siteApps)==null||t.init(),this.config.__preview_experimental_cookieless_mode||(this.sessionRecording=new Mb(this),this.sessionRecording.startIfEnabledOrStop()),this.config.disable_scroll_properties||this.scrollManager.startMeasuringScrollPosition(),this.autocapture=new xS(this),this.autocapture.startIfEnabled(),this.surveys.loadIfEnabled(),this.heatmaps=new mS(this),this.heatmaps.startIfEnabled(),this.webVitalsAutocapture=new AS(this),this.exceptionObserver=new DS(this),this.exceptionObserver.startIfEnabled(),this.deadClicksAutocapture=new dS(this,uS),this.deadClicksAutocapture.startIfEnabled(),Uh.DEBUG=Uh.DEBUG||this.config.debug,Uh.DEBUG&&W.info(`Starting in debug mode`,{this:this,config:n,thisC:G({},this.config),p:i,s:a}),this._sync_opt_out_with_persistence(),n.bootstrap?.distinctID!==void 0){var o,s,c=this.config.get_device_id(D_()),l=(o=n.bootstrap)!=null&&o.isIdentifiedID?c:n.bootstrap.distinctID;this.persistence.set_property(i_,(s=n.bootstrap)!=null&&s.isIdentifiedID?`identified`:`anonymous`),this.register({distinct_id:n.bootstrap.distinctID,$device_id:l})}if(this._hasBootstrappedFeatureFlags()){var u=Object.keys(n.bootstrap?.featureFlags||{}).filter((e=>{var t,r;return!((t=n.bootstrap)==null||(r=t.featureFlags)==null||!r[e])})).reduce(((e,t)=>{var r,i;return e[t]=((r=n.bootstrap)==null||(i=r.featureFlags)==null?void 0:i[t])||!1,e}),{}),d=Object.keys(n.bootstrap?.featureFlagPayloads||{}).filter((e=>u[e])).reduce(((e,t)=>{var r,i,a,o;return(r=n.bootstrap)!=null&&(i=r.featureFlagPayloads)!=null&&i[t]&&(e[t]=(a=n.bootstrap)==null||(o=a.featureFlagPayloads)==null?void 0:o[t]),e}),{});this.featureFlags.receivedFeatureFlags({featureFlags:u,featureFlagPayloads:d})}if(this.config.__preview_experimental_cookieless_mode)this.register_once({distinct_id:f_,$device_id:null},``);else if(!this.get_distinct_id()){var f=this.config.get_device_id(D_());this.register_once({distinct_id:f,$device_id:f},``),this.persistence.set_property(i_,`anonymous`)}return ag(z,`onpagehide`in self?`pagehide`:`unload`,this._handle_unload.bind(this),{passive:!1}),this.toolbar.maybeLoadToolbar(),n.segment?ox(this,(()=>this._loaded())):this._loaded(),mg(this.config._onCapture)&&this.config._onCapture!==zS&&(W.warn("onCapture is deprecated. Please use `before_send` instead"),this.on(`eventCaptured`,(e=>this.config._onCapture(e.event,e)))),this}_onRemoteConfig(e){var t,n,r,i,a,o,s,c;if(!B||!B.body)return W.info(`document not ready yet, trying again in 500 milliseconds...`),void setTimeout((()=>{this._onRemoteConfig(e)}),500);this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=H(e.supportedCompression,Mh.GZipJS)?Mh.GZipJS:H(e.supportedCompression,Mh.Base64)?Mh.Base64:void 0),(t=e.analytics)!=null&&t.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),this.set_config({person_profiles:this._initialPersonProfilesConfig?this._initialPersonProfilesConfig:`identified_only`}),(n=this.siteApps)==null||n.onRemoteConfig(e),(r=this.sessionRecording)==null||r.onRemoteConfig(e),(i=this.autocapture)==null||i.onRemoteConfig(e),(a=this.heatmaps)==null||a.onRemoteConfig(e),this.surveys.onRemoteConfig(e),(o=this.webVitalsAutocapture)==null||o.onRemoteConfig(e),(s=this.exceptionObserver)==null||s.onRemoteConfig(e),(c=this.deadClicksAutocapture)==null||c.onRemoteConfig(e)}_loaded(){try{this.config.loaded(this)}catch(e){W.critical("`loaded` function failed",e)}this._start_queue_if_opted_in(),this.config.capture_pageview&&setTimeout((()=>{this.consent.isOptedIn()&&this._captureInitialPageview()}),1),new Pb(this).load(),this.featureFlags.decide()}_start_queue_if_opted_in(){var e;this.has_opted_out_capturing()||this.config.request_batching&&((e=this._requestQueue)==null||e.enable())}_dom_loaded(){this.has_opted_out_capturing()||qh(this.__request_queue,(e=>this._send_retriable_request(e))),this.__request_queue=[],this._start_queue_if_opted_in()}_handle_unload(){var e,t;this.config.request_batching?(this._shouldCapturePageleave()&&this.capture(`$pageleave`),(e=this._requestQueue)==null||e.unload(),(t=this._retryQueue)==null||t.unload()):this._shouldCapturePageleave()&&this.capture(`$pageleave`,null,{transport:`sendBeacon`})}_send_request(e){this.__loaded&&(VS?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)||(e.transport=e.transport||this.config.api_transport,e.url=Gb(e.url,{ip:+!!this.config.ip}),e.headers=G({},this.config.request_headers),e.compression=e.compression===`best-available`?this.compression:e.compression,e.fetchOptions=e.fetchOptions||this.config.fetch_options,(e=>{var t=G({},e);t.timeout=t.timeout||6e4,t.url=Gb(t.url,{_:new Date().getTime().toString(),ver:Uh.LIB_VERSION,compression:t.compression});var n=t.transport??`fetch`,r=ig(Jb,(e=>e.transport===n))?.method??Jb[0].method;if(!r)throw Error(`No available transport method`);r(t)})(G(G({},e),{},{callback:t=>{var n,r,i;(this.rateLimiter.checkForLimiting(t),t.statusCode>=400)&&((r=(i=this.config).on_request_error)==null||r.call(i,t)),(n=e.callback)==null||n.call(e,t)}}))))}_send_retriable_request(e){this._retryQueue?this._retryQueue.retriableRequest(e):this._send_request(e)}_execute_array(e){var t,n=[],r=[],i=[];qh(e,(e=>{e&&(t=e[0],pg(t)?i.push(e):mg(e)?e.call(this):pg(e)&&t===`alias`?n.push(e):pg(e)&&t.indexOf(`capture`)!==-1&&mg(this[t])?i.push(e):r.push(e))}));var a=function(e,t){qh(e,(function(e){if(pg(e[0])){var n=t;Jh(e,(function(e){n=n[e[0]].apply(n,e.slice(1))}))}else this[e[0]].apply(this,e.slice(1))}),t)};a(n,this),a(r,this),a(i,this)}_hasBootstrappedFeatureFlags(){return this.config.bootstrap?.featureFlags&&Object.keys(this.config.bootstrap?.featureFlags).length>0||!1}push(e){this._execute_array([e])}capture(e,t,n){if(this.__loaded&&this.persistence&&this.sessionPersistence&&this._requestQueue){if(!this.consent.isOptedOut())if(!U(e)&&_g(e)){if(this.config.opt_out_useragent_filter||!this._is_bot()){var r=n!=null&&n.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(r==null||!r.isRateLimited){this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var i=new Date,a=n?.timestamp||i,o=D_(),s={uuid:o,event:e,properties:this._calculate_event_properties(e,t||{},a,o)};r&&(s.properties.$lib_rate_limit_remaining_tokens=r.remainingTokens),n!=null&&n.$set&&(s.$set=n?.$set);var c=this._calculate_set_once_properties(n?.$set_once);c&&(s.$set_once=c),(s=tg(s,n!=null&&n._noTruncate?null:this.config.properties_string_max_length)).timestamp=a,U(n?.timestamp)||(s.properties.$event_time_override_provided=!0,s.properties.$event_time_override_system_time=i);var l=G(G({},s.properties.$set),s.$set);if(gg(l)||this.setPersonPropertiesForFlags(l),!bg(this.config.before_send)){var u=this._runBeforeSend(s);if(!u)return;s=u}this._internalEventEmitter.emit(`eventCaptured`,s);var d={method:`POST`,url:n?._url??this.requestRouter.endpointFor(`api`,this.analyticsDefaultEndpoint),data:s,compression:`best-available`,batchKey:n?._batchKey};return!this.config.request_batching||n&&(n==null||!n._batchKey)||n!=null&&n.send_instantly?this._send_retriable_request(d):this._requestQueue.enqueue(d),s}W.critical(`This capture call is ignored due to client rate limiting.`)}}else W.error(`No event name provided to posthog.capture`)}else W.uninitializedWarning(`posthog.capture`)}_addCaptureHook(e){return this.on(`eventCaptured`,(t=>e(t.event,t)))}_calculate_event_properties(e,t,n,r){if(n||=new Date,!this.persistence||!this.sessionPersistence)return t;var i=this.persistence.remove_event_timer(e),a=G({},t);if(a.token=this.config.token,this.config.__preview_experimental_cookieless_mode&&(a.$cookieless_mode=!0),e===`$snapshot`){var o=G(G({},this.persistence.properties()),this.sessionPersistence.properties());return a.distinct_id=o.distinct_id,(!_g(a.distinct_id)&&!xg(a.distinct_id)||vg(a.distinct_id))&&W.error(`Invalid distinct_id for replay event. This indicates a bug in your implementation`),a}var s,c=qv.properties({maskPersonalDataProperties:this.config.mask_personal_data_properties,customPersonalDataProperties:this.config.custom_personal_data_properties});if(this.sessionManager){var{sessionId:l,windowId:u}=this.sessionManager.checkAndGetSessionAndWindowId();a.$session_id=l,a.$window_id=u}if(this.sessionRecording&&(a.$recording_status=this.sessionRecording.status),this.requestRouter.region===Zb.CUSTOM&&(a.$lib_custom_api_host=this.config.api_host),s=e===`$pageview`?this.pageViewManager.doPageView(n,r):e===`$pageleave`?this.pageViewManager.doPageLeave(n):this.pageViewManager.doEvent(),a=Yh(a,s),e===`$pageview`&&B&&(a.title=B.title),!U(i)){var d=n.getTime()-i;a.$duration=parseFloat((d/1e3).toFixed(3))}Hh&&this.config.opt_out_useragent_filter&&(a.$browser_type=this._is_bot()?`bot`:`browser`),(a=Yh({},c,this.persistence.properties(),this.sessionPersistence.properties(),a)).$is_identified=this._isIdentified(),pg(this.config.property_denylist)?Jh(this.config.property_denylist,(function(e){delete a[e]})):W.error(`Invalid value for property_denylist config: `+this.config.property_denylist+` or property_blacklist config: `+this.config.property_blacklist);var f=this.config.sanitize_properties;f&&(W.error(`sanitize_properties is deprecated. Use before_send instead`),a=f(a,e));var p=this._hasPersonProcessing();return a.$process_person_profile=p,p&&this._requirePersonProcessing(`_calculate_event_properties`),a}_calculate_set_once_properties(e){if(!this.persistence||!this._hasPersonProcessing())return e;var t=Yh({},this.persistence.get_initial_props(),e||{}),n=this.config.sanitize_properties;return n&&(W.error(`sanitize_properties is deprecated. Use before_send instead`),t=n(t,`$set_once`)),gg(t)?void 0:t}register(e,t){var n;(n=this.persistence)==null||n.register(e,t)}register_once(e,t,n){var r;(r=this.persistence)==null||r.register_once(e,t,n)}register_for_session(e){var t;(t=this.sessionPersistence)==null||t.register(e)}unregister(e){var t;(t=this.persistence)==null||t.unregister(e)}unregister_for_session(e){var t;(t=this.sessionPersistence)==null||t.unregister(e)}_register_single(e,t){this.register({[e]:t})}getFeatureFlag(e,t){return this.featureFlags.getFeatureFlag(e,t)}getFeatureFlagPayload(e){var t=this.featureFlags.getFeatureFlagPayload(e);try{return JSON.parse(t)}catch{return t}}isFeatureEnabled(e,t){return this.featureFlags.isFeatureEnabled(e,t)}reloadFeatureFlags(){this.featureFlags.reloadFeatureFlags()}updateEarlyAccessFeatureEnrollment(e,t){this.featureFlags.updateEarlyAccessFeatureEnrollment(e,t)}getEarlyAccessFeatures(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return this.featureFlags.getEarlyAccessFeatures(e,t)}on(e,t){return this._internalEventEmitter.on(e,t)}onFeatureFlags(e){return this.featureFlags.onFeatureFlags(e)}onSessionId(e){return this.sessionManager?.onSessionId(e)??(()=>{})}getSurveys(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.surveys.getSurveys(e,t)}getActiveMatchingSurveys(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];this.surveys.getActiveMatchingSurveys(e,t)}renderSurvey(e,t){this.surveys.renderSurvey(e,t)}canRenderSurvey(e){this.surveys.canRenderSurvey(e)}getNextSurveyStep(e,t,n){return this.surveys.getNextSurveyStep(e,t,n)}identify(e,t,n){if(!this.__loaded||!this.persistence)return W.uninitializedWarning(`posthog.identify`);if(xg(e)&&(e=e.toString(),W.warn(`The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.`)),e){if([`distinct_id`,`distinctid`].includes(e.toLowerCase()))W.critical(`The string "${e}" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.`);else if(this._requirePersonProcessing(`posthog.identify`)){var r=this.get_distinct_id();if(this.register({$user_id:e}),!this.get_property(`$device_id`)){var i=r;this.register_once({$had_persisted_distinct_id:!0,$device_id:i},``)}e!==r&&e!==this.get_property(Mg)&&(this.unregister(Mg),this.register({distinct_id:e}));var a=(this.persistence.get_property(i_)||`anonymous`)===`anonymous`;e!==r&&a?(this.persistence.set_property(i_,`identified`),this.setPersonPropertiesForFlags(t||{},!1),this.capture(`$identify`,{distinct_id:e,$anon_distinct_id:r},{$set:t||{},$set_once:n||{}}),this.featureFlags.setAnonymousDistinctId(r),this._cachedIdentify=LS(e,t,n)):(t||n)&&(this._cachedIdentify===LS(e,t,n)?W.info(`A duplicate posthog.identify call was made with the same properties. It has been ignored.`):(this.setPersonProperties(t,n),this._cachedIdentify=LS(e,t,n))),e!==r&&(this.reloadFeatureFlags(),this.unregister(r_))}}else W.error(`Unique user id has not been set in posthog.identify`)}setPersonProperties(e,t){(e||t)&&this._requirePersonProcessing(`posthog.setPersonProperties`)&&(this.setPersonPropertiesForFlags(e||{}),this.capture(`$set`,{$set:e||{},$set_once:t||{}}))}group(e,t,n){if(e&&t){if(this._requirePersonProcessing(`posthog.group`)){var r=this.getGroups();r[e]!==t&&this.resetGroupPropertiesForFlags(e),this.register({$groups:G(G({},r),{},{[e]:t})}),n&&(this.capture(`$groupidentify`,{$group_type:e,$group_key:t,$group_set:n}),this.setGroupPropertiesForFlags({[e]:n})),r[e]===t||n||this.reloadFeatureFlags()}}else W.error(`posthog.group requires a group type and group key`)}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.featureFlags.setPersonPropertiesForFlags(e,t)}resetPersonPropertiesForFlags(){this.featureFlags.resetPersonPropertiesForFlags()}setGroupPropertiesForFlags(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this._requirePersonProcessing(`posthog.setGroupPropertiesForFlags`)&&this.featureFlags.setGroupPropertiesForFlags(e,t)}resetGroupPropertiesForFlags(e){this.featureFlags.resetGroupPropertiesForFlags(e)}reset(e){var t,n,r,i;if(W.info(`reset`),!this.__loaded)return W.uninitializedWarning(`posthog.reset`);var a=this.get_property(`$device_id`);if(this.consent.reset(),(t=this.persistence)==null||t.clear(),(n=this.sessionPersistence)==null||n.clear(),this.surveys.reset(),(r=this.persistence)==null||r.set_property(i_,`anonymous`),(i=this.sessionManager)==null||i.resetSessionId(),this._cachedIdentify=null,this.config.__preview_experimental_cookieless_mode)this.register_once({distinct_id:f_,$device_id:null},``);else{var o=this.config.get_device_id(D_());this.register_once({distinct_id:o,$device_id:e?o:a},``)}this.register({$last_posthog_reset:new Date().toISOString()},1)}get_distinct_id(){return this.get_property(`distinct_id`)}getGroups(){return this.get_property(`$groups`)||{}}get_session_id(){return this.sessionManager?.checkAndGetSessionAndWindowId(!0).sessionId??``}get_session_replay_url(e){if(!this.sessionManager)return``;var{sessionId:t,sessionStartTimestamp:n}=this.sessionManager.checkAndGetSessionAndWindowId(!0),r=this.requestRouter.endpointFor(`ui`,`/project/${this.config.token}/replay/${t}`);if(e!=null&&e.withTimestamp&&n){var i=e.timestampLookBack??10;if(!n)return r;var a=Math.max(Math.floor((new Date().getTime()-n)/1e3)-i,0);r+=`?t=${a}`}return r}alias(e,t){return e===this.get_property(jg)?(W.critical(`Attempting to create alias for existing People user - aborting.`),-2):this._requirePersonProcessing(`posthog.alias`)?(U(t)&&(t=this.get_distinct_id()),e===t?(W.warn(`alias matches current distinct_id - skipping api call.`),this.identify(e),-1):(this._register_single(Mg,e),this.capture(`$create_alias`,{alias:e,distinct_id:t}))):void 0}set_config(e){var t,n,r,i,a=G({},this.config);hg(e)&&(Yh(this.config,US(e)),(t=this.persistence)==null||t.update_config(this.config,a),this.sessionPersistence=this.config.persistence===`sessionStorage`||this.config.persistence===`memory`?this.persistence:new Yv(G(G({},this.config),{},{persistence:`sessionStorage`})),F_.is_supported()&&F_.get(`ph_debug`)===`true`&&(this.config.debug=!0),this.config.debug&&(Uh.DEBUG=!0,W.info(`set_config`,{config:e,oldConfig:a,newConfig:G({},this.config)})),(n=this.sessionRecording)==null||n.startIfEnabledOrStop(),(r=this.autocapture)==null||r.startIfEnabled(),(i=this.heatmaps)==null||i.startIfEnabled(),this.surveys.loadIfEnabled(),this._sync_opt_out_with_persistence())}startSessionRecording(e){var t=!0===e,n={sampling:t||!(e==null||!e.sampling),linked_flag:t||!(e==null||!e.linked_flag),url_trigger:t||!(e==null||!e.url_trigger),event_trigger:t||!(e==null||!e.event_trigger)};if(Object.values(n).some(Boolean)){var r,i,a,o,s;(r=this.sessionManager)==null||r.checkAndGetSessionAndWindowId(),n.sampling&&((i=this.sessionRecording)==null||i.overrideSampling()),n.linked_flag&&((a=this.sessionRecording)==null||a.overrideLinkedFlag()),n.url_trigger&&((o=this.sessionRecording)==null||o.overrideTrigger(`url`)),n.event_trigger&&((s=this.sessionRecording)==null||s.overrideTrigger(`event`))}this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var e;return!((e=this.sessionRecording)==null||!e.started)}captureException(e,t){var n=Error(`PostHog syntheticException`),r=mg(V.__PosthogExtensions__?.parseErrorAsProperties)?G(G({},V.__PosthogExtensions__.parseErrorAsProperties([e.message,void 0,void 0,void 0,e],{syntheticException:n})),t):G({$exception_level:`error`,$exception_list:[{type:e.name,value:e.message,mechanism:{handled:!0,synthetic:!1}}]},t);this.exceptions.sendExceptionEvent(r)}loadToolbar(e){return this.toolbar.loadToolbar(e)}get_property(e){return this.persistence?.props[e]}getSessionProperty(e){return this.sessionPersistence?.props[e]}toString(){var e=this.config.name??BS;return e!==BS&&(e=BS+`.`+e),e}_isIdentified(){return this.persistence?.get_property(i_)===`identified`||this.sessionPersistence?.get_property(i_)===`identified`}_hasPersonProcessing(){var e,t,n,r;return!(this.config.person_profiles===`never`||this.config.person_profiles===`identified_only`&&!this._isIdentified()&&gg(this.getGroups())&&((e=this.persistence)==null||(t=e.props)==null||!t[Mg])&&((n=this.persistence)==null||(r=n.props)==null||!r[u_]))}_shouldCapturePageleave(){return!0===this.config.capture_pageleave||this.config.capture_pageleave===`if_capture_pageview`&&this.config.capture_pageview}createPersonProfile(){this._hasPersonProcessing()||this._requirePersonProcessing(`posthog.createPersonProfile`)&&this.setPersonProperties({},{})}_requirePersonProcessing(e){return this.config.person_profiles===`never`?(W.error(e+` was called, but process_person is set to "never". This call will be ignored.`),!1):(this._register_single(u_,!0),!0)}_sync_opt_out_with_persistence(){var e,t,n=this.consent.isOptedOut(),r=this.config.opt_out_persistence_by_default,i=this.config.disable_persistence||n&&!!r;this.persistence?.disabled!==i&&((e=this.persistence)==null||e.set_disabled(i)),this.sessionPersistence?.disabled!==i&&((t=this.sessionPersistence)==null||t.set_disabled(i))}opt_in_capturing(e){(this.consent.optInOut(!0),this._sync_opt_out_with_persistence(),U(e?.captureEventName)||e!=null&&e.captureEventName)&&this.capture(e?.captureEventName??`$opt_in`,e?.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this._captureInitialPageview()}opt_out_capturing(){this.consent.optInOut(!1),this._sync_opt_out_with_persistence()}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}clear_opt_in_out_capturing(){this.consent.reset(),this._sync_opt_out_with_persistence()}_is_bot(){return Lh?oS(Lh,this.config.custom_blocked_useragents):void 0}_captureInitialPageview(){B&&!this._initialPageviewCaptured&&(this._initialPageviewCaptured=!0,this.capture(`$pageview`,{title:B.title},{send_instantly:!0}))}debug(e){!1===e?(z?.console.log(`You've disabled debug mode.`),localStorage&&localStorage.removeItem(`ph_debug`),this.set_config({debug:!1})):(z?.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),localStorage&&localStorage.setItem(`ph_debug`,`true`),this.set_config({debug:!0}))}_runBeforeSend(e){if(bg(this.config.before_send))return e;var t=pg(this.config.before_send)?this.config.before_send:[this.config.before_send],n=e;for(var r of t){if(n=r(n),bg(n)){var i=`Event '${e.event}' was rejected in beforeSend function`;return wg(e.event)?W.warn(`${i}. This can cause unexpected behavior.`):W.info(i),null}n.properties&&!gg(n.properties)||W.warn(`Event '${e.event}' has no properties after beforeSend function, this is likely an error.`)}return n}getPageViewId(){return this.pageViewManager._currentPageview?.pageViewId}};(function(e,t){for(var n=0;n<t.length;n++)e.prototype[t[n]]=$h(e.prototype[t[n]])})(GS,[`identify`]);var KS,qS=(KS=RS[BS]=new GS,function(){function e(){e.done||(e.done=!0,VS=!1,Jh(RS,(function(e){e._dom_loaded()})))}B!=null&&B.addEventListener?B.readyState===`complete`?e():ag(B,`DOMContentLoaded`,e,{capture:!1}):z&&W.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),KS),JS=go(`auth`,()=>{let e=vl(),t=ze(),n=O(`INITIALIZING`),r=O(!1),i=O(),a=O([]),o=O(),s=O(!1),c=O(),l=O(),u=yo(),d=yo(),f=Ah();f.on(`auth:getUser`,r=>{e.logger().info(`[Auth] Received auth state change from backend:`,r),r.user?(t.value=r.user,qS.identify(r.user.id,{email:r.user.email,is_anonymous:r.user.is_anonymous||!1}),n.value=`SIGNED_IN`,_()):(t.value=void 0,qS.reset(),n.value=`SIGNED_OUT`)});let p=(e,t)=>{s.value=!0,c.value=e,l.value=t},m=()=>{s.value=!1,c.value=void 0,l.value=void 0},h=t=>{n.value=t,e.logger().debug(`[Auth State] Changed to: ${t}`)},g=()=>{i.value=null},_=async()=>{if(console.log(`[Auth] fetchSubscription: Starting, setting isLoadingSubscriptions to true`),ie.value=!0,o.value=void 0,t.value)if(t.value.email)try{let e=await f.execute(`auth:invoke`,{name:`polar-user-plan`});if(e.type===`error`)throw Error(e.ipcError||`Network error`);let{data:t,error:n}=e.result;if(n)throw Error(n.message||`Network error`);if(!t)throw Error(`Invalid response: no data`);if(!Array.isArray(t.subscriptions))throw Error(`Invalid response: subscriptions is not an array`);console.log(`Subscription result`,e),a.value=t.subscriptions}catch(e){console.error(`Failed to fetch subscription:`,e),o.value=e instanceof Error?e.message:`Unknown error`,a.value=[]}else console.warn(`User email is not available, skipping subscription fetch.`),o.value=`User email not available`,a.value=[];else console.warn(`User is anonymous, skipping subscription fetch.`),o.value=`User is anonymous`,a.value=[];console.log(`[Auth] fetchSubscription: Completed, setting isLoadingSubscriptions to false`),ie.value=!1,d.trigger({subscriptions:a.value})},v=async()=>{if(ph()){if(n.value!==`INITIALIZING`){e.logger().warn(`[Auth] Init called when not in INITIALIZING state. Ignoring.`);return}e.logger().info(`[Auth] Initializing authentication...`),h(`LOADING`);try{let r=await f.execute(`auth:getUser`);if(r.type===`success`&&r.result.user){let i=r.result.user;e.logger().info(`[Auth] Found existing user during init:`,i.id,`anonymous:`,i.is_anonymous,`email:`,i.email),qS.identify(i.id,{email:i.email,is_anonymous:i.is_anonymous||!1}),t.value=i,n.value=`SIGNED_IN`,await _()}else e.logger().info(`[Auth] No user found during init`),qS.identify(),n.value=`SIGNED_OUT`}catch(t){e.logger().error(`[Auth] Unexpected error during init:`,t),n.value=`ERROR`,i.value=`Failed to initialize authentication.`}}},y=async(n,a)=>{r.value=!0,h(`LOADING`),g();try{let r=await f.execute(`auth:signInWithPassword`,{email:n,password:a});if(r.type===`error`)return e.logger().error(`[Auth] Login error:`,r.ipcError),h(`ERROR`),i.value=r.ipcError||`Invalid login credentials.`,{data:{user:null,session:null},error:{message:r.ipcError}};let{data:o,error:s}=r.result;return s?(e.logger().error(`[Auth] Login error:`,s),h(`ERROR`),i.value=`Invalid login credentials.`,r.result):(e.logger().info(`[Auth] Logged in user:`,o.user.id),t.value=o.user,h(`SIGNED_IN`),await _(),r.result)}finally{r.value=!1}},b=async(t,n)=>{r.value=!0,h(`LOADING`),g();try{let r=await f.execute(`auth:signUp`,{email:t,password:n});if(r.type===`error`)return e.logger().error(`[Auth] Registration error:`,r.ipcError),h(`ERROR`),i.value=r.ipcError||`Failed to register. Please try again.`,{data:{user:null,session:null},error:{message:r.ipcError}};let{data:a,error:o}=r.result;return o?(e.logger().error(`[Auth] Registration error:`,o),h(`ERROR`),i.value=`Failed to register. Please try again.`,r.result):(e.logger().info(`[Auth] Registered new user:`,a.user.id),h(`AWAITING_VALIDATION`),r.result)}finally{r.value=!1}},x=async()=>{r.value=!0,h(`LOADING`),g();try{await f.execute(`auth:signOut`),e.logger().info(`[Auth] Signed out.`),t.value=void 0,qS.reset(),h(`SIGNED_OUT`),a.value=[]}catch(t){e.logger().error(`[Auth] Logout error:`,t),h(`ERROR`),i.value=`Failed to logout.`}finally{r.value=!1}},S=async t=>{r.value=!0,h(`LOADING`),g();try{let n=await f.execute(`auth:resetPasswordForEmail`,{email:t});if(n.type===`error`)return e.logger().error(`[Auth] Reset password error:`,n.ipcError),h(`ERROR`),i.value=`Failed to send reset email.`,{error:{message:n.ipcError}};let{error:r}=n.result;return r?(e.logger().error(`[Auth] Reset password error:`,r),h(`ERROR`),i.value=`Failed to send reset email.`,{error:r}):(e.logger().info(`[Auth] Reset password email sent to:`,t),h(`SIGNED_OUT`),{error:null})}finally{r.value=!1}};v();let C=De(()=>n.value===`SIGNED_IN`),w={"cloud-save":`16955d3e-3e0f-4574-9093-87a32edf237c`,"build-history":`b77e9800-8302-4581-8df3-6f1b979acef5`,"multiple-projects":`ad00648e-ba6f-461a-87d0-84cabd53e489`},T=O({}),ee=(e,t)=>{T.value[e]=t},E=e=>a.value.some(t=>t.product.benefits.map(e=>e.id).includes(w[e])),D=e=>E(e),te=De(()=>D(`build-history`)),ne=De(()=>D(`cloud-save`)),re=De(()=>D(`multiple-projects`)),ie=O(!1);return{user:t,authState:n,isLoggedIn:C,isAuthenticating:r,hasLoginProvider:ph(),errorMessage:i,subscriptions:Le(a),subscriptionError:Le(o),isLoadingSubscriptions:ie,hasBenefit:D,getActualBenefit:E,devOverrides:Le(T),setDevOverride:ee,clearError:g,init:v,login:y,register:b,logout:x,resetPassword:S,fetchSubscription:_,displayAuthModal:p,hideAuthModal:m,isAuthModalVisible:s,authModalTitle:c,authModalSubTitle:l,hasBuildHistoryBenefit:te,hasCloudSaveBenefit:ne,hasMultipleProjectsBenefit:re,onAuthChanged:u.on,onSubscriptionChanged:d.on}}),YS=go(`settings`,()=>{let e=Ah(),t=JS(),n=O({theme:`light`,version:`7.0.0`,locale:`en-US`,tours:{dashboard:{step:0,completed:!1},editor:{step:0,completed:!1}},autosave:!0,agents:[],buildHistory:{retentionPolicy:{enabled:!1,maxEntries:50,maxAge:30}}}),r=!!window.electron,i=async()=>{await a()},a=async()=>{if(console.log(`[Settings] load: isElectron`,r),r){if(e.isConnected()){console.log(`[Settings] loading from local agent`);let t=await e.execute(`config:load`,{config:`settings`});t.type===`success`&&(n.value=t.result.result)}else console.log(`[Settings] local agent not connected yet`);return}};return f(()=>t.user,()=>{a()}),{init:i,updateSettings:async t=>{n.value=t,r&&e.isConnected()&&await e.execute(`config:save`,{config:`settings`,data:t})},settings:Le(n),reset:async t=>{r&&e.execute&&(await e.execute(`config:reset`,{config:`settings`,key:t}),await a())},load:a}}),XS=ba.extend({name:`baseicon`,css:`
|
|
265
|
+
.p-icon {
|
|
266
|
+
display: inline-block;
|
|
267
|
+
vertical-align: baseline;
|
|
268
|
+
flex-shrink: 0;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.p-icon-spin {
|
|
272
|
+
-webkit-animation: p-icon-spin 2s infinite linear;
|
|
273
|
+
animation: p-icon-spin 2s infinite linear;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
@-webkit-keyframes p-icon-spin {
|
|
277
|
+
0% {
|
|
278
|
+
-webkit-transform: rotate(0deg);
|
|
279
|
+
transform: rotate(0deg);
|
|
280
|
+
}
|
|
281
|
+
100% {
|
|
282
|
+
-webkit-transform: rotate(359deg);
|
|
283
|
+
transform: rotate(359deg);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
@keyframes p-icon-spin {
|
|
288
|
+
0% {
|
|
289
|
+
-webkit-transform: rotate(0deg);
|
|
290
|
+
transform: rotate(0deg);
|
|
291
|
+
}
|
|
292
|
+
100% {
|
|
293
|
+
-webkit-transform: rotate(359deg);
|
|
294
|
+
transform: rotate(359deg);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
`});function ZS(e){"@babel/helpers - typeof";return ZS=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},ZS(e)}function QS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function $S(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?QS(Object(n),!0).forEach(function(t){eC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function eC(e,t,n){return(t=tC(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tC(e){var t=nC(e,`string`);return ZS(t)==`symbol`?t:t+``}function nC(e,t){if(ZS(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ZS(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var rC={name:`BaseIcon`,extends:Ia,props:{label:{type:String,default:void 0},spin:{type:Boolean,default:!1}},style:XS,provide:function(){return{$pcIcon:this,$parentInstance:this}},methods:{pti:function(){var e=Ir(this.label);return $S($S({},!this.isUnstyled&&{class:[`p-icon`,{"p-icon-spin":this.spin}]}),{},{role:e?void 0:`img`,"aria-label":e?void 0:this.label,"aria-hidden":e})}}},iC={name:`SpinnerIcon`,extends:rC};function aC(e){return lC(e)||cC(e)||sC(e)||oC()}function oC(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
298
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sC(e,t){if(e){if(typeof e==`string`)return uC(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?uC(e,t):void 0}}function cC(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function lC(e){if(Array.isArray(e))return uC(e)}function uC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function dC(e,t,n,r,i,a){return v(),k(`svg`,E({width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e.pti()),aC(t[0]||=[A(`path`,{d:`M6.99701 14C5.85441 13.999 4.72939 13.7186 3.72012 13.1832C2.71084 12.6478 1.84795 11.8737 1.20673 10.9284C0.565504 9.98305 0.165424 8.89526 0.041387 7.75989C-0.0826496 6.62453 0.073125 5.47607 0.495122 4.4147C0.917119 3.35333 1.59252 2.4113 2.46241 1.67077C3.33229 0.930247 4.37024 0.413729 5.4857 0.166275C6.60117 -0.0811796 7.76026 -0.0520535 8.86188 0.251112C9.9635 0.554278 10.9742 1.12227 11.8057 1.90555C11.915 2.01493 11.9764 2.16319 11.9764 2.31778C11.9764 2.47236 11.915 2.62062 11.8057 2.73C11.7521 2.78503 11.688 2.82877 11.6171 2.85864C11.5463 2.8885 11.4702 2.90389 11.3933 2.90389C11.3165 2.90389 11.2404 2.8885 11.1695 2.85864C11.0987 2.82877 11.0346 2.78503 10.9809 2.73C9.9998 1.81273 8.73246 1.26138 7.39226 1.16876C6.05206 1.07615 4.72086 1.44794 3.62279 2.22152C2.52471 2.99511 1.72683 4.12325 1.36345 5.41602C1.00008 6.70879 1.09342 8.08723 1.62775 9.31926C2.16209 10.5513 3.10478 11.5617 4.29713 12.1803C5.48947 12.7989 6.85865 12.988 8.17414 12.7157C9.48963 12.4435 10.6711 11.7264 11.5196 10.6854C12.3681 9.64432 12.8319 8.34282 12.8328 7C12.8328 6.84529 12.8943 6.69692 13.0038 6.58752C13.1132 6.47812 13.2616 6.41667 13.4164 6.41667C13.5712 6.41667 13.7196 6.47812 13.8291 6.58752C13.9385 6.69692 14 6.84529 14 7C14 8.85651 13.2622 10.637 11.9489 11.9497C10.6356 13.2625 8.85432 14 6.99701 14Z`,fill:`currentColor`},null,-1)]),16)}iC.render=dC;var fC=ba.extend({name:`badge`,style:`
|
|
299
|
+
.p-badge {
|
|
300
|
+
display: inline-flex;
|
|
301
|
+
border-radius: dt('badge.border.radius');
|
|
302
|
+
align-items: center;
|
|
303
|
+
justify-content: center;
|
|
304
|
+
padding: dt('badge.padding');
|
|
305
|
+
background: dt('badge.primary.background');
|
|
306
|
+
color: dt('badge.primary.color');
|
|
307
|
+
font-size: dt('badge.font.size');
|
|
308
|
+
font-weight: dt('badge.font.weight');
|
|
309
|
+
min-width: dt('badge.min.width');
|
|
310
|
+
height: dt('badge.height');
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.p-badge-dot {
|
|
314
|
+
width: dt('badge.dot.size');
|
|
315
|
+
min-width: dt('badge.dot.size');
|
|
316
|
+
height: dt('badge.dot.size');
|
|
317
|
+
border-radius: 50%;
|
|
318
|
+
padding: 0;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.p-badge-circle {
|
|
322
|
+
padding: 0;
|
|
323
|
+
border-radius: 50%;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.p-badge-secondary {
|
|
327
|
+
background: dt('badge.secondary.background');
|
|
328
|
+
color: dt('badge.secondary.color');
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.p-badge-success {
|
|
332
|
+
background: dt('badge.success.background');
|
|
333
|
+
color: dt('badge.success.color');
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.p-badge-info {
|
|
337
|
+
background: dt('badge.info.background');
|
|
338
|
+
color: dt('badge.info.color');
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.p-badge-warn {
|
|
342
|
+
background: dt('badge.warn.background');
|
|
343
|
+
color: dt('badge.warn.color');
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.p-badge-danger {
|
|
347
|
+
background: dt('badge.danger.background');
|
|
348
|
+
color: dt('badge.danger.color');
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.p-badge-contrast {
|
|
352
|
+
background: dt('badge.contrast.background');
|
|
353
|
+
color: dt('badge.contrast.color');
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
.p-badge-sm {
|
|
357
|
+
font-size: dt('badge.sm.font.size');
|
|
358
|
+
min-width: dt('badge.sm.min.width');
|
|
359
|
+
height: dt('badge.sm.height');
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
.p-badge-lg {
|
|
363
|
+
font-size: dt('badge.lg.font.size');
|
|
364
|
+
min-width: dt('badge.lg.min.width');
|
|
365
|
+
height: dt('badge.lg.height');
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.p-badge-xl {
|
|
369
|
+
font-size: dt('badge.xl.font.size');
|
|
370
|
+
min-width: dt('badge.xl.min.width');
|
|
371
|
+
height: dt('badge.xl.height');
|
|
372
|
+
}
|
|
373
|
+
`,classes:{root:function(e){var t=e.props,n=e.instance;return[`p-badge p-component`,{"p-badge-circle":j(t.value)&&String(t.value).length===1,"p-badge-dot":Ir(t.value)&&!n.$slots.default,"p-badge-sm":t.size===`small`,"p-badge-lg":t.size===`large`,"p-badge-xl":t.size===`xlarge`,"p-badge-info":t.severity===`info`,"p-badge-success":t.severity===`success`,"p-badge-warn":t.severity===`warn`,"p-badge-danger":t.severity===`danger`,"p-badge-secondary":t.severity===`secondary`,"p-badge-contrast":t.severity===`contrast`}]}}}),pC={name:`BaseBadge`,extends:Ia,props:{value:{type:[String,Number],default:null},severity:{type:String,default:null},size:{type:String,default:null}},style:fC,provide:function(){return{$pcBadge:this,$parentInstance:this}}};function mC(e){"@babel/helpers - typeof";return mC=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},mC(e)}function hC(e,t,n){return(t=gC(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gC(e){var t=_C(e,`string`);return mC(t)==`symbol`?t:t+``}function _C(e,t){if(mC(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(mC(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var vC={name:`Badge`,extends:pC,inheritAttrs:!1,computed:{dataP:function(){return kn(hC(hC({circle:this.value!=null&&String(this.value).length===1,empty:this.value==null&&!this.$slots.default},this.severity,this.severity),this.size,this.size))}}},yC=[`data-p`];function bC(e,t,n,r,a,o){return v(),k(`span`,E({class:e.cx(`root`),"data-p":o.dataP},e.ptmi(`root`)),[m(e.$slots,`default`,{},function(){return[se(i(e.value),1)]})],16,yC)}vC.render=bC;var xC=kr();function SC(e){"@babel/helpers - typeof";return SC=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},SC(e)}function CC(e,t){return OC(e)||DC(e,t)||TC(e,t)||wC()}function wC(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
374
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TC(e,t){if(e){if(typeof e==`string`)return EC(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?EC(e,t):void 0}}function EC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function DC(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function OC(e){if(Array.isArray(e))return e}function kC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function q(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?kC(Object(n),!0).forEach(function(t){AC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kC(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function AC(e,t,n){return(t=jC(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jC(e){var t=MC(e,`string`);return SC(t)==`symbol`?t:t+``}function MC(e,t){if(SC(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(SC(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var J={_getMeta:function(){return[Wr(arguments.length<=0?void 0:arguments[0])||arguments.length<=0?void 0:arguments[0],Yr(Wr(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:arguments.length<=1?void 0:arguments[1])]},_getConfig:function(e,t){var n,r;return((e==null||(n=e.instance)==null?void 0:n.$primevue)||(t==null||(r=t.ctx)==null||(r=r.appContext)==null||(r=r.config)==null||(r=r.globalProperties)==null?void 0:r.$primevue))?.config},_getOptionValue:Qr,_getPTValue:function(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:``,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=function(){var e=J._getOptionValue.apply(J,arguments);return Xr(e)||$r(e)?{class:e}:e},s=((e=t.binding)==null||(e=e.value)==null?void 0:e.ptOptions)||t.$primevueConfig?.ptOptions||{},c=s.mergeSections,l=c===void 0?!0:c,u=s.mergeProps,d=u===void 0?!1:u,f=a?J._useDefaultPT(t,t.defaultPT(),o,r,i):void 0,p=J._usePT(t,J._getPT(n,t.$name),o,r,q(q({},i),{},{global:f||{}})),m=J._getPTDatasets(t,r);return l||!l&&p?d?J._mergeProps(t,d,f,p,m):q(q(q({},f),p),m):q(q({},p),m)},_getPTDatasets:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:``,n=`data-pc-`;return q(q({},t===`root`&&AC({},`${n}name`,Zr(e.$name))),{},AC({},`${n}section`,Zr(t)))},_getPT:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:``,n=arguments.length>2?arguments[2]:void 0,r=function(e){var r=n?n(e):e,i=Zr(t);return r?.[i]??r};return e&&Object.hasOwn(e,`_usept`)?{_usept:e._usept,originalValue:r(e.originalValue),value:r(e.value)}:r(e)},_usePT:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,a=function(e){return n(e,r,i)};if(t&&Object.hasOwn(t,`_usept`)){var o=t._usept||e.$primevueConfig?.ptOptions||{},s=o.mergeSections,c=s===void 0?!0:s,l=o.mergeProps,u=l===void 0?!1:l,d=a(t.originalValue),f=a(t.value);return d===void 0&&f===void 0?void 0:Xr(f)?f:Xr(d)?d:c||!c&&f?u?J._mergeProps(e,u,d,f):q(q({},d),f):f}return a(t)},_useDefaultPT:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;return J._usePT(e,t,n,r,i)},_loadStyles:function(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,i=J._getConfig(n,r),a={nonce:i==null||(e=i.csp)==null?void 0:e.nonce};J._loadCoreStyles(t,a),J._loadThemeStyles(t,a),J._loadScopedThemeStyles(t,a),J._removeThemeListeners(t),t.$loadStyles=function(){return J._loadThemeStyles(t,a)},J._themeChangeListener(t.$loadStyles)},_loadCoreStyles:function(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(!Ki.isStyleNameLoaded(t.$style?.name)&&(e=t.$style)!=null&&e.name){var r;ba.loadCSS(n),(r=t.$style)==null||r.loadCSS(n),Ki.setLoadedStyleName(t.$style.name)}},_loadThemeStyles:function(){var e,t,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(!(n!=null&&n.isUnstyled()||(n==null||(e=n.theme)==null?void 0:e.call(n))===`none`)){if(!Gi.isStyleNameLoaded(`common`)){var i,a,o=((i=n.$style)==null||(a=i.getCommonTheme)==null?void 0:a.call(i))||{},s=o.primitive,c=o.semantic,l=o.global,u=o.style;ba.load(s?.css,q({name:`primitive-variables`},r)),ba.load(c?.css,q({name:`semantic-variables`},r)),ba.load(l?.css,q({name:`global-variables`},r)),ba.loadStyle(q({name:`global-style`},r),u),Gi.setLoadedStyleName(`common`)}if(!Gi.isStyleNameLoaded(n.$style?.name)&&(t=n.$style)!=null&&t.name){var d,f,p,m,h=((d=n.$style)==null||(f=d.getDirectiveTheme)==null?void 0:f.call(d))||{},g=h.css,_=h.style;(p=n.$style)==null||p.load(g,q({name:`${n.$style.name}-variables`},r)),(m=n.$style)==null||m.loadStyle(q({name:`${n.$style.name}-style`},r),_),Gi.setLoadedStyleName(n.$style.name)}if(!Gi.isStyleNameLoaded(`layer-order`)){var v,y,b=(v=n.$style)==null||(y=v.getLayerOrderThemeCSS)==null?void 0:y.call(v);ba.load(b,q({name:`layer-order`,first:!0},r)),Gi.setLoadedStyleName(`layer-order`)}}},_loadScopedThemeStyles:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=e.preset();if(n&&e.$attrSelector){var r,i,a=(((r=e.$style)==null||(i=r.getPresetTheme)==null?void 0:i.call(r,n,`[${e.$attrSelector}]`))||{}).css;e.scopedStyleEl=(e.$style?.load(a,q({name:`${e.$attrSelector}-${e.$style.name}`},t))).el}},_themeChangeListener:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){};Ki.clearLoadedStyleNames(),Ti.on(`theme:change`,e)},_removeThemeListeners:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ti.off(`theme:change`,e.$loadStyles),e.$loadStyles=void 0},_hook:function(e,t,n,r,i,a){var o,s,c=`on${li(t)}`,l=J._getConfig(r,i),u=n?.$instance,d=J._usePT(u,J._getPT(r==null||(o=r.value)==null?void 0:o.pt,e),J._getOptionValue,`hooks.${c}`),f=J._useDefaultPT(u,l==null||(s=l.pt)==null||(s=s.directives)==null?void 0:s[e],J._getOptionValue,`hooks.${c}`),p={el:n,binding:r,vnode:i,prevVnode:a};d?.(u,p),f?.(u,p)},_mergeProps:function(){var e=arguments.length>1?arguments[1]:void 0,t=[...arguments].slice(2);return Br(e)?e.apply(void 0,t):E.apply(void 0,t)},_extend:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=function(n,r,i,a,o){var s,c,l;r._$instances=r._$instances||{};var u=J._getConfig(i,a),d=r._$instances[e]||{},f=Ir(d)?q(q({},t),t?.methods):{};r._$instances[e]=q(q({},d),{},{$name:e,$host:r,$binding:i,$modifiers:i?.modifiers,$value:i?.value,$el:d.$el||r||void 0,$style:q({classes:void 0,inlineStyles:void 0,load:function(){},loadCSS:function(){},loadStyle:function(){}},t?.style),$primevueConfig:u,$attrSelector:(s=r.$pd)==null||(s=s[e])==null?void 0:s.attrSelector,defaultPT:function(){return J._getPT(u?.pt,void 0,function(t){var n;return t==null||(n=t.directives)==null?void 0:n[e]})},isUnstyled:function(){var t,n;return((t=r._$instances[e])==null||(t=t.$binding)==null||(t=t.value)==null?void 0:t.unstyled)===void 0?u?.unstyled:(n=r._$instances[e])==null||(n=n.$binding)==null||(n=n.value)==null?void 0:n.unstyled},theme:function(){var t;return(t=r._$instances[e])==null||(t=t.$primevueConfig)==null?void 0:t.theme},preset:function(){var t;return(t=r._$instances[e])==null||(t=t.$binding)==null||(t=t.value)==null?void 0:t.dt},ptm:function(){var t,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:``,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return J._getPTValue(r._$instances[e],(t=r._$instances[e])==null||(t=t.$binding)==null||(t=t.value)==null?void 0:t.pt,n,q({},i))},ptmo:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:``,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return J._getPTValue(r._$instances[e],t,n,i,!1)},cx:function(){var t,n,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:``,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(t=r._$instances[e])!=null&&t.isUnstyled()?void 0:J._getOptionValue((n=r._$instances[e])==null||(n=n.$style)==null?void 0:n.classes,i,q({},a))},sx:function(){var t,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:``,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return i?J._getOptionValue((t=r._$instances[e])==null||(t=t.$style)==null?void 0:t.inlineStyles,n,q({},a)):void 0}},f),r.$instance=r._$instances[e],(c=(l=r.$instance)[n])==null||c.call(l,r,i,a,o),r[`\$${e}`]=r.$instance,J._hook(e,n,r,i,a,o),r.$pd||={},r.$pd[e]=q(q({},r.$pd?.[e]),{},{name:e,instance:r._$instances[e]})},r=function(t){var n,r,i,a=t._$instances[e],o=a?.watch,s=function(e){var t,n=e.newValue,r=e.oldValue;return o==null||(t=o.config)==null?void 0:t.call(a,n,r)},c=function(e){var t,n=e.newValue,r=e.oldValue;return o==null||(t=o[`config.ripple`])==null?void 0:t.call(a,n,r)};a.$watchersCallback={config:s,"config.ripple":c},o==null||(n=o.config)==null||n.call(a,a?.$primevueConfig),xC.on(`config:change`,s),o==null||(r=o[`config.ripple`])==null||r.call(a,a==null||(i=a.$primevueConfig)==null?void 0:i.ripple),xC.on(`config:ripple:change`,c)},i=function(t){var n=t._$instances[e].$watchersCallback;n&&(xC.off(`config:change`,n.config),xC.off(`config:ripple:change`,n[`config.ripple`]),t._$instances[e].$watchersCallback=void 0)};return{created:function(t,r,i,a){t.$pd||={},t.$pd[e]={name:e,attrSelector:fi(`pd`)},n(`created`,t,r,i,a)},beforeMount:function(t,i,a,o){J._loadStyles(t.$pd[e]?.instance,i,a),n(`beforeMount`,t,i,a,o),r(t)},mounted:function(t,r,i,a){J._loadStyles(t.$pd[e]?.instance,r,i),n(`mounted`,t,r,i,a)},beforeUpdate:function(e,t,r,i){n(`beforeUpdate`,e,t,r,i)},updated:function(t,r,i,a){J._loadStyles(t.$pd[e]?.instance,r,i),n(`updated`,t,r,i,a)},beforeUnmount:function(t,r,a,o){i(t),J._removeThemeListeners(t.$pd[e]?.instance),n(`beforeUnmount`,t,r,a,o)},unmounted:function(t,r,i,a){var o;(o=t.$pd[e])==null||(o=o.instance)==null||(o=o.scopedStyleEl)==null||(o=o.value)==null||o.remove(),n(`unmounted`,t,r,i,a)}}},extend:function(){var e=CC(J._getMeta.apply(J,arguments),2),t=e[0],n=e[1];return q({extend:function(){var e=CC(J._getMeta.apply(J,arguments),2),t=e[0],r=e[1];return J.extend(t,q(q(q({},n),n?.methods),r))}},J._extend(t,n))}},NC=ba.extend({name:`ripple-directive`,style:`
|
|
375
|
+
.p-ink {
|
|
376
|
+
display: block;
|
|
377
|
+
position: absolute;
|
|
378
|
+
background: dt('ripple.background');
|
|
379
|
+
border-radius: 100%;
|
|
380
|
+
transform: scale(0);
|
|
381
|
+
pointer-events: none;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
.p-ink-active {
|
|
385
|
+
animation: ripple 0.4s linear;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
@keyframes ripple {
|
|
389
|
+
100% {
|
|
390
|
+
opacity: 0;
|
|
391
|
+
transform: scale(2.5);
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
`,classes:{root:`p-ink`}}),PC=J.extend({style:NC});function FC(e){"@babel/helpers - typeof";return FC=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},FC(e)}function IC(e){return BC(e)||zC(e)||RC(e)||LC()}function LC(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
395
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RC(e,t){if(e){if(typeof e==`string`)return VC(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?VC(e,t):void 0}}function zC(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function BC(e){if(Array.isArray(e))return VC(e)}function VC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function HC(e,t,n){return(t=UC(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function UC(e){var t=WC(e,`string`);return FC(t)==`symbol`?t:t+``}function WC(e,t){if(FC(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(FC(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var GC=PC.extend(`ripple`,{watch:{"config.ripple":function(e){e?(this.createRipple(this.$host),this.bindEvents(this.$host),this.$host.setAttribute(`data-pd-ripple`,!0),this.$host.style.overflow=`hidden`,this.$host.style.position=`relative`):(this.remove(this.$host),this.$host.removeAttribute(`data-pd-ripple`))}},unmounted:function(e){this.remove(e)},timeout:void 0,methods:{bindEvents:function(e){e.addEventListener(`mousedown`,this.onMouseDown.bind(this))},unbindEvents:function(e){e.removeEventListener(`mousedown`,this.onMouseDown.bind(this))},createRipple:function(e){var t=this.getInk(e);t||(t=er(`span`,HC(HC({role:`presentation`,"aria-hidden":!0,"data-p-ink":!0,"data-p-ink-active":!1,class:!this.isUnstyled()&&this.cx(`root`),onAnimationEnd:this.onAnimationEnd.bind(this)},this.$attrSelector,``),`p-bind`,this.ptm(`root`))),e.appendChild(t),this.$el=t)},remove:function(e){var t=this.getInk(e);t&&(this.$host.style.overflow=``,this.$host.style.position=``,this.unbindEvents(e),t.removeEventListener(`animationend`,this.onAnimationEnd),t.remove())},onMouseDown:function(e){var t=this,n=e.currentTarget,r=this.getInk(n);if(!(!r||getComputedStyle(r,null).display===`none`)){if(!this.isUnstyled()&&In(r,`p-ink-active`),r.setAttribute(`data-p-ink-active`,`false`),!cr(r)&&!br(r)){var i=Math.max(qn(n),hr(n));r.style.height=i+`px`,r.style.width=i+`px`}var a=mr(n),o=e.pageX-a.left+document.body.scrollTop-br(r)/2,s=e.pageY-a.top+document.body.scrollLeft-cr(r)/2;r.style.top=s+`px`,r.style.left=o+`px`,!this.isUnstyled()&&jn(r,`p-ink-active`),r.setAttribute(`data-p-ink-active`,`true`),this.timeout=setTimeout(function(){r&&(!t.isUnstyled()&&In(r,`p-ink-active`),r.setAttribute(`data-p-ink-active`,`false`))},401)}},onAnimationEnd:function(e){this.timeout&&clearTimeout(this.timeout),!this.isUnstyled()&&In(e.currentTarget,`p-ink-active`),e.currentTarget.setAttribute(`data-p-ink-active`,`false`)},getInk:function(e){return e&&e.children?IC(e.children).find(function(e){return ar(e,`data-pc-name`)===`ripple`}):void 0}}}),KC=`
|
|
396
|
+
.p-button {
|
|
397
|
+
display: inline-flex;
|
|
398
|
+
cursor: pointer;
|
|
399
|
+
user-select: none;
|
|
400
|
+
align-items: center;
|
|
401
|
+
justify-content: center;
|
|
402
|
+
overflow: hidden;
|
|
403
|
+
position: relative;
|
|
404
|
+
color: dt('button.primary.color');
|
|
405
|
+
background: dt('button.primary.background');
|
|
406
|
+
border: 1px solid dt('button.primary.border.color');
|
|
407
|
+
padding: dt('button.padding.y') dt('button.padding.x');
|
|
408
|
+
font-size: 1rem;
|
|
409
|
+
font-family: inherit;
|
|
410
|
+
font-feature-settings: inherit;
|
|
411
|
+
transition:
|
|
412
|
+
background dt('button.transition.duration'),
|
|
413
|
+
color dt('button.transition.duration'),
|
|
414
|
+
border-color dt('button.transition.duration'),
|
|
415
|
+
outline-color dt('button.transition.duration'),
|
|
416
|
+
box-shadow dt('button.transition.duration');
|
|
417
|
+
border-radius: dt('button.border.radius');
|
|
418
|
+
outline-color: transparent;
|
|
419
|
+
gap: dt('button.gap');
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
.p-button:disabled {
|
|
423
|
+
cursor: default;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
.p-button-icon-right {
|
|
427
|
+
order: 1;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
.p-button-icon-right:dir(rtl) {
|
|
431
|
+
order: -1;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.p-button:not(.p-button-vertical) .p-button-icon:not(.p-button-icon-right):dir(rtl) {
|
|
435
|
+
order: 1;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
.p-button-icon-bottom {
|
|
439
|
+
order: 2;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
.p-button-icon-only {
|
|
443
|
+
width: dt('button.icon.only.width');
|
|
444
|
+
padding-inline-start: 0;
|
|
445
|
+
padding-inline-end: 0;
|
|
446
|
+
gap: 0;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
.p-button-icon-only.p-button-rounded {
|
|
450
|
+
border-radius: 50%;
|
|
451
|
+
height: dt('button.icon.only.width');
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
.p-button-icon-only .p-button-label {
|
|
455
|
+
visibility: hidden;
|
|
456
|
+
width: 0;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
.p-button-icon-only::after {
|
|
460
|
+
content: "\xA0";
|
|
461
|
+
visibility: hidden;
|
|
462
|
+
width: 0;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
.p-button-sm {
|
|
466
|
+
font-size: dt('button.sm.font.size');
|
|
467
|
+
padding: dt('button.sm.padding.y') dt('button.sm.padding.x');
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
.p-button-sm .p-button-icon {
|
|
471
|
+
font-size: dt('button.sm.font.size');
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
.p-button-sm.p-button-icon-only {
|
|
475
|
+
width: dt('button.sm.icon.only.width');
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
.p-button-sm.p-button-icon-only.p-button-rounded {
|
|
479
|
+
height: dt('button.sm.icon.only.width');
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
.p-button-lg {
|
|
483
|
+
font-size: dt('button.lg.font.size');
|
|
484
|
+
padding: dt('button.lg.padding.y') dt('button.lg.padding.x');
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
.p-button-lg .p-button-icon {
|
|
488
|
+
font-size: dt('button.lg.font.size');
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
.p-button-lg.p-button-icon-only {
|
|
492
|
+
width: dt('button.lg.icon.only.width');
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
.p-button-lg.p-button-icon-only.p-button-rounded {
|
|
496
|
+
height: dt('button.lg.icon.only.width');
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
.p-button-vertical {
|
|
500
|
+
flex-direction: column;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
.p-button-label {
|
|
504
|
+
font-weight: dt('button.label.font.weight');
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
.p-button-fluid {
|
|
508
|
+
width: 100%;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
.p-button-fluid.p-button-icon-only {
|
|
512
|
+
width: dt('button.icon.only.width');
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
.p-button:not(:disabled):hover {
|
|
516
|
+
background: dt('button.primary.hover.background');
|
|
517
|
+
border: 1px solid dt('button.primary.hover.border.color');
|
|
518
|
+
color: dt('button.primary.hover.color');
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
.p-button:not(:disabled):active {
|
|
522
|
+
background: dt('button.primary.active.background');
|
|
523
|
+
border: 1px solid dt('button.primary.active.border.color');
|
|
524
|
+
color: dt('button.primary.active.color');
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
.p-button:focus-visible {
|
|
528
|
+
box-shadow: dt('button.primary.focus.ring.shadow');
|
|
529
|
+
outline: dt('button.focus.ring.width') dt('button.focus.ring.style') dt('button.primary.focus.ring.color');
|
|
530
|
+
outline-offset: dt('button.focus.ring.offset');
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
.p-button .p-badge {
|
|
534
|
+
min-width: dt('button.badge.size');
|
|
535
|
+
height: dt('button.badge.size');
|
|
536
|
+
line-height: dt('button.badge.size');
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
.p-button-raised {
|
|
540
|
+
box-shadow: dt('button.raised.shadow');
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
.p-button-rounded {
|
|
544
|
+
border-radius: dt('button.rounded.border.radius');
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
.p-button-secondary {
|
|
548
|
+
background: dt('button.secondary.background');
|
|
549
|
+
border: 1px solid dt('button.secondary.border.color');
|
|
550
|
+
color: dt('button.secondary.color');
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
.p-button-secondary:not(:disabled):hover {
|
|
554
|
+
background: dt('button.secondary.hover.background');
|
|
555
|
+
border: 1px solid dt('button.secondary.hover.border.color');
|
|
556
|
+
color: dt('button.secondary.hover.color');
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
.p-button-secondary:not(:disabled):active {
|
|
560
|
+
background: dt('button.secondary.active.background');
|
|
561
|
+
border: 1px solid dt('button.secondary.active.border.color');
|
|
562
|
+
color: dt('button.secondary.active.color');
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
.p-button-secondary:focus-visible {
|
|
566
|
+
outline-color: dt('button.secondary.focus.ring.color');
|
|
567
|
+
box-shadow: dt('button.secondary.focus.ring.shadow');
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
.p-button-success {
|
|
571
|
+
background: dt('button.success.background');
|
|
572
|
+
border: 1px solid dt('button.success.border.color');
|
|
573
|
+
color: dt('button.success.color');
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
.p-button-success:not(:disabled):hover {
|
|
577
|
+
background: dt('button.success.hover.background');
|
|
578
|
+
border: 1px solid dt('button.success.hover.border.color');
|
|
579
|
+
color: dt('button.success.hover.color');
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
.p-button-success:not(:disabled):active {
|
|
583
|
+
background: dt('button.success.active.background');
|
|
584
|
+
border: 1px solid dt('button.success.active.border.color');
|
|
585
|
+
color: dt('button.success.active.color');
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
.p-button-success:focus-visible {
|
|
589
|
+
outline-color: dt('button.success.focus.ring.color');
|
|
590
|
+
box-shadow: dt('button.success.focus.ring.shadow');
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
.p-button-info {
|
|
594
|
+
background: dt('button.info.background');
|
|
595
|
+
border: 1px solid dt('button.info.border.color');
|
|
596
|
+
color: dt('button.info.color');
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
.p-button-info:not(:disabled):hover {
|
|
600
|
+
background: dt('button.info.hover.background');
|
|
601
|
+
border: 1px solid dt('button.info.hover.border.color');
|
|
602
|
+
color: dt('button.info.hover.color');
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
.p-button-info:not(:disabled):active {
|
|
606
|
+
background: dt('button.info.active.background');
|
|
607
|
+
border: 1px solid dt('button.info.active.border.color');
|
|
608
|
+
color: dt('button.info.active.color');
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
.p-button-info:focus-visible {
|
|
612
|
+
outline-color: dt('button.info.focus.ring.color');
|
|
613
|
+
box-shadow: dt('button.info.focus.ring.shadow');
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
.p-button-warn {
|
|
617
|
+
background: dt('button.warn.background');
|
|
618
|
+
border: 1px solid dt('button.warn.border.color');
|
|
619
|
+
color: dt('button.warn.color');
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
.p-button-warn:not(:disabled):hover {
|
|
623
|
+
background: dt('button.warn.hover.background');
|
|
624
|
+
border: 1px solid dt('button.warn.hover.border.color');
|
|
625
|
+
color: dt('button.warn.hover.color');
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
.p-button-warn:not(:disabled):active {
|
|
629
|
+
background: dt('button.warn.active.background');
|
|
630
|
+
border: 1px solid dt('button.warn.active.border.color');
|
|
631
|
+
color: dt('button.warn.active.color');
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
.p-button-warn:focus-visible {
|
|
635
|
+
outline-color: dt('button.warn.focus.ring.color');
|
|
636
|
+
box-shadow: dt('button.warn.focus.ring.shadow');
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
.p-button-help {
|
|
640
|
+
background: dt('button.help.background');
|
|
641
|
+
border: 1px solid dt('button.help.border.color');
|
|
642
|
+
color: dt('button.help.color');
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
.p-button-help:not(:disabled):hover {
|
|
646
|
+
background: dt('button.help.hover.background');
|
|
647
|
+
border: 1px solid dt('button.help.hover.border.color');
|
|
648
|
+
color: dt('button.help.hover.color');
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
.p-button-help:not(:disabled):active {
|
|
652
|
+
background: dt('button.help.active.background');
|
|
653
|
+
border: 1px solid dt('button.help.active.border.color');
|
|
654
|
+
color: dt('button.help.active.color');
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
.p-button-help:focus-visible {
|
|
658
|
+
outline-color: dt('button.help.focus.ring.color');
|
|
659
|
+
box-shadow: dt('button.help.focus.ring.shadow');
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
.p-button-danger {
|
|
663
|
+
background: dt('button.danger.background');
|
|
664
|
+
border: 1px solid dt('button.danger.border.color');
|
|
665
|
+
color: dt('button.danger.color');
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
.p-button-danger:not(:disabled):hover {
|
|
669
|
+
background: dt('button.danger.hover.background');
|
|
670
|
+
border: 1px solid dt('button.danger.hover.border.color');
|
|
671
|
+
color: dt('button.danger.hover.color');
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
.p-button-danger:not(:disabled):active {
|
|
675
|
+
background: dt('button.danger.active.background');
|
|
676
|
+
border: 1px solid dt('button.danger.active.border.color');
|
|
677
|
+
color: dt('button.danger.active.color');
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
.p-button-danger:focus-visible {
|
|
681
|
+
outline-color: dt('button.danger.focus.ring.color');
|
|
682
|
+
box-shadow: dt('button.danger.focus.ring.shadow');
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
.p-button-contrast {
|
|
686
|
+
background: dt('button.contrast.background');
|
|
687
|
+
border: 1px solid dt('button.contrast.border.color');
|
|
688
|
+
color: dt('button.contrast.color');
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
.p-button-contrast:not(:disabled):hover {
|
|
692
|
+
background: dt('button.contrast.hover.background');
|
|
693
|
+
border: 1px solid dt('button.contrast.hover.border.color');
|
|
694
|
+
color: dt('button.contrast.hover.color');
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
.p-button-contrast:not(:disabled):active {
|
|
698
|
+
background: dt('button.contrast.active.background');
|
|
699
|
+
border: 1px solid dt('button.contrast.active.border.color');
|
|
700
|
+
color: dt('button.contrast.active.color');
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
.p-button-contrast:focus-visible {
|
|
704
|
+
outline-color: dt('button.contrast.focus.ring.color');
|
|
705
|
+
box-shadow: dt('button.contrast.focus.ring.shadow');
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
.p-button-outlined {
|
|
709
|
+
background: transparent;
|
|
710
|
+
border-color: dt('button.outlined.primary.border.color');
|
|
711
|
+
color: dt('button.outlined.primary.color');
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
.p-button-outlined:not(:disabled):hover {
|
|
715
|
+
background: dt('button.outlined.primary.hover.background');
|
|
716
|
+
border-color: dt('button.outlined.primary.border.color');
|
|
717
|
+
color: dt('button.outlined.primary.color');
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
.p-button-outlined:not(:disabled):active {
|
|
721
|
+
background: dt('button.outlined.primary.active.background');
|
|
722
|
+
border-color: dt('button.outlined.primary.border.color');
|
|
723
|
+
color: dt('button.outlined.primary.color');
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
.p-button-outlined.p-button-secondary {
|
|
727
|
+
border-color: dt('button.outlined.secondary.border.color');
|
|
728
|
+
color: dt('button.outlined.secondary.color');
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
.p-button-outlined.p-button-secondary:not(:disabled):hover {
|
|
732
|
+
background: dt('button.outlined.secondary.hover.background');
|
|
733
|
+
border-color: dt('button.outlined.secondary.border.color');
|
|
734
|
+
color: dt('button.outlined.secondary.color');
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
.p-button-outlined.p-button-secondary:not(:disabled):active {
|
|
738
|
+
background: dt('button.outlined.secondary.active.background');
|
|
739
|
+
border-color: dt('button.outlined.secondary.border.color');
|
|
740
|
+
color: dt('button.outlined.secondary.color');
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
.p-button-outlined.p-button-success {
|
|
744
|
+
border-color: dt('button.outlined.success.border.color');
|
|
745
|
+
color: dt('button.outlined.success.color');
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
.p-button-outlined.p-button-success:not(:disabled):hover {
|
|
749
|
+
background: dt('button.outlined.success.hover.background');
|
|
750
|
+
border-color: dt('button.outlined.success.border.color');
|
|
751
|
+
color: dt('button.outlined.success.color');
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
.p-button-outlined.p-button-success:not(:disabled):active {
|
|
755
|
+
background: dt('button.outlined.success.active.background');
|
|
756
|
+
border-color: dt('button.outlined.success.border.color');
|
|
757
|
+
color: dt('button.outlined.success.color');
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
.p-button-outlined.p-button-info {
|
|
761
|
+
border-color: dt('button.outlined.info.border.color');
|
|
762
|
+
color: dt('button.outlined.info.color');
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
.p-button-outlined.p-button-info:not(:disabled):hover {
|
|
766
|
+
background: dt('button.outlined.info.hover.background');
|
|
767
|
+
border-color: dt('button.outlined.info.border.color');
|
|
768
|
+
color: dt('button.outlined.info.color');
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
.p-button-outlined.p-button-info:not(:disabled):active {
|
|
772
|
+
background: dt('button.outlined.info.active.background');
|
|
773
|
+
border-color: dt('button.outlined.info.border.color');
|
|
774
|
+
color: dt('button.outlined.info.color');
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
.p-button-outlined.p-button-warn {
|
|
778
|
+
border-color: dt('button.outlined.warn.border.color');
|
|
779
|
+
color: dt('button.outlined.warn.color');
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
.p-button-outlined.p-button-warn:not(:disabled):hover {
|
|
783
|
+
background: dt('button.outlined.warn.hover.background');
|
|
784
|
+
border-color: dt('button.outlined.warn.border.color');
|
|
785
|
+
color: dt('button.outlined.warn.color');
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
.p-button-outlined.p-button-warn:not(:disabled):active {
|
|
789
|
+
background: dt('button.outlined.warn.active.background');
|
|
790
|
+
border-color: dt('button.outlined.warn.border.color');
|
|
791
|
+
color: dt('button.outlined.warn.color');
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
.p-button-outlined.p-button-help {
|
|
795
|
+
border-color: dt('button.outlined.help.border.color');
|
|
796
|
+
color: dt('button.outlined.help.color');
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
.p-button-outlined.p-button-help:not(:disabled):hover {
|
|
800
|
+
background: dt('button.outlined.help.hover.background');
|
|
801
|
+
border-color: dt('button.outlined.help.border.color');
|
|
802
|
+
color: dt('button.outlined.help.color');
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
.p-button-outlined.p-button-help:not(:disabled):active {
|
|
806
|
+
background: dt('button.outlined.help.active.background');
|
|
807
|
+
border-color: dt('button.outlined.help.border.color');
|
|
808
|
+
color: dt('button.outlined.help.color');
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
.p-button-outlined.p-button-danger {
|
|
812
|
+
border-color: dt('button.outlined.danger.border.color');
|
|
813
|
+
color: dt('button.outlined.danger.color');
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
.p-button-outlined.p-button-danger:not(:disabled):hover {
|
|
817
|
+
background: dt('button.outlined.danger.hover.background');
|
|
818
|
+
border-color: dt('button.outlined.danger.border.color');
|
|
819
|
+
color: dt('button.outlined.danger.color');
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
.p-button-outlined.p-button-danger:not(:disabled):active {
|
|
823
|
+
background: dt('button.outlined.danger.active.background');
|
|
824
|
+
border-color: dt('button.outlined.danger.border.color');
|
|
825
|
+
color: dt('button.outlined.danger.color');
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
.p-button-outlined.p-button-contrast {
|
|
829
|
+
border-color: dt('button.outlined.contrast.border.color');
|
|
830
|
+
color: dt('button.outlined.contrast.color');
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
.p-button-outlined.p-button-contrast:not(:disabled):hover {
|
|
834
|
+
background: dt('button.outlined.contrast.hover.background');
|
|
835
|
+
border-color: dt('button.outlined.contrast.border.color');
|
|
836
|
+
color: dt('button.outlined.contrast.color');
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
.p-button-outlined.p-button-contrast:not(:disabled):active {
|
|
840
|
+
background: dt('button.outlined.contrast.active.background');
|
|
841
|
+
border-color: dt('button.outlined.contrast.border.color');
|
|
842
|
+
color: dt('button.outlined.contrast.color');
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
.p-button-outlined.p-button-plain {
|
|
846
|
+
border-color: dt('button.outlined.plain.border.color');
|
|
847
|
+
color: dt('button.outlined.plain.color');
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
.p-button-outlined.p-button-plain:not(:disabled):hover {
|
|
851
|
+
background: dt('button.outlined.plain.hover.background');
|
|
852
|
+
border-color: dt('button.outlined.plain.border.color');
|
|
853
|
+
color: dt('button.outlined.plain.color');
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
.p-button-outlined.p-button-plain:not(:disabled):active {
|
|
857
|
+
background: dt('button.outlined.plain.active.background');
|
|
858
|
+
border-color: dt('button.outlined.plain.border.color');
|
|
859
|
+
color: dt('button.outlined.plain.color');
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
.p-button-text {
|
|
863
|
+
background: transparent;
|
|
864
|
+
border-color: transparent;
|
|
865
|
+
color: dt('button.text.primary.color');
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
.p-button-text:not(:disabled):hover {
|
|
869
|
+
background: dt('button.text.primary.hover.background');
|
|
870
|
+
border-color: transparent;
|
|
871
|
+
color: dt('button.text.primary.color');
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
.p-button-text:not(:disabled):active {
|
|
875
|
+
background: dt('button.text.primary.active.background');
|
|
876
|
+
border-color: transparent;
|
|
877
|
+
color: dt('button.text.primary.color');
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
.p-button-text.p-button-secondary {
|
|
881
|
+
background: transparent;
|
|
882
|
+
border-color: transparent;
|
|
883
|
+
color: dt('button.text.secondary.color');
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
.p-button-text.p-button-secondary:not(:disabled):hover {
|
|
887
|
+
background: dt('button.text.secondary.hover.background');
|
|
888
|
+
border-color: transparent;
|
|
889
|
+
color: dt('button.text.secondary.color');
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
.p-button-text.p-button-secondary:not(:disabled):active {
|
|
893
|
+
background: dt('button.text.secondary.active.background');
|
|
894
|
+
border-color: transparent;
|
|
895
|
+
color: dt('button.text.secondary.color');
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
.p-button-text.p-button-success {
|
|
899
|
+
background: transparent;
|
|
900
|
+
border-color: transparent;
|
|
901
|
+
color: dt('button.text.success.color');
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
.p-button-text.p-button-success:not(:disabled):hover {
|
|
905
|
+
background: dt('button.text.success.hover.background');
|
|
906
|
+
border-color: transparent;
|
|
907
|
+
color: dt('button.text.success.color');
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
.p-button-text.p-button-success:not(:disabled):active {
|
|
911
|
+
background: dt('button.text.success.active.background');
|
|
912
|
+
border-color: transparent;
|
|
913
|
+
color: dt('button.text.success.color');
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
.p-button-text.p-button-info {
|
|
917
|
+
background: transparent;
|
|
918
|
+
border-color: transparent;
|
|
919
|
+
color: dt('button.text.info.color');
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
.p-button-text.p-button-info:not(:disabled):hover {
|
|
923
|
+
background: dt('button.text.info.hover.background');
|
|
924
|
+
border-color: transparent;
|
|
925
|
+
color: dt('button.text.info.color');
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
.p-button-text.p-button-info:not(:disabled):active {
|
|
929
|
+
background: dt('button.text.info.active.background');
|
|
930
|
+
border-color: transparent;
|
|
931
|
+
color: dt('button.text.info.color');
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
.p-button-text.p-button-warn {
|
|
935
|
+
background: transparent;
|
|
936
|
+
border-color: transparent;
|
|
937
|
+
color: dt('button.text.warn.color');
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
.p-button-text.p-button-warn:not(:disabled):hover {
|
|
941
|
+
background: dt('button.text.warn.hover.background');
|
|
942
|
+
border-color: transparent;
|
|
943
|
+
color: dt('button.text.warn.color');
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
.p-button-text.p-button-warn:not(:disabled):active {
|
|
947
|
+
background: dt('button.text.warn.active.background');
|
|
948
|
+
border-color: transparent;
|
|
949
|
+
color: dt('button.text.warn.color');
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
.p-button-text.p-button-help {
|
|
953
|
+
background: transparent;
|
|
954
|
+
border-color: transparent;
|
|
955
|
+
color: dt('button.text.help.color');
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
.p-button-text.p-button-help:not(:disabled):hover {
|
|
959
|
+
background: dt('button.text.help.hover.background');
|
|
960
|
+
border-color: transparent;
|
|
961
|
+
color: dt('button.text.help.color');
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
.p-button-text.p-button-help:not(:disabled):active {
|
|
965
|
+
background: dt('button.text.help.active.background');
|
|
966
|
+
border-color: transparent;
|
|
967
|
+
color: dt('button.text.help.color');
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
.p-button-text.p-button-danger {
|
|
971
|
+
background: transparent;
|
|
972
|
+
border-color: transparent;
|
|
973
|
+
color: dt('button.text.danger.color');
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
.p-button-text.p-button-danger:not(:disabled):hover {
|
|
977
|
+
background: dt('button.text.danger.hover.background');
|
|
978
|
+
border-color: transparent;
|
|
979
|
+
color: dt('button.text.danger.color');
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
.p-button-text.p-button-danger:not(:disabled):active {
|
|
983
|
+
background: dt('button.text.danger.active.background');
|
|
984
|
+
border-color: transparent;
|
|
985
|
+
color: dt('button.text.danger.color');
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
.p-button-text.p-button-contrast {
|
|
989
|
+
background: transparent;
|
|
990
|
+
border-color: transparent;
|
|
991
|
+
color: dt('button.text.contrast.color');
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
.p-button-text.p-button-contrast:not(:disabled):hover {
|
|
995
|
+
background: dt('button.text.contrast.hover.background');
|
|
996
|
+
border-color: transparent;
|
|
997
|
+
color: dt('button.text.contrast.color');
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
.p-button-text.p-button-contrast:not(:disabled):active {
|
|
1001
|
+
background: dt('button.text.contrast.active.background');
|
|
1002
|
+
border-color: transparent;
|
|
1003
|
+
color: dt('button.text.contrast.color');
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
.p-button-text.p-button-plain {
|
|
1007
|
+
background: transparent;
|
|
1008
|
+
border-color: transparent;
|
|
1009
|
+
color: dt('button.text.plain.color');
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
.p-button-text.p-button-plain:not(:disabled):hover {
|
|
1013
|
+
background: dt('button.text.plain.hover.background');
|
|
1014
|
+
border-color: transparent;
|
|
1015
|
+
color: dt('button.text.plain.color');
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
.p-button-text.p-button-plain:not(:disabled):active {
|
|
1019
|
+
background: dt('button.text.plain.active.background');
|
|
1020
|
+
border-color: transparent;
|
|
1021
|
+
color: dt('button.text.plain.color');
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
.p-button-link {
|
|
1025
|
+
background: transparent;
|
|
1026
|
+
border-color: transparent;
|
|
1027
|
+
color: dt('button.link.color');
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
.p-button-link:not(:disabled):hover {
|
|
1031
|
+
background: transparent;
|
|
1032
|
+
border-color: transparent;
|
|
1033
|
+
color: dt('button.link.hover.color');
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
.p-button-link:not(:disabled):hover .p-button-label {
|
|
1037
|
+
text-decoration: underline;
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
.p-button-link:not(:disabled):active {
|
|
1041
|
+
background: transparent;
|
|
1042
|
+
border-color: transparent;
|
|
1043
|
+
color: dt('button.link.active.color');
|
|
1044
|
+
}
|
|
1045
|
+
`;function qC(e){"@babel/helpers - typeof";return qC=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},qC(e)}function JC(e,t,n){return(t=YC(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YC(e){var t=XC(e,`string`);return qC(t)==`symbol`?t:t+``}function XC(e,t){if(qC(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(qC(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var ZC=ba.extend({name:`button`,style:KC,classes:{root:function(e){var t=e.instance,n=e.props;return[`p-button p-component`,JC(JC(JC(JC(JC(JC(JC(JC(JC({"p-button-icon-only":t.hasIcon&&!n.label&&!n.badge,"p-button-vertical":(n.iconPos===`top`||n.iconPos===`bottom`)&&n.label,"p-button-loading":n.loading,"p-button-link":n.link||n.variant===`link`},`p-button-${n.severity}`,n.severity),`p-button-raised`,n.raised),`p-button-rounded`,n.rounded),`p-button-text`,n.text||n.variant===`text`),`p-button-outlined`,n.outlined||n.variant===`outlined`),`p-button-sm`,n.size===`small`),`p-button-lg`,n.size===`large`),`p-button-plain`,n.plain),`p-button-fluid`,t.hasFluid)]},loadingIcon:`p-button-loading-icon`,icon:function(e){var t=e.props;return[`p-button-icon`,JC({},`p-button-icon-${t.iconPos}`,t.label)]},label:`p-button-label`}}),QC={name:`BaseButton`,extends:Ia,props:{label:{type:String,default:null},icon:{type:String,default:null},iconPos:{type:String,default:`left`},iconClass:{type:[String,Object],default:null},badge:{type:String,default:null},badgeClass:{type:[String,Object],default:null},badgeSeverity:{type:String,default:`secondary`},loading:{type:Boolean,default:!1},loadingIcon:{type:String,default:void 0},as:{type:[String,Object],default:`BUTTON`},asChild:{type:Boolean,default:!1},link:{type:Boolean,default:!1},severity:{type:String,default:null},raised:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},text:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},size:{type:String,default:null},variant:{type:String,default:null},plain:{type:Boolean,default:!1},fluid:{type:Boolean,default:null}},style:ZC,provide:function(){return{$pcButton:this,$parentInstance:this}}};function $C(e){"@babel/helpers - typeof";return $C=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},$C(e)}function ew(e,t,n){return(t=tw(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tw(e){var t=nw(e,`string`);return $C(t)==`symbol`?t:t+``}function nw(e,t){if($C(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if($C(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var rw={name:`Button`,extends:QC,inheritAttrs:!1,inject:{$pcFluid:{default:null}},methods:{getPTOptions:function(e){return(e===`root`?this.ptmi:this.ptm)(e,{context:{disabled:this.disabled}})}},computed:{disabled:function(){return this.$attrs.disabled||this.$attrs.disabled===``||this.loading},defaultAriaLabel:function(){return this.label?this.label+(this.badge?` `+this.badge:``):this.$attrs.ariaLabel},hasIcon:function(){return this.icon||this.$slots.icon},attrs:function(){return E(this.asAttrs,this.a11yAttrs,this.getPTOptions(`root`))},asAttrs:function(){return this.as===`BUTTON`?{type:`button`,disabled:this.disabled}:void 0},a11yAttrs:function(){return{"aria-label":this.defaultAriaLabel,"data-pc-name":`button`,"data-p-disabled":this.disabled,"data-p-severity":this.severity}},hasFluid:function(){return Ir(this.fluid)?!!this.$pcFluid:this.fluid},dataP:function(){return kn(ew(ew(ew(ew(ew(ew(ew(ew(ew(ew({},this.size,this.size),`icon-only`,this.hasIcon&&!this.label&&!this.badge),`loading`,this.loading),`fluid`,this.hasFluid),`rounded`,this.rounded),`raised`,this.raised),`outlined`,this.outlined||this.variant===`outlined`),`text`,this.text||this.variant===`text`),`link`,this.link||this.variant===`link`),`vertical`,(this.iconPos===`top`||this.iconPos===`bottom`)&&this.label))},dataIconP:function(){return kn(ew(ew({},this.iconPos,this.iconPos),this.size,this.size))},dataLabelP:function(){return kn(ew(ew({},this.size,this.size),`icon-only`,this.hasIcon&&!this.label&&!this.badge))}},components:{SpinnerIcon:iC,Badge:vC},directives:{ripple:GC}},iw=[`data-p`],aw=[`data-p`];function ow(e,t,n,r,a,o){var s=_(`SpinnerIcon`),l=_(`Badge`),u=w(`ripple`);return e.asChild?m(e.$slots,`default`,{key:1,class:c(e.cx(`root`)),a11yAttrs:o.a11yAttrs}):h((v(),he(Ze(e.as),E({key:0,class:e.cx(`root`),"data-p":o.dataP},o.attrs),{default:Fe(function(){return[m(e.$slots,`default`,{},function(){return[e.loading?m(e.$slots,`loadingicon`,E({key:0,class:[e.cx(`loadingIcon`),e.cx(`icon`)]},e.ptm(`loadingIcon`)),function(){return[e.loadingIcon?(v(),k(`span`,E({key:0,class:[e.cx(`loadingIcon`),e.cx(`icon`),e.loadingIcon]},e.ptm(`loadingIcon`)),null,16)):(v(),he(s,E({key:1,class:[e.cx(`loadingIcon`),e.cx(`icon`)],spin:``},e.ptm(`loadingIcon`)),null,16,[`class`]))]}):m(e.$slots,`icon`,E({key:1,class:[e.cx(`icon`)]},e.ptm(`icon`)),function(){return[e.icon?(v(),k(`span`,E({key:0,class:[e.cx(`icon`),e.icon,e.iconClass],"data-p":o.dataIconP},e.ptm(`icon`)),null,16,iw)):_e(``,!0)]}),e.label?(v(),k(`span`,E({key:2,class:e.cx(`label`)},e.ptm(`label`),{"data-p":o.dataLabelP}),i(e.label),17,aw)):_e(``,!0),e.badge?(v(),he(l,{key:3,value:e.badge,class:c(e.badgeClass),severity:e.badgeSeverity,unstyled:e.unstyled,pt:e.ptm(`pcBadge`)},null,8,[`value`,`class`,`severity`,`unstyled`,`pt`])):_e(``,!0)]})]}),_:3},16,[`class`,`data-p`])),[[u]])}rw.render=ow;var sw=new class{client=null;stateChangeListeners=new Set;isInitialized=!1;connectionState=O(`disconnected`);async initialize(e){if(this.isInitialized)return;let{logger:t}=vl();try{this.client=Dh(),this.connectionState.value=this.client.getConnectionState(),this.client.onStateChange(e=>{this.connectionState.value=e,this.stateChangeListeners.forEach(n=>{try{n(e)}catch(e){t().error(`Error in WebSocket state change listener:`,e)}})}),this.isInitialized=!0,t().info(`WebSocket manager initialized`)}catch(e){throw t().error(`Failed to initialize WebSocket manager:`,e),new _h(`Initialization failed: ${e instanceof Error?e.message:`Unknown error`}`)}}async connect(e){if(this.client||await this.initialize(),!this.client)throw new _h(`WebSocket client not available`);let{logger:t}=vl();try{e?this.client.reconnect(e):this.client.connect(),t().info(`WebSocket connection initiated`,{url:e})}catch(e){throw t().error(`Failed to connect WebSocket:`,e),e}}disconnect(){this.client&&this.client.disconnect()}send(e,t){if(!this.client)throw new _h(`WebSocket client not initialized`);if(!this.client.isConnected())throw new _h(`WebSocket is not connected`);return this.client.send(e,t)}isConnected(){return this.client?.isConnected()??!1}getConnectionState(){return this.client?.getConnectionState()??`disconnected`}onStateChange(e){return this.stateChangeListeners.add(e),()=>{this.stateChangeListeners.delete(e)}}getClient(){return this.client}async ensureConnection(e){let{logger:t}=vl();if(t().debug(`Ensuring WebSocket connection...`,{hasClient:!!this.client,isConnected:this.client?.isConnected()??!1,targetUrl:e}),this.client||(t().debug(`Initializing WebSocket client...`),await this.initialize()),!this.client)throw new _h(`WebSocket client not available`);this.client.isConnected()?t().debug(`WebSocket already connected`):(t().debug(`Connecting WebSocket client...`),await this.connect(e),t().info(`WebSocket connection established successfully`))}},cw={class:`upgrade-dialog`},lw={class:`plans-container`},uw={key:0,class:`loading-state`},dw={key:1,class:`error-state`},fw={class:`error-message`},pw={class:`plan-header`},mw={key:0,class:`price`},hw={key:1,class:`price`},gw={class:`plan-features`},_w=[`disabled`,`onClick`],vw=Be(Ye({__name:`UpgradeDialog`,emits:[`close`],setup(e,{emit:t}){Ah();let n=JS(),r=O([]),a=O(!1),o=O(null),s=async()=>{try{a.value=!0,o.value=null;let e=mh();if(!e){o.value=`Upgrades are currently unavailable (Cloud services not configured).`;return}let{data:t,error:n}=await e.functions.invoke(`polar-available-plans`);if(n)throw n;r.value=t.plans||[]}catch(e){o.value=`Failed to fetch plans. Please try again later.`,console.error(`Error fetching plans:`,e)}finally{a.value=!1}},l=e=>e.name===`Free`?n.subscriptions.length===0:n.subscriptions.some(t=>t.product.id===e.id||t.product.name===e.name),u=e=>l(e)?!0:n.isLoggedIn?e.name===`Free`:!1,f=e=>l(e)?`Current Plan`:n.isLoggedIn?`Upgrade to ${e.name}`:n.hasLoginProvider?`Login to Upgrade`:`Login Unavailable`,p=e=>{if(!n.isLoggedIn){n.hasLoginProvider&&n.displayAuthModal(`Login Required`,`Please login or register to upgrade your plan.`);return}m(e)},m=async e=>{let t=mh();if(!t){console.error(`Supabase client is not available for checkout`);return}let n=await t.functions.invoke(`checkout`,{body:{itemIds:[e.id]}});console.log(`result`,n),n.data&&n.data.checkoutURL?window.open(n.data.checkoutURL):console.error(`No checkout URL returned`,n)};return Te(()=>{s()}),(e,t)=>(v(),k(`div`,cw,[t[1]||=A(`div`,{class:`dialog-header`},[A(`h2`,null,`Upgrade Your Plan`),A(`p`,null,`Choose the plan that works best for you`)],-1),A(`div`,lw,[a.value?(v(),k(`div`,uw,t[0]||=[A(`p`,null,`Loading plans...`,-1)])):o.value?(v(),k(`div`,dw,[A(`p`,fw,i(o.value),1),A(`button`,{class:`retry-button`,onClick:s},`Retry`)])):(v(!0),k(Se,{key:2},d(r.value,(e,t)=>(v(),k(`div`,{key:t,class:c([`plan-card`,{placeholder:e.name===`Free`}])},[A(`div`,pw,[A(`h3`,null,i(e.name),1),(v(!0),k(Se,null,d(e.prices,(e,t)=>(v(),k(`div`,{key:t},[e.amountType===`free`?(v(),k(`span`,mw,`Free`)):(v(),k(`span`,hw,i(e.priceAmount/100)+` `+i(e.priceCurrency)+` / `+i(e.recurringInterval),1))]))),128))]),A(`div`,gw,[A(`ul`,null,[(v(!0),k(Se,null,d(e.benefits,(e,t)=>(v(),k(`li`,{key:t},i(e.description),1))),128))])]),A(`button`,{class:`plan-button`,disabled:u(e),onClick:t=>p(e)},i(f(e)),9,_w)],2))),128))]),t[2]||=A(`div`,{class:`dialog-footer`},null,-1)]))}}),[[`__scopeId`,`data-v-7e06f81b`]]);function yw(e){"@babel/helpers - typeof";return yw=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},yw(e)}function bw(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function xw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,Cw(r.key),r)}}function Sw(e,t,n){return t&&xw(e.prototype,t),Object.defineProperty(e,`prototype`,{writable:!1}),e}function Cw(e){var t=ww(e,`string`);return yw(t)==`symbol`?t:t+``}function ww(e,t){if(yw(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(yw(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return String(e)}var Tw=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){};bw(this,e),this.element=t,this.listener=n}return Sw(e,[{key:`bindScrollListener`,value:function(){this.scrollableParents=vr(this.element);for(var e=0;e<this.scrollableParents.length;e++)this.scrollableParents[e].addEventListener(`scroll`,this.listener)}},{key:`unbindScrollListener`,value:function(){if(this.scrollableParents)for(var e=0;e<this.scrollableParents.length;e++)this.scrollableParents[e].removeEventListener(`scroll`,this.listener)}},{key:`destroy`,value:function(){this.unbindScrollListener(),this.element=null,this.listener=null,this.scrollableParents=null}}])}();function Ew(e){"@babel/helpers - typeof";return Ew=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Ew(e)}function Dw(e){return jw(e)||Aw(e)||kw(e)||Ow()}function Ow(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1046
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kw(e,t){if(e){if(typeof e==`string`)return Mw(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Mw(e,t):void 0}}function Aw(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function jw(e){if(Array.isArray(e))return Mw(e)}function Mw(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Nw(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function Pw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,Lw(r.key),r)}}function Fw(e,t,n){return t&&Pw(e.prototype,t),Object.defineProperty(e,`prototype`,{writable:!1}),e}function Iw(e,t,n){return(t=Lw(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lw(e){var t=Rw(e,`string`);return Ew(t)==`symbol`?t:t+``}function Rw(e,t){if(Ew(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ew(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return String(e)}var zw=function(){function e(t){var n=t.init,r=t.type;Nw(this,e),Iw(this,`helpers`,void 0),Iw(this,`type`,void 0),this.helpers=new Set(n),this.type=r}return Fw(e,[{key:`add`,value:function(e){this.helpers.add(e)}},{key:`update`,value:function(){}},{key:`delete`,value:function(e){this.helpers.delete(e)}},{key:`clear`,value:function(){this.helpers.clear()}},{key:`get`,value:function(e,t){var n=this._get(e,t),r=n?this._recursive(Dw(this.helpers),n):null;return j(r)?r:null}},{key:`_isMatched`,value:function(e,t){var n,r=e?.parent;return(r==null||(n=r.vnode)==null?void 0:n.key)===t||r&&this._isMatched(r,t)||!1}},{key:`_get`,value:function(e,t){var n,r;return((n=t||e?.$slots)==null||(r=n.default)==null?void 0:r.call(n))||null}},{key:`_recursive`,value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=[];return n.forEach(function(n){n.children instanceof Array?r=r.concat(e._recursive(t,n.children)):n.type.name===e.type?r.push(n):j(n.key)&&(r=r.concat(t.filter(function(t){return e._isMatched(t,n.key)}).map(function(e){return e.vnode})))}),r}}])}();function Bw(e,t){if(e){var n=e.props;if(n){var r=t.replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase(),i=Object.prototype.hasOwnProperty.call(n,r)?r:t;return e.type.extends.props[t].type===Boolean&&n[i]===``?!0:n[i]}}return null}var Vw=ba.extend({name:`tooltip-directive`,style:`
|
|
1047
|
+
.p-tooltip {
|
|
1048
|
+
position: absolute;
|
|
1049
|
+
display: none;
|
|
1050
|
+
max-width: dt('tooltip.max.width');
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
.p-tooltip-right,
|
|
1054
|
+
.p-tooltip-left {
|
|
1055
|
+
padding: 0 dt('tooltip.gutter');
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
.p-tooltip-top,
|
|
1059
|
+
.p-tooltip-bottom {
|
|
1060
|
+
padding: dt('tooltip.gutter') 0;
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
.p-tooltip-text {
|
|
1064
|
+
white-space: pre-line;
|
|
1065
|
+
word-break: break-word;
|
|
1066
|
+
background: dt('tooltip.background');
|
|
1067
|
+
color: dt('tooltip.color');
|
|
1068
|
+
padding: dt('tooltip.padding');
|
|
1069
|
+
box-shadow: dt('tooltip.shadow');
|
|
1070
|
+
border-radius: dt('tooltip.border.radius');
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
.p-tooltip-arrow {
|
|
1074
|
+
position: absolute;
|
|
1075
|
+
width: 0;
|
|
1076
|
+
height: 0;
|
|
1077
|
+
border-color: transparent;
|
|
1078
|
+
border-style: solid;
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
.p-tooltip-right .p-tooltip-arrow {
|
|
1082
|
+
margin-top: calc(-1 * dt('tooltip.gutter'));
|
|
1083
|
+
border-width: dt('tooltip.gutter') dt('tooltip.gutter') dt('tooltip.gutter') 0;
|
|
1084
|
+
border-right-color: dt('tooltip.background');
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
.p-tooltip-left .p-tooltip-arrow {
|
|
1088
|
+
margin-top: calc(-1 * dt('tooltip.gutter'));
|
|
1089
|
+
border-width: dt('tooltip.gutter') 0 dt('tooltip.gutter') dt('tooltip.gutter');
|
|
1090
|
+
border-left-color: dt('tooltip.background');
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
.p-tooltip-top .p-tooltip-arrow {
|
|
1094
|
+
margin-left: calc(-1 * dt('tooltip.gutter'));
|
|
1095
|
+
border-width: dt('tooltip.gutter') dt('tooltip.gutter') 0 dt('tooltip.gutter');
|
|
1096
|
+
border-top-color: dt('tooltip.background');
|
|
1097
|
+
border-bottom-color: dt('tooltip.background');
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
.p-tooltip-bottom .p-tooltip-arrow {
|
|
1101
|
+
margin-left: calc(-1 * dt('tooltip.gutter'));
|
|
1102
|
+
border-width: 0 dt('tooltip.gutter') dt('tooltip.gutter') dt('tooltip.gutter');
|
|
1103
|
+
border-top-color: dt('tooltip.background');
|
|
1104
|
+
border-bottom-color: dt('tooltip.background');
|
|
1105
|
+
}
|
|
1106
|
+
`,classes:{root:`p-tooltip p-component`,arrow:`p-tooltip-arrow`,text:`p-tooltip-text`}}),Hw=J.extend({style:Vw});function Uw(e,t){return Jw(e)||qw(e,t)||Gw(e,t)||Ww()}function Ww(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1107
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gw(e,t){if(e){if(typeof e==`string`)return Kw(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Kw(e,t):void 0}}function Kw(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function qw(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Jw(e){if(Array.isArray(e))return e}function Yw(e,t,n){return(t=Xw(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xw(e){var t=Zw(e,`string`);return Qw(t)==`symbol`?t:t+``}function Zw(e,t){if(Qw(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Qw(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Qw(e){"@babel/helpers - typeof";return Qw=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Qw(e)}var $w=Hw.extend(`tooltip`,{beforeMount:function(e,t){var n,r=this.getTarget(e);if(r.$_ptooltipModifiers=this.getModifiers(t),t.value){if(typeof t.value==`string`)r.$_ptooltipValue=t.value,r.$_ptooltipDisabled=!1,r.$_ptooltipEscape=!0,r.$_ptooltipClass=null,r.$_ptooltipFitContent=!0,r.$_ptooltipIdAttr=fi(`pv_id`)+`_tooltip`,r.$_ptooltipShowDelay=0,r.$_ptooltipHideDelay=0,r.$_ptooltipAutoHide=!0;else if(Qw(t.value)===`object`&&t.value){if(Ir(t.value.value)||t.value.value.trim()===``)return;r.$_ptooltipValue=t.value.value,r.$_ptooltipDisabled=!!t.value.disabled===t.value.disabled?t.value.disabled:!1,r.$_ptooltipEscape=!!t.value.escape===t.value.escape?t.value.escape:!0,r.$_ptooltipClass=t.value.class||``,r.$_ptooltipFitContent=!!t.value.fitContent===t.value.fitContent?t.value.fitContent:!0,r.$_ptooltipIdAttr=t.value.id||fi(`pv_id`)+`_tooltip`,r.$_ptooltipShowDelay=t.value.showDelay||0,r.$_ptooltipHideDelay=t.value.hideDelay||0,r.$_ptooltipAutoHide=!!t.value.autoHide===t.value.autoHide?t.value.autoHide:!0}r.$_ptooltipZIndex=(n=t.instance.$primevue)==null||(n=n.config)==null||(n=n.zIndex)==null?void 0:n.tooltip,this.bindEvents(r,t),e.setAttribute(`data-pd-tooltip`,!0)}},updated:function(e,t){var n=this.getTarget(e);if(n.$_ptooltipModifiers=this.getModifiers(t),this.unbindEvents(n),t.value){if(typeof t.value==`string`)n.$_ptooltipValue=t.value,n.$_ptooltipDisabled=!1,n.$_ptooltipEscape=!0,n.$_ptooltipClass=null,n.$_ptooltipIdAttr=n.$_ptooltipIdAttr||fi(`pv_id`)+`_tooltip`,n.$_ptooltipShowDelay=0,n.$_ptooltipHideDelay=0,n.$_ptooltipAutoHide=!0,this.bindEvents(n,t);else if(Qw(t.value)===`object`&&t.value)if(Ir(t.value.value)||t.value.value.trim()===``){this.unbindEvents(n,t);return}else n.$_ptooltipValue=t.value.value,n.$_ptooltipDisabled=!!t.value.disabled===t.value.disabled?t.value.disabled:!1,n.$_ptooltipEscape=!!t.value.escape===t.value.escape?t.value.escape:!0,n.$_ptooltipClass=t.value.class||``,n.$_ptooltipFitContent=!!t.value.fitContent===t.value.fitContent?t.value.fitContent:!0,n.$_ptooltipIdAttr=t.value.id||n.$_ptooltipIdAttr||fi(`pv_id`)+`_tooltip`,n.$_ptooltipShowDelay=t.value.showDelay||0,n.$_ptooltipHideDelay=t.value.hideDelay||0,n.$_ptooltipAutoHide=!!t.value.autoHide===t.value.autoHide?t.value.autoHide:!0,this.bindEvents(n,t)}},unmounted:function(e,t){var n=this.getTarget(e);this.hide(e,0),this.remove(n),this.unbindEvents(n,t),n.$_ptooltipScrollHandler&&=(n.$_ptooltipScrollHandler.destroy(),null)},timer:void 0,methods:{bindEvents:function(e,t){var n=this;e.$_ptooltipModifiers.focus?(e.$_ptooltipFocusEvent=function(e){return n.onFocus(e,t)},e.$_ptooltipBlurEvent=this.onBlur.bind(this),e.addEventListener(`focus`,e.$_ptooltipFocusEvent),e.addEventListener(`blur`,e.$_ptooltipBlurEvent)):(e.$_ptooltipMouseEnterEvent=function(e){return n.onMouseEnter(e,t)},e.$_ptooltipMouseLeaveEvent=this.onMouseLeave.bind(this),e.$_ptooltipClickEvent=this.onClick.bind(this),e.addEventListener(`mouseenter`,e.$_ptooltipMouseEnterEvent),e.addEventListener(`mouseleave`,e.$_ptooltipMouseLeaveEvent),e.addEventListener(`click`,e.$_ptooltipClickEvent)),e.$_ptooltipKeydownEvent=this.onKeydown.bind(this),e.addEventListener(`keydown`,e.$_ptooltipKeydownEvent),e.$_pWindowResizeEvent=this.onWindowResize.bind(this,e)},unbindEvents:function(e){e.$_ptooltipModifiers.focus?(e.removeEventListener(`focus`,e.$_ptooltipFocusEvent),e.$_ptooltipFocusEvent=null,e.removeEventListener(`blur`,e.$_ptooltipBlurEvent),e.$_ptooltipBlurEvent=null):(e.removeEventListener(`mouseenter`,e.$_ptooltipMouseEnterEvent),e.$_ptooltipMouseEnterEvent=null,e.removeEventListener(`mouseleave`,e.$_ptooltipMouseLeaveEvent),e.$_ptooltipMouseLeaveEvent=null,e.removeEventListener(`click`,e.$_ptooltipClickEvent),e.$_ptooltipClickEvent=null),e.removeEventListener(`keydown`,e.$_ptooltipKeydownEvent),window.removeEventListener(`resize`,e.$_pWindowResizeEvent),e.$_ptooltipId&&this.remove(e)},bindScrollListener:function(e){var t=this;e.$_ptooltipScrollHandler||=new Tw(e,function(){t.hide(e)}),e.$_ptooltipScrollHandler.bindScrollListener()},unbindScrollListener:function(e){e.$_ptooltipScrollHandler&&e.$_ptooltipScrollHandler.unbindScrollListener()},onMouseEnter:function(e,t){var n=e.currentTarget,r=n.$_ptooltipShowDelay;this.show(n,t,r)},onMouseLeave:function(e){var t=e.currentTarget,n=t.$_ptooltipHideDelay;(t.$_ptooltipAutoHide||!(ar(e.target,`data-pc-name`)===`tooltip`||ar(e.target,`data-pc-section`)===`arrow`||ar(e.target,`data-pc-section`)===`text`||ar(e.relatedTarget,`data-pc-name`)===`tooltip`||ar(e.relatedTarget,`data-pc-section`)===`arrow`||ar(e.relatedTarget,`data-pc-section`)===`text`))&&this.hide(t,n)},onFocus:function(e,t){var n=e.currentTarget,r=n.$_ptooltipShowDelay;this.show(n,t,r)},onBlur:function(e){var t=e.currentTarget,n=t.$_ptooltipHideDelay;this.hide(t,n)},onClick:function(e){var t=e.currentTarget,n=t.$_ptooltipHideDelay;this.hide(t,n)},onKeydown:function(e){var t=e.currentTarget.$_ptooltipHideDelay;e.code===`Escape`&&this.hide(e.currentTarget,t)},onWindowResize:function(e){Dr()||this.hide(e),window.removeEventListener(`resize`,e.$_pWindowResizeEvent)},tooltipActions:function(e,t){if(!(e.$_ptooltipDisabled||!Xn(e)||!e.$_ptooltipPendingShow)){e.$_ptooltipPendingShow=!1;var n=this.create(e,t);this.align(e),!this.isUnstyled()&&tr(n,250);var r=this;window.addEventListener(`resize`,e.$_pWindowResizeEvent),n.addEventListener(`mouseleave`,function t(){r.hide(e),n.removeEventListener(`mouseleave`,t),e.removeEventListener(`mouseenter`,e.$_ptooltipMouseEnterEvent),setTimeout(function(){return e.addEventListener(`mouseenter`,e.$_ptooltipMouseEnterEvent)},50)}),this.bindScrollListener(e),mi.set(`tooltip`,n,e.$_ptooltipZIndex)}},show:function(e,t,n){var r=this;n===void 0?(this.tooltipActions(e,t),e.$_ptooltipPendingShow=!1):(this.timer=setTimeout(function(){return r.tooltipActions(e,t)},n),e.$_ptooltipPendingShow=!0)},tooltipRemoval:function(e){this.remove(e),this.unbindScrollListener(e),window.removeEventListener(`resize`,e.$_pWindowResizeEvent)},hide:function(e,t){var n=this;clearTimeout(this.timer),e.$_ptooltipPendingShow=!1,t===void 0?this.tooltipRemoval(e):setTimeout(function(){return n.tooltipRemoval(e)},t)},getTooltipElement:function(e){return document.getElementById(e.$_ptooltipId)},getArrowElement:function(e){return rr(this.getTooltipElement(e),`[data-pc-section="arrow"]`)},create:function(e){var t=e.$_ptooltipModifiers,n=er(`div`,{class:!this.isUnstyled()&&this.cx(`arrow`),"p-bind":this.ptm(`arrow`,{context:t})}),r=er(`div`,{class:!this.isUnstyled()&&this.cx(`text`),"p-bind":this.ptm(`text`,{context:t})});e.$_ptooltipEscape?(r.innerHTML=``,r.appendChild(document.createTextNode(e.$_ptooltipValue))):r.innerHTML=e.$_ptooltipValue;var i=er(`div`,Yw(Yw({id:e.$_ptooltipIdAttr,role:`tooltip`,style:{display:`inline-block`,width:e.$_ptooltipFitContent?`fit-content`:void 0,pointerEvents:!this.isUnstyled()&&e.$_ptooltipAutoHide&&`none`},class:[!this.isUnstyled()&&this.cx(`root`),e.$_ptooltipClass]},this.$attrSelector,``),`p-bind`,this.ptm(`root`,{context:t})),n,r);return document.body.appendChild(i),e.$_ptooltipId=i.id,this.$el=i,i},remove:function(e){if(e){var t=this.getTooltipElement(e);t&&t.parentElement&&(mi.clear(t),document.body.removeChild(t)),e.$_ptooltipId=null}},align:function(e){var t=e.$_ptooltipModifiers;t.top?(this.alignTop(e),this.isOutOfBounds(e)&&(this.alignBottom(e),this.isOutOfBounds(e)&&this.alignTop(e))):t.left?(this.alignLeft(e),this.isOutOfBounds(e)&&(this.alignRight(e),this.isOutOfBounds(e)&&(this.alignTop(e),this.isOutOfBounds(e)&&(this.alignBottom(e),this.isOutOfBounds(e)&&this.alignLeft(e))))):t.bottom?(this.alignBottom(e),this.isOutOfBounds(e)&&(this.alignTop(e),this.isOutOfBounds(e)&&this.alignBottom(e))):(this.alignRight(e),this.isOutOfBounds(e)&&(this.alignLeft(e),this.isOutOfBounds(e)&&(this.alignTop(e),this.isOutOfBounds(e)&&(this.alignBottom(e),this.isOutOfBounds(e)&&this.alignRight(e)))))},getHostOffset:function(e){var t=e.getBoundingClientRect();return{left:t.left+Hn(),top:t.top+Un()}},alignRight:function(e){this.preAlign(e,`right`);var t=this.getTooltipElement(e),n=this.getArrowElement(e),r=this.getHostOffset(e),i=r.left+qn(e),a=r.top+(hr(e)-hr(t))/2;t.style.left=i+`px`,t.style.top=a+`px`,n.style.top=`50%`,n.style.right=null,n.style.bottom=null,n.style.left=`0`},alignLeft:function(e){this.preAlign(e,`left`);var t=this.getTooltipElement(e),n=this.getArrowElement(e),r=this.getHostOffset(e),i=r.left-qn(t),a=r.top+(hr(e)-hr(t))/2;t.style.left=i+`px`,t.style.top=a+`px`,n.style.top=`50%`,n.style.right=`0`,n.style.bottom=null,n.style.left=null},alignTop:function(e){this.preAlign(e,`top`);var t=this.getTooltipElement(e),n=this.getArrowElement(e),r=qn(t),i=qn(e),a=Bn().width,o=this.getHostOffset(e),s=o.left+(i-r)/2,c=o.top-hr(t);s<0?s=0:s+r>a&&(s=Math.floor(o.left+i-r)),t.style.left=s+`px`,t.style.top=c+`px`;var l=o.left-this.getHostOffset(t).left+i/2;n.style.top=null,n.style.right=null,n.style.bottom=`0`,n.style.left=l+`px`},alignBottom:function(e){this.preAlign(e,`bottom`);var t=this.getTooltipElement(e),n=this.getArrowElement(e),r=qn(t),i=qn(e),a=Bn().width,o=this.getHostOffset(e),s=o.left+(i-r)/2,c=o.top+hr(e);s<0?s=0:s+r>a&&(s=Math.floor(o.left+i-r)),t.style.left=s+`px`,t.style.top=c+`px`;var l=o.left-this.getHostOffset(t).left+i/2;n.style.top=`0`,n.style.right=null,n.style.bottom=null,n.style.left=l+`px`},preAlign:function(e,t){var n=this.getTooltipElement(e);n.style.left=`-999px`,n.style.top=`-999px`,In(n,`p-tooltip-${n.$_ptooltipPosition}`),!this.isUnstyled()&&jn(n,`p-tooltip-${t}`),n.$_ptooltipPosition=t,n.setAttribute(`data-p-position`,t)},isOutOfBounds:function(e){var t=this.getTooltipElement(e),n=t.getBoundingClientRect(),r=n.top,i=n.left,a=qn(t),o=hr(t),s=Bn();return i+a>s.width||i<0||r<0||r+o>s.height},getTarget:function(e){return An(e,`p-inputwrapper`)?rr(e,`input`)??e:e},getModifiers:function(e){return e.modifiers&&Object.keys(e.modifiers).length?e.modifiers:e.arg&&Qw(e.arg)===`object`?Object.entries(e.arg).reduce(function(e,t){var n=Uw(t,2),r=n[0],i=n[1];return(r===`event`||r===`position`)&&(e[i]=!0),e},{}):{}}}}),eT={name:`TimesIcon`,extends:rC};function tT(e){return aT(e)||iT(e)||rT(e)||nT()}function nT(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1108
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rT(e,t){if(e){if(typeof e==`string`)return oT(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?oT(e,t):void 0}}function iT(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function aT(e){if(Array.isArray(e))return oT(e)}function oT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function sT(e,t,n,r,i,a){return v(),k(`svg`,E({width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e.pti()),tT(t[0]||=[A(`path`,{d:`M8.01186 7.00933L12.27 2.75116C12.341 2.68501 12.398 2.60524 12.4375 2.51661C12.4769 2.42798 12.4982 2.3323 12.4999 2.23529C12.5016 2.13827 12.4838 2.0419 12.4474 1.95194C12.4111 1.86197 12.357 1.78024 12.2884 1.71163C12.2198 1.64302 12.138 1.58893 12.0481 1.55259C11.9581 1.51625 11.8617 1.4984 11.7647 1.50011C11.6677 1.50182 11.572 1.52306 11.4834 1.56255C11.3948 1.60204 11.315 1.65898 11.2488 1.72997L6.99067 5.98814L2.7325 1.72997C2.59553 1.60234 2.41437 1.53286 2.22718 1.53616C2.03999 1.53946 1.8614 1.61529 1.72901 1.74767C1.59663 1.88006 1.5208 2.05865 1.5175 2.24584C1.5142 2.43303 1.58368 2.61419 1.71131 2.75116L5.96948 7.00933L1.71131 11.2675C1.576 11.403 1.5 11.5866 1.5 11.7781C1.5 11.9696 1.576 12.1532 1.71131 12.2887C1.84679 12.424 2.03043 12.5 2.2219 12.5C2.41338 12.5 2.59702 12.424 2.7325 12.2887L6.99067 8.03052L11.2488 12.2887C11.3843 12.424 11.568 12.5 11.7594 12.5C11.9509 12.5 12.1346 12.424 12.27 12.2887C12.4053 12.1532 12.4813 11.9696 12.4813 11.7781C12.4813 11.5866 12.4053 11.403 12.27 11.2675L8.01186 7.00933Z`,fill:`currentColor`},null,-1)]),16)}eT.render=sT;var cT={name:`WindowMaximizeIcon`,extends:rC};function lT(e){return pT(e)||fT(e)||dT(e)||uT()}function uT(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1109
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dT(e,t){if(e){if(typeof e==`string`)return mT(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?mT(e,t):void 0}}function fT(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function pT(e){if(Array.isArray(e))return mT(e)}function mT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function hT(e,t,n,r,i,a){return v(),k(`svg`,E({width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e.pti()),lT(t[0]||=[A(`path`,{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14ZM9.77805 7.42192C9.89013 7.534 10.0415 7.59788 10.2 7.59995C10.3585 7.59788 10.5099 7.534 10.622 7.42192C10.7341 7.30985 10.798 7.15844 10.8 6.99995V3.94242C10.8066 3.90505 10.8096 3.86689 10.8089 3.82843C10.8079 3.77159 10.7988 3.7157 10.7824 3.6623C10.756 3.55552 10.701 3.45698 10.622 3.37798C10.5099 3.2659 10.3585 3.20202 10.2 3.19995H7.00002C6.84089 3.19995 6.68828 3.26317 6.57576 3.37569C6.46324 3.48821 6.40002 3.64082 6.40002 3.79995C6.40002 3.95908 6.46324 4.11169 6.57576 4.22422C6.68828 4.33674 6.84089 4.39995 7.00002 4.39995H8.80006L6.19997 7.00005C6.10158 7.11005 6.04718 7.25246 6.04718 7.40005C6.04718 7.54763 6.10158 7.69004 6.19997 7.80005C6.30202 7.91645 6.44561 7.98824 6.59997 8.00005C6.75432 7.98824 6.89791 7.91645 6.99997 7.80005L9.60002 5.26841V6.99995C9.6021 7.15844 9.66598 7.30985 9.77805 7.42192ZM1.4 14H3.8C4.17066 13.9979 4.52553 13.8498 4.78763 13.5877C5.04973 13.3256 5.1979 12.9707 5.2 12.6V10.2C5.1979 9.82939 5.04973 9.47452 4.78763 9.21242C4.52553 8.95032 4.17066 8.80215 3.8 8.80005H1.4C1.02934 8.80215 0.674468 8.95032 0.412371 9.21242C0.150274 9.47452 0.00210008 9.82939 0 10.2V12.6C0.00210008 12.9707 0.150274 13.3256 0.412371 13.5877C0.674468 13.8498 1.02934 13.9979 1.4 14ZM1.25858 10.0586C1.29609 10.0211 1.34696 10 1.4 10H3.8C3.85304 10 3.90391 10.0211 3.94142 10.0586C3.97893 10.0961 4 10.147 4 10.2V12.6C4 12.6531 3.97893 12.704 3.94142 12.7415C3.90391 12.779 3.85304 12.8 3.8 12.8H1.4C1.34696 12.8 1.29609 12.779 1.25858 12.7415C1.22107 12.704 1.2 12.6531 1.2 12.6V10.2C1.2 10.147 1.22107 10.0961 1.25858 10.0586Z`,fill:`currentColor`},null,-1)]),16)}cT.render=hT;var gT={name:`WindowMinimizeIcon`,extends:rC};function _T(e){return xT(e)||bT(e)||yT(e)||vT()}function vT(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1110
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yT(e,t){if(e){if(typeof e==`string`)return ST(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ST(e,t):void 0}}function bT(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function xT(e){if(Array.isArray(e))return ST(e)}function ST(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function CT(e,t,n,r,i,a){return v(),k(`svg`,E({width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e.pti()),_T(t[0]||=[A(`path`,{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0ZM6.368 7.952C6.44137 7.98326 6.52025 7.99958 6.6 8H9.8C9.95913 8 10.1117 7.93678 10.2243 7.82426C10.3368 7.71174 10.4 7.55913 10.4 7.4C10.4 7.24087 10.3368 7.08826 10.2243 6.97574C10.1117 6.86321 9.95913 6.8 9.8 6.8H8.048L10.624 4.224C10.73 4.11026 10.7877 3.95982 10.7849 3.80438C10.7822 3.64894 10.7192 3.50063 10.6093 3.3907C10.4994 3.28077 10.3511 3.2178 10.1956 3.21506C10.0402 3.21232 9.88974 3.27002 9.776 3.376L7.2 5.952V4.2C7.2 4.04087 7.13679 3.88826 7.02426 3.77574C6.91174 3.66321 6.75913 3.6 6.6 3.6C6.44087 3.6 6.28826 3.66321 6.17574 3.77574C6.06321 3.88826 6 4.04087 6 4.2V7.4C6.00042 7.47975 6.01674 7.55862 6.048 7.632C6.07656 7.70442 6.11971 7.7702 6.17475 7.82524C6.2298 7.88029 6.29558 7.92344 6.368 7.952ZM1.4 8.80005H3.8C4.17066 8.80215 4.52553 8.95032 4.78763 9.21242C5.04973 9.47452 5.1979 9.82939 5.2 10.2V12.6C5.1979 12.9707 5.04973 13.3256 4.78763 13.5877C4.52553 13.8498 4.17066 13.9979 3.8 14H1.4C1.02934 13.9979 0.674468 13.8498 0.412371 13.5877C0.150274 13.3256 0.00210008 12.9707 0 12.6V10.2C0.00210008 9.82939 0.150274 9.47452 0.412371 9.21242C0.674468 8.95032 1.02934 8.80215 1.4 8.80005ZM3.94142 12.7415C3.97893 12.704 4 12.6531 4 12.6V10.2C4 10.147 3.97893 10.0961 3.94142 10.0586C3.90391 10.0211 3.85304 10 3.8 10H1.4C1.34696 10 1.29609 10.0211 1.25858 10.0586C1.22107 10.0961 1.2 10.147 1.2 10.2V12.6C1.2 12.6531 1.22107 12.704 1.25858 12.7415C1.29609 12.779 1.34696 12.8 1.4 12.8H3.8C3.85304 12.8 3.90391 12.779 3.94142 12.7415Z`,fill:`currentColor`},null,-1)]),16)}gT.render=CT;var wT=ba.extend({name:`focustrap-directive`}),TT=J.extend({style:wT});function ET(e){"@babel/helpers - typeof";return ET=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},ET(e)}function DT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function OT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?DT(Object(n),!0).forEach(function(t){kT(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function kT(e,t,n){return(t=AT(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AT(e){var t=jT(e,`string`);return ET(t)==`symbol`?t:t+``}function jT(e,t){if(ET(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ET(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var MT=TT.extend(`focustrap`,{mounted:function(e,t){(t.value||{}).disabled||(this.createHiddenFocusableElements(e,t),this.bind(e,t),this.autoElementFocus(e,t)),e.setAttribute(`data-pd-focustrap`,!0),this.$el=e},updated:function(e,t){(t.value||{}).disabled&&this.unbind(e)},unmounted:function(e){this.unbind(e)},methods:{getComputedSelector:function(e){return`:not(.p-hidden-focusable):not([data-p-hidden-focusable="true"])${e??``}`},bind:function(e,t){var n=this,r=t.value||{},i=r.onFocusIn,a=r.onFocusOut;e.$_pfocustrap_mutationobserver=new MutationObserver(function(t){t.forEach(function(t){if(t.type===`childList`&&!e.contains(document.activeElement)){var r=function(t){var i=Tr(t)?Tr(t,n.getComputedSelector(e.$_pfocustrap_focusableselector))?t:sr(e,n.getComputedSelector(e.$_pfocustrap_focusableselector)):sr(t);return j(i)?i:t.nextSibling&&r(t.nextSibling)};ir(r(t.nextSibling))}})}),e.$_pfocustrap_mutationobserver.disconnect(),e.$_pfocustrap_mutationobserver.observe(e,{childList:!0}),e.$_pfocustrap_focusinlistener=function(e){return i&&i(e)},e.$_pfocustrap_focusoutlistener=function(e){return a&&a(e)},e.addEventListener(`focusin`,e.$_pfocustrap_focusinlistener),e.addEventListener(`focusout`,e.$_pfocustrap_focusoutlistener)},unbind:function(e){e.$_pfocustrap_mutationobserver&&e.$_pfocustrap_mutationobserver.disconnect(),e.$_pfocustrap_focusinlistener&&e.removeEventListener(`focusin`,e.$_pfocustrap_focusinlistener)&&(e.$_pfocustrap_focusinlistener=null),e.$_pfocustrap_focusoutlistener&&e.removeEventListener(`focusout`,e.$_pfocustrap_focusoutlistener)&&(e.$_pfocustrap_focusoutlistener=null)},autoFocus:function(e){this.autoElementFocus(this.$el,{value:OT(OT({},e),{},{autoFocus:!0})})},autoElementFocus:function(e,t){var n=t.value||{},r=n.autoFocusSelector,i=r===void 0?``:r,a=n.firstFocusableSelector,o=a===void 0?``:a,s=n.autoFocus,c=s===void 0?!1:s,l=sr(e,`[autofocus]${this.getComputedSelector(i)}`);c&&!l&&(l=sr(e,this.getComputedSelector(o))),ir(l)},onFirstHiddenElementFocus:function(e){var t,n=e.currentTarget,r=e.relatedTarget;ir(r===n.$_pfocustrap_lasthiddenfocusableelement||!((t=this.$el)!=null&&t.contains(r))?sr(n.parentElement,this.getComputedSelector(n.$_pfocustrap_focusableselector)):n.$_pfocustrap_lasthiddenfocusableelement)},onLastHiddenElementFocus:function(e){var t,n=e.currentTarget,r=e.relatedTarget;ir(r===n.$_pfocustrap_firsthiddenfocusableelement||!((t=this.$el)!=null&&t.contains(r))?fr(n.parentElement,this.getComputedSelector(n.$_pfocustrap_focusableselector)):n.$_pfocustrap_firsthiddenfocusableelement)},createHiddenFocusableElements:function(e,t){var n=this,r=t.value||{},i=r.tabIndex,a=i===void 0?0:i,o=r.firstFocusableSelector,s=o===void 0?``:o,c=r.lastFocusableSelector,l=c===void 0?``:c,u=function(e){return er(`span`,{class:`p-hidden-accessible p-hidden-focusable`,tabIndex:a,role:`presentation`,"aria-hidden":!0,"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0,onFocus:e?.bind(n)})},d=u(this.onFirstHiddenElementFocus),f=u(this.onLastHiddenElementFocus);d.$_pfocustrap_lasthiddenfocusableelement=f,d.$_pfocustrap_focusableselector=s,d.setAttribute(`data-pc-section`,`firstfocusableelement`),f.$_pfocustrap_firsthiddenfocusableelement=d,f.$_pfocustrap_focusableselector=l,f.setAttribute(`data-pc-section`,`lastfocusableelement`),e.prepend(d),e.append(f)}}}),NT={name:`Portal`,props:{appendTo:{type:[String,Object],default:`body`},disabled:{type:Boolean,default:!1}},data:function(){return{mounted:!1}},mounted:function(){this.mounted=wr()},computed:{inline:function(){return this.disabled||this.appendTo===`self`}}};function PT(e,t,n,r,i,a){return a.inline?m(e.$slots,`default`,{key:0}):i.mounted?(v(),he(Ne,{key:1,to:n.appendTo},[m(e.$slots,`default`)],8,[`to`])):_e(``,!0)}NT.render=PT;function FT(){Nn({variableName:zi(`scrollbar.width`).name})}function IT(){Ln({variableName:zi(`scrollbar.width`).name})}var LT=ba.extend({name:`dialog`,style:`
|
|
1111
|
+
.p-dialog {
|
|
1112
|
+
max-height: 90%;
|
|
1113
|
+
transform: scale(1);
|
|
1114
|
+
border-radius: dt('dialog.border.radius');
|
|
1115
|
+
box-shadow: dt('dialog.shadow');
|
|
1116
|
+
background: dt('dialog.background');
|
|
1117
|
+
border: 1px solid dt('dialog.border.color');
|
|
1118
|
+
color: dt('dialog.color');
|
|
1119
|
+
will-change: transform;
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
.p-dialog-content {
|
|
1123
|
+
overflow-y: auto;
|
|
1124
|
+
padding: dt('dialog.content.padding');
|
|
1125
|
+
flex-grow: 1;
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
.p-dialog-header {
|
|
1129
|
+
display: flex;
|
|
1130
|
+
align-items: center;
|
|
1131
|
+
justify-content: space-between;
|
|
1132
|
+
flex-shrink: 0;
|
|
1133
|
+
padding: dt('dialog.header.padding');
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
.p-dialog-title {
|
|
1137
|
+
font-weight: dt('dialog.title.font.weight');
|
|
1138
|
+
font-size: dt('dialog.title.font.size');
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
.p-dialog-footer {
|
|
1142
|
+
flex-shrink: 0;
|
|
1143
|
+
padding: dt('dialog.footer.padding');
|
|
1144
|
+
display: flex;
|
|
1145
|
+
justify-content: flex-end;
|
|
1146
|
+
gap: dt('dialog.footer.gap');
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
.p-dialog-header-actions {
|
|
1150
|
+
display: flex;
|
|
1151
|
+
align-items: center;
|
|
1152
|
+
gap: dt('dialog.header.gap');
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
.p-dialog-top .p-dialog,
|
|
1156
|
+
.p-dialog-bottom .p-dialog,
|
|
1157
|
+
.p-dialog-left .p-dialog,
|
|
1158
|
+
.p-dialog-right .p-dialog,
|
|
1159
|
+
.p-dialog-topleft .p-dialog,
|
|
1160
|
+
.p-dialog-topright .p-dialog,
|
|
1161
|
+
.p-dialog-bottomleft .p-dialog,
|
|
1162
|
+
.p-dialog-bottomright .p-dialog {
|
|
1163
|
+
margin: 1rem;
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
.p-dialog-maximized {
|
|
1167
|
+
width: 100vw !important;
|
|
1168
|
+
height: 100vh !important;
|
|
1169
|
+
top: 0px !important;
|
|
1170
|
+
left: 0px !important;
|
|
1171
|
+
max-height: 100%;
|
|
1172
|
+
height: 100%;
|
|
1173
|
+
border-radius: 0;
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
.p-dialog .p-resizable-handle {
|
|
1177
|
+
position: absolute;
|
|
1178
|
+
font-size: 0.1px;
|
|
1179
|
+
display: block;
|
|
1180
|
+
cursor: se-resize;
|
|
1181
|
+
width: 12px;
|
|
1182
|
+
height: 12px;
|
|
1183
|
+
right: 1px;
|
|
1184
|
+
bottom: 1px;
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
.p-dialog-enter-active {
|
|
1188
|
+
animation: p-animate-dialog-enter 300ms cubic-bezier(.19,1,.22,1);
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1191
|
+
.p-dialog-leave-active {
|
|
1192
|
+
animation: p-animate-dialog-leave 300ms cubic-bezier(.19,1,.22,1);
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
@keyframes p-animate-dialog-enter {
|
|
1196
|
+
from {
|
|
1197
|
+
opacity: 0;
|
|
1198
|
+
transform: scale(0.93);
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
@keyframes p-animate-dialog-leave {
|
|
1203
|
+
to {
|
|
1204
|
+
opacity: 0;
|
|
1205
|
+
transform: scale(0.93);
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
`,classes:{mask:function(e){var t=e.props,n=[`left`,`right`,`top`,`topleft`,`topright`,`bottom`,`bottomleft`,`bottomright`].find(function(e){return e===t.position});return[`p-dialog-mask`,{"p-overlay-mask p-overlay-mask-enter-active":t.modal},n?`p-dialog-${n}`:``]},root:function(e){var t=e.props,n=e.instance;return[`p-dialog p-component`,{"p-dialog-maximized":t.maximizable&&n.maximized}]},header:`p-dialog-header`,title:`p-dialog-title`,headerActions:`p-dialog-header-actions`,pcMaximizeButton:`p-dialog-maximize-button`,pcCloseButton:`p-dialog-close-button`,content:`p-dialog-content`,footer:`p-dialog-footer`},inlineStyles:{mask:function(e){var t=e.position,n=e.modal;return{position:`fixed`,height:`100%`,width:`100%`,left:0,top:0,display:`flex`,justifyContent:t===`left`||t===`topleft`||t===`bottomleft`?`flex-start`:t===`right`||t===`topright`||t===`bottomright`?`flex-end`:`center`,alignItems:t===`top`||t===`topleft`||t===`topright`?`flex-start`:t===`bottom`||t===`bottomleft`||t===`bottomright`?`flex-end`:`center`,pointerEvents:n?`auto`:`none`}},root:{display:`flex`,flexDirection:`column`,pointerEvents:`auto`}}}),RT={name:`Dialog`,extends:{name:`BaseDialog`,extends:Ia,props:{header:{type:null,default:null},footer:{type:null,default:null},visible:{type:Boolean,default:!1},modal:{type:Boolean,default:null},contentStyle:{type:null,default:null},contentClass:{type:String,default:null},contentProps:{type:null,default:null},maximizable:{type:Boolean,default:!1},dismissableMask:{type:Boolean,default:!1},closable:{type:Boolean,default:!0},closeOnEscape:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},blockScroll:{type:Boolean,default:!1},baseZIndex:{type:Number,default:0},autoZIndex:{type:Boolean,default:!0},position:{type:String,default:`center`},breakpoints:{type:Object,default:null},draggable:{type:Boolean,default:!0},keepInViewport:{type:Boolean,default:!0},minX:{type:Number,default:0},minY:{type:Number,default:0},appendTo:{type:[String,Object],default:`body`},closeIcon:{type:String,default:void 0},maximizeIcon:{type:String,default:void 0},minimizeIcon:{type:String,default:void 0},closeButtonProps:{type:Object,default:function(){return{severity:`secondary`,text:!0,rounded:!0}}},maximizeButtonProps:{type:Object,default:function(){return{severity:`secondary`,text:!0,rounded:!0}}},_instance:null},style:LT,provide:function(){return{$pcDialog:this,$parentInstance:this}}},inheritAttrs:!1,emits:[`update:visible`,`show`,`hide`,`after-hide`,`maximize`,`unmaximize`,`dragstart`,`dragend`],provide:function(){var e=this;return{dialogRef:De(function(){return e._instance})}},data:function(){return{containerVisible:this.visible,maximized:!1,focusableMax:null,focusableClose:null,target:null}},documentKeydownListener:null,container:null,mask:null,content:null,headerContainer:null,footerContainer:null,maximizableButton:null,closeButton:null,styleElement:null,dragging:null,documentDragListener:null,documentDragEndListener:null,lastPageX:null,lastPageY:null,maskMouseDownTarget:null,updated:function(){this.visible&&(this.containerVisible=this.visible)},beforeUnmount:function(){this.unbindDocumentState(),this.unbindGlobalListeners(),this.destroyStyle(),this.mask&&this.autoZIndex&&mi.clear(this.mask),this.container=null,this.mask=null},mounted:function(){this.breakpoints&&this.createStyle()},methods:{close:function(){this.$emit(`update:visible`,!1)},onEnter:function(){this.$emit(`show`),this.target=document.activeElement,this.enableDocumentSettings(),this.bindGlobalListeners(),this.autoZIndex&&mi.set(`modal`,this.mask,this.baseZIndex+this.$primevue.config.zIndex.modal)},onAfterEnter:function(){this.focus()},onBeforeLeave:function(){this.modal&&!this.isUnstyled&&jn(this.mask,`p-overlay-mask-leave-active`),this.dragging&&this.documentDragEndListener&&this.documentDragEndListener()},onLeave:function(){this.$emit(`hide`),ir(this.target),this.target=null,this.focusableClose=null,this.focusableMax=null},onAfterLeave:function(){this.autoZIndex&&mi.clear(this.mask),this.containerVisible=!1,this.unbindDocumentState(),this.unbindGlobalListeners(),this.$emit(`after-hide`)},onMaskMouseDown:function(e){this.maskMouseDownTarget=e.target},onMaskMouseUp:function(){this.dismissableMask&&this.modal&&this.mask===this.maskMouseDownTarget&&this.close()},focus:function(){var e=function(e){return e&&e.querySelector(`[autofocus]`)},t=this.$slots.footer&&e(this.footerContainer);t||(t=this.$slots.header&&e(this.headerContainer),t||(t=this.$slots.default&&e(this.content),t||(this.maximizable?(this.focusableMax=!0,t=this.maximizableButton):(this.focusableClose=!0,t=this.closeButton)))),t&&ir(t,{focusVisible:!0})},maximize:function(e){this.maximized?(this.maximized=!1,this.$emit(`unmaximize`,e)):(this.maximized=!0,this.$emit(`maximize`,e)),this.modal||(this.maximized?FT():IT())},enableDocumentSettings:function(){(this.modal||!this.modal&&this.blockScroll||this.maximizable&&this.maximized)&&FT()},unbindDocumentState:function(){(this.modal||!this.modal&&this.blockScroll||this.maximizable&&this.maximized)&&IT()},onKeyDown:function(e){e.code===`Escape`&&this.closeOnEscape&&this.close()},bindDocumentKeyDownListener:function(){this.documentKeydownListener||(this.documentKeydownListener=this.onKeyDown.bind(this),window.document.addEventListener(`keydown`,this.documentKeydownListener))},unbindDocumentKeyDownListener:function(){this.documentKeydownListener&&=(window.document.removeEventListener(`keydown`,this.documentKeydownListener),null)},containerRef:function(e){this.container=e},maskRef:function(e){this.mask=e},contentRef:function(e){this.content=e},headerContainerRef:function(e){this.headerContainer=e},footerContainerRef:function(e){this.footerContainer=e},maximizableRef:function(e){this.maximizableButton=e?e.$el:void 0},closeButtonRef:function(e){this.closeButton=e?e.$el:void 0},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){var e;this.styleElement=document.createElement(`style`),this.styleElement.type=`text/css`,Or(this.styleElement,`nonce`,(e=this.$primevue)==null||(e=e.config)==null||(e=e.csp)==null?void 0:e.nonce),document.head.appendChild(this.styleElement);var t=``;for(var n in this.breakpoints)t+=`
|
|
1209
|
+
@media screen and (max-width: ${n}) {
|
|
1210
|
+
.p-dialog[${this.$attrSelector}] {
|
|
1211
|
+
width: ${this.breakpoints[n]} !important;
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
1214
|
+
`;this.styleElement.innerHTML=t}},destroyStyle:function(){this.styleElement&&=(document.head.removeChild(this.styleElement),null)},initDrag:function(e){e.target.closest(`div`).getAttribute(`data-pc-section`)!==`headeractions`&&this.draggable&&(this.dragging=!0,this.lastPageX=e.pageX,this.lastPageY=e.pageY,this.container.style.margin=`0`,document.body.setAttribute(`data-p-unselectable-text`,`true`),!this.isUnstyled&&Kn(document.body,{"user-select":`none`}),this.$emit(`dragstart`,e))},bindGlobalListeners:function(){this.draggable&&(this.bindDocumentDragListener(),this.bindDocumentDragEndListener()),this.closeOnEscape&&this.bindDocumentKeyDownListener()},unbindGlobalListeners:function(){this.unbindDocumentDragListener(),this.unbindDocumentDragEndListener(),this.unbindDocumentKeyDownListener()},bindDocumentDragListener:function(){var e=this;this.documentDragListener=function(t){if(e.dragging){var n=qn(e.container),r=hr(e.container),i=t.pageX-e.lastPageX,a=t.pageY-e.lastPageY,o=e.container.getBoundingClientRect(),s=o.left+i,c=o.top+a,l=Bn(),u=getComputedStyle(e.container),d=parseFloat(u.marginLeft),f=parseFloat(u.marginTop);e.container.style.position=`fixed`,e.keepInViewport?(s>=e.minX&&s+n<l.width&&(e.lastPageX=t.pageX,e.container.style.left=s-d+`px`),c>=e.minY&&c+r<l.height&&(e.lastPageY=t.pageY,e.container.style.top=c-f+`px`)):(e.lastPageX=t.pageX,e.container.style.left=s-d+`px`,e.lastPageY=t.pageY,e.container.style.top=c-f+`px`)}},window.document.addEventListener(`mousemove`,this.documentDragListener)},unbindDocumentDragListener:function(){this.documentDragListener&&=(window.document.removeEventListener(`mousemove`,this.documentDragListener),null)},bindDocumentDragEndListener:function(){var e=this;this.documentDragEndListener=function(t){e.dragging&&(e.dragging=!1,document.body.removeAttribute(`data-p-unselectable-text`),!e.isUnstyled&&(document.body.style[`user-select`]=``),e.$emit(`dragend`,t))},window.document.addEventListener(`mouseup`,this.documentDragEndListener)},unbindDocumentDragEndListener:function(){this.documentDragEndListener&&=(window.document.removeEventListener(`mouseup`,this.documentDragEndListener),null)}},computed:{maximizeIconComponent:function(){return this.maximized?this.minimizeIcon?`span`:`WindowMinimizeIcon`:this.maximizeIcon?`span`:`WindowMaximizeIcon`},ariaLabelledById:function(){return this.header!=null||this.$attrs[`aria-labelledby`]!==null?this.$id+`_header`:null},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0},dataP:function(){return kn({maximized:this.maximized,modal:this.modal})}},directives:{ripple:GC,focustrap:MT},components:{Button:rw,Portal:NT,WindowMinimizeIcon:gT,WindowMaximizeIcon:cT,TimesIcon:eT}};function zT(e){"@babel/helpers - typeof";return zT=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},zT(e)}function BT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function VT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?BT(Object(n),!0).forEach(function(t){HT(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function HT(e,t,n){return(t=UT(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function UT(e){var t=WT(e,`string`);return zT(t)==`symbol`?t:t+``}function WT(e,t){if(zT(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(zT(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var GT=[`data-p`],KT=[`aria-labelledby`,`aria-modal`,`data-p`],qT=[`id`],JT=[`data-p`];function YT(e,t,n,r,a,o){var s=_(`Button`),l=_(`Portal`),u=w(`focustrap`);return v(),he(l,{appendTo:e.appendTo},{default:Fe(function(){return[a.containerVisible?(v(),k(`div`,E({key:0,ref:o.maskRef,class:e.cx(`mask`),style:e.sx(`mask`,!0,{position:e.position,modal:e.modal}),onMousedown:t[1]||=function(){return o.onMaskMouseDown&&o.onMaskMouseDown.apply(o,arguments)},onMouseup:t[2]||=function(){return o.onMaskMouseUp&&o.onMaskMouseUp.apply(o,arguments)},"data-p":o.dataP},e.ptm(`mask`)),[Ue(mt,E({name:`p-dialog`,onEnter:o.onEnter,onAfterEnter:o.onAfterEnter,onBeforeLeave:o.onBeforeLeave,onLeave:o.onLeave,onAfterLeave:o.onAfterLeave,appear:``},e.ptm(`transition`)),{default:Fe(function(){return[e.visible?h((v(),k(`div`,E({key:0,ref:o.containerRef,class:e.cx(`root`),style:e.sx(`root`),role:`dialog`,"aria-labelledby":o.ariaLabelledById,"aria-modal":e.modal,"data-p":o.dataP},e.ptmi(`root`)),[e.$slots.container?m(e.$slots,`container`,{key:0,closeCallback:o.close,maximizeCallback:function(e){return o.maximize(e)},initDragCallback:o.initDrag}):(v(),k(Se,{key:1},[e.showHeader?(v(),k(`div`,E({key:0,ref:o.headerContainerRef,class:e.cx(`header`),onMousedown:t[0]||=function(){return o.initDrag&&o.initDrag.apply(o,arguments)}},e.ptm(`header`)),[m(e.$slots,`header`,{class:c(e.cx(`title`))},function(){return[e.header?(v(),k(`span`,E({key:0,id:o.ariaLabelledById,class:e.cx(`title`)},e.ptm(`title`)),i(e.header),17,qT)):_e(``,!0)]}),A(`div`,E({class:e.cx(`headerActions`)},e.ptm(`headerActions`)),[e.maximizable?m(e.$slots,`maximizebutton`,{key:0,maximized:a.maximized,maximizeCallback:function(e){return o.maximize(e)}},function(){return[Ue(s,E({ref:o.maximizableRef,autofocus:a.focusableMax,class:e.cx(`pcMaximizeButton`),onClick:o.maximize,tabindex:e.maximizable?`0`:`-1`,unstyled:e.unstyled},e.maximizeButtonProps,{pt:e.ptm(`pcMaximizeButton`),"data-pc-group-section":`headericon`}),{icon:Fe(function(t){return[m(e.$slots,`maximizeicon`,{maximized:a.maximized},function(){return[(v(),he(Ze(o.maximizeIconComponent),E({class:[t.class,a.maximized?e.minimizeIcon:e.maximizeIcon]},e.ptm(`pcMaximizeButton`).icon),null,16,[`class`]))]})]}),_:3},16,[`autofocus`,`class`,`onClick`,`tabindex`,`unstyled`,`pt`])]}):_e(``,!0),e.closable?m(e.$slots,`closebutton`,{key:1,closeCallback:o.close},function(){return[Ue(s,E({ref:o.closeButtonRef,autofocus:a.focusableClose,class:e.cx(`pcCloseButton`),onClick:o.close,"aria-label":o.closeAriaLabel,unstyled:e.unstyled},e.closeButtonProps,{pt:e.ptm(`pcCloseButton`),"data-pc-group-section":`headericon`}),{icon:Fe(function(t){return[m(e.$slots,`closeicon`,{},function(){return[(v(),he(Ze(e.closeIcon?`span`:`TimesIcon`),E({class:[e.closeIcon,t.class]},e.ptm(`pcCloseButton`).icon),null,16,[`class`]))]})]}),_:3},16,[`autofocus`,`class`,`onClick`,`aria-label`,`unstyled`,`pt`])]}):_e(``,!0)],16)],16)):_e(``,!0),A(`div`,E({ref:o.contentRef,class:[e.cx(`content`),e.contentClass],style:e.contentStyle,"data-p":o.dataP},VT(VT({},e.contentProps),e.ptm(`content`))),[m(e.$slots,`default`)],16,JT),e.footer||e.$slots.footer?(v(),k(`div`,E({key:1,ref:o.footerContainerRef,class:e.cx(`footer`)},e.ptm(`footer`)),[m(e.$slots,`footer`,{},function(){return[se(i(e.footer),1)]})],16)):_e(``,!0)],64))],16,KT)),[[u,{disabled:!e.modal}]]):_e(``,!0)]}),_:3},16,[`onEnter`,`onAfterEnter`,`onBeforeLeave`,`onLeave`,`onAfterLeave`])],16,GT)):_e(``,!0)]}),_:3},8,[`appendTo`])}RT.render=YT;var XT={STARTS_WITH:`startsWith`,CONTAINS:`contains`,NOT_CONTAINS:`notContains`,ENDS_WITH:`endsWith`,EQUALS:`equals`,NOT_EQUALS:`notEquals`,IN:`in`,LESS_THAN:`lt`,LESS_THAN_OR_EQUAL_TO:`lte`,GREATER_THAN:`gt`,GREATER_THAN_OR_EQUAL_TO:`gte`,BETWEEN:`between`,DATE_IS:`dateIs`,DATE_IS_NOT:`dateIsNot`,DATE_BEFORE:`dateBefore`,DATE_AFTER:`dateAfter`},ZT={AND:`and`,OR:`or`};function QT(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=$T(e))||t){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
1215
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function $T(e,t){if(e){if(typeof e==`string`)return eE(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?eE(e,t):void 0}}function eE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var tE={filter:function(e,t,n,r,i){var a=[];if(!e)return a;var o=QT(e),s;try{for(o.s();!(s=o.n()).done;){var c=s.value;if(typeof c==`string`){if(this.filters[r](c,n,i)){a.push(c);continue}}else{var l=QT(t),u;try{for(l.s();!(u=l.n()).done;){var d=u.value,f=Vr(c,d);if(this.filters[r](f,n,i)){a.push(c);break}}}catch(e){l.e(e)}finally{l.f()}}}}catch(e){o.e(e)}finally{o.f()}return a},filters:{startsWith:function(e,t,n){if(t==null||t===``)return!0;if(e==null)return!1;var r=oi(t.toString()).toLocaleLowerCase(n);return oi(e.toString()).toLocaleLowerCase(n).slice(0,r.length)===r},contains:function(e,t,n){if(t==null||t===``)return!0;if(e==null)return!1;var r=oi(t.toString()).toLocaleLowerCase(n);return oi(e.toString()).toLocaleLowerCase(n).indexOf(r)!==-1},notContains:function(e,t,n){if(t==null||t===``)return!0;if(e==null)return!1;var r=oi(t.toString()).toLocaleLowerCase(n);return oi(e.toString()).toLocaleLowerCase(n).indexOf(r)===-1},endsWith:function(e,t,n){if(t==null||t===``)return!0;if(e==null)return!1;var r=oi(t.toString()).toLocaleLowerCase(n),i=oi(e.toString()).toLocaleLowerCase(n);return i.indexOf(r,i.length-r.length)!==-1},equals:function(e,t,n){return t==null||t===``?!0:e==null?!1:e.getTime&&t.getTime?e.getTime()===t.getTime():oi(e.toString()).toLocaleLowerCase(n)==oi(t.toString()).toLocaleLowerCase(n)},notEquals:function(e,t,n){return t==null||t===``?!1:e==null?!0:e.getTime&&t.getTime?e.getTime()!==t.getTime():oi(e.toString()).toLocaleLowerCase(n)!=oi(t.toString()).toLocaleLowerCase(n)},in:function(e,t){if(t==null||t.length===0)return!0;for(var n=0;n<t.length;n++)if(Hr(e,t[n]))return!0;return!1},between:function(e,t){return t==null||t[0]==null||t[1]==null?!0:e==null?!1:e.getTime?t[0].getTime()<=e.getTime()&&e.getTime()<=t[1].getTime():t[0]<=e&&e<=t[1]},lt:function(e,t){return t==null?!0:e==null?!1:e.getTime&&t.getTime?e.getTime()<t.getTime():e<t},lte:function(e,t){return t==null?!0:e==null?!1:e.getTime&&t.getTime?e.getTime()<=t.getTime():e<=t},gt:function(e,t){return t==null?!0:e==null?!1:e.getTime&&t.getTime?e.getTime()>t.getTime():e>t},gte:function(e,t){return t==null?!0:e==null?!1:e.getTime&&t.getTime?e.getTime()>=t.getTime():e>=t},dateIs:function(e,t){return t==null?!0:e==null?!1:e.toDateString()===t.toDateString()},dateIsNot:function(e,t){return t==null?!0:e==null?!1:e.toDateString()!==t.toDateString()},dateBefore:function(e,t){return t==null?!0:e==null?!1:e.getTime()<t.getTime()},dateAfter:function(e,t){return t==null?!0:e==null?!1:e.getTime()>t.getTime()}},register:function(e,t){this.filters[e]=t}},nE={name:`BlankIcon`,extends:rC};function rE(e){return sE(e)||oE(e)||aE(e)||iE()}function iE(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1216
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aE(e,t){if(e){if(typeof e==`string`)return cE(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cE(e,t):void 0}}function oE(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function sE(e){if(Array.isArray(e))return cE(e)}function cE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function lE(e,t,n,r,i,a){return v(),k(`svg`,E({width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e.pti()),rE(t[0]||=[A(`rect`,{width:`1`,height:`1`,fill:`currentColor`,"fill-opacity":`0`},null,-1)]),16)}nE.render=lE;var uE={name:`CheckIcon`,extends:rC};function dE(e){return hE(e)||mE(e)||pE(e)||fE()}function fE(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1217
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pE(e,t){if(e){if(typeof e==`string`)return gE(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gE(e,t):void 0}}function mE(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function hE(e){if(Array.isArray(e))return gE(e)}function gE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _E(e,t,n,r,i,a){return v(),k(`svg`,E({width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e.pti()),dE(t[0]||=[A(`path`,{d:`M4.86199 11.5948C4.78717 11.5923 4.71366 11.5745 4.64596 11.5426C4.57826 11.5107 4.51779 11.4652 4.46827 11.4091L0.753985 7.69483C0.683167 7.64891 0.623706 7.58751 0.580092 7.51525C0.536478 7.44299 0.509851 7.36177 0.502221 7.27771C0.49459 7.19366 0.506156 7.10897 0.536046 7.03004C0.565935 6.95111 0.613367 6.88 0.674759 6.82208C0.736151 6.76416 0.8099 6.72095 0.890436 6.69571C0.970973 6.67046 1.05619 6.66385 1.13966 6.67635C1.22313 6.68886 1.30266 6.72017 1.37226 6.76792C1.44186 6.81567 1.4997 6.8786 1.54141 6.95197L4.86199 10.2503L12.6397 2.49483C12.7444 2.42694 12.8689 2.39617 12.9932 2.40745C13.1174 2.41873 13.2343 2.47141 13.3251 2.55705C13.4159 2.64268 13.4753 2.75632 13.4938 2.87973C13.5123 3.00315 13.4888 3.1292 13.4271 3.23768L5.2557 11.4091C5.20618 11.4652 5.14571 11.5107 5.07801 11.5426C5.01031 11.5745 4.9368 11.5923 4.86199 11.5948Z`,fill:`currentColor`},null,-1)]),16)}uE.render=_E;var vE={name:`ChevronDownIcon`,extends:rC};function yE(e){return CE(e)||SE(e)||xE(e)||bE()}function bE(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1218
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xE(e,t){if(e){if(typeof e==`string`)return wE(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wE(e,t):void 0}}function SE(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function CE(e){if(Array.isArray(e))return wE(e)}function wE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function TE(e,t,n,r,i,a){return v(),k(`svg`,E({width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e.pti()),yE(t[0]||=[A(`path`,{d:`M7.01744 10.398C6.91269 10.3985 6.8089 10.378 6.71215 10.3379C6.61541 10.2977 6.52766 10.2386 6.45405 10.1641L1.13907 4.84913C1.03306 4.69404 0.985221 4.5065 1.00399 4.31958C1.02276 4.13266 1.10693 3.95838 1.24166 3.82747C1.37639 3.69655 1.55301 3.61742 1.74039 3.60402C1.92777 3.59062 2.11386 3.64382 2.26584 3.75424L7.01744 8.47394L11.769 3.75424C11.9189 3.65709 12.097 3.61306 12.2748 3.62921C12.4527 3.64535 12.6199 3.72073 12.7498 3.84328C12.8797 3.96582 12.9647 4.12842 12.9912 4.30502C13.0177 4.48162 12.9841 4.662 12.8958 4.81724L7.58083 10.1322C7.50996 10.2125 7.42344 10.2775 7.32656 10.3232C7.22968 10.3689 7.12449 10.3944 7.01744 10.398Z`,fill:`currentColor`},null,-1)]),16)}vE.render=TE;var EE={name:`SearchIcon`,extends:rC};function DE(e){return jE(e)||AE(e)||kE(e)||OE()}function OE(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1219
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kE(e,t){if(e){if(typeof e==`string`)return ME(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ME(e,t):void 0}}function AE(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function jE(e){if(Array.isArray(e))return ME(e)}function ME(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function NE(e,t,n,r,i,a){return v(),k(`svg`,E({width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e.pti()),DE(t[0]||=[A(`path`,{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M2.67602 11.0265C3.6661 11.688 4.83011 12.0411 6.02086 12.0411C6.81149 12.0411 7.59438 11.8854 8.32483 11.5828C8.87005 11.357 9.37808 11.0526 9.83317 10.6803L12.9769 13.8241C13.0323 13.8801 13.0983 13.9245 13.171 13.9548C13.2438 13.985 13.3219 14.0003 13.4007 14C13.4795 14.0003 13.5575 13.985 13.6303 13.9548C13.7031 13.9245 13.7691 13.8801 13.8244 13.8241C13.9367 13.7116 13.9998 13.5592 13.9998 13.4003C13.9998 13.2414 13.9367 13.089 13.8244 12.9765L10.6807 9.8328C11.053 9.37773 11.3573 8.86972 11.5831 8.32452C11.8857 7.59408 12.0414 6.81119 12.0414 6.02056C12.0414 4.8298 11.6883 3.66579 11.0268 2.67572C10.3652 1.68564 9.42494 0.913972 8.32483 0.45829C7.22472 0.00260857 6.01418 -0.116618 4.84631 0.115686C3.67844 0.34799 2.60568 0.921393 1.76369 1.76338C0.921698 2.60537 0.348296 3.67813 0.115991 4.84601C-0.116313 6.01388 0.00291375 7.22441 0.458595 8.32452C0.914277 9.42464 1.68595 10.3649 2.67602 11.0265ZM3.35565 2.0158C4.14456 1.48867 5.07206 1.20731 6.02086 1.20731C7.29317 1.20731 8.51338 1.71274 9.41304 2.6124C10.3127 3.51206 10.8181 4.73226 10.8181 6.00457C10.8181 6.95337 10.5368 7.88088 10.0096 8.66978C9.48251 9.45868 8.73328 10.0736 7.85669 10.4367C6.98011 10.7997 6.01554 10.8947 5.08496 10.7096C4.15439 10.5245 3.2996 10.0676 2.62869 9.39674C1.95778 8.72583 1.50089 7.87104 1.31579 6.94046C1.13068 6.00989 1.22568 5.04532 1.58878 4.16874C1.95187 3.29215 2.56675 2.54292 3.35565 2.0158Z`,fill:`currentColor`},null,-1)]),16)}EE.render=NE;var PE={name:`IconField`,extends:{name:`BaseIconField`,extends:Ia,style:ba.extend({name:`iconfield`,style:`
|
|
1220
|
+
.p-iconfield {
|
|
1221
|
+
position: relative;
|
|
1222
|
+
display: block;
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1225
|
+
.p-inputicon {
|
|
1226
|
+
position: absolute;
|
|
1227
|
+
top: 50%;
|
|
1228
|
+
margin-top: calc(-1 * (dt('icon.size') / 2));
|
|
1229
|
+
color: dt('iconfield.icon.color');
|
|
1230
|
+
line-height: 1;
|
|
1231
|
+
z-index: 1;
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
.p-iconfield .p-inputicon:first-child {
|
|
1235
|
+
inset-inline-start: dt('form.field.padding.x');
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
.p-iconfield .p-inputicon:last-child {
|
|
1239
|
+
inset-inline-end: dt('form.field.padding.x');
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
.p-iconfield .p-inputtext:not(:first-child),
|
|
1243
|
+
.p-iconfield .p-inputwrapper:not(:first-child) .p-inputtext {
|
|
1244
|
+
padding-inline-start: calc((dt('form.field.padding.x') * 2) + dt('icon.size'));
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
.p-iconfield .p-inputtext:not(:last-child) {
|
|
1248
|
+
padding-inline-end: calc((dt('form.field.padding.x') * 2) + dt('icon.size'));
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
.p-iconfield:has(.p-inputfield-sm) .p-inputicon {
|
|
1252
|
+
font-size: dt('form.field.sm.font.size');
|
|
1253
|
+
width: dt('form.field.sm.font.size');
|
|
1254
|
+
height: dt('form.field.sm.font.size');
|
|
1255
|
+
margin-top: calc(-1 * (dt('form.field.sm.font.size') / 2));
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
.p-iconfield:has(.p-inputfield-lg) .p-inputicon {
|
|
1259
|
+
font-size: dt('form.field.lg.font.size');
|
|
1260
|
+
width: dt('form.field.lg.font.size');
|
|
1261
|
+
height: dt('form.field.lg.font.size');
|
|
1262
|
+
margin-top: calc(-1 * (dt('form.field.lg.font.size') / 2));
|
|
1263
|
+
}
|
|
1264
|
+
`,classes:{root:`p-iconfield`}}),provide:function(){return{$pcIconField:this,$parentInstance:this}}},inheritAttrs:!1};function FE(e,t,n,r,i,a){return v(),k(`div`,E({class:e.cx(`root`)},e.ptmi(`root`)),[m(e.$slots,`default`)],16)}PE.render=FE;var IE={name:`InputIcon`,extends:{name:`BaseInputIcon`,extends:Ia,style:ba.extend({name:`inputicon`,classes:{root:`p-inputicon`}}),props:{class:null},provide:function(){return{$pcInputIcon:this,$parentInstance:this}}},inheritAttrs:!1,computed:{containerClass:function(){return[this.cx(`root`),this.class]}}};function LE(e,t,n,r,i,a){return v(),k(`span`,E({class:a.containerClass},e.ptmi(`root`),{"aria-hidden":`true`}),[m(e.$slots,`default`)],16)}IE.render=LE;var RE={name:`BaseEditableHolder`,extends:Ia,emits:[`update:modelValue`,`value-change`],props:{modelValue:{type:null,default:void 0},defaultValue:{type:null,default:void 0},name:{type:String,default:void 0},invalid:{type:Boolean,default:void 0},disabled:{type:Boolean,default:!1},formControl:{type:Object,default:void 0}},inject:{$parentInstance:{default:void 0},$pcForm:{default:void 0},$pcFormField:{default:void 0}},data:function(){return{d_value:this.defaultValue===void 0?this.modelValue:this.defaultValue}},watch:{modelValue:{deep:!0,handler:function(e){this.d_value=e}},defaultValue:function(e){this.d_value=e},$formName:{immediate:!0,handler:function(e){var t,n;this.formField=((t=this.$pcForm)==null||(n=t.register)==null?void 0:n.call(t,e,this.$formControl))||{}}},$formControl:{immediate:!0,handler:function(e){var t,n;this.formField=((t=this.$pcForm)==null||(n=t.register)==null?void 0:n.call(t,this.$formName,e))||{}}},$formDefaultValue:{immediate:!0,handler:function(e){this.d_value!==e&&(this.d_value=e)}},$formValue:{immediate:!1,handler:function(e){var t;(t=this.$pcForm)!=null&&t.getFieldState(this.$formName)&&e!==this.d_value&&(this.d_value=e)}}},formField:{},methods:{writeValue:function(e,t){var n,r;this.controlled&&(this.d_value=e,this.$emit(`update:modelValue`,e)),this.$emit(`value-change`,e),(n=(r=this.formField).onChange)==null||n.call(r,{originalEvent:t,value:e})},findNonEmpty:function(){return[...arguments].find(j)}},computed:{$filled:function(){return j(this.d_value)},$invalid:function(){var e,t;return!this.$formNovalidate&&this.findNonEmpty(this.invalid,(e=this.$pcFormField)==null||(e=e.$field)==null?void 0:e.invalid,(t=this.$pcForm)==null||(t=t.getFieldState(this.$formName))==null?void 0:t.invalid)},$formName:function(){return this.$formNovalidate?void 0:this.name||this.$formControl?.name},$formControl:function(){return this.formControl||this.$pcFormField?.formControl},$formNovalidate:function(){return this.$formControl?.novalidate},$formDefaultValue:function(){var e;return this.findNonEmpty(this.d_value,this.$pcFormField?.initialValue,(e=this.$pcForm)==null||(e=e.initialValues)==null?void 0:e[this.$formName])},$formValue:function(){var e,t;return this.findNonEmpty((e=this.$pcFormField)==null||(e=e.$field)==null?void 0:e.value,(t=this.$pcForm)==null||(t=t.getFieldState(this.$formName))==null?void 0:t.value)},controlled:function(){return this.$inProps.hasOwnProperty(`modelValue`)||!this.$inProps.hasOwnProperty(`modelValue`)&&!this.$inProps.hasOwnProperty(`defaultValue`)},filled:function(){return this.$filled}}},zE={name:`BaseInput`,extends:RE,props:{size:{type:String,default:null},fluid:{type:Boolean,default:null},variant:{type:String,default:null}},inject:{$parentInstance:{default:void 0},$pcFluid:{default:void 0}},computed:{$variant:function(){return this.variant??(this.$primevue.config.inputStyle||this.$primevue.config.inputVariant)},$fluid:function(){return this.fluid??!!this.$pcFluid},hasFluid:function(){return this.$fluid}}},BE={name:`BaseInputText`,extends:zE,style:ba.extend({name:`inputtext`,style:`
|
|
1265
|
+
.p-inputtext {
|
|
1266
|
+
font-family: inherit;
|
|
1267
|
+
font-feature-settings: inherit;
|
|
1268
|
+
font-size: 1rem;
|
|
1269
|
+
color: dt('inputtext.color');
|
|
1270
|
+
background: dt('inputtext.background');
|
|
1271
|
+
padding-block: dt('inputtext.padding.y');
|
|
1272
|
+
padding-inline: dt('inputtext.padding.x');
|
|
1273
|
+
border: 1px solid dt('inputtext.border.color');
|
|
1274
|
+
transition:
|
|
1275
|
+
background dt('inputtext.transition.duration'),
|
|
1276
|
+
color dt('inputtext.transition.duration'),
|
|
1277
|
+
border-color dt('inputtext.transition.duration'),
|
|
1278
|
+
outline-color dt('inputtext.transition.duration'),
|
|
1279
|
+
box-shadow dt('inputtext.transition.duration');
|
|
1280
|
+
appearance: none;
|
|
1281
|
+
border-radius: dt('inputtext.border.radius');
|
|
1282
|
+
outline-color: transparent;
|
|
1283
|
+
box-shadow: dt('inputtext.shadow');
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
.p-inputtext:enabled:hover {
|
|
1287
|
+
border-color: dt('inputtext.hover.border.color');
|
|
1288
|
+
}
|
|
1289
|
+
|
|
1290
|
+
.p-inputtext:enabled:focus {
|
|
1291
|
+
border-color: dt('inputtext.focus.border.color');
|
|
1292
|
+
box-shadow: dt('inputtext.focus.ring.shadow');
|
|
1293
|
+
outline: dt('inputtext.focus.ring.width') dt('inputtext.focus.ring.style') dt('inputtext.focus.ring.color');
|
|
1294
|
+
outline-offset: dt('inputtext.focus.ring.offset');
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
.p-inputtext.p-invalid {
|
|
1298
|
+
border-color: dt('inputtext.invalid.border.color');
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
.p-inputtext.p-variant-filled {
|
|
1302
|
+
background: dt('inputtext.filled.background');
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
.p-inputtext.p-variant-filled:enabled:hover {
|
|
1306
|
+
background: dt('inputtext.filled.hover.background');
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1309
|
+
.p-inputtext.p-variant-filled:enabled:focus {
|
|
1310
|
+
background: dt('inputtext.filled.focus.background');
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
.p-inputtext:disabled {
|
|
1314
|
+
opacity: 1;
|
|
1315
|
+
background: dt('inputtext.disabled.background');
|
|
1316
|
+
color: dt('inputtext.disabled.color');
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1319
|
+
.p-inputtext::placeholder {
|
|
1320
|
+
color: dt('inputtext.placeholder.color');
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
.p-inputtext.p-invalid::placeholder {
|
|
1324
|
+
color: dt('inputtext.invalid.placeholder.color');
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1327
|
+
.p-inputtext-sm {
|
|
1328
|
+
font-size: dt('inputtext.sm.font.size');
|
|
1329
|
+
padding-block: dt('inputtext.sm.padding.y');
|
|
1330
|
+
padding-inline: dt('inputtext.sm.padding.x');
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
.p-inputtext-lg {
|
|
1334
|
+
font-size: dt('inputtext.lg.font.size');
|
|
1335
|
+
padding-block: dt('inputtext.lg.padding.y');
|
|
1336
|
+
padding-inline: dt('inputtext.lg.padding.x');
|
|
1337
|
+
}
|
|
1338
|
+
|
|
1339
|
+
.p-inputtext-fluid {
|
|
1340
|
+
width: 100%;
|
|
1341
|
+
}
|
|
1342
|
+
`,classes:{root:function(e){var t=e.instance,n=e.props;return[`p-inputtext p-component`,{"p-filled":t.$filled,"p-inputtext-sm p-inputfield-sm":n.size===`small`,"p-inputtext-lg p-inputfield-lg":n.size===`large`,"p-invalid":t.$invalid,"p-variant-filled":t.$variant===`filled`,"p-inputtext-fluid":t.$fluid}]}}}),provide:function(){return{$pcInputText:this,$parentInstance:this}}};function VE(e){"@babel/helpers - typeof";return VE=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},VE(e)}function HE(e,t,n){return(t=UE(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function UE(e){var t=WE(e,`string`);return VE(t)==`symbol`?t:t+``}function WE(e,t){if(VE(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(VE(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var GE={name:`InputText`,extends:BE,inheritAttrs:!1,methods:{onInput:function(e){this.writeValue(e.target.value,e)}},computed:{attrs:function(){return E(this.ptmi(`root`,{context:{filled:this.$filled,disabled:this.disabled}}),this.formField)},dataP:function(){return kn(HE({invalid:this.$invalid,fluid:this.$fluid,filled:this.$variant===`filled`},this.size,this.size))}}},KE=[`value`,`name`,`disabled`,`aria-invalid`,`data-p`];function qE(e,t,n,r,i,a){return v(),k(`input`,E({type:`text`,class:e.cx(`root`),value:e.d_value,name:e.name,disabled:e.disabled,"aria-invalid":e.$invalid||void 0,"data-p":a.dataP,onInput:t[0]||=function(){return a.onInput&&a.onInput.apply(a,arguments)}},a.attrs),null,16,KE)}GE.render=qE;var JE=kr(),YE=ba.extend({name:`virtualscroller`,css:`
|
|
1343
|
+
.p-virtualscroller {
|
|
1344
|
+
position: relative;
|
|
1345
|
+
overflow: auto;
|
|
1346
|
+
contain: strict;
|
|
1347
|
+
transform: translateZ(0);
|
|
1348
|
+
will-change: scroll-position;
|
|
1349
|
+
outline: 0 none;
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
.p-virtualscroller-content {
|
|
1353
|
+
position: absolute;
|
|
1354
|
+
top: 0;
|
|
1355
|
+
left: 0;
|
|
1356
|
+
min-height: 100%;
|
|
1357
|
+
min-width: 100%;
|
|
1358
|
+
will-change: transform;
|
|
1359
|
+
}
|
|
1360
|
+
|
|
1361
|
+
.p-virtualscroller-spacer {
|
|
1362
|
+
position: absolute;
|
|
1363
|
+
top: 0;
|
|
1364
|
+
left: 0;
|
|
1365
|
+
height: 1px;
|
|
1366
|
+
width: 1px;
|
|
1367
|
+
transform-origin: 0 0;
|
|
1368
|
+
pointer-events: none;
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
.p-virtualscroller-loader {
|
|
1372
|
+
position: sticky;
|
|
1373
|
+
top: 0;
|
|
1374
|
+
left: 0;
|
|
1375
|
+
width: 100%;
|
|
1376
|
+
height: 100%;
|
|
1377
|
+
}
|
|
1378
|
+
|
|
1379
|
+
.p-virtualscroller-loader-mask {
|
|
1380
|
+
display: flex;
|
|
1381
|
+
align-items: center;
|
|
1382
|
+
justify-content: center;
|
|
1383
|
+
}
|
|
1384
|
+
|
|
1385
|
+
.p-virtualscroller-horizontal > .p-virtualscroller-content {
|
|
1386
|
+
display: flex;
|
|
1387
|
+
}
|
|
1388
|
+
|
|
1389
|
+
.p-virtualscroller-inline .p-virtualscroller-content {
|
|
1390
|
+
position: static;
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1393
|
+
.p-virtualscroller .p-virtualscroller-loading {
|
|
1394
|
+
transform: none !important;
|
|
1395
|
+
min-height: 0;
|
|
1396
|
+
position: sticky;
|
|
1397
|
+
inset-block-start: 0;
|
|
1398
|
+
inset-inline-start: 0;
|
|
1399
|
+
}
|
|
1400
|
+
`,style:`
|
|
1401
|
+
.p-virtualscroller-loader {
|
|
1402
|
+
background: dt('virtualscroller.loader.mask.background');
|
|
1403
|
+
color: dt('virtualscroller.loader.mask.color');
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
.p-virtualscroller-loading-icon {
|
|
1407
|
+
font-size: dt('virtualscroller.loader.icon.size');
|
|
1408
|
+
width: dt('virtualscroller.loader.icon.size');
|
|
1409
|
+
height: dt('virtualscroller.loader.icon.size');
|
|
1410
|
+
}
|
|
1411
|
+
`}),XE={name:`BaseVirtualScroller`,extends:Ia,props:{id:{type:String,default:null},style:null,class:null,items:{type:Array,default:null},itemSize:{type:[Number,Array],default:0},scrollHeight:null,scrollWidth:null,orientation:{type:String,default:`vertical`},numToleratedItems:{type:Number,default:null},delay:{type:Number,default:0},resizeDelay:{type:Number,default:10},lazy:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loaderDisabled:{type:Boolean,default:!1},columns:{type:Array,default:null},loading:{type:Boolean,default:!1},showSpacer:{type:Boolean,default:!0},showLoader:{type:Boolean,default:!1},tabindex:{type:Number,default:0},inline:{type:Boolean,default:!1},step:{type:Number,default:0},appendOnly:{type:Boolean,default:!1},autoSize:{type:Boolean,default:!1}},style:YE,provide:function(){return{$pcVirtualScroller:this,$parentInstance:this}},beforeMount:function(){var e;YE.loadCSS({nonce:(e=this.$primevueConfig)==null||(e=e.csp)==null?void 0:e.nonce})}};function ZE(e){"@babel/helpers - typeof";return ZE=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},ZE(e)}function QE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function $E(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?QE(Object(n),!0).forEach(function(t){eD(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QE(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function eD(e,t,n){return(t=tD(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tD(e){var t=nD(e,`string`);return ZE(t)==`symbol`?t:t+``}function nD(e,t){if(ZE(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ZE(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var rD={name:`VirtualScroller`,extends:XE,inheritAttrs:!1,emits:[`update:numToleratedItems`,`scroll`,`scroll-index-change`,`lazy-load`],data:function(){var e=this.isBoth();return{first:e?{rows:0,cols:0}:0,last:e?{rows:0,cols:0}:0,page:e?{rows:0,cols:0}:0,numItemsInViewport:e?{rows:0,cols:0}:0,lastScrollPos:e?{top:0,left:0}:0,d_numToleratedItems:this.numToleratedItems,d_loading:this.loading,loaderArr:[],spacerStyle:{},contentStyle:{}}},element:null,content:null,lastScrollPos:null,scrollTimeout:null,resizeTimeout:null,defaultWidth:0,defaultHeight:0,defaultContentWidth:0,defaultContentHeight:0,isRangeChanged:!1,lazyLoadState:{},resizeListener:null,resizeObserver:null,initialized:!1,watch:{numToleratedItems:function(e){this.d_numToleratedItems=e},loading:function(e,t){this.lazy&&e!==t&&e!==this.d_loading&&(this.d_loading=e)},items:{handler:function(e,t){(!t||t.length!==(e||[]).length)&&(this.init(),this.calculateAutoSize())},deep:!0},itemSize:function(){this.init(),this.calculateAutoSize()},orientation:function(){this.lastScrollPos=this.isBoth()?{top:0,left:0}:0},scrollHeight:function(){this.init(),this.calculateAutoSize()},scrollWidth:function(){this.init(),this.calculateAutoSize()}},mounted:function(){this.viewInit(),this.lastScrollPos=this.isBoth()?{top:0,left:0}:0,this.lazyLoadState=this.lazyLoadState||{}},updated:function(){!this.initialized&&this.viewInit()},unmounted:function(){this.unbindResizeListener(),this.initialized=!1},methods:{viewInit:function(){Er(this.element)&&(this.setContentEl(this.content),this.init(),this.calculateAutoSize(),this.defaultWidth=br(this.element),this.defaultHeight=cr(this.element),this.defaultContentWidth=br(this.content),this.defaultContentHeight=cr(this.content),this.initialized=!0),this.element&&this.bindResizeListener()},init:function(){this.disabled||(this.setSize(),this.calculateOptions(),this.setSpacerSize())},isVertical:function(){return this.orientation===`vertical`},isHorizontal:function(){return this.orientation===`horizontal`},isBoth:function(){return this.orientation===`both`},scrollTo:function(e){this.element&&this.element.scrollTo(e)},scrollToIndex:function(e){var t=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`auto`,r=this.isBoth(),i=this.isHorizontal();if(r?e.every(function(e){return e>-1}):e>-1){var a=this.first,o=this.element,s=o.scrollTop,c=s===void 0?0:s,l=o.scrollLeft,u=l===void 0?0:l,d=this.calculateNumItems().numToleratedItems,f=this.getContentPosition(),p=this.itemSize,m=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return e<=(arguments.length>1?arguments[1]:void 0)?0:e},h=function(e,t,n){return e*t+n},g=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return t.scrollTo({left:e,top:r,behavior:n})},_=r?{rows:0,cols:0}:0,v=!1,y=!1;r?(_={rows:m(e[0],d[0]),cols:m(e[1],d[1])},g(h(_.cols,p[1],f.left),h(_.rows,p[0],f.top)),y=this.lastScrollPos.top!==c||this.lastScrollPos.left!==u,v=_.rows!==a.rows||_.cols!==a.cols):(_=m(e,d),i?g(h(_,p,f.left),c):g(u,h(_,p,f.top)),y=this.lastScrollPos!==(i?u:c),v=_!==a),this.isRangeChanged=v,y&&(this.first=_)}},scrollInView:function(e,t){var n=this,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:`auto`;if(t){var i=this.isBoth(),a=this.isHorizontal();if(i?e.every(function(e){return e>-1}):e>-1){var o=this.getRenderedRange(),s=o.first,c=o.viewport,l=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return n.scrollTo({left:e,top:t,behavior:r})},u=t===`to-start`,d=t===`to-end`;if(u){if(i)c.first.rows-s.rows>e[0]?l(c.first.cols*this.itemSize[1],(c.first.rows-1)*this.itemSize[0]):c.first.cols-s.cols>e[1]&&l((c.first.cols-1)*this.itemSize[1],c.first.rows*this.itemSize[0]);else if(c.first-s>e){var f=(c.first-1)*this.itemSize;a?l(f,0):l(0,f)}}else if(d){if(i)c.last.rows-s.rows<=e[0]+1?l(c.first.cols*this.itemSize[1],(c.first.rows+1)*this.itemSize[0]):c.last.cols-s.cols<=e[1]+1&&l((c.first.cols+1)*this.itemSize[1],c.first.rows*this.itemSize[0]);else if(c.last-s<=e+1){var p=(c.first+1)*this.itemSize;a?l(p,0):l(0,p)}}}}else this.scrollToIndex(e,r)},getRenderedRange:function(){var e=function(e,t){return Math.floor(e/(t||e))},t=this.first,n=0;if(this.element){var r=this.isBoth(),i=this.isHorizontal(),a=this.element,o=a.scrollTop,s=a.scrollLeft;r?(t={rows:e(o,this.itemSize[0]),cols:e(s,this.itemSize[1])},n={rows:t.rows+this.numItemsInViewport.rows,cols:t.cols+this.numItemsInViewport.cols}):(t=e(i?s:o,this.itemSize),n=t+this.numItemsInViewport)}return{first:this.first,last:this.last,viewport:{first:t,last:n}}},calculateNumItems:function(){var e=this.isBoth(),t=this.isHorizontal(),n=this.itemSize,r=this.getContentPosition(),i=this.element?this.element.offsetWidth-r.left:0,a=this.element?this.element.offsetHeight-r.top:0,o=function(e,t){return Math.ceil(e/(t||e))},s=function(e){return Math.ceil(e/2)},c=e?{rows:o(a,n[0]),cols:o(i,n[1])}:o(t?i:a,n);return{numItemsInViewport:c,numToleratedItems:this.d_numToleratedItems||(e?[s(c.rows),s(c.cols)]:s(c))}},calculateOptions:function(){var e=this,t=this.isBoth(),n=this.first,r=this.calculateNumItems(),i=r.numItemsInViewport,a=r.numToleratedItems,o=function(t,n,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return e.getLast(t+n+(t<r?2:3)*r,i)},s=t?{rows:o(n.rows,i.rows,a[0]),cols:o(n.cols,i.cols,a[1],!0)}:o(n,i,a);this.last=s,this.numItemsInViewport=i,this.d_numToleratedItems=a,this.$emit(`update:numToleratedItems`,this.d_numToleratedItems),this.showLoader&&(this.loaderArr=t?Array.from({length:i.rows}).map(function(){return Array.from({length:i.cols})}):Array.from({length:i})),this.lazy&&Promise.resolve().then(function(){e.lazyLoadState={first:e.step?t?{rows:0,cols:n.cols}:0:n,last:Math.min(e.step?e.step:s,e.items?.length||0)},e.$emit(`lazy-load`,e.lazyLoadState)})},calculateAutoSize:function(){var e=this;this.autoSize&&!this.d_loading&&Promise.resolve().then(function(){if(e.content){var t=e.isBoth(),n=e.isHorizontal(),r=e.isVertical();e.content.style.minHeight=e.content.style.minWidth=`auto`,e.content.style.position=`relative`,e.element.style.contain=`none`;var i=[br(e.element),cr(e.element)],a=i[0],o=i[1];(t||n)&&(e.element.style.width=a<e.defaultWidth?a+`px`:e.scrollWidth||e.defaultWidth+`px`),(t||r)&&(e.element.style.height=o<e.defaultHeight?o+`px`:e.scrollHeight||e.defaultHeight+`px`),e.content.style.minHeight=e.content.style.minWidth=``,e.content.style.position=``,e.element.style.contain=``}})},getLast:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return this.items?Math.min(t?(this.columns||this.items[0])?.length||0:this.items?.length||0,e):0},getContentPosition:function(){if(this.content){var e=getComputedStyle(this.content),t=parseFloat(e.paddingLeft)+Math.max(parseFloat(e.left)||0,0),n=parseFloat(e.paddingRight)+Math.max(parseFloat(e.right)||0,0),r=parseFloat(e.paddingTop)+Math.max(parseFloat(e.top)||0,0),i=parseFloat(e.paddingBottom)+Math.max(parseFloat(e.bottom)||0,0);return{left:t,right:n,top:r,bottom:i,x:t+n,y:r+i}}return{left:0,right:0,top:0,bottom:0,x:0,y:0}},setSize:function(){var e=this;if(this.element){var t=this.isBoth(),n=this.isHorizontal(),r=this.element.parentElement,i=this.scrollWidth||`${this.element.offsetWidth||r.offsetWidth}px`,a=this.scrollHeight||`${this.element.offsetHeight||r.offsetHeight}px`,o=function(t,n){return e.element.style[t]=n};t||n?(o(`height`,a),o(`width`,i)):o(`height`,a)}},setSpacerSize:function(){var e=this,t=this.items;if(t){var n=this.isBoth(),r=this.isHorizontal(),i=this.getContentPosition(),a=function(t,n,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return e.spacerStyle=$E($E({},e.spacerStyle),eD({},`${t}`,(n||[]).length*r+i+`px`))};n?(a(`height`,t,this.itemSize[0],i.y),a(`width`,this.columns||t[1],this.itemSize[1],i.x)):r?a(`width`,this.columns||t,this.itemSize,i.x):a(`height`,t,this.itemSize,i.y)}},setContentPosition:function(e){var t=this;if(this.content&&!this.appendOnly){var n=this.isBoth(),r=this.isHorizontal(),i=e?e.first:this.first,a=function(e,t){return e*t},o=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return t.contentStyle=$E($E({},t.contentStyle),{transform:`translate3d(${e}px, ${n}px, 0)`})};if(n)o(a(i.cols,this.itemSize[1]),a(i.rows,this.itemSize[0]));else{var s=a(i,this.itemSize);r?o(s,0):o(0,s)}}},onScrollPositionChange:function(e){var t=this,n=e.target,r=this.isBoth(),i=this.isHorizontal(),a=this.getContentPosition(),o=function(e,t){return e?e>t?e-t:e:0},s=function(e,t){return Math.floor(e/(t||e))},c=function(e,t,n,r,i,a){return e<=i?i:a?n-r-i:t+i-1},l=function(e,n,r,i,a,o,s,c){if(e<=o)return 0;var l=Math.max(0,s?e<n?r:e-o:e>n?r:e-2*o),u=t.getLast(l,c);return l>u?u-a:l},u=function(e,n,r,i,a,o){var s=n+i+2*a;return e>=a&&(s+=a+1),t.getLast(s,o)},d=o(n.scrollTop,a.top),f=o(n.scrollLeft,a.left),p=r?{rows:0,cols:0}:0,m=this.last,h=!1,g=this.lastScrollPos;if(r){var _=this.lastScrollPos.top<=d,v=this.lastScrollPos.left<=f;if(!this.appendOnly||this.appendOnly&&(_||v)){var y={rows:s(d,this.itemSize[0]),cols:s(f,this.itemSize[1])},b={rows:c(y.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],_),cols:c(y.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],v)};p={rows:l(y.rows,b.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],_),cols:l(y.cols,b.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],v,!0)},m={rows:u(y.rows,p.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0]),cols:u(y.cols,p.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],!0)},h=p.rows!==this.first.rows||m.rows!==this.last.rows||p.cols!==this.first.cols||m.cols!==this.last.cols||this.isRangeChanged,g={top:d,left:f}}}else{var x=i?f:d,S=this.lastScrollPos<=x;if(!this.appendOnly||this.appendOnly&&S){var C=s(x,this.itemSize);p=l(C,c(C,this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,S),this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,S),m=u(C,p,this.last,this.numItemsInViewport,this.d_numToleratedItems),h=p!==this.first||m!==this.last||this.isRangeChanged,g=x}}return{first:p,last:m,isRangeChanged:h,scrollPos:g}},onScrollChange:function(e){var t=this.onScrollPositionChange(e),n=t.first,r=t.last,i=t.isRangeChanged,a=t.scrollPos;if(i){var o={first:n,last:r};if(this.setContentPosition(o),this.first=n,this.last=r,this.lastScrollPos=a,this.$emit(`scroll-index-change`,o),this.lazy&&this.isPageChanged(n)){var s={first:this.step?Math.min(this.getPageByFirst(n)*this.step,(this.items?.length||0)-this.step):n,last:Math.min(this.step?(this.getPageByFirst(n)+1)*this.step:r,this.items?.length||0)};(this.lazyLoadState.first!==s.first||this.lazyLoadState.last!==s.last)&&this.$emit(`lazy-load`,s),this.lazyLoadState=s}}},onScroll:function(e){var t=this;this.$emit(`scroll`,e),this.delay?(this.scrollTimeout&&clearTimeout(this.scrollTimeout),this.isPageChanged()&&(!this.d_loading&&this.showLoader&&(this.onScrollPositionChange(e).isRangeChanged||this.step&&this.isPageChanged())&&(this.d_loading=!0),this.scrollTimeout=setTimeout(function(){t.onScrollChange(e),t.d_loading&&t.showLoader&&(!t.lazy||t.loading===void 0)&&(t.d_loading=!1,t.page=t.getPageByFirst())},this.delay))):this.onScrollChange(e)},onResize:function(){var e=this;this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(function(){if(Er(e.element)){var t=e.isBoth(),n=e.isVertical(),r=e.isHorizontal(),i=[br(e.element),cr(e.element)],a=i[0],o=i[1],s=a!==e.defaultWidth,c=o!==e.defaultHeight;(t?s||c:r?s:n&&c)&&(e.d_numToleratedItems=e.numToleratedItems,e.defaultWidth=a,e.defaultHeight=o,e.defaultContentWidth=br(e.content),e.defaultContentHeight=cr(e.content),e.init())}},this.resizeDelay)},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=this.onResize.bind(this),window.addEventListener(`resize`,this.resizeListener),window.addEventListener(`orientationchange`,this.resizeListener),this.resizeObserver=new ResizeObserver(function(){e.onResize()}),this.resizeObserver.observe(this.element))},unbindResizeListener:function(){this.resizeListener&&=(window.removeEventListener(`resize`,this.resizeListener),window.removeEventListener(`orientationchange`,this.resizeListener),null),this.resizeObserver&&=(this.resizeObserver.disconnect(),null)},getOptions:function(e){var t=(this.items||[]).length,n=this.isBoth()?this.first.rows+e:this.first+e;return{index:n,count:t,first:n===0,last:n===t-1,even:n%2==0,odd:n%2!=0}},getLoaderOptions:function(e,t){var n=this.loaderArr.length;return $E({index:e,count:n,first:e===0,last:e===n-1,even:e%2==0,odd:e%2!=0},t)},getPageByFirst:function(e){return Math.floor(((e??this.first)+this.d_numToleratedItems*4)/(this.step||1))},isPageChanged:function(e){return this.step&&!this.lazy?this.page!==this.getPageByFirst(e??this.first):!0},setContentEl:function(e){this.content=e||this.content||rr(this.element,`[data-pc-section="content"]`)},elementRef:function(e){this.element=e},contentRef:function(e){this.content=e}},computed:{containerClass:function(){return[`p-virtualscroller`,this.class,{"p-virtualscroller-inline":this.inline,"p-virtualscroller-both p-both-scroll":this.isBoth(),"p-virtualscroller-horizontal p-horizontal-scroll":this.isHorizontal()}]},contentClass:function(){return[`p-virtualscroller-content`,{"p-virtualscroller-loading":this.d_loading}]},loaderClass:function(){return[`p-virtualscroller-loader`,{"p-virtualscroller-loader-mask":!this.$slots.loader}]},loadedItems:function(){var e=this;return this.items&&!this.d_loading?this.isBoth()?this.items.slice(this.appendOnly?0:this.first.rows,this.last.rows).map(function(t){return e.columns?t:t.slice(e.appendOnly?0:e.first.cols,e.last.cols)}):this.isHorizontal()&&this.columns?this.items:this.items.slice(this.appendOnly?0:this.first,this.last):[]},loadedRows:function(){return this.d_loading?this.loaderDisabled?this.loaderArr:[]:this.loadedItems},loadedColumns:function(){if(this.columns){var e=this.isBoth(),t=this.isHorizontal();if(e||t)return this.d_loading&&this.loaderDisabled?e?this.loaderArr[0]:this.loaderArr:this.columns.slice(e?this.first.cols:this.first,e?this.last.cols:this.last)}return this.columns}},components:{SpinnerIcon:iC}},iD=[`tabindex`];function aD(e,t,n,r,i,a){var o=_(`SpinnerIcon`);return e.disabled?(v(),k(Se,{key:1},[m(e.$slots,`default`),m(e.$slots,`content`,{items:e.items,rows:e.items,columns:a.loadedColumns})],64)):(v(),k(`div`,E({key:0,ref:a.elementRef,class:a.containerClass,tabindex:e.tabindex,style:e.style,onScroll:t[0]||=function(){return a.onScroll&&a.onScroll.apply(a,arguments)}},e.ptmi(`root`)),[m(e.$slots,`content`,{styleClass:a.contentClass,items:a.loadedItems,getItemOptions:a.getOptions,loading:i.d_loading,getLoaderOptions:a.getLoaderOptions,itemSize:e.itemSize,rows:a.loadedRows,columns:a.loadedColumns,contentRef:a.contentRef,spacerStyle:i.spacerStyle,contentStyle:i.contentStyle,vertical:a.isVertical(),horizontal:a.isHorizontal(),both:a.isBoth()},function(){return[A(`div`,E({ref:a.contentRef,class:a.contentClass,style:i.contentStyle},e.ptm(`content`)),[(v(!0),k(Se,null,d(a.loadedItems,function(t,n){return m(e.$slots,`item`,{key:n,item:t,options:a.getOptions(n)})}),128))],16)]}),e.showSpacer?(v(),k(`div`,E({key:0,class:`p-virtualscroller-spacer`,style:i.spacerStyle},e.ptm(`spacer`)),null,16)):_e(``,!0),!e.loaderDisabled&&e.showLoader&&i.d_loading?(v(),k(`div`,E({key:1,class:a.loaderClass},e.ptm(`loader`)),[e.$slots&&e.$slots.loader?(v(!0),k(Se,{key:0},d(i.loaderArr,function(t,n){return m(e.$slots,`loader`,{key:n,options:a.getLoaderOptions(n,a.isBoth()&&{numCols:e.d_numItemsInViewport.cols})})}),128)):_e(``,!0),m(e.$slots,`loadingicon`,{},function(){return[Ue(o,E({spin:``,class:`p-virtualscroller-loading-icon`},e.ptm(`loadingIcon`)),null,16)]})],16)):_e(``,!0)],16,iD))}rD.render=aD;var oD=ba.extend({name:`select`,style:`
|
|
1412
|
+
.p-select {
|
|
1413
|
+
display: inline-flex;
|
|
1414
|
+
cursor: pointer;
|
|
1415
|
+
position: relative;
|
|
1416
|
+
user-select: none;
|
|
1417
|
+
background: dt('select.background');
|
|
1418
|
+
border: 1px solid dt('select.border.color');
|
|
1419
|
+
transition:
|
|
1420
|
+
background dt('select.transition.duration'),
|
|
1421
|
+
color dt('select.transition.duration'),
|
|
1422
|
+
border-color dt('select.transition.duration'),
|
|
1423
|
+
outline-color dt('select.transition.duration'),
|
|
1424
|
+
box-shadow dt('select.transition.duration');
|
|
1425
|
+
border-radius: dt('select.border.radius');
|
|
1426
|
+
outline-color: transparent;
|
|
1427
|
+
box-shadow: dt('select.shadow');
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1430
|
+
.p-select:not(.p-disabled):hover {
|
|
1431
|
+
border-color: dt('select.hover.border.color');
|
|
1432
|
+
}
|
|
1433
|
+
|
|
1434
|
+
.p-select:not(.p-disabled).p-focus {
|
|
1435
|
+
border-color: dt('select.focus.border.color');
|
|
1436
|
+
box-shadow: dt('select.focus.ring.shadow');
|
|
1437
|
+
outline: dt('select.focus.ring.width') dt('select.focus.ring.style') dt('select.focus.ring.color');
|
|
1438
|
+
outline-offset: dt('select.focus.ring.offset');
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
.p-select.p-variant-filled {
|
|
1442
|
+
background: dt('select.filled.background');
|
|
1443
|
+
}
|
|
1444
|
+
|
|
1445
|
+
.p-select.p-variant-filled:not(.p-disabled):hover {
|
|
1446
|
+
background: dt('select.filled.hover.background');
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1449
|
+
.p-select.p-variant-filled:not(.p-disabled).p-focus {
|
|
1450
|
+
background: dt('select.filled.focus.background');
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
.p-select.p-invalid {
|
|
1454
|
+
border-color: dt('select.invalid.border.color');
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1457
|
+
.p-select.p-disabled {
|
|
1458
|
+
opacity: 1;
|
|
1459
|
+
background: dt('select.disabled.background');
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1462
|
+
.p-select-clear-icon {
|
|
1463
|
+
align-self: center;
|
|
1464
|
+
color: dt('select.clear.icon.color');
|
|
1465
|
+
inset-inline-end: dt('select.dropdown.width');
|
|
1466
|
+
}
|
|
1467
|
+
|
|
1468
|
+
.p-select-dropdown {
|
|
1469
|
+
display: flex;
|
|
1470
|
+
align-items: center;
|
|
1471
|
+
justify-content: center;
|
|
1472
|
+
flex-shrink: 0;
|
|
1473
|
+
background: transparent;
|
|
1474
|
+
color: dt('select.dropdown.color');
|
|
1475
|
+
width: dt('select.dropdown.width');
|
|
1476
|
+
border-start-end-radius: dt('select.border.radius');
|
|
1477
|
+
border-end-end-radius: dt('select.border.radius');
|
|
1478
|
+
}
|
|
1479
|
+
|
|
1480
|
+
.p-select-label {
|
|
1481
|
+
display: block;
|
|
1482
|
+
white-space: nowrap;
|
|
1483
|
+
overflow: hidden;
|
|
1484
|
+
flex: 1 1 auto;
|
|
1485
|
+
width: 1%;
|
|
1486
|
+
padding: dt('select.padding.y') dt('select.padding.x');
|
|
1487
|
+
text-overflow: ellipsis;
|
|
1488
|
+
cursor: pointer;
|
|
1489
|
+
color: dt('select.color');
|
|
1490
|
+
background: transparent;
|
|
1491
|
+
border: 0 none;
|
|
1492
|
+
outline: 0 none;
|
|
1493
|
+
font-size: 1rem;
|
|
1494
|
+
}
|
|
1495
|
+
|
|
1496
|
+
.p-select-label.p-placeholder {
|
|
1497
|
+
color: dt('select.placeholder.color');
|
|
1498
|
+
}
|
|
1499
|
+
|
|
1500
|
+
.p-select.p-invalid .p-select-label.p-placeholder {
|
|
1501
|
+
color: dt('select.invalid.placeholder.color');
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
.p-select.p-disabled .p-select-label {
|
|
1505
|
+
color: dt('select.disabled.color');
|
|
1506
|
+
}
|
|
1507
|
+
|
|
1508
|
+
.p-select-label-empty {
|
|
1509
|
+
overflow: hidden;
|
|
1510
|
+
opacity: 0;
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1513
|
+
input.p-select-label {
|
|
1514
|
+
cursor: default;
|
|
1515
|
+
}
|
|
1516
|
+
|
|
1517
|
+
.p-select-overlay {
|
|
1518
|
+
position: absolute;
|
|
1519
|
+
top: 0;
|
|
1520
|
+
left: 0;
|
|
1521
|
+
background: dt('select.overlay.background');
|
|
1522
|
+
color: dt('select.overlay.color');
|
|
1523
|
+
border: 1px solid dt('select.overlay.border.color');
|
|
1524
|
+
border-radius: dt('select.overlay.border.radius');
|
|
1525
|
+
box-shadow: dt('select.overlay.shadow');
|
|
1526
|
+
min-width: 100%;
|
|
1527
|
+
transform-origin: inherit;
|
|
1528
|
+
will-change: transform;
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1531
|
+
.p-select-header {
|
|
1532
|
+
padding: dt('select.list.header.padding');
|
|
1533
|
+
}
|
|
1534
|
+
|
|
1535
|
+
.p-select-filter {
|
|
1536
|
+
width: 100%;
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1539
|
+
.p-select-list-container {
|
|
1540
|
+
overflow: auto;
|
|
1541
|
+
}
|
|
1542
|
+
|
|
1543
|
+
.p-select-option-group {
|
|
1544
|
+
cursor: auto;
|
|
1545
|
+
margin: 0;
|
|
1546
|
+
padding: dt('select.option.group.padding');
|
|
1547
|
+
background: dt('select.option.group.background');
|
|
1548
|
+
color: dt('select.option.group.color');
|
|
1549
|
+
font-weight: dt('select.option.group.font.weight');
|
|
1550
|
+
}
|
|
1551
|
+
|
|
1552
|
+
.p-select-list {
|
|
1553
|
+
margin: 0;
|
|
1554
|
+
padding: 0;
|
|
1555
|
+
list-style-type: none;
|
|
1556
|
+
padding: dt('select.list.padding');
|
|
1557
|
+
gap: dt('select.list.gap');
|
|
1558
|
+
display: flex;
|
|
1559
|
+
flex-direction: column;
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1562
|
+
.p-select-option {
|
|
1563
|
+
cursor: pointer;
|
|
1564
|
+
font-weight: normal;
|
|
1565
|
+
white-space: nowrap;
|
|
1566
|
+
position: relative;
|
|
1567
|
+
overflow: hidden;
|
|
1568
|
+
display: flex;
|
|
1569
|
+
align-items: center;
|
|
1570
|
+
padding: dt('select.option.padding');
|
|
1571
|
+
border: 0 none;
|
|
1572
|
+
color: dt('select.option.color');
|
|
1573
|
+
background: transparent;
|
|
1574
|
+
transition:
|
|
1575
|
+
background dt('select.transition.duration'),
|
|
1576
|
+
color dt('select.transition.duration'),
|
|
1577
|
+
border-color dt('select.transition.duration'),
|
|
1578
|
+
box-shadow dt('select.transition.duration'),
|
|
1579
|
+
outline-color dt('select.transition.duration');
|
|
1580
|
+
border-radius: dt('select.option.border.radius');
|
|
1581
|
+
}
|
|
1582
|
+
|
|
1583
|
+
.p-select-option:not(.p-select-option-selected):not(.p-disabled).p-focus {
|
|
1584
|
+
background: dt('select.option.focus.background');
|
|
1585
|
+
color: dt('select.option.focus.color');
|
|
1586
|
+
}
|
|
1587
|
+
|
|
1588
|
+
.p-select-option:not(.p-select-option-selected):not(.p-disabled):hover {
|
|
1589
|
+
background: dt('select.option.focus.background');
|
|
1590
|
+
color: dt('select.option.focus.color');
|
|
1591
|
+
}
|
|
1592
|
+
|
|
1593
|
+
.p-select-option.p-select-option-selected {
|
|
1594
|
+
background: dt('select.option.selected.background');
|
|
1595
|
+
color: dt('select.option.selected.color');
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
.p-select-option.p-select-option-selected.p-focus {
|
|
1599
|
+
background: dt('select.option.selected.focus.background');
|
|
1600
|
+
color: dt('select.option.selected.focus.color');
|
|
1601
|
+
}
|
|
1602
|
+
|
|
1603
|
+
.p-select-option-blank-icon {
|
|
1604
|
+
flex-shrink: 0;
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1607
|
+
.p-select-option-check-icon {
|
|
1608
|
+
position: relative;
|
|
1609
|
+
flex-shrink: 0;
|
|
1610
|
+
margin-inline-start: dt('select.checkmark.gutter.start');
|
|
1611
|
+
margin-inline-end: dt('select.checkmark.gutter.end');
|
|
1612
|
+
color: dt('select.checkmark.color');
|
|
1613
|
+
}
|
|
1614
|
+
|
|
1615
|
+
.p-select-empty-message {
|
|
1616
|
+
padding: dt('select.empty.message.padding');
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1619
|
+
.p-select-fluid {
|
|
1620
|
+
display: flex;
|
|
1621
|
+
width: 100%;
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1624
|
+
.p-select-sm .p-select-label {
|
|
1625
|
+
font-size: dt('select.sm.font.size');
|
|
1626
|
+
padding-block: dt('select.sm.padding.y');
|
|
1627
|
+
padding-inline: dt('select.sm.padding.x');
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
.p-select-sm .p-select-dropdown .p-icon {
|
|
1631
|
+
font-size: dt('select.sm.font.size');
|
|
1632
|
+
width: dt('select.sm.font.size');
|
|
1633
|
+
height: dt('select.sm.font.size');
|
|
1634
|
+
}
|
|
1635
|
+
|
|
1636
|
+
.p-select-lg .p-select-label {
|
|
1637
|
+
font-size: dt('select.lg.font.size');
|
|
1638
|
+
padding-block: dt('select.lg.padding.y');
|
|
1639
|
+
padding-inline: dt('select.lg.padding.x');
|
|
1640
|
+
}
|
|
1641
|
+
|
|
1642
|
+
.p-select-lg .p-select-dropdown .p-icon {
|
|
1643
|
+
font-size: dt('select.lg.font.size');
|
|
1644
|
+
width: dt('select.lg.font.size');
|
|
1645
|
+
height: dt('select.lg.font.size');
|
|
1646
|
+
}
|
|
1647
|
+
|
|
1648
|
+
.p-floatlabel-in .p-select-filter {
|
|
1649
|
+
padding-block-start: dt('select.padding.y');
|
|
1650
|
+
padding-block-end: dt('select.padding.y');
|
|
1651
|
+
}
|
|
1652
|
+
`,classes:{root:function(e){var t=e.instance,n=e.props,r=e.state;return[`p-select p-component p-inputwrapper`,{"p-disabled":n.disabled,"p-invalid":t.$invalid,"p-variant-filled":t.$variant===`filled`,"p-focus":r.focused,"p-inputwrapper-filled":t.$filled,"p-inputwrapper-focus":r.focused||r.overlayVisible,"p-select-open":r.overlayVisible,"p-select-fluid":t.$fluid,"p-select-sm p-inputfield-sm":n.size===`small`,"p-select-lg p-inputfield-lg":n.size===`large`}]},label:function(e){var t=e.instance,n=e.props;return[`p-select-label`,{"p-placeholder":!n.editable&&t.label===n.placeholder,"p-select-label-empty":!n.editable&&!t.$slots.value&&(t.label===`p-emptylabel`||t.label?.length===0)}]},clearIcon:`p-select-clear-icon`,dropdown:`p-select-dropdown`,loadingicon:`p-select-loading-icon`,dropdownIcon:`p-select-dropdown-icon`,overlay:`p-select-overlay p-component`,header:`p-select-header`,pcFilter:`p-select-filter`,listContainer:`p-select-list-container`,list:`p-select-list`,optionGroup:`p-select-option-group`,optionGroupLabel:`p-select-option-group-label`,option:function(e){var t=e.instance,n=e.props,r=e.state,i=e.option,a=e.focusedOption;return[`p-select-option`,{"p-select-option-selected":t.isSelected(i)&&n.highlightOnSelect,"p-focus":r.focusedOptionIndex===a,"p-disabled":t.isOptionDisabled(i)}]},optionLabel:`p-select-option-label`,optionCheckIcon:`p-select-option-check-icon`,optionBlankIcon:`p-select-option-blank-icon`,emptyMessage:`p-select-empty-message`}}),sD={name:`BaseSelect`,extends:zE,props:{options:Array,optionLabel:[String,Function],optionValue:[String,Function],optionDisabled:[String,Function],optionGroupLabel:[String,Function],optionGroupChildren:[String,Function],scrollHeight:{type:String,default:`14rem`},filter:Boolean,filterPlaceholder:String,filterLocale:String,filterMatchMode:{type:String,default:`contains`},filterFields:{type:Array,default:null},editable:Boolean,placeholder:{type:String,default:null},dataKey:null,showClear:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},labelId:{type:String,default:null},labelClass:{type:[String,Object],default:null},labelStyle:{type:Object,default:null},panelClass:{type:[String,Object],default:null},overlayStyle:{type:Object,default:null},overlayClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},appendTo:{type:[String,Object],default:`body`},loading:{type:Boolean,default:!1},clearIcon:{type:String,default:void 0},dropdownIcon:{type:String,default:void 0},filterIcon:{type:String,default:void 0},loadingIcon:{type:String,default:void 0},resetFilterOnHide:{type:Boolean,default:!1},resetFilterOnClear:{type:Boolean,default:!1},virtualScrollerOptions:{type:Object,default:null},autoOptionFocus:{type:Boolean,default:!1},autoFilterFocus:{type:Boolean,default:!1},selectOnFocus:{type:Boolean,default:!1},focusOnHover:{type:Boolean,default:!0},highlightOnSelect:{type:Boolean,default:!0},checkmark:{type:Boolean,default:!1},filterMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptyFilterMessage:{type:String,default:null},emptyMessage:{type:String,default:null},tabindex:{type:Number,default:0},ariaLabel:{type:String,default:null},ariaLabelledby:{type:String,default:null}},style:oD,provide:function(){return{$pcSelect:this,$parentInstance:this}}};function cD(e){"@babel/helpers - typeof";return cD=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},cD(e)}function lD(e){return pD(e)||fD(e)||dD(e)||uD()}function uD(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1653
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dD(e,t){if(e){if(typeof e==`string`)return mD(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?mD(e,t):void 0}}function fD(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function pD(e){if(Array.isArray(e))return mD(e)}function mD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function hD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function gD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?hD(Object(n),!0).forEach(function(t){_D(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _D(e,t,n){return(t=vD(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vD(e){var t=yD(e,`string`);return cD(t)==`symbol`?t:t+``}function yD(e,t){if(cD(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(cD(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var bD={name:`Select`,extends:sD,inheritAttrs:!1,emits:[`change`,`focus`,`blur`,`before-show`,`before-hide`,`show`,`hide`,`filter`],outsideClickListener:null,scrollHandler:null,resizeListener:null,labelClickListener:null,matchMediaOrientationListener:null,overlay:null,list:null,virtualScroller:null,searchTimeout:null,searchValue:null,isModelValueChanged:!1,data:function(){return{clicked:!1,focused:!1,focusedOptionIndex:-1,filterValue:null,overlayVisible:!1,queryOrientation:null}},watch:{modelValue:function(){this.isModelValueChanged=!0},options:function(){this.autoUpdateModel()}},mounted:function(){this.autoUpdateModel(),this.bindLabelClickListener(),this.bindMatchMediaOrientationListener()},updated:function(){this.overlayVisible&&this.isModelValueChanged&&this.scrollInView(this.findSelectedOptionIndex()),this.isModelValueChanged=!1},beforeUnmount:function(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.unbindLabelClickListener(),this.unbindMatchMediaOrientationListener(),this.scrollHandler&&=(this.scrollHandler.destroy(),null),this.overlay&&=(mi.clear(this.overlay),null)},methods:{getOptionIndex:function(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel:function(e){return this.optionLabel?Vr(e,this.optionLabel):e},getOptionValue:function(e){return this.optionValue?Vr(e,this.optionValue):e},getOptionRenderKey:function(e,t){return(this.dataKey?Vr(e,this.dataKey):this.getOptionLabel(e))+`_`+t},getPTItemOptions:function(e,t,n,r){return this.ptm(r,{context:{option:e,index:n,selected:this.isSelected(e),focused:this.focusedOptionIndex===this.getOptionIndex(n,t),disabled:this.isOptionDisabled(e)}})},isOptionDisabled:function(e){return this.optionDisabled?Vr(e,this.optionDisabled):!1},isOptionGroup:function(e){return this.optionGroupLabel&&e.optionGroup&&e.group},getOptionGroupLabel:function(e){return Vr(e,this.optionGroupLabel)},getOptionGroupChildren:function(e){return Vr(e,this.optionGroupChildren)},getAriaPosInset:function(e){var t=this;return(this.optionGroupLabel?e-this.visibleOptions.slice(0,e).filter(function(e){return t.isOptionGroup(e)}).length:e)+1},show:function(e){this.$emit(`before-show`),this.overlayVisible=!0,this.focusedOptionIndex=this.focusedOptionIndex===-1?this.autoOptionFocus?this.findFirstFocusedOptionIndex():this.editable?-1:this.findSelectedOptionIndex():this.focusedOptionIndex,e&&ir(this.$refs.focusInput)},hide:function(e){var t=this,n=function(){t.$emit(`before-hide`),t.overlayVisible=!1,t.clicked=!1,t.focusedOptionIndex=-1,t.searchValue=``,t.resetFilterOnHide&&(t.filterValue=null),e&&ir(t.$refs.focusInput)};setTimeout(function(){n()},0)},onFocus:function(e){this.disabled||(this.focused=!0,this.overlayVisible&&(this.focusedOptionIndex=this.focusedOptionIndex===-1?this.autoOptionFocus?this.findFirstFocusedOptionIndex():this.editable?-1:this.findSelectedOptionIndex():this.focusedOptionIndex,this.scrollInView(this.focusedOptionIndex)),this.$emit(`focus`,e))},onBlur:function(e){var t=this;setTimeout(function(){var n,r;t.focused=!1,t.focusedOptionIndex=-1,t.searchValue=``,t.$emit(`blur`,e),(n=(r=t.formField).onBlur)==null||n.call(r,e)},100)},onKeyDown:function(e){if(this.disabled){e.preventDefault();return}if(Sr())switch(e.code){case`Backspace`:this.onBackspaceKey(e,this.editable);break;case`Enter`:case`NumpadDecimal`:this.onEnterKey(e);break;default:e.preventDefault();return}var t=e.metaKey||e.ctrlKey;switch(e.code){case`ArrowDown`:this.onArrowDownKey(e);break;case`ArrowUp`:this.onArrowUpKey(e,this.editable);break;case`ArrowLeft`:case`ArrowRight`:this.onArrowLeftKey(e,this.editable);break;case`Home`:this.onHomeKey(e,this.editable);break;case`End`:this.onEndKey(e,this.editable);break;case`PageDown`:this.onPageDownKey(e);break;case`PageUp`:this.onPageUpKey(e);break;case`Space`:this.onSpaceKey(e,this.editable);break;case`Enter`:case`NumpadEnter`:this.onEnterKey(e);break;case`Escape`:this.onEscapeKey(e);break;case`Tab`:this.onTabKey(e);break;case`Backspace`:this.onBackspaceKey(e,this.editable);break;case`ShiftLeft`:case`ShiftRight`:break;default:!t&&ti(e.key)&&(!this.overlayVisible&&this.show(),!this.editable&&this.searchOptions(e,e.key),this.filter&&(this.filterValue=e.key));break}this.clicked=!1},onEditableInput:function(e){var t=e.target.value;this.searchValue=``,!this.searchOptions(e,t)&&(this.focusedOptionIndex=-1),this.updateModel(e,t),!this.overlayVisible&&j(t)&&this.show()},onContainerClick:function(e){this.disabled||this.loading||e.target.tagName===`INPUT`||e.target.getAttribute(`data-pc-section`)===`clearicon`||e.target.closest(`[data-pc-section="clearicon"]`)||((!this.overlay||!this.overlay.contains(e.target))&&(this.overlayVisible?this.hide(!0):this.show(!0)),this.clicked=!0)},onClearClick:function(e){this.updateModel(e,null),this.resetFilterOnClear&&(this.filterValue=null)},onFirstHiddenFocus:function(e){ir(e.relatedTarget===this.$refs.focusInput?sr(this.overlay,`:not([data-p-hidden-focusable="true"])`):this.$refs.focusInput)},onLastHiddenFocus:function(e){ir(e.relatedTarget===this.$refs.focusInput?fr(this.overlay,`:not([data-p-hidden-focusable="true"])`):this.$refs.focusInput)},onOptionSelect:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,r=this.getOptionValue(t);this.updateModel(e,r),n&&this.hide(!0)},onOptionMouseMove:function(e,t){this.focusOnHover&&this.changeFocusedOptionIndex(e,t)},onFilterChange:function(e){var t=e.target.value;this.filterValue=t,this.focusedOptionIndex=-1,this.$emit(`filter`,{originalEvent:e,value:t}),!this.virtualScrollerDisabled&&this.virtualScroller.scrollToIndex(0)},onFilterKeyDown:function(e){if(!e.isComposing)switch(e.code){case`ArrowDown`:this.onArrowDownKey(e);break;case`ArrowUp`:this.onArrowUpKey(e,!0);break;case`ArrowLeft`:case`ArrowRight`:this.onArrowLeftKey(e,!0);break;case`Home`:this.onHomeKey(e,!0);break;case`End`:this.onEndKey(e,!0);break;case`Enter`:case`NumpadEnter`:this.onEnterKey(e);break;case`Escape`:this.onEscapeKey(e);break;case`Tab`:this.onTabKey(e);break}},onFilterBlur:function(){this.focusedOptionIndex=-1},onFilterUpdated:function(){this.overlayVisible&&this.alignOverlay()},onOverlayClick:function(e){JE.emit(`overlay-click`,{originalEvent:e,target:this.$el})},onOverlayKeyDown:function(e){switch(e.code){case`Escape`:this.onEscapeKey(e);break}},onArrowDownKey:function(e){if(!this.overlayVisible)this.show(),this.editable&&this.changeFocusedOptionIndex(e,this.findSelectedOptionIndex());else{var t=this.focusedOptionIndex===-1?this.clicked?this.findFirstOptionIndex():this.findFirstFocusedOptionIndex():this.findNextOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(e,t)}e.preventDefault()},onArrowUpKey:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e.altKey&&!t)this.focusedOptionIndex!==-1&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(),e.preventDefault();else{var n=this.focusedOptionIndex===-1?this.clicked?this.findLastOptionIndex():this.findLastFocusedOptionIndex():this.findPrevOptionIndex(this.focusedOptionIndex);this.changeFocusedOptionIndex(e,n),!this.overlayVisible&&this.show(),e.preventDefault()}},onArrowLeftKey:function(e){arguments.length>1&&arguments[1]!==void 0&&arguments[1]&&(this.focusedOptionIndex=-1)},onHomeKey:function(e){if(arguments.length>1&&arguments[1]!==void 0&&arguments[1]){var t=e.currentTarget;e.shiftKey?t.setSelectionRange(0,e.target.selectionStart):(t.setSelectionRange(0,0),this.focusedOptionIndex=-1)}else this.changeFocusedOptionIndex(e,this.findFirstOptionIndex()),!this.overlayVisible&&this.show();e.preventDefault()},onEndKey:function(e){if(arguments.length>1&&arguments[1]!==void 0&&arguments[1]){var t=e.currentTarget;if(e.shiftKey)t.setSelectionRange(e.target.selectionStart,t.value.length);else{var n=t.value.length;t.setSelectionRange(n,n),this.focusedOptionIndex=-1}}else this.changeFocusedOptionIndex(e,this.findLastOptionIndex()),!this.overlayVisible&&this.show();e.preventDefault()},onPageUpKey:function(e){this.scrollInView(0),e.preventDefault()},onPageDownKey:function(e){this.scrollInView(this.visibleOptions.length-1),e.preventDefault()},onEnterKey:function(e){this.overlayVisible?(this.focusedOptionIndex!==-1&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.hide(!0)):(this.focusedOptionIndex=-1,this.onArrowDownKey(e)),e.preventDefault()},onSpaceKey:function(e){!(arguments.length>1&&arguments[1]!==void 0&&arguments[1])&&this.onEnterKey(e)},onEscapeKey:function(e){this.overlayVisible&&this.hide(!0),e.preventDefault(),e.stopPropagation()},onTabKey:function(e){arguments.length>1&&arguments[1]!==void 0&&arguments[1]||(this.overlayVisible&&this.hasFocusableElements()?(ir(this.$refs.firstHiddenFocusableElementOnOverlay),e.preventDefault()):(this.focusedOptionIndex!==-1&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(this.filter)))},onBackspaceKey:function(e){arguments.length>1&&arguments[1]!==void 0&&arguments[1]&&!this.overlayVisible&&this.show()},onOverlayEnter:function(e){var t=this;mi.set(`overlay`,e,this.$primevue.config.zIndex.overlay),Kn(e,{position:`absolute`,top:`0`}),this.alignOverlay(),this.scrollInView(),this.$attrSelector&&e.setAttribute(this.$attrSelector,``),setTimeout(function(){t.autoFilterFocus&&t.filter&&ir(t.$refs.filterInput.$el),t.autoUpdateModel()},1)},onOverlayAfterEnter:function(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.$emit(`show`)},onOverlayLeave:function(){var e=this;this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.autoFilterFocus&&this.filter&&!this.editable&&this.$nextTick(function(){e.$refs.filterInput&&ir(e.$refs.filterInput.$el)}),this.$emit(`hide`),this.overlay=null},onOverlayAfterLeave:function(e){mi.clear(e)},alignOverlay:function(){this.appendTo===`self`?Jn(this.overlay,this.$el):this.overlay&&(this.overlay.style.minWidth=qn(this.$el)+`px`,Gn(this.overlay,this.$el))},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(t){var n=t.composedPath();e.overlayVisible&&e.overlay&&!n.includes(e.$el)&&!n.includes(e.overlay)&&e.hide()},document.addEventListener(`click`,this.outsideClickListener,!0))},unbindOutsideClickListener:function(){this.outsideClickListener&&=(document.removeEventListener(`click`,this.outsideClickListener,!0),null)},bindScrollListener:function(){var e=this;this.scrollHandler||=new Tw(this.$refs.container,function(){e.overlayVisible&&e.hide()}),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!Dr()&&e.hide()},window.addEventListener(`resize`,this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&=(window.removeEventListener(`resize`,this.resizeListener),null)},bindLabelClickListener:function(){var e=this;if(!this.editable&&!this.labelClickListener){var t=document.querySelector(`label[for="${this.labelId}"]`);t&&Er(t)&&(this.labelClickListener=function(){ir(e.$refs.focusInput)},t.addEventListener(`click`,this.labelClickListener))}},unbindLabelClickListener:function(){if(this.labelClickListener){var e=document.querySelector(`label[for="${this.labelId}"]`);e&&Er(e)&&e.removeEventListener(`click`,this.labelClickListener)}},bindMatchMediaOrientationListener:function(){var e=this;this.matchMediaOrientationListener||(this.queryOrientation=matchMedia(`(orientation: portrait)`),this.matchMediaOrientationListener=function(){e.alignOverlay()},this.queryOrientation.addEventListener(`change`,this.matchMediaOrientationListener))},unbindMatchMediaOrientationListener:function(){this.matchMediaOrientationListener&&=(this.queryOrientation.removeEventListener(`change`,this.matchMediaOrientationListener),this.queryOrientation=null,null)},hasFocusableElements:function(){return or(this.overlay,`:not([data-p-hidden-focusable="true"])`).length>0},isOptionExactMatched:function(e){return this.isValidOption(e)&&typeof this.getOptionLabel(e)==`string`&&this.getOptionLabel(e)?.toLocaleLowerCase(this.filterLocale)==this.searchValue.toLocaleLowerCase(this.filterLocale)},isOptionStartsWith:function(e){return this.isValidOption(e)&&typeof this.getOptionLabel(e)==`string`&&this.getOptionLabel(e)?.toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))},isValidOption:function(e){return j(e)&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))},isValidSelectedOption:function(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected:function(e){return Hr(this.d_value,this.getOptionValue(e),this.equalityKey)},findFirstOptionIndex:function(){var e=this;return this.visibleOptions.findIndex(function(t){return e.isValidOption(t)})},findLastOptionIndex:function(){var e=this;return Jr(this.visibleOptions,function(t){return e.isValidOption(t)})},findNextOptionIndex:function(e){var t=this,n=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex(function(e){return t.isValidOption(e)}):-1;return n>-1?n+e+1:e},findPrevOptionIndex:function(e){var t=this,n=e>0?Jr(this.visibleOptions.slice(0,e),function(e){return t.isValidOption(e)}):-1;return n>-1?n:e},findSelectedOptionIndex:function(){var e=this;return this.visibleOptions.findIndex(function(t){return e.isValidSelectedOption(t)})},findFirstFocusedOptionIndex:function(){var e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex:function(){var e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},searchOptions:function(e,t){var n=this;this.searchValue=(this.searchValue||``)+t;var r=-1,i=!1;return j(this.searchValue)&&(r=this.visibleOptions.findIndex(function(e){return n.isOptionExactMatched(e)}),r===-1&&(r=this.visibleOptions.findIndex(function(e){return n.isOptionStartsWith(e)})),r!==-1&&(i=!0),r===-1&&this.focusedOptionIndex===-1&&(r=this.findFirstFocusedOptionIndex()),r!==-1&&this.changeFocusedOptionIndex(e,r)),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(function(){n.searchValue=``,n.searchTimeout=null},500),i},changeFocusedOptionIndex:function(e,t){this.focusedOptionIndex!==t&&(this.focusedOptionIndex=t,this.scrollInView(),this.selectOnFocus&&this.onOptionSelect(e,this.visibleOptions[t],!1))},scrollInView:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:-1;this.$nextTick(function(){var n=t===-1?e.focusedOptionId:`${e.$id}_${t}`,r=rr(e.list,`li[id="${n}"]`);r?r.scrollIntoView&&r.scrollIntoView({block:`nearest`,inline:`nearest`}):e.virtualScrollerDisabled||e.virtualScroller&&e.virtualScroller.scrollToIndex(t===-1?e.focusedOptionIndex:t)})},autoUpdateModel:function(){this.autoOptionFocus&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex()),this.selectOnFocus&&this.autoOptionFocus&&!this.$filled&&this.onOptionSelect(null,this.visibleOptions[this.focusedOptionIndex],!1)},updateModel:function(e,t){this.writeValue(t,e),this.$emit(`change`,{originalEvent:e,value:t})},flatOptions:function(e){var t=this;return(e||[]).reduce(function(e,n,r){e.push({optionGroup:n,group:!0,index:r});var i=t.getOptionGroupChildren(n);return i&&i.forEach(function(t){return e.push(t)}),e},[])},overlayRef:function(e){this.overlay=e},listRef:function(e,t){this.list=e,t&&t(e)},virtualScrollerRef:function(e){this.virtualScroller=e}},computed:{visibleOptions:function(){var e=this,t=this.optionGroupLabel?this.flatOptions(this.options):this.options||[];if(this.filterValue){var n=tE.filter(t,this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale);if(this.optionGroupLabel){var r=this.options||[],i=[];return r.forEach(function(t){var r=e.getOptionGroupChildren(t).filter(function(e){return n.includes(e)});r.length>0&&i.push(gD(gD({},t),{},_D({},typeof e.optionGroupChildren==`string`?e.optionGroupChildren:`items`,lD(r))))}),this.flatOptions(i)}return n}return t},hasSelectedOption:function(){return this.$filled},label:function(){var e=this.findSelectedOptionIndex();return e===-1?this.placeholder||`p-emptylabel`:this.getOptionLabel(this.visibleOptions[e])},editableInputValue:function(){var e=this.findSelectedOptionIndex();return e===-1?this.d_value||``:this.getOptionLabel(this.visibleOptions[e])},equalityKey:function(){return this.optionValue?null:this.dataKey},searchFields:function(){return this.filterFields||[this.optionLabel]},filterResultMessageText:function(){return j(this.visibleOptions)?this.filterMessageText.replaceAll(`{0}`,this.visibleOptions.length):this.emptyFilterMessageText},filterMessageText:function(){return this.filterMessage||this.$primevue.config.locale.searchMessage||``},emptyFilterMessageText:function(){return this.emptyFilterMessage||this.$primevue.config.locale.emptySearchMessage||this.$primevue.config.locale.emptyFilterMessage||``},emptyMessageText:function(){return this.emptyMessage||this.$primevue.config.locale.emptyMessage||``},selectionMessageText:function(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||``},emptySelectionMessageText:function(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||``},selectedMessageText:function(){return this.$filled?this.selectionMessageText.replaceAll(`{0}`,`1`):this.emptySelectionMessageText},focusedOptionId:function(){return this.focusedOptionIndex===-1?null:`${this.$id}_${this.focusedOptionIndex}`},ariaSetSize:function(){var e=this;return this.visibleOptions.filter(function(t){return!e.isOptionGroup(t)}).length},isClearIconVisible:function(){return this.showClear&&this.d_value!=null&&!this.disabled&&!this.loading},virtualScrollerDisabled:function(){return!this.virtualScrollerOptions},containerDataP:function(){return kn(_D({invalid:this.$invalid,disabled:this.disabled,focus:this.focused,fluid:this.$fluid,filled:this.$variant===`filled`},this.size,this.size))},labelDataP:function(){return kn(_D(_D({placeholder:!this.editable&&this.label===this.placeholder,clearable:this.showClear,disabled:this.disabled,editable:this.editable},this.size,this.size),`empty`,!this.editable&&!this.$slots.value&&(this.label===`p-emptylabel`||this.label.length===0)))},dropdownIconDataP:function(){return kn(_D({},this.size,this.size))},overlayDataP:function(){return kn(_D({},`portal-`+this.appendTo,`portal-`+this.appendTo))}},directives:{ripple:GC},components:{InputText:GE,VirtualScroller:rD,Portal:NT,InputIcon:IE,IconField:PE,TimesIcon:eT,ChevronDownIcon:vE,SpinnerIcon:iC,SearchIcon:EE,CheckIcon:uE,BlankIcon:nE}},xD=[`id`,`data-p`],SD=[`name`,`id`,`value`,`placeholder`,`tabindex`,`disabled`,`aria-label`,`aria-labelledby`,`aria-expanded`,`aria-controls`,`aria-activedescendant`,`aria-invalid`,`data-p`],CD=[`name`,`id`,`tabindex`,`aria-label`,`aria-labelledby`,`aria-expanded`,`aria-controls`,`aria-activedescendant`,`aria-invalid`,`aria-disabled`,`data-p`],wD=[`data-p`],TD=[`id`],ED=[`id`],DD=[`id`,`aria-label`,`aria-selected`,`aria-disabled`,`aria-setsize`,`aria-posinset`,`onMousedown`,`onMousemove`,`data-p-selected`,`data-p-focused`,`data-p-disabled`];function OD(e,t,n,r,a,o){var s=_(`SpinnerIcon`),l=_(`InputText`),u=_(`SearchIcon`),f=_(`InputIcon`),p=_(`IconField`),g=_(`CheckIcon`),y=_(`BlankIcon`),b=_(`VirtualScroller`),S=_(`Portal`),C=w(`ripple`);return v(),k(`div`,E({ref:`container`,id:e.$id,class:e.cx(`root`),onClick:t[12]||=function(){return o.onContainerClick&&o.onContainerClick.apply(o,arguments)},"data-p":o.containerDataP},e.ptmi(`root`)),[e.editable?(v(),k(`input`,E({key:0,ref:`focusInput`,name:e.name,id:e.labelId||e.inputId,type:`text`,class:[e.cx(`label`),e.inputClass,e.labelClass],style:[e.inputStyle,e.labelStyle],value:o.editableInputValue,placeholder:e.placeholder,tabindex:e.disabled?-1:e.tabindex,disabled:e.disabled,autocomplete:`off`,role:`combobox`,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":`listbox`,"aria-expanded":a.overlayVisible,"aria-controls":a.overlayVisible?e.$id+`_list`:void 0,"aria-activedescendant":a.focused?o.focusedOptionId:void 0,"aria-invalid":e.invalid||void 0,onFocus:t[0]||=function(){return o.onFocus&&o.onFocus.apply(o,arguments)},onBlur:t[1]||=function(){return o.onBlur&&o.onBlur.apply(o,arguments)},onKeydown:t[2]||=function(){return o.onKeyDown&&o.onKeyDown.apply(o,arguments)},onInput:t[3]||=function(){return o.onEditableInput&&o.onEditableInput.apply(o,arguments)},"data-p":o.labelDataP},e.ptm(`label`)),null,16,SD)):(v(),k(`span`,E({key:1,ref:`focusInput`,name:e.name,id:e.labelId||e.inputId,class:[e.cx(`label`),e.inputClass,e.labelClass],style:[e.inputStyle,e.labelStyle],tabindex:e.disabled?-1:e.tabindex,role:`combobox`,"aria-label":e.ariaLabel||(o.label===`p-emptylabel`?void 0:o.label),"aria-labelledby":e.ariaLabelledby,"aria-haspopup":`listbox`,"aria-expanded":a.overlayVisible,"aria-controls":e.$id+`_list`,"aria-activedescendant":a.focused?o.focusedOptionId:void 0,"aria-invalid":e.invalid||void 0,"aria-disabled":e.disabled,onFocus:t[4]||=function(){return o.onFocus&&o.onFocus.apply(o,arguments)},onBlur:t[5]||=function(){return o.onBlur&&o.onBlur.apply(o,arguments)},onKeydown:t[6]||=function(){return o.onKeyDown&&o.onKeyDown.apply(o,arguments)},"data-p":o.labelDataP},e.ptm(`label`)),[m(e.$slots,`value`,{value:e.d_value,placeholder:e.placeholder},function(){return[se(i(o.label===`p-emptylabel`?`\xA0`:o.label??`empty`),1)]})],16,CD)),o.isClearIconVisible?m(e.$slots,`clearicon`,{key:2,class:c(e.cx(`clearIcon`)),clearCallback:o.onClearClick},function(){return[(v(),he(Ze(e.clearIcon?`i`:`TimesIcon`),E({ref:`clearIcon`,class:[e.cx(`clearIcon`),e.clearIcon],onClick:o.onClearClick},e.ptm(`clearIcon`),{"data-pc-section":`clearicon`}),null,16,[`class`,`onClick`]))]}):_e(``,!0),A(`div`,E({class:e.cx(`dropdown`)},e.ptm(`dropdown`)),[e.loading?m(e.$slots,`loadingicon`,{key:0,class:c(e.cx(`loadingIcon`))},function(){return[e.loadingIcon?(v(),k(`span`,E({key:0,class:[e.cx(`loadingIcon`),`pi-spin`,e.loadingIcon],"aria-hidden":`true`},e.ptm(`loadingIcon`)),null,16)):(v(),he(s,E({key:1,class:e.cx(`loadingIcon`),spin:``,"aria-hidden":`true`},e.ptm(`loadingIcon`)),null,16,[`class`]))]}):m(e.$slots,`dropdownicon`,{key:1,class:c(e.cx(`dropdownIcon`))},function(){return[(v(),he(Ze(e.dropdownIcon?`span`:`ChevronDownIcon`),E({class:[e.cx(`dropdownIcon`),e.dropdownIcon],"aria-hidden":`true`,"data-p":o.dropdownIconDataP},e.ptm(`dropdownIcon`)),null,16,[`class`,`data-p`]))]})],16),Ue(S,{appendTo:e.appendTo},{default:Fe(function(){return[Ue(mt,E({name:`p-anchored-overlay`,onEnter:o.onOverlayEnter,onAfterEnter:o.onOverlayAfterEnter,onLeave:o.onOverlayLeave,onAfterLeave:o.onOverlayAfterLeave},e.ptm(`transition`)),{default:Fe(function(){return[a.overlayVisible?(v(),k(`div`,E({key:0,ref:o.overlayRef,class:[e.cx(`overlay`),e.panelClass,e.overlayClass],style:[e.panelStyle,e.overlayStyle],onClick:t[10]||=function(){return o.onOverlayClick&&o.onOverlayClick.apply(o,arguments)},onKeydown:t[11]||=function(){return o.onOverlayKeyDown&&o.onOverlayKeyDown.apply(o,arguments)},"data-p":o.overlayDataP},e.ptm(`overlay`)),[A(`span`,E({ref:`firstHiddenFocusableElementOnOverlay`,role:`presentation`,"aria-hidden":`true`,class:`p-hidden-accessible p-hidden-focusable`,tabindex:0,onFocus:t[7]||=function(){return o.onFirstHiddenFocus&&o.onFirstHiddenFocus.apply(o,arguments)}},e.ptm(`hiddenFirstFocusableEl`),{"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0}),null,16),m(e.$slots,`header`,{value:e.d_value,options:o.visibleOptions}),e.filter?(v(),k(`div`,E({key:0,class:e.cx(`header`)},e.ptm(`header`)),[Ue(p,{unstyled:e.unstyled,pt:e.ptm(`pcFilterContainer`)},{default:Fe(function(){return[Ue(l,{ref:`filterInput`,type:`text`,value:a.filterValue,onVnodeMounted:o.onFilterUpdated,onVnodeUpdated:o.onFilterUpdated,class:c(e.cx(`pcFilter`)),placeholder:e.filterPlaceholder,variant:e.variant,unstyled:e.unstyled,role:`searchbox`,autocomplete:`off`,"aria-owns":e.$id+`_list`,"aria-activedescendant":o.focusedOptionId,onKeydown:o.onFilterKeyDown,onBlur:o.onFilterBlur,onInput:o.onFilterChange,pt:e.ptm(`pcFilter`),formControl:{novalidate:!0}},null,8,[`value`,`onVnodeMounted`,`onVnodeUpdated`,`class`,`placeholder`,`variant`,`unstyled`,`aria-owns`,`aria-activedescendant`,`onKeydown`,`onBlur`,`onInput`,`pt`]),Ue(f,{unstyled:e.unstyled,pt:e.ptm(`pcFilterIconContainer`)},{default:Fe(function(){return[m(e.$slots,`filtericon`,{},function(){return[e.filterIcon?(v(),k(`span`,E({key:0,class:e.filterIcon},e.ptm(`filterIcon`)),null,16)):(v(),he(u,x(E({key:1},e.ptm(`filterIcon`))),null,16))]})]}),_:3},8,[`unstyled`,`pt`])]}),_:3},8,[`unstyled`,`pt`]),A(`span`,E({role:`status`,"aria-live":`polite`,class:`p-hidden-accessible`},e.ptm(`hiddenFilterResult`),{"data-p-hidden-accessible":!0}),i(o.filterResultMessageText),17)],16)):_e(``,!0),A(`div`,E({class:e.cx(`listContainer`),style:{"max-height":o.virtualScrollerDisabled?e.scrollHeight:``}},e.ptm(`listContainer`)),[Ue(b,E({ref:o.virtualScrollerRef},e.virtualScrollerOptions,{items:o.visibleOptions,style:{height:e.scrollHeight},tabindex:-1,disabled:o.virtualScrollerDisabled,pt:e.ptm(`virtualScroller`)}),be({content:Fe(function(n){var r=n.styleClass,s=n.contentRef,c=n.items,l=n.getItemOptions,u=n.contentStyle,f=n.itemSize;return[A(`ul`,E({ref:function(e){return o.listRef(e,s)},id:e.$id+`_list`,class:[e.cx(`list`),r],style:u,role:`listbox`},e.ptm(`list`)),[(v(!0),k(Se,null,d(c,function(n,r){return v(),k(Se,{key:o.getOptionRenderKey(n,o.getOptionIndex(r,l))},[o.isOptionGroup(n)?(v(),k(`li`,E({key:0,id:e.$id+`_`+o.getOptionIndex(r,l),style:{height:f?f+`px`:void 0},class:e.cx(`optionGroup`),role:`option`},{ref_for:!0},e.ptm(`optionGroup`)),[m(e.$slots,`optiongroup`,{option:n.optionGroup,index:o.getOptionIndex(r,l)},function(){return[A(`span`,E({class:e.cx(`optionGroupLabel`)},{ref_for:!0},e.ptm(`optionGroupLabel`)),i(o.getOptionGroupLabel(n.optionGroup)),17)]})],16,ED)):h((v(),k(`li`,E({key:1,id:e.$id+`_`+o.getOptionIndex(r,l),class:e.cx(`option`,{option:n,focusedOption:o.getOptionIndex(r,l)}),style:{height:f?f+`px`:void 0},role:`option`,"aria-label":o.getOptionLabel(n),"aria-selected":o.isSelected(n),"aria-disabled":o.isOptionDisabled(n),"aria-setsize":o.ariaSetSize,"aria-posinset":o.getAriaPosInset(o.getOptionIndex(r,l)),onMousedown:function(e){return o.onOptionSelect(e,n)},onMousemove:function(e){return o.onOptionMouseMove(e,o.getOptionIndex(r,l))},onClick:t[8]||=bn(function(){},[`stop`]),"data-p-selected":!e.checkmark&&o.isSelected(n),"data-p-focused":a.focusedOptionIndex===o.getOptionIndex(r,l),"data-p-disabled":o.isOptionDisabled(n)},{ref_for:!0},o.getPTItemOptions(n,l,r,`option`)),[e.checkmark?(v(),k(Se,{key:0},[o.isSelected(n)?(v(),he(g,E({key:0,class:e.cx(`optionCheckIcon`)},{ref_for:!0},e.ptm(`optionCheckIcon`)),null,16,[`class`])):(v(),he(y,E({key:1,class:e.cx(`optionBlankIcon`)},{ref_for:!0},e.ptm(`optionBlankIcon`)),null,16,[`class`]))],64)):_e(``,!0),m(e.$slots,`option`,{option:n,selected:o.isSelected(n),index:o.getOptionIndex(r,l)},function(){return[A(`span`,E({class:e.cx(`optionLabel`)},{ref_for:!0},e.ptm(`optionLabel`)),i(o.getOptionLabel(n)),17)]})],16,DD)),[[C]])],64)}),128)),a.filterValue&&(!c||c&&c.length===0)?(v(),k(`li`,E({key:0,class:e.cx(`emptyMessage`),role:`option`},e.ptm(`emptyMessage`),{"data-p-hidden-accessible":!0}),[m(e.$slots,`emptyfilter`,{},function(){return[se(i(o.emptyFilterMessageText),1)]})],16)):!e.options||e.options&&e.options.length===0?(v(),k(`li`,E({key:1,class:e.cx(`emptyMessage`),role:`option`},e.ptm(`emptyMessage`),{"data-p-hidden-accessible":!0}),[m(e.$slots,`empty`,{},function(){return[se(i(o.emptyMessageText),1)]})],16)):_e(``,!0)],16,TD)]}),_:2},[e.$slots.loader?{name:`loader`,fn:Fe(function(t){var n=t.options;return[m(e.$slots,`loader`,{options:n})]}),key:`0`}:void 0]),1040,[`items`,`style`,`disabled`,`pt`])],16),m(e.$slots,`footer`,{value:e.d_value,options:o.visibleOptions}),!e.options||e.options&&e.options.length===0?(v(),k(`span`,E({key:1,role:`status`,"aria-live":`polite`,class:`p-hidden-accessible`},e.ptm(`hiddenEmptyMessage`),{"data-p-hidden-accessible":!0}),i(o.emptyMessageText),17)):_e(``,!0),A(`span`,E({role:`status`,"aria-live":`polite`,class:`p-hidden-accessible`},e.ptm(`hiddenSelectedMessage`),{"data-p-hidden-accessible":!0}),i(o.selectedMessageText),17),A(`span`,E({ref:`lastHiddenFocusableElementOnOverlay`,role:`presentation`,"aria-hidden":`true`,class:`p-hidden-accessible p-hidden-focusable`,tabindex:0,onFocus:t[9]||=function(){return o.onLastHiddenFocus&&o.onLastHiddenFocus.apply(o,arguments)}},e.ptm(`hiddenLastFocusableEl`),{"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0}),null,16)],16,wD)):_e(``,!0)]}),_:3},16,[`onEnter`,`onAfterEnter`,`onLeave`,`onAfterLeave`])]}),_:3},8,[`appendTo`])],16,xD)}bD.render=OD;var kD={name:`AngleDownIcon`,extends:rC};function AD(e){return PD(e)||ND(e)||MD(e)||jD()}function jD(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1654
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function MD(e,t){if(e){if(typeof e==`string`)return FD(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?FD(e,t):void 0}}function ND(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function PD(e){if(Array.isArray(e))return FD(e)}function FD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ID(e,t,n,r,i,a){return v(),k(`svg`,E({width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e.pti()),AD(t[0]||=[A(`path`,{d:`M3.58659 4.5007C3.68513 4.50023 3.78277 4.51945 3.87379 4.55723C3.9648 4.59501 4.04735 4.65058 4.11659 4.7207L7.11659 7.7207L10.1166 4.7207C10.2619 4.65055 10.4259 4.62911 10.5843 4.65956C10.7427 4.69002 10.8871 4.77074 10.996 4.88976C11.1049 5.00877 11.1726 5.15973 11.1889 5.32022C11.2052 5.48072 11.1693 5.6422 11.0866 5.7807L7.58659 9.2807C7.44597 9.42115 7.25534 9.50004 7.05659 9.50004C6.85784 9.50004 6.66722 9.42115 6.52659 9.2807L3.02659 5.7807C2.88614 5.64007 2.80725 5.44945 2.80725 5.2507C2.80725 5.05195 2.88614 4.86132 3.02659 4.7207C3.09932 4.64685 3.18675 4.58911 3.28322 4.55121C3.37969 4.51331 3.48305 4.4961 3.58659 4.5007Z`,fill:`currentColor`},null,-1)]),16)}kD.render=ID;var LD={name:`AngleUpIcon`,extends:rC};function RD(e){return HD(e)||VD(e)||BD(e)||zD()}function zD(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1655
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BD(e,t){if(e){if(typeof e==`string`)return UD(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?UD(e,t):void 0}}function VD(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function HD(e){if(Array.isArray(e))return UD(e)}function UD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function WD(e,t,n,r,i,a){return v(),k(`svg`,E({width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e.pti()),RD(t[0]||=[A(`path`,{d:`M10.4134 9.49931C10.3148 9.49977 10.2172 9.48055 10.1262 9.44278C10.0352 9.405 9.95263 9.34942 9.88338 9.27931L6.88338 6.27931L3.88338 9.27931C3.73811 9.34946 3.57409 9.3709 3.41567 9.34044C3.25724 9.30999 3.11286 9.22926 3.00395 9.11025C2.89504 8.99124 2.82741 8.84028 2.8111 8.67978C2.79478 8.51928 2.83065 8.35781 2.91338 8.21931L6.41338 4.71931C6.55401 4.57886 6.74463 4.49997 6.94338 4.49997C7.14213 4.49997 7.33276 4.57886 7.47338 4.71931L10.9734 8.21931C11.1138 8.35994 11.1927 8.55056 11.1927 8.74931C11.1927 8.94806 11.1138 9.13868 10.9734 9.27931C10.9007 9.35315 10.8132 9.41089 10.7168 9.44879C10.6203 9.48669 10.5169 9.5039 10.4134 9.49931Z`,fill:`currentColor`},null,-1)]),16)}LD.render=WD;var GD=ba.extend({name:`inputnumber`,style:`
|
|
1656
|
+
.p-inputnumber {
|
|
1657
|
+
display: inline-flex;
|
|
1658
|
+
position: relative;
|
|
1659
|
+
}
|
|
1660
|
+
|
|
1661
|
+
.p-inputnumber-button {
|
|
1662
|
+
display: flex;
|
|
1663
|
+
align-items: center;
|
|
1664
|
+
justify-content: center;
|
|
1665
|
+
flex: 0 0 auto;
|
|
1666
|
+
cursor: pointer;
|
|
1667
|
+
background: dt('inputnumber.button.background');
|
|
1668
|
+
color: dt('inputnumber.button.color');
|
|
1669
|
+
width: dt('inputnumber.button.width');
|
|
1670
|
+
transition:
|
|
1671
|
+
background dt('inputnumber.transition.duration'),
|
|
1672
|
+
color dt('inputnumber.transition.duration'),
|
|
1673
|
+
border-color dt('inputnumber.transition.duration'),
|
|
1674
|
+
outline-color dt('inputnumber.transition.duration');
|
|
1675
|
+
}
|
|
1676
|
+
|
|
1677
|
+
.p-inputnumber-button:disabled {
|
|
1678
|
+
cursor: auto;
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
.p-inputnumber-button:not(:disabled):hover {
|
|
1682
|
+
background: dt('inputnumber.button.hover.background');
|
|
1683
|
+
color: dt('inputnumber.button.hover.color');
|
|
1684
|
+
}
|
|
1685
|
+
|
|
1686
|
+
.p-inputnumber-button:not(:disabled):active {
|
|
1687
|
+
background: dt('inputnumber.button.active.background');
|
|
1688
|
+
color: dt('inputnumber.button.active.color');
|
|
1689
|
+
}
|
|
1690
|
+
|
|
1691
|
+
.p-inputnumber-stacked .p-inputnumber-button {
|
|
1692
|
+
position: relative;
|
|
1693
|
+
flex: 1 1 auto;
|
|
1694
|
+
border: 0 none;
|
|
1695
|
+
}
|
|
1696
|
+
|
|
1697
|
+
.p-inputnumber-stacked .p-inputnumber-button-group {
|
|
1698
|
+
display: flex;
|
|
1699
|
+
flex-direction: column;
|
|
1700
|
+
position: absolute;
|
|
1701
|
+
inset-block-start: 1px;
|
|
1702
|
+
inset-inline-end: 1px;
|
|
1703
|
+
height: calc(100% - 2px);
|
|
1704
|
+
z-index: 1;
|
|
1705
|
+
}
|
|
1706
|
+
|
|
1707
|
+
.p-inputnumber-stacked .p-inputnumber-increment-button {
|
|
1708
|
+
padding: 0;
|
|
1709
|
+
border-start-end-radius: calc(dt('inputnumber.button.border.radius') - 1px);
|
|
1710
|
+
}
|
|
1711
|
+
|
|
1712
|
+
.p-inputnumber-stacked .p-inputnumber-decrement-button {
|
|
1713
|
+
padding: 0;
|
|
1714
|
+
border-end-end-radius: calc(dt('inputnumber.button.border.radius') - 1px);
|
|
1715
|
+
}
|
|
1716
|
+
|
|
1717
|
+
.p-inputnumber-stacked .p-inputnumber-input {
|
|
1718
|
+
padding-inline-end: calc(dt('inputnumber.button.width') + dt('form.field.padding.x'));
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1721
|
+
.p-inputnumber-horizontal .p-inputnumber-button {
|
|
1722
|
+
border: 1px solid dt('inputnumber.button.border.color');
|
|
1723
|
+
}
|
|
1724
|
+
|
|
1725
|
+
.p-inputnumber-horizontal .p-inputnumber-button:hover {
|
|
1726
|
+
border-color: dt('inputnumber.button.hover.border.color');
|
|
1727
|
+
}
|
|
1728
|
+
|
|
1729
|
+
.p-inputnumber-horizontal .p-inputnumber-button:active {
|
|
1730
|
+
border-color: dt('inputnumber.button.active.border.color');
|
|
1731
|
+
}
|
|
1732
|
+
|
|
1733
|
+
.p-inputnumber-horizontal .p-inputnumber-increment-button {
|
|
1734
|
+
order: 3;
|
|
1735
|
+
border-start-end-radius: dt('inputnumber.button.border.radius');
|
|
1736
|
+
border-end-end-radius: dt('inputnumber.button.border.radius');
|
|
1737
|
+
border-inline-start: 0 none;
|
|
1738
|
+
}
|
|
1739
|
+
|
|
1740
|
+
.p-inputnumber-horizontal .p-inputnumber-input {
|
|
1741
|
+
order: 2;
|
|
1742
|
+
border-radius: 0;
|
|
1743
|
+
}
|
|
1744
|
+
|
|
1745
|
+
.p-inputnumber-horizontal .p-inputnumber-decrement-button {
|
|
1746
|
+
order: 1;
|
|
1747
|
+
border-start-start-radius: dt('inputnumber.button.border.radius');
|
|
1748
|
+
border-end-start-radius: dt('inputnumber.button.border.radius');
|
|
1749
|
+
border-inline-end: 0 none;
|
|
1750
|
+
}
|
|
1751
|
+
|
|
1752
|
+
.p-floatlabel:has(.p-inputnumber-horizontal) label {
|
|
1753
|
+
margin-inline-start: dt('inputnumber.button.width');
|
|
1754
|
+
}
|
|
1755
|
+
|
|
1756
|
+
.p-inputnumber-vertical {
|
|
1757
|
+
flex-direction: column;
|
|
1758
|
+
}
|
|
1759
|
+
|
|
1760
|
+
.p-inputnumber-vertical .p-inputnumber-button {
|
|
1761
|
+
border: 1px solid dt('inputnumber.button.border.color');
|
|
1762
|
+
padding: dt('inputnumber.button.vertical.padding');
|
|
1763
|
+
}
|
|
1764
|
+
|
|
1765
|
+
.p-inputnumber-vertical .p-inputnumber-button:hover {
|
|
1766
|
+
border-color: dt('inputnumber.button.hover.border.color');
|
|
1767
|
+
}
|
|
1768
|
+
|
|
1769
|
+
.p-inputnumber-vertical .p-inputnumber-button:active {
|
|
1770
|
+
border-color: dt('inputnumber.button.active.border.color');
|
|
1771
|
+
}
|
|
1772
|
+
|
|
1773
|
+
.p-inputnumber-vertical .p-inputnumber-increment-button {
|
|
1774
|
+
order: 1;
|
|
1775
|
+
border-start-start-radius: dt('inputnumber.button.border.radius');
|
|
1776
|
+
border-start-end-radius: dt('inputnumber.button.border.radius');
|
|
1777
|
+
width: 100%;
|
|
1778
|
+
border-block-end: 0 none;
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
.p-inputnumber-vertical .p-inputnumber-input {
|
|
1782
|
+
order: 2;
|
|
1783
|
+
border-radius: 0;
|
|
1784
|
+
text-align: center;
|
|
1785
|
+
}
|
|
1786
|
+
|
|
1787
|
+
.p-inputnumber-vertical .p-inputnumber-decrement-button {
|
|
1788
|
+
order: 3;
|
|
1789
|
+
border-end-start-radius: dt('inputnumber.button.border.radius');
|
|
1790
|
+
border-end-end-radius: dt('inputnumber.button.border.radius');
|
|
1791
|
+
width: 100%;
|
|
1792
|
+
border-block-start: 0 none;
|
|
1793
|
+
}
|
|
1794
|
+
|
|
1795
|
+
.p-inputnumber-input {
|
|
1796
|
+
flex: 1 1 auto;
|
|
1797
|
+
}
|
|
1798
|
+
|
|
1799
|
+
.p-inputnumber-fluid {
|
|
1800
|
+
width: 100%;
|
|
1801
|
+
}
|
|
1802
|
+
|
|
1803
|
+
.p-inputnumber-fluid .p-inputnumber-input {
|
|
1804
|
+
width: 1%;
|
|
1805
|
+
}
|
|
1806
|
+
|
|
1807
|
+
.p-inputnumber-fluid.p-inputnumber-vertical .p-inputnumber-input {
|
|
1808
|
+
width: 100%;
|
|
1809
|
+
}
|
|
1810
|
+
|
|
1811
|
+
.p-inputnumber:has(.p-inputtext-sm) .p-inputnumber-button .p-icon {
|
|
1812
|
+
font-size: dt('form.field.sm.font.size');
|
|
1813
|
+
width: dt('form.field.sm.font.size');
|
|
1814
|
+
height: dt('form.field.sm.font.size');
|
|
1815
|
+
}
|
|
1816
|
+
|
|
1817
|
+
.p-inputnumber:has(.p-inputtext-lg) .p-inputnumber-button .p-icon {
|
|
1818
|
+
font-size: dt('form.field.lg.font.size');
|
|
1819
|
+
width: dt('form.field.lg.font.size');
|
|
1820
|
+
height: dt('form.field.lg.font.size');
|
|
1821
|
+
}
|
|
1822
|
+
|
|
1823
|
+
.p-inputnumber-clear-icon {
|
|
1824
|
+
position: absolute;
|
|
1825
|
+
top: 50%;
|
|
1826
|
+
margin-top: -0.5rem;
|
|
1827
|
+
cursor: pointer;
|
|
1828
|
+
inset-inline-end: dt('form.field.padding.x');
|
|
1829
|
+
color: dt('form.field.icon.color');
|
|
1830
|
+
}
|
|
1831
|
+
|
|
1832
|
+
.p-inputnumber:has(.p-inputnumber-clear-icon) .p-inputnumber-input {
|
|
1833
|
+
padding-inline-end: calc((dt('form.field.padding.x') * 2) + dt('icon.size'));
|
|
1834
|
+
}
|
|
1835
|
+
|
|
1836
|
+
.p-inputnumber-stacked .p-inputnumber-clear-icon {
|
|
1837
|
+
inset-inline-end: calc(dt('inputnumber.button.width') + dt('form.field.padding.x'));
|
|
1838
|
+
}
|
|
1839
|
+
|
|
1840
|
+
.p-inputnumber-stacked:has(.p-inputnumber-clear-icon) .p-inputnumber-input {
|
|
1841
|
+
padding-inline-end: calc(dt('inputnumber.button.width') + (dt('form.field.padding.x') * 2) + dt('icon.size'));
|
|
1842
|
+
}
|
|
1843
|
+
|
|
1844
|
+
.p-inputnumber-horizontal .p-inputnumber-clear-icon {
|
|
1845
|
+
inset-inline-end: calc(dt('inputnumber.button.width') + dt('form.field.padding.x'));
|
|
1846
|
+
}
|
|
1847
|
+
`,classes:{root:function(e){var t=e.instance,n=e.props;return[`p-inputnumber p-component p-inputwrapper`,{"p-invalid":t.$invalid,"p-inputwrapper-filled":t.$filled||n.allowEmpty===!1,"p-inputwrapper-focus":t.focused,"p-inputnumber-stacked":n.showButtons&&n.buttonLayout===`stacked`,"p-inputnumber-horizontal":n.showButtons&&n.buttonLayout===`horizontal`,"p-inputnumber-vertical":n.showButtons&&n.buttonLayout===`vertical`,"p-inputnumber-fluid":t.$fluid}]},pcInputText:`p-inputnumber-input`,clearIcon:`p-inputnumber-clear-icon`,buttonGroup:`p-inputnumber-button-group`,incrementButton:function(e){var t=e.instance,n=e.props;return[`p-inputnumber-button p-inputnumber-increment-button`,{"p-disabled":n.showButtons&&n.max!==null&&t.maxBoundry()}]},decrementButton:function(e){var t=e.instance,n=e.props;return[`p-inputnumber-button p-inputnumber-decrement-button`,{"p-disabled":n.showButtons&&n.min!==null&&t.minBoundry()}]}}}),KD={name:`BaseInputNumber`,extends:zE,props:{format:{type:Boolean,default:!0},showButtons:{type:Boolean,default:!1},buttonLayout:{type:String,default:`stacked`},incrementButtonClass:{type:String,default:null},decrementButtonClass:{type:String,default:null},incrementButtonIcon:{type:String,default:void 0},incrementIcon:{type:String,default:void 0},decrementButtonIcon:{type:String,default:void 0},decrementIcon:{type:String,default:void 0},locale:{type:String,default:void 0},localeMatcher:{type:String,default:void 0},mode:{type:String,default:`decimal`},prefix:{type:String,default:null},suffix:{type:String,default:null},currency:{type:String,default:void 0},currencyDisplay:{type:String,default:void 0},useGrouping:{type:Boolean,default:!0},minFractionDigits:{type:Number,default:void 0},maxFractionDigits:{type:Number,default:void 0},roundingMode:{type:String,default:`halfExpand`,validator:function(e){return[`ceil`,`floor`,`expand`,`trunc`,`halfCeil`,`halfFloor`,`halfExpand`,`halfTrunc`,`halfEven`].includes(e)}},min:{type:Number,default:null},max:{type:Number,default:null},step:{type:Number,default:1},allowEmpty:{type:Boolean,default:!0},highlightOnFocus:{type:Boolean,default:!1},showClear:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},placeholder:{type:String,default:null},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null},required:{type:Boolean,default:!1}},style:GD,provide:function(){return{$pcInputNumber:this,$parentInstance:this}}};function qD(e){"@babel/helpers - typeof";return qD=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},qD(e)}function JD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function YD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?JD(Object(n),!0).forEach(function(t){XD(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function XD(e,t,n){return(t=ZD(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZD(e){var t=QD(e,`string`);return qD(t)==`symbol`?t:t+``}function QD(e,t){if(qD(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(qD(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function $D(e){return rO(e)||nO(e)||tO(e)||eO()}function eO(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1848
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tO(e,t){if(e){if(typeof e==`string`)return iO(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?iO(e,t):void 0}}function nO(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function rO(e){if(Array.isArray(e))return iO(e)}function iO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var aO={name:`InputNumber`,extends:KD,inheritAttrs:!1,emits:[`input`,`focus`,`blur`],inject:{$pcFluid:{default:null}},numberFormat:null,_numeral:null,_decimal:null,_group:null,_minusSign:null,_currency:null,_suffix:null,_prefix:null,_index:null,groupChar:``,isSpecialChar:null,prefixChar:null,suffixChar:null,timer:null,data:function(){return{d_modelValue:this.d_value,focused:!1}},watch:{d_value:{immediate:!0,handler:function(e){var t;this.d_modelValue=e,(t=this.$refs.clearIcon)!=null&&(t=t.$el)!=null&&t.style&&(this.$refs.clearIcon.$el.style.display=Ir(e)?`none`:`block`)}},locale:function(e,t){this.updateConstructParser(e,t)},localeMatcher:function(e,t){this.updateConstructParser(e,t)},mode:function(e,t){this.updateConstructParser(e,t)},currency:function(e,t){this.updateConstructParser(e,t)},currencyDisplay:function(e,t){this.updateConstructParser(e,t)},useGrouping:function(e,t){this.updateConstructParser(e,t)},minFractionDigits:function(e,t){this.updateConstructParser(e,t)},maxFractionDigits:function(e,t){this.updateConstructParser(e,t)},suffix:function(e,t){this.updateConstructParser(e,t)},prefix:function(e,t){this.updateConstructParser(e,t)}},created:function(){this.constructParser()},mounted:function(){var e;(e=this.$refs.clearIcon)!=null&&(e=e.$el)!=null&&e.style&&(this.$refs.clearIcon.$el.style.display=this.$filled?`block`:`none`)},methods:{getOptions:function(){return{localeMatcher:this.localeMatcher,style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,useGrouping:this.useGrouping,minimumFractionDigits:this.minFractionDigits,maximumFractionDigits:this.maxFractionDigits,roundingMode:this.roundingMode}},constructParser:function(){this.numberFormat=new Intl.NumberFormat(this.locale,this.getOptions());var e=$D(new Intl.NumberFormat(this.locale,{useGrouping:!1}).format(9876543210)).reverse(),t=new Map(e.map(function(e,t){return[e,t]}));this._numeral=RegExp(`[${e.join(``)}]`,`g`),this._group=this.getGroupingExpression(),this._minusSign=this.getMinusSignExpression(),this._currency=this.getCurrencyExpression(),this._decimal=this.getDecimalExpression(),this._suffix=this.getSuffixExpression(),this._prefix=this.getPrefixExpression(),this._index=function(e){return t.get(e)}},updateConstructParser:function(e,t){e!==t&&this.constructParser()},escapeRegExp:function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`)},getDecimalExpression:function(){var e=new Intl.NumberFormat(this.locale,YD(YD({},this.getOptions()),{},{useGrouping:!1}));return RegExp(`[${e.format(1.1).replace(this._currency,``).trim().replace(this._numeral,``)}]`,`g`)},getGroupingExpression:function(){return this.groupChar=new Intl.NumberFormat(this.locale,{useGrouping:!0}).format(1e6).trim().replace(this._numeral,``).charAt(0),RegExp(`[${this.groupChar}]`,`g`)},getMinusSignExpression:function(){var e=new Intl.NumberFormat(this.locale,{useGrouping:!1});return RegExp(`[${e.format(-1).trim().replace(this._numeral,``)}]`,`g`)},getCurrencyExpression:function(){if(this.currency){var e=new Intl.NumberFormat(this.locale,{style:`currency`,currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0,roundingMode:this.roundingMode});return RegExp(`[${e.format(1).replace(/\s/g,``).replace(this._numeral,``).replace(this._group,``)}]`,`g`)}return RegExp(`[]`,`g`)},getPrefixExpression:function(){return this.prefix?this.prefixChar=this.prefix:this.prefixChar=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay}).format(1).split(`1`)[0],RegExp(`${this.escapeRegExp(this.prefixChar||``)}`,`g`)},getSuffixExpression:function(){return this.suffix?this.suffixChar=this.suffix:this.suffixChar=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0,roundingMode:this.roundingMode}).format(1).split(`1`)[1],RegExp(`${this.escapeRegExp(this.suffixChar||``)}`,`g`)},formatValue:function(e){if(e!=null){if(e===`-`)return e;if(this.format){var t=new Intl.NumberFormat(this.locale,this.getOptions()).format(e);return this.prefix&&(t=this.prefix+t),this.suffix&&(t+=this.suffix),t}return e.toString()}return``},parseValue:function(e){var t=e.replace(this._suffix,``).replace(this._prefix,``).trim().replace(/\s/g,``).replace(this._currency,``).replace(this._group,``).replace(this._minusSign,`-`).replace(this._decimal,`.`).replace(this._numeral,this._index);if(t){if(t===`-`)return t;var n=+t;return isNaN(n)?null:n}return null},repeat:function(e,t,n){var r=this;if(!this.readonly){var i=t||500;this.clearTimer(),this.timer=setTimeout(function(){r.repeat(e,40,n)},i),this.spin(e,n)}},addWithPrecision:function(e,t){var n=e.toString(),r=t.toString(),i=n.includes(`.`)?n.split(`.`)[1].length:0,a=r.includes(`.`)?r.split(`.`)[1].length:0,o=10**Math.max(i,a);return Math.round((e+t)*o)/o},spin:function(e,t){if(this.$refs.input){var n=this.step*t,r=this.parseValue(this.$refs.input.$el.value)||0,i=this.validateValue(this.addWithPrecision(r,n));this.updateInput(i,null,`spin`),this.updateModel(e,i),this.handleOnInput(e,r,i)}},onUpButtonMouseDown:function(e){this.disabled||(this.$refs.input.$el.focus(),this.repeat(e,null,1),e.preventDefault())},onUpButtonMouseUp:function(){this.disabled||this.clearTimer()},onUpButtonMouseLeave:function(){this.disabled||this.clearTimer()},onUpButtonKeyUp:function(){this.disabled||this.clearTimer()},onUpButtonKeyDown:function(e){(e.code===`Space`||e.code===`Enter`||e.code===`NumpadEnter`)&&this.repeat(e,null,1)},onDownButtonMouseDown:function(e){this.disabled||(this.$refs.input.$el.focus(),this.repeat(e,null,-1),e.preventDefault())},onDownButtonMouseUp:function(){this.disabled||this.clearTimer()},onDownButtonMouseLeave:function(){this.disabled||this.clearTimer()},onDownButtonKeyUp:function(){this.disabled||this.clearTimer()},onDownButtonKeyDown:function(e){(e.code===`Space`||e.code===`Enter`||e.code===`NumpadEnter`)&&this.repeat(e,null,-1)},onUserInput:function(){this.isSpecialChar&&(this.$refs.input.$el.value=this.lastValue),this.isSpecialChar=!1},onInputKeyDown:function(e){if(!this.readonly&&!e.isComposing){if(e.altKey||e.ctrlKey||e.metaKey){this.isSpecialChar=!0,this.lastValue=this.$refs.input.$el.value;return}this.lastValue=e.target.value;var t=e.target.selectionStart,n=e.target.selectionEnd,r=n-t,i=e.target.value,a=null;switch(e.code||e.key){case`ArrowUp`:this.spin(e,1),e.preventDefault();break;case`ArrowDown`:this.spin(e,-1),e.preventDefault();break;case`ArrowLeft`:if(r>1){var o=this.isNumeralChar(i.charAt(t))?t+1:t+2;this.$refs.input.$el.setSelectionRange(o,o)}else this.isNumeralChar(i.charAt(t-1))||e.preventDefault();break;case`ArrowRight`:if(r>1){var s=n-1;this.$refs.input.$el.setSelectionRange(s,s)}else this.isNumeralChar(i.charAt(t))||e.preventDefault();break;case`Tab`:case`Enter`:case`NumpadEnter`:a=this.validateValue(this.parseValue(i)),this.$refs.input.$el.value=this.formatValue(a),this.$refs.input.$el.setAttribute(`aria-valuenow`,a),this.updateModel(e,a);break;case`Backspace`:if(e.preventDefault(),t===n){t>=i.length&&this.suffixChar!==null&&(t=i.length-this.suffixChar.length,this.$refs.input.$el.setSelectionRange(t,t));var c=i.charAt(t-1),l=this.getDecimalCharIndexes(i),u=l.decimalCharIndex,d=l.decimalCharIndexWithoutPrefix;if(this.isNumeralChar(c)){var f=this.getDecimalLength(i);if(this._group.test(c))this._group.lastIndex=0,a=i.slice(0,t-2)+i.slice(t-1);else if(this._decimal.test(c))this._decimal.lastIndex=0,f?this.$refs.input.$el.setSelectionRange(t-1,t-1):a=i.slice(0,t-1)+i.slice(t);else if(u>0&&t>u){var p=this.isDecimalMode()&&(this.minFractionDigits||0)<f?``:`0`;a=i.slice(0,t-1)+p+i.slice(t)}else d===1?(a=i.slice(0,t-1)+`0`+i.slice(t),a=this.parseValue(a)>0?a:``):a=i.slice(0,t-1)+i.slice(t)}this.updateValue(e,a,null,`delete-single`)}else a=this.deleteRange(i,t,n),this.updateValue(e,a,null,`delete-range`);break;case`Delete`:if(e.preventDefault(),t===n){var m=i.charAt(t),h=this.getDecimalCharIndexes(i),g=h.decimalCharIndex,_=h.decimalCharIndexWithoutPrefix;if(this.isNumeralChar(m)){var v=this.getDecimalLength(i);if(this._group.test(m))this._group.lastIndex=0,a=i.slice(0,t)+i.slice(t+2);else if(this._decimal.test(m))this._decimal.lastIndex=0,v?this.$refs.input.$el.setSelectionRange(t+1,t+1):a=i.slice(0,t)+i.slice(t+1);else if(g>0&&t>g){var y=this.isDecimalMode()&&(this.minFractionDigits||0)<v?``:`0`;a=i.slice(0,t)+y+i.slice(t+1)}else _===1?(a=i.slice(0,t)+`0`+i.slice(t+1),a=this.parseValue(a)>0?a:``):a=i.slice(0,t)+i.slice(t+1)}this.updateValue(e,a,null,`delete-back-single`)}else a=this.deleteRange(i,t,n),this.updateValue(e,a,null,`delete-range`);break;case`Home`:e.preventDefault(),j(this.min)&&this.updateModel(e,this.min);break;case`End`:e.preventDefault(),j(this.max)&&this.updateModel(e,this.max);break}}},onInputKeyPress:function(e){if(!this.readonly){var t=e.key,n=this.isDecimalSign(t),r=this.isMinusSign(t);e.code!==`Enter`&&e.preventDefault(),(Number(t)>=0&&Number(t)<=9||r||n)&&this.insert(e,t,{isDecimalSign:n,isMinusSign:r})}},onPaste:function(e){if(!this.readonly){e.preventDefault();var t=(e.clipboardData||window.clipboardData).getData(`Text`);if(!(this.inputId===`integeronly`&&/[^\d-]/.test(t))&&t){var n=this.parseValue(t);n!=null&&this.insert(e,n.toString())}}},onClearClick:function(e){this.updateModel(e,null),this.$refs.input.$el.focus()},allowMinusSign:function(){return this.min===null||this.min<0},isMinusSign:function(e){return this._minusSign.test(e)||e===`-`?(this._minusSign.lastIndex=0,!0):!1},isDecimalSign:function(e){var t;return(t=this.locale)!=null&&t.includes(`fr`)&&[`.`,`,`].includes(e)||this._decimal.test(e)?(this._decimal.lastIndex=0,!0):!1},isDecimalMode:function(){return this.mode===`decimal`},getDecimalCharIndexes:function(e){var t=e.search(this._decimal);this._decimal.lastIndex=0;var n=e.replace(this._prefix,``).trim().replace(/\s/g,``).replace(this._currency,``).search(this._decimal);return this._decimal.lastIndex=0,{decimalCharIndex:t,decimalCharIndexWithoutPrefix:n}},getCharIndexes:function(e){var t=e.search(this._decimal);this._decimal.lastIndex=0;var n=e.search(this._minusSign);this._minusSign.lastIndex=0;var r=e.search(this._suffix);this._suffix.lastIndex=0;var i=e.search(this._currency);return this._currency.lastIndex=0,{decimalCharIndex:t,minusCharIndex:n,suffixCharIndex:r,currencyCharIndex:i}},insert:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{isDecimalSign:!1,isMinusSign:!1},r=t.search(this._minusSign);if(this._minusSign.lastIndex=0,!(!this.allowMinusSign()&&r!==-1)){var i=this.$refs.input.$el.selectionStart,a=this.$refs.input.$el.selectionEnd,o=this.$refs.input.$el.value.trim(),s=this.getCharIndexes(o),c=s.decimalCharIndex,l=s.minusCharIndex,u=s.suffixCharIndex,d=s.currencyCharIndex,f;if(n.isMinusSign){var p=l===-1;(i===0||i===d+1)&&(f=o,(p||a!==0)&&(f=this.insertText(o,t,0,a)),this.updateValue(e,f,t,`insert`))}else if(n.isDecimalSign)c>0&&i===c?this.updateValue(e,o,t,`insert`):(c>i&&c<a||c===-1&&this.maxFractionDigits)&&(f=this.insertText(o,t,i,a),this.updateValue(e,f,t,`insert`));else{var m=this.numberFormat.resolvedOptions().maximumFractionDigits,h=i===a?`insert`:`range-insert`;if(c>0&&i>c){if(i+t.length-(c+1)<=m){var g=d>=i?d-1:u>=i?u:o.length;f=o.slice(0,i)+t+o.slice(i+t.length,g)+o.slice(g),this.updateValue(e,f,t,h)}}else f=this.insertText(o,t,i,a),this.updateValue(e,f,t,h)}}},insertText:function(e,t,n,r){if((t===`.`?t:t.split(`.`)).length===2){var i=e.slice(n,r).search(this._decimal);return this._decimal.lastIndex=0,i>0?e.slice(0,n)+this.formatValue(t)+e.slice(r):this.formatValue(t)||e}else if(r-n===e.length)return this.formatValue(t);else if(n===0)return t+e.slice(r);else if(r===e.length)return e.slice(0,n)+t;else return e.slice(0,n)+t+e.slice(r)},deleteRange:function(e,t,n){return n-t===e.length?``:t===0?e.slice(n):n===e.length?e.slice(0,t):e.slice(0,t)+e.slice(n)},initCursor:function(){var e=this.$refs.input.$el.selectionStart,t=this.$refs.input.$el.value,n=t.length,r=null,i=(this.prefixChar||``).length;t=t.replace(this._prefix,``),e-=i;var a=t.charAt(e);if(this.isNumeralChar(a))return e+i;for(var o=e-1;o>=0;)if(a=t.charAt(o),this.isNumeralChar(a)){r=o+i;break}else o--;if(r!==null)this.$refs.input.$el.setSelectionRange(r+1,r+1);else{for(o=e;o<n;)if(a=t.charAt(o),this.isNumeralChar(a)){r=o+i;break}else o++;r!==null&&this.$refs.input.$el.setSelectionRange(r,r)}return r||0},onInputClick:function(){var e=this.$refs.input.$el.value;!this.readonly&&e!==yr()&&this.initCursor()},isNumeralChar:function(e){return e.length===1&&(this._numeral.test(e)||this._decimal.test(e)||this._group.test(e)||this._minusSign.test(e))?(this.resetRegex(),!0):!1},resetRegex:function(){this._numeral.lastIndex=0,this._decimal.lastIndex=0,this._group.lastIndex=0,this._minusSign.lastIndex=0},updateValue:function(e,t,n,r){var i=this.$refs.input.$el.value,a=null;t!=null&&(a=this.parseValue(t),a=!a&&!this.allowEmpty?0:a,this.updateInput(a,n,r,t),this.handleOnInput(e,i,a))},handleOnInput:function(e,t,n){if(this.isValueChanged(t,n)){var r,i;this.$emit(`input`,{originalEvent:e,value:n,formattedValue:t}),(r=(i=this.formField).onInput)==null||r.call(i,{originalEvent:e,value:n})}},isValueChanged:function(e,t){return t===null&&e!==null?!0:t==null?!1:t!==(typeof e==`string`?this.parseValue(e):e)},validateValue:function(e){return e===`-`||e==null?null:this.min!=null&&e<this.min?this.min:this.max!=null&&e>this.max?this.max:e},updateInput:function(e,t,n,r){var i;t||=``;var a=this.$refs.input.$el.value,o=this.formatValue(e),s=a.length;if(o!==r&&(o=this.concatValues(o,r)),s===0){this.$refs.input.$el.value=o,this.$refs.input.$el.setSelectionRange(0,0);var c=this.initCursor()+t.length;this.$refs.input.$el.setSelectionRange(c,c)}else{var l=this.$refs.input.$el.selectionStart,u=this.$refs.input.$el.selectionEnd;this.$refs.input.$el.value=o;var d=o.length;if(n===`range-insert`){var f=this.parseValue((a||``).slice(0,l)),p=(f===null?``:f.toString()).split(``).join(`(${this.groupChar})?`),m=new RegExp(p,`g`);m.test(o);var h=t.split(``).join(`(${this.groupChar})?`),g=new RegExp(h,`g`);g.test(o.slice(m.lastIndex)),u=m.lastIndex+g.lastIndex,this.$refs.input.$el.setSelectionRange(u,u)}else if(d===s)n===`insert`||n===`delete-back-single`?this.$refs.input.$el.setSelectionRange(u+1,u+1):n===`delete-single`?this.$refs.input.$el.setSelectionRange(u-1,u-1):(n===`delete-range`||n===`spin`)&&this.$refs.input.$el.setSelectionRange(u,u);else if(n===`delete-back-single`){var _=a.charAt(u-1),v=a.charAt(u),y=s-d,b=this._group.test(v);b&&y===1?u+=1:!b&&this.isNumeralChar(_)&&(u+=-1*y+1),this._group.lastIndex=0,this.$refs.input.$el.setSelectionRange(u,u)}else if(a===`-`&&n===`insert`){this.$refs.input.$el.setSelectionRange(0,0);var x=this.initCursor()+t.length+1;this.$refs.input.$el.setSelectionRange(x,x)}else u+=d-s,this.$refs.input.$el.setSelectionRange(u,u)}this.$refs.input.$el.setAttribute(`aria-valuenow`,e),(i=this.$refs.clearIcon)!=null&&(i=i.$el)!=null&&i.style&&(this.$refs.clearIcon.$el.style.display=Ir(o)?`none`:`block`)},concatValues:function(e,t){if(e&&t){var n=t.search(this._decimal);return this._decimal.lastIndex=0,this.suffixChar?n===-1?e:e.replace(this.suffixChar,``).split(this._decimal)[0]+t.replace(this.suffixChar,``).slice(n)+this.suffixChar:n===-1?e:e.split(this._decimal)[0]+t.slice(n)}return e},getDecimalLength:function(e){if(e){var t=e.split(this._decimal);if(t.length===2)return t[1].replace(this._suffix,``).trim().replace(/\s/g,``).replace(this._currency,``).length}return 0},updateModel:function(e,t){this.writeValue(t,e)},onInputFocus:function(e){this.focused=!0,!this.disabled&&!this.readonly&&this.$refs.input.$el.value!==yr()&&this.highlightOnFocus&&e.target.select(),this.$emit(`focus`,e)},onInputBlur:function(e){var t,n;this.focused=!1;var r=e.target,i=this.validateValue(this.parseValue(r.value));this.$emit(`blur`,{originalEvent:e,value:r.value}),(t=(n=this.formField).onBlur)==null||t.call(n,e),r.value=this.formatValue(i),r.setAttribute(`aria-valuenow`,i),this.updateModel(e,i),!this.disabled&&!this.readonly&&this.highlightOnFocus&&Qn()},clearTimer:function(){this.timer&&clearTimeout(this.timer)},maxBoundry:function(){return this.d_value>=this.max},minBoundry:function(){return this.d_value<=this.min}},computed:{upButtonListeners:function(){var e=this;return{mousedown:function(t){return e.onUpButtonMouseDown(t)},mouseup:function(t){return e.onUpButtonMouseUp(t)},mouseleave:function(t){return e.onUpButtonMouseLeave(t)},keydown:function(t){return e.onUpButtonKeyDown(t)},keyup:function(t){return e.onUpButtonKeyUp(t)}}},downButtonListeners:function(){var e=this;return{mousedown:function(t){return e.onDownButtonMouseDown(t)},mouseup:function(t){return e.onDownButtonMouseUp(t)},mouseleave:function(t){return e.onDownButtonMouseLeave(t)},keydown:function(t){return e.onDownButtonKeyDown(t)},keyup:function(t){return e.onDownButtonKeyUp(t)}}},formattedValue:function(){var e=!this.d_value&&!this.allowEmpty?0:this.d_value;return this.formatValue(e)},getFormatter:function(){return this.numberFormat},dataP:function(){return kn(XD(XD({invalid:this.$invalid,fluid:this.$fluid,filled:this.$variant===`filled`},this.size,this.size),this.buttonLayout,this.showButtons&&this.buttonLayout))}},components:{InputText:GE,AngleUpIcon:LD,AngleDownIcon:kD,TimesIcon:eT}},oO=[`data-p`],sO=[`data-p`],cO=[`disabled`,`data-p`],lO=[`disabled`,`data-p`],uO=[`disabled`,`data-p`],dO=[`disabled`,`data-p`];function fO(e,t,n,r,i,a){var o=_(`InputText`),s=_(`TimesIcon`);return v(),k(`span`,E({class:e.cx(`root`)},e.ptmi(`root`),{"data-p":a.dataP}),[Ue(o,{ref:`input`,id:e.inputId,name:e.$formName,role:`spinbutton`,class:c([e.cx(`pcInputText`),e.inputClass]),style:Ee(e.inputStyle),defaultValue:a.formattedValue,"aria-valuemin":e.min,"aria-valuemax":e.max,"aria-valuenow":e.d_value,inputmode:e.mode===`decimal`&&!e.minFractionDigits?`numeric`:`decimal`,disabled:e.disabled,readonly:e.readonly,placeholder:e.placeholder,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,required:e.required,size:e.size,invalid:e.invalid,variant:e.variant,onInput:a.onUserInput,onKeydown:a.onInputKeyDown,onKeypress:a.onInputKeyPress,onPaste:a.onPaste,onClick:a.onInputClick,onFocus:a.onInputFocus,onBlur:a.onInputBlur,pt:e.ptm(`pcInputText`),unstyled:e.unstyled,"data-p":a.dataP},null,8,`id.name.class.style.defaultValue.aria-valuemin.aria-valuemax.aria-valuenow.inputmode.disabled.readonly.placeholder.aria-labelledby.aria-label.required.size.invalid.variant.onInput.onKeydown.onKeypress.onPaste.onClick.onFocus.onBlur.pt.unstyled.data-p`.split(`.`)),e.showClear&&e.buttonLayout!==`vertical`?m(e.$slots,`clearicon`,{key:0,class:c(e.cx(`clearIcon`)),clearCallback:a.onClearClick},function(){return[Ue(s,E({ref:`clearIcon`,class:[e.cx(`clearIcon`)],onClick:a.onClearClick},e.ptm(`clearIcon`)),null,16,[`class`,`onClick`])]}):_e(``,!0),e.showButtons&&e.buttonLayout===`stacked`?(v(),k(`span`,E({key:1,class:e.cx(`buttonGroup`)},e.ptm(`buttonGroup`),{"data-p":a.dataP}),[m(e.$slots,`incrementbutton`,{listeners:a.upButtonListeners},function(){return[A(`button`,E({class:[e.cx(`incrementButton`),e.incrementButtonClass]},p(a.upButtonListeners,!0),{disabled:e.disabled,tabindex:-1,"aria-hidden":`true`,type:`button`},e.ptm(`incrementButton`),{"data-p":a.dataP}),[m(e.$slots,e.$slots.incrementicon?`incrementicon`:`incrementbuttonicon`,{},function(){return[(v(),he(Ze(e.incrementIcon||e.incrementButtonIcon?`span`:`AngleUpIcon`),E({class:[e.incrementIcon,e.incrementButtonIcon]},e.ptm(`incrementIcon`),{"data-pc-section":`incrementicon`}),null,16,[`class`]))]})],16,cO)]}),m(e.$slots,`decrementbutton`,{listeners:a.downButtonListeners},function(){return[A(`button`,E({class:[e.cx(`decrementButton`),e.decrementButtonClass]},p(a.downButtonListeners,!0),{disabled:e.disabled,tabindex:-1,"aria-hidden":`true`,type:`button`},e.ptm(`decrementButton`),{"data-p":a.dataP}),[m(e.$slots,e.$slots.decrementicon?`decrementicon`:`decrementbuttonicon`,{},function(){return[(v(),he(Ze(e.decrementIcon||e.decrementButtonIcon?`span`:`AngleDownIcon`),E({class:[e.decrementIcon,e.decrementButtonIcon]},e.ptm(`decrementIcon`),{"data-pc-section":`decrementicon`}),null,16,[`class`]))]})],16,lO)]})],16,sO)):_e(``,!0),m(e.$slots,`incrementbutton`,{listeners:a.upButtonListeners},function(){return[e.showButtons&&e.buttonLayout!==`stacked`?(v(),k(`button`,E({key:0,class:[e.cx(`incrementButton`),e.incrementButtonClass]},p(a.upButtonListeners,!0),{disabled:e.disabled,tabindex:-1,"aria-hidden":`true`,type:`button`},e.ptm(`incrementButton`),{"data-p":a.dataP}),[m(e.$slots,e.$slots.incrementicon?`incrementicon`:`incrementbuttonicon`,{},function(){return[(v(),he(Ze(e.incrementIcon||e.incrementButtonIcon?`span`:`AngleUpIcon`),E({class:[e.incrementIcon,e.incrementButtonIcon]},e.ptm(`incrementIcon`),{"data-pc-section":`incrementicon`}),null,16,[`class`]))]})],16,uO)):_e(``,!0)]}),m(e.$slots,`decrementbutton`,{listeners:a.downButtonListeners},function(){return[e.showButtons&&e.buttonLayout!==`stacked`?(v(),k(`button`,E({key:0,class:[e.cx(`decrementButton`),e.decrementButtonClass]},p(a.downButtonListeners,!0),{disabled:e.disabled,tabindex:-1,"aria-hidden":`true`,type:`button`},e.ptm(`decrementButton`),{"data-p":a.dataP}),[m(e.$slots,e.$slots.decrementicon?`decrementicon`:`decrementbuttonicon`,{},function(){return[(v(),he(Ze(e.decrementIcon||e.decrementButtonIcon?`span`:`AngleDownIcon`),E({class:[e.decrementIcon,e.decrementButtonIcon]},e.ptm(`decrementIcon`),{"data-pc-section":`decrementicon`}),null,16,[`class`]))]})],16,dO)):_e(``,!0)]})],16,oO)}aO.render=fO;var pO={name:`ChevronRightIcon`,extends:rC};function mO(e){return vO(e)||_O(e)||gO(e)||hO()}function hO(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1849
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gO(e,t){if(e){if(typeof e==`string`)return yO(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yO(e,t):void 0}}function _O(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function vO(e){if(Array.isArray(e))return yO(e)}function yO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function bO(e,t,n,r,i,a){return v(),k(`svg`,E({width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e.pti()),mO(t[0]||=[A(`path`,{d:`M4.38708 13C4.28408 13.0005 4.18203 12.9804 4.08691 12.9409C3.99178 12.9014 3.9055 12.8433 3.83313 12.7701C3.68634 12.6231 3.60388 12.4238 3.60388 12.2161C3.60388 12.0084 3.68634 11.8091 3.83313 11.6622L8.50507 6.99022L3.83313 2.31827C3.69467 2.16968 3.61928 1.97313 3.62287 1.77005C3.62645 1.56698 3.70872 1.37322 3.85234 1.22959C3.99596 1.08597 4.18972 1.00371 4.3928 1.00012C4.59588 0.996539 4.79242 1.07192 4.94102 1.21039L10.1669 6.43628C10.3137 6.58325 10.3962 6.78249 10.3962 6.99022C10.3962 7.19795 10.3137 7.39718 10.1669 7.54416L4.94102 12.7701C4.86865 12.8433 4.78237 12.9014 4.68724 12.9409C4.59212 12.9804 4.49007 13.0005 4.38708 13Z`,fill:`currentColor`},null,-1)]),16)}pO.render=bO;var xO={name:`MinusIcon`,extends:rC};function SO(e){return EO(e)||TO(e)||wO(e)||CO()}function CO(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1850
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wO(e,t){if(e){if(typeof e==`string`)return DO(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?DO(e,t):void 0}}function TO(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function EO(e){if(Array.isArray(e))return DO(e)}function DO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function OO(e,t,n,r,i,a){return v(),k(`svg`,E({width:`14`,height:`14`,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},e.pti()),SO(t[0]||=[A(`path`,{d:`M13.2222 7.77778H0.777778C0.571498 7.77778 0.373667 7.69584 0.227806 7.54998C0.0819442 7.40412 0 7.20629 0 7.00001C0 6.79373 0.0819442 6.5959 0.227806 6.45003C0.373667 6.30417 0.571498 6.22223 0.777778 6.22223H13.2222C13.4285 6.22223 13.6263 6.30417 13.7722 6.45003C13.9181 6.5959 14 6.79373 14 7.00001C14 7.20629 13.9181 7.40412 13.7722 7.54998C13.6263 7.69584 13.4285 7.77778 13.2222 7.77778Z`,fill:`currentColor`},null,-1)]),16)}xO.render=OO;var kO=ba.extend({name:`checkbox`,style:`
|
|
1851
|
+
.p-checkbox {
|
|
1852
|
+
position: relative;
|
|
1853
|
+
display: inline-flex;
|
|
1854
|
+
user-select: none;
|
|
1855
|
+
vertical-align: bottom;
|
|
1856
|
+
width: dt('checkbox.width');
|
|
1857
|
+
height: dt('checkbox.height');
|
|
1858
|
+
}
|
|
1859
|
+
|
|
1860
|
+
.p-checkbox-input {
|
|
1861
|
+
cursor: pointer;
|
|
1862
|
+
appearance: none;
|
|
1863
|
+
position: absolute;
|
|
1864
|
+
inset-block-start: 0;
|
|
1865
|
+
inset-inline-start: 0;
|
|
1866
|
+
width: 100%;
|
|
1867
|
+
height: 100%;
|
|
1868
|
+
padding: 0;
|
|
1869
|
+
margin: 0;
|
|
1870
|
+
opacity: 0;
|
|
1871
|
+
z-index: 1;
|
|
1872
|
+
outline: 0 none;
|
|
1873
|
+
border: 1px solid transparent;
|
|
1874
|
+
border-radius: dt('checkbox.border.radius');
|
|
1875
|
+
}
|
|
1876
|
+
|
|
1877
|
+
.p-checkbox-box {
|
|
1878
|
+
display: flex;
|
|
1879
|
+
justify-content: center;
|
|
1880
|
+
align-items: center;
|
|
1881
|
+
border-radius: dt('checkbox.border.radius');
|
|
1882
|
+
border: 1px solid dt('checkbox.border.color');
|
|
1883
|
+
background: dt('checkbox.background');
|
|
1884
|
+
width: dt('checkbox.width');
|
|
1885
|
+
height: dt('checkbox.height');
|
|
1886
|
+
transition:
|
|
1887
|
+
background dt('checkbox.transition.duration'),
|
|
1888
|
+
color dt('checkbox.transition.duration'),
|
|
1889
|
+
border-color dt('checkbox.transition.duration'),
|
|
1890
|
+
box-shadow dt('checkbox.transition.duration'),
|
|
1891
|
+
outline-color dt('checkbox.transition.duration');
|
|
1892
|
+
outline-color: transparent;
|
|
1893
|
+
box-shadow: dt('checkbox.shadow');
|
|
1894
|
+
}
|
|
1895
|
+
|
|
1896
|
+
.p-checkbox-icon {
|
|
1897
|
+
transition-duration: dt('checkbox.transition.duration');
|
|
1898
|
+
color: dt('checkbox.icon.color');
|
|
1899
|
+
font-size: dt('checkbox.icon.size');
|
|
1900
|
+
width: dt('checkbox.icon.size');
|
|
1901
|
+
height: dt('checkbox.icon.size');
|
|
1902
|
+
}
|
|
1903
|
+
|
|
1904
|
+
.p-checkbox:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-box {
|
|
1905
|
+
border-color: dt('checkbox.hover.border.color');
|
|
1906
|
+
}
|
|
1907
|
+
|
|
1908
|
+
.p-checkbox-checked .p-checkbox-box {
|
|
1909
|
+
border-color: dt('checkbox.checked.border.color');
|
|
1910
|
+
background: dt('checkbox.checked.background');
|
|
1911
|
+
}
|
|
1912
|
+
|
|
1913
|
+
.p-checkbox-checked .p-checkbox-icon {
|
|
1914
|
+
color: dt('checkbox.icon.checked.color');
|
|
1915
|
+
}
|
|
1916
|
+
|
|
1917
|
+
.p-checkbox-checked:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-box {
|
|
1918
|
+
background: dt('checkbox.checked.hover.background');
|
|
1919
|
+
border-color: dt('checkbox.checked.hover.border.color');
|
|
1920
|
+
}
|
|
1921
|
+
|
|
1922
|
+
.p-checkbox-checked:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-icon {
|
|
1923
|
+
color: dt('checkbox.icon.checked.hover.color');
|
|
1924
|
+
}
|
|
1925
|
+
|
|
1926
|
+
.p-checkbox:not(.p-disabled):has(.p-checkbox-input:focus-visible) .p-checkbox-box {
|
|
1927
|
+
border-color: dt('checkbox.focus.border.color');
|
|
1928
|
+
box-shadow: dt('checkbox.focus.ring.shadow');
|
|
1929
|
+
outline: dt('checkbox.focus.ring.width') dt('checkbox.focus.ring.style') dt('checkbox.focus.ring.color');
|
|
1930
|
+
outline-offset: dt('checkbox.focus.ring.offset');
|
|
1931
|
+
}
|
|
1932
|
+
|
|
1933
|
+
.p-checkbox-checked:not(.p-disabled):has(.p-checkbox-input:focus-visible) .p-checkbox-box {
|
|
1934
|
+
border-color: dt('checkbox.checked.focus.border.color');
|
|
1935
|
+
}
|
|
1936
|
+
|
|
1937
|
+
.p-checkbox.p-invalid > .p-checkbox-box {
|
|
1938
|
+
border-color: dt('checkbox.invalid.border.color');
|
|
1939
|
+
}
|
|
1940
|
+
|
|
1941
|
+
.p-checkbox.p-variant-filled .p-checkbox-box {
|
|
1942
|
+
background: dt('checkbox.filled.background');
|
|
1943
|
+
}
|
|
1944
|
+
|
|
1945
|
+
.p-checkbox-checked.p-variant-filled .p-checkbox-box {
|
|
1946
|
+
background: dt('checkbox.checked.background');
|
|
1947
|
+
}
|
|
1948
|
+
|
|
1949
|
+
.p-checkbox-checked.p-variant-filled:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-box {
|
|
1950
|
+
background: dt('checkbox.checked.hover.background');
|
|
1951
|
+
}
|
|
1952
|
+
|
|
1953
|
+
.p-checkbox.p-disabled {
|
|
1954
|
+
opacity: 1;
|
|
1955
|
+
}
|
|
1956
|
+
|
|
1957
|
+
.p-checkbox.p-disabled .p-checkbox-box {
|
|
1958
|
+
background: dt('checkbox.disabled.background');
|
|
1959
|
+
border-color: dt('checkbox.checked.disabled.border.color');
|
|
1960
|
+
}
|
|
1961
|
+
|
|
1962
|
+
.p-checkbox.p-disabled .p-checkbox-box .p-checkbox-icon {
|
|
1963
|
+
color: dt('checkbox.icon.disabled.color');
|
|
1964
|
+
}
|
|
1965
|
+
|
|
1966
|
+
.p-checkbox-sm,
|
|
1967
|
+
.p-checkbox-sm .p-checkbox-box {
|
|
1968
|
+
width: dt('checkbox.sm.width');
|
|
1969
|
+
height: dt('checkbox.sm.height');
|
|
1970
|
+
}
|
|
1971
|
+
|
|
1972
|
+
.p-checkbox-sm .p-checkbox-icon {
|
|
1973
|
+
font-size: dt('checkbox.icon.sm.size');
|
|
1974
|
+
width: dt('checkbox.icon.sm.size');
|
|
1975
|
+
height: dt('checkbox.icon.sm.size');
|
|
1976
|
+
}
|
|
1977
|
+
|
|
1978
|
+
.p-checkbox-lg,
|
|
1979
|
+
.p-checkbox-lg .p-checkbox-box {
|
|
1980
|
+
width: dt('checkbox.lg.width');
|
|
1981
|
+
height: dt('checkbox.lg.height');
|
|
1982
|
+
}
|
|
1983
|
+
|
|
1984
|
+
.p-checkbox-lg .p-checkbox-icon {
|
|
1985
|
+
font-size: dt('checkbox.icon.lg.size');
|
|
1986
|
+
width: dt('checkbox.icon.lg.size');
|
|
1987
|
+
height: dt('checkbox.icon.lg.size');
|
|
1988
|
+
}
|
|
1989
|
+
`,classes:{root:function(e){var t=e.instance,n=e.props;return[`p-checkbox p-component`,{"p-checkbox-checked":t.checked,"p-disabled":n.disabled,"p-invalid":t.$pcCheckboxGroup?t.$pcCheckboxGroup.$invalid:t.$invalid,"p-variant-filled":t.$variant===`filled`,"p-checkbox-sm p-inputfield-sm":n.size===`small`,"p-checkbox-lg p-inputfield-lg":n.size===`large`}]},box:`p-checkbox-box`,input:`p-checkbox-input`,icon:`p-checkbox-icon`}}),AO={name:`BaseCheckbox`,extends:zE,props:{value:null,binary:Boolean,indeterminate:{type:Boolean,default:!1},trueValue:{type:null,default:!0},falseValue:{type:null,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},tabindex:{type:Number,default:null},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:kO,provide:function(){return{$pcCheckbox:this,$parentInstance:this}}};function jO(e){"@babel/helpers - typeof";return jO=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},jO(e)}function MO(e,t,n){return(t=NO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NO(e){var t=PO(e,`string`);return jO(t)==`symbol`?t:t+``}function PO(e,t){if(jO(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(jO(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function FO(e){return zO(e)||RO(e)||LO(e)||IO()}function IO(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1990
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LO(e,t){if(e){if(typeof e==`string`)return BO(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?BO(e,t):void 0}}function RO(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function zO(e){if(Array.isArray(e))return BO(e)}function BO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var VO={name:`Checkbox`,extends:AO,inheritAttrs:!1,emits:[`change`,`focus`,`blur`,`update:indeterminate`],inject:{$pcCheckboxGroup:{default:void 0}},data:function(){return{d_indeterminate:this.indeterminate}},watch:{indeterminate:function(e){this.d_indeterminate=e,this.updateIndeterminate()}},mounted:function(){this.updateIndeterminate()},updated:function(){this.updateIndeterminate()},methods:{getPTOptions:function(e){return(e===`root`?this.ptmi:this.ptm)(e,{context:{checked:this.checked,indeterminate:this.d_indeterminate,disabled:this.disabled}})},onChange:function(e){var t=this;if(!this.disabled&&!this.readonly){var n=this.$pcCheckboxGroup?this.$pcCheckboxGroup.d_value:this.d_value,r=this.binary?this.d_indeterminate?this.trueValue:this.checked?this.falseValue:this.trueValue:this.checked||this.d_indeterminate?n.filter(function(e){return!Hr(e,t.value)}):n?[].concat(FO(n),[this.value]):[this.value];this.d_indeterminate&&(this.d_indeterminate=!1,this.$emit(`update:indeterminate`,this.d_indeterminate)),this.$pcCheckboxGroup?this.$pcCheckboxGroup.writeValue(r,e):this.writeValue(r,e),this.$emit(`change`,e)}},onFocus:function(e){this.$emit(`focus`,e)},onBlur:function(e){var t,n;this.$emit(`blur`,e),(t=(n=this.formField).onBlur)==null||t.call(n,e)},updateIndeterminate:function(){this.$refs.input&&(this.$refs.input.indeterminate=this.d_indeterminate)}},computed:{groupName:function(){return this.$pcCheckboxGroup?this.$pcCheckboxGroup.groupName:this.$formName},checked:function(){var e=this.$pcCheckboxGroup?this.$pcCheckboxGroup.d_value:this.d_value;return this.d_indeterminate?!1:this.binary?e===this.trueValue:Ur(this.value,e)},dataP:function(){return kn(MO({invalid:this.$invalid,checked:this.checked,disabled:this.disabled,filled:this.$variant===`filled`},this.size,this.size))}},components:{CheckIcon:uE,MinusIcon:xO}},HO=[`data-p-checked`,`data-p-indeterminate`,`data-p-disabled`,`data-p`],UO=[`id`,`value`,`name`,`checked`,`tabindex`,`disabled`,`readonly`,`required`,`aria-labelledby`,`aria-label`,`aria-invalid`],WO=[`data-p`];function GO(e,t,n,r,i,a){var o=_(`CheckIcon`),s=_(`MinusIcon`);return v(),k(`div`,E({class:e.cx(`root`)},a.getPTOptions(`root`),{"data-p-checked":a.checked,"data-p-indeterminate":i.d_indeterminate||void 0,"data-p-disabled":e.disabled,"data-p":a.dataP}),[A(`input`,E({ref:`input`,id:e.inputId,type:`checkbox`,class:[e.cx(`input`),e.inputClass],style:e.inputStyle,value:e.value,name:a.groupName,checked:a.checked,tabindex:e.tabindex,disabled:e.disabled,readonly:e.readonly,required:e.required,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-invalid":e.invalid||void 0,onFocus:t[0]||=function(){return a.onFocus&&a.onFocus.apply(a,arguments)},onBlur:t[1]||=function(){return a.onBlur&&a.onBlur.apply(a,arguments)},onChange:t[2]||=function(){return a.onChange&&a.onChange.apply(a,arguments)}},a.getPTOptions(`input`)),null,16,UO),A(`div`,E({class:e.cx(`box`)},a.getPTOptions(`box`),{"data-p":a.dataP}),[m(e.$slots,`icon`,{checked:a.checked,indeterminate:i.d_indeterminate,class:c(e.cx(`icon`)),dataP:a.dataP},function(){return[a.checked?(v(),he(o,E({key:0,class:e.cx(`icon`)},a.getPTOptions(`icon`),{"data-p":a.dataP}),null,16,[`class`,`data-p`])):i.d_indeterminate?(v(),he(s,E({key:1,class:e.cx(`icon`)},a.getPTOptions(`icon`),{"data-p":a.dataP}),null,16,[`class`,`data-p`])):_e(``,!0)]})],16,WO)],16,HO)}VO.render=GO;var KO=typeof document<`u`;function qO(e){return typeof e==`object`||`displayName`in e||`props`in e||`__vccOpts`in e}function JO(e){return e.__esModule||e[Symbol.toStringTag]===`Module`||e.default&&qO(e.default)}var YO=Object.assign;function XO(e,t){let n={};for(let r in t){let i=t[r];n[r]=QO(i)?i.map(e):e(i)}return n}var ZO=()=>{},QO=Array.isArray,$O=/#/g,ek=/&/g,tk=/\//g,nk=/=/g,rk=/\?/g,ik=/\+/g,ak=/%5B/g,ok=/%5D/g,sk=/%5E/g,ck=/%60/g,lk=/%7B/g,uk=/%7C/g,dk=/%7D/g,fk=/%20/g;function pk(e){return encodeURI(``+e).replace(uk,`|`).replace(ak,`[`).replace(ok,`]`)}function mk(e){return pk(e).replace(lk,`{`).replace(dk,`}`).replace(sk,`^`)}function hk(e){return pk(e).replace(ik,`%2B`).replace(fk,`+`).replace($O,`%23`).replace(ek,`%26`).replace(ck,"`").replace(lk,`{`).replace(dk,`}`).replace(sk,`^`)}function gk(e){return hk(e).replace(nk,`%3D`)}function _k(e){return pk(e).replace($O,`%23`).replace(rk,`%3F`)}function vk(e){return e==null?``:_k(e).replace(tk,`%2F`)}function yk(e){try{return decodeURIComponent(``+e)}catch{}return``+e}var bk=/\/$/,xk=e=>e.replace(bk,``);function Sk(e,t,n=`/`){let r,i={},a=``,o=``,s=t.indexOf(`#`),c=t.indexOf(`?`);return s<c&&s>=0&&(c=-1),c>-1&&(r=t.slice(0,c),a=t.slice(c+1,s>-1?s:t.length),i=e(a)),s>-1&&(r||=t.slice(0,s),o=t.slice(s,t.length)),r=Ak(r??t,n),{fullPath:r+(a&&`?`)+a+o,path:r,query:i,hash:yk(o)}}function Ck(e,t){let n=t.query?e(t.query):``;return t.path+(n&&`?`)+n+(t.hash||``)}function wk(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||`/`}function Tk(e,t,n){let r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&Ek(t.matched[r],n.matched[i])&&Dk(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Ek(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Dk(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(!Ok(e[n],t[n]))return!1;return!0}function Ok(e,t){return QO(e)?kk(e,t):QO(t)?kk(t,e):e===t}function kk(e,t){return QO(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e.length===1&&e[0]===t}function Ak(e,t){if(e.startsWith(`/`))return e;if(!e)return t;let n=t.split(`/`),r=e.split(`/`),i=r[r.length-1];(i===`..`||i===`.`)&&r.push(``);let a=n.length-1,o,s;for(o=0;o<r.length;o++)if(s=r[o],s!==`.`)if(s===`..`)a>1&&a--;else break;return n.slice(0,a).join(`/`)+`/`+r.slice(o).join(`/`)}var jk={path:`/`,name:void 0,params:{},query:{},hash:``,fullPath:`/`,matched:[],meta:{},redirectedFrom:void 0},Mk;(function(e){e.pop=`pop`,e.push=`push`})(Mk||={});var Nk;(function(e){e.back=`back`,e.forward=`forward`,e.unknown=``})(Nk||={});function Pk(e){if(!e)if(KO){let t=document.querySelector(`base`);e=t&&t.getAttribute(`href`)||`/`,e=e.replace(/^\w+:\/\/[^\/]+/,``)}else e=`/`;return e[0]!==`/`&&e[0]!==`#`&&(e=`/`+e),xk(e)}var Fk=/^[^#]+#/;function Ik(e,t){return e.replace(Fk,`#`)+t}function Lk(e,t){let n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}var Rk=()=>({left:window.scrollX,top:window.scrollY});function zk(e){let t;if(`el`in e){let n=e.el,r=typeof n==`string`&&n.startsWith(`#`),i=typeof n==`string`?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=Lk(i,e)}else t=e;`scrollBehavior`in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left==null?window.scrollX:t.left,t.top==null?window.scrollY:t.top)}function Bk(e,t){return(history.state?history.state.position-t:-1)+e}var Vk=new Map;function Hk(e,t){Vk.set(e,t)}function Uk(e){let t=Vk.get(e);return Vk.delete(e),t}var Wk=()=>location.protocol+`//`+location.host;function Gk(e,t){let{pathname:n,search:r,hash:i}=t,a=e.indexOf(`#`);if(a>-1){let t=i.includes(e.slice(a))?e.slice(a).length:1,n=i.slice(t);return n[0]!==`/`&&(n=`/`+n),wk(n,``)}return wk(n,e)+r+i}function Kk(e,t,n,r){let i=[],a=[],o=null,s=({state:a})=>{let s=Gk(e,location),c=n.value,l=t.value,u=0;if(a){if(n.value=s,t.value=a,o&&o===c){o=null;return}u=l?a.position-l.position:0}else r(s);i.forEach(e=>{e(n.value,c,{delta:u,type:Mk.pop,direction:u?u>0?Nk.forward:Nk.back:Nk.unknown})})};function c(){o=n.value}function l(e){i.push(e);let t=()=>{let t=i.indexOf(e);t>-1&&i.splice(t,1)};return a.push(t),t}function u(){let{history:e}=window;e.state&&e.replaceState(YO({},e.state,{scroll:Rk()}),``)}function d(){for(let e of a)e();a=[],window.removeEventListener(`popstate`,s),window.removeEventListener(`beforeunload`,u)}return window.addEventListener(`popstate`,s),window.addEventListener(`beforeunload`,u,{passive:!0}),{pauseListeners:c,listen:l,destroy:d}}function qk(e,t,n,r=!1,i=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:i?Rk():null}}function Jk(e){let{history:t,location:n}=window,r={value:Gk(e,n)},i={value:t.state};i.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(r,a,o){let s=e.indexOf(`#`),c=s>-1?(n.host&&document.querySelector(`base`)?e:e.slice(s))+r:Wk()+e+r;try{t[o?`replaceState`:`pushState`](a,``,c),i.value=a}catch(e){console.error(e),n[o?`replace`:`assign`](c)}}function o(e,n){a(e,YO({},t.state,qk(i.value.back,e,i.value.forward,!0),n,{position:i.value.position}),!0),r.value=e}function s(e,n){let o=YO({},i.value,t.state,{forward:e,scroll:Rk()});a(o.current,o,!0),a(e,YO({},qk(r.value,e,null),{position:o.position+1},n),!1),r.value=e}return{location:r,state:i,push:s,replace:o}}function Yk(e){e=Pk(e);let t=Jk(e),n=Kk(e,t.state,t.location,t.replace);function r(e,t=!0){t||n.pauseListeners(),history.go(e)}let i=YO({location:``,base:e,go:r,createHref:Ik.bind(null,e)},t,n);return Object.defineProperty(i,`location`,{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,`state`,{enumerable:!0,get:()=>t.state.value}),i}function Xk(e){return typeof e==`string`||e&&typeof e==`object`}function Zk(e){return typeof e==`string`||typeof e==`symbol`}var Qk=Symbol(``),$k;(function(e){e[e.aborted=4]=`aborted`,e[e.cancelled=8]=`cancelled`,e[e.duplicated=16]=`duplicated`})($k||={});function eA(e,t){return YO(Error(),{type:e,[Qk]:!0},t)}function tA(e,t){return e instanceof Error&&Qk in e&&(t==null||!!(e.type&t))}var nA=`[^/]+?`,rA={sensitive:!1,strict:!1,start:!0,end:!0},iA=/[.+*?^${}()[\]/\\]/g;function aA(e,t){let n=YO({},rA,t),r=[],i=n.start?`^`:``,a=[];for(let t of e){let e=t.length?[]:[90];n.strict&&!t.length&&(i+=`/`);for(let r=0;r<t.length;r++){let o=t[r],s=40+(n.sensitive?.25:0);if(o.type===0)r||(i+=`/`),i+=o.value.replace(iA,`\\$&`),s+=40;else if(o.type===1){let{value:e,repeatable:n,optional:c,regexp:l}=o;a.push({name:e,repeatable:n,optional:c});let u=l||nA;if(u!==nA){s+=10;try{RegExp(`(${u})`)}catch(t){throw Error(`Invalid custom RegExp for param "${e}" (${u}): `+t.message)}}let d=n?`((?:${u})(?:/(?:${u}))*)`:`(${u})`;r||(d=c&&t.length<2?`(?:/${d})`:`/`+d),c&&(d+=`?`),i+=d,s+=20,c&&(s+=-8),n&&(s+=-20),u===`.*`&&(s+=-50)}e.push(s)}r.push(e)}if(n.strict&&n.end){let e=r.length-1;r[e][r[e].length-1]+=.7000000000000001}n.strict||(i+=`/?`),n.end?i+=`$`:n.strict&&(i+=`(?:/|$)`);let o=new RegExp(i,n.sensitive?``:`i`);function s(e){let t=e.match(o),n={};if(!t)return null;for(let e=1;e<t.length;e++){let r=t[e]||``,i=a[e-1];n[i.name]=r&&i.repeatable?r.split(`/`):r}return n}function c(t){let n=``,r=!1;for(let i of e){(!r||!n.endsWith(`/`))&&(n+=`/`),r=!1;for(let e of i)if(e.type===0)n+=e.value;else if(e.type===1){let{value:a,repeatable:o,optional:s}=e,c=a in t?t[a]:``;if(QO(c)&&!o)throw Error(`Provided param "${a}" is an array but it is not repeatable (* or + modifiers)`);let l=QO(c)?c.join(`/`):c;if(!l)if(s)i.length<2&&(n.endsWith(`/`)?n=n.slice(0,-1):r=!0);else throw Error(`Missing required param "${a}"`);n+=l}}return n||`/`}return{re:o,score:r,keys:a,parse:s,stringify:c}}function oA(e,t){let n=0;for(;n<e.length&&n<t.length;){let r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function sA(e,t){let n=0,r=e.score,i=t.score;for(;n<r.length&&n<i.length;){let e=oA(r[n],i[n]);if(e)return e;n++}if(Math.abs(i.length-r.length)===1){if(cA(r))return 1;if(cA(i))return-1}return i.length-r.length}function cA(e){let t=e[e.length-1];return e.length>0&&t[t.length-1]<0}var lA={type:0,value:``},uA=/[a-zA-Z0-9_]/;function dA(e){if(!e)return[[]];if(e===`/`)return[[lA]];if(!e.startsWith(`/`))throw Error(`Invalid path "${e}"`);function t(e){throw Error(`ERR (${n})/"${l}": ${e}`)}let n=0,r=n,i=[],a;function o(){a&&i.push(a),a=[]}let s=0,c,l=``,u=``;function d(){l&&=(n===0?a.push({type:0,value:l}):n===1||n===2||n===3?(a.length>1&&(c===`*`||c===`+`)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:l,regexp:u,repeatable:c===`*`||c===`+`,optional:c===`*`||c===`?`})):t(`Invalid state to consume buffer`),``)}function f(){l+=c}for(;s<e.length;){if(c=e[s++],c===`\\`&&n!==2){r=n,n=4;continue}switch(n){case 0:c===`/`?(l&&d(),o()):c===`:`?(d(),n=1):f();break;case 4:f(),n=r;break;case 1:c===`(`?n=2:uA.test(c)?f():(d(),n=0,c!==`*`&&c!==`?`&&c!==`+`&&s--);break;case 2:c===`)`?u[u.length-1]==`\\`?u=u.slice(0,-1)+c:n=3:u+=c;break;case 3:d(),n=0,c!==`*`&&c!==`?`&&c!==`+`&&s--,u=``;break;default:t(`Unknown state`);break}}return n===2&&t(`Unfinished custom RegExp for param "${l}"`),d(),o(),i}function fA(e,t,n){let r=YO(aA(dA(e.path),n),{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function pA(e,t){let n=[],r=new Map;t=yA({strict:!1,end:!0,sensitive:!1},t);function i(e){return r.get(e)}function a(e,n,r){let i=!r,s=hA(e);s.aliasOf=r&&r.record;let l=yA(t,e),u=[s];if(`alias`in e){let t=typeof e.alias==`string`?[e.alias]:e.alias;for(let e of t)u.push(hA(YO({},s,{components:r?r.record.components:s.components,path:e,aliasOf:r?r.record:s})))}let d,f;for(let t of u){let{path:u}=t;if(n&&u[0]!==`/`){let e=n.record.path,r=e[e.length-1]===`/`?``:`/`;t.path=n.record.path+(u&&r+u)}if(d=fA(t,n,l),r?r.alias.push(d):(f||=d,f!==d&&f.alias.push(d),i&&e.name&&!_A(d)&&o(e.name)),SA(d)&&c(d),s.children){let e=s.children;for(let t=0;t<e.length;t++)a(e[t],d,r&&r.children[t])}r||=d}return f?()=>{o(f)}:ZO}function o(e){if(Zk(e)){let t=r.get(e);t&&(r.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(o),t.alias.forEach(o))}else{let t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&r.delete(e.record.name),e.children.forEach(o),e.alias.forEach(o))}}function s(){return n}function c(e){let t=bA(e,n);n.splice(t,0,e),e.record.name&&!_A(e)&&r.set(e.record.name,e)}function l(e,t){let i,a={},o,s;if(`name`in e&&e.name){if(i=r.get(e.name),!i)throw eA(1,{location:e});s=i.record.name,a=YO(mA(t.params,i.keys.filter(e=>!e.optional).concat(i.parent?i.parent.keys.filter(e=>e.optional):[]).map(e=>e.name)),e.params&&mA(e.params,i.keys.map(e=>e.name))),o=i.stringify(a)}else if(e.path!=null)o=e.path,i=n.find(e=>e.re.test(o)),i&&(a=i.parse(o),s=i.record.name);else{if(i=t.name?r.get(t.name):n.find(e=>e.re.test(t.path)),!i)throw eA(1,{location:e,currentLocation:t});s=i.record.name,a=YO({},t.params,e.params),o=i.stringify(a)}let c=[],l=i;for(;l;)c.unshift(l.record),l=l.parent;return{name:s,path:o,params:a,matched:c,meta:vA(c)}}e.forEach(e=>a(e));function u(){n.length=0,r.clear()}return{addRoute:a,resolve:l,removeRoute:o,clearRoutes:u,getRoutes:s,getRecordMatcher:i}}function mA(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function hA(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:gA(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:`components`in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,`mods`,{value:{}}),t}function gA(e){let t={},n=e.props||!1;if(`component`in e)t.default=n;else for(let r in e.components)t[r]=typeof n==`object`?n[r]:n;return t}function _A(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function vA(e){return e.reduce((e,t)=>YO(e,t.meta),{})}function yA(e,t){let n={};for(let r in e)n[r]=r in t?t[r]:e[r];return n}function bA(e,t){let n=0,r=t.length;for(;n!==r;){let i=n+r>>1;sA(e,t[i])<0?r=i:n=i+1}let i=xA(e);return i&&(r=t.lastIndexOf(i,r-1)),r}function xA(e){let t=e;for(;t=t.parent;)if(SA(t)&&sA(e,t)===0)return t}function SA({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function CA(e){let t={};if(e===``||e===`?`)return t;let n=(e[0]===`?`?e.slice(1):e).split(`&`);for(let e=0;e<n.length;++e){let r=n[e].replace(ik,` `),i=r.indexOf(`=`),a=yk(i<0?r:r.slice(0,i)),o=i<0?null:yk(r.slice(i+1));if(a in t){let e=t[a];QO(e)||(e=t[a]=[e]),e.push(o)}else t[a]=o}return t}function wA(e){let t=``;for(let n in e){let r=e[n];if(n=gk(n),r==null){r!==void 0&&(t+=(t.length?`&`:``)+n);continue}(QO(r)?r.map(e=>e&&hk(e)):[r&&hk(r)]).forEach(e=>{e!==void 0&&(t+=(t.length?`&`:``)+n,e!=null&&(t+=`=`+e))})}return t}function TA(e){let t={};for(let n in e){let r=e[n];r!==void 0&&(t[n]=QO(r)?r.map(e=>e==null?null:``+e):r==null?r:``+r)}return t}var EA=Symbol(``),DA=Symbol(``),OA=Symbol(``),kA=Symbol(``),AA=Symbol(``);function jA(){let e=[];function t(t){return e.push(t),()=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function MA(e,t,n,r,i,a=e=>e()){let o=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((s,c)=>{let l=e=>{e===!1?c(eA(4,{from:n,to:t})):e instanceof Error?c(e):Xk(e)?c(eA(2,{from:t,to:e})):(o&&r.enterCallbacks[i]===o&&typeof e==`function`&&o.push(e),s())},u=a(()=>e.call(r&&r.instances[i],t,n,l)),d=Promise.resolve(u);e.length<3&&(d=d.then(l)),d.catch(e=>c(e))})}function NA(e,t,n,r,i=e=>e()){let a=[];for(let o of e)for(let e in o.components){let s=o.components[e];if(!(t!==`beforeRouteEnter`&&!o.instances[e]))if(qO(s)){let c=(s.__vccOpts||s)[t];c&&a.push(MA(c,n,r,o,e,i))}else{let c=s();a.push(()=>c.then(a=>{if(!a)throw Error(`Couldn't resolve component "${e}" at "${o.path}"`);let s=JO(a)?a.default:a;o.mods[e]=a,o.components[e]=s;let c=(s.__vccOpts||s)[t];return c&&MA(c,n,r,o,e,i)()}))}}return a}function PA(e){let t=Ge(OA),n=Ge(kA),r=De(()=>{let n=ve(e.to);return t.resolve(n)}),i=De(()=>{let{matched:e}=r.value,{length:t}=e,i=e[t-1],a=n.matched;if(!i||!a.length)return-1;let o=a.findIndex(Ek.bind(null,i));if(o>-1)return o;let s=RA(e[t-2]);return t>1&&RA(i)===s&&a[a.length-1].path!==s?a.findIndex(Ek.bind(null,e[t-2])):o}),a=De(()=>i.value>-1&&LA(n.params,r.value.params)),o=De(()=>i.value>-1&&i.value===n.matched.length-1&&Dk(n.params,r.value.params));function s(n={}){return IA(n)?t[ve(e.replace)?`replace`:`push`](ve(e.to)).catch(ZO):Promise.resolve()}return{route:r,href:De(()=>r.value.href),isActive:a,isExactActive:o,navigate:s}}var FA=Ye({name:`RouterLink`,compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:`page`}},useLink:PA,setup(e,{slots:t}){let n=Me(PA(e)),{options:r}=Ge(OA),i=De(()=>({[zA(e.activeClass,r.linkActiveClass,`router-link-active`)]:n.isActive,[zA(e.exactActiveClass,r.linkExactActiveClass,`router-link-exact-active`)]:n.isExactActive}));return()=>{let r=t.default&&t.default(n);return e.custom?r:T(`a`,{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},r)}}});function IA(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){let t=e.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function LA(e,t){for(let n in t){let r=t[n],i=e[n];if(typeof r==`string`){if(r!==i)return!1}else if(!QO(i)||i.length!==r.length||r.some((e,t)=>e!==i[t]))return!1}return!0}function RA(e){return e?e.aliasOf?e.aliasOf.path:e.path:``}var zA=(e,t,n)=>e??t??n,BA=Ye({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){let r=Ge(AA),i=De(()=>e.route||r.value),a=Ge(DA,0),o=De(()=>{let e=ve(a),{matched:t}=i.value,n;for(;(n=t[e])&&!n.components;)e++;return e}),s=De(()=>i.value.matched[o.value]);y(DA,De(()=>o.value+1)),y(EA,s),y(AA,i);let c=O();return f(()=>[c.value,s.value,e.name],([e,t,n],[r,i,a])=>{t&&(t.instances[n]=e,i&&i!==t&&e&&e===r&&(t.leaveGuards.size||(t.leaveGuards=i.leaveGuards),t.updateGuards.size||(t.updateGuards=i.updateGuards))),e&&t&&(!i||!Ek(t,i)||!r)&&(t.enterCallbacks[n]||[]).forEach(t=>t(e))},{flush:`post`}),()=>{let r=i.value,a=e.name,o=s.value,l=o&&o.components[a];if(!l)return VA(n.default,{Component:l,route:r});let u=o.props[a],d=T(l,YO({},u?u===!0?r.params:typeof u==`function`?u(r):u:null,t,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(o.instances[a]=null)},ref:c}));return VA(n.default,{Component:d,route:r})||d}}});function VA(e,t){if(!e)return null;let n=e(t);return n.length===1?n[0]:n}var HA=BA;function UA(e){let t=pA(e.routes,e),n=e.parseQuery||CA,r=e.stringifyQuery||wA,i=e.history,a=jA(),o=jA(),s=jA(),c=ze(jk),u=jk;KO&&e.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let d=XO.bind(null,e=>``+e),f=XO.bind(null,vk),p=XO.bind(null,yk);function m(e,n){let r,i;return Zk(e)?(r=t.getRecordMatcher(e),i=n):i=e,t.addRoute(i,r)}function h(e){let n=t.getRecordMatcher(e);n&&t.removeRoute(n)}function g(){return t.getRoutes().map(e=>e.record)}function _(e){return!!t.getRecordMatcher(e)}function v(e,a){if(a=YO({},a||c.value),typeof e==`string`){let r=Sk(n,e,a.path),o=t.resolve({path:r.path},a),s=i.createHref(r.fullPath);return YO(r,o,{params:p(o.params),hash:yk(r.hash),redirectedFrom:void 0,href:s})}let o;if(e.path!=null)o=YO({},e,{path:Sk(n,e.path,a.path).path});else{let t=YO({},e.params);for(let e in t)t[e]??delete t[e];o=YO({},e,{params:f(t)}),a.params=f(a.params)}let s=t.resolve(o,a),l=e.hash||``;s.params=d(p(s.params));let u=Ck(r,YO({},e,{hash:mk(l),path:s.path})),m=i.createHref(u);return YO({fullPath:u,hash:l,query:r===wA?TA(e.query):e.query||{}},s,{redirectedFrom:void 0,href:m})}function y(e){return typeof e==`string`?Sk(n,e,c.value.path):YO({},e)}function b(e,t){if(u!==e)return eA(8,{from:t,to:e})}function x(e){return w(e)}function S(e){return x(YO(y(e),{replace:!0}))}function C(e){let t=e.matched[e.matched.length-1];if(t&&t.redirect){let{redirect:n}=t,r=typeof n==`function`?n(e):n;return typeof r==`string`&&(r=r.includes(`?`)||r.includes(`#`)?r=y(r):{path:r},r.params={}),YO({query:e.query,hash:e.hash,params:r.path==null?e.params:{}},r)}}function w(e,t){let n=u=v(e),i=c.value,a=e.state,o=e.force,s=e.replace===!0,l=C(n);if(l)return w(YO(y(l),{state:typeof l==`object`?YO({},a,l.state):a,force:o,replace:s}),t||n);let d=n;d.redirectedFrom=t;let f;return!o&&Tk(r,i,n)&&(f=eA(16,{to:d,from:i}),de(i,i,!0,!1)),(f?Promise.resolve(f):E(d,i)).catch(e=>tA(e)?tA(e,2)?e:le(e):se(e,d,i)).then(e=>{if(e){if(tA(e,2))return w(YO({replace:s},y(e.to),{state:typeof e.to==`object`?YO({},a,e.to.state):a,force:o}),t||d)}else e=te(d,i,!0,s,a);return D(d,i,e),e})}function T(e,t){let n=b(e,t);return n?Promise.reject(n):Promise.resolve()}function ee(e){let t=me.values().next().value;return t&&typeof t.runWithContext==`function`?t.runWithContext(e):e()}function E(e,t){let n,[r,i,s]=WA(e,t);n=NA(r.reverse(),`beforeRouteLeave`,e,t);for(let i of r)i.leaveGuards.forEach(r=>{n.push(MA(r,e,t))});let c=T.bind(null,e,t);return n.push(c),ge(n).then(()=>{n=[];for(let r of a.list())n.push(MA(r,e,t));return n.push(c),ge(n)}).then(()=>{n=NA(i,`beforeRouteUpdate`,e,t);for(let r of i)r.updateGuards.forEach(r=>{n.push(MA(r,e,t))});return n.push(c),ge(n)}).then(()=>{n=[];for(let r of s)if(r.beforeEnter)if(QO(r.beforeEnter))for(let i of r.beforeEnter)n.push(MA(i,e,t));else n.push(MA(r.beforeEnter,e,t));return n.push(c),ge(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=NA(s,`beforeRouteEnter`,e,t,ee),n.push(c),ge(n))).then(()=>{n=[];for(let r of o.list())n.push(MA(r,e,t));return n.push(c),ge(n)}).catch(e=>tA(e,8)?e:Promise.reject(e))}function D(e,t,n){s.list().forEach(r=>ee(()=>r(e,t,n)))}function te(e,t,n,r,a){let o=b(e,t);if(o)return o;let s=t===jk,l=KO?history.state:{};n&&(r||s?i.replace(e.fullPath,YO({scroll:s&&l&&l.scroll},a)):i.push(e.fullPath,a)),c.value=e,de(e,t,n,s),le()}let ne;function re(){ne||=i.listen((e,t,n)=>{if(!he.listening)return;let r=v(e),a=C(r);if(a){w(YO(a,{replace:!0}),r).catch(ZO);return}u=r;let o=c.value;KO&&Hk(Bk(o.fullPath,n.delta),Rk()),E(r,o).catch(e=>tA(e,12)?e:tA(e,2)?(w(e.to,r).then(e=>{tA(e,20)&&!n.delta&&n.type===Mk.pop&&i.go(-1,!1)}).catch(ZO),Promise.reject()):(n.delta&&i.go(-n.delta,!1),se(e,r,o))).then(e=>{e||=te(r,o,!1),e&&(n.delta&&!tA(e,8)?i.go(-n.delta,!1):n.type===Mk.pop&&tA(e,20)&&i.go(-1,!1)),D(r,o,e)}).catch(ZO)})}let ie=jA(),ae=jA(),oe;function se(e,t,n){le(e);let r=ae.list();return r.length?r.forEach(r=>r(e,t,n)):console.error(e),Promise.reject(e)}function ce(){return oe&&c.value!==jk?Promise.resolve():new Promise((e,t)=>{ie.add([e,t])})}function le(e){return oe||(oe=!e,re(),ie.list().forEach(([t,n])=>e?n(e):t()),ie.reset()),e}function de(t,n,r,i){let{scrollBehavior:a}=e;if(!KO||!a)return Promise.resolve();let o=!r&&Uk(Bk(t.fullPath,0))||(i||!r)&&history.state&&history.state.scroll||null;return l().then(()=>a(t,n,o)).then(e=>e&&zk(e)).catch(e=>se(e,t,n))}let fe=e=>i.go(e),pe,me=new Set,he={currentRoute:c,listening:!0,addRoute:m,removeRoute:h,clearRoutes:t.clearRoutes,hasRoute:_,getRoutes:g,resolve:v,options:e,push:x,replace:S,go:fe,back:()=>fe(-1),forward:()=>fe(1),beforeEach:a.add,beforeResolve:o.add,afterEach:s.add,onError:ae.add,isReady:ce,install(e){let t=this;e.component(`RouterLink`,FA),e.component(`RouterView`,HA),e.config.globalProperties.$router=t,Object.defineProperty(e.config.globalProperties,`$route`,{enumerable:!0,get:()=>ve(c)}),KO&&!pe&&c.value===jk&&(pe=!0,x(i.location).catch(e=>{}));let n={};for(let e in jk)Object.defineProperty(n,e,{get:()=>c.value[e],enumerable:!0});e.provide(OA,t),e.provide(kA,ue(n)),e.provide(AA,c);let r=e.unmount;me.add(e),e.unmount=function(){me.delete(e),me.size<1&&(u=jk,ne&&ne(),ne=null,c.value=jk,pe=!1,oe=!1),r()}}};function ge(e){return e.reduce((e,t)=>e.then(()=>ee(t)),Promise.resolve())}return he}function WA(e,t){let n=[],r=[],i=[],a=Math.max(t.matched.length,e.matched.length);for(let o=0;o<a;o++){let a=t.matched[o];a&&(e.matched.find(e=>Ek(e,a))?r.push(a):n.push(a));let s=e.matched[o];s&&(t.matched.find(e=>Ek(e,s))||i.push(s))}return[n,r,i]}function GA(){return Ge(OA)}function KA(e){return Ge(kA)}function qA(e,t){typeof console<`u`&&(console.warn(`[intlify] `+e),t&&console.warn(t.stack))}var JA=typeof window<`u`,YA=(e,t=!1)=>t?Symbol.for(e):Symbol(e),XA=(e,t,n)=>ZA({l:e,k:t,s:n}),ZA=e=>JSON.stringify(e).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`).replace(/\u0027/g,`\\u0027`),QA=e=>typeof e==`number`&&isFinite(e),$A=e=>gj(e)===`[object Date]`,ej=e=>gj(e)===`[object RegExp]`,tj=e=>Q(e)&&Object.keys(e).length===0,nj=Object.assign,rj=Object.create,ij=(e=null)=>rj(e),aj,oj=()=>aj||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:ij();function sj(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`).replace(/\//g,`/`).replace(/=/g,`=`)}function cj(e){return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g,`&`).replace(/"/g,`"`).replace(/'/g,`'`).replace(/</g,`<`).replace(/>/g,`>`)}function lj(e){return e=e.replace(/(\w+)\s*=\s*"([^"]*)"/g,(e,t,n)=>`${t}="${cj(n)}"`),e=e.replace(/(\w+)\s*=\s*'([^']*)'/g,(e,t,n)=>`${t}='${cj(n)}'`),/\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e)&&(e=e.replace(/(\s+)(on)(\w+\s*=)/gi,`$1on$3`)),[/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi].forEach(t=>{e=e.replace(t,`$1javascript:`)}),e}var uj=Object.prototype.hasOwnProperty;function dj(e,t){return uj.call(e,t)}var fj=Array.isArray,pj=e=>typeof e==`function`,Y=e=>typeof e==`string`,X=e=>typeof e==`boolean`,Z=e=>typeof e==`object`&&!!e,mj=e=>Z(e)&&pj(e.then)&&pj(e.catch),hj=Object.prototype.toString,gj=e=>hj.call(e),Q=e=>gj(e)===`[object Object]`,_j=e=>e==null?``:fj(e)||Q(e)&&e.toString===hj?JSON.stringify(e,null,2):String(e);function vj(e,t=``){return e.reduce((e,n,r)=>r===0?e+n:e+t+n,``)}var yj=e=>!Z(e)||fj(e);function bj(e,t){if(yj(e)||yj(t))throw Error(`Invalid value`);let n=[{src:e,des:t}];for(;n.length;){let{src:e,des:t}=n.pop();Object.keys(e).forEach(r=>{r!==`__proto__`&&(Z(e[r])&&!Z(t[r])&&(t[r]=Array.isArray(e[r])?[]:ij()),yj(t[r])||yj(e[r])?t[r]=e[r]:n.push({src:e[r],des:t[r]}))})}}function xj(e,t,n){return{line:e,column:t,offset:n}}function Sj(e,t,n){let r={start:e,end:t};return n!=null&&(r.source=n),r}var $={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16};$.EXPECTED_TOKEN,$.INVALID_TOKEN_IN_PLACEHOLDER,$.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,$.UNKNOWN_ESCAPE_SEQUENCE,$.INVALID_UNICODE_ESCAPE_SEQUENCE,$.UNBALANCED_CLOSING_BRACE,$.UNTERMINATED_CLOSING_BRACE,$.EMPTY_PLACEHOLDER,$.NOT_ALLOW_NEST_PLACEHOLDER,$.INVALID_LINKED_FORMAT,$.MUST_HAVE_MESSAGES_IN_PLURAL,$.UNEXPECTED_EMPTY_LINKED_MODIFIER,$.UNEXPECTED_EMPTY_LINKED_KEY,$.UNEXPECTED_LEXICAL_ANALYSIS,$.UNHANDLED_CODEGEN_NODE_TYPE,$.UNHANDLED_MINIFIER_NODE_TYPE;function Cj(e,t,n={}){let{domain:r,messages:i,args:a}=n,o=SyntaxError(String(e));return o.code=e,t&&(o.location=t),o.domain=r,o}function wj(e){throw e}var Tj=` `,Ej=`\r`,Dj=`
|
|
1991
|
+
`,Oj=`\u2028`,kj=`\u2029`;function Aj(e){let t=e,n=0,r=1,i=1,a=0,o=e=>t[e]===Ej&&t[e+1]===Dj,s=e=>t[e]===Dj,c=e=>t[e]===kj,l=e=>t[e]===Oj,u=e=>o(e)||s(e)||c(e)||l(e),d=()=>n,f=()=>r,p=()=>i,m=()=>a,h=e=>o(e)||c(e)||l(e)?Dj:t[e],g=()=>h(n),_=()=>h(n+a);function v(){return a=0,u(n)&&(r++,i=0),o(n)&&n++,n++,i++,t[n]}function y(){return o(n+a)&&a++,a++,t[n+a]}function b(){n=0,r=1,i=1,a=0}function x(e=0){a=e}function S(){let e=n+a;for(;e!==n;)v();a=0}return{index:d,line:f,column:p,peekOffset:m,charAt:h,currentChar:g,currentPeek:_,next:v,peek:y,reset:b,resetPeek:x,skipToPeek:S}}var jj=void 0,Mj=`'`,Nj=`tokenizer`;function Pj(e,t={}){let n=t.location!==!1,r=Aj(e),i=()=>r.index(),a=()=>xj(r.line(),r.column(),r.index()),o=a(),s=i(),c={currentType:13,offset:s,startLoc:o,endLoc:o,lastType:13,lastOffset:s,lastStartLoc:o,lastEndLoc:o,braceNest:0,inLinked:!1,text:``},l=()=>c,{onError:u}=t;function d(e,t,r,...i){let a=l();t.column+=r,t.offset+=r,u&&u(Cj(e,n?Sj(a.startLoc,t):null,{domain:Nj,args:i}))}function f(e,t,r){e.endLoc=a(),e.currentType=t;let i={type:t};return n&&(i.loc=Sj(e.startLoc,e.endLoc)),r!=null&&(i.value=r),i}let p=e=>f(e,13);function m(e,t){return e.currentChar()===t?(e.next(),t):(d($.EXPECTED_TOKEN,a(),0,t),``)}function h(e){let t=``;for(;e.currentPeek()===Tj||e.currentPeek()===Dj;)t+=e.currentPeek(),e.peek();return t}function g(e){let t=h(e);return e.skipToPeek(),t}function _(e){if(e===jj)return!1;let t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t===95}function v(e){if(e===jj)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57}function y(e,t){let{currentType:n}=t;if(n!==2)return!1;h(e);let r=_(e.currentPeek());return e.resetPeek(),r}function b(e,t){let{currentType:n}=t;if(n!==2)return!1;h(e);let r=v(e.currentPeek()===`-`?e.peek():e.currentPeek());return e.resetPeek(),r}function x(e,t){let{currentType:n}=t;if(n!==2)return!1;h(e);let r=e.currentPeek()===Mj;return e.resetPeek(),r}function S(e,t){let{currentType:n}=t;if(n!==7)return!1;h(e);let r=e.currentPeek()===`.`;return e.resetPeek(),r}function C(e,t){let{currentType:n}=t;if(n!==8)return!1;h(e);let r=_(e.currentPeek());return e.resetPeek(),r}function w(e,t){let{currentType:n}=t;if(!(n===7||n===11))return!1;h(e);let r=e.currentPeek()===`:`;return e.resetPeek(),r}function T(e,t){let{currentType:n}=t;if(n!==9)return!1;let r=()=>{let t=e.currentPeek();return t===`{`?_(e.peek()):t===`@`||t===`|`||t===`:`||t===`.`||t===Tj||!t?!1:t===Dj?(e.peek(),r()):E(e,!1)},i=r();return e.resetPeek(),i}function ee(e){h(e);let t=e.currentPeek()===`|`;return e.resetPeek(),t}function E(e,t=!0){let n=(t=!1,r=``)=>{let i=e.currentPeek();return i===`{`||i===`@`||!i?t:i===`|`?!(r===Tj||r===Dj):i===Tj?(e.peek(),n(!0,Tj)):i===Dj?(e.peek(),n(!0,Dj)):!0},r=n();return t&&e.resetPeek(),r}function D(e,t){let n=e.currentChar();return n===jj?jj:t(n)?(e.next(),n):null}function te(e){let t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||t===95||t===36}function ne(e){return D(e,te)}function re(e){let t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||t===95||t===36||t===45}function ie(e){return D(e,re)}function ae(e){let t=e.charCodeAt(0);return t>=48&&t<=57}function oe(e){return D(e,ae)}function se(e){let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function ce(e){return D(e,se)}function le(e){let t=``,n=``;for(;t=oe(e);)n+=t;return n}function ue(e){let t=``;for(;;){let n=e.currentChar();if(n===`{`||n===`}`||n===`@`||n===`|`||!n)break;if(n===Tj||n===Dj)if(E(e))t+=n,e.next();else if(ee(e))break;else t+=n,e.next();else t+=n,e.next()}return t}function de(e){g(e);let t=``,n=``;for(;t=ie(e);)n+=t;return e.currentChar()===jj&&d($.UNTERMINATED_CLOSING_BRACE,a(),0),n}function fe(e){g(e);let t=``;return e.currentChar()===`-`?(e.next(),t+=`-${le(e)}`):t+=le(e),e.currentChar()===jj&&d($.UNTERMINATED_CLOSING_BRACE,a(),0),t}function pe(e){return e!==Mj&&e!==Dj}function me(e){g(e),m(e,`'`);let t=``,n=``;for(;t=D(e,pe);)t===`\\`?n+=he(e):n+=t;let r=e.currentChar();return r===Dj||r===jj?(d($.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,a(),0),r===Dj&&(e.next(),m(e,`'`)),n):(m(e,`'`),n)}function he(e){let t=e.currentChar();switch(t){case`\\`:case`'`:return e.next(),`\\${t}`;case`u`:return ge(e,t,4);case`U`:return ge(e,t,6);default:return d($.UNKNOWN_ESCAPE_SEQUENCE,a(),0,t),``}}function ge(e,t,n){m(e,t);let r=``;for(let i=0;i<n;i++){let n=ce(e);if(!n){d($.INVALID_UNICODE_ESCAPE_SEQUENCE,a(),0,`\\${t}${r}${e.currentChar()}`);break}r+=n}return`\\${t}${r}`}function _e(e){return e!==`{`&&e!==`}`&&e!==Tj&&e!==Dj}function ve(e){g(e);let t=``,n=``;for(;t=D(e,_e);)n+=t;return n}function ye(e){let t=``,n=``;for(;t=ne(e);)n+=t;return n}function be(e){let t=n=>{let r=e.currentChar();return r===`{`||r===`@`||r===`|`||r===`(`||r===`)`||!r||r===Tj?n:(n+=r,e.next(),t(n))};return t(``)}function xe(e){g(e);let t=m(e,`|`);return g(e),t}function Se(e,t){let n=null;switch(e.currentChar()){case`{`:return t.braceNest>=1&&d($.NOT_ALLOW_NEST_PLACEHOLDER,a(),0),e.next(),n=f(t,2,`{`),g(e),t.braceNest++,n;case`}`:return t.braceNest>0&&t.currentType===2&&d($.EMPTY_PLACEHOLDER,a(),0),e.next(),n=f(t,3,`}`),t.braceNest--,t.braceNest>0&&g(e),t.inLinked&&t.braceNest===0&&(t.inLinked=!1),n;case`@`:return t.braceNest>0&&d($.UNTERMINATED_CLOSING_BRACE,a(),0),n=O(e,t)||p(t),t.braceNest=0,n;default:{let r=!0,i=!0,o=!0;if(ee(e))return t.braceNest>0&&d($.UNTERMINATED_CLOSING_BRACE,a(),0),n=f(t,1,xe(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(t.currentType===4||t.currentType===5||t.currentType===6))return d($.UNTERMINATED_CLOSING_BRACE,a(),0),t.braceNest=0,Ce(e,t);if(r=y(e,t))return n=f(t,4,de(e)),g(e),n;if(i=b(e,t))return n=f(t,5,fe(e)),g(e),n;if(o=x(e,t))return n=f(t,6,me(e)),g(e),n;if(!r&&!i&&!o)return n=f(t,12,ve(e)),d($.INVALID_TOKEN_IN_PLACEHOLDER,a(),0,n.value),g(e),n;break}}return n}function O(e,t){let{currentType:n}=t,r=null,i=e.currentChar();switch((n===7||n===8||n===11||n===9)&&(i===Dj||i===Tj)&&d($.INVALID_LINKED_FORMAT,a(),0),i){case`@`:return e.next(),r=f(t,7,`@`),t.inLinked=!0,r;case`.`:return g(e),e.next(),f(t,8,`.`);case`:`:return g(e),e.next(),f(t,9,`:`);default:return ee(e)?(r=f(t,1,xe(e)),t.braceNest=0,t.inLinked=!1,r):S(e,t)||w(e,t)?(g(e),O(e,t)):C(e,t)?(g(e),f(t,11,ye(e))):T(e,t)?(g(e),i===`{`?Se(e,t)||r:f(t,10,be(e))):(n===7&&d($.INVALID_LINKED_FORMAT,a(),0),t.braceNest=0,t.inLinked=!1,Ce(e,t))}}function Ce(e,t){let n={type:13};if(t.braceNest>0)return Se(e,t)||p(t);if(t.inLinked)return O(e,t)||p(t);switch(e.currentChar()){case`{`:return Se(e,t)||p(t);case`}`:return d($.UNBALANCED_CLOSING_BRACE,a(),0),e.next(),f(t,3,`}`);case`@`:return O(e,t)||p(t);default:if(ee(e))return n=f(t,1,xe(e)),t.braceNest=0,t.inLinked=!1,n;if(E(e))return f(t,0,ue(e));break}return n}function we(){let{currentType:e,offset:t,startLoc:n,endLoc:o}=c;return c.lastType=e,c.lastOffset=t,c.lastStartLoc=n,c.lastEndLoc=o,c.offset=i(),c.startLoc=a(),r.currentChar()===jj?f(c,13):Ce(r,c)}return{nextToken:we,currentOffset:i,currentPosition:a,context:l}}var Fj=`parser`,Ij=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function Lj(e,t,n){switch(e){case`\\\\`:return`\\`;case`\\'`:return`'`;default:{let e=parseInt(t||n,16);return e<=55295||e>=57344?String.fromCodePoint(e):`�`}}}function Rj(e={}){let t=e.location!==!1,{onError:n}=e;function r(e,r,i,a,...o){let s=e.currentPosition();s.offset+=a,s.column+=a,n&&n(Cj(r,t?Sj(i,s):null,{domain:Fj,args:o}))}function i(e,n,r){let i={type:e};return t&&(i.start=n,i.end=n,i.loc={start:r,end:r}),i}function a(e,n,r,i){t&&(e.end=n,e.loc&&(e.loc.end=r))}function o(e,t){let n=e.context(),r=i(3,n.offset,n.startLoc);return r.value=t,a(r,e.currentOffset(),e.currentPosition()),r}function s(e,t){let{lastOffset:n,lastStartLoc:r}=e.context(),o=i(5,n,r);return o.index=parseInt(t,10),e.nextToken(),a(o,e.currentOffset(),e.currentPosition()),o}function c(e,t){let{lastOffset:n,lastStartLoc:r}=e.context(),o=i(4,n,r);return o.key=t,e.nextToken(),a(o,e.currentOffset(),e.currentPosition()),o}function l(e,t){let{lastOffset:n,lastStartLoc:r}=e.context(),o=i(9,n,r);return o.value=t.replace(Ij,Lj),e.nextToken(),a(o,e.currentOffset(),e.currentPosition()),o}function u(e){let t=e.nextToken(),n=e.context(),{lastOffset:o,lastStartLoc:s}=n,c=i(8,o,s);return t.type===11?(t.value??r(e,$.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,zj(t)),c.value=t.value||``,a(c,e.currentOffset(),e.currentPosition()),{node:c}):(r(e,$.UNEXPECTED_EMPTY_LINKED_MODIFIER,n.lastStartLoc,0),c.value=``,a(c,o,s),{nextConsumeToken:t,node:c})}function d(e,t){let n=e.context(),r=i(7,n.offset,n.startLoc);return r.value=t,a(r,e.currentOffset(),e.currentPosition()),r}function f(e){let t=e.context(),n=i(6,t.offset,t.startLoc),o=e.nextToken();if(o.type===8){let t=u(e);n.modifier=t.node,o=t.nextConsumeToken||e.nextToken()}switch(o.type!==9&&r(e,$.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,zj(o)),o=e.nextToken(),o.type===2&&(o=e.nextToken()),o.type){case 10:o.value??r(e,$.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,zj(o)),n.key=d(e,o.value||``);break;case 4:o.value??r(e,$.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,zj(o)),n.key=c(e,o.value||``);break;case 5:o.value??r(e,$.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,zj(o)),n.key=s(e,o.value||``);break;case 6:o.value??r(e,$.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,zj(o)),n.key=l(e,o.value||``);break;default:{r(e,$.UNEXPECTED_EMPTY_LINKED_KEY,t.lastStartLoc,0);let s=e.context(),c=i(7,s.offset,s.startLoc);return c.value=``,a(c,s.offset,s.startLoc),n.key=c,a(n,s.offset,s.startLoc),{nextConsumeToken:o,node:n}}}return a(n,e.currentOffset(),e.currentPosition()),{node:n}}function p(e){let t=e.context(),n=i(2,t.currentType===1?e.currentOffset():t.offset,t.currentType===1?t.endLoc:t.startLoc);n.items=[];let u=null;do{let i=u||e.nextToken();switch(u=null,i.type){case 0:i.value??r(e,$.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,zj(i)),n.items.push(o(e,i.value||``));break;case 5:i.value??r(e,$.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,zj(i)),n.items.push(s(e,i.value||``));break;case 4:i.value??r(e,$.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,zj(i)),n.items.push(c(e,i.value||``));break;case 6:i.value??r(e,$.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,zj(i)),n.items.push(l(e,i.value||``));break;case 7:{let t=f(e);n.items.push(t.node),u=t.nextConsumeToken||null;break}}}while(t.currentType!==13&&t.currentType!==1);return a(n,t.currentType===1?t.lastOffset:e.currentOffset(),t.currentType===1?t.lastEndLoc:e.currentPosition()),n}function m(e,t,n,o){let s=e.context(),c=o.items.length===0,l=i(1,t,n);l.cases=[],l.cases.push(o);do{let t=p(e);c||=t.items.length===0,l.cases.push(t)}while(s.currentType!==13);return c&&r(e,$.MUST_HAVE_MESSAGES_IN_PLURAL,n,0),a(l,e.currentOffset(),e.currentPosition()),l}function h(e){let t=e.context(),{offset:n,startLoc:r}=t,i=p(e);return t.currentType===13?i:m(e,n,r,i)}function g(n){let o=Pj(n,nj({},e)),s=o.context(),c=i(0,s.offset,s.startLoc);return t&&c.loc&&(c.loc.source=n),c.body=h(o),e.onCacheKey&&(c.cacheKey=e.onCacheKey(n)),s.currentType!==13&&r(o,$.UNEXPECTED_LEXICAL_ANALYSIS,s.lastStartLoc,0,n[s.offset]||``),a(c,o.currentOffset(),o.currentPosition()),c}return{parse:g}}function zj(e){if(e.type===13)return`EOF`;let t=(e.value||``).replace(/\r?\n/gu,`\\n`);return t.length>10?t.slice(0,9)+`…`:t}function Bj(e,t={}){let n={ast:e,helpers:new Set};return{context:()=>n,helper:e=>(n.helpers.add(e),e)}}function Vj(e,t){for(let n=0;n<e.length;n++)Hj(e[n],t)}function Hj(e,t){switch(e.type){case 1:Vj(e.cases,t),t.helper(`plural`);break;case 2:Vj(e.items,t);break;case 6:Hj(e.key,t),t.helper(`linked`),t.helper(`type`);break;case 5:t.helper(`interpolate`),t.helper(`list`);break;case 4:t.helper(`interpolate`),t.helper(`named`);break}}function Uj(e,t={}){let n=Bj(e);n.helper(`normalize`),e.body&&Hj(e.body,n);let r=n.context();e.helpers=Array.from(r.helpers)}function Wj(e){let t=e.body;return t.type===2?Gj(t):t.cases.forEach(e=>Gj(e)),e}function Gj(e){if(e.items.length===1){let t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{let t=[];for(let n=0;n<e.items.length;n++){let r=e.items[n];if(!(r.type===3||r.type===9)||r.value==null)break;t.push(r.value)}if(t.length===e.items.length){e.static=vj(t);for(let t=0;t<e.items.length;t++){let n=e.items[t];(n.type===3||n.type===9)&&delete n.value}}}}function Kj(e){switch(e.t=e.type,e.type){case 0:{let t=e;Kj(t.body),t.b=t.body,delete t.body;break}case 1:{let t=e,n=t.cases;for(let e=0;e<n.length;e++)Kj(n[e]);t.c=n,delete t.cases;break}case 2:{let t=e,n=t.items;for(let e=0;e<n.length;e++)Kj(n[e]);t.i=n,delete t.items,t.static&&(t.s=t.static,delete t.static);break}case 3:case 9:case 8:case 7:{let t=e;t.value&&(t.v=t.value,delete t.value);break}case 6:{let t=e;Kj(t.key),t.k=t.key,delete t.key,t.modifier&&(Kj(t.modifier),t.m=t.modifier,delete t.modifier);break}case 5:{let t=e;t.i=t.index,delete t.index;break}case 4:{let t=e;t.k=t.key,delete t.key;break}default:}delete e.type}function qj(e,t){let{sourceMap:n,filename:r,breakLineCode:i,needIndent:a}=t,o=t.location!==!1,s={filename:r,code:``,column:1,line:1,offset:0,map:void 0,breakLineCode:i,needIndent:a,indentLevel:0};o&&e.loc&&(s.source=e.loc.source);let c=()=>s;function l(e,t){s.code+=e}function u(e,t=!0){let n=t?i:``;l(a?n+` `.repeat(e):n)}function d(e=!0){let t=++s.indentLevel;e&&u(t)}function f(e=!0){let t=--s.indentLevel;e&&u(t)}function p(){u(s.indentLevel)}return{context:c,push:l,indent:d,deindent:f,newline:p,helper:e=>`_${e}`,needIndent:()=>s.needIndent}}function Jj(e,t){let{helper:n}=e;e.push(`${n(`linked`)}(`),Qj(e,t.key),t.modifier?(e.push(`, `),Qj(e,t.modifier),e.push(`, _type`)):e.push(`, undefined, _type`),e.push(`)`)}function Yj(e,t){let{helper:n,needIndent:r}=e;e.push(`${n(`normalize`)}([`),e.indent(r());let i=t.items.length;for(let n=0;n<i&&(Qj(e,t.items[n]),n!==i-1);n++)e.push(`, `);e.deindent(r()),e.push(`])`)}function Xj(e,t){let{helper:n,needIndent:r}=e;if(t.cases.length>1){e.push(`${n(`plural`)}([`),e.indent(r());let i=t.cases.length;for(let n=0;n<i&&(Qj(e,t.cases[n]),n!==i-1);n++)e.push(`, `);e.deindent(r()),e.push(`])`)}}function Zj(e,t){t.body?Qj(e,t.body):e.push(`null`)}function Qj(e,t){let{helper:n}=e;switch(t.type){case 0:Zj(e,t);break;case 1:Xj(e,t);break;case 2:Yj(e,t);break;case 6:Jj(e,t);break;case 8:e.push(JSON.stringify(t.value),t);break;case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n(`interpolate`)}(${n(`list`)}(${t.index}))`,t);break;case 4:e.push(`${n(`interpolate`)}(${n(`named`)}(${JSON.stringify(t.key)}))`,t);break;case 9:e.push(JSON.stringify(t.value),t);break;case 3:e.push(JSON.stringify(t.value),t);break;default:}}var $j=(e,t={})=>{let n=Y(t.mode)?t.mode:`normal`,r=Y(t.filename)?t.filename:`message.intl`,i=!!t.sourceMap,a=t.breakLineCode==null?n===`arrow`?`;`:`
|
|
1992
|
+
`:t.breakLineCode,o=t.needIndent?t.needIndent:n!==`arrow`,s=e.helpers||[],c=qj(e,{mode:n,filename:r,sourceMap:i,breakLineCode:a,needIndent:o});c.push(n===`normal`?`function __msg__ (ctx) {`:`(ctx) => {`),c.indent(o),s.length>0&&(c.push(`const { ${vj(s.map(e=>`${e}: _${e}`),`, `)} } = ctx`),c.newline()),c.push(`return `),Qj(c,e),c.deindent(o),c.push(`}`),delete e.helpers;let{code:l,map:u}=c.context();return{ast:e,code:l,map:u?u.toJSON():void 0}};function eM(e,t={}){let n=nj({},t),r=!!n.jit,i=!!n.minify,a=n.optimize==null?!0:n.optimize,o=Rj(n).parse(e);return r?(a&&Wj(o),i&&Kj(o),{ast:o,code:``}):(Uj(o,n),$j(o,n))}function tM(){typeof __INTLIFY_PROD_DEVTOOLS__!=`boolean`&&(oj().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!=`boolean`&&(oj().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function nM(e){return Z(e)&&fM(e)===0&&(dj(e,`b`)||dj(e,`body`))}var rM=[`b`,`body`];function iM(e){return yM(e,rM)}var aM=[`c`,`cases`];function oM(e){return yM(e,aM,[])}var sM=[`s`,`static`];function cM(e){return yM(e,sM)}var lM=[`i`,`items`];function uM(e){return yM(e,lM,[])}var dM=[`t`,`type`];function fM(e){return yM(e,dM)}var pM=[`v`,`value`];function mM(e,t){let n=yM(e,pM);if(n!=null)return n;throw xM(t)}var hM=[`m`,`modifier`];function gM(e){return yM(e,hM)}var _M=[`k`,`key`];function vM(e){let t=yM(e,_M);if(t)return t;throw xM(6)}function yM(e,t,n){for(let n=0;n<t.length;n++){let r=t[n];if(dj(e,r)&&e[r]!=null)return e[r]}return n}var bM=[...rM,...aM,...sM,...lM,..._M,...hM,...pM,...dM];function xM(e){return Error(`unhandled node type: ${e}`)}function SM(e){return t=>CM(t,e)}function CM(e,t){let n=iM(t);if(n==null)throw xM(0);if(fM(n)===1){let t=oM(n);return e.plural(t.reduce((t,n)=>[...t,wM(e,n)],[]))}else return wM(e,n)}function wM(e,t){let n=cM(t);if(n!=null)return e.type===`text`?n:e.normalize([n]);{let n=uM(t).reduce((t,n)=>[...t,TM(e,n)],[]);return e.normalize(n)}}function TM(e,t){let n=fM(t);switch(n){case 3:return mM(t,n);case 9:return mM(t,n);case 4:{let r=t;if(dj(r,`k`)&&r.k)return e.interpolate(e.named(r.k));if(dj(r,`key`)&&r.key)return e.interpolate(e.named(r.key));throw xM(n)}case 5:{let r=t;if(dj(r,`i`)&&QA(r.i))return e.interpolate(e.list(r.i));if(dj(r,`index`)&&QA(r.index))return e.interpolate(e.list(r.index));throw xM(n)}case 6:{let n=t,r=gM(n),i=vM(n);return e.linked(TM(e,i),r?TM(e,r):void 0,e.type)}case 7:return mM(t,n);case 8:return mM(t,n);default:throw Error(`unhandled node on format message part: ${n}`)}}var EM=e=>e,DM=ij();function OM(e,t={}){let n=!1,r=t.onError||wj;return t.onError=e=>{n=!0,r(e)},{...eM(e,t),detectError:n}}function kM(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&Y(e)){X(t.warnHtmlMessage)&&t.warnHtmlMessage;let n=(t.onCacheKey||EM)(e),r=DM[n];if(r)return r;let{ast:i,detectError:a}=OM(e,{...t,location:!1,jit:!0}),o=SM(i);return a?o:DM[n]=o}else{let t=e.cacheKey;return t?DM[t]||(DM[t]=SM(e)):SM(e)}}var AM=null;function jM(e){AM=e}function MM(e,t,n){AM&&AM.emit(`i18n:init`,{timestamp:Date.now(),i18n:e,version:t,meta:n})}var NM=PM(`function:translate`);function PM(e){return t=>AM&&AM.emit(e,t)}var FM={INVALID_ARGUMENT:17,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_NON_STRING_MESSAGE:20,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23};function IM(e){return Cj(e,null,void 0)}FM.INVALID_ARGUMENT,FM.INVALID_DATE_ARGUMENT,FM.INVALID_ISO_DATE_ARGUMENT,FM.NOT_SUPPORT_NON_STRING_MESSAGE,FM.NOT_SUPPORT_LOCALE_PROMISE_VALUE,FM.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION,FM.NOT_SUPPORT_LOCALE_TYPE;function LM(e,t){return t.locale==null?zM(e.locale):zM(t.locale)}var RM;function zM(e){if(Y(e))return e;if(pj(e)){if(e.resolvedOnce&&RM!=null)return RM;if(e.constructor.name===`Function`){let t=e();if(mj(t))throw IM(FM.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return RM=t}else throw IM(FM.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw IM(FM.NOT_SUPPORT_LOCALE_TYPE)}function BM(e,t,n){return[...new Set([n,...fj(t)?t:Z(t)?Object.keys(t):Y(t)?[t]:[n]])]}function VM(e,t,n){let r=Y(n)?n:rN,i=e;i.__localeChainCache||=new Map;let a=i.__localeChainCache.get(r);if(!a){a=[];let e=[n];for(;fj(e);)e=HM(a,e,t);let o=fj(t)||!Q(t)?t:t.default?t.default:null;e=Y(o)?[o]:o,fj(e)&&HM(a,e,!1),i.__localeChainCache.set(r,a)}return a}function HM(e,t,n){let r=!0;for(let i=0;i<t.length&&X(r);i++){let a=t[i];Y(a)&&(r=UM(e,t[i],n))}return r}function UM(e,t,n){let r,i=t.split(`-`);do r=WM(e,i.join(`-`),n),i.splice(-1,1);while(i.length&&r===!0);return r}function WM(e,t,n){let r=!1;if(!e.includes(t)&&(r=!0,t)){r=t[t.length-1]!==`!`;let i=t.replace(/!/g,``);e.push(i),(fj(n)||Q(n))&&n[i]&&(r=n[i])}return r}var GM=[];GM[0]={w:[0],i:[3,0],"[":[4],o:[7]},GM[1]={w:[1],".":[2],"[":[4],o:[7]},GM[2]={w:[2],i:[3,0],0:[3,0]},GM[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},GM[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},GM[5]={"'":[4,0],o:8,l:[5,0]},GM[6]={'"':[4,0],o:8,l:[6,0]};var KM=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function qM(e){return KM.test(e)}function JM(e){let t=e.charCodeAt(0);return t===e.charCodeAt(e.length-1)&&(t===34||t===39)?e.slice(1,-1):e}function YM(e){if(e==null)return`o`;switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return`i`;case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return`w`}return`i`}function XM(e){let t=e.trim();return e.charAt(0)===`0`&&isNaN(parseInt(e))?!1:qM(t)?JM(t):`*`+t}function ZM(e){let t=[],n=-1,r=0,i=0,a,o,s,c,l,u,d,f=[];f[0]=()=>{o===void 0?o=s:o+=s},f[1]=()=>{o!==void 0&&(t.push(o),o=void 0)},f[2]=()=>{f[0](),i++},f[3]=()=>{if(i>0)i--,r=4,f[0]();else{if(i=0,o===void 0||(o=XM(o),o===!1))return!1;f[1]()}};function p(){let t=e[n+1];if(r===5&&t===`'`||r===6&&t===`"`)return n++,s=`\\`+t,f[0](),!0}for(;r!==null;)if(n++,a=e[n],!(a===`\\`&&p())){if(c=YM(a),d=GM[r],l=d[c]||d.l||8,l===8||(r=l[0],l[1]!==void 0&&(u=f[l[1]],u&&(s=a,u()===!1))))return;if(r===7)return t}}var QM=new Map;function $M(e,t){return Z(e)?e[t]:null}function eN(e,t){if(!Z(e))return null;let n=QM.get(t);if(n||(n=ZM(t),n&&QM.set(t,n)),!n)return null;let r=n.length,i=e,a=0;for(;a<r;){let e=n[a];if(bM.includes(e)&&nM(i))return null;let t=i[e];if(t===void 0||pj(i))return null;i=t,a++}return i}var tN={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:7};tN.NOT_FOUND_KEY,tN.FALLBACK_TO_TRANSLATE,tN.CANNOT_FORMAT_NUMBER,tN.FALLBACK_TO_NUMBER_FORMAT,tN.CANNOT_FORMAT_DATE,tN.FALLBACK_TO_DATE_FORMAT,tN.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER;var nN=`10.0.8`,rN=`en-US`,iN=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function aN(){return{upper:(e,t)=>t===`text`&&Y(e)?e.toUpperCase():t===`vnode`&&Z(e)&&`__v_isVNode`in e?e.children.toUpperCase():e,lower:(e,t)=>t===`text`&&Y(e)?e.toLowerCase():t===`vnode`&&Z(e)&&`__v_isVNode`in e?e.children.toLowerCase():e,capitalize:(e,t)=>t===`text`&&Y(e)?iN(e):t===`vnode`&&Z(e)&&`__v_isVNode`in e?iN(e.children):e}}var oN;function sN(e){oN=e}var cN;function lN(e){cN=e}var uN;function dN(e){uN=e}var fN=null,pN=()=>fN,mN=null,hN=e=>{mN=e},gN=()=>mN,_N=0;function vN(e={}){let t=pj(e.onWarn)?e.onWarn:qA,n=Y(e.version)?e.version:nN,r=Y(e.locale)||pj(e.locale)?e.locale:rN,i=pj(r)?rN:r,a=fj(e.fallbackLocale)||Q(e.fallbackLocale)||Y(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:i,o=Q(e.messages)?e.messages:yN(i),s=Q(e.datetimeFormats)?e.datetimeFormats:yN(i),c=Q(e.numberFormats)?e.numberFormats:yN(i),l=nj(ij(),e.modifiers,aN()),u=e.pluralRules||ij(),d=pj(e.missing)?e.missing:null,f=X(e.missingWarn)||ej(e.missingWarn)?e.missingWarn:!0,p=X(e.fallbackWarn)||ej(e.fallbackWarn)?e.fallbackWarn:!0,m=!!e.fallbackFormat,h=!!e.unresolving,g=pj(e.postTranslation)?e.postTranslation:null,_=Q(e.processor)?e.processor:null,v=X(e.warnHtmlMessage)?e.warnHtmlMessage:!0,y=!!e.escapeParameter,b=pj(e.messageCompiler)?e.messageCompiler:oN,x=pj(e.messageResolver)?e.messageResolver:cN||$M,S=pj(e.localeFallbacker)?e.localeFallbacker:uN||BM,C=Z(e.fallbackContext)?e.fallbackContext:void 0,w=e,T=Z(w.__datetimeFormatters)?w.__datetimeFormatters:new Map,ee=Z(w.__numberFormatters)?w.__numberFormatters:new Map,E=Z(w.__meta)?w.__meta:{};_N++;let D={version:n,cid:_N,locale:r,fallbackLocale:a,messages:o,modifiers:l,pluralRules:u,missing:d,missingWarn:f,fallbackWarn:p,fallbackFormat:m,unresolving:h,postTranslation:g,processor:_,warnHtmlMessage:v,escapeParameter:y,messageCompiler:b,messageResolver:x,localeFallbacker:S,fallbackContext:C,onWarn:t,__meta:E};return D.datetimeFormats=s,D.numberFormats=c,D.__datetimeFormatters=T,D.__numberFormatters=ee,__INTLIFY_PROD_DEVTOOLS__&&MM(D,n,E),D}var yN=e=>({[e]:ij()});function bN(e,t,n,r,i){let{missing:a,onWarn:o}=e;if(a!==null){let r=a(e,n,t,i);return Y(r)?r:t}else return t}function xN(e,t,n){let r=e;r.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}function SN(e,t){return e===t?!1:e.split(`-`)[0]===t.split(`-`)[0]}function CN(e,t){let n=t.indexOf(e);if(n===-1)return!1;for(let r=n+1;r<t.length;r++)if(SN(e,t[r]))return!0;return!1}var wN=typeof Intl<`u`;wN&&Intl.DateTimeFormat,wN&&Intl.NumberFormat;function TN(e,...t){let{datetimeFormats:n,unresolving:r,fallbackLocale:i,onWarn:a,localeFallbacker:o}=e,{__datetimeFormatters:s}=e,[c,l,u,d]=DN(...t),f=X(u.missingWarn)?u.missingWarn:e.missingWarn;X(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;let p=!!u.part,m=LM(e,u),h=o(e,i,m);if(!Y(c)||c===``)return new Intl.DateTimeFormat(m,d).format(l);let g={},_,v=null;for(let t=0;t<h.length&&(_=h[t],g=n[_]||{},v=g[c],!Q(v));t++)bN(e,c,_,f,`datetime format`);if(!Q(v)||!Y(_))return r?-1:c;let y=`${_}__${c}`;tj(d)||(y=`${y}__${JSON.stringify(d)}`);let b=s.get(y);return b||(b=new Intl.DateTimeFormat(_,nj({},v,d)),s.set(y,b)),p?b.formatToParts(l):b.format(l)}var EN=[`localeMatcher`,`weekday`,`era`,`year`,`month`,`day`,`hour`,`minute`,`second`,`timeZoneName`,`formatMatcher`,`hour12`,`timeZone`,`dateStyle`,`timeStyle`,`calendar`,`dayPeriod`,`numberingSystem`,`hourCycle`,`fractionalSecondDigits`];function DN(...e){let[t,n,r,i]=e,a=ij(),o=ij(),s;if(Y(t)){let e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw IM(FM.INVALID_ISO_DATE_ARGUMENT);let n=e[3]?e[3].trim().startsWith(`T`)?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();s=new Date(n);try{s.toISOString()}catch{throw IM(FM.INVALID_ISO_DATE_ARGUMENT)}}else if($A(t)){if(isNaN(t.getTime()))throw IM(FM.INVALID_DATE_ARGUMENT);s=t}else if(QA(t))s=t;else throw IM(FM.INVALID_ARGUMENT);return Y(n)?a.key=n:Q(n)&&Object.keys(n).forEach(e=>{EN.includes(e)?o[e]=n[e]:a[e]=n[e]}),Y(r)?a.locale=r:Q(r)&&(o=r),Q(i)&&(o=i),[a.key||``,s,a,o]}function ON(e,t,n){let r=e;for(let e in n){let n=`${t}__${e}`;r.__datetimeFormatters.has(n)&&r.__datetimeFormatters.delete(n)}}function kN(e,...t){let{numberFormats:n,unresolving:r,fallbackLocale:i,onWarn:a,localeFallbacker:o}=e,{__numberFormatters:s}=e,[c,l,u,d]=jN(...t),f=X(u.missingWarn)?u.missingWarn:e.missingWarn;X(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;let p=!!u.part,m=LM(e,u),h=o(e,i,m);if(!Y(c)||c===``)return new Intl.NumberFormat(m,d).format(l);let g={},_,v=null;for(let t=0;t<h.length&&(_=h[t],g=n[_]||{},v=g[c],!Q(v));t++)bN(e,c,_,f,`number format`);if(!Q(v)||!Y(_))return r?-1:c;let y=`${_}__${c}`;tj(d)||(y=`${y}__${JSON.stringify(d)}`);let b=s.get(y);return b||(b=new Intl.NumberFormat(_,nj({},v,d)),s.set(y,b)),p?b.formatToParts(l):b.format(l)}var AN=[`localeMatcher`,`style`,`currency`,`currencyDisplay`,`currencySign`,`useGrouping`,`minimumIntegerDigits`,`minimumFractionDigits`,`maximumFractionDigits`,`minimumSignificantDigits`,`maximumSignificantDigits`,`compactDisplay`,`notation`,`signDisplay`,`unit`,`unitDisplay`,`roundingMode`,`roundingPriority`,`roundingIncrement`,`trailingZeroDisplay`];function jN(...e){let[t,n,r,i]=e,a=ij(),o=ij();if(!QA(t))throw IM(FM.INVALID_ARGUMENT);let s=t;return Y(n)?a.key=n:Q(n)&&Object.keys(n).forEach(e=>{AN.includes(e)?o[e]=n[e]:a[e]=n[e]}),Y(r)?a.locale=r:Q(r)&&(o=r),Q(i)&&(o=i),[a.key||``,s,a,o]}function MN(e,t,n){let r=e;for(let e in n){let n=`${t}__${e}`;r.__numberFormatters.has(n)&&r.__numberFormatters.delete(n)}}var NN=e=>e,PN=e=>``,FN=`text`,IN=e=>e.length===0?``:vj(e),LN=_j;function RN(e,t){return e=Math.abs(e),t===2?e?+(e>1):1:e?Math.min(e,2):0}function zN(e){let t=QA(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(QA(e.named.count)||QA(e.named.n))?QA(e.named.count)?e.named.count:QA(e.named.n)?e.named.n:t:t}function BN(e,t){t.count||=e,t.n||=e}function VN(e={}){let t=e.locale,n=zN(e),r=Z(e.pluralRules)&&Y(t)&&pj(e.pluralRules[t])?e.pluralRules[t]:RN,i=Z(e.pluralRules)&&Y(t)&&pj(e.pluralRules[t])?RN:void 0,a=e=>e[r(n,e.length,i)],o=e.list||[],s=e=>o[e],c=e.named||ij();QA(e.pluralIndex)&&BN(n,c);let l=e=>c[e];function u(t,n){return(pj(e.messages)?e.messages(t,!!n):Z(e.messages)?e.messages[t]:!1)||(e.parent?e.parent.message(t):PN)}let d=t=>e.modifiers?e.modifiers[t]:NN,f=Q(e.processor)&&pj(e.processor.normalize)?e.processor.normalize:IN,p=Q(e.processor)&&pj(e.processor.interpolate)?e.processor.interpolate:LN,m={list:s,named:l,plural:a,linked:(e,...t)=>{let[n,r]=t,i=`text`,a=``;t.length===1?Z(n)?(a=n.modifier||a,i=n.type||i):Y(n)&&(a=n||a):t.length===2&&(Y(n)&&(a=n||a),Y(r)&&(i=r||i));let o=u(e,!0)(m),s=i===`vnode`&&fj(o)&&a?o[0]:o;return a?d(a)(s,i):s},message:u,type:Q(e.processor)&&Y(e.processor.type)?e.processor.type:FN,interpolate:p,normalize:f,values:nj(ij(),o,c)};return m}var HN=()=>``,UN=e=>pj(e);function WN(e,...t){let{fallbackFormat:n,postTranslation:r,unresolving:i,messageCompiler:a,fallbackLocale:o,messages:s}=e,[c,l]=YN(...t),u=X(l.missingWarn)?l.missingWarn:e.missingWarn,d=X(l.fallbackWarn)?l.fallbackWarn:e.fallbackWarn,f=X(l.escapeParameter)?l.escapeParameter:e.escapeParameter,p=!!l.resolvedMessage,m=Y(l.default)||X(l.default)?X(l.default)?a?c:()=>c:l.default:n?a?c:()=>c:null,h=n||m!=null&&(Y(m)||pj(m)),g=LM(e,l);f&&GN(l);let[_,v,y]=p?[c,g,s[g]||ij()]:KN(e,c,g,o,d,u),b=_,x=c;if(!p&&!(Y(b)||nM(b)||UN(b))&&h&&(b=m,x=b),!p&&(!(Y(b)||nM(b)||UN(b))||!Y(v)))return i?-1:c;let S=!1,C=UN(b)?b:qN(e,c,v,b,x,()=>{S=!0});if(S)return b;let w=JN(e,C,VN(ZN(e,v,y,l))),T=r?r(w,c):w;if(f&&Y(T)&&(T=lj(T)),__INTLIFY_PROD_DEVTOOLS__){let t={timestamp:Date.now(),key:Y(c)?c:UN(b)?b.key:``,locale:v||(UN(b)?b.locale:``),format:Y(b)?b:UN(b)?b.source:``,message:T};t.meta=nj({},e.__meta,pN()||{}),NM(t)}return T}function GN(e){fj(e.list)?e.list=e.list.map(e=>Y(e)?sj(e):e):Z(e.named)&&Object.keys(e.named).forEach(t=>{Y(e.named[t])&&(e.named[t]=sj(e.named[t]))})}function KN(e,t,n,r,i,a){let{messages:o,onWarn:s,messageResolver:c,localeFallbacker:l}=e,u=l(e,r,n),d=ij(),f,p=null;for(let n=0;n<u.length&&(f=u[n],d=o[f]||ij(),(p=c(d,t))===null&&(p=d[t]),!(Y(p)||nM(p)||UN(p)));n++)if(!CN(f,u)){let n=bN(e,t,f,a,`translate`);n!==t&&(p=n)}return[p,f,d]}function qN(e,t,n,r,i,a){let{messageCompiler:o,warnHtmlMessage:s}=e;if(UN(r)){let e=r;return e.locale=e.locale||n,e.key=e.key||t,e}if(o==null){let e=(()=>r);return e.locale=n,e.key=t,e}let c=o(r,XN(e,n,i,r,s,a));return c.locale=n,c.key=t,c.source=r,c}function JN(e,t,n){return t(n)}function YN(...e){let[t,n,r]=e,i=ij();if(!Y(t)&&!QA(t)&&!UN(t)&&!nM(t))throw IM(FM.INVALID_ARGUMENT);let a=QA(t)?String(t):(UN(t),t);return QA(n)?i.plural=n:Y(n)?i.default=n:Q(n)&&!tj(n)?i.named=n:fj(n)&&(i.list=n),QA(r)?i.plural=r:Y(r)?i.default=r:Q(r)&&nj(i,r),[a,i]}function XN(e,t,n,r,i,a){return{locale:t,key:n,warnHtmlMessage:i,onError:e=>{throw a&&a(e),e},onCacheKey:e=>XA(t,n,e)}}function ZN(e,t,n,r){let{modifiers:i,pluralRules:a,messageResolver:o,fallbackLocale:s,fallbackWarn:c,missingWarn:l,fallbackContext:u}=e,d={locale:t,modifiers:i,pluralRules:a,messages:(r,i)=>{let a=o(n,r);if(a==null&&(u||i)){let[,,n]=KN(u||e,r,t,s,c,l);a=o(n,r)}if(Y(a)||nM(a)){let n=!1,i=qN(e,r,t,a,r,()=>{n=!0});return n?HN:i}else if(UN(a))return a;else return HN}};return e.processor&&(d.processor=e.processor),r.list&&(d.list=r.list),r.named&&(d.named=r.named),QA(r.plural)&&(d.pluralIndex=r.plural),d}tM();var QN=`10.0.8`;function $N(){typeof __VUE_I18N_FULL_INSTALL__!=`boolean`&&(oj().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!=`boolean`&&(oj().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!=`boolean`&&(oj().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!=`boolean`&&(oj().__INTLIFY_PROD_DEVTOOLS__=!1)}var eP={FALLBACK_TO_ROOT:8,NOT_FOUND_PARENT_SCOPE:9,IGNORE_OBJ_FLATTEN:10,DEPRECATE_TC:11};eP.FALLBACK_TO_ROOT,eP.NOT_FOUND_PARENT_SCOPE,eP.IGNORE_OBJ_FLATTEN,eP.DEPRECATE_TC;var tP={UNEXPECTED_RETURN_TYPE:24,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:30,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_COMPATIBLE_LEGACY_VUE_I18N:33,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function nP(e,...t){return Cj(e,null,void 0)}tP.UNEXPECTED_RETURN_TYPE,tP.INVALID_ARGUMENT,tP.MUST_BE_CALL_SETUP_TOP,tP.NOT_INSTALLED,tP.UNEXPECTED_ERROR,tP.REQUIRED_VALUE,tP.INVALID_VALUE,tP.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN,tP.NOT_INSTALLED_WITH_PROVIDE,tP.NOT_COMPATIBLE_LEGACY_VUE_I18N,tP.NOT_AVAILABLE_COMPOSITION_IN_LEGACY;var rP=YA(`__translateVNode`),iP=YA(`__datetimeParts`),aP=YA(`__numberParts`),oP=YA(`__setPluralRules`);YA(`__intlifyMeta`);var sP=YA(`__injectWithOption`),cP=YA(`__dispose`);function lP(e){if(!Z(e)||nM(e))return e;for(let t in e)if(dj(e,t))if(!t.includes(`.`))Z(e[t])&&lP(e[t]);else{let n=t.split(`.`),r=n.length-1,i=e,a=!1;for(let e=0;e<r;e++){if(n[e]===`__proto__`)throw Error(`unsafe key: ${n[e]}`);if(n[e]in i||(i[n[e]]=ij()),!Z(i[n[e]])){a=!0;break}i=i[n[e]]}if(a||(nM(i)?bM.includes(n[r])||delete e[t]:(i[n[r]]=e[t],delete e[t])),!nM(i)){let e=i[n[r]];Z(e)&&lP(e)}}return e}function uP(e,t){let{messages:n,__i18n:r,messageResolver:i,flatJson:a}=t,o=Q(n)?n:fj(r)?ij():{[e]:ij()};if(fj(r)&&r.forEach(e=>{if(`locale`in e&&`resource`in e){let{locale:t,resource:n}=e;t?(o[t]=o[t]||ij(),bj(n,o[t])):bj(n,o)}else Y(e)&&bj(JSON.parse(e),o)}),i==null&&a)for(let e in o)dj(o,e)&&lP(o[e]);return o}function dP(e){return e.type}function fP(e,t,n){let r=Z(t.messages)?t.messages:ij();`__i18nGlobal`in n&&(r=uP(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));let i=Object.keys(r);if(i.length&&i.forEach(t=>{e.mergeLocaleMessage(t,r[t])}),Z(t.datetimeFormats)){let n=Object.keys(t.datetimeFormats);n.length&&n.forEach(n=>{e.mergeDateTimeFormat(n,t.datetimeFormats[n])})}if(Z(t.numberFormats)){let n=Object.keys(t.numberFormats);n.length&&n.forEach(n=>{e.mergeNumberFormat(n,t.numberFormats[n])})}}function pP(e){return Ue(Re,null,e,0)}var mP=()=>[],hP=()=>!1,gP=0;function _P(e){return((t,n,r,i)=>e(n,r,de()||void 0,i))}function vP(e={}){let{__root:t,__injectWithOption:n}=e,r=t===void 0,i=e.flatJson,a=JA?O:ze,o=X(e.inheritLocale)?e.inheritLocale:!0,s=a(t&&o?t.locale.value:Y(e.locale)?e.locale:rN),c=a(t&&o?t.fallbackLocale.value:Y(e.fallbackLocale)||fj(e.fallbackLocale)||Q(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:s.value),l=a(uP(s.value,e)),u=a(Q(e.datetimeFormats)?e.datetimeFormats:{[s.value]:{}}),d=a(Q(e.numberFormats)?e.numberFormats:{[s.value]:{}}),p=t?t.missingWarn:X(e.missingWarn)||ej(e.missingWarn)?e.missingWarn:!0,m=t?t.fallbackWarn:X(e.fallbackWarn)||ej(e.fallbackWarn)?e.fallbackWarn:!0,h=t?t.fallbackRoot:X(e.fallbackRoot)?e.fallbackRoot:!0,g=!!e.fallbackFormat,_=pj(e.missing)?e.missing:null,v=pj(e.missing)?_P(e.missing):null,y=pj(e.postTranslation)?e.postTranslation:null,b=t?t.warnHtmlMessage:X(e.warnHtmlMessage)?e.warnHtmlMessage:!0,x=!!e.escapeParameter,S=t?t.modifiers:Q(e.modifiers)?e.modifiers:{},C=e.pluralRules||t&&t.pluralRules,w;w=(()=>{r&&hN(null);let t={version:QN,locale:s.value,fallbackLocale:c.value,messages:l.value,modifiers:S,pluralRules:C,missing:v===null?void 0:v,missingWarn:p,fallbackWarn:m,fallbackFormat:g,unresolving:!0,postTranslation:y===null?void 0:y,warnHtmlMessage:b,escapeParameter:x,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:`vue`}};t.datetimeFormats=u.value,t.numberFormats=d.value,t.__datetimeFormatters=Q(w)?w.__datetimeFormatters:void 0,t.__numberFormatters=Q(w)?w.__numberFormatters:void 0;let n=vN(t);return r&&hN(n),n})(),xN(w,s.value,c.value);function T(){return[s.value,c.value,l.value,u.value,d.value]}let ee=De({get:()=>s.value,set:e=>{s.value=e,w.locale=s.value}}),E=De({get:()=>c.value,set:e=>{c.value=e,w.fallbackLocale=c.value,xN(w,s.value,e)}}),D=De(()=>l.value),te=De(()=>u.value),ne=De(()=>d.value);function re(){return pj(y)?y:null}function ie(e){y=e,w.postTranslation=e}function ae(){return _}function oe(e){e!==null&&(v=_P(e)),_=e,w.missing=v}let se=(e,n,i,a,o,s)=>{T();let c;try{__INTLIFY_PROD_DEVTOOLS__,r||(w.fallbackContext=t?gN():void 0),c=e(w)}finally{__INTLIFY_PROD_DEVTOOLS__,r||(w.fallbackContext=void 0)}if(i!==`translate exists`&&QA(c)&&c===-1||i===`translate exists`&&!c){let[e,r]=n();return t&&h?a(t):o(e)}else if(s(c))return c;else throw nP(tP.UNEXPECTED_RETURN_TYPE)};function ce(...e){return se(t=>Reflect.apply(WN,null,[t,...e]),()=>YN(...e),`translate`,t=>Reflect.apply(t.t,t,[...e]),e=>e,e=>Y(e))}function le(...e){let[t,n,r]=e;if(r&&!Z(r))throw nP(tP.INVALID_ARGUMENT);return ce(t,n,nj({resolvedMessage:!0},r||{}))}function ue(...e){return se(t=>Reflect.apply(TN,null,[t,...e]),()=>DN(...e),`datetime format`,t=>Reflect.apply(t.d,t,[...e]),()=>``,e=>Y(e))}function de(...e){return se(t=>Reflect.apply(kN,null,[t,...e]),()=>jN(...e),`number format`,t=>Reflect.apply(t.n,t,[...e]),()=>``,e=>Y(e))}function fe(e){return e.map(e=>Y(e)||QA(e)||X(e)?pP(String(e)):e)}let pe={normalize:fe,interpolate:e=>e,type:`vnode`};function me(...e){return se(t=>{let n,r=t;try{r.processor=pe,n=Reflect.apply(WN,null,[r,...e])}finally{r.processor=null}return n},()=>YN(...e),`translate`,t=>t[rP](...e),e=>[pP(e)],e=>fj(e))}function he(...e){return se(t=>Reflect.apply(kN,null,[t,...e]),()=>jN(...e),`number format`,t=>t[aP](...e),mP,e=>Y(e)||fj(e))}function ge(...e){return se(t=>Reflect.apply(TN,null,[t,...e]),()=>DN(...e),`datetime format`,t=>t[iP](...e),mP,e=>Y(e)||fj(e))}function _e(e){C=e,w.pluralRules=C}function ve(e,t){return se(()=>{if(!e)return!1;let n=xe(Y(t)?t:s.value),r=w.messageResolver(n,e);return nM(r)||UN(r)||Y(r)},()=>[e],`translate exists`,n=>Reflect.apply(n.te,n,[e,t]),hP,e=>X(e))}function ye(e){let t=null,n=VM(w,c.value,s.value);for(let r=0;r<n.length;r++){let i=l.value[n[r]]||{},a=w.messageResolver(i,e);if(a!=null){t=a;break}}return t}function be(e){return ye(e)??(t&&t.tm(e)||{})}function xe(e){return l.value[e]||{}}function Se(e,t){if(i){let n={[e]:t};for(let e in n)dj(n,e)&&lP(n[e]);t=n[e]}l.value[e]=t,w.messages=l.value}function Ce(e,t){l.value[e]=l.value[e]||{};let n={[e]:t};if(i)for(let e in n)dj(n,e)&&lP(n[e]);t=n[e],bj(t,l.value[e]),w.messages=l.value}function we(e){return u.value[e]||{}}function Te(e,t){u.value[e]=t,w.datetimeFormats=u.value,ON(w,e,t)}function Ee(e,t){u.value[e]=nj(u.value[e]||{},t),w.datetimeFormats=u.value,ON(w,e,t)}function Oe(e){return d.value[e]||{}}function ke(e,t){d.value[e]=t,w.numberFormats=d.value,MN(w,e,t)}function Ae(e,t){d.value[e]=nj(d.value[e]||{},t),w.numberFormats=d.value,MN(w,e,t)}gP++,t&&JA&&(f(t.locale,e=>{o&&(s.value=e,w.locale=e,xN(w,s.value,c.value))}),f(t.fallbackLocale,e=>{o&&(c.value=e,w.fallbackLocale=e,xN(w,s.value,c.value))}));let je={id:gP,locale:ee,fallbackLocale:E,get inheritLocale(){return o},set inheritLocale(e){o=e,e&&t&&(s.value=t.locale.value,c.value=t.fallbackLocale.value,xN(w,s.value,c.value))},get availableLocales(){return Object.keys(l.value).sort()},messages:D,get modifiers(){return S},get pluralRules(){return C||{}},get isGlobal(){return r},get missingWarn(){return p},set missingWarn(e){p=e,w.missingWarn=p},get fallbackWarn(){return m},set fallbackWarn(e){m=e,w.fallbackWarn=m},get fallbackRoot(){return h},set fallbackRoot(e){h=e},get fallbackFormat(){return g},set fallbackFormat(e){g=e,w.fallbackFormat=g},get warnHtmlMessage(){return b},set warnHtmlMessage(e){b=e,w.warnHtmlMessage=e},get escapeParameter(){return x},set escapeParameter(e){x=e,w.escapeParameter=e},t:ce,getLocaleMessage:xe,setLocaleMessage:Se,mergeLocaleMessage:Ce,getPostTranslationHandler:re,setPostTranslationHandler:ie,getMissingHandler:ae,setMissingHandler:oe,[oP]:_e};return je.datetimeFormats=te,je.numberFormats=ne,je.rt=le,je.te=ve,je.tm=be,je.d=ue,je.n=de,je.getDateTimeFormat=we,je.setDateTimeFormat=Te,je.mergeDateTimeFormat=Ee,je.getNumberFormat=Oe,je.setNumberFormat=ke,je.mergeNumberFormat=Ae,je[sP]=n,je[rP]=me,je[iP]=ge,je[aP]=he,je}function yP(e){let t=Y(e.locale)?e.locale:rN,n=Y(e.fallbackLocale)||fj(e.fallbackLocale)||Q(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,r=pj(e.missing)?e.missing:void 0,i=X(e.silentTranslationWarn)||ej(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,a=X(e.silentFallbackWarn)||ej(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,o=X(e.fallbackRoot)?e.fallbackRoot:!0,s=!!e.formatFallbackMessages,c=Q(e.modifiers)?e.modifiers:{},l=e.pluralizationRules,u=pj(e.postTranslation)?e.postTranslation:void 0,d=Y(e.warnHtmlInMessage)?e.warnHtmlInMessage!==`off`:!0,f=!!e.escapeParameterHtml,p=X(e.sync)?e.sync:!0,m=e.messages;if(Q(e.sharedMessages)){let t=e.sharedMessages;m=Object.keys(t).reduce((e,n)=>(nj(e[n]||(e[n]={}),t[n]),e),m||{})}let{__i18n:h,__root:g,__injectWithOption:_}=e,v=e.datetimeFormats,y=e.numberFormats,b=e.flatJson;return{locale:t,fallbackLocale:n,messages:m,flatJson:b,datetimeFormats:v,numberFormats:y,missing:r,missingWarn:i,fallbackWarn:a,fallbackRoot:o,fallbackFormat:s,modifiers:c,pluralRules:l,postTranslation:u,warnHtmlMessage:d,escapeParameter:f,messageResolver:e.messageResolver,inheritLocale:p,__i18n:h,__root:g,__injectWithOption:_}}function bP(e={}){let t=vP(yP(e)),{__extender:n}=e,r={id:t.id,get locale(){return t.locale.value},set locale(e){t.locale.value=e},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(e){t.fallbackLocale.value=e},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get missing(){return t.getMissingHandler()},set missing(e){t.setMissingHandler(e)},get silentTranslationWarn(){return X(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(e){t.missingWarn=X(e)?!e:e},get silentFallbackWarn(){return X(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(e){t.fallbackWarn=X(e)?!e:e},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(e){t.fallbackFormat=e},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(e){t.setPostTranslationHandler(e)},get sync(){return t.inheritLocale},set sync(e){t.inheritLocale=e},get warnHtmlInMessage(){return t.warnHtmlMessage?`warn`:`off`},set warnHtmlInMessage(e){t.warnHtmlMessage=e!==`off`},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(e){t.escapeParameter=e},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...e){return Reflect.apply(t.t,t,[...e])},rt(...e){return Reflect.apply(t.rt,t,[...e])},tc(...e){let[n,r,i]=e,a={plural:1},o=null,s=null;if(!Y(n))throw nP(tP.INVALID_ARGUMENT);let c=n;return Y(r)?a.locale=r:QA(r)?a.plural=r:fj(r)?o=r:Q(r)&&(s=r),Y(i)?a.locale=i:fj(i)?o=i:Q(i)&&(s=i),Reflect.apply(t.t,t,[c,o||s||{},a])},te(e,n){return t.te(e,n)},tm(e){return t.tm(e)},getLocaleMessage(e){return t.getLocaleMessage(e)},setLocaleMessage(e,n){t.setLocaleMessage(e,n)},mergeLocaleMessage(e,n){t.mergeLocaleMessage(e,n)},d(...e){return Reflect.apply(t.d,t,[...e])},getDateTimeFormat(e){return t.getDateTimeFormat(e)},setDateTimeFormat(e,n){t.setDateTimeFormat(e,n)},mergeDateTimeFormat(e,n){t.mergeDateTimeFormat(e,n)},n(...e){return Reflect.apply(t.n,t,[...e])},getNumberFormat(e){return t.getNumberFormat(e)},setNumberFormat(e,n){t.setNumberFormat(e,n)},mergeNumberFormat(e,n){t.mergeNumberFormat(e,n)}};return r.__extender=n,r}function xP(e,t,n){return{beforeCreate(){let r=de();if(!r)throw nP(tP.UNEXPECTED_ERROR);let i=this.$options;if(i.i18n){let r=i.i18n;if(i.__i18n&&(r.__i18n=i.__i18n),r.__root=t,this===this.$root)this.$i18n=SP(e,r);else{r.__injectWithOption=!0,r.__extender=n.__vueI18nExtend,this.$i18n=bP(r);let e=this.$i18n;e.__extender&&(e.__disposer=e.__extender(this.$i18n))}}else if(i.__i18n)if(this===this.$root)this.$i18n=SP(e,i);else{this.$i18n=bP({__i18n:i.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});let e=this.$i18n;e.__extender&&(e.__disposer=e.__extender(this.$i18n))}else this.$i18n=e;i.__i18nGlobal&&fP(t,i,i),this.$t=(...e)=>this.$i18n.t(...e),this.$rt=(...e)=>this.$i18n.rt(...e),this.$tc=(...e)=>this.$i18n.tc(...e),this.$te=(e,t)=>this.$i18n.te(e,t),this.$d=(...e)=>this.$i18n.d(...e),this.$n=(...e)=>this.$i18n.n(...e),this.$tm=e=>this.$i18n.tm(e),n.__setInstance(r,this.$i18n)},mounted(){},unmounted(){let e=de();if(!e)throw nP(tP.UNEXPECTED_ERROR);let t=this.$i18n;delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,t.__disposer&&(t.__disposer(),delete t.__disposer,delete t.__extender),n.__deleteInstance(e),delete this.$i18n}}}function SP(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[oP](t.pluralizationRules||e.pluralizationRules);let n=uP(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(t=>e.mergeLocaleMessage(t,n[t])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(n=>e.mergeDateTimeFormat(n,t.datetimeFormats[n])),t.numberFormats&&Object.keys(t.numberFormats).forEach(n=>e.mergeNumberFormat(n,t.numberFormats[n])),e}var CP={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e===`parent`||e===`global`,default:`parent`},i18n:{type:Object}};function wP({slots:e},t){return t.length===1&&t[0]===`default`?(e.default?e.default():[]).reduce((e,t)=>[...e,...t.type===Se?t.children:[t]],[]):t.reduce((t,n)=>{let r=e[n];return r&&(t[n]=r()),t},ij())}function TP(){return Se}var EP=Ye({name:`i18n-t`,props:nj({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>QA(e)||!isNaN(e)}},CP),setup(e,t){let{slots:n,attrs:r}=t,i=e.i18n||RP({useScope:e.scope,__useComponent:!0});return()=>{let a=Object.keys(n).filter(e=>e!==`_`),o=ij();e.locale&&(o.locale=e.locale),e.plural!==void 0&&(o.plural=Y(e.plural)?+e.plural:e.plural);let s=wP(t,a),c=i[rP](e.keypath,s,o),l=nj(ij(),r);return T(Y(e.tag)||Z(e.tag)?e.tag:TP(),l,c)}}});function DP(e){return fj(e)&&!Y(e[0])}function OP(e,t,n,r){let{slots:i,attrs:a}=t;return()=>{let t={part:!0},o=ij();e.locale&&(t.locale=e.locale),Y(e.format)?t.key=e.format:Z(e.format)&&(Y(e.format.key)&&(t.key=e.format.key),o=Object.keys(e.format).reduce((t,r)=>n.includes(r)?nj(ij(),t,{[r]:e.format[r]}):t,ij()));let s=r(e.value,t,o),c=[t.key];fj(s)?c=s.map((e,t)=>{let n=i[e.type],r=n?n({[e.type]:e.value,index:t,parts:s}):[e.value];return DP(r)&&(r[0].key=`${e.type}-${t}`),r}):Y(s)&&(c=[s]);let l=nj(ij(),a);return T(Y(e.tag)||Z(e.tag)?e.tag:TP(),l,c)}}var kP=Ye({name:`i18n-n`,props:nj({value:{type:Number,required:!0},format:{type:[String,Object]}},CP),setup(e,t){let n=e.i18n||RP({useScope:e.scope,__useComponent:!0});return OP(e,t,AN,(...e)=>n[aP](...e))}}),AP=Ye({name:`i18n-d`,props:nj({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},CP),setup(e,t){let n=e.i18n||RP({useScope:e.scope,__useComponent:!0});return OP(e,t,EN,(...e)=>n[iP](...e))}});function jP(e,t){let n=e;if(e.mode===`composition`)return n.__getInstance(t)||e.global;{let r=n.__getInstance(t);return r==null?e.global.__composer:r.__composer}}function MP(e){let t=t=>{let{instance:n,value:r}=t;if(!n||!n.$)throw nP(tP.UNEXPECTED_ERROR);let i=jP(e,n.$),a=NP(r);return[Reflect.apply(i.t,i,[...PP(a)]),i]};return{created:(n,r)=>{let[i,a]=t(r);JA&&e.global===a&&(n.__i18nWatcher=f(a.locale,()=>{r.instance&&r.instance.$forceUpdate()})),n.__composer=a,n.textContent=i},unmounted:e=>{JA&&e.__i18nWatcher&&(e.__i18nWatcher(),e.__i18nWatcher=void 0,delete e.__i18nWatcher),e.__composer&&(e.__composer=void 0,delete e.__composer)},beforeUpdate:(e,{value:t})=>{if(e.__composer){let n=e.__composer,r=NP(t);e.textContent=Reflect.apply(n.t,n,[...PP(r)])}},getSSRProps:e=>{let[n]=t(e);return{textContent:n}}}}function NP(e){if(Y(e))return{path:e};if(Q(e)){if(!(`path`in e))throw nP(tP.REQUIRED_VALUE,`path`);return e}else throw nP(tP.INVALID_VALUE)}function PP(e){let{path:t,locale:n,args:r,choice:i,plural:a}=e,o={},s=r||{};return Y(n)&&(o.locale=n),QA(i)&&(o.plural=i),QA(a)&&(o.plural=a),[t,s,o]}function FP(e,t,...n){let r=Q(n[0])?n[0]:{};(!X(r.globalInstall)||r.globalInstall)&&([EP.name,`I18nT`].forEach(t=>e.component(t,EP)),[kP.name,`I18nN`].forEach(t=>e.component(t,kP)),[AP.name,`I18nD`].forEach(t=>e.component(t,AP))),e.directive(`t`,MP(t))}var IP=YA(`global-vue-i18n`);function LP(e={},t){let n=__VUE_I18N_LEGACY_API__&&X(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,r=X(e.globalInjection)?e.globalInjection:!0,i=new Map,[a,o]=zP(e,n),s=YA(``);function c(e){return i.get(e)||null}function l(e,t){i.set(e,t)}function u(e){i.delete(e)}let d={get mode(){return __VUE_I18N_LEGACY_API__&&n?`legacy`:`composition`},async install(e,...t){if(e.__VUE_I18N_SYMBOL__=s,e.provide(e.__VUE_I18N_SYMBOL__,d),Q(t[0])){let e=t[0];d.__composerExtend=e.__composerExtend,d.__vueI18nExtend=e.__vueI18nExtend}let i=null;!n&&r&&(i=JP(e,d.global)),__VUE_I18N_FULL_INSTALL__&&FP(e,d,...t),__VUE_I18N_LEGACY_API__&&n&&e.mixin(xP(o,o.__composer,d));let a=e.unmount;e.unmount=()=>{i&&i(),d.dispose(),a()}},get global(){return o},dispose(){a.stop()},__instances:i,__getInstance:c,__setInstance:l,__deleteInstance:u};return d}function RP(e={}){let t=de();if(t==null)throw nP(tP.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw nP(tP.NOT_INSTALLED);let n=BP(t),r=HP(n),i=dP(t),a=VP(e,i);if(a===`global`)return fP(r,e,i),r;if(a===`parent`){let i=UP(n,t,e.__useComponent);return i??=r,i}let o=n,s=o.__getInstance(t);if(s==null){let n=nj({},e);`__i18n`in i&&(n.__i18n=i.__i18n),r&&(n.__root=r),s=vP(n),o.__composerExtend&&(s[cP]=o.__composerExtend(s)),GP(o,t,s),o.__setInstance(t,s)}return s}function zP(e,t,n){let r=ie(),i=__VUE_I18N_LEGACY_API__&&t?r.run(()=>bP(e)):r.run(()=>vP(e));if(i==null)throw nP(tP.UNEXPECTED_ERROR);return[r,i]}function BP(e){let t=Ge(e.isCE?IP:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw nP(e.isCE?tP.NOT_INSTALLED_WITH_PROVIDE:tP.UNEXPECTED_ERROR);return t}function VP(e,t){return tj(e)?`__i18n`in t?`local`:`global`:e.useScope?e.useScope:`local`}function HP(e){return e.mode===`composition`?e.global:e.global.__composer}function UP(e,t,n=!1){let r=null,i=t.root,a=WP(t,n);for(;a!=null;){let t=e;if(e.mode===`composition`)r=t.__getInstance(a);else if(__VUE_I18N_LEGACY_API__){let e=t.__getInstance(a);e!=null&&(r=e.__composer,n&&r&&!r[sP]&&(r=null))}if(r!=null||i===a)break;a=a.parent}return r}function WP(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function GP(e,t,n){Te(()=>{},t),r(()=>{let r=n;e.__deleteInstance(t);let i=r[cP];i&&(i(),delete r[cP])},t)}var KP=[`locale`,`fallbackLocale`,`availableLocales`],qP=[`t`,`rt`,`d`,`n`,`tm`,`te`];function JP(e,t){let r=Object.create(null);return KP.forEach(e=>{let i=Object.getOwnPropertyDescriptor(t,e);if(!i)throw nP(tP.UNEXPECTED_ERROR);let a=n(i.value)?{get(){return i.value.value},set(e){i.value.value=e}}:{get(){return i.get&&i.get()}};Object.defineProperty(r,e,a)}),e.config.globalProperties.$i18n=r,qP.forEach(n=>{let r=Object.getOwnPropertyDescriptor(t,n);if(!r||!r.value)throw nP(tP.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${n}`,r)}),()=>{delete e.config.globalProperties.$i18n,qP.forEach(t=>{delete e.config.globalProperties[`$${t}`]})}}if($N(),sN(kM),lN(eN),dN(VM),__INTLIFY_PROD_DEVTOOLS__){let e=oj();e.__INTLIFY__=!0,jM(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}var YP=Symbol();function XP(){var e=Ge(YP);if(!e)throw Error(`No PrimeVue Toast provided!`);return e}export{xh as $,Yr as $t,IT as A,rr as An,zo as At,rw as B,Gi as Bt,uE as C,Fn as Cn,To as Ct,tE as D,Qn as Dn,bo as Dt,ZT as E,xr as En,Po as Et,Tw as F,Ft as Fn,go as Ft,rC as G,ti as Gt,xC as H,mi as Ht,zw as I,Mt as In,_o as It,qS as J,Br as Jt,YS as K,Jr as Kt,Bw as L,Sn as Ln,Ia as Lt,MT as M,mt as Mn,Io as Mt,eT as N,pn as Nn,Bo as Nt,RT as O,qn as On,Ro as Ot,$w as P,En as Pn,to as Pt,wh as Q,Ir as Qt,vw as R,bn as Rn,ba as Rt,vE as S,Or as Sn,Do as St,XT as T,Zn as Tn,Co as Tt,vC as U,si as Ut,GC as V,zi as Vt,iC as W,ii as Wt,Ah as X,qr as Xt,jh as Y,ci as Yt,kh as Z,Hr as Zt,zE as _,Wn as _n,Ls as _t,UA as a,Cr as an,Cu as at,PE as b,nr as bn,xo as bt,GA as c,Jn as cn,vl as ct,pO as d,_r as dn,tc as dt,Vr as en,hh as et,aO as f,In as fn,uc as ft,GE as g,cr as gn,P as gt,JE as h,Kn as hn,nc as ht,RP as i,Gn as in,wu as it,NT as j,kn as jn,Fo as jt,FT as k,sr as kn,vo as kt,VO as l,ur as ln,$s as lt,rD as m,br as mn,vc as mt,XP as n,kr as nn,Mu as nt,Yk as o,lr as on,Su as ot,bD as p,ar as pn,_c as pt,JS as q,ni as qt,LP as r,hr as rn,Tu as rt,KA as s,dr as sn,xl as st,YP as t,j as tn,mh as tt,xO as u,mr as un,ec as ut,RE as v,jn as vn,Vo as vt,nE as w,ir as wn,Eo as wt,EE as x,Dr as xn,So as xt,IE as y,pr as yn,yo as yt,sw as z,Ti as zt};
|