@confidencesystemsinc/sdk 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ui/ui-wrapper.d.ts +3 -0
- package/dist/index.cjs +31 -31
- package/dist/index.js +6979 -6977
- package/dist/theme.css +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,12 +1,32 @@
|
|
|
1
|
-
"use strict";var la=e=>{throw TypeError(e)};var lo=(e,t,n)=>t.has(e)||la("Cannot "+n);var m=(e,t,n)=>(lo(e,t,"read from private field"),n?n.call(e):t.get(e)),H=(e,t,n)=>t.has(e)?la("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),M=(e,t,n,r)=>(lo(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),J=(e,t,n)=>(lo(e,t,"access private method"),n);var ur=(e,t,n,r)=>({set _(o){M(e,t,o,n)},get _(){return m(e,t,r)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("react/jsx-runtime"),d=require("react"),Vi=require("react-dom");function Gi(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const F=Gi(d),wu=Gi(Vi);var An=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Qt=typeof window>"u"||"Deno"in globalThis;function ke(){}function xu(e,t){return typeof e=="function"?e(t):e}function Do(e){return typeof e=="number"&&e>=0&&e!==1/0}function Ki(e,t){return Math.max(e+(t||0)-Date.now(),0)}function cn(e,t){return typeof e=="function"?e(t):e}function De(e,t){return typeof e=="function"?e(t):e}function ca(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:a,stale:i}=e;if(a){if(r){if(t.queryHash!==Ms(a,t.options))return!1}else if(!Kn(t.queryKey,a))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof i=="boolean"&&t.isStale()!==i||o&&o!==t.state.fetchStatus||s&&!s(t))}function ua(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Xt(t.options.mutationKey)!==Xt(s))return!1}else if(!Kn(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Ms(e,t){return((t==null?void 0:t.queryKeyHashFn)||Xt)(e)}function Xt(e){return JSON.stringify(e,(t,n)=>zo(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Kn(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Kn(e[n],t[n])):!1}function jo(e,t){if(e===t)return e;const n=fa(e)&&fa(t);if(n||zo(e)&&zo(t)){const r=n?e:Object.keys(e),o=r.length,s=n?t:Object.keys(t),a=s.length,i=n?[]:{};let l=0;for(let c=0;c<a;c++){const u=n?c:s[c];(!n&&r.includes(u)||n)&&e[u]===void 0&&t[u]===void 0?(i[u]=void 0,l++):(i[u]=jo(e[u],t[u]),i[u]===e[u]&&e[u]!==void 0&&l++)}return o===a&&l===o?e:i}return t}function kr(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function fa(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function zo(e){if(!da(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!da(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function da(e){return Object.prototype.toString.call(e)==="[object Object]"}function Eu(e){return new Promise(t=>{setTimeout(t,e)})}function Ho(e,t,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(e,t);if(n.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return jo(e,t)}catch(r){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${r}`),r}return jo(e,t)}return t}function Su(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Cu(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Tr=Symbol();function Yi(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===Tr&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Tr?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Qi(e,t){return typeof e=="function"?e(...t):!!e}var Ht,gt,pn,Ni,ku=(Ni=class extends An{constructor(){super();H(this,Ht);H(this,gt);H(this,pn);M(this,pn,t=>{if(!Qt&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){m(this,gt)||this.setEventListener(m(this,pn))}onUnsubscribe(){var t;this.hasListeners()||((t=m(this,gt))==null||t.call(this),M(this,gt,void 0))}setEventListener(t){var n;M(this,pn,t),(n=m(this,gt))==null||n.call(this),M(this,gt,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){m(this,Ht)!==t&&(M(this,Ht,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof m(this,Ht)=="boolean"?m(this,Ht):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ht=new WeakMap,gt=new WeakMap,pn=new WeakMap,Ni),Ls=new ku,mn,bt,gn,_i,Tu=(_i=class extends An{constructor(){super();H(this,mn,!0);H(this,bt);H(this,gn);M(this,gn,t=>{if(!Qt&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){m(this,bt)||this.setEventListener(m(this,gn))}onUnsubscribe(){var t;this.hasListeners()||((t=m(this,bt))==null||t.call(this),M(this,bt,void 0))}setEventListener(t){var n;M(this,gn,t),(n=m(this,bt))==null||n.call(this),M(this,bt,t(this.setOnline.bind(this)))}setOnline(t){m(this,mn)!==t&&(M(this,mn,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return m(this,mn)}},mn=new WeakMap,bt=new WeakMap,gn=new WeakMap,_i),Or=new Tu;function Wo(){let e,t;const n=new Promise((o,s)=>{e=o,t=s});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}function Ou(e){return Math.min(1e3*2**e,3e4)}function Xi(e){return(e??"online")==="online"?Or.isOnline():!0}var Ji=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function co(e){return e instanceof Ji}function Zi(e){let t=!1,n=0,r=!1,o;const s=Wo(),a=g=>{var y;r||(p(new Ji(g)),(y=e.abort)==null||y.call(e))},i=()=>{t=!0},l=()=>{t=!1},c=()=>Ls.isFocused()&&(e.networkMode==="always"||Or.isOnline())&&e.canRun(),u=()=>Xi(e.networkMode)&&e.canRun(),f=g=>{var y;r||(r=!0,(y=e.onSuccess)==null||y.call(e,g),o==null||o(),s.resolve(g))},p=g=>{var y;r||(r=!0,(y=e.onError)==null||y.call(e,g),o==null||o(),s.reject(g))},h=()=>new Promise(g=>{var y;o=x=>{(r||c())&&g(x)},(y=e.onPause)==null||y.call(e)}).then(()=>{var g;o=void 0,r||(g=e.onContinue)==null||g.call(e)}),b=()=>{if(r)return;let g;const y=n===0?e.initialPromise:void 0;try{g=y??e.fn()}catch(x){g=Promise.reject(x)}Promise.resolve(g).then(f).catch(x=>{var L;if(r)return;const S=e.retry??(Qt?0:3),w=e.retryDelay??Ou,C=typeof w=="function"?w(n,x):w,v=S===!0||typeof S=="number"&&n<S||typeof S=="function"&&S(n,x);if(t||!v){p(x);return}n++,(L=e.onFail)==null||L.call(e,n,x),Eu(C).then(()=>c()?void 0:h()).then(()=>{t?p(x):b()})})};return{promise:s,cancel:a,continue:()=>(o==null||o(),s),cancelRetry:i,continueRetry:l,canStart:u,start:()=>(u()?b():h().then(b),s)}}var Pu=e=>setTimeout(e,0);function Au(){let e=[],t=0,n=i=>{i()},r=i=>{i()},o=Pu;const s=i=>{t?e.push(i):o(()=>{n(i)})},a=()=>{const i=e;e=[],i.length&&o(()=>{r(()=>{i.forEach(l=>{n(l)})})})};return{batch:i=>{let l;t++;try{l=i()}finally{t--,t||a()}return l},batchCalls:i=>(...l)=>{s(()=>{i(...l)})},schedule:s,setNotifyFunction:i=>{n=i},setBatchNotifyFunction:i=>{r=i},setScheduler:i=>{o=i}}}var ye=Au(),Wt,Di,el=(Di=class{constructor(){H(this,Wt)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Do(this.gcTime)&&M(this,Wt,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Qt?1/0:5*60*1e3))}clearGcTimeout(){m(this,Wt)&&(clearTimeout(m(this,Wt)),M(this,Wt,void 0))}},Wt=new WeakMap,Di),bn,yn,Ie,Ut,xe,Zn,Bt,Ne,Qe,ji,Ru=(ji=class extends el{constructor(t){super();H(this,Ne);H(this,bn);H(this,yn);H(this,Ie);H(this,Ut);H(this,xe);H(this,Zn);H(this,Bt);M(this,Bt,!1),M(this,Zn,t.defaultOptions),this.setOptions(t.options),this.observers=[],M(this,Ut,t.client),M(this,Ie,m(this,Ut).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,M(this,bn,$u(this.options)),this.state=t.state??m(this,bn),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=m(this,xe))==null?void 0:t.promise}setOptions(t){this.options={...m(this,Zn),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&m(this,Ie).remove(this)}setData(t,n){const r=Ho(this.state.data,t,this.options);return J(this,Ne,Qe).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){J(this,Ne,Qe).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=m(this,xe))==null?void 0:r.promise;return(o=m(this,xe))==null||o.cancel(t),n?n.then(ke).catch(ke):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(m(this,bn))}isActive(){return this.observers.some(t=>De(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Tr||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!Ki(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=m(this,xe))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=m(this,xe))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),m(this,Ie).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(m(this,xe)&&(m(this,Bt)?m(this,xe).cancel({revert:!0}):m(this,xe).cancelRetry()),this.scheduleGc()),m(this,Ie).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||J(this,Ne,Qe).call(this,{type:"invalidate"})}fetch(t,n){var l,c,u;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(m(this,xe))return m(this,xe).continueRetry(),m(this,xe).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(p=>p.options.queryFn);f&&this.setOptions(f.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const r=new AbortController,o=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(M(this,Bt,!0),r.signal)})},s=()=>{const f=Yi(this.options,n),p={client:m(this,Ut),queryKey:this.queryKey,meta:this.meta};return o(p),M(this,Bt,!1),this.options.persister?this.options.persister(f,p,this):f(p)},a={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:m(this,Ut),state:this.state,fetchFn:s};o(a),(l=this.options.behavior)==null||l.onFetch(a,this),M(this,yn,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=a.fetchOptions)==null?void 0:c.meta))&&J(this,Ne,Qe).call(this,{type:"fetch",meta:(u=a.fetchOptions)==null?void 0:u.meta});const i=f=>{var p,h,b,g;co(f)&&f.silent||J(this,Ne,Qe).call(this,{type:"error",error:f}),co(f)||((h=(p=m(this,Ie).config).onError)==null||h.call(p,f,this),(g=(b=m(this,Ie).config).onSettled)==null||g.call(b,this.state.data,f,this)),this.scheduleGc()};return M(this,xe,Zi({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var p,h,b,g;if(f===void 0){process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),i(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(y){i(y);return}(h=(p=m(this,Ie).config).onSuccess)==null||h.call(p,f,this),(g=(b=m(this,Ie).config).onSettled)==null||g.call(b,f,this.state.error,this),this.scheduleGc()},onError:i,onFail:(f,p)=>{J(this,Ne,Qe).call(this,{type:"failed",failureCount:f,error:p})},onPause:()=>{J(this,Ne,Qe).call(this,{type:"pause"})},onContinue:()=>{J(this,Ne,Qe).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),m(this,xe).start()}},bn=new WeakMap,yn=new WeakMap,Ie=new WeakMap,Ut=new WeakMap,xe=new WeakMap,Zn=new WeakMap,Bt=new WeakMap,Ne=new WeakSet,Qe=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...tl(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return co(o)&&o.revert&&m(this,yn)?{...m(this,yn),fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),ye.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),m(this,Ie).notify({query:this,type:"updated",action:t})})},ji);function tl(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Xi(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function $u(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Ue,zi,Fu=(zi=class extends An{constructor(t={}){super();H(this,Ue);this.config=t,M(this,Ue,new Map)}build(t,n,r){const o=n.queryKey,s=n.queryHash??Ms(o,n);let a=this.get(s);return a||(a=new Ru({client:t,queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){m(this,Ue).has(t.queryHash)||(m(this,Ue).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=m(this,Ue).get(t.queryHash);n&&(t.destroy(),n===t&&m(this,Ue).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ye.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return m(this,Ue).get(t)}getAll(){return[...m(this,Ue).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>ca(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>ca(t,r)):n}notify(t){ye.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){ye.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ye.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Ue=new WeakMap,zi),Be,Se,qt,qe,pt,Hi,Iu=(Hi=class extends el{constructor(t){super();H(this,qe);H(this,Be);H(this,Se);H(this,qt);this.mutationId=t.mutationId,M(this,Se,t.mutationCache),M(this,Be,[]),this.state=t.state||nl(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){m(this,Be).includes(t)||(m(this,Be).push(t),this.clearGcTimeout(),m(this,Se).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){M(this,Be,m(this,Be).filter(n=>n!==t)),this.scheduleGc(),m(this,Se).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){m(this,Be).length||(this.state.status==="pending"?this.scheduleGc():m(this,Se).remove(this))}continue(){var t;return((t=m(this,qt))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,a,i,l,c,u,f,p,h,b,g,y,x,S,w,C,v,L,q,R;const n=()=>{J(this,qe,pt).call(this,{type:"continue"})};M(this,qt,Zi({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(U,G)=>{J(this,qe,pt).call(this,{type:"failed",failureCount:U,error:G})},onPause:()=>{J(this,qe,pt).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>m(this,Se).canRun(this)}));const r=this.state.status==="pending",o=!m(this,qt).canStart();try{if(r)n();else{J(this,qe,pt).call(this,{type:"pending",variables:t,isPaused:o}),await((a=(s=m(this,Se).config).onMutate)==null?void 0:a.call(s,t,this));const G=await((l=(i=this.options).onMutate)==null?void 0:l.call(i,t));G!==this.state.context&&J(this,qe,pt).call(this,{type:"pending",context:G,variables:t,isPaused:o})}const U=await m(this,qt).start();return await((u=(c=m(this,Se).config).onSuccess)==null?void 0:u.call(c,U,t,this.state.context,this)),await((p=(f=this.options).onSuccess)==null?void 0:p.call(f,U,t,this.state.context)),await((b=(h=m(this,Se).config).onSettled)==null?void 0:b.call(h,U,null,this.state.variables,this.state.context,this)),await((y=(g=this.options).onSettled)==null?void 0:y.call(g,U,null,t,this.state.context)),J(this,qe,pt).call(this,{type:"success",data:U}),U}catch(U){try{throw await((S=(x=m(this,Se).config).onError)==null?void 0:S.call(x,U,t,this.state.context,this)),await((C=(w=this.options).onError)==null?void 0:C.call(w,U,t,this.state.context)),await((L=(v=m(this,Se).config).onSettled)==null?void 0:L.call(v,void 0,U,this.state.variables,this.state.context,this)),await((R=(q=this.options).onSettled)==null?void 0:R.call(q,void 0,U,t,this.state.context)),U}finally{J(this,qe,pt).call(this,{type:"error",error:U})}}finally{m(this,Se).runNext(this)}}},Be=new WeakMap,Se=new WeakMap,qt=new WeakMap,qe=new WeakSet,pt=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),ye.batch(()=>{m(this,Be).forEach(r=>{r.onMutationUpdate(t)}),m(this,Se).notify({mutation:this,type:"updated",action:t})})},Hi);function nl(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Xe,_e,er,Wi,Mu=(Wi=class extends An{constructor(t={}){super();H(this,Xe);H(this,_e);H(this,er);this.config=t,M(this,Xe,new Set),M(this,_e,new Map),M(this,er,0)}build(t,n,r){const o=new Iu({mutationCache:this,mutationId:++ur(this,er)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){m(this,Xe).add(t);const n=fr(t);if(typeof n=="string"){const r=m(this,_e).get(n);r?r.push(t):m(this,_e).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(m(this,Xe).delete(t)){const n=fr(t);if(typeof n=="string"){const r=m(this,_e).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&m(this,_e).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=fr(t);if(typeof n=="string"){const r=m(this,_e).get(n),o=r==null?void 0:r.find(s=>s.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=fr(t);if(typeof n=="string"){const o=(r=m(this,_e).get(n))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ye.batch(()=>{m(this,Xe).forEach(t=>{this.notify({type:"removed",mutation:t})}),m(this,Xe).clear(),m(this,_e).clear()})}getAll(){return Array.from(m(this,Xe))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>ua(n,r))}findAll(t={}){return this.getAll().filter(n=>ua(t,n))}notify(t){ye.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return ye.batch(()=>Promise.all(t.map(n=>n.continue().catch(ke))))}},Xe=new WeakMap,_e=new WeakMap,er=new WeakMap,Wi);function fr(e){var t;return(t=e.options.scope)==null?void 0:t.id}function ha(e){return{onFetch:(t,n)=>{var u,f,p,h,b;const r=t.options,o=(p=(f=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:f.fetchMore)==null?void 0:p.direction,s=((h=t.state.data)==null?void 0:h.pages)||[],a=((b=t.state.data)==null?void 0:b.pageParams)||[];let i={pages:[],pageParams:[]},l=0;const c=async()=>{let g=!1;const y=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},x=Yi(t.options,t.fetchOptions),S=async(w,C,v)=>{if(g)return Promise.reject();if(C==null&&w.pages.length)return Promise.resolve(w);const L={client:t.client,queryKey:t.queryKey,pageParam:C,direction:v?"backward":"forward",meta:t.options.meta};y(L);const q=await x(L),{maxPages:R}=t.options,U=v?Cu:Su;return{pages:U(w.pages,q,R),pageParams:U(w.pageParams,C,R)}};if(o&&s.length){const w=o==="backward",C=w?Lu:pa,v={pages:s,pageParams:a},L=C(r,v);i=await S(v,L,w)}else{const w=e??s.length;do{const C=l===0?a[0]??r.initialPageParam:pa(r,i);if(l>0&&C==null)break;i=await S(i,C),l++}while(l<w)}return i};t.options.persister?t.fetchFn=()=>{var g,y;return(y=(g=t.options).persister)==null?void 0:y.call(g,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function pa(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Lu(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var pe,yt,vt,vn,wn,wt,xn,En,Ui,Nu=(Ui=class{constructor(e={}){H(this,pe);H(this,yt);H(this,vt);H(this,vn);H(this,wn);H(this,wt);H(this,xn);H(this,En);M(this,pe,e.queryCache||new Fu),M(this,yt,e.mutationCache||new Mu),M(this,vt,e.defaultOptions||{}),M(this,vn,new Map),M(this,wn,new Map),M(this,wt,0)}mount(){ur(this,wt)._++,m(this,wt)===1&&(M(this,xn,Ls.subscribe(async e=>{e&&(await this.resumePausedMutations(),m(this,pe).onFocus())})),M(this,En,Or.subscribe(async e=>{e&&(await this.resumePausedMutations(),m(this,pe).onOnline())})))}unmount(){var e,t;ur(this,wt)._--,m(this,wt)===0&&((e=m(this,xn))==null||e.call(this),M(this,xn,void 0),(t=m(this,En))==null||t.call(this),M(this,En,void 0))}isFetching(e){return m(this,pe).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return m(this,yt).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=m(this,pe).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=m(this,pe).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(cn(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return m(this,pe).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=m(this,pe).get(r.queryHash),s=o==null?void 0:o.state.data,a=xu(t,s);if(a!==void 0)return m(this,pe).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return ye.batch(()=>m(this,pe).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=m(this,pe).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=m(this,pe);ye.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=m(this,pe);return ye.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=ye.batch(()=>m(this,pe).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(ke).catch(ke)}invalidateQueries(e,t={}){return ye.batch(()=>(m(this,pe).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=ye.batch(()=>m(this,pe).findAll(e).filter(o=>!o.isDisabled()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(ke)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(ke)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=m(this,pe).build(this,t);return n.isStaleByTime(cn(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ke).catch(ke)}fetchInfiniteQuery(e){return e.behavior=ha(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ke).catch(ke)}ensureInfiniteQueryData(e){return e.behavior=ha(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Or.isOnline()?m(this,yt).resumePausedMutations():Promise.resolve()}getQueryCache(){return m(this,pe)}getMutationCache(){return m(this,yt)}getDefaultOptions(){return m(this,vt)}setDefaultOptions(e){M(this,vt,e)}setQueryDefaults(e,t){m(this,vn).set(Xt(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...m(this,vn).values()],n={};return t.forEach(r=>{Kn(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){m(this,wn).set(Xt(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...m(this,wn).values()],n={};return t.forEach(r=>{Kn(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...m(this,vt).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ms(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Tr&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...m(this,vt).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){m(this,pe).clear(),m(this,yt).clear()}},pe=new WeakMap,yt=new WeakMap,vt=new WeakMap,vn=new WeakMap,wn=new WeakMap,wt=new WeakMap,xn=new WeakMap,En=new WeakMap,Ui),Oe,re,tr,Ce,Vt,Sn,xt,Et,nr,Cn,kn,Gt,Kt,St,Tn,ie,Nn,Uo,Bo,qo,Vo,Go,Ko,Yo,rl,Bi,_u=(Bi=class extends An{constructor(t,n){super();H(this,ie);H(this,Oe);H(this,re);H(this,tr);H(this,Ce);H(this,Vt);H(this,Sn);H(this,xt);H(this,Et);H(this,nr);H(this,Cn);H(this,kn);H(this,Gt);H(this,Kt);H(this,St);H(this,Tn,new Set);this.options=n,M(this,Oe,t),M(this,Et,null),M(this,xt,Wo()),this.options.experimental_prefetchInRender||m(this,xt).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(m(this,re).addObserver(this),ma(m(this,re),this.options)?J(this,ie,Nn).call(this):this.updateResult(),J(this,ie,Vo).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Qo(m(this,re),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Qo(m(this,re),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,J(this,ie,Go).call(this),J(this,ie,Ko).call(this),m(this,re).removeObserver(this)}setOptions(t){const n=this.options,r=m(this,re);if(this.options=m(this,Oe).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof De(this.options.enabled,m(this,re))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");J(this,ie,Yo).call(this),m(this,re).setOptions(this.options),n._defaulted&&!kr(this.options,n)&&m(this,Oe).getQueryCache().notify({type:"observerOptionsUpdated",query:m(this,re),observer:this});const o=this.hasListeners();o&&ga(m(this,re),r,this.options,n)&&J(this,ie,Nn).call(this),this.updateResult(),o&&(m(this,re)!==r||De(this.options.enabled,m(this,re))!==De(n.enabled,m(this,re))||cn(this.options.staleTime,m(this,re))!==cn(n.staleTime,m(this,re)))&&J(this,ie,Uo).call(this);const s=J(this,ie,Bo).call(this);o&&(m(this,re)!==r||De(this.options.enabled,m(this,re))!==De(n.enabled,m(this,re))||s!==m(this,St))&&J(this,ie,qo).call(this,s)}getOptimisticResult(t){const n=m(this,Oe).getQueryCache().build(m(this,Oe),t),r=this.createResult(n,t);return ju(this,r)&&(M(this,Ce,r),M(this,Sn,this.options),M(this,Vt,m(this,re).state)),r}getCurrentResult(){return m(this,Ce)}trackResult(t,n){return new Proxy(t,{get:(r,o)=>(this.trackProp(o),n==null||n(o),Reflect.get(r,o))})}trackProp(t){m(this,Tn).add(t)}getCurrentQuery(){return m(this,re)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=m(this,Oe).defaultQueryOptions(t),r=m(this,Oe).getQueryCache().build(m(this,Oe),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return J(this,ie,Nn).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),m(this,Ce)))}createResult(t,n){var U;const r=m(this,re),o=this.options,s=m(this,Ce),a=m(this,Vt),i=m(this,Sn),c=t!==r?t.state:m(this,tr),{state:u}=t;let f={...u},p=!1,h;if(n._optimisticResults){const G=this.hasListeners(),le=!G&&ma(t,n),ue=G&&ga(t,r,n,o);(le||ue)&&(f={...f,...tl(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:b,errorUpdatedAt:g,status:y}=f;h=f.data;let x=!1;if(n.placeholderData!==void 0&&h===void 0&&y==="pending"){let G;s!=null&&s.isPlaceholderData&&n.placeholderData===(i==null?void 0:i.placeholderData)?(G=s.data,x=!0):G=typeof n.placeholderData=="function"?n.placeholderData((U=m(this,kn))==null?void 0:U.state.data,m(this,kn)):n.placeholderData,G!==void 0&&(y="success",h=Ho(s==null?void 0:s.data,G,n),p=!0)}if(n.select&&h!==void 0&&!x)if(s&&h===(a==null?void 0:a.data)&&n.select===m(this,nr))h=m(this,Cn);else try{M(this,nr,n.select),h=n.select(h),h=Ho(s==null?void 0:s.data,h,n),M(this,Cn,h),M(this,Et,null)}catch(G){M(this,Et,G)}m(this,Et)&&(b=m(this,Et),h=m(this,Cn),g=Date.now(),y="error");const S=f.fetchStatus==="fetching",w=y==="pending",C=y==="error",v=w&&S,L=h!==void 0,R={status:y,fetchStatus:f.fetchStatus,isPending:w,isSuccess:y==="success",isError:C,isInitialLoading:v,isLoading:v,data:h,dataUpdatedAt:f.dataUpdatedAt,error:b,errorUpdatedAt:g,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>c.dataUpdateCount||f.errorUpdateCount>c.errorUpdateCount,isFetching:S,isRefetching:S&&!w,isLoadingError:C&&!L,isPaused:f.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:C&&L,isStale:Ns(t,n),refetch:this.refetch,promise:m(this,xt)};if(this.options.experimental_prefetchInRender){const G=oe=>{R.status==="error"?oe.reject(R.error):R.data!==void 0&&oe.resolve(R.data)},le=()=>{const oe=M(this,xt,R.promise=Wo());G(oe)},ue=m(this,xt);switch(ue.status){case"pending":t.queryHash===r.queryHash&&G(ue);break;case"fulfilled":(R.status==="error"||R.data!==ue.value)&&le();break;case"rejected":(R.status!=="error"||R.error!==ue.reason)&&le();break}}return R}updateResult(){const t=m(this,Ce),n=this.createResult(m(this,re),this.options);if(M(this,Vt,m(this,re).state),M(this,Sn,this.options),m(this,Vt).data!==void 0&&M(this,kn,m(this,re)),kr(n,t))return;M(this,Ce,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,s=typeof o=="function"?o():o;if(s==="all"||!s&&!m(this,Tn).size)return!0;const a=new Set(s??m(this,Tn));return this.options.throwOnError&&a.add("error"),Object.keys(m(this,Ce)).some(i=>{const l=i;return m(this,Ce)[l]!==t[l]&&a.has(l)})};J(this,ie,rl).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&J(this,ie,Vo).call(this)}},Oe=new WeakMap,re=new WeakMap,tr=new WeakMap,Ce=new WeakMap,Vt=new WeakMap,Sn=new WeakMap,xt=new WeakMap,Et=new WeakMap,nr=new WeakMap,Cn=new WeakMap,kn=new WeakMap,Gt=new WeakMap,Kt=new WeakMap,St=new WeakMap,Tn=new WeakMap,ie=new WeakSet,Nn=function(t){J(this,ie,Yo).call(this);let n=m(this,re).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(ke)),n},Uo=function(){J(this,ie,Go).call(this);const t=cn(this.options.staleTime,m(this,re));if(Qt||m(this,Ce).isStale||!Do(t))return;const r=Ki(m(this,Ce).dataUpdatedAt,t)+1;M(this,Gt,setTimeout(()=>{m(this,Ce).isStale||this.updateResult()},r))},Bo=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(m(this,re)):this.options.refetchInterval)??!1},qo=function(t){J(this,ie,Ko).call(this),M(this,St,t),!(Qt||De(this.options.enabled,m(this,re))===!1||!Do(m(this,St))||m(this,St)===0)&&M(this,Kt,setInterval(()=>{(this.options.refetchIntervalInBackground||Ls.isFocused())&&J(this,ie,Nn).call(this)},m(this,St)))},Vo=function(){J(this,ie,Uo).call(this),J(this,ie,qo).call(this,J(this,ie,Bo).call(this))},Go=function(){m(this,Gt)&&(clearTimeout(m(this,Gt)),M(this,Gt,void 0))},Ko=function(){m(this,Kt)&&(clearInterval(m(this,Kt)),M(this,Kt,void 0))},Yo=function(){const t=m(this,Oe).getQueryCache().build(m(this,Oe),this.options);if(t===m(this,re))return;const n=m(this,re);M(this,re,t),M(this,tr,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},rl=function(t){ye.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(m(this,Ce))}),m(this,Oe).getQueryCache().notify({query:m(this,re),type:"observerResultsUpdated"})})},Bi);function Du(e,t){return De(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function ma(e,t){return Du(e,t)||e.state.data!==void 0&&Qo(e,t,t.refetchOnMount)}function Qo(e,t,n){if(De(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Ns(e,t)}return!1}function ga(e,t,n,r){return(e!==t||De(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Ns(e,n)}function Ns(e,t){return De(t.enabled,e)!==!1&&e.isStaleByTime(cn(t.staleTime,e))}function ju(e,t){return!kr(e.getCurrentResult(),t)}var Ct,kt,Pe,Je,rt,xr,Xo,qi,zu=(qi=class extends An{constructor(n,r){super();H(this,rt);H(this,Ct);H(this,kt);H(this,Pe);H(this,Je);M(this,Ct,n),this.setOptions(r),this.bindMethods(),J(this,rt,xr).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=m(this,Ct).defaultMutationOptions(n),kr(this.options,r)||m(this,Ct).getMutationCache().notify({type:"observerOptionsUpdated",mutation:m(this,Pe),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Xt(r.mutationKey)!==Xt(this.options.mutationKey)?this.reset():((o=m(this,Pe))==null?void 0:o.state.status)==="pending"&&m(this,Pe).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=m(this,Pe))==null||n.removeObserver(this)}onMutationUpdate(n){J(this,rt,xr).call(this),J(this,rt,Xo).call(this,n)}getCurrentResult(){return m(this,kt)}reset(){var n;(n=m(this,Pe))==null||n.removeObserver(this),M(this,Pe,void 0),J(this,rt,xr).call(this),J(this,rt,Xo).call(this)}mutate(n,r){var o;return M(this,Je,r),(o=m(this,Pe))==null||o.removeObserver(this),M(this,Pe,m(this,Ct).getMutationCache().build(m(this,Ct),this.options)),m(this,Pe).addObserver(this),m(this,Pe).execute(n)}},Ct=new WeakMap,kt=new WeakMap,Pe=new WeakMap,Je=new WeakMap,rt=new WeakSet,xr=function(){var r;const n=((r=m(this,Pe))==null?void 0:r.state)??nl();M(this,kt,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Xo=function(n){ye.batch(()=>{var r,o,s,a,i,l,c,u;if(m(this,Je)&&this.hasListeners()){const f=m(this,kt).variables,p=m(this,kt).context;(n==null?void 0:n.type)==="success"?((o=(r=m(this,Je)).onSuccess)==null||o.call(r,n.data,f,p),(a=(s=m(this,Je)).onSettled)==null||a.call(s,n.data,null,f,p)):(n==null?void 0:n.type)==="error"&&((l=(i=m(this,Je)).onError)==null||l.call(i,n.error,f,p),(u=(c=m(this,Je)).onSettled)==null||u.call(c,void 0,n.error,f,p))}this.listeners.forEach(f=>{f(m(this,kt))})})},qi),ol=F.createContext(void 0),_s=e=>{const t=F.useContext(ol);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Hu=({client:e,children:t})=>(F.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),O.jsx(ol.Provider,{value:e,children:t})),sl=F.createContext(!1),Wu=()=>F.useContext(sl);sl.Provider;function Uu(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Bu=F.createContext(Uu()),qu=()=>F.useContext(Bu),Vu=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Gu=e=>{F.useEffect(()=>{e.clearReset()},[e])},Ku=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||Qi(n,[e.error,r])),Yu=e=>{const t=e.staleTime;e.suspense&&(e.staleTime=typeof t=="function"?(...n)=>Math.max(t(...n),1e3):Math.max(t??1e3,1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},Qu=(e,t)=>e.isLoading&&e.isFetching&&!t,Xu=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,ba=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Ju(e,t,n){var f,p,h,b,g;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=_s(),o=Wu(),s=qu(),a=r.defaultQueryOptions(e);(p=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||p.call(f,a),process.env.NODE_ENV!=="production"&&(a.queryFn||console.error(`[${a.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),a._optimisticResults=o?"isRestoring":"optimistic",Yu(a),Vu(a,s),Gu(s);const i=!r.getQueryCache().get(a.queryHash),[l]=F.useState(()=>new t(r,a)),c=l.getOptimisticResult(a),u=!o&&e.subscribed!==!1;if(F.useSyncExternalStore(F.useCallback(y=>{const x=u?l.subscribe(ye.batchCalls(y)):ke;return l.updateResult(),x},[l,u]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),F.useEffect(()=>{l.setOptions(a)},[a,l]),Xu(a,c))throw ba(a,l,s);if(Ku({result:c,errorResetBoundary:s,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw c.error;if((b=(h=r.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||b.call(h,a,c),a.experimental_prefetchInRender&&!Qt&&Qu(c,o)){const y=i?ba(a,l,s):(g=r.getQueryCache().get(a.queryHash))==null?void 0:g.promise;y==null||y.catch(ke).finally(()=>{l.updateResult()})}return a.notifyOnChangeProps?c:l.trackResult(c)}function Zu(e,t){return Ju(e,_u)}function al(e,t){const n=_s(),[r]=F.useState(()=>new zu(n,e));F.useEffect(()=>{r.setOptions(e)},[r,e]);const o=F.useSyncExternalStore(F.useCallback(a=>r.subscribe(ye.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=F.useCallback((a,i)=>{r.mutate(a,i).catch(ke)},[r]);if(o.error&&Qi(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}const ef="3QM9PlH0BuyKaVErlBWxVJU5v0vFlMJv",he={OPEN:"Open",IN_PROGRESS:"In progress",IN_REVIEW:"In review",COMPLETED:"Completed"},tf=async e=>{const t={taskInstanceId:e},n=new Headers;return n.append("Content-Type","application/json"),await(await fetch("/public-api/playbook-task-complete",{method:"POST",headers:n,body:JSON.stringify(t)})).json()},nf=()=>{const e=al({mutationFn:async n=>tf(n)});return{completeTask:async n=>e.mutateAsync(n,{onSuccess:()=>{console.log("Task completed successfully")},onError:r=>{console.error("Error completing task:",r)}}),...e}},rf=async e=>{const t={taskInstanceId:e},n=new Headers;n.append("Content-Type","application/json");const o=await(await fetch("/public-api/playbook-task-start",{method:"POST",headers:n,body:JSON.stringify(t)})).json();return console.log({data:o}),o},of=()=>{const e=al({mutationFn:async n=>{const r=await rf(n);return console.log(r),r}});return{startTask:n=>e.mutateAsync(n,{onSuccess:()=>{console.log("Task started successfully")},onError:r=>{console.error("Error starting task:",r)}}),...e}},sf=(e,t)=>{const n=_s(),{completeTask:r}=nf(),{startTask:o}=of();return{completeTask:async(i,l)=>{const{status:c}=await r(i.toString());c&&n.setQueryData(["playbook",+e],u=>{if(!u)return u;const f=u.tasks.map(p=>p.sequenceOrder===l+1&&t.quickComplete?{...p,workflowStatus:he.IN_PROGRESS}:p.taskInstanceId===i?{...p,workflowStatus:c}:p);return{...u,tasks:f}})},startTask:async i=>{const{status:l}=await o(i.toString());l&&n.setQueryData(["playbook",+e],c=>{if(!c)return c;const u=c.tasks.map(f=>f.taskInstanceId===i?{...f,workflowStatus:l}:f);return{...c,tasks:u}})}}},af=e=>{var r;const t=Zu({queryFn:async()=>{const o=new Headers;o.append("Content-Type","application/json"),o.append("apiKey",ef);const s=await fetch("/public-api/playbook-details",{method:"POST",cache:"no-store",headers:o,body:JSON.stringify({playbookInstanceId:+e,start:0,limit:50})});if(!s.ok)throw new Error("Network response was not ok");const a=await s.json();if(a.error)throw new Error(a.error);return a},queryKey:["playbook",+e]}),n=sf(e,{quickComplete:(r=t.data)==null?void 0:r.quickComplete});return{playbook:t.data,isLoading:t.isLoading,error:t.error,actions:n}},Hn={START:"START",PAUSE:"PAUSE",COMPLETE:"COMPLETE"},lf={START:"Start",PAUSE:"Pause",RESUME:"Resume",COMPLETE:"Complete"},cf=e=>{const{taskStatus:t}=e;return{buttons:d.useMemo(()=>t===he.OPEN&&e.canStart?[Hn.START]:t===he.IN_PROGRESS?[Hn.PAUSE,Hn.COMPLETE]:t===he.COMPLETED?[]:[],[t])}},Ds="-",uf=e=>{const t=df(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const i=a.split(Ds);return i[0]===""&&i.length!==1&&i.shift(),il(i,t)||ff(a)},getConflictingClassGroupIds:(a,i)=>{const l=n[a]||[];return i&&r[a]?[...l,...r[a]]:l}}},il=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?il(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Ds);return(a=t.validators.find(({validator:i})=>i(s)))==null?void 0:a.classGroupId},ya=/^\[(.+)\]$/,ff=e=>{if(ya.test(e)){const t=ya.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},df=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)Jo(n[o],r,o,t);return r},Jo=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:va(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(hf(o)){Jo(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,a])=>{Jo(a,va(t,s),n,r)})})},va=(e,t)=>{let n=e;return t.split(Ds).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},hf=e=>e.isThemeGetter,pf=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,a)=>{n.set(s,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let a=n.get(s);if(a!==void 0)return a;if((a=r.get(s))!==void 0)return o(s,a),a},set(s,a){n.has(s)?n.set(s,a):o(s,a)}}},Zo="!",es=":",mf=es.length,gf=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let a=0,i=0,l=0,c;for(let b=0;b<o.length;b++){let g=o[b];if(a===0&&i===0){if(g===es){s.push(o.slice(l,b)),l=b+mf;continue}if(g==="/"){c=b;continue}}g==="["?a++:g==="]"?a--:g==="("?i++:g===")"&&i--}const u=s.length===0?o:o.substring(l),f=bf(u),p=f!==u,h=c&&c>l?c-l:void 0;return{modifiers:s,hasImportantModifier:p,baseClassName:f,maybePostfixModifierPosition:h}};if(t){const o=t+es,s=r;r=a=>a.startsWith(o)?s(a.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},bf=e=>e.endsWith(Zo)?e.substring(0,e.length-1):e.startsWith(Zo)?e.substring(1):e,yf=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let s=[];return r.forEach(a=>{a[0]==="["||t[a]?(o.push(...s.sort(),a),s=[]):s.push(a)}),o.push(...s.sort()),o}},vf=e=>({cache:pf(e.cacheSize),parseClassName:gf(e),sortModifiers:yf(e),...uf(e)}),wf=/\s+/,xf=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,a=[],i=e.trim().split(wf);let l="";for(let c=i.length-1;c>=0;c-=1){const u=i[c],{isExternal:f,modifiers:p,hasImportantModifier:h,baseClassName:b,maybePostfixModifierPosition:g}=n(u);if(f){l=u+(l.length>0?" "+l:l);continue}let y=!!g,x=r(y?b.substring(0,g):b);if(!x){if(!y){l=u+(l.length>0?" "+l:l);continue}if(x=r(b),!x){l=u+(l.length>0?" "+l:l);continue}y=!1}const S=s(p).join(":"),w=h?S+Zo:S,C=w+x;if(a.includes(C))continue;a.push(C);const v=o(x,y);for(let L=0;L<v.length;++L){const q=v[L];a.push(w+q)}l=u+(l.length>0?" "+l:l)}return l};function Ef(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=ll(t))&&(r&&(r+=" "),r+=n);return r}const ll=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ll(e[r]))&&(n&&(n+=" "),n+=t);return n};function Sf(e,...t){let n,r,o,s=a;function a(l){const c=t.reduce((u,f)=>f(u),e());return n=vf(c),r=n.cache.get,o=n.cache.set,s=i,i(l)}function i(l){const c=r(l);if(c)return c;const u=xf(l,n);return o(l,u),u}return function(){return s(Ef.apply(null,arguments))}}const be=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},cl=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ul=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Cf=/^\d+\/\d+$/,kf=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Tf=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Of=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Pf=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Af=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,on=e=>Cf.test(e),ee=e=>!!e&&!Number.isNaN(Number(e)),dt=e=>!!e&&Number.isInteger(Number(e)),uo=e=>e.endsWith("%")&&ee(e.slice(0,-1)),Ye=e=>kf.test(e),Rf=()=>!0,$f=e=>Tf.test(e)&&!Of.test(e),fl=()=>!1,Ff=e=>Pf.test(e),If=e=>Af.test(e),Mf=e=>!N(e)&&!_(e),Lf=e=>Rn(e,pl,fl),N=e=>cl.test(e),Lt=e=>Rn(e,ml,$f),fo=e=>Rn(e,zf,ee),wa=e=>Rn(e,dl,fl),Nf=e=>Rn(e,hl,If),dr=e=>Rn(e,gl,Ff),_=e=>ul.test(e),Mn=e=>$n(e,ml),_f=e=>$n(e,Hf),xa=e=>$n(e,dl),Df=e=>$n(e,pl),jf=e=>$n(e,hl),hr=e=>$n(e,gl,!0),Rn=(e,t,n)=>{const r=cl.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},$n=(e,t,n=!1)=>{const r=ul.exec(e);return r?r[1]?t(r[1]):n:!1},dl=e=>e==="position"||e==="percentage",hl=e=>e==="image"||e==="url",pl=e=>e==="length"||e==="size"||e==="bg-size",ml=e=>e==="length",zf=e=>e==="number",Hf=e=>e==="family-name",gl=e=>e==="shadow",Wf=()=>{const e=be("color"),t=be("font"),n=be("text"),r=be("font-weight"),o=be("tracking"),s=be("leading"),a=be("breakpoint"),i=be("container"),l=be("spacing"),c=be("radius"),u=be("shadow"),f=be("inset-shadow"),p=be("text-shadow"),h=be("drop-shadow"),b=be("blur"),g=be("perspective"),y=be("aspect"),x=be("ease"),S=be("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],v=()=>[...C(),_,N],L=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto","contain","none"],R=()=>[_,N,l],U=()=>[on,"full","auto",...R()],G=()=>[dt,"none","subgrid",_,N],le=()=>["auto",{span:["full",dt,_,N]},dt,_,N],ue=()=>[dt,"auto",_,N],oe=()=>["auto","min","max","fr",_,N],fe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],B=()=>["start","end","center","stretch","center-safe","end-safe"],K=()=>["auto",...R()],ne=()=>[on,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],T=()=>[e,_,N],V=()=>[...C(),xa,wa,{position:[_,N]}],E=()=>["no-repeat",{repeat:["","x","y","space","round"]}],P=()=>["auto","cover","contain",Df,Lf,{size:[_,N]}],W=()=>[uo,Mn,Lt],A=()=>["","none","full",c,_,N],D=()=>["",ee,Mn,Lt],Y=()=>["solid","dashed","dotted","double"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>[ee,uo,xa,wa],Q=()=>["","none",b,_,N],X=()=>["none",ee,_,N],Z=()=>["none",ee,_,N],ge=()=>[ee,_,N],$=()=>[on,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ye],breakpoint:[Ye],color:[Rf],container:[Ye],"drop-shadow":[Ye],ease:["in","out","in-out"],font:[Mf],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ye],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ye],shadow:[Ye],spacing:["px",ee],text:[Ye],"text-shadow":[Ye],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",on,N,_,y]}],container:["container"],columns:[{columns:[ee,N,_,i]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:v()}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:q()}],"overscroll-x":[{"overscroll-x":q()}],"overscroll-y":[{"overscroll-y":q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:U()}],"inset-x":[{"inset-x":U()}],"inset-y":[{"inset-y":U()}],start:[{start:U()}],end:[{end:U()}],top:[{top:U()}],right:[{right:U()}],bottom:[{bottom:U()}],left:[{left:U()}],visibility:["visible","invisible","collapse"],z:[{z:[dt,"auto",_,N]}],basis:[{basis:[on,"full","auto",i,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ee,on,"auto","initial","none",N]}],grow:[{grow:["",ee,_,N]}],shrink:[{shrink:["",ee,_,N]}],order:[{order:[dt,"first","last","none",_,N]}],"grid-cols":[{"grid-cols":G()}],"col-start-end":[{col:le()}],"col-start":[{"col-start":ue()}],"col-end":[{"col-end":ue()}],"grid-rows":[{"grid-rows":G()}],"row-start-end":[{row:le()}],"row-start":[{"row-start":ue()}],"row-end":[{"row-end":ue()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":oe()}],"auto-rows":[{"auto-rows":oe()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...fe(),"normal"]}],"justify-items":[{"justify-items":[...B(),"normal"]}],"justify-self":[{"justify-self":["auto",...B()]}],"align-content":[{content:["normal",...fe()]}],"align-items":[{items:[...B(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...B(),{baseline:["","last"]}]}],"place-content":[{"place-content":fe()}],"place-items":[{"place-items":[...B(),"baseline"]}],"place-self":[{"place-self":["auto",...B()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],m:[{m:K()}],mx:[{mx:K()}],my:[{my:K()}],ms:[{ms:K()}],me:[{me:K()}],mt:[{mt:K()}],mr:[{mr:K()}],mb:[{mb:K()}],ml:[{ml:K()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:ne()}],w:[{w:[i,"screen",...ne()]}],"min-w":[{"min-w":[i,"screen","none",...ne()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[a]},...ne()]}],h:[{h:["screen",...ne()]}],"min-h":[{"min-h":["screen","none",...ne()]}],"max-h":[{"max-h":["screen",...ne()]}],"font-size":[{text:["base",n,Mn,Lt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,_,fo]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",uo,N]}],"font-family":[{font:[_f,N,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,_,N]}],"line-clamp":[{"line-clamp":[ee,"none",_,fo]}],leading:[{leading:[s,...R()]}],"list-image":[{"list-image":["none",_,N]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",_,N]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:T()}],"text-color":[{text:T()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Y(),"wavy"]}],"text-decoration-thickness":[{decoration:[ee,"from-font","auto",_,Lt]}],"text-decoration-color":[{decoration:T()}],"underline-offset":[{"underline-offset":[ee,"auto",_,N]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",_,N]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",_,N]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:V()}],"bg-repeat":[{bg:E()}],"bg-size":[{bg:P()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},dt,_,N],radial:["",_,N],conic:[dt,_,N]},jf,Nf]}],"bg-color":[{bg:T()}],"gradient-from-pos":[{from:W()}],"gradient-via-pos":[{via:W()}],"gradient-to-pos":[{to:W()}],"gradient-from":[{from:T()}],"gradient-via":[{via:T()}],"gradient-to":[{to:T()}],rounded:[{rounded:A()}],"rounded-s":[{"rounded-s":A()}],"rounded-e":[{"rounded-e":A()}],"rounded-t":[{"rounded-t":A()}],"rounded-r":[{"rounded-r":A()}],"rounded-b":[{"rounded-b":A()}],"rounded-l":[{"rounded-l":A()}],"rounded-ss":[{"rounded-ss":A()}],"rounded-se":[{"rounded-se":A()}],"rounded-ee":[{"rounded-ee":A()}],"rounded-es":[{"rounded-es":A()}],"rounded-tl":[{"rounded-tl":A()}],"rounded-tr":[{"rounded-tr":A()}],"rounded-br":[{"rounded-br":A()}],"rounded-bl":[{"rounded-bl":A()}],"border-w":[{border:D()}],"border-w-x":[{"border-x":D()}],"border-w-y":[{"border-y":D()}],"border-w-s":[{"border-s":D()}],"border-w-e":[{"border-e":D()}],"border-w-t":[{"border-t":D()}],"border-w-r":[{"border-r":D()}],"border-w-b":[{"border-b":D()}],"border-w-l":[{"border-l":D()}],"divide-x":[{"divide-x":D()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":D()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Y(),"hidden","none"]}],"divide-style":[{divide:[...Y(),"hidden","none"]}],"border-color":[{border:T()}],"border-color-x":[{"border-x":T()}],"border-color-y":[{"border-y":T()}],"border-color-s":[{"border-s":T()}],"border-color-e":[{"border-e":T()}],"border-color-t":[{"border-t":T()}],"border-color-r":[{"border-r":T()}],"border-color-b":[{"border-b":T()}],"border-color-l":[{"border-l":T()}],"divide-color":[{divide:T()}],"outline-style":[{outline:[...Y(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ee,_,N]}],"outline-w":[{outline:["",ee,Mn,Lt]}],"outline-color":[{outline:T()}],shadow:[{shadow:["","none",u,hr,dr]}],"shadow-color":[{shadow:T()}],"inset-shadow":[{"inset-shadow":["none",f,hr,dr]}],"inset-shadow-color":[{"inset-shadow":T()}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:T()}],"ring-offset-w":[{"ring-offset":[ee,Lt]}],"ring-offset-color":[{"ring-offset":T()}],"inset-ring-w":[{"inset-ring":D()}],"inset-ring-color":[{"inset-ring":T()}],"text-shadow":[{"text-shadow":["none",p,hr,dr]}],"text-shadow-color":[{"text-shadow":T()}],opacity:[{opacity:[ee,_,N]}],"mix-blend":[{"mix-blend":[...z(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":z()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ee]}],"mask-image-linear-from-pos":[{"mask-linear-from":I()}],"mask-image-linear-to-pos":[{"mask-linear-to":I()}],"mask-image-linear-from-color":[{"mask-linear-from":T()}],"mask-image-linear-to-color":[{"mask-linear-to":T()}],"mask-image-t-from-pos":[{"mask-t-from":I()}],"mask-image-t-to-pos":[{"mask-t-to":I()}],"mask-image-t-from-color":[{"mask-t-from":T()}],"mask-image-t-to-color":[{"mask-t-to":T()}],"mask-image-r-from-pos":[{"mask-r-from":I()}],"mask-image-r-to-pos":[{"mask-r-to":I()}],"mask-image-r-from-color":[{"mask-r-from":T()}],"mask-image-r-to-color":[{"mask-r-to":T()}],"mask-image-b-from-pos":[{"mask-b-from":I()}],"mask-image-b-to-pos":[{"mask-b-to":I()}],"mask-image-b-from-color":[{"mask-b-from":T()}],"mask-image-b-to-color":[{"mask-b-to":T()}],"mask-image-l-from-pos":[{"mask-l-from":I()}],"mask-image-l-to-pos":[{"mask-l-to":I()}],"mask-image-l-from-color":[{"mask-l-from":T()}],"mask-image-l-to-color":[{"mask-l-to":T()}],"mask-image-x-from-pos":[{"mask-x-from":I()}],"mask-image-x-to-pos":[{"mask-x-to":I()}],"mask-image-x-from-color":[{"mask-x-from":T()}],"mask-image-x-to-color":[{"mask-x-to":T()}],"mask-image-y-from-pos":[{"mask-y-from":I()}],"mask-image-y-to-pos":[{"mask-y-to":I()}],"mask-image-y-from-color":[{"mask-y-from":T()}],"mask-image-y-to-color":[{"mask-y-to":T()}],"mask-image-radial":[{"mask-radial":[_,N]}],"mask-image-radial-from-pos":[{"mask-radial-from":I()}],"mask-image-radial-to-pos":[{"mask-radial-to":I()}],"mask-image-radial-from-color":[{"mask-radial-from":T()}],"mask-image-radial-to-color":[{"mask-radial-to":T()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[ee]}],"mask-image-conic-from-pos":[{"mask-conic-from":I()}],"mask-image-conic-to-pos":[{"mask-conic-to":I()}],"mask-image-conic-from-color":[{"mask-conic-from":T()}],"mask-image-conic-to-color":[{"mask-conic-to":T()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:V()}],"mask-repeat":[{mask:E()}],"mask-size":[{mask:P()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",_,N]}],filter:[{filter:["","none",_,N]}],blur:[{blur:Q()}],brightness:[{brightness:[ee,_,N]}],contrast:[{contrast:[ee,_,N]}],"drop-shadow":[{"drop-shadow":["","none",h,hr,dr]}],"drop-shadow-color":[{"drop-shadow":T()}],grayscale:[{grayscale:["",ee,_,N]}],"hue-rotate":[{"hue-rotate":[ee,_,N]}],invert:[{invert:["",ee,_,N]}],saturate:[{saturate:[ee,_,N]}],sepia:[{sepia:["",ee,_,N]}],"backdrop-filter":[{"backdrop-filter":["","none",_,N]}],"backdrop-blur":[{"backdrop-blur":Q()}],"backdrop-brightness":[{"backdrop-brightness":[ee,_,N]}],"backdrop-contrast":[{"backdrop-contrast":[ee,_,N]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ee,_,N]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ee,_,N]}],"backdrop-invert":[{"backdrop-invert":["",ee,_,N]}],"backdrop-opacity":[{"backdrop-opacity":[ee,_,N]}],"backdrop-saturate":[{"backdrop-saturate":[ee,_,N]}],"backdrop-sepia":[{"backdrop-sepia":["",ee,_,N]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",_,N]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ee,"initial",_,N]}],ease:[{ease:["linear","initial",x,_,N]}],delay:[{delay:[ee,_,N]}],animate:[{animate:["none",S,_,N]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,_,N]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:X()}],"rotate-x":[{"rotate-x":X()}],"rotate-y":[{"rotate-y":X()}],"rotate-z":[{"rotate-z":X()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:ge()}],"skew-x":[{"skew-x":ge()}],"skew-y":[{"skew-y":ge()}],transform:[{transform:[_,N,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:$()}],"translate-x":[{"translate-x":$()}],"translate-y":[{"translate-y":$()}],"translate-z":[{"translate-z":$()}],"translate-none":["translate-none"],accent:[{accent:T()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:T()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",_,N]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",_,N]}],fill:[{fill:["none",...T()]}],"stroke-w":[{stroke:[ee,Mn,Lt,fo]}],stroke:[{stroke:["none",...T()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},un=Sf(Wf);function bl(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=bl(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Pr(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=bl(e))&&(r&&(r+=" "),r+=t);return r}function On(...e){return un(Pr(e))}const Uf="whitespace-nowrap font-normal flex items-center justify-center",Bf="focus:outline focus:outline-3 focus:outline-primary-500/[.3]",qf="disabled:opacity-15 disabled:pointer-events-none",yl=e=>e==="grayLight"||e==="warning",vl=(e,t)=>!t||t==="none"?"":e(),Vf=(e,t)=>vl(()=>{const n=e==="gray400"?"gray":e,r=yl(n)?"active:text-black":"active:text-white";return e==="primary"?t?`bg-${n}-800 text-white`:`hover:bg-${n}-800 active:bg-${n}-800 hover:text-white ${r}`:n==="grayDark"?t?"bg-gray-800 text-white":`hover:bg-gray-800 active:bg-gray-800 hover:text-white ${r}`:n==="grayLight"?t?"bg-gray-50 text-black":`hover:bg-gray-50 active:bg-gray-50 hover:text-black ${r}`:e==="gray400"?t?`bg-${n}-500 text-white`:`hover:bg-${n}-500 active:bg-${n}-500 hover:text-white ${r}`:t?`bg-${n}-700 text-white`:`hover:bg-${n}-600 active:bg-${n}-700 hover:text-white ${r}`},e),Gf=e=>vl(()=>{const t=yl(e)?"text-black":"text-white";return e==="primary"?`bg-primary-600 ${t}`:e==="gray400"?`bg-gray-400 ${t}`:`bg-${e}-500 ${t}`},e),Kf=e=>e&&{dark:"text-dark hover:text-dark",yellow:"text-yellow hover:text-yellow",gray:"text-gray-500 hover:text-gray-800",primary:"text-primary-600 hover:text-primary-800",secondary:"text-secondary-500 hover:text-secondary-800",success:"text-success-500 hover:text-success-800",info:"text-info-500 hover:text-info-800",warning:"text-warning-500 hover:text-warning-800",danger:"text-danger-500 hover:text-danger-800",steel:"text-steel-500 hover:text-steel-800",orange:"text-orange-500 hover:text-orange-800",purple:"text-purple-500 hover:text-purple-800","fiserv-orange":"text-fiserv-orange-500 hover:text-fiserv-orange-800",grayDark:"text-gray-800 hover:text-gray-900",grayLight:"text-gray-50 hover:text-gray-400",gray400:"text-gray-400 hover:text-gray-700"}[e]||"",Yf=(e,t)=>e&&{dark:t?"bg-dark text-white":"text-dark hover:bg-dark hover:text-white",yellow:t?"bg-yellow text-white":"text-yellow hover:bg-yellow hover:text-white",gray:t?"bg-gray-500 text-white":"text-gray-500 hover:bg-gray-500 hover:text-white",primary:t?"bg-primary-800 text-white":"text-primary-600 hover:bg-primary-800 hover:text-white",secondary:t?"bg-secondary-500 text-white":"text-secondary-500 hover:bg-secondary-500 hover:text-white",success:t?"bg-success-500 text-white":"text-success-500 hover:bg-success-500 hover:text-white",info:t?"bg-info-500 text-white":"text-info-500 hover:bg-info-500 hover:text-white",warning:t?"bg-warning-500 text-white":"text-warning-500 hover:bg-warning-500 hover:text-white",danger:t?"bg-danger-500 text-white":"text-danger-500 hover:bg-danger-500 hover:text-white",steel:t?"bg-steel-500 text-white":"text-steel-500 hover:bg-steel-500 hover:text-white",orange:t?"bg-orange-500 text-white":"text-orange-500 hover:bg-orange-500 hover:text-white",purple:t?"bg-purple-500 text-white":"text-purple-500 hover:bg-purple-500 hover:text-white","fiserv-orange":t?"bg-fiserv-orange-500 text-white":"text-fiserv-orange-500 hover:bg-fiserv-orange-500 hover:text-white",grayDark:t?"bg-gray-900 text-white":"text-gray-800 hover:bg-gray-900 hover:text-white",grayLight:t?"bg-gray-400 text-white":"text-gray-50 hover:bg-gray-400 hover:text-white",gray400:t?"bg-gray-500 text-white":"text-gray-400 hover:bg-gray-500 hover:text-white"}[e]||"",Qf=(e,t)=>!e||e==="none"?"":e==="primary"?`border border-primary-600 ${t?"":"text-primary-600"}`:e==="grayDark"?`border border-gray-800 ${t?"":"text-gray-800"}`:e==="grayLight"?`border border-gray-50 ${t?"":"text-gray-400"}`:e==="gray400"?`border border-gray-400 ${t?"":"text-gray-400"}`:`border border-${e}-500 ${t?"":`text-${e}-500`}`,Xf=(e,t)=>({solid:Gf(e),link:Kf(e),linkHoverSolid:Yf(e,t),outline:Qf(e,t)}),Jf={none:"",default:"min-w-fit h-[40px] text-base px-3",base:"w-full md:min-w-fit h-[40px] text-base px-3",small:"min-w-[106px] h-[30px] text-sm px-2",normal:"min-w-[140px] h-[38px] text-base px-3",large:"min-w-[160px] h-[40px] text-lg px-3",NormalBlock:"w-full h-[40px] text-lg px-3",box:"w-[38px] h-[38px]",smallCollapse:"h-[30px] text-sm px-2",normalCollapse:"h-[38px] text-base px-3"},Zf={none:"",default:"rounded",pill:"rounded-pill"},ed=({active:e=!1,children:t,color:n="primary",size:r="normal",category:o="solid",className:s,type:a="button",rounded:i="default",style:l={},...c},u)=>{var S;const f=qf,p=/link/.test(o)?null:Vf(n,e),h=Bf,b=Jf[r],g=(S=Xf(n,e))==null?void 0:S[o],y=un(p,g),x=Zf[i];return O.jsx("button",{...c,style:{...l,transition:"color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out"},type:a,ref:u,className:un(Uf,h,f,b,y,x,s,"cursor-pointer"),children:t})},Ar=d.forwardRef(ed),td=({buttons:e,onButtonClick:t})=>O.jsx("div",{className:"flex items-center justify-end",children:e.map(n=>O.jsx(Ar,{size:"smallCollapse",className:"ml-2",onClick:()=>{t(n)},children:lf[n]},n))}),nd={SEQUENTIAL:"Sequential"},rd={[he.IN_REVIEW]:"In Review"},od={[he.OPEN]:"bg-secondary-500",[he.IN_PROGRESS]:"bg-primary-600",[he.IN_REVIEW]:"bg-success-600",[he.COMPLETED]:"bg-success-600"},sd=({playbookType:e,status:t,step:n,isSelected:r,onSelect:o})=>O.jsx("div",{className:Pr("flex flex-col items-center justify-center",r?"bg-[#FFE600]":od[t],o&&"cursor-pointer"),onClick:s=>{s.stopPropagation(),o==null||o(s.shiftKey)},children:O.jsx("span",{className:Pr("text-orientation-mixed w-[27px] flex items-center whitespace-nowrap px-2 text-sm font-bold [writing-mode:vertical-lr]",r?"text-black":"text-white"),children:e===nd.SEQUENTIAL?`STEP ${n}`:(rd[t]||t).toUpperCase()})}),ad={white:"bg-white text-dark-300 border border-gray-300",primary:"bg-primary-600",secondary:"bg-secondary-500",success:"bg-success-600",info:"bg-info-500",warning:"bg-warning-500 text-gray-800",danger:"bg-danger-500",steel:"bg-steel-500",orange:"bg-orange-500",purple:"bg-purple-500",grayDark:"bg-gray-900",grayLight:"bg-gray-100 text-gray-800"},id={white:"text-white border border-white",primary:"text-primary-600 border border-primary-600",secondary:"text-secondary-500 border border-secondary-500",success:"text-success-600 border border-success-600",info:"text-info-500 border border-info-500",warning:"text-warning-500 border border-warning-500",danger:"text-danger-500 border border-danger-500",steel:"text-steel-500 border border-steel-500",orange:"text-orange-500 border border-orange-500",purple:"text-purple-500 border border-purple-500",grayDark:"text-gray-700 border border-gray-700",grayLight:"text-gray-500 border border-gray-100"},ld={white:"text-dark-300",primary:"text-white",secondary:"text-white",success:"text-white",info:"text-black",warning:"text-gray-800",danger:"text-white",steel:"text-white",orange:"text-black",purple:"text-white",grayDark:"text-white",grayLight:"text-gray-800"},cd={normal:"rounded",pill:"rounded-pill"},ud={big:"h-[24px] leading-[24px] text-md px-1",medium:"h-[22px] leading-[22px] text-sm px-[2px]",small:"h-[18px] leading-[18px] text-xs px-[2px]"},wl=({category:e="solid",color:t="primary",roundness:n="normal",size:r="medium",textClassName:o="uppercase",children:s,className:a,...i})=>{const l=d.useMemo(()=>ld[t]??"text-white",[t]),c=d.useMemo(()=>un(l,e==="outline"?id[t]:ad[t],cd[n],ud[r]),[l,e,t,r,n]);return O.jsx("div",{className:un("ui-badge flex items-center font-bold",c,a),style:i==null?void 0:i.style,"data-testid":"badge","data-category":e,"data-color":t,...i,children:O.jsx("p",{className:un("mx-1",o),children:s})})},fd={[he.OPEN]:"secondary",[he.IN_PROGRESS]:"primary",[he.IN_REVIEW]:"success",[he.COMPLETED]:"success"},dd=({status:e})=>O.jsx(wl,{category:"outline",color:fd[e],children:e});/*!
|
|
1
|
+
"use strict";var la=e=>{throw TypeError(e)};var lo=(e,t,n)=>t.has(e)||la("Cannot "+n);var m=(e,t,n)=>(lo(e,t,"read from private field"),n?n.call(e):t.get(e)),H=(e,t,n)=>t.has(e)?la("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),M=(e,t,n,r)=>(lo(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),J=(e,t,n)=>(lo(e,t,"access private method"),n);var ur=(e,t,n,r)=>({set _(o){M(e,t,o,n)},get _(){return m(e,t,r)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("react/jsx-runtime"),d=require("react"),Vi=require("react-dom");function Gi(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const F=Gi(d),xu=Gi(Vi);var An=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Qt=typeof window>"u"||"Deno"in globalThis;function ke(){}function Eu(e,t){return typeof e=="function"?e(t):e}function Do(e){return typeof e=="number"&&e>=0&&e!==1/0}function Ki(e,t){return Math.max(e+(t||0)-Date.now(),0)}function cn(e,t){return typeof e=="function"?e(t):e}function De(e,t){return typeof e=="function"?e(t):e}function ca(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:a,stale:i}=e;if(a){if(r){if(t.queryHash!==Ms(a,t.options))return!1}else if(!Kn(t.queryKey,a))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof i=="boolean"&&t.isStale()!==i||o&&o!==t.state.fetchStatus||s&&!s(t))}function ua(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Xt(t.options.mutationKey)!==Xt(s))return!1}else if(!Kn(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Ms(e,t){return((t==null?void 0:t.queryKeyHashFn)||Xt)(e)}function Xt(e){return JSON.stringify(e,(t,n)=>zo(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Kn(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Kn(e[n],t[n])):!1}function jo(e,t){if(e===t)return e;const n=fa(e)&&fa(t);if(n||zo(e)&&zo(t)){const r=n?e:Object.keys(e),o=r.length,s=n?t:Object.keys(t),a=s.length,i=n?[]:{};let l=0;for(let c=0;c<a;c++){const u=n?c:s[c];(!n&&r.includes(u)||n)&&e[u]===void 0&&t[u]===void 0?(i[u]=void 0,l++):(i[u]=jo(e[u],t[u]),i[u]===e[u]&&e[u]!==void 0&&l++)}return o===a&&l===o?e:i}return t}function kr(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function fa(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function zo(e){if(!da(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!da(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function da(e){return Object.prototype.toString.call(e)==="[object Object]"}function Su(e){return new Promise(t=>{setTimeout(t,e)})}function Ho(e,t,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(e,t);if(n.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return jo(e,t)}catch(r){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${r}`),r}return jo(e,t)}return t}function Cu(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function ku(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Tr=Symbol();function Yi(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===Tr&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Tr?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Qi(e,t){return typeof e=="function"?e(...t):!!e}var Ht,gt,pn,Ni,Tu=(Ni=class extends An{constructor(){super();H(this,Ht);H(this,gt);H(this,pn);M(this,pn,t=>{if(!Qt&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){m(this,gt)||this.setEventListener(m(this,pn))}onUnsubscribe(){var t;this.hasListeners()||((t=m(this,gt))==null||t.call(this),M(this,gt,void 0))}setEventListener(t){var n;M(this,pn,t),(n=m(this,gt))==null||n.call(this),M(this,gt,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){m(this,Ht)!==t&&(M(this,Ht,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof m(this,Ht)=="boolean"?m(this,Ht):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ht=new WeakMap,gt=new WeakMap,pn=new WeakMap,Ni),Ls=new Tu,mn,bt,gn,_i,Ou=(_i=class extends An{constructor(){super();H(this,mn,!0);H(this,bt);H(this,gn);M(this,gn,t=>{if(!Qt&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){m(this,bt)||this.setEventListener(m(this,gn))}onUnsubscribe(){var t;this.hasListeners()||((t=m(this,bt))==null||t.call(this),M(this,bt,void 0))}setEventListener(t){var n;M(this,gn,t),(n=m(this,bt))==null||n.call(this),M(this,bt,t(this.setOnline.bind(this)))}setOnline(t){m(this,mn)!==t&&(M(this,mn,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return m(this,mn)}},mn=new WeakMap,bt=new WeakMap,gn=new WeakMap,_i),Or=new Ou;function Wo(){let e,t;const n=new Promise((o,s)=>{e=o,t=s});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}function Pu(e){return Math.min(1e3*2**e,3e4)}function Xi(e){return(e??"online")==="online"?Or.isOnline():!0}var Ji=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function co(e){return e instanceof Ji}function Zi(e){let t=!1,n=0,r=!1,o;const s=Wo(),a=g=>{var y;r||(p(new Ji(g)),(y=e.abort)==null||y.call(e))},i=()=>{t=!0},l=()=>{t=!1},c=()=>Ls.isFocused()&&(e.networkMode==="always"||Or.isOnline())&&e.canRun(),u=()=>Xi(e.networkMode)&&e.canRun(),f=g=>{var y;r||(r=!0,(y=e.onSuccess)==null||y.call(e,g),o==null||o(),s.resolve(g))},p=g=>{var y;r||(r=!0,(y=e.onError)==null||y.call(e,g),o==null||o(),s.reject(g))},h=()=>new Promise(g=>{var y;o=x=>{(r||c())&&g(x)},(y=e.onPause)==null||y.call(e)}).then(()=>{var g;o=void 0,r||(g=e.onContinue)==null||g.call(e)}),b=()=>{if(r)return;let g;const y=n===0?e.initialPromise:void 0;try{g=y??e.fn()}catch(x){g=Promise.reject(x)}Promise.resolve(g).then(f).catch(x=>{var L;if(r)return;const S=e.retry??(Qt?0:3),w=e.retryDelay??Pu,C=typeof w=="function"?w(n,x):w,v=S===!0||typeof S=="number"&&n<S||typeof S=="function"&&S(n,x);if(t||!v){p(x);return}n++,(L=e.onFail)==null||L.call(e,n,x),Su(C).then(()=>c()?void 0:h()).then(()=>{t?p(x):b()})})};return{promise:s,cancel:a,continue:()=>(o==null||o(),s),cancelRetry:i,continueRetry:l,canStart:u,start:()=>(u()?b():h().then(b),s)}}var Au=e=>setTimeout(e,0);function Ru(){let e=[],t=0,n=i=>{i()},r=i=>{i()},o=Au;const s=i=>{t?e.push(i):o(()=>{n(i)})},a=()=>{const i=e;e=[],i.length&&o(()=>{r(()=>{i.forEach(l=>{n(l)})})})};return{batch:i=>{let l;t++;try{l=i()}finally{t--,t||a()}return l},batchCalls:i=>(...l)=>{s(()=>{i(...l)})},schedule:s,setNotifyFunction:i=>{n=i},setBatchNotifyFunction:i=>{r=i},setScheduler:i=>{o=i}}}var ye=Ru(),Wt,Di,el=(Di=class{constructor(){H(this,Wt)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Do(this.gcTime)&&M(this,Wt,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Qt?1/0:5*60*1e3))}clearGcTimeout(){m(this,Wt)&&(clearTimeout(m(this,Wt)),M(this,Wt,void 0))}},Wt=new WeakMap,Di),bn,yn,Ie,Ut,xe,Zn,Bt,Ne,Qe,ji,$u=(ji=class extends el{constructor(t){super();H(this,Ne);H(this,bn);H(this,yn);H(this,Ie);H(this,Ut);H(this,xe);H(this,Zn);H(this,Bt);M(this,Bt,!1),M(this,Zn,t.defaultOptions),this.setOptions(t.options),this.observers=[],M(this,Ut,t.client),M(this,Ie,m(this,Ut).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,M(this,bn,Fu(this.options)),this.state=t.state??m(this,bn),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=m(this,xe))==null?void 0:t.promise}setOptions(t){this.options={...m(this,Zn),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&m(this,Ie).remove(this)}setData(t,n){const r=Ho(this.state.data,t,this.options);return J(this,Ne,Qe).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){J(this,Ne,Qe).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=m(this,xe))==null?void 0:r.promise;return(o=m(this,xe))==null||o.cancel(t),n?n.then(ke).catch(ke):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(m(this,bn))}isActive(){return this.observers.some(t=>De(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Tr||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!Ki(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=m(this,xe))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=m(this,xe))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),m(this,Ie).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(m(this,xe)&&(m(this,Bt)?m(this,xe).cancel({revert:!0}):m(this,xe).cancelRetry()),this.scheduleGc()),m(this,Ie).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||J(this,Ne,Qe).call(this,{type:"invalidate"})}fetch(t,n){var l,c,u;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(m(this,xe))return m(this,xe).continueRetry(),m(this,xe).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(p=>p.options.queryFn);f&&this.setOptions(f.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const r=new AbortController,o=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(M(this,Bt,!0),r.signal)})},s=()=>{const f=Yi(this.options,n),p={client:m(this,Ut),queryKey:this.queryKey,meta:this.meta};return o(p),M(this,Bt,!1),this.options.persister?this.options.persister(f,p,this):f(p)},a={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:m(this,Ut),state:this.state,fetchFn:s};o(a),(l=this.options.behavior)==null||l.onFetch(a,this),M(this,yn,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=a.fetchOptions)==null?void 0:c.meta))&&J(this,Ne,Qe).call(this,{type:"fetch",meta:(u=a.fetchOptions)==null?void 0:u.meta});const i=f=>{var p,h,b,g;co(f)&&f.silent||J(this,Ne,Qe).call(this,{type:"error",error:f}),co(f)||((h=(p=m(this,Ie).config).onError)==null||h.call(p,f,this),(g=(b=m(this,Ie).config).onSettled)==null||g.call(b,this.state.data,f,this)),this.scheduleGc()};return M(this,xe,Zi({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var p,h,b,g;if(f===void 0){process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),i(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(y){i(y);return}(h=(p=m(this,Ie).config).onSuccess)==null||h.call(p,f,this),(g=(b=m(this,Ie).config).onSettled)==null||g.call(b,f,this.state.error,this),this.scheduleGc()},onError:i,onFail:(f,p)=>{J(this,Ne,Qe).call(this,{type:"failed",failureCount:f,error:p})},onPause:()=>{J(this,Ne,Qe).call(this,{type:"pause"})},onContinue:()=>{J(this,Ne,Qe).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),m(this,xe).start()}},bn=new WeakMap,yn=new WeakMap,Ie=new WeakMap,Ut=new WeakMap,xe=new WeakMap,Zn=new WeakMap,Bt=new WeakMap,Ne=new WeakSet,Qe=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...tl(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return co(o)&&o.revert&&m(this,yn)?{...m(this,yn),fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),ye.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),m(this,Ie).notify({query:this,type:"updated",action:t})})},ji);function tl(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Xi(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Fu(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Ue,zi,Iu=(zi=class extends An{constructor(t={}){super();H(this,Ue);this.config=t,M(this,Ue,new Map)}build(t,n,r){const o=n.queryKey,s=n.queryHash??Ms(o,n);let a=this.get(s);return a||(a=new $u({client:t,queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){m(this,Ue).has(t.queryHash)||(m(this,Ue).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=m(this,Ue).get(t.queryHash);n&&(t.destroy(),n===t&&m(this,Ue).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ye.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return m(this,Ue).get(t)}getAll(){return[...m(this,Ue).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>ca(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>ca(t,r)):n}notify(t){ye.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){ye.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ye.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Ue=new WeakMap,zi),Be,Se,qt,qe,pt,Hi,Mu=(Hi=class extends el{constructor(t){super();H(this,qe);H(this,Be);H(this,Se);H(this,qt);this.mutationId=t.mutationId,M(this,Se,t.mutationCache),M(this,Be,[]),this.state=t.state||nl(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){m(this,Be).includes(t)||(m(this,Be).push(t),this.clearGcTimeout(),m(this,Se).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){M(this,Be,m(this,Be).filter(n=>n!==t)),this.scheduleGc(),m(this,Se).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){m(this,Be).length||(this.state.status==="pending"?this.scheduleGc():m(this,Se).remove(this))}continue(){var t;return((t=m(this,qt))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,a,i,l,c,u,f,p,h,b,g,y,x,S,w,C,v,L,q,R;const n=()=>{J(this,qe,pt).call(this,{type:"continue"})};M(this,qt,Zi({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(U,G)=>{J(this,qe,pt).call(this,{type:"failed",failureCount:U,error:G})},onPause:()=>{J(this,qe,pt).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>m(this,Se).canRun(this)}));const r=this.state.status==="pending",o=!m(this,qt).canStart();try{if(r)n();else{J(this,qe,pt).call(this,{type:"pending",variables:t,isPaused:o}),await((a=(s=m(this,Se).config).onMutate)==null?void 0:a.call(s,t,this));const G=await((l=(i=this.options).onMutate)==null?void 0:l.call(i,t));G!==this.state.context&&J(this,qe,pt).call(this,{type:"pending",context:G,variables:t,isPaused:o})}const U=await m(this,qt).start();return await((u=(c=m(this,Se).config).onSuccess)==null?void 0:u.call(c,U,t,this.state.context,this)),await((p=(f=this.options).onSuccess)==null?void 0:p.call(f,U,t,this.state.context)),await((b=(h=m(this,Se).config).onSettled)==null?void 0:b.call(h,U,null,this.state.variables,this.state.context,this)),await((y=(g=this.options).onSettled)==null?void 0:y.call(g,U,null,t,this.state.context)),J(this,qe,pt).call(this,{type:"success",data:U}),U}catch(U){try{throw await((S=(x=m(this,Se).config).onError)==null?void 0:S.call(x,U,t,this.state.context,this)),await((C=(w=this.options).onError)==null?void 0:C.call(w,U,t,this.state.context)),await((L=(v=m(this,Se).config).onSettled)==null?void 0:L.call(v,void 0,U,this.state.variables,this.state.context,this)),await((R=(q=this.options).onSettled)==null?void 0:R.call(q,void 0,U,t,this.state.context)),U}finally{J(this,qe,pt).call(this,{type:"error",error:U})}}finally{m(this,Se).runNext(this)}}},Be=new WeakMap,Se=new WeakMap,qt=new WeakMap,qe=new WeakSet,pt=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),ye.batch(()=>{m(this,Be).forEach(r=>{r.onMutationUpdate(t)}),m(this,Se).notify({mutation:this,type:"updated",action:t})})},Hi);function nl(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Xe,_e,er,Wi,Lu=(Wi=class extends An{constructor(t={}){super();H(this,Xe);H(this,_e);H(this,er);this.config=t,M(this,Xe,new Set),M(this,_e,new Map),M(this,er,0)}build(t,n,r){const o=new Mu({mutationCache:this,mutationId:++ur(this,er)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){m(this,Xe).add(t);const n=fr(t);if(typeof n=="string"){const r=m(this,_e).get(n);r?r.push(t):m(this,_e).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(m(this,Xe).delete(t)){const n=fr(t);if(typeof n=="string"){const r=m(this,_e).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&m(this,_e).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=fr(t);if(typeof n=="string"){const r=m(this,_e).get(n),o=r==null?void 0:r.find(s=>s.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=fr(t);if(typeof n=="string"){const o=(r=m(this,_e).get(n))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ye.batch(()=>{m(this,Xe).forEach(t=>{this.notify({type:"removed",mutation:t})}),m(this,Xe).clear(),m(this,_e).clear()})}getAll(){return Array.from(m(this,Xe))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>ua(n,r))}findAll(t={}){return this.getAll().filter(n=>ua(t,n))}notify(t){ye.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return ye.batch(()=>Promise.all(t.map(n=>n.continue().catch(ke))))}},Xe=new WeakMap,_e=new WeakMap,er=new WeakMap,Wi);function fr(e){var t;return(t=e.options.scope)==null?void 0:t.id}function ha(e){return{onFetch:(t,n)=>{var u,f,p,h,b;const r=t.options,o=(p=(f=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:f.fetchMore)==null?void 0:p.direction,s=((h=t.state.data)==null?void 0:h.pages)||[],a=((b=t.state.data)==null?void 0:b.pageParams)||[];let i={pages:[],pageParams:[]},l=0;const c=async()=>{let g=!1;const y=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},x=Yi(t.options,t.fetchOptions),S=async(w,C,v)=>{if(g)return Promise.reject();if(C==null&&w.pages.length)return Promise.resolve(w);const L={client:t.client,queryKey:t.queryKey,pageParam:C,direction:v?"backward":"forward",meta:t.options.meta};y(L);const q=await x(L),{maxPages:R}=t.options,U=v?ku:Cu;return{pages:U(w.pages,q,R),pageParams:U(w.pageParams,C,R)}};if(o&&s.length){const w=o==="backward",C=w?Nu:pa,v={pages:s,pageParams:a},L=C(r,v);i=await S(v,L,w)}else{const w=e??s.length;do{const C=l===0?a[0]??r.initialPageParam:pa(r,i);if(l>0&&C==null)break;i=await S(i,C),l++}while(l<w)}return i};t.options.persister?t.fetchFn=()=>{var g,y;return(y=(g=t.options).persister)==null?void 0:y.call(g,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function pa(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Nu(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var pe,yt,vt,vn,wn,wt,xn,En,Ui,_u=(Ui=class{constructor(e={}){H(this,pe);H(this,yt);H(this,vt);H(this,vn);H(this,wn);H(this,wt);H(this,xn);H(this,En);M(this,pe,e.queryCache||new Iu),M(this,yt,e.mutationCache||new Lu),M(this,vt,e.defaultOptions||{}),M(this,vn,new Map),M(this,wn,new Map),M(this,wt,0)}mount(){ur(this,wt)._++,m(this,wt)===1&&(M(this,xn,Ls.subscribe(async e=>{e&&(await this.resumePausedMutations(),m(this,pe).onFocus())})),M(this,En,Or.subscribe(async e=>{e&&(await this.resumePausedMutations(),m(this,pe).onOnline())})))}unmount(){var e,t;ur(this,wt)._--,m(this,wt)===0&&((e=m(this,xn))==null||e.call(this),M(this,xn,void 0),(t=m(this,En))==null||t.call(this),M(this,En,void 0))}isFetching(e){return m(this,pe).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return m(this,yt).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=m(this,pe).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=m(this,pe).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(cn(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return m(this,pe).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=m(this,pe).get(r.queryHash),s=o==null?void 0:o.state.data,a=Eu(t,s);if(a!==void 0)return m(this,pe).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return ye.batch(()=>m(this,pe).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=m(this,pe).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=m(this,pe);ye.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=m(this,pe);return ye.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=ye.batch(()=>m(this,pe).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(ke).catch(ke)}invalidateQueries(e,t={}){return ye.batch(()=>(m(this,pe).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=ye.batch(()=>m(this,pe).findAll(e).filter(o=>!o.isDisabled()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(ke)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(ke)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=m(this,pe).build(this,t);return n.isStaleByTime(cn(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ke).catch(ke)}fetchInfiniteQuery(e){return e.behavior=ha(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ke).catch(ke)}ensureInfiniteQueryData(e){return e.behavior=ha(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Or.isOnline()?m(this,yt).resumePausedMutations():Promise.resolve()}getQueryCache(){return m(this,pe)}getMutationCache(){return m(this,yt)}getDefaultOptions(){return m(this,vt)}setDefaultOptions(e){M(this,vt,e)}setQueryDefaults(e,t){m(this,vn).set(Xt(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...m(this,vn).values()],n={};return t.forEach(r=>{Kn(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){m(this,wn).set(Xt(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...m(this,wn).values()],n={};return t.forEach(r=>{Kn(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...m(this,vt).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ms(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Tr&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...m(this,vt).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){m(this,pe).clear(),m(this,yt).clear()}},pe=new WeakMap,yt=new WeakMap,vt=new WeakMap,vn=new WeakMap,wn=new WeakMap,wt=new WeakMap,xn=new WeakMap,En=new WeakMap,Ui),Oe,re,tr,Ce,Vt,Sn,xt,Et,nr,Cn,kn,Gt,Kt,St,Tn,ie,Nn,Uo,Bo,qo,Vo,Go,Ko,Yo,rl,Bi,Du=(Bi=class extends An{constructor(t,n){super();H(this,ie);H(this,Oe);H(this,re);H(this,tr);H(this,Ce);H(this,Vt);H(this,Sn);H(this,xt);H(this,Et);H(this,nr);H(this,Cn);H(this,kn);H(this,Gt);H(this,Kt);H(this,St);H(this,Tn,new Set);this.options=n,M(this,Oe,t),M(this,Et,null),M(this,xt,Wo()),this.options.experimental_prefetchInRender||m(this,xt).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(m(this,re).addObserver(this),ma(m(this,re),this.options)?J(this,ie,Nn).call(this):this.updateResult(),J(this,ie,Vo).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Qo(m(this,re),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Qo(m(this,re),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,J(this,ie,Go).call(this),J(this,ie,Ko).call(this),m(this,re).removeObserver(this)}setOptions(t){const n=this.options,r=m(this,re);if(this.options=m(this,Oe).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof De(this.options.enabled,m(this,re))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");J(this,ie,Yo).call(this),m(this,re).setOptions(this.options),n._defaulted&&!kr(this.options,n)&&m(this,Oe).getQueryCache().notify({type:"observerOptionsUpdated",query:m(this,re),observer:this});const o=this.hasListeners();o&&ga(m(this,re),r,this.options,n)&&J(this,ie,Nn).call(this),this.updateResult(),o&&(m(this,re)!==r||De(this.options.enabled,m(this,re))!==De(n.enabled,m(this,re))||cn(this.options.staleTime,m(this,re))!==cn(n.staleTime,m(this,re)))&&J(this,ie,Uo).call(this);const s=J(this,ie,Bo).call(this);o&&(m(this,re)!==r||De(this.options.enabled,m(this,re))!==De(n.enabled,m(this,re))||s!==m(this,St))&&J(this,ie,qo).call(this,s)}getOptimisticResult(t){const n=m(this,Oe).getQueryCache().build(m(this,Oe),t),r=this.createResult(n,t);return zu(this,r)&&(M(this,Ce,r),M(this,Sn,this.options),M(this,Vt,m(this,re).state)),r}getCurrentResult(){return m(this,Ce)}trackResult(t,n){return new Proxy(t,{get:(r,o)=>(this.trackProp(o),n==null||n(o),Reflect.get(r,o))})}trackProp(t){m(this,Tn).add(t)}getCurrentQuery(){return m(this,re)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=m(this,Oe).defaultQueryOptions(t),r=m(this,Oe).getQueryCache().build(m(this,Oe),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return J(this,ie,Nn).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),m(this,Ce)))}createResult(t,n){var U;const r=m(this,re),o=this.options,s=m(this,Ce),a=m(this,Vt),i=m(this,Sn),c=t!==r?t.state:m(this,tr),{state:u}=t;let f={...u},p=!1,h;if(n._optimisticResults){const G=this.hasListeners(),le=!G&&ma(t,n),ue=G&&ga(t,r,n,o);(le||ue)&&(f={...f,...tl(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:b,errorUpdatedAt:g,status:y}=f;h=f.data;let x=!1;if(n.placeholderData!==void 0&&h===void 0&&y==="pending"){let G;s!=null&&s.isPlaceholderData&&n.placeholderData===(i==null?void 0:i.placeholderData)?(G=s.data,x=!0):G=typeof n.placeholderData=="function"?n.placeholderData((U=m(this,kn))==null?void 0:U.state.data,m(this,kn)):n.placeholderData,G!==void 0&&(y="success",h=Ho(s==null?void 0:s.data,G,n),p=!0)}if(n.select&&h!==void 0&&!x)if(s&&h===(a==null?void 0:a.data)&&n.select===m(this,nr))h=m(this,Cn);else try{M(this,nr,n.select),h=n.select(h),h=Ho(s==null?void 0:s.data,h,n),M(this,Cn,h),M(this,Et,null)}catch(G){M(this,Et,G)}m(this,Et)&&(b=m(this,Et),h=m(this,Cn),g=Date.now(),y="error");const S=f.fetchStatus==="fetching",w=y==="pending",C=y==="error",v=w&&S,L=h!==void 0,R={status:y,fetchStatus:f.fetchStatus,isPending:w,isSuccess:y==="success",isError:C,isInitialLoading:v,isLoading:v,data:h,dataUpdatedAt:f.dataUpdatedAt,error:b,errorUpdatedAt:g,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>c.dataUpdateCount||f.errorUpdateCount>c.errorUpdateCount,isFetching:S,isRefetching:S&&!w,isLoadingError:C&&!L,isPaused:f.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:C&&L,isStale:Ns(t,n),refetch:this.refetch,promise:m(this,xt)};if(this.options.experimental_prefetchInRender){const G=oe=>{R.status==="error"?oe.reject(R.error):R.data!==void 0&&oe.resolve(R.data)},le=()=>{const oe=M(this,xt,R.promise=Wo());G(oe)},ue=m(this,xt);switch(ue.status){case"pending":t.queryHash===r.queryHash&&G(ue);break;case"fulfilled":(R.status==="error"||R.data!==ue.value)&&le();break;case"rejected":(R.status!=="error"||R.error!==ue.reason)&&le();break}}return R}updateResult(){const t=m(this,Ce),n=this.createResult(m(this,re),this.options);if(M(this,Vt,m(this,re).state),M(this,Sn,this.options),m(this,Vt).data!==void 0&&M(this,kn,m(this,re)),kr(n,t))return;M(this,Ce,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,s=typeof o=="function"?o():o;if(s==="all"||!s&&!m(this,Tn).size)return!0;const a=new Set(s??m(this,Tn));return this.options.throwOnError&&a.add("error"),Object.keys(m(this,Ce)).some(i=>{const l=i;return m(this,Ce)[l]!==t[l]&&a.has(l)})};J(this,ie,rl).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&J(this,ie,Vo).call(this)}},Oe=new WeakMap,re=new WeakMap,tr=new WeakMap,Ce=new WeakMap,Vt=new WeakMap,Sn=new WeakMap,xt=new WeakMap,Et=new WeakMap,nr=new WeakMap,Cn=new WeakMap,kn=new WeakMap,Gt=new WeakMap,Kt=new WeakMap,St=new WeakMap,Tn=new WeakMap,ie=new WeakSet,Nn=function(t){J(this,ie,Yo).call(this);let n=m(this,re).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(ke)),n},Uo=function(){J(this,ie,Go).call(this);const t=cn(this.options.staleTime,m(this,re));if(Qt||m(this,Ce).isStale||!Do(t))return;const r=Ki(m(this,Ce).dataUpdatedAt,t)+1;M(this,Gt,setTimeout(()=>{m(this,Ce).isStale||this.updateResult()},r))},Bo=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(m(this,re)):this.options.refetchInterval)??!1},qo=function(t){J(this,ie,Ko).call(this),M(this,St,t),!(Qt||De(this.options.enabled,m(this,re))===!1||!Do(m(this,St))||m(this,St)===0)&&M(this,Kt,setInterval(()=>{(this.options.refetchIntervalInBackground||Ls.isFocused())&&J(this,ie,Nn).call(this)},m(this,St)))},Vo=function(){J(this,ie,Uo).call(this),J(this,ie,qo).call(this,J(this,ie,Bo).call(this))},Go=function(){m(this,Gt)&&(clearTimeout(m(this,Gt)),M(this,Gt,void 0))},Ko=function(){m(this,Kt)&&(clearInterval(m(this,Kt)),M(this,Kt,void 0))},Yo=function(){const t=m(this,Oe).getQueryCache().build(m(this,Oe),this.options);if(t===m(this,re))return;const n=m(this,re);M(this,re,t),M(this,tr,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},rl=function(t){ye.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(m(this,Ce))}),m(this,Oe).getQueryCache().notify({query:m(this,re),type:"observerResultsUpdated"})})},Bi);function ju(e,t){return De(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function ma(e,t){return ju(e,t)||e.state.data!==void 0&&Qo(e,t,t.refetchOnMount)}function Qo(e,t,n){if(De(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Ns(e,t)}return!1}function ga(e,t,n,r){return(e!==t||De(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Ns(e,n)}function Ns(e,t){return De(t.enabled,e)!==!1&&e.isStaleByTime(cn(t.staleTime,e))}function zu(e,t){return!kr(e.getCurrentResult(),t)}var Ct,kt,Pe,Je,rt,xr,Xo,qi,Hu=(qi=class extends An{constructor(n,r){super();H(this,rt);H(this,Ct);H(this,kt);H(this,Pe);H(this,Je);M(this,Ct,n),this.setOptions(r),this.bindMethods(),J(this,rt,xr).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=m(this,Ct).defaultMutationOptions(n),kr(this.options,r)||m(this,Ct).getMutationCache().notify({type:"observerOptionsUpdated",mutation:m(this,Pe),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Xt(r.mutationKey)!==Xt(this.options.mutationKey)?this.reset():((o=m(this,Pe))==null?void 0:o.state.status)==="pending"&&m(this,Pe).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=m(this,Pe))==null||n.removeObserver(this)}onMutationUpdate(n){J(this,rt,xr).call(this),J(this,rt,Xo).call(this,n)}getCurrentResult(){return m(this,kt)}reset(){var n;(n=m(this,Pe))==null||n.removeObserver(this),M(this,Pe,void 0),J(this,rt,xr).call(this),J(this,rt,Xo).call(this)}mutate(n,r){var o;return M(this,Je,r),(o=m(this,Pe))==null||o.removeObserver(this),M(this,Pe,m(this,Ct).getMutationCache().build(m(this,Ct),this.options)),m(this,Pe).addObserver(this),m(this,Pe).execute(n)}},Ct=new WeakMap,kt=new WeakMap,Pe=new WeakMap,Je=new WeakMap,rt=new WeakSet,xr=function(){var r;const n=((r=m(this,Pe))==null?void 0:r.state)??nl();M(this,kt,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Xo=function(n){ye.batch(()=>{var r,o,s,a,i,l,c,u;if(m(this,Je)&&this.hasListeners()){const f=m(this,kt).variables,p=m(this,kt).context;(n==null?void 0:n.type)==="success"?((o=(r=m(this,Je)).onSuccess)==null||o.call(r,n.data,f,p),(a=(s=m(this,Je)).onSettled)==null||a.call(s,n.data,null,f,p)):(n==null?void 0:n.type)==="error"&&((l=(i=m(this,Je)).onError)==null||l.call(i,n.error,f,p),(u=(c=m(this,Je)).onSettled)==null||u.call(c,void 0,n.error,f,p))}this.listeners.forEach(f=>{f(m(this,kt))})})},qi),ol=F.createContext(void 0),_s=e=>{const t=F.useContext(ol);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Wu=({client:e,children:t})=>(F.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),T.jsx(ol.Provider,{value:e,children:t})),sl=F.createContext(!1),Uu=()=>F.useContext(sl);sl.Provider;function Bu(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var qu=F.createContext(Bu()),Vu=()=>F.useContext(qu),Gu=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Ku=e=>{F.useEffect(()=>{e.clearReset()},[e])},Yu=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||Qi(n,[e.error,r])),Qu=e=>{const t=e.staleTime;e.suspense&&(e.staleTime=typeof t=="function"?(...n)=>Math.max(t(...n),1e3):Math.max(t??1e3,1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},Xu=(e,t)=>e.isLoading&&e.isFetching&&!t,Ju=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,ba=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Zu(e,t,n){var f,p,h,b,g;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=_s(),o=Uu(),s=Vu(),a=r.defaultQueryOptions(e);(p=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||p.call(f,a),process.env.NODE_ENV!=="production"&&(a.queryFn||console.error(`[${a.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),a._optimisticResults=o?"isRestoring":"optimistic",Qu(a),Gu(a,s),Ku(s);const i=!r.getQueryCache().get(a.queryHash),[l]=F.useState(()=>new t(r,a)),c=l.getOptimisticResult(a),u=!o&&e.subscribed!==!1;if(F.useSyncExternalStore(F.useCallback(y=>{const x=u?l.subscribe(ye.batchCalls(y)):ke;return l.updateResult(),x},[l,u]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),F.useEffect(()=>{l.setOptions(a)},[a,l]),Ju(a,c))throw ba(a,l,s);if(Yu({result:c,errorResetBoundary:s,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw c.error;if((b=(h=r.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||b.call(h,a,c),a.experimental_prefetchInRender&&!Qt&&Xu(c,o)){const y=i?ba(a,l,s):(g=r.getQueryCache().get(a.queryHash))==null?void 0:g.promise;y==null||y.catch(ke).finally(()=>{l.updateResult()})}return a.notifyOnChangeProps?c:l.trackResult(c)}function ef(e,t){return Zu(e,Du)}function al(e,t){const n=_s(),[r]=F.useState(()=>new Hu(n,e));F.useEffect(()=>{r.setOptions(e)},[r,e]);const o=F.useSyncExternalStore(F.useCallback(a=>r.subscribe(ye.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=F.useCallback((a,i)=>{r.mutate(a,i).catch(ke)},[r]);if(o.error&&Qi(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}const tf="3QM9PlH0BuyKaVErlBWxVJU5v0vFlMJv",he={OPEN:"Open",IN_PROGRESS:"In progress",IN_REVIEW:"In review",COMPLETED:"Completed"},nf=async e=>{const t={taskInstanceId:e},n=new Headers;return n.append("Content-Type","application/json"),await(await fetch("/public-api/playbook-task-complete",{method:"POST",headers:n,body:JSON.stringify(t)})).json()},rf=()=>{const e=al({mutationFn:async n=>nf(n)});return{completeTask:async n=>e.mutateAsync(n,{onSuccess:()=>{console.log("Task completed successfully")},onError:r=>{console.error("Error completing task:",r)}}),...e}},of=async e=>{const t={taskInstanceId:e},n=new Headers;n.append("Content-Type","application/json");const o=await(await fetch("/public-api/playbook-task-start",{method:"POST",headers:n,body:JSON.stringify(t)})).json();return console.log({data:o}),o},sf=()=>{const e=al({mutationFn:async n=>{const r=await of(n);return console.log(r),r}});return{startTask:n=>e.mutateAsync(n,{onSuccess:()=>{console.log("Task started successfully")},onError:r=>{console.error("Error starting task:",r)}}),...e}},af=(e,t)=>{const n=_s(),{completeTask:r}=rf(),{startTask:o}=sf();return{completeTask:async(i,l)=>{const{status:c}=await r(i.toString());c&&n.setQueryData(["playbook",+e],u=>{if(!u)return u;const f=u.tasks.map(p=>p.sequenceOrder===l+1&&t.quickComplete?{...p,workflowStatus:he.IN_PROGRESS}:p.taskInstanceId===i?{...p,workflowStatus:c}:p);return{...u,tasks:f}})},startTask:async i=>{const{status:l}=await o(i.toString());l&&n.setQueryData(["playbook",+e],c=>{if(!c)return c;const u=c.tasks.map(f=>f.taskInstanceId===i?{...f,workflowStatus:l}:f);return{...c,tasks:u}})}}},lf=e=>{var r;const t=ef({queryFn:async()=>{const o=new Headers;o.append("Content-Type","application/json"),o.append("apiKey",tf);const s=await fetch("/public-api/playbook-details",{method:"POST",cache:"no-store",headers:o,body:JSON.stringify({playbookInstanceId:+e,start:0,limit:50})});if(!s.ok)throw new Error("Network response was not ok");const a=await s.json();if(a.error)throw new Error(a.error);return a},queryKey:["playbook",+e]}),n=af(e,{quickComplete:(r=t.data)==null?void 0:r.quickComplete});return{playbook:t.data,isLoading:t.isLoading,error:t.error,actions:n}},Hn={START:"START",PAUSE:"PAUSE",COMPLETE:"COMPLETE"},cf={START:"Start",PAUSE:"Pause",RESUME:"Resume",COMPLETE:"Complete"},uf=e=>{const{taskStatus:t}=e;return{buttons:d.useMemo(()=>t===he.OPEN&&e.canStart?[Hn.START]:t===he.IN_PROGRESS?[Hn.PAUSE,Hn.COMPLETE]:t===he.COMPLETED?[]:[],[t])}},il=async e=>{const t=new Headers;t.append("Content-Type","application/json");const r=await(await fetch("/public-api/playbook-initiate",{method:"POST",headers:t,body:JSON.stringify(e)})).json();return console.log({data:r}),r},Ds="-",ff=e=>{const t=hf(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const i=a.split(Ds);return i[0]===""&&i.length!==1&&i.shift(),ll(i,t)||df(a)},getConflictingClassGroupIds:(a,i)=>{const l=n[a]||[];return i&&r[a]?[...l,...r[a]]:l}}},ll=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?ll(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Ds);return(a=t.validators.find(({validator:i})=>i(s)))==null?void 0:a.classGroupId},ya=/^\[(.+)\]$/,df=e=>{if(ya.test(e)){const t=ya.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},hf=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)Jo(n[o],r,o,t);return r},Jo=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:va(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(pf(o)){Jo(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,a])=>{Jo(a,va(t,s),n,r)})})},va=(e,t)=>{let n=e;return t.split(Ds).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},pf=e=>e.isThemeGetter,mf=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,a)=>{n.set(s,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let a=n.get(s);if(a!==void 0)return a;if((a=r.get(s))!==void 0)return o(s,a),a},set(s,a){n.has(s)?n.set(s,a):o(s,a)}}},Zo="!",es=":",gf=es.length,bf=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let a=0,i=0,l=0,c;for(let b=0;b<o.length;b++){let g=o[b];if(a===0&&i===0){if(g===es){s.push(o.slice(l,b)),l=b+gf;continue}if(g==="/"){c=b;continue}}g==="["?a++:g==="]"?a--:g==="("?i++:g===")"&&i--}const u=s.length===0?o:o.substring(l),f=yf(u),p=f!==u,h=c&&c>l?c-l:void 0;return{modifiers:s,hasImportantModifier:p,baseClassName:f,maybePostfixModifierPosition:h}};if(t){const o=t+es,s=r;r=a=>a.startsWith(o)?s(a.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:a,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},yf=e=>e.endsWith(Zo)?e.substring(0,e.length-1):e.startsWith(Zo)?e.substring(1):e,vf=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let s=[];return r.forEach(a=>{a[0]==="["||t[a]?(o.push(...s.sort(),a),s=[]):s.push(a)}),o.push(...s.sort()),o}},wf=e=>({cache:mf(e.cacheSize),parseClassName:bf(e),sortModifiers:vf(e),...ff(e)}),xf=/\s+/,Ef=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,a=[],i=e.trim().split(xf);let l="";for(let c=i.length-1;c>=0;c-=1){const u=i[c],{isExternal:f,modifiers:p,hasImportantModifier:h,baseClassName:b,maybePostfixModifierPosition:g}=n(u);if(f){l=u+(l.length>0?" "+l:l);continue}let y=!!g,x=r(y?b.substring(0,g):b);if(!x){if(!y){l=u+(l.length>0?" "+l:l);continue}if(x=r(b),!x){l=u+(l.length>0?" "+l:l);continue}y=!1}const S=s(p).join(":"),w=h?S+Zo:S,C=w+x;if(a.includes(C))continue;a.push(C);const v=o(x,y);for(let L=0;L<v.length;++L){const q=v[L];a.push(w+q)}l=u+(l.length>0?" "+l:l)}return l};function Sf(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=cl(t))&&(r&&(r+=" "),r+=n);return r}const cl=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=cl(e[r]))&&(n&&(n+=" "),n+=t);return n};function Cf(e,...t){let n,r,o,s=a;function a(l){const c=t.reduce((u,f)=>f(u),e());return n=wf(c),r=n.cache.get,o=n.cache.set,s=i,i(l)}function i(l){const c=r(l);if(c)return c;const u=Ef(l,n);return o(l,u),u}return function(){return s(Sf.apply(null,arguments))}}const be=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},ul=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,fl=/^\((?:(\w[\w-]*):)?(.+)\)$/i,kf=/^\d+\/\d+$/,Tf=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Of=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Pf=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Af=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Rf=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,on=e=>kf.test(e),ee=e=>!!e&&!Number.isNaN(Number(e)),dt=e=>!!e&&Number.isInteger(Number(e)),uo=e=>e.endsWith("%")&&ee(e.slice(0,-1)),Ye=e=>Tf.test(e),$f=()=>!0,Ff=e=>Of.test(e)&&!Pf.test(e),dl=()=>!1,If=e=>Af.test(e),Mf=e=>Rf.test(e),Lf=e=>!N(e)&&!_(e),Nf=e=>Rn(e,ml,dl),N=e=>ul.test(e),Lt=e=>Rn(e,gl,Ff),fo=e=>Rn(e,Hf,ee),wa=e=>Rn(e,hl,dl),_f=e=>Rn(e,pl,Mf),dr=e=>Rn(e,bl,If),_=e=>fl.test(e),Mn=e=>$n(e,gl),Df=e=>$n(e,Wf),xa=e=>$n(e,hl),jf=e=>$n(e,ml),zf=e=>$n(e,pl),hr=e=>$n(e,bl,!0),Rn=(e,t,n)=>{const r=ul.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},$n=(e,t,n=!1)=>{const r=fl.exec(e);return r?r[1]?t(r[1]):n:!1},hl=e=>e==="position"||e==="percentage",pl=e=>e==="image"||e==="url",ml=e=>e==="length"||e==="size"||e==="bg-size",gl=e=>e==="length",Hf=e=>e==="number",Wf=e=>e==="family-name",bl=e=>e==="shadow",Uf=()=>{const e=be("color"),t=be("font"),n=be("text"),r=be("font-weight"),o=be("tracking"),s=be("leading"),a=be("breakpoint"),i=be("container"),l=be("spacing"),c=be("radius"),u=be("shadow"),f=be("inset-shadow"),p=be("text-shadow"),h=be("drop-shadow"),b=be("blur"),g=be("perspective"),y=be("aspect"),x=be("ease"),S=be("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],v=()=>[...C(),_,N],L=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto","contain","none"],R=()=>[_,N,l],U=()=>[on,"full","auto",...R()],G=()=>[dt,"none","subgrid",_,N],le=()=>["auto",{span:["full",dt,_,N]},dt,_,N],ue=()=>[dt,"auto",_,N],oe=()=>["auto","min","max","fr",_,N],fe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],B=()=>["start","end","center","stretch","center-safe","end-safe"],K=()=>["auto",...R()],ne=()=>[on,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],O=()=>[e,_,N],V=()=>[...C(),xa,wa,{position:[_,N]}],E=()=>["no-repeat",{repeat:["","x","y","space","round"]}],P=()=>["auto","cover","contain",jf,Nf,{size:[_,N]}],W=()=>[uo,Mn,Lt],A=()=>["","none","full",c,_,N],D=()=>["",ee,Mn,Lt],Y=()=>["solid","dashed","dotted","double"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>[ee,uo,xa,wa],Q=()=>["","none",b,_,N],X=()=>["none",ee,_,N],Z=()=>["none",ee,_,N],ge=()=>[ee,_,N],$=()=>[on,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ye],breakpoint:[Ye],color:[$f],container:[Ye],"drop-shadow":[Ye],ease:["in","out","in-out"],font:[Lf],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ye],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ye],shadow:[Ye],spacing:["px",ee],text:[Ye],"text-shadow":[Ye],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",on,N,_,y]}],container:["container"],columns:[{columns:[ee,N,_,i]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:v()}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:q()}],"overscroll-x":[{"overscroll-x":q()}],"overscroll-y":[{"overscroll-y":q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:U()}],"inset-x":[{"inset-x":U()}],"inset-y":[{"inset-y":U()}],start:[{start:U()}],end:[{end:U()}],top:[{top:U()}],right:[{right:U()}],bottom:[{bottom:U()}],left:[{left:U()}],visibility:["visible","invisible","collapse"],z:[{z:[dt,"auto",_,N]}],basis:[{basis:[on,"full","auto",i,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ee,on,"auto","initial","none",N]}],grow:[{grow:["",ee,_,N]}],shrink:[{shrink:["",ee,_,N]}],order:[{order:[dt,"first","last","none",_,N]}],"grid-cols":[{"grid-cols":G()}],"col-start-end":[{col:le()}],"col-start":[{"col-start":ue()}],"col-end":[{"col-end":ue()}],"grid-rows":[{"grid-rows":G()}],"row-start-end":[{row:le()}],"row-start":[{"row-start":ue()}],"row-end":[{"row-end":ue()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":oe()}],"auto-rows":[{"auto-rows":oe()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...fe(),"normal"]}],"justify-items":[{"justify-items":[...B(),"normal"]}],"justify-self":[{"justify-self":["auto",...B()]}],"align-content":[{content:["normal",...fe()]}],"align-items":[{items:[...B(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...B(),{baseline:["","last"]}]}],"place-content":[{"place-content":fe()}],"place-items":[{"place-items":[...B(),"baseline"]}],"place-self":[{"place-self":["auto",...B()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],m:[{m:K()}],mx:[{mx:K()}],my:[{my:K()}],ms:[{ms:K()}],me:[{me:K()}],mt:[{mt:K()}],mr:[{mr:K()}],mb:[{mb:K()}],ml:[{ml:K()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:ne()}],w:[{w:[i,"screen",...ne()]}],"min-w":[{"min-w":[i,"screen","none",...ne()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[a]},...ne()]}],h:[{h:["screen",...ne()]}],"min-h":[{"min-h":["screen","none",...ne()]}],"max-h":[{"max-h":["screen",...ne()]}],"font-size":[{text:["base",n,Mn,Lt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,_,fo]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",uo,N]}],"font-family":[{font:[Df,N,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,_,N]}],"line-clamp":[{"line-clamp":[ee,"none",_,fo]}],leading:[{leading:[s,...R()]}],"list-image":[{"list-image":["none",_,N]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",_,N]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Y(),"wavy"]}],"text-decoration-thickness":[{decoration:[ee,"from-font","auto",_,Lt]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[ee,"auto",_,N]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",_,N]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",_,N]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:V()}],"bg-repeat":[{bg:E()}],"bg-size":[{bg:P()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},dt,_,N],radial:["",_,N],conic:[dt,_,N]},zf,_f]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:W()}],"gradient-via-pos":[{via:W()}],"gradient-to-pos":[{to:W()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:A()}],"rounded-s":[{"rounded-s":A()}],"rounded-e":[{"rounded-e":A()}],"rounded-t":[{"rounded-t":A()}],"rounded-r":[{"rounded-r":A()}],"rounded-b":[{"rounded-b":A()}],"rounded-l":[{"rounded-l":A()}],"rounded-ss":[{"rounded-ss":A()}],"rounded-se":[{"rounded-se":A()}],"rounded-ee":[{"rounded-ee":A()}],"rounded-es":[{"rounded-es":A()}],"rounded-tl":[{"rounded-tl":A()}],"rounded-tr":[{"rounded-tr":A()}],"rounded-br":[{"rounded-br":A()}],"rounded-bl":[{"rounded-bl":A()}],"border-w":[{border:D()}],"border-w-x":[{"border-x":D()}],"border-w-y":[{"border-y":D()}],"border-w-s":[{"border-s":D()}],"border-w-e":[{"border-e":D()}],"border-w-t":[{"border-t":D()}],"border-w-r":[{"border-r":D()}],"border-w-b":[{"border-b":D()}],"border-w-l":[{"border-l":D()}],"divide-x":[{"divide-x":D()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":D()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Y(),"hidden","none"]}],"divide-style":[{divide:[...Y(),"hidden","none"]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:[...Y(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ee,_,N]}],"outline-w":[{outline:["",ee,Mn,Lt]}],"outline-color":[{outline:O()}],shadow:[{shadow:["","none",u,hr,dr]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",f,hr,dr]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[ee,Lt]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":D()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":["none",p,hr,dr]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[ee,_,N]}],"mix-blend":[{"mix-blend":[...z(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":z()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ee]}],"mask-image-linear-from-pos":[{"mask-linear-from":I()}],"mask-image-linear-to-pos":[{"mask-linear-to":I()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":I()}],"mask-image-t-to-pos":[{"mask-t-to":I()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":I()}],"mask-image-r-to-pos":[{"mask-r-to":I()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":I()}],"mask-image-b-to-pos":[{"mask-b-to":I()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":I()}],"mask-image-l-to-pos":[{"mask-l-to":I()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":I()}],"mask-image-x-to-pos":[{"mask-x-to":I()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":I()}],"mask-image-y-to-pos":[{"mask-y-to":I()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[_,N]}],"mask-image-radial-from-pos":[{"mask-radial-from":I()}],"mask-image-radial-to-pos":[{"mask-radial-to":I()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[ee]}],"mask-image-conic-from-pos":[{"mask-conic-from":I()}],"mask-image-conic-to-pos":[{"mask-conic-to":I()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:V()}],"mask-repeat":[{mask:E()}],"mask-size":[{mask:P()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",_,N]}],filter:[{filter:["","none",_,N]}],blur:[{blur:Q()}],brightness:[{brightness:[ee,_,N]}],contrast:[{contrast:[ee,_,N]}],"drop-shadow":[{"drop-shadow":["","none",h,hr,dr]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:["",ee,_,N]}],"hue-rotate":[{"hue-rotate":[ee,_,N]}],invert:[{invert:["",ee,_,N]}],saturate:[{saturate:[ee,_,N]}],sepia:[{sepia:["",ee,_,N]}],"backdrop-filter":[{"backdrop-filter":["","none",_,N]}],"backdrop-blur":[{"backdrop-blur":Q()}],"backdrop-brightness":[{"backdrop-brightness":[ee,_,N]}],"backdrop-contrast":[{"backdrop-contrast":[ee,_,N]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ee,_,N]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ee,_,N]}],"backdrop-invert":[{"backdrop-invert":["",ee,_,N]}],"backdrop-opacity":[{"backdrop-opacity":[ee,_,N]}],"backdrop-saturate":[{"backdrop-saturate":[ee,_,N]}],"backdrop-sepia":[{"backdrop-sepia":["",ee,_,N]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",_,N]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ee,"initial",_,N]}],ease:[{ease:["linear","initial",x,_,N]}],delay:[{delay:[ee,_,N]}],animate:[{animate:["none",S,_,N]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,_,N]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:X()}],"rotate-x":[{"rotate-x":X()}],"rotate-y":[{"rotate-y":X()}],"rotate-z":[{"rotate-z":X()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:ge()}],"skew-x":[{"skew-x":ge()}],"skew-y":[{"skew-y":ge()}],transform:[{transform:[_,N,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:$()}],"translate-x":[{"translate-x":$()}],"translate-y":[{"translate-y":$()}],"translate-z":[{"translate-z":$()}],"translate-none":["translate-none"],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",_,N]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",_,N]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[ee,Mn,Lt,fo]}],stroke:[{stroke:["none",...O()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},un=Cf(Uf);function yl(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=yl(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Pr(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=yl(e))&&(r&&(r+=" "),r+=t);return r}function On(...e){return un(Pr(e))}const vl=typeof document<"u"?d.useLayoutEffect:()=>{};function Bf(e){const t=d.useRef(null);return vl(()=>{t.current=e},[e]),d.useCallback((...n)=>{const r=t.current;return r==null?void 0:r(...n)},[])}const It=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},Dt=e=>e&&"window"in e&&e.window===e?e:It(e).defaultView||window;function qf(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function Vf(e){return qf(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}let Gf=!1;function js(){return Gf}function wl(e,t){if(!js())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n.tagName==="SLOT"&&n.assignedSlot?n=n.assignedSlot.parentNode:Vf(n)?n=n.host:n=n.parentNode}return!1}const ts=(e=document)=>{var t;if(!js())return e.activeElement;let n=e.activeElement;for(;n&&"shadowRoot"in n&&(!((t=n.shadowRoot)===null||t===void 0)&&t.activeElement);)n=n.shadowRoot.activeElement;return n};function xl(e){return js()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function zr(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function zs(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function lt(e){if(process.env.NODE_ENV==="test")return e;let t=null;return()=>(t==null&&(t=e()),t)}const Hs=lt(function(){return zs(/^Mac/i)}),Kf=lt(function(){return zs(/^iPhone/i)}),Yf=lt(function(){return zs(/^iPad/i)||Hs()&&navigator.maxTouchPoints>1}),Qf=lt(function(){return Kf()||Yf()});lt(function(){return Hs()||Qf()});lt(function(){return zr(/AppleWebKit/i)&&!Xf()});const Xf=lt(function(){return zr(/Chrome/i)}),Jf=lt(function(){return zr(/Android/i)});lt(function(){return zr(/Firefox/i)});function El(){let e=d.useRef(new Map),t=d.useCallback((o,s,a,i)=>{let l=i!=null&&i.once?(...c)=>{e.current.delete(a),a(...c)}:a;e.current.set(a,{type:s,eventTarget:o,fn:l,options:i}),o.addEventListener(s,l,i)},[]),n=d.useCallback((o,s,a,i)=>{var l;let c=((l=e.current.get(a))===null||l===void 0?void 0:l.fn)||a;o.removeEventListener(s,c,i),e.current.delete(a)},[]),r=d.useCallback(()=>{e.current.forEach((o,s)=>{n(o.eventTarget,o.type,s,o.options)})},[n]);return d.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function Zf(e){return e.mozInputSource===0&&e.isTrusted?!0:Jf()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Sl(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function ed(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function Cl(e){let t=d.useRef({isFocused:!1,observer:null});vl(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=Bf(r=>{e==null||e(r)});return d.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let o=r.target,s=a=>{if(t.current.isFocused=!1,o.disabled){let i=Sl(a);n(i)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};o.addEventListener("focusout",s,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&o.disabled){var a;(a=t.current.observer)===null||a===void 0||a.disconnect();let i=o===document.activeElement?null:document.activeElement;o.dispatchEvent(new FocusEvent("blur",{relatedTarget:i})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:i}))}}),t.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[n])}let td=!1,rr=null,ns=new Set,Wn=new Map,Jt=!1,rs=!1;const nd={Tab:!0,Escape:!0};function Ws(e,t){for(let n of ns)n(e,t)}function rd(e){return!(e.metaKey||!Hs()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Ar(e){Jt=!0,rd(e)&&(rr="keyboard",Ws("keyboard",e))}function Me(e){rr="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Jt=!0,Ws("pointer",e))}function kl(e){Zf(e)&&(Jt=!0,rr="virtual")}function Tl(e){e.target===window||e.target===document||td||!e.isTrusted||(!Jt&&!rs&&(rr="virtual",Ws("virtual",e)),Jt=!1,rs=!1)}function Ol(){Jt=!1,rs=!0}function os(e){if(typeof window>"u"||typeof document>"u"||Wn.get(Dt(e)))return;const t=Dt(e),n=It(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Jt=!0,r.apply(this,arguments)},n.addEventListener("keydown",Ar,!0),n.addEventListener("keyup",Ar,!0),n.addEventListener("click",kl,!0),t.addEventListener("focus",Tl,!0),t.addEventListener("blur",Ol,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Me,!0),n.addEventListener("pointermove",Me,!0),n.addEventListener("pointerup",Me,!0)):process.env.NODE_ENV==="test"&&(n.addEventListener("mousedown",Me,!0),n.addEventListener("mousemove",Me,!0),n.addEventListener("mouseup",Me,!0)),t.addEventListener("beforeunload",()=>{Pl(e)},{once:!0}),Wn.set(t,{focus:r})}const Pl=(e,t)=>{const n=Dt(e),r=It(e);t&&r.removeEventListener("DOMContentLoaded",t),Wn.has(n)&&(n.HTMLElement.prototype.focus=Wn.get(n).focus,r.removeEventListener("keydown",Ar,!0),r.removeEventListener("keyup",Ar,!0),r.removeEventListener("click",kl,!0),n.removeEventListener("focus",Tl,!0),n.removeEventListener("blur",Ol,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",Me,!0),r.removeEventListener("pointermove",Me,!0),r.removeEventListener("pointerup",Me,!0)):process.env.NODE_ENV==="test"&&(r.removeEventListener("mousedown",Me,!0),r.removeEventListener("mousemove",Me,!0),r.removeEventListener("mouseup",Me,!0)),Wn.delete(n))};function od(e){const t=It(e);let n;return t.readyState!=="loading"?os(e):(n=()=>{os(e)},t.addEventListener("DOMContentLoaded",n)),()=>Pl(e,n)}typeof document<"u"&&od();function Al(){return rr!=="pointer"}const sd=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function ad(e,t,n){let r=It(n==null?void 0:n.target);const o=typeof window<"u"?Dt(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,s=typeof window<"u"?Dt(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,a=typeof window<"u"?Dt(n==null?void 0:n.target).HTMLElement:HTMLElement,i=typeof window<"u"?Dt(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return e=e||r.activeElement instanceof o&&!sd.has(r.activeElement.type)||r.activeElement instanceof s||r.activeElement instanceof a&&r.activeElement.isContentEditable,!(e&&t==="keyboard"&&n instanceof i&&!nd[n.key])}function id(e,t,n){os(),d.useEffect(()=>{let r=(o,s)=>{ad(!!(n!=null&&n.isTextInput),o,s)&&e(Al())};return ns.add(r),()=>{ns.delete(r)}},t)}function ld(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:o}=e;const s=d.useCallback(l=>{if(l.target===l.currentTarget)return r&&r(l),o&&o(!1),!0},[r,o]),a=Cl(s),i=d.useCallback(l=>{const c=It(l.target),u=c?ts(c):ts();l.target===l.currentTarget&&u===xl(l.nativeEvent)&&(n&&n(l),o&&o(!0),a(l))},[o,n,a]);return{focusProps:{onFocus:!t&&(n||o||r)?i:void 0,onBlur:!t&&(r||o)?s:void 0}}}function cd(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:o}=e,s=d.useRef({isFocusWithin:!1}),{addGlobalListener:a,removeAllGlobalListeners:i}=El(),l=d.useCallback(f=>{f.currentTarget.contains(f.target)&&s.current.isFocusWithin&&!f.currentTarget.contains(f.relatedTarget)&&(s.current.isFocusWithin=!1,i(),n&&n(f),o&&o(!1))},[n,o,s,i]),c=Cl(l),u=d.useCallback(f=>{if(!f.currentTarget.contains(f.target))return;const p=It(f.target),h=ts(p);if(!s.current.isFocusWithin&&h===xl(f.nativeEvent)){r&&r(f),o&&o(!0),s.current.isFocusWithin=!0,c(f);let b=f.currentTarget;a(p,"focus",g=>{if(s.current.isFocusWithin&&!wl(b,g.target)){let y=new p.defaultView.FocusEvent("blur",{relatedTarget:g.target});ed(y,b);let x=Sl(y);l(x)}},{capture:!0})}},[r,o,c,a,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:l}}}let Rr=!1,ho=0;function ss(){Rr=!0,setTimeout(()=>{Rr=!1},50)}function Ea(e){e.pointerType==="touch"&&ss()}function ud(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",Ea):process.env.NODE_ENV==="test"&&document.addEventListener("touchend",ss),ho++,()=>{ho--,!(ho>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",Ea):process.env.NODE_ENV==="test"&&document.removeEventListener("touchend",ss))}}function fd(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:o}=e,[s,a]=d.useState(!1),i=d.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;d.useEffect(ud,[]);let{addGlobalListener:l,removeAllGlobalListeners:c}=El(),{hoverProps:u,triggerHoverEnd:f}=d.useMemo(()=>{let p=(g,y)=>{if(i.pointerType=y,o||y==="touch"||i.isHovered||!g.currentTarget.contains(g.target))return;i.isHovered=!0;let x=g.currentTarget;i.target=x,l(It(g.target),"pointerover",S=>{i.isHovered&&i.target&&!wl(i.target,S.target)&&h(S,S.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:x,pointerType:y}),n&&n(!0),a(!0)},h=(g,y)=>{let x=i.target;i.pointerType="",i.target=null,!(y==="touch"||!i.isHovered||!x)&&(i.isHovered=!1,c(),r&&r({type:"hoverend",target:x,pointerType:y}),n&&n(!1),a(!1))},b={};return typeof PointerEvent<"u"?(b.onPointerEnter=g=>{Rr&&g.pointerType==="mouse"||p(g,g.pointerType)},b.onPointerLeave=g=>{!o&&g.currentTarget.contains(g.target)&&h(g,g.pointerType)}):process.env.NODE_ENV==="test"&&(b.onTouchStart=()=>{i.ignoreEmulatedMouseEvents=!0},b.onMouseEnter=g=>{!i.ignoreEmulatedMouseEvents&&!Rr&&p(g,"mouse"),i.ignoreEmulatedMouseEvents=!1},b.onMouseLeave=g=>{!o&&g.currentTarget.contains(g.target)&&h(g,"mouse")}),{hoverProps:b,triggerHoverEnd:h}},[t,n,r,o,i,l,c]);return d.useEffect(()=>{o&&f({currentTarget:i.target},i.pointerType)},[o]),{hoverProps:u,isHovered:s}}function dd(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,o=d.useRef({isFocused:!1,isFocusVisible:t||Al()}),[s,a]=d.useState(!1),[i,l]=d.useState(()=>o.current.isFocused&&o.current.isFocusVisible),c=d.useCallback(()=>l(o.current.isFocused&&o.current.isFocusVisible),[]),u=d.useCallback(h=>{o.current.isFocused=h,a(h),c()},[c]);id(h=>{o.current.isFocusVisible=h,c()},[],{isTextInput:n});let{focusProps:f}=ld({isDisabled:r,onFocusChange:u}),{focusWithinProps:p}=cd({isDisabled:!r,onFocusWithinChange:u});return{isFocused:s,isFocusVisible:i,focusProps:r?p:f}}var hd=Object.defineProperty,pd=(e,t,n)=>t in e?hd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,po=(e,t,n)=>(pd(e,typeof t!="symbol"?t+"":t,n),n);let md=class{constructor(){po(this,"current",this.detect()),po(this,"handoffState","pending"),po(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Yt=new md;function Hr(e){var t,n;return Yt.isServer?null:e?"ownerDocument"in e?e.ownerDocument:"current"in e?(n=(t=e.current)==null?void 0:t.ownerDocument)!=null?n:document:null:document}function Wr(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function ct(){let e=[],t={addEventListener(n,r,o,s){return n.addEventListener(r,o,s),t.add(()=>n.removeEventListener(r,o,s))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return Wr(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){let s=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:s})})},group(n){let r=ct();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let n of e.splice(0))n()}};return t}function Us(){let[e]=d.useState(ct);return d.useEffect(()=>()=>e.dispose(),[e]),e}let ve=(e,t)=>{Yt.isServer?d.useEffect(e,t):d.useLayoutEffect(e,t)};function tn(e){let t=d.useRef(e);return ve(()=>{t.current=e},[e]),t}let ce=function(e){let t=tn(e);return d.useCallback((...n)=>t.current(...n),[t])},Rl=d.createContext(void 0);function Ur(){return d.useContext(Rl)}function gd({value:e,children:t}){return d.createElement(Rl.Provider,{value:e},t)}function as(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function ot(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,ot),r}var $r=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))($r||{}),Tt=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Tt||{});function Te(){let e=yd();return d.useCallback(t=>bd({mergeRefs:e,...t}),[e])}function bd({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:s=!0,name:a,mergeRefs:i}){i=i??vd;let l=$l(t,e);if(s)return pr(l,n,r,a,i);let c=o??0;if(c&2){let{static:u=!1,...f}=l;if(u)return pr(f,n,r,a,i)}if(c&1){let{unmount:u=!0,...f}=l;return ot(u?0:1,{0(){return null},1(){return pr({...f,hidden:!0,style:{display:"none"}},n,r,a,i)}})}return pr(l,n,r,a,i)}function pr(e,t={},n,r,o){let{as:s=n,children:a,refName:i="ref",...l}=mo(e,["unmount","static"]),c=e.ref!==void 0?{[i]:e.ref}:{},u=typeof a=="function"?a(t):a;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let f={};if(t){let p=!1,h=[];for(let[b,g]of Object.entries(t))typeof g=="boolean"&&(p=!0),g===!0&&h.push(b.replace(/([A-Z])/g,y=>`-${y.toLowerCase()}`));if(p){f["data-headlessui-state"]=h.join(" ");for(let b of h)f[`data-${b}`]=""}}if(s===d.Fragment&&(Object.keys(Nt(l)).length>0||Object.keys(Nt(f)).length>0))if(!d.isValidElement(u)||Array.isArray(u)&&u.length>1){if(Object.keys(Nt(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Nt(l)).concat(Object.keys(Nt(f))).map(p=>` - ${p}`).join(`
|
|
2
|
+
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(p=>` - ${p}`).join(`
|
|
3
|
+
`)].join(`
|
|
4
|
+
`))}else{let p=u.props,h=p==null?void 0:p.className,b=typeof h=="function"?(...x)=>as(h(...x),l.className):as(h,l.className),g=b?{className:b}:{},y=$l(u.props,Nt(mo(l,["ref"])));for(let x in f)x in y&&delete f[x];return d.cloneElement(u,Object.assign({},y,f,c,{ref:o(xd(u),c.ref)},g))}return d.createElement(s,Object.assign({},mo(l,["ref"]),s!==d.Fragment&&c,s!==d.Fragment&&f),u)}function yd(){let e=d.useRef([]),t=d.useCallback(n=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(n):r.current=n)},[]);return(...n)=>{if(!n.every(r=>r==null))return e.current=n,t}}function vd(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function $l(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[o=>{var s;return(s=o==null?void 0:o.preventDefault)==null?void 0:s.call(o)}]);for(let r in n)Object.assign(t,{[r](o,...s){let a=n[r];for(let i of a){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;i(o,...s)}}});return t}function wd(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];for(let r in n)Object.assign(t,{[r](...o){let s=n[r];for(let a of s)a==null||a(...o)}});return t}function we(e){var t;return Object.assign(d.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Nt(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function mo(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function xd(e){return d.version.split(".")[0]>="19"?e.props.ref:e.ref}let Ed="span";var Yn=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Yn||{});function Sd(e,t){var n;let{features:r=1,...o}=e,s={ref:t,"aria-hidden":(r&2)===2?!0:(n=o["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return Te()({ourProps:s,theirProps:o,slot:{},defaultTag:Ed,name:"Hidden"})}let Fr=we(Sd),Cd=d.createContext(null);function kd(e){let[t,n]=d.useState(null);return d.createElement(Cd.Provider,{value:{target:t}},e.children,d.createElement(Fr,{features:Yn.Hidden,ref:n}))}let Fl=d.createContext(void 0);function Il(){return d.useContext(Fl)}function Td({id:e,children:t}){return d.createElement(Fl.Provider,{value:e},t)}function Ml(e){return typeof e!="object"||e===null?!1:"nodeType"in e}function et(e){return Ml(e)&&"tagName"in e}function At(e){return et(e)&&"accessKey"in e}function Ot(e){return et(e)&&"tabIndex"in e}function Od(e){return et(e)&&"style"in e}function Pd(e){return At(e)&&e.nodeName==="IFRAME"}function Ll(e){return At(e)&&e.nodeName==="INPUT"}function Sa(e){return At(e)&&e.nodeName==="LABEL"}function Ad(e){return et(e)?e.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]'):!1}let Nl=Symbol();function Rd(e,t=!0){return Object.assign(e,{[Nl]:t})}function He(...e){let t=d.useRef(e);d.useEffect(()=>{t.current=e},[e]);let n=ce(r=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||(r==null?void 0:r[Nl]))?void 0:n}let Br=d.createContext(null);Br.displayName="DescriptionContext";function _l(){let e=d.useContext(Br);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,_l),t}return e}function $d(){var e,t;return(t=(e=d.useContext(Br))==null?void 0:e.value)!=null?t:void 0}function Dl(){let[e,t]=d.useState([]);return[e.length>0?e.join(" "):void 0,d.useMemo(()=>function(n){let r=ce(s=>(t(a=>[...a,s]),()=>t(a=>{let i=a.slice(),l=i.indexOf(s);return l!==-1&&i.splice(l,1),i}))),o=d.useMemo(()=>({register:r,slot:n.slot,name:n.name,props:n.props,value:n.value}),[r,n.slot,n.name,n.props,n.value]);return d.createElement(Br.Provider,{value:o},n.children)},[t])]}let Fd="p";function Id(e,t){let n=d.useId(),r=Ur(),{id:o=`headlessui-description-${n}`,...s}=e,a=_l(),i=He(t);ve(()=>a.register(o),[o,a.register]);let l=r||!1,c=d.useMemo(()=>({...a.slot,disabled:l}),[a.slot,l]),u={ref:i,...a.props,id:o};return Te()({ourProps:u,theirProps:s,slot:c,defaultTag:Fd,name:a.name||"Description"})}let Md=we(Id),jl=Object.assign(Md,{});var zl=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(zl||{});let qr=d.createContext(null);qr.displayName="LabelContext";function Hl(){let e=d.useContext(qr);if(e===null){let t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Hl),t}return e}function Wl(e){var t,n,r;let o=(n=(t=d.useContext(qr))==null?void 0:t.value)!=null?n:void 0;return((r=void 0)!=null?r:0)>0?[o,...e].filter(Boolean).join(" "):o}function Ld({inherit:e=!1}={}){let t=Wl(),[n,r]=d.useState([]),o=e?[t,...n].filter(Boolean):n;return[o.length>0?o.join(" "):void 0,d.useMemo(()=>function(s){let a=ce(l=>(r(c=>[...c,l]),()=>r(c=>{let u=c.slice(),f=u.indexOf(l);return f!==-1&&u.splice(f,1),u}))),i=d.useMemo(()=>({register:a,slot:s.slot,name:s.name,props:s.props,value:s.value}),[a,s.slot,s.name,s.props,s.value]);return d.createElement(qr.Provider,{value:i},s.children)},[r])]}let Nd="label";function _d(e,t){var n;let r=d.useId(),o=Hl(),s=Il(),a=Ur(),{id:i=`headlessui-label-${r}`,htmlFor:l=s??((n=o.props)==null?void 0:n.htmlFor),passive:c=!1,...u}=e,f=He(t);ve(()=>o.register(i),[i,o.register]);let p=ce(y=>{let x=y.currentTarget;if(!(y.target!==y.currentTarget&&Ad(y.target))&&(Sa(x)&&y.preventDefault(),o.props&&"onClick"in o.props&&typeof o.props.onClick=="function"&&o.props.onClick(y),Sa(x))){let S=document.getElementById(x.htmlFor);if(S){let w=S.getAttribute("disabled");if(w==="true"||w==="")return;let C=S.getAttribute("aria-disabled");if(C==="true"||C==="")return;(Ll(S)&&(S.type==="file"||S.type==="radio"||S.type==="checkbox")||S.role==="radio"||S.role==="checkbox"||S.role==="switch")&&S.click(),S.focus({preventScroll:!0})}}}),h=a||!1,b=d.useMemo(()=>({...o.slot,disabled:h}),[o.slot,h]),g={ref:f,...o.props,id:i,htmlFor:l,onClick:p};return c&&("onClick"in g&&(delete g.htmlFor,delete g.onClick),"onClick"in u&&delete u.onClick),Te()({ourProps:g,theirProps:u,slot:b,defaultTag:l?Nd:"div",name:o.name||"Label"})}let Dd=we(_d),jd=Object.assign(Dd,{}),zd=d.createContext(()=>{});function Hd({value:e,children:t}){return d.createElement(zd.Provider,{value:e},t)}let Ul=class extends Map{constructor(t){super(),this.factory=t}get(t){let n=super.get(t);return n===void 0&&(n=this.factory(t),this.set(t,n)),n}};var Wd=Object.defineProperty,Ud=(e,t,n)=>t in e?Wd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Bd=(e,t,n)=>(Ud(e,t+"",n),n),Bl=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Fe=(e,t,n)=>(Bl(e,t,"read from private field"),n?n.call(e):t.get(e)),go=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Ca=(e,t,n,r)=>(Bl(e,t,"write to private field"),t.set(e,n),n),We,_n,Dn;let qd=class{constructor(t){go(this,We,{}),go(this,_n,new Ul(()=>new Set)),go(this,Dn,new Set),Bd(this,"disposables",ct()),Ca(this,We,t)}dispose(){this.disposables.dispose()}get state(){return Fe(this,We)}subscribe(t,n){let r={selector:t,callback:n,current:t(Fe(this,We))};return Fe(this,Dn).add(r),this.disposables.add(()=>{Fe(this,Dn).delete(r)})}on(t,n){return Fe(this,_n).get(t).add(n),this.disposables.add(()=>{Fe(this,_n).get(t).delete(n)})}send(t){let n=this.reduce(Fe(this,We),t);if(n!==Fe(this,We)){Ca(this,We,n);for(let r of Fe(this,Dn)){let o=r.selector(Fe(this,We));ql(r.current,o)||(r.current=o,r.callback(o))}for(let r of Fe(this,_n).get(t.type))r(Fe(this,We),t)}}};We=new WeakMap,_n=new WeakMap,Dn=new WeakMap;function ql(e,t){return Object.is(e,t)?!0:typeof e!="object"||e===null||typeof t!="object"||t===null?!1:Array.isArray(e)&&Array.isArray(t)?e.length!==t.length?!1:bo(e[Symbol.iterator](),t[Symbol.iterator]()):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size!==t.size?!1:bo(e.entries(),t.entries()):ka(e)&&ka(t)?bo(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()):!1}function bo(e,t){do{let n=e.next(),r=t.next();if(n.done&&r.done)return!0;if(n.done||r.done||!Object.is(n.value,r.value))return!1}while(!0)}function ka(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}var Vd=Object.defineProperty,Gd=(e,t,n)=>t in e?Vd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ta=(e,t,n)=>(Gd(e,typeof t!="symbol"?t+"":t,n),n),Kd=(e=>(e[e.Push=0]="Push",e[e.Pop=1]="Pop",e))(Kd||{});let Yd={0(e,t){let n=t.id,r=e.stack,o=e.stack.indexOf(n);if(o!==-1){let s=e.stack.slice();return s.splice(o,1),s.push(n),r=s,{...e,stack:r}}return{...e,stack:[...e.stack,n]}},1(e,t){let n=t.id,r=e.stack.indexOf(n);if(r===-1)return e;let o=e.stack.slice();return o.splice(r,1),{...e,stack:o}}},Qd=class Vl extends qd{constructor(){super(...arguments),Ta(this,"actions",{push:t=>this.send({type:0,id:t}),pop:t=>this.send({type:1,id:t})}),Ta(this,"selectors",{isTop:(t,n)=>t.stack[t.stack.length-1]===n,inStack:(t,n)=>t.stack.includes(n)})}static new(){return new Vl({stack:[]})}reduce(t,n){return ot(n.type,Yd,t,n)}};const Gl=new Ul(()=>Qd.new());function Xd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var mr={exports:{}},yo={};/**
|
|
5
|
+
* @license React
|
|
6
|
+
* use-sync-external-store-with-selector.production.js
|
|
7
|
+
*
|
|
8
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
9
|
+
*
|
|
10
|
+
* This source code is licensed under the MIT license found in the
|
|
11
|
+
* LICENSE file in the root directory of this source tree.
|
|
12
|
+
*/var Oa;function Jd(){if(Oa)return yo;Oa=1;var e=d;function t(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,o=e.useRef,s=e.useEffect,a=e.useMemo,i=e.useDebugValue;return yo.useSyncExternalStoreWithSelector=function(l,c,u,f,p){var h=o(null);if(h.current===null){var b={hasValue:!1,value:null};h.current=b}else b=h.current;h=a(function(){function y(v){if(!x){if(x=!0,S=v,v=f(v),p!==void 0&&b.hasValue){var L=b.value;if(p(L,v))return w=L}return w=v}if(L=w,n(S,v))return L;var q=f(v);return p!==void 0&&p(L,q)?(S=v,L):(S=v,w=q)}var x=!1,S,w,C=u===void 0?null:u;return[function(){return y(c())},C===null?void 0:function(){return y(C())}]},[c,u,f,p]);var g=r(l,h[0],h[1]);return s(function(){b.hasValue=!0,b.value=g},[g]),i(g),g},yo}var vo={};/**
|
|
13
|
+
* @license React
|
|
14
|
+
* use-sync-external-store-with-selector.development.js
|
|
15
|
+
*
|
|
16
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
17
|
+
*
|
|
18
|
+
* This source code is licensed under the MIT license found in the
|
|
19
|
+
* LICENSE file in the root directory of this source tree.
|
|
20
|
+
*/var Pa;function Zd(){return Pa||(Pa=1,process.env.NODE_ENV!=="production"&&function(){function e(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=d,n=typeof Object.is=="function"?Object.is:e,r=t.useSyncExternalStore,o=t.useRef,s=t.useEffect,a=t.useMemo,i=t.useDebugValue;vo.useSyncExternalStoreWithSelector=function(l,c,u,f,p){var h=o(null);if(h.current===null){var b={hasValue:!1,value:null};h.current=b}else b=h.current;h=a(function(){function y(v){if(!x){if(x=!0,S=v,v=f(v),p!==void 0&&b.hasValue){var L=b.value;if(p(L,v))return w=L}return w=v}if(L=w,n(S,v))return L;var q=f(v);return p!==void 0&&p(L,q)?(S=v,L):(S=v,w=q)}var x=!1,S,w,C=u===void 0?null:u;return[function(){return y(c())},C===null?void 0:function(){return y(C())}]},[c,u,f,p]);var g=r(l,h[0],h[1]);return s(function(){b.hasValue=!0,b.value=g},[g]),i(g),g},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),vo}var Aa;function eh(){return Aa||(Aa=1,process.env.NODE_ENV==="production"?mr.exports=Jd():mr.exports=Zd()),mr.exports}var th=eh();function Kl(e,t,n=ql){return th.useSyncExternalStoreWithSelector(ce(r=>e.subscribe(nh,r)),ce(()=>e.state),ce(()=>e.state),ce(t),n)}function nh(e){return e}function or(e,t){let n=d.useId(),r=Gl.get(t),[o,s]=Kl(r,d.useCallback(a=>[r.selectors.isTop(a,n),r.selectors.inStack(a,n)],[r,n]));return ve(()=>{if(e)return r.actions.push(n),()=>r.actions.pop(n)},[r,e,n]),e?s?o:!0:!1}let is=new Map,Un=new Map;function Ra(e){var t;let n=(t=Un.get(e))!=null?t:0;return Un.set(e,n+1),n!==0?()=>$a(e):(is.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>$a(e))}function $a(e){var t;let n=(t=Un.get(e))!=null?t:1;if(n===1?Un.delete(e):Un.set(e,n-1),n!==1)return;let r=is.get(e);r&&(r["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,is.delete(e))}function rh(e,{allowed:t,disallowed:n}={}){let r=or(e,"inert-others");ve(()=>{var o,s;if(!r)return;let a=ct();for(let l of(o=n==null?void 0:n())!=null?o:[])l&&a.add(Ra(l));let i=(s=t==null?void 0:t())!=null?s:[];for(let l of i){if(!l)continue;let c=Hr(l);if(!c)continue;let u=l.parentElement;for(;u&&u!==c.body;){for(let f of u.children)i.some(p=>f.contains(p))||a.add(Ra(f));u=u.parentElement}}return a.dispose},[r,t,n])}function oh(e,t,n){let r=tn(o=>{let s=o.getBoundingClientRect();s.x===0&&s.y===0&&s.width===0&&s.height===0&&n()});d.useEffect(()=>{if(!e)return;let o=t===null?null:At(t)?t:t.current;if(!o)return;let s=ct();if(typeof ResizeObserver<"u"){let a=new ResizeObserver(()=>r.current(o));a.observe(o),s.add(()=>a.disconnect())}if(typeof IntersectionObserver<"u"){let a=new IntersectionObserver(()=>r.current(o));a.observe(o),s.add(()=>a.disconnect())}return()=>s.dispose()},[t,r,e])}let Ir=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),sh=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Ze=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(Ze||{}),ls=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(ls||{}),ah=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(ah||{});function ih(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Ir)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}function lh(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(sh)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var Yl=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Yl||{});function ch(e,t=0){var n;return e===((n=Hr(e))==null?void 0:n.body)?!1:ot(t,{0(){return e.matches(Ir)},1(){let r=e;for(;r!==null;){if(r.matches(Ir))return!0;r=r.parentElement}return!1}})}var uh=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(uh||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function tt(e){e==null||e.focus({preventScroll:!0})}let fh=["textarea","input"].join(",");function dh(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,fh))!=null?n:!1}function hh(e,t=n=>n){return e.slice().sort((n,r)=>{let o=t(n),s=t(r);if(o===null||s===null)return 0;let a=o.compareDocumentPosition(s);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Bn(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){let s=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,a=Array.isArray(e)?n?hh(e):e:t&64?lh(e):ih(e);o.length>0&&a.length>1&&(a=a.filter(h=>!o.some(b=>b!=null&&"current"in b?(b==null?void 0:b.current)===h:b===h))),r=r??s.activeElement;let i=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,a.indexOf(r))-1;if(t&4)return Math.max(0,a.indexOf(r))+1;if(t&8)return a.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=t&32?{preventScroll:!0}:{},u=0,f=a.length,p;do{if(u>=f||u+f<=0)return 0;let h=l+u;if(t&16)h=(h+f)%f;else{if(h<0)return 3;if(h>=f)return 1}p=a[h],p==null||p.focus(c),u+=i}while(p!==s.activeElement);return t&6&&dh(p)&&p.select(),2}function Ql(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function ph(){return/Android/gi.test(window.navigator.userAgent)}function Fa(){return Ql()||ph()}function gr(e,t,n,r){let o=tn(n);d.useEffect(()=>{if(!e)return;function s(a){o.current(a)}return document.addEventListener(t,s,r),()=>document.removeEventListener(t,s,r)},[e,t,r])}function Xl(e,t,n,r){let o=tn(n);d.useEffect(()=>{if(!e)return;function s(a){o.current(a)}return window.addEventListener(t,s,r),()=>window.removeEventListener(t,s,r)},[e,t,r])}const Ia=30;function mh(e,t,n){let r=tn(n),o=d.useCallback(function(i,l){if(i.defaultPrevented)return;let c=l(i);if(c===null||!c.getRootNode().contains(c)||!c.isConnected)return;let u=function f(p){return typeof p=="function"?f(p()):Array.isArray(p)||p instanceof Set?p:[p]}(t);for(let f of u)if(f!==null&&(f.contains(c)||i.composed&&i.composedPath().includes(f)))return;return!ch(c,Yl.Loose)&&c.tabIndex!==-1&&i.preventDefault(),r.current(i,c)},[r,t]),s=d.useRef(null);gr(e,"pointerdown",i=>{var l,c;Fa()||(s.current=((c=(l=i.composedPath)==null?void 0:l.call(i))==null?void 0:c[0])||i.target)},!0),gr(e,"pointerup",i=>{if(Fa()||!s.current)return;let l=s.current;return s.current=null,o(i,()=>l)},!0);let a=d.useRef({x:0,y:0});gr(e,"touchstart",i=>{a.current.x=i.touches[0].clientX,a.current.y=i.touches[0].clientY},!0),gr(e,"touchend",i=>{let l={x:i.changedTouches[0].clientX,y:i.changedTouches[0].clientY};if(!(Math.abs(l.x-a.current.x)>=Ia||Math.abs(l.y-a.current.y)>=Ia))return o(i,()=>Ot(i.target)?i.target:null)},!0),Xl(e,"blur",i=>o(i,()=>Pd(window.document.activeElement)?window.document.activeElement:null),!0)}function Vr(...e){return d.useMemo(()=>Hr(...e),[...e])}function Jl(e,t,n,r){let o=tn(n);d.useEffect(()=>{e=e??window;function s(a){o.current(a)}return e.addEventListener(t,s,r),()=>e.removeEventListener(t,s,r)},[e,t,r])}function gh(e){return d.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}function bh(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...s){let a=t[o].call(n,...s);a&&(n=a,r.forEach(i=>i()))}}}function yh(){let e;return{before({doc:t}){var n;let r=t.documentElement,o=(n=t.defaultView)!=null?n:window;e=Math.max(0,o.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,o=Math.max(0,r.clientWidth-r.offsetWidth),s=Math.max(0,e-o);n.style(r,"paddingRight",`${s}px`)}}}function vh(){return Ql()?{before({doc:e,d:t,meta:n}){function r(o){return n.containers.flatMap(s=>s()).some(s=>s.contains(o))}t.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let i=ct();i.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>i.dispose()))}let s=(o=window.scrollY)!=null?o:window.pageYOffset,a=null;t.addEventListener(e,"click",i=>{if(Ot(i.target))try{let l=i.target.closest("a");if(!l)return;let{hash:c}=new URL(l.href),u=e.querySelector(c);Ot(u)&&!r(u)&&(a=u)}catch{}},!0),t.addEventListener(e,"touchstart",i=>{if(Ot(i.target)&&Od(i.target))if(r(i.target)){let l=i.target;for(;l.parentElement&&r(l.parentElement);)l=l.parentElement;t.style(l,"overscrollBehavior","contain")}else t.style(i.target,"touchAction","none")}),t.addEventListener(e,"touchmove",i=>{if(Ot(i.target)){if(Ll(i.target))return;if(r(i.target)){let l=i.target;for(;l.parentElement&&l.dataset.headlessuiPortal!==""&&!(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth);)l=l.parentElement;l.dataset.headlessuiPortal===""&&i.preventDefault()}else i.preventDefault()}},{passive:!1}),t.add(()=>{var i;let l=(i=window.scrollY)!=null?i:window.pageYOffset;s!==l&&window.scrollTo(0,s),a&&a.isConnected&&(a.scrollIntoView({block:"nearest"}),a=null)})})}}:{}}function wh(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function xh(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let jt=bh(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:ct(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:xh(n)},o=[vh(),yh(),wh()];o.forEach(({before:s})=>s==null?void 0:s(r)),o.forEach(({after:s})=>s==null?void 0:s(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});jt.subscribe(()=>{let e=jt.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",o=n.count!==0;(o&&!r||!o&&r)&&jt.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&jt.dispatch("TEARDOWN",n)}});function Eh(e,t,n=()=>({containers:[]})){let r=gh(jt),o=t?r.get(t):void 0,s=o?o.count>0:!1;return ve(()=>{if(!(!t||!e))return jt.dispatch("PUSH",t,n),()=>jt.dispatch("POP",t,n)},[e,t]),s}function Sh(e,t,n=()=>[document.body]){let r=or(e,"scroll-lock");Eh(r,t,o=>{var s;return{containers:[...(s=o.containers)!=null?s:[],n]}})}function Ch(e=0){let[t,n]=d.useState(e),r=d.useCallback(l=>n(l),[t]),o=d.useCallback(l=>n(c=>c|l),[t]),s=d.useCallback(l=>(t&l)===l,[t]),a=d.useCallback(l=>n(c=>c&~l),[n]),i=d.useCallback(l=>n(c=>c^l),[n]);return{flags:t,setFlag:r,addFlag:o,hasFlag:s,removeFlag:a,toggleFlag:i}}var Ma,La;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((Ma=process==null?void 0:process.env)==null?void 0:Ma.NODE_ENV)==="test"&&typeof((La=Element==null?void 0:Element.prototype)==null?void 0:La.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
|
|
21
|
+
`)),[]});var kh=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(kh||{});function Th(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function Oh(e,t,n,r){let[o,s]=d.useState(n),{hasFlag:a,addFlag:i,removeFlag:l}=Ch(e&&o?3:0),c=d.useRef(!1),u=d.useRef(!1),f=Us();return ve(()=>{var p;if(e){if(n&&s(!0),!t){n&&i(3);return}return(p=r==null?void 0:r.start)==null||p.call(r,n),Ph(t,{inFlight:c,prepare(){u.current?u.current=!1:u.current=c.current,c.current=!0,!u.current&&(n?(i(3),l(4)):(i(4),l(2)))},run(){u.current?n?(l(3),i(4)):(l(4),i(3)):n?l(1):i(1)},done(){var h;u.current&&typeof t.getAnimations=="function"&&t.getAnimations().length>0||(c.current=!1,l(7),n||s(!1),(h=r==null?void 0:r.end)==null||h.call(r,n))}})}},[e,n,t,f]),e?[o,{closed:a(1),enter:a(2),leave:a(4),transition:a(2)||a(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function Ph(e,{prepare:t,run:n,done:r,inFlight:o}){let s=ct();return Rh(e,{prepare:t,inFlight:o}),s.nextFrame(()=>{n(),s.requestAnimationFrame(()=>{s.add(Ah(e,r))})}),s.dispose}function Ah(e,t){var n,r;let o=ct();if(!e)return o.dispose;let s=!1;o.add(()=>{s=!0});let a=(r=(n=e.getAnimations)==null?void 0:n.call(e).filter(i=>i instanceof CSSTransition))!=null?r:[];return a.length===0?(t(),o.dispose):(Promise.allSettled(a.map(i=>i.finished)).then(()=>{s||t()}),o.dispose)}function Rh(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}function Bs(e,t){let n=d.useRef([]),r=ce(e);d.useEffect(()=>{let o=[...n.current];for(let[s,a]of t.entries())if(n.current[s]!==a){let i=r(t,o);return n.current=t,i}},[r,...t])}function Gr(){return typeof window<"u"}function Fn(e){return Zl(e)?(e.nodeName||"").toLowerCase():"#document"}function Ae(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ut(e){var t;return(t=(Zl(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Zl(e){return Gr()?e instanceof Node||e instanceof Ae(e).Node:!1}function me(e){return Gr()?e instanceof Element||e instanceof Ae(e).Element:!1}function ze(e){return Gr()?e instanceof HTMLElement||e instanceof Ae(e).HTMLElement:!1}function cs(e){return!Gr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ae(e).ShadowRoot}function sr(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Le(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function $h(e){return["table","td","th"].includes(Fn(e))}function Kr(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function qs(e){const t=Yr(),n=me(e)?Le(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Fh(e){let t=st(e);for(;ze(t)&&!nt(t);){if(qs(t))return t;if(Kr(t))return null;t=st(t)}return null}function Yr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function nt(e){return["html","body","#document"].includes(Fn(e))}function Le(e){return Ae(e).getComputedStyle(e)}function Qr(e){return me(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function st(e){if(Fn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||cs(e)&&e.host||ut(e);return cs(t)?t.host:t}function ec(e){const t=st(e);return nt(t)?e.ownerDocument?e.ownerDocument.body:e.body:ze(t)&&sr(t)?t:ec(t)}function fn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=ec(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),a=Ae(o);if(s){const i=us(a);return t.concat(a,a.visualViewport||[],sr(o)?o:[],i&&n?fn(i):[])}return t.concat(o,fn(o,[],n))}function us(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Na=Math.min,qn=Math.max,Mr=Math.round,Ke=e=>({x:e,y:e});function tc(e){return e.split("-")[0]}function Ih(e){return e.split("-")[1]}function Mh(e){return e==="x"?"y":"x"}function Lh(e){return e==="y"?"height":"width"}function nc(e){return["top","bottom"].includes(tc(e))?"y":"x"}function Nh(e){return Mh(nc(e))}function rc(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function _a(e,t,n){let{reference:r,floating:o}=e;const s=nc(t),a=Nh(t),i=Lh(a),l=tc(t),c=s==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,p=r[i]/2-o[i]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-o.width,y:f};break;default:h={x:r.x,y:r.y}}switch(Ih(t)){case"start":h[a]-=p*(n&&c?-1:1);break;case"end":h[a]+=p*(n&&c?-1:1);break}return h}const _h=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:a}=n,i=s.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=_a(c,r,l),p=r,h={},b=0;for(let g=0;g<i.length;g++){const{name:y,fn:x}=i[g],{x:S,y:w,data:C,reset:v}=await x({x:u,y:f,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});u=S??u,f=w??f,h={...h,[y]:{...h[y],...C}},v&&b<=50&&(b++,typeof v=="object"&&(v.placement&&(p=v.placement),v.rects&&(c=v.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):v.rects),{x:u,y:f}=_a(c,p,l)),g=-1)}return{x:u,y:f,placement:p,strategy:o,middlewareData:h}};function oc(e){const t=Le(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ze(e),s=o?e.offsetWidth:n,a=o?e.offsetHeight:r,i=Mr(n)!==s||Mr(r)!==a;return i&&(n=s,r=a),{width:n,height:r,$:i}}function sc(e){return me(e)?e:e.contextElement}function dn(e){const t=sc(e);if(!ze(t))return Ke(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=oc(t);let a=(s?Mr(n.width):n.width)/r,i=(s?Mr(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const Dh=Ke(0);function ac(e){const t=Ae(e);return!Yr()||!t.visualViewport?Dh:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function jh(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ae(e)?!1:t}function Qn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=sc(e);let a=Ke(1);t&&(r?me(r)&&(a=dn(r)):a=dn(e));const i=jh(s,n,r)?ac(s):Ke(0);let l=(o.left+i.x)/a.x,c=(o.top+i.y)/a.y,u=o.width/a.x,f=o.height/a.y;if(s){const p=Ae(s),h=r&&me(r)?Ae(r):r;let b=p,g=us(b);for(;g&&r&&h!==b;){const y=dn(g),x=g.getBoundingClientRect(),S=Le(g),w=x.left+(g.clientLeft+parseFloat(S.paddingLeft))*y.x,C=x.top+(g.clientTop+parseFloat(S.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,f*=y.y,l+=w,c+=C,b=Ae(g),g=us(b)}}return rc({width:u,height:f,x:l,y:c})}function Vs(e,t){const n=Qr(e).scrollLeft;return t?t.left+n:Qn(ut(e)).left+n}function ic(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Vs(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function zh(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",a=ut(r),i=t?Kr(t.floating):!1;if(r===a||i&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Ke(1);const u=Ke(0),f=ze(r);if((f||!f&&!s)&&((Fn(r)!=="body"||sr(a))&&(l=Qr(r)),ze(r))){const h=Qn(r);c=dn(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}const p=a&&!f&&!s?ic(a,l,!0):Ke(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-l.scrollTop*c.y+u.y+p.y}}function Hh(e){return Array.from(e.getClientRects())}function Wh(e){const t=ut(e),n=Qr(e),r=e.ownerDocument.body,o=qn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=qn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Vs(e);const i=-n.scrollTop;return Le(r).direction==="rtl"&&(a+=qn(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:a,y:i}}function Uh(e,t){const n=Ae(e),r=ut(e),o=n.visualViewport;let s=r.clientWidth,a=r.clientHeight,i=0,l=0;if(o){s=o.width,a=o.height;const c=Yr();(!c||c&&t==="fixed")&&(i=o.offsetLeft,l=o.offsetTop)}return{width:s,height:a,x:i,y:l}}function Bh(e,t){const n=Qn(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=ze(e)?dn(e):Ke(1),a=e.clientWidth*s.x,i=e.clientHeight*s.y,l=o*s.x,c=r*s.y;return{width:a,height:i,x:l,y:c}}function Da(e,t,n){let r;if(t==="viewport")r=Uh(e,n);else if(t==="document")r=Wh(ut(e));else if(me(t))r=Bh(t,n);else{const o=ac(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return rc(r)}function lc(e,t){const n=st(e);return n===t||!me(n)||nt(n)?!1:Le(n).position==="fixed"||lc(n,t)}function qh(e,t){const n=t.get(e);if(n)return n;let r=fn(e,[],!1).filter(i=>me(i)&&Fn(i)!=="body"),o=null;const s=Le(e).position==="fixed";let a=s?st(e):e;for(;me(a)&&!nt(a);){const i=Le(a),l=qs(a);!l&&i.position==="fixed"&&(o=null),(s?!l&&!o:!l&&i.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||sr(a)&&!l&&lc(e,a))?r=r.filter(u=>u!==a):o=i,a=st(a)}return t.set(e,r),r}function Vh(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Kr(t)?[]:qh(t,this._c):[].concat(n),r],i=a[0],l=a.reduce((c,u)=>{const f=Da(t,u,o);return c.top=qn(f.top,c.top),c.right=Na(f.right,c.right),c.bottom=Na(f.bottom,c.bottom),c.left=qn(f.left,c.left),c},Da(t,i,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Gh(e){const{width:t,height:n}=oc(e);return{width:t,height:n}}function Kh(e,t,n){const r=ze(t),o=ut(t),s=n==="fixed",a=Qn(e,!0,s,t);let i={scrollLeft:0,scrollTop:0};const l=Ke(0);function c(){l.x=Vs(o)}if(r||!r&&!s)if((Fn(t)!=="body"||sr(o))&&(i=Qr(t)),r){const h=Qn(t,!0,s,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&c();s&&!r&&o&&c();const u=o&&!r&&!s?ic(o,i):Ke(0),f=a.left+i.scrollLeft-l.x-u.x,p=a.top+i.scrollTop-l.y-u.y;return{x:f,y:p,width:a.width,height:a.height}}function wo(e){return Le(e).position==="static"}function ja(e,t){if(!ze(e)||Le(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ut(e)===n&&(n=n.ownerDocument.body),n}function cc(e,t){const n=Ae(e);if(Kr(e))return n;if(!ze(e)){let o=st(e);for(;o&&!nt(o);){if(me(o)&&!wo(o))return o;o=st(o)}return n}let r=ja(e,t);for(;r&&$h(r)&&wo(r);)r=ja(r,t);return r&&nt(r)&&wo(r)&&!qs(r)?n:r||Fh(e)||n}const Yh=async function(e){const t=this.getOffsetParent||cc,n=this.getDimensions,r=await n(e.floating);return{reference:Kh(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Qh(e){return Le(e).direction==="rtl"}const Xh={convertOffsetParentRelativeRectToViewportRelativeRect:zh,getDocumentElement:ut,getClippingRect:Vh,getOffsetParent:cc,getElementRects:Yh,getClientRects:Hh,getDimensions:Gh,getScale:dn,isElement:me,isRTL:Qh},Jh=(e,t,n)=>{const r=new Map,o={platform:Xh,...n},s={...o.platform,_c:r};return _h(e,t,{...o,platform:s})};var Zh=typeof document<"u",ep=function(){},Er=Zh?d.useLayoutEffect:ep;function Lr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Lr(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Lr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function uc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function za(e,t){const n=uc(e);return Math.round(t*n)/n}function xo(e){const t=F.useRef(e);return Er(()=>{t.current=e}),t}function tp(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:a}={},transform:i=!0,whileElementsMounted:l,open:c}=e,[u,f]=F.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=F.useState(r);Lr(p,r)||h(r);const[b,g]=F.useState(null),[y,x]=F.useState(null),S=F.useCallback(O=>{O!==L.current&&(L.current=O,g(O))},[]),w=F.useCallback(O=>{O!==q.current&&(q.current=O,x(O))},[]),C=s||b,v=a||y,L=F.useRef(null),q=F.useRef(null),R=F.useRef(u),U=l!=null,G=xo(l),le=xo(o),ue=xo(c),oe=F.useCallback(()=>{if(!L.current||!q.current)return;const O={placement:t,strategy:n,middleware:p};le.current&&(O.platform=le.current),Jh(L.current,q.current,O).then(V=>{const E={...V,isPositioned:ue.current!==!1};fe.current&&!Lr(R.current,E)&&(R.current=E,xu.flushSync(()=>{f(E)}))})},[p,t,n,le,ue]);Er(()=>{c===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(O=>({...O,isPositioned:!1})))},[c]);const fe=F.useRef(!1);Er(()=>(fe.current=!0,()=>{fe.current=!1}),[]),Er(()=>{if(C&&(L.current=C),v&&(q.current=v),C&&v){if(G.current)return G.current(C,v,oe);oe()}},[C,v,oe,G,U]);const B=F.useMemo(()=>({reference:L,floating:q,setReference:S,setFloating:w}),[S,w]),K=F.useMemo(()=>({reference:C,floating:v}),[C,v]),ne=F.useMemo(()=>{const O={position:n,left:0,top:0};if(!K.floating)return O;const V=za(K.floating,u.x),E=za(K.floating,u.y);return i?{...O,transform:"translate("+V+"px, "+E+"px)",...uc(K.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:E}},[n,i,K.floating,u.x,u.y]);return F.useMemo(()=>({...u,update:oe,refs:B,elements:K,floatingStyles:ne}),[u,oe,B,K,ne])}let Xr=d.createContext(null);Xr.displayName="OpenClosedContext";var je=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(je||{});function Jr(){return d.useContext(Xr)}function np({value:e,children:t}){return d.createElement(Xr.Provider,{value:e},t)}function rp({children:e}){return d.createElement(Xr.Provider,{value:null},e)}function op(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let mt=[];op(()=>{function e(t){if(!Ot(t.target)||t.target===document.body||mt[0]===t.target)return;let n=t.target;n=n.closest(Ir),mt.unshift(n??t.target),mt=mt.filter(r=>r!=null&&r.isConnected),mt.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function fc(e){let t=ce(e),n=d.useRef(!1);d.useEffect(()=>(n.current=!1,()=>{n.current=!0,Wr(()=>{n.current&&t()})}),[t])}function sp(){let e=typeof document>"u";return"useSyncExternalStore"in F?(t=>t.useSyncExternalStore)(F)(()=>()=>{},()=>!1,()=>!e):!1}function ar(){let e=sp(),[t,n]=F.useState(Yt.isHandoffComplete);return t&&Yt.isHandoffComplete===!1&&n(!1),F.useEffect(()=>{t!==!0&&n(!0)},[t]),F.useEffect(()=>Yt.handoff(),[]),e?!1:t}let dc=d.createContext(!1);function ap(){return d.useContext(dc)}function Ha(e){return d.createElement(dc.Provider,{value:e.force},e.children)}function ip(e){let t=ap(),n=d.useContext(pc),[r,o]=d.useState(()=>{var s;if(!t&&n!==null)return(s=n.current)!=null?s:null;if(Yt.isServer)return null;let a=e==null?void 0:e.getElementById("headlessui-portal-root");if(a)return a;if(e===null)return null;let i=e.createElement("div");return i.setAttribute("id","headlessui-portal-root"),e.body.appendChild(i)});return d.useEffect(()=>{r!==null&&(e!=null&&e.body.contains(r)||e==null||e.body.appendChild(r))},[r,e]),d.useEffect(()=>{t||n!==null&&o(n.current)},[n,o,t]),r}let hc=d.Fragment,lp=we(function(e,t){let{ownerDocument:n=null,...r}=e,o=d.useRef(null),s=He(Rd(h=>{o.current=h}),t),a=Vr(o),i=n??a,l=ip(i),[c]=d.useState(()=>{var h;return Yt.isServer?null:(h=i==null?void 0:i.createElement("div"))!=null?h:null}),u=d.useContext(fs),f=ar();ve(()=>{!l||!c||l.contains(c)||(c.setAttribute("data-headlessui-portal",""),l.appendChild(c))},[l,c]),ve(()=>{if(c&&u)return u.register(c)},[u,c]),fc(()=>{var h;!l||!c||(Ml(c)&&l.contains(c)&&l.removeChild(c),l.childNodes.length<=0&&((h=l.parentElement)==null||h.removeChild(l)))});let p=Te();return f?!l||!c?null:Vi.createPortal(p({ourProps:{ref:s},theirProps:r,slot:{},defaultTag:hc,name:"Portal"}),c):null});function cp(e,t){let n=He(t),{enabled:r=!0,ownerDocument:o,...s}=e,a=Te();return r?d.createElement(lp,{...s,ownerDocument:o,ref:n}):a({ourProps:{ref:n},theirProps:s,slot:{},defaultTag:hc,name:"Portal"})}let up=d.Fragment,pc=d.createContext(null);function fp(e,t){let{target:n,...r}=e,o={ref:He(t)},s=Te();return d.createElement(pc.Provider,{value:n},s({ourProps:o,theirProps:r,defaultTag:up,name:"Popover.Group"}))}let fs=d.createContext(null);function dp(){let e=d.useContext(fs),t=d.useRef([]),n=ce(s=>(t.current.push(s),e&&e.register(s),()=>r(s))),r=ce(s=>{let a=t.current.indexOf(s);a!==-1&&t.current.splice(a,1),e&&e.unregister(s)}),o=d.useMemo(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,d.useMemo(()=>function({children:s}){return d.createElement(fs.Provider,{value:o},s)},[o])]}let hp=we(cp),mc=we(fp),pp=Object.assign(hp,{Group:mc});function mp(e,t=typeof document<"u"?document.defaultView:null,n){let r=or(e,"escape");Jl(t,"keydown",o=>{r&&(o.defaultPrevented||o.key===zl.Escape&&n(o))})}function gp(){var e;let[t]=d.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[n,r]=d.useState((e=t==null?void 0:t.matches)!=null?e:!1);return ve(()=>{if(!t)return;function o(s){r(s.matches)}return t.addEventListener("change",o),()=>t.removeEventListener("change",o)},[t]),n}function bp({defaultContainers:e=[],portals:t,mainTreeNode:n}={}){let r=Vr(n),o=ce(()=>{var s,a;let i=[];for(let l of e)l!==null&&(et(l)?i.push(l):"current"in l&&et(l.current)&&i.push(l.current));if(t!=null&&t.current)for(let l of t.current)i.push(l);for(let l of(s=r==null?void 0:r.querySelectorAll("html > *, body > *"))!=null?s:[])l!==document.body&&l!==document.head&&et(l)&&l.id!=="headlessui-portal-root"&&(n&&(l.contains(n)||l.contains((a=n==null?void 0:n.getRootNode())==null?void 0:a.host))||i.some(c=>l.contains(c))||i.push(l));return i});return{resolveContainers:o,contains:ce(s=>o().some(a=>a.contains(s)))}}let gc=d.createContext(null);function Wa({children:e,node:t}){let[n,r]=d.useState(null),o=bc(t??n);return d.createElement(gc.Provider,{value:o},e,o===null&&d.createElement(Fr,{features:Yn.Hidden,ref:s=>{var a,i;if(s){for(let l of(i=(a=Hr(s))==null?void 0:a.querySelectorAll("html > *, body > *"))!=null?i:[])if(l!==document.body&&l!==document.head&&et(l)&&l!=null&&l.contains(s)){r(l);break}}}}))}function bc(e=null){var t;return(t=d.useContext(gc))!=null?t:e}function Gs(){let e=d.useRef(!1);return ve(()=>(e.current=!0,()=>{e.current=!1}),[]),e}var jn=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(jn||{});function yp(){let e=d.useRef(0);return Xl(!0,"keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function yc(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.current)et(n.current)&&t.add(n.current);return t}let vp="div";var _t=(e=>(e[e.None=0]="None",e[e.InitialFocus=1]="InitialFocus",e[e.TabLock=2]="TabLock",e[e.FocusLock=4]="FocusLock",e[e.RestoreFocus=8]="RestoreFocus",e[e.AutoFocus=16]="AutoFocus",e))(_t||{});function wp(e,t){let n=d.useRef(null),r=He(n,t),{initialFocus:o,initialFocusFallback:s,containers:a,features:i=15,...l}=e;ar()||(i=0);let c=Vr(n);Cp(i,{ownerDocument:c});let u=kp(i,{ownerDocument:c,container:n,initialFocus:o,initialFocusFallback:s});Tp(i,{ownerDocument:c,container:n,containers:a,previousActiveElement:u});let f=yp(),p=ce(S=>{if(!At(n.current))return;let w=n.current;(C=>C())(()=>{ot(f.current,{[jn.Forwards]:()=>{Bn(w,Ze.First,{skipElements:[S.relatedTarget,s]})},[jn.Backwards]:()=>{Bn(w,Ze.Last,{skipElements:[S.relatedTarget,s]})}})})}),h=or(!!(i&2),"focus-trap#tab-lock"),b=Us(),g=d.useRef(!1),y={ref:r,onKeyDown(S){S.key=="Tab"&&(g.current=!0,b.requestAnimationFrame(()=>{g.current=!1}))},onBlur(S){if(!(i&4))return;let w=yc(a);At(n.current)&&w.add(n.current);let C=S.relatedTarget;Ot(C)&&C.dataset.headlessuiFocusGuard!=="true"&&(vc(w,C)||(g.current?Bn(n.current,ot(f.current,{[jn.Forwards]:()=>Ze.Next,[jn.Backwards]:()=>Ze.Previous})|Ze.WrapAround,{relativeTo:S.target}):Ot(S.target)&&tt(S.target)))}},x=Te();return d.createElement(d.Fragment,null,h&&d.createElement(Fr,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:Yn.Focusable}),x({ourProps:y,theirProps:l,defaultTag:vp,name:"FocusTrap"}),h&&d.createElement(Fr,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:Yn.Focusable}))}let xp=we(wp),Ep=Object.assign(xp,{features:_t});function Sp(e=!0){let t=d.useRef(mt.slice());return Bs(([n],[r])=>{r===!0&&n===!1&&Wr(()=>{t.current.splice(0)}),r===!1&&n===!0&&(t.current=mt.slice())},[e,mt,t]),ce(()=>{var n;return(n=t.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function Cp(e,{ownerDocument:t}){let n=!!(e&8),r=Sp(n);Bs(()=>{n||(t==null?void 0:t.activeElement)===(t==null?void 0:t.body)&&tt(r())},[n]),fc(()=>{n&&tt(r())})}function kp(e,{ownerDocument:t,container:n,initialFocus:r,initialFocusFallback:o}){let s=d.useRef(null),a=or(!!(e&1),"focus-trap#initial-focus"),i=Gs();return Bs(()=>{if(e===0)return;if(!a){o!=null&&o.current&&tt(o.current);return}let l=n.current;l&&Wr(()=>{if(!i.current)return;let c=t==null?void 0:t.activeElement;if(r!=null&&r.current){if((r==null?void 0:r.current)===c){s.current=c;return}}else if(l.contains(c)){s.current=c;return}if(r!=null&&r.current)tt(r.current);else{if(e&16){if(Bn(l,Ze.First|Ze.AutoFocus)!==ls.Error)return}else if(Bn(l,Ze.First)!==ls.Error)return;if(o!=null&&o.current&&(tt(o.current),(t==null?void 0:t.activeElement)===o.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}s.current=t==null?void 0:t.activeElement})},[o,a,e]),s}function Tp(e,{ownerDocument:t,container:n,containers:r,previousActiveElement:o}){let s=Gs(),a=!!(e&4);Jl(t==null?void 0:t.defaultView,"focus",i=>{if(!a||!s.current)return;let l=yc(r);At(n.current)&&l.add(n.current);let c=o.current;if(!c)return;let u=i.target;At(u)?vc(l,u)?(o.current=u,tt(u)):(i.preventDefault(),i.stopPropagation(),tt(c)):tt(o.current)},!0)}function vc(e,t){for(let n of e)if(n.contains(t))return!0;return!1}function wc(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:Ec)!==d.Fragment||d.Children.count(e.children)===1}let Zr=d.createContext(null);Zr.displayName="TransitionContext";var Op=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Op||{});function Pp(){let e=d.useContext(Zr);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function Ap(){let e=d.useContext(eo);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let eo=d.createContext(null);eo.displayName="NestingContext";function to(e){return"children"in e?to(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function xc(e,t){let n=tn(e),r=d.useRef([]),o=Gs(),s=Us(),a=ce((h,b=Tt.Hidden)=>{let g=r.current.findIndex(({el:y})=>y===h);g!==-1&&(ot(b,{[Tt.Unmount](){r.current.splice(g,1)},[Tt.Hidden](){r.current[g].state="hidden"}}),s.microTask(()=>{var y;!to(r)&&o.current&&((y=n.current)==null||y.call(n))}))}),i=ce(h=>{let b=r.current.find(({el:g})=>g===h);return b?b.state!=="visible"&&(b.state="visible"):r.current.push({el:h,state:"visible"}),()=>a(h,Tt.Unmount)}),l=d.useRef([]),c=d.useRef(Promise.resolve()),u=d.useRef({enter:[],leave:[]}),f=ce((h,b,g)=>{l.current.splice(0),t&&(t.chains.current[b]=t.chains.current[b].filter(([y])=>y!==h)),t==null||t.chains.current[b].push([h,new Promise(y=>{l.current.push(y)})]),t==null||t.chains.current[b].push([h,new Promise(y=>{Promise.all(u.current[b].map(([x,S])=>S)).then(()=>y())})]),b==="enter"?c.current=c.current.then(()=>t==null?void 0:t.wait.current).then(()=>g(b)):g(b)}),p=ce((h,b,g)=>{Promise.all(u.current[b].splice(0).map(([y,x])=>x)).then(()=>{var y;(y=l.current.shift())==null||y()}).then(()=>g(b))});return d.useMemo(()=>({children:r,register:i,unregister:a,onStart:f,onStop:p,wait:c,chains:u}),[i,a,r,f,p,u,c])}let Ec=d.Fragment,Sc=$r.RenderStrategy;function Rp(e,t){var n,r;let{transition:o=!0,beforeEnter:s,afterEnter:a,beforeLeave:i,afterLeave:l,enter:c,enterFrom:u,enterTo:f,entered:p,leave:h,leaveFrom:b,leaveTo:g,...y}=e,[x,S]=d.useState(null),w=d.useRef(null),C=wc(e),v=He(...C?[w,t,S]:t===null?[]:[t]),L=(n=y.unmount)==null||n?Tt.Unmount:Tt.Hidden,{show:q,appear:R,initial:U}=Pp(),[G,le]=d.useState(q?"visible":"hidden"),ue=Ap(),{register:oe,unregister:fe}=ue;ve(()=>oe(w),[oe,w]),ve(()=>{if(L===Tt.Hidden&&w.current){if(q&&G!=="visible"){le("visible");return}return ot(G,{hidden:()=>fe(w),visible:()=>oe(w)})}},[G,w,oe,fe,q,L]);let B=ar();ve(()=>{if(C&&B&&G==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,G,B,C]);let K=U&&!R,ne=R&&q&&U,O=d.useRef(!1),V=xc(()=>{O.current||(le("hidden"),fe(w))},ue),E=ce(I=>{O.current=!0;let Q=I?"enter":"leave";V.onStart(w,Q,X=>{X==="enter"?s==null||s():X==="leave"&&(i==null||i())})}),P=ce(I=>{let Q=I?"enter":"leave";O.current=!1,V.onStop(w,Q,X=>{X==="enter"?a==null||a():X==="leave"&&(l==null||l())}),Q==="leave"&&!to(V)&&(le("hidden"),fe(w))});d.useEffect(()=>{C&&o||(E(q),P(q))},[q,C,o]);let W=!(!o||!C||!B||K),[,A]=Oh(W,x,q,{start:E,end:P}),D=Nt({ref:v,className:((r=as(y.className,ne&&c,ne&&u,A.enter&&c,A.enter&&A.closed&&u,A.enter&&!A.closed&&f,A.leave&&h,A.leave&&!A.closed&&b,A.leave&&A.closed&&g,!A.transition&&q&&p))==null?void 0:r.trim())||void 0,...Th(A)}),Y=0;G==="visible"&&(Y|=je.Open),G==="hidden"&&(Y|=je.Closed),q&&G==="hidden"&&(Y|=je.Opening),!q&&G==="visible"&&(Y|=je.Closing);let z=Te();return d.createElement(eo.Provider,{value:V},d.createElement(np,{value:Y},z({ourProps:D,theirProps:y,defaultTag:Ec,features:Sc,visible:G==="visible",name:"Transition.Child"})))}function $p(e,t){let{show:n,appear:r=!1,unmount:o=!0,...s}=e,a=d.useRef(null),i=wc(e),l=He(...i?[a,t]:t===null?[]:[t]);ar();let c=Jr();if(n===void 0&&c!==null&&(n=(c&je.Open)===je.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[u,f]=d.useState(n?"visible":"hidden"),p=xc(()=>{n||f("hidden")}),[h,b]=d.useState(!0),g=d.useRef([n]);ve(()=>{h!==!1&&g.current[g.current.length-1]!==n&&(g.current.push(n),b(!1))},[g,n]);let y=d.useMemo(()=>({show:n,appear:r,initial:h}),[n,r,h]);ve(()=>{n?f("visible"):!to(p)&&a.current!==null&&f("hidden")},[n,p]);let x={unmount:o},S=ce(()=>{var v;h&&b(!1),(v=e.beforeEnter)==null||v.call(e)}),w=ce(()=>{var v;h&&b(!1),(v=e.beforeLeave)==null||v.call(e)}),C=Te();return d.createElement(eo.Provider,{value:p},d.createElement(Zr.Provider,{value:y},C({ourProps:{...x,as:d.Fragment,children:d.createElement(Cc,{ref:l,...x,...s,beforeEnter:S,beforeLeave:w})},theirProps:{},defaultTag:d.Fragment,features:Sc,visible:u==="visible",name:"Transition"})))}function Fp(e,t){let n=d.useContext(Zr)!==null,r=Jr()!==null;return d.createElement(d.Fragment,null,!n&&r?d.createElement(ds,{ref:t,...e}):d.createElement(Cc,{ref:t,...e}))}let ds=we($p),Cc=we(Rp),Ks=we(Fp),Ip=Object.assign(ds,{Child:Ks,Root:ds});var Mp=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Mp||{}),Lp=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(Lp||{});let Np={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},Ys=d.createContext(null);Ys.displayName="DialogContext";function no(e){let t=d.useContext(Ys);if(t===null){let n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,no),n}return t}function _p(e,t){return ot(t.type,Np,e,t)}let Ua=we(function(e,t){let n=d.useId(),{id:r=`headlessui-dialog-${n}`,open:o,onClose:s,initialFocus:a,role:i="dialog",autoFocus:l=!0,__demoMode:c=!1,unmount:u=!1,...f}=e,p=d.useRef(!1);i=function(){return i==="dialog"||i==="alertdialog"?i:(p.current||(p.current=!0,console.warn(`Invalid role [${i}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let h=Jr();o===void 0&&h!==null&&(o=(h&je.Open)===je.Open);let b=d.useRef(null),g=He(b,t),y=Vr(b),x=o?0:1,[S,w]=d.useReducer(_p,{titleId:null,descriptionId:null,panelRef:d.createRef()}),C=ce(()=>s(!1)),v=ce(A=>w({type:0,id:A})),L=ar()?x===0:!1,[q,R]=dp(),U={get current(){var A;return(A=S.panelRef.current)!=null?A:b.current}},G=bc(),{resolveContainers:le}=bp({mainTreeNode:G,portals:q,defaultContainers:[U]}),ue=h!==null?(h&je.Closing)===je.Closing:!1;rh(c||ue?!1:L,{allowed:ce(()=>{var A,D;return[(D=(A=b.current)==null?void 0:A.closest("[data-headlessui-portal]"))!=null?D:null]}),disallowed:ce(()=>{var A;return[(A=G==null?void 0:G.closest("body > *:not(#headlessui-portal-root)"))!=null?A:null]})});let oe=Gl.get(null);ve(()=>{if(L)return oe.actions.push(r),()=>oe.actions.pop(r)},[oe,r,L]);let fe=Kl(oe,d.useCallback(A=>oe.selectors.isTop(A,r),[oe,r]));mh(fe,le,A=>{A.preventDefault(),C()}),mp(fe,y==null?void 0:y.defaultView,A=>{A.preventDefault(),A.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),C()}),Sh(c||ue?!1:L,y,le),oh(L,b,C);let[B,K]=Dl(),ne=d.useMemo(()=>[{dialogState:x,close:C,setTitleId:v,unmount:u},S],[x,S,C,v,u]),O=d.useMemo(()=>({open:x===0}),[x]),V={ref:g,id:r,role:i,tabIndex:-1,"aria-modal":c?void 0:x===0?!0:void 0,"aria-labelledby":S.titleId,"aria-describedby":B,unmount:u},E=!gp(),P=_t.None;L&&!c&&(P|=_t.RestoreFocus,P|=_t.TabLock,l&&(P|=_t.AutoFocus),E&&(P|=_t.InitialFocus));let W=Te();return d.createElement(rp,null,d.createElement(Ha,{force:!0},d.createElement(pp,null,d.createElement(Ys.Provider,{value:ne},d.createElement(mc,{target:b},d.createElement(Ha,{force:!1},d.createElement(K,{slot:O},d.createElement(R,null,d.createElement(Ep,{initialFocus:a,initialFocusFallback:b,containers:le,features:P},d.createElement(Hd,{value:C},W({ourProps:V,theirProps:f,slot:O,defaultTag:Dp,features:jp,visible:x===0,name:"Dialog"})))))))))))}),Dp="div",jp=$r.RenderStrategy|$r.Static;function zp(e,t){let{transition:n=!1,open:r,...o}=e,s=Jr(),a=e.hasOwnProperty("open")||s!==null,i=e.hasOwnProperty("onClose");if(!a&&!i)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!a)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!i)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!s&&typeof e.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);if(typeof e.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${e.onClose}`);return(r!==void 0||n)&&!o.static?d.createElement(Wa,null,d.createElement(Ip,{show:r,transition:n,unmount:o.unmount},d.createElement(Ua,{ref:t,...o}))):d.createElement(Wa,null,d.createElement(Ua,{ref:t,open:r,...o}))}let Hp="div";function Wp(e,t){let n=d.useId(),{id:r=`headlessui-dialog-panel-${n}`,transition:o=!1,...s}=e,[{dialogState:a,unmount:i},l]=no("Dialog.Panel"),c=He(t,l.panelRef),u=d.useMemo(()=>({open:a===0}),[a]),f=ce(y=>{y.stopPropagation()}),p={ref:c,id:r,onClick:f},h=o?Ks:d.Fragment,b=o?{unmount:i}:{},g=Te();return d.createElement(h,{...b},g({ourProps:p,theirProps:s,slot:u,defaultTag:Hp,name:"Dialog.Panel"}))}let Up="div";function Bp(e,t){let{transition:n=!1,...r}=e,[{dialogState:o,unmount:s}]=no("Dialog.Backdrop"),a=d.useMemo(()=>({open:o===0}),[o]),i={ref:t,"aria-hidden":!0},l=n?Ks:d.Fragment,c=n?{unmount:s}:{},u=Te();return d.createElement(l,{...c},u({ourProps:i,theirProps:r,slot:a,defaultTag:Up,name:"Dialog.Backdrop"}))}let qp="h2";function Vp(e,t){let n=d.useId(),{id:r=`headlessui-dialog-title-${n}`,...o}=e,[{dialogState:s,setTitleId:a}]=no("Dialog.Title"),i=He(t);d.useEffect(()=>(a(r),()=>a(null)),[r,a]);let l=d.useMemo(()=>({open:s===0}),[s]),c={ref:i,id:r};return Te()({ourProps:c,theirProps:o,slot:l,defaultTag:qp,name:"Dialog.Title"})}let Gp=we(zp),kc=we(Wp),Kp=we(Bp),Tc=we(Vp),Yp=Object.assign(Gp,{Panel:kc,Title:Tc,Description:jl}),Qp="div";function Xp(e,t){let n=`headlessui-control-${d.useId()}`,[r,o]=Ld(),[s,a]=Dl(),i=Ur(),{disabled:l=i||!1,...c}=e,u=d.useMemo(()=>({disabled:l}),[l]),f={ref:t,disabled:l||void 0,"aria-disabled":l||void 0},p=Te();return d.createElement(gd,{value:l},d.createElement(o,{value:r},d.createElement(a,{value:s},d.createElement(Td,{id:n},p({ourProps:f,theirProps:{...c,children:d.createElement(kd,null,typeof c.children=="function"?c.children(u):c.children)},slot:u,defaultTag:Qp,name:"Field"})))))}let Jp=we(Xp),Zp="input";function em(e,t){let n=d.useId(),r=Il(),o=Ur(),{id:s=r||`headlessui-input-${n}`,disabled:a=o||!1,autoFocus:i=!1,invalid:l=!1,...c}=e,u=Wl(),f=$d(),{isFocused:p,focusProps:h}=dd({autoFocus:i}),{isHovered:b,hoverProps:g}=fd({isDisabled:a}),y=wd({ref:t,id:s,"aria-labelledby":u,"aria-describedby":f,"aria-invalid":l?"true":void 0,disabled:a||void 0,autoFocus:i},h,g),x=d.useMemo(()=>({disabled:a,invalid:l,hover:b,focus:p,autofocus:i}),[a,l,b,p,i]);return Te()({ourProps:y,theirProps:c,slot:x,defaultTag:Zp,name:"Input"})}let tm=we(em);const nm="whitespace-nowrap font-normal flex items-center justify-center",rm="focus:outline focus:outline-3 focus:outline-primary-500/[.3]",om="disabled:opacity-15 disabled:pointer-events-none",Oc=e=>e==="grayLight"||e==="warning",Pc=(e,t)=>!t||t==="none"?"":e(),sm=(e,t)=>Pc(()=>{const n=e==="gray400"?"gray":e,r=Oc(n)?"active:text-black":"active:text-white";return e==="primary"?t?`bg-${n}-800 text-white`:`hover:bg-${n}-800 active:bg-${n}-800 hover:text-white ${r}`:n==="grayDark"?t?"bg-gray-800 text-white":`hover:bg-gray-800 active:bg-gray-800 hover:text-white ${r}`:n==="grayLight"?t?"bg-gray-50 text-black":`hover:bg-gray-50 active:bg-gray-50 hover:text-black ${r}`:e==="gray400"?t?`bg-${n}-500 text-white`:`hover:bg-${n}-500 active:bg-${n}-500 hover:text-white ${r}`:t?`bg-${n}-700 text-white`:`hover:bg-${n}-600 active:bg-${n}-700 hover:text-white ${r}`},e),am=e=>Pc(()=>{const t=Oc(e)?"text-black":"text-white";return e==="primary"?`bg-primary-600 ${t}`:e==="gray400"?`bg-gray-400 ${t}`:`bg-${e}-500 ${t}`},e),im=e=>e&&{dark:"text-dark hover:text-dark",yellow:"text-yellow hover:text-yellow",gray:"text-gray-500 hover:text-gray-800",primary:"text-primary-600 hover:text-primary-800",secondary:"text-secondary-500 hover:text-secondary-800",success:"text-success-500 hover:text-success-800",info:"text-info-500 hover:text-info-800",warning:"text-warning-500 hover:text-warning-800",danger:"text-danger-500 hover:text-danger-800",steel:"text-steel-500 hover:text-steel-800",orange:"text-orange-500 hover:text-orange-800",purple:"text-purple-500 hover:text-purple-800","fiserv-orange":"text-fiserv-orange-500 hover:text-fiserv-orange-800",grayDark:"text-gray-800 hover:text-gray-900",grayLight:"text-gray-50 hover:text-gray-400",gray400:"text-gray-400 hover:text-gray-700"}[e]||"",lm=(e,t)=>e&&{dark:t?"bg-dark text-white":"text-dark hover:bg-dark hover:text-white",yellow:t?"bg-yellow text-white":"text-yellow hover:bg-yellow hover:text-white",gray:t?"bg-gray-500 text-white":"text-gray-500 hover:bg-gray-500 hover:text-white",primary:t?"bg-primary-800 text-white":"text-primary-600 hover:bg-primary-800 hover:text-white",secondary:t?"bg-secondary-500 text-white":"text-secondary-500 hover:bg-secondary-500 hover:text-white",success:t?"bg-success-500 text-white":"text-success-500 hover:bg-success-500 hover:text-white",info:t?"bg-info-500 text-white":"text-info-500 hover:bg-info-500 hover:text-white",warning:t?"bg-warning-500 text-white":"text-warning-500 hover:bg-warning-500 hover:text-white",danger:t?"bg-danger-500 text-white":"text-danger-500 hover:bg-danger-500 hover:text-white",steel:t?"bg-steel-500 text-white":"text-steel-500 hover:bg-steel-500 hover:text-white",orange:t?"bg-orange-500 text-white":"text-orange-500 hover:bg-orange-500 hover:text-white",purple:t?"bg-purple-500 text-white":"text-purple-500 hover:bg-purple-500 hover:text-white","fiserv-orange":t?"bg-fiserv-orange-500 text-white":"text-fiserv-orange-500 hover:bg-fiserv-orange-500 hover:text-white",grayDark:t?"bg-gray-900 text-white":"text-gray-800 hover:bg-gray-900 hover:text-white",grayLight:t?"bg-gray-400 text-white":"text-gray-50 hover:bg-gray-400 hover:text-white",gray400:t?"bg-gray-500 text-white":"text-gray-400 hover:bg-gray-500 hover:text-white"}[e]||"",cm=(e,t)=>!e||e==="none"?"":e==="primary"?`border border-primary-600 ${t?"":"text-primary-600"}`:e==="grayDark"?`border border-gray-800 ${t?"":"text-gray-800"}`:e==="grayLight"?`border border-gray-50 ${t?"":"text-gray-400"}`:e==="gray400"?`border border-gray-400 ${t?"":"text-gray-400"}`:`border border-${e}-500 ${t?"":`text-${e}-500`}`,um=(e,t)=>({solid:am(e),link:im(e),linkHoverSolid:lm(e,t),outline:cm(e,t)}),fm={none:"",default:"min-w-fit h-[40px] text-base px-3",base:"w-full md:min-w-fit h-[40px] text-base px-3",small:"min-w-[106px] h-[30px] text-sm px-2",normal:"min-w-[140px] h-[38px] text-base px-3",large:"min-w-[160px] h-[40px] text-lg px-3",NormalBlock:"w-full h-[40px] text-lg px-3",box:"w-[38px] h-[38px]",smallCollapse:"h-[30px] text-sm px-2",normalCollapse:"h-[38px] text-base px-3"},dm={none:"",default:"rounded",pill:"rounded-pill"},hm=({active:e=!1,children:t,color:n="primary",size:r="normal",category:o="solid",className:s,type:a="button",rounded:i="default",style:l={},...c},u)=>{var S;const f=om,p=/link/.test(o)?null:sm(n,e),h=rm,b=fm[r],g=(S=um(n,e))==null?void 0:S[o],y=un(p,g),x=dm[i];return T.jsx("button",{...c,style:{...l,transition:"color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out"},type:a,ref:u,className:un(nm,h,f,b,y,x,s,"cursor-pointer"),children:t})},Nr=d.forwardRef(hm),pm=({isOpen:e,close:t,title:n,dismissOptions:r,confirmOptions:o,children:s})=>T.jsxs(Yp,{open:e,onClose:t,className:"relative z-50 transition duration-300 ease-out data-closed:opacity-0",transition:!0,children:[T.jsx(Kp,{className:"fixed inset-0 bg-black/30"}),T.jsx("div",{className:"fixed inset-0 flex w-screen items-center justify-center p-4",children:T.jsxs(kc,{className:"max-w-lg divide-y divide-gray-100 bg-white rounded-sm shadow-xl",children:[T.jsx(Tc,{className:" text-gray-900 p-4",children:n}),T.jsx("div",{className:"p-4",children:s}),r||o?T.jsxs("div",{className:"flex gap-4 justify-end p-4",children:[r?T.jsx(Nr,{onClick:()=>{r.onClick(),t()},size:"small",color:"secondary",children:r.label}):T.jsx(T.Fragment,{}),o?T.jsx(Nr,{disabled:o.disabled,onClick:()=>{o.onClick(),t()},size:"small",color:"primary",children:o.label}):T.jsx(T.Fragment,{})]}):T.jsx(T.Fragment,{})]})})]}),mm=({type:e="text",className:t,label:n,description:r,...o})=>T.jsx("div",{className:"w-full max-w-md px-4",children:T.jsxs(Jp,{children:[T.jsx(jd,{className:"font-medium text-gray-900",children:n}),r&&T.jsx(jl,{className:"text-sm text-secondary",children:r}),T.jsx(tm,{type:e,className:On("mt-3 block w-full rounded-lg border border-gray-200 px-3 py-1.5 text-sm/6 text-gray-800","focus:not-data-focus:outline-none data-focus:outline-2 data-focus:-outline-offset-2 data-focus:outline-primary-500",t),...o})]})}),gm=({onConfirm:e,onClose:t,isOpen:n,title:r})=>{const[o,s]=d.useState(""),[a,i]=d.useState(!1),l=async()=>{if(o)try{i(!0),await e(o),s("")}finally{i(!1)}else alert("Please enter a valid email address.")};return T.jsx(pm,{title:r||"Initiate Confidence Playbook",isOpen:n,close:t,dismissOptions:{label:"Cancel",onClick:t},confirmOptions:{label:"Initiate",onClick:l,disabled:a||!o},children:T.jsx(T.Fragment,{children:T.jsx(mm,{label:"Email",disabled:a,description:"Enter the email address to initiate the playbook.",onChange:c=>s(c.target.value)})})})},Ac=({children:e})=>T.jsx("div",{className:"confidence-ui",children:e}),Rc=({btnClassName:e,buttonNode:t,size:n,playbookId:r,onInitiated:o})=>{const[s,a]=d.useState(!1);function i(){a(!0)}function l(){a(!1)}const c=async u=>{const{playbookInstanceId:f,errorCode:p,details:h,message:b}=await il({bank:"public-sdk",email:u,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone||"America/Los_Angeles",playbookUid:r})||{};if(p)throw new Error(`Error initiating playbook: ${b} (Code: ${p}) - Details: ${h}`);o(f)};return T.jsx(Ac,{children:T.jsxs(T.Fragment,{children:[t?{buttonNode:t}:T.jsx(Nr,{onClick:i,className:e,color:"primary",size:n,children:"Run Playbook"}),T.jsx(gm,{isOpen:s,onClose:l,onConfirm:async u=>{await c(u),l()}})]})})},bm=({buttons:e,onButtonClick:t})=>T.jsx("div",{className:"flex items-center justify-end",children:e.map(n=>T.jsx(Nr,{size:"smallCollapse",className:"ml-2",onClick:()=>{t(n)},children:cf[n]},n))}),ym={SEQUENTIAL:"Sequential"},vm={[he.IN_REVIEW]:"In Review"},wm={[he.OPEN]:"bg-secondary-500",[he.IN_PROGRESS]:"bg-primary-600",[he.IN_REVIEW]:"bg-success-600",[he.COMPLETED]:"bg-success-600"},xm=({playbookType:e,status:t,step:n,isSelected:r,onSelect:o})=>T.jsx("div",{className:Pr("flex flex-col items-center justify-center",r?"bg-[#FFE600]":wm[t],o&&"cursor-pointer"),onClick:s=>{s.stopPropagation(),o==null||o(s.shiftKey)},children:T.jsx("span",{className:Pr("text-orientation-mixed w-[27px] flex items-center whitespace-nowrap px-2 text-sm font-bold [writing-mode:vertical-lr]",r?"text-black":"text-white"),children:e===ym.SEQUENTIAL?`STEP ${n}`:(vm[t]||t).toUpperCase()})}),Em={white:"bg-white text-dark-300 border border-gray-300",primary:"bg-primary-600",secondary:"bg-secondary-500",success:"bg-success-600",info:"bg-info-500",warning:"bg-warning-500 text-gray-800",danger:"bg-danger-500",steel:"bg-steel-500",orange:"bg-orange-500",purple:"bg-purple-500",grayDark:"bg-gray-900",grayLight:"bg-gray-100 text-gray-800"},Sm={white:"text-white border border-white",primary:"text-primary-600 border border-primary-600",secondary:"text-secondary-500 border border-secondary-500",success:"text-success-600 border border-success-600",info:"text-info-500 border border-info-500",warning:"text-warning-500 border border-warning-500",danger:"text-danger-500 border border-danger-500",steel:"text-steel-500 border border-steel-500",orange:"text-orange-500 border border-orange-500",purple:"text-purple-500 border border-purple-500",grayDark:"text-gray-700 border border-gray-700",grayLight:"text-gray-500 border border-gray-100"},Cm={white:"text-dark-300",primary:"text-white",secondary:"text-white",success:"text-white",info:"text-black",warning:"text-gray-800",danger:"text-white",steel:"text-white",orange:"text-black",purple:"text-white",grayDark:"text-white",grayLight:"text-gray-800"},km={normal:"rounded",pill:"rounded-pill"},Tm={big:"h-[24px] leading-[24px] text-md px-1",medium:"h-[22px] leading-[22px] text-sm px-[2px]",small:"h-[18px] leading-[18px] text-xs px-[2px]"},$c=({category:e="solid",color:t="primary",roundness:n="normal",size:r="medium",textClassName:o="uppercase",children:s,className:a,...i})=>{const l=d.useMemo(()=>Cm[t]??"text-white",[t]),c=d.useMemo(()=>un(l,e==="outline"?Sm[t]:Em[t],km[n],Tm[r]),[l,e,t,r,n]);return T.jsx("div",{className:un("ui-badge flex items-center font-bold",c,a),style:i==null?void 0:i.style,"data-testid":"badge","data-category":e,"data-color":t,...i,children:T.jsx("p",{className:un("mx-1",o),children:s})})},Om={[he.OPEN]:"secondary",[he.IN_PROGRESS]:"primary",[he.IN_REVIEW]:"success",[he.COMPLETED]:"success"},Pm=({status:e})=>T.jsx($c,{category:"outline",color:Om[e],children:e});/*!
|
|
2
22
|
* Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com
|
|
3
23
|
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
|
4
24
|
* Copyright 2024 Fonticons, Inc.
|
|
5
|
-
*/const
|
|
25
|
+
*/const Am={prefix:"fas",iconName:"square-check",icon:[448,512,[9745,9989,61510,"check-square"],"f14a","M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM337 209L209 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L303 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"]},Rm=Am,$m={prefix:"fas",iconName:"arrow-right",icon:[448,512,[8594],"f061","M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z"]},Fm={prefix:"fas",iconName:"chevron-down",icon:[512,512,[],"f078","M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]};/*!
|
|
6
26
|
* Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com
|
|
7
27
|
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
|
8
28
|
* Copyright 2024 Fonticons, Inc.
|
|
9
|
-
*/function bd(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 Ea(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ea(Object(n),!0).forEach(function(r){bd(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ea(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yd(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vd(e){var t=yd(e,"string");return typeof t=="symbol"?t:t+""}const Sa=()=>{};let js={},xl={},El=null,Sl={mark:Sa,measure:Sa};try{typeof window<"u"&&(js=window),typeof document<"u"&&(xl=document),typeof MutationObserver<"u"&&(El=MutationObserver),typeof performance<"u"&&(Sl=performance)}catch{}const{userAgent:Ca=""}=js.navigator||{},At=js,de=xl,ka=El,pr=Sl;At.document;const lt=!!de.documentElement&&!!de.head&&typeof de.addEventListener=="function"&&typeof de.createElement=="function",Cl=~Ca.indexOf("MSIE")||~Ca.indexOf("Trident/");var wd=/fa(s|r|l|t|d|dr|dl|dt|b|k|kd|ss|sr|sl|st|sds|sdr|sdl|sdt)?[\-\ ]/,xd=/Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit)?.*/i,kl={classic:{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fab:"brands","fa-brands":"brands"},duotone:{fa:"solid",fad:"solid","fa-solid":"solid","fa-duotone":"solid",fadr:"regular","fa-regular":"regular",fadl:"light","fa-light":"light",fadt:"thin","fa-thin":"thin"},sharp:{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light",fast:"thin","fa-thin":"thin"},"sharp-duotone":{fa:"solid",fasds:"solid","fa-solid":"solid",fasdr:"regular","fa-regular":"regular",fasdl:"light","fa-light":"light",fasdt:"thin","fa-thin":"thin"}},Ed={GROUP:"duotone-group",PRIMARY:"primary",SECONDARY:"secondary"},Tl=["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone"],Ee="classic",zr="duotone",Sd="sharp",Cd="sharp-duotone",Ol=[Ee,zr,Sd,Cd],kd={classic:{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},duotone:{900:"fad",400:"fadr",300:"fadl",100:"fadt"},sharp:{900:"fass",400:"fasr",300:"fasl",100:"fast"},"sharp-duotone":{900:"fasds",400:"fasdr",300:"fasdl",100:"fasdt"}},Td={"Font Awesome 6 Free":{900:"fas",400:"far"},"Font Awesome 6 Pro":{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},"Font Awesome 6 Brands":{400:"fab",normal:"fab"},"Font Awesome 6 Duotone":{900:"fad",400:"fadr",normal:"fadr",300:"fadl",100:"fadt"},"Font Awesome 6 Sharp":{900:"fass",400:"fasr",normal:"fasr",300:"fasl",100:"fast"},"Font Awesome 6 Sharp Duotone":{900:"fasds",400:"fasdr",normal:"fasdr",300:"fasdl",100:"fasdt"}},Od=new Map([["classic",{defaultShortPrefixId:"fas",defaultStyleId:"solid",styleIds:["solid","regular","light","thin","brands"],futureStyleIds:[],defaultFontWeight:900}],["sharp",{defaultShortPrefixId:"fass",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["duotone",{defaultShortPrefixId:"fad",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["sharp-duotone",{defaultShortPrefixId:"fasds",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}]]),Pd={classic:{solid:"fas",regular:"far",light:"fal",thin:"fat",brands:"fab"},duotone:{solid:"fad",regular:"fadr",light:"fadl",thin:"fadt"},sharp:{solid:"fass",regular:"fasr",light:"fasl",thin:"fast"},"sharp-duotone":{solid:"fasds",regular:"fasdr",light:"fasdl",thin:"fasdt"}},Ad=["fak","fa-kit","fakd","fa-kit-duotone"],Ta={kit:{fak:"kit","fa-kit":"kit"},"kit-duotone":{fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"}},Rd=["kit"],$d={kit:{"fa-kit":"fak"}},Fd=["fak","fakd"],Id={kit:{fak:"fa-kit"}},Oa={kit:{kit:"fak"},"kit-duotone":{"kit-duotone":"fakd"}},mr={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},Md=["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone"],Ld=["fak","fa-kit","fakd","fa-kit-duotone"],Nd={"Font Awesome Kit":{400:"fak",normal:"fak"},"Font Awesome Kit Duotone":{400:"fakd",normal:"fakd"}},_d={classic:{"fa-brands":"fab","fa-duotone":"fad","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},duotone:{"fa-regular":"fadr","fa-light":"fadl","fa-thin":"fadt"},sharp:{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"},"sharp-duotone":{"fa-solid":"fasds","fa-regular":"fasdr","fa-light":"fasdl","fa-thin":"fasdt"}},Dd={classic:["fas","far","fal","fat","fad"],duotone:["fadr","fadl","fadt"],sharp:["fass","fasr","fasl","fast"],"sharp-duotone":["fasds","fasdr","fasdl","fasdt"]},ts={classic:{fab:"fa-brands",fad:"fa-duotone",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},duotone:{fadr:"fa-regular",fadl:"fa-light",fadt:"fa-thin"},sharp:{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"},"sharp-duotone":{fasds:"fa-solid",fasdr:"fa-regular",fasdl:"fa-light",fasdt:"fa-thin"}},jd=["fa-solid","fa-regular","fa-light","fa-thin","fa-duotone","fa-brands"],ns=["fa","fas","far","fal","fat","fad","fadr","fadl","fadt","fab","fass","fasr","fasl","fast","fasds","fasdr","fasdl","fasdt",...Md,...jd],zd=["solid","regular","light","thin","duotone","brands"],Pl=[1,2,3,4,5,6,7,8,9,10],Hd=Pl.concat([11,12,13,14,15,16,17,18,19,20]),Wd=[...Object.keys(Dd),...zd,"2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","fw","inverse","layers-counter","layers-text","layers","li","pull-left","pull-right","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul",mr.GROUP,mr.SWAP_OPACITY,mr.PRIMARY,mr.SECONDARY].concat(Pl.map(e=>"".concat(e,"x"))).concat(Hd.map(e=>"w-".concat(e))),Ud={"Font Awesome 5 Free":{900:"fas",400:"far"},"Font Awesome 5 Pro":{900:"fas",400:"far",normal:"far",300:"fal"},"Font Awesome 5 Brands":{400:"fab",normal:"fab"},"Font Awesome 5 Duotone":{900:"fad"}};const ot="___FONT_AWESOME___",rs=16,Al="fa",Rl="svg-inline--fa",Jt="data-fa-i2svg",os="data-fa-pseudo-element",Bd="data-fa-pseudo-element-pending",zs="data-prefix",Hs="data-icon",Pa="fontawesome-i2svg",qd="async",Vd=["HTML","HEAD","STYLE","SCRIPT"],$l=(()=>{try{return process.env.NODE_ENV==="production"}catch{return!1}})();function rr(e){return new Proxy(e,{get(t,n){return n in t?t[n]:t[Ee]}})}const Fl=k({},kl);Fl[Ee]=k(k(k(k({},{"fa-duotone":"duotone"}),kl[Ee]),Ta.kit),Ta["kit-duotone"]);const Gd=rr(Fl),ss=k({},Pd);ss[Ee]=k(k(k(k({},{duotone:"fad"}),ss[Ee]),Oa.kit),Oa["kit-duotone"]);const Aa=rr(ss),as=k({},ts);as[Ee]=k(k({},as[Ee]),Id.kit);const Ws=rr(as),is=k({},_d);is[Ee]=k(k({},is[Ee]),$d.kit);rr(is);const Kd=wd,Il="fa-layers-text",Yd=xd,Qd=k({},kd);rr(Qd);const Xd=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],ho=Ed,Jd=[...Rd,...Wd],Wn=At.FontAwesomeConfig||{};function Zd(e){var t=de.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}function eh(e){return e===""?!0:e==="false"?!1:e==="true"?!0:e}de&&typeof de.querySelector=="function"&&[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]].forEach(t=>{let[n,r]=t;const o=eh(Zd(n));o!=null&&(Wn[r]=o)});const Ml={styleDefault:"solid",familyDefault:Ee,cssPrefix:Al,replacementClass:Rl,autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};Wn.familyPrefix&&(Wn.cssPrefix=Wn.familyPrefix);const Pn=k(k({},Ml),Wn);Pn.autoReplaceSvg||(Pn.observeMutations=!1);const j={};Object.keys(Ml).forEach(e=>{Object.defineProperty(j,e,{enumerable:!0,set:function(t){Pn[e]=t,Un.forEach(n=>n(j))},get:function(){return Pn[e]}})});Object.defineProperty(j,"familyPrefix",{enumerable:!0,set:function(e){Pn.cssPrefix=e,Un.forEach(t=>t(j))},get:function(){return Pn.cssPrefix}});At.FontAwesomeConfig=j;const Un=[];function th(e){return Un.push(e),()=>{Un.splice(Un.indexOf(e),1)}}const ht=rs,Ve={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function nh(e){if(!e||!lt)return;const t=de.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;const n=de.head.childNodes;let r=null;for(let o=n.length-1;o>-1;o--){const s=n[o],a=(s.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(a)>-1&&(r=s)}return de.head.insertBefore(t,r),e}const rh="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function Yn(){let e=12,t="";for(;e-- >0;)t+=rh[Math.random()*62|0];return t}function Fn(e){const t=[];for(let n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function Us(e){return e.classList?Fn(e.classList):(e.getAttribute("class")||"").split(" ").filter(t=>t)}function Ll(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function oh(e){return Object.keys(e||{}).reduce((t,n)=>t+"".concat(n,'="').concat(Ll(e[n]),'" '),"").trim()}function Hr(e){return Object.keys(e||{}).reduce((t,n)=>t+"".concat(n,": ").concat(e[n].trim(),";"),"")}function Bs(e){return e.size!==Ve.size||e.x!==Ve.x||e.y!==Ve.y||e.rotate!==Ve.rotate||e.flipX||e.flipY}function sh(e){let{transform:t,containerWidth:n,iconWidth:r}=e;const o={transform:"translate(".concat(n/2," 256)")},s="translate(".concat(t.x*32,", ").concat(t.y*32,") "),a="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),i="rotate(".concat(t.rotate," 0 0)"),l={transform:"".concat(s," ").concat(a," ").concat(i)},c={transform:"translate(".concat(r/2*-1," -256)")};return{outer:o,inner:l,path:c}}function ah(e){let{transform:t,width:n=rs,height:r=rs,startCentered:o=!1}=e,s="";return o&&Cl?s+="translate(".concat(t.x/ht-n/2,"em, ").concat(t.y/ht-r/2,"em) "):o?s+="translate(calc(-50% + ".concat(t.x/ht,"em), calc(-50% + ").concat(t.y/ht,"em)) "):s+="translate(".concat(t.x/ht,"em, ").concat(t.y/ht,"em) "),s+="scale(".concat(t.size/ht*(t.flipX?-1:1),", ").concat(t.size/ht*(t.flipY?-1:1),") "),s+="rotate(".concat(t.rotate,"deg) "),s}var ih=`:root, :host {
|
|
29
|
+
*/function Im(e,t,n){return(t=Lm(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ba(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ba(Object(n),!0).forEach(function(r){Im(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ba(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Mm(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Lm(e){var t=Mm(e,"string");return typeof t=="symbol"?t:t+""}const qa=()=>{};let Qs={},Fc={},Ic=null,Mc={mark:qa,measure:qa};try{typeof window<"u"&&(Qs=window),typeof document<"u"&&(Fc=document),typeof MutationObserver<"u"&&(Ic=MutationObserver),typeof performance<"u"&&(Mc=performance)}catch{}const{userAgent:Va=""}=Qs.navigator||{},Rt=Qs,de=Fc,Ga=Ic,br=Mc;Rt.document;const ft=!!de.documentElement&&!!de.head&&typeof de.addEventListener=="function"&&typeof de.createElement=="function",Lc=~Va.indexOf("MSIE")||~Va.indexOf("Trident/");var Nm=/fa(s|r|l|t|d|dr|dl|dt|b|k|kd|ss|sr|sl|st|sds|sdr|sdl|sdt)?[\-\ ]/,_m=/Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit)?.*/i,Nc={classic:{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fab:"brands","fa-brands":"brands"},duotone:{fa:"solid",fad:"solid","fa-solid":"solid","fa-duotone":"solid",fadr:"regular","fa-regular":"regular",fadl:"light","fa-light":"light",fadt:"thin","fa-thin":"thin"},sharp:{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light",fast:"thin","fa-thin":"thin"},"sharp-duotone":{fa:"solid",fasds:"solid","fa-solid":"solid",fasdr:"regular","fa-regular":"regular",fasdl:"light","fa-light":"light",fasdt:"thin","fa-thin":"thin"}},Dm={GROUP:"duotone-group",PRIMARY:"primary",SECONDARY:"secondary"},_c=["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone"],Ee="classic",ro="duotone",jm="sharp",zm="sharp-duotone",Dc=[Ee,ro,jm,zm],Hm={classic:{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},duotone:{900:"fad",400:"fadr",300:"fadl",100:"fadt"},sharp:{900:"fass",400:"fasr",300:"fasl",100:"fast"},"sharp-duotone":{900:"fasds",400:"fasdr",300:"fasdl",100:"fasdt"}},Wm={"Font Awesome 6 Free":{900:"fas",400:"far"},"Font Awesome 6 Pro":{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},"Font Awesome 6 Brands":{400:"fab",normal:"fab"},"Font Awesome 6 Duotone":{900:"fad",400:"fadr",normal:"fadr",300:"fadl",100:"fadt"},"Font Awesome 6 Sharp":{900:"fass",400:"fasr",normal:"fasr",300:"fasl",100:"fast"},"Font Awesome 6 Sharp Duotone":{900:"fasds",400:"fasdr",normal:"fasdr",300:"fasdl",100:"fasdt"}},Um=new Map([["classic",{defaultShortPrefixId:"fas",defaultStyleId:"solid",styleIds:["solid","regular","light","thin","brands"],futureStyleIds:[],defaultFontWeight:900}],["sharp",{defaultShortPrefixId:"fass",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["duotone",{defaultShortPrefixId:"fad",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["sharp-duotone",{defaultShortPrefixId:"fasds",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}]]),Bm={classic:{solid:"fas",regular:"far",light:"fal",thin:"fat",brands:"fab"},duotone:{solid:"fad",regular:"fadr",light:"fadl",thin:"fadt"},sharp:{solid:"fass",regular:"fasr",light:"fasl",thin:"fast"},"sharp-duotone":{solid:"fasds",regular:"fasdr",light:"fasdl",thin:"fasdt"}},qm=["fak","fa-kit","fakd","fa-kit-duotone"],Ka={kit:{fak:"kit","fa-kit":"kit"},"kit-duotone":{fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"}},Vm=["kit"],Gm={kit:{"fa-kit":"fak"}},Km=["fak","fakd"],Ym={kit:{fak:"fa-kit"}},Ya={kit:{kit:"fak"},"kit-duotone":{"kit-duotone":"fakd"}},yr={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},Qm=["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone"],Xm=["fak","fa-kit","fakd","fa-kit-duotone"],Jm={"Font Awesome Kit":{400:"fak",normal:"fak"},"Font Awesome Kit Duotone":{400:"fakd",normal:"fakd"}},Zm={classic:{"fa-brands":"fab","fa-duotone":"fad","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},duotone:{"fa-regular":"fadr","fa-light":"fadl","fa-thin":"fadt"},sharp:{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"},"sharp-duotone":{"fa-solid":"fasds","fa-regular":"fasdr","fa-light":"fasdl","fa-thin":"fasdt"}},eg={classic:["fas","far","fal","fat","fad"],duotone:["fadr","fadl","fadt"],sharp:["fass","fasr","fasl","fast"],"sharp-duotone":["fasds","fasdr","fasdl","fasdt"]},hs={classic:{fab:"fa-brands",fad:"fa-duotone",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},duotone:{fadr:"fa-regular",fadl:"fa-light",fadt:"fa-thin"},sharp:{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"},"sharp-duotone":{fasds:"fa-solid",fasdr:"fa-regular",fasdl:"fa-light",fasdt:"fa-thin"}},tg=["fa-solid","fa-regular","fa-light","fa-thin","fa-duotone","fa-brands"],ps=["fa","fas","far","fal","fat","fad","fadr","fadl","fadt","fab","fass","fasr","fasl","fast","fasds","fasdr","fasdl","fasdt",...Qm,...tg],ng=["solid","regular","light","thin","duotone","brands"],jc=[1,2,3,4,5,6,7,8,9,10],rg=jc.concat([11,12,13,14,15,16,17,18,19,20]),og=[...Object.keys(eg),...ng,"2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","fw","inverse","layers-counter","layers-text","layers","li","pull-left","pull-right","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul",yr.GROUP,yr.SWAP_OPACITY,yr.PRIMARY,yr.SECONDARY].concat(jc.map(e=>"".concat(e,"x"))).concat(rg.map(e=>"w-".concat(e))),sg={"Font Awesome 5 Free":{900:"fas",400:"far"},"Font Awesome 5 Pro":{900:"fas",400:"far",normal:"far",300:"fal"},"Font Awesome 5 Brands":{400:"fab",normal:"fab"},"Font Awesome 5 Duotone":{900:"fad"}};const at="___FONT_AWESOME___",ms=16,zc="fa",Hc="svg-inline--fa",Zt="data-fa-i2svg",gs="data-fa-pseudo-element",ag="data-fa-pseudo-element-pending",Xs="data-prefix",Js="data-icon",Qa="fontawesome-i2svg",ig="async",lg=["HTML","HEAD","STYLE","SCRIPT"],Wc=(()=>{try{return process.env.NODE_ENV==="production"}catch{return!1}})();function ir(e){return new Proxy(e,{get(t,n){return n in t?t[n]:t[Ee]}})}const Uc=k({},Nc);Uc[Ee]=k(k(k(k({},{"fa-duotone":"duotone"}),Nc[Ee]),Ka.kit),Ka["kit-duotone"]);const cg=ir(Uc),bs=k({},Bm);bs[Ee]=k(k(k(k({},{duotone:"fad"}),bs[Ee]),Ya.kit),Ya["kit-duotone"]);const Xa=ir(bs),ys=k({},hs);ys[Ee]=k(k({},ys[Ee]),Ym.kit);const Zs=ir(ys),vs=k({},Zm);vs[Ee]=k(k({},vs[Ee]),Gm.kit);ir(vs);const ug=Nm,Bc="fa-layers-text",fg=_m,dg=k({},Hm);ir(dg);const hg=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],Eo=Dm,pg=[...Vm,...og],Vn=Rt.FontAwesomeConfig||{};function mg(e){var t=de.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}function gg(e){return e===""?!0:e==="false"?!1:e==="true"?!0:e}de&&typeof de.querySelector=="function"&&[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]].forEach(t=>{let[n,r]=t;const o=gg(mg(n));o!=null&&(Vn[r]=o)});const qc={styleDefault:"solid",familyDefault:Ee,cssPrefix:zc,replacementClass:Hc,autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};Vn.familyPrefix&&(Vn.cssPrefix=Vn.familyPrefix);const Pn=k(k({},qc),Vn);Pn.autoReplaceSvg||(Pn.observeMutations=!1);const j={};Object.keys(qc).forEach(e=>{Object.defineProperty(j,e,{enumerable:!0,set:function(t){Pn[e]=t,Gn.forEach(n=>n(j))},get:function(){return Pn[e]}})});Object.defineProperty(j,"familyPrefix",{enumerable:!0,set:function(e){Pn.cssPrefix=e,Gn.forEach(t=>t(j))},get:function(){return Pn.cssPrefix}});Rt.FontAwesomeConfig=j;const Gn=[];function bg(e){return Gn.push(e),()=>{Gn.splice(Gn.indexOf(e),1)}}const ht=ms,Ve={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function yg(e){if(!e||!ft)return;const t=de.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;const n=de.head.childNodes;let r=null;for(let o=n.length-1;o>-1;o--){const s=n[o],a=(s.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(a)>-1&&(r=s)}return de.head.insertBefore(t,r),e}const vg="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function Xn(){let e=12,t="";for(;e-- >0;)t+=vg[Math.random()*62|0];return t}function In(e){const t=[];for(let n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function ea(e){return e.classList?In(e.classList):(e.getAttribute("class")||"").split(" ").filter(t=>t)}function Vc(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function wg(e){return Object.keys(e||{}).reduce((t,n)=>t+"".concat(n,'="').concat(Vc(e[n]),'" '),"").trim()}function oo(e){return Object.keys(e||{}).reduce((t,n)=>t+"".concat(n,": ").concat(e[n].trim(),";"),"")}function ta(e){return e.size!==Ve.size||e.x!==Ve.x||e.y!==Ve.y||e.rotate!==Ve.rotate||e.flipX||e.flipY}function xg(e){let{transform:t,containerWidth:n,iconWidth:r}=e;const o={transform:"translate(".concat(n/2," 256)")},s="translate(".concat(t.x*32,", ").concat(t.y*32,") "),a="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),i="rotate(".concat(t.rotate," 0 0)"),l={transform:"".concat(s," ").concat(a," ").concat(i)},c={transform:"translate(".concat(r/2*-1," -256)")};return{outer:o,inner:l,path:c}}function Eg(e){let{transform:t,width:n=ms,height:r=ms,startCentered:o=!1}=e,s="";return o&&Lc?s+="translate(".concat(t.x/ht-n/2,"em, ").concat(t.y/ht-r/2,"em) "):o?s+="translate(calc(-50% + ".concat(t.x/ht,"em), calc(-50% + ").concat(t.y/ht,"em)) "):s+="translate(".concat(t.x/ht,"em, ").concat(t.y/ht,"em) "),s+="scale(".concat(t.size/ht*(t.flipX?-1:1),", ").concat(t.size/ht*(t.flipY?-1:1),") "),s+="rotate(".concat(t.rotate,"deg) "),s}var Sg=`:root, :host {
|
|
10
30
|
--fa-font-solid: normal 900 1em/1 "Font Awesome 6 Free";
|
|
11
31
|
--fa-font-regular: normal 400 1em/1 "Font Awesome 6 Free";
|
|
12
32
|
--fa-font-light: normal 300 1em/1 "Font Awesome 6 Pro";
|
|
@@ -559,46 +579,26 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
|
|
|
559
579
|
.svg-inline--fa mask .fa-primary,
|
|
560
580
|
.svg-inline--fa mask .fa-secondary {
|
|
561
581
|
fill: black;
|
|
562
|
-
}`;function Nl(){const e=Al,t=Rl,n=j.cssPrefix,r=j.replacementClass;let o=ih;if(n!==e||r!==t){const s=new RegExp("\\.".concat(e,"\\-"),"g"),a=new RegExp("\\--".concat(e,"\\-"),"g"),i=new RegExp("\\.".concat(t),"g");o=o.replace(s,".".concat(n,"-")).replace(a,"--".concat(n,"-")).replace(i,".".concat(r))}return o}let Ra=!1;function po(){j.autoAddCss&&!Ra&&(nh(Nl()),Ra=!0)}var lh={mixout(){return{dom:{css:Nl,insertCss:po}}},hooks(){return{beforeDOMElementCreation(){po()},beforeI2svg(){po()}}}};const st=At||{};st[ot]||(st[ot]={});st[ot].styles||(st[ot].styles={});st[ot].hooks||(st[ot].hooks={});st[ot].shims||(st[ot].shims=[]);var Ge=st[ot];const _l=[],Dl=function(){de.removeEventListener("DOMContentLoaded",Dl),Rr=1,_l.map(e=>e())};let Rr=!1;lt&&(Rr=(de.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(de.readyState),Rr||de.addEventListener("DOMContentLoaded",Dl));function ch(e){lt&&(Rr?setTimeout(e,0):_l.push(e))}function or(e){const{tag:t,attributes:n={},children:r=[]}=e;return typeof e=="string"?Ll(e):"<".concat(t," ").concat(oh(n),">").concat(r.map(or).join(""),"</").concat(t,">")}function $a(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}var mo=function(t,n,r,o){var s=Object.keys(t),a=s.length,i=n,l,c,u;for(r===void 0?(l=1,u=t[s[0]]):(l=0,u=r);l<a;l++)c=s[l],u=i(u,t[c],c,t);return u};function uh(e){const t=[];let n=0;const r=e.length;for(;n<r;){const o=e.charCodeAt(n++);if(o>=55296&&o<=56319&&n<r){const s=e.charCodeAt(n++);(s&64512)==56320?t.push(((o&1023)<<10)+(s&1023)+65536):(t.push(o),n--)}else t.push(o)}return t}function ls(e){const t=uh(e);return t.length===1?t[0].toString(16):null}function fh(e,t){const n=e.length;let r=e.charCodeAt(t),o;return r>=55296&&r<=56319&&n>t+1&&(o=e.charCodeAt(t+1),o>=56320&&o<=57343)?(r-55296)*1024+o-56320+65536:r}function Fa(e){return Object.keys(e).reduce((t,n)=>{const r=e[n];return!!r.icon?t[r.iconName]=r.icon:t[n]=r,t},{})}function cs(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{skipHooks:r=!1}=n,o=Fa(t);typeof Ge.hooks.addPack=="function"&&!r?Ge.hooks.addPack(e,Fa(t)):Ge.styles[e]=k(k({},Ge.styles[e]||{}),o),e==="fas"&&cs("fa",t)}const{styles:Qn,shims:dh}=Ge,jl=Object.keys(Ws),hh=jl.reduce((e,t)=>(e[t]=Object.keys(Ws[t]),e),{});let qs=null,zl={},Hl={},Wl={},Ul={},Bl={};function ph(e){return~Jd.indexOf(e)}function mh(e,t){const n=t.split("-"),r=n[0],o=n.slice(1).join("-");return r===e&&o!==""&&!ph(o)?o:null}const ql=()=>{const e=r=>mo(Qn,(o,s,a)=>(o[a]=mo(s,r,{}),o),{});zl=e((r,o,s)=>(o[3]&&(r[o[3]]=s),o[2]&&o[2].filter(i=>typeof i=="number").forEach(i=>{r[i.toString(16)]=s}),r)),Hl=e((r,o,s)=>(r[s]=s,o[2]&&o[2].filter(i=>typeof i=="string").forEach(i=>{r[i]=s}),r)),Bl=e((r,o,s)=>{const a=o[2];return r[s]=s,a.forEach(i=>{r[i]=s}),r});const t="far"in Qn||j.autoFetchSvg,n=mo(dh,(r,o)=>{const s=o[0];let a=o[1];const i=o[2];return a==="far"&&!t&&(a="fas"),typeof s=="string"&&(r.names[s]={prefix:a,iconName:i}),typeof s=="number"&&(r.unicodes[s.toString(16)]={prefix:a,iconName:i}),r},{names:{},unicodes:{}});Wl=n.names,Ul=n.unicodes,qs=Wr(j.styleDefault,{family:j.familyDefault})};th(e=>{qs=Wr(e.styleDefault,{family:j.familyDefault})});ql();function Vs(e,t){return(zl[e]||{})[t]}function gh(e,t){return(Hl[e]||{})[t]}function Dt(e,t){return(Bl[e]||{})[t]}function Vl(e){return Wl[e]||{prefix:null,iconName:null}}function bh(e){const t=Ul[e],n=Vs("fas",e);return t||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function Rt(){return qs}const Gl=()=>({prefix:null,iconName:null,rest:[]});function yh(e){let t=Ee;const n=jl.reduce((r,o)=>(r[o]="".concat(j.cssPrefix,"-").concat(o),r),{});return Ol.forEach(r=>{(e.includes(n[r])||e.some(o=>hh[r].includes(o)))&&(t=r)}),t}function Wr(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{family:n=Ee}=t,r=Gd[n][e];if(n===zr&&!e)return"fad";const o=Aa[n][e]||Aa[n][r],s=e in Ge.styles?e:null;return o||s||null}function vh(e){let t=[],n=null;return e.forEach(r=>{const o=mh(j.cssPrefix,r);o?n=o:r&&t.push(r)}),{iconName:n,rest:t}}function Ia(e){return e.sort().filter((t,n,r)=>r.indexOf(t)===n)}function Ur(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{skipLookups:n=!1}=t;let r=null;const o=ns.concat(Ld),s=Ia(e.filter(f=>o.includes(f))),a=Ia(e.filter(f=>!ns.includes(f))),i=s.filter(f=>(r=f,!Tl.includes(f))),[l=null]=i,c=yh(s),u=k(k({},vh(a)),{},{prefix:Wr(l,{family:c})});return k(k(k({},u),Sh({values:e,family:c,styles:Qn,config:j,canonical:u,givenPrefix:r})),wh(n,r,u))}function wh(e,t,n){let{prefix:r,iconName:o}=n;if(e||!r||!o)return{prefix:r,iconName:o};const s=t==="fa"?Vl(o):{},a=Dt(r,o);return o=s.iconName||a||o,r=s.prefix||r,r==="far"&&!Qn.far&&Qn.fas&&!j.autoFetchSvg&&(r="fas"),{prefix:r,iconName:o}}const xh=Ol.filter(e=>e!==Ee||e!==zr),Eh=Object.keys(ts).filter(e=>e!==Ee).map(e=>Object.keys(ts[e])).flat();function Sh(e){const{values:t,family:n,canonical:r,givenPrefix:o="",styles:s={},config:a={}}=e,i=n===zr,l=t.includes("fa-duotone")||t.includes("fad"),c=a.familyDefault==="duotone",u=r.prefix==="fad"||r.prefix==="fa-duotone";if(!i&&(l||c||u)&&(r.prefix="fad"),(t.includes("fa-brands")||t.includes("fab"))&&(r.prefix="fab"),!r.prefix&&xh.includes(n)&&(Object.keys(s).find(p=>Eh.includes(p))||a.autoFetchSvg)){const p=Od.get(n).defaultShortPrefixId;r.prefix=p,r.iconName=Dt(r.prefix,r.iconName)||r.iconName}return(r.prefix==="fa"||o==="fa")&&(r.prefix=Rt()||"fas"),r}class Ch{constructor(){this.definitions={}}add(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o=n.reduce(this._pullDefinitions,{});Object.keys(o).forEach(s=>{this.definitions[s]=k(k({},this.definitions[s]||{}),o[s]),cs(s,o[s]);const a=Ws[Ee][s];a&&cs(a,o[s]),ql()})}reset(){this.definitions={}}_pullDefinitions(t,n){const r=n.prefix&&n.iconName&&n.icon?{0:n}:n;return Object.keys(r).map(o=>{const{prefix:s,iconName:a,icon:i}=r[o],l=i[2];t[s]||(t[s]={}),l.length>0&&l.forEach(c=>{typeof c=="string"&&(t[s][c]=i)}),t[s][a]=i}),t}}let Ma=[],an={};const fn={},kh=Object.keys(fn);function Th(e,t){let{mixoutsTo:n}=t;return Ma=e,an={},Object.keys(fn).forEach(r=>{kh.indexOf(r)===-1&&delete fn[r]}),Ma.forEach(r=>{const o=r.mixout?r.mixout():{};if(Object.keys(o).forEach(s=>{typeof o[s]=="function"&&(n[s]=o[s]),typeof o[s]=="object"&&Object.keys(o[s]).forEach(a=>{n[s]||(n[s]={}),n[s][a]=o[s][a]})}),r.hooks){const s=r.hooks();Object.keys(s).forEach(a=>{an[a]||(an[a]=[]),an[a].push(s[a])})}r.provides&&r.provides(fn)}),n}function us(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return(an[e]||[]).forEach(a=>{t=a.apply(null,[t,...r])}),t}function Zt(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];(an[e]||[]).forEach(s=>{s.apply(null,n)})}function $t(){const e=arguments[0],t=Array.prototype.slice.call(arguments,1);return fn[e]?fn[e].apply(null,t):void 0}function fs(e){e.prefix==="fa"&&(e.prefix="fas");let{iconName:t}=e;const n=e.prefix||Rt();if(t)return t=Dt(n,t)||t,$a(Kl.definitions,n,t)||$a(Ge.styles,n,t)}const Kl=new Ch,Oh=()=>{j.autoReplaceSvg=!1,j.observeMutations=!1,Zt("noAuto")},Ph={i2svg:function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return lt?(Zt("beforeI2svg",e),$t("pseudoElements2svg",e),$t("i2svg",e)):Promise.reject(new Error("Operation requires a DOM of some kind."))},watch:function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{autoReplaceSvgRoot:t}=e;j.autoReplaceSvg===!1&&(j.autoReplaceSvg=!0),j.observeMutations=!0,ch(()=>{Rh({autoReplaceSvgRoot:t}),Zt("watch",e)})}},Ah={icon:e=>{if(e===null)return null;if(typeof e=="object"&&e.prefix&&e.iconName)return{prefix:e.prefix,iconName:Dt(e.prefix,e.iconName)||e.iconName};if(Array.isArray(e)&&e.length===2){const t=e[1].indexOf("fa-")===0?e[1].slice(3):e[1],n=Wr(e[0]);return{prefix:n,iconName:Dt(n,t)||t}}if(typeof e=="string"&&(e.indexOf("".concat(j.cssPrefix,"-"))>-1||e.match(Kd))){const t=Ur(e.split(" "),{skipLookups:!0});return{prefix:t.prefix||Rt(),iconName:Dt(t.prefix,t.iconName)||t.iconName}}if(typeof e=="string"){const t=Rt();return{prefix:t,iconName:Dt(t,e)||e}}}},Re={noAuto:Oh,config:j,dom:Ph,parse:Ah,library:Kl,findIconDefinition:fs,toHtml:or},Rh=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{autoReplaceSvgRoot:t=de}=e;(Object.keys(Ge.styles).length>0||j.autoFetchSvg)&<&&j.autoReplaceSvg&&Re.dom.i2svg({node:t})};function Br(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(n=>or(n))}}),Object.defineProperty(e,"node",{get:function(){if(!lt)return;const n=de.createElement("div");return n.innerHTML=e.html,n.children}}),e}function $h(e){let{children:t,main:n,mask:r,attributes:o,styles:s,transform:a}=e;if(Bs(a)&&n.found&&!r.found){const{width:i,height:l}=n,c={x:i/l/2,y:.5};o.style=Hr(k(k({},s),{},{"transform-origin":"".concat(c.x+a.x/16,"em ").concat(c.y+a.y/16,"em")}))}return[{tag:"svg",attributes:o,children:t}]}function Fh(e){let{prefix:t,iconName:n,children:r,attributes:o,symbol:s}=e;const a=s===!0?"".concat(t,"-").concat(j.cssPrefix,"-").concat(n):s;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:k(k({},o),{},{id:a}),children:r}]}]}function Gs(e){const{icons:{main:t,mask:n},prefix:r,iconName:o,transform:s,symbol:a,title:i,maskId:l,titleId:c,extra:u,watchable:f=!1}=e,{width:p,height:h}=n.found?n:t,b=Fd.includes(r),g=[j.replacementClass,o?"".concat(j.cssPrefix,"-").concat(o):""].filter(v=>u.classes.indexOf(v)===-1).filter(v=>v!==""||!!v).concat(u.classes).join(" ");let y={children:[],attributes:k(k({},u.attributes),{},{"data-prefix":r,"data-icon":o,class:g,role:u.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(p," ").concat(h)})};const x=b&&!~u.classes.indexOf("fa-fw")?{width:"".concat(p/h*16*.0625,"em")}:{};f&&(y.attributes[Jt]=""),i&&(y.children.push({tag:"title",attributes:{id:y.attributes["aria-labelledby"]||"title-".concat(c||Yn())},children:[i]}),delete y.attributes.title);const S=k(k({},y),{},{prefix:r,iconName:o,main:t,mask:n,maskId:l,transform:s,symbol:a,styles:k(k({},x),u.styles)}),{children:w,attributes:C}=n.found&&t.found?$t("generateAbstractMask",S)||{children:[],attributes:{}}:$t("generateAbstractIcon",S)||{children:[],attributes:{}};return S.children=w,S.attributes=C,a?Fh(S):$h(S)}function La(e){const{content:t,width:n,height:r,transform:o,title:s,extra:a,watchable:i=!1}=e,l=k(k(k({},a.attributes),s?{title:s}:{}),{},{class:a.classes.join(" ")});i&&(l[Jt]="");const c=k({},a.styles);Bs(o)&&(c.transform=ah({transform:o,startCentered:!0,width:n,height:r}),c["-webkit-transform"]=c.transform);const u=Hr(c);u.length>0&&(l.style=u);const f=[];return f.push({tag:"span",attributes:l,children:[t]}),s&&f.push({tag:"span",attributes:{class:"sr-only"},children:[s]}),f}function Ih(e){const{content:t,title:n,extra:r}=e,o=k(k(k({},r.attributes),n?{title:n}:{}),{},{class:r.classes.join(" ")}),s=Hr(r.styles);s.length>0&&(o.style=s);const a=[];return a.push({tag:"span",attributes:o,children:[t]}),n&&a.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),a}const{styles:go}=Ge;function ds(e){const t=e[0],n=e[1],[r]=e.slice(4);let o=null;return Array.isArray(r)?o={tag:"g",attributes:{class:"".concat(j.cssPrefix,"-").concat(ho.GROUP)},children:[{tag:"path",attributes:{class:"".concat(j.cssPrefix,"-").concat(ho.SECONDARY),fill:"currentColor",d:r[0]}},{tag:"path",attributes:{class:"".concat(j.cssPrefix,"-").concat(ho.PRIMARY),fill:"currentColor",d:r[1]}}]}:o={tag:"path",attributes:{fill:"currentColor",d:r}},{found:!0,width:t,height:n,icon:o}}const Mh={found:!1,width:512,height:512};function Lh(e,t){!$l&&!j.showMissingIcons&&e&&console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}function hs(e,t){let n=t;return t==="fa"&&j.styleDefault!==null&&(t=Rt()),new Promise((r,o)=>{if(n==="fa"){const s=Vl(e)||{};e=s.iconName||e,t=s.prefix||t}if(e&&t&&go[t]&&go[t][e]){const s=go[t][e];return r(ds(s))}Lh(e,t),r(k(k({},Mh),{},{icon:j.showMissingIcons&&e?$t("missingIconAbstract")||{}:{}}))})}const Na=()=>{},ps=j.measurePerformance&&pr&&pr.mark&&pr.measure?pr:{mark:Na,measure:Na},_n='FA "6.7.2"',Nh=e=>(ps.mark("".concat(_n," ").concat(e," begins")),()=>Yl(e)),Yl=e=>{ps.mark("".concat(_n," ").concat(e," ends")),ps.measure("".concat(_n," ").concat(e),"".concat(_n," ").concat(e," begins"),"".concat(_n," ").concat(e," ends"))};var Ks={begin:Nh,end:Yl};const Er=()=>{};function _a(e){return typeof(e.getAttribute?e.getAttribute(Jt):null)=="string"}function _h(e){const t=e.getAttribute?e.getAttribute(zs):null,n=e.getAttribute?e.getAttribute(Hs):null;return t&&n}function Dh(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(j.replacementClass)}function jh(){return j.autoReplaceSvg===!0?Sr.replace:Sr[j.autoReplaceSvg]||Sr.replace}function zh(e){return de.createElementNS("http://www.w3.org/2000/svg",e)}function Hh(e){return de.createElement(e)}function Ql(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{ceFn:n=e.tag==="svg"?zh:Hh}=t;if(typeof e=="string")return de.createTextNode(e);const r=n(e.tag);return Object.keys(e.attributes||[]).forEach(function(s){r.setAttribute(s,e.attributes[s])}),(e.children||[]).forEach(function(s){r.appendChild(Ql(s,{ceFn:n}))}),r}function Wh(e){let t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}const Sr={replace:function(e){const t=e[0];if(t.parentNode)if(e[1].forEach(n=>{t.parentNode.insertBefore(Ql(n),t)}),t.getAttribute(Jt)===null&&j.keepOriginalSource){let n=de.createComment(Wh(t));t.parentNode.replaceChild(n,t)}else t.remove()},nest:function(e){const t=e[0],n=e[1];if(~Us(t).indexOf(j.replacementClass))return Sr.replace(e);const r=new RegExp("".concat(j.cssPrefix,"-.*"));if(delete n[0].attributes.id,n[0].attributes.class){const s=n[0].attributes.class.split(" ").reduce((a,i)=>(i===j.replacementClass||i.match(r)?a.toSvg.push(i):a.toNode.push(i),a),{toNode:[],toSvg:[]});n[0].attributes.class=s.toSvg.join(" "),s.toNode.length===0?t.removeAttribute("class"):t.setAttribute("class",s.toNode.join(" "))}const o=n.map(s=>or(s)).join(`
|
|
563
|
-
`);t.setAttribute(
|
|
564
|
-
`),e.removeAttribute(n),r()}).catch(o)}else r()}else r()})}function
|
|
582
|
+
}`;function Gc(){const e=zc,t=Hc,n=j.cssPrefix,r=j.replacementClass;let o=Sg;if(n!==e||r!==t){const s=new RegExp("\\.".concat(e,"\\-"),"g"),a=new RegExp("\\--".concat(e,"\\-"),"g"),i=new RegExp("\\.".concat(t),"g");o=o.replace(s,".".concat(n,"-")).replace(a,"--".concat(n,"-")).replace(i,".".concat(r))}return o}let Ja=!1;function So(){j.autoAddCss&&!Ja&&(yg(Gc()),Ja=!0)}var Cg={mixout(){return{dom:{css:Gc,insertCss:So}}},hooks(){return{beforeDOMElementCreation(){So()},beforeI2svg(){So()}}}};const it=Rt||{};it[at]||(it[at]={});it[at].styles||(it[at].styles={});it[at].hooks||(it[at].hooks={});it[at].shims||(it[at].shims=[]);var Ge=it[at];const Kc=[],Yc=function(){de.removeEventListener("DOMContentLoaded",Yc),_r=1,Kc.map(e=>e())};let _r=!1;ft&&(_r=(de.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(de.readyState),_r||de.addEventListener("DOMContentLoaded",Yc));function kg(e){ft&&(_r?setTimeout(e,0):Kc.push(e))}function lr(e){const{tag:t,attributes:n={},children:r=[]}=e;return typeof e=="string"?Vc(e):"<".concat(t," ").concat(wg(n),">").concat(r.map(lr).join(""),"</").concat(t,">")}function Za(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}var Co=function(t,n,r,o){var s=Object.keys(t),a=s.length,i=n,l,c,u;for(r===void 0?(l=1,u=t[s[0]]):(l=0,u=r);l<a;l++)c=s[l],u=i(u,t[c],c,t);return u};function Tg(e){const t=[];let n=0;const r=e.length;for(;n<r;){const o=e.charCodeAt(n++);if(o>=55296&&o<=56319&&n<r){const s=e.charCodeAt(n++);(s&64512)==56320?t.push(((o&1023)<<10)+(s&1023)+65536):(t.push(o),n--)}else t.push(o)}return t}function ws(e){const t=Tg(e);return t.length===1?t[0].toString(16):null}function Og(e,t){const n=e.length;let r=e.charCodeAt(t),o;return r>=55296&&r<=56319&&n>t+1&&(o=e.charCodeAt(t+1),o>=56320&&o<=57343)?(r-55296)*1024+o-56320+65536:r}function ei(e){return Object.keys(e).reduce((t,n)=>{const r=e[n];return!!r.icon?t[r.iconName]=r.icon:t[n]=r,t},{})}function xs(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{skipHooks:r=!1}=n,o=ei(t);typeof Ge.hooks.addPack=="function"&&!r?Ge.hooks.addPack(e,ei(t)):Ge.styles[e]=k(k({},Ge.styles[e]||{}),o),e==="fas"&&xs("fa",t)}const{styles:Jn,shims:Pg}=Ge,Qc=Object.keys(Zs),Ag=Qc.reduce((e,t)=>(e[t]=Object.keys(Zs[t]),e),{});let na=null,Xc={},Jc={},Zc={},eu={},tu={};function Rg(e){return~pg.indexOf(e)}function $g(e,t){const n=t.split("-"),r=n[0],o=n.slice(1).join("-");return r===e&&o!==""&&!Rg(o)?o:null}const nu=()=>{const e=r=>Co(Jn,(o,s,a)=>(o[a]=Co(s,r,{}),o),{});Xc=e((r,o,s)=>(o[3]&&(r[o[3]]=s),o[2]&&o[2].filter(i=>typeof i=="number").forEach(i=>{r[i.toString(16)]=s}),r)),Jc=e((r,o,s)=>(r[s]=s,o[2]&&o[2].filter(i=>typeof i=="string").forEach(i=>{r[i]=s}),r)),tu=e((r,o,s)=>{const a=o[2];return r[s]=s,a.forEach(i=>{r[i]=s}),r});const t="far"in Jn||j.autoFetchSvg,n=Co(Pg,(r,o)=>{const s=o[0];let a=o[1];const i=o[2];return a==="far"&&!t&&(a="fas"),typeof s=="string"&&(r.names[s]={prefix:a,iconName:i}),typeof s=="number"&&(r.unicodes[s.toString(16)]={prefix:a,iconName:i}),r},{names:{},unicodes:{}});Zc=n.names,eu=n.unicodes,na=so(j.styleDefault,{family:j.familyDefault})};bg(e=>{na=so(e.styleDefault,{family:j.familyDefault})});nu();function ra(e,t){return(Xc[e]||{})[t]}function Fg(e,t){return(Jc[e]||{})[t]}function zt(e,t){return(tu[e]||{})[t]}function ru(e){return Zc[e]||{prefix:null,iconName:null}}function Ig(e){const t=eu[e],n=ra("fas",e);return t||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function $t(){return na}const ou=()=>({prefix:null,iconName:null,rest:[]});function Mg(e){let t=Ee;const n=Qc.reduce((r,o)=>(r[o]="".concat(j.cssPrefix,"-").concat(o),r),{});return Dc.forEach(r=>{(e.includes(n[r])||e.some(o=>Ag[r].includes(o)))&&(t=r)}),t}function so(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{family:n=Ee}=t,r=cg[n][e];if(n===ro&&!e)return"fad";const o=Xa[n][e]||Xa[n][r],s=e in Ge.styles?e:null;return o||s||null}function Lg(e){let t=[],n=null;return e.forEach(r=>{const o=$g(j.cssPrefix,r);o?n=o:r&&t.push(r)}),{iconName:n,rest:t}}function ti(e){return e.sort().filter((t,n,r)=>r.indexOf(t)===n)}function ao(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{skipLookups:n=!1}=t;let r=null;const o=ps.concat(Xm),s=ti(e.filter(f=>o.includes(f))),a=ti(e.filter(f=>!ps.includes(f))),i=s.filter(f=>(r=f,!_c.includes(f))),[l=null]=i,c=Mg(s),u=k(k({},Lg(a)),{},{prefix:so(l,{family:c})});return k(k(k({},u),jg({values:e,family:c,styles:Jn,config:j,canonical:u,givenPrefix:r})),Ng(n,r,u))}function Ng(e,t,n){let{prefix:r,iconName:o}=n;if(e||!r||!o)return{prefix:r,iconName:o};const s=t==="fa"?ru(o):{},a=zt(r,o);return o=s.iconName||a||o,r=s.prefix||r,r==="far"&&!Jn.far&&Jn.fas&&!j.autoFetchSvg&&(r="fas"),{prefix:r,iconName:o}}const _g=Dc.filter(e=>e!==Ee||e!==ro),Dg=Object.keys(hs).filter(e=>e!==Ee).map(e=>Object.keys(hs[e])).flat();function jg(e){const{values:t,family:n,canonical:r,givenPrefix:o="",styles:s={},config:a={}}=e,i=n===ro,l=t.includes("fa-duotone")||t.includes("fad"),c=a.familyDefault==="duotone",u=r.prefix==="fad"||r.prefix==="fa-duotone";if(!i&&(l||c||u)&&(r.prefix="fad"),(t.includes("fa-brands")||t.includes("fab"))&&(r.prefix="fab"),!r.prefix&&_g.includes(n)&&(Object.keys(s).find(p=>Dg.includes(p))||a.autoFetchSvg)){const p=Um.get(n).defaultShortPrefixId;r.prefix=p,r.iconName=zt(r.prefix,r.iconName)||r.iconName}return(r.prefix==="fa"||o==="fa")&&(r.prefix=$t()||"fas"),r}class zg{constructor(){this.definitions={}}add(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o=n.reduce(this._pullDefinitions,{});Object.keys(o).forEach(s=>{this.definitions[s]=k(k({},this.definitions[s]||{}),o[s]),xs(s,o[s]);const a=Zs[Ee][s];a&&xs(a,o[s]),nu()})}reset(){this.definitions={}}_pullDefinitions(t,n){const r=n.prefix&&n.iconName&&n.icon?{0:n}:n;return Object.keys(r).map(o=>{const{prefix:s,iconName:a,icon:i}=r[o],l=i[2];t[s]||(t[s]={}),l.length>0&&l.forEach(c=>{typeof c=="string"&&(t[s][c]=i)}),t[s][a]=i}),t}}let ni=[],an={};const hn={},Hg=Object.keys(hn);function Wg(e,t){let{mixoutsTo:n}=t;return ni=e,an={},Object.keys(hn).forEach(r=>{Hg.indexOf(r)===-1&&delete hn[r]}),ni.forEach(r=>{const o=r.mixout?r.mixout():{};if(Object.keys(o).forEach(s=>{typeof o[s]=="function"&&(n[s]=o[s]),typeof o[s]=="object"&&Object.keys(o[s]).forEach(a=>{n[s]||(n[s]={}),n[s][a]=o[s][a]})}),r.hooks){const s=r.hooks();Object.keys(s).forEach(a=>{an[a]||(an[a]=[]),an[a].push(s[a])})}r.provides&&r.provides(hn)}),n}function Es(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return(an[e]||[]).forEach(a=>{t=a.apply(null,[t,...r])}),t}function en(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];(an[e]||[]).forEach(s=>{s.apply(null,n)})}function Ft(){const e=arguments[0],t=Array.prototype.slice.call(arguments,1);return hn[e]?hn[e].apply(null,t):void 0}function Ss(e){e.prefix==="fa"&&(e.prefix="fas");let{iconName:t}=e;const n=e.prefix||$t();if(t)return t=zt(n,t)||t,Za(su.definitions,n,t)||Za(Ge.styles,n,t)}const su=new zg,Ug=()=>{j.autoReplaceSvg=!1,j.observeMutations=!1,en("noAuto")},Bg={i2svg:function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return ft?(en("beforeI2svg",e),Ft("pseudoElements2svg",e),Ft("i2svg",e)):Promise.reject(new Error("Operation requires a DOM of some kind."))},watch:function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{autoReplaceSvgRoot:t}=e;j.autoReplaceSvg===!1&&(j.autoReplaceSvg=!0),j.observeMutations=!0,kg(()=>{Vg({autoReplaceSvgRoot:t}),en("watch",e)})}},qg={icon:e=>{if(e===null)return null;if(typeof e=="object"&&e.prefix&&e.iconName)return{prefix:e.prefix,iconName:zt(e.prefix,e.iconName)||e.iconName};if(Array.isArray(e)&&e.length===2){const t=e[1].indexOf("fa-")===0?e[1].slice(3):e[1],n=so(e[0]);return{prefix:n,iconName:zt(n,t)||t}}if(typeof e=="string"&&(e.indexOf("".concat(j.cssPrefix,"-"))>-1||e.match(ug))){const t=ao(e.split(" "),{skipLookups:!0});return{prefix:t.prefix||$t(),iconName:zt(t.prefix,t.iconName)||t.iconName}}if(typeof e=="string"){const t=$t();return{prefix:t,iconName:zt(t,e)||e}}}},Re={noAuto:Ug,config:j,dom:Bg,parse:qg,library:su,findIconDefinition:Ss,toHtml:lr},Vg=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{autoReplaceSvgRoot:t=de}=e;(Object.keys(Ge.styles).length>0||j.autoFetchSvg)&&ft&&j.autoReplaceSvg&&Re.dom.i2svg({node:t})};function io(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(n=>lr(n))}}),Object.defineProperty(e,"node",{get:function(){if(!ft)return;const n=de.createElement("div");return n.innerHTML=e.html,n.children}}),e}function Gg(e){let{children:t,main:n,mask:r,attributes:o,styles:s,transform:a}=e;if(ta(a)&&n.found&&!r.found){const{width:i,height:l}=n,c={x:i/l/2,y:.5};o.style=oo(k(k({},s),{},{"transform-origin":"".concat(c.x+a.x/16,"em ").concat(c.y+a.y/16,"em")}))}return[{tag:"svg",attributes:o,children:t}]}function Kg(e){let{prefix:t,iconName:n,children:r,attributes:o,symbol:s}=e;const a=s===!0?"".concat(t,"-").concat(j.cssPrefix,"-").concat(n):s;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:k(k({},o),{},{id:a}),children:r}]}]}function oa(e){const{icons:{main:t,mask:n},prefix:r,iconName:o,transform:s,symbol:a,title:i,maskId:l,titleId:c,extra:u,watchable:f=!1}=e,{width:p,height:h}=n.found?n:t,b=Km.includes(r),g=[j.replacementClass,o?"".concat(j.cssPrefix,"-").concat(o):""].filter(v=>u.classes.indexOf(v)===-1).filter(v=>v!==""||!!v).concat(u.classes).join(" ");let y={children:[],attributes:k(k({},u.attributes),{},{"data-prefix":r,"data-icon":o,class:g,role:u.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(p," ").concat(h)})};const x=b&&!~u.classes.indexOf("fa-fw")?{width:"".concat(p/h*16*.0625,"em")}:{};f&&(y.attributes[Zt]=""),i&&(y.children.push({tag:"title",attributes:{id:y.attributes["aria-labelledby"]||"title-".concat(c||Xn())},children:[i]}),delete y.attributes.title);const S=k(k({},y),{},{prefix:r,iconName:o,main:t,mask:n,maskId:l,transform:s,symbol:a,styles:k(k({},x),u.styles)}),{children:w,attributes:C}=n.found&&t.found?Ft("generateAbstractMask",S)||{children:[],attributes:{}}:Ft("generateAbstractIcon",S)||{children:[],attributes:{}};return S.children=w,S.attributes=C,a?Kg(S):Gg(S)}function ri(e){const{content:t,width:n,height:r,transform:o,title:s,extra:a,watchable:i=!1}=e,l=k(k(k({},a.attributes),s?{title:s}:{}),{},{class:a.classes.join(" ")});i&&(l[Zt]="");const c=k({},a.styles);ta(o)&&(c.transform=Eg({transform:o,startCentered:!0,width:n,height:r}),c["-webkit-transform"]=c.transform);const u=oo(c);u.length>0&&(l.style=u);const f=[];return f.push({tag:"span",attributes:l,children:[t]}),s&&f.push({tag:"span",attributes:{class:"sr-only"},children:[s]}),f}function Yg(e){const{content:t,title:n,extra:r}=e,o=k(k(k({},r.attributes),n?{title:n}:{}),{},{class:r.classes.join(" ")}),s=oo(r.styles);s.length>0&&(o.style=s);const a=[];return a.push({tag:"span",attributes:o,children:[t]}),n&&a.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),a}const{styles:ko}=Ge;function Cs(e){const t=e[0],n=e[1],[r]=e.slice(4);let o=null;return Array.isArray(r)?o={tag:"g",attributes:{class:"".concat(j.cssPrefix,"-").concat(Eo.GROUP)},children:[{tag:"path",attributes:{class:"".concat(j.cssPrefix,"-").concat(Eo.SECONDARY),fill:"currentColor",d:r[0]}},{tag:"path",attributes:{class:"".concat(j.cssPrefix,"-").concat(Eo.PRIMARY),fill:"currentColor",d:r[1]}}]}:o={tag:"path",attributes:{fill:"currentColor",d:r}},{found:!0,width:t,height:n,icon:o}}const Qg={found:!1,width:512,height:512};function Xg(e,t){!Wc&&!j.showMissingIcons&&e&&console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}function ks(e,t){let n=t;return t==="fa"&&j.styleDefault!==null&&(t=$t()),new Promise((r,o)=>{if(n==="fa"){const s=ru(e)||{};e=s.iconName||e,t=s.prefix||t}if(e&&t&&ko[t]&&ko[t][e]){const s=ko[t][e];return r(Cs(s))}Xg(e,t),r(k(k({},Qg),{},{icon:j.showMissingIcons&&e?Ft("missingIconAbstract")||{}:{}}))})}const oi=()=>{},Ts=j.measurePerformance&&br&&br.mark&&br.measure?br:{mark:oi,measure:oi},zn='FA "6.7.2"',Jg=e=>(Ts.mark("".concat(zn," ").concat(e," begins")),()=>au(e)),au=e=>{Ts.mark("".concat(zn," ").concat(e," ends")),Ts.measure("".concat(zn," ").concat(e),"".concat(zn," ").concat(e," begins"),"".concat(zn," ").concat(e," ends"))};var sa={begin:Jg,end:au};const Sr=()=>{};function si(e){return typeof(e.getAttribute?e.getAttribute(Zt):null)=="string"}function Zg(e){const t=e.getAttribute?e.getAttribute(Xs):null,n=e.getAttribute?e.getAttribute(Js):null;return t&&n}function eb(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(j.replacementClass)}function tb(){return j.autoReplaceSvg===!0?Cr.replace:Cr[j.autoReplaceSvg]||Cr.replace}function nb(e){return de.createElementNS("http://www.w3.org/2000/svg",e)}function rb(e){return de.createElement(e)}function iu(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{ceFn:n=e.tag==="svg"?nb:rb}=t;if(typeof e=="string")return de.createTextNode(e);const r=n(e.tag);return Object.keys(e.attributes||[]).forEach(function(s){r.setAttribute(s,e.attributes[s])}),(e.children||[]).forEach(function(s){r.appendChild(iu(s,{ceFn:n}))}),r}function ob(e){let t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}const Cr={replace:function(e){const t=e[0];if(t.parentNode)if(e[1].forEach(n=>{t.parentNode.insertBefore(iu(n),t)}),t.getAttribute(Zt)===null&&j.keepOriginalSource){let n=de.createComment(ob(t));t.parentNode.replaceChild(n,t)}else t.remove()},nest:function(e){const t=e[0],n=e[1];if(~ea(t).indexOf(j.replacementClass))return Cr.replace(e);const r=new RegExp("".concat(j.cssPrefix,"-.*"));if(delete n[0].attributes.id,n[0].attributes.class){const s=n[0].attributes.class.split(" ").reduce((a,i)=>(i===j.replacementClass||i.match(r)?a.toSvg.push(i):a.toNode.push(i),a),{toNode:[],toSvg:[]});n[0].attributes.class=s.toSvg.join(" "),s.toNode.length===0?t.removeAttribute("class"):t.setAttribute("class",s.toNode.join(" "))}const o=n.map(s=>lr(s)).join(`
|
|
583
|
+
`);t.setAttribute(Zt,""),t.innerHTML=o}};function ai(e){e()}function lu(e,t){const n=typeof t=="function"?t:Sr;if(e.length===0)n();else{let r=ai;j.mutateApproach===ig&&(r=Rt.requestAnimationFrame||ai),r(()=>{const o=tb(),s=sa.begin("mutate");e.map(o),s(),n()})}}let aa=!1;function cu(){aa=!0}function Os(){aa=!1}let Dr=null;function ii(e){if(!Ga||!j.observeMutations)return;const{treeCallback:t=Sr,nodeCallback:n=Sr,pseudoElementsCallback:r=Sr,observeMutationsRoot:o=de}=e;Dr=new Ga(s=>{if(aa)return;const a=$t();In(s).forEach(i=>{if(i.type==="childList"&&i.addedNodes.length>0&&!si(i.addedNodes[0])&&(j.searchPseudoElements&&r(i.target),t(i.target)),i.type==="attributes"&&i.target.parentNode&&j.searchPseudoElements&&r(i.target.parentNode),i.type==="attributes"&&si(i.target)&&~hg.indexOf(i.attributeName))if(i.attributeName==="class"&&Zg(i.target)){const{prefix:l,iconName:c}=ao(ea(i.target));i.target.setAttribute(Xs,l||a),c&&i.target.setAttribute(Js,c)}else eb(i.target)&&n(i.target)})}),ft&&Dr.observe(o,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}function sb(){Dr&&Dr.disconnect()}function ab(e){const t=e.getAttribute("style");let n=[];return t&&(n=t.split(";").reduce((r,o)=>{const s=o.split(":"),a=s[0],i=s.slice(1);return a&&i.length>0&&(r[a]=i.join(":").trim()),r},{})),n}function ib(e){const t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),r=e.innerText!==void 0?e.innerText.trim():"";let o=ao(ea(e));return o.prefix||(o.prefix=$t()),t&&n&&(o.prefix=t,o.iconName=n),o.iconName&&o.prefix||(o.prefix&&r.length>0&&(o.iconName=Fg(o.prefix,e.innerText)||ra(o.prefix,ws(e.innerText))),!o.iconName&&j.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(o.iconName=e.firstChild.data)),o}function lb(e){const t=In(e.attributes).reduce((o,s)=>(o.name!=="class"&&o.name!=="style"&&(o[s.name]=s.value),o),{}),n=e.getAttribute("title"),r=e.getAttribute("data-fa-title-id");return j.autoA11y&&(n?t["aria-labelledby"]="".concat(j.replacementClass,"-title-").concat(r||Xn()):(t["aria-hidden"]="true",t.focusable="false")),t}function cb(){return{iconName:null,title:null,titleId:null,prefix:null,transform:Ve,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function li(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0};const{iconName:n,prefix:r,rest:o}=ib(e),s=lb(e),a=Es("parseNodeAttributes",{},e);let i=t.styleParser?ab(e):[];return k({iconName:n,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:r,transform:Ve,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:o,styles:i,attributes:s}},a)}const{styles:ub}=Ge;function uu(e){const t=j.autoReplaceSvg==="nest"?li(e,{styleParser:!1}):li(e);return~t.extra.classes.indexOf(Bc)?Ft("generateLayersText",e,t):Ft("generateSvgReplacementMutation",e,t)}function fb(){return[...qm,...ps]}function ci(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!ft)return Promise.resolve();const n=de.documentElement.classList,r=u=>n.add("".concat(Qa,"-").concat(u)),o=u=>n.remove("".concat(Qa,"-").concat(u)),s=j.autoFetchSvg?fb():_c.concat(Object.keys(ub));s.includes("fa")||s.push("fa");const a=[".".concat(Bc,":not([").concat(Zt,"])")].concat(s.map(u=>".".concat(u,":not([").concat(Zt,"])"))).join(", ");if(a.length===0)return Promise.resolve();let i=[];try{i=In(e.querySelectorAll(a))}catch{}if(i.length>0)r("pending"),o("complete");else return Promise.resolve();const l=sa.begin("onTree"),c=i.reduce((u,f)=>{try{const p=uu(f);p&&u.push(p)}catch(p){Wc||p.name==="MissingIcon"&&console.error(p)}return u},[]);return new Promise((u,f)=>{Promise.all(c).then(p=>{lu(p,()=>{r("active"),r("complete"),o("pending"),typeof t=="function"&&t(),l(),u()})}).catch(p=>{l(),f(p)})})}function db(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;uu(e).then(n=>{n&&lu([n],t)})}function hb(e){return function(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=(t||{}).icon?t:Ss(t||{});let{mask:o}=n;return o&&(o=(o||{}).icon?o:Ss(o||{})),e(r,k(k({},n),{},{mask:o}))}}const pb=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{transform:n=Ve,symbol:r=!1,mask:o=null,maskId:s=null,title:a=null,titleId:i=null,classes:l=[],attributes:c={},styles:u={}}=t;if(!e)return;const{prefix:f,iconName:p,icon:h}=e;return io(k({type:"icon"},e),()=>(en("beforeDOMElementCreation",{iconDefinition:e,params:t}),j.autoA11y&&(a?c["aria-labelledby"]="".concat(j.replacementClass,"-title-").concat(i||Xn()):(c["aria-hidden"]="true",c.focusable="false")),oa({icons:{main:Cs(h),mask:o?Cs(o.icon):{found:!1,width:null,height:null,icon:{}}},prefix:f,iconName:p,transform:k(k({},Ve),n),symbol:r,title:a,maskId:s,titleId:i,extra:{attributes:c,styles:u,classes:l}})))};var mb={mixout(){return{icon:hb(pb)}},hooks(){return{mutationObserverCallbacks(e){return e.treeCallback=ci,e.nodeCallback=db,e}}},provides(e){e.i2svg=function(t){const{node:n=de,callback:r=()=>{}}=t;return ci(n,r)},e.generateSvgReplacementMutation=function(t,n){const{iconName:r,title:o,titleId:s,prefix:a,transform:i,symbol:l,mask:c,maskId:u,extra:f}=n;return new Promise((p,h)=>{Promise.all([ks(r,a),c.iconName?ks(c.iconName,c.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(b=>{let[g,y]=b;p([t,oa({icons:{main:g,mask:y},prefix:a,iconName:r,transform:i,symbol:l,maskId:u,title:o,titleId:s,extra:f,watchable:!0})])}).catch(h)})},e.generateAbstractIcon=function(t){let{children:n,attributes:r,main:o,transform:s,styles:a}=t;const i=oo(a);i.length>0&&(r.style=i);let l;return ta(s)&&(l=Ft("generateAbstractTransformGrouping",{main:o,transform:s,containerWidth:o.width,iconWidth:o.width})),n.push(l||o.icon),{children:n,attributes:r}}}},gb={mixout(){return{layer(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{classes:n=[]}=t;return io({type:"layer"},()=>{en("beforeDOMElementCreation",{assembler:e,params:t});let r=[];return e(o=>{Array.isArray(o)?o.map(s=>{r=r.concat(s.abstract)}):r=r.concat(o.abstract)}),[{tag:"span",attributes:{class:["".concat(j.cssPrefix,"-layers"),...n].join(" ")},children:r}]})}}}},bb={mixout(){return{counter(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{title:n=null,classes:r=[],attributes:o={},styles:s={}}=t;return io({type:"counter",content:e},()=>(en("beforeDOMElementCreation",{content:e,params:t}),Yg({content:e.toString(),title:n,extra:{attributes:o,styles:s,classes:["".concat(j.cssPrefix,"-layers-counter"),...r]}})))}}}},yb={mixout(){return{text(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{transform:n=Ve,title:r=null,classes:o=[],attributes:s={},styles:a={}}=t;return io({type:"text",content:e},()=>(en("beforeDOMElementCreation",{content:e,params:t}),ri({content:e,transform:k(k({},Ve),n),title:r,extra:{attributes:s,styles:a,classes:["".concat(j.cssPrefix,"-layers-text"),...o]}})))}}},provides(e){e.generateLayersText=function(t,n){const{title:r,transform:o,extra:s}=n;let a=null,i=null;if(Lc){const l=parseInt(getComputedStyle(t).fontSize,10),c=t.getBoundingClientRect();a=c.width/l,i=c.height/l}return j.autoA11y&&!r&&(s.attributes["aria-hidden"]="true"),Promise.resolve([t,ri({content:t.innerHTML,width:a,height:i,transform:o,title:r,extra:s,watchable:!0})])}}};const vb=new RegExp('"',"ug"),ui=[1105920,1112319],fi=k(k(k(k({},{FontAwesome:{normal:"fas",400:"fas"}}),Wm),sg),Jm),Ps=Object.keys(fi).reduce((e,t)=>(e[t.toLowerCase()]=fi[t],e),{}),wb=Object.keys(Ps).reduce((e,t)=>{const n=Ps[t];return e[t]=n[900]||[...Object.entries(n)][0][1],e},{});function xb(e){const t=e.replace(vb,""),n=Og(t,0),r=n>=ui[0]&&n<=ui[1],o=t.length===2?t[0]===t[1]:!1;return{value:ws(o?t[0]:t),isSecondary:r||o}}function Eb(e,t){const n=e.replace(/^['"]|['"]$/g,"").toLowerCase(),r=parseInt(t),o=isNaN(r)?"normal":r;return(Ps[n]||{})[o]||wb[n]}function di(e,t){const n="".concat(ag).concat(t.replace(":","-"));return new Promise((r,o)=>{if(e.getAttribute(n)!==null)return r();const a=In(e.children).filter(p=>p.getAttribute(gs)===t)[0],i=Rt.getComputedStyle(e,t),l=i.getPropertyValue("font-family"),c=l.match(fg),u=i.getPropertyValue("font-weight"),f=i.getPropertyValue("content");if(a&&!c)return e.removeChild(a),r();if(c&&f!=="none"&&f!==""){const p=i.getPropertyValue("content");let h=Eb(l,u);const{value:b,isSecondary:g}=xb(p),y=c[0].startsWith("FontAwesome");let x=ra(h,b),S=x;if(y){const w=Ig(b);w.iconName&&w.prefix&&(x=w.iconName,h=w.prefix)}if(x&&!g&&(!a||a.getAttribute(Xs)!==h||a.getAttribute(Js)!==S)){e.setAttribute(n,S),a&&e.removeChild(a);const w=cb(),{extra:C}=w;C.attributes[gs]=t,ks(x,h).then(v=>{const L=oa(k(k({},w),{},{icons:{main:v,mask:ou()},prefix:h,iconName:S,extra:C,watchable:!0})),q=de.createElementNS("http://www.w3.org/2000/svg","svg");t==="::before"?e.insertBefore(q,e.firstChild):e.appendChild(q),q.outerHTML=L.map(R=>lr(R)).join(`
|
|
584
|
+
`),e.removeAttribute(n),r()}).catch(o)}else r()}else r()})}function Sb(e){return Promise.all([di(e,"::before"),di(e,"::after")])}function Cb(e){return e.parentNode!==document.head&&!~lg.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(gs)&&(!e.parentNode||e.parentNode.tagName!=="svg")}function hi(e){if(ft)return new Promise((t,n)=>{const r=In(e.querySelectorAll("*")).filter(Cb).map(Sb),o=sa.begin("searchPseudoElements");cu(),Promise.all(r).then(()=>{o(),Os(),t()}).catch(()=>{o(),Os(),n()})})}var kb={hooks(){return{mutationObserverCallbacks(e){return e.pseudoElementsCallback=hi,e}}},provides(e){e.pseudoElements2svg=function(t){const{node:n=de}=t;j.searchPseudoElements&&hi(n)}}};let pi=!1;var Tb={mixout(){return{dom:{unwatch(){cu(),pi=!0}}}},hooks(){return{bootstrap(){ii(Es("mutationObserverCallbacks",{}))},noAuto(){sb()},watch(e){const{observeMutationsRoot:t}=e;pi?Os():ii(Es("mutationObserverCallbacks",{observeMutationsRoot:t}))}}}};const mi=e=>{let t={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return e.toLowerCase().split(" ").reduce((n,r)=>{const o=r.toLowerCase().split("-"),s=o[0];let a=o.slice(1).join("-");if(s&&a==="h")return n.flipX=!0,n;if(s&&a==="v")return n.flipY=!0,n;if(a=parseFloat(a),isNaN(a))return n;switch(s){case"grow":n.size=n.size+a;break;case"shrink":n.size=n.size-a;break;case"left":n.x=n.x-a;break;case"right":n.x=n.x+a;break;case"up":n.y=n.y-a;break;case"down":n.y=n.y+a;break;case"rotate":n.rotate=n.rotate+a;break}return n},t)};var Ob={mixout(){return{parse:{transform:e=>mi(e)}}},hooks(){return{parseNodeAttributes(e,t){const n=t.getAttribute("data-fa-transform");return n&&(e.transform=mi(n)),e}}},provides(e){e.generateAbstractTransformGrouping=function(t){let{main:n,transform:r,containerWidth:o,iconWidth:s}=t;const a={transform:"translate(".concat(o/2," 256)")},i="translate(".concat(r.x*32,", ").concat(r.y*32,") "),l="scale(".concat(r.size/16*(r.flipX?-1:1),", ").concat(r.size/16*(r.flipY?-1:1),") "),c="rotate(".concat(r.rotate," 0 0)"),u={transform:"".concat(i," ").concat(l," ").concat(c)},f={transform:"translate(".concat(s/2*-1," -256)")},p={outer:a,inner:u,path:f};return{tag:"g",attributes:k({},p.outer),children:[{tag:"g",attributes:k({},p.inner),children:[{tag:n.icon.tag,children:n.icon.children,attributes:k(k({},n.icon.attributes),p.path)}]}]}}}};const To={x:0,y:0,width:"100%",height:"100%"};function gi(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}function Pb(e){return e.tag==="g"?e.children:[e]}var Ab={hooks(){return{parseNodeAttributes(e,t){const n=t.getAttribute("data-fa-mask"),r=n?ao(n.split(" ").map(o=>o.trim())):ou();return r.prefix||(r.prefix=$t()),e.mask=r,e.maskId=t.getAttribute("data-fa-mask-id"),e}}},provides(e){e.generateAbstractMask=function(t){let{children:n,attributes:r,main:o,mask:s,maskId:a,transform:i}=t;const{width:l,icon:c}=o,{width:u,icon:f}=s,p=xg({transform:i,containerWidth:u,iconWidth:l}),h={tag:"rect",attributes:k(k({},To),{},{fill:"white"})},b=c.children?{children:c.children.map(gi)}:{},g={tag:"g",attributes:k({},p.inner),children:[gi(k({tag:c.tag,attributes:k(k({},c.attributes),p.path)},b))]},y={tag:"g",attributes:k({},p.outer),children:[g]},x="mask-".concat(a||Xn()),S="clip-".concat(a||Xn()),w={tag:"mask",attributes:k(k({},To),{},{id:x,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[h,y]},C={tag:"defs",children:[{tag:"clipPath",attributes:{id:S},children:Pb(f)},w]};return n.push(C,{tag:"rect",attributes:k({fill:"currentColor","clip-path":"url(#".concat(S,")"),mask:"url(#".concat(x,")")},To)}),{children:n,attributes:r}}}},Rb={provides(e){let t=!1;Rt.matchMedia&&(t=Rt.matchMedia("(prefers-reduced-motion: reduce)").matches),e.missingIconAbstract=function(){const n=[],r={fill:"currentColor"},o={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};n.push({tag:"path",attributes:k(k({},r),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});const s=k(k({},o),{},{attributeName:"opacity"}),a={tag:"circle",attributes:k(k({},r),{},{cx:"256",cy:"364",r:"28"}),children:[]};return t||a.children.push({tag:"animate",attributes:k(k({},o),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:k(k({},s),{},{values:"1;0;1;1;0;1;"})}),n.push(a),n.push({tag:"path",attributes:k(k({},r),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:t?[]:[{tag:"animate",attributes:k(k({},s),{},{values:"1;0;0;0;0;1;"})}]}),t||n.push({tag:"path",attributes:k(k({},r),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:k(k({},s),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:n}}}},$b={hooks(){return{parseNodeAttributes(e,t){const n=t.getAttribute("data-fa-symbol"),r=n===null?!1:n===""?!0:n;return e.symbol=r,e}}}},Fb=[Cg,mb,gb,bb,yb,kb,Tb,Ob,Ab,Rb,$b];Wg(Fb,{mixoutsTo:Re});Re.noAuto;Re.config;Re.library;Re.dom;const As=Re.parse;Re.findIconDefinition;Re.toHtml;const Ib=Re.icon;Re.layer;Re.text;Re.counter;var vr={exports:{}},wr={exports:{}},se={};/** @license React v16.13.1
|
|
565
585
|
* react-is.production.min.js
|
|
566
586
|
*
|
|
567
587
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
568
588
|
*
|
|
569
589
|
* This source code is licensed under the MIT license found in the
|
|
570
590
|
* LICENSE file in the root directory of this source tree.
|
|
571
|
-
*/var
|
|
591
|
+
*/var bi;function Mb(){if(bi)return se;bi=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,i=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function w(v){if(typeof v=="object"&&v!==null){var L=v.$$typeof;switch(L){case t:switch(v=v.type,v){case l:case c:case r:case s:case o:case f:return v;default:switch(v=v&&v.$$typeof,v){case i:case u:case b:case h:case a:return v;default:return L}}case n:return L}}}function C(v){return w(v)===c}return se.AsyncMode=l,se.ConcurrentMode=c,se.ContextConsumer=i,se.ContextProvider=a,se.Element=t,se.ForwardRef=u,se.Fragment=r,se.Lazy=b,se.Memo=h,se.Portal=n,se.Profiler=s,se.StrictMode=o,se.Suspense=f,se.isAsyncMode=function(v){return C(v)||w(v)===l},se.isConcurrentMode=C,se.isContextConsumer=function(v){return w(v)===i},se.isContextProvider=function(v){return w(v)===a},se.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===t},se.isForwardRef=function(v){return w(v)===u},se.isFragment=function(v){return w(v)===r},se.isLazy=function(v){return w(v)===b},se.isMemo=function(v){return w(v)===h},se.isPortal=function(v){return w(v)===n},se.isProfiler=function(v){return w(v)===s},se.isStrictMode=function(v){return w(v)===o},se.isSuspense=function(v){return w(v)===f},se.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===r||v===c||v===s||v===o||v===f||v===p||typeof v=="object"&&v!==null&&(v.$$typeof===b||v.$$typeof===h||v.$$typeof===a||v.$$typeof===i||v.$$typeof===u||v.$$typeof===y||v.$$typeof===x||v.$$typeof===S||v.$$typeof===g)},se.typeOf=w,se}var ae={};/** @license React v16.13.1
|
|
572
592
|
* react-is.development.js
|
|
573
593
|
*
|
|
574
594
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
575
595
|
*
|
|
576
596
|
* This source code is licensed under the MIT license found in the
|
|
577
597
|
* LICENSE file in the root directory of this source tree.
|
|
578
|
-
*/var
|
|
598
|
+
*/var yi;function Lb(){return yi||(yi=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,i=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function w($){return typeof $=="string"||typeof $=="function"||$===r||$===c||$===s||$===o||$===f||$===p||typeof $=="object"&&$!==null&&($.$$typeof===b||$.$$typeof===h||$.$$typeof===a||$.$$typeof===i||$.$$typeof===u||$.$$typeof===y||$.$$typeof===x||$.$$typeof===S||$.$$typeof===g)}function C($){if(typeof $=="object"&&$!==null){var $e=$.$$typeof;switch($e){case t:var rn=$.type;switch(rn){case l:case c:case r:case s:case o:case f:return rn;default:var cr=rn&&rn.$$typeof;switch(cr){case i:case u:case b:case h:case a:return cr;default:return $e}}case n:return $e}}}var v=l,L=c,q=i,R=a,U=t,G=u,le=r,ue=b,oe=h,fe=n,B=s,K=o,ne=f,O=!1;function V($){return O||(O=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),E($)||C($)===l}function E($){return C($)===c}function P($){return C($)===i}function W($){return C($)===a}function A($){return typeof $=="object"&&$!==null&&$.$$typeof===t}function D($){return C($)===u}function Y($){return C($)===r}function z($){return C($)===b}function I($){return C($)===h}function Q($){return C($)===n}function X($){return C($)===s}function Z($){return C($)===o}function ge($){return C($)===f}ae.AsyncMode=v,ae.ConcurrentMode=L,ae.ContextConsumer=q,ae.ContextProvider=R,ae.Element=U,ae.ForwardRef=G,ae.Fragment=le,ae.Lazy=ue,ae.Memo=oe,ae.Portal=fe,ae.Profiler=B,ae.StrictMode=K,ae.Suspense=ne,ae.isAsyncMode=V,ae.isConcurrentMode=E,ae.isContextConsumer=P,ae.isContextProvider=W,ae.isElement=A,ae.isForwardRef=D,ae.isFragment=Y,ae.isLazy=z,ae.isMemo=I,ae.isPortal=Q,ae.isProfiler=X,ae.isStrictMode=Z,ae.isSuspense=ge,ae.isValidElementType=w,ae.typeOf=C}()),ae}var vi;function fu(){return vi||(vi=1,process.env.NODE_ENV==="production"?wr.exports=Mb():wr.exports=Lb()),wr.exports}/*
|
|
579
599
|
object-assign
|
|
580
600
|
(c) Sindre Sorhus
|
|
581
601
|
@license MIT
|
|
582
|
-
*/var
|
|
583
|
-
Valid keys: `+JSON.stringify(Object.keys(E),null," "));var $=ge(I,Z,D,Y,z+"."+Z,n);if($)return $}return null}return y(P)}function fe(E){switch(typeof E){case"number":case"string":case"undefined":return!0;case"boolean":return!E;case"object":if(Array.isArray(E))return E.every(fe);if(E===null||i(E))return!0;var P=f(E);if(P){var W=P.call(E),A;if(P!==E.entries){for(;!(A=W.next()).done;)if(!fe(A.value))return!1}else for(;!(A=W.next()).done;){var D=A.value;if(D&&!fe(D[1]))return!1}}else return!1;return!0;default:return!1}}function B(E,P){return E==="symbol"?!0:P?P["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&P instanceof Symbol:!1}function K(E){var P=typeof E;return Array.isArray(E)?"array":E instanceof RegExp?"object":B(P,E)?"symbol":P}function ne(E){if(typeof E>"u"||E===null)return""+E;var P=K(E);if(P==="object"){if(E instanceof Date)return"date";if(E instanceof RegExp)return"regexp"}return P}function
|
|
584
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fp(e){var t,n=e.beat,r=e.fade,o=e.beatFade,s=e.bounce,a=e.shake,i=e.flash,l=e.spin,c=e.spinPulse,u=e.spinReverse,f=e.pulse,p=e.fixedWidth,h=e.inverse,b=e.border,g=e.listItem,y=e.flip,x=e.size,S=e.rotation,w=e.pull,C=(t={"fa-beat":n,"fa-fade":r,"fa-beat-fade":o,"fa-bounce":s,"fa-shake":a,"fa-flash":i,"fa-spin":l,"fa-spin-reverse":u,"fa-spin-pulse":c,"fa-pulse":f,"fa-fw":p,"fa-inverse":h,"fa-border":b,"fa-li":g,"fa-flip":y===!0,"fa-flip-horizontal":y==="horizontal"||y==="both","fa-flip-vertical":y==="vertical"||y==="both"},ln(t,"fa-".concat(x),typeof x<"u"&&x!==null),ln(t,"fa-rotate-".concat(S),typeof S<"u"&&S!==null&&S!==0),ln(t,"fa-pull-".concat(w),typeof w<"u"&&w!==null),ln(t,"fa-swap-opacity",e.swapOpacity),t);return Object.keys(C).map(function(v){return C[v]?v:null}).filter(function(v){return v})}function Ip(e){return e=e-0,e===e}function rc(e){return Ip(e)?e:(e=e.replace(/[\-_\s]+(.)?/g,function(t,n){return n?n.toUpperCase():""}),e.substr(0,1).toLowerCase()+e.substr(1))}var Mp=["style"];function Lp(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Np(e){return e.split(";").map(function(t){return t.trim()}).filter(function(t){return t}).reduce(function(t,n){var r=n.indexOf(":"),o=rc(n.slice(0,r)),s=n.slice(r+1).trim();return o.startsWith("webkit")?t[Lp(o)]=s:t[o]=s,t},{})}function oc(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(typeof t=="string")return t;var r=(t.children||[]).map(function(l){return oc(e,l)}),o=Object.keys(t.attributes||{}).reduce(function(l,c){var u=t.attributes[c];switch(c){case"class":l.attrs.className=u,delete t.attributes.class;break;case"style":l.attrs.style=Np(u);break;default:c.indexOf("aria-")===0||c.indexOf("data-")===0?l.attrs[c.toLowerCase()]=u:l.attrs[rc(c)]=u}return l},{attrs:{}}),s=n.style,a=s===void 0?{}:s,i=nc(n,Mp);return o.attrs.style=Tt(Tt({},o.attrs.style),a),e.apply(void 0,[t.tag,Tt(Tt({},o.attrs),i)].concat(ys(r)))}var sc=!1;try{sc=process.env.NODE_ENV==="production"}catch{}function _p(){if(!sc&&console&&typeof console.error=="function"){var e;(e=console).error.apply(e,arguments)}}function ai(e){if(e&&Fr(e)==="object"&&e.prefix&&e.iconName&&e.icon)return e;if(bs.icon)return bs.icon(e);if(e===null)return null;if(e&&Fr(e)==="object"&&e.prefix&&e.iconName)return e;if(Array.isArray(e)&&e.length===2)return{prefix:e[0],iconName:e[1]};if(typeof e=="string")return{prefix:"fas",iconName:e}}function Co(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?ln({},e,t):{}}var Dp=["forwardedRef"];function tn(e){var t=e.forwardedRef,n=nc(e,Dp),r=n.icon,o=n.mask,s=n.symbol,a=n.className,i=n.title,l=n.titleId,c=n.maskId,u=ai(r),f=Co("classes",[].concat(ys(Fp(n)),ys(a.split(" ")))),p=Co("transform",typeof n.transform=="string"?bs.transform(n.transform):n.transform),h=Co("mask",ai(o)),b=bp(u,Tt(Tt(Tt(Tt({},f),p),h),{},{symbol:s,title:i,titleId:l,maskId:c}));if(!b)return _p("Could not find icon",u),null;var g=b.abstract,y={ref:t};return Object.keys(n).forEach(function(x){tn.defaultProps.hasOwnProperty(x)||(y[x]=n[x])}),jp(g[0],y)}tn.displayName="FontAwesomeIcon";tn.propTypes={beat:te.bool,border:te.bool,beatFade:te.bool,bounce:te.bool,className:te.string,fade:te.bool,flash:te.bool,mask:te.oneOfType([te.object,te.array,te.string]),maskId:te.string,fixedWidth:te.bool,inverse:te.bool,flip:te.oneOf([!0,!1,"horizontal","vertical","both"]),icon:te.oneOfType([te.object,te.array,te.string]),listItem:te.bool,pull:te.oneOf(["right","left"]),pulse:te.bool,rotation:te.oneOf([0,90,180,270]),shake:te.bool,size:te.oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:te.bool,spinPulse:te.bool,spinReverse:te.bool,symbol:te.oneOfType([te.bool,te.string]),title:te.string,titleId:te.string,transform:te.oneOfType([te.string,te.object]),swapOpacity:te.bool};tn.defaultProps={border:!1,className:"",mask:null,maskId:null,fixedWidth:!1,inverse:!1,flip:!1,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:null,transform:null,swapOpacity:!1};var jp=oc.bind(null,d.createElement);function qr(){return typeof window<"u"}function In(e){return ac(e)?(e.nodeName||"").toLowerCase():"#document"}function Ae(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ct(e){var t;return(t=(ac(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ac(e){return qr()?e instanceof Node||e instanceof Ae(e).Node:!1}function me(e){return qr()?e instanceof Element||e instanceof Ae(e).Element:!1}function ze(e){return qr()?e instanceof HTMLElement||e instanceof Ae(e).HTMLElement:!1}function ws(e){return!qr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ae(e).ShadowRoot}function sr(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Le(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function zp(e){return["table","td","th"].includes(In(e))}function Vr(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Xs(e){const t=Gr(),n=me(e)?Le(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Hp(e){let t=at(e);for(;ze(t)&&!et(t);){if(Xs(t))return t;if(Vr(t))return null;t=at(t)}return null}function Gr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function et(e){return["html","body","#document"].includes(In(e))}function Le(e){return Ae(e).getComputedStyle(e)}function Kr(e){return me(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function at(e){if(In(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ws(e)&&e.host||ct(e);return ws(t)?t.host:t}function ic(e){const t=at(e);return et(t)?e.ownerDocument?e.ownerDocument.body:e.body:ze(t)&&sr(t)?t:ic(t)}function dn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=ic(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),a=Ae(o);if(s){const i=xs(a);return t.concat(a,a.visualViewport||[],sr(o)?o:[],i&&n?dn(i):[])}return t.concat(o,dn(o,[],n))}function xs(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const ii=Math.min,Bn=Math.max,Ir=Math.round,Ke=e=>({x:e,y:e});function lc(e){return e.split("-")[0]}function Wp(e){return e.split("-")[1]}function Up(e){return e==="x"?"y":"x"}function Bp(e){return e==="y"?"height":"width"}function cc(e){return["top","bottom"].includes(lc(e))?"y":"x"}function qp(e){return Up(cc(e))}function uc(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function li(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&ws(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Ln(e){return"composedPath"in e?e.composedPath()[0]:e.target}function ko(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Vp(e){return e.matches("html,body")}function ci(e){return(e==null?void 0:e.ownerDocument)||document}function To(e,t){let n=e.filter(o=>{var s;return o.parentId===t&&((s=o.context)==null?void 0:s.open)}),r=n;for(;r.length;)r=e.filter(o=>{var s;return(s=r)==null?void 0:s.some(a=>{var i;return o.parentId===a.id&&((i=o.context)==null?void 0:i.open)})}),n=n.concat(r);return n}function Gp(e){return"nativeEvent"in e}var Kp=typeof document<"u",Yp=function(){},Es=Kp?d.useLayoutEffect:Yp;const Qp={...F},Xp=Qp.useInsertionEffect,Jp=Xp||(e=>e());function sn(e){const t=F.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Jp(()=>{t.current=e}),F.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function ui(e,t,n){let{reference:r,floating:o}=e;const s=cc(t),a=qp(t),i=Bp(a),l=lc(t),c=s==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,p=r[i]/2-o[i]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-o.width,y:f};break;default:h={x:r.x,y:r.y}}switch(Wp(t)){case"start":h[a]-=p*(n&&c?-1:1);break;case"end":h[a]+=p*(n&&c?-1:1);break}return h}const Zp=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:a}=n,i=s.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=ui(c,r,l),p=r,h={},b=0;for(let g=0;g<i.length;g++){const{name:y,fn:x}=i[g],{x:S,y:w,data:C,reset:v}=await x({x:u,y:f,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});u=S??u,f=w??f,h={...h,[y]:{...h[y],...C}},v&&b<=50&&(b++,typeof v=="object"&&(v.placement&&(p=v.placement),v.rects&&(c=v.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):v.rects),{x:u,y:f}=ui(c,p,l)),g=-1)}return{x:u,y:f,placement:p,strategy:o,middlewareData:h}};function fc(e){const t=Le(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ze(e),s=o?e.offsetWidth:n,a=o?e.offsetHeight:r,i=Ir(n)!==s||Ir(r)!==a;return i&&(n=s,r=a),{width:n,height:r,$:i}}function dc(e){return me(e)?e:e.contextElement}function hn(e){const t=dc(e);if(!ze(t))return Ke(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=fc(t);let a=(s?Ir(n.width):n.width)/r,i=(s?Ir(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const em=Ke(0);function hc(e){const t=Ae(e);return!Gr()||!t.visualViewport?em:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function tm(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ae(e)?!1:t}function Xn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=dc(e);let a=Ke(1);t&&(r?me(r)&&(a=hn(r)):a=hn(e));const i=tm(s,n,r)?hc(s):Ke(0);let l=(o.left+i.x)/a.x,c=(o.top+i.y)/a.y,u=o.width/a.x,f=o.height/a.y;if(s){const p=Ae(s),h=r&&me(r)?Ae(r):r;let b=p,g=xs(b);for(;g&&r&&h!==b;){const y=hn(g),x=g.getBoundingClientRect(),S=Le(g),w=x.left+(g.clientLeft+parseFloat(S.paddingLeft))*y.x,C=x.top+(g.clientTop+parseFloat(S.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,f*=y.y,l+=w,c+=C,b=Ae(g),g=xs(b)}}return uc({width:u,height:f,x:l,y:c})}function Js(e,t){const n=Kr(e).scrollLeft;return t?t.left+n:Xn(ct(e)).left+n}function pc(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Js(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function nm(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",a=ct(r),i=t?Vr(t.floating):!1;if(r===a||i&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Ke(1);const u=Ke(0),f=ze(r);if((f||!f&&!s)&&((In(r)!=="body"||sr(a))&&(l=Kr(r)),ze(r))){const h=Xn(r);c=hn(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}const p=a&&!f&&!s?pc(a,l,!0):Ke(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-l.scrollTop*c.y+u.y+p.y}}function rm(e){return Array.from(e.getClientRects())}function om(e){const t=ct(e),n=Kr(e),r=e.ownerDocument.body,o=Bn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Bn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Js(e);const i=-n.scrollTop;return Le(r).direction==="rtl"&&(a+=Bn(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:a,y:i}}function sm(e,t){const n=Ae(e),r=ct(e),o=n.visualViewport;let s=r.clientWidth,a=r.clientHeight,i=0,l=0;if(o){s=o.width,a=o.height;const c=Gr();(!c||c&&t==="fixed")&&(i=o.offsetLeft,l=o.offsetTop)}return{width:s,height:a,x:i,y:l}}function am(e,t){const n=Xn(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=ze(e)?hn(e):Ke(1),a=e.clientWidth*s.x,i=e.clientHeight*s.y,l=o*s.x,c=r*s.y;return{width:a,height:i,x:l,y:c}}function fi(e,t,n){let r;if(t==="viewport")r=sm(e,n);else if(t==="document")r=om(ct(e));else if(me(t))r=am(t,n);else{const o=hc(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return uc(r)}function mc(e,t){const n=at(e);return n===t||!me(n)||et(n)?!1:Le(n).position==="fixed"||mc(n,t)}function im(e,t){const n=t.get(e);if(n)return n;let r=dn(e,[],!1).filter(i=>me(i)&&In(i)!=="body"),o=null;const s=Le(e).position==="fixed";let a=s?at(e):e;for(;me(a)&&!et(a);){const i=Le(a),l=Xs(a);!l&&i.position==="fixed"&&(o=null),(s?!l&&!o:!l&&i.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||sr(a)&&!l&&mc(e,a))?r=r.filter(u=>u!==a):o=i,a=at(a)}return t.set(e,r),r}function lm(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Vr(t)?[]:im(t,this._c):[].concat(n),r],i=a[0],l=a.reduce((c,u)=>{const f=fi(t,u,o);return c.top=Bn(f.top,c.top),c.right=ii(f.right,c.right),c.bottom=ii(f.bottom,c.bottom),c.left=Bn(f.left,c.left),c},fi(t,i,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function cm(e){const{width:t,height:n}=fc(e);return{width:t,height:n}}function um(e,t,n){const r=ze(t),o=ct(t),s=n==="fixed",a=Xn(e,!0,s,t);let i={scrollLeft:0,scrollTop:0};const l=Ke(0);function c(){l.x=Js(o)}if(r||!r&&!s)if((In(t)!=="body"||sr(o))&&(i=Kr(t)),r){const h=Xn(t,!0,s,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&c();s&&!r&&o&&c();const u=o&&!r&&!s?pc(o,i):Ke(0),f=a.left+i.scrollLeft-l.x-u.x,p=a.top+i.scrollTop-l.y-u.y;return{x:f,y:p,width:a.width,height:a.height}}function Oo(e){return Le(e).position==="static"}function di(e,t){if(!ze(e)||Le(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ct(e)===n&&(n=n.ownerDocument.body),n}function gc(e,t){const n=Ae(e);if(Vr(e))return n;if(!ze(e)){let o=at(e);for(;o&&!et(o);){if(me(o)&&!Oo(o))return o;o=at(o)}return n}let r=di(e,t);for(;r&&zp(r)&&Oo(r);)r=di(r,t);return r&&et(r)&&Oo(r)&&!Xs(r)?n:r||Hp(e)||n}const fm=async function(e){const t=this.getOffsetParent||gc,n=this.getDimensions,r=await n(e.floating);return{reference:um(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function dm(e){return Le(e).direction==="rtl"}const hm={convertOffsetParentRelativeRectToViewportRelativeRect:nm,getDocumentElement:ct,getClippingRect:lm,getOffsetParent:gc,getElementRects:fm,getClientRects:rm,getDimensions:cm,getScale:hn,isElement:me,isRTL:dm},pm=(e,t,n)=>{const r=new Map,o={platform:hm,...n},s={...o.platform,_c:r};return Zp(e,t,{...o,platform:s})};var mm=typeof document<"u",gm=function(){},Cr=mm?d.useLayoutEffect:gm;function Mr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Mr(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Mr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function bc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function hi(e,t){const n=bc(e);return Math.round(t*n)/n}function Po(e){const t=F.useRef(e);return Cr(()=>{t.current=e}),t}function bm(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:a}={},transform:i=!0,whileElementsMounted:l,open:c}=e,[u,f]=F.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=F.useState(r);Mr(p,r)||h(r);const[b,g]=F.useState(null),[y,x]=F.useState(null),S=F.useCallback(T=>{T!==L.current&&(L.current=T,g(T))},[]),w=F.useCallback(T=>{T!==q.current&&(q.current=T,x(T))},[]),C=s||b,v=a||y,L=F.useRef(null),q=F.useRef(null),R=F.useRef(u),U=l!=null,G=Po(l),le=Po(o),ue=Po(c),oe=F.useCallback(()=>{if(!L.current||!q.current)return;const T={placement:t,strategy:n,middleware:p};le.current&&(T.platform=le.current),pm(L.current,q.current,T).then(V=>{const E={...V,isPositioned:ue.current!==!1};fe.current&&!Mr(R.current,E)&&(R.current=E,wu.flushSync(()=>{f(E)}))})},[p,t,n,le,ue]);Cr(()=>{c===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(T=>({...T,isPositioned:!1})))},[c]);const fe=F.useRef(!1);Cr(()=>(fe.current=!0,()=>{fe.current=!1}),[]),Cr(()=>{if(C&&(L.current=C),v&&(q.current=v),C&&v){if(G.current)return G.current(C,v,oe);oe()}},[C,v,oe,G,U]);const B=F.useMemo(()=>({reference:L,floating:q,setReference:S,setFloating:w}),[S,w]),K=F.useMemo(()=>({reference:C,floating:v}),[C,v]),ne=F.useMemo(()=>{const T={position:n,left:0,top:0};if(!K.floating)return T;const V=hi(K.floating,u.x),E=hi(K.floating,u.y);return i?{...T,transform:"translate("+V+"px, "+E+"px)",...bc(K.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:E}},[n,i,K.floating,u.x,u.y]);return F.useMemo(()=>({...u,update:oe,refs:B,elements:K,floatingStyles:ne}),[u,oe,B,K,ne])}const ym="data-floating-ui-focusable",pi="active",mi="selected",vm={...F};let gi=!1,wm=0;const bi=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+wm++;function xm(){const[e,t]=F.useState(()=>gi?bi():void 0);return Es(()=>{e==null&&t(bi())},[]),F.useEffect(()=>{gi=!0},[]),e}const Em=vm.useId,Sm=Em||xm;let Ss;process.env.NODE_ENV!=="production"&&(Ss=new Set);function Cm(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=Ss)!=null&&e.has(o))){var s;(s=Ss)==null||s.add(o),console.error(o)}}function km(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const Tm=F.createContext(null),Om=F.createContext(null),Pm=()=>{var e;return((e=F.useContext(Tm))==null?void 0:e.id)||null},yc=()=>F.useContext(Om);function Am(e){return"data-floating-ui-"+e}function Rm(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const $m={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Fm={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},yi=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function Im(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:s}=e,{enabled:a=!0,escapeKey:i=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:f="pointerdown",ancestorScroll:p=!1,bubbles:h,capture:b}=t,g=yc(),y=sn(typeof l=="function"?l:()=>!1),x=typeof l=="function"?y:l,S=F.useRef(!1),{escapeKey:w,outsidePress:C}=yi(h),{escapeKey:v,outsidePress:L}=yi(b),q=F.useRef(!1),R=F.useRef(-1),U=sn(B=>{var K;if(!n||!a||!i||B.key!=="Escape"||q.current)return;const ne=(K=s.current.floatingContext)==null?void 0:K.nodeId,T=g?To(g.nodesRef.current,ne):[];if(!w&&(B.stopPropagation(),T.length>0)){let V=!0;if(T.forEach(E=>{var P;if((P=E.context)!=null&&P.open&&!E.context.dataRef.current.__escapeKeyBubbles){V=!1;return}}),!V)return}r(!1,Gp(B)?B.nativeEvent:B,"escape-key")}),G=sn(B=>{var K;const ne=()=>{var T;U(B),(T=Ln(B))==null||T.removeEventListener("keydown",ne)};(K=Ln(B))==null||K.addEventListener("keydown",ne)}),le=sn(B=>{var K;const ne=s.current.insideReactTree;s.current.insideReactTree=!1;const T=S.current;if(S.current=!1,c==="click"&&T||ne||typeof x=="function"&&!x(B))return;const V=Ln(B),E="["+Am("inert")+"]",P=ci(o.floating).querySelectorAll(E);let W=me(V)?V:null;for(;W&&!et(W);){const z=at(W);if(et(z)||!me(z))break;W=z}if(P.length&&me(V)&&!Vp(V)&&!li(V,o.floating)&&Array.from(P).every(z=>!li(W,z)))return;if(ze(V)&&fe){const z=et(V),I=Le(V),Q=/auto|scroll/,X=z||Q.test(I.overflowX),Z=z||Q.test(I.overflowY),ge=X&&V.clientWidth>0&&V.scrollWidth>V.clientWidth,$=Z&&V.clientHeight>0&&V.scrollHeight>V.clientHeight,$e=I.direction==="rtl",rn=$&&($e?B.offsetX<=V.offsetWidth-V.clientWidth:B.offsetX>V.clientWidth),cr=ge&&B.offsetY>V.clientHeight;if(rn||cr)return}const A=(K=s.current.floatingContext)==null?void 0:K.nodeId,D=g&&To(g.nodesRef.current,A).some(z=>{var I;return ko(B,(I=z.context)==null?void 0:I.elements.floating)});if(ko(B,o.floating)||ko(B,o.domReference)||D)return;const Y=g?To(g.nodesRef.current,A):[];if(Y.length>0){let z=!0;if(Y.forEach(I=>{var Q;if((Q=I.context)!=null&&Q.open&&!I.context.dataRef.current.__outsidePressBubbles){z=!1;return}}),!z)return}r(!1,B,"outside-press")}),ue=sn(B=>{var K;const ne=()=>{var T;le(B),(T=Ln(B))==null||T.removeEventListener(c,ne)};(K=Ln(B))==null||K.addEventListener(c,ne)});F.useEffect(()=>{if(!n||!a)return;s.current.__escapeKeyBubbles=w,s.current.__outsidePressBubbles=C;let B=-1;function K(P){r(!1,P,"ancestor-scroll")}function ne(){window.clearTimeout(B),q.current=!0}function T(){B=window.setTimeout(()=>{q.current=!1},Gr()?5:0)}const V=ci(o.floating);i&&(V.addEventListener("keydown",v?G:U,v),V.addEventListener("compositionstart",ne),V.addEventListener("compositionend",T)),x&&V.addEventListener(c,L?ue:le,L);let E=[];return p&&(me(o.domReference)&&(E=dn(o.domReference)),me(o.floating)&&(E=E.concat(dn(o.floating))),!me(o.reference)&&o.reference&&o.reference.contextElement&&(E=E.concat(dn(o.reference.contextElement)))),E=E.filter(P=>{var W;return P!==((W=V.defaultView)==null?void 0:W.visualViewport)}),E.forEach(P=>{P.addEventListener("scroll",K,{passive:!0})}),()=>{i&&(V.removeEventListener("keydown",v?G:U,v),V.removeEventListener("compositionstart",ne),V.removeEventListener("compositionend",T)),x&&V.removeEventListener(c,L?ue:le,L),E.forEach(P=>{P.removeEventListener("scroll",K)}),window.clearTimeout(B)}},[s,o,i,x,c,n,r,p,a,w,C,U,v,G,le,L,ue]),F.useEffect(()=>{s.current.insideReactTree=!1},[s,x,c]);const oe=F.useMemo(()=>({onKeyDown:U,...u&&{[$m[f]]:B=>{r(!1,B.nativeEvent,"reference-press")},...f!=="click"&&{onClick(B){r(!1,B.nativeEvent,"reference-press")}}}}),[U,r,u,f]),fe=F.useMemo(()=>({onKeyDown:U,onMouseDown(){S.current=!0},onMouseUp(){S.current=!0},[Fm[c]]:()=>{s.current.insideReactTree=!0},onBlurCapture(){g||(Rm(R),s.current.insideReactTree=!0,R.current=window.setTimeout(()=>{s.current.insideReactTree=!1}))}}),[U,c,s,g]);return F.useMemo(()=>a?{reference:oe,floating:fe}:{},[a,oe,fe])}function Mm(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Sm(),s=F.useRef({}),[a]=F.useState(()=>km()),i=Pm()!=null;if(process.env.NODE_ENV!=="production"){const h=r.reference;h&&!me(h)&&Cm("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=F.useState(r.reference),u=sn((h,b,g)=>{s.current.openEvent=h?b:void 0,a.emit("openchange",{open:h,event:b,reason:g,nested:i}),n==null||n(h,b,g)}),f=F.useMemo(()=>({setPositionReference:c}),[]),p=F.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return F.useMemo(()=>({dataRef:s,open:t,onOpenChange:u,elements:p,events:a,floatingId:o,refs:f}),[t,u,p,a,o,f])}function Lm(e){e===void 0&&(e={});const{nodeId:t}=e,n=Mm({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[s,a]=F.useState(null),[i,l]=F.useState(null),u=(o==null?void 0:o.domReference)||s,f=F.useRef(null),p=yc();Es(()=>{u&&(f.current=u)},[u]);const h=bm({...e,elements:{...o,...i&&{reference:i}}}),b=F.useCallback(w=>{const C=me(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),getClientRects:()=>w.getClientRects(),contextElement:w}:w;l(C),h.refs.setReference(C)},[h.refs]),g=F.useCallback(w=>{(me(w)||w===null)&&(f.current=w,a(w)),(me(h.refs.reference.current)||h.refs.reference.current===null||w!==null&&!me(w))&&h.refs.setReference(w)},[h.refs]),y=F.useMemo(()=>({...h.refs,setReference:g,setPositionReference:b,domReference:f}),[h.refs,g,b]),x=F.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),S=F.useMemo(()=>({...h,...r,refs:y,elements:x,nodeId:t}),[h,y,x,t,r]);return Es(()=>{r.dataRef.current.floatingContext=S;const w=p==null?void 0:p.nodesRef.current.find(C=>C.id===t);w&&(w.context=S)}),F.useMemo(()=>({...h,context:S,refs:y,elements:x}),[h,y,x,S])}function Ao(e,t,n){const r=new Map,o=n==="item";let s=e;if(o&&e){const{[pi]:a,[mi]:i,...l}=e;s=l}return{...n==="floating"&&{tabIndex:-1,[ym]:""},...s,...t.map(a=>{const i=a?a[n]:null;return typeof i=="function"?e?i(e):null:i}).concat(e).reduce((a,i)=>(i&&Object.entries(i).forEach(l=>{let[c,u]=l;if(!(o&&[pi,mi].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var f;(f=r.get(c))==null||f.push(u),a[c]=function(){for(var p,h=arguments.length,b=new Array(h),g=0;g<h;g++)b[g]=arguments[g];return(p=r.get(c))==null?void 0:p.map(y=>y(...b)).find(y=>y!==void 0)}}}else a[c]=u}),a),{})}}function Nm(e){e===void 0&&(e=[]);const t=e.map(i=>i==null?void 0:i.reference),n=e.map(i=>i==null?void 0:i.floating),r=e.map(i=>i==null?void 0:i.item),o=F.useCallback(i=>Ao(i,e,"reference"),t),s=F.useCallback(i=>Ao(i,e,"floating"),n),a=F.useCallback(i=>Ao(i,e,"item"),r);return F.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:a}),[o,s,a])}const _m={default:"text-secondary-600 border-secondary-600",primary:"text-primary-600 border-primary-600",success:"text-success-600 border-success-600"},Dm=({transition:e,onClick:t})=>O.jsxs("div",{className:"py-1 px-3 space-x-2 flex items-center hover:bg-gray-100 cursor-pointer",onClick:n=>{n.stopPropagation(),t()},children:[O.jsx("span",{className:"text-base text-dark flex-1",children:e.action}),O.jsx(tn,{icon:md,className:"text-gray-400",width:24}),O.jsx(wl,{category:"outline",color:e.color,children:e.to})]}),jm=({title:e,variant:t="default",transitions:n,onClick:r})=>{const[o,s]=d.useState(!1),{refs:a,floatingStyles:i,context:l}=Lm({strategy:"fixed",placement:"bottom-end",open:o,onOpenChange:s}),c=Im(l,{outsidePress:!0}),{getReferenceProps:u,getFloatingProps:f}=Nm([c]);return O.jsxs(O.Fragment,{children:[O.jsxs("div",{onClick:n!=null&&n.length?()=>s(p=>!p):void 0,ref:a.setReference,className:On("px-1 uppercase border rounded-sm flex items-center",n.length?"cursor-pointer":"pointer-events-none",_m[t]),...u(),children:[O.jsx("span",{className:"text-sm font-bold",children:e}),n.length>0?O.jsx(tn,{icon:gd,width:24,height:24,className:"text-gray-400"}):O.jsx(O.Fragment,{})]}),o&&n.length&&O.jsx("div",{ref:a.setFloating,style:i,className:On("border border-gray-200 py-1.5 rounded-sm min-w-[172px] bg-white shadow-dark/50"),...f(),children:n.map((p,h)=>O.jsx(Dm,{transition:p,onClick:()=>{r==null||r(p.id),s(!1)}},h))})]})},zm={[he.OPEN]:"border-[#C1C5C8] bg-[#F0F1F2]",[he.IN_PROGRESS]:"bg-[#E6F2FF] border-[#94C8FF]",[he.IN_REVIEW]:"bg-[#EAF6EC] border-[#A5DAB1]",[he.COMPLETED]:"bg-[#EAF6EC] border-[#A5DAB1]"},Ro={PHOTO:"photo",SCREENSHOT:"screenshot"},Hm=({task:e,step:t,playbookType:n,onButtonClick:r,viewMode:o="card",canStart:s=!1})=>{const{buttons:a}=cf({taskStatus:e.workflowStatus,canStart:s}),i=d.useMemo(()=>e.imageRequired===0?null:e.imageRequired===1?Ro.SCREENSHOT:e.imageRequired===2?Ro.PHOTO:null,[e.imageRequired]);if(o==="list"){const l=d.useMemo(()=>e.workflowStatus===he.COMPLETED?"success":e.workflowStatus===he.IN_PROGRESS?"primary":"default",[e.workflowStatus]),c=d.useMemo(()=>{const u=[];return a.forEach(f=>{f==="START"&&u.push({id:"START",color:"primary",action:"Start",to:he.IN_PROGRESS}),f==="COMPLETE"&&u.push({id:"COMPLETE",color:"success",action:"Complete",to:he.COMPLETED})}),u},[a]);return O.jsxs("div",{className:"flex gap-3 p-2 border-b border-gray-200",children:[O.jsx("div",{className:"text-gray-200 text-base",children:e.sequenceOrder+1}),O.jsx("div",{className:On("text-dark flex-1 truncate",e.workflowStatus===he.COMPLETED&&"text-secondary-400 line-through"),children:e.taskInstanceName}),O.jsx(jm,{title:e.workflowStatus,variant:l,transitions:c,onClick:u=>{r(u)}})]})}return O.jsxs("div",{className:Pr("flex items-stretch rounded-sm overflow-hidden border",zm[e.workflowStatus]),children:[O.jsx(sd,{playbookType:n,status:e.workflowStatus,step:t}),O.jsxs("div",{className:"flex w-full flex-col overflow-x-hidden p-2",children:[n==="Sequential"&&O.jsx("div",{className:"-mb-3 elf-end pr-2 pt-2",children:O.jsx(dd,{status:e.workflowStatus})}),O.jsxs("div",{className:"space-y-2 divide-y divide-black/20 flex flex-1 flex-col",children:[O.jsxs("div",{className:"space-y-2",children:[O.jsx("div",{className:"text-lg font-medium text-[#1C232D] flex-1",children:e.taskInstanceName}),i?O.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[O.jsx(tn,{icon:pd,width:16}),O.jsxs("div",{children:[O.jsx("span",{className:"font-medium",children:i===Ro.PHOTO?"Photo":"Screenshot"})," ","required"]})]}):O.jsx(O.Fragment,{})]}),a.length>0&&O.jsx(td,{buttons:a,onButtonClick:r})]})]})]})},Wm=({title:e,className:t,...n})=>O.jsx("div",{className:t,...n,children:O.jsx("div",{className:"border-y border-gray-200 bg-white",children:O.jsx("h1",{className:"container mx-auto py-3 text-2xl",children:e})})}),vc=async e=>{const t=new Headers;t.append("Content-Type","application/json");const r=await(await fetch("/public-api/playbook-initiate",{method:"POST",headers:t,body:JSON.stringify(e)})).json();return console.log({data:r}),r},wc=typeof document<"u"?d.useLayoutEffect:()=>{};function Um(e){const t=d.useRef(null);return wc(()=>{t.current=e},[e]),d.useCallback((...n)=>{const r=t.current;return r==null?void 0:r(...n)},[])}const It=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},jt=e=>e&&"window"in e&&e.window===e?e:It(e).defaultView||window;function Bm(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function qm(e){return Bm(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}let Vm=!1;function Zs(){return Vm}function xc(e,t){if(!Zs())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n.tagName==="SLOT"&&n.assignedSlot?n=n.assignedSlot.parentNode:qm(n)?n=n.host:n=n.parentNode}return!1}const Cs=(e=document)=>{var t;if(!Zs())return e.activeElement;let n=e.activeElement;for(;n&&"shadowRoot"in n&&(!((t=n.shadowRoot)===null||t===void 0)&&t.activeElement);)n=n.shadowRoot.activeElement;return n};function Ec(e){return Zs()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function Yr(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function ea(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function ut(e){if(process.env.NODE_ENV==="test")return e;let t=null;return()=>(t==null&&(t=e()),t)}const ta=ut(function(){return ea(/^Mac/i)}),Gm=ut(function(){return ea(/^iPhone/i)}),Km=ut(function(){return ea(/^iPad/i)||ta()&&navigator.maxTouchPoints>1}),Ym=ut(function(){return Gm()||Km()});ut(function(){return ta()||Ym()});ut(function(){return Yr(/AppleWebKit/i)&&!Qm()});const Qm=ut(function(){return Yr(/Chrome/i)}),Xm=ut(function(){return Yr(/Android/i)});ut(function(){return Yr(/Firefox/i)});function Sc(){let e=d.useRef(new Map),t=d.useCallback((o,s,a,i)=>{let l=i!=null&&i.once?(...c)=>{e.current.delete(a),a(...c)}:a;e.current.set(a,{type:s,eventTarget:o,fn:l,options:i}),o.addEventListener(s,l,i)},[]),n=d.useCallback((o,s,a,i)=>{var l;let c=((l=e.current.get(a))===null||l===void 0?void 0:l.fn)||a;o.removeEventListener(s,c,i),e.current.delete(a)},[]),r=d.useCallback(()=>{e.current.forEach((o,s)=>{n(o.eventTarget,o.type,s,o.options)})},[n]);return d.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function Jm(e){return e.mozInputSource===0&&e.isTrusted?!0:Xm()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Cc(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function Zm(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function kc(e){let t=d.useRef({isFocused:!1,observer:null});wc(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=Um(r=>{e==null||e(r)});return d.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let o=r.target,s=a=>{if(t.current.isFocused=!1,o.disabled){let i=Cc(a);n(i)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};o.addEventListener("focusout",s,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&o.disabled){var a;(a=t.current.observer)===null||a===void 0||a.disconnect();let i=o===document.activeElement?null:document.activeElement;o.dispatchEvent(new FocusEvent("blur",{relatedTarget:i})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:i}))}}),t.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[n])}let eg=!1,ar=null,ks=new Set,qn=new Map,en=!1,Ts=!1;const tg={Tab:!0,Escape:!0};function na(e,t){for(let n of ks)n(e,t)}function ng(e){return!(e.metaKey||!ta()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Lr(e){en=!0,ng(e)&&(ar="keyboard",na("keyboard",e))}function Me(e){ar="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(en=!0,na("pointer",e))}function Tc(e){Jm(e)&&(en=!0,ar="virtual")}function Oc(e){e.target===window||e.target===document||eg||!e.isTrusted||(!en&&!Ts&&(ar="virtual",na("virtual",e)),en=!1,Ts=!1)}function Pc(){en=!1,Ts=!0}function Os(e){if(typeof window>"u"||typeof document>"u"||qn.get(jt(e)))return;const t=jt(e),n=It(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){en=!0,r.apply(this,arguments)},n.addEventListener("keydown",Lr,!0),n.addEventListener("keyup",Lr,!0),n.addEventListener("click",Tc,!0),t.addEventListener("focus",Oc,!0),t.addEventListener("blur",Pc,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Me,!0),n.addEventListener("pointermove",Me,!0),n.addEventListener("pointerup",Me,!0)):process.env.NODE_ENV==="test"&&(n.addEventListener("mousedown",Me,!0),n.addEventListener("mousemove",Me,!0),n.addEventListener("mouseup",Me,!0)),t.addEventListener("beforeunload",()=>{Ac(e)},{once:!0}),qn.set(t,{focus:r})}const Ac=(e,t)=>{const n=jt(e),r=It(e);t&&r.removeEventListener("DOMContentLoaded",t),qn.has(n)&&(n.HTMLElement.prototype.focus=qn.get(n).focus,r.removeEventListener("keydown",Lr,!0),r.removeEventListener("keyup",Lr,!0),r.removeEventListener("click",Tc,!0),n.removeEventListener("focus",Oc,!0),n.removeEventListener("blur",Pc,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",Me,!0),r.removeEventListener("pointermove",Me,!0),r.removeEventListener("pointerup",Me,!0)):process.env.NODE_ENV==="test"&&(r.removeEventListener("mousedown",Me,!0),r.removeEventListener("mousemove",Me,!0),r.removeEventListener("mouseup",Me,!0)),qn.delete(n))};function rg(e){const t=It(e);let n;return t.readyState!=="loading"?Os(e):(n=()=>{Os(e)},t.addEventListener("DOMContentLoaded",n)),()=>Ac(e,n)}typeof document<"u"&&rg();function Rc(){return ar!=="pointer"}const og=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function sg(e,t,n){let r=It(n==null?void 0:n.target);const o=typeof window<"u"?jt(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,s=typeof window<"u"?jt(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,a=typeof window<"u"?jt(n==null?void 0:n.target).HTMLElement:HTMLElement,i=typeof window<"u"?jt(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return e=e||r.activeElement instanceof o&&!og.has(r.activeElement.type)||r.activeElement instanceof s||r.activeElement instanceof a&&r.activeElement.isContentEditable,!(e&&t==="keyboard"&&n instanceof i&&!tg[n.key])}function ag(e,t,n){Os(),d.useEffect(()=>{let r=(o,s)=>{sg(!!(n!=null&&n.isTextInput),o,s)&&e(Rc())};return ks.add(r),()=>{ks.delete(r)}},t)}function ig(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:o}=e;const s=d.useCallback(l=>{if(l.target===l.currentTarget)return r&&r(l),o&&o(!1),!0},[r,o]),a=kc(s),i=d.useCallback(l=>{const c=It(l.target),u=c?Cs(c):Cs();l.target===l.currentTarget&&u===Ec(l.nativeEvent)&&(n&&n(l),o&&o(!0),a(l))},[o,n,a]);return{focusProps:{onFocus:!t&&(n||o||r)?i:void 0,onBlur:!t&&(r||o)?s:void 0}}}function lg(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:o}=e,s=d.useRef({isFocusWithin:!1}),{addGlobalListener:a,removeAllGlobalListeners:i}=Sc(),l=d.useCallback(f=>{f.currentTarget.contains(f.target)&&s.current.isFocusWithin&&!f.currentTarget.contains(f.relatedTarget)&&(s.current.isFocusWithin=!1,i(),n&&n(f),o&&o(!1))},[n,o,s,i]),c=kc(l),u=d.useCallback(f=>{if(!f.currentTarget.contains(f.target))return;const p=It(f.target),h=Cs(p);if(!s.current.isFocusWithin&&h===Ec(f.nativeEvent)){r&&r(f),o&&o(!0),s.current.isFocusWithin=!0,c(f);let b=f.currentTarget;a(p,"focus",g=>{if(s.current.isFocusWithin&&!xc(b,g.target)){let y=new p.defaultView.FocusEvent("blur",{relatedTarget:g.target});Zm(y,b);let x=Cc(y);l(x)}},{capture:!0})}},[r,o,c,a,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:l}}}let Nr=!1,$o=0;function Ps(){Nr=!0,setTimeout(()=>{Nr=!1},50)}function vi(e){e.pointerType==="touch"&&Ps()}function cg(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",vi):process.env.NODE_ENV==="test"&&document.addEventListener("touchend",Ps),$o++,()=>{$o--,!($o>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",vi):process.env.NODE_ENV==="test"&&document.removeEventListener("touchend",Ps))}}function ug(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:o}=e,[s,a]=d.useState(!1),i=d.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;d.useEffect(cg,[]);let{addGlobalListener:l,removeAllGlobalListeners:c}=Sc(),{hoverProps:u,triggerHoverEnd:f}=d.useMemo(()=>{let p=(g,y)=>{if(i.pointerType=y,o||y==="touch"||i.isHovered||!g.currentTarget.contains(g.target))return;i.isHovered=!0;let x=g.currentTarget;i.target=x,l(It(g.target),"pointerover",S=>{i.isHovered&&i.target&&!xc(i.target,S.target)&&h(S,S.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:x,pointerType:y}),n&&n(!0),a(!0)},h=(g,y)=>{let x=i.target;i.pointerType="",i.target=null,!(y==="touch"||!i.isHovered||!x)&&(i.isHovered=!1,c(),r&&r({type:"hoverend",target:x,pointerType:y}),n&&n(!1),a(!1))},b={};return typeof PointerEvent<"u"?(b.onPointerEnter=g=>{Nr&&g.pointerType==="mouse"||p(g,g.pointerType)},b.onPointerLeave=g=>{!o&&g.currentTarget.contains(g.target)&&h(g,g.pointerType)}):process.env.NODE_ENV==="test"&&(b.onTouchStart=()=>{i.ignoreEmulatedMouseEvents=!0},b.onMouseEnter=g=>{!i.ignoreEmulatedMouseEvents&&!Nr&&p(g,"mouse"),i.ignoreEmulatedMouseEvents=!1},b.onMouseLeave=g=>{!o&&g.currentTarget.contains(g.target)&&h(g,"mouse")}),{hoverProps:b,triggerHoverEnd:h}},[t,n,r,o,i,l,c]);return d.useEffect(()=>{o&&f({currentTarget:i.target},i.pointerType)},[o]),{hoverProps:u,isHovered:s}}function fg(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,o=d.useRef({isFocused:!1,isFocusVisible:t||Rc()}),[s,a]=d.useState(!1),[i,l]=d.useState(()=>o.current.isFocused&&o.current.isFocusVisible),c=d.useCallback(()=>l(o.current.isFocused&&o.current.isFocusVisible),[]),u=d.useCallback(h=>{o.current.isFocused=h,a(h),c()},[c]);ag(h=>{o.current.isFocusVisible=h,c()},[],{isTextInput:n});let{focusProps:f}=ig({isDisabled:r,onFocusChange:u}),{focusWithinProps:p}=lg({isDisabled:!r,onFocusWithinChange:u});return{isFocused:s,isFocusVisible:i,focusProps:r?p:f}}var dg=Object.defineProperty,hg=(e,t,n)=>t in e?dg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Fo=(e,t,n)=>(hg(e,typeof t!="symbol"?t+"":t,n),n);let pg=class{constructor(){Fo(this,"current",this.detect()),Fo(this,"handoffState","pending"),Fo(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Yt=new pg;function Qr(e){var t,n;return Yt.isServer?null:e?"ownerDocument"in e?e.ownerDocument:"current"in e?(n=(t=e.current)==null?void 0:t.ownerDocument)!=null?n:document:null:document}function Xr(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function ft(){let e=[],t={addEventListener(n,r,o,s){return n.addEventListener(r,o,s),t.add(()=>n.removeEventListener(r,o,s))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return Xr(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,o){let s=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:o}),this.add(()=>{Object.assign(n.style,{[r]:s})})},group(n){let r=ft();return n(r),this.add(()=>r.dispose())},add(n){return e.includes(n)||e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let o of e.splice(r,1))o()}},dispose(){for(let n of e.splice(0))n()}};return t}function ra(){let[e]=d.useState(ft);return d.useEffect(()=>()=>e.dispose(),[e]),e}let ve=(e,t)=>{Yt.isServer?d.useEffect(e,t):d.useLayoutEffect(e,t)};function nn(e){let t=d.useRef(e);return ve(()=>{t.current=e},[e]),t}let ce=function(e){let t=nn(e);return d.useCallback((...n)=>t.current(...n),[t])},$c=d.createContext(void 0);function Jr(){return d.useContext($c)}function mg({value:e,children:t}){return d.createElement($c.Provider,{value:e},t)}function As(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function it(e,t,...n){if(e in t){let o=t[e];return typeof o=="function"?o(...n):o}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,it),r}var _r=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(_r||{}),Ot=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Ot||{});function Te(){let e=bg();return d.useCallback(t=>gg({mergeRefs:e,...t}),[e])}function gg({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:s=!0,name:a,mergeRefs:i}){i=i??yg;let l=Fc(t,e);if(s)return yr(l,n,r,a,i);let c=o??0;if(c&2){let{static:u=!1,...f}=l;if(u)return yr(f,n,r,a,i)}if(c&1){let{unmount:u=!0,...f}=l;return it(u?0:1,{0(){return null},1(){return yr({...f,hidden:!0,style:{display:"none"}},n,r,a,i)}})}return yr(l,n,r,a,i)}function yr(e,t={},n,r,o){let{as:s=n,children:a,refName:i="ref",...l}=Io(e,["unmount","static"]),c=e.ref!==void 0?{[i]:e.ref}:{},u=typeof a=="function"?a(t):a;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let f={};if(t){let p=!1,h=[];for(let[b,g]of Object.entries(t))typeof g=="boolean"&&(p=!0),g===!0&&h.push(b.replace(/([A-Z])/g,y=>`-${y.toLowerCase()}`));if(p){f["data-headlessui-state"]=h.join(" ");for(let b of h)f[`data-${b}`]=""}}if(s===d.Fragment&&(Object.keys(Nt(l)).length>0||Object.keys(Nt(f)).length>0))if(!d.isValidElement(u)||Array.isArray(u)&&u.length>1){if(Object.keys(Nt(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(Nt(l)).concat(Object.keys(Nt(f))).map(p=>` - ${p}`).join(`
|
|
585
|
-
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(p=>` - ${p}`).join(`
|
|
586
|
-
`)].join(`
|
|
587
|
-
`))}else{let p=u.props,h=p==null?void 0:p.className,b=typeof h=="function"?(...x)=>As(h(...x),l.className):As(h,l.className),g=b?{className:b}:{},y=Fc(u.props,Nt(Io(l,["ref"])));for(let x in f)x in y&&delete f[x];return d.cloneElement(u,Object.assign({},y,f,c,{ref:o(wg(u),c.ref)},g))}return d.createElement(s,Object.assign({},Io(l,["ref"]),s!==d.Fragment&&c,s!==d.Fragment&&f),u)}function bg(){let e=d.useRef([]),t=d.useCallback(n=>{for(let r of e.current)r!=null&&(typeof r=="function"?r(n):r.current=n)},[]);return(...n)=>{if(!n.every(r=>r==null))return e.current=n,t}}function yg(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function Fc(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];if(t.disabled||t["aria-disabled"])for(let r in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(r)&&(n[r]=[o=>{var s;return(s=o==null?void 0:o.preventDefault)==null?void 0:s.call(o)}]);for(let r in n)Object.assign(t,{[r](o,...s){let a=n[r];for(let i of a){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;i(o,...s)}}});return t}function vg(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let o in r)o.startsWith("on")&&typeof r[o]=="function"?(n[o]!=null||(n[o]=[]),n[o].push(r[o])):t[o]=r[o];for(let r in n)Object.assign(t,{[r](...o){let s=n[r];for(let a of s)a==null||a(...o)}});return t}function we(e){var t;return Object.assign(d.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Nt(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Io(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function wg(e){return d.version.split(".")[0]>="19"?e.props.ref:e.ref}let xg="span";var Jn=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Jn||{});function Eg(e,t){var n;let{features:r=1,...o}=e,s={ref:t,"aria-hidden":(r&2)===2?!0:(n=o["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return Te()({ourProps:s,theirProps:o,slot:{},defaultTag:xg,name:"Hidden"})}let Dr=we(Eg),Sg=d.createContext(null);function Cg(e){let[t,n]=d.useState(null);return d.createElement(Sg.Provider,{value:{target:t}},e.children,d.createElement(Dr,{features:Jn.Hidden,ref:n}))}let Ic=d.createContext(void 0);function Mc(){return d.useContext(Ic)}function kg({id:e,children:t}){return d.createElement(Ic.Provider,{value:e},t)}function Lc(e){return typeof e!="object"||e===null?!1:"nodeType"in e}function tt(e){return Lc(e)&&"tagName"in e}function Ft(e){return tt(e)&&"accessKey"in e}function Pt(e){return tt(e)&&"tabIndex"in e}function Tg(e){return tt(e)&&"style"in e}function Og(e){return Ft(e)&&e.nodeName==="IFRAME"}function Nc(e){return Ft(e)&&e.nodeName==="INPUT"}function wi(e){return Ft(e)&&e.nodeName==="LABEL"}function Pg(e){return tt(e)?e.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]'):!1}let _c=Symbol();function Ag(e,t=!0){return Object.assign(e,{[_c]:t})}function He(...e){let t=d.useRef(e);d.useEffect(()=>{t.current=e},[e]);let n=ce(r=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(r):o.current=r)});return e.every(r=>r==null||(r==null?void 0:r[_c]))?void 0:n}let Zr=d.createContext(null);Zr.displayName="DescriptionContext";function Dc(){let e=d.useContext(Zr);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Dc),t}return e}function Rg(){var e,t;return(t=(e=d.useContext(Zr))==null?void 0:e.value)!=null?t:void 0}function jc(){let[e,t]=d.useState([]);return[e.length>0?e.join(" "):void 0,d.useMemo(()=>function(n){let r=ce(s=>(t(a=>[...a,s]),()=>t(a=>{let i=a.slice(),l=i.indexOf(s);return l!==-1&&i.splice(l,1),i}))),o=d.useMemo(()=>({register:r,slot:n.slot,name:n.name,props:n.props,value:n.value}),[r,n.slot,n.name,n.props,n.value]);return d.createElement(Zr.Provider,{value:o},n.children)},[t])]}let $g="p";function Fg(e,t){let n=d.useId(),r=Jr(),{id:o=`headlessui-description-${n}`,...s}=e,a=Dc(),i=He(t);ve(()=>a.register(o),[o,a.register]);let l=r||!1,c=d.useMemo(()=>({...a.slot,disabled:l}),[a.slot,l]),u={ref:i,...a.props,id:o};return Te()({ourProps:u,theirProps:s,slot:c,defaultTag:$g,name:a.name||"Description"})}let Ig=we(Fg),zc=Object.assign(Ig,{});var Hc=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Hc||{});let eo=d.createContext(null);eo.displayName="LabelContext";function Wc(){let e=d.useContext(eo);if(e===null){let t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Wc),t}return e}function Uc(e){var t,n,r;let o=(n=(t=d.useContext(eo))==null?void 0:t.value)!=null?n:void 0;return((r=void 0)!=null?r:0)>0?[o,...e].filter(Boolean).join(" "):o}function Mg({inherit:e=!1}={}){let t=Uc(),[n,r]=d.useState([]),o=e?[t,...n].filter(Boolean):n;return[o.length>0?o.join(" "):void 0,d.useMemo(()=>function(s){let a=ce(l=>(r(c=>[...c,l]),()=>r(c=>{let u=c.slice(),f=u.indexOf(l);return f!==-1&&u.splice(f,1),u}))),i=d.useMemo(()=>({register:a,slot:s.slot,name:s.name,props:s.props,value:s.value}),[a,s.slot,s.name,s.props,s.value]);return d.createElement(eo.Provider,{value:i},s.children)},[r])]}let Lg="label";function Ng(e,t){var n;let r=d.useId(),o=Wc(),s=Mc(),a=Jr(),{id:i=`headlessui-label-${r}`,htmlFor:l=s??((n=o.props)==null?void 0:n.htmlFor),passive:c=!1,...u}=e,f=He(t);ve(()=>o.register(i),[i,o.register]);let p=ce(y=>{let x=y.currentTarget;if(!(y.target!==y.currentTarget&&Pg(y.target))&&(wi(x)&&y.preventDefault(),o.props&&"onClick"in o.props&&typeof o.props.onClick=="function"&&o.props.onClick(y),wi(x))){let S=document.getElementById(x.htmlFor);if(S){let w=S.getAttribute("disabled");if(w==="true"||w==="")return;let C=S.getAttribute("aria-disabled");if(C==="true"||C==="")return;(Nc(S)&&(S.type==="file"||S.type==="radio"||S.type==="checkbox")||S.role==="radio"||S.role==="checkbox"||S.role==="switch")&&S.click(),S.focus({preventScroll:!0})}}}),h=a||!1,b=d.useMemo(()=>({...o.slot,disabled:h}),[o.slot,h]),g={ref:f,...o.props,id:i,htmlFor:l,onClick:p};return c&&("onClick"in g&&(delete g.htmlFor,delete g.onClick),"onClick"in u&&delete u.onClick),Te()({ourProps:g,theirProps:u,slot:b,defaultTag:l?Lg:"div",name:o.name||"Label"})}let _g=we(Ng),Dg=Object.assign(_g,{}),jg=d.createContext(()=>{});function zg({value:e,children:t}){return d.createElement(jg.Provider,{value:e},t)}let Bc=class extends Map{constructor(t){super(),this.factory=t}get(t){let n=super.get(t);return n===void 0&&(n=this.factory(t),this.set(t,n)),n}};var Hg=Object.defineProperty,Wg=(e,t,n)=>t in e?Hg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ug=(e,t,n)=>(Wg(e,t+"",n),n),qc=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Fe=(e,t,n)=>(qc(e,t,"read from private field"),n?n.call(e):t.get(e)),Mo=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},xi=(e,t,n,r)=>(qc(e,t,"write to private field"),t.set(e,n),n),We,Dn,jn;let Bg=class{constructor(t){Mo(this,We,{}),Mo(this,Dn,new Bc(()=>new Set)),Mo(this,jn,new Set),Ug(this,"disposables",ft()),xi(this,We,t)}dispose(){this.disposables.dispose()}get state(){return Fe(this,We)}subscribe(t,n){let r={selector:t,callback:n,current:t(Fe(this,We))};return Fe(this,jn).add(r),this.disposables.add(()=>{Fe(this,jn).delete(r)})}on(t,n){return Fe(this,Dn).get(t).add(n),this.disposables.add(()=>{Fe(this,Dn).get(t).delete(n)})}send(t){let n=this.reduce(Fe(this,We),t);if(n!==Fe(this,We)){xi(this,We,n);for(let r of Fe(this,jn)){let o=r.selector(Fe(this,We));Vc(r.current,o)||(r.current=o,r.callback(o))}for(let r of Fe(this,Dn).get(t.type))r(Fe(this,We),t)}}};We=new WeakMap,Dn=new WeakMap,jn=new WeakMap;function Vc(e,t){return Object.is(e,t)?!0:typeof e!="object"||e===null||typeof t!="object"||t===null?!1:Array.isArray(e)&&Array.isArray(t)?e.length!==t.length?!1:Lo(e[Symbol.iterator](),t[Symbol.iterator]()):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size!==t.size?!1:Lo(e.entries(),t.entries()):Ei(e)&&Ei(t)?Lo(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()):!1}function Lo(e,t){do{let n=e.next(),r=t.next();if(n.done&&r.done)return!0;if(n.done||r.done||!Object.is(n.value,r.value))return!1}while(!0)}function Ei(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}var qg=Object.defineProperty,Vg=(e,t,n)=>t in e?qg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Si=(e,t,n)=>(Vg(e,typeof t!="symbol"?t+"":t,n),n),Gg=(e=>(e[e.Push=0]="Push",e[e.Pop=1]="Pop",e))(Gg||{});let Kg={0(e,t){let n=t.id,r=e.stack,o=e.stack.indexOf(n);if(o!==-1){let s=e.stack.slice();return s.splice(o,1),s.push(n),r=s,{...e,stack:r}}return{...e,stack:[...e.stack,n]}},1(e,t){let n=t.id,r=e.stack.indexOf(n);if(r===-1)return e;let o=e.stack.slice();return o.splice(r,1),{...e,stack:o}}},Yg=class Gc extends Bg{constructor(){super(...arguments),Si(this,"actions",{push:t=>this.send({type:0,id:t}),pop:t=>this.send({type:1,id:t})}),Si(this,"selectors",{isTop:(t,n)=>t.stack[t.stack.length-1]===n,inStack:(t,n)=>t.stack.includes(n)})}static new(){return new Gc({stack:[]})}reduce(t,n){return it(n.type,Kg,t,n)}};const Kc=new Bc(()=>Yg.new());var vr={exports:{}},No={};/**
|
|
588
|
-
* @license React
|
|
589
|
-
* use-sync-external-store-with-selector.production.js
|
|
590
|
-
*
|
|
591
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
592
|
-
*
|
|
593
|
-
* This source code is licensed under the MIT license found in the
|
|
594
|
-
* LICENSE file in the root directory of this source tree.
|
|
595
|
-
*/var Ci;function Qg(){if(Ci)return No;Ci=1;var e=d;function t(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,o=e.useRef,s=e.useEffect,a=e.useMemo,i=e.useDebugValue;return No.useSyncExternalStoreWithSelector=function(l,c,u,f,p){var h=o(null);if(h.current===null){var b={hasValue:!1,value:null};h.current=b}else b=h.current;h=a(function(){function y(v){if(!x){if(x=!0,S=v,v=f(v),p!==void 0&&b.hasValue){var L=b.value;if(p(L,v))return w=L}return w=v}if(L=w,n(S,v))return L;var q=f(v);return p!==void 0&&p(L,q)?(S=v,L):(S=v,w=q)}var x=!1,S,w,C=u===void 0?null:u;return[function(){return y(c())},C===null?void 0:function(){return y(C())}]},[c,u,f,p]);var g=r(l,h[0],h[1]);return s(function(){b.hasValue=!0,b.value=g},[g]),i(g),g},No}var _o={};/**
|
|
596
|
-
* @license React
|
|
597
|
-
* use-sync-external-store-with-selector.development.js
|
|
598
|
-
*
|
|
599
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
600
|
-
*
|
|
601
|
-
* This source code is licensed under the MIT license found in the
|
|
602
|
-
* LICENSE file in the root directory of this source tree.
|
|
603
|
-
*/var ki;function Xg(){return ki||(ki=1,process.env.NODE_ENV!=="production"&&function(){function e(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=d,n=typeof Object.is=="function"?Object.is:e,r=t.useSyncExternalStore,o=t.useRef,s=t.useEffect,a=t.useMemo,i=t.useDebugValue;_o.useSyncExternalStoreWithSelector=function(l,c,u,f,p){var h=o(null);if(h.current===null){var b={hasValue:!1,value:null};h.current=b}else b=h.current;h=a(function(){function y(v){if(!x){if(x=!0,S=v,v=f(v),p!==void 0&&b.hasValue){var L=b.value;if(p(L,v))return w=L}return w=v}if(L=w,n(S,v))return L;var q=f(v);return p!==void 0&&p(L,q)?(S=v,L):(S=v,w=q)}var x=!1,S,w,C=u===void 0?null:u;return[function(){return y(c())},C===null?void 0:function(){return y(C())}]},[c,u,f,p]);var g=r(l,h[0],h[1]);return s(function(){b.hasValue=!0,b.value=g},[g]),i(g),g},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),_o}var Ti;function Jg(){return Ti||(Ti=1,process.env.NODE_ENV==="production"?vr.exports=Qg():vr.exports=Xg()),vr.exports}var Zg=Jg();function Yc(e,t,n=Vc){return Zg.useSyncExternalStoreWithSelector(ce(r=>e.subscribe(eb,r)),ce(()=>e.state),ce(()=>e.state),ce(t),n)}function eb(e){return e}function ir(e,t){let n=d.useId(),r=Kc.get(t),[o,s]=Yc(r,d.useCallback(a=>[r.selectors.isTop(a,n),r.selectors.inStack(a,n)],[r,n]));return ve(()=>{if(e)return r.actions.push(n),()=>r.actions.pop(n)},[r,e,n]),e?s?o:!0:!1}let Rs=new Map,Vn=new Map;function Oi(e){var t;let n=(t=Vn.get(e))!=null?t:0;return Vn.set(e,n+1),n!==0?()=>Pi(e):(Rs.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>Pi(e))}function Pi(e){var t;let n=(t=Vn.get(e))!=null?t:1;if(n===1?Vn.delete(e):Vn.set(e,n-1),n!==1)return;let r=Rs.get(e);r&&(r["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,Rs.delete(e))}function tb(e,{allowed:t,disallowed:n}={}){let r=ir(e,"inert-others");ve(()=>{var o,s;if(!r)return;let a=ft();for(let l of(o=n==null?void 0:n())!=null?o:[])l&&a.add(Oi(l));let i=(s=t==null?void 0:t())!=null?s:[];for(let l of i){if(!l)continue;let c=Qr(l);if(!c)continue;let u=l.parentElement;for(;u&&u!==c.body;){for(let f of u.children)i.some(p=>f.contains(p))||a.add(Oi(f));u=u.parentElement}}return a.dispose},[r,t,n])}function nb(e,t,n){let r=nn(o=>{let s=o.getBoundingClientRect();s.x===0&&s.y===0&&s.width===0&&s.height===0&&n()});d.useEffect(()=>{if(!e)return;let o=t===null?null:Ft(t)?t:t.current;if(!o)return;let s=ft();if(typeof ResizeObserver<"u"){let a=new ResizeObserver(()=>r.current(o));a.observe(o),s.add(()=>a.disconnect())}if(typeof IntersectionObserver<"u"){let a=new IntersectionObserver(()=>r.current(o));a.observe(o),s.add(()=>a.disconnect())}return()=>s.dispose()},[t,r,e])}let jr=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),rb=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Ze=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(Ze||{}),$s=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))($s||{}),ob=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(ob||{});function sb(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(jr)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}function ab(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(rb)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var Qc=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Qc||{});function ib(e,t=0){var n;return e===((n=Qr(e))==null?void 0:n.body)?!1:it(t,{0(){return e.matches(jr)},1(){let r=e;for(;r!==null;){if(r.matches(jr))return!0;r=r.parentElement}return!1}})}var lb=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(lb||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function nt(e){e==null||e.focus({preventScroll:!0})}let cb=["textarea","input"].join(",");function ub(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,cb))!=null?n:!1}function fb(e,t=n=>n){return e.slice().sort((n,r)=>{let o=t(n),s=t(r);if(o===null||s===null)return 0;let a=o.compareDocumentPosition(s);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Gn(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){let s=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,a=Array.isArray(e)?n?fb(e):e:t&64?ab(e):sb(e);o.length>0&&a.length>1&&(a=a.filter(h=>!o.some(b=>b!=null&&"current"in b?(b==null?void 0:b.current)===h:b===h))),r=r??s.activeElement;let i=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,a.indexOf(r))-1;if(t&4)return Math.max(0,a.indexOf(r))+1;if(t&8)return a.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=t&32?{preventScroll:!0}:{},u=0,f=a.length,p;do{if(u>=f||u+f<=0)return 0;let h=l+u;if(t&16)h=(h+f)%f;else{if(h<0)return 3;if(h>=f)return 1}p=a[h],p==null||p.focus(c),u+=i}while(p!==s.activeElement);return t&6&&ub(p)&&p.select(),2}function Xc(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function db(){return/Android/gi.test(window.navigator.userAgent)}function Ai(){return Xc()||db()}function wr(e,t,n,r){let o=nn(n);d.useEffect(()=>{if(!e)return;function s(a){o.current(a)}return document.addEventListener(t,s,r),()=>document.removeEventListener(t,s,r)},[e,t,r])}function Jc(e,t,n,r){let o=nn(n);d.useEffect(()=>{if(!e)return;function s(a){o.current(a)}return window.addEventListener(t,s,r),()=>window.removeEventListener(t,s,r)},[e,t,r])}const Ri=30;function hb(e,t,n){let r=nn(n),o=d.useCallback(function(i,l){if(i.defaultPrevented)return;let c=l(i);if(c===null||!c.getRootNode().contains(c)||!c.isConnected)return;let u=function f(p){return typeof p=="function"?f(p()):Array.isArray(p)||p instanceof Set?p:[p]}(t);for(let f of u)if(f!==null&&(f.contains(c)||i.composed&&i.composedPath().includes(f)))return;return!ib(c,Qc.Loose)&&c.tabIndex!==-1&&i.preventDefault(),r.current(i,c)},[r,t]),s=d.useRef(null);wr(e,"pointerdown",i=>{var l,c;Ai()||(s.current=((c=(l=i.composedPath)==null?void 0:l.call(i))==null?void 0:c[0])||i.target)},!0),wr(e,"pointerup",i=>{if(Ai()||!s.current)return;let l=s.current;return s.current=null,o(i,()=>l)},!0);let a=d.useRef({x:0,y:0});wr(e,"touchstart",i=>{a.current.x=i.touches[0].clientX,a.current.y=i.touches[0].clientY},!0),wr(e,"touchend",i=>{let l={x:i.changedTouches[0].clientX,y:i.changedTouches[0].clientY};if(!(Math.abs(l.x-a.current.x)>=Ri||Math.abs(l.y-a.current.y)>=Ri))return o(i,()=>Pt(i.target)?i.target:null)},!0),Jc(e,"blur",i=>o(i,()=>Og(window.document.activeElement)?window.document.activeElement:null),!0)}function to(...e){return d.useMemo(()=>Qr(...e),[...e])}function Zc(e,t,n,r){let o=nn(n);d.useEffect(()=>{e=e??window;function s(a){o.current(a)}return e.addEventListener(t,s,r),()=>e.removeEventListener(t,s,r)},[e,t,r])}function pb(e){return d.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}function mb(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(o){return r.add(o),()=>r.delete(o)},dispatch(o,...s){let a=t[o].call(n,...s);a&&(n=a,r.forEach(i=>i()))}}}function gb(){let e;return{before({doc:t}){var n;let r=t.documentElement,o=(n=t.defaultView)!=null?n:window;e=Math.max(0,o.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,o=Math.max(0,r.clientWidth-r.offsetWidth),s=Math.max(0,e-o);n.style(r,"paddingRight",`${s}px`)}}}function bb(){return Xc()?{before({doc:e,d:t,meta:n}){function r(o){return n.containers.flatMap(s=>s()).some(s=>s.contains(o))}t.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let i=ft();i.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>i.dispose()))}let s=(o=window.scrollY)!=null?o:window.pageYOffset,a=null;t.addEventListener(e,"click",i=>{if(Pt(i.target))try{let l=i.target.closest("a");if(!l)return;let{hash:c}=new URL(l.href),u=e.querySelector(c);Pt(u)&&!r(u)&&(a=u)}catch{}},!0),t.addEventListener(e,"touchstart",i=>{if(Pt(i.target)&&Tg(i.target))if(r(i.target)){let l=i.target;for(;l.parentElement&&r(l.parentElement);)l=l.parentElement;t.style(l,"overscrollBehavior","contain")}else t.style(i.target,"touchAction","none")}),t.addEventListener(e,"touchmove",i=>{if(Pt(i.target)){if(Nc(i.target))return;if(r(i.target)){let l=i.target;for(;l.parentElement&&l.dataset.headlessuiPortal!==""&&!(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth);)l=l.parentElement;l.dataset.headlessuiPortal===""&&i.preventDefault()}else i.preventDefault()}},{passive:!1}),t.add(()=>{var i;let l=(i=window.scrollY)!=null?i:window.pageYOffset;s!==l&&window.scrollTo(0,s),a&&a.isConnected&&(a.scrollIntoView({block:"nearest"}),a=null)})})}}:{}}function yb(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function vb(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let zt=mb(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:ft(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:vb(n)},o=[bb(),gb(),yb()];o.forEach(({before:s})=>s==null?void 0:s(r)),o.forEach(({after:s})=>s==null?void 0:s(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});zt.subscribe(()=>{let e=zt.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",o=n.count!==0;(o&&!r||!o&&r)&&zt.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&zt.dispatch("TEARDOWN",n)}});function wb(e,t,n=()=>({containers:[]})){let r=pb(zt),o=t?r.get(t):void 0,s=o?o.count>0:!1;return ve(()=>{if(!(!t||!e))return zt.dispatch("PUSH",t,n),()=>zt.dispatch("POP",t,n)},[e,t]),s}function xb(e,t,n=()=>[document.body]){let r=ir(e,"scroll-lock");wb(r,t,o=>{var s;return{containers:[...(s=o.containers)!=null?s:[],n]}})}function Eb(e=0){let[t,n]=d.useState(e),r=d.useCallback(l=>n(l),[t]),o=d.useCallback(l=>n(c=>c|l),[t]),s=d.useCallback(l=>(t&l)===l,[t]),a=d.useCallback(l=>n(c=>c&~l),[n]),i=d.useCallback(l=>n(c=>c^l),[n]);return{flags:t,setFlag:r,addFlag:o,hasFlag:s,removeFlag:a,toggleFlag:i}}var $i,Fi;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&(($i=process==null?void 0:process.env)==null?void 0:$i.NODE_ENV)==="test"&&typeof((Fi=Element==null?void 0:Element.prototype)==null?void 0:Fi.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
|
|
604
|
-
`)),[]});var Sb=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(Sb||{});function Cb(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function kb(e,t,n,r){let[o,s]=d.useState(n),{hasFlag:a,addFlag:i,removeFlag:l}=Eb(e&&o?3:0),c=d.useRef(!1),u=d.useRef(!1),f=ra();return ve(()=>{var p;if(e){if(n&&s(!0),!t){n&&i(3);return}return(p=r==null?void 0:r.start)==null||p.call(r,n),Tb(t,{inFlight:c,prepare(){u.current?u.current=!1:u.current=c.current,c.current=!0,!u.current&&(n?(i(3),l(4)):(i(4),l(2)))},run(){u.current?n?(l(3),i(4)):(l(4),i(3)):n?l(1):i(1)},done(){var h;u.current&&typeof t.getAnimations=="function"&&t.getAnimations().length>0||(c.current=!1,l(7),n||s(!1),(h=r==null?void 0:r.end)==null||h.call(r,n))}})}},[e,n,t,f]),e?[o,{closed:a(1),enter:a(2),leave:a(4),transition:a(2)||a(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function Tb(e,{prepare:t,run:n,done:r,inFlight:o}){let s=ft();return Pb(e,{prepare:t,inFlight:o}),s.nextFrame(()=>{n(),s.requestAnimationFrame(()=>{s.add(Ob(e,r))})}),s.dispose}function Ob(e,t){var n,r;let o=ft();if(!e)return o.dispose;let s=!1;o.add(()=>{s=!0});let a=(r=(n=e.getAnimations)==null?void 0:n.call(e).filter(i=>i instanceof CSSTransition))!=null?r:[];return a.length===0?(t(),o.dispose):(Promise.allSettled(a.map(i=>i.finished)).then(()=>{s||t()}),o.dispose)}function Pb(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}function oa(e,t){let n=d.useRef([]),r=ce(e);d.useEffect(()=>{let o=[...n.current];for(let[s,a]of t.entries())if(n.current[s]!==a){let i=r(t,o);return n.current=t,i}},[r,...t])}let no=d.createContext(null);no.displayName="OpenClosedContext";var je=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(je||{});function ro(){return d.useContext(no)}function Ab({value:e,children:t}){return d.createElement(no.Provider,{value:e},t)}function Rb({children:e}){return d.createElement(no.Provider,{value:null},e)}function $b(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let mt=[];$b(()=>{function e(t){if(!Pt(t.target)||t.target===document.body||mt[0]===t.target)return;let n=t.target;n=n.closest(jr),mt.unshift(n??t.target),mt=mt.filter(r=>r!=null&&r.isConnected),mt.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function eu(e){let t=ce(e),n=d.useRef(!1);d.useEffect(()=>(n.current=!1,()=>{n.current=!0,Xr(()=>{n.current&&t()})}),[t])}function Fb(){let e=typeof document>"u";return"useSyncExternalStore"in F?(t=>t.useSyncExternalStore)(F)(()=>()=>{},()=>!1,()=>!e):!1}function lr(){let e=Fb(),[t,n]=F.useState(Yt.isHandoffComplete);return t&&Yt.isHandoffComplete===!1&&n(!1),F.useEffect(()=>{t!==!0&&n(!0)},[t]),F.useEffect(()=>Yt.handoff(),[]),e?!1:t}let tu=d.createContext(!1);function Ib(){return d.useContext(tu)}function Ii(e){return d.createElement(tu.Provider,{value:e.force},e.children)}function Mb(e){let t=Ib(),n=d.useContext(ru),[r,o]=d.useState(()=>{var s;if(!t&&n!==null)return(s=n.current)!=null?s:null;if(Yt.isServer)return null;let a=e==null?void 0:e.getElementById("headlessui-portal-root");if(a)return a;if(e===null)return null;let i=e.createElement("div");return i.setAttribute("id","headlessui-portal-root"),e.body.appendChild(i)});return d.useEffect(()=>{r!==null&&(e!=null&&e.body.contains(r)||e==null||e.body.appendChild(r))},[r,e]),d.useEffect(()=>{t||n!==null&&o(n.current)},[n,o,t]),r}let nu=d.Fragment,Lb=we(function(e,t){let{ownerDocument:n=null,...r}=e,o=d.useRef(null),s=He(Ag(h=>{o.current=h}),t),a=to(o),i=n??a,l=Mb(i),[c]=d.useState(()=>{var h;return Yt.isServer?null:(h=i==null?void 0:i.createElement("div"))!=null?h:null}),u=d.useContext(Fs),f=lr();ve(()=>{!l||!c||l.contains(c)||(c.setAttribute("data-headlessui-portal",""),l.appendChild(c))},[l,c]),ve(()=>{if(c&&u)return u.register(c)},[u,c]),eu(()=>{var h;!l||!c||(Lc(c)&&l.contains(c)&&l.removeChild(c),l.childNodes.length<=0&&((h=l.parentElement)==null||h.removeChild(l)))});let p=Te();return f?!l||!c?null:Vi.createPortal(p({ourProps:{ref:s},theirProps:r,slot:{},defaultTag:nu,name:"Portal"}),c):null});function Nb(e,t){let n=He(t),{enabled:r=!0,ownerDocument:o,...s}=e,a=Te();return r?d.createElement(Lb,{...s,ownerDocument:o,ref:n}):a({ourProps:{ref:n},theirProps:s,slot:{},defaultTag:nu,name:"Portal"})}let _b=d.Fragment,ru=d.createContext(null);function Db(e,t){let{target:n,...r}=e,o={ref:He(t)},s=Te();return d.createElement(ru.Provider,{value:n},s({ourProps:o,theirProps:r,defaultTag:_b,name:"Popover.Group"}))}let Fs=d.createContext(null);function jb(){let e=d.useContext(Fs),t=d.useRef([]),n=ce(s=>(t.current.push(s),e&&e.register(s),()=>r(s))),r=ce(s=>{let a=t.current.indexOf(s);a!==-1&&t.current.splice(a,1),e&&e.unregister(s)}),o=d.useMemo(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,d.useMemo(()=>function({children:s}){return d.createElement(Fs.Provider,{value:o},s)},[o])]}let zb=we(Nb),ou=we(Db),Hb=Object.assign(zb,{Group:ou});function Wb(e,t=typeof document<"u"?document.defaultView:null,n){let r=ir(e,"escape");Zc(t,"keydown",o=>{r&&(o.defaultPrevented||o.key===Hc.Escape&&n(o))})}function Ub(){var e;let[t]=d.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[n,r]=d.useState((e=t==null?void 0:t.matches)!=null?e:!1);return ve(()=>{if(!t)return;function o(s){r(s.matches)}return t.addEventListener("change",o),()=>t.removeEventListener("change",o)},[t]),n}function Bb({defaultContainers:e=[],portals:t,mainTreeNode:n}={}){let r=to(n),o=ce(()=>{var s,a;let i=[];for(let l of e)l!==null&&(tt(l)?i.push(l):"current"in l&&tt(l.current)&&i.push(l.current));if(t!=null&&t.current)for(let l of t.current)i.push(l);for(let l of(s=r==null?void 0:r.querySelectorAll("html > *, body > *"))!=null?s:[])l!==document.body&&l!==document.head&&tt(l)&&l.id!=="headlessui-portal-root"&&(n&&(l.contains(n)||l.contains((a=n==null?void 0:n.getRootNode())==null?void 0:a.host))||i.some(c=>l.contains(c))||i.push(l));return i});return{resolveContainers:o,contains:ce(s=>o().some(a=>a.contains(s)))}}let su=d.createContext(null);function Mi({children:e,node:t}){let[n,r]=d.useState(null),o=au(t??n);return d.createElement(su.Provider,{value:o},e,o===null&&d.createElement(Dr,{features:Jn.Hidden,ref:s=>{var a,i;if(s){for(let l of(i=(a=Qr(s))==null?void 0:a.querySelectorAll("html > *, body > *"))!=null?i:[])if(l!==document.body&&l!==document.head&&tt(l)&&l!=null&&l.contains(s)){r(l);break}}}}))}function au(e=null){var t;return(t=d.useContext(su))!=null?t:e}function sa(){let e=d.useRef(!1);return ve(()=>(e.current=!0,()=>{e.current=!1}),[]),e}var zn=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(zn||{});function qb(){let e=d.useRef(0);return Jc(!0,"keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function iu(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.current)tt(n.current)&&t.add(n.current);return t}let Vb="div";var _t=(e=>(e[e.None=0]="None",e[e.InitialFocus=1]="InitialFocus",e[e.TabLock=2]="TabLock",e[e.FocusLock=4]="FocusLock",e[e.RestoreFocus=8]="RestoreFocus",e[e.AutoFocus=16]="AutoFocus",e))(_t||{});function Gb(e,t){let n=d.useRef(null),r=He(n,t),{initialFocus:o,initialFocusFallback:s,containers:a,features:i=15,...l}=e;lr()||(i=0);let c=to(n);Xb(i,{ownerDocument:c});let u=Jb(i,{ownerDocument:c,container:n,initialFocus:o,initialFocusFallback:s});Zb(i,{ownerDocument:c,container:n,containers:a,previousActiveElement:u});let f=qb(),p=ce(S=>{if(!Ft(n.current))return;let w=n.current;(C=>C())(()=>{it(f.current,{[zn.Forwards]:()=>{Gn(w,Ze.First,{skipElements:[S.relatedTarget,s]})},[zn.Backwards]:()=>{Gn(w,Ze.Last,{skipElements:[S.relatedTarget,s]})}})})}),h=ir(!!(i&2),"focus-trap#tab-lock"),b=ra(),g=d.useRef(!1),y={ref:r,onKeyDown(S){S.key=="Tab"&&(g.current=!0,b.requestAnimationFrame(()=>{g.current=!1}))},onBlur(S){if(!(i&4))return;let w=iu(a);Ft(n.current)&&w.add(n.current);let C=S.relatedTarget;Pt(C)&&C.dataset.headlessuiFocusGuard!=="true"&&(lu(w,C)||(g.current?Gn(n.current,it(f.current,{[zn.Forwards]:()=>Ze.Next,[zn.Backwards]:()=>Ze.Previous})|Ze.WrapAround,{relativeTo:S.target}):Pt(S.target)&&nt(S.target)))}},x=Te();return d.createElement(d.Fragment,null,h&&d.createElement(Dr,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:Jn.Focusable}),x({ourProps:y,theirProps:l,defaultTag:Vb,name:"FocusTrap"}),h&&d.createElement(Dr,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:Jn.Focusable}))}let Kb=we(Gb),Yb=Object.assign(Kb,{features:_t});function Qb(e=!0){let t=d.useRef(mt.slice());return oa(([n],[r])=>{r===!0&&n===!1&&Xr(()=>{t.current.splice(0)}),r===!1&&n===!0&&(t.current=mt.slice())},[e,mt,t]),ce(()=>{var n;return(n=t.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function Xb(e,{ownerDocument:t}){let n=!!(e&8),r=Qb(n);oa(()=>{n||(t==null?void 0:t.activeElement)===(t==null?void 0:t.body)&&nt(r())},[n]),eu(()=>{n&&nt(r())})}function Jb(e,{ownerDocument:t,container:n,initialFocus:r,initialFocusFallback:o}){let s=d.useRef(null),a=ir(!!(e&1),"focus-trap#initial-focus"),i=sa();return oa(()=>{if(e===0)return;if(!a){o!=null&&o.current&&nt(o.current);return}let l=n.current;l&&Xr(()=>{if(!i.current)return;let c=t==null?void 0:t.activeElement;if(r!=null&&r.current){if((r==null?void 0:r.current)===c){s.current=c;return}}else if(l.contains(c)){s.current=c;return}if(r!=null&&r.current)nt(r.current);else{if(e&16){if(Gn(l,Ze.First|Ze.AutoFocus)!==$s.Error)return}else if(Gn(l,Ze.First)!==$s.Error)return;if(o!=null&&o.current&&(nt(o.current),(t==null?void 0:t.activeElement)===o.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}s.current=t==null?void 0:t.activeElement})},[o,a,e]),s}function Zb(e,{ownerDocument:t,container:n,containers:r,previousActiveElement:o}){let s=sa(),a=!!(e&4);Zc(t==null?void 0:t.defaultView,"focus",i=>{if(!a||!s.current)return;let l=iu(r);Ft(n.current)&&l.add(n.current);let c=o.current;if(!c)return;let u=i.target;Ft(u)?lu(l,u)?(o.current=u,nt(u)):(i.preventDefault(),i.stopPropagation(),nt(c)):nt(o.current)},!0)}function lu(e,t){for(let n of e)if(n.contains(t))return!0;return!1}function cu(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:fu)!==d.Fragment||d.Children.count(e.children)===1}let oo=d.createContext(null);oo.displayName="TransitionContext";var ey=(e=>(e.Visible="visible",e.Hidden="hidden",e))(ey||{});function ty(){let e=d.useContext(oo);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function ny(){let e=d.useContext(so);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let so=d.createContext(null);so.displayName="NestingContext";function ao(e){return"children"in e?ao(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function uu(e,t){let n=nn(e),r=d.useRef([]),o=sa(),s=ra(),a=ce((h,b=Ot.Hidden)=>{let g=r.current.findIndex(({el:y})=>y===h);g!==-1&&(it(b,{[Ot.Unmount](){r.current.splice(g,1)},[Ot.Hidden](){r.current[g].state="hidden"}}),s.microTask(()=>{var y;!ao(r)&&o.current&&((y=n.current)==null||y.call(n))}))}),i=ce(h=>{let b=r.current.find(({el:g})=>g===h);return b?b.state!=="visible"&&(b.state="visible"):r.current.push({el:h,state:"visible"}),()=>a(h,Ot.Unmount)}),l=d.useRef([]),c=d.useRef(Promise.resolve()),u=d.useRef({enter:[],leave:[]}),f=ce((h,b,g)=>{l.current.splice(0),t&&(t.chains.current[b]=t.chains.current[b].filter(([y])=>y!==h)),t==null||t.chains.current[b].push([h,new Promise(y=>{l.current.push(y)})]),t==null||t.chains.current[b].push([h,new Promise(y=>{Promise.all(u.current[b].map(([x,S])=>S)).then(()=>y())})]),b==="enter"?c.current=c.current.then(()=>t==null?void 0:t.wait.current).then(()=>g(b)):g(b)}),p=ce((h,b,g)=>{Promise.all(u.current[b].splice(0).map(([y,x])=>x)).then(()=>{var y;(y=l.current.shift())==null||y()}).then(()=>g(b))});return d.useMemo(()=>({children:r,register:i,unregister:a,onStart:f,onStop:p,wait:c,chains:u}),[i,a,r,f,p,u,c])}let fu=d.Fragment,du=_r.RenderStrategy;function ry(e,t){var n,r;let{transition:o=!0,beforeEnter:s,afterEnter:a,beforeLeave:i,afterLeave:l,enter:c,enterFrom:u,enterTo:f,entered:p,leave:h,leaveFrom:b,leaveTo:g,...y}=e,[x,S]=d.useState(null),w=d.useRef(null),C=cu(e),v=He(...C?[w,t,S]:t===null?[]:[t]),L=(n=y.unmount)==null||n?Ot.Unmount:Ot.Hidden,{show:q,appear:R,initial:U}=ty(),[G,le]=d.useState(q?"visible":"hidden"),ue=ny(),{register:oe,unregister:fe}=ue;ve(()=>oe(w),[oe,w]),ve(()=>{if(L===Ot.Hidden&&w.current){if(q&&G!=="visible"){le("visible");return}return it(G,{hidden:()=>fe(w),visible:()=>oe(w)})}},[G,w,oe,fe,q,L]);let B=lr();ve(()=>{if(C&&B&&G==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,G,B,C]);let K=U&&!R,ne=R&&q&&U,T=d.useRef(!1),V=uu(()=>{T.current||(le("hidden"),fe(w))},ue),E=ce(I=>{T.current=!0;let Q=I?"enter":"leave";V.onStart(w,Q,X=>{X==="enter"?s==null||s():X==="leave"&&(i==null||i())})}),P=ce(I=>{let Q=I?"enter":"leave";T.current=!1,V.onStop(w,Q,X=>{X==="enter"?a==null||a():X==="leave"&&(l==null||l())}),Q==="leave"&&!ao(V)&&(le("hidden"),fe(w))});d.useEffect(()=>{C&&o||(E(q),P(q))},[q,C,o]);let W=!(!o||!C||!B||K),[,A]=kb(W,x,q,{start:E,end:P}),D=Nt({ref:v,className:((r=As(y.className,ne&&c,ne&&u,A.enter&&c,A.enter&&A.closed&&u,A.enter&&!A.closed&&f,A.leave&&h,A.leave&&!A.closed&&b,A.leave&&A.closed&&g,!A.transition&&q&&p))==null?void 0:r.trim())||void 0,...Cb(A)}),Y=0;G==="visible"&&(Y|=je.Open),G==="hidden"&&(Y|=je.Closed),q&&G==="hidden"&&(Y|=je.Opening),!q&&G==="visible"&&(Y|=je.Closing);let z=Te();return d.createElement(so.Provider,{value:V},d.createElement(Ab,{value:Y},z({ourProps:D,theirProps:y,defaultTag:fu,features:du,visible:G==="visible",name:"Transition.Child"})))}function oy(e,t){let{show:n,appear:r=!1,unmount:o=!0,...s}=e,a=d.useRef(null),i=cu(e),l=He(...i?[a,t]:t===null?[]:[t]);lr();let c=ro();if(n===void 0&&c!==null&&(n=(c&je.Open)===je.Open),n===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[u,f]=d.useState(n?"visible":"hidden"),p=uu(()=>{n||f("hidden")}),[h,b]=d.useState(!0),g=d.useRef([n]);ve(()=>{h!==!1&&g.current[g.current.length-1]!==n&&(g.current.push(n),b(!1))},[g,n]);let y=d.useMemo(()=>({show:n,appear:r,initial:h}),[n,r,h]);ve(()=>{n?f("visible"):!ao(p)&&a.current!==null&&f("hidden")},[n,p]);let x={unmount:o},S=ce(()=>{var v;h&&b(!1),(v=e.beforeEnter)==null||v.call(e)}),w=ce(()=>{var v;h&&b(!1),(v=e.beforeLeave)==null||v.call(e)}),C=Te();return d.createElement(so.Provider,{value:p},d.createElement(oo.Provider,{value:y},C({ourProps:{...x,as:d.Fragment,children:d.createElement(hu,{ref:l,...x,...s,beforeEnter:S,beforeLeave:w})},theirProps:{},defaultTag:d.Fragment,features:du,visible:u==="visible",name:"Transition"})))}function sy(e,t){let n=d.useContext(oo)!==null,r=ro()!==null;return d.createElement(d.Fragment,null,!n&&r?d.createElement(Is,{ref:t,...e}):d.createElement(hu,{ref:t,...e}))}let Is=we(oy),hu=we(ry),aa=we(sy),ay=Object.assign(Is,{Child:aa,Root:Is});var iy=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(iy||{}),ly=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(ly||{});let cy={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},ia=d.createContext(null);ia.displayName="DialogContext";function io(e){let t=d.useContext(ia);if(t===null){let n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,io),n}return t}function uy(e,t){return it(t.type,cy,e,t)}let Li=we(function(e,t){let n=d.useId(),{id:r=`headlessui-dialog-${n}`,open:o,onClose:s,initialFocus:a,role:i="dialog",autoFocus:l=!0,__demoMode:c=!1,unmount:u=!1,...f}=e,p=d.useRef(!1);i=function(){return i==="dialog"||i==="alertdialog"?i:(p.current||(p.current=!0,console.warn(`Invalid role [${i}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let h=ro();o===void 0&&h!==null&&(o=(h&je.Open)===je.Open);let b=d.useRef(null),g=He(b,t),y=to(b),x=o?0:1,[S,w]=d.useReducer(uy,{titleId:null,descriptionId:null,panelRef:d.createRef()}),C=ce(()=>s(!1)),v=ce(A=>w({type:0,id:A})),L=lr()?x===0:!1,[q,R]=jb(),U={get current(){var A;return(A=S.panelRef.current)!=null?A:b.current}},G=au(),{resolveContainers:le}=Bb({mainTreeNode:G,portals:q,defaultContainers:[U]}),ue=h!==null?(h&je.Closing)===je.Closing:!1;tb(c||ue?!1:L,{allowed:ce(()=>{var A,D;return[(D=(A=b.current)==null?void 0:A.closest("[data-headlessui-portal]"))!=null?D:null]}),disallowed:ce(()=>{var A;return[(A=G==null?void 0:G.closest("body > *:not(#headlessui-portal-root)"))!=null?A:null]})});let oe=Kc.get(null);ve(()=>{if(L)return oe.actions.push(r),()=>oe.actions.pop(r)},[oe,r,L]);let fe=Yc(oe,d.useCallback(A=>oe.selectors.isTop(A,r),[oe,r]));hb(fe,le,A=>{A.preventDefault(),C()}),Wb(fe,y==null?void 0:y.defaultView,A=>{A.preventDefault(),A.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),C()}),xb(c||ue?!1:L,y,le),nb(L,b,C);let[B,K]=jc(),ne=d.useMemo(()=>[{dialogState:x,close:C,setTitleId:v,unmount:u},S],[x,S,C,v,u]),T=d.useMemo(()=>({open:x===0}),[x]),V={ref:g,id:r,role:i,tabIndex:-1,"aria-modal":c?void 0:x===0?!0:void 0,"aria-labelledby":S.titleId,"aria-describedby":B,unmount:u},E=!Ub(),P=_t.None;L&&!c&&(P|=_t.RestoreFocus,P|=_t.TabLock,l&&(P|=_t.AutoFocus),E&&(P|=_t.InitialFocus));let W=Te();return d.createElement(Rb,null,d.createElement(Ii,{force:!0},d.createElement(Hb,null,d.createElement(ia.Provider,{value:ne},d.createElement(ou,{target:b},d.createElement(Ii,{force:!1},d.createElement(K,{slot:T},d.createElement(R,null,d.createElement(Yb,{initialFocus:a,initialFocusFallback:b,containers:le,features:P},d.createElement(zg,{value:C},W({ourProps:V,theirProps:f,slot:T,defaultTag:fy,features:dy,visible:x===0,name:"Dialog"})))))))))))}),fy="div",dy=_r.RenderStrategy|_r.Static;function hy(e,t){let{transition:n=!1,open:r,...o}=e,s=ro(),a=e.hasOwnProperty("open")||s!==null,i=e.hasOwnProperty("onClose");if(!a&&!i)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!a)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!i)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!s&&typeof e.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);if(typeof e.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${e.onClose}`);return(r!==void 0||n)&&!o.static?d.createElement(Mi,null,d.createElement(ay,{show:r,transition:n,unmount:o.unmount},d.createElement(Li,{ref:t,...o}))):d.createElement(Mi,null,d.createElement(Li,{ref:t,open:r,...o}))}let py="div";function my(e,t){let n=d.useId(),{id:r=`headlessui-dialog-panel-${n}`,transition:o=!1,...s}=e,[{dialogState:a,unmount:i},l]=io("Dialog.Panel"),c=He(t,l.panelRef),u=d.useMemo(()=>({open:a===0}),[a]),f=ce(y=>{y.stopPropagation()}),p={ref:c,id:r,onClick:f},h=o?aa:d.Fragment,b=o?{unmount:i}:{},g=Te();return d.createElement(h,{...b},g({ourProps:p,theirProps:s,slot:u,defaultTag:py,name:"Dialog.Panel"}))}let gy="div";function by(e,t){let{transition:n=!1,...r}=e,[{dialogState:o,unmount:s}]=io("Dialog.Backdrop"),a=d.useMemo(()=>({open:o===0}),[o]),i={ref:t,"aria-hidden":!0},l=n?aa:d.Fragment,c=n?{unmount:s}:{},u=Te();return d.createElement(l,{...c},u({ourProps:i,theirProps:r,slot:a,defaultTag:gy,name:"Dialog.Backdrop"}))}let yy="h2";function vy(e,t){let n=d.useId(),{id:r=`headlessui-dialog-title-${n}`,...o}=e,[{dialogState:s,setTitleId:a}]=io("Dialog.Title"),i=He(t);d.useEffect(()=>(a(r),()=>a(null)),[r,a]);let l=d.useMemo(()=>({open:s===0}),[s]),c={ref:i,id:r};return Te()({ourProps:c,theirProps:o,slot:l,defaultTag:yy,name:"Dialog.Title"})}let wy=we(hy),pu=we(my),xy=we(by),mu=we(vy),Ey=Object.assign(wy,{Panel:pu,Title:mu,Description:zc}),Sy="div";function Cy(e,t){let n=`headlessui-control-${d.useId()}`,[r,o]=Mg(),[s,a]=jc(),i=Jr(),{disabled:l=i||!1,...c}=e,u=d.useMemo(()=>({disabled:l}),[l]),f={ref:t,disabled:l||void 0,"aria-disabled":l||void 0},p=Te();return d.createElement(mg,{value:l},d.createElement(o,{value:r},d.createElement(a,{value:s},d.createElement(kg,{id:n},p({ourProps:f,theirProps:{...c,children:d.createElement(Cg,null,typeof c.children=="function"?c.children(u):c.children)},slot:u,defaultTag:Sy,name:"Field"})))))}let ky=we(Cy),Ty="input";function Oy(e,t){let n=d.useId(),r=Mc(),o=Jr(),{id:s=r||`headlessui-input-${n}`,disabled:a=o||!1,autoFocus:i=!1,invalid:l=!1,...c}=e,u=Uc(),f=Rg(),{isFocused:p,focusProps:h}=fg({autoFocus:i}),{isHovered:b,hoverProps:g}=ug({isDisabled:a}),y=vg({ref:t,id:s,"aria-labelledby":u,"aria-describedby":f,"aria-invalid":l?"true":void 0,disabled:a||void 0,autoFocus:i},h,g),x=d.useMemo(()=>({disabled:a,invalid:l,hover:b,focus:p,autofocus:i}),[a,l,b,p,i]);return Te()({ourProps:y,theirProps:c,slot:x,defaultTag:Ty,name:"Input"})}let Py=we(Oy);const Ay=({isOpen:e,close:t,title:n,dismissOptions:r,confirmOptions:o,children:s})=>O.jsxs(Ey,{open:e,onClose:t,className:"relative z-50 transition duration-300 ease-out data-closed:opacity-0",transition:!0,children:[O.jsx(xy,{className:"fixed inset-0 bg-black/30"}),O.jsx("div",{className:"fixed inset-0 flex w-screen items-center justify-center p-4",children:O.jsxs(pu,{className:"max-w-lg divide-y divide-gray-100 bg-white rounded-sm shadow-xl",children:[O.jsx(mu,{className:" text-gray-900 p-4",children:n}),O.jsx("div",{className:"p-4",children:s}),r||o?O.jsxs("div",{className:"flex gap-4 justify-end p-4",children:[r?O.jsx(Ar,{onClick:()=>{r.onClick(),t()},size:"small",color:"secondary",children:r.label}):O.jsx(O.Fragment,{}),o?O.jsx(Ar,{disabled:o.disabled,onClick:()=>{o.onClick(),t()},size:"small",color:"primary",children:o.label}):O.jsx(O.Fragment,{})]}):O.jsx(O.Fragment,{})]})})]}),Ry=({type:e="text",className:t,label:n,description:r,...o})=>O.jsx("div",{className:"w-full max-w-md px-4",children:O.jsxs(ky,{children:[O.jsx(Dg,{className:"font-medium text-gray-900",children:n}),r&&O.jsx(zc,{className:"text-sm text-secondary",children:r}),O.jsx(Py,{type:e,className:On("mt-3 block w-full rounded-lg border border-gray-200 px-3 py-1.5 text-sm/6 text-gray-800","focus:not-data-focus:outline-none data-focus:outline-2 data-focus:-outline-offset-2 data-focus:outline-primary-500",t),...o})]})}),$y=({onConfirm:e,onClose:t,isOpen:n,title:r})=>{const[o,s]=d.useState(""),[a,i]=d.useState(!1),l=async()=>{if(o)try{i(!0),await e(o),s("")}finally{i(!1)}else alert("Please enter a valid email address.")};return O.jsx(Ay,{title:r||"Initiate Confidence Playbook",isOpen:n,close:t,dismissOptions:{label:"Cancel",onClick:t},confirmOptions:{label:"Initiate",onClick:l,disabled:a||!o},children:O.jsx(O.Fragment,{children:O.jsx(Ry,{label:"Email",disabled:a,description:"Enter the email address to initiate the playbook.",onChange:c=>s(c.target.value)})})})},gu=({btnClassName:e,buttonNode:t,size:n,playbookId:r,onInitiated:o})=>{const[s,a]=d.useState(!1);function i(){a(!0)}function l(){a(!1)}const c=async u=>{const{playbookInstanceId:f,errorCode:p,details:h,message:b}=await vc({bank:"public-sdk",email:u,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone||"America/Los_Angeles",playbookUid:r})||{};if(p)throw new Error(`Error initiating playbook: ${b} (Code: ${p}) - Details: ${h}`);o(f)};return O.jsxs(O.Fragment,{children:[t?{buttonNode:t}:O.jsx(Ar,{onClick:i,className:e,color:"primary",size:n,children:"Run Playbook"}),O.jsx($y,{isOpen:s,onClose:l,onConfirm:async u=>{await c(u),l()}})]})},Fy=({playbookInstanceId:e,viewMode:t})=>{const{playbook:n,actions:r}=af(e);if(!n)return O.jsx("div",{children:"Playbook not found"});const o=(s,a)=>{var i;if(s===Hn.COMPLETE){const l=(i=n.tasks.find(c=>c.taskInstanceId===a))==null?void 0:i.sequenceOrder;if(l===void 0){console.error("Task not found in playbook");return}r.completeTask(a,l)}s===Hn.START&&r.startTask(a)};return O.jsx("div",{className:"flex flex-col",children:O.jsx(vu,{playbook:n,viewMode:t,onTaskButtonClick:o})})},bu=({className:e,children:t})=>O.jsx("div",{className:On("w-full mx-auto space-y-4 py-4 container",e),children:t}),yu=({children:e})=>{const[t]=d.useState(new Nu);return console.log("Confidence Playbook Context Initialized"),O.jsx(Hu,{client:t,children:e})},vu=({playbook:e,viewMode:t,onTaskButtonClick:n})=>{const{playbookInstanceName:r,tasks:o}=e,s=d.useMemo(()=>{const a=o.find(i=>i.workflowStatus===he.COMPLETED);return a?a.sequenceOrder+1:0},[o]);return O.jsxs("div",{className:"min-h-screen flex flex-col items-stretch bg-gray-50",children:[O.jsx(Wm,{title:r,className:"top-0 sticky"}),O.jsx(bu,{className:On("flex-1",t==="list"&&"space-y-0"),children:o.map((a,i)=>O.jsx(Hm,{task:a,step:i+1,viewMode:t,canStart:a.sequenceOrder===s,onButtonClick:l=>{console.log("Button clicked:",l),n(l,a.taskInstanceId)},playbookType:"Non-Sequential"},i))})]})},Mt=({playbookInstanceId:e,viewMode:t})=>O.jsx(yu,{children:O.jsx(Fy,{playbookInstanceId:e,viewMode:t})}),Iy=({email:e,playbookId:t,viewMode:n})=>{const[r,o]=d.useState(null);return d.useEffect(()=>{(async()=>{const{playbookInstanceId:s,errorCode:a,details:i,message:l}=await vc({bank:"public-sdk",email:e,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone||"America/Los_Angeles",playbookUid:t})||{};if(a)throw new Error(`Error initiating playbook: ${l} (Code: ${a}) - Details: ${i}`);o(s)})()},[]),r?O.jsx(Mt,{playbookInstanceId:r,viewMode:n}):O.jsx("div",{children:"Loading..."})},My=({playbookId:e})=>{const[t,n]=d.useState(null);return t?O.jsx(Mt,{playbookInstanceId:t,viewMode:"list"}):O.jsx(O.Fragment,{children:O.jsx(gu,{playbookId:e,onInitiated:n})})};Mt.Context=yu;Mt.View=vu;Mt.TasksContainer=bu;Mt.AutoInstantiated=Iy;Mt.WithInstantiateButton=My;exports.ConfidencePlaybook=Mt;exports.ConfidencePlaybookButton=gu;
|
|
602
|
+
*/var Oo,wi;function Nb(){if(wi)return Oo;wi=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var a={},i=0;i<10;i++)a["_"+String.fromCharCode(i)]=i;var l=Object.getOwnPropertyNames(a).map(function(u){return a[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Oo=o()?Object.assign:function(s,a){for(var i,l=r(s),c,u=1;u<arguments.length;u++){i=Object(arguments[u]);for(var f in i)t.call(i,f)&&(l[f]=i[f]);if(e){c=e(i);for(var p=0;p<c.length;p++)n.call(i,c[p])&&(l[c[p]]=i[c[p]])}}return l},Oo}var Po,xi;function ia(){if(xi)return Po;xi=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Po=e,Po}var Ao,Ei;function du(){return Ei||(Ei=1,Ao=Function.call.bind(Object.prototype.hasOwnProperty)),Ao}var Ro,Si;function _b(){if(Si)return Ro;Si=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=ia(),n={},r=du();e=function(s){var a="Warning: "+s;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(s,a,i,l,c){if(process.env.NODE_ENV!=="production"){for(var u in s)if(r(s,u)){var f;try{if(typeof s[u]!="function"){var p=Error((l||"React class")+": "+i+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}f=s[u](a,u,l,i,null,t)}catch(b){f=b}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+i+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var h=c?c():"";e("Failed "+i+" type: "+f.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Ro=o,Ro}var $o,Ci;function Db(){if(Ci)return $o;Ci=1;var e=fu(),t=Nb(),n=ia(),r=du(),o=_b(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(i){var l="Warning: "+i;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function a(){return null}return $o=function(i,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f(E){var P=E&&(c&&E[c]||E[u]);if(typeof P=="function")return P}var p="<<anonymous>>",h={array:x("array"),bigint:x("bigint"),bool:x("boolean"),func:x("function"),number:x("number"),object:x("object"),string:x("string"),symbol:x("symbol"),any:S(),arrayOf:w,element:C(),elementType:v(),instanceOf:L,node:G(),objectOf:R,oneOf:q,oneOfType:U,shape:ue,exact:oe};function b(E,P){return E===P?E!==0||1/E===1/P:E!==E&&P!==P}function g(E,P){this.message=E,this.data=P&&typeof P=="object"?P:{},this.stack=""}g.prototype=Error.prototype;function y(E){if(process.env.NODE_ENV!=="production")var P={},W=0;function A(Y,z,I,Q,X,Z,ge){if(Q=Q||p,Z=Z||I,ge!==n){if(l){var $=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw $.name="Invariant Violation",$}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var $e=Q+":"+I;!P[$e]&&W<3&&(s("You are manually calling a React.PropTypes validation function for the `"+Z+"` prop on `"+Q+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),P[$e]=!0,W++)}}return z[I]==null?Y?z[I]===null?new g("The "+X+" `"+Z+"` is marked as required "+("in `"+Q+"`, but its value is `null`.")):new g("The "+X+" `"+Z+"` is marked as required in "+("`"+Q+"`, but its value is `undefined`.")):null:E(z,I,Q,X,Z)}var D=A.bind(null,!1);return D.isRequired=A.bind(null,!0),D}function x(E){function P(W,A,D,Y,z,I){var Q=W[A],X=K(Q);if(X!==E){var Z=ne(Q);return new g("Invalid "+Y+" `"+z+"` of type "+("`"+Z+"` supplied to `"+D+"`, expected ")+("`"+E+"`."),{expectedType:E})}return null}return y(P)}function S(){return y(a)}function w(E){function P(W,A,D,Y,z){if(typeof E!="function")return new g("Property `"+z+"` of component `"+D+"` has invalid PropType notation inside arrayOf.");var I=W[A];if(!Array.isArray(I)){var Q=K(I);return new g("Invalid "+Y+" `"+z+"` of type "+("`"+Q+"` supplied to `"+D+"`, expected an array."))}for(var X=0;X<I.length;X++){var Z=E(I,X,D,Y,z+"["+X+"]",n);if(Z instanceof Error)return Z}return null}return y(P)}function C(){function E(P,W,A,D,Y){var z=P[W];if(!i(z)){var I=K(z);return new g("Invalid "+D+" `"+Y+"` of type "+("`"+I+"` supplied to `"+A+"`, expected a single ReactElement."))}return null}return y(E)}function v(){function E(P,W,A,D,Y){var z=P[W];if(!e.isValidElementType(z)){var I=K(z);return new g("Invalid "+D+" `"+Y+"` of type "+("`"+I+"` supplied to `"+A+"`, expected a single ReactElement type."))}return null}return y(E)}function L(E){function P(W,A,D,Y,z){if(!(W[A]instanceof E)){var I=E.name||p,Q=V(W[A]);return new g("Invalid "+Y+" `"+z+"` of type "+("`"+Q+"` supplied to `"+D+"`, expected ")+("instance of `"+I+"`."))}return null}return y(P)}function q(E){if(!Array.isArray(E))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),a;function P(W,A,D,Y,z){for(var I=W[A],Q=0;Q<E.length;Q++)if(b(I,E[Q]))return null;var X=JSON.stringify(E,function(ge,$){var $e=ne($);return $e==="symbol"?String($):$});return new g("Invalid "+Y+" `"+z+"` of value `"+String(I)+"` "+("supplied to `"+D+"`, expected one of "+X+"."))}return y(P)}function R(E){function P(W,A,D,Y,z){if(typeof E!="function")return new g("Property `"+z+"` of component `"+D+"` has invalid PropType notation inside objectOf.");var I=W[A],Q=K(I);if(Q!=="object")return new g("Invalid "+Y+" `"+z+"` of type "+("`"+Q+"` supplied to `"+D+"`, expected an object."));for(var X in I)if(r(I,X)){var Z=E(I,X,D,Y,z+"."+X,n);if(Z instanceof Error)return Z}return null}return y(P)}function U(E){if(!Array.isArray(E))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var P=0;P<E.length;P++){var W=E[P];if(typeof W!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+O(W)+" at index "+P+"."),a}function A(D,Y,z,I,Q){for(var X=[],Z=0;Z<E.length;Z++){var ge=E[Z],$=ge(D,Y,z,I,Q,n);if($==null)return null;$.data&&r($.data,"expectedType")&&X.push($.data.expectedType)}var $e=X.length>0?", expected one of type ["+X.join(", ")+"]":"";return new g("Invalid "+I+" `"+Q+"` supplied to "+("`"+z+"`"+$e+"."))}return y(A)}function G(){function E(P,W,A,D,Y){return fe(P[W])?null:new g("Invalid "+D+" `"+Y+"` supplied to "+("`"+A+"`, expected a ReactNode."))}return y(E)}function le(E,P,W,A,D){return new g((E||"React class")+": "+P+" type `"+W+"."+A+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+D+"`.")}function ue(E){function P(W,A,D,Y,z){var I=W[A],Q=K(I);if(Q!=="object")return new g("Invalid "+Y+" `"+z+"` of type `"+Q+"` "+("supplied to `"+D+"`, expected `object`."));for(var X in E){var Z=E[X];if(typeof Z!="function")return le(D,Y,z,X,ne(Z));var ge=Z(I,X,D,Y,z+"."+X,n);if(ge)return ge}return null}return y(P)}function oe(E){function P(W,A,D,Y,z){var I=W[A],Q=K(I);if(Q!=="object")return new g("Invalid "+Y+" `"+z+"` of type `"+Q+"` "+("supplied to `"+D+"`, expected `object`."));var X=t({},W[A],E);for(var Z in X){var ge=E[Z];if(r(E,Z)&&typeof ge!="function")return le(D,Y,z,Z,ne(ge));if(!ge)return new g("Invalid "+Y+" `"+z+"` key `"+Z+"` supplied to `"+D+"`.\nBad object: "+JSON.stringify(W[A],null," ")+`
|
|
603
|
+
Valid keys: `+JSON.stringify(Object.keys(E),null," "));var $=ge(I,Z,D,Y,z+"."+Z,n);if($)return $}return null}return y(P)}function fe(E){switch(typeof E){case"number":case"string":case"undefined":return!0;case"boolean":return!E;case"object":if(Array.isArray(E))return E.every(fe);if(E===null||i(E))return!0;var P=f(E);if(P){var W=P.call(E),A;if(P!==E.entries){for(;!(A=W.next()).done;)if(!fe(A.value))return!1}else for(;!(A=W.next()).done;){var D=A.value;if(D&&!fe(D[1]))return!1}}else return!1;return!0;default:return!1}}function B(E,P){return E==="symbol"?!0:P?P["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&P instanceof Symbol:!1}function K(E){var P=typeof E;return Array.isArray(E)?"array":E instanceof RegExp?"object":B(P,E)?"symbol":P}function ne(E){if(typeof E>"u"||E===null)return""+E;var P=K(E);if(P==="object"){if(E instanceof Date)return"date";if(E instanceof RegExp)return"regexp"}return P}function O(E){var P=ne(E);switch(P){case"array":case"object":return"an "+P;case"boolean":case"date":case"regexp":return"a "+P;default:return P}}function V(E){return!E.constructor||!E.constructor.name?p:E.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},$o}var Fo,ki;function jb(){if(ki)return Fo;ki=1;var e=ia();function t(){}function n(){}return n.resetWarningCache=t,Fo=function(){function r(a,i,l,c,u,f){if(f!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function o(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},Fo}var Ti;function zb(){if(Ti)return vr.exports;if(Ti=1,process.env.NODE_ENV!=="production"){var e=fu(),t=!0;vr.exports=Db()(e.isElement,t)}else vr.exports=jb()();return vr.exports}var Hb=zb();const te=Xd(Hb);function Oi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Pt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Oi(Object(n),!0).forEach(function(r){ln(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oi(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jr(e){"@babel/helpers - typeof";return jr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jr(e)}function ln(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wb(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function hu(e,t){if(e==null)return{};var n=Wb(e,t),r,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)r=s[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Rs(e){return Ub(e)||Bb(e)||qb(e)||Vb()}function Ub(e){if(Array.isArray(e))return $s(e)}function Bb(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function qb(e,t){if(e){if(typeof e=="string")return $s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $s(e,t)}}function $s(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Vb(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
604
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gb(e){var t,n=e.beat,r=e.fade,o=e.beatFade,s=e.bounce,a=e.shake,i=e.flash,l=e.spin,c=e.spinPulse,u=e.spinReverse,f=e.pulse,p=e.fixedWidth,h=e.inverse,b=e.border,g=e.listItem,y=e.flip,x=e.size,S=e.rotation,w=e.pull,C=(t={"fa-beat":n,"fa-fade":r,"fa-beat-fade":o,"fa-bounce":s,"fa-shake":a,"fa-flash":i,"fa-spin":l,"fa-spin-reverse":u,"fa-spin-pulse":c,"fa-pulse":f,"fa-fw":p,"fa-inverse":h,"fa-border":b,"fa-li":g,"fa-flip":y===!0,"fa-flip-horizontal":y==="horizontal"||y==="both","fa-flip-vertical":y==="vertical"||y==="both"},ln(t,"fa-".concat(x),typeof x<"u"&&x!==null),ln(t,"fa-rotate-".concat(S),typeof S<"u"&&S!==null&&S!==0),ln(t,"fa-pull-".concat(w),typeof w<"u"&&w!==null),ln(t,"fa-swap-opacity",e.swapOpacity),t);return Object.keys(C).map(function(v){return C[v]?v:null}).filter(function(v){return v})}function Kb(e){return e=e-0,e===e}function pu(e){return Kb(e)?e:(e=e.replace(/[\-_\s]+(.)?/g,function(t,n){return n?n.toUpperCase():""}),e.substr(0,1).toLowerCase()+e.substr(1))}var Yb=["style"];function Qb(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Xb(e){return e.split(";").map(function(t){return t.trim()}).filter(function(t){return t}).reduce(function(t,n){var r=n.indexOf(":"),o=pu(n.slice(0,r)),s=n.slice(r+1).trim();return o.startsWith("webkit")?t[Qb(o)]=s:t[o]=s,t},{})}function mu(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(typeof t=="string")return t;var r=(t.children||[]).map(function(l){return mu(e,l)}),o=Object.keys(t.attributes||{}).reduce(function(l,c){var u=t.attributes[c];switch(c){case"class":l.attrs.className=u,delete t.attributes.class;break;case"style":l.attrs.style=Xb(u);break;default:c.indexOf("aria-")===0||c.indexOf("data-")===0?l.attrs[c.toLowerCase()]=u:l.attrs[pu(c)]=u}return l},{attrs:{}}),s=n.style,a=s===void 0?{}:s,i=hu(n,Yb);return o.attrs.style=Pt(Pt({},o.attrs.style),a),e.apply(void 0,[t.tag,Pt(Pt({},o.attrs),i)].concat(Rs(r)))}var gu=!1;try{gu=process.env.NODE_ENV==="production"}catch{}function Jb(){if(!gu&&console&&typeof console.error=="function"){var e;(e=console).error.apply(e,arguments)}}function Pi(e){if(e&&jr(e)==="object"&&e.prefix&&e.iconName&&e.icon)return e;if(As.icon)return As.icon(e);if(e===null)return null;if(e&&jr(e)==="object"&&e.prefix&&e.iconName)return e;if(Array.isArray(e)&&e.length===2)return{prefix:e[0],iconName:e[1]};if(typeof e=="string")return{prefix:"fas",iconName:e}}function Io(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?ln({},e,t):{}}var Zb=["forwardedRef"];function nn(e){var t=e.forwardedRef,n=hu(e,Zb),r=n.icon,o=n.mask,s=n.symbol,a=n.className,i=n.title,l=n.titleId,c=n.maskId,u=Pi(r),f=Io("classes",[].concat(Rs(Gb(n)),Rs(a.split(" ")))),p=Io("transform",typeof n.transform=="string"?As.transform(n.transform):n.transform),h=Io("mask",Pi(o)),b=Ib(u,Pt(Pt(Pt(Pt({},f),p),h),{},{symbol:s,title:i,titleId:l,maskId:c}));if(!b)return Jb("Could not find icon",u),null;var g=b.abstract,y={ref:t};return Object.keys(n).forEach(function(x){nn.defaultProps.hasOwnProperty(x)||(y[x]=n[x])}),ey(g[0],y)}nn.displayName="FontAwesomeIcon";nn.propTypes={beat:te.bool,border:te.bool,beatFade:te.bool,bounce:te.bool,className:te.string,fade:te.bool,flash:te.bool,mask:te.oneOfType([te.object,te.array,te.string]),maskId:te.string,fixedWidth:te.bool,inverse:te.bool,flip:te.oneOf([!0,!1,"horizontal","vertical","both"]),icon:te.oneOfType([te.object,te.array,te.string]),listItem:te.bool,pull:te.oneOf(["right","left"]),pulse:te.bool,rotation:te.oneOf([0,90,180,270]),shake:te.bool,size:te.oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:te.bool,spinPulse:te.bool,spinReverse:te.bool,symbol:te.oneOfType([te.bool,te.string]),title:te.string,titleId:te.string,transform:te.oneOfType([te.string,te.object]),swapOpacity:te.bool};nn.defaultProps={border:!1,className:"",mask:null,maskId:null,fixedWidth:!1,inverse:!1,flip:!1,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:null,transform:null,swapOpacity:!1};var ey=mu.bind(null,d.createElement);function Ai(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&cs(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Ln(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Mo(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function ty(e){return e.matches("html,body")}function Ri(e){return(e==null?void 0:e.ownerDocument)||document}function Lo(e,t){let n=e.filter(o=>{var s;return o.parentId===t&&((s=o.context)==null?void 0:s.open)}),r=n;for(;r.length;)r=e.filter(o=>{var s;return(s=r)==null?void 0:s.some(a=>{var i;return o.parentId===a.id&&((i=o.context)==null?void 0:i.open)})}),n=n.concat(r);return n}function ny(e){return"nativeEvent"in e}var ry=typeof document<"u",oy=function(){},Fs=ry?d.useLayoutEffect:oy;const sy={...F},ay=sy.useInsertionEffect,iy=ay||(e=>e());function sn(e){const t=F.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return iy(()=>{t.current=e}),F.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const ly="data-floating-ui-focusable",$i="active",Fi="selected",cy={...F};let Ii=!1,uy=0;const Mi=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+uy++;function fy(){const[e,t]=F.useState(()=>Ii?Mi():void 0);return Fs(()=>{e==null&&t(Mi())},[]),F.useEffect(()=>{Ii=!0},[]),e}const dy=cy.useId,hy=dy||fy;let Is;process.env.NODE_ENV!=="production"&&(Is=new Set);function py(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=Is)!=null&&e.has(o))){var s;(s=Is)==null||s.add(o),console.error(o)}}function my(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const gy=F.createContext(null),by=F.createContext(null),yy=()=>{var e;return((e=F.useContext(gy))==null?void 0:e.id)||null},bu=()=>F.useContext(by);function vy(e){return"data-floating-ui-"+e}function wy(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const xy={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Ey={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Li=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function Sy(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:s}=e,{enabled:a=!0,escapeKey:i=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:f="pointerdown",ancestorScroll:p=!1,bubbles:h,capture:b}=t,g=bu(),y=sn(typeof l=="function"?l:()=>!1),x=typeof l=="function"?y:l,S=F.useRef(!1),{escapeKey:w,outsidePress:C}=Li(h),{escapeKey:v,outsidePress:L}=Li(b),q=F.useRef(!1),R=F.useRef(-1),U=sn(B=>{var K;if(!n||!a||!i||B.key!=="Escape"||q.current)return;const ne=(K=s.current.floatingContext)==null?void 0:K.nodeId,O=g?Lo(g.nodesRef.current,ne):[];if(!w&&(B.stopPropagation(),O.length>0)){let V=!0;if(O.forEach(E=>{var P;if((P=E.context)!=null&&P.open&&!E.context.dataRef.current.__escapeKeyBubbles){V=!1;return}}),!V)return}r(!1,ny(B)?B.nativeEvent:B,"escape-key")}),G=sn(B=>{var K;const ne=()=>{var O;U(B),(O=Ln(B))==null||O.removeEventListener("keydown",ne)};(K=Ln(B))==null||K.addEventListener("keydown",ne)}),le=sn(B=>{var K;const ne=s.current.insideReactTree;s.current.insideReactTree=!1;const O=S.current;if(S.current=!1,c==="click"&&O||ne||typeof x=="function"&&!x(B))return;const V=Ln(B),E="["+vy("inert")+"]",P=Ri(o.floating).querySelectorAll(E);let W=me(V)?V:null;for(;W&&!nt(W);){const z=st(W);if(nt(z)||!me(z))break;W=z}if(P.length&&me(V)&&!ty(V)&&!Ai(V,o.floating)&&Array.from(P).every(z=>!Ai(W,z)))return;if(ze(V)&&fe){const z=nt(V),I=Le(V),Q=/auto|scroll/,X=z||Q.test(I.overflowX),Z=z||Q.test(I.overflowY),ge=X&&V.clientWidth>0&&V.scrollWidth>V.clientWidth,$=Z&&V.clientHeight>0&&V.scrollHeight>V.clientHeight,$e=I.direction==="rtl",rn=$&&($e?B.offsetX<=V.offsetWidth-V.clientWidth:B.offsetX>V.clientWidth),cr=ge&&B.offsetY>V.clientHeight;if(rn||cr)return}const A=(K=s.current.floatingContext)==null?void 0:K.nodeId,D=g&&Lo(g.nodesRef.current,A).some(z=>{var I;return Mo(B,(I=z.context)==null?void 0:I.elements.floating)});if(Mo(B,o.floating)||Mo(B,o.domReference)||D)return;const Y=g?Lo(g.nodesRef.current,A):[];if(Y.length>0){let z=!0;if(Y.forEach(I=>{var Q;if((Q=I.context)!=null&&Q.open&&!I.context.dataRef.current.__outsidePressBubbles){z=!1;return}}),!z)return}r(!1,B,"outside-press")}),ue=sn(B=>{var K;const ne=()=>{var O;le(B),(O=Ln(B))==null||O.removeEventListener(c,ne)};(K=Ln(B))==null||K.addEventListener(c,ne)});F.useEffect(()=>{if(!n||!a)return;s.current.__escapeKeyBubbles=w,s.current.__outsidePressBubbles=C;let B=-1;function K(P){r(!1,P,"ancestor-scroll")}function ne(){window.clearTimeout(B),q.current=!0}function O(){B=window.setTimeout(()=>{q.current=!1},Yr()?5:0)}const V=Ri(o.floating);i&&(V.addEventListener("keydown",v?G:U,v),V.addEventListener("compositionstart",ne),V.addEventListener("compositionend",O)),x&&V.addEventListener(c,L?ue:le,L);let E=[];return p&&(me(o.domReference)&&(E=fn(o.domReference)),me(o.floating)&&(E=E.concat(fn(o.floating))),!me(o.reference)&&o.reference&&o.reference.contextElement&&(E=E.concat(fn(o.reference.contextElement)))),E=E.filter(P=>{var W;return P!==((W=V.defaultView)==null?void 0:W.visualViewport)}),E.forEach(P=>{P.addEventListener("scroll",K,{passive:!0})}),()=>{i&&(V.removeEventListener("keydown",v?G:U,v),V.removeEventListener("compositionstart",ne),V.removeEventListener("compositionend",O)),x&&V.removeEventListener(c,L?ue:le,L),E.forEach(P=>{P.removeEventListener("scroll",K)}),window.clearTimeout(B)}},[s,o,i,x,c,n,r,p,a,w,C,U,v,G,le,L,ue]),F.useEffect(()=>{s.current.insideReactTree=!1},[s,x,c]);const oe=F.useMemo(()=>({onKeyDown:U,...u&&{[xy[f]]:B=>{r(!1,B.nativeEvent,"reference-press")},...f!=="click"&&{onClick(B){r(!1,B.nativeEvent,"reference-press")}}}}),[U,r,u,f]),fe=F.useMemo(()=>({onKeyDown:U,onMouseDown(){S.current=!0},onMouseUp(){S.current=!0},[Ey[c]]:()=>{s.current.insideReactTree=!0},onBlurCapture(){g||(wy(R),s.current.insideReactTree=!0,R.current=window.setTimeout(()=>{s.current.insideReactTree=!1}))}}),[U,c,s,g]);return F.useMemo(()=>a?{reference:oe,floating:fe}:{},[a,oe,fe])}function Cy(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=hy(),s=F.useRef({}),[a]=F.useState(()=>my()),i=yy()!=null;if(process.env.NODE_ENV!=="production"){const h=r.reference;h&&!me(h)&&py("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=F.useState(r.reference),u=sn((h,b,g)=>{s.current.openEvent=h?b:void 0,a.emit("openchange",{open:h,event:b,reason:g,nested:i}),n==null||n(h,b,g)}),f=F.useMemo(()=>({setPositionReference:c}),[]),p=F.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return F.useMemo(()=>({dataRef:s,open:t,onOpenChange:u,elements:p,events:a,floatingId:o,refs:f}),[t,u,p,a,o,f])}function ky(e){e===void 0&&(e={});const{nodeId:t}=e,n=Cy({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[s,a]=F.useState(null),[i,l]=F.useState(null),u=(o==null?void 0:o.domReference)||s,f=F.useRef(null),p=bu();Fs(()=>{u&&(f.current=u)},[u]);const h=tp({...e,elements:{...o,...i&&{reference:i}}}),b=F.useCallback(w=>{const C=me(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),getClientRects:()=>w.getClientRects(),contextElement:w}:w;l(C),h.refs.setReference(C)},[h.refs]),g=F.useCallback(w=>{(me(w)||w===null)&&(f.current=w,a(w)),(me(h.refs.reference.current)||h.refs.reference.current===null||w!==null&&!me(w))&&h.refs.setReference(w)},[h.refs]),y=F.useMemo(()=>({...h.refs,setReference:g,setPositionReference:b,domReference:f}),[h.refs,g,b]),x=F.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),S=F.useMemo(()=>({...h,...r,refs:y,elements:x,nodeId:t}),[h,y,x,t,r]);return Fs(()=>{r.dataRef.current.floatingContext=S;const w=p==null?void 0:p.nodesRef.current.find(C=>C.id===t);w&&(w.context=S)}),F.useMemo(()=>({...h,context:S,refs:y,elements:x}),[h,y,x,S])}function No(e,t,n){const r=new Map,o=n==="item";let s=e;if(o&&e){const{[$i]:a,[Fi]:i,...l}=e;s=l}return{...n==="floating"&&{tabIndex:-1,[ly]:""},...s,...t.map(a=>{const i=a?a[n]:null;return typeof i=="function"?e?i(e):null:i}).concat(e).reduce((a,i)=>(i&&Object.entries(i).forEach(l=>{let[c,u]=l;if(!(o&&[$i,Fi].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var f;(f=r.get(c))==null||f.push(u),a[c]=function(){for(var p,h=arguments.length,b=new Array(h),g=0;g<h;g++)b[g]=arguments[g];return(p=r.get(c))==null?void 0:p.map(y=>y(...b)).find(y=>y!==void 0)}}}else a[c]=u}),a),{})}}function Ty(e){e===void 0&&(e=[]);const t=e.map(i=>i==null?void 0:i.reference),n=e.map(i=>i==null?void 0:i.floating),r=e.map(i=>i==null?void 0:i.item),o=F.useCallback(i=>No(i,e,"reference"),t),s=F.useCallback(i=>No(i,e,"floating"),n),a=F.useCallback(i=>No(i,e,"item"),r);return F.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:a}),[o,s,a])}const Oy={default:"text-secondary-600 border-secondary-600",primary:"text-primary-600 border-primary-600",success:"text-success-600 border-success-600"},Py=({transition:e,onClick:t})=>T.jsxs("div",{className:"py-1 px-3 space-x-2 flex items-center hover:bg-gray-100 cursor-pointer",onClick:n=>{n.stopPropagation(),t()},children:[T.jsx("span",{className:"text-base text-dark flex-1",children:e.action}),T.jsx(nn,{icon:$m,className:"text-gray-400",width:24}),T.jsx($c,{category:"outline",color:e.color,children:e.to})]}),Ay=({title:e,variant:t="default",transitions:n,onClick:r})=>{const[o,s]=d.useState(!1),{refs:a,floatingStyles:i,context:l}=ky({strategy:"fixed",placement:"bottom-end",open:o,onOpenChange:s}),c=Sy(l,{outsidePress:!0}),{getReferenceProps:u,getFloatingProps:f}=Ty([c]);return T.jsxs(T.Fragment,{children:[T.jsxs("div",{onClick:n!=null&&n.length?()=>s(p=>!p):void 0,ref:a.setReference,className:On("px-1 uppercase border rounded-sm flex items-center",n.length?"cursor-pointer":"pointer-events-none",Oy[t]),...u(),children:[T.jsx("span",{className:"text-sm font-bold",children:e}),n.length>0?T.jsx(nn,{icon:Fm,width:24,height:24,className:"text-gray-400"}):T.jsx(T.Fragment,{})]}),o&&n.length&&T.jsx("div",{ref:a.setFloating,style:i,className:On("border border-gray-200 py-1.5 rounded-sm min-w-[172px] bg-white shadow-dark/50"),...f(),children:n.map((p,h)=>T.jsx(Py,{transition:p,onClick:()=>{r==null||r(p.id),s(!1)}},h))})]})},Ry={[he.OPEN]:"border-[#C1C5C8] bg-[#F0F1F2]",[he.IN_PROGRESS]:"bg-[#E6F2FF] border-[#94C8FF]",[he.IN_REVIEW]:"bg-[#EAF6EC] border-[#A5DAB1]",[he.COMPLETED]:"bg-[#EAF6EC] border-[#A5DAB1]"},_o={PHOTO:"photo",SCREENSHOT:"screenshot"},$y=({task:e,step:t,playbookType:n,onButtonClick:r,viewMode:o="card",canStart:s=!1})=>{const{buttons:a}=uf({taskStatus:e.workflowStatus,canStart:s}),i=d.useMemo(()=>e.imageRequired===0?null:e.imageRequired===1?_o.SCREENSHOT:e.imageRequired===2?_o.PHOTO:null,[e.imageRequired]);if(o==="list"){const l=d.useMemo(()=>e.workflowStatus===he.COMPLETED?"success":e.workflowStatus===he.IN_PROGRESS?"primary":"default",[e.workflowStatus]),c=d.useMemo(()=>{const u=[];return a.forEach(f=>{f==="START"&&u.push({id:"START",color:"primary",action:"Start",to:he.IN_PROGRESS}),f==="COMPLETE"&&u.push({id:"COMPLETE",color:"success",action:"Complete",to:he.COMPLETED})}),u},[a]);return T.jsxs("div",{className:"flex gap-3 p-2 border-b border-gray-200",children:[T.jsx("div",{className:"text-gray-200 text-base",children:e.sequenceOrder+1}),T.jsx("div",{className:On("text-dark flex-1 truncate",e.workflowStatus===he.COMPLETED&&"text-secondary-400 line-through"),children:e.taskInstanceName}),T.jsx(Ay,{title:e.workflowStatus,variant:l,transitions:c,onClick:u=>{r(u)}})]})}return T.jsxs("div",{className:Pr("flex items-stretch rounded-sm overflow-hidden border",Ry[e.workflowStatus]),children:[T.jsx(xm,{playbookType:n,status:e.workflowStatus,step:t}),T.jsxs("div",{className:"flex w-full flex-col overflow-x-hidden p-2",children:[n==="Sequential"&&T.jsx("div",{className:"-mb-3 elf-end pr-2 pt-2",children:T.jsx(Pm,{status:e.workflowStatus})}),T.jsxs("div",{className:"space-y-2 divide-y divide-black/20 flex flex-1 flex-col",children:[T.jsxs("div",{className:"space-y-2",children:[T.jsx("div",{className:"text-lg font-medium text-[#1C232D] flex-1",children:e.taskInstanceName}),i?T.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[T.jsx(nn,{icon:Rm,width:16}),T.jsxs("div",{children:[T.jsx("span",{className:"font-medium",children:i===_o.PHOTO?"Photo":"Screenshot"})," ","required"]})]}):T.jsx(T.Fragment,{})]}),a.length>0&&T.jsx(bm,{buttons:a,onButtonClick:r})]})]})]})},Fy=({title:e,className:t,...n})=>T.jsx("div",{className:t,...n,children:T.jsx("div",{className:"border-y border-gray-200 bg-white",children:T.jsx("h1",{className:"container mx-auto py-3 text-2xl",children:e})})}),Iy=({playbookInstanceId:e,viewMode:t})=>{const{playbook:n,actions:r}=lf(e);if(!n)return T.jsx("div",{children:"Playbook not found"});const o=(s,a)=>{var i;if(s===Hn.COMPLETE){const l=(i=n.tasks.find(c=>c.taskInstanceId===a))==null?void 0:i.sequenceOrder;if(l===void 0){console.error("Task not found in playbook");return}r.completeTask(a,l)}s===Hn.START&&r.startTask(a)};return T.jsx("div",{className:"flex flex-col",children:T.jsx(wu,{playbook:n,viewMode:t,onTaskButtonClick:o})})},yu=({className:e,children:t})=>T.jsx("div",{className:On("w-full mx-auto space-y-4 py-4 container",e),children:t}),vu=({children:e})=>{const[t]=d.useState(new _u);return console.log("Confidence Playbook Context Initialized"),T.jsx(Wu,{client:t,children:e})},wu=({playbook:e,viewMode:t,onTaskButtonClick:n})=>{const{playbookInstanceName:r,tasks:o}=e,s=d.useMemo(()=>{const a=o.find(i=>i.workflowStatus===he.COMPLETED);return a?a.sequenceOrder+1:0},[o]);return T.jsx(Ac,{children:T.jsxs("div",{className:"min-h-screen flex flex-col items-stretch bg-gray-50",children:[T.jsx(Fy,{title:r,className:"top-0 sticky"}),T.jsx(yu,{className:On("flex-1",t==="list"&&"space-y-0"),children:o.map((a,i)=>T.jsx($y,{task:a,step:i+1,viewMode:t,canStart:a.sequenceOrder===s,onButtonClick:l=>{console.log("Button clicked:",l),n(l,a.taskInstanceId)},playbookType:"Non-Sequential"},i))})]})})},Mt=({playbookInstanceId:e,viewMode:t})=>T.jsx(vu,{children:T.jsx(Iy,{playbookInstanceId:e,viewMode:t})}),My=({email:e,playbookId:t,viewMode:n})=>{const[r,o]=d.useState(null);return d.useEffect(()=>{(async()=>{const{playbookInstanceId:s,errorCode:a,details:i,message:l}=await il({bank:"public-sdk",email:e,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone||"America/Los_Angeles",playbookUid:t})||{};if(a)throw new Error(`Error initiating playbook: ${l} (Code: ${a}) - Details: ${i}`);o(s)})()},[]),r?T.jsx(Mt,{playbookInstanceId:r,viewMode:n}):T.jsx("div",{children:"Loading..."})},Ly=({playbookId:e})=>{const[t,n]=d.useState(null);return t?T.jsx(Mt,{playbookInstanceId:t,viewMode:"list"}):T.jsx(T.Fragment,{children:T.jsx(Rc,{playbookId:e,onInitiated:n})})};Mt.Context=vu;Mt.View=wu;Mt.TasksContainer=yu;Mt.AutoInstantiated=My;Mt.WithInstantiateButton=Ly;exports.ConfidencePlaybook=Mt;exports.ConfidencePlaybookButton=Rc;
|