@confidencesystemsinc/sdk 1.2.1 → 1.2.3
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/playbook/confidence-playbook.d.ts +9 -4
- package/dist/index.cjs +14 -14
- package/dist/index.js +385 -375
- package/dist/theme.css +1 -1
- package/package.json +1 -1
- package/src/components/playbook/confidence-playbook.tsx +62 -20
- package/src/components/playbook/playbook-header.tsx +3 -5
- package/src/components/task/confidence-task.tsx +1 -1
- package/src/components/task/task-dropdown-badge.tsx +1 -4
- package/src/stories/confidence-playbook.stories.tsx +6 -5
- package/dist/components/ui/header.d.ts +0 -1
- package/src/components/ui/header.tsx +0 -12
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";var fa=e=>{throw TypeError(e)};var uo=(e,t,n)=>t.has(e)||fa("Cannot "+n);var m=(e,t,n)=>(uo(e,t,"read from private field"),n?n.call(e):t.get(e)),H=(e,t,n)=>t.has(e)?fa("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),M=(e,t,n,r)=>(uo(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),J=(e,t,n)=>(uo(e,t,"access private method"),n);var pr=(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"),Xi=require("react-dom");function Ji(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=Ji(d),Pu=Ji(Xi);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(){}},Xt=typeof window>"u"||"Deno"in globalThis;function Oe(){}function ku(e,t){return typeof e=="function"?e(t):e}function zo(e){return typeof e=="number"&&e>=0&&e!==1/0}function Zi(e,t){return Math.max(e+(t||0)-Date.now(),0)}function un(e,t){return typeof e=="function"?e(t):e}function je(e,t){return typeof e=="function"?e(t):e}function da(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:a,stale:i}=e;if(a){if(r){if(t.queryHash!==Ls(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 ha(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Jt(t.options.mutationKey)!==Jt(s))return!1}else if(!Kn(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Ls(e,t){return((t==null?void 0:t.queryKeyHashFn)||Jt)(e)}function Jt(e){return JSON.stringify(e,(t,n)=>Uo(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 Ho(e,t){if(e===t)return e;const n=pa(e)&&pa(t);if(n||Uo(e)&&Uo(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]=Ho(e[u],t[u]),i[u]===e[u]&&e[u]!==void 0&&l++)}return o===a&&l===o?e:i}return t}function Ar(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 pa(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Uo(e){if(!ma(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!ma(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function ma(e){return Object.prototype.toString.call(e)==="[object Object]"}function Au(e){return new Promise(t=>{setTimeout(t,e)})}function Bo(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 Ho(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 Ho(e,t)}return t}function Ru(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function $u(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Rr=Symbol();function el(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===Rr&&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===Rr?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function tl(e,t){return typeof e=="function"?e(...t):!!e}var Ut,bt,mn,Hi,Fu=(Hi=class extends An{constructor(){super();H(this,Ut);H(this,bt);H(this,mn);M(this,mn,t=>{if(!Xt&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){m(this,bt)||this.setEventListener(m(this,mn))}onUnsubscribe(){var t;this.hasListeners()||((t=m(this,bt))==null||t.call(this),M(this,bt,void 0))}setEventListener(t){var n;M(this,mn,t),(n=m(this,bt))==null||n.call(this),M(this,bt,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){m(this,Ut)!==t&&(M(this,Ut,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof m(this,Ut)=="boolean"?m(this,Ut):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ut=new WeakMap,bt=new WeakMap,mn=new WeakMap,Hi),_s=new Fu,gn,yt,bn,Ui,Iu=(Ui=class extends An{constructor(){super();H(this,gn,!0);H(this,yt);H(this,bn);M(this,bn,t=>{if(!Xt&&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,yt)||this.setEventListener(m(this,bn))}onUnsubscribe(){var t;this.hasListeners()||((t=m(this,yt))==null||t.call(this),M(this,yt,void 0))}setEventListener(t){var n;M(this,bn,t),(n=m(this,yt))==null||n.call(this),M(this,yt,t(this.setOnline.bind(this)))}setOnline(t){m(this,gn)!==t&&(M(this,gn,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return m(this,gn)}},gn=new WeakMap,yt=new WeakMap,bn=new WeakMap,Ui),$r=new Iu;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 Mu(e){return Math.min(1e3*2**e,3e4)}function nl(e){return(e??"online")==="online"?$r.isOnline():!0}var rl=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function fo(e){return e instanceof rl}function ol(e){let t=!1,n=0,r=!1,o;const s=Wo(),a=g=>{var b;r||(p(new rl(g)),(b=e.abort)==null||b.call(e))},i=()=>{t=!0},l=()=>{t=!1},c=()=>_s.isFocused()&&(e.networkMode==="always"||$r.isOnline())&&e.canRun(),u=()=>nl(e.networkMode)&&e.canRun(),f=g=>{var b;r||(r=!0,(b=e.onSuccess)==null||b.call(e,g),o==null||o(),s.resolve(g))},p=g=>{var b;r||(r=!0,(b=e.onError)==null||b.call(e,g),o==null||o(),s.reject(g))},h=()=>new Promise(g=>{var b;o=x=>{(r||c())&&g(x)},(b=e.onPause)==null||b.call(e)}).then(()=>{var g;o=void 0,r||(g=e.onContinue)==null||g.call(e)}),y=()=>{if(r)return;let g;const b=n===0?e.initialPromise:void 0;try{g=b??e.fn()}catch(x){g=Promise.reject(x)}Promise.resolve(g).then(f).catch(x=>{var N;if(r)return;const E=e.retry??(Xt?0:3),w=e.retryDelay??Mu,S=typeof w=="function"?w(n,x):w,v=E===!0||typeof E=="number"&&n<E||typeof E=="function"&&E(n,x);if(t||!v){p(x);return}n++,(N=e.onFail)==null||N.call(e,n,x),Au(S).then(()=>c()?void 0:h()).then(()=>{t?p(x):y()})})};return{promise:s,cancel:a,continue:()=>(o==null||o(),s),cancelRetry:i,continueRetry:l,canStart:u,start:()=>(u()?y():h().then(y),s)}}var Nu=e=>setTimeout(e,0);function Lu(){let e=[],t=0,n=i=>{i()},r=i=>{i()},o=Nu;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=Lu(),Bt,Bi,sl=(Bi=class{constructor(){H(this,Bt)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),zo(this.gcTime)&&M(this,Bt,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Xt?1/0:5*60*1e3))}clearGcTimeout(){m(this,Bt)&&(clearTimeout(m(this,Bt)),M(this,Bt,void 0))}},Bt=new WeakMap,Bi),yn,vn,Me,Wt,xe,nr,qt,_e,Xe,Wi,_u=(Wi=class extends sl{constructor(t){super();H(this,_e);H(this,yn);H(this,vn);H(this,Me);H(this,Wt);H(this,xe);H(this,nr);H(this,qt);M(this,qt,!1),M(this,nr,t.defaultOptions),this.setOptions(t.options),this.observers=[],M(this,Wt,t.client),M(this,Me,m(this,Wt).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,M(this,yn,Du(this.options)),this.state=t.state??m(this,yn),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,nr),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&m(this,Me).remove(this)}setData(t,n){const r=Bo(this.state.data,t,this.options);return J(this,_e,Xe).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,_e,Xe).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(Oe).catch(Oe):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(m(this,yn))}isActive(){return this.observers.some(t=>je(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Rr||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||!Zi(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,Me).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,qt)?m(this,xe).cancel({revert:!0}):m(this,xe).cancelRetry()),this.scheduleGc()),m(this,Me).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||J(this,_e,Xe).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,qt,!0),r.signal)})},s=()=>{const f=el(this.options,n),p={client:m(this,Wt),queryKey:this.queryKey,meta:this.meta};return o(p),M(this,qt,!1),this.options.persister?this.options.persister(f,p,this):f(p)},a={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:m(this,Wt),state:this.state,fetchFn:s};o(a),(l=this.options.behavior)==null||l.onFetch(a,this),M(this,vn,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=a.fetchOptions)==null?void 0:c.meta))&&J(this,_e,Xe).call(this,{type:"fetch",meta:(u=a.fetchOptions)==null?void 0:u.meta});const i=f=>{var p,h,y,g;fo(f)&&f.silent||J(this,_e,Xe).call(this,{type:"error",error:f}),fo(f)||((h=(p=m(this,Me).config).onError)==null||h.call(p,f,this),(g=(y=m(this,Me).config).onSettled)==null||g.call(y,this.state.data,f,this)),this.scheduleGc()};return M(this,xe,ol({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var p,h,y,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(b){i(b);return}(h=(p=m(this,Me).config).onSuccess)==null||h.call(p,f,this),(g=(y=m(this,Me).config).onSettled)==null||g.call(y,f,this.state.error,this),this.scheduleGc()},onError:i,onFail:(f,p)=>{J(this,_e,Xe).call(this,{type:"failed",failureCount:f,error:p})},onPause:()=>{J(this,_e,Xe).call(this,{type:"pause"})},onContinue:()=>{J(this,_e,Xe).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),m(this,xe).start()}},yn=new WeakMap,vn=new WeakMap,Me=new WeakMap,Wt=new WeakMap,xe=new WeakMap,nr=new WeakMap,qt=new WeakMap,_e=new WeakSet,Xe=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,...al(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 fo(o)&&o.revert&&m(this,vn)?{...m(this,vn),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,Me).notify({query:this,type:"updated",action:t})})},Wi);function al(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:nl(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Du(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 We,qi,ju=(qi=class extends An{constructor(t={}){super();H(this,We);this.config=t,M(this,We,new Map)}build(t,n,r){const o=n.queryKey,s=n.queryHash??Ls(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,We).has(t.queryHash)||(m(this,We).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=m(this,We).get(t.queryHash);n&&(t.destroy(),n===t&&m(this,We).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ye.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return m(this,We).get(t)}getAll(){return[...m(this,We).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>da(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>da(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()})})}},We=new WeakMap,qi),qe,Se,Vt,Ve,mt,Vi,zu=(Vi=class extends sl{constructor(t){super();H(this,Ve);H(this,qe);H(this,Se);H(this,Vt);this.mutationId=t.mutationId,M(this,Se,t.mutationCache),M(this,qe,[]),this.state=t.state||il(),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,qe).includes(t)||(m(this,qe).push(t),this.clearGcTimeout(),m(this,Se).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){M(this,qe,m(this,qe).filter(n=>n!==t)),this.scheduleGc(),m(this,Se).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){m(this,qe).length||(this.state.status==="pending"?this.scheduleGc():m(this,Se).remove(this))}continue(){var t;return((t=m(this,Vt))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,a,i,l,c,u,f,p,h,y,g,b,x,E,w,S,v,N,q,R;const n=()=>{J(this,Ve,mt).call(this,{type:"continue"})};M(this,Vt,ol({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(B,G)=>{J(this,Ve,mt).call(this,{type:"failed",failureCount:B,error:G})},onPause:()=>{J(this,Ve,mt).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,Vt).canStart();try{if(r)n();else{J(this,Ve,mt).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,Ve,mt).call(this,{type:"pending",context:G,variables:t,isPaused:o})}const B=await m(this,Vt).start();return await((u=(c=m(this,Se).config).onSuccess)==null?void 0:u.call(c,B,t,this.state.context,this)),await((p=(f=this.options).onSuccess)==null?void 0:p.call(f,B,t,this.state.context)),await((y=(h=m(this,Se).config).onSettled)==null?void 0:y.call(h,B,null,this.state.variables,this.state.context,this)),await((b=(g=this.options).onSettled)==null?void 0:b.call(g,B,null,t,this.state.context)),J(this,Ve,mt).call(this,{type:"success",data:B}),B}catch(B){try{throw await((E=(x=m(this,Se).config).onError)==null?void 0:E.call(x,B,t,this.state.context,this)),await((S=(w=this.options).onError)==null?void 0:S.call(w,B,t,this.state.context)),await((N=(v=m(this,Se).config).onSettled)==null?void 0:N.call(v,void 0,B,this.state.variables,this.state.context,this)),await((R=(q=this.options).onSettled)==null?void 0:R.call(q,void 0,B,t,this.state.context)),B}finally{J(this,Ve,mt).call(this,{type:"error",error:B})}}finally{m(this,Se).runNext(this)}}},qe=new WeakMap,Se=new WeakMap,Vt=new WeakMap,Ve=new WeakSet,mt=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,qe).forEach(r=>{r.onMutationUpdate(t)}),m(this,Se).notify({mutation:this,type:"updated",action:t})})},Vi);function il(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Je,De,rr,Gi,Hu=(Gi=class extends An{constructor(t={}){super();H(this,Je);H(this,De);H(this,rr);this.config=t,M(this,Je,new Set),M(this,De,new Map),M(this,rr,0)}build(t,n,r){const o=new zu({mutationCache:this,mutationId:++pr(this,rr)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){m(this,Je).add(t);const n=mr(t);if(typeof n=="string"){const r=m(this,De).get(n);r?r.push(t):m(this,De).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(m(this,Je).delete(t)){const n=mr(t);if(typeof n=="string"){const r=m(this,De).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,De).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=mr(t);if(typeof n=="string"){const r=m(this,De).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=mr(t);if(typeof n=="string"){const o=(r=m(this,De).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,Je).forEach(t=>{this.notify({type:"removed",mutation:t})}),m(this,Je).clear(),m(this,De).clear()})}getAll(){return Array.from(m(this,Je))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>ha(n,r))}findAll(t={}){return this.getAll().filter(n=>ha(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(Oe))))}},Je=new WeakMap,De=new WeakMap,rr=new WeakMap,Gi);function mr(e){var t;return(t=e.options.scope)==null?void 0:t.id}function ga(e){return{onFetch:(t,n)=>{var u,f,p,h,y;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=((y=t.state.data)==null?void 0:y.pageParams)||[];let i={pages:[],pageParams:[]},l=0;const c=async()=>{let g=!1;const b=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},x=el(t.options,t.fetchOptions),E=async(w,S,v)=>{if(g)return Promise.reject();if(S==null&&w.pages.length)return Promise.resolve(w);const N={client:t.client,queryKey:t.queryKey,pageParam:S,direction:v?"backward":"forward",meta:t.options.meta};b(N);const q=await x(N),{maxPages:R}=t.options,B=v?$u:Ru;return{pages:B(w.pages,q,R),pageParams:B(w.pageParams,S,R)}};if(o&&s.length){const w=o==="backward",S=w?Uu:ba,v={pages:s,pageParams:a},N=S(r,v);i=await E(v,N,w)}else{const w=e??s.length;do{const S=l===0?a[0]??r.initialPageParam:ba(r,i);if(l>0&&S==null)break;i=await E(i,S),l++}while(l<w)}return i};t.options.persister?t.fetchFn=()=>{var g,b;return(b=(g=t.options).persister)==null?void 0:b.call(g,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function ba(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 Uu(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,vt,wt,wn,xn,xt,En,Cn,Yi,Bu=(Yi=class{constructor(e={}){H(this,pe);H(this,vt);H(this,wt);H(this,wn);H(this,xn);H(this,xt);H(this,En);H(this,Cn);M(this,pe,e.queryCache||new ju),M(this,vt,e.mutationCache||new Hu),M(this,wt,e.defaultOptions||{}),M(this,wn,new Map),M(this,xn,new Map),M(this,xt,0)}mount(){pr(this,xt)._++,m(this,xt)===1&&(M(this,En,_s.subscribe(async e=>{e&&(await this.resumePausedMutations(),m(this,pe).onFocus())})),M(this,Cn,$r.subscribe(async e=>{e&&(await this.resumePausedMutations(),m(this,pe).onOnline())})))}unmount(){var e,t;pr(this,xt)._--,m(this,xt)===0&&((e=m(this,En))==null||e.call(this),M(this,En,void 0),(t=m(this,Cn))==null||t.call(this),M(this,Cn,void 0))}isFetching(e){return m(this,pe).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return m(this,vt).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(un(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=ku(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(Oe).catch(Oe)}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(Oe)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Oe)}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(un(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Oe).catch(Oe)}fetchInfiniteQuery(e){return e.behavior=ga(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Oe).catch(Oe)}ensureInfiniteQueryData(e){return e.behavior=ga(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return $r.isOnline()?m(this,vt).resumePausedMutations():Promise.resolve()}getQueryCache(){return m(this,pe)}getMutationCache(){return m(this,vt)}getDefaultOptions(){return m(this,wt)}setDefaultOptions(e){M(this,wt,e)}setQueryDefaults(e,t){m(this,wn).set(Jt(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...m(this,wn).values()],n={};return t.forEach(r=>{Kn(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){m(this,xn).set(Jt(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...m(this,xn).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,wt).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ls(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===Rr&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...m(this,wt).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){m(this,pe).clear(),m(this,vt).clear()}},pe=new WeakMap,vt=new WeakMap,wt=new WeakMap,wn=new WeakMap,xn=new WeakMap,xt=new WeakMap,En=new WeakMap,Cn=new WeakMap,Yi),ke,re,or,Te,Gt,Sn,Et,Ct,sr,Tn,On,Yt,Kt,St,Pn,ie,_n,qo,Vo,Go,Yo,Ko,Qo,Xo,ll,Ki,Wu=(Ki=class extends An{constructor(t,n){super();H(this,ie);H(this,ke);H(this,re);H(this,or);H(this,Te);H(this,Gt);H(this,Sn);H(this,Et);H(this,Ct);H(this,sr);H(this,Tn);H(this,On);H(this,Yt);H(this,Kt);H(this,St);H(this,Pn,new Set);this.options=n,M(this,ke,t),M(this,Ct,null),M(this,Et,Wo()),this.options.experimental_prefetchInRender||m(this,Et).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),ya(m(this,re),this.options)?J(this,ie,_n).call(this):this.updateResult(),J(this,ie,Yo).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Jo(m(this,re),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Jo(m(this,re),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,J(this,ie,Ko).call(this),J(this,ie,Qo).call(this),m(this,re).removeObserver(this)}setOptions(t){const n=this.options,r=m(this,re);if(this.options=m(this,ke).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof je(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,Xo).call(this),m(this,re).setOptions(this.options),n._defaulted&&!Ar(this.options,n)&&m(this,ke).getQueryCache().notify({type:"observerOptionsUpdated",query:m(this,re),observer:this});const o=this.hasListeners();o&&va(m(this,re),r,this.options,n)&&J(this,ie,_n).call(this),this.updateResult(),o&&(m(this,re)!==r||je(this.options.enabled,m(this,re))!==je(n.enabled,m(this,re))||un(this.options.staleTime,m(this,re))!==un(n.staleTime,m(this,re)))&&J(this,ie,qo).call(this);const s=J(this,ie,Vo).call(this);o&&(m(this,re)!==r||je(this.options.enabled,m(this,re))!==je(n.enabled,m(this,re))||s!==m(this,St))&&J(this,ie,Go).call(this,s)}getOptimisticResult(t){const n=m(this,ke).getQueryCache().build(m(this,ke),t),r=this.createResult(n,t);return Vu(this,r)&&(M(this,Te,r),M(this,Sn,this.options),M(this,Gt,m(this,re).state)),r}getCurrentResult(){return m(this,Te)}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,Pn).add(t)}getCurrentQuery(){return m(this,re)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=m(this,ke).defaultQueryOptions(t),r=m(this,ke).getQueryCache().build(m(this,ke),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return J(this,ie,_n).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),m(this,Te)))}createResult(t,n){var B;const r=m(this,re),o=this.options,s=m(this,Te),a=m(this,Gt),i=m(this,Sn),c=t!==r?t.state:m(this,or),{state:u}=t;let f={...u},p=!1,h;if(n._optimisticResults){const G=this.hasListeners(),le=!G&&ya(t,n),ue=G&&va(t,r,n,o);(le||ue)&&(f={...f,...al(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:y,errorUpdatedAt:g,status:b}=f;h=f.data;let x=!1;if(n.placeholderData!==void 0&&h===void 0&&b==="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((B=m(this,On))==null?void 0:B.state.data,m(this,On)):n.placeholderData,G!==void 0&&(b="success",h=Bo(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,sr))h=m(this,Tn);else try{M(this,sr,n.select),h=n.select(h),h=Bo(s==null?void 0:s.data,h,n),M(this,Tn,h),M(this,Ct,null)}catch(G){M(this,Ct,G)}m(this,Ct)&&(y=m(this,Ct),h=m(this,Tn),g=Date.now(),b="error");const E=f.fetchStatus==="fetching",w=b==="pending",S=b==="error",v=w&&E,N=h!==void 0,R={status:b,fetchStatus:f.fetchStatus,isPending:w,isSuccess:b==="success",isError:S,isInitialLoading:v,isLoading:v,data:h,dataUpdatedAt:f.dataUpdatedAt,error:y,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:E,isRefetching:E&&!w,isLoadingError:S&&!N,isPaused:f.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:S&&N,isStale:Ds(t,n),refetch:this.refetch,promise:m(this,Et)};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,Et,R.promise=Wo());G(oe)},ue=m(this,Et);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,Te),n=this.createResult(m(this,re),this.options);if(M(this,Gt,m(this,re).state),M(this,Sn,this.options),m(this,Gt).data!==void 0&&M(this,On,m(this,re)),Ar(n,t))return;M(this,Te,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,s=typeof o=="function"?o():o;if(s==="all"||!s&&!m(this,Pn).size)return!0;const a=new Set(s??m(this,Pn));return this.options.throwOnError&&a.add("error"),Object.keys(m(this,Te)).some(i=>{const l=i;return m(this,Te)[l]!==t[l]&&a.has(l)})};J(this,ie,ll).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&J(this,ie,Yo).call(this)}},ke=new WeakMap,re=new WeakMap,or=new WeakMap,Te=new WeakMap,Gt=new WeakMap,Sn=new WeakMap,Et=new WeakMap,Ct=new WeakMap,sr=new WeakMap,Tn=new WeakMap,On=new WeakMap,Yt=new WeakMap,Kt=new WeakMap,St=new WeakMap,Pn=new WeakMap,ie=new WeakSet,_n=function(t){J(this,ie,Xo).call(this);let n=m(this,re).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Oe)),n},qo=function(){J(this,ie,Ko).call(this);const t=un(this.options.staleTime,m(this,re));if(Xt||m(this,Te).isStale||!zo(t))return;const r=Zi(m(this,Te).dataUpdatedAt,t)+1;M(this,Yt,setTimeout(()=>{m(this,Te).isStale||this.updateResult()},r))},Vo=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(m(this,re)):this.options.refetchInterval)??!1},Go=function(t){J(this,ie,Qo).call(this),M(this,St,t),!(Xt||je(this.options.enabled,m(this,re))===!1||!zo(m(this,St))||m(this,St)===0)&&M(this,Kt,setInterval(()=>{(this.options.refetchIntervalInBackground||_s.isFocused())&&J(this,ie,_n).call(this)},m(this,St)))},Yo=function(){J(this,ie,qo).call(this),J(this,ie,Go).call(this,J(this,ie,Vo).call(this))},Ko=function(){m(this,Yt)&&(clearTimeout(m(this,Yt)),M(this,Yt,void 0))},Qo=function(){m(this,Kt)&&(clearInterval(m(this,Kt)),M(this,Kt,void 0))},Xo=function(){const t=m(this,ke).getQueryCache().build(m(this,ke),this.options);if(t===m(this,re))return;const n=m(this,re);M(this,re,t),M(this,or,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},ll=function(t){ye.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(m(this,Te))}),m(this,ke).getQueryCache().notify({query:m(this,re),type:"observerResultsUpdated"})})},Ki);function qu(e,t){return je(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function ya(e,t){return qu(e,t)||e.state.data!==void 0&&Jo(e,t,t.refetchOnMount)}function Jo(e,t,n){if(je(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Ds(e,t)}return!1}function va(e,t,n,r){return(e!==t||je(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Ds(e,n)}function Ds(e,t){return je(t.enabled,e)!==!1&&e.isStaleByTime(un(t.staleTime,e))}function Vu(e,t){return!Ar(e.getCurrentResult(),t)}var Tt,Ot,Ae,Ze,ot,Tr,Zo,Qi,Gu=(Qi=class extends An{constructor(n,r){super();H(this,ot);H(this,Tt);H(this,Ot);H(this,Ae);H(this,Ze);M(this,Tt,n),this.setOptions(r),this.bindMethods(),J(this,ot,Tr).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,Tt).defaultMutationOptions(n),Ar(this.options,r)||m(this,Tt).getMutationCache().notify({type:"observerOptionsUpdated",mutation:m(this,Ae),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Jt(r.mutationKey)!==Jt(this.options.mutationKey)?this.reset():((o=m(this,Ae))==null?void 0:o.state.status)==="pending"&&m(this,Ae).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=m(this,Ae))==null||n.removeObserver(this)}onMutationUpdate(n){J(this,ot,Tr).call(this),J(this,ot,Zo).call(this,n)}getCurrentResult(){return m(this,Ot)}reset(){var n;(n=m(this,Ae))==null||n.removeObserver(this),M(this,Ae,void 0),J(this,ot,Tr).call(this),J(this,ot,Zo).call(this)}mutate(n,r){var o;return M(this,Ze,r),(o=m(this,Ae))==null||o.removeObserver(this),M(this,Ae,m(this,Tt).getMutationCache().build(m(this,Tt),this.options)),m(this,Ae).addObserver(this),m(this,Ae).execute(n)}},Tt=new WeakMap,Ot=new WeakMap,Ae=new WeakMap,Ze=new WeakMap,ot=new WeakSet,Tr=function(){var r;const n=((r=m(this,Ae))==null?void 0:r.state)??il();M(this,Ot,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Zo=function(n){ye.batch(()=>{var r,o,s,a,i,l,c,u;if(m(this,Ze)&&this.hasListeners()){const f=m(this,Ot).variables,p=m(this,Ot).context;(n==null?void 0:n.type)==="success"?((o=(r=m(this,Ze)).onSuccess)==null||o.call(r,n.data,f,p),(a=(s=m(this,Ze)).onSettled)==null||a.call(s,n.data,null,f,p)):(n==null?void 0:n.type)==="error"&&((l=(i=m(this,Ze)).onError)==null||l.call(i,n.error,f,p),(u=(c=m(this,Ze)).onSettled)==null||u.call(c,void 0,n.error,f,p))}this.listeners.forEach(f=>{f(m(this,Ot))})})},Qi),cl=F.createContext(void 0),ul=e=>{const t=F.useContext(cl);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Yu=({client:e,children:t})=>(F.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),T.jsx(cl.Provider,{value:e,children:t})),fl=F.createContext(!1),Ku=()=>F.useContext(fl);fl.Provider;function Qu(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Xu=F.createContext(Qu()),Ju=()=>F.useContext(Xu),Zu=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},ef=e=>{F.useEffect(()=>{e.clearReset()},[e])},tf=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||tl(n,[e.error,r])),nf=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)))},rf=(e,t)=>e.isLoading&&e.isFetching&&!t,of=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,wa=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function sf(e,t,n){var f,p,h,y,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=ul(n),o=Ku(),s=Ju(),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",nf(a),Zu(a,s),ef(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(b=>{const x=u?l.subscribe(ye.batchCalls(b)):Oe;return l.updateResult(),x},[l,u]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),F.useEffect(()=>{l.setOptions(a)},[a,l]),of(a,c))throw wa(a,l,s);if(tf({result:c,errorResetBoundary:s,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw c.error;if((y=(h=r.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||y.call(h,a,c),a.experimental_prefetchInRender&&!Xt&&rf(c,o)){const b=i?wa(a,l,s):(g=r.getQueryCache().get(a.queryHash))==null?void 0:g.promise;b==null||b.catch(Oe).finally(()=>{l.updateResult()})}return a.notifyOnChangeProps?c:l.trackResult(c)}function js(e,t){return sf(e,Wu,t)}function dl(e,t){const n=ul(t),[r]=F.useState(()=>new Gu(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(Oe)},[r]);if(o.error&&tl(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}const zs=d.createContext(null);zs.Provider;const Rn=()=>d.useContext(zs),hl=({children:e})=>{const[t]=d.useState(new Bu);return console.log("Confidence Playbook Context Initialized"),T.jsx(zs.Provider,{value:{queryClient:t},children:T.jsx(Yu,{client:t,children:e})})},he={OPEN:"Open",IN_PROGRESS:"In progress",IN_REVIEW:"In review",COMPLETED:"Completed"},pl="https://marketplace.confidence.com/api",ar=pl+"/confidence",xa=pl+"/dropbox/prod",af=async e=>{const t={taskInstanceId:e},n=new Headers;return n.append("Content-Type","application/json"),await(await fetch(`${ar}/playbook-task-complete`,{method:"POST",headers:n,body:JSON.stringify(t)})).json()},lf=()=>{const{queryClient:e}=Rn(),t=dl({mutationFn:async r=>af(r)},e);return{completeTask:async r=>t.mutateAsync(r,{onSuccess:()=>{console.log("Task completed successfully")},onError:o=>{console.error("Error completing task:",o)}}),...t}},cf=async e=>{const t={taskInstanceId:e},n=new Headers;n.append("Content-Type","application/json");const o=await(await fetch(`${ar}/playbook-task-start`,{method:"POST",headers:n,body:JSON.stringify(t)})).json();return console.log({data:o}),o},uf=()=>{const{queryClient:e}=Rn(),t=dl({mutationFn:async r=>{const o=await cf(r);return console.log(o),o}},e);return{startTask:r=>t.mutateAsync(r,{onSuccess:()=>{console.log("Task started successfully")},onError:o=>{console.error("Error starting task:",o)}}),...t}},ff=(e,t)=>{const{queryClient:n}=Rn(),{completeTask:r}=lf(),{startTask:o}=uf();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}})}}},df=e=>{var o;const{queryClient:t}=Rn(),n=js({queryFn:async()=>{const s=new Headers,a=await fetch(`${ar}/playbook-details`,{method:"POST",cache:"no-store",headers:s,body:JSON.stringify({playbookInstanceId:+e,start:0,limit:50})});if(!a.ok)throw new Error("Network response was not ok");const i=await a.json();if(i.error)throw new Error(i.error);return i},queryKey:["playbook",+e]},t),r=ff(e,{quickComplete:(o=n.data)==null?void 0:o.quickComplete});return{playbook:n.data,isLoading:n.isLoading,error:n.error,actions:r}},Un={START:"START",PAUSE:"PAUSE",COMPLETE:"COMPLETE"},hf={START:"Start",PAUSE:"Pause",RESUME:"Resume",COMPLETE:"Complete"},pf=e=>{const{taskStatus:t}=e;return{buttons:d.useMemo(()=>t===he.OPEN&&e.canStart?[Un.START]:t===he.IN_PROGRESS?[Un.PAUSE,Un.COMPLETE]:t===he.COMPLETED?[]:[],[t])}},ml=async e=>{const t=new Headers;t.append("Content-Type","application/json");const r=await(await fetch(`${ar}/playbook-initiate`,{method:"POST",headers:t,body:JSON.stringify(e)})).json();return console.log({data:r}),r},Hs="-",mf=e=>{const t=bf(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const i=a.split(Hs);return i[0]===""&&i.length!==1&&i.shift(),gl(i,t)||gf(a)},getConflictingClassGroupIds:(a,i)=>{const l=n[a]||[];return i&&r[a]?[...l,...r[a]]:l}}},gl=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?gl(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Hs);return(a=t.validators.find(({validator:i})=>i(s)))==null?void 0:a.classGroupId},Ea=/^\[(.+)\]$/,gf=e=>{if(Ea.test(e)){const t=Ea.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},bf=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)es(n[o],r,o,t);return r},es=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:Ca(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(yf(o)){es(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,a])=>{es(a,Ca(t,s),n,r)})})},Ca=(e,t)=>{let n=e;return t.split(Hs).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},yf=e=>e.isThemeGetter,vf=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)}}},ts="!",ns=":",wf=ns.length,xf=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let a=0,i=0,l=0,c;for(let y=0;y<o.length;y++){let g=o[y];if(a===0&&i===0){if(g===ns){s.push(o.slice(l,y)),l=y+wf;continue}if(g==="/"){c=y;continue}}g==="["?a++:g==="]"?a--:g==="("?i++:g===")"&&i--}const u=s.length===0?o:o.substring(l),f=Ef(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+ns,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},Ef=e=>e.endsWith(ts)?e.substring(0,e.length-1):e.startsWith(ts)?e.substring(1):e,Cf=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}},Sf=e=>({cache:vf(e.cacheSize),parseClassName:xf(e),sortModifiers:Cf(e),...mf(e)}),Tf=/\s+/,Of=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,a=[],i=e.trim().split(Tf);let l="";for(let c=i.length-1;c>=0;c-=1){const u=i[c],{isExternal:f,modifiers:p,hasImportantModifier:h,baseClassName:y,maybePostfixModifierPosition:g}=n(u);if(f){l=u+(l.length>0?" "+l:l);continue}let b=!!g,x=r(b?y.substring(0,g):y);if(!x){if(!b){l=u+(l.length>0?" "+l:l);continue}if(x=r(y),!x){l=u+(l.length>0?" "+l:l);continue}b=!1}const E=s(p).join(":"),w=h?E+ts:E,S=w+x;if(a.includes(S))continue;a.push(S);const v=o(x,b);for(let N=0;N<v.length;++N){const q=v[N];a.push(w+q)}l=u+(l.length>0?" "+l:l)}return l};function Pf(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=bl(t))&&(r&&(r+=" "),r+=n);return r}const bl=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=bl(e[r]))&&(n&&(n+=" "),n+=t);return n};function kf(e,...t){let n,r,o,s=a;function a(l){const c=t.reduce((u,f)=>f(u),e());return n=Sf(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=Of(l,n);return o(l,u),u}return function(){return s(Pf.apply(null,arguments))}}const be=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},yl=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,vl=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Af=/^\d+\/\d+$/,Rf=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,$f=/\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$/,Ff=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,If=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Mf=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,sn=e=>Af.test(e),ee=e=>!!e&&!Number.isNaN(Number(e)),ht=e=>!!e&&Number.isInteger(Number(e)),ho=e=>e.endsWith("%")&&ee(e.slice(0,-1)),Qe=e=>Rf.test(e),Nf=()=>!0,Lf=e=>$f.test(e)&&!Ff.test(e),wl=()=>!1,_f=e=>If.test(e),Df=e=>Mf.test(e),jf=e=>!L(e)&&!_(e),zf=e=>$n(e,Cl,wl),L=e=>yl.test(e),Lt=e=>$n(e,Sl,Lf),po=e=>$n(e,qf,ee),Sa=e=>$n(e,xl,wl),Hf=e=>$n(e,El,Df),gr=e=>$n(e,Tl,_f),_=e=>vl.test(e),Nn=e=>Fn(e,Sl),Uf=e=>Fn(e,Vf),Ta=e=>Fn(e,xl),Bf=e=>Fn(e,Cl),Wf=e=>Fn(e,El),br=e=>Fn(e,Tl,!0),$n=(e,t,n)=>{const r=yl.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Fn=(e,t,n=!1)=>{const r=vl.exec(e);return r?r[1]?t(r[1]):n:!1},xl=e=>e==="position"||e==="percentage",El=e=>e==="image"||e==="url",Cl=e=>e==="length"||e==="size"||e==="bg-size",Sl=e=>e==="length",qf=e=>e==="number",Vf=e=>e==="family-name",Tl=e=>e==="shadow",Gf=()=>{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"),y=be("blur"),g=be("perspective"),b=be("aspect"),x=be("ease"),E=be("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],v=()=>[...S(),_,L],N=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto","contain","none"],R=()=>[_,L,l],B=()=>[sn,"full","auto",...R()],G=()=>[ht,"none","subgrid",_,L],le=()=>["auto",{span:["full",ht,_,L]},ht,_,L],ue=()=>[ht,"auto",_,L],oe=()=>["auto","min","max","fr",_,L],fe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],W=()=>["start","end","center","stretch","center-safe","end-safe"],Y=()=>["auto",...R()],ne=()=>[sn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],P=()=>[e,_,L],V=()=>[...S(),Ta,Sa,{position:[_,L]}],C=()=>["no-repeat",{repeat:["","x","y","space","round"]}],k=()=>["auto","cover","contain",Bf,zf,{size:[_,L]}],U=()=>[ho,Nn,Lt],A=()=>["","none","full",c,_,L],D=()=>["",ee,Nn,Lt],K=()=>["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,ho,Ta,Sa],Q=()=>["","none",y,_,L],X=()=>["none",ee,_,L],Z=()=>["none",ee,_,L],ge=()=>[ee,_,L],$=()=>[sn,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Qe],breakpoint:[Qe],color:[Nf],container:[Qe],"drop-shadow":[Qe],ease:["in","out","in-out"],font:[jf],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Qe],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Qe],shadow:[Qe],spacing:["px",ee],text:[Qe],"text-shadow":[Qe],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",sn,L,_,b]}],container:["container"],columns:[{columns:[ee,L,_,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:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:q()}],"overscroll-x":[{"overscroll-x":q()}],"overscroll-y":[{"overscroll-y":q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:B()}],"inset-x":[{"inset-x":B()}],"inset-y":[{"inset-y":B()}],start:[{start:B()}],end:[{end:B()}],top:[{top:B()}],right:[{right:B()}],bottom:[{bottom:B()}],left:[{left:B()}],visibility:["visible","invisible","collapse"],z:[{z:[ht,"auto",_,L]}],basis:[{basis:[sn,"full","auto",i,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ee,sn,"auto","initial","none",L]}],grow:[{grow:["",ee,_,L]}],shrink:[{shrink:["",ee,_,L]}],order:[{order:[ht,"first","last","none",_,L]}],"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":[...W(),"normal"]}],"justify-self":[{"justify-self":["auto",...W()]}],"align-content":[{content:["normal",...fe()]}],"align-items":[{items:[...W(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...W(),{baseline:["","last"]}]}],"place-content":[{"place-content":fe()}],"place-items":[{"place-items":[...W(),"baseline"]}],"place-self":[{"place-self":["auto",...W()]}],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:Y()}],mx:[{mx:Y()}],my:[{my:Y()}],ms:[{ms:Y()}],me:[{me:Y()}],mt:[{mt:Y()}],mr:[{mr:Y()}],mb:[{mb:Y()}],ml:[{ml:Y()}],"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,Nn,Lt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,_,po]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ho,L]}],"font-family":[{font:[Uf,L,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,_,L]}],"line-clamp":[{"line-clamp":[ee,"none",_,po]}],leading:[{leading:[s,...R()]}],"list-image":[{"list-image":["none",_,L]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",_,L]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:[ee,"from-font","auto",_,Lt]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[ee,"auto",_,L]}],"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",_,L]}],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",_,L]}],"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:C()}],"bg-size":[{bg:k()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ht,_,L],radial:["",_,L],conic:[ht,_,L]},Wf,Hf]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:U()}],"gradient-via-pos":[{via:U()}],"gradient-to-pos":[{to:U()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],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:[...K(),"hidden","none"]}],"divide-style":[{divide:[...K(),"hidden","none"]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...K(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ee,_,L]}],"outline-w":[{outline:["",ee,Nn,Lt]}],"outline-color":[{outline:P()}],shadow:[{shadow:["","none",u,br,gr]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":["none",f,br,gr]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[ee,Lt]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":D()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":["none",p,br,gr]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[ee,_,L]}],"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":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"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":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"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":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"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":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"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":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"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":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"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":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[_,L]}],"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":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"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":S()}],"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":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:V()}],"mask-repeat":[{mask:C()}],"mask-size":[{mask:k()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",_,L]}],filter:[{filter:["","none",_,L]}],blur:[{blur:Q()}],brightness:[{brightness:[ee,_,L]}],contrast:[{contrast:[ee,_,L]}],"drop-shadow":[{"drop-shadow":["","none",h,br,gr]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:["",ee,_,L]}],"hue-rotate":[{"hue-rotate":[ee,_,L]}],invert:[{invert:["",ee,_,L]}],saturate:[{saturate:[ee,_,L]}],sepia:[{sepia:["",ee,_,L]}],"backdrop-filter":[{"backdrop-filter":["","none",_,L]}],"backdrop-blur":[{"backdrop-blur":Q()}],"backdrop-brightness":[{"backdrop-brightness":[ee,_,L]}],"backdrop-contrast":[{"backdrop-contrast":[ee,_,L]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ee,_,L]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ee,_,L]}],"backdrop-invert":[{"backdrop-invert":["",ee,_,L]}],"backdrop-opacity":[{"backdrop-opacity":[ee,_,L]}],"backdrop-saturate":[{"backdrop-saturate":[ee,_,L]}],"backdrop-sepia":[{"backdrop-sepia":["",ee,_,L]}],"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",_,L]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ee,"initial",_,L]}],ease:[{ease:["linear","initial",x,_,L]}],delay:[{delay:[ee,_,L]}],animate:[{animate:["none",E,_,L]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,_,L]}],"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:[_,L,"","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:P()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:P()}],"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",_,L]}],"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",_,L]}],fill:[{fill:["none",...P()]}],"stroke-w":[{stroke:[ee,Nn,Lt,po]}],stroke:[{stroke:["none",...P()]}],"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"]}},fn=kf(Gf);function Ol(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=Ol(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Qn(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ol(e))&&(r&&(r+=" "),r+=t);return r}function Ee(...e){return fn(Qn(e))}const Pl=typeof document<"u"?d.useLayoutEffect:()=>{};function Yf(e){const t=d.useRef(null);return Pl(()=>{t.current=e},[e]),d.useCallback((...n)=>{const r=t.current;return r==null?void 0:r(...n)},[])}const Nt=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:Nt(e).defaultView||window;function Kf(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function Qf(e){return Kf(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}let Xf=!1;function Us(){return Xf}function kl(e,t){if(!Us())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:Qf(n)?n=n.host:n=n.parentNode}return!1}const rs=(e=document)=>{var t;if(!Us())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 Al(e){return Us()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function Ur(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 Bs(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 ct(e){if(process.env.NODE_ENV==="test")return e;let t=null;return()=>(t==null&&(t=e()),t)}const Ws=ct(function(){return Bs(/^Mac/i)}),Jf=ct(function(){return Bs(/^iPhone/i)}),Zf=ct(function(){return Bs(/^iPad/i)||Ws()&&navigator.maxTouchPoints>1}),ed=ct(function(){return Jf()||Zf()});ct(function(){return Ws()||ed()});ct(function(){return Ur(/AppleWebKit/i)&&!td()});const td=ct(function(){return Ur(/Chrome/i)}),nd=ct(function(){return Ur(/Android/i)});ct(function(){return Ur(/Firefox/i)});function Rl(){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 rd(e){return e.mozInputSource===0&&e.isTrusted?!0:nd()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function $l(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function od(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function Fl(e){let t=d.useRef({isFocused:!1,observer:null});Pl(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=Yf(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=$l(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 sd=!1,ir=null,os=new Set,Bn=new Map,Zt=!1,ss=!1;const ad={Tab:!0,Escape:!0};function qs(e,t){for(let n of os)n(e,t)}function id(e){return!(e.metaKey||!Ws()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Fr(e){Zt=!0,id(e)&&(ir="keyboard",qs("keyboard",e))}function Ne(e){ir="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Zt=!0,qs("pointer",e))}function Il(e){rd(e)&&(Zt=!0,ir="virtual")}function Ml(e){e.target===window||e.target===document||sd||!e.isTrusted||(!Zt&&!ss&&(ir="virtual",qs("virtual",e)),Zt=!1,ss=!1)}function Nl(){Zt=!1,ss=!0}function as(e){if(typeof window>"u"||typeof document>"u"||Bn.get(jt(e)))return;const t=jt(e),n=Nt(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Zt=!0,r.apply(this,arguments)},n.addEventListener("keydown",Fr,!0),n.addEventListener("keyup",Fr,!0),n.addEventListener("click",Il,!0),t.addEventListener("focus",Ml,!0),t.addEventListener("blur",Nl,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Ne,!0),n.addEventListener("pointermove",Ne,!0),n.addEventListener("pointerup",Ne,!0)):process.env.NODE_ENV==="test"&&(n.addEventListener("mousedown",Ne,!0),n.addEventListener("mousemove",Ne,!0),n.addEventListener("mouseup",Ne,!0)),t.addEventListener("beforeunload",()=>{Ll(e)},{once:!0}),Bn.set(t,{focus:r})}const Ll=(e,t)=>{const n=jt(e),r=Nt(e);t&&r.removeEventListener("DOMContentLoaded",t),Bn.has(n)&&(n.HTMLElement.prototype.focus=Bn.get(n).focus,r.removeEventListener("keydown",Fr,!0),r.removeEventListener("keyup",Fr,!0),r.removeEventListener("click",Il,!0),n.removeEventListener("focus",Ml,!0),n.removeEventListener("blur",Nl,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",Ne,!0),r.removeEventListener("pointermove",Ne,!0),r.removeEventListener("pointerup",Ne,!0)):process.env.NODE_ENV==="test"&&(r.removeEventListener("mousedown",Ne,!0),r.removeEventListener("mousemove",Ne,!0),r.removeEventListener("mouseup",Ne,!0)),Bn.delete(n))};function ld(e){const t=Nt(e);let n;return t.readyState!=="loading"?as(e):(n=()=>{as(e)},t.addEventListener("DOMContentLoaded",n)),()=>Ll(e,n)}typeof document<"u"&&ld();function _l(){return ir!=="pointer"}const cd=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function ud(e,t,n){let r=Nt(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&&!cd.has(r.activeElement.type)||r.activeElement instanceof s||r.activeElement instanceof a&&r.activeElement.isContentEditable,!(e&&t==="keyboard"&&n instanceof i&&!ad[n.key])}function fd(e,t,n){as(),d.useEffect(()=>{let r=(o,s)=>{ud(!!(n!=null&&n.isTextInput),o,s)&&e(_l())};return os.add(r),()=>{os.delete(r)}},t)}function dd(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=Fl(s),i=d.useCallback(l=>{const c=Nt(l.target),u=c?rs(c):rs();l.target===l.currentTarget&&u===Al(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 hd(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:o}=e,s=d.useRef({isFocusWithin:!1}),{addGlobalListener:a,removeAllGlobalListeners:i}=Rl(),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=Fl(l),u=d.useCallback(f=>{if(!f.currentTarget.contains(f.target))return;const p=Nt(f.target),h=rs(p);if(!s.current.isFocusWithin&&h===Al(f.nativeEvent)){r&&r(f),o&&o(!0),s.current.isFocusWithin=!0,c(f);let y=f.currentTarget;a(p,"focus",g=>{if(s.current.isFocusWithin&&!kl(y,g.target)){let b=new p.defaultView.FocusEvent("blur",{relatedTarget:g.target});od(b,y);let x=$l(b);l(x)}},{capture:!0})}},[r,o,c,a,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:l}}}let Ir=!1,mo=0;function is(){Ir=!0,setTimeout(()=>{Ir=!1},50)}function Oa(e){e.pointerType==="touch"&&is()}function pd(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",Oa):process.env.NODE_ENV==="test"&&document.addEventListener("touchend",is),mo++,()=>{mo--,!(mo>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",Oa):process.env.NODE_ENV==="test"&&document.removeEventListener("touchend",is))}}function md(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(pd,[]);let{addGlobalListener:l,removeAllGlobalListeners:c}=Rl(),{hoverProps:u,triggerHoverEnd:f}=d.useMemo(()=>{let p=(g,b)=>{if(i.pointerType=b,o||b==="touch"||i.isHovered||!g.currentTarget.contains(g.target))return;i.isHovered=!0;let x=g.currentTarget;i.target=x,l(Nt(g.target),"pointerover",E=>{i.isHovered&&i.target&&!kl(i.target,E.target)&&h(E,E.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:x,pointerType:b}),n&&n(!0),a(!0)},h=(g,b)=>{let x=i.target;i.pointerType="",i.target=null,!(b==="touch"||!i.isHovered||!x)&&(i.isHovered=!1,c(),r&&r({type:"hoverend",target:x,pointerType:b}),n&&n(!1),a(!1))},y={};return typeof PointerEvent<"u"?(y.onPointerEnter=g=>{Ir&&g.pointerType==="mouse"||p(g,g.pointerType)},y.onPointerLeave=g=>{!o&&g.currentTarget.contains(g.target)&&h(g,g.pointerType)}):process.env.NODE_ENV==="test"&&(y.onTouchStart=()=>{i.ignoreEmulatedMouseEvents=!0},y.onMouseEnter=g=>{!i.ignoreEmulatedMouseEvents&&!Ir&&p(g,"mouse"),i.ignoreEmulatedMouseEvents=!1},y.onMouseLeave=g=>{!o&&g.currentTarget.contains(g.target)&&h(g,"mouse")}),{hoverProps:y,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 gd(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,o=d.useRef({isFocused:!1,isFocusVisible:t||_l()}),[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]);fd(h=>{o.current.isFocusVisible=h,c()},[],{isTextInput:n});let{focusProps:f}=dd({isDisabled:r,onFocusChange:u}),{focusWithinProps:p}=hd({isDisabled:!r,onFocusWithinChange:u});return{isFocused:s,isFocusVisible:i,focusProps:r?p:f}}var bd=Object.defineProperty,yd=(e,t,n)=>t in e?bd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,go=(e,t,n)=>(yd(e,typeof t!="symbol"?t+"":t,n),n);let vd=class{constructor(){go(this,"current",this.detect()),go(this,"handoffState","pending"),go(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"}},Qt=new vd;function Br(e){var t,n;return Qt.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 ut(){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=ut();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 Vs(){let[e]=d.useState(ut);return d.useEffect(()=>()=>e.dispose(),[e]),e}let ve=(e,t)=>{Qt.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])},Dl=d.createContext(void 0);function qr(){return d.useContext(Dl)}function wd({value:e,children:t}){return d.createElement(Dl.Provider,{value:e},t)}function ls(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function st(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,st),r}var Mr=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Mr||{}),Pt=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Pt||{});function Pe(){let e=Ed();return d.useCallback(t=>xd({mergeRefs:e,...t}),[e])}function xd({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:s=!0,name:a,mergeRefs:i}){i=i??Cd;let l=jl(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 st(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}=bo(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[y,g]of Object.entries(t))typeof g=="boolean"&&(p=!0),g===!0&&h.push(y.replace(/([A-Z])/g,b=>`-${b.toLowerCase()}`));if(p){f["data-headlessui-state"]=h.join(" ");for(let y of h)f[`data-${y}`]=""}}if(s===d.Fragment&&(Object.keys(_t(l)).length>0||Object.keys(_t(f)).length>0))if(!d.isValidElement(u)||Array.isArray(u)&&u.length>1){if(Object.keys(_t(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(_t(l)).concat(Object.keys(_t(f))).map(p=>` - ${p}`).join(`
|
|
1
|
+
"use strict";var fa=e=>{throw TypeError(e)};var uo=(e,t,n)=>t.has(e)||fa("Cannot "+n);var m=(e,t,n)=>(uo(e,t,"read from private field"),n?n.call(e):t.get(e)),H=(e,t,n)=>t.has(e)?fa("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),M=(e,t,n,r)=>(uo(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),J=(e,t,n)=>(uo(e,t,"access private method"),n);var pr=(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"),Xi=require("react-dom");function Ji(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=Ji(d),Pu=Ji(Xi);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(){}},Xt=typeof window>"u"||"Deno"in globalThis;function Se(){}function ku(e,t){return typeof e=="function"?e(t):e}function zo(e){return typeof e=="number"&&e>=0&&e!==1/0}function Zi(e,t){return Math.max(e+(t||0)-Date.now(),0)}function un(e,t){return typeof e=="function"?e(t):e}function je(e,t){return typeof e=="function"?e(t):e}function da(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:a,stale:i}=e;if(a){if(r){if(t.queryHash!==Ls(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 ha(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(Jt(t.options.mutationKey)!==Jt(s))return!1}else if(!Kn(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Ls(e,t){return((t==null?void 0:t.queryKeyHashFn)||Jt)(e)}function Jt(e){return JSON.stringify(e,(t,n)=>Uo(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 Ho(e,t){if(e===t)return e;const n=pa(e)&&pa(t);if(n||Uo(e)&&Uo(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]=Ho(e[u],t[u]),i[u]===e[u]&&e[u]!==void 0&&l++)}return o===a&&l===o?e:i}return t}function Ar(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 pa(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Uo(e){if(!ma(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!ma(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function ma(e){return Object.prototype.toString.call(e)==="[object Object]"}function Au(e){return new Promise(t=>{setTimeout(t,e)})}function Bo(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 Ho(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 Ho(e,t)}return t}function Ru(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function $u(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Rr=Symbol();function el(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===Rr&&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===Rr?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function tl(e,t){return typeof e=="function"?e(...t):!!e}var Ut,bt,mn,Hi,Fu=(Hi=class extends An{constructor(){super();H(this,Ut);H(this,bt);H(this,mn);M(this,mn,t=>{if(!Xt&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){m(this,bt)||this.setEventListener(m(this,mn))}onUnsubscribe(){var t;this.hasListeners()||((t=m(this,bt))==null||t.call(this),M(this,bt,void 0))}setEventListener(t){var n;M(this,mn,t),(n=m(this,bt))==null||n.call(this),M(this,bt,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){m(this,Ut)!==t&&(M(this,Ut,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof m(this,Ut)=="boolean"?m(this,Ut):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ut=new WeakMap,bt=new WeakMap,mn=new WeakMap,Hi),_s=new Fu,gn,vt,bn,Ui,Iu=(Ui=class extends An{constructor(){super();H(this,gn,!0);H(this,vt);H(this,bn);M(this,bn,t=>{if(!Xt&&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,vt)||this.setEventListener(m(this,bn))}onUnsubscribe(){var t;this.hasListeners()||((t=m(this,vt))==null||t.call(this),M(this,vt,void 0))}setEventListener(t){var n;M(this,bn,t),(n=m(this,vt))==null||n.call(this),M(this,vt,t(this.setOnline.bind(this)))}setOnline(t){m(this,gn)!==t&&(M(this,gn,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return m(this,gn)}},gn=new WeakMap,vt=new WeakMap,bn=new WeakMap,Ui),$r=new Iu;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 Mu(e){return Math.min(1e3*2**e,3e4)}function nl(e){return(e??"online")==="online"?$r.isOnline():!0}var rl=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function fo(e){return e instanceof rl}function ol(e){let t=!1,n=0,r=!1,o;const s=Wo(),a=g=>{var b;r||(p(new rl(g)),(b=e.abort)==null||b.call(e))},i=()=>{t=!0},l=()=>{t=!1},c=()=>_s.isFocused()&&(e.networkMode==="always"||$r.isOnline())&&e.canRun(),u=()=>nl(e.networkMode)&&e.canRun(),f=g=>{var b;r||(r=!0,(b=e.onSuccess)==null||b.call(e,g),o==null||o(),s.resolve(g))},p=g=>{var b;r||(r=!0,(b=e.onError)==null||b.call(e,g),o==null||o(),s.reject(g))},h=()=>new Promise(g=>{var b;o=x=>{(r||c())&&g(x)},(b=e.onPause)==null||b.call(e)}).then(()=>{var g;o=void 0,r||(g=e.onContinue)==null||g.call(e)}),v=()=>{if(r)return;let g;const b=n===0?e.initialPromise:void 0;try{g=b??e.fn()}catch(x){g=Promise.reject(x)}Promise.resolve(g).then(f).catch(x=>{var N;if(r)return;const E=e.retry??(Xt?0:3),w=e.retryDelay??Mu,O=typeof w=="function"?w(n,x):w,y=E===!0||typeof E=="number"&&n<E||typeof E=="function"&&E(n,x);if(t||!y){p(x);return}n++,(N=e.onFail)==null||N.call(e,n,x),Au(O).then(()=>c()?void 0:h()).then(()=>{t?p(x):v()})})};return{promise:s,cancel:a,continue:()=>(o==null||o(),s),cancelRetry:i,continueRetry:l,canStart:u,start:()=>(u()?v():h().then(v),s)}}var Nu=e=>setTimeout(e,0);function Lu(){let e=[],t=0,n=i=>{i()},r=i=>{i()},o=Nu;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 ve=Lu(),Bt,Bi,sl=(Bi=class{constructor(){H(this,Bt)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),zo(this.gcTime)&&M(this,Bt,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Xt?1/0:5*60*1e3))}clearGcTimeout(){m(this,Bt)&&(clearTimeout(m(this,Bt)),M(this,Bt,void 0))}},Bt=new WeakMap,Bi),vn,yn,Me,Wt,Ee,nr,qt,_e,Xe,Wi,_u=(Wi=class extends sl{constructor(t){super();H(this,_e);H(this,vn);H(this,yn);H(this,Me);H(this,Wt);H(this,Ee);H(this,nr);H(this,qt);M(this,qt,!1),M(this,nr,t.defaultOptions),this.setOptions(t.options),this.observers=[],M(this,Wt,t.client),M(this,Me,m(this,Wt).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,M(this,vn,Du(this.options)),this.state=t.state??m(this,vn),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=m(this,Ee))==null?void 0:t.promise}setOptions(t){this.options={...m(this,nr),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&m(this,Me).remove(this)}setData(t,n){const r=Bo(this.state.data,t,this.options);return J(this,_e,Xe).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,_e,Xe).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=m(this,Ee))==null?void 0:r.promise;return(o=m(this,Ee))==null||o.cancel(t),n?n.then(Se).catch(Se):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(m(this,vn))}isActive(){return this.observers.some(t=>je(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Rr||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||!Zi(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=m(this,Ee))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=m(this,Ee))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),m(this,Me).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,Ee)&&(m(this,qt)?m(this,Ee).cancel({revert:!0}):m(this,Ee).cancelRetry()),this.scheduleGc()),m(this,Me).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||J(this,_e,Xe).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,Ee))return m(this,Ee).continueRetry(),m(this,Ee).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,qt,!0),r.signal)})},s=()=>{const f=el(this.options,n),p={client:m(this,Wt),queryKey:this.queryKey,meta:this.meta};return o(p),M(this,qt,!1),this.options.persister?this.options.persister(f,p,this):f(p)},a={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:m(this,Wt),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,_e,Xe).call(this,{type:"fetch",meta:(u=a.fetchOptions)==null?void 0:u.meta});const i=f=>{var p,h,v,g;fo(f)&&f.silent||J(this,_e,Xe).call(this,{type:"error",error:f}),fo(f)||((h=(p=m(this,Me).config).onError)==null||h.call(p,f,this),(g=(v=m(this,Me).config).onSettled)==null||g.call(v,this.state.data,f,this)),this.scheduleGc()};return M(this,Ee,ol({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var p,h,v,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(b){i(b);return}(h=(p=m(this,Me).config).onSuccess)==null||h.call(p,f,this),(g=(v=m(this,Me).config).onSettled)==null||g.call(v,f,this.state.error,this),this.scheduleGc()},onError:i,onFail:(f,p)=>{J(this,_e,Xe).call(this,{type:"failed",failureCount:f,error:p})},onPause:()=>{J(this,_e,Xe).call(this,{type:"pause"})},onContinue:()=>{J(this,_e,Xe).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),m(this,Ee).start()}},vn=new WeakMap,yn=new WeakMap,Me=new WeakMap,Wt=new WeakMap,Ee=new WeakMap,nr=new WeakMap,qt=new WeakMap,_e=new WeakSet,Xe=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,...al(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 fo(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),ve.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),m(this,Me).notify({query:this,type:"updated",action:t})})},Wi);function al(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:nl(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Du(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 We,qi,ju=(qi=class extends An{constructor(t={}){super();H(this,We);this.config=t,M(this,We,new Map)}build(t,n,r){const o=n.queryKey,s=n.queryHash??Ls(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,We).has(t.queryHash)||(m(this,We).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=m(this,We).get(t.queryHash);n&&(t.destroy(),n===t&&m(this,We).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ve.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return m(this,We).get(t)}getAll(){return[...m(this,We).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>da(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>da(t,r)):n}notify(t){ve.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){ve.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ve.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},We=new WeakMap,qi),qe,Oe,Vt,Ve,mt,Vi,zu=(Vi=class extends sl{constructor(t){super();H(this,Ve);H(this,qe);H(this,Oe);H(this,Vt);this.mutationId=t.mutationId,M(this,Oe,t.mutationCache),M(this,qe,[]),this.state=t.state||il(),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,qe).includes(t)||(m(this,qe).push(t),this.clearGcTimeout(),m(this,Oe).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){M(this,qe,m(this,qe).filter(n=>n!==t)),this.scheduleGc(),m(this,Oe).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){m(this,qe).length||(this.state.status==="pending"?this.scheduleGc():m(this,Oe).remove(this))}continue(){var t;return((t=m(this,Vt))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,a,i,l,c,u,f,p,h,v,g,b,x,E,w,O,y,N,q,R;const n=()=>{J(this,Ve,mt).call(this,{type:"continue"})};M(this,Vt,ol({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(B,G)=>{J(this,Ve,mt).call(this,{type:"failed",failureCount:B,error:G})},onPause:()=>{J(this,Ve,mt).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>m(this,Oe).canRun(this)}));const r=this.state.status==="pending",o=!m(this,Vt).canStart();try{if(r)n();else{J(this,Ve,mt).call(this,{type:"pending",variables:t,isPaused:o}),await((a=(s=m(this,Oe).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,Ve,mt).call(this,{type:"pending",context:G,variables:t,isPaused:o})}const B=await m(this,Vt).start();return await((u=(c=m(this,Oe).config).onSuccess)==null?void 0:u.call(c,B,t,this.state.context,this)),await((p=(f=this.options).onSuccess)==null?void 0:p.call(f,B,t,this.state.context)),await((v=(h=m(this,Oe).config).onSettled)==null?void 0:v.call(h,B,null,this.state.variables,this.state.context,this)),await((b=(g=this.options).onSettled)==null?void 0:b.call(g,B,null,t,this.state.context)),J(this,Ve,mt).call(this,{type:"success",data:B}),B}catch(B){try{throw await((E=(x=m(this,Oe).config).onError)==null?void 0:E.call(x,B,t,this.state.context,this)),await((O=(w=this.options).onError)==null?void 0:O.call(w,B,t,this.state.context)),await((N=(y=m(this,Oe).config).onSettled)==null?void 0:N.call(y,void 0,B,this.state.variables,this.state.context,this)),await((R=(q=this.options).onSettled)==null?void 0:R.call(q,void 0,B,t,this.state.context)),B}finally{J(this,Ve,mt).call(this,{type:"error",error:B})}}finally{m(this,Oe).runNext(this)}}},qe=new WeakMap,Oe=new WeakMap,Vt=new WeakMap,Ve=new WeakSet,mt=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),ve.batch(()=>{m(this,qe).forEach(r=>{r.onMutationUpdate(t)}),m(this,Oe).notify({mutation:this,type:"updated",action:t})})},Vi);function il(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Je,De,rr,Gi,Hu=(Gi=class extends An{constructor(t={}){super();H(this,Je);H(this,De);H(this,rr);this.config=t,M(this,Je,new Set),M(this,De,new Map),M(this,rr,0)}build(t,n,r){const o=new zu({mutationCache:this,mutationId:++pr(this,rr)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){m(this,Je).add(t);const n=mr(t);if(typeof n=="string"){const r=m(this,De).get(n);r?r.push(t):m(this,De).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(m(this,Je).delete(t)){const n=mr(t);if(typeof n=="string"){const r=m(this,De).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,De).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=mr(t);if(typeof n=="string"){const r=m(this,De).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=mr(t);if(typeof n=="string"){const o=(r=m(this,De).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(){ve.batch(()=>{m(this,Je).forEach(t=>{this.notify({type:"removed",mutation:t})}),m(this,Je).clear(),m(this,De).clear()})}getAll(){return Array.from(m(this,Je))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>ha(n,r))}findAll(t={}){return this.getAll().filter(n=>ha(t,n))}notify(t){ve.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return ve.batch(()=>Promise.all(t.map(n=>n.continue().catch(Se))))}},Je=new WeakMap,De=new WeakMap,rr=new WeakMap,Gi);function mr(e){var t;return(t=e.options.scope)==null?void 0:t.id}function ga(e){return{onFetch:(t,n)=>{var u,f,p,h,v;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=((v=t.state.data)==null?void 0:v.pageParams)||[];let i={pages:[],pageParams:[]},l=0;const c=async()=>{let g=!1;const b=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},x=el(t.options,t.fetchOptions),E=async(w,O,y)=>{if(g)return Promise.reject();if(O==null&&w.pages.length)return Promise.resolve(w);const N={client:t.client,queryKey:t.queryKey,pageParam:O,direction:y?"backward":"forward",meta:t.options.meta};b(N);const q=await x(N),{maxPages:R}=t.options,B=y?$u:Ru;return{pages:B(w.pages,q,R),pageParams:B(w.pageParams,O,R)}};if(o&&s.length){const w=o==="backward",O=w?Uu:ba,y={pages:s,pageParams:a},N=O(r,y);i=await E(y,N,w)}else{const w=e??s.length;do{const O=l===0?a[0]??r.initialPageParam:ba(r,i);if(l>0&&O==null)break;i=await E(i,O),l++}while(l<w)}return i};t.options.persister?t.fetchFn=()=>{var g,b;return(b=(g=t.options).persister)==null?void 0:b.call(g,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function ba(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 Uu(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,wt,wn,xn,xt,En,Cn,Yi,Bu=(Yi=class{constructor(e={}){H(this,pe);H(this,yt);H(this,wt);H(this,wn);H(this,xn);H(this,xt);H(this,En);H(this,Cn);M(this,pe,e.queryCache||new ju),M(this,yt,e.mutationCache||new Hu),M(this,wt,e.defaultOptions||{}),M(this,wn,new Map),M(this,xn,new Map),M(this,xt,0)}mount(){pr(this,xt)._++,m(this,xt)===1&&(M(this,En,_s.subscribe(async e=>{e&&(await this.resumePausedMutations(),m(this,pe).onFocus())})),M(this,Cn,$r.subscribe(async e=>{e&&(await this.resumePausedMutations(),m(this,pe).onOnline())})))}unmount(){var e,t;pr(this,xt)._--,m(this,xt)===0&&((e=m(this,En))==null||e.call(this),M(this,En,void 0),(t=m(this,Cn))==null||t.call(this),M(this,Cn,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(un(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=ku(t,s);if(a!==void 0)return m(this,pe).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return ve.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);ve.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=m(this,pe);return ve.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=ve.batch(()=>m(this,pe).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Se).catch(Se)}invalidateQueries(e,t={}){return ve.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=ve.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(Se)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Se)}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(un(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Se).catch(Se)}fetchInfiniteQuery(e){return e.behavior=ga(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Se).catch(Se)}ensureInfiniteQueryData(e){return e.behavior=ga(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return $r.isOnline()?m(this,yt).resumePausedMutations():Promise.resolve()}getQueryCache(){return m(this,pe)}getMutationCache(){return m(this,yt)}getDefaultOptions(){return m(this,wt)}setDefaultOptions(e){M(this,wt,e)}setQueryDefaults(e,t){m(this,wn).set(Jt(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...m(this,wn).values()],n={};return t.forEach(r=>{Kn(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){m(this,xn).set(Jt(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...m(this,xn).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,wt).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ls(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===Rr&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...m(this,wt).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,wt=new WeakMap,wn=new WeakMap,xn=new WeakMap,xt=new WeakMap,En=new WeakMap,Cn=new WeakMap,Yi),ke,re,or,Te,Gt,On,Et,Ct,sr,Tn,Sn,Yt,Kt,Ot,Pn,ie,_n,qo,Vo,Go,Yo,Ko,Qo,Xo,ll,Ki,Wu=(Ki=class extends An{constructor(t,n){super();H(this,ie);H(this,ke);H(this,re);H(this,or);H(this,Te);H(this,Gt);H(this,On);H(this,Et);H(this,Ct);H(this,sr);H(this,Tn);H(this,Sn);H(this,Yt);H(this,Kt);H(this,Ot);H(this,Pn,new Set);this.options=n,M(this,ke,t),M(this,Ct,null),M(this,Et,Wo()),this.options.experimental_prefetchInRender||m(this,Et).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),va(m(this,re),this.options)?J(this,ie,_n).call(this):this.updateResult(),J(this,ie,Yo).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Jo(m(this,re),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Jo(m(this,re),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,J(this,ie,Ko).call(this),J(this,ie,Qo).call(this),m(this,re).removeObserver(this)}setOptions(t){const n=this.options,r=m(this,re);if(this.options=m(this,ke).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof je(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,Xo).call(this),m(this,re).setOptions(this.options),n._defaulted&&!Ar(this.options,n)&&m(this,ke).getQueryCache().notify({type:"observerOptionsUpdated",query:m(this,re),observer:this});const o=this.hasListeners();o&&ya(m(this,re),r,this.options,n)&&J(this,ie,_n).call(this),this.updateResult(),o&&(m(this,re)!==r||je(this.options.enabled,m(this,re))!==je(n.enabled,m(this,re))||un(this.options.staleTime,m(this,re))!==un(n.staleTime,m(this,re)))&&J(this,ie,qo).call(this);const s=J(this,ie,Vo).call(this);o&&(m(this,re)!==r||je(this.options.enabled,m(this,re))!==je(n.enabled,m(this,re))||s!==m(this,Ot))&&J(this,ie,Go).call(this,s)}getOptimisticResult(t){const n=m(this,ke).getQueryCache().build(m(this,ke),t),r=this.createResult(n,t);return Vu(this,r)&&(M(this,Te,r),M(this,On,this.options),M(this,Gt,m(this,re).state)),r}getCurrentResult(){return m(this,Te)}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,Pn).add(t)}getCurrentQuery(){return m(this,re)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=m(this,ke).defaultQueryOptions(t),r=m(this,ke).getQueryCache().build(m(this,ke),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return J(this,ie,_n).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),m(this,Te)))}createResult(t,n){var B;const r=m(this,re),o=this.options,s=m(this,Te),a=m(this,Gt),i=m(this,On),c=t!==r?t.state:m(this,or),{state:u}=t;let f={...u},p=!1,h;if(n._optimisticResults){const G=this.hasListeners(),le=!G&&va(t,n),ue=G&&ya(t,r,n,o);(le||ue)&&(f={...f,...al(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:v,errorUpdatedAt:g,status:b}=f;h=f.data;let x=!1;if(n.placeholderData!==void 0&&h===void 0&&b==="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((B=m(this,Sn))==null?void 0:B.state.data,m(this,Sn)):n.placeholderData,G!==void 0&&(b="success",h=Bo(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,sr))h=m(this,Tn);else try{M(this,sr,n.select),h=n.select(h),h=Bo(s==null?void 0:s.data,h,n),M(this,Tn,h),M(this,Ct,null)}catch(G){M(this,Ct,G)}m(this,Ct)&&(v=m(this,Ct),h=m(this,Tn),g=Date.now(),b="error");const E=f.fetchStatus==="fetching",w=b==="pending",O=b==="error",y=w&&E,N=h!==void 0,R={status:b,fetchStatus:f.fetchStatus,isPending:w,isSuccess:b==="success",isError:O,isInitialLoading:y,isLoading:y,data:h,dataUpdatedAt:f.dataUpdatedAt,error:v,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:E,isRefetching:E&&!w,isLoadingError:O&&!N,isPaused:f.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:O&&N,isStale:Ds(t,n),refetch:this.refetch,promise:m(this,Et)};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,Et,R.promise=Wo());G(oe)},ue=m(this,Et);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,Te),n=this.createResult(m(this,re),this.options);if(M(this,Gt,m(this,re).state),M(this,On,this.options),m(this,Gt).data!==void 0&&M(this,Sn,m(this,re)),Ar(n,t))return;M(this,Te,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,s=typeof o=="function"?o():o;if(s==="all"||!s&&!m(this,Pn).size)return!0;const a=new Set(s??m(this,Pn));return this.options.throwOnError&&a.add("error"),Object.keys(m(this,Te)).some(i=>{const l=i;return m(this,Te)[l]!==t[l]&&a.has(l)})};J(this,ie,ll).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&J(this,ie,Yo).call(this)}},ke=new WeakMap,re=new WeakMap,or=new WeakMap,Te=new WeakMap,Gt=new WeakMap,On=new WeakMap,Et=new WeakMap,Ct=new WeakMap,sr=new WeakMap,Tn=new WeakMap,Sn=new WeakMap,Yt=new WeakMap,Kt=new WeakMap,Ot=new WeakMap,Pn=new WeakMap,ie=new WeakSet,_n=function(t){J(this,ie,Xo).call(this);let n=m(this,re).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Se)),n},qo=function(){J(this,ie,Ko).call(this);const t=un(this.options.staleTime,m(this,re));if(Xt||m(this,Te).isStale||!zo(t))return;const r=Zi(m(this,Te).dataUpdatedAt,t)+1;M(this,Yt,setTimeout(()=>{m(this,Te).isStale||this.updateResult()},r))},Vo=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(m(this,re)):this.options.refetchInterval)??!1},Go=function(t){J(this,ie,Qo).call(this),M(this,Ot,t),!(Xt||je(this.options.enabled,m(this,re))===!1||!zo(m(this,Ot))||m(this,Ot)===0)&&M(this,Kt,setInterval(()=>{(this.options.refetchIntervalInBackground||_s.isFocused())&&J(this,ie,_n).call(this)},m(this,Ot)))},Yo=function(){J(this,ie,qo).call(this),J(this,ie,Go).call(this,J(this,ie,Vo).call(this))},Ko=function(){m(this,Yt)&&(clearTimeout(m(this,Yt)),M(this,Yt,void 0))},Qo=function(){m(this,Kt)&&(clearInterval(m(this,Kt)),M(this,Kt,void 0))},Xo=function(){const t=m(this,ke).getQueryCache().build(m(this,ke),this.options);if(t===m(this,re))return;const n=m(this,re);M(this,re,t),M(this,or,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},ll=function(t){ve.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(m(this,Te))}),m(this,ke).getQueryCache().notify({query:m(this,re),type:"observerResultsUpdated"})})},Ki);function qu(e,t){return je(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function va(e,t){return qu(e,t)||e.state.data!==void 0&&Jo(e,t,t.refetchOnMount)}function Jo(e,t,n){if(je(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Ds(e,t)}return!1}function ya(e,t,n,r){return(e!==t||je(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Ds(e,n)}function Ds(e,t){return je(t.enabled,e)!==!1&&e.isStaleByTime(un(t.staleTime,e))}function Vu(e,t){return!Ar(e.getCurrentResult(),t)}var Tt,St,Ae,Ze,ot,Tr,Zo,Qi,Gu=(Qi=class extends An{constructor(n,r){super();H(this,ot);H(this,Tt);H(this,St);H(this,Ae);H(this,Ze);M(this,Tt,n),this.setOptions(r),this.bindMethods(),J(this,ot,Tr).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,Tt).defaultMutationOptions(n),Ar(this.options,r)||m(this,Tt).getMutationCache().notify({type:"observerOptionsUpdated",mutation:m(this,Ae),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Jt(r.mutationKey)!==Jt(this.options.mutationKey)?this.reset():((o=m(this,Ae))==null?void 0:o.state.status)==="pending"&&m(this,Ae).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=m(this,Ae))==null||n.removeObserver(this)}onMutationUpdate(n){J(this,ot,Tr).call(this),J(this,ot,Zo).call(this,n)}getCurrentResult(){return m(this,St)}reset(){var n;(n=m(this,Ae))==null||n.removeObserver(this),M(this,Ae,void 0),J(this,ot,Tr).call(this),J(this,ot,Zo).call(this)}mutate(n,r){var o;return M(this,Ze,r),(o=m(this,Ae))==null||o.removeObserver(this),M(this,Ae,m(this,Tt).getMutationCache().build(m(this,Tt),this.options)),m(this,Ae).addObserver(this),m(this,Ae).execute(n)}},Tt=new WeakMap,St=new WeakMap,Ae=new WeakMap,Ze=new WeakMap,ot=new WeakSet,Tr=function(){var r;const n=((r=m(this,Ae))==null?void 0:r.state)??il();M(this,St,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Zo=function(n){ve.batch(()=>{var r,o,s,a,i,l,c,u;if(m(this,Ze)&&this.hasListeners()){const f=m(this,St).variables,p=m(this,St).context;(n==null?void 0:n.type)==="success"?((o=(r=m(this,Ze)).onSuccess)==null||o.call(r,n.data,f,p),(a=(s=m(this,Ze)).onSettled)==null||a.call(s,n.data,null,f,p)):(n==null?void 0:n.type)==="error"&&((l=(i=m(this,Ze)).onError)==null||l.call(i,n.error,f,p),(u=(c=m(this,Ze)).onSettled)==null||u.call(c,void 0,n.error,f,p))}this.listeners.forEach(f=>{f(m(this,St))})})},Qi),cl=F.createContext(void 0),ul=e=>{const t=F.useContext(cl);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Yu=({client:e,children:t})=>(F.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),T.jsx(cl.Provider,{value:e,children:t})),fl=F.createContext(!1),Ku=()=>F.useContext(fl);fl.Provider;function Qu(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Xu=F.createContext(Qu()),Ju=()=>F.useContext(Xu),Zu=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},ef=e=>{F.useEffect(()=>{e.clearReset()},[e])},tf=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||tl(n,[e.error,r])),nf=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)))},rf=(e,t)=>e.isLoading&&e.isFetching&&!t,of=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,wa=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function sf(e,t,n){var f,p,h,v,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=ul(n),o=Ku(),s=Ju(),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",nf(a),Zu(a,s),ef(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(b=>{const x=u?l.subscribe(ve.batchCalls(b)):Se;return l.updateResult(),x},[l,u]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),F.useEffect(()=>{l.setOptions(a)},[a,l]),of(a,c))throw wa(a,l,s);if(tf({result:c,errorResetBoundary:s,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw c.error;if((v=(h=r.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||v.call(h,a,c),a.experimental_prefetchInRender&&!Xt&&rf(c,o)){const b=i?wa(a,l,s):(g=r.getQueryCache().get(a.queryHash))==null?void 0:g.promise;b==null||b.catch(Se).finally(()=>{l.updateResult()})}return a.notifyOnChangeProps?c:l.trackResult(c)}function js(e,t){return sf(e,Wu,t)}function dl(e,t){const n=ul(t),[r]=F.useState(()=>new Gu(n,e));F.useEffect(()=>{r.setOptions(e)},[r,e]);const o=F.useSyncExternalStore(F.useCallback(a=>r.subscribe(ve.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=F.useCallback((a,i)=>{r.mutate(a,i).catch(Se)},[r]);if(o.error&&tl(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}const zs=d.createContext(null);zs.Provider;const Rn=()=>d.useContext(zs),hl=({children:e})=>{const[t]=d.useState(new Bu);return console.log("Confidence Playbook Context Initialized"),T.jsx(zs.Provider,{value:{queryClient:t},children:T.jsx(Yu,{client:t,children:e})})},he={OPEN:"Open",IN_PROGRESS:"In progress",IN_REVIEW:"In review",COMPLETED:"Completed"},pl="https://marketplace.confidence.com/api",ar=pl+"/confidence",xa=pl+"/dropbox/prod",af=async e=>{const t={taskInstanceId:e},n=new Headers;return n.append("Content-Type","application/json"),await(await fetch(`${ar}/playbook-task-complete`,{method:"POST",headers:n,body:JSON.stringify(t)})).json()},lf=()=>{const{queryClient:e}=Rn(),t=dl({mutationFn:async r=>af(r)},e);return{completeTask:async r=>t.mutateAsync(r,{onSuccess:()=>{console.log("Task completed successfully")},onError:o=>{console.error("Error completing task:",o)}}),...t}},cf=async e=>{const t={taskInstanceId:e},n=new Headers;n.append("Content-Type","application/json");const o=await(await fetch(`${ar}/playbook-task-start`,{method:"POST",headers:n,body:JSON.stringify(t)})).json();return console.log({data:o}),o},uf=()=>{const{queryClient:e}=Rn(),t=dl({mutationFn:async r=>{const o=await cf(r);return console.log(o),o}},e);return{startTask:r=>t.mutateAsync(r,{onSuccess:()=>{console.log("Task started successfully")},onError:o=>{console.error("Error starting task:",o)}}),...t}},ff=(e,t)=>{const{queryClient:n}=Rn(),{completeTask:r}=lf(),{startTask:o}=uf();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}})}}},df=e=>{var o;const{queryClient:t}=Rn(),n=js({queryFn:async()=>{const s=new Headers,a=await fetch(`${ar}/playbook-details`,{method:"POST",cache:"no-store",headers:s,body:JSON.stringify({playbookInstanceId:+e,start:0,limit:50})});if(!a.ok)throw new Error("Network response was not ok");const i=await a.json();if(i.error)throw new Error(i.error);return i},queryKey:["playbook",+e]},t),r=ff(e,{quickComplete:(o=n.data)==null?void 0:o.quickComplete});return{playbook:n.data,isLoading:n.isLoading,error:n.error,actions:r}},Un={START:"START",PAUSE:"PAUSE",COMPLETE:"COMPLETE"},hf={START:"Start",PAUSE:"Pause",RESUME:"Resume",COMPLETE:"Complete"},pf=e=>{const{taskStatus:t}=e;return{buttons:d.useMemo(()=>t===he.OPEN&&e.canStart?[Un.START]:t===he.IN_PROGRESS?[Un.PAUSE,Un.COMPLETE]:t===he.COMPLETED?[]:[],[t])}},ml=async e=>{const t=new Headers;t.append("Content-Type","application/json");const r=await(await fetch(`${ar}/playbook-initiate`,{method:"POST",headers:t,body:JSON.stringify(e)})).json();return console.log({data:r}),r},Hs="-",mf=e=>{const t=bf(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const i=a.split(Hs);return i[0]===""&&i.length!==1&&i.shift(),gl(i,t)||gf(a)},getConflictingClassGroupIds:(a,i)=>{const l=n[a]||[];return i&&r[a]?[...l,...r[a]]:l}}},gl=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?gl(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Hs);return(a=t.validators.find(({validator:i})=>i(s)))==null?void 0:a.classGroupId},Ea=/^\[(.+)\]$/,gf=e=>{if(Ea.test(e)){const t=Ea.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},bf=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)es(n[o],r,o,t);return r},es=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:Ca(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(vf(o)){es(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,a])=>{es(a,Ca(t,s),n,r)})})},Ca=(e,t)=>{let n=e;return t.split(Hs).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},vf=e=>e.isThemeGetter,yf=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)}}},ts="!",ns=":",wf=ns.length,xf=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let a=0,i=0,l=0,c;for(let v=0;v<o.length;v++){let g=o[v];if(a===0&&i===0){if(g===ns){s.push(o.slice(l,v)),l=v+wf;continue}if(g==="/"){c=v;continue}}g==="["?a++:g==="]"?a--:g==="("?i++:g===")"&&i--}const u=s.length===0?o:o.substring(l),f=Ef(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+ns,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},Ef=e=>e.endsWith(ts)?e.substring(0,e.length-1):e.startsWith(ts)?e.substring(1):e,Cf=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}},Of=e=>({cache:yf(e.cacheSize),parseClassName:xf(e),sortModifiers:Cf(e),...mf(e)}),Tf=/\s+/,Sf=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,a=[],i=e.trim().split(Tf);let l="";for(let c=i.length-1;c>=0;c-=1){const u=i[c],{isExternal:f,modifiers:p,hasImportantModifier:h,baseClassName:v,maybePostfixModifierPosition:g}=n(u);if(f){l=u+(l.length>0?" "+l:l);continue}let b=!!g,x=r(b?v.substring(0,g):v);if(!x){if(!b){l=u+(l.length>0?" "+l:l);continue}if(x=r(v),!x){l=u+(l.length>0?" "+l:l);continue}b=!1}const E=s(p).join(":"),w=h?E+ts:E,O=w+x;if(a.includes(O))continue;a.push(O);const y=o(x,b);for(let N=0;N<y.length;++N){const q=y[N];a.push(w+q)}l=u+(l.length>0?" "+l:l)}return l};function Pf(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=bl(t))&&(r&&(r+=" "),r+=n);return r}const bl=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=bl(e[r]))&&(n&&(n+=" "),n+=t);return n};function kf(e,...t){let n,r,o,s=a;function a(l){const c=t.reduce((u,f)=>f(u),e());return n=Of(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=Sf(l,n);return o(l,u),u}return function(){return s(Pf.apply(null,arguments))}}const be=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},vl=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,yl=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Af=/^\d+\/\d+$/,Rf=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,$f=/\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$/,Ff=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,If=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Mf=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,sn=e=>Af.test(e),ee=e=>!!e&&!Number.isNaN(Number(e)),ht=e=>!!e&&Number.isInteger(Number(e)),ho=e=>e.endsWith("%")&&ee(e.slice(0,-1)),Qe=e=>Rf.test(e),Nf=()=>!0,Lf=e=>$f.test(e)&&!Ff.test(e),wl=()=>!1,_f=e=>If.test(e),Df=e=>Mf.test(e),jf=e=>!L(e)&&!_(e),zf=e=>$n(e,Cl,wl),L=e=>vl.test(e),Lt=e=>$n(e,Ol,Lf),po=e=>$n(e,qf,ee),Oa=e=>$n(e,xl,wl),Hf=e=>$n(e,El,Df),gr=e=>$n(e,Tl,_f),_=e=>yl.test(e),Nn=e=>Fn(e,Ol),Uf=e=>Fn(e,Vf),Ta=e=>Fn(e,xl),Bf=e=>Fn(e,Cl),Wf=e=>Fn(e,El),br=e=>Fn(e,Tl,!0),$n=(e,t,n)=>{const r=vl.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Fn=(e,t,n=!1)=>{const r=yl.exec(e);return r?r[1]?t(r[1]):n:!1},xl=e=>e==="position"||e==="percentage",El=e=>e==="image"||e==="url",Cl=e=>e==="length"||e==="size"||e==="bg-size",Ol=e=>e==="length",qf=e=>e==="number",Vf=e=>e==="family-name",Tl=e=>e==="shadow",Gf=()=>{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"),v=be("blur"),g=be("perspective"),b=be("aspect"),x=be("ease"),E=be("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],y=()=>[...O(),_,L],N=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto","contain","none"],R=()=>[_,L,l],B=()=>[sn,"full","auto",...R()],G=()=>[ht,"none","subgrid",_,L],le=()=>["auto",{span:["full",ht,_,L]},ht,_,L],ue=()=>[ht,"auto",_,L],oe=()=>["auto","min","max","fr",_,L],fe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],W=()=>["start","end","center","stretch","center-safe","end-safe"],Y=()=>["auto",...R()],ne=()=>[sn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],P=()=>[e,_,L],V=()=>[...O(),Ta,Oa,{position:[_,L]}],C=()=>["no-repeat",{repeat:["","x","y","space","round"]}],k=()=>["auto","cover","contain",Bf,zf,{size:[_,L]}],U=()=>[ho,Nn,Lt],A=()=>["","none","full",c,_,L],D=()=>["",ee,Nn,Lt],K=()=>["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,ho,Ta,Oa],Q=()=>["","none",v,_,L],X=()=>["none",ee,_,L],Z=()=>["none",ee,_,L],ge=()=>[ee,_,L],$=()=>[sn,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Qe],breakpoint:[Qe],color:[Nf],container:[Qe],"drop-shadow":[Qe],ease:["in","out","in-out"],font:[jf],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Qe],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Qe],shadow:[Qe],spacing:["px",ee],text:[Qe],"text-shadow":[Qe],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",sn,L,_,b]}],container:["container"],columns:[{columns:[ee,L,_,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:y()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:q()}],"overscroll-x":[{"overscroll-x":q()}],"overscroll-y":[{"overscroll-y":q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:B()}],"inset-x":[{"inset-x":B()}],"inset-y":[{"inset-y":B()}],start:[{start:B()}],end:[{end:B()}],top:[{top:B()}],right:[{right:B()}],bottom:[{bottom:B()}],left:[{left:B()}],visibility:["visible","invisible","collapse"],z:[{z:[ht,"auto",_,L]}],basis:[{basis:[sn,"full","auto",i,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ee,sn,"auto","initial","none",L]}],grow:[{grow:["",ee,_,L]}],shrink:[{shrink:["",ee,_,L]}],order:[{order:[ht,"first","last","none",_,L]}],"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":[...W(),"normal"]}],"justify-self":[{"justify-self":["auto",...W()]}],"align-content":[{content:["normal",...fe()]}],"align-items":[{items:[...W(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...W(),{baseline:["","last"]}]}],"place-content":[{"place-content":fe()}],"place-items":[{"place-items":[...W(),"baseline"]}],"place-self":[{"place-self":["auto",...W()]}],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:Y()}],mx:[{mx:Y()}],my:[{my:Y()}],ms:[{ms:Y()}],me:[{me:Y()}],mt:[{mt:Y()}],mr:[{mr:Y()}],mb:[{mb:Y()}],ml:[{ml:Y()}],"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,Nn,Lt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,_,po]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ho,L]}],"font-family":[{font:[Uf,L,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,_,L]}],"line-clamp":[{"line-clamp":[ee,"none",_,po]}],leading:[{leading:[s,...R()]}],"list-image":[{"list-image":["none",_,L]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",_,L]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:[ee,"from-font","auto",_,Lt]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[ee,"auto",_,L]}],"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",_,L]}],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",_,L]}],"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:C()}],"bg-size":[{bg:k()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ht,_,L],radial:["",_,L],conic:[ht,_,L]},Wf,Hf]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:U()}],"gradient-via-pos":[{via:U()}],"gradient-to-pos":[{to:U()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],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:[...K(),"hidden","none"]}],"divide-style":[{divide:[...K(),"hidden","none"]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...K(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ee,_,L]}],"outline-w":[{outline:["",ee,Nn,Lt]}],"outline-color":[{outline:P()}],shadow:[{shadow:["","none",u,br,gr]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":["none",f,br,gr]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[ee,Lt]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":D()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":["none",p,br,gr]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[ee,_,L]}],"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":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"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":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"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":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"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":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"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":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"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":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"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":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[_,L]}],"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":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"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":O()}],"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":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:V()}],"mask-repeat":[{mask:C()}],"mask-size":[{mask:k()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",_,L]}],filter:[{filter:["","none",_,L]}],blur:[{blur:Q()}],brightness:[{brightness:[ee,_,L]}],contrast:[{contrast:[ee,_,L]}],"drop-shadow":[{"drop-shadow":["","none",h,br,gr]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:["",ee,_,L]}],"hue-rotate":[{"hue-rotate":[ee,_,L]}],invert:[{invert:["",ee,_,L]}],saturate:[{saturate:[ee,_,L]}],sepia:[{sepia:["",ee,_,L]}],"backdrop-filter":[{"backdrop-filter":["","none",_,L]}],"backdrop-blur":[{"backdrop-blur":Q()}],"backdrop-brightness":[{"backdrop-brightness":[ee,_,L]}],"backdrop-contrast":[{"backdrop-contrast":[ee,_,L]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ee,_,L]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ee,_,L]}],"backdrop-invert":[{"backdrop-invert":["",ee,_,L]}],"backdrop-opacity":[{"backdrop-opacity":[ee,_,L]}],"backdrop-saturate":[{"backdrop-saturate":[ee,_,L]}],"backdrop-sepia":[{"backdrop-sepia":["",ee,_,L]}],"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",_,L]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ee,"initial",_,L]}],ease:[{ease:["linear","initial",x,_,L]}],delay:[{delay:[ee,_,L]}],animate:[{animate:["none",E,_,L]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,_,L]}],"perspective-origin":[{"perspective-origin":y()}],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:[_,L,"","none","gpu","cpu"]}],"transform-origin":[{origin:y()}],"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:P()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:P()}],"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",_,L]}],"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",_,L]}],fill:[{fill:["none",...P()]}],"stroke-w":[{stroke:[ee,Nn,Lt,po]}],stroke:[{stroke:["none",...P()]}],"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"]}},fn=kf(Gf);function Sl(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=Sl(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Qn(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Sl(e))&&(r&&(r+=" "),r+=t);return r}function ye(...e){return fn(Qn(e))}const Pl=typeof document<"u"?d.useLayoutEffect:()=>{};function Yf(e){const t=d.useRef(null);return Pl(()=>{t.current=e},[e]),d.useCallback((...n)=>{const r=t.current;return r==null?void 0:r(...n)},[])}const Nt=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:Nt(e).defaultView||window;function Kf(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function Qf(e){return Kf(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}let Xf=!1;function Us(){return Xf}function kl(e,t){if(!Us())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:Qf(n)?n=n.host:n=n.parentNode}return!1}const rs=(e=document)=>{var t;if(!Us())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 Al(e){return Us()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function Ur(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 Bs(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 ct(e){if(process.env.NODE_ENV==="test")return e;let t=null;return()=>(t==null&&(t=e()),t)}const Ws=ct(function(){return Bs(/^Mac/i)}),Jf=ct(function(){return Bs(/^iPhone/i)}),Zf=ct(function(){return Bs(/^iPad/i)||Ws()&&navigator.maxTouchPoints>1}),ed=ct(function(){return Jf()||Zf()});ct(function(){return Ws()||ed()});ct(function(){return Ur(/AppleWebKit/i)&&!td()});const td=ct(function(){return Ur(/Chrome/i)}),nd=ct(function(){return Ur(/Android/i)});ct(function(){return Ur(/Firefox/i)});function Rl(){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 rd(e){return e.mozInputSource===0&&e.isTrusted?!0:nd()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function $l(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function od(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function Fl(e){let t=d.useRef({isFocused:!1,observer:null});Pl(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=Yf(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=$l(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 sd=!1,ir=null,os=new Set,Bn=new Map,Zt=!1,ss=!1;const ad={Tab:!0,Escape:!0};function qs(e,t){for(let n of os)n(e,t)}function id(e){return!(e.metaKey||!Ws()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Fr(e){Zt=!0,id(e)&&(ir="keyboard",qs("keyboard",e))}function Ne(e){ir="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Zt=!0,qs("pointer",e))}function Il(e){rd(e)&&(Zt=!0,ir="virtual")}function Ml(e){e.target===window||e.target===document||sd||!e.isTrusted||(!Zt&&!ss&&(ir="virtual",qs("virtual",e)),Zt=!1,ss=!1)}function Nl(){Zt=!1,ss=!0}function as(e){if(typeof window>"u"||typeof document>"u"||Bn.get(jt(e)))return;const t=jt(e),n=Nt(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Zt=!0,r.apply(this,arguments)},n.addEventListener("keydown",Fr,!0),n.addEventListener("keyup",Fr,!0),n.addEventListener("click",Il,!0),t.addEventListener("focus",Ml,!0),t.addEventListener("blur",Nl,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Ne,!0),n.addEventListener("pointermove",Ne,!0),n.addEventListener("pointerup",Ne,!0)):process.env.NODE_ENV==="test"&&(n.addEventListener("mousedown",Ne,!0),n.addEventListener("mousemove",Ne,!0),n.addEventListener("mouseup",Ne,!0)),t.addEventListener("beforeunload",()=>{Ll(e)},{once:!0}),Bn.set(t,{focus:r})}const Ll=(e,t)=>{const n=jt(e),r=Nt(e);t&&r.removeEventListener("DOMContentLoaded",t),Bn.has(n)&&(n.HTMLElement.prototype.focus=Bn.get(n).focus,r.removeEventListener("keydown",Fr,!0),r.removeEventListener("keyup",Fr,!0),r.removeEventListener("click",Il,!0),n.removeEventListener("focus",Ml,!0),n.removeEventListener("blur",Nl,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",Ne,!0),r.removeEventListener("pointermove",Ne,!0),r.removeEventListener("pointerup",Ne,!0)):process.env.NODE_ENV==="test"&&(r.removeEventListener("mousedown",Ne,!0),r.removeEventListener("mousemove",Ne,!0),r.removeEventListener("mouseup",Ne,!0)),Bn.delete(n))};function ld(e){const t=Nt(e);let n;return t.readyState!=="loading"?as(e):(n=()=>{as(e)},t.addEventListener("DOMContentLoaded",n)),()=>Ll(e,n)}typeof document<"u"&&ld();function _l(){return ir!=="pointer"}const cd=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function ud(e,t,n){let r=Nt(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&&!cd.has(r.activeElement.type)||r.activeElement instanceof s||r.activeElement instanceof a&&r.activeElement.isContentEditable,!(e&&t==="keyboard"&&n instanceof i&&!ad[n.key])}function fd(e,t,n){as(),d.useEffect(()=>{let r=(o,s)=>{ud(!!(n!=null&&n.isTextInput),o,s)&&e(_l())};return os.add(r),()=>{os.delete(r)}},t)}function dd(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=Fl(s),i=d.useCallback(l=>{const c=Nt(l.target),u=c?rs(c):rs();l.target===l.currentTarget&&u===Al(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 hd(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:o}=e,s=d.useRef({isFocusWithin:!1}),{addGlobalListener:a,removeAllGlobalListeners:i}=Rl(),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=Fl(l),u=d.useCallback(f=>{if(!f.currentTarget.contains(f.target))return;const p=Nt(f.target),h=rs(p);if(!s.current.isFocusWithin&&h===Al(f.nativeEvent)){r&&r(f),o&&o(!0),s.current.isFocusWithin=!0,c(f);let v=f.currentTarget;a(p,"focus",g=>{if(s.current.isFocusWithin&&!kl(v,g.target)){let b=new p.defaultView.FocusEvent("blur",{relatedTarget:g.target});od(b,v);let x=$l(b);l(x)}},{capture:!0})}},[r,o,c,a,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:l}}}let Ir=!1,mo=0;function is(){Ir=!0,setTimeout(()=>{Ir=!1},50)}function Sa(e){e.pointerType==="touch"&&is()}function pd(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",Sa):process.env.NODE_ENV==="test"&&document.addEventListener("touchend",is),mo++,()=>{mo--,!(mo>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",Sa):process.env.NODE_ENV==="test"&&document.removeEventListener("touchend",is))}}function md(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(pd,[]);let{addGlobalListener:l,removeAllGlobalListeners:c}=Rl(),{hoverProps:u,triggerHoverEnd:f}=d.useMemo(()=>{let p=(g,b)=>{if(i.pointerType=b,o||b==="touch"||i.isHovered||!g.currentTarget.contains(g.target))return;i.isHovered=!0;let x=g.currentTarget;i.target=x,l(Nt(g.target),"pointerover",E=>{i.isHovered&&i.target&&!kl(i.target,E.target)&&h(E,E.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:x,pointerType:b}),n&&n(!0),a(!0)},h=(g,b)=>{let x=i.target;i.pointerType="",i.target=null,!(b==="touch"||!i.isHovered||!x)&&(i.isHovered=!1,c(),r&&r({type:"hoverend",target:x,pointerType:b}),n&&n(!1),a(!1))},v={};return typeof PointerEvent<"u"?(v.onPointerEnter=g=>{Ir&&g.pointerType==="mouse"||p(g,g.pointerType)},v.onPointerLeave=g=>{!o&&g.currentTarget.contains(g.target)&&h(g,g.pointerType)}):process.env.NODE_ENV==="test"&&(v.onTouchStart=()=>{i.ignoreEmulatedMouseEvents=!0},v.onMouseEnter=g=>{!i.ignoreEmulatedMouseEvents&&!Ir&&p(g,"mouse"),i.ignoreEmulatedMouseEvents=!1},v.onMouseLeave=g=>{!o&&g.currentTarget.contains(g.target)&&h(g,"mouse")}),{hoverProps:v,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 gd(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,o=d.useRef({isFocused:!1,isFocusVisible:t||_l()}),[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]);fd(h=>{o.current.isFocusVisible=h,c()},[],{isTextInput:n});let{focusProps:f}=dd({isDisabled:r,onFocusChange:u}),{focusWithinProps:p}=hd({isDisabled:!r,onFocusWithinChange:u});return{isFocused:s,isFocusVisible:i,focusProps:r?p:f}}var bd=Object.defineProperty,vd=(e,t,n)=>t in e?bd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,go=(e,t,n)=>(vd(e,typeof t!="symbol"?t+"":t,n),n);let yd=class{constructor(){go(this,"current",this.detect()),go(this,"handoffState","pending"),go(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"}},Qt=new yd;function Br(e){var t,n;return Qt.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 ut(){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=ut();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 Vs(){let[e]=d.useState(ut);return d.useEffect(()=>()=>e.dispose(),[e]),e}let we=(e,t)=>{Qt.isServer?d.useEffect(e,t):d.useLayoutEffect(e,t)};function nn(e){let t=d.useRef(e);return we(()=>{t.current=e},[e]),t}let ce=function(e){let t=nn(e);return d.useCallback((...n)=>t.current(...n),[t])},Dl=d.createContext(void 0);function qr(){return d.useContext(Dl)}function wd({value:e,children:t}){return d.createElement(Dl.Provider,{value:e},t)}function ls(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function st(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,st),r}var Mr=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Mr||{}),Pt=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Pt||{});function Pe(){let e=Ed();return d.useCallback(t=>xd({mergeRefs:e,...t}),[e])}function xd({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:s=!0,name:a,mergeRefs:i}){i=i??Cd;let l=jl(t,e);if(s)return vr(l,n,r,a,i);let c=o??0;if(c&2){let{static:u=!1,...f}=l;if(u)return vr(f,n,r,a,i)}if(c&1){let{unmount:u=!0,...f}=l;return st(u?0:1,{0(){return null},1(){return vr({...f,hidden:!0,style:{display:"none"}},n,r,a,i)}})}return vr(l,n,r,a,i)}function vr(e,t={},n,r,o){let{as:s=n,children:a,refName:i="ref",...l}=bo(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[v,g]of Object.entries(t))typeof g=="boolean"&&(p=!0),g===!0&&h.push(v.replace(/([A-Z])/g,b=>`-${b.toLowerCase()}`));if(p){f["data-headlessui-state"]=h.join(" ");for(let v of h)f[`data-${v}`]=""}}if(s===d.Fragment&&(Object.keys(_t(l)).length>0||Object.keys(_t(f)).length>0))if(!d.isValidElement(u)||Array.isArray(u)&&u.length>1){if(Object.keys(_t(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(_t(l)).concat(Object.keys(_t(f))).map(p=>` - ${p}`).join(`
|
|
2
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
3
|
`)].join(`
|
|
4
|
-
`))}else{let p=u.props,h=p==null?void 0:p.className,y=typeof h=="function"?(...x)=>ls(h(...x),l.className):ls(h,l.className),g=y?{className:y}:{},b=jl(u.props,_t(bo(l,["ref"])));for(let x in f)x in b&&delete f[x];return d.cloneElement(u,Object.assign({},b,f,c,{ref:o(Td(u),c.ref)},g))}return d.createElement(s,Object.assign({},bo(l,["ref"]),s!==d.Fragment&&c,s!==d.Fragment&&f),u)}function Ed(){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 Cd(...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 jl(...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 Sd(...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 _t(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function bo(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function Td(e){return d.version.split(".")[0]>="19"?e.props.ref:e.ref}let Od="span";var Xn=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Xn||{});function Pd(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 Pe()({ourProps:s,theirProps:o,slot:{},defaultTag:Od,name:"Hidden"})}let Nr=we(Pd),kd=d.createContext(null);function Ad(e){let[t,n]=d.useState(null);return d.createElement(kd.Provider,{value:{target:t}},e.children,d.createElement(Nr,{features:Xn.Hidden,ref:n}))}let zl=d.createContext(void 0);function Hl(){return d.useContext(zl)}function Rd({id:e,children:t}){return d.createElement(zl.Provider,{value:e},t)}function Ul(e){return typeof e!="object"||e===null?!1:"nodeType"in e}function tt(e){return Ul(e)&&"tagName"in e}function Rt(e){return tt(e)&&"accessKey"in e}function kt(e){return tt(e)&&"tabIndex"in e}function $d(e){return tt(e)&&"style"in e}function Fd(e){return Rt(e)&&e.nodeName==="IFRAME"}function Bl(e){return Rt(e)&&e.nodeName==="INPUT"}function Pa(e){return Rt(e)&&e.nodeName==="LABEL"}function Id(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 Wl=Symbol();function Md(e,t=!0){return Object.assign(e,{[Wl]:t})}function Ue(...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[Wl]))?void 0:n}let Vr=d.createContext(null);Vr.displayName="DescriptionContext";function ql(){let e=d.useContext(Vr);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,ql),t}return e}function Nd(){var e,t;return(t=(e=d.useContext(Vr))==null?void 0:e.value)!=null?t:void 0}function Vl(){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(Vr.Provider,{value:o},n.children)},[t])]}let Ld="p";function _d(e,t){let n=d.useId(),r=qr(),{id:o=`headlessui-description-${n}`,...s}=e,a=ql(),i=Ue(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 Pe()({ourProps:u,theirProps:s,slot:c,defaultTag:Ld,name:a.name||"Description"})}let Dd=we(_d),Gl=Object.assign(Dd,{});var Yl=(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))(Yl||{});let Gr=d.createContext(null);Gr.displayName="LabelContext";function Kl(){let e=d.useContext(Gr);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,Kl),t}return e}function Ql(e){var t,n,r;let o=(n=(t=d.useContext(Gr))==null?void 0:t.value)!=null?n:void 0;return((r=void 0)!=null?r:0)>0?[o,...e].filter(Boolean).join(" "):o}function jd({inherit:e=!1}={}){let t=Ql(),[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(Gr.Provider,{value:i},s.children)},[r])]}let zd="label";function Hd(e,t){var n;let r=d.useId(),o=Kl(),s=Hl(),a=qr(),{id:i=`headlessui-label-${r}`,htmlFor:l=s??((n=o.props)==null?void 0:n.htmlFor),passive:c=!1,...u}=e,f=Ue(t);ve(()=>o.register(i),[i,o.register]);let p=ce(b=>{let x=b.currentTarget;if(!(b.target!==b.currentTarget&&Id(b.target))&&(Pa(x)&&b.preventDefault(),o.props&&"onClick"in o.props&&typeof o.props.onClick=="function"&&o.props.onClick(b),Pa(x))){let E=document.getElementById(x.htmlFor);if(E){let w=E.getAttribute("disabled");if(w==="true"||w==="")return;let S=E.getAttribute("aria-disabled");if(S==="true"||S==="")return;(Bl(E)&&(E.type==="file"||E.type==="radio"||E.type==="checkbox")||E.role==="radio"||E.role==="checkbox"||E.role==="switch")&&E.click(),E.focus({preventScroll:!0})}}}),h=a||!1,y=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),Pe()({ourProps:g,theirProps:u,slot:y,defaultTag:l?zd:"div",name:o.name||"Label"})}let Ud=we(Hd),Bd=Object.assign(Ud,{}),Wd=d.createContext(()=>{});function qd({value:e,children:t}){return d.createElement(Wd.Provider,{value:e},t)}let Xl=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 Vd=Object.defineProperty,Gd=(e,t,n)=>t in e?Vd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Yd=(e,t,n)=>(Gd(e,t+"",n),n),Jl=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Ie=(e,t,n)=>(Jl(e,t,"read from private field"),n?n.call(e):t.get(e)),yo=(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)},ka=(e,t,n,r)=>(Jl(e,t,"write to private field"),t.set(e,n),n),Be,Dn,jn;let Kd=class{constructor(t){yo(this,Be,{}),yo(this,Dn,new Xl(()=>new Set)),yo(this,jn,new Set),Yd(this,"disposables",ut()),ka(this,Be,t)}dispose(){this.disposables.dispose()}get state(){return Ie(this,Be)}subscribe(t,n){let r={selector:t,callback:n,current:t(Ie(this,Be))};return Ie(this,jn).add(r),this.disposables.add(()=>{Ie(this,jn).delete(r)})}on(t,n){return Ie(this,Dn).get(t).add(n),this.disposables.add(()=>{Ie(this,Dn).get(t).delete(n)})}send(t){let n=this.reduce(Ie(this,Be),t);if(n!==Ie(this,Be)){ka(this,Be,n);for(let r of Ie(this,jn)){let o=r.selector(Ie(this,Be));Zl(r.current,o)||(r.current=o,r.callback(o))}for(let r of Ie(this,Dn).get(t.type))r(Ie(this,Be),t)}}};Be=new WeakMap,Dn=new WeakMap,jn=new WeakMap;function Zl(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:vo(e[Symbol.iterator](),t[Symbol.iterator]()):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size!==t.size?!1:vo(e.entries(),t.entries()):Aa(e)&&Aa(t)?vo(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()):!1}function vo(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 Aa(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}var Qd=Object.defineProperty,Xd=(e,t,n)=>t in e?Qd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ra=(e,t,n)=>(Xd(e,typeof t!="symbol"?t+"":t,n),n),Jd=(e=>(e[e.Push=0]="Push",e[e.Pop=1]="Pop",e))(Jd||{});let Zd={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}}},eh=class ec extends Kd{constructor(){super(...arguments),Ra(this,"actions",{push:t=>this.send({type:0,id:t}),pop:t=>this.send({type:1,id:t})}),Ra(this,"selectors",{isTop:(t,n)=>t.stack[t.stack.length-1]===n,inStack:(t,n)=>t.stack.includes(n)})}static new(){return new ec({stack:[]})}reduce(t,n){return st(n.type,Zd,t,n)}};const tc=new Xl(()=>eh.new());function th(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var vr={exports:{}},wo={};/**
|
|
4
|
+
`))}else{let p=u.props,h=p==null?void 0:p.className,v=typeof h=="function"?(...x)=>ls(h(...x),l.className):ls(h,l.className),g=v?{className:v}:{},b=jl(u.props,_t(bo(l,["ref"])));for(let x in f)x in b&&delete f[x];return d.cloneElement(u,Object.assign({},b,f,c,{ref:o(Td(u),c.ref)},g))}return d.createElement(s,Object.assign({},bo(l,["ref"]),s!==d.Fragment&&c,s!==d.Fragment&&f),u)}function Ed(){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 Cd(...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 jl(...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 Od(...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 xe(e){var t;return Object.assign(d.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function _t(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function bo(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function Td(e){return d.version.split(".")[0]>="19"?e.props.ref:e.ref}let Sd="span";var Xn=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Xn||{});function Pd(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 Pe()({ourProps:s,theirProps:o,slot:{},defaultTag:Sd,name:"Hidden"})}let Nr=xe(Pd),kd=d.createContext(null);function Ad(e){let[t,n]=d.useState(null);return d.createElement(kd.Provider,{value:{target:t}},e.children,d.createElement(Nr,{features:Xn.Hidden,ref:n}))}let zl=d.createContext(void 0);function Hl(){return d.useContext(zl)}function Rd({id:e,children:t}){return d.createElement(zl.Provider,{value:e},t)}function Ul(e){return typeof e!="object"||e===null?!1:"nodeType"in e}function tt(e){return Ul(e)&&"tagName"in e}function Rt(e){return tt(e)&&"accessKey"in e}function kt(e){return tt(e)&&"tabIndex"in e}function $d(e){return tt(e)&&"style"in e}function Fd(e){return Rt(e)&&e.nodeName==="IFRAME"}function Bl(e){return Rt(e)&&e.nodeName==="INPUT"}function Pa(e){return Rt(e)&&e.nodeName==="LABEL"}function Id(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 Wl=Symbol();function Md(e,t=!0){return Object.assign(e,{[Wl]:t})}function Ue(...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[Wl]))?void 0:n}let Vr=d.createContext(null);Vr.displayName="DescriptionContext";function ql(){let e=d.useContext(Vr);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,ql),t}return e}function Nd(){var e,t;return(t=(e=d.useContext(Vr))==null?void 0:e.value)!=null?t:void 0}function Vl(){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(Vr.Provider,{value:o},n.children)},[t])]}let Ld="p";function _d(e,t){let n=d.useId(),r=qr(),{id:o=`headlessui-description-${n}`,...s}=e,a=ql(),i=Ue(t);we(()=>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 Pe()({ourProps:u,theirProps:s,slot:c,defaultTag:Ld,name:a.name||"Description"})}let Dd=xe(_d),Gl=Object.assign(Dd,{});var Yl=(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))(Yl||{});let Gr=d.createContext(null);Gr.displayName="LabelContext";function Kl(){let e=d.useContext(Gr);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,Kl),t}return e}function Ql(e){var t,n,r;let o=(n=(t=d.useContext(Gr))==null?void 0:t.value)!=null?n:void 0;return((r=void 0)!=null?r:0)>0?[o,...e].filter(Boolean).join(" "):o}function jd({inherit:e=!1}={}){let t=Ql(),[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(Gr.Provider,{value:i},s.children)},[r])]}let zd="label";function Hd(e,t){var n;let r=d.useId(),o=Kl(),s=Hl(),a=qr(),{id:i=`headlessui-label-${r}`,htmlFor:l=s??((n=o.props)==null?void 0:n.htmlFor),passive:c=!1,...u}=e,f=Ue(t);we(()=>o.register(i),[i,o.register]);let p=ce(b=>{let x=b.currentTarget;if(!(b.target!==b.currentTarget&&Id(b.target))&&(Pa(x)&&b.preventDefault(),o.props&&"onClick"in o.props&&typeof o.props.onClick=="function"&&o.props.onClick(b),Pa(x))){let E=document.getElementById(x.htmlFor);if(E){let w=E.getAttribute("disabled");if(w==="true"||w==="")return;let O=E.getAttribute("aria-disabled");if(O==="true"||O==="")return;(Bl(E)&&(E.type==="file"||E.type==="radio"||E.type==="checkbox")||E.role==="radio"||E.role==="checkbox"||E.role==="switch")&&E.click(),E.focus({preventScroll:!0})}}}),h=a||!1,v=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),Pe()({ourProps:g,theirProps:u,slot:v,defaultTag:l?zd:"div",name:o.name||"Label"})}let Ud=xe(Hd),Bd=Object.assign(Ud,{}),Wd=d.createContext(()=>{});function qd({value:e,children:t}){return d.createElement(Wd.Provider,{value:e},t)}let Xl=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 Vd=Object.defineProperty,Gd=(e,t,n)=>t in e?Vd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Yd=(e,t,n)=>(Gd(e,t+"",n),n),Jl=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Ie=(e,t,n)=>(Jl(e,t,"read from private field"),n?n.call(e):t.get(e)),vo=(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)},ka=(e,t,n,r)=>(Jl(e,t,"write to private field"),t.set(e,n),n),Be,Dn,jn;let Kd=class{constructor(t){vo(this,Be,{}),vo(this,Dn,new Xl(()=>new Set)),vo(this,jn,new Set),Yd(this,"disposables",ut()),ka(this,Be,t)}dispose(){this.disposables.dispose()}get state(){return Ie(this,Be)}subscribe(t,n){let r={selector:t,callback:n,current:t(Ie(this,Be))};return Ie(this,jn).add(r),this.disposables.add(()=>{Ie(this,jn).delete(r)})}on(t,n){return Ie(this,Dn).get(t).add(n),this.disposables.add(()=>{Ie(this,Dn).get(t).delete(n)})}send(t){let n=this.reduce(Ie(this,Be),t);if(n!==Ie(this,Be)){ka(this,Be,n);for(let r of Ie(this,jn)){let o=r.selector(Ie(this,Be));Zl(r.current,o)||(r.current=o,r.callback(o))}for(let r of Ie(this,Dn).get(t.type))r(Ie(this,Be),t)}}};Be=new WeakMap,Dn=new WeakMap,jn=new WeakMap;function Zl(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:yo(e[Symbol.iterator](),t[Symbol.iterator]()):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size!==t.size?!1:yo(e.entries(),t.entries()):Aa(e)&&Aa(t)?yo(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()):!1}function yo(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 Aa(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}var Qd=Object.defineProperty,Xd=(e,t,n)=>t in e?Qd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ra=(e,t,n)=>(Xd(e,typeof t!="symbol"?t+"":t,n),n),Jd=(e=>(e[e.Push=0]="Push",e[e.Pop=1]="Pop",e))(Jd||{});let Zd={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}}},eh=class ec extends Kd{constructor(){super(...arguments),Ra(this,"actions",{push:t=>this.send({type:0,id:t}),pop:t=>this.send({type:1,id:t})}),Ra(this,"selectors",{isTop:(t,n)=>t.stack[t.stack.length-1]===n,inStack:(t,n)=>t.stack.includes(n)})}static new(){return new ec({stack:[]})}reduce(t,n){return st(n.type,Zd,t,n)}};const tc=new Xl(()=>eh.new());function th(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var yr={exports:{}},wo={};/**
|
|
5
5
|
* @license React
|
|
6
6
|
* use-sync-external-store-with-selector.production.js
|
|
7
7
|
*
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* This source code is licensed under the MIT license found in the
|
|
11
11
|
* LICENSE file in the root directory of this source tree.
|
|
12
|
-
*/var $a;function nh(){if($a)return wo;$a=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 wo.useSyncExternalStoreWithSelector=function(l,c,u,f,p){var h=o(null);if(h.current===null){var
|
|
12
|
+
*/var $a;function nh(){if($a)return wo;$a=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 wo.useSyncExternalStoreWithSelector=function(l,c,u,f,p){var h=o(null);if(h.current===null){var v={hasValue:!1,value:null};h.current=v}else v=h.current;h=a(function(){function b(y){if(!x){if(x=!0,E=y,y=f(y),p!==void 0&&v.hasValue){var N=v.value;if(p(N,y))return w=N}return w=y}if(N=w,n(E,y))return N;var q=f(y);return p!==void 0&&p(N,q)?(E=y,N):(E=y,w=q)}var x=!1,E,w,O=u===void 0?null:u;return[function(){return b(c())},O===null?void 0:function(){return b(O())}]},[c,u,f,p]);var g=r(l,h[0],h[1]);return s(function(){v.hasValue=!0,v.value=g},[g]),i(g),g},wo}var xo={};/**
|
|
13
13
|
* @license React
|
|
14
14
|
* use-sync-external-store-with-selector.development.js
|
|
15
15
|
*
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
*
|
|
18
18
|
* This source code is licensed under the MIT license found in the
|
|
19
19
|
* LICENSE file in the root directory of this source tree.
|
|
20
|
-
*/var Fa;function rh(){return Fa||(Fa=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;xo.useSyncExternalStoreWithSelector=function(l,c,u,f,p){var h=o(null);if(h.current===null){var y={hasValue:!1,value:null};h.current=y}else y=h.current;h=a(function(){function b(v){if(!x){if(x=!0,E=v,v=f(v),p!==void 0&&y.hasValue){var N=y.value;if(p(N,v))return w=N}return w=v}if(N=w,n(E,v))return N;var q=f(v);return p!==void 0&&p(N,q)?(E=v,N):(E=v,w=q)}var x=!1,E,w,S=u===void 0?null:u;return[function(){return b(c())},S===null?void 0:function(){return b(S())}]},[c,u,f,p]);var g=r(l,h[0],h[1]);return s(function(){y.hasValue=!0,y.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())}()),xo}var Ia;function oh(){return Ia||(Ia=1,process.env.NODE_ENV==="production"?vr.exports=nh():vr.exports=rh()),vr.exports}var sh=oh();function nc(e,t,n=Zl){return sh.useSyncExternalStoreWithSelector(ce(r=>e.subscribe(ah,r)),ce(()=>e.state),ce(()=>e.state),ce(t),n)}function ah(e){return e}function lr(e,t){let n=d.useId(),r=tc.get(t),[o,s]=nc(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 cs=new Map,Wn=new Map;function Ma(e){var t;let n=(t=Wn.get(e))!=null?t:0;return Wn.set(e,n+1),n!==0?()=>Na(e):(cs.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>Na(e))}function Na(e){var t;let n=(t=Wn.get(e))!=null?t:1;if(n===1?Wn.delete(e):Wn.set(e,n-1),n!==1)return;let r=cs.get(e);r&&(r["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,cs.delete(e))}function ih(e,{allowed:t,disallowed:n}={}){let r=lr(e,"inert-others");ve(()=>{var o,s;if(!r)return;let a=ut();for(let l of(o=n==null?void 0:n())!=null?o:[])l&&a.add(Ma(l));let i=(s=t==null?void 0:t())!=null?s:[];for(let l of i){if(!l)continue;let c=Br(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(Ma(f));u=u.parentElement}}return a.dispose},[r,t,n])}function lh(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:Rt(t)?t:t.current;if(!o)return;let s=ut();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 Lr=["[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(","),ch=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var et=(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))(et||{}),us=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(us||{}),uh=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(uh||{});function fh(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Lr)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}function dh(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(ch)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var rc=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(rc||{});function hh(e,t=0){var n;return e===((n=Br(e))==null?void 0:n.body)?!1:st(t,{0(){return e.matches(Lr)},1(){let r=e;for(;r!==null;){if(r.matches(Lr))return!0;r=r.parentElement}return!1}})}var ph=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(ph||{});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 mh=["textarea","input"].join(",");function gh(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,mh))!=null?n:!1}function bh(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 qn(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?bh(e):e:t&64?dh(e):fh(e);o.length>0&&a.length>1&&(a=a.filter(h=>!o.some(y=>y!=null&&"current"in y?(y==null?void 0:y.current)===h:y===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&&gh(p)&&p.select(),2}function oc(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function yh(){return/Android/gi.test(window.navigator.userAgent)}function La(){return oc()||yh()}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 sc(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 _a=30;function vh(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!hh(c,rc.Loose)&&c.tabIndex!==-1&&i.preventDefault(),r.current(i,c)},[r,t]),s=d.useRef(null);wr(e,"pointerdown",i=>{var l,c;La()||(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(La()||!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)>=_a||Math.abs(l.y-a.current.y)>=_a))return o(i,()=>kt(i.target)?i.target:null)},!0),sc(e,"blur",i=>o(i,()=>Fd(window.document.activeElement)?window.document.activeElement:null),!0)}function Yr(...e){return d.useMemo(()=>Br(...e),[...e])}function ac(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 wh(e){return d.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}function xh(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 Eh(){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 Ch(){return oc()?{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=ut();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(kt(i.target))try{let l=i.target.closest("a");if(!l)return;let{hash:c}=new URL(l.href),u=e.querySelector(c);kt(u)&&!r(u)&&(a=u)}catch{}},!0),t.addEventListener(e,"touchstart",i=>{if(kt(i.target)&&$d(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(kt(i.target)){if(Bl(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 Sh(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function Th(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let zt=xh(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:ut(),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:Th(n)},o=[Ch(),Eh(),Sh()];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 Oh(e,t,n=()=>({containers:[]})){let r=wh(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 Ph(e,t,n=()=>[document.body]){let r=lr(e,"scroll-lock");Oh(r,t,o=>{var s;return{containers:[...(s=o.containers)!=null?s:[],n]}})}function kh(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 Da,ja;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((Da=process==null?void 0:process.env)==null?void 0:Da.NODE_ENV)==="test"&&typeof((ja=Element==null?void 0:Element.prototype)==null?void 0:ja.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 Ah=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(Ah||{});function Rh(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function $h(e,t,n,r){let[o,s]=d.useState(n),{hasFlag:a,addFlag:i,removeFlag:l}=kh(e&&o?3:0),c=d.useRef(!1),u=d.useRef(!1),f=Vs();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),Fh(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 Fh(e,{prepare:t,run:n,done:r,inFlight:o}){let s=ut();return Mh(e,{prepare:t,inFlight:o}),s.nextFrame(()=>{n(),s.requestAnimationFrame(()=>{s.add(Ih(e,r))})}),s.dispose}function Ih(e,t){var n,r;let o=ut();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 Mh(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 Gs(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 Kr(){return typeof window<"u"}function In(e){return ic(e)?(e.nodeName||"").toLowerCase():"#document"}function Re(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ft(e){var t;return(t=(ic(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ic(e){return Kr()?e instanceof Node||e instanceof Re(e).Node:!1}function me(e){return Kr()?e instanceof Element||e instanceof Re(e).Element:!1}function He(e){return Kr()?e instanceof HTMLElement||e instanceof Re(e).HTMLElement:!1}function fs(e){return!Kr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Re(e).ShadowRoot}function cr(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 Nh(e){return["table","td","th"].includes(In(e))}function Qr(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ys(e){const t=Xr(),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 Lh(e){let t=at(e);for(;He(t)&&!rt(t);){if(Ys(t))return t;if(Qr(t))return null;t=at(t)}return null}function Xr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function rt(e){return["html","body","#document"].includes(In(e))}function Le(e){return Re(e).getComputedStyle(e)}function Jr(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||fs(e)&&e.host||ft(e);return fs(t)?t.host:t}function lc(e){const t=at(e);return rt(t)?e.ownerDocument?e.ownerDocument.body:e.body:He(t)&&cr(t)?t:lc(t)}function dn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=lc(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),a=Re(o);if(s){const i=ds(a);return t.concat(a,a.visualViewport||[],cr(o)?o:[],i&&n?dn(i):[])}return t.concat(o,dn(o,[],n))}function ds(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const za=Math.min,Vn=Math.max,_r=Math.round,Ke=e=>({x:e,y:e});function cc(e){return e.split("-")[0]}function _h(e){return e.split("-")[1]}function Dh(e){return e==="x"?"y":"x"}function jh(e){return e==="y"?"height":"width"}function uc(e){return["top","bottom"].includes(cc(e))?"y":"x"}function zh(e){return Dh(uc(e))}function fc(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 Ha(e,t,n){let{reference:r,floating:o}=e;const s=uc(t),a=zh(t),i=jh(a),l=cc(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(_h(t)){case"start":h[a]-=p*(n&&c?-1:1);break;case"end":h[a]+=p*(n&&c?-1:1);break}return h}const Hh=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}=Ha(c,r,l),p=r,h={},y=0;for(let g=0;g<i.length;g++){const{name:b,fn:x}=i[g],{x:E,y:w,data:S,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=E??u,f=w??f,h={...h,[b]:{...h[b],...S}},v&&y<=50&&(y++,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}=Ha(c,p,l)),g=-1)}return{x:u,y:f,placement:p,strategy:o,middlewareData:h}};function dc(e){const t=Le(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=He(e),s=o?e.offsetWidth:n,a=o?e.offsetHeight:r,i=_r(n)!==s||_r(r)!==a;return i&&(n=s,r=a),{width:n,height:r,$:i}}function hc(e){return me(e)?e:e.contextElement}function hn(e){const t=hc(e);if(!He(t))return Ke(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=dc(t);let a=(s?_r(n.width):n.width)/r,i=(s?_r(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const Uh=Ke(0);function pc(e){const t=Re(e);return!Xr()||!t.visualViewport?Uh:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Bh(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Re(e)?!1:t}function Jn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=hc(e);let a=Ke(1);t&&(r?me(r)&&(a=hn(r)):a=hn(e));const i=Bh(s,n,r)?pc(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=Re(s),h=r&&me(r)?Re(r):r;let y=p,g=ds(y);for(;g&&r&&h!==y;){const b=hn(g),x=g.getBoundingClientRect(),E=Le(g),w=x.left+(g.clientLeft+parseFloat(E.paddingLeft))*b.x,S=x.top+(g.clientTop+parseFloat(E.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,f*=b.y,l+=w,c+=S,y=Re(g),g=ds(y)}}return fc({width:u,height:f,x:l,y:c})}function Ks(e,t){const n=Jr(e).scrollLeft;return t?t.left+n:Jn(ft(e)).left+n}function mc(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Ks(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function Wh(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",a=ft(r),i=t?Qr(t.floating):!1;if(r===a||i&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Ke(1);const u=Ke(0),f=He(r);if((f||!f&&!s)&&((In(r)!=="body"||cr(a))&&(l=Jr(r)),He(r))){const h=Jn(r);c=hn(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}const p=a&&!f&&!s?mc(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 qh(e){return Array.from(e.getClientRects())}function Vh(e){const t=ft(e),n=Jr(e),r=e.ownerDocument.body,o=Vn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Vn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Ks(e);const i=-n.scrollTop;return Le(r).direction==="rtl"&&(a+=Vn(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:a,y:i}}function Gh(e,t){const n=Re(e),r=ft(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=Xr();(!c||c&&t==="fixed")&&(i=o.offsetLeft,l=o.offsetTop)}return{width:s,height:a,x:i,y:l}}function Yh(e,t){const n=Jn(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=He(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 Ua(e,t,n){let r;if(t==="viewport")r=Gh(e,n);else if(t==="document")r=Vh(ft(e));else if(me(t))r=Yh(t,n);else{const o=pc(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return fc(r)}function gc(e,t){const n=at(e);return n===t||!me(n)||rt(n)?!1:Le(n).position==="fixed"||gc(n,t)}function Kh(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)&&!rt(a);){const i=Le(a),l=Ys(a);!l&&i.position==="fixed"&&(o=null),(s?!l&&!o:!l&&i.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||cr(a)&&!l&&gc(e,a))?r=r.filter(u=>u!==a):o=i,a=at(a)}return t.set(e,r),r}function Qh(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Qr(t)?[]:Kh(t,this._c):[].concat(n),r],i=a[0],l=a.reduce((c,u)=>{const f=Ua(t,u,o);return c.top=Vn(f.top,c.top),c.right=za(f.right,c.right),c.bottom=za(f.bottom,c.bottom),c.left=Vn(f.left,c.left),c},Ua(t,i,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Xh(e){const{width:t,height:n}=dc(e);return{width:t,height:n}}function Jh(e,t,n){const r=He(t),o=ft(t),s=n==="fixed",a=Jn(e,!0,s,t);let i={scrollLeft:0,scrollTop:0};const l=Ke(0);function c(){l.x=Ks(o)}if(r||!r&&!s)if((In(t)!=="body"||cr(o))&&(i=Jr(t)),r){const h=Jn(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?mc(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 Eo(e){return Le(e).position==="static"}function Ba(e,t){if(!He(e)||Le(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ft(e)===n&&(n=n.ownerDocument.body),n}function bc(e,t){const n=Re(e);if(Qr(e))return n;if(!He(e)){let o=at(e);for(;o&&!rt(o);){if(me(o)&&!Eo(o))return o;o=at(o)}return n}let r=Ba(e,t);for(;r&&Nh(r)&&Eo(r);)r=Ba(r,t);return r&&rt(r)&&Eo(r)&&!Ys(r)?n:r||Lh(e)||n}const Zh=async function(e){const t=this.getOffsetParent||bc,n=this.getDimensions,r=await n(e.floating);return{reference:Jh(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ep(e){return Le(e).direction==="rtl"}const tp={convertOffsetParentRelativeRectToViewportRelativeRect:Wh,getDocumentElement:ft,getClippingRect:Qh,getOffsetParent:bc,getElementRects:Zh,getClientRects:qh,getDimensions:Xh,getScale:hn,isElement:me,isRTL:ep},np=(e,t,n)=>{const r=new Map,o={platform:tp,...n},s={...o.platform,_c:r};return Hh(e,t,{...o,platform:s})};var rp=typeof document<"u",op=function(){},Or=rp?d.useLayoutEffect:op;function Dr(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(!Dr(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)&&!Dr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function yc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Wa(e,t){const n=yc(e);return Math.round(t*n)/n}function Co(e){const t=F.useRef(e);return Or(()=>{t.current=e}),t}function sp(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);Dr(p,r)||h(r);const[y,g]=F.useState(null),[b,x]=F.useState(null),E=F.useCallback(P=>{P!==N.current&&(N.current=P,g(P))},[]),w=F.useCallback(P=>{P!==q.current&&(q.current=P,x(P))},[]),S=s||y,v=a||b,N=F.useRef(null),q=F.useRef(null),R=F.useRef(u),B=l!=null,G=Co(l),le=Co(o),ue=Co(c),oe=F.useCallback(()=>{if(!N.current||!q.current)return;const P={placement:t,strategy:n,middleware:p};le.current&&(P.platform=le.current),np(N.current,q.current,P).then(V=>{const C={...V,isPositioned:ue.current!==!1};fe.current&&!Dr(R.current,C)&&(R.current=C,Pu.flushSync(()=>{f(C)}))})},[p,t,n,le,ue]);Or(()=>{c===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(P=>({...P,isPositioned:!1})))},[c]);const fe=F.useRef(!1);Or(()=>(fe.current=!0,()=>{fe.current=!1}),[]),Or(()=>{if(S&&(N.current=S),v&&(q.current=v),S&&v){if(G.current)return G.current(S,v,oe);oe()}},[S,v,oe,G,B]);const W=F.useMemo(()=>({reference:N,floating:q,setReference:E,setFloating:w}),[E,w]),Y=F.useMemo(()=>({reference:S,floating:v}),[S,v]),ne=F.useMemo(()=>{const P={position:n,left:0,top:0};if(!Y.floating)return P;const V=Wa(Y.floating,u.x),C=Wa(Y.floating,u.y);return i?{...P,transform:"translate("+V+"px, "+C+"px)",...yc(Y.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:C}},[n,i,Y.floating,u.x,u.y]);return F.useMemo(()=>({...u,update:oe,refs:W,elements:Y,floatingStyles:ne}),[u,oe,W,Y,ne])}let Zr=d.createContext(null);Zr.displayName="OpenClosedContext";var ze=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ze||{});function eo(){return d.useContext(Zr)}function ap({value:e,children:t}){return d.createElement(Zr.Provider,{value:e},t)}function ip({children:e}){return d.createElement(Zr.Provider,{value:null},e)}function lp(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let gt=[];lp(()=>{function e(t){if(!kt(t.target)||t.target===document.body||gt[0]===t.target)return;let n=t.target;n=n.closest(Lr),gt.unshift(n??t.target),gt=gt.filter(r=>r!=null&&r.isConnected),gt.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 vc(e){let t=ce(e),n=d.useRef(!1);d.useEffect(()=>(n.current=!1,()=>{n.current=!0,Wr(()=>{n.current&&t()})}),[t])}function cp(){let e=typeof document>"u";return"useSyncExternalStore"in F?(t=>t.useSyncExternalStore)(F)(()=>()=>{},()=>!1,()=>!e):!1}function ur(){let e=cp(),[t,n]=F.useState(Qt.isHandoffComplete);return t&&Qt.isHandoffComplete===!1&&n(!1),F.useEffect(()=>{t!==!0&&n(!0)},[t]),F.useEffect(()=>Qt.handoff(),[]),e?!1:t}let wc=d.createContext(!1);function up(){return d.useContext(wc)}function qa(e){return d.createElement(wc.Provider,{value:e.force},e.children)}function fp(e){let t=up(),n=d.useContext(Ec),[r,o]=d.useState(()=>{var s;if(!t&&n!==null)return(s=n.current)!=null?s:null;if(Qt.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 xc=d.Fragment,dp=we(function(e,t){let{ownerDocument:n=null,...r}=e,o=d.useRef(null),s=Ue(Md(h=>{o.current=h}),t),a=Yr(o),i=n??a,l=fp(i),[c]=d.useState(()=>{var h;return Qt.isServer?null:(h=i==null?void 0:i.createElement("div"))!=null?h:null}),u=d.useContext(hs),f=ur();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]),vc(()=>{var h;!l||!c||(Ul(c)&&l.contains(c)&&l.removeChild(c),l.childNodes.length<=0&&((h=l.parentElement)==null||h.removeChild(l)))});let p=Pe();return f?!l||!c?null:Xi.createPortal(p({ourProps:{ref:s},theirProps:r,slot:{},defaultTag:xc,name:"Portal"}),c):null});function hp(e,t){let n=Ue(t),{enabled:r=!0,ownerDocument:o,...s}=e,a=Pe();return r?d.createElement(dp,{...s,ownerDocument:o,ref:n}):a({ourProps:{ref:n},theirProps:s,slot:{},defaultTag:xc,name:"Portal"})}let pp=d.Fragment,Ec=d.createContext(null);function mp(e,t){let{target:n,...r}=e,o={ref:Ue(t)},s=Pe();return d.createElement(Ec.Provider,{value:n},s({ourProps:o,theirProps:r,defaultTag:pp,name:"Popover.Group"}))}let hs=d.createContext(null);function gp(){let e=d.useContext(hs),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(hs.Provider,{value:o},s)},[o])]}let bp=we(hp),Cc=we(mp),yp=Object.assign(bp,{Group:Cc});function vp(e,t=typeof document<"u"?document.defaultView:null,n){let r=lr(e,"escape");ac(t,"keydown",o=>{r&&(o.defaultPrevented||o.key===Yl.Escape&&n(o))})}function wp(){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 xp({defaultContainers:e=[],portals:t,mainTreeNode:n}={}){let r=Yr(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 Sc=d.createContext(null);function Va({children:e,node:t}){let[n,r]=d.useState(null),o=Tc(t??n);return d.createElement(Sc.Provider,{value:o},e,o===null&&d.createElement(Nr,{features:Xn.Hidden,ref:s=>{var a,i;if(s){for(let l of(i=(a=Br(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 Tc(e=null){var t;return(t=d.useContext(Sc))!=null?t:e}function Qs(){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 Ep(){let e=d.useRef(0);return sc(!0,"keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function Oc(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 Cp="div";var Dt=(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))(Dt||{});function Sp(e,t){let n=d.useRef(null),r=Ue(n,t),{initialFocus:o,initialFocusFallback:s,containers:a,features:i=15,...l}=e;ur()||(i=0);let c=Yr(n);kp(i,{ownerDocument:c});let u=Ap(i,{ownerDocument:c,container:n,initialFocus:o,initialFocusFallback:s});Rp(i,{ownerDocument:c,container:n,containers:a,previousActiveElement:u});let f=Ep(),p=ce(E=>{if(!Rt(n.current))return;let w=n.current;(S=>S())(()=>{st(f.current,{[zn.Forwards]:()=>{qn(w,et.First,{skipElements:[E.relatedTarget,s]})},[zn.Backwards]:()=>{qn(w,et.Last,{skipElements:[E.relatedTarget,s]})}})})}),h=lr(!!(i&2),"focus-trap#tab-lock"),y=Vs(),g=d.useRef(!1),b={ref:r,onKeyDown(E){E.key=="Tab"&&(g.current=!0,y.requestAnimationFrame(()=>{g.current=!1}))},onBlur(E){if(!(i&4))return;let w=Oc(a);Rt(n.current)&&w.add(n.current);let S=E.relatedTarget;kt(S)&&S.dataset.headlessuiFocusGuard!=="true"&&(Pc(w,S)||(g.current?qn(n.current,st(f.current,{[zn.Forwards]:()=>et.Next,[zn.Backwards]:()=>et.Previous})|et.WrapAround,{relativeTo:E.target}):kt(E.target)&&nt(E.target)))}},x=Pe();return d.createElement(d.Fragment,null,h&&d.createElement(Nr,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:Xn.Focusable}),x({ourProps:b,theirProps:l,defaultTag:Cp,name:"FocusTrap"}),h&&d.createElement(Nr,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:Xn.Focusable}))}let Tp=we(Sp),Op=Object.assign(Tp,{features:Dt});function Pp(e=!0){let t=d.useRef(gt.slice());return Gs(([n],[r])=>{r===!0&&n===!1&&Wr(()=>{t.current.splice(0)}),r===!1&&n===!0&&(t.current=gt.slice())},[e,gt,t]),ce(()=>{var n;return(n=t.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function kp(e,{ownerDocument:t}){let n=!!(e&8),r=Pp(n);Gs(()=>{n||(t==null?void 0:t.activeElement)===(t==null?void 0:t.body)&&nt(r())},[n]),vc(()=>{n&&nt(r())})}function Ap(e,{ownerDocument:t,container:n,initialFocus:r,initialFocusFallback:o}){let s=d.useRef(null),a=lr(!!(e&1),"focus-trap#initial-focus"),i=Qs();return Gs(()=>{if(e===0)return;if(!a){o!=null&&o.current&&nt(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)nt(r.current);else{if(e&16){if(qn(l,et.First|et.AutoFocus)!==us.Error)return}else if(qn(l,et.First)!==us.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 Rp(e,{ownerDocument:t,container:n,containers:r,previousActiveElement:o}){let s=Qs(),a=!!(e&4);ac(t==null?void 0:t.defaultView,"focus",i=>{if(!a||!s.current)return;let l=Oc(r);Rt(n.current)&&l.add(n.current);let c=o.current;if(!c)return;let u=i.target;Rt(u)?Pc(l,u)?(o.current=u,nt(u)):(i.preventDefault(),i.stopPropagation(),nt(c)):nt(o.current)},!0)}function Pc(e,t){for(let n of e)if(n.contains(t))return!0;return!1}function kc(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:Rc)!==d.Fragment||d.Children.count(e.children)===1}let to=d.createContext(null);to.displayName="TransitionContext";var $p=(e=>(e.Visible="visible",e.Hidden="hidden",e))($p||{});function Fp(){let e=d.useContext(to);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function Ip(){let e=d.useContext(no);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let no=d.createContext(null);no.displayName="NestingContext";function ro(e){return"children"in e?ro(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function Ac(e,t){let n=nn(e),r=d.useRef([]),o=Qs(),s=Vs(),a=ce((h,y=Pt.Hidden)=>{let g=r.current.findIndex(({el:b})=>b===h);g!==-1&&(st(y,{[Pt.Unmount](){r.current.splice(g,1)},[Pt.Hidden](){r.current[g].state="hidden"}}),s.microTask(()=>{var b;!ro(r)&&o.current&&((b=n.current)==null||b.call(n))}))}),i=ce(h=>{let y=r.current.find(({el:g})=>g===h);return y?y.state!=="visible"&&(y.state="visible"):r.current.push({el:h,state:"visible"}),()=>a(h,Pt.Unmount)}),l=d.useRef([]),c=d.useRef(Promise.resolve()),u=d.useRef({enter:[],leave:[]}),f=ce((h,y,g)=>{l.current.splice(0),t&&(t.chains.current[y]=t.chains.current[y].filter(([b])=>b!==h)),t==null||t.chains.current[y].push([h,new Promise(b=>{l.current.push(b)})]),t==null||t.chains.current[y].push([h,new Promise(b=>{Promise.all(u.current[y].map(([x,E])=>E)).then(()=>b())})]),y==="enter"?c.current=c.current.then(()=>t==null?void 0:t.wait.current).then(()=>g(y)):g(y)}),p=ce((h,y,g)=>{Promise.all(u.current[y].splice(0).map(([b,x])=>x)).then(()=>{var b;(b=l.current.shift())==null||b()}).then(()=>g(y))});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 Rc=d.Fragment,$c=Mr.RenderStrategy;function Mp(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:y,leaveTo:g,...b}=e,[x,E]=d.useState(null),w=d.useRef(null),S=kc(e),v=Ue(...S?[w,t,E]:t===null?[]:[t]),N=(n=b.unmount)==null||n?Pt.Unmount:Pt.Hidden,{show:q,appear:R,initial:B}=Fp(),[G,le]=d.useState(q?"visible":"hidden"),ue=Ip(),{register:oe,unregister:fe}=ue;ve(()=>oe(w),[oe,w]),ve(()=>{if(N===Pt.Hidden&&w.current){if(q&&G!=="visible"){le("visible");return}return st(G,{hidden:()=>fe(w),visible:()=>oe(w)})}},[G,w,oe,fe,q,N]);let W=ur();ve(()=>{if(S&&W&&G==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,G,W,S]);let Y=B&&!R,ne=R&&q&&B,P=d.useRef(!1),V=Ac(()=>{P.current||(le("hidden"),fe(w))},ue),C=ce(I=>{P.current=!0;let Q=I?"enter":"leave";V.onStart(w,Q,X=>{X==="enter"?s==null||s():X==="leave"&&(i==null||i())})}),k=ce(I=>{let Q=I?"enter":"leave";P.current=!1,V.onStop(w,Q,X=>{X==="enter"?a==null||a():X==="leave"&&(l==null||l())}),Q==="leave"&&!ro(V)&&(le("hidden"),fe(w))});d.useEffect(()=>{S&&o||(C(q),k(q))},[q,S,o]);let U=!(!o||!S||!W||Y),[,A]=$h(U,x,q,{start:C,end:k}),D=_t({ref:v,className:((r=ls(b.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&&y,A.leave&&A.closed&&g,!A.transition&&q&&p))==null?void 0:r.trim())||void 0,...Rh(A)}),K=0;G==="visible"&&(K|=ze.Open),G==="hidden"&&(K|=ze.Closed),q&&G==="hidden"&&(K|=ze.Opening),!q&&G==="visible"&&(K|=ze.Closing);let z=Pe();return d.createElement(no.Provider,{value:V},d.createElement(ap,{value:K},z({ourProps:D,theirProps:b,defaultTag:Rc,features:$c,visible:G==="visible",name:"Transition.Child"})))}function Np(e,t){let{show:n,appear:r=!1,unmount:o=!0,...s}=e,a=d.useRef(null),i=kc(e),l=Ue(...i?[a,t]:t===null?[]:[t]);ur();let c=eo();if(n===void 0&&c!==null&&(n=(c&ze.Open)===ze.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=Ac(()=>{n||f("hidden")}),[h,y]=d.useState(!0),g=d.useRef([n]);ve(()=>{h!==!1&&g.current[g.current.length-1]!==n&&(g.current.push(n),y(!1))},[g,n]);let b=d.useMemo(()=>({show:n,appear:r,initial:h}),[n,r,h]);ve(()=>{n?f("visible"):!ro(p)&&a.current!==null&&f("hidden")},[n,p]);let x={unmount:o},E=ce(()=>{var v;h&&y(!1),(v=e.beforeEnter)==null||v.call(e)}),w=ce(()=>{var v;h&&y(!1),(v=e.beforeLeave)==null||v.call(e)}),S=Pe();return d.createElement(no.Provider,{value:p},d.createElement(to.Provider,{value:b},S({ourProps:{...x,as:d.Fragment,children:d.createElement(Fc,{ref:l,...x,...s,beforeEnter:E,beforeLeave:w})},theirProps:{},defaultTag:d.Fragment,features:$c,visible:u==="visible",name:"Transition"})))}function Lp(e,t){let n=d.useContext(to)!==null,r=eo()!==null;return d.createElement(d.Fragment,null,!n&&r?d.createElement(ps,{ref:t,...e}):d.createElement(Fc,{ref:t,...e}))}let ps=we(Np),Fc=we(Mp),Xs=we(Lp),_p=Object.assign(ps,{Child:Xs,Root:ps});var Dp=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Dp||{}),jp=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(jp||{});let zp={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},Js=d.createContext(null);Js.displayName="DialogContext";function oo(e){let t=d.useContext(Js);if(t===null){let n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,oo),n}return t}function Hp(e,t){return st(t.type,zp,e,t)}let Ga=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=eo();o===void 0&&h!==null&&(o=(h&ze.Open)===ze.Open);let y=d.useRef(null),g=Ue(y,t),b=Yr(y),x=o?0:1,[E,w]=d.useReducer(Hp,{titleId:null,descriptionId:null,panelRef:d.createRef()}),S=ce(()=>s(!1)),v=ce(A=>w({type:0,id:A})),N=ur()?x===0:!1,[q,R]=gp(),B={get current(){var A;return(A=E.panelRef.current)!=null?A:y.current}},G=Tc(),{resolveContainers:le}=xp({mainTreeNode:G,portals:q,defaultContainers:[B]}),ue=h!==null?(h&ze.Closing)===ze.Closing:!1;ih(c||ue?!1:N,{allowed:ce(()=>{var A,D;return[(D=(A=y.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=tc.get(null);ve(()=>{if(N)return oe.actions.push(r),()=>oe.actions.pop(r)},[oe,r,N]);let fe=nc(oe,d.useCallback(A=>oe.selectors.isTop(A,r),[oe,r]));vh(fe,le,A=>{A.preventDefault(),S()}),vp(fe,b==null?void 0:b.defaultView,A=>{A.preventDefault(),A.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),S()}),Ph(c||ue?!1:N,b,le),lh(N,y,S);let[W,Y]=Vl(),ne=d.useMemo(()=>[{dialogState:x,close:S,setTitleId:v,unmount:u},E],[x,E,S,v,u]),P=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":E.titleId,"aria-describedby":W,unmount:u},C=!wp(),k=Dt.None;N&&!c&&(k|=Dt.RestoreFocus,k|=Dt.TabLock,l&&(k|=Dt.AutoFocus),C&&(k|=Dt.InitialFocus));let U=Pe();return d.createElement(ip,null,d.createElement(qa,{force:!0},d.createElement(yp,null,d.createElement(Js.Provider,{value:ne},d.createElement(Cc,{target:y},d.createElement(qa,{force:!1},d.createElement(Y,{slot:P},d.createElement(R,null,d.createElement(Op,{initialFocus:a,initialFocusFallback:y,containers:le,features:k},d.createElement(qd,{value:S},U({ourProps:V,theirProps:f,slot:P,defaultTag:Up,features:Bp,visible:x===0,name:"Dialog"})))))))))))}),Up="div",Bp=Mr.RenderStrategy|Mr.Static;function Wp(e,t){let{transition:n=!1,open:r,...o}=e,s=eo(),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(Va,null,d.createElement(_p,{show:r,transition:n,unmount:o.unmount},d.createElement(Ga,{ref:t,...o}))):d.createElement(Va,null,d.createElement(Ga,{ref:t,open:r,...o}))}let qp="div";function Vp(e,t){let n=d.useId(),{id:r=`headlessui-dialog-panel-${n}`,transition:o=!1,...s}=e,[{dialogState:a,unmount:i},l]=oo("Dialog.Panel"),c=Ue(t,l.panelRef),u=d.useMemo(()=>({open:a===0}),[a]),f=ce(b=>{b.stopPropagation()}),p={ref:c,id:r,onClick:f},h=o?Xs:d.Fragment,y=o?{unmount:i}:{},g=Pe();return d.createElement(h,{...y},g({ourProps:p,theirProps:s,slot:u,defaultTag:qp,name:"Dialog.Panel"}))}let Gp="div";function Yp(e,t){let{transition:n=!1,...r}=e,[{dialogState:o,unmount:s}]=oo("Dialog.Backdrop"),a=d.useMemo(()=>({open:o===0}),[o]),i={ref:t,"aria-hidden":!0},l=n?Xs:d.Fragment,c=n?{unmount:s}:{},u=Pe();return d.createElement(l,{...c},u({ourProps:i,theirProps:r,slot:a,defaultTag:Gp,name:"Dialog.Backdrop"}))}let Kp="h2";function Qp(e,t){let n=d.useId(),{id:r=`headlessui-dialog-title-${n}`,...o}=e,[{dialogState:s,setTitleId:a}]=oo("Dialog.Title"),i=Ue(t);d.useEffect(()=>(a(r),()=>a(null)),[r,a]);let l=d.useMemo(()=>({open:s===0}),[s]),c={ref:i,id:r};return Pe()({ourProps:c,theirProps:o,slot:l,defaultTag:Kp,name:"Dialog.Title"})}let Xp=we(Wp),Ic=we(Vp),Jp=we(Yp),Mc=we(Qp),Zp=Object.assign(Xp,{Panel:Ic,Title:Mc,Description:Gl}),em="div";function tm(e,t){let n=`headlessui-control-${d.useId()}`,[r,o]=jd(),[s,a]=Vl(),i=qr(),{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=Pe();return d.createElement(wd,{value:l},d.createElement(o,{value:r},d.createElement(a,{value:s},d.createElement(Rd,{id:n},p({ourProps:f,theirProps:{...c,children:d.createElement(Ad,null,typeof c.children=="function"?c.children(u):c.children)},slot:u,defaultTag:em,name:"Field"})))))}let nm=we(tm),rm="input";function om(e,t){let n=d.useId(),r=Hl(),o=qr(),{id:s=r||`headlessui-input-${n}`,disabled:a=o||!1,autoFocus:i=!1,invalid:l=!1,...c}=e,u=Ql(),f=Nd(),{isFocused:p,focusProps:h}=gd({autoFocus:i}),{isHovered:y,hoverProps:g}=md({isDisabled:a}),b=Sd({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:y,focus:p,autofocus:i}),[a,l,y,p,i]);return Pe()({ourProps:b,theirProps:c,slot:x,defaultTag:rm,name:"Input"})}let sm=we(om);const am="whitespace-nowrap font-normal flex items-center justify-center",im="focus:outline focus:outline-3 focus:outline-primary-500/[.3]",lm="disabled:opacity-15 disabled:pointer-events-none",Nc=e=>e==="grayLight"||e==="warning",Lc=(e,t)=>!t||t==="none"?"":e(),cm=(e,t)=>Lc(()=>{const n=e==="gray400"?"gray":e,r=Nc(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),um=e=>Lc(()=>{const t=Nc(e)?"text-black":"text-white";return e==="primary"?`bg-primary-600 ${t}`:e==="gray400"?`bg-gray-400 ${t}`:`bg-${e}-500 ${t}`},e),fm=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]||"",dm=(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]||"",hm=(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`}`,pm=(e,t)=>({solid:um(e),link:fm(e),linkHoverSolid:dm(e,t),outline:hm(e,t)}),mm={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"},gm={none:"",default:"rounded",pill:"rounded-pill"},bm=({active:e=!1,children:t,color:n="primary",size:r="normal",category:o="solid",className:s,type:a="button",rounded:i="default",style:l={},primaryColor:c,...u},f)=>{var w;const p=lm,h=/link/.test(o)?null:cm(n,e),y=im,g=mm[r],b=(w=pm(n,e))==null?void 0:w[o],x=fn(h,b),E=gm[i];return T.jsx("button",{...u,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",backgroundColor:c?c+"!important":void 0},type:a,ref:f,className:fn(am,y,p,g,x,E,s,"cursor-pointer"),children:t})},Zn=d.forwardRef(bm),ym=({isOpen:e,close:t,title:n,dismissOptions:r,confirmOptions:o,children:s})=>T.jsxs(Zp,{open:e,onClose:t,className:"relative z-50 transition duration-300 ease-out data-closed:opacity-0 confidence-ui",transition:!0,children:[T.jsx(Jp,{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(Ic,{className:"max-w-lg divide-y divide-gray-100 bg-white rounded-sm shadow-xl",children:[T.jsx(Mc,{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(Zn,{onClick:()=>{r.onClick(),t()},size:"small",color:"secondary",children:r.label}):T.jsx(T.Fragment,{}),o?T.jsx(Zn,{disabled:o.disabled,onClick:()=>{o.onClick(),t()},size:"small",color:"primary",children:o.label}):T.jsx(T.Fragment,{})]}):T.jsx(T.Fragment,{})]})})]}),vm=({type:e="text",className:t,label:n,description:r,...o})=>T.jsx("div",{className:"w-full max-w-md px-4",children:T.jsxs(nm,{children:[T.jsx(Bd,{className:"font-medium text-gray-900",children:n}),r&&T.jsx(Gl,{className:"text-sm text-secondary",children:r}),T.jsx(sm,{type:e,className:Ee("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})]})}),wm=({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(ym,{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(vm,{label:"Email",disabled:a,description:"Enter the email address to initiate the playbook.",onChange:c=>s(c.target.value)})})})},_c=({btnClassName:e,buttonNode:t,size:n,playbookId:r,onInitiated:o,disabled:s,btnLabel:a="Run Playbook"})=>{const[i,l]=d.useState(!1);function c(){l(!0)}function u(){l(!1)}const f=async p=>{const{playbookInstanceId:h,errorCode:y,details:g,message:b}=await ml({bank:"public-sdk",email:p,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone||"America/Los_Angeles",playbookUid:r})||{};if(y)throw new Error(`Error initiating playbook: ${b} (Code: ${y}) - Details: ${g}`);o(h)};return T.jsxs(T.Fragment,{children:[t?{buttonNode:t}:T.jsx(Zn,{onClick:c,className:e,color:"primary",size:n,disabled:s,children:a}),T.jsx(wm,{isOpen:i,onClose:u,onConfirm:async p=>{await f(p),u()}})]})};/*!
|
|
20
|
+
*/var Fa;function rh(){return Fa||(Fa=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;xo.useSyncExternalStoreWithSelector=function(l,c,u,f,p){var h=o(null);if(h.current===null){var v={hasValue:!1,value:null};h.current=v}else v=h.current;h=a(function(){function b(y){if(!x){if(x=!0,E=y,y=f(y),p!==void 0&&v.hasValue){var N=v.value;if(p(N,y))return w=N}return w=y}if(N=w,n(E,y))return N;var q=f(y);return p!==void 0&&p(N,q)?(E=y,N):(E=y,w=q)}var x=!1,E,w,O=u===void 0?null:u;return[function(){return b(c())},O===null?void 0:function(){return b(O())}]},[c,u,f,p]);var g=r(l,h[0],h[1]);return s(function(){v.hasValue=!0,v.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())}()),xo}var Ia;function oh(){return Ia||(Ia=1,process.env.NODE_ENV==="production"?yr.exports=nh():yr.exports=rh()),yr.exports}var sh=oh();function nc(e,t,n=Zl){return sh.useSyncExternalStoreWithSelector(ce(r=>e.subscribe(ah,r)),ce(()=>e.state),ce(()=>e.state),ce(t),n)}function ah(e){return e}function lr(e,t){let n=d.useId(),r=tc.get(t),[o,s]=nc(r,d.useCallback(a=>[r.selectors.isTop(a,n),r.selectors.inStack(a,n)],[r,n]));return we(()=>{if(e)return r.actions.push(n),()=>r.actions.pop(n)},[r,e,n]),e?s?o:!0:!1}let cs=new Map,Wn=new Map;function Ma(e){var t;let n=(t=Wn.get(e))!=null?t:0;return Wn.set(e,n+1),n!==0?()=>Na(e):(cs.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>Na(e))}function Na(e){var t;let n=(t=Wn.get(e))!=null?t:1;if(n===1?Wn.delete(e):Wn.set(e,n-1),n!==1)return;let r=cs.get(e);r&&(r["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,cs.delete(e))}function ih(e,{allowed:t,disallowed:n}={}){let r=lr(e,"inert-others");we(()=>{var o,s;if(!r)return;let a=ut();for(let l of(o=n==null?void 0:n())!=null?o:[])l&&a.add(Ma(l));let i=(s=t==null?void 0:t())!=null?s:[];for(let l of i){if(!l)continue;let c=Br(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(Ma(f));u=u.parentElement}}return a.dispose},[r,t,n])}function lh(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:Rt(t)?t:t.current;if(!o)return;let s=ut();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 Lr=["[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(","),ch=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var et=(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))(et||{}),us=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(us||{}),uh=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(uh||{});function fh(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Lr)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}function dh(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(ch)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var rc=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(rc||{});function hh(e,t=0){var n;return e===((n=Br(e))==null?void 0:n.body)?!1:st(t,{0(){return e.matches(Lr)},1(){let r=e;for(;r!==null;){if(r.matches(Lr))return!0;r=r.parentElement}return!1}})}var ph=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(ph||{});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 mh=["textarea","input"].join(",");function gh(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,mh))!=null?n:!1}function bh(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 qn(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?bh(e):e:t&64?dh(e):fh(e);o.length>0&&a.length>1&&(a=a.filter(h=>!o.some(v=>v!=null&&"current"in v?(v==null?void 0:v.current)===h:v===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&&gh(p)&&p.select(),2}function oc(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function vh(){return/Android/gi.test(window.navigator.userAgent)}function La(){return oc()||vh()}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 sc(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 _a=30;function yh(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!hh(c,rc.Loose)&&c.tabIndex!==-1&&i.preventDefault(),r.current(i,c)},[r,t]),s=d.useRef(null);wr(e,"pointerdown",i=>{var l,c;La()||(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(La()||!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)>=_a||Math.abs(l.y-a.current.y)>=_a))return o(i,()=>kt(i.target)?i.target:null)},!0),sc(e,"blur",i=>o(i,()=>Fd(window.document.activeElement)?window.document.activeElement:null),!0)}function Yr(...e){return d.useMemo(()=>Br(...e),[...e])}function ac(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 wh(e){return d.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot)}function xh(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 Eh(){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 Ch(){return oc()?{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=ut();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(kt(i.target))try{let l=i.target.closest("a");if(!l)return;let{hash:c}=new URL(l.href),u=e.querySelector(c);kt(u)&&!r(u)&&(a=u)}catch{}},!0),t.addEventListener(e,"touchstart",i=>{if(kt(i.target)&&$d(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(kt(i.target)){if(Bl(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 Oh(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function Th(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let zt=xh(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:ut(),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:Th(n)},o=[Ch(),Eh(),Oh()];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 Sh(e,t,n=()=>({containers:[]})){let r=wh(zt),o=t?r.get(t):void 0,s=o?o.count>0:!1;return we(()=>{if(!(!t||!e))return zt.dispatch("PUSH",t,n),()=>zt.dispatch("POP",t,n)},[e,t]),s}function Ph(e,t,n=()=>[document.body]){let r=lr(e,"scroll-lock");Sh(r,t,o=>{var s;return{containers:[...(s=o.containers)!=null?s:[],n]}})}function kh(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 Da,ja;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((Da=process==null?void 0:process.env)==null?void 0:Da.NODE_ENV)==="test"&&typeof((ja=Element==null?void 0:Element.prototype)==null?void 0:ja.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 Ah=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(Ah||{});function Rh(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]="");return t}function $h(e,t,n,r){let[o,s]=d.useState(n),{hasFlag:a,addFlag:i,removeFlag:l}=kh(e&&o?3:0),c=d.useRef(!1),u=d.useRef(!1),f=Vs();return we(()=>{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),Fh(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 Fh(e,{prepare:t,run:n,done:r,inFlight:o}){let s=ut();return Mh(e,{prepare:t,inFlight:o}),s.nextFrame(()=>{n(),s.requestAnimationFrame(()=>{s.add(Ih(e,r))})}),s.dispose}function Ih(e,t){var n,r;let o=ut();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 Mh(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 Gs(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 Kr(){return typeof window<"u"}function In(e){return ic(e)?(e.nodeName||"").toLowerCase():"#document"}function Re(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ft(e){var t;return(t=(ic(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ic(e){return Kr()?e instanceof Node||e instanceof Re(e).Node:!1}function me(e){return Kr()?e instanceof Element||e instanceof Re(e).Element:!1}function He(e){return Kr()?e instanceof HTMLElement||e instanceof Re(e).HTMLElement:!1}function fs(e){return!Kr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Re(e).ShadowRoot}function cr(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 Nh(e){return["table","td","th"].includes(In(e))}function Qr(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ys(e){const t=Xr(),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 Lh(e){let t=at(e);for(;He(t)&&!rt(t);){if(Ys(t))return t;if(Qr(t))return null;t=at(t)}return null}function Xr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function rt(e){return["html","body","#document"].includes(In(e))}function Le(e){return Re(e).getComputedStyle(e)}function Jr(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||fs(e)&&e.host||ft(e);return fs(t)?t.host:t}function lc(e){const t=at(e);return rt(t)?e.ownerDocument?e.ownerDocument.body:e.body:He(t)&&cr(t)?t:lc(t)}function dn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=lc(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),a=Re(o);if(s){const i=ds(a);return t.concat(a,a.visualViewport||[],cr(o)?o:[],i&&n?dn(i):[])}return t.concat(o,dn(o,[],n))}function ds(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const za=Math.min,Vn=Math.max,_r=Math.round,Ke=e=>({x:e,y:e});function cc(e){return e.split("-")[0]}function _h(e){return e.split("-")[1]}function Dh(e){return e==="x"?"y":"x"}function jh(e){return e==="y"?"height":"width"}function uc(e){return["top","bottom"].includes(cc(e))?"y":"x"}function zh(e){return Dh(uc(e))}function fc(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 Ha(e,t,n){let{reference:r,floating:o}=e;const s=uc(t),a=zh(t),i=jh(a),l=cc(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(_h(t)){case"start":h[a]-=p*(n&&c?-1:1);break;case"end":h[a]+=p*(n&&c?-1:1);break}return h}const Hh=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}=Ha(c,r,l),p=r,h={},v=0;for(let g=0;g<i.length;g++){const{name:b,fn:x}=i[g],{x:E,y:w,data:O,reset:y}=await x({x:u,y:f,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});u=E??u,f=w??f,h={...h,[b]:{...h[b],...O}},y&&v<=50&&(v++,typeof y=="object"&&(y.placement&&(p=y.placement),y.rects&&(c=y.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):y.rects),{x:u,y:f}=Ha(c,p,l)),g=-1)}return{x:u,y:f,placement:p,strategy:o,middlewareData:h}};function dc(e){const t=Le(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=He(e),s=o?e.offsetWidth:n,a=o?e.offsetHeight:r,i=_r(n)!==s||_r(r)!==a;return i&&(n=s,r=a),{width:n,height:r,$:i}}function hc(e){return me(e)?e:e.contextElement}function hn(e){const t=hc(e);if(!He(t))return Ke(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=dc(t);let a=(s?_r(n.width):n.width)/r,i=(s?_r(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const Uh=Ke(0);function pc(e){const t=Re(e);return!Xr()||!t.visualViewport?Uh:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Bh(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Re(e)?!1:t}function Jn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=hc(e);let a=Ke(1);t&&(r?me(r)&&(a=hn(r)):a=hn(e));const i=Bh(s,n,r)?pc(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=Re(s),h=r&&me(r)?Re(r):r;let v=p,g=ds(v);for(;g&&r&&h!==v;){const b=hn(g),x=g.getBoundingClientRect(),E=Le(g),w=x.left+(g.clientLeft+parseFloat(E.paddingLeft))*b.x,O=x.top+(g.clientTop+parseFloat(E.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,f*=b.y,l+=w,c+=O,v=Re(g),g=ds(v)}}return fc({width:u,height:f,x:l,y:c})}function Ks(e,t){const n=Jr(e).scrollLeft;return t?t.left+n:Jn(ft(e)).left+n}function mc(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Ks(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function Wh(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",a=ft(r),i=t?Qr(t.floating):!1;if(r===a||i&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Ke(1);const u=Ke(0),f=He(r);if((f||!f&&!s)&&((In(r)!=="body"||cr(a))&&(l=Jr(r)),He(r))){const h=Jn(r);c=hn(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}const p=a&&!f&&!s?mc(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 qh(e){return Array.from(e.getClientRects())}function Vh(e){const t=ft(e),n=Jr(e),r=e.ownerDocument.body,o=Vn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Vn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Ks(e);const i=-n.scrollTop;return Le(r).direction==="rtl"&&(a+=Vn(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:a,y:i}}function Gh(e,t){const n=Re(e),r=ft(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=Xr();(!c||c&&t==="fixed")&&(i=o.offsetLeft,l=o.offsetTop)}return{width:s,height:a,x:i,y:l}}function Yh(e,t){const n=Jn(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=He(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 Ua(e,t,n){let r;if(t==="viewport")r=Gh(e,n);else if(t==="document")r=Vh(ft(e));else if(me(t))r=Yh(t,n);else{const o=pc(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return fc(r)}function gc(e,t){const n=at(e);return n===t||!me(n)||rt(n)?!1:Le(n).position==="fixed"||gc(n,t)}function Kh(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)&&!rt(a);){const i=Le(a),l=Ys(a);!l&&i.position==="fixed"&&(o=null),(s?!l&&!o:!l&&i.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||cr(a)&&!l&&gc(e,a))?r=r.filter(u=>u!==a):o=i,a=at(a)}return t.set(e,r),r}function Qh(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Qr(t)?[]:Kh(t,this._c):[].concat(n),r],i=a[0],l=a.reduce((c,u)=>{const f=Ua(t,u,o);return c.top=Vn(f.top,c.top),c.right=za(f.right,c.right),c.bottom=za(f.bottom,c.bottom),c.left=Vn(f.left,c.left),c},Ua(t,i,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Xh(e){const{width:t,height:n}=dc(e);return{width:t,height:n}}function Jh(e,t,n){const r=He(t),o=ft(t),s=n==="fixed",a=Jn(e,!0,s,t);let i={scrollLeft:0,scrollTop:0};const l=Ke(0);function c(){l.x=Ks(o)}if(r||!r&&!s)if((In(t)!=="body"||cr(o))&&(i=Jr(t)),r){const h=Jn(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?mc(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 Eo(e){return Le(e).position==="static"}function Ba(e,t){if(!He(e)||Le(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ft(e)===n&&(n=n.ownerDocument.body),n}function bc(e,t){const n=Re(e);if(Qr(e))return n;if(!He(e)){let o=at(e);for(;o&&!rt(o);){if(me(o)&&!Eo(o))return o;o=at(o)}return n}let r=Ba(e,t);for(;r&&Nh(r)&&Eo(r);)r=Ba(r,t);return r&&rt(r)&&Eo(r)&&!Ys(r)?n:r||Lh(e)||n}const Zh=async function(e){const t=this.getOffsetParent||bc,n=this.getDimensions,r=await n(e.floating);return{reference:Jh(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ep(e){return Le(e).direction==="rtl"}const tp={convertOffsetParentRelativeRectToViewportRelativeRect:Wh,getDocumentElement:ft,getClippingRect:Qh,getOffsetParent:bc,getElementRects:Zh,getClientRects:qh,getDimensions:Xh,getScale:hn,isElement:me,isRTL:ep},np=(e,t,n)=>{const r=new Map,o={platform:tp,...n},s={...o.platform,_c:r};return Hh(e,t,{...o,platform:s})};var rp=typeof document<"u",op=function(){},Sr=rp?d.useLayoutEffect:op;function Dr(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(!Dr(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)&&!Dr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function vc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Wa(e,t){const n=vc(e);return Math.round(t*n)/n}function Co(e){const t=F.useRef(e);return Sr(()=>{t.current=e}),t}function sp(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);Dr(p,r)||h(r);const[v,g]=F.useState(null),[b,x]=F.useState(null),E=F.useCallback(P=>{P!==N.current&&(N.current=P,g(P))},[]),w=F.useCallback(P=>{P!==q.current&&(q.current=P,x(P))},[]),O=s||v,y=a||b,N=F.useRef(null),q=F.useRef(null),R=F.useRef(u),B=l!=null,G=Co(l),le=Co(o),ue=Co(c),oe=F.useCallback(()=>{if(!N.current||!q.current)return;const P={placement:t,strategy:n,middleware:p};le.current&&(P.platform=le.current),np(N.current,q.current,P).then(V=>{const C={...V,isPositioned:ue.current!==!1};fe.current&&!Dr(R.current,C)&&(R.current=C,Pu.flushSync(()=>{f(C)}))})},[p,t,n,le,ue]);Sr(()=>{c===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(P=>({...P,isPositioned:!1})))},[c]);const fe=F.useRef(!1);Sr(()=>(fe.current=!0,()=>{fe.current=!1}),[]),Sr(()=>{if(O&&(N.current=O),y&&(q.current=y),O&&y){if(G.current)return G.current(O,y,oe);oe()}},[O,y,oe,G,B]);const W=F.useMemo(()=>({reference:N,floating:q,setReference:E,setFloating:w}),[E,w]),Y=F.useMemo(()=>({reference:O,floating:y}),[O,y]),ne=F.useMemo(()=>{const P={position:n,left:0,top:0};if(!Y.floating)return P;const V=Wa(Y.floating,u.x),C=Wa(Y.floating,u.y);return i?{...P,transform:"translate("+V+"px, "+C+"px)",...vc(Y.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:C}},[n,i,Y.floating,u.x,u.y]);return F.useMemo(()=>({...u,update:oe,refs:W,elements:Y,floatingStyles:ne}),[u,oe,W,Y,ne])}let Zr=d.createContext(null);Zr.displayName="OpenClosedContext";var ze=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ze||{});function eo(){return d.useContext(Zr)}function ap({value:e,children:t}){return d.createElement(Zr.Provider,{value:e},t)}function ip({children:e}){return d.createElement(Zr.Provider,{value:null},e)}function lp(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let gt=[];lp(()=>{function e(t){if(!kt(t.target)||t.target===document.body||gt[0]===t.target)return;let n=t.target;n=n.closest(Lr),gt.unshift(n??t.target),gt=gt.filter(r=>r!=null&&r.isConnected),gt.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 yc(e){let t=ce(e),n=d.useRef(!1);d.useEffect(()=>(n.current=!1,()=>{n.current=!0,Wr(()=>{n.current&&t()})}),[t])}function cp(){let e=typeof document>"u";return"useSyncExternalStore"in F?(t=>t.useSyncExternalStore)(F)(()=>()=>{},()=>!1,()=>!e):!1}function ur(){let e=cp(),[t,n]=F.useState(Qt.isHandoffComplete);return t&&Qt.isHandoffComplete===!1&&n(!1),F.useEffect(()=>{t!==!0&&n(!0)},[t]),F.useEffect(()=>Qt.handoff(),[]),e?!1:t}let wc=d.createContext(!1);function up(){return d.useContext(wc)}function qa(e){return d.createElement(wc.Provider,{value:e.force},e.children)}function fp(e){let t=up(),n=d.useContext(Ec),[r,o]=d.useState(()=>{var s;if(!t&&n!==null)return(s=n.current)!=null?s:null;if(Qt.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 xc=d.Fragment,dp=xe(function(e,t){let{ownerDocument:n=null,...r}=e,o=d.useRef(null),s=Ue(Md(h=>{o.current=h}),t),a=Yr(o),i=n??a,l=fp(i),[c]=d.useState(()=>{var h;return Qt.isServer?null:(h=i==null?void 0:i.createElement("div"))!=null?h:null}),u=d.useContext(hs),f=ur();we(()=>{!l||!c||l.contains(c)||(c.setAttribute("data-headlessui-portal",""),l.appendChild(c))},[l,c]),we(()=>{if(c&&u)return u.register(c)},[u,c]),yc(()=>{var h;!l||!c||(Ul(c)&&l.contains(c)&&l.removeChild(c),l.childNodes.length<=0&&((h=l.parentElement)==null||h.removeChild(l)))});let p=Pe();return f?!l||!c?null:Xi.createPortal(p({ourProps:{ref:s},theirProps:r,slot:{},defaultTag:xc,name:"Portal"}),c):null});function hp(e,t){let n=Ue(t),{enabled:r=!0,ownerDocument:o,...s}=e,a=Pe();return r?d.createElement(dp,{...s,ownerDocument:o,ref:n}):a({ourProps:{ref:n},theirProps:s,slot:{},defaultTag:xc,name:"Portal"})}let pp=d.Fragment,Ec=d.createContext(null);function mp(e,t){let{target:n,...r}=e,o={ref:Ue(t)},s=Pe();return d.createElement(Ec.Provider,{value:n},s({ourProps:o,theirProps:r,defaultTag:pp,name:"Popover.Group"}))}let hs=d.createContext(null);function gp(){let e=d.useContext(hs),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(hs.Provider,{value:o},s)},[o])]}let bp=xe(hp),Cc=xe(mp),vp=Object.assign(bp,{Group:Cc});function yp(e,t=typeof document<"u"?document.defaultView:null,n){let r=lr(e,"escape");ac(t,"keydown",o=>{r&&(o.defaultPrevented||o.key===Yl.Escape&&n(o))})}function wp(){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 we(()=>{if(!t)return;function o(s){r(s.matches)}return t.addEventListener("change",o),()=>t.removeEventListener("change",o)},[t]),n}function xp({defaultContainers:e=[],portals:t,mainTreeNode:n}={}){let r=Yr(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 Oc=d.createContext(null);function Va({children:e,node:t}){let[n,r]=d.useState(null),o=Tc(t??n);return d.createElement(Oc.Provider,{value:o},e,o===null&&d.createElement(Nr,{features:Xn.Hidden,ref:s=>{var a,i;if(s){for(let l of(i=(a=Br(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 Tc(e=null){var t;return(t=d.useContext(Oc))!=null?t:e}function Qs(){let e=d.useRef(!1);return we(()=>(e.current=!0,()=>{e.current=!1}),[]),e}var zn=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(zn||{});function Ep(){let e=d.useRef(0);return sc(!0,"keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function Sc(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 Cp="div";var Dt=(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))(Dt||{});function Op(e,t){let n=d.useRef(null),r=Ue(n,t),{initialFocus:o,initialFocusFallback:s,containers:a,features:i=15,...l}=e;ur()||(i=0);let c=Yr(n);kp(i,{ownerDocument:c});let u=Ap(i,{ownerDocument:c,container:n,initialFocus:o,initialFocusFallback:s});Rp(i,{ownerDocument:c,container:n,containers:a,previousActiveElement:u});let f=Ep(),p=ce(E=>{if(!Rt(n.current))return;let w=n.current;(O=>O())(()=>{st(f.current,{[zn.Forwards]:()=>{qn(w,et.First,{skipElements:[E.relatedTarget,s]})},[zn.Backwards]:()=>{qn(w,et.Last,{skipElements:[E.relatedTarget,s]})}})})}),h=lr(!!(i&2),"focus-trap#tab-lock"),v=Vs(),g=d.useRef(!1),b={ref:r,onKeyDown(E){E.key=="Tab"&&(g.current=!0,v.requestAnimationFrame(()=>{g.current=!1}))},onBlur(E){if(!(i&4))return;let w=Sc(a);Rt(n.current)&&w.add(n.current);let O=E.relatedTarget;kt(O)&&O.dataset.headlessuiFocusGuard!=="true"&&(Pc(w,O)||(g.current?qn(n.current,st(f.current,{[zn.Forwards]:()=>et.Next,[zn.Backwards]:()=>et.Previous})|et.WrapAround,{relativeTo:E.target}):kt(E.target)&&nt(E.target)))}},x=Pe();return d.createElement(d.Fragment,null,h&&d.createElement(Nr,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:Xn.Focusable}),x({ourProps:b,theirProps:l,defaultTag:Cp,name:"FocusTrap"}),h&&d.createElement(Nr,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:Xn.Focusable}))}let Tp=xe(Op),Sp=Object.assign(Tp,{features:Dt});function Pp(e=!0){let t=d.useRef(gt.slice());return Gs(([n],[r])=>{r===!0&&n===!1&&Wr(()=>{t.current.splice(0)}),r===!1&&n===!0&&(t.current=gt.slice())},[e,gt,t]),ce(()=>{var n;return(n=t.current.find(r=>r!=null&&r.isConnected))!=null?n:null})}function kp(e,{ownerDocument:t}){let n=!!(e&8),r=Pp(n);Gs(()=>{n||(t==null?void 0:t.activeElement)===(t==null?void 0:t.body)&&nt(r())},[n]),yc(()=>{n&&nt(r())})}function Ap(e,{ownerDocument:t,container:n,initialFocus:r,initialFocusFallback:o}){let s=d.useRef(null),a=lr(!!(e&1),"focus-trap#initial-focus"),i=Qs();return Gs(()=>{if(e===0)return;if(!a){o!=null&&o.current&&nt(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)nt(r.current);else{if(e&16){if(qn(l,et.First|et.AutoFocus)!==us.Error)return}else if(qn(l,et.First)!==us.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 Rp(e,{ownerDocument:t,container:n,containers:r,previousActiveElement:o}){let s=Qs(),a=!!(e&4);ac(t==null?void 0:t.defaultView,"focus",i=>{if(!a||!s.current)return;let l=Sc(r);Rt(n.current)&&l.add(n.current);let c=o.current;if(!c)return;let u=i.target;Rt(u)?Pc(l,u)?(o.current=u,nt(u)):(i.preventDefault(),i.stopPropagation(),nt(c)):nt(o.current)},!0)}function Pc(e,t){for(let n of e)if(n.contains(t))return!0;return!1}function kc(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||((t=e.as)!=null?t:Rc)!==d.Fragment||d.Children.count(e.children)===1}let to=d.createContext(null);to.displayName="TransitionContext";var $p=(e=>(e.Visible="visible",e.Hidden="hidden",e))($p||{});function Fp(){let e=d.useContext(to);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function Ip(){let e=d.useContext(no);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let no=d.createContext(null);no.displayName="NestingContext";function ro(e){return"children"in e?ro(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function Ac(e,t){let n=nn(e),r=d.useRef([]),o=Qs(),s=Vs(),a=ce((h,v=Pt.Hidden)=>{let g=r.current.findIndex(({el:b})=>b===h);g!==-1&&(st(v,{[Pt.Unmount](){r.current.splice(g,1)},[Pt.Hidden](){r.current[g].state="hidden"}}),s.microTask(()=>{var b;!ro(r)&&o.current&&((b=n.current)==null||b.call(n))}))}),i=ce(h=>{let v=r.current.find(({el:g})=>g===h);return v?v.state!=="visible"&&(v.state="visible"):r.current.push({el:h,state:"visible"}),()=>a(h,Pt.Unmount)}),l=d.useRef([]),c=d.useRef(Promise.resolve()),u=d.useRef({enter:[],leave:[]}),f=ce((h,v,g)=>{l.current.splice(0),t&&(t.chains.current[v]=t.chains.current[v].filter(([b])=>b!==h)),t==null||t.chains.current[v].push([h,new Promise(b=>{l.current.push(b)})]),t==null||t.chains.current[v].push([h,new Promise(b=>{Promise.all(u.current[v].map(([x,E])=>E)).then(()=>b())})]),v==="enter"?c.current=c.current.then(()=>t==null?void 0:t.wait.current).then(()=>g(v)):g(v)}),p=ce((h,v,g)=>{Promise.all(u.current[v].splice(0).map(([b,x])=>x)).then(()=>{var b;(b=l.current.shift())==null||b()}).then(()=>g(v))});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 Rc=d.Fragment,$c=Mr.RenderStrategy;function Mp(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:v,leaveTo:g,...b}=e,[x,E]=d.useState(null),w=d.useRef(null),O=kc(e),y=Ue(...O?[w,t,E]:t===null?[]:[t]),N=(n=b.unmount)==null||n?Pt.Unmount:Pt.Hidden,{show:q,appear:R,initial:B}=Fp(),[G,le]=d.useState(q?"visible":"hidden"),ue=Ip(),{register:oe,unregister:fe}=ue;we(()=>oe(w),[oe,w]),we(()=>{if(N===Pt.Hidden&&w.current){if(q&&G!=="visible"){le("visible");return}return st(G,{hidden:()=>fe(w),visible:()=>oe(w)})}},[G,w,oe,fe,q,N]);let W=ur();we(()=>{if(O&&W&&G==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,G,W,O]);let Y=B&&!R,ne=R&&q&&B,P=d.useRef(!1),V=Ac(()=>{P.current||(le("hidden"),fe(w))},ue),C=ce(I=>{P.current=!0;let Q=I?"enter":"leave";V.onStart(w,Q,X=>{X==="enter"?s==null||s():X==="leave"&&(i==null||i())})}),k=ce(I=>{let Q=I?"enter":"leave";P.current=!1,V.onStop(w,Q,X=>{X==="enter"?a==null||a():X==="leave"&&(l==null||l())}),Q==="leave"&&!ro(V)&&(le("hidden"),fe(w))});d.useEffect(()=>{O&&o||(C(q),k(q))},[q,O,o]);let U=!(!o||!O||!W||Y),[,A]=$h(U,x,q,{start:C,end:k}),D=_t({ref:y,className:((r=ls(b.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&&v,A.leave&&A.closed&&g,!A.transition&&q&&p))==null?void 0:r.trim())||void 0,...Rh(A)}),K=0;G==="visible"&&(K|=ze.Open),G==="hidden"&&(K|=ze.Closed),q&&G==="hidden"&&(K|=ze.Opening),!q&&G==="visible"&&(K|=ze.Closing);let z=Pe();return d.createElement(no.Provider,{value:V},d.createElement(ap,{value:K},z({ourProps:D,theirProps:b,defaultTag:Rc,features:$c,visible:G==="visible",name:"Transition.Child"})))}function Np(e,t){let{show:n,appear:r=!1,unmount:o=!0,...s}=e,a=d.useRef(null),i=kc(e),l=Ue(...i?[a,t]:t===null?[]:[t]);ur();let c=eo();if(n===void 0&&c!==null&&(n=(c&ze.Open)===ze.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=Ac(()=>{n||f("hidden")}),[h,v]=d.useState(!0),g=d.useRef([n]);we(()=>{h!==!1&&g.current[g.current.length-1]!==n&&(g.current.push(n),v(!1))},[g,n]);let b=d.useMemo(()=>({show:n,appear:r,initial:h}),[n,r,h]);we(()=>{n?f("visible"):!ro(p)&&a.current!==null&&f("hidden")},[n,p]);let x={unmount:o},E=ce(()=>{var y;h&&v(!1),(y=e.beforeEnter)==null||y.call(e)}),w=ce(()=>{var y;h&&v(!1),(y=e.beforeLeave)==null||y.call(e)}),O=Pe();return d.createElement(no.Provider,{value:p},d.createElement(to.Provider,{value:b},O({ourProps:{...x,as:d.Fragment,children:d.createElement(Fc,{ref:l,...x,...s,beforeEnter:E,beforeLeave:w})},theirProps:{},defaultTag:d.Fragment,features:$c,visible:u==="visible",name:"Transition"})))}function Lp(e,t){let n=d.useContext(to)!==null,r=eo()!==null;return d.createElement(d.Fragment,null,!n&&r?d.createElement(ps,{ref:t,...e}):d.createElement(Fc,{ref:t,...e}))}let ps=xe(Np),Fc=xe(Mp),Xs=xe(Lp),_p=Object.assign(ps,{Child:Xs,Root:ps});var Dp=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Dp||{}),jp=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(jp||{});let zp={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},Js=d.createContext(null);Js.displayName="DialogContext";function oo(e){let t=d.useContext(Js);if(t===null){let n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,oo),n}return t}function Hp(e,t){return st(t.type,zp,e,t)}let Ga=xe(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=eo();o===void 0&&h!==null&&(o=(h&ze.Open)===ze.Open);let v=d.useRef(null),g=Ue(v,t),b=Yr(v),x=o?0:1,[E,w]=d.useReducer(Hp,{titleId:null,descriptionId:null,panelRef:d.createRef()}),O=ce(()=>s(!1)),y=ce(A=>w({type:0,id:A})),N=ur()?x===0:!1,[q,R]=gp(),B={get current(){var A;return(A=E.panelRef.current)!=null?A:v.current}},G=Tc(),{resolveContainers:le}=xp({mainTreeNode:G,portals:q,defaultContainers:[B]}),ue=h!==null?(h&ze.Closing)===ze.Closing:!1;ih(c||ue?!1:N,{allowed:ce(()=>{var A,D;return[(D=(A=v.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=tc.get(null);we(()=>{if(N)return oe.actions.push(r),()=>oe.actions.pop(r)},[oe,r,N]);let fe=nc(oe,d.useCallback(A=>oe.selectors.isTop(A,r),[oe,r]));yh(fe,le,A=>{A.preventDefault(),O()}),yp(fe,b==null?void 0:b.defaultView,A=>{A.preventDefault(),A.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),O()}),Ph(c||ue?!1:N,b,le),lh(N,v,O);let[W,Y]=Vl(),ne=d.useMemo(()=>[{dialogState:x,close:O,setTitleId:y,unmount:u},E],[x,E,O,y,u]),P=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":E.titleId,"aria-describedby":W,unmount:u},C=!wp(),k=Dt.None;N&&!c&&(k|=Dt.RestoreFocus,k|=Dt.TabLock,l&&(k|=Dt.AutoFocus),C&&(k|=Dt.InitialFocus));let U=Pe();return d.createElement(ip,null,d.createElement(qa,{force:!0},d.createElement(vp,null,d.createElement(Js.Provider,{value:ne},d.createElement(Cc,{target:v},d.createElement(qa,{force:!1},d.createElement(Y,{slot:P},d.createElement(R,null,d.createElement(Sp,{initialFocus:a,initialFocusFallback:v,containers:le,features:k},d.createElement(qd,{value:O},U({ourProps:V,theirProps:f,slot:P,defaultTag:Up,features:Bp,visible:x===0,name:"Dialog"})))))))))))}),Up="div",Bp=Mr.RenderStrategy|Mr.Static;function Wp(e,t){let{transition:n=!1,open:r,...o}=e,s=eo(),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(Va,null,d.createElement(_p,{show:r,transition:n,unmount:o.unmount},d.createElement(Ga,{ref:t,...o}))):d.createElement(Va,null,d.createElement(Ga,{ref:t,open:r,...o}))}let qp="div";function Vp(e,t){let n=d.useId(),{id:r=`headlessui-dialog-panel-${n}`,transition:o=!1,...s}=e,[{dialogState:a,unmount:i},l]=oo("Dialog.Panel"),c=Ue(t,l.panelRef),u=d.useMemo(()=>({open:a===0}),[a]),f=ce(b=>{b.stopPropagation()}),p={ref:c,id:r,onClick:f},h=o?Xs:d.Fragment,v=o?{unmount:i}:{},g=Pe();return d.createElement(h,{...v},g({ourProps:p,theirProps:s,slot:u,defaultTag:qp,name:"Dialog.Panel"}))}let Gp="div";function Yp(e,t){let{transition:n=!1,...r}=e,[{dialogState:o,unmount:s}]=oo("Dialog.Backdrop"),a=d.useMemo(()=>({open:o===0}),[o]),i={ref:t,"aria-hidden":!0},l=n?Xs:d.Fragment,c=n?{unmount:s}:{},u=Pe();return d.createElement(l,{...c},u({ourProps:i,theirProps:r,slot:a,defaultTag:Gp,name:"Dialog.Backdrop"}))}let Kp="h2";function Qp(e,t){let n=d.useId(),{id:r=`headlessui-dialog-title-${n}`,...o}=e,[{dialogState:s,setTitleId:a}]=oo("Dialog.Title"),i=Ue(t);d.useEffect(()=>(a(r),()=>a(null)),[r,a]);let l=d.useMemo(()=>({open:s===0}),[s]),c={ref:i,id:r};return Pe()({ourProps:c,theirProps:o,slot:l,defaultTag:Kp,name:"Dialog.Title"})}let Xp=xe(Wp),Ic=xe(Vp),Jp=xe(Yp),Mc=xe(Qp),Zp=Object.assign(Xp,{Panel:Ic,Title:Mc,Description:Gl}),em="div";function tm(e,t){let n=`headlessui-control-${d.useId()}`,[r,o]=jd(),[s,a]=Vl(),i=qr(),{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=Pe();return d.createElement(wd,{value:l},d.createElement(o,{value:r},d.createElement(a,{value:s},d.createElement(Rd,{id:n},p({ourProps:f,theirProps:{...c,children:d.createElement(Ad,null,typeof c.children=="function"?c.children(u):c.children)},slot:u,defaultTag:em,name:"Field"})))))}let nm=xe(tm),rm="input";function om(e,t){let n=d.useId(),r=Hl(),o=qr(),{id:s=r||`headlessui-input-${n}`,disabled:a=o||!1,autoFocus:i=!1,invalid:l=!1,...c}=e,u=Ql(),f=Nd(),{isFocused:p,focusProps:h}=gd({autoFocus:i}),{isHovered:v,hoverProps:g}=md({isDisabled:a}),b=Od({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:v,focus:p,autofocus:i}),[a,l,v,p,i]);return Pe()({ourProps:b,theirProps:c,slot:x,defaultTag:rm,name:"Input"})}let sm=xe(om);const am="whitespace-nowrap font-normal flex items-center justify-center",im="focus:outline focus:outline-3 focus:outline-primary-500/[.3]",lm="disabled:opacity-15 disabled:pointer-events-none",Nc=e=>e==="grayLight"||e==="warning",Lc=(e,t)=>!t||t==="none"?"":e(),cm=(e,t)=>Lc(()=>{const n=e==="gray400"?"gray":e,r=Nc(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),um=e=>Lc(()=>{const t=Nc(e)?"text-black":"text-white";return e==="primary"?`bg-primary-600 ${t}`:e==="gray400"?`bg-gray-400 ${t}`:`bg-${e}-500 ${t}`},e),fm=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]||"",dm=(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]||"",hm=(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`}`,pm=(e,t)=>({solid:um(e),link:fm(e),linkHoverSolid:dm(e,t),outline:hm(e,t)}),mm={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"},gm={none:"",default:"rounded",pill:"rounded-pill"},bm=({active:e=!1,children:t,color:n="primary",size:r="normal",category:o="solid",className:s,type:a="button",rounded:i="default",style:l={},primaryColor:c,...u},f)=>{var w;const p=lm,h=/link/.test(o)?null:cm(n,e),v=im,g=mm[r],b=(w=pm(n,e))==null?void 0:w[o],x=fn(h,b),E=gm[i];return T.jsx("button",{...u,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",backgroundColor:c?c+"!important":void 0},type:a,ref:f,className:fn(am,v,p,g,x,E,s,"cursor-pointer"),children:t})},Zn=d.forwardRef(bm),vm=({isOpen:e,close:t,title:n,dismissOptions:r,confirmOptions:o,children:s})=>T.jsxs(Zp,{open:e,onClose:t,className:"relative z-50 transition duration-300 ease-out data-closed:opacity-0 confidence-ui",transition:!0,children:[T.jsx(Jp,{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(Ic,{className:"max-w-lg divide-y divide-gray-100 bg-white rounded-sm shadow-xl",children:[T.jsx(Mc,{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(Zn,{onClick:()=>{r.onClick(),t()},size:"small",color:"secondary",children:r.label}):T.jsx(T.Fragment,{}),o?T.jsx(Zn,{disabled:o.disabled,onClick:()=>{o.onClick(),t()},size:"small",color:"primary",children:o.label}):T.jsx(T.Fragment,{})]}):T.jsx(T.Fragment,{})]})})]}),ym=({type:e="text",className:t,label:n,description:r,...o})=>T.jsx("div",{className:"w-full max-w-md px-4",children:T.jsxs(nm,{children:[T.jsx(Bd,{className:"font-medium text-gray-900",children:n}),r&&T.jsx(Gl,{className:"text-sm text-secondary",children:r}),T.jsx(sm,{type:e,className:ye("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})]})}),wm=({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(vm,{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(ym,{label:"Email",disabled:a,description:"Enter the email address to initiate the playbook.",onChange:c=>s(c.target.value)})})})},_c=({btnClassName:e,buttonNode:t,size:n,playbookId:r,onInitiated:o,disabled:s,btnLabel:a="Run Playbook"})=>{const[i,l]=d.useState(!1);function c(){l(!0)}function u(){l(!1)}const f=async p=>{const{playbookInstanceId:h,errorCode:v,details:g,message:b}=await ml({bank:"public-sdk",email:p,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone||"America/Los_Angeles",playbookUid:r})||{};if(v)throw new Error(`Error initiating playbook: ${b} (Code: ${v}) - Details: ${g}`);o(h)};return T.jsxs(T.Fragment,{children:[t?{buttonNode:t}:T.jsx(Zn,{onClick:c,className:e,color:"primary",size:n,disabled:s,children:a}),T.jsx(wm,{isOpen:i,onClose:u,onConfirm:async p=>{await f(p),u()}})]})};/*!
|
|
22
22
|
* Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com
|
|
23
23
|
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
|
24
24
|
* Copyright 2024 Fonticons, Inc.
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
* Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com
|
|
27
27
|
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
|
28
28
|
* Copyright 2024 Fonticons, Inc.
|
|
29
|
-
*/function Sm(e,t,n){return(t=Om(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ya(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 O(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ya(Object(n),!0).forEach(function(r){Sm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ya(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Tm(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 Om(e){var t=Tm(e,"string");return typeof t=="symbol"?t:t+""}const Ka=()=>{};let Zs={},jc={},zc=null,Hc={mark:Ka,measure:Ka};try{typeof window<"u"&&(Zs=window),typeof document<"u"&&(jc=document),typeof MutationObserver<"u"&&(zc=MutationObserver),typeof performance<"u"&&(Hc=performance)}catch{}const{userAgent:Qa=""}=Zs.navigator||{},$t=Zs,de=jc,Xa=zc,xr=Hc;$t.document;const dt=!!de.documentElement&&!!de.head&&typeof de.addEventListener=="function"&&typeof de.createElement=="function",Uc=~Qa.indexOf("MSIE")||~Qa.indexOf("Trident/");var Pm=/fa(s|r|l|t|d|dr|dl|dt|b|k|kd|ss|sr|sl|st|sds|sdr|sdl|sdt)?[\-\ ]/,km=/Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit)?.*/i,Bc={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"}},Am={GROUP:"duotone-group",PRIMARY:"primary",SECONDARY:"secondary"},Wc=["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone"],Ce="classic",so="duotone",Rm="sharp",$m="sharp-duotone",qc=[Ce,so,Rm,$m],Fm={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"}},Im={"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"}},Mm=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}]]),Nm={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"}},Lm=["fak","fa-kit","fakd","fa-kit-duotone"],Ja={kit:{fak:"kit","fa-kit":"kit"},"kit-duotone":{fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"}},_m=["kit"],Dm={kit:{"fa-kit":"fak"}},jm=["fak","fakd"],zm={kit:{fak:"fa-kit"}},Za={kit:{kit:"fak"},"kit-duotone":{"kit-duotone":"fakd"}},Er={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},Hm=["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone"],Um=["fak","fa-kit","fakd","fa-kit-duotone"],Bm={"Font Awesome Kit":{400:"fak",normal:"fak"},"Font Awesome Kit Duotone":{400:"fakd",normal:"fakd"}},Wm={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"}},qm={classic:["fas","far","fal","fat","fad"],duotone:["fadr","fadl","fadt"],sharp:["fass","fasr","fasl","fast"],"sharp-duotone":["fasds","fasdr","fasdl","fasdt"]},ms={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"}},Vm=["fa-solid","fa-regular","fa-light","fa-thin","fa-duotone","fa-brands"],gs=["fa","fas","far","fal","fat","fad","fadr","fadl","fadt","fab","fass","fasr","fasl","fast","fasds","fasdr","fasdl","fasdt",...Hm,...Vm],Gm=["solid","regular","light","thin","duotone","brands"],Vc=[1,2,3,4,5,6,7,8,9,10],Ym=Vc.concat([11,12,13,14,15,16,17,18,19,20]),Km=[...Object.keys(qm),...Gm,"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",Er.GROUP,Er.SWAP_OPACITY,Er.PRIMARY,Er.SECONDARY].concat(Vc.map(e=>"".concat(e,"x"))).concat(Ym.map(e=>"w-".concat(e))),Qm={"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 it="___FONT_AWESOME___",bs=16,Gc="fa",Yc="svg-inline--fa",en="data-fa-i2svg",ys="data-fa-pseudo-element",Xm="data-fa-pseudo-element-pending",ea="data-prefix",ta="data-icon",ei="fontawesome-i2svg",Jm="async",Zm=["HTML","HEAD","STYLE","SCRIPT"],Kc=(()=>{try{return process.env.NODE_ENV==="production"}catch{return!1}})();function fr(e){return new Proxy(e,{get(t,n){return n in t?t[n]:t[Ce]}})}const Qc=O({},Bc);Qc[Ce]=O(O(O(O({},{"fa-duotone":"duotone"}),Bc[Ce]),Ja.kit),Ja["kit-duotone"]);const eg=fr(Qc),vs=O({},Nm);vs[Ce]=O(O(O(O({},{duotone:"fad"}),vs[Ce]),Za.kit),Za["kit-duotone"]);const ti=fr(vs),ws=O({},ms);ws[Ce]=O(O({},ws[Ce]),zm.kit);const na=fr(ws),xs=O({},Wm);xs[Ce]=O(O({},xs[Ce]),Dm.kit);fr(xs);const tg=Pm,Xc="fa-layers-text",ng=km,rg=O({},Fm);fr(rg);const og=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],So=Am,sg=[..._m,...Km],Gn=$t.FontAwesomeConfig||{};function ag(e){var t=de.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}function ig(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=ig(ag(n));o!=null&&(Gn[r]=o)});const Jc={styleDefault:"solid",familyDefault:Ce,cssPrefix:Gc,replacementClass:Yc,autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};Gn.familyPrefix&&(Gn.cssPrefix=Gn.familyPrefix);const kn=O(O({},Jc),Gn);kn.autoReplaceSvg||(kn.observeMutations=!1);const j={};Object.keys(Jc).forEach(e=>{Object.defineProperty(j,e,{enumerable:!0,set:function(t){kn[e]=t,Yn.forEach(n=>n(j))},get:function(){return kn[e]}})});Object.defineProperty(j,"familyPrefix",{enumerable:!0,set:function(e){kn.cssPrefix=e,Yn.forEach(t=>t(j))},get:function(){return kn.cssPrefix}});$t.FontAwesomeConfig=j;const Yn=[];function lg(e){return Yn.push(e),()=>{Yn.splice(Yn.indexOf(e),1)}}const pt=bs,Ge={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function cg(e){if(!e||!dt)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 ug="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function er(){let e=12,t="";for(;e-- >0;)t+=ug[Math.random()*62|0];return t}function Mn(e){const t=[];for(let n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function ra(e){return e.classList?Mn(e.classList):(e.getAttribute("class")||"").split(" ").filter(t=>t)}function Zc(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function fg(e){return Object.keys(e||{}).reduce((t,n)=>t+"".concat(n,'="').concat(Zc(e[n]),'" '),"").trim()}function ao(e){return Object.keys(e||{}).reduce((t,n)=>t+"".concat(n,": ").concat(e[n].trim(),";"),"")}function oa(e){return e.size!==Ge.size||e.x!==Ge.x||e.y!==Ge.y||e.rotate!==Ge.rotate||e.flipX||e.flipY}function dg(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 hg(e){let{transform:t,width:n=bs,height:r=bs,startCentered:o=!1}=e,s="";return o&&Uc?s+="translate(".concat(t.x/pt-n/2,"em, ").concat(t.y/pt-r/2,"em) "):o?s+="translate(calc(-50% + ".concat(t.x/pt,"em), calc(-50% + ").concat(t.y/pt,"em)) "):s+="translate(".concat(t.x/pt,"em, ").concat(t.y/pt,"em) "),s+="scale(".concat(t.size/pt*(t.flipX?-1:1),", ").concat(t.size/pt*(t.flipY?-1:1),") "),s+="rotate(".concat(t.rotate,"deg) "),s}var pg=`:root, :host {
|
|
29
|
+
*/function Om(e,t,n){return(t=Sm(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ya(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 S(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ya(Object(n),!0).forEach(function(r){Om(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ya(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Tm(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 Sm(e){var t=Tm(e,"string");return typeof t=="symbol"?t:t+""}const Ka=()=>{};let Zs={},jc={},zc=null,Hc={mark:Ka,measure:Ka};try{typeof window<"u"&&(Zs=window),typeof document<"u"&&(jc=document),typeof MutationObserver<"u"&&(zc=MutationObserver),typeof performance<"u"&&(Hc=performance)}catch{}const{userAgent:Qa=""}=Zs.navigator||{},$t=Zs,de=jc,Xa=zc,xr=Hc;$t.document;const dt=!!de.documentElement&&!!de.head&&typeof de.addEventListener=="function"&&typeof de.createElement=="function",Uc=~Qa.indexOf("MSIE")||~Qa.indexOf("Trident/");var Pm=/fa(s|r|l|t|d|dr|dl|dt|b|k|kd|ss|sr|sl|st|sds|sdr|sdl|sdt)?[\-\ ]/,km=/Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit)?.*/i,Bc={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"}},Am={GROUP:"duotone-group",PRIMARY:"primary",SECONDARY:"secondary"},Wc=["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone"],Ce="classic",so="duotone",Rm="sharp",$m="sharp-duotone",qc=[Ce,so,Rm,$m],Fm={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"}},Im={"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"}},Mm=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}]]),Nm={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"}},Lm=["fak","fa-kit","fakd","fa-kit-duotone"],Ja={kit:{fak:"kit","fa-kit":"kit"},"kit-duotone":{fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"}},_m=["kit"],Dm={kit:{"fa-kit":"fak"}},jm=["fak","fakd"],zm={kit:{fak:"fa-kit"}},Za={kit:{kit:"fak"},"kit-duotone":{"kit-duotone":"fakd"}},Er={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},Hm=["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone"],Um=["fak","fa-kit","fakd","fa-kit-duotone"],Bm={"Font Awesome Kit":{400:"fak",normal:"fak"},"Font Awesome Kit Duotone":{400:"fakd",normal:"fakd"}},Wm={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"}},qm={classic:["fas","far","fal","fat","fad"],duotone:["fadr","fadl","fadt"],sharp:["fass","fasr","fasl","fast"],"sharp-duotone":["fasds","fasdr","fasdl","fasdt"]},ms={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"}},Vm=["fa-solid","fa-regular","fa-light","fa-thin","fa-duotone","fa-brands"],gs=["fa","fas","far","fal","fat","fad","fadr","fadl","fadt","fab","fass","fasr","fasl","fast","fasds","fasdr","fasdl","fasdt",...Hm,...Vm],Gm=["solid","regular","light","thin","duotone","brands"],Vc=[1,2,3,4,5,6,7,8,9,10],Ym=Vc.concat([11,12,13,14,15,16,17,18,19,20]),Km=[...Object.keys(qm),...Gm,"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",Er.GROUP,Er.SWAP_OPACITY,Er.PRIMARY,Er.SECONDARY].concat(Vc.map(e=>"".concat(e,"x"))).concat(Ym.map(e=>"w-".concat(e))),Qm={"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 it="___FONT_AWESOME___",bs=16,Gc="fa",Yc="svg-inline--fa",en="data-fa-i2svg",vs="data-fa-pseudo-element",Xm="data-fa-pseudo-element-pending",ea="data-prefix",ta="data-icon",ei="fontawesome-i2svg",Jm="async",Zm=["HTML","HEAD","STYLE","SCRIPT"],Kc=(()=>{try{return process.env.NODE_ENV==="production"}catch{return!1}})();function fr(e){return new Proxy(e,{get(t,n){return n in t?t[n]:t[Ce]}})}const Qc=S({},Bc);Qc[Ce]=S(S(S(S({},{"fa-duotone":"duotone"}),Bc[Ce]),Ja.kit),Ja["kit-duotone"]);const eg=fr(Qc),ys=S({},Nm);ys[Ce]=S(S(S(S({},{duotone:"fad"}),ys[Ce]),Za.kit),Za["kit-duotone"]);const ti=fr(ys),ws=S({},ms);ws[Ce]=S(S({},ws[Ce]),zm.kit);const na=fr(ws),xs=S({},Wm);xs[Ce]=S(S({},xs[Ce]),Dm.kit);fr(xs);const tg=Pm,Xc="fa-layers-text",ng=km,rg=S({},Fm);fr(rg);const og=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],Oo=Am,sg=[..._m,...Km],Gn=$t.FontAwesomeConfig||{};function ag(e){var t=de.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}function ig(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=ig(ag(n));o!=null&&(Gn[r]=o)});const Jc={styleDefault:"solid",familyDefault:Ce,cssPrefix:Gc,replacementClass:Yc,autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};Gn.familyPrefix&&(Gn.cssPrefix=Gn.familyPrefix);const kn=S(S({},Jc),Gn);kn.autoReplaceSvg||(kn.observeMutations=!1);const j={};Object.keys(Jc).forEach(e=>{Object.defineProperty(j,e,{enumerable:!0,set:function(t){kn[e]=t,Yn.forEach(n=>n(j))},get:function(){return kn[e]}})});Object.defineProperty(j,"familyPrefix",{enumerable:!0,set:function(e){kn.cssPrefix=e,Yn.forEach(t=>t(j))},get:function(){return kn.cssPrefix}});$t.FontAwesomeConfig=j;const Yn=[];function lg(e){return Yn.push(e),()=>{Yn.splice(Yn.indexOf(e),1)}}const pt=bs,Ge={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function cg(e){if(!e||!dt)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 ug="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function er(){let e=12,t="";for(;e-- >0;)t+=ug[Math.random()*62|0];return t}function Mn(e){const t=[];for(let n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function ra(e){return e.classList?Mn(e.classList):(e.getAttribute("class")||"").split(" ").filter(t=>t)}function Zc(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function fg(e){return Object.keys(e||{}).reduce((t,n)=>t+"".concat(n,'="').concat(Zc(e[n]),'" '),"").trim()}function ao(e){return Object.keys(e||{}).reduce((t,n)=>t+"".concat(n,": ").concat(e[n].trim(),";"),"")}function oa(e){return e.size!==Ge.size||e.x!==Ge.x||e.y!==Ge.y||e.rotate!==Ge.rotate||e.flipX||e.flipY}function dg(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 hg(e){let{transform:t,width:n=bs,height:r=bs,startCentered:o=!1}=e,s="";return o&&Uc?s+="translate(".concat(t.x/pt-n/2,"em, ").concat(t.y/pt-r/2,"em) "):o?s+="translate(calc(-50% + ".concat(t.x/pt,"em), calc(-50% + ").concat(t.y/pt,"em)) "):s+="translate(".concat(t.x/pt,"em, ").concat(t.y/pt,"em) "),s+="scale(".concat(t.size/pt*(t.flipX?-1:1),", ").concat(t.size/pt*(t.flipY?-1:1),") "),s+="rotate(".concat(t.rotate,"deg) "),s}var pg=`:root, :host {
|
|
30
30
|
--fa-font-solid: normal 900 1em/1 "Font Awesome 6 Free";
|
|
31
31
|
--fa-font-regular: normal 400 1em/1 "Font Awesome 6 Free";
|
|
32
32
|
--fa-font-light: normal 300 1em/1 "Font Awesome 6 Pro";
|
|
@@ -579,26 +579,26 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
|
|
|
579
579
|
.svg-inline--fa mask .fa-primary,
|
|
580
580
|
.svg-inline--fa mask .fa-secondary {
|
|
581
581
|
fill: black;
|
|
582
|
-
}`;function eu(){const e=Gc,t=Yc,n=j.cssPrefix,r=j.replacementClass;let o=pg;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 ni=!1;function To(){j.autoAddCss&&!ni&&(cg(eu()),ni=!0)}var mg={mixout(){return{dom:{css:eu,insertCss:To}}},hooks(){return{beforeDOMElementCreation(){To()},beforeI2svg(){To()}}}};const lt=$t||{};lt[it]||(lt[it]={});lt[it].styles||(lt[it].styles={});lt[it].hooks||(lt[it].hooks={});lt[it].shims||(lt[it].shims=[]);var Ye=lt[it];const tu=[],nu=function(){de.removeEventListener("DOMContentLoaded",nu),jr=1,tu.map(e=>e())};let jr=!1;dt&&(jr=(de.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(de.readyState),jr||de.addEventListener("DOMContentLoaded",nu));function gg(e){dt&&(jr?setTimeout(e,0):tu.push(e))}function dr(e){const{tag:t,attributes:n={},children:r=[]}=e;return typeof e=="string"?Zc(e):"<".concat(t," ").concat(fg(n),">").concat(r.map(dr).join(""),"</").concat(t,">")}function ri(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}var Oo=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 bg(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 Es(e){const t=bg(e);return t.length===1?t[0].toString(16):null}function yg(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 oi(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=oi(t);typeof Ye.hooks.addPack=="function"&&!r?Ye.hooks.addPack(e,oi(t)):Ye.styles[e]=O(O({},Ye.styles[e]||{}),o),e==="fas"&&Cs("fa",t)}const{styles:tr,shims:vg}=Ye,ru=Object.keys(na),wg=ru.reduce((e,t)=>(e[t]=Object.keys(na[t]),e),{});let sa=null,ou={},su={},au={},iu={},lu={};function xg(e){return~sg.indexOf(e)}function Eg(e,t){const n=t.split("-"),r=n[0],o=n.slice(1).join("-");return r===e&&o!==""&&!xg(o)?o:null}const cu=()=>{const e=r=>Oo(tr,(o,s,a)=>(o[a]=Oo(s,r,{}),o),{});ou=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)),su=e((r,o,s)=>(r[s]=s,o[2]&&o[2].filter(i=>typeof i=="string").forEach(i=>{r[i]=s}),r)),lu=e((r,o,s)=>{const a=o[2];return r[s]=s,a.forEach(i=>{r[i]=s}),r});const t="far"in tr||j.autoFetchSvg,n=Oo(vg,(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:{}});au=n.names,iu=n.unicodes,sa=io(j.styleDefault,{family:j.familyDefault})};lg(e=>{sa=io(e.styleDefault,{family:j.familyDefault})});cu();function aa(e,t){return(ou[e]||{})[t]}function Cg(e,t){return(su[e]||{})[t]}function Ht(e,t){return(lu[e]||{})[t]}function uu(e){return au[e]||{prefix:null,iconName:null}}function Sg(e){const t=iu[e],n=aa("fas",e);return t||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function Ft(){return sa}const fu=()=>({prefix:null,iconName:null,rest:[]});function Tg(e){let t=Ce;const n=ru.reduce((r,o)=>(r[o]="".concat(j.cssPrefix,"-").concat(o),r),{});return qc.forEach(r=>{(e.includes(n[r])||e.some(o=>wg[r].includes(o)))&&(t=r)}),t}function io(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{family:n=Ce}=t,r=eg[n][e];if(n===so&&!e)return"fad";const o=ti[n][e]||ti[n][r],s=e in Ye.styles?e:null;return o||s||null}function Og(e){let t=[],n=null;return e.forEach(r=>{const o=Eg(j.cssPrefix,r);o?n=o:r&&t.push(r)}),{iconName:n,rest:t}}function si(e){return e.sort().filter((t,n,r)=>r.indexOf(t)===n)}function lo(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{skipLookups:n=!1}=t;let r=null;const o=gs.concat(Um),s=si(e.filter(f=>o.includes(f))),a=si(e.filter(f=>!gs.includes(f))),i=s.filter(f=>(r=f,!Wc.includes(f))),[l=null]=i,c=Tg(s),u=O(O({},Og(a)),{},{prefix:io(l,{family:c})});return O(O(O({},u),Rg({values:e,family:c,styles:tr,config:j,canonical:u,givenPrefix:r})),Pg(n,r,u))}function Pg(e,t,n){let{prefix:r,iconName:o}=n;if(e||!r||!o)return{prefix:r,iconName:o};const s=t==="fa"?uu(o):{},a=Ht(r,o);return o=s.iconName||a||o,r=s.prefix||r,r==="far"&&!tr.far&&tr.fas&&!j.autoFetchSvg&&(r="fas"),{prefix:r,iconName:o}}const kg=qc.filter(e=>e!==Ce||e!==so),Ag=Object.keys(ms).filter(e=>e!==Ce).map(e=>Object.keys(ms[e])).flat();function Rg(e){const{values:t,family:n,canonical:r,givenPrefix:o="",styles:s={},config:a={}}=e,i=n===so,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&&kg.includes(n)&&(Object.keys(s).find(p=>Ag.includes(p))||a.autoFetchSvg)){const p=Mm.get(n).defaultShortPrefixId;r.prefix=p,r.iconName=Ht(r.prefix,r.iconName)||r.iconName}return(r.prefix==="fa"||o==="fa")&&(r.prefix=Ft()||"fas"),r}class $g{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]=O(O({},this.definitions[s]||{}),o[s]),Cs(s,o[s]);const a=na[Ce][s];a&&Cs(a,o[s]),cu()})}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 ai=[],ln={};const pn={},Fg=Object.keys(pn);function Ig(e,t){let{mixoutsTo:n}=t;return ai=e,ln={},Object.keys(pn).forEach(r=>{Fg.indexOf(r)===-1&&delete pn[r]}),ai.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=>{ln[a]||(ln[a]=[]),ln[a].push(s[a])})}r.provides&&r.provides(pn)}),n}function Ss(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(ln[e]||[]).forEach(a=>{t=a.apply(null,[t,...r])}),t}function tn(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];(ln[e]||[]).forEach(s=>{s.apply(null,n)})}function It(){const e=arguments[0],t=Array.prototype.slice.call(arguments,1);return pn[e]?pn[e].apply(null,t):void 0}function Ts(e){e.prefix==="fa"&&(e.prefix="fas");let{iconName:t}=e;const n=e.prefix||Ft();if(t)return t=Ht(n,t)||t,ri(du.definitions,n,t)||ri(Ye.styles,n,t)}const du=new $g,Mg=()=>{j.autoReplaceSvg=!1,j.observeMutations=!1,tn("noAuto")},Ng={i2svg:function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return dt?(tn("beforeI2svg",e),It("pseudoElements2svg",e),It("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,gg(()=>{_g({autoReplaceSvgRoot:t}),tn("watch",e)})}},Lg={icon:e=>{if(e===null)return null;if(typeof e=="object"&&e.prefix&&e.iconName)return{prefix:e.prefix,iconName:Ht(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=io(e[0]);return{prefix:n,iconName:Ht(n,t)||t}}if(typeof e=="string"&&(e.indexOf("".concat(j.cssPrefix,"-"))>-1||e.match(tg))){const t=lo(e.split(" "),{skipLookups:!0});return{prefix:t.prefix||Ft(),iconName:Ht(t.prefix,t.iconName)||t.iconName}}if(typeof e=="string"){const t=Ft();return{prefix:t,iconName:Ht(t,e)||e}}}},$e={noAuto:Mg,config:j,dom:Ng,parse:Lg,library:du,findIconDefinition:Ts,toHtml:dr},_g=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{autoReplaceSvgRoot:t=de}=e;(Object.keys(Ye.styles).length>0||j.autoFetchSvg)&&dt&&j.autoReplaceSvg&&$e.dom.i2svg({node:t})};function co(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(n=>dr(n))}}),Object.defineProperty(e,"node",{get:function(){if(!dt)return;const n=de.createElement("div");return n.innerHTML=e.html,n.children}}),e}function Dg(e){let{children:t,main:n,mask:r,attributes:o,styles:s,transform:a}=e;if(oa(a)&&n.found&&!r.found){const{width:i,height:l}=n,c={x:i/l/2,y:.5};o.style=ao(O(O({},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 jg(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:O(O({},o),{},{id:a}),children:r}]}]}function ia(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,y=jm.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 b={children:[],attributes:O(O({},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=y&&!~u.classes.indexOf("fa-fw")?{width:"".concat(p/h*16*.0625,"em")}:{};f&&(b.attributes[en]=""),i&&(b.children.push({tag:"title",attributes:{id:b.attributes["aria-labelledby"]||"title-".concat(c||er())},children:[i]}),delete b.attributes.title);const E=O(O({},b),{},{prefix:r,iconName:o,main:t,mask:n,maskId:l,transform:s,symbol:a,styles:O(O({},x),u.styles)}),{children:w,attributes:S}=n.found&&t.found?It("generateAbstractMask",E)||{children:[],attributes:{}}:It("generateAbstractIcon",E)||{children:[],attributes:{}};return E.children=w,E.attributes=S,a?jg(E):Dg(E)}function ii(e){const{content:t,width:n,height:r,transform:o,title:s,extra:a,watchable:i=!1}=e,l=O(O(O({},a.attributes),s?{title:s}:{}),{},{class:a.classes.join(" ")});i&&(l[en]="");const c=O({},a.styles);oa(o)&&(c.transform=hg({transform:o,startCentered:!0,width:n,height:r}),c["-webkit-transform"]=c.transform);const u=ao(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 zg(e){const{content:t,title:n,extra:r}=e,o=O(O(O({},r.attributes),n?{title:n}:{}),{},{class:r.classes.join(" ")}),s=ao(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:Po}=Ye;function Os(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(So.GROUP)},children:[{tag:"path",attributes:{class:"".concat(j.cssPrefix,"-").concat(So.SECONDARY),fill:"currentColor",d:r[0]}},{tag:"path",attributes:{class:"".concat(j.cssPrefix,"-").concat(So.PRIMARY),fill:"currentColor",d:r[1]}}]}:o={tag:"path",attributes:{fill:"currentColor",d:r}},{found:!0,width:t,height:n,icon:o}}const Hg={found:!1,width:512,height:512};function Ug(e,t){!Kc&&!j.showMissingIcons&&e&&console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}function Ps(e,t){let n=t;return t==="fa"&&j.styleDefault!==null&&(t=Ft()),new Promise((r,o)=>{if(n==="fa"){const s=uu(e)||{};e=s.iconName||e,t=s.prefix||t}if(e&&t&&Po[t]&&Po[t][e]){const s=Po[t][e];return r(Os(s))}Ug(e,t),r(O(O({},Hg),{},{icon:j.showMissingIcons&&e?It("missingIconAbstract")||{}:{}}))})}const li=()=>{},ks=j.measurePerformance&&xr&&xr.mark&&xr.measure?xr:{mark:li,measure:li},Hn='FA "6.7.2"',Bg=e=>(ks.mark("".concat(Hn," ").concat(e," begins")),()=>hu(e)),hu=e=>{ks.mark("".concat(Hn," ").concat(e," ends")),ks.measure("".concat(Hn," ").concat(e),"".concat(Hn," ").concat(e," begins"),"".concat(Hn," ").concat(e," ends"))};var la={begin:Bg,end:hu};const Pr=()=>{};function ci(e){return typeof(e.getAttribute?e.getAttribute(en):null)=="string"}function Wg(e){const t=e.getAttribute?e.getAttribute(ea):null,n=e.getAttribute?e.getAttribute(ta):null;return t&&n}function qg(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(j.replacementClass)}function Vg(){return j.autoReplaceSvg===!0?kr.replace:kr[j.autoReplaceSvg]||kr.replace}function Gg(e){return de.createElementNS("http://www.w3.org/2000/svg",e)}function Yg(e){return de.createElement(e)}function pu(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{ceFn:n=e.tag==="svg"?Gg:Yg}=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(pu(s,{ceFn:n}))}),r}function Kg(e){let t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}const kr={replace:function(e){const t=e[0];if(t.parentNode)if(e[1].forEach(n=>{t.parentNode.insertBefore(pu(n),t)}),t.getAttribute(en)===null&&j.keepOriginalSource){let n=de.createComment(Kg(t));t.parentNode.replaceChild(n,t)}else t.remove()},nest:function(e){const t=e[0],n=e[1];if(~ra(t).indexOf(j.replacementClass))return kr.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=>dr(s)).join(`
|
|
583
|
-
`);t.setAttribute(en,""),t.innerHTML=o}};function ui(e){e()}function mu(e,t){const n=typeof t=="function"?t:Pr;if(e.length===0)n();else{let r=ui;j.mutateApproach===Jm&&(r=$t.requestAnimationFrame||ui),r(()=>{const o=Vg(),s=la.begin("mutate");e.map(o),s(),n()})}}let ca=!1;function gu(){ca=!0}function As(){ca=!1}let zr=null;function fi(e){if(!Xa||!j.observeMutations)return;const{treeCallback:t=Pr,nodeCallback:n=Pr,pseudoElementsCallback:r=Pr,observeMutationsRoot:o=de}=e;zr=new Xa(s=>{if(ca)return;const a=Ft();Mn(s).forEach(i=>{if(i.type==="childList"&&i.addedNodes.length>0&&!ci(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"&&ci(i.target)&&~og.indexOf(i.attributeName))if(i.attributeName==="class"&&Wg(i.target)){const{prefix:l,iconName:c}=lo(ra(i.target));i.target.setAttribute(ea,l||a),c&&i.target.setAttribute(ta,c)}else qg(i.target)&&n(i.target)})}),dt&&zr.observe(o,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}function Qg(){zr&&zr.disconnect()}function Xg(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 Jg(e){const t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),r=e.innerText!==void 0?e.innerText.trim():"";let o=lo(ra(e));return o.prefix||(o.prefix=Ft()),t&&n&&(o.prefix=t,o.iconName=n),o.iconName&&o.prefix||(o.prefix&&r.length>0&&(o.iconName=Cg(o.prefix,e.innerText)||aa(o.prefix,Es(e.innerText))),!o.iconName&&j.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(o.iconName=e.firstChild.data)),o}function Zg(e){const t=Mn(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||er()):(t["aria-hidden"]="true",t.focusable="false")),t}function eb(){return{iconName:null,title:null,titleId:null,prefix:null,transform:Ge,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function di(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0};const{iconName:n,prefix:r,rest:o}=Jg(e),s=Zg(e),a=
|
|
584
|
-
`),e.removeAttribute(n),r()}).catch(o)}else r()}else r()})}function pb(e){return Promise.all([gi(e,"::before"),gi(e,"::after")])}function mb(e){return e.parentNode!==document.head&&!~Zm.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(
|
|
582
|
+
}`;function eu(){const e=Gc,t=Yc,n=j.cssPrefix,r=j.replacementClass;let o=pg;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 ni=!1;function To(){j.autoAddCss&&!ni&&(cg(eu()),ni=!0)}var mg={mixout(){return{dom:{css:eu,insertCss:To}}},hooks(){return{beforeDOMElementCreation(){To()},beforeI2svg(){To()}}}};const lt=$t||{};lt[it]||(lt[it]={});lt[it].styles||(lt[it].styles={});lt[it].hooks||(lt[it].hooks={});lt[it].shims||(lt[it].shims=[]);var Ye=lt[it];const tu=[],nu=function(){de.removeEventListener("DOMContentLoaded",nu),jr=1,tu.map(e=>e())};let jr=!1;dt&&(jr=(de.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(de.readyState),jr||de.addEventListener("DOMContentLoaded",nu));function gg(e){dt&&(jr?setTimeout(e,0):tu.push(e))}function dr(e){const{tag:t,attributes:n={},children:r=[]}=e;return typeof e=="string"?Zc(e):"<".concat(t," ").concat(fg(n),">").concat(r.map(dr).join(""),"</").concat(t,">")}function ri(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}var So=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 bg(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 Es(e){const t=bg(e);return t.length===1?t[0].toString(16):null}function vg(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 oi(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=oi(t);typeof Ye.hooks.addPack=="function"&&!r?Ye.hooks.addPack(e,oi(t)):Ye.styles[e]=S(S({},Ye.styles[e]||{}),o),e==="fas"&&Cs("fa",t)}const{styles:tr,shims:yg}=Ye,ru=Object.keys(na),wg=ru.reduce((e,t)=>(e[t]=Object.keys(na[t]),e),{});let sa=null,ou={},su={},au={},iu={},lu={};function xg(e){return~sg.indexOf(e)}function Eg(e,t){const n=t.split("-"),r=n[0],o=n.slice(1).join("-");return r===e&&o!==""&&!xg(o)?o:null}const cu=()=>{const e=r=>So(tr,(o,s,a)=>(o[a]=So(s,r,{}),o),{});ou=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)),su=e((r,o,s)=>(r[s]=s,o[2]&&o[2].filter(i=>typeof i=="string").forEach(i=>{r[i]=s}),r)),lu=e((r,o,s)=>{const a=o[2];return r[s]=s,a.forEach(i=>{r[i]=s}),r});const t="far"in tr||j.autoFetchSvg,n=So(yg,(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:{}});au=n.names,iu=n.unicodes,sa=io(j.styleDefault,{family:j.familyDefault})};lg(e=>{sa=io(e.styleDefault,{family:j.familyDefault})});cu();function aa(e,t){return(ou[e]||{})[t]}function Cg(e,t){return(su[e]||{})[t]}function Ht(e,t){return(lu[e]||{})[t]}function uu(e){return au[e]||{prefix:null,iconName:null}}function Og(e){const t=iu[e],n=aa("fas",e);return t||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function Ft(){return sa}const fu=()=>({prefix:null,iconName:null,rest:[]});function Tg(e){let t=Ce;const n=ru.reduce((r,o)=>(r[o]="".concat(j.cssPrefix,"-").concat(o),r),{});return qc.forEach(r=>{(e.includes(n[r])||e.some(o=>wg[r].includes(o)))&&(t=r)}),t}function io(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{family:n=Ce}=t,r=eg[n][e];if(n===so&&!e)return"fad";const o=ti[n][e]||ti[n][r],s=e in Ye.styles?e:null;return o||s||null}function Sg(e){let t=[],n=null;return e.forEach(r=>{const o=Eg(j.cssPrefix,r);o?n=o:r&&t.push(r)}),{iconName:n,rest:t}}function si(e){return e.sort().filter((t,n,r)=>r.indexOf(t)===n)}function lo(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{skipLookups:n=!1}=t;let r=null;const o=gs.concat(Um),s=si(e.filter(f=>o.includes(f))),a=si(e.filter(f=>!gs.includes(f))),i=s.filter(f=>(r=f,!Wc.includes(f))),[l=null]=i,c=Tg(s),u=S(S({},Sg(a)),{},{prefix:io(l,{family:c})});return S(S(S({},u),Rg({values:e,family:c,styles:tr,config:j,canonical:u,givenPrefix:r})),Pg(n,r,u))}function Pg(e,t,n){let{prefix:r,iconName:o}=n;if(e||!r||!o)return{prefix:r,iconName:o};const s=t==="fa"?uu(o):{},a=Ht(r,o);return o=s.iconName||a||o,r=s.prefix||r,r==="far"&&!tr.far&&tr.fas&&!j.autoFetchSvg&&(r="fas"),{prefix:r,iconName:o}}const kg=qc.filter(e=>e!==Ce||e!==so),Ag=Object.keys(ms).filter(e=>e!==Ce).map(e=>Object.keys(ms[e])).flat();function Rg(e){const{values:t,family:n,canonical:r,givenPrefix:o="",styles:s={},config:a={}}=e,i=n===so,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&&kg.includes(n)&&(Object.keys(s).find(p=>Ag.includes(p))||a.autoFetchSvg)){const p=Mm.get(n).defaultShortPrefixId;r.prefix=p,r.iconName=Ht(r.prefix,r.iconName)||r.iconName}return(r.prefix==="fa"||o==="fa")&&(r.prefix=Ft()||"fas"),r}class $g{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]=S(S({},this.definitions[s]||{}),o[s]),Cs(s,o[s]);const a=na[Ce][s];a&&Cs(a,o[s]),cu()})}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 ai=[],ln={};const pn={},Fg=Object.keys(pn);function Ig(e,t){let{mixoutsTo:n}=t;return ai=e,ln={},Object.keys(pn).forEach(r=>{Fg.indexOf(r)===-1&&delete pn[r]}),ai.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=>{ln[a]||(ln[a]=[]),ln[a].push(s[a])})}r.provides&&r.provides(pn)}),n}function Os(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(ln[e]||[]).forEach(a=>{t=a.apply(null,[t,...r])}),t}function tn(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];(ln[e]||[]).forEach(s=>{s.apply(null,n)})}function It(){const e=arguments[0],t=Array.prototype.slice.call(arguments,1);return pn[e]?pn[e].apply(null,t):void 0}function Ts(e){e.prefix==="fa"&&(e.prefix="fas");let{iconName:t}=e;const n=e.prefix||Ft();if(t)return t=Ht(n,t)||t,ri(du.definitions,n,t)||ri(Ye.styles,n,t)}const du=new $g,Mg=()=>{j.autoReplaceSvg=!1,j.observeMutations=!1,tn("noAuto")},Ng={i2svg:function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return dt?(tn("beforeI2svg",e),It("pseudoElements2svg",e),It("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,gg(()=>{_g({autoReplaceSvgRoot:t}),tn("watch",e)})}},Lg={icon:e=>{if(e===null)return null;if(typeof e=="object"&&e.prefix&&e.iconName)return{prefix:e.prefix,iconName:Ht(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=io(e[0]);return{prefix:n,iconName:Ht(n,t)||t}}if(typeof e=="string"&&(e.indexOf("".concat(j.cssPrefix,"-"))>-1||e.match(tg))){const t=lo(e.split(" "),{skipLookups:!0});return{prefix:t.prefix||Ft(),iconName:Ht(t.prefix,t.iconName)||t.iconName}}if(typeof e=="string"){const t=Ft();return{prefix:t,iconName:Ht(t,e)||e}}}},$e={noAuto:Mg,config:j,dom:Ng,parse:Lg,library:du,findIconDefinition:Ts,toHtml:dr},_g=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{autoReplaceSvgRoot:t=de}=e;(Object.keys(Ye.styles).length>0||j.autoFetchSvg)&&dt&&j.autoReplaceSvg&&$e.dom.i2svg({node:t})};function co(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(n=>dr(n))}}),Object.defineProperty(e,"node",{get:function(){if(!dt)return;const n=de.createElement("div");return n.innerHTML=e.html,n.children}}),e}function Dg(e){let{children:t,main:n,mask:r,attributes:o,styles:s,transform:a}=e;if(oa(a)&&n.found&&!r.found){const{width:i,height:l}=n,c={x:i/l/2,y:.5};o.style=ao(S(S({},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 jg(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:S(S({},o),{},{id:a}),children:r}]}]}function ia(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,v=jm.includes(r),g=[j.replacementClass,o?"".concat(j.cssPrefix,"-").concat(o):""].filter(y=>u.classes.indexOf(y)===-1).filter(y=>y!==""||!!y).concat(u.classes).join(" ");let b={children:[],attributes:S(S({},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=v&&!~u.classes.indexOf("fa-fw")?{width:"".concat(p/h*16*.0625,"em")}:{};f&&(b.attributes[en]=""),i&&(b.children.push({tag:"title",attributes:{id:b.attributes["aria-labelledby"]||"title-".concat(c||er())},children:[i]}),delete b.attributes.title);const E=S(S({},b),{},{prefix:r,iconName:o,main:t,mask:n,maskId:l,transform:s,symbol:a,styles:S(S({},x),u.styles)}),{children:w,attributes:O}=n.found&&t.found?It("generateAbstractMask",E)||{children:[],attributes:{}}:It("generateAbstractIcon",E)||{children:[],attributes:{}};return E.children=w,E.attributes=O,a?jg(E):Dg(E)}function ii(e){const{content:t,width:n,height:r,transform:o,title:s,extra:a,watchable:i=!1}=e,l=S(S(S({},a.attributes),s?{title:s}:{}),{},{class:a.classes.join(" ")});i&&(l[en]="");const c=S({},a.styles);oa(o)&&(c.transform=hg({transform:o,startCentered:!0,width:n,height:r}),c["-webkit-transform"]=c.transform);const u=ao(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 zg(e){const{content:t,title:n,extra:r}=e,o=S(S(S({},r.attributes),n?{title:n}:{}),{},{class:r.classes.join(" ")}),s=ao(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:Po}=Ye;function Ss(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(Oo.GROUP)},children:[{tag:"path",attributes:{class:"".concat(j.cssPrefix,"-").concat(Oo.SECONDARY),fill:"currentColor",d:r[0]}},{tag:"path",attributes:{class:"".concat(j.cssPrefix,"-").concat(Oo.PRIMARY),fill:"currentColor",d:r[1]}}]}:o={tag:"path",attributes:{fill:"currentColor",d:r}},{found:!0,width:t,height:n,icon:o}}const Hg={found:!1,width:512,height:512};function Ug(e,t){!Kc&&!j.showMissingIcons&&e&&console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}function Ps(e,t){let n=t;return t==="fa"&&j.styleDefault!==null&&(t=Ft()),new Promise((r,o)=>{if(n==="fa"){const s=uu(e)||{};e=s.iconName||e,t=s.prefix||t}if(e&&t&&Po[t]&&Po[t][e]){const s=Po[t][e];return r(Ss(s))}Ug(e,t),r(S(S({},Hg),{},{icon:j.showMissingIcons&&e?It("missingIconAbstract")||{}:{}}))})}const li=()=>{},ks=j.measurePerformance&&xr&&xr.mark&&xr.measure?xr:{mark:li,measure:li},Hn='FA "6.7.2"',Bg=e=>(ks.mark("".concat(Hn," ").concat(e," begins")),()=>hu(e)),hu=e=>{ks.mark("".concat(Hn," ").concat(e," ends")),ks.measure("".concat(Hn," ").concat(e),"".concat(Hn," ").concat(e," begins"),"".concat(Hn," ").concat(e," ends"))};var la={begin:Bg,end:hu};const Pr=()=>{};function ci(e){return typeof(e.getAttribute?e.getAttribute(en):null)=="string"}function Wg(e){const t=e.getAttribute?e.getAttribute(ea):null,n=e.getAttribute?e.getAttribute(ta):null;return t&&n}function qg(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(j.replacementClass)}function Vg(){return j.autoReplaceSvg===!0?kr.replace:kr[j.autoReplaceSvg]||kr.replace}function Gg(e){return de.createElementNS("http://www.w3.org/2000/svg",e)}function Yg(e){return de.createElement(e)}function pu(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{ceFn:n=e.tag==="svg"?Gg:Yg}=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(pu(s,{ceFn:n}))}),r}function Kg(e){let t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}const kr={replace:function(e){const t=e[0];if(t.parentNode)if(e[1].forEach(n=>{t.parentNode.insertBefore(pu(n),t)}),t.getAttribute(en)===null&&j.keepOriginalSource){let n=de.createComment(Kg(t));t.parentNode.replaceChild(n,t)}else t.remove()},nest:function(e){const t=e[0],n=e[1];if(~ra(t).indexOf(j.replacementClass))return kr.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=>dr(s)).join(`
|
|
583
|
+
`);t.setAttribute(en,""),t.innerHTML=o}};function ui(e){e()}function mu(e,t){const n=typeof t=="function"?t:Pr;if(e.length===0)n();else{let r=ui;j.mutateApproach===Jm&&(r=$t.requestAnimationFrame||ui),r(()=>{const o=Vg(),s=la.begin("mutate");e.map(o),s(),n()})}}let ca=!1;function gu(){ca=!0}function As(){ca=!1}let zr=null;function fi(e){if(!Xa||!j.observeMutations)return;const{treeCallback:t=Pr,nodeCallback:n=Pr,pseudoElementsCallback:r=Pr,observeMutationsRoot:o=de}=e;zr=new Xa(s=>{if(ca)return;const a=Ft();Mn(s).forEach(i=>{if(i.type==="childList"&&i.addedNodes.length>0&&!ci(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"&&ci(i.target)&&~og.indexOf(i.attributeName))if(i.attributeName==="class"&&Wg(i.target)){const{prefix:l,iconName:c}=lo(ra(i.target));i.target.setAttribute(ea,l||a),c&&i.target.setAttribute(ta,c)}else qg(i.target)&&n(i.target)})}),dt&&zr.observe(o,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}function Qg(){zr&&zr.disconnect()}function Xg(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 Jg(e){const t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),r=e.innerText!==void 0?e.innerText.trim():"";let o=lo(ra(e));return o.prefix||(o.prefix=Ft()),t&&n&&(o.prefix=t,o.iconName=n),o.iconName&&o.prefix||(o.prefix&&r.length>0&&(o.iconName=Cg(o.prefix,e.innerText)||aa(o.prefix,Es(e.innerText))),!o.iconName&&j.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(o.iconName=e.firstChild.data)),o}function Zg(e){const t=Mn(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||er()):(t["aria-hidden"]="true",t.focusable="false")),t}function eb(){return{iconName:null,title:null,titleId:null,prefix:null,transform:Ge,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function di(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0};const{iconName:n,prefix:r,rest:o}=Jg(e),s=Zg(e),a=Os("parseNodeAttributes",{},e);let i=t.styleParser?Xg(e):[];return S({iconName:n,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:r,transform:Ge,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:o,styles:i,attributes:s}},a)}const{styles:tb}=Ye;function bu(e){const t=j.autoReplaceSvg==="nest"?di(e,{styleParser:!1}):di(e);return~t.extra.classes.indexOf(Xc)?It("generateLayersText",e,t):It("generateSvgReplacementMutation",e,t)}function nb(){return[...Lm,...gs]}function hi(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!dt)return Promise.resolve();const n=de.documentElement.classList,r=u=>n.add("".concat(ei,"-").concat(u)),o=u=>n.remove("".concat(ei,"-").concat(u)),s=j.autoFetchSvg?nb():Wc.concat(Object.keys(tb));s.includes("fa")||s.push("fa");const a=[".".concat(Xc,":not([").concat(en,"])")].concat(s.map(u=>".".concat(u,":not([").concat(en,"])"))).join(", ");if(a.length===0)return Promise.resolve();let i=[];try{i=Mn(e.querySelectorAll(a))}catch{}if(i.length>0)r("pending"),o("complete");else return Promise.resolve();const l=la.begin("onTree"),c=i.reduce((u,f)=>{try{const p=bu(f);p&&u.push(p)}catch(p){Kc||p.name==="MissingIcon"&&console.error(p)}return u},[]);return new Promise((u,f)=>{Promise.all(c).then(p=>{mu(p,()=>{r("active"),r("complete"),o("pending"),typeof t=="function"&&t(),l(),u()})}).catch(p=>{l(),f(p)})})}function rb(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;bu(e).then(n=>{n&&mu([n],t)})}function ob(e){return function(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=(t||{}).icon?t:Ts(t||{});let{mask:o}=n;return o&&(o=(o||{}).icon?o:Ts(o||{})),e(r,S(S({},n),{},{mask:o}))}}const sb=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{transform:n=Ge,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 co(S({type:"icon"},e),()=>(tn("beforeDOMElementCreation",{iconDefinition:e,params:t}),j.autoA11y&&(a?c["aria-labelledby"]="".concat(j.replacementClass,"-title-").concat(i||er()):(c["aria-hidden"]="true",c.focusable="false")),ia({icons:{main:Ss(h),mask:o?Ss(o.icon):{found:!1,width:null,height:null,icon:{}}},prefix:f,iconName:p,transform:S(S({},Ge),n),symbol:r,title:a,maskId:s,titleId:i,extra:{attributes:c,styles:u,classes:l}})))};var ab={mixout(){return{icon:ob(sb)}},hooks(){return{mutationObserverCallbacks(e){return e.treeCallback=hi,e.nodeCallback=rb,e}}},provides(e){e.i2svg=function(t){const{node:n=de,callback:r=()=>{}}=t;return hi(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([Ps(r,a),c.iconName?Ps(c.iconName,c.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(v=>{let[g,b]=v;p([t,ia({icons:{main:g,mask:b},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=ao(a);i.length>0&&(r.style=i);let l;return oa(s)&&(l=It("generateAbstractTransformGrouping",{main:o,transform:s,containerWidth:o.width,iconWidth:o.width})),n.push(l||o.icon),{children:n,attributes:r}}}},ib={mixout(){return{layer(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{classes:n=[]}=t;return co({type:"layer"},()=>{tn("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}]})}}}},lb={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 co({type:"counter",content:e},()=>(tn("beforeDOMElementCreation",{content:e,params:t}),zg({content:e.toString(),title:n,extra:{attributes:o,styles:s,classes:["".concat(j.cssPrefix,"-layers-counter"),...r]}})))}}}},cb={mixout(){return{text(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{transform:n=Ge,title:r=null,classes:o=[],attributes:s={},styles:a={}}=t;return co({type:"text",content:e},()=>(tn("beforeDOMElementCreation",{content:e,params:t}),ii({content:e,transform:S(S({},Ge),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(Uc){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,ii({content:t.innerHTML,width:a,height:i,transform:o,title:r,extra:s,watchable:!0})])}}};const ub=new RegExp('"',"ug"),pi=[1105920,1112319],mi=S(S(S(S({},{FontAwesome:{normal:"fas",400:"fas"}}),Im),Qm),Bm),Rs=Object.keys(mi).reduce((e,t)=>(e[t.toLowerCase()]=mi[t],e),{}),fb=Object.keys(Rs).reduce((e,t)=>{const n=Rs[t];return e[t]=n[900]||[...Object.entries(n)][0][1],e},{});function db(e){const t=e.replace(ub,""),n=vg(t,0),r=n>=pi[0]&&n<=pi[1],o=t.length===2?t[0]===t[1]:!1;return{value:Es(o?t[0]:t),isSecondary:r||o}}function hb(e,t){const n=e.replace(/^['"]|['"]$/g,"").toLowerCase(),r=parseInt(t),o=isNaN(r)?"normal":r;return(Rs[n]||{})[o]||fb[n]}function gi(e,t){const n="".concat(Xm).concat(t.replace(":","-"));return new Promise((r,o)=>{if(e.getAttribute(n)!==null)return r();const a=Mn(e.children).filter(p=>p.getAttribute(vs)===t)[0],i=$t.getComputedStyle(e,t),l=i.getPropertyValue("font-family"),c=l.match(ng),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=hb(l,u);const{value:v,isSecondary:g}=db(p),b=c[0].startsWith("FontAwesome");let x=aa(h,v),E=x;if(b){const w=Og(v);w.iconName&&w.prefix&&(x=w.iconName,h=w.prefix)}if(x&&!g&&(!a||a.getAttribute(ea)!==h||a.getAttribute(ta)!==E)){e.setAttribute(n,E),a&&e.removeChild(a);const w=eb(),{extra:O}=w;O.attributes[vs]=t,Ps(x,h).then(y=>{const N=ia(S(S({},w),{},{icons:{main:y,mask:fu()},prefix:h,iconName:E,extra:O,watchable:!0})),q=de.createElementNS("http://www.w3.org/2000/svg","svg");t==="::before"?e.insertBefore(q,e.firstChild):e.appendChild(q),q.outerHTML=N.map(R=>dr(R)).join(`
|
|
584
|
+
`),e.removeAttribute(n),r()}).catch(o)}else r()}else r()})}function pb(e){return Promise.all([gi(e,"::before"),gi(e,"::after")])}function mb(e){return e.parentNode!==document.head&&!~Zm.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(vs)&&(!e.parentNode||e.parentNode.tagName!=="svg")}function bi(e){if(dt)return new Promise((t,n)=>{const r=Mn(e.querySelectorAll("*")).filter(mb).map(pb),o=la.begin("searchPseudoElements");gu(),Promise.all(r).then(()=>{o(),As(),t()}).catch(()=>{o(),As(),n()})})}var gb={hooks(){return{mutationObserverCallbacks(e){return e.pseudoElementsCallback=bi,e}}},provides(e){e.pseudoElements2svg=function(t){const{node:n=de}=t;j.searchPseudoElements&&bi(n)}}};let vi=!1;var bb={mixout(){return{dom:{unwatch(){gu(),vi=!0}}}},hooks(){return{bootstrap(){fi(Os("mutationObserverCallbacks",{}))},noAuto(){Qg()},watch(e){const{observeMutationsRoot:t}=e;vi?As():fi(Os("mutationObserverCallbacks",{observeMutationsRoot:t}))}}}};const yi=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 vb={mixout(){return{parse:{transform:e=>yi(e)}}},hooks(){return{parseNodeAttributes(e,t){const n=t.getAttribute("data-fa-transform");return n&&(e.transform=yi(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:S({},p.outer),children:[{tag:"g",attributes:S({},p.inner),children:[{tag:n.icon.tag,children:n.icon.children,attributes:S(S({},n.icon.attributes),p.path)}]}]}}}};const ko={x:0,y:0,width:"100%",height:"100%"};function wi(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 yb(e){return e.tag==="g"?e.children:[e]}var wb={hooks(){return{parseNodeAttributes(e,t){const n=t.getAttribute("data-fa-mask"),r=n?lo(n.split(" ").map(o=>o.trim())):fu();return r.prefix||(r.prefix=Ft()),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=dg({transform:i,containerWidth:u,iconWidth:l}),h={tag:"rect",attributes:S(S({},ko),{},{fill:"white"})},v=c.children?{children:c.children.map(wi)}:{},g={tag:"g",attributes:S({},p.inner),children:[wi(S({tag:c.tag,attributes:S(S({},c.attributes),p.path)},v))]},b={tag:"g",attributes:S({},p.outer),children:[g]},x="mask-".concat(a||er()),E="clip-".concat(a||er()),w={tag:"mask",attributes:S(S({},ko),{},{id:x,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[h,b]},O={tag:"defs",children:[{tag:"clipPath",attributes:{id:E},children:yb(f)},w]};return n.push(O,{tag:"rect",attributes:S({fill:"currentColor","clip-path":"url(#".concat(E,")"),mask:"url(#".concat(x,")")},ko)}),{children:n,attributes:r}}}},xb={provides(e){let t=!1;$t.matchMedia&&(t=$t.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:S(S({},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=S(S({},o),{},{attributeName:"opacity"}),a={tag:"circle",attributes:S(S({},r),{},{cx:"256",cy:"364",r:"28"}),children:[]};return t||a.children.push({tag:"animate",attributes:S(S({},o),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:S(S({},s),{},{values:"1;0;1;1;0;1;"})}),n.push(a),n.push({tag:"path",attributes:S(S({},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:S(S({},s),{},{values:"1;0;0;0;0;1;"})}]}),t||n.push({tag:"path",attributes:S(S({},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:S(S({},s),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:n}}}},Eb={hooks(){return{parseNodeAttributes(e,t){const n=t.getAttribute("data-fa-symbol"),r=n===null?!1:n===""?!0:n;return e.symbol=r,e}}}},Cb=[mg,ab,ib,lb,cb,gb,bb,vb,wb,xb,Eb];Ig(Cb,{mixoutsTo:$e});$e.noAuto;$e.config;$e.library;$e.dom;const $s=$e.parse;$e.findIconDefinition;$e.toHtml;const Ob=$e.icon;$e.layer;$e.text;$e.counter;var Cr={exports:{}},Or={exports:{}},se={};/** @license React v16.13.1
|
|
585
585
|
* react-is.production.min.js
|
|
586
586
|
*
|
|
587
587
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
588
588
|
*
|
|
589
589
|
* This source code is licensed under the MIT license found in the
|
|
590
590
|
* LICENSE file in the root directory of this source tree.
|
|
591
|
-
*/var xi;function Tb(){if(xi)return se;xi=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,
|
|
591
|
+
*/var xi;function Tb(){if(xi)return se;xi=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,v=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,E=e?Symbol.for("react.scope"):60119;function w(y){if(typeof y=="object"&&y!==null){var N=y.$$typeof;switch(N){case t:switch(y=y.type,y){case l:case c:case r:case s:case o:case f:return y;default:switch(y=y&&y.$$typeof,y){case i:case u:case v:case h:case a:return y;default:return N}}case n:return N}}}function O(y){return w(y)===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=v,se.Memo=h,se.Portal=n,se.Profiler=s,se.StrictMode=o,se.Suspense=f,se.isAsyncMode=function(y){return O(y)||w(y)===l},se.isConcurrentMode=O,se.isContextConsumer=function(y){return w(y)===i},se.isContextProvider=function(y){return w(y)===a},se.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===t},se.isForwardRef=function(y){return w(y)===u},se.isFragment=function(y){return w(y)===r},se.isLazy=function(y){return w(y)===v},se.isMemo=function(y){return w(y)===h},se.isPortal=function(y){return w(y)===n},se.isProfiler=function(y){return w(y)===s},se.isStrictMode=function(y){return w(y)===o},se.isSuspense=function(y){return w(y)===f},se.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===r||y===c||y===s||y===o||y===f||y===p||typeof y=="object"&&y!==null&&(y.$$typeof===v||y.$$typeof===h||y.$$typeof===a||y.$$typeof===i||y.$$typeof===u||y.$$typeof===b||y.$$typeof===x||y.$$typeof===E||y.$$typeof===g)},se.typeOf=w,se}var ae={};/** @license React v16.13.1
|
|
592
592
|
* react-is.development.js
|
|
593
593
|
*
|
|
594
594
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
595
595
|
*
|
|
596
596
|
* This source code is licensed under the MIT license found in the
|
|
597
597
|
* LICENSE file in the root directory of this source tree.
|
|
598
|
-
*/var Ei;function
|
|
598
|
+
*/var Ei;function Sb(){return Ei||(Ei=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,v=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,E=e?Symbol.for("react.scope"):60119;function w($){return typeof $=="string"||typeof $=="function"||$===r||$===c||$===s||$===o||$===f||$===p||typeof $=="object"&&$!==null&&($.$$typeof===v||$.$$typeof===h||$.$$typeof===a||$.$$typeof===i||$.$$typeof===u||$.$$typeof===b||$.$$typeof===x||$.$$typeof===E||$.$$typeof===g)}function O($){if(typeof $=="object"&&$!==null){var Fe=$.$$typeof;switch(Fe){case t:var on=$.type;switch(on){case l:case c:case r:case s:case o:case f:return on;default:var hr=on&&on.$$typeof;switch(hr){case i:case u:case v:case h:case a:return hr;default:return Fe}}case n:return Fe}}}var y=l,N=c,q=i,R=a,B=t,G=u,le=r,ue=v,oe=h,fe=n,W=s,Y=o,ne=f,P=!1;function V($){return P||(P=!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.")),C($)||O($)===l}function C($){return O($)===c}function k($){return O($)===i}function U($){return O($)===a}function A($){return typeof $=="object"&&$!==null&&$.$$typeof===t}function D($){return O($)===u}function K($){return O($)===r}function z($){return O($)===v}function I($){return O($)===h}function Q($){return O($)===n}function X($){return O($)===s}function Z($){return O($)===o}function ge($){return O($)===f}ae.AsyncMode=y,ae.ConcurrentMode=N,ae.ContextConsumer=q,ae.ContextProvider=R,ae.Element=B,ae.ForwardRef=G,ae.Fragment=le,ae.Lazy=ue,ae.Memo=oe,ae.Portal=fe,ae.Profiler=W,ae.StrictMode=Y,ae.Suspense=ne,ae.isAsyncMode=V,ae.isConcurrentMode=C,ae.isContextConsumer=k,ae.isContextProvider=U,ae.isElement=A,ae.isForwardRef=D,ae.isFragment=K,ae.isLazy=z,ae.isMemo=I,ae.isPortal=Q,ae.isProfiler=X,ae.isStrictMode=Z,ae.isSuspense=ge,ae.isValidElementType=w,ae.typeOf=O}()),ae}var Ci;function vu(){return Ci||(Ci=1,process.env.NODE_ENV==="production"?Or.exports=Tb():Or.exports=Sb()),Or.exports}/*
|
|
599
599
|
object-assign
|
|
600
600
|
(c) Sindre Sorhus
|
|
601
601
|
@license MIT
|
|
602
|
-
*/var Ao,
|
|
603
|
-
Valid keys: `+JSON.stringify(Object.keys(C),null," "));var $=ge(I,Z,D,K,z+"."+Z,n);if($)return $}return null}return b(k)}function fe(C){switch(typeof C){case"number":case"string":case"undefined":return!0;case"boolean":return!C;case"object":if(Array.isArray(C))return C.every(fe);if(C===null||i(C))return!0;var k=f(C);if(k){var U=k.call(C),A;if(k!==C.entries){for(;!(A=U.next()).done;)if(!fe(A.value))return!1}else for(;!(A=U.next()).done;){var D=A.value;if(D&&!fe(D[1]))return!1}}else return!1;return!0;default:return!1}}function W(C,k){return C==="symbol"?!0:k?k["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&k instanceof Symbol:!1}function Y(C){var k=typeof C;return Array.isArray(C)?"array":C instanceof RegExp?"object":W(k,C)?"symbol":k}function ne(C){if(typeof C>"u"||C===null)return""+C;var k=Y(C);if(k==="object"){if(C instanceof Date)return"date";if(C instanceof RegExp)return"regexp"}return k}function P(C){var k=ne(C);switch(k){case"array":case"object":return"an "+k;case"boolean":case"date":case"regexp":return"a "+k;default:return k}}function V(C){return!C.constructor||!C.constructor.name?p:C.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},Io}var Mo,Ai;function Rb(){if(Ai)return Mo;Ai=1;var e=ua();function t(){}function n(){}return n.resetWarningCache=t,Mo=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},Mo}var Ri;function $b(){if(Ri)return Cr.exports;if(Ri=1,process.env.NODE_ENV!=="production"){var e=
|
|
604
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Db(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,y=e.border,g=e.listItem,b=e.flip,x=e.size,E=e.rotation,w=e.pull,S=(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":y,"fa-li":g,"fa-flip":b===!0,"fa-flip-horizontal":b==="horizontal"||b==="both","fa-flip-vertical":b==="vertical"||b==="both"},cn(t,"fa-".concat(x),typeof x<"u"&&x!==null),cn(t,"fa-rotate-".concat(E),typeof E<"u"&&E!==null&&E!==0),cn(t,"fa-pull-".concat(w),typeof w<"u"&&w!==null),cn(t,"fa-swap-opacity",e.swapOpacity),t);return Object.keys(S).map(function(v){return S[v]?v:null}).filter(function(v){return v})}function jb(e){return e=e-0,e===e}function xu(e){return jb(e)?e:(e=e.replace(/[\-_\s]+(.)?/g,function(t,n){return n?n.toUpperCase():""}),e.substr(0,1).toLowerCase()+e.substr(1))}var zb=["style"];function Hb(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Ub(e){return e.split(";").map(function(t){return t.trim()}).filter(function(t){return t}).reduce(function(t,n){var r=n.indexOf(":"),o=xu(n.slice(0,r)),s=n.slice(r+1).trim();return o.startsWith("webkit")?t[Hb(o)]=s:t[o]=s,t},{})}function Eu(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 Eu(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=Ub(u);break;default:c.indexOf("aria-")===0||c.indexOf("data-")===0?l.attrs[c.toLowerCase()]=u:l.attrs[xu(c)]=u}return l},{attrs:{}}),s=n.style,a=s===void 0?{}:s,i=wu(n,zb);return o.attrs.style=At(At({},o.attrs.style),a),e.apply(void 0,[t.tag,At(At({},o.attrs),i)].concat(Fs(r)))}var Cu=!1;try{Cu=process.env.NODE_ENV==="production"}catch{}function Bb(){if(!Cu&&console&&typeof console.error=="function"){var e;(e=console).error.apply(e,arguments)}}function Fi(e){if(e&&Hr(e)==="object"&&e.prefix&&e.iconName&&e.icon)return e;if($s.icon)return $s.icon(e);if(e===null)return null;if(e&&Hr(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 No(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?cn({},e,t):{}}var Wb=["forwardedRef"];function Mt(e){var t=e.forwardedRef,n=wu(e,Wb),r=n.icon,o=n.mask,s=n.symbol,a=n.className,i=n.title,l=n.titleId,c=n.maskId,u=Fi(r),f=No("classes",[].concat(Fs(Db(n)),Fs(a.split(" ")))),p=No("transform",typeof n.transform=="string"?$s.transform(n.transform):n.transform),h=No("mask",Fi(o)),y=Sb(u,At(At(At(At({},f),p),h),{},{symbol:s,title:i,titleId:l,maskId:c}));if(!y)return Bb("Could not find icon",u),null;var g=y.abstract,b={ref:t};return Object.keys(n).forEach(function(x){Mt.defaultProps.hasOwnProperty(x)||(b[x]=n[x])}),qb(g[0],b)}Mt.displayName="FontAwesomeIcon";Mt.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};Mt.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 qb=Eu.bind(null,d.createElement);const Vb=async e=>await(await fetch(`${ar}/playbook-task-details`,{method:"POST",body:JSON.stringify(e)})).json(),Gb=({taskId:e,playbookId:t,enabled:n})=>{const{queryClient:r}=Rn(),o=async()=>Vb({taskId:+e,templateId:t.toString()}),s=["taskDetails",+e,t],a=js({queryKey:s,queryFn:o,enabled:n},r),i=()=>{r.prefetchQuery({queryFn:o,queryKey:s})};return{taskDetails:a.data,prefetchQuery:i,...a}},Yb=({buttons:e,onButtonClick:t,disabled:n})=>T.jsx("div",{className:"flex items-center justify-end",children:e.map(r=>T.jsx(Zn,{size:"smallCollapse",className:"ml-2",disabled:n,onClick:()=>{t(r)},children:hf[r]},r))});function Ii(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&fs(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 Lo(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 Kb(e){return e.matches("html,body")}function Mi(e){return(e==null?void 0:e.ownerDocument)||document}function _o(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 Qb(e){return"nativeEvent"in e}var Xb=typeof document<"u",Jb=function(){},Ms=Xb?d.useLayoutEffect:Jb;const Zb={...F},ey=Zb.useInsertionEffect,ty=ey||(e=>e());function an(e){const t=F.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return ty(()=>{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 ny="data-floating-ui-focusable",Ni="active",Li="selected",ry={...F};let _i=!1,oy=0;const Di=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+oy++;function sy(){const[e,t]=F.useState(()=>_i?Di():void 0);return Ms(()=>{e==null&&t(Di())},[]),F.useEffect(()=>{_i=!0},[]),e}const ay=ry.useId,iy=ay||sy;let Ns;process.env.NODE_ENV!=="production"&&(Ns=new Set);function ly(){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=Ns)!=null&&e.has(o))){var s;(s=Ns)==null||s.add(o),console.error(o)}}function cy(){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 uy=F.createContext(null),fy=F.createContext(null),dy=()=>{var e;return((e=F.useContext(uy))==null?void 0:e.id)||null},Su=()=>F.useContext(fy);function hy(e){return"data-floating-ui-"+e}function py(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const my={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},gy={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},ji=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 by(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:y}=t,g=Su(),b=an(typeof l=="function"?l:()=>!1),x=typeof l=="function"?b:l,E=F.useRef(!1),{escapeKey:w,outsidePress:S}=ji(h),{escapeKey:v,outsidePress:N}=ji(y),q=F.useRef(!1),R=F.useRef(-1),B=an(W=>{var Y;if(!n||!a||!i||W.key!=="Escape"||q.current)return;const ne=(Y=s.current.floatingContext)==null?void 0:Y.nodeId,P=g?_o(g.nodesRef.current,ne):[];if(!w&&(W.stopPropagation(),P.length>0)){let V=!0;if(P.forEach(C=>{var k;if((k=C.context)!=null&&k.open&&!C.context.dataRef.current.__escapeKeyBubbles){V=!1;return}}),!V)return}r(!1,Qb(W)?W.nativeEvent:W,"escape-key")}),G=an(W=>{var Y;const ne=()=>{var P;B(W),(P=Ln(W))==null||P.removeEventListener("keydown",ne)};(Y=Ln(W))==null||Y.addEventListener("keydown",ne)}),le=an(W=>{var Y;const ne=s.current.insideReactTree;s.current.insideReactTree=!1;const P=E.current;if(E.current=!1,c==="click"&&P||ne||typeof x=="function"&&!x(W))return;const V=Ln(W),C="["+hy("inert")+"]",k=Mi(o.floating).querySelectorAll(C);let U=me(V)?V:null;for(;U&&!rt(U);){const z=at(U);if(rt(z)||!me(z))break;U=z}if(k.length&&me(V)&&!Kb(V)&&!Ii(V,o.floating)&&Array.from(k).every(z=>!Ii(U,z)))return;if(He(V)&&fe){const z=rt(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,Fe=I.direction==="rtl",on=$&&(Fe?W.offsetX<=V.offsetWidth-V.clientWidth:W.offsetX>V.clientWidth),hr=ge&&W.offsetY>V.clientHeight;if(on||hr)return}const A=(Y=s.current.floatingContext)==null?void 0:Y.nodeId,D=g&&_o(g.nodesRef.current,A).some(z=>{var I;return Lo(W,(I=z.context)==null?void 0:I.elements.floating)});if(Lo(W,o.floating)||Lo(W,o.domReference)||D)return;const K=g?_o(g.nodesRef.current,A):[];if(K.length>0){let z=!0;if(K.forEach(I=>{var Q;if((Q=I.context)!=null&&Q.open&&!I.context.dataRef.current.__outsidePressBubbles){z=!1;return}}),!z)return}r(!1,W,"outside-press")}),ue=an(W=>{var Y;const ne=()=>{var P;le(W),(P=Ln(W))==null||P.removeEventListener(c,ne)};(Y=Ln(W))==null||Y.addEventListener(c,ne)});F.useEffect(()=>{if(!n||!a)return;s.current.__escapeKeyBubbles=w,s.current.__outsidePressBubbles=S;let W=-1;function Y(k){r(!1,k,"ancestor-scroll")}function ne(){window.clearTimeout(W),q.current=!0}function P(){W=window.setTimeout(()=>{q.current=!1},Xr()?5:0)}const V=Mi(o.floating);i&&(V.addEventListener("keydown",v?G:B,v),V.addEventListener("compositionstart",ne),V.addEventListener("compositionend",P)),x&&V.addEventListener(c,N?ue:le,N);let C=[];return p&&(me(o.domReference)&&(C=dn(o.domReference)),me(o.floating)&&(C=C.concat(dn(o.floating))),!me(o.reference)&&o.reference&&o.reference.contextElement&&(C=C.concat(dn(o.reference.contextElement)))),C=C.filter(k=>{var U;return k!==((U=V.defaultView)==null?void 0:U.visualViewport)}),C.forEach(k=>{k.addEventListener("scroll",Y,{passive:!0})}),()=>{i&&(V.removeEventListener("keydown",v?G:B,v),V.removeEventListener("compositionstart",ne),V.removeEventListener("compositionend",P)),x&&V.removeEventListener(c,N?ue:le,N),C.forEach(k=>{k.removeEventListener("scroll",Y)}),window.clearTimeout(W)}},[s,o,i,x,c,n,r,p,a,w,S,B,v,G,le,N,ue]),F.useEffect(()=>{s.current.insideReactTree=!1},[s,x,c]);const oe=F.useMemo(()=>({onKeyDown:B,...u&&{[my[f]]:W=>{r(!1,W.nativeEvent,"reference-press")},...f!=="click"&&{onClick(W){r(!1,W.nativeEvent,"reference-press")}}}}),[B,r,u,f]),fe=F.useMemo(()=>({onKeyDown:B,onMouseDown(){E.current=!0},onMouseUp(){E.current=!0},[gy[c]]:()=>{s.current.insideReactTree=!0},onBlurCapture(){g||(py(R),s.current.insideReactTree=!0,R.current=window.setTimeout(()=>{s.current.insideReactTree=!1}))}}),[B,c,s,g]);return F.useMemo(()=>a?{reference:oe,floating:fe}:{},[a,oe,fe])}function yy(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=iy(),s=F.useRef({}),[a]=F.useState(()=>cy()),i=dy()!=null;if(process.env.NODE_ENV!=="production"){const h=r.reference;h&&!me(h)&&ly("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=an((h,y,g)=>{s.current.openEvent=h?y:void 0,a.emit("openchange",{open:h,event:y,reason:g,nested:i}),n==null||n(h,y,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 vy(e){e===void 0&&(e={});const{nodeId:t}=e,n=yy({...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=Su();Ms(()=>{u&&(f.current=u)},[u]);const h=sp({...e,elements:{...o,...i&&{reference:i}}}),y=F.useCallback(w=>{const S=me(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),getClientRects:()=>w.getClientRects(),contextElement:w}:w;l(S),h.refs.setReference(S)},[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]),b=F.useMemo(()=>({...h.refs,setReference:g,setPositionReference:y,domReference:f}),[h.refs,g,y]),x=F.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),E=F.useMemo(()=>({...h,...r,refs:b,elements:x,nodeId:t}),[h,b,x,t,r]);return Ms(()=>{r.dataRef.current.floatingContext=E;const w=p==null?void 0:p.nodesRef.current.find(S=>S.id===t);w&&(w.context=E)}),F.useMemo(()=>({...h,context:E,refs:b,elements:x}),[h,b,x,E])}function Do(e,t,n){const r=new Map,o=n==="item";let s=e;if(o&&e){const{[Ni]:a,[Li]:i,...l}=e;s=l}return{...n==="floating"&&{tabIndex:-1,[ny]:""},...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&&[Ni,Li].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,y=new Array(h),g=0;g<h;g++)y[g]=arguments[g];return(p=r.get(c))==null?void 0:p.map(b=>b(...y)).find(b=>b!==void 0)}}}else a[c]=u}),a),{})}}function wy(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=>Do(i,e,"reference"),t),s=F.useCallback(i=>Do(i,e,"floating"),n),a=F.useCallback(i=>Do(i,e,"item"),r);return F.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:a}),[o,s,a])}const xy={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"},Ey={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"},Cy={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"},Sy={normal:"rounded",pill:"rounded-pill"},Ty={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]"},Tu=({category:e="solid",color:t="primary",roundness:n="normal",size:r="medium",textClassName:o="uppercase",children:s,className:a,...i})=>{const l=d.useMemo(()=>Cy[t]??"text-white",[t]),c=d.useMemo(()=>fn(l,e==="outline"?Ey[t]:xy[t],Sy[n],Ty[r]),[l,e,t,r,n]);return T.jsx("div",{className:fn("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:fn("mx-1",o),children:s})})},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(Mt,{icon:Cm,className:"text-gray-400 size-4"}),T.jsx(Tu,{category:"outline",color:e.color,children:e.to})]}),ky=({title:e,variant:t="default",transitions:n,onClick:r})=>{const[o,s]=d.useState(!1),{refs:a,floatingStyles:i,context:l}=vy({strategy:"fixed",placement:"bottom-end",open:o,onOpenChange:s}),c=by(l,{outsidePress:!0}),{getReferenceProps:u,getFloatingProps:f}=wy([c]);return T.jsxs(T.Fragment,{children:[T.jsxs("div",{onClick:n!=null&&n.length?()=>s(p=>!p):void 0,ref:a.setReference,className:Ee("px-1 uppercase border rounded-sm flex items-center space-x-1",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(Mt,{icon:Dc,className:"text-gray-400 size-4"}):T.jsx(T.Fragment,{})]}),o&&n.length&&T.jsx("div",{ref:a.setFloating,style:i,className:Ee("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))})]})},zi=({description:e})=>{const t=d.useMemo(()=>{const n=/https:\/\/[^/]+\/api\/files/g,r=e==null?void 0:e.replaceAll(n,`${xa}`),o=r==null?void 0:r.replaceAll('src="/api/files',`src="${xa}`),i=new DOMParser().parseFromString(o,"text/html").querySelectorAll("img");return i==null||i.forEach(l=>{const c=l.getAttribute("src");c&&(new Image().src=c)}),o},[e]);return d.useEffect(()=>{},[t]),T.jsx("div",{className:"flex flex-col gap-4",children:T.jsx("div",{className:"lexical-view-mode",dangerouslySetInnerHTML:{__html:t}})})},Ay={SEQUENTIAL:"Sequential"},Ry={[he.IN_REVIEW]:"In Review"},$y={[he.OPEN]:"bg-secondary-500",[he.IN_PROGRESS]:"bg-primary-600",[he.IN_REVIEW]:"bg-success-600",[he.COMPLETED]:"bg-success-600"},Fy=({playbookType:e,status:t,step:n,isSelected:r,onSelect:o})=>T.jsx("div",{className:Qn("flex flex-col items-center justify-center",r?"bg-[#FFE600]":$y[t],o&&"cursor-pointer"),onClick:s=>{s.stopPropagation(),o==null||o(s.shiftKey)},children:T.jsx("span",{className:Qn("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===Ay.SEQUENTIAL?`STEP ${n}`:(Ry[t]||t).toUpperCase()})}),Iy={[he.OPEN]:"secondary",[he.IN_PROGRESS]:"primary",[he.IN_REVIEW]:"success",[he.COMPLETED]:"success"},My=({status:e})=>T.jsx(Tu,{category:"outline",color:Iy[e],children:e}),Ny={[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]"},jo={PHOTO:"photo",SCREENSHOT:"screenshot"},Ly=({task:e,step:t,playbookType:n,onButtonClick:r,viewMode:o="card",canStart:s=!1,isExpanded:a=!1,toggleExpanded:i,playbookId:l,taskStyle:c,listStickyTopBase:u})=>{const[f,p]=d.useState(!1),{taskDetails:h,prefetchQuery:y}=Gb({taskId:e.taskId,playbookId:l,enabled:a}),{buttons:g}=pf({taskStatus:e.workflowStatus,canStart:s}),b=d.useMemo(()=>e.imageRequired===0?null:e.imageRequired===1?jo.SCREENSHOT:e.imageRequired===2?jo.PHOTO:null,[e.imageRequired]),x=async E=>{try{p(!0),await r(E)}finally{p(!1)}};if(o==="list"){const E=d.useMemo(()=>e.workflowStatus===he.COMPLETED?"success":e.workflowStatus===he.IN_PROGRESS?"primary":"default",[e.workflowStatus]),w=d.useMemo(()=>{const S=[];return g.forEach(v=>{v==="START"&&S.push({id:"START",color:"primary",action:"Start",to:he.IN_PROGRESS}),v==="COMPLETE"&&S.push({id:"COMPLETE",color:"success",action:"Complete",to:he.COMPLETED})}),S},[g]);return T.jsxs("div",{className:Ee("flex flex-col"),children:[T.jsxs("div",{className:Ee("flex gap-3 p-2 border-gray-200",e.sequenceOrder>0&&"border-t",a&&"bg-white rounded-md border border-t-none shadow-sm sticky"),style:{top:a?u:0},children:[T.jsx("div",{className:"text-gray-200 text-base",children:e.sequenceOrder+1}),T.jsx("div",{onClick:()=>{i==null||i(!a)},onMouseOver:y,className:Ee("flex-1 truncate cursor-pointer",a&&"font-medium",e.workflowStatus===he.COMPLETED&&"text-secondary-400 line-through"),style:{color:e.workflowStatus===he.IN_PROGRESS&&(c==null?void 0:c.titleColor)||"#1C232D"},children:e.taskInstanceName}),T.jsx(ky,{title:e.workflowStatus,variant:E,transitions:w,onClick:S=>{r(S)}})]}),(h==null?void 0:h.description)&&T.jsx("div",{className:Ee(!a&&"hidden","border-gray-200 border p-2 mx-4 mb-4 border-t-none -mt-0.5 bg-gray-100 rounded-b-md"),children:T.jsx(zi,{description:(h==null?void 0:h.description)||""})})]})}return T.jsxs("div",{className:Qn("flex items-stretch rounded-sm overflow-hidden border",Ny[e.workflowStatus]),children:[T.jsx(Fy,{playbookType:n,status:e.workflowStatus,step:t}),T.jsxs("div",{className:"flex w-full flex-col overflow-x-hidden flex-1 p-2",children:[n==="Sequential"&&T.jsx("div",{className:"-mb-3 self-end pr-2 pt-2",children:T.jsx(My,{status:e.workflowStatus})}),T.jsxs("div",{className:"space-y-2 divide-y divide-black/10 flex flex-col flex-1",children:[T.jsx("div",{className:Ee("text-lg font-medium flex-1 pb-1"),style:{color:e.workflowStatus==="Completed"?"#1C232D":(c==null?void 0:c.titleColor)||"#1C232D"},children:e.taskInstanceName}),b?T.jsxs("div",{className:"flex items-center gap-2 text-sm pb-2",children:[T.jsx(Mt,{icon:Em,className:"size-4"}),T.jsxs("div",{children:[T.jsx("span",{className:"font-medium",children:b===jo.PHOTO?"Photo":"Screenshot"})," ","required"]})]}):T.jsx(T.Fragment,{})]}),(h==null?void 0:h.description)&&T.jsx("div",{className:Ee(!a&&"hidden"),children:T.jsx(zi,{description:(h==null?void 0:h.description)||""})}),(g.length>0||e.hasDescription)&&T.jsxs("div",{className:"flex items-center justify-end gap-4 border-t border-black/10 pt-2",children:[T.jsx("div",{className:"flex-1",children:T.jsx(Yb,{buttons:g,onButtonClick:x,disabled:f})}),i&&T.jsx(Zn,{size:"smallCollapse",onMouseOver:y,category:"link",onClick:()=>{i()},title:a?"Hide task description":"Show task description",children:T.jsx(Mt,{icon:Dc,className:Qn("cursor-pointer text-[#0069D9]",a?"rotate-180":"")})})]})]})]})},_y=({title:e,className:t,playbookStyle:n,...r})=>{var o,s;return T.jsx("div",{className:Ee("border-b border-gray-200 flex items-center",t),style:{backgroundColor:((o=n==null?void 0:n.whiteLabel)==null?void 0:o.titleBackgroundColor)||"#f8f9fa",minHeight:104,height:104},...r,children:T.jsx("h1",{className:"text-xl px-5 line-clamp-2",style:{color:(s=n==null?void 0:n.whiteLabel)==null?void 0:s.titleTextColor},children:e})})},Dy="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAYCAYAAADpnJ2CAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGpSURBVHgBpVbRdYMwDDR9/S8jeARGYIRuUDpBuwHJBGQDskG6ASOQDcwGdANVLnJRHdmIRO/dI8D5zgIhpTAbAQAlHiqEJUyEa1EU30YRqFHj4Q1xzJIQF8QMSziGEAPi1eTNPhi/lwglomOCDWUZc/yGzkEIYQWtlpnNNxwSGimL2ijCi7DMLbveR2aVtHiMFypN/UZPlLUlHR6iWXuPWaQRsuXRpIjyTb1ZDWuBQVaPnvfAzLs9mcL/SoTNzXMCLJ9CiFZh1glmh9yCmkhldB7CgVzyvlCGlBlEnxJf+IkYo2uNINSy+1JxcDOv2acMD0DvT2HqSCxpRmt9Q/iS/J5NIrBP+kX+J9+pRXQC/Yj8Q3TtReCZJ7M0YpsyxcO7yUfKbBLZmEUFrGgSHOnx+jgn+M4/epMRnLME8/euNWYhgSondpIKJ2HqclxYmsi4JRRaW3a2KTakb5FU7rczS29WUvb9nkUD3D+e9o82WNuVA+XkgKUVOnhktLGK/DWOK4421sDaSy+5z0praqlF8Rnn2PlMhvUe3UJDogwtImRxRUzav4k8fgCQHVaVoXL9RAAAAABJRU5ErkJggg==",jy=e=>{const{queryClient:t}=Rn(),n=js({initialData:{},queryKey:["PLAYBOOK_EXPANDED_TASKS",+e]}),r=s=>{var a;return((a=n.data)==null?void 0:a[s.toString()])??!1};return{isTaskExpanded:r,toggleTaskExpanded:(s,a)=>{t.setQueryData(["PLAYBOOK_EXPANDED_TASKS",+e],()=>({[s]:a!==void 0?a:!r(s)}))}}},zy=({playbookInstanceId:e,playbookMode:t,playbookStyle:n})=>{const{playbook:r,actions:o}=df(e);if(!r)return T.jsx("div",{});const s=async(a,i)=>{var l;if(a===Un.COMPLETE){const c=(l=r.tasks.find(u=>u.taskInstanceId===i))==null?void 0:l.sequenceOrder;if(c===void 0){console.error("Task not found in playbook");return}return o.completeTask(i,c)}if(a===Un.START)return o.startTask(i)};return T.jsx(Ou,{playbook:r,playbookMode:t,onTaskButtonClick:s,playbookStyle:n})},Hy=({className:e,children:t})=>T.jsx("div",{className:Ee("w-full mx-auto space-y-4 py-4 container",e),children:t}),Ou=({playbook:e,playbookMode:t,onTaskButtonClick:n,playbookStyle:r})=>{var c;const{playbookInstanceName:o,tasks:s}=e,{isTaskExpanded:a,toggleTaskExpanded:i}=jy(e.playbookInstanceId),l=d.useMemo(()=>{const u=s.find(f=>f.workflowStatus===he.COMPLETED);return u?u.sequenceOrder+1:0},[s]);return T.jsxs("div",{className:Ee(!(r!=null&&r.overlay)&&"min-h-screen",(r==null?void 0:r.overlay)&&"fixed bottom-0 z-[99999999999999] flex"),...(r==null?void 0:r.overlay)&&{style:{width:r.overlay.width||450,height:r.overlay.height||"calc(100vh - 4rem)",maxHeight:"calc(100vh - 4rem)",right:r.overlay.right!==void 0?r.overlay.right:r.overlay.position==="right"?32:void 0,left:r.overlay.left!==void 0?r.overlay.left:r.overlay.position==="left"?32:void 0}},children:[(r==null?void 0:r.overlay)&&T.jsx("div",{className:Ee("size-9 relative p-1 top-3 z-[99999999999999] border-none rounded-l-sm "),style:{backgroundColor:((c=r==null?void 0:r.whiteLabel)==null?void 0:c.primaryColor)||"#007BFF",boxShadow:"0px 3px 3px 0px #00000040"},children:T.jsx("img",{src:Dy,alt:"Confidence Logo",className:"w-full h-full object-contain"})}),T.jsxs("div",{className:Ee("flex flex-col flex-1 bg-gray-50",(r==null?void 0:r.overlay)&&"border border-gray-200 shadow-2xl rounded-t-sm overflow-y-auto"),children:[T.jsx(_y,{title:o,className:Ee("top-0 sticky z-2 h-[104px"),playbookStyle:r}),T.jsx(Hy,{className:Ee("flex-1",t==="list"&&"space-y-0 px-5 relative"),children:s.map((u,f)=>{var p;return T.jsx(Ly,{task:u,step:f+1,viewMode:t,playbookId:e.playbookId,canStart:u.sequenceOrder===l,onButtonClick:h=>n(h,u.taskInstanceId),playbookType:"Non-Sequential",taskStyle:{titleColor:(p=r==null?void 0:r.whiteLabel)==null?void 0:p.primaryColor},isExpanded:a(u.taskInstanceId),toggleExpanded:()=>i(u.taskInstanceId),listStickyTopBase:104},f)})})]})]})},Uy=({email:e,playbookId:t,playbookMode:n})=>{const[r,o]=d.useState(null);return d.useEffect(()=>{(async()=>{const{playbookInstanceId:s,errorCode:a,details:i,message:l}=await ml({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(rn,{playbookInstanceId:r,playbookMode:n}):T.jsx("div",{children:"Loading..."})},By=({playbookId:e,playbookMode:t="list",playbookStyle:n,btnLabel:r="Start Playbook"})=>{const[o,s]=d.useState(null);return T.jsxs(T.Fragment,{children:[T.jsx(_c,{playbookId:e,disabled:!!o,onInitiated:s,btnLabel:r}),o&&T.jsx(rn,{playbookInstanceId:o,playbookMode:t,playbookStyle:n})]})},rn=({playbookInstanceId:e,playbookMode:t,playbookStyle:n})=>T.jsx(hl,{children:T.jsx(zy,{playbookInstanceId:e,playbookMode:t,playbookStyle:n})});rn.Context=hl;rn.View=Ou;rn.AutoInstantiated=Uy;rn.WithInstantiateButton=By;const Wy=({children:e})=>T.jsx("div",{className:"confidence-ui",children:e});exports.ConfidencePlaybook=rn;exports.ConfidencePlaybookButton=_c;exports.ConfidenceUIWrapper=Wy;
|
|
602
|
+
*/var Ao,Oi;function Pb(){if(Oi)return Ao;Oi=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 Ao=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},Ao}var Ro,Ti;function ua(){if(Ti)return Ro;Ti=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ro=e,Ro}var $o,Si;function yu(){return Si||(Si=1,$o=Function.call.bind(Object.prototype.hasOwnProperty)),$o}var Fo,Pi;function kb(){if(Pi)return Fo;Pi=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=ua(),n={},r=yu();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(v){f=v}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={})},Fo=o,Fo}var Io,ki;function Ab(){if(ki)return Io;ki=1;var e=vu(),t=Pb(),n=ua(),r=yu(),o=kb(),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 Io=function(i,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f(C){var k=C&&(c&&C[c]||C[u]);if(typeof k=="function")return k}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:E(),arrayOf:w,element:O(),elementType:y(),instanceOf:N,node:G(),objectOf:R,oneOf:q,oneOfType:B,shape:ue,exact:oe};function v(C,k){return C===k?C!==0||1/C===1/k:C!==C&&k!==k}function g(C,k){this.message=C,this.data=k&&typeof k=="object"?k:{},this.stack=""}g.prototype=Error.prototype;function b(C){if(process.env.NODE_ENV!=="production")var k={},U=0;function A(K,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 Fe=Q+":"+I;!k[Fe]&&U<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."),k[Fe]=!0,U++)}}return z[I]==null?K?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:C(z,I,Q,X,Z)}var D=A.bind(null,!1);return D.isRequired=A.bind(null,!0),D}function x(C){function k(U,A,D,K,z,I){var Q=U[A],X=Y(Q);if(X!==C){var Z=ne(Q);return new g("Invalid "+K+" `"+z+"` of type "+("`"+Z+"` supplied to `"+D+"`, expected ")+("`"+C+"`."),{expectedType:C})}return null}return b(k)}function E(){return b(a)}function w(C){function k(U,A,D,K,z){if(typeof C!="function")return new g("Property `"+z+"` of component `"+D+"` has invalid PropType notation inside arrayOf.");var I=U[A];if(!Array.isArray(I)){var Q=Y(I);return new g("Invalid "+K+" `"+z+"` of type "+("`"+Q+"` supplied to `"+D+"`, expected an array."))}for(var X=0;X<I.length;X++){var Z=C(I,X,D,K,z+"["+X+"]",n);if(Z instanceof Error)return Z}return null}return b(k)}function O(){function C(k,U,A,D,K){var z=k[U];if(!i(z)){var I=Y(z);return new g("Invalid "+D+" `"+K+"` of type "+("`"+I+"` supplied to `"+A+"`, expected a single ReactElement."))}return null}return b(C)}function y(){function C(k,U,A,D,K){var z=k[U];if(!e.isValidElementType(z)){var I=Y(z);return new g("Invalid "+D+" `"+K+"` of type "+("`"+I+"` supplied to `"+A+"`, expected a single ReactElement type."))}return null}return b(C)}function N(C){function k(U,A,D,K,z){if(!(U[A]instanceof C)){var I=C.name||p,Q=V(U[A]);return new g("Invalid "+K+" `"+z+"` of type "+("`"+Q+"` supplied to `"+D+"`, expected ")+("instance of `"+I+"`."))}return null}return b(k)}function q(C){if(!Array.isArray(C))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 k(U,A,D,K,z){for(var I=U[A],Q=0;Q<C.length;Q++)if(v(I,C[Q]))return null;var X=JSON.stringify(C,function(ge,$){var Fe=ne($);return Fe==="symbol"?String($):$});return new g("Invalid "+K+" `"+z+"` of value `"+String(I)+"` "+("supplied to `"+D+"`, expected one of "+X+"."))}return b(k)}function R(C){function k(U,A,D,K,z){if(typeof C!="function")return new g("Property `"+z+"` of component `"+D+"` has invalid PropType notation inside objectOf.");var I=U[A],Q=Y(I);if(Q!=="object")return new g("Invalid "+K+" `"+z+"` of type "+("`"+Q+"` supplied to `"+D+"`, expected an object."));for(var X in I)if(r(I,X)){var Z=C(I,X,D,K,z+"."+X,n);if(Z instanceof Error)return Z}return null}return b(k)}function B(C){if(!Array.isArray(C))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var k=0;k<C.length;k++){var U=C[k];if(typeof U!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+P(U)+" at index "+k+"."),a}function A(D,K,z,I,Q){for(var X=[],Z=0;Z<C.length;Z++){var ge=C[Z],$=ge(D,K,z,I,Q,n);if($==null)return null;$.data&&r($.data,"expectedType")&&X.push($.data.expectedType)}var Fe=X.length>0?", expected one of type ["+X.join(", ")+"]":"";return new g("Invalid "+I+" `"+Q+"` supplied to "+("`"+z+"`"+Fe+"."))}return b(A)}function G(){function C(k,U,A,D,K){return fe(k[U])?null:new g("Invalid "+D+" `"+K+"` supplied to "+("`"+A+"`, expected a ReactNode."))}return b(C)}function le(C,k,U,A,D){return new g((C||"React class")+": "+k+" type `"+U+"."+A+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+D+"`.")}function ue(C){function k(U,A,D,K,z){var I=U[A],Q=Y(I);if(Q!=="object")return new g("Invalid "+K+" `"+z+"` of type `"+Q+"` "+("supplied to `"+D+"`, expected `object`."));for(var X in C){var Z=C[X];if(typeof Z!="function")return le(D,K,z,X,ne(Z));var ge=Z(I,X,D,K,z+"."+X,n);if(ge)return ge}return null}return b(k)}function oe(C){function k(U,A,D,K,z){var I=U[A],Q=Y(I);if(Q!=="object")return new g("Invalid "+K+" `"+z+"` of type `"+Q+"` "+("supplied to `"+D+"`, expected `object`."));var X=t({},U[A],C);for(var Z in X){var ge=C[Z];if(r(C,Z)&&typeof ge!="function")return le(D,K,z,Z,ne(ge));if(!ge)return new g("Invalid "+K+" `"+z+"` key `"+Z+"` supplied to `"+D+"`.\nBad object: "+JSON.stringify(U[A],null," ")+`
|
|
603
|
+
Valid keys: `+JSON.stringify(Object.keys(C),null," "));var $=ge(I,Z,D,K,z+"."+Z,n);if($)return $}return null}return b(k)}function fe(C){switch(typeof C){case"number":case"string":case"undefined":return!0;case"boolean":return!C;case"object":if(Array.isArray(C))return C.every(fe);if(C===null||i(C))return!0;var k=f(C);if(k){var U=k.call(C),A;if(k!==C.entries){for(;!(A=U.next()).done;)if(!fe(A.value))return!1}else for(;!(A=U.next()).done;){var D=A.value;if(D&&!fe(D[1]))return!1}}else return!1;return!0;default:return!1}}function W(C,k){return C==="symbol"?!0:k?k["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&k instanceof Symbol:!1}function Y(C){var k=typeof C;return Array.isArray(C)?"array":C instanceof RegExp?"object":W(k,C)?"symbol":k}function ne(C){if(typeof C>"u"||C===null)return""+C;var k=Y(C);if(k==="object"){if(C instanceof Date)return"date";if(C instanceof RegExp)return"regexp"}return k}function P(C){var k=ne(C);switch(k){case"array":case"object":return"an "+k;case"boolean":case"date":case"regexp":return"a "+k;default:return k}}function V(C){return!C.constructor||!C.constructor.name?p:C.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},Io}var Mo,Ai;function Rb(){if(Ai)return Mo;Ai=1;var e=ua();function t(){}function n(){}return n.resetWarningCache=t,Mo=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},Mo}var Ri;function $b(){if(Ri)return Cr.exports;if(Ri=1,process.env.NODE_ENV!=="production"){var e=vu(),t=!0;Cr.exports=Ab()(e.isElement,t)}else Cr.exports=Rb()();return Cr.exports}var Fb=$b();const te=th(Fb);function $i(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 At(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$i(Object(n),!0).forEach(function(r){cn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$i(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hr(e){"@babel/helpers - typeof";return Hr=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},Hr(e)}function cn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ib(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 wu(e,t){if(e==null)return{};var n=Ib(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 Fs(e){return Mb(e)||Nb(e)||Lb(e)||_b()}function Mb(e){if(Array.isArray(e))return Is(e)}function Nb(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Lb(e,t){if(e){if(typeof e=="string")return Is(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 Is(e,t)}}function Is(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 _b(){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 Db(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,v=e.border,g=e.listItem,b=e.flip,x=e.size,E=e.rotation,w=e.pull,O=(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":v,"fa-li":g,"fa-flip":b===!0,"fa-flip-horizontal":b==="horizontal"||b==="both","fa-flip-vertical":b==="vertical"||b==="both"},cn(t,"fa-".concat(x),typeof x<"u"&&x!==null),cn(t,"fa-rotate-".concat(E),typeof E<"u"&&E!==null&&E!==0),cn(t,"fa-pull-".concat(w),typeof w<"u"&&w!==null),cn(t,"fa-swap-opacity",e.swapOpacity),t);return Object.keys(O).map(function(y){return O[y]?y:null}).filter(function(y){return y})}function jb(e){return e=e-0,e===e}function xu(e){return jb(e)?e:(e=e.replace(/[\-_\s]+(.)?/g,function(t,n){return n?n.toUpperCase():""}),e.substr(0,1).toLowerCase()+e.substr(1))}var zb=["style"];function Hb(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Ub(e){return e.split(";").map(function(t){return t.trim()}).filter(function(t){return t}).reduce(function(t,n){var r=n.indexOf(":"),o=xu(n.slice(0,r)),s=n.slice(r+1).trim();return o.startsWith("webkit")?t[Hb(o)]=s:t[o]=s,t},{})}function Eu(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 Eu(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=Ub(u);break;default:c.indexOf("aria-")===0||c.indexOf("data-")===0?l.attrs[c.toLowerCase()]=u:l.attrs[xu(c)]=u}return l},{attrs:{}}),s=n.style,a=s===void 0?{}:s,i=wu(n,zb);return o.attrs.style=At(At({},o.attrs.style),a),e.apply(void 0,[t.tag,At(At({},o.attrs),i)].concat(Fs(r)))}var Cu=!1;try{Cu=process.env.NODE_ENV==="production"}catch{}function Bb(){if(!Cu&&console&&typeof console.error=="function"){var e;(e=console).error.apply(e,arguments)}}function Fi(e){if(e&&Hr(e)==="object"&&e.prefix&&e.iconName&&e.icon)return e;if($s.icon)return $s.icon(e);if(e===null)return null;if(e&&Hr(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 No(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?cn({},e,t):{}}var Wb=["forwardedRef"];function Mt(e){var t=e.forwardedRef,n=wu(e,Wb),r=n.icon,o=n.mask,s=n.symbol,a=n.className,i=n.title,l=n.titleId,c=n.maskId,u=Fi(r),f=No("classes",[].concat(Fs(Db(n)),Fs(a.split(" ")))),p=No("transform",typeof n.transform=="string"?$s.transform(n.transform):n.transform),h=No("mask",Fi(o)),v=Ob(u,At(At(At(At({},f),p),h),{},{symbol:s,title:i,titleId:l,maskId:c}));if(!v)return Bb("Could not find icon",u),null;var g=v.abstract,b={ref:t};return Object.keys(n).forEach(function(x){Mt.defaultProps.hasOwnProperty(x)||(b[x]=n[x])}),qb(g[0],b)}Mt.displayName="FontAwesomeIcon";Mt.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};Mt.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 qb=Eu.bind(null,d.createElement);const Vb=async e=>await(await fetch(`${ar}/playbook-task-details`,{method:"POST",body:JSON.stringify(e)})).json(),Gb=({taskId:e,playbookId:t,enabled:n})=>{const{queryClient:r}=Rn(),o=async()=>Vb({taskId:+e,templateId:t.toString()}),s=["taskDetails",+e,t],a=js({queryKey:s,queryFn:o,enabled:n},r),i=()=>{r.prefetchQuery({queryFn:o,queryKey:s})};return{taskDetails:a.data,prefetchQuery:i,...a}},Yb=({buttons:e,onButtonClick:t,disabled:n})=>T.jsx("div",{className:"flex items-center justify-end",children:e.map(r=>T.jsx(Zn,{size:"smallCollapse",className:"ml-2",disabled:n,onClick:()=>{t(r)},children:hf[r]},r))});function Ii(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&fs(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 Lo(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 Kb(e){return e.matches("html,body")}function Mi(e){return(e==null?void 0:e.ownerDocument)||document}function _o(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 Qb(e){return"nativeEvent"in e}var Xb=typeof document<"u",Jb=function(){},Ms=Xb?d.useLayoutEffect:Jb;const Zb={...F},ev=Zb.useInsertionEffect,tv=ev||(e=>e());function an(e){const t=F.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return tv(()=>{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 nv="data-floating-ui-focusable",Ni="active",Li="selected",rv={...F};let _i=!1,ov=0;const Di=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+ov++;function sv(){const[e,t]=F.useState(()=>_i?Di():void 0);return Ms(()=>{e==null&&t(Di())},[]),F.useEffect(()=>{_i=!0},[]),e}const av=rv.useId,iv=av||sv;let Ns;process.env.NODE_ENV!=="production"&&(Ns=new Set);function lv(){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=Ns)!=null&&e.has(o))){var s;(s=Ns)==null||s.add(o),console.error(o)}}function cv(){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 uv=F.createContext(null),fv=F.createContext(null),dv=()=>{var e;return((e=F.useContext(uv))==null?void 0:e.id)||null},Ou=()=>F.useContext(fv);function hv(e){return"data-floating-ui-"+e}function pv(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const mv={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},gv={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},ji=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 bv(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:v}=t,g=Ou(),b=an(typeof l=="function"?l:()=>!1),x=typeof l=="function"?b:l,E=F.useRef(!1),{escapeKey:w,outsidePress:O}=ji(h),{escapeKey:y,outsidePress:N}=ji(v),q=F.useRef(!1),R=F.useRef(-1),B=an(W=>{var Y;if(!n||!a||!i||W.key!=="Escape"||q.current)return;const ne=(Y=s.current.floatingContext)==null?void 0:Y.nodeId,P=g?_o(g.nodesRef.current,ne):[];if(!w&&(W.stopPropagation(),P.length>0)){let V=!0;if(P.forEach(C=>{var k;if((k=C.context)!=null&&k.open&&!C.context.dataRef.current.__escapeKeyBubbles){V=!1;return}}),!V)return}r(!1,Qb(W)?W.nativeEvent:W,"escape-key")}),G=an(W=>{var Y;const ne=()=>{var P;B(W),(P=Ln(W))==null||P.removeEventListener("keydown",ne)};(Y=Ln(W))==null||Y.addEventListener("keydown",ne)}),le=an(W=>{var Y;const ne=s.current.insideReactTree;s.current.insideReactTree=!1;const P=E.current;if(E.current=!1,c==="click"&&P||ne||typeof x=="function"&&!x(W))return;const V=Ln(W),C="["+hv("inert")+"]",k=Mi(o.floating).querySelectorAll(C);let U=me(V)?V:null;for(;U&&!rt(U);){const z=at(U);if(rt(z)||!me(z))break;U=z}if(k.length&&me(V)&&!Kb(V)&&!Ii(V,o.floating)&&Array.from(k).every(z=>!Ii(U,z)))return;if(He(V)&&fe){const z=rt(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,Fe=I.direction==="rtl",on=$&&(Fe?W.offsetX<=V.offsetWidth-V.clientWidth:W.offsetX>V.clientWidth),hr=ge&&W.offsetY>V.clientHeight;if(on||hr)return}const A=(Y=s.current.floatingContext)==null?void 0:Y.nodeId,D=g&&_o(g.nodesRef.current,A).some(z=>{var I;return Lo(W,(I=z.context)==null?void 0:I.elements.floating)});if(Lo(W,o.floating)||Lo(W,o.domReference)||D)return;const K=g?_o(g.nodesRef.current,A):[];if(K.length>0){let z=!0;if(K.forEach(I=>{var Q;if((Q=I.context)!=null&&Q.open&&!I.context.dataRef.current.__outsidePressBubbles){z=!1;return}}),!z)return}r(!1,W,"outside-press")}),ue=an(W=>{var Y;const ne=()=>{var P;le(W),(P=Ln(W))==null||P.removeEventListener(c,ne)};(Y=Ln(W))==null||Y.addEventListener(c,ne)});F.useEffect(()=>{if(!n||!a)return;s.current.__escapeKeyBubbles=w,s.current.__outsidePressBubbles=O;let W=-1;function Y(k){r(!1,k,"ancestor-scroll")}function ne(){window.clearTimeout(W),q.current=!0}function P(){W=window.setTimeout(()=>{q.current=!1},Xr()?5:0)}const V=Mi(o.floating);i&&(V.addEventListener("keydown",y?G:B,y),V.addEventListener("compositionstart",ne),V.addEventListener("compositionend",P)),x&&V.addEventListener(c,N?ue:le,N);let C=[];return p&&(me(o.domReference)&&(C=dn(o.domReference)),me(o.floating)&&(C=C.concat(dn(o.floating))),!me(o.reference)&&o.reference&&o.reference.contextElement&&(C=C.concat(dn(o.reference.contextElement)))),C=C.filter(k=>{var U;return k!==((U=V.defaultView)==null?void 0:U.visualViewport)}),C.forEach(k=>{k.addEventListener("scroll",Y,{passive:!0})}),()=>{i&&(V.removeEventListener("keydown",y?G:B,y),V.removeEventListener("compositionstart",ne),V.removeEventListener("compositionend",P)),x&&V.removeEventListener(c,N?ue:le,N),C.forEach(k=>{k.removeEventListener("scroll",Y)}),window.clearTimeout(W)}},[s,o,i,x,c,n,r,p,a,w,O,B,y,G,le,N,ue]),F.useEffect(()=>{s.current.insideReactTree=!1},[s,x,c]);const oe=F.useMemo(()=>({onKeyDown:B,...u&&{[mv[f]]:W=>{r(!1,W.nativeEvent,"reference-press")},...f!=="click"&&{onClick(W){r(!1,W.nativeEvent,"reference-press")}}}}),[B,r,u,f]),fe=F.useMemo(()=>({onKeyDown:B,onMouseDown(){E.current=!0},onMouseUp(){E.current=!0},[gv[c]]:()=>{s.current.insideReactTree=!0},onBlurCapture(){g||(pv(R),s.current.insideReactTree=!0,R.current=window.setTimeout(()=>{s.current.insideReactTree=!1}))}}),[B,c,s,g]);return F.useMemo(()=>a?{reference:oe,floating:fe}:{},[a,oe,fe])}function vv(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=iv(),s=F.useRef({}),[a]=F.useState(()=>cv()),i=dv()!=null;if(process.env.NODE_ENV!=="production"){const h=r.reference;h&&!me(h)&&lv("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=an((h,v,g)=>{s.current.openEvent=h?v:void 0,a.emit("openchange",{open:h,event:v,reason:g,nested:i}),n==null||n(h,v,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 yv(e){e===void 0&&(e={});const{nodeId:t}=e,n=vv({...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=Ou();Ms(()=>{u&&(f.current=u)},[u]);const h=sp({...e,elements:{...o,...i&&{reference:i}}}),v=F.useCallback(w=>{const O=me(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),getClientRects:()=>w.getClientRects(),contextElement:w}:w;l(O),h.refs.setReference(O)},[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]),b=F.useMemo(()=>({...h.refs,setReference:g,setPositionReference:v,domReference:f}),[h.refs,g,v]),x=F.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),E=F.useMemo(()=>({...h,...r,refs:b,elements:x,nodeId:t}),[h,b,x,t,r]);return Ms(()=>{r.dataRef.current.floatingContext=E;const w=p==null?void 0:p.nodesRef.current.find(O=>O.id===t);w&&(w.context=E)}),F.useMemo(()=>({...h,context:E,refs:b,elements:x}),[h,b,x,E])}function Do(e,t,n){const r=new Map,o=n==="item";let s=e;if(o&&e){const{[Ni]:a,[Li]:i,...l}=e;s=l}return{...n==="floating"&&{tabIndex:-1,[nv]:""},...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&&[Ni,Li].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,v=new Array(h),g=0;g<h;g++)v[g]=arguments[g];return(p=r.get(c))==null?void 0:p.map(b=>b(...v)).find(b=>b!==void 0)}}}else a[c]=u}),a),{})}}function wv(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=>Do(i,e,"reference"),t),s=F.useCallback(i=>Do(i,e,"floating"),n),a=F.useCallback(i=>Do(i,e,"item"),r);return F.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:a}),[o,s,a])}const xv={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"},Ev={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"},Cv={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"},Ov={normal:"rounded",pill:"rounded-pill"},Tv={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]"},Tu=({category:e="solid",color:t="primary",roundness:n="normal",size:r="medium",textClassName:o="uppercase",children:s,className:a,...i})=>{const l=d.useMemo(()=>Cv[t]??"text-white",[t]),c=d.useMemo(()=>fn(l,e==="outline"?Ev[t]:xv[t],Ov[n],Tv[r]),[l,e,t,r,n]);return T.jsx("div",{className:fn("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:fn("mx-1",o),children:s})})},Sv={default:"text-secondary-600 border-secondary-600",primary:"text-primary-600 border-primary-600",success:"text-success-600 border-success-600"},Pv=({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(Mt,{icon:Cm,className:"text-gray-400 size-4"}),T.jsx(Tu,{category:"outline",color:e.color,children:e.to})]}),kv=({title:e,variant:t="default",transitions:n,onClick:r})=>{const[o,s]=d.useState(!1),{refs:a,floatingStyles:i,context:l}=yv({strategy:"fixed",placement:"bottom-end",open:o,onOpenChange:s}),c=bv(l,{outsidePress:!0}),{getReferenceProps:u,getFloatingProps:f}=wv([c]);return T.jsxs(T.Fragment,{children:[T.jsxs("div",{onClick:n!=null&&n.length?()=>s(p=>!p):void 0,ref:a.setReference,className:ye("px-1 uppercase border rounded-sm flex items-center space-x-1",n.length?"cursor-pointer":"pointer-events-none",Sv[t]),...u(),children:[T.jsx("span",{className:"text-sm font-bold",children:e}),n.length>0?T.jsx(Mt,{icon:Dc,className:"size-4"}):T.jsx(T.Fragment,{})]}),o&&n.length&&T.jsx("div",{ref:a.setFloating,style:i,className:ye("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(Pv,{transition:p,onClick:()=>{r==null||r(p.id),s(!1)}},h))})]})},zi=({description:e})=>{const t=d.useMemo(()=>{const n=/https:\/\/[^/]+\/api\/files/g,r=e==null?void 0:e.replaceAll(n,`${xa}`),o=r==null?void 0:r.replaceAll('src="/api/files',`src="${xa}`),i=new DOMParser().parseFromString(o,"text/html").querySelectorAll("img");return i==null||i.forEach(l=>{const c=l.getAttribute("src");c&&(new Image().src=c)}),o},[e]);return d.useEffect(()=>{},[t]),T.jsx("div",{className:"flex flex-col gap-4",children:T.jsx("div",{className:"lexical-view-mode",dangerouslySetInnerHTML:{__html:t}})})},Av={SEQUENTIAL:"Sequential"},Rv={[he.IN_REVIEW]:"In Review"},$v={[he.OPEN]:"bg-secondary-500",[he.IN_PROGRESS]:"bg-primary-600",[he.IN_REVIEW]:"bg-success-600",[he.COMPLETED]:"bg-success-600"},Fv=({playbookType:e,status:t,step:n,isSelected:r,onSelect:o})=>T.jsx("div",{className:Qn("flex flex-col items-center justify-center",r?"bg-[#FFE600]":$v[t],o&&"cursor-pointer"),onClick:s=>{s.stopPropagation(),o==null||o(s.shiftKey)},children:T.jsx("span",{className:Qn("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===Av.SEQUENTIAL?`STEP ${n}`:(Rv[t]||t).toUpperCase()})}),Iv={[he.OPEN]:"secondary",[he.IN_PROGRESS]:"primary",[he.IN_REVIEW]:"success",[he.COMPLETED]:"success"},Mv=({status:e})=>T.jsx(Tu,{category:"outline",color:Iv[e],children:e}),Nv={[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]"},jo={PHOTO:"photo",SCREENSHOT:"screenshot"},Lv=({task:e,step:t,playbookType:n,onButtonClick:r,viewMode:o="card",canStart:s=!1,isExpanded:a=!1,toggleExpanded:i,playbookId:l,taskStyle:c,listStickyTopBase:u})=>{const[f,p]=d.useState(!1),{taskDetails:h,prefetchQuery:v}=Gb({taskId:e.taskId,playbookId:l,enabled:a}),{buttons:g}=pf({taskStatus:e.workflowStatus,canStart:s}),b=d.useMemo(()=>e.imageRequired===0?null:e.imageRequired===1?jo.SCREENSHOT:e.imageRequired===2?jo.PHOTO:null,[e.imageRequired]),x=async E=>{try{p(!0),await r(E)}finally{p(!1)}};if(o==="list"){const E=d.useMemo(()=>e.workflowStatus===he.COMPLETED?"success":e.workflowStatus===he.IN_PROGRESS?"primary":"default",[e.workflowStatus]),w=d.useMemo(()=>{const O=[];return g.forEach(y=>{y==="START"&&O.push({id:"START",color:"primary",action:"Start",to:he.IN_PROGRESS}),y==="COMPLETE"&&O.push({id:"COMPLETE",color:"success",action:"Complete",to:he.COMPLETED})}),O},[g]);return T.jsxs("div",{className:ye("flex flex-col"),children:[T.jsxs("div",{className:ye("flex gap-3 p-2 border-gray-200",e.sequenceOrder>0&&"border-t",a&&"bg-white rounded-md border border-t-none shadow-sm sticky"),style:{top:a?u:0},children:[T.jsx("div",{className:"text-gray-200 text-base",children:e.sequenceOrder+1}),T.jsx("div",{onClick:()=>{i==null||i(!a)},onMouseOver:v,className:ye("flex-1 truncate cursor-pointer",a&&"font-medium",e.workflowStatus===he.COMPLETED&&"text-secondary-400 line-through"),style:{color:e.workflowStatus===he.IN_PROGRESS&&(c==null?void 0:c.titleColor)||"#1C232D"},children:e.taskInstanceName}),T.jsx(kv,{title:e.workflowStatus,variant:E,transitions:w,onClick:O=>{r(O)}})]}),(h==null?void 0:h.description)&&T.jsx("div",{className:ye(!a&&"hidden","border-gray-200 border p-2 mx-4 mb-4 border-t-none -mt-[1px] bg-gray-100 rounded-b-md"),children:T.jsx(zi,{description:(h==null?void 0:h.description)||""})})]})}return T.jsxs("div",{className:Qn("flex items-stretch rounded-sm overflow-hidden border",Nv[e.workflowStatus]),children:[T.jsx(Fv,{playbookType:n,status:e.workflowStatus,step:t}),T.jsxs("div",{className:"flex w-full flex-col overflow-x-hidden flex-1 p-2",children:[n==="Sequential"&&T.jsx("div",{className:"-mb-3 self-end pr-2 pt-2",children:T.jsx(Mv,{status:e.workflowStatus})}),T.jsxs("div",{className:"space-y-2 divide-y divide-black/10 flex flex-col flex-1",children:[T.jsx("div",{className:ye("text-lg font-medium flex-1 pb-1"),style:{color:e.workflowStatus==="Completed"?"#1C232D":(c==null?void 0:c.titleColor)||"#1C232D"},children:e.taskInstanceName}),b?T.jsxs("div",{className:"flex items-center gap-2 text-sm pb-2",children:[T.jsx(Mt,{icon:Em,className:"size-4"}),T.jsxs("div",{children:[T.jsx("span",{className:"font-medium",children:b===jo.PHOTO?"Photo":"Screenshot"})," ","required"]})]}):T.jsx(T.Fragment,{})]}),(h==null?void 0:h.description)&&T.jsx("div",{className:ye(!a&&"hidden"),children:T.jsx(zi,{description:(h==null?void 0:h.description)||""})}),(g.length>0||e.hasDescription)&&T.jsxs("div",{className:"flex items-center justify-end gap-4 border-t border-black/10 pt-2",children:[T.jsx("div",{className:"flex-1",children:T.jsx(Yb,{buttons:g,onButtonClick:x,disabled:f})}),i&&T.jsx(Zn,{size:"smallCollapse",onMouseOver:v,category:"link",onClick:()=>{i()},title:a?"Hide task description":"Show task description",children:T.jsx(Mt,{icon:Dc,className:Qn("cursor-pointer text-[#0069D9]",a?"rotate-180":"")})})]})]})]})},_v=({title:e,className:t,playbookStyle:n,...r})=>{var o,s;return T.jsx("div",{className:ye("border-b border-gray-200 flex items-center",t),style:{backgroundColor:((o=n==null?void 0:n.whiteLabel)==null?void 0:o.titleBackgroundColor)||"#f8f9fa"},...r,children:T.jsx("div",{className:"text-xl min-h-16 p-4",style:{color:(s=n==null?void 0:n.whiteLabel)==null?void 0:s.titleTextColor},children:e})})},Dv="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAYCAYAAADpnJ2CAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGpSURBVHgBpVbRdYMwDDR9/S8jeARGYIRuUDpBuwHJBGQDskG6ASOQDcwGdANVLnJRHdmIRO/dI8D5zgIhpTAbAQAlHiqEJUyEa1EU30YRqFHj4Q1xzJIQF8QMSziGEAPi1eTNPhi/lwglomOCDWUZc/yGzkEIYQWtlpnNNxwSGimL2ijCi7DMLbveR2aVtHiMFypN/UZPlLUlHR6iWXuPWaQRsuXRpIjyTb1ZDWuBQVaPnvfAzLs9mcL/SoTNzXMCLJ9CiFZh1glmh9yCmkhldB7CgVzyvlCGlBlEnxJf+IkYo2uNINSy+1JxcDOv2acMD0DvT2HqSCxpRmt9Q/iS/J5NIrBP+kX+J9+pRXQC/Yj8Q3TtReCZJ7M0YpsyxcO7yUfKbBLZmEUFrGgSHOnx+jgn+M4/epMRnLME8/euNWYhgSondpIKJ2HqclxYmsi4JRRaW3a2KTakb5FU7rczS29WUvb9nkUD3D+e9o82WNuVA+XkgKUVOnhktLGK/DWOK4421sDaSy+5z0praqlF8Rnn2PlMhvUe3UJDogwtImRxRUzav4k8fgCQHVaVoXL9RAAAAABJRU5ErkJggg==",jv=e=>{const{queryClient:t}=Rn(),n=js({initialData:{},queryKey:["PLAYBOOK_EXPANDED_TASKS",+e]}),r=s=>{var a;return((a=n.data)==null?void 0:a[s.toString()])??!1};return{isTaskExpanded:r,toggleTaskExpanded:(s,a)=>{t.setQueryData(["PLAYBOOK_EXPANDED_TASKS",+e],()=>({[s]:a!==void 0?a:!r(s)}))}}},zv=({playbookInstanceId:e,playbookMode:t,playbookStyle:n})=>{const{playbook:r,actions:o}=df(e);if(!r)return T.jsx("div",{});const s=async(a,i)=>{var l;if(a===Un.COMPLETE){const c=(l=r.tasks.find(u=>u.taskInstanceId===i))==null?void 0:l.sequenceOrder;if(c===void 0){console.error("Task not found in playbook");return}return o.completeTask(i,c)}if(a===Un.START)return o.startTask(i)};return T.jsx(Su,{playbook:r,playbookMode:t,onTaskButtonClick:s,playbookStyle:n})},Hv=({className:e,children:t,numberOfTasks:n,playbookMode:r})=>T.jsxs("div",{className:ye("w-full p-4",e),children:[n&&T.jsxs("div",{className:ye(r==="card"&&"mb-4"),children:[T.jsx("span",{className:"font-medium",children:"Tasks"})," (3)"]}),T.jsx("div",{className:ye(r==="card"&&"space-y-4"),children:t})]}),Su=({playbook:e,playbookMode:t,onTaskButtonClick:n,playbookStyle:r})=>{var p,h,v,g,b;const{playbookInstanceName:o,tasks:s}=e,a=d.useRef(null),[i,l]=d.useState(0),{isTaskExpanded:c,toggleTaskExpanded:u}=jv(e.playbookInstanceId);d.useEffect(()=>(a.current&&new ResizeObserver(E=>{var w;for(const O of E)console.log("ResizeObserver entry:",O),O.contentRect&&l(((w=a.current)==null?void 0:w.offsetHeight)||0)}).observe(a.current),()=>{a.current&&new ResizeObserver(()=>{}).unobserve(a.current)}),[a]);const f=d.useMemo(()=>{const x=s.find(E=>E.workflowStatus===he.COMPLETED);return x?x.sequenceOrder+1:0},[s]);return T.jsxs("div",{className:ye(!(r!=null&&r.overlay)&&"min-h-screen",(r==null?void 0:r.overlay)&&"fixed bottom-0 z-[99999999999999] flex"),...(r==null?void 0:r.overlay)&&{style:{width:((p=r.overlay.size)==null?void 0:p.width)||450,height:((h=r.overlay.size)==null?void 0:h.height)||"calc(100vh - 4rem)",maxHeight:"calc(100vh - 4rem)",right:((v=r.overlay.offset)==null?void 0:v.right)!==void 0?r.overlay.offset.right:r.overlay.position==="right"?32:void 0,left:((g=r.overlay.offset)==null?void 0:g.left)!==void 0?r.overlay.offset.left:r.overlay.position==="left"?32:void 0}},children:[(r==null?void 0:r.overlay)&&T.jsx("div",{className:ye("size-9 relative p-1 top-3 z-[99999999999999] border-none rounded-l-sm "),style:{backgroundColor:((b=r==null?void 0:r.whiteLabel)==null?void 0:b.primaryColor)||"#007BFF",boxShadow:"0px 3px 3px 0px #00000040"},children:T.jsx("img",{src:Dv,alt:"Confidence Logo",className:"w-full h-full object-contain"})}),T.jsxs("div",{className:ye("flex flex-col flex-1 bg-gray-50",(r==null?void 0:r.overlay)&&"border border-gray-200 shadow-2xl rounded-t-sm overflow-y-auto"),children:[T.jsx(_v,{title:o,className:ye("top-0 sticky z-2"),playbookStyle:r,ref:a}),T.jsx(Hv,{playbookMode:t,numberOfTasks:e.numberofTasks,children:s.map((x,E)=>{var w;return T.jsx(Lv,{task:x,step:E+1,viewMode:t,playbookId:e.playbookId,canStart:x.sequenceOrder===f,onButtonClick:O=>n(O,x.taskInstanceId),playbookType:"Non-Sequential",taskStyle:{titleColor:(w=r==null?void 0:r.whiteLabel)==null?void 0:w.primaryColor},isExpanded:c(x.taskInstanceId),toggleExpanded:()=>u(x.taskInstanceId),listStickyTopBase:i||104},E)})})]})]})},Uv=({email:e,playbookId:t,playbookMode:n})=>{const[r,o]=d.useState(null);return d.useEffect(()=>{(async()=>{const{playbookInstanceId:s,errorCode:a,details:i,message:l}=await ml({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(rn,{playbookInstanceId:r,playbookMode:n}):T.jsx("div",{children:"Loading..."})},Bv=({playbookId:e,playbookMode:t="list",playbookStyle:n,btnLabel:r="Start Playbook"})=>{const[o,s]=d.useState(null);return T.jsxs(T.Fragment,{children:[T.jsx(_c,{playbookId:e,disabled:!!o,onInitiated:s,btnLabel:r}),o&&T.jsx(rn,{playbookInstanceId:o,playbookMode:t,playbookStyle:n})]})},rn=({playbookInstanceId:e,playbookMode:t,playbookStyle:n})=>T.jsx(hl,{children:T.jsx(zv,{playbookInstanceId:e,playbookMode:t,playbookStyle:n})});rn.Context=hl;rn.View=Su;rn.AutoInstantiated=Uv;rn.WithInstantiateButton=Bv;const Wv=({children:e})=>T.jsx("div",{className:"confidence-ui",children:e});exports.ConfidencePlaybook=rn;exports.ConfidencePlaybookButton=_c;exports.ConfidenceUIWrapper=Wv;
|