vendor: 28,082 bytes, lines 1-9
1function jA(t,n){for(var r=0;r<n.length;r++){const o=n[r];if(typeof o!="string"&&!Array.isArray(o)){for(const i in o)if(i!=="default"&&!(i in t)){const d=Object.getOwnPropertyDescriptor(o,i);d&&Object.defineProperty(t,i,d.get?d:{enumerable:!0,get:()=>o[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))o(i);new MutationObserver(i=>{for(const d of i)if(d.type==="childList")for(const u of d.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&o(u)}).observe(document,{childList:!0,subtree:!0});function r(i){const d={};return i.integrity&&(d.integrity=i.integrity),i.referrerPolicy&&(d.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?d.credentials="include":i.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function o(i){if(i.ep)return;i.ep=!0;const d=r(i);fetch(i.href,d)}})();function bw(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Px={exports:{}},zi={};/** 2 * @license React 3 * react-jsx-runtime.production.js 4 * 5 * Copyright (c) Meta Platforms, Inc. and affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var sy;function NA(){if(sy)return zi;sy=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function r(o,i,d){var u=null;if(d!==void 0&&(u=""+d),i.key!==void 0&&(u=""+i.key),"key"in i){d={};for(var p in i)p!=="key"&&(d[p]=i[p])}else d=i;return i=d.ref,{$$typeof:t,type:o,key:u,ref:i!==void 0?i:null,props:d}}return zi.Fragment=n,zi.jsx=r,zi.jsxs=r,zi}var ay;function AA(){return ay||(ay=1,Px.exports=NA()),Px.exports}var e=AA(),El=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},CA={setTimeout:(t,n)=>setTimeout(t,n),clearTimeout:t=>clearTimeout(t),setInterval:(t,n)=>setInterval(t,n),clearInterval:t=>clearInterval(t)},EA=class{#t=CA;#e=!1;setTimeoutProvider(t){this.#t=t}setTimeout(t,n){return this.#t.setTimeout(t,n)}clearTimeout(t){this.#t.clearTimeout(t)}setInterval(t,n){return this.#t.setInterval(t,n)}clearInterval(t){this.#t.clearInterval(t)}},hl=new EA;function RA(t){setTimeout(t,0)}var yl=typeof window>"u"||"Deno"in globalThis;function _s(){}function kA(t,n){return typeof t=="function"?t(n):t}function vf(t){return typeof t=="number"&&t>=0&&t!==1/0}function vw(t,n){return Math.max(t+(n||0)-Date.now(),0)}function Dr(t,n){return typeof t=="function"?t(n):t}function Oa(t,n){return typeof t=="function"?t(n):t}function ny(t,n){const{type:r="all",exact:o,fetchStatus:i,predicate:d,queryKey:u,stale:p}=t;if(u){if(o){if(n.queryHash!==uh(u,n.options))return!1}else if(!tc(n.queryKey,u))return!1}if(r!=="all"){const x=n.isActive();if(r==="active"&&!x||r==="inactive"&&x)return!1}return!(typeof p=="boolean"&&n.isStale()!==p||i&&i!==n.state.fetchStatus||d&&!d(n))}function ry(t,n){const{exact:r,status:o,predicate:i,mutationKey:d}=t;if(d){if(!n.options.mutationKey)return!1;if(r){if(_r(n.options.mutationKey)!==_r(d))return!1}else if(!tc(n.options.mutationKey,d))return!1}return!(o&&n.state.status!==o||i&&!i(n))}function uh(t,n){return(n?.queryKeyHashFn||_r)(t)}function _r(t){return JSON.stringify(t,(n,r)=>yf(r)?Object.keys(r).sort().reduce((o,i)=>(o[i]=r[i],o),{}):r)}function tc(t,n){return t===n?!0:typeof t!=typeof n?!1:t&&n&&typeof t=="object"&&typeof n=="object"?Object.keys(n).every(r=>tc(t[r],n[r])):!1}var DA=Object.prototype.hasOwnProperty;function ph(t,n){if(t===n)return t;const r=ly(t)&&ly(n);if(!r&&!(yf(t)&&yf(n)))return n;const i=(r?t:Object.keys(t)).length,d=r?n:Object.keys(n),u=d.length,p=r?new Array(u):{};let x=0;for(let h=0;h<u;h++){const v=r?h:d[h],g=t[v],y=n[v];if(g===y){p[v]=g,(r?h<i:DA.call(t,v))&&x++;continue}if(g===null||y===null||typeof g!="object"||typeof y!="object"){p[v]=y;continue}const N=ph(g,y);p[v]=N,N===g&&x++}return i===u&&x===i?t:p}function sc(t,n){if(!n||Object.keys(t).length!==Object.keys(n).length)return!1;for(const r in t)if(t[r]!==n[r])return!1;return!0}function ly(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function yf(t){if(!oy(t))return!1;const n=t.constructor;if(n===void 0)return!0;const r=n.prototype;return!(!oy(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function oy(t){return Object.prototype.toString.call(t)==="[object Object]"}function TA(t){return new Promise(n=>{hl.setTimeout(n,t)})}function wf(t,n,r){return typeof r.structuralSharing=="function"?r.structuralSharing(t,n):r.structuralSharing!==!1?ph(t,n):n}function OA(t,n,r=0){const o=[...t,n];return r&&o.length>r?o.slice(1):o}function _A(t,n,r=0){const o=[n,...t];return r&&o.length>r?o.slice(0,-1):o}var xa=Symbol();function yw(t,n){return!t.queryFn&&n?.initialPromise?()=>n.initialPromise:!t.queryFn||t.queryFn===xa?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function ww(t,n){return typeof t=="function"?t(...n):!!t}var MA=class extends El{#t;#e;#s;constructor(){super(),this.#s=t=>{if(!yl&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}}}onSubscribe(){this.#e||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#s=t,this.#e?.(),this.#e=t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(t){this.#t!==t&&(this.#t=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},mh=new MA;function Sf(){let t,n;const r=new Promise((i,d)=>{t=i,n=d});r.status="pending",r.catch(()=>{});function o(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{o({status:"fulfilled",value:i}),t(i)},r.reject=i=>{o({status:"rejected",reason:i}),n(i)},r}var PA=RA;function HA(){let t=[],n=0,r=p=>{p()},o=p=>{p()},i=PA;const d=p=>{n?t.push(p):i(()=>{r(p)})},u=()=>{const p=t;t=[],p.length&&i(()=>{o(()=>{p.forEach(x=>{r(x)})})})};return{batch:p=>{let x;n++;try{x=p()}finally{n--,n||u()}return x},batchCalls:p=>(...x)=>{d(()=>{p(...x)})},schedule:d,setNotifyFunction:p=>{r=p},setBatchNotifyFunction:p=>{o=p},setScheduler:p=>{i=p}}}var Yt=HA(),LA=class extends El{#t=!0;#e;#s;constructor(){super(),this.#s=t=>{if(!yl&&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(){this.#e||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#s=t,this.#e?.(),this.#e=t(this.setOnline.bind(this))}setOnline(t){this.#t!==t&&(this.#t=t,this.listeners.forEach(r=>{r(t)}))}isOnline(){return this.#t}},wu=new LA;function zA(t){return Math.min(1e3*2**t,3e4)}function Sw(t){return(t??"online")==="online"?wu.isOnline():!0}var jf=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function jw(t){let n=!1,r=0,o;const i=Sf(),d=()=>i.status!=="pending",u=w=>{if(!d()){const A=new jf(w);y(A),t.onCancel?.(A)}},p=()=>{n=!0},x=()=>{n=!1},h=()=>mh.isFocused()&&(t.networkMode==="always"||wu.isOnline())&&t.canRun(),v=()=>Sw(t.networkMode)&&t.canRun(),g=w=>{d()||(o?.(),i.resolve(w))},y=w=>{d()||(o?.(),i.reject(w))},N=()=>new Promise(w=>{o=A=>{(d()||h())&&w(A)},t.onPause?.()}).then(()=>{o=void 0,d()||t.onContinue?.()}),j=()=>{if(d())return;let w;const A=r===0?t.initialPromise:void 0;try{w=A??t.fn()}catch(C){w=Promise.reject(C)}Promise.resolve(w).then(g).catch(C=>{if(d())return;const E=t.retry??(yl?0:3),T=t.retryDelay??zA,D=typeof T=="function"?T(r,C):T,M=E===!0||typeof E=="number"&&r<E||typeof E=="function"&&E(r,C);if(n||!M){y(C);return}r++,t.onFail?.(r,C),TA(D).then(()=>h()?void 0:N()).then(()=>{n?y(C):j()})})};return{promise:i,status:()=>i.status,cancel:u,continue:()=>(o?.(),i),cancelRetry:p,continueRetry:x,canStart:v,start:()=>(v()?j():N().then(j),i)}}var Nw=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),vf(this.gcTime)&&(this.#t=hl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(yl?1/0:300*1e3))}clearGcTimeout(){this.#t&&(hl.clearTimeout(this.#t),this.#t=void 0)}},IA=class extends Nw{#t;#e;#s;#n;#a;#r;#o;constructor(t){super(),this.#o=!1,this.#r=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#n=t.client,this.#s=this.#n.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=iy(this.options),this.state=t.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#a?.promise}setOptions(t){if(this.options={...this.#r,...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=iy(this.options);n.data!==void 0&&(this.setData(n.data,{updatedAt:n.dataUpdatedAt,manual:!0}),this.#t=n)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#s.remove(this)}setData(t,n){const r=wf(this.state.data,t,this.options);return this.#l({data:r,type:"success",dataUpdatedAt:n?.updatedAt,manual:n?.manual}),r}setState(t,n){this.#l({type:"setState",state:t,setStateOptions:n})}cancel(t){const n=this.#a?.promise;return this.#a?.cancel(t),n?n.then(_s).catch(_s):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#t)}isActive(){return this.observers.some(t=>Oa(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===xa||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Dr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!vw(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(n=>n.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(n=>n.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(this.#a&&(this.#o?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#s.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(t,n){if(this.state.fetchStatus!=="idle"&&this.#a?.status()!=="rejected"){if(this.state.data!==void 0&&n?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(t&&this.setOptions(t),!this.options.queryFn){const p=this.observers.find(x=>x.options.queryFn);p&&this.setOptions(p.options)}const r=new AbortController,o=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(this.#o=!0,r.signal)})},i=()=>{const p=yw(this.options,n),h=(()=>{const v={client:this.#n,queryKey:this.queryKey,meta:this.meta};return o(v),v})();return this.#o=!1,this.options.persister?this.options.persister(p,h,this):p(h)},u=(()=>{const p={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:this.#n,state:this.state,fetchFn:i};return o(p),p})();this.options.behavior?.onFetch(u,this),this.#e=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==u.fetchOptions?.meta)&&this.#l({type:"fetch",meta:u.fetchOptions?.meta}),this.#a=jw({initialPromise:n?.initialPromise,fn:u.fetchFn,onCancel:p=>{p instanceof jf&&p.revert&&this.setState({...this.#e,fetchStatus:"idle"}),r.abort()},onFail:(p,x)=>{this.#l({type:"failed",failureCount:p,error:x})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0});try{const p=await this.#a.start();if(p===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(p),this.#s.config.onSuccess?.(p,this),this.#s.config.onSettled?.(p,this.state.error,this),p}catch(p){if(p instanceof jf){if(p.silent)return this.#a.promise;if(p.revert){if(this.state.data===void 0)throw p;return this.state.data}}throw this.#l({type:"error",error:p}),this.#s.config.onError?.(p,this),this.#s.config.onSettled?.(this.state.data,p,this),p}finally{this.scheduleGc()}}#l(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,...Aw(r.data,this.options),fetchMeta:t.meta??null};case"success":const o={...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}};return this.#e=t.manual?o:void 0,o;case"error":const i=t.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Yt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#s.notify({query:this,type:"updated",action:t})})}};function Aw(t,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Sw(n.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function iy(t){const n=typeof t.initialData=="function"?t.initialData():t.initialData,r=n!==void 0,o=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:r?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var hc=class extends El{constructor(t,n){super(),this.options=n,this.#t=t,this.#l=null,this.#o=Sf(),this.bindMethods(),this.setOptions(n)}#t;#e=void 0;#s=void 0;#n=void 0;#a;#r;#o;#l;#m;#u;#p;#c;#d;#i;#f=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),cy(this.#e,this.options)?this.#x():this.updateResult(),this.#v())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Nf(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Nf(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#y(),this.#w(),this.#e.removeObserver(this)}setOptions(t){const n=this.options,r=this.#e;if(this.options=this.#t.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Oa(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#e.setOptions(this.options),n._defaulted&&!sc(this.options,n)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const o=this.hasListeners();o&&dy(this.#e,r,this.options,n)&&this.#x(),this.updateResult(),o&&(this.#e!==r||Oa(this.options.enabled,this.#e)!==Oa(n.enabled,this.#e)||Dr(this.options.staleTime,this.#e)!==Dr(n.staleTime,this.#e))&&this.#h();const i=this.#g();o&&(this.#e!==r||Oa(this.options.enabled,this.#e)!==Oa(n.enabled,this.#e)||i!==this.#i)&&this.#b(i)}getOptimisticResult(t){const n=this.#t.getQueryCache().build(this.#t,t),r=this.createResult(n,t);return VA(this,r)&&(this.#n=r,this.#r=this.options,this.#a=this.#e.state),r}getCurrentResult(){return this.#n}trackResult(t,n){return new Proxy(t,{get:(r,o)=>(this.trackProp(o),n?.(o),o==="promise"&&!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(r,o))})}trackProp(t){this.#f.add(t)}getCurrentQuery(){return this.#e}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=this.#t.defaultQueryOptions(t),r=this.#t.getQueryCache().build(this.#t,n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return this.#x({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#x(t){this.#S();let n=this.#e.fetch(this.options,t);return t?.throwOnError||(n=n.catch(_s)),n}#h(){this.#y();const t=Dr(this.options.staleTime,this.#e);if(yl||this.#n.isStale||!vf(t))return;const r=vw(this.#n.dataUpdatedAt,t)+1;this.#c=hl.setTimeout(()=>{this.#n.isStale||this.updateResult()},r)}#g(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#b(t){this.#w(),this.#i=t,!(yl||Oa(this.options.enabled,this.#e)===!1||!vf(this.#i)||this.#i===0)&&(this.#d=hl.setInterval(()=>{(this.options.refetchIntervalInBackground||mh.isFocused())&&this.#x()},this.#i))}#v(){this.#h(),this.#b(this.#g())}#y(){this.#c&&(hl.clearTimeout(this.#c),this.#c=void 0)}#w(){this.#d&&(hl.clearInterval(this.#d),this.#d=void 0)}createResult(t,n){const r=this.#e,o=this.options,i=this.#n,d=this.#a,u=this.#r,x=t!==r?t.state:this.#s,{state:h}=t;let v={...h},g=!1,y;if(n._optimisticResults){const H=this.hasListeners(),K=!H&&cy(t,n),ne=H&&dy(t,r,n,o);(K||ne)&&(v={...v,...Aw(h.data,t.options)}),n._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:N,errorUpdatedAt:j,status:w}=v;y=v.data;let A=!1;if(n.placeholderData!==void 0&&y===void 0&&w==="pending"){let H;i?.isPlaceholderData&&n.placeholderData===u?.placeholderData?(H=i.data,A=!0):H=typeof n.placeholderData=="function"?n.placeholderData(this.#p?.state.data,this.#p):n.placeholderData,H!==void 0&&(w="success",y=wf(i?.data,H,n),g=!0)}if(n.select&&y!==void 0&&!A)if(i&&y===d?.data&&n.select===this.#m)y=this.#u;else try{this.#m=n.select,y=n.select(y),y=wf(i?.data,y,n),this.#u=y,this.#l=null}catch(H){this.#l=H}this.#l&&(N=this.#l,y=this.#u,j=Date.now(),w="error");const C=v.fetchStatus==="fetching",E=w==="pending",T=w==="error",D=E&&C,M=y!==void 0,O={status:w,fetchStatus:v.fetchStatus,isPending:E,isSuccess:w==="success",isError:T,isInitialLoading:D,isLoading:D,data:y,dataUpdatedAt:v.dataUpdatedAt,error:N,errorUpdatedAt:j,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:v.dataUpdateCount>0||v.errorUpdateCount>0,isFetchedAfterMount:v.dataUpdateCount>x.dataUpdateCount||v.errorUpdateCount>x.errorUpdateCount,isFetching:C,isRefetching:C&&!E,isLoadingError:T&&!M,isPaused:v.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:T&&M,isStale:xh(t,n),refetch:this.refetch,promise:this.#o,isEnabled:Oa(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const H=le=>{O.status==="error"?le.reject(O.error):O.data!==void 0&&le.resolve(O.data)},K=()=>{const le=this.#o=O.promise=Sf();H(le)},ne=this.#o;switch(ne.status){case"pending":t.queryHash===r.queryHash&&H(ne);break;case"fulfilled":(O.status==="error"||O.data!==ne.value)&&K();break;case"rejected":(O.status!=="error"||O.error!==ne.reason)&&K();break}}return O}updateResult(){const t=this.#n,n=this.createResult(this.#e,this.options);if(this.#a=this.#e.state,this.#r=this.options,this.#a.data!==void 0&&(this.#p=this.#e),sc(n,t))return;this.#n=n;const r=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,i=typeof o=="function"?o():o;if(i==="all"||!i&&!this.#f.size)return!0;const d=new Set(i??this.#f);return this.options.throwOnError&&d.add("error"),Object.keys(this.#n).some(u=>{const p=u;return this.#n[p]!==t[p]&&d.has(p)})};this.#j({listeners:r()})}#S(){const t=this.#t.getQueryCache().build(this.#t,this.options);if(t===this.#e)return;const n=this.#e;this.#e=t,this.#s=t.state,this.hasListeners()&&(n?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#v()}#j(t){Yt.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(this.#n)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function BA(t,n){return Oa(n.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&n.retryOnMount===!1)}function cy(t,n){return BA(t,n)||t.state.data!==void 0&&Nf(t,n,n.refetchOnMount)}function Nf(t,n,r){if(Oa(n.enabled,t)!==!1&&Dr(n.staleTime,t)!=="static"){const o=typeof r=="function"?r(t):r;return o==="always"||o!==!1&&xh(t,n)}return!1}function dy(t,n,r,o){return(t!==n||Oa(o.enabled,t)===!1)&&(!r.suspense||t.state.status!=="error")&&xh(t,r)}function xh(t,n){return Oa(n.enabled,t)!==!1&&t.isStaleByTime(Dr(n.staleTime,t))}function VA(t,n){return!sc(t.getCurrentResult(),n)}function Su(t){return{onFetch:(n,r)=>{const o=n.options,i=n.fetchOptions?.meta?.fetchMore?.direction,d=n.state.data?.pages||[],u=n.state.data?.pageParams||[];let p={pages:[],pageParams:[]},x=0;const h=async()=>{let v=!1;const g=j=>{Object.defineProperty(j,"signal",{enumerable:!0,get:()=>(n.signal.aborted?v=!0:n.signal.addEventListener("abort",()=>{v=!0}),n.signal)})},y=yw(n.options,n.fetchOptions),N=async(j,w,A)=>{if(v)return Promise.reject();if(w==null&&j.pages.length)return Promise.resolve(j);const E=(()=>{const z={client:n.client,queryKey:n.queryKey,pageParam:w,direction:A?"backward":"forward",meta:n.options.meta};return g(z),z})(),T=await y(E),{maxPages:D}=n.options,M=A?_A:OA;return{pages:M(j.pages,T,D),pageParams:M(j.pageParams,w,D)}};if(i&&d.length){const j=i==="backward",w=j?Cw:Af,A={pages:d,pageParams:u},C=w(o,A);p=await N(A,C,j)}else{const j=t??d.length;do{const w=x===0?u[0]??o.initialPageParam:Af(o,p);if(x>0&&w==null)break;p=await N(p,w),x++}while(x<j)}return p};n.options.persister?n.fetchFn=()=>n.options.persister?.(h,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},r):n.fetchFn=h}}}function Af(t,{pages:n,pageParams:r}){const o=n.length-1;return n.length>0?t.getNextPageParam(n[o],n,r[o],r):void 0}function Cw(t,{pages:n,pageParams:r}){return n.length>0?t.getPreviousPageParam?.(n[0],n,r[0],r):void 0}function FA(t,n){return n?Af(t,n)!=null:!1}function UA(t,n){return!n||!t.getPreviousPageParam?!1:Cw(t,n)!=null}var Ew=class extends hc{constructor(t,n){super(t,n)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(t){super.setOptions({...t,behavior:Su()})}getOptimisticResult(t){return t.behavior=Su(),super.getOptimisticResult(t)}fetchNextPage(t){return this.fetch({...t,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(t){return this.fetch({...t,meta:{fetchMore:{direction:"backward"}}})}createResult(t,n){const{state:r}=t,o=super.createResult(t,n),{isFetching:i,isRefetching:d,isError:u,isRefetchError:p}=o,x=r.fetchMeta?.fetchMore?.direction,h=u&&x==="forward",v=i&&x==="forward",g=u&&x==="backward",y=i&&x==="backward";return{...o,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:FA(n,r.data),hasPreviousPage:UA(n,r.data),isFetchNextPageError:h,isFetchingNextPage:v,isFetchPreviousPageError:g,isFetchingPreviousPage:y,isRefetchError:p&&!h&&!g,isRefetching:d&&!v&&!y}}},$A=class extends Nw{#t;#e;#s;#n;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#s=t.mutationCache,this.#e=[],this.state=t.state||Rw(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(n=>n!==t),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#s.remove(this))}continue(){return this.#n?.continue()??this.execute(this.state.variables)}async execute(t){const n=()=>{this.#a({type:"continue"})},r={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#n=jw({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(d,u)=>{this.#a({type:"failed",failureCount:d,error:u})},onPause:()=>{this.#a({type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});const o=this.state.status==="pending",i=!this.#n.canStart();try{if(o)n();else{this.#a({type:"pending",variables:t,isPaused:i}),await this.#s.config.onMutate?.(t,this,r);const u=await this.options.onMutate?.(t,r);u!==this.state.context&&this.#a({type:"pending",context:u,variables:t,isPaused:i})}const d=await this.#n.start();return await this.#s.config.onSuccess?.(d,t,this.state.context,this,r),await this.options.onSuccess?.(d,t,this.state.context,r),await this.#s.config.onSettled?.(d,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(d,null,t,this.state.context,r),this.#a({type:"success",data:d}),d}catch(d){try{throw await this.#s.config.onError?.(d,t,this.state.context,this,r),await this.options.onError?.(d,t,this.state.context,r),await this.#s.config.onSettled?.(void 0,d,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(void 0,d,t,this.state.context,r),d}finally{this.#a({type:"error",error:d})}}finally{this.#s.runNext(this)}}#a(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),Yt.batch(()=>{this.#e.forEach(r=>{r.onMutationUpdate(t)}),this.#s.notify({mutation:this,type:"updated",action:t})})}};function Rw(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var GA=class extends El{constructor(t={}){super(),this.config=t,this.#t=new Set,this.#e=new Map,this.#s=0}#t;#e;#s;build(t,n,r){const o=new $A({client:t,mutationCache:this,mutationId:++this.#s,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){this.#t.add(t);const n=Xd(t);if(typeof n=="string"){const r=this.#e.get(n);r?r.push(t):this.#e.set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#t.delete(t)){const n=Xd(t);if(typeof n=="string"){const r=this.#e.get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&this.#e.delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Xd(t);if(typeof n=="string"){const o=this.#e.get(n)?.find(i=>i.state.status==="pending");return!o||o===t}else return!0}runNext(t){const n=Xd(t);return typeof n=="string"?this.#e.get(n)?.find(o=>
9o!==t&&o.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Yt.batch(()=>{this.#t.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#t.clear(),this.#e.clear()})}getAll(){return Array.from(this.#t)}find(t){const n={exact:!0,...t};return this.getAll().find(r=>ry(n,r))}findAll(t={}){return this.getAll().filter(n=>ry(t,n))}notify(t){Yt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Yt.batch(()=>Promise.all(t.map(n=>n.continue().catch(_s))))}};function Xd(t){return t.options.scope?.id}var KA=class extends El{#t;#e=void 0;#s;#n;constructor(n,r){super(),this.#t=n,this.setOptions(r),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){const r=this.options;this.options=this.#t.defaultMutationOptions(n),sc(this.options,r)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#s,observer:this}),r?.mutationKey&&this.options.mutationKey&&_r(r.mutationKey)!==_r(this.options.mutationKey)?this.reset():this.#s?.state.status==="pending"&&this.#s.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#s?.removeObserver(this)}onMutationUpdate(n){this.#a(),this.#r(n)}getCurrentResult(){return this.#e}reset(){this.#s?.removeObserver(this),this.#s=void 0,this.#a(),this.#r()}mutate(n,r){return this.#n=r,this.#s?.removeObserver(this),this.#s=this.#t.getMutationCache().build(this.#t,this.options),this.#s.addObserver(this),this.#s.execute(n)}#a(){const n=this.#s?.state??Rw();this.#e={...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset}}#r(n){Yt.batch(()=>{if(this.#n&&this.hasListeners()){const r=this.#e.variables,o=this.#e.context,i={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};n?.type==="success"?(this.#n.onSuccess?.(n.data,r,o,i),this.#n.onSettled?.(n.data,null,r,o,i)):n?.type==="error"&&(this.#n.onError?.(n.error,r,o,i),this.#n.onSettled?.(void 0,n.error,r,o,i))}this.listeners.forEach(r=>{r(this.#e)})})}};function uy(t,n){const r=new Set(n);return t.filter(o=>!r.has(o))}function qA(t,n,r){const o=t.slice(0);return o[n]=r,o}var QA=class extends El{#t;#e;#s;#n;#a;#r;#o;#l;#m=[];constructor(t,n,r){super(),this.#t=t,this.#n=r,this.#s=[],this.#a=[],this.#e=[],this.setQueries(n)}onSubscribe(){this.listeners.size===1&&this.#a.forEach(t=>{t.subscribe(n=>{this.#d(t,n)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#a.forEach(t=>{t.destroy()})}setQueries(t,n){this.#s=t,this.#n=n,Yt.batch(()=>{const r=this.#a,o=this.#c(this.#s);this.#m=o,o.forEach(v=>v.observer.setOptions(v.defaultedQueryOptions));const i=o.map(v=>v.observer),d=i.map(v=>v.getCurrentResult()),u=r.length!==i.length,p=i.some((v,g)=>v!==r[g]),x=u||p,h=x?!0:d.some((v,g)=>{const y=this.#e[g];return!y||!sc(v,y)});!x&&!h||(x&&(this.#a=i),this.#e=d,this.hasListeners()&&(x&&(uy(r,i).forEach(v=>{v.destroy()}),uy(i,r).forEach(v=>{v.subscribe(g=>{this.#d(v,g)})})),this.#i()))})}getCurrentResult(){return this.#e}getQueries(){return this.#a.map(t=>t.getCurrentQuery())}getObservers(){return this.#a}getOptimisticResult(t,n){const r=this.#c(t),o=r.map(i=>i.observer.getOptimisticResult(i.defaultedQueryOptions));return[o,i=>this.#p(i??o,n),()=>this.#u(o,r)]}#u(t,n){return n.map((r,o)=>{const i=t[o];return r.defaultedQueryOptions.notifyOnChangeProps?i:r.observer.trackResult(i,d=>{n.forEach(u=>{u.observer.trackProp(d)})})})}#p(t,n){return n?((!this.#r||this.#e!==this.#l||n!==this.#o)&&(this.#o=n,this.#l=this.#e,this.#r=ph(this.#r,n(t))),this.#r):t}#c(t){const n=new Map(this.#a.map(o=>[o.options.queryHash,o])),r=[];return t.forEach(o=>{const i=this.#t.defaultQueryOptions(o),d=n.get(i.queryHash);d?r.push({defaultedQueryOptions:i,observer:d}):r.push({defaultedQueryOptions:i,observer:new hc(this.#t,i)})}),r}#d(t,n){const r=this.#a.indexOf(t);r!==-1&&(this.#e=qA(this.#e,r,n),this.#i())}#i(){if(this.hasListeners()){const t=this.#r,n=this.#u(this.#e,this.#m),r=this.#p(n,this.#n?.combine);t!==r&&Yt.batch(()=>
vendor: 10,451 bytes, lines 9-17
9{this.listeners.forEach(o=>{o(this.#e)})})}}},YA=class extends El{constructor(t={}){super(),this.config=t,this.#t=new Map}#t;build(t,n,r){const o=n.queryKey,i=n.queryHash??uh(o,n);let d=this.get(i);return d||(d=new IA({client:t,queryKey:o,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(d)),d}add(t){this.#t.has(t.queryHash)||(this.#t.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=this.#t.get(t.queryHash);n&&(t.destroy(),n===t&&this.#t.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Yt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#t.get(t)}getAll(){return[...this.#t.values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>ny(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>ny(t,r)):n}notify(t){Yt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Yt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Yt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},XA=class{#t;#e;#s;#n;#a;#r;#o;#l;constructor(t={}){this.#t=t.queryCache||new YA,this.#e=t.mutationCache||new GA,this.#s=t.defaultOptions||{},this.#n=new Map,this.#a=new Map,this.#r=0}mount(){this.#r++,this.#r===1&&(this.#o=mh.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#l=wu.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#t.onOnline())}))}unmount(){this.#r--,this.#r===0&&(this.#o?.(),this.#o=void 0,this.#l?.(),this.#l=void 0)}isFetching(t){return this.#t.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#e.findAll({...t,status:"pending"}).length}getQueryData(t){const n=this.defaultQueryOptions({queryKey:t});return this.#t.get(n.queryHash)?.state.data}ensureQueryData(t){const n=this.defaultQueryOptions(t),r=this.#t.build(this,n),o=r.state.data;return o===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime(Dr(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(o))}getQueriesData(t){return this.#t.findAll(t).map(({queryKey:n,state:r})=>{const o=r.data;return[n,o]})}setQueryData(t,n,r){const o=this.defaultQueryOptions({queryKey:t}),d=this.#t.get(o.queryHash)?.state.data,u=kA(n,d);if(u!==void 0)return this.#t.build(this,o).setData(u,{...r,manual:!0})}setQueriesData(t,n,r){return Yt.batch(()=>this.#t.findAll(t).map(({queryKey:o})=>[o,this.setQueryData(o,n,r)]))}getQueryState(t){const n=this.defaultQueryOptions({queryKey:t});return this.#t.get(n.queryHash)?.state}removeQueries(t){const n=this.#t;Yt.batch(()=>{n.findAll(t).forEach(r=>{n.remove(r)})})}resetQueries(t,n){const r=this.#t;return Yt.batch(()=>(r.findAll(t).forEach(o=>{o.reset()}),this.refetchQueries({type:"active",...t},n)))}cancelQueries(t,n={}){const r={revert:!0,...n},o=Yt.batch(()=>this.#t.findAll(t).map(i=>i.cancel(r)));return Promise.all(o).then(_s).catch(_s)}invalidateQueries(t,n={}){return Yt.batch(()=>(this.#t.findAll(t).forEach(r=>{r.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},n)))}refetchQueries(t,n={}){const r={...n,cancelRefetch:n.cancelRefetch??!0},o=Yt.batch(()=>this.#t.findAll(t).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let d=i.fetch(void 0,r);return r.throwOnError||(d=d.catch(_s)),i.state.fetchStatus==="paused"?Promise.resolve():d}));return Promise.all(o).then(_s)}fetchQuery(t){const n=this.defaultQueryOptions(t);n.retry===void 0&&(n.retry=!1);const r=this.#t.build(this,n);return r.isStaleByTime(Dr(n.staleTime,r))?r.fetch(n):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(_s).catch(_s)}fetchInfiniteQuery(t){return t.behavior=Su(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(_s).catch(_s)}ensureInfiniteQueryData(t){return t.behavior=Su(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return wu.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#t}getMutationCache(){return this.#e}getDefaultOptions(){return this.#s}setDefaultOptions(t){this.#s=t}setQueryDefaults(t,n){this.#n.set(_r(t),{queryKey:t,defaultOptions:n})}getQueryDefaults(t){const n=[...this.#n.values()],r={};return n.forEach(o=>{tc(t,o.queryKey)&&Object.assign(r,o.defaultOptions)}),r}setMutationDefaults(t,n){this.#a.set(_r(t),{mutationKey:t,defaultOptions:n})}getMutationDefaults(t){const n=[...this.#a.values()],r={};return n.forEach(o=>{tc(t,o.mutationKey)&&Object.assign(r,o.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;const n={...this.#s.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return n.queryHash||(n.queryHash=uh(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===xa&&(n.enabled=!1),n}defaultMutationOptions(t){return t?._defaulted?t:{...this.#s.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#t.clear(),this.#e.clear()}},Hx={exports:{}},Ie={};/** 10 * @license React 11 * react.production.js 12 * 13 * Copyright (c) Meta Platforms, Inc. and affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var py;function ZA(){if(py)return Ie;py=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),u=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),y=Symbol.iterator;function N(_){return _===null||typeof _!="object"?null:(_=y&&_[y]||_["@@iterator"],typeof _=="function"?_:null)}var j={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,A={};function C(_,L,I){this.props=_,this.context=L,this.refs=A,this.updater=I||j}C.prototype.isReactComponent={},C.prototype.setState=function(_,L){if(typeof _!="object"&&typeof _!="function"&&_!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,_,L,"setState")},C.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function E(){}E.prototype=C.prototype;function T(_,L,I){this.props=_,this.context=L,this.refs=A,this.updater=I||j}var D=T.prototype=new E;D.constructor=T,w(D,C.prototype),D.isPureReactComponent=!0;var M=Array.isArray;function z(){}var O={H:null,A:null,T:null,S:null},H=Object.prototype.hasOwnProperty;function K(_,L,I){var G=I.ref;return{$$typeof:t,type:_,key:L,ref:G!==void 0?G:null,props:I}}function ne(_,L){return K(_.type,L,_.props)}function le(_){return typeof _=="object"&&_!==null&&_.$$typeof===t}function Z(_){var L={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(I){return L[I]})}var X=/\/+/g;function q(_,L){return typeof _=="object"&&_!==null&&_.key!=null?Z(""+_.key):L.toString(36)}function Q(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(z,z):(_.status="pending",_.then(function(L){_.status==="pending"&&(_.status="fulfilled",_.value=L)},function(L){_.status==="pending"&&(_.status="rejected",_.reason=L)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function R(_,L,I,G,J){var me=typeof _;(me==="undefined"||me==="boolean")&&(_=null);var W=!1;if(_===null)W=!0;else switch(me){case"bigint":case"string":case"number":W=!0;break;case"object":switch(_.$$typeof){case t:case n:W=!0;break;case v:return W=_._init,R(W(_._payload),L,I,G,J)}}if(W)return J=J(_),W=G===""?"."+q(_,0):G,M(J)?(I="",W!=null&&(I=W.replace(X,"$&/")+"/"),R(J,L,I,"",function(He){return He})):J!=null&&(le(J)&&(J=ne(J,I+(J.key==null||_&&_.key===J.key?"":(""+J.key).replace(X,"$&/")+"/")+W)),L.push(J)),1;W=0;var he=G===""?".":G+":";if(M(_))for(var ve=0;ve<_.length;ve++)G=_[ve],me=he+q(G,ve),W+=R(G,L,I,me,J);else if(ve=N(_),typeof ve=="function")for(_=ve.call(_),ve=0;!(G=_.next()).done;)G=G.value,me=he+q(G,ve++),W+=R(G,L,I,me,J);else if(me==="object"){if(typeof _.then=="function")return R(Q(_),L,I,G,J);throw L=String(_),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return W}function P(_,L,I){if(_==null)return _;var G=[],J=0;return R(_,G,"","",function(me){return L.call(I,me,J++)}),G}function B(_){if(_._status===-1){var L=_._result;L=L(),L.then(function(I){(_._status===0||_._status===-1)&&(_._status=1,_._result=I)},function(I){(_._status===0||_._status===-1)&&(_._status=2,_._result=I)}),_._status===-1&&(_._status=0,_._result=L)}if(_._status===1)return _._result.default;throw _._result}var V=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)},re={map:P,forEach:function(_,L,I){P(_,function(){L.apply(this,arguments)},I)},count:function(_){var L=0;return P(_,function(){L++}),L},toArray:function(_){return P(_,function(L){return L})||[]},only:function(_){if(!le(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return Ie.Activity=g,Ie.Children=re,Ie.Component=C,Ie.Fragment=r,Ie.Profiler=i,Ie.PureComponent=T,Ie.StrictMode=o,Ie.Suspense=x,Ie.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O,Ie.__COMPILER_RUNTIME={__proto__:null,c:function(_){return O.H.useMemoCache(_)}},Ie.cache=function(_){return function(){return _.apply(null,arguments)}},Ie.cacheSignal=function(){return null},Ie.cloneElement=function(_,L,I){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var G=w({},_.props),J=_.key;
17if(L!=null)for(me in L.key!==void 0&&(J=""+L.key),L)!H.call(L,me)||me==="key"||me==="__self"||me==="__source"||me==="ref"&&L.ref===void 0||(G[me]=L[me]);var me=arguments.length-2;if(me===1)G.children=I;else if(1<me){for(var W=Array(me),he=0;he<me;he++)W[he]=arguments[he+2];G.children=W}return K(_.type,J,G)},Ie.createContext=function(_){return _={$$typeof:u,_currentValue:_,_currentValue2:_,_threadCount:0,Provider:null,Consumer:null},_.Provider=_,_.Consumer={$$typeof:d,_context:_},_},Ie.createElement=function(_,L,I){var G,J={},me=null;if(L!=null)for(G in L.key!==void 0&&(me=""+L.key),L)H.call(L,G)&&G!=="key"&&G!=="__self"&&G!=="__source"&&(J[G]=L[G]);var W=arguments.length-2;if(W===1)J.children=I;else if(1<W){for(var he=Array(W),ve=0;ve<W;ve++)he[ve]=arguments[ve+2];J.children=he}if(_&&_.defaultProps)for(G in W=_.defaultProps,W)J[G]===void 0&&(J[G]=W[G]);return K(_,me,J)},Ie.createRef=function(){return{current:null}},Ie.forwardRef=function(_){return{$$typeof:p,render:_}},Ie.isValidElement=le,Ie.lazy=function(_){return{$$typeof:v,_payload:{_status:-1,_result:_},_init:B}},Ie.memo=function(_,L){return{$$typeof:h,type:_,compare:L===void 0?null:L}},Ie.startTransition=function(_){var L=O.T,I={};O.T=I;try{var G=_(),J=O.S;J!==null&&J(I,G),typeof G=="object"&&G!==null&&typeof G.then=="function"&&G.then(z,V)}catch(me){V(me)}finally{L!==null&&I.types!==null&&(L.types=I.types),O.T=L}},Ie.unstable_useCacheRefresh=function(){return O.H.useCacheRefresh()},Ie.use=function(_){return O.H.use(_)},Ie.useActionState=function(_,L,I){return O.H.useActionState(_,L,I)},Ie.useCallback=function(_,L){return O.H.useCallback(_,L)},Ie.useContext=function(_){return O.H.useContext(_)},Ie.useDebugValue=function(){},Ie.useDeferredValue=function(_,L){return O.H.useDeferredValue(_,L)},Ie.useEffect=function(_,L){return O.H.useEffect(_,L)},Ie.useEffectEvent=function(_){return O.H.useEffectEvent(_)},Ie.useId=function(){return O.H.useId()},Ie.useImperativeHandle=function(_,L,I){return O.H.useImperativeHandle(_,L,I)},Ie.useInsertionEffect=function(_,L){return O.H.useInsertionEffect(_,L)},Ie.useLayoutEffect=function(_,L){return O.H.useLayoutEffect(_,L)},Ie.useMemo=function(_,L){return O.H.useMemo(_,L)},Ie.useOptimistic=function(_,L){return O.H.useOptimistic(_,L)},Ie.useReducer=function(_,L,I){return O.H.useReducer(_,L,I)},Ie.useRef=function(_){return O.H.useRef(_)},Ie.useState=function(_){return O.H.useState(_)},Ie.useSyncExternalStore=function(_,L,I){return O.H.useSyncExternalStore(_,L,I)},Ie.useTransition=function(){return O.H.useTransition()},Ie.version="19.2.1",Ie}var my;function Uu(){return my||(my=1,Hx.exports=ZA()),Hx.exports}var b=Uu();const se=bw(b),$u=jA({__proto__:null,default:se},[b]);var kw=b.createContext(void 0),zo=t=>{const n=b.useContext(kw);if(t)return t;if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},WA=({client:t,children:n})=>(b.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),e.jsx(kw.Provider,{value:t,children:n})),Dw=b.createContext(!1),Tw=()=>b.useContext(Dw);Dw.Provider;function JA(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var eC=b.createContext(JA()),Ow=()=>b.useContext(eC),_w=(t,n)=>{(t.suspense||t.throwOnError||t.experimental_prefetchInRender)&&(n.isReset()||(t.retryOnMount=!1))},Mw=t=>{b.useEffect(()=>{t.clearReset()},[t])},Pw=({result:t,errorResetBoundary:n,throwOnError:r,query:o,suspense:i})=>t.isError&&!n.isReset()&&!t.isFetching&&o&&(i&&t.data===void 0||ww(r,[t.error,o])),fh=(t,n)=>n.state.data===void 0,Hw=t=>{if(t.suspense){const r=i=>i==="static"?i:Math.max(i??1e3,1e3),o=t.staleTime;t.staleTime=typeof o=="function"?(...i)=>r(o(...i)):r(o),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},Lw=(t,n)=>t.isLoading&&t.isFetching&&!n,Cf=(t,n)=>t?.suspense&&n.isPending,ju=(t,n,r)=>n.fetchOptimistic(t).catch(()=>{r.clearReset()});function zw({queries:t,...n},r){const o=zo(r),i=Tw(),d=Ow(),u=b.useMemo(()=>t.map(w=>{const A=o.defaultQueryOptions(w);return A._optimisticResults=i?"isRestoring":"optimistic",A}),[t,o,i]);u.forEach(w=>{Hw(w),_w(w,d)}),Mw(d);const[p]=b.useState(()=>new QA(o,u,n)),[x,h,v]=p.getOptimisticResult(u,n.combine),g=!i&&n.subscribed!==!1;b.useSyncExternalStore(b.useCallback(w=>g?p.subscribe(Yt.batchCalls(w)):_s,[p,g]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),b.useEffect(()=>{p.setQueries(u,n)},[u,n,p]);const N=x.some((w,A)=>Cf(u[A],w))?x.flatMap((w,A)=>{const C=u[A];if(C){const E=new hc(o,C);if(Cf(C,w))return ju(C,E,d);Lw(w,i)&&ju(C,E,d)}return[]}):[];if(N.length>0)throw Promise.all(N);const j=x.find((w,A)=>{const C=u[A];return C&&Pw({result:w,errorResetBoundary:d,throwOnError:C.throwOnError,query:o.getQueryCache().get(C.queryHash),suspense:C.suspense})});if(j?.error)throw j.error;return h(v())}function Gu(t,n,r){const o=Tw(),i=Ow(),d=zo(r),u=d.defaultQueryOptions(t);d.getDefaultOptions().queries?._experimental_beforeQuery?.(u),u._optimisticResults=o?"isRestoring":"optimistic",Hw(u),_w(u,i),Mw(i);const p=!d.getQueryCache().get(u.queryHash),[x]=b.useState(()=>new n(d,u)),h=x.getOptimisticResult(u),v=!o&&t.subscribed!==!1;if(b.useSyncExternalStore(b.useCallback(g=>{const y=v?x.subscribe(Yt.batchCalls(g)):_s;return x.updateResult(),y},[x,v]),()=>x.getCurrentResult(),()=>x.getCurrentResult()),b.useEffect(()=>{x.setOptions(u)},[u,x]),Cf(u,h))throw ju(u,x,i);if(Pw({result:h,errorResetBoundary:i,throwOnError:u.throwOnError,query:d.getQueryCache().get(u.queryHash),suspense:u.suspense}))throw h.error;return d.getDefaultOptions().queries?._experimental_afterQuery?.(u,h),u.experimental_prefetchInRender&&!yl&&Lw(h,o)&&(p?ju(u,x,i):d.getQueryCache().get(u.queryHash)?.promise)?.catch(_s).finally(()=>{x.updateResult()}),u.notifyOnChangeProps?h:x.trackResult(h)}function tC(t,n){return Gu(t,hc,n)}function sC(t,n){return Gu({...t,enabled:!0,suspense:!0,throwOnError:fh,placeholderData:void 0},hc,n)}function aC(t,n){return Gu({...t,enabled:!0,suspense:!0,throwOnError:fh},Ew,n)}function nC(t,n){return zw({...t,queries:t.queries.map(r=>({...r,suspense:!0,throwOnError:fh,enabled:!0,placeholderData:void 0}))},n)}function rC(t,n){const r=zo(n);r.getQueryState(t.queryKey)||r.prefetchQuery(t)}function lC(t,n){const r=zo(n);r.getQueryState(t.queryKey)||r.prefetchInfiniteQuery(t)}function oC(t,n){const r=zo(n),[o]=b.useState(()=>new KA(r,t));b.useEffect(()=>{o.setOptions(t)},[o,t]);const i=b.useSyncExternalStore(b.useCallback(u=>o.subscribe(Yt.batchCalls(u)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),d=b.useCallback((u,p)=>{o.mutate(u,p).catch(_s)}
17,[o]);if(i.error&&ww(o.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:d,mutateAsync:i.mutate}}function iC(t,n){return Gu(t,Ew,n)}function wl(t){return!!t&&!Array.isArray(t)&&typeof t=="object"}const cC=typeof Symbol=="function"&&!!Symbol.asyncIterator;function Iw(t){return cC&&wl(t)&&Symbol.asyncIterator in t}var dC=Object.create,Bw=Object.defineProperty,uC=Object.getOwnPropertyDescriptor,Vw=Object.getOwnPropertyNames,pC=Object.getPrototypeOf,mC=Object.prototype.hasOwnProperty,gc=(t,n)=>function(){return n||(0,t[Vw(t)[0]])((n={exports:{}}).exports,n),n.exports},xC=(t,n,r,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(var i=Vw(n),d=0,u=i.length,p;d<u;d++)p=i[d],!mC.call(t,p)&&p!==r&&Bw(t,p,{get:(x=>n[x]).bind(null,p),enumerable:!(o=uC(n,p))||o.enumerable});return t},Ku=(t,n,r)=>(r=t!=null?dC(pC(t)):{},xC(Bw(r,"default",{value:t,enumerable:!0}),t));const Fw=()=>{},xy=t=>{Object.freeze&&Object.freeze(t)};function Uw(t,n,r){var o;const i=n.join(".");return(o=r[i])!==null&&o!==void 0||(r[i]=new Proxy(Fw,{get(d,u){if(!(typeof u!="string"||u==="then"))return Uw(t,[...n,u],r)},apply(d,u,p){const x=n[n.length-1];let h={args:p,path:n};return x==="call"?h={args:p.length>=2?[p[1]]:[],path:n.slice(0,-1)}:x==="apply"&&(h={args:p.length>=2?p[1]:[],path:n.slice(0,-1)}),xy(h.args),xy(h.path),t(h)}})),r[i]}const qu=t=>Uw(t,[],Object.create(null)),hh=t=>new Proxy(Fw,{get(n,r){if(r!=="then")return t(r)}});var $w=gc({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(t,n){function r(o){"@babel/helpers - typeof";return n.exports=r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},n.exports.__esModule=!0,n.exports.default=n.exports,r(o)}n.exports=r,n.exports.__esModule=!0,n.exports.default=n.exports}}),fC=gc({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(t,n){var r=$w().default;function o(i,d){if(r(i)!="object"||!i)return i;var u=i[Symbol.toPrimitive];if(u!==void 0){var p=u.call(i,d||"default");if(r(p)!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(i)}n.exports=o,n.exports.__esModule=!0,n.exports.default=n.exports}}),hC=gc({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(t,n){var r=$w().default,o=fC();function i(d){var u=o(d,"string");return r(u)=="symbol"?u:u+""}n.exports=i,n.exports.__esModule=!0,n.exports.default=n.exports}}),Gw=gc({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(t,n){var r=hC();function o(i,d,u){return(d=r(d))in i?Object.defineProperty(i,d,{value:u,enumerable:!0,configurable:!0,writable:!0}):i[d]=u,i}n.exports=o,n.exports.__esModule=!0,n.exports.default=n.exports}}),gh=gc({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(t,n){var r=Gw();function o(d,u){var p=Object.keys(d);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(d);u&&(x=x.filter(function(h){return Object.getOwnPropertyDescriptor(d,h).enumerable})),p.push.apply(p,x)}return p}function i(d){for(var u=1;u<arguments.length;u++){var p=arguments[u]!=null?arguments[u]:{};u%2?o(Object(p),!0).forEach(function(x){r(d,x,p[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(p)):o(Object(p)).forEach(function(x){Object.defineProperty(d,x,Object.getOwnPropertyDescriptor(p,x))})}return d}n.exports=i,n.exports.__esModule=!0,n.exports.default=n.exports}});Ku(gh());Ku(Gw());var Zd=Ku(gh());function gC(t,n){if("error"in t){const o=n.deserialize(t.error);return{ok:!1,error:(0,Zd.default)((0,Zd.default)({},t),{},{error:o})}}return{ok:!0,result:(0,Zd.default)((0,Zd.default)({},t.result),(!t.result.type||t.result.type==="data")&&{type:"data",data:n.deserialize(t.result.data)})}}
17var Lx=class extends Error{constructor(){super("Unable to transform response from server")}};function bC(t,n){let r;try{r=gC(t,n)}catch{throw new Lx}if(!r.ok&&(!wl(r.error.error)||typeof r.error.error.code!="number"))throw new Lx;if(r.ok&&!wl(r.result))throw new Lx;return r}Ku(gh());function Qu(t){const n={subscribe(r){let o=null,i=!1,d=!1,u=!1;function p(){if(o===null){u=!0;return}d||(d=!0,typeof o=="function"?o():o&&o.unsubscribe())}return o=t({next(x){var h;i||(h=r.next)===null||h===void 0||h.call(r,x)},error(x){var h;i||(i=!0,(h=r.error)===null||h===void 0||h.call(r,x),p())},complete(){var x;i||(i=!0,(x=r.complete)===null||x===void 0||x.call(r),p())}}),u&&p(),{unsubscribe:p}},pipe(...r){return r.reduce(vC,n)}};return n}function vC(t,n){return n(t)}function yC(t){const n=new AbortController;return new Promise((o,i)=>{let d=!1;function u(){d||(d=!0,p.unsubscribe())}n.signal.addEventListener("abort",()=>{i(n.signal.reason)});const p=t.subscribe({next(x){d=!0,o(x),u()},error(x){i(x)},complete(){n.abort(),u()}})})}var wC=Object.create,Kw=Object.defineProperty,SC=Object.getOwnPropertyDescriptor,qw=Object.getOwnPropertyNames,jC=Object.getPrototypeOf,NC=Object.prototype.hasOwnProperty,Vr=(t,n)=>function(){return n||(0,t[qw(t)[0]])((n={exports:{}}).exports,n),n.exports},AC=(t,n,r,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(var i=qw(n),d=0,u=i.length,p;d<u;d++)p=i[d],!NC.call(t,p)&&p!==r&&Kw(t,p,{get:(x=>n[x]).bind(null,p),enumerable:!(o=SC(n,p))||o.enumerable});return t},Rl=(t,n,r)=>(r=t!=null?wC(jC(t)):{},AC(n||!t||!t.__esModule?Kw(r,"default",{value:t,enumerable:!0}):r,t)),CC=Vr({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/objectWithoutPropertiesLoose.js"(t,n){function r(o,i){if(o==null)return{};var d={};for(var u in o)if({}.hasOwnProperty.call(o,u)){if(i.includes(u))continue;d[u]=o[u]}return d}n.exports=r,n.exports.__esModule=!0,n.exports.default=n.exports}}),EC=Vr({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/objectWithoutProperties.js"(t,n){var r=CC();function o(i,d){if(i==null)return{};var u,p,x=r(i,d);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(i);for(p=0;p<h.length;p++)u=h[p],d.includes(u)||{}.propertyIsEnumerable.call(i,u)&&(x[u]=i[u])}return x}n.exports=o,n.exports.__esModule=!0,n.exports.default=n.exports}}),Qw=Vr({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(t,n){function r(o){"@babel/helpers - typeof";return n.exports=r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},n.exports.__esModule=!0,n.exports.default=n.exports,r(o)}n.exports=r,n.exports.__esModule=!0,n.exports.default=n.exports}}),RC=Vr({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(t,n){var r=Qw().default;function o(i,d){if(r(i)!="object"||!i)return i;var u=i[Symbol.toPrimitive];if(u!==void 0){var p=u.call(i,d||"default");if(r(p)!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(i)}n.exports=o,n.exports.__esModule=!0,n.exports.default=n.exports}}),kC=Vr({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(t,n){var r=Qw().default,o=RC();function i(d){var u=o(d,"string");return r(u)=="symbol"?u:u+""}n.exports=i,n.exports.__esModule=!0,n.exports.default=n.exports}}),DC=Vr({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(t,n){var r=kC();function o(i,d,u){return(d=r(d))in i?Object.defineProperty(i,d,{value:u,enumerable:!0,configurable:!0,writable:!0}):i[d]=u,i}n.exports=o,n.exports.__esModule=!0,n.exports.default=n.exports}}),bc=Vr({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(t,n){var r=DC();function o(d,u){var p=Object.keys(d);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(d);u&&(x=x.filter(function(h){return Object.getOwnPropertyDescriptor(d,h).enumerable}
17)),p.push.apply(p,x)}return p}function i(d){for(var u=1;u<arguments.length;u++){var p=arguments[u]!=null?arguments[u]:{};u%2?o(Object(p),!0).forEach(function(x){r(d,x,p[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(p)):o(Object(p)).forEach(function(x){Object.defineProperty(d,x,Object.getOwnPropertyDescriptor(p,x))})}return d}n.exports=i,n.exports.__esModule=!0,n.exports.default=n.exports}}),TC=Rl(EC(),1),fy=Rl(bc(),1);const OC=["cursor","direction"];function mn(t,n,r){const o=t.flatMap(i=>i.split("."));if(!n&&(!r||r==="any"))return o.length?[o]:[];if(r==="infinite"&&wl(n)&&("direction"in n||"cursor"in n)){const{cursor:i,direction:d}=n,u=(0,TC.default)(n,OC);return[o,{input:u,type:"infinite"}]}return[o,(0,fy.default)((0,fy.default)({},typeof n<"u"&&n!==xa&&{input:n}),r&&r!=="any"&&{type:r})]}function fu(t){return mn(t,void 0,"any")}var _C=Object.create,Yw=Object.defineProperty,MC=Object.getOwnPropertyDescriptor,Xw=Object.getOwnPropertyNames,PC=Object.getPrototypeOf,HC=Object.prototype.hasOwnProperty,wn=(t,n)=>function(){return n||(0,t[Xw(t)[0]])((n={exports:{}}).exports,n),n.exports},LC=(t,n,r,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(var i=Xw(n),d=0,u=i.length,p;d<u;d++)p=i[d],!HC.call(t,p)&&p!==r&&Yw(t,p,{get:(x=>n[x]).bind(null,p),enumerable:!(o=MC(n,p))||o.enumerable});return t},ts=(t,n,r)=>(r=t!=null?_C(PC(t)):{},LC(n||!t||!t.__esModule?Yw(r,"default",{value:t,enumerable:!0}):r,t)),Zw=wn({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(t,n){function r(o){"@babel/helpers - typeof";return n.exports=r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},n.exports.__esModule=!0,n.exports.default=n.exports,r(o)}n.exports=r,n.exports.__esModule=!0,n.exports.default=n.exports}}),zC=wn({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(t,n){var r=Zw().default;function o(i,d){if(r(i)!="object"||!i)return i;var u=i[Symbol.toPrimitive];if(u!==void 0){var p=u.call(i,d||"default");if(r(p)!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(i)}n.exports=o,n.exports.__esModule=!0,n.exports.default=n.exports}}),IC=wn({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(t,n){var r=Zw().default,o=zC();function i(d){var u=o(d,"string");return r(u)=="symbol"?u:u+""}n.exports=i,n.exports.__esModule=!0,n.exports.default=n.exports}}),kl=wn({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(t,n){var r=IC();function o(i,d,u){return(d=r(d))in i?Object.defineProperty(i,d,{value:u,enumerable:!0,configurable:!0,writable:!0}):i[d]=u,i}n.exports=o,n.exports.__esModule=!0,n.exports.default=n.exports}}),tn=wn({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(t,n){var r=kl();function o(d,u){var p=Object.keys(d);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(d);u&&(x=x.filter(function(h){return Object.getOwnPropertyDescriptor(d,h).enumerable})),p.push.apply(p,x)}return p}function i(d){for(var u=1;u<arguments.length;u++){var p=arguments[u]!=null?arguments[u]:{};u%2?o(Object(p),!0).forEach(function(x){r(d,x,p[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(p)):o(Object(p)).forEach(function(x){Object.defineProperty(d,x,Object.getOwnPropertyDescriptor(p,x))})}return d}n.exports=i,n.exports.__esModule=!0,n.exports.default=n.exports}});function BC(t){return n=>{let r=0,o=null;const i=[];function d(){o||(o=n.subscribe({next(p){for(const h of i){var x;(x=h.next)===null||x===void 0||x.call(h,p)}},error(p){for(const h of i){var x;(x=h.error)===null||x===void 0||x.call(h,p)}},complete(){for(const x of i){var p;(p=x.complete)===null||p===void 0||p.call(x)}}}))}function u(){if(r===0&&o){const p=o;o=null,p.unsubscribe()}}return Qu(p=>(r++,i.push(p),d(),{unsubscribe(){r--,u();const x=i.findIndex(h=>h===p);x>
17-1&&i.splice(x,1)}}))}}function VC(t){let n=t;const r=[],o=u=>{n!==void 0&&u.next(n),r.push(u)},i=u=>{r.splice(r.indexOf(u),1)},d=Qu(u=>(o(u),()=>{i(u)}));return d.next=u=>{if(n!==u){n=u;for(const p of r)p.next(u)}},d.get=()=>n,d}function FC(t){return Qu(n=>{function r(i=0,d=t.op){const u=t.links[i];if(!u)throw new Error("No more links to execute - did you forget to add an ending link?");return u({op:d,next(x){return r(i+1,x)}})}return r().subscribe(n)})}var Wd=ts(kl(),1),go=ts(tn(),1);function UC(t){return t instanceof Oo}function $C(t){return wl(t)&&wl(t.error)&&typeof t.error.code=="number"&&typeof t.error.message=="string"}function GC(t,n){return typeof t=="string"?t:wl(t)&&typeof t.message=="string"?t.message:n}var Oo=class hu extends Error{constructor(n,r){var o,i;const d=r?.cause;super(n,{cause:d}),(0,Wd.default)(this,"cause",void 0),(0,Wd.default)(this,"shape",void 0),(0,Wd.default)(this,"data",void 0),(0,Wd.default)(this,"meta",void 0),this.meta=r?.meta,this.cause=d,this.shape=r==null||(o=r.result)===null||o===void 0?void 0:o.error,this.data=r==null||(i=r.result)===null||i===void 0?void 0:i.error.data,this.name="TRPCClientError",Object.setPrototypeOf(this,hu.prototype)}static from(n,r={}){const o=n;return UC(o)?(r.meta&&(o.meta=(0,go.default)((0,go.default)({},o.meta),r.meta)),o):$C(o)?new hu(o.error.message,(0,go.default)((0,go.default)({},r),{},{result:o})):new hu(GC(o,"Unknown error"),(0,go.default)((0,go.default)({},r),{},{cause:o}))}};function KC(t){const n=t;return n?"input"in n?n:{input:n,output:n}:{input:{serialize:r=>r,deserialize:r=>r},output:{serialize:r=>r,deserialize:r=>r}}}const hy=t=>typeof t=="function";function qC(t){if(t)return t;if(typeof window<"u"&&hy(window.fetch))return window.fetch;if(typeof globalThis<"u"&&hy(globalThis.fetch))return globalThis.fetch;throw new Error("No fetch implementation found")}var qi=ts(tn());function QC(t){return{url:t.url.toString(),fetch:t.fetch,transformer:KC(t.transformer),methodOverride:t.methodOverride}}function YC(t){const n={};for(let r=0;r<t.length;r++){const o=t[r];n[r]=o}return n}const XC={query:"GET",mutation:"POST",subscription:"PATCH"};function Ww(t){return"input"in t?t.transformer.input.serialize(t.input):YC(t.inputs.map(n=>t.transformer.input.serialize(n)))}const Jw=t=>{const n=t.url.split("?");let o=n[0].replace(/\/$/,"")+"/"+t.path;const i=[];if(n[1]&&i.push(n[1]),"inputs"in t&&i.push("batch=1"),t.type==="query"||t.type==="subscription"){const d=Ww(t);d!==void 0&&t.methodOverride!=="POST"&&i.push(`input=${encodeURIComponent(JSON.stringify(d))}`)}return i.length&&(o+="?"+i.join("&")),o},ZC=t=>{if(t.type==="query"&&t.methodOverride!=="POST")return;const n=Ww(t);return n!==void 0?JSON.stringify(n):void 0},WC=t=>sE((0,qi.default)((0,qi.default)({},t),{},{contentTypeHeader:"application/json",getUrl:Jw,getBody:ZC}));var JC=class extends Error{constructor(){const t="AbortError";super(t),this.name=t,this.message=t}};const eE=t=>{var n;if(t?.aborted)throw(n=t.throwIfAborted)===null||n===void 0||n.call(t),typeof DOMException<"u"?new DOMException("AbortError","AbortError"):new JC};async function tE(t){var n;eE(t.signal);const r=t.getUrl(t),o=t.getBody(t),i=(n=t.methodOverride)!==null&&n!==void 0?n:XC[t.type],d=await(async()=>{const p=await t.headers();return Symbol.iterator in p?Object.fromEntries(p):p})(),u=(0,qi.default)((0,qi.default)((0,qi.default)({},t.contentTypeHeader&&i!=="GET"?{"content-type":t.contentTypeHeader}:{}),t.trpcAcceptHeader?{"trpc-accept":t.trpcAcceptHeader}:void 0),d);return qC(t.fetch)(r,{method:i,signal:t.signal,body:o,headers:u})}async function sE(t){const n={},r=await tE(t);n.response=r;const o=await r.json();return n.responseJSON=o,{json:o,meta:n}}ts(tn(),1);const gy=()=>{throw new Error("Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new")};function by(t){let n=null,r=null;const o=()=>{clearTimeout(r),r=null,n=null};function i(p){const x=[[]];let h=0;for(;;){const y=p[h];if(!y)break;const N=x[x.length-1];if(y.aborted){var v;(v=y.reject)===null||v===void 0||v.call(y,new Error("Aborted")),h++;continue}if(t.validate(N.concat(y).map(w=>w.key))){N.push(y),h++;continue}if(N.length===0){var g;(g=y.reject)===null||g===void 0||g.call(y,new Error("Input is too big for a single dispatch")),h++;continue}x.push([])}return x}function d(){const p=i(n);o();for(const x of p){if(!x.length)continue;const h={items:x};for(const g of x)g.batch=h;t.fetch(h.items.map(g=>g.key)).then(async g=>{await Promise.all(g.map(async(N,j)=>{const w=h.items[j];try{var A;const E=await Promise.resolve(N);(A=w.resolve)===null||A===void 0||A.call(w,E)}catch(E){var C;(C=w.reject)===null||C===void 0||C.call(w,E)}w.batch=null,w.reject=null,w.resolve=null}));for(const N of h.items){var y;(y=N.reject)===null||y===void 0||y.call(N,new Error("Missing result")),N.batch=null}}).catch(g=>{for(const N of h.items){var y;(y=N.reject)===null||y===void 0||y.call(N,g),N.batch=null}})}}function u(p){var x;const h={aborted:!1,key:p,batch:null,resolve:gy,reject:gy},v=new Promise((g,y)=>{var N;h.reject=y,h.resolve=g,(N=n)!==null&&N!==void 0||(n=[]),n.push(h)});return(x=r)!==null&&x!==void 0||(r=setTimeout(d)),v}return{load:u}}function aE(...t){const n=new AbortController,r=t.length;let o=0;const i=()=>{++o===r&&n.abort()};for(const d of t)d?.aborted?i():d?.addEventListener("abort",i,{once:!0});return n.signal}var Jd=ts(tn(),1);function nE(t){var n,r;const o=QC(t),i=(n=t.maxURLLength)!==null&&n!==void 0?n:1/0,d=(r=t.maxItems)!==null&&r!==void 0?r:1/0;return()=>{const u=v=>({validate(g){if(i===1/0&&d===1/0)return!0;
17if(g.length>d)return!1;const y=g.map(w=>w.path).join(","),N=g.map(w=>w.input);return Jw((0,Jd.default)((0,Jd.default)({},o),{},{type:v,path:y,inputs:N,signal:null})).length<=i},async fetch(g){const y=g.map(E=>E.path).join(","),N=g.map(E=>E.input),j=aE(...g.map(E=>E.signal)),w=await WC((0,Jd.default)((0,Jd.default)({},o),{},{path:y,inputs:N,type:v,headers(){return t.headers?typeof t.headers=="function"?t.headers({opList:g}):t.headers:{}},signal:j}));return(Array.isArray(w.json)?w.json:g.map(()=>w.json)).map(E=>({meta:w.meta,json:E}))}}),p=by(u("query")),x=by(u("mutation")),h={query:p,mutation:x};return({op:v})=>Qu(g=>{/* istanbul ignore if -- @preserve */if(v.type==="subscription")throw new Error("Subscriptions are unsupported by `httpLink` - use `httpSubscriptionLink` or `wsLink`");const N=h[v.type].load(v);let j;return N.then(w=>{j=w;const A=bC(w.json,o.transformer.output);if(!A.ok){g.error(Oo.from(A.error,{meta:w.meta}));return}g.next({context:w.meta,result:A.result}),g.complete()}).catch(w=>{g.error(Oo.from(w,{meta:j?.meta}))}),()=>{}})}}ts(tn(),1);const e2=(t,...n)=>typeof t=="function"?t(...n):t;ts(kl(),1);function rE(){let t,n;return{promise:new Promise((o,i)=>{t=o,n=i}),resolve:t,reject:n}}async function lE(t){const n=await e2(t.url);if(!t.connectionParams)return n;const o=`${n.includes("?")?"&":"?"}connectionParams=1`;return n+o}async function oE(t){const n={method:"connectionParams",data:await e2(t)};return JSON.stringify(n)}ts(kl(),1);var xl=ts(kl(),1);function iE(t){const{promise:n,resolve:r,reject:o}=rE();return t.addEventListener("open",()=>{t.removeEventListener("error",o),r()}),t.addEventListener("error",o),n}function cE(t,{intervalMs:n,pongTimeoutMs:r}){let o,i;function d(){o=setTimeout(()=>{t.send("PING"),i=setTimeout(()=>{t.close()},r)},n)}function u(){clearTimeout(o),d()}function p(){clearTimeout(i),u()}t.addEventListener("open",d),t.addEventListener("message",({data:x})=>{clearTimeout(o),d(),x==="PONG"&&p()}),t.addEventListener("close",()=>{clearTimeout(o),clearTimeout(i)})}var dE=class Ef{constructor(n){var r;if((0,xl.default)(this,"id",++Ef.connectCount),(0,xl.default)(this,"WebSocketPonyfill",void 0),(0,xl.default)(this,"urlOptions",void 0),(0,xl.default)(this,"keepAliveOpts",void 0),(0,xl.default)(this,"wsObservable",VC(null)),(0,xl.default)(this,"openPromise",null),this.WebSocketPonyfill=(r=n.WebSocketPonyfill)!==null&&r!==void 0?r:WebSocket,!this.WebSocketPonyfill)throw new Error("No WebSocket implementation found - you probably don't want to use this on the server, but if you do you need to pass a `WebSocket`-ponyfill");this.urlOptions=n.urlOptions,this.keepAliveOpts=n.keepAlive}get ws(){return this.wsObservable.get()}set ws(n){this.wsObservable.next(n)}isOpen(){return!!this.ws&&this.ws.readyState===this.WebSocketPonyfill.OPEN&&!this.openPromise}isClosed(){return!!this.ws&&(this.ws.readyState===this.WebSocketPonyfill.CLOSING||this.ws.readyState===this.WebSocketPonyfill.CLOSED)}async open(){var n=this;if(n.openPromise)return n.openPromise;n.id=++Ef.connectCount;const r=lE(n.urlOptions).then(o=>new n.WebSocketPonyfill(o));n.openPromise=r.then(async o=>{n.ws=o,o.addEventListener("message",function({data:i}){i==="PING"&&this.send("PONG")}),n.keepAliveOpts.enabled&&cE(o,n.keepAliveOpts),o.addEventListener("close",()=>{n.ws===o&&(n.ws=null)}),await iE(o),n.urlOptions.connectionParams&&o.send(await oE(n.urlOptions.connectionParams))});try{await n.openPromise}finally{n.openPromise=null}}async close(){var n=this;try{await n.openPromise}finally{var r;(r=n.ws)===null||r===void 0||r.close()}}};(0,xl.default)(dE,"connectCount",0);ts(kl(),1);ts(tn(),1);var zx=ts(kl(),1),vy=ts(tn(),1),Yu=class{constructor(t){(0,zx.default)(this,"links",void 0),(0,zx.default)(this,"runtime",void 0),(0,zx.default)(this,"requestId",void 0),this.requestId=0,this.runtime={},this.links=t.links.map(n=>n(this.runtime))}$request(t){var n;return FC({links:this.links,op:(0,vy.default)((0,vy.default)({},t),{},{context:(n=t.context)!==null&&n!==void 0?n:{},id:++this.requestId})}).pipe(BC())}async requestAsPromise(t){var n=this;try{const r=n.$request(t);return(await yC(r)).result.data}catch(r){throw Oo.from(r)}}query(t,n,r){return this.requestAsPromise({type:"query",path:t,input:n,context:r?.context,signal:r?.signal})}mutation(t,n,r){return this.requestAsPromise({type:"mutation",path:t,input:n,context:r?.context,signal:r?.signal})}subscription(t,n,r){return this.$request({type:"subscription",path:t,input:n,context:r.context,signal:r.signal}).subscribe({next(i){switch(i.result.type){case"state":{var d;(d=r.onConnectionStateChange)===null||d===void 0||d.call(r,i.result);break}case"started":{var u;(u=r.onStarted)===null||u===void 0||u.call(r,{context:i.context});break}case"stopped":{var p;(p=r.onStopped)===null||p===void 0||p.call(r);break}case"data":case void 0:{var x;(x=r.onData)===null||x===void 0||x.call(r,i.result.data);break}}},error(i){var d;(d=r.onError)===null||d===void 0||d.call(r,i)},complete(){var i;(i=r.onComplete)===null||i===void 0||i.call(r)}})}};const t2=Symbol.for("trpc_untypedClient"),uE={query:"query",mutate:"mutation",subscribe:"subscription"},pE=t=>uE[t];function s2(t){const n=qu(({path:r,args:o})=>{const i=[...r],d=pE(i.pop()),u=i.join(".");return t[d](u,...o)});return hh(r=>r===t2?t:n[r])}function mE(t){const n=new Yu(t);return s2(n)}function bh(t){return t[t2]}ts(tn(),1);ts(tn(),1);var xE=wn({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js"(t,n){function r(i){var d,u,p,x=2;for(typeof Symbol<"u"&&(u=Symbol.asyncIterator,p=Symbol.iterator);x--;){if(u&&(d=i[u])!=null)return d.call(i);if(p&&(d=i[p])!=null)return new o(d.call(i));u="@@asyncIterator",p="@@iterator"}throw new TypeError("Object is not async iterable")}function o(i){function d(u){if(Object(u)!==u)return Promise.reject(new TypeError(u+" is not an object."));var p=u.done;return Promise.resolve(u.value).then(function(x){return{value:x,done:p}})}return o=function(p){this.s=p,this.n=p.next},o.prototype={s:null,n:null,next:function(){return d(this.n.apply(this.s,arguments))},return:function(p){var x=this.s.return;return x===void 0?Promise.resolve({value:p,done:!0}):d(x.apply(this.s,arguments))},throw:function(p){var x=this.s.return;return x===void 0?Promise.reject(p):d(x.apply(this.s,arguments))}},new o(i)}n.exports=r,n.exports.__esModule=!0,n.exports.default=n.exports}});ts(xE(),1);ts(tn(),1);var fE=wn({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(t,n){function r(){var o=typeof SuppressedError=="function"?SuppressedError:function(p,x){var h=Error();return h.name="SuppressedError",h.error=p,h.suppressed=x,h},i={},d=[];function u(p,x){if(x!=null){if(Object(x)!==x)throw new TypeError("using declarations can only be used with objects, functions, null, or undefined.");if(p)var h=x[Symbol.asyncDispose||Symbol.for("Symbol.asyncDispose")];if(h===void 0&&(h=x[Symbol.dispose||Symbol.for("Symbol.dispose")],p))var v=h;if(typeof h!="function")throw new TypeError("Object is not disposable.");v&&(h=function(){try{v.call(x)}catch(y){return Promise.reject(y)}}),d.push({v:x,d:h,a:p})}else p&&d.push({d:x,a:p});return x}return{e:i,u:u.bind(null,!1),a:u.bind(null,!0),d:function(){var x,h=this.e,v=0;function g(){for(;x=d.pop();)try{if(!x.a&&v===1)return v=0,d.push(x),Promise.resolve().then(g);if(x.d){var N=x.d.call(x.v);if(x.a)return v|=2,Promise.resolve(N).then(g,y)}else v|=1}catch(j){return y(j)}if(v===1)return h!==i?Promise.reject(h):Promise.resolve();if(h!==i)throw h}function y(N){return h=h!==i?new o(N,h):N,g()}return g()}}}n.exports=r,n.exports.__esModule=!0,n.exports.default=n.exports}}),a2=wn({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/OverloadYield.js"(t,n){function r(o,i){this.v=o,this.k=i}n.exports=r,n.exports.__esModule=!0,n.exports.default=n.exports}}),hE=wn({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/awaitAsyncGenerator.js"(t,n){var r=a2();function o(i){return new r(i,0)}n.exports=o,n.exports.__esModule=!0,n.exports.default=n.exports}}),gE=wn({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/wrapAsyncGenerator.js"(t,n){var r=a2();function o(d){return function(){return new i(d.apply(this,arguments))}}function i(d){var u,p;
17function x(v,g){try{var y=d[v](g),N=y.value,j=N instanceof r;Promise.resolve(j?N.v:N).then(function(w){if(j){var A=v==="return"?"return":"next";if(!N.k||w.done)return x(A,w);w=d[A](w).value}h(y.done?"return":"normal",w)},function(w){x("throw",w)})}catch(w){h("throw",w)}}function h(v,g){switch(v){case"return":u.resolve({value:g,done:!0});break;case"throw":u.reject(g);break;default:u.resolve({value:g,done:!1})}(u=u.next)?x(u.key,u.arg):p=null}this._invoke=function(v,g){return new Promise(function(y,N){var j={key:v,arg:g,resolve:y,reject:N,next:null};p?p=p.next=j:(u=p=j,x(v,g))})},typeof d.return!="function"&&(this.return=void 0)}i.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},i.prototype.next=function(d){return this._invoke("next",d)},i.prototype.throw=function(d){return this._invoke("throw",d)},i.prototype.return=function(d){return this._invoke("return",d)},n.exports=o,n.exports.__esModule=!0,n.exports.default=n.exports}});ts(fE(),1);ts(hE(),1);ts(gE(),1);ts(tn(),1);function bE(t){return qu(({path:n,args:r})=>{var o;const i=[...n],d=i.pop();if(d==="useMutation")return t[d](i,...r);if(d==="_def")return{path:i};const[u,...p]=r,x=(o=p[0])!==null&&o!==void 0?o:{};return t[d](i,u,x)})}var Ix;const vE=["client","ssrContext","ssrState","abortOnUnmount"],yE=(Ix=b.createContext)===null||Ix===void 0?void 0:Ix.call($u,null),wE=t=>{switch(t){case"queryOptions":case"fetch":case"ensureData":case"prefetch":case"getData":case"setData":case"setQueriesData":return"query";case"infiniteQueryOptions":case"fetchInfinite":case"prefetchInfinite":case"getInfiniteData":case"setInfiniteData":return"infinite";case"setMutationDefaults":case"getMutationDefaults":case"isMutating":case"cancel":case"invalidate":case"refetch":case"reset":return"any"}};function SE(t){return qu(n=>{const r=[...n.path],o=r.pop(),i=[...n.args],d=i.shift(),u=wE(o),p=mn(r,d,u);return{infiniteQueryOptions:()=>t.infiniteQueryOptions(r,p,i[0]),queryOptions:()=>t.queryOptions(r,p,...i),fetch:()=>t.fetchQuery(p,...i),fetchInfinite:()=>t.fetchInfiniteQuery(p,i[0]),prefetch:()=>t.prefetchQuery(p,...i),prefetchInfinite:()=>t.prefetchInfiniteQuery(p,i[0]),ensureData:()=>t.ensureQueryData(p,...i),invalidate:()=>t.invalidateQueries(p,...i),reset:()=>t.resetQueries(p,...i),refetch:()=>t.refetchQueries(p,...i),cancel:()=>t.cancelQuery(p,...i),setData:()=>{t.setQueryData(p,i[0],i[1])},setQueriesData:()=>t.setQueriesData(p,i[0],i[1],i[2]),setInfiniteData:()=>{t.setInfiniteQueryData(p,i[0],i[1])},getData:()=>t.getQueryData(p),getInfiniteData:()=>t.getInfiniteQueryData(p),setMutationDefaults:()=>t.setMutationDefaults(fu(r),d),getMutationDefaults:()=>t.getMutationDefaults(fu(r)),isMutating:()=>t.isMutating({mutationKey:fu(r)})}[o]()})}function jE(t){const n=s2(t.client),r=SE(t);return hh(o=>{const i=o;return i==="client"?n:vE.includes(i)?t[i]:r[o]})}var NE=Rl(bc(),1);function yy(t){const n=t instanceof Yu?t:bh(t);return qu(r=>{const o=r.path,i=o.join("."),[d,u]=r.args;return(0,NE.default)({queryKey:mn(o,d,"query"),queryFn:()=>n.query(i,d,u?.trpc)},u)})}var Bx=Rl(bc(),1);function Is(t,n,r){var o;const i=t[0];let d=(o=t[1])===null||o===void 0?void 0:o.input;if(r){var u;d=(0,Bx.default)((0,Bx.default)((0,Bx.default)({},(u=d)!==null&&u!==void 0?u:{}),r.pageParam?{cursor:r.pageParam}:{}),{},{direction:r.direction})}return[i.join("."),d,n?.trpc]}var AE=Vr({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js"(t,n){function r(i){var d,u,p,x=2;for(typeof Symbol<"u"&&(u=Symbol.asyncIterator,p=Symbol.iterator);x--;){if(u&&(d=i[u])!=null)return d.call(i);if(p&&(d=i[p])!=null)return new o(d.call(i));u="@@asyncIterator",p="@@iterator"}throw new TypeError("Object is not async iterable")}function o(i){function d(u){if(Object(u)!==u)return Promise.reject(new TypeError(u+" is not an object."));var p=u.done;return Promise.resolve(u.value).then(function(x){return{value:x,done:p}})}return o=function(p){this.s=p,this.n=p.next},o.prototype={s:null,n:null,next:function(){return d(this.n.apply(this.s,arguments))},return:function(p){var x=this.s.return;return x===void 0?Promise.resolve({value:p,done:!0}):d(x.apply(this.s,arguments))},throw:function(p){var x=this.s.return;return x===void 0?Promise.reject(p):d(x.apply(this.s,arguments))}},new o(i)}n.exports=r,n.exports.__esModule=!0,n.exports.default=n.exports}}),CE=Rl(AE(),1);function Rf(t){return{path:t.path.join(".")}}function Ii(t){const n=Rf(t);return b.useMemo(()=>n,[n])}async function n2(t,n,r){const i=n.getQueryCache().build(n,{queryKey:r});i.setState({data:[],status:"success"});const d=[];var u=!1,p=!1,x;try{for(var h=(0,CE.default)(t),v;u=!(v=await h.next()).done;u=!1){const g=v.value;d.push(g),i.setState({data:[...d]})}}catch(g){p=!0,x=g}finally{try{u&&h.return!=null&&await h.return()}finally{if(p)throw x}}return d}var ht=Rl(bc(),1);function EE(t){const{client:n,queryClient:r}=t,o=n instanceof Yu?n:bh(n);return{infiniteQueryOptions:(i,d,u)=>{var p,x;const h=((p=d[1])===null||p===void 0?void 0:p.input)===xa,v=async g=>{var y;const N=(0,ht.default)((0,ht.default)({},u),{},{trpc:(0,ht.default)((0,ht.default)({},u?.trpc),!(u==null||(y=u.trpc)===null||y===void 0)&&y.abortOnUnmount?{signal:g.signal}:{signal:null})});return await o.query(...Is(d,N,{direction:g.direction,pageParam:g.pageParam}))};return Object.assign((0,ht.default)((0,ht.default)({},u),{},{initialData:u?.initialData,queryKey:d,queryFn:h?xa:v,initialPageParam:(x=u?.initialCursor)!==null&&x!==void 0?x:null}),{trpc:Rf({path:i})})},queryOptions:(i,d,u)=>{var p;const x=((p=d[1])===null||p===void 0?void 0:p.input)===xa,h=async v=>{var g;const y=(0,ht.default)((0,ht.default)({},u),{},{trpc:(0,ht.default)((0,ht.default)({},u?.trpc),!(u==null||(g=u.trpc)===null||g===void 0)&&g.abortOnUnmount?{signal:v.signal}:{signal:null})}),N=await o.query(...Is(d,y));return Iw(N)?n2(N,r,d):N};return Object.assign((0,ht.default)((0,ht.default)({},u),{},{initialData:u?.initialData,queryKey:d,queryFn:x?xa:h}),{trpc:Rf({path:i})})},fetchQuery:(i,d)=>r.fetchQuery((0,ht.default)((0,ht.default)({},d),{},{queryKey:i,queryFn:()=>o.query(...Is(i,d))})),fetchInfiniteQuery:(i,d)=>{var u;return r.fetchInfiniteQuery((0,ht.default)((0,ht.default)({},d),{},{queryKey:i,queryFn:({pageParam:p,direction:x})=>o.query(...Is(i,d,{pageParam:p,direction:x})),initialPageParam:(u=d?.initialCursor)!==null&&u!==void 0?u:null}))},prefetchQuery:(i,d)=>r.prefetchQuery((0,ht.default)((0,ht.default)({},d),{},{queryKey:i,queryFn:()=>o.query(...Is(i,d))})),prefetchInfiniteQuery:(i,d)=>{var u;return r.prefetchInfiniteQuery((0,ht.default)((0,ht.default)({},d),{},{queryKey:i,queryFn:({pageParam:p,direction:x})=>o.query(...Is(i,d,{pageParam:p,direction:x})),initialPageParam:(u=d?.initialCursor)!==null&&u!==void 0?u:null}))},ensureQueryData:(i,d)=>r.ensureQueryData((0,ht.default)((0,ht.default)({},d),{},{queryKey:i,queryFn:()=>o.query(...Is(i,d))})),invalidateQueries:(i,d,u)=>
17r.invalidateQueries((0,ht.default)((0,ht.default)({},d),{},{queryKey:i}),u),resetQueries:(i,d,u)=>r.resetQueries((0,ht.default)((0,ht.default)({},d),{},{queryKey:i}),u),refetchQueries:(i,d,u)=>r.refetchQueries((0,ht.default)((0,ht.default)({},d),{},{queryKey:i}),u),cancelQuery:(i,d)=>r.cancelQueries({queryKey:i},d),setQueryData:(i,d,u)=>r.setQueryData(i,d,u),setQueriesData:(i,d,u,p)=>r.setQueriesData((0,ht.default)((0,ht.default)({},d),{},{queryKey:i}),u,p),getQueryData:i=>r.getQueryData(i),setInfiniteQueryData:(i,d,u)=>r.setQueryData(i,d,u),getInfiniteQueryData:i=>r.getQueryData(i),setMutationDefaults:(i,d)=>{const u=i[0],p=x=>o.mutation(...Is([u,{input:x}],t));return r.setMutationDefaults(i,typeof d=="function"?d({canonicalMutationFn:p}):d)},getMutationDefaults:i=>r.getMutationDefaults(i),isMutating:i=>r.isMutating((0,ht.default)((0,ht.default)({},i),{},{exact:!0}))}}var Se=Rl(bc());const wy=(t,n)=>new Proxy(t,{get(o,i){return n(i),o[i]}});function RE(t){var n,r;const o=(n=void 0)!==null&&n!==void 0?n:M=>M.originalFn(),i=(r=void 0)!==null&&r!==void 0?r:yE,d=mE,u=M=>{var z;const{abortOnUnmount:O=!1,queryClient:H,ssrContext:K}=M,[ne,le]=b.useState((z=M.ssrState)!==null&&z!==void 0?z:!1),Z=M.client instanceof Yu?M.client:bh(M.client),X=b.useMemo(()=>EE({client:Z,queryClient:H}),[Z,H]),q=b.useMemo(()=>(0,Se.default)({abortOnUnmount:O,queryClient:H,client:Z,ssrContext:K??null,ssrState:ne},X),[O,Z,X,H,K,ne]);return b.useEffect(()=>{le(Q=>Q?"mounted":!1)},[]),e.jsx(i.Provider,{value:q,children:M.children})};function p(){const M=b.useContext(i);if(!M)throw new Error("Unable to find tRPC Context. Did you forget to wrap your App inside `withTRPC` HoC?");return M}function x(M,z){var O;const{queryClient:H,ssrState:K}=p();return K&&K!=="mounted"&&((O=H.getQueryCache().find({queryKey:M}))===null||O===void 0?void 0:O.state.status)==="error"?(0,Se.default)({retryOnMount:!1},z):z}function h(M,z,O){var H,K,ne,le,Z;const X=p(),{abortOnUnmount:q,client:Q,ssrState:R,queryClient:P,prefetchQuery:B}=X,V=mn(M,z,"query"),re=P.getQueryDefaults(V),_=z===xa;typeof window>"u"&&R==="prepass"&&(O==null||(H=O.trpc)===null||H===void 0?void 0:H.ssr)!==!1&&((K=O?.enabled)!==null&&K!==void 0?K:re?.enabled)!==!1&&!_&&!P.getQueryCache().find({queryKey:V})&&B(V,O);const L=x(V,(0,Se.default)((0,Se.default)({},re),O)),I=(ne=(le=O==null||(Z=O.trpc)===null||Z===void 0?void 0:Z.abortOnUnmount)!==null&&le!==void 0?le:void 0)!==null&&ne!==void 0?ne:q,G=tC((0,Se.default)((0,Se.default)({},L),{},{queryKey:V,queryFn:_?z:async J=>{const me=(0,Se.default)((0,Se.default)({},L),{},{trpc:(0,Se.default)((0,Se.default)({},L?.trpc),I?{signal:J.signal}:{signal:null})}),W=await Q.query(...Is(V,me));return Iw(W)?n2(W,P,V):W}}),P);return G.trpc=Ii({path:M}),G}function v(M,z,O){var H,K,ne;const le=p(),Z=mn(M,z,"query"),X=z===xa,q=(H=(K=O==null||(ne=O.trpc)===null||ne===void 0?void 0:ne.abortOnUnmount)!==null&&K!==void 0?K:void 0)!==null&&H!==void 0?H:le.abortOnUnmount;rC((0,Se.default)((0,Se.default)({},O),{},{queryKey:Z,queryFn:X?z:Q=>{const R={trpc:(0,Se.default)((0,Se.default)({},O?.trpc),q?{signal:Q.signal}:{})};return le.client.query(...Is(Z,R))}}))}function g(M,z,O){var H,K,ne;const le=p(),Z=mn(M,z,"query"),X=(H=(K=O==null||(ne=O.trpc)===null||ne===void 0?void 0:ne.abortOnUnmount)!==null&&K!==void 0?K:void 0)!==null&&H!==void 0?H:le.abortOnUnmount,q=sC((0,Se.default)((0,Se.default)({},O),{},{queryKey:Z,queryFn:Q=>{const R=(0,Se.default)((0,Se.default)({},O),{},{trpc:(0,Se.default)((0,Se.default)({},O?.trpc),X?{signal:Q.signal}:{signal:null})});return le.client.query(...Is(Z,R))}}),le.queryClient);return q.trpc=Ii({path:M}),[q.data,q]}function y(M,z){const{client:O,queryClient:H}=p(),K=fu(M),ne=H.defaultMutationOptions(H.getMutationDefaults(K)),le=oC((0,Se.default)((0,Se.default)({},z),{},{mutationKey:K,mutationFn:Z=>O.mutation(...Is([M,{input:Z}],z)),onSuccess(...Z){var X,q;return o({originalFn:()=>{var R,P,B;return(R=z==null||(P=z.onSuccess)===null||P===void 0?void 0:P.call(z,...Z))!==null&&R!==void 0?R:ne==null||(B=ne.onSuccess)===null||B===void 0?void 0:B.call(ne,...Z)},queryClient:H,meta:(X=(q=z?.meta)!==null&&q!==void 0?q:ne?.meta)!==null&&X!==void 0?X:{}}
17)}}),H);return le.trpc=Ii({path:M}),le}const N={data:void 0,error:null,status:"idle"},j={data:void 0,error:null,status:"connecting"};/* istanbul ignore next -- @preserve */function w(M,z,O){var H;const K=(H=O?.enabled)!==null&&H!==void 0?H:z!==xa,ne=_r(mn(M,z,"any")),{client:le}=p(),Z=b.useRef(O);b.useEffect(()=>{Z.current=O});const[X]=b.useState(new Set([])),q=b.useCallback(_=>{X.add(_)},[X]),Q=b.useRef(null),R=b.useCallback(_=>{const L=B.current,I=B.current=_(L);let G=!1;for(const J of X)if(L[J]!==I[J]){G=!0;break}G&&re(wy(I,q))},[q,X]),P=b.useCallback(()=>{var _;if((_=Q.current)===null||_===void 0||_.unsubscribe(),!K){R(()=>(0,Se.default)((0,Se.default)({},N),{},{reset:P}));return}R(()=>(0,Se.default)((0,Se.default)({},j),{},{reset:P}));const L=le.subscription(M.join("."),z??void 0,{onStarted:()=>{var I,G;(I=(G=Z.current).onStarted)===null||I===void 0||I.call(G),R(J=>(0,Se.default)((0,Se.default)({},J),{},{status:"pending",error:null}))},onData:I=>{var G,J;(G=(J=Z.current).onData)===null||G===void 0||G.call(J,I),R(me=>(0,Se.default)((0,Se.default)({},me),{},{status:"pending",data:I,error:null}))},onError:I=>{var G,J;(G=(J=Z.current).onError)===null||G===void 0||G.call(J,I),R(me=>(0,Se.default)((0,Se.default)({},me),{},{status:"error",error:I}))},onConnectionStateChange:I=>{R(G=>{switch(I.state){case"idle":return(0,Se.default)((0,Se.default)({},G),{},{status:I.state,error:null,data:void 0});case"connecting":return(0,Se.default)((0,Se.default)({},G),{},{error:I.error,status:I.state});case"pending":return G}})},onComplete:()=>{var I,G;(I=(G=Z.current).onComplete)===null||I===void 0||I.call(G),R(J=>(0,Se.default)((0,Se.default)({},J),{},{status:"idle",error:null,data:void 0}))}});Q.current=L},[le,ne,K,R]);b.useEffect(()=>(P(),()=>{var _;(_=Q.current)===null||_===void 0||_.unsubscribe()}),[P]);const B=b.useRef(K?(0,Se.default)((0,Se.default)({},j),{},{reset:P}):(0,Se.default)((0,Se.default)({},N),{},{reset:P})),[V,re]=b.useState(wy(B.current,q));return V}function A(M,z,O){var H,K,ne,le,Z;const{client:X,ssrState:q,prefetchInfiniteQuery:Q,queryClient:R,abortOnUnmount:P}=p(),B=mn(M,z,"infinite"),V=R.getQueryDefaults(B),re=z===xa;typeof window>"u"&&q==="prepass"&&(O==null||(H=O.trpc)===null||H===void 0?void 0:H.ssr)!==!1&&((K=O?.enabled)!==null&&K!==void 0?K:V?.enabled)!==!1&&!re&&!R.getQueryCache().find({queryKey:B})&&Q(B,(0,Se.default)((0,Se.default)({},V),O));const _=x(B,(0,Se.default)((0,Se.default)({},V),O)),L=(ne=O==null||(le=O.trpc)===null||le===void 0?void 0:le.abortOnUnmount)!==null&&ne!==void 0?ne:P,I=iC((0,Se.default)((0,Se.default)({},_),{},{initialPageParam:(Z=O.initialCursor)!==null&&Z!==void 0?Z:null,persister:O.persister,queryKey:B,queryFn:re?z:G=>{var J;const me=(0,Se.default)((0,Se.default)({},_),{},{trpc:(0,Se.default)((0,Se.default)({},_?.trpc),L?{signal:G.signal}:{signal:null})});return X.query(...Is(B,me,{pageParam:(J=G.pageParam)!==null&&J!==void 0?J:O.initialCursor,direction:G.direction}))}}),R);return I.trpc=Ii({path:M}),I}function C(M,z,O){var H,K,ne;const le=p(),Z=mn(M,z,"infinite"),X=le.queryClient.getQueryDefaults(Z),q=z===xa,Q=x(Z,(0,Se.default)((0,Se.default)({},X),O)),R=(H=O==null||(K=O.trpc)===null||K===void 0?void 0:K.abortOnUnmount)!==null&&H!==void 0?H:le.abortOnUnmount;lC((0,Se.default)((0,Se.default)({},O),{},{initialPageParam:(ne=O.initialCursor)!==null&&ne!==void 0?ne:null,queryKey:Z,queryFn:q?z:P=>{var B;const V=(0,Se.default)((0,Se.default)({},Q),{},{trpc:(0,Se.default)((0,Se.default)({},Q?.trpc),R?{signal:P.signal}:{})});return le.client.query(...Is(Z,V,{pageParam:(B=P.pageParam)!==null&&B!==void 0?B:O.initialCursor,direction:P.direction}))}}))}function E(M,z,O){var H,K,ne;const le=p(),Z=mn(M,z,"infinite"),X=le.queryClient.getQueryDefaults(Z),q=x(Z,(0,Se.default)((0,Se.default)({},X),O)),Q=(H=O==null||(K=O.trpc)===null||K===void 0?void 0:K.abortOnUnmount)!==null&&H!==void 0?H:le.abortOnUnmount,R=aC((0,Se.default)((0,Se.default)({},O),{},{initialPageParam:(ne=O.initialCursor)!==null&&ne!==void 0?ne:null,queryKey:Z,queryFn:P=>{var B;const V=(0,Se.default)((0,Se.default)({},q),{},{trpc:(0,Se.default)((0,Se.default)({},q?.trpc),Q?{signal:P.signal}:{})});return le.client.query(...Is(Z,V,{pageParam:(B=P.pageParam)!==null&&B!==void 0?B:O.initialCursor,direction:P.direction}))}}),le.queryClient);return R.trpc=Ii({path:M}),[R.data,R]}return{Provider:u,createClient:d,useContext:p,useUtils:p,useQuery:h,usePrefetchQuery:v,useSuspenseQuery:g,useQueries:(M,z)=>{const{ssrState:O,queryClient:H,prefetchQuery:K,client:ne}=p(),le=yy(ne),Z=M(le);if(typeof window>"u"&&O==="prepass")for(const q of Z){var X;const Q=q;((X=Q.trpc)===null||X===void 0?void 0:X.ssr)!==!1&&!H.getQueryCache().find({queryKey:Q.queryKey})&&K(Q.queryKey,Q)}return zw({queries:Z.map(q=>(0,Se.default)((0,Se.default)({},q),{},{queryKey:q.queryKey})),combine:z?.combine},H)},useSuspenseQueries:M=>{const{queryClient:z,client:O}=p(),H=yy(O),K=M(H),ne=nC({queries:K.map(le=>(0,Se.default)((0,Se.default)({},le),{},{queryFn:le.queryFn,queryKey:le.queryKey}))},z);return[ne.map(le=>le.data),ne]},useMutation:y,useSubscription:w,useInfiniteQuery:A,usePrefetchInfiniteQuery:C,useSuspenseInfiniteQuery:E}}function kE(t){const n=bE(t);return hh(r=>r==="useContext"||r==="useUtils"?()=>{const o=t.useUtils();return b.useMemo(()=>jE(o),[o])}:t.hasOwnProperty(r)?t[r]:n[r])}function DE(t){const n=RE();return kE(n)}const ue=DE(),TE="app_session_id",OE="Please login (10001)";var Vx={exports:{}},Bi={},Fx={exports:{}},Ux={};/** 18 * @license React 19 * scheduler.production.js 20 * 21 * Copyright (c) Meta Platforms, Inc. and affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */var Sy;function _E(){return Sy||(Sy=1,(function(t){function n(R,P){var B=R.length;R.push(P);e:for(;0<B;){var V=B-1>>>1,re=R[V];if(0<i(re,P))R[V]=P,R[B]=re,B=V;else break e}}
vendor: 11,081 bytes, lines 25-41
25function r(R){return R.length===0?null:R[0]}function o(R){if(R.length===0)return null;var P=R[0],B=R.pop();if(B!==P){R[0]=B;e:for(var V=0,re=R.length,_=re>>>1;V<_;){var L=2*(V+1)-1,I=R[L],G=L+1,J=R[G];if(0>i(I,B))G<re&&0>i(J,I)?(R[V]=J,R[G]=B,V=G):(R[V]=I,R[L]=B,V=L);else if(G<re&&0>i(J,B))R[V]=J,R[G]=B,V=G;else break e}}return P}function i(R,P){var B=R.sortIndex-P.sortIndex;return B!==0?B:R.id-P.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;t.unstable_now=function(){return d.now()}}else{var u=Date,p=u.now();t.unstable_now=function(){return u.now()-p}}var x=[],h=[],v=1,g=null,y=3,N=!1,j=!1,w=!1,A=!1,C=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function D(R){for(var P=r(h);P!==null;){if(P.callback===null)o(h);else if(P.startTime<=R)o(h),P.sortIndex=P.expirationTime,n(x,P);else break;P=r(h)}}function M(R){if(w=!1,D(R),!j)if(r(x)!==null)j=!0,z||(z=!0,Z());else{var P=r(h);P!==null&&Q(M,P.startTime-R)}}var z=!1,O=-1,H=5,K=-1;function ne(){return A?!0:!(t.unstable_now()-K<H)}function le(){if(A=!1,z){var R=t.unstable_now();K=R;var P=!0;try{e:{j=!1,w&&(w=!1,E(O),O=-1),N=!0;var B=y;try{t:{for(D(R),g=r(x);g!==null&&!(g.expirationTime>R&&ne());){var V=g.callback;if(typeof V=="function"){g.callback=null,y=g.priorityLevel;var re=V(g.expirationTime<=R);if(R=t.unstable_now(),typeof re=="function"){g.callback=re,D(R),P=!0;break t}g===r(x)&&o(x),D(R)}else o(x);g=r(x)}if(g!==null)P=!0;else{var _=r(h);_!==null&&Q(M,_.startTime-R),P=!1}}break e}finally{g=null,y=B,N=!1}P=void 0}}finally{P?Z():z=!1}}}var Z;if(typeof T=="function")Z=function(){T(le)};else if(typeof MessageChannel<"u"){var X=new MessageChannel,q=X.port2;X.port1.onmessage=le,Z=function(){q.postMessage(null)}}else Z=function(){C(le,0)};function Q(R,P){O=C(function(){R(t.unstable_now())},P)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(R){R.callback=null},t.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):H=0<R?Math.floor(1e3/R):5},t.unstable_getCurrentPriorityLevel=function(){return y},t.unstable_next=function(R){switch(y){case 1:case 2:case 3:var P=3;break;default:P=y}var B=y;y=P;try{return R()}finally{y=B}},t.unstable_requestPaint=function(){A=!0},t.unstable_runWithPriority=function(R,P){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var B=y;y=R;try{return P()}finally{y=B}},t.unstable_scheduleCallback=function(R,P,B){var V=t.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?V+B:V):B=V,R){case 1:var re=-1;break;case 2:re=250;break;case 5:re=1073741823;break;case 4:re=1e4;break;default:re=5e3}return re=B+re,R={id:v++,callback:P,priorityLevel:R,startTime:B,expirationTime:re,sortIndex:-1},B>V?(R.sortIndex=B,n(h,R),r(x)===null&&R===r(h)&&(w?(E(O),O=-1):w=!0,Q(M,B-V))):(R.sortIndex=re,n(x,R),j||N||(j=!0,z||(z=!0,Z()))),R},t.unstable_shouldYield=ne,t.unstable_wrapCallback=function(R){var P=y;return function(){var B=y;y=P;try{return R.apply(this,arguments)}finally{y=B}}}})(Ux)),Ux}var jy;function ME(){return jy||(jy=1,Fx.exports=_E()),Fx.exports}var $x={exports:{}},Os={};/** 26 * @license React 27 * react-dom.production.js 28 * 29 * Copyright (c) Meta Platforms, Inc. and affiliates. 30 * 31 * This source code is licensed under the MIT license found in the 32 * LICENSE file in the root directory of this source tree. 33 */var Ny;function PE(){if(Ny)return Os;Ny=1;var t=Uu();function n(x){var h="https://react.dev/errors/"+x;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)h+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+x+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var o={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},i=Symbol.for("react.portal");function d(x,h,v){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:g==null?null:""+g,children:x,containerInfo:h,implementation:v}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(x,h){if(x==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Os.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Os.createPortal=function(x,h){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(n(299));return d(x,h,null,v)},Os.flushSync=function(x){var h=u.T,v=o.p;try{if(u.T=null,o.p=2,x)return x()}finally{u.T=h,o.p=v,o.d.f()}},Os.preconnect=function(x,h){typeof x=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,o.d.C(x,h))},Os.prefetchDNS=function(x){typeof x=="string"&&o.d.D(x)},Os.preinit=function(x,h){if(typeof x=="string"&&h&&typeof h.as=="string"){var v=h.as,g=p(v,h.crossOrigin),y=typeof h.integrity=="string"?h.integrity:void 0,N=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;v==="style"?o.d.S(x,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:g,integrity:y,fetchPriority:N}):v==="script"&&o.d.X(x,{crossOrigin:g,integrity:y,fetchPriority:N,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Os.preinitModule=function(x,h){if(typeof x=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var v=p(h.as,h.crossOrigin);o.d.M(x,{crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&o.d.M(x)},Os.preload=function(x,h){if(typeof x=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var v=h.as,g=p(v,h.crossOrigin);o.d.L(x,v,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Os.preloadModule=function(x,h){if(typeof x=="string")if(h){var v=p(h.as,h.crossOrigin);o.d.m(x,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else o.d.m(x)},Os.requestFormReset=function(x){o.d.r(x)},Os.unstable_batchedUpdates=function(x,h){return x(h)},Os.useFormState=function(x,h,v){return u.H.useFormState(x,h,v)},Os.useFormStatus=function(){return u.H.useHostTransitionStatus()},Os.version="19.2.1",Os}var Ay;function r2(){if(Ay)return $x.exports;Ay=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}return t(),$x.exports=PE(),$x.exports}/** 34 * @license React 35 * react-dom-client.production.js 36 * 37 * Copyright (c) Meta Platforms, Inc. and affiliates. 38 * 39 * This source code is licensed under the MIT license found in the 40 * LICENSE file in the root directory of this source tree. 41 */var Cy;function HE(){if(Cy)return Bi;Cy=1;var t=ME(),n=Uu(),r=r2();function o(s){var a="https://react.dev/errors/"+s;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)a+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+s+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function d(s){var a=s,l=s;if(s.alternate)for(;a.return;)a=a.return;else{s=a;do a=s,(a.flags&4098)!==0&&(l=a.return),s=a.return;while(s)}return a.tag===3?l:null}function u(s){if(s.tag===13){var a=s.memoizedState;if(a===null&&(s=s.alternate,s!==null&&(a=s.memoizedState)),a!==null)return a.dehydrated}return null}function p(s){if(s.tag===31){var a=s.memoizedState;if(a===null&&(s=s.alternate,s!==null&&(a=s.memoizedState)),a!==null)return a.dehydrated}return null}function x(s){if(d(s)!==s)throw Error(o(188))}function h(s){var a=s.alternate;if(!a){if(a=d(s),a===null)throw Error(o(188));return a!==s?null:s}for(var l=s,c=a;;){var m=l.return;if(m===null)break;var f=m.alternate;if(f===null){if(c=m.return,c!==null){l=c;continue}break}if(m.child===f.child){for(f=m.child;f;){if(f===l)return x(m),s;if(f===c)return x(m),a;f=f.sibling}throw Error(o(188))}if(l.return!==c.return)l=m,c=f;else{for(var S=!1,k=m.child;k;){if(k===l){S=!0,l=m,c=f;break}if(k===c){S=!0,c=m,l=f;break}k=k.sibling}if(!S){for(k=f.child;k;){if(k===l){S=!0,l=f,c=m;break}if(k===c){S=!0,c=f,l=m;break}k=k.sibling}if(!S)throw Error(o(189))}}if(l.alternate!==c)throw Error(o(190))}if(l.tag!==3)throw Error(o(188));return l.stateNode.current===l?s:a}function v(s){var a=s.tag;if(a===5||a===26||a===27||a===6)return s;for(s=s.child;s!==null;){if(a=v(s),a!==null)return a;s=s.sibling}return null}var g=Object.assign,y=Symbol.for("react.element"),N=Symbol.for("react.transitional.element"),j=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),T=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),K=Symbol.for("react.activity"),ne=Symbol.for("react.memo_cache_sentinel"),le=Symbol.iterator;function Z(s){return s===null||typeof s!="object"?null:(s=le&&s[le]||s["@@iterator"],typeof s=="function"?s:null)}var X=Symbol.for("react.client.reference");function q(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===X?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case w:return"Fragment";case C:return"Profiler";case A:return"StrictMode";case M:return"Suspense";case z:return"SuspenseList";case K:return"Activity"}if(typeof s=="object")switch(s.$$typeof){case j:return"Portal";case T:return s.displayName||"Context";case E:return(s._context.displayName||"Context")+".Consumer";case D:var a=s.render;return s=s.displayName,s||(s=a.displayName||a.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case O:return a=s.displayName||null,a!==null?a:q(s.type)||"Memo";case H:a=s._payload,s=s._init;try{return q(s(a))}catch{}}return null}var Q=Array.isArray,R=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B={pending:!1,data:null,method:null,action:null},V=[],re=-1;function _(s){return{current:s}}function L(s){0>
vendor: 4,120 bytes, lines 41-48
41re||(s.current=V[re],V[re]=null,re--)}function I(s,a){re++,V[re]=s.current,s.current=a}var G=_(null),J=_(null),me=_(null),W=_(null);function he(s,a){switch(I(me,a),I(J,s),I(G,null),a.nodeType){case 9:case 11:s=(s=a.documentElement)&&(s=s.namespaceURI)?A0(s):0;break;default:if(s=a.tagName,a=a.namespaceURI)a=A0(a),s=C0(a,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}L(G),I(G,s)}function ve(){L(G),L(J),L(me)}function He(s){s.memoizedState!==null&&I(W,s);var a=G.current,l=C0(a,s.type);a!==l&&(I(J,s),I(G,l))}function ze(s){J.current===s&&(L(G),L(J)),W.current===s&&(L(W),Mi._currentValue=B)}var Be,dt;function Ne(s){if(Be===void 0)try{throw Error()}catch(l){var a=l.stack.trim().match(/\n( *(at )?)/);Be=a&&a[1]||"",dt=-1<l.stack.indexOf(` 42 at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return` 43`+Be+s+dt}var As=!1;function vs(s,a){if(!s||As)return"";As=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(a){var pe=function(){throw Error()};if(Object.defineProperty(pe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(pe,[])}catch(oe){var ae=oe}Reflect.construct(s,[],pe)}else{try{pe.call()}catch(oe){ae=oe}s.call(pe.prototype)}}else{try{throw Error()}catch(oe){ae=oe}(pe=s())&&typeof pe.catch=="function"&&pe.catch(function(){})}}catch(oe){if(oe&&ae&&typeof oe.stack=="string")return[oe.stack,ae.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=c.DetermineComponentFrameRoot(),S=f[0],k=f[1];if(S&&k){var F=S.split(` 44`),te=k.split(` 45`);for(m=c=0;c<F.length&&!F[c].includes("DetermineComponentFrameRoot");)c++;for(;m<te.length&&!te[m].includes("DetermineComponentFrameRoot");)m++;if(c===F.length||m===te.length)for(c=F.length-1,m=te.length-1;1<=c&&0<=m&&F[c]!==te[m];)m--;for(;1<=c&&0<=m;c--,m--)if(F[c]!==te[m]){if(c!==1||m!==1)do if(c--,m--,0>m||F[c]!==te[m]){var ce=` 46`+F[c].replace(" at new "," at ");return s.displayName&&ce.includes("<anonymous>")&&(ce=ce.replace("<anonymous>",s.displayName)),ce}while(1<=c&&0<=m);break}}}finally{As=!1,Error.prepareStackTrace=l}return(l=s?s.displayName||s.name:"")?Ne(l):""}function ot(s,a){switch(s.tag){case 26:case 27:case 5:return Ne(s.type);case 16:return Ne("Lazy");case 13:return s.child!==a&&a!==null?Ne("Suspense Fallback"):Ne("Suspense");case 19:return Ne("SuspenseList");case 0:case 15:return vs(s.type,!1);case 11:return vs(s.type.render,!1);case 1:return vs(s.type,!0);case 31:return Ne("Activity");default:return""}}function fe(s){try{var a="",l=null;do a+=ot(s,l),l=s,s=s.return;while(s);return a}catch(c){return` 47Error generating stack: `+c.message+` 48`+c.stack}}var $e=Object.prototype.hasOwnProperty,St=t.unstable_scheduleCallback,ta=t.unstable_cancelCallback,$t=t.unstable_shouldYield,ys=t.unstable_requestPaint,Gt=t.unstable_now,Ia=t.unstable_getCurrentPriorityLevel,sa=t.unstable_ImmediatePriority,Fs=t.unstable_UserBlockingPriority,Hs=t.unstable_NormalPriority,aa=t.unstable_LowPriority,Ds=t.unstable_IdlePriority,Zn=t.log,Ts=t.unstable_setDisableYieldValue,va=null,us=null;function Ls(s){if(typeof Zn=="function"&&Ts(s),us&&typeof us.setStrictMode=="function")try{us.setStrictMode(va,s)}catch{}}var Wt=Math.clz32?Math.clz32:ke,Wn=Math.log,Ba=Math.LN2;function ke(s){return s>>>=0,s===0?32:31-(Wn(s)/Ba|0)|0}var Xe=256,st=262144,Ve=4194304;function ut(s){var a=s&42;if(a!==0)return a;switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;
vendor: 5,642 bytes, line 48
48case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function Ae(s,a,l){var c=s.pendingLanes;if(c===0)return 0;var m=0,f=s.suspendedLanes,S=s.pingedLanes;s=s.warmLanes;var k=c&134217727;return k!==0?(c=k&~f,c!==0?m=ut(c):(S&=k,S!==0?m=ut(S):l||(l=k&~s,l!==0&&(m=ut(l))))):(k=c&~f,k!==0?m=ut(k):S!==0?m=ut(S):l||(l=c&~s,l!==0&&(m=ut(l)))),m===0?0:a!==0&&a!==m&&(a&f)===0&&(f=m&-m,l=a&-a,f>=l||f===32&&(l&4194048)!==0)?a:m}function Fe(s,a){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&a)===0}function yt(s,a){switch(s){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function gt(){var s=Ve;return Ve<<=1,(Ve&62914560)===0&&(Ve=4194304),s}function ws(s){for(var a=[],l=0;31>l;l++)a.push(s);return a}function at(s,a){s.pendingLanes|=a,a!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function Ct(s,a,l,c,m,f){var S=s.pendingLanes;s.pendingLanes=l,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=l,s.entangledLanes&=l,s.errorRecoveryDisabledLanes&=l,s.shellSuspendCounter=0;var k=s.entanglements,F=s.expirationTimes,te=s.hiddenUpdates;for(l=S&~l;0<l;){var ce=31-Wt(l),pe=1<<ce;k[ce]=0,F[ce]=-1;var ae=te[ce];if(ae!==null)for(te[ce]=null,ce=0;ce<ae.length;ce++){var oe=ae[ce];oe!==null&&(oe.lane&=-536870913)}l&=~pe}c!==0&&Us(s,c,0),f!==0&&m===0&&s.tag!==0&&(s.suspendedLanes|=f&~(S&~a))}function Us(s,a,l){s.pendingLanes|=a,s.suspendedLanes&=~a;var c=31-Wt(a);s.entangledLanes|=a,s.entanglements[c]=s.entanglements[c]|1073741824|l&261930}function it(s,a){var l=s.entangledLanes|=a;for(s=s.entanglements;l;){var c=31-Wt(l),m=1<<c;m&a|s[c]&a&&(s[c]|=a),l&=~m}}function pt(s,a){var l=a&-a;return l=(l&42)!==0?1:je(l),(l&(s.suspendedLanes|a))!==0?0:l}function je(s){switch(s){case 2:s=1;break;case 8:s=4;break;case 32:s=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:s=128;break;case 268435456:s=134217728;break;default:s=0}return s}function ps(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function nn(){var s=P.p;return s!==0?s:(s=window.event,s===void 0?32:Y0(s.type))}function _l(s,a){var l=P.p;try{return P.p=s,a()}finally{P.p=l}}var $s=Math.random().toString(36).slice(2),Ht="__reactFiber$"+$s,ss="__reactProps$"+$s,na="__reactContainer$"+$s,ra="__reactEvents$"+$s,Ic="__reactListeners$"+$s,Ml="__reactHandles$"+$s,Pl="__reactResources$"+$s,Jn="__reactMarker$"+$s;function Hl(s){delete s[Ht],delete s[ss],delete s[ra],delete s[Ic],delete s[Ml]}function ya(s){var a=s[Ht];if(a)return a;for(var l=s.parentNode;l;){if(a=l[na]||l[Ht]){if(l=a.alternate,a.child!==null||l!==null&&l.child!==null)for(s=_0(s);s!==null;){if(l=s[Ht])return l;s=_0(s)}return a}s=l,l=s.parentNode}return null}function Va(s){if(s=s[Ht]||s[na]){var a=s.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return s}return null}function qr(s){var a=s.tag;if(a===5||a===26||a===27||a===6)return s.stateNode;throw Error(o(33))}function U(s){var a=s[Pl];return a||(a=s[Pl]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function be(s){s[Jn]=!0}var bt=new Set,Ze={};function We(s,a){Ss(s,a),Ss(s+"Capture",a)}function Ss(s,a){for(Ze[s]=a,s=0;s<a.length;s++)bt.add(a[s])}var _t=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),jn={},er={};function wa(s){return $e.call(er,s)?!0:$e.call(jn,s)?!1:_t.test(s)?er[s]=!0:(jn[s]=!0,!1)}function tr(s,a,l){if(wa(a))if(l===null)s.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":s.removeAttribute(a);return;case"boolean":var c=a.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){s.removeAttribute(a);return}}s.setAttribute(a,""+l)}}function Qr(s,a,l){if(l===null)s.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(a);return}s.setAttribute(a,""+l)}}function Fa(s,a,l,c){if(c===null)s.removeAttribute(l);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(l);return}s.setAttributeNS(a,l,""+c)}}function Sa(s){switch(typeof s){case"bigint":case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function gg(s){var a=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function h4(s,a,l){var c=Object.getOwnPropertyDescriptor(s.constructor.prototype,a);if(!s.hasOwnProperty(a)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var m=c.get,f=c.set;return Object.defineProperty(s,a,{configurable:!0,get:function(){return m.call(this)},set:function(S){l=""+S,f.call(this,S)}}),Object.defineProperty(s,a,{enumerable:c.enumerable}),{getValue:function(){return l},setValue:function(S){l=""+S},stopTracking:function(){s._valueTracker=null,delete s[a]}}}}
vendor: 4,918 bytes, line 48
48function Rp(s){if(!s._valueTracker){var a=gg(s)?"checked":"value";s._valueTracker=h4(s,a,""+s[a])}}function bg(s){if(!s)return!1;var a=s._valueTracker;if(!a)return!0;var l=a.getValue(),c="";return s&&(c=gg(s)?s.checked?"true":"false":s.value),s=c,s!==l?(a.setValue(s),!0):!1}function Bc(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var g4=/[\n"\\]/g;function ja(s){return s.replace(g4,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function kp(s,a,l,c,m,f,S,k){s.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?s.type=S:s.removeAttribute("type"),a!=null?S==="number"?(a===0&&s.value===""||s.value!=a)&&(s.value=""+Sa(a)):s.value!==""+Sa(a)&&(s.value=""+Sa(a)):S!=="submit"&&S!=="reset"||s.removeAttribute("value"),a!=null?Dp(s,S,Sa(a)):l!=null?Dp(s,S,Sa(l)):c!=null&&s.removeAttribute("value"),m==null&&f!=null&&(s.defaultChecked=!!f),m!=null&&(s.checked=m&&typeof m!="function"&&typeof m!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?s.name=""+Sa(k):s.removeAttribute("name")}function vg(s,a,l,c,m,f,S,k){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(s.type=f),a!=null||l!=null){if(!(f!=="submit"&&f!=="reset"||a!=null)){Rp(s);return}l=l!=null?""+Sa(l):"",a=a!=null?""+Sa(a):l,k||a===s.value||(s.value=a),s.defaultValue=a}c=c??m,c=typeof c!="function"&&typeof c!="symbol"&&!!c,s.checked=k?s.checked:!!c,s.defaultChecked=!!c,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(s.name=S),Rp(s)}function Dp(s,a,l){a==="number"&&Bc(s.ownerDocument)===s||s.defaultValue===""+l||(s.defaultValue=""+l)}function Ll(s,a,l,c){if(s=s.options,a){a={};for(var m=0;m<l.length;m++)a["$"+l[m]]=!0;for(l=0;l<s.length;l++)m=a.hasOwnProperty("$"+s[l].value),s[l].selected!==m&&(s[l].selected=m),m&&c&&(s[l].defaultSelected=!0)}else{for(l=""+Sa(l),a=null,m=0;m<s.length;m++){if(s[m].value===l){s[m].selected=!0,c&&(s[m].defaultSelected=!0);return}a!==null||s[m].disabled||(a=s[m])}a!==null&&(a.selected=!0)}}function yg(s,a,l){if(a!=null&&(a=""+Sa(a),a!==s.value&&(s.value=a),l==null)){s.defaultValue!==a&&(s.defaultValue=a);return}s.defaultValue=l!=null?""+Sa(l):""}function wg(s,a,l,c){if(a==null){if(c!=null){if(l!=null)throw Error(o(92));if(Q(c)){if(1<c.length)throw Error(o(93));c=c[0]}l=c}l==null&&(l=""),a=l}l=Sa(a),s.defaultValue=l,c=s.textContent,c===l&&c!==""&&c!==null&&(s.value=c),Rp(s)}function zl(s,a){if(a){var l=s.firstChild;if(l&&l===s.lastChild&&l.nodeType===3){l.nodeValue=a;return}}s.textContent=a}var b4=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Sg(s,a,l){var c=a.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?c?s.setProperty(a,""):a==="float"?s.cssFloat="":s[a]="":c?s.setProperty(a,l):typeof l!="number"||l===0||b4.has(a)?a==="float"?s.cssFloat=l:s[a]=(""+l).trim():s[a]=l+"px"}function jg(s,a,l){if(a!=null&&typeof a!="object")throw Error(o(62));if(s=s.style,l!=null){for(var c in l)!l.hasOwnProperty(c)||a!=null&&a.hasOwnProperty(c)||(c.indexOf("--")===0?s.setProperty(c,""):c==="float"?s.cssFloat="":s[c]="");for(var m in a)c=a[m],a.hasOwnProperty(m)&&l[m]!==c&&Sg(s,m,c)}else for(var f in a)a.hasOwnProperty(f)&&Sg(s,f,a[f])}function Tp(s){if(s.indexOf("-")===-1)return!1;switch(s){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var v4=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRen
48dering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),y4=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Vc(s){return y4.test(""+s)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":s}function Nn(){}var Op=null;function _p(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var Il=null,Bl=null;function Ng(s){var a=Va(s);if(a&&(s=a.stateNode)){var l=s[ss]||null;e:switch(s=a.stateNode,a.type){case"input":if(kp(s,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),a=l.name,l.type==="radio"&&a!=null){for(l=s;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+ja(""+a)+'"][type="radio"]'),a=0;a<l.length;a++){var c=l[a];if(c!==s&&c.form===s.form){var m=c[ss]||null;if(!m)throw Error(o(90));kp(c,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name)}}for(a=0;a<l.length;a++)c=l[a],c.form===s.form&&bg(c)}break e;case"textarea":yg(s,l.value,l.defaultValue);break e;case"select":a=l.value,a!=null&&Ll(s,!!l.multiple,a,!1)}}}var Mp=!1;function Ag(s,a,l){if(Mp)return s(a,l);Mp=!0;try{var c=s(a);return c}finally{if(Mp=!1,(Il!==null||Bl!==null)&&(Rd(),Il&&(a=Il,s=Bl,Bl=Il=null,Ng(a),s)))for(a=0;a<s.length;a++)Ng(s[a])}}function Zo(s,a){var l=s.stateNode;if(l===null)return null;var c=l[ss]||null;if(c===null)return null;l=c[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(s=s.type,c=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!c;break e;default:s=!1}if(s)return null;if(l&&typeof l!="function")throw Error(o(231,a,typeof l));return l}var An=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Pp=!1;if(An)try{var Wo={};Object.defineProperty(Wo,"passive",{get:function(){Pp=!0}}),window.addEventListener("test",Wo,Wo),window.removeEventListener("test",Wo,Wo)}catch{Pp=!1}var sr=null,Hp=null,Fc=null;function Cg(){if(Fc)return Fc;var s,a=Hp,l=a.length,c,m="value"in sr?sr.value:sr.textContent,f=m.length;for(s=0;s<l&&a[s]===m[s];s++);var S=l-s;for(c=1;c<=S&&a[l-c]===m[f-c];c++);return Fc=m.slice(s,1<c?1-c:void 0)}function Uc(s){var a=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&a===13&&(s=13)):s=a,s===10&&(s=13),32<=s||s===13?s:0}function $c(){return!0}function Eg(){return!1}function Gs(s){function a(l,c,m,f,S){this._reactName=l,this._targetInst=m,this.type=c,this.nativeEvent=f,this.target=S,this.currentTarget=null;for(var k in s)s.hasOwnProperty(k)&&(l=s[k],this[k]=l?l(f):f[k]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?$c:Eg,this.isPropagationStopped=Eg,this}return g(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=$c)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=$c)},persist:function(){},isPersistent:$c}),a}var Yr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Gc=Gs(Yr),Jo=g({},Yr,{view:0,detail:0}),w4=Gs(Jo),Lp,zp,ei,Kc=g({},Jo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bp,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==ei&&(ei&&s.type==="mousemove"?(Lp=s.screenX-ei.screenX,zp=s.screenY-ei.screenY):zp=Lp=0,ei=s),Lp)},movementY:function(s){return"movementY"in s?s.movementY:zp}}),Rg=Gs(Kc),S4=g({},Kc,{dataTransfer:0}),j4=Gs(S4),N4=g({},Jo,{relatedTarget:0}),Ip=Gs(N4),A4=g({},Yr,{animationName:0,elapsedTime:0,pseudoElement:0}),C4=Gs(A4),E4=g({},Yr,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),R4=Gs(E4),k4=g({},Yr,{data:0}),kg=Gs(k4),D4={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},T4={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},O4={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _4(s){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(s):(s=O4[s])?!!a[s]:!1}function Bp(){return _4}var M4=g({},Jo,{key:function(s){if(s.key){var a=D4[s.key]||s.key;if(a!=="Unidentified")return a}
vendor: 5,186 bytes, line 48
48return s.type==="keypress"?(s=Uc(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?T4[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bp,charCode:function(s){return s.type==="keypress"?Uc(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?Uc(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),P4=Gs(M4),H4=g({},Kc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Dg=Gs(H4),L4=g({},Jo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bp}),z4=Gs(L4),I4=g({},Yr,{propertyName:0,elapsedTime:0,pseudoElement:0}),B4=Gs(I4),V4=g({},Kc,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),F4=Gs(V4),U4=g({},Yr,{newState:0,oldState:0}),$4=Gs(U4),G4=[9,13,27,32],Vp=An&&"CompositionEvent"in window,ti=null;An&&"documentMode"in document&&(ti=document.documentMode);var K4=An&&"TextEvent"in window&&!ti,Tg=An&&(!Vp||ti&&8<ti&&11>=ti),Og=" ",_g=!1;function Mg(s,a){switch(s){case"keyup":return G4.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Pg(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Vl=!1;function q4(s,a){switch(s){case"compositionend":return Pg(a);case"keypress":return a.which!==32?null:(_g=!0,Og);case"textInput":return s=a.data,s===Og&&_g?null:s;default:return null}}function Q4(s,a){if(Vl)return s==="compositionend"||!Vp&&Mg(s,a)?(s=Cg(),Fc=Hp=sr=null,Vl=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return Tg&&a.locale!=="ko"?null:a.data;default:return null}}var Y4={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Hg(s){var a=s&&s.nodeName&&s.nodeName.toLowerCase();return a==="input"?!!Y4[s.type]:a==="textarea"}function Lg(s,a,l,c){Il?Bl?Bl.push(c):Bl=[c]:Il=c,a=Pd(a,"onChange"),0<a.length&&(l=new Gc("onChange","change",null,l,c),s.push({event:l,listeners:a}))}var si=null,ai=null;function X4(s){v0(s,0)}function qc(s){var a=qr(s);if(bg(a))return s}function zg(s,a){if(s==="change")return a}var Ig=!1;if(An){var Fp;if(An){var Up="oninput"in document;if(!Up){var Bg=document.createElement("div");Bg.setAttribute("oninput","return;"),Up=typeof Bg.oninput=="function"}Fp=Up}else Fp=!1;Ig=Fp&&(!document.documentMode||9<document.documentMode)}function Vg(){si&&(si.detachEvent("onpropertychange",Fg),ai=si=null)}function Fg(s){if(s.propertyName==="value"&&qc(ai)){var a=[];Lg(a,ai,s,_p(s)),Ag(X4,a)}}function Z4(s,a,l){s==="focusin"?(Vg(),si=a,ai=l,si.attachEvent("onpropertychange",Fg)):s==="focusout"&&Vg()}function W4(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return qc(ai)}function J4(s,a){if(s==="click")return qc(a)}function e5(s,a){if(s==="input"||s==="change")return qc(a)}function t5(s,a){return s===a&&(s!==0||1/s===1/a)||s!==s&&a!==a}var la=typeof Object.is=="function"?Object.is:t5;function ni(s,a){if(la(s,a))return!0;if(typeof s!="object"||s===null||typeof a!="object"||a===null)return!1;var l=Object.keys(s),c=Object.keys(a);if(l.length!==c.length)return!1;for(c=0;c<l.length;c++){var m=l[c];if(!$e.call(a,m)||!la(s[m],a[m]))return!1}return!0}function Ug(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function $g(s,a){var l=Ug(s);s=0;for(var c;l;){if(l.nodeType===3){if(c=s+l.textContent.length,s<=a&&c>=a)return{node:l,offset:a-s};s=c}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Ug(l)}}function Gg(s,a){return s&&a?s===a?!0:s&&s.nodeType===3?!1:a&&a.nodeType===3?Gg(s,a.parentNode):"contains"in s?s.contains(a):s.compareDocumentPosition?!!(s.compareDocumentPosition(a)&16):!1:!1}function Kg(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var a=Bc(s.document);a instanceof s.HTMLIFrameElement;){try{var l=typeof a.contentWindow.location.href=="string"}catch{l=!1}if(l)s=a.contentWindow;else break;a=Bc(s.document)}return a}function $p(s){var a=s&&s.nodeName&&s.nodeName.toLowerCase();return a&&(a==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||a==="textarea"||s.contentEditable==="true")}var s5=An&&"documentMode"in document&&11>=document.documentMode,Fl=null,Gp=null,ri=null,Kp=!1;function qg(s,a,l){var c=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Kp||Fl==null||Fl!==Bc(c)||(c=Fl,"selectionStart"in c&&$p(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focu
vendor: 21,838 bytes, line 48
48sNode:c.focusNode,focusOffset:c.focusOffset}),ri&&ni(ri,c)||(ri=c,c=Pd(Gp,"onSelect"),0<c.length&&(a=new Gc("onSelect","select",null,a,l),s.push({event:a,listeners:c}),a.target=Fl)))}function Xr(s,a){var l={};return l[s.toLowerCase()]=a.toLowerCase(),l["Webkit"+s]="webkit"+a,l["Moz"+s]="moz"+a,l}var Ul={animationend:Xr("Animation","AnimationEnd"),animationiteration:Xr("Animation","AnimationIteration"),animationstart:Xr("Animation","AnimationStart"),transitionrun:Xr("Transition","TransitionRun"),transitionstart:Xr("Transition","TransitionStart"),transitioncancel:Xr("Transition","TransitionCancel"),transitionend:Xr("Transition","TransitionEnd")},qp={},Qg={};An&&(Qg=document.createElement("div").style,"AnimationEvent"in window||(delete Ul.animationend.animation,delete Ul.animationiteration.animation,delete Ul.animationstart.animation),"TransitionEvent"in window||delete Ul.transitionend.transition);function Zr(s){if(qp[s])return qp[s];if(!Ul[s])return s;var a=Ul[s],l;for(l in a)if(a.hasOwnProperty(l)&&l in Qg)return qp[s]=a[l];return s}var Yg=Zr("animationend"),Xg=Zr("animationiteration"),Zg=Zr("animationstart"),a5=Zr("transitionrun"),n5=Zr("transitionstart"),r5=Zr("transitioncancel"),Wg=Zr("transitionend"),Jg=new Map,Qp="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Qp.push("scrollEnd");function Ua(s,a){Jg.set(s,a),We(a,[s])}var Qc=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)},Na=[],$l=0,Yp=0;function Yc(){for(var s=$l,a=Yp=$l=0;a<s;){var l=Na[a];Na[a++]=null;var c=Na[a];Na[a++]=null;var m=Na[a];Na[a++]=null;var f=Na[a];if(Na[a++]=null,c!==null&&m!==null){var S=c.pending;S===null?m.next=m:(m.next=S.next,S.next=m),c.pending=m}f!==0&&eb(l,m,f)}}function Xc(s,a,l,c){Na[$l++]=s,Na[$l++]=a,Na[$l++]=l,Na[$l++]=c,Yp|=c,s.lanes|=c,s=s.alternate,s!==null&&(s.lanes|=c)}function Xp(s,a,l,c){return Xc(s,a,l,c),Zc(s)}function Wr(s,a){return Xc(s,null,null,a),Zc(s)}function eb(s,a,l){s.lanes|=l;var c=s.alternate;c!==null&&(c.lanes|=l);for(var m=!1,f=s.return;f!==null;)f.childLanes|=l,c=f.alternate,c!==null&&(c.childLanes|=l),f.tag===22&&(s=f.stateNode,s===null||s._visibility&1||(m=!0)),s=f,f=f.return;return s.tag===3?(f=s.stateNode,m&&a!==null&&(m=31-Wt(l),s=f.hiddenUpdates,c=s[m],c===null?s[m]=[a]:c.push(a),a.lane=l|536870912),f):null}function Zc(s){if(50<Ei)throw Ei=0,rx=null,Error(o(185));for(var a=s.return;a!==null;)s=a,a=s.return;return s.tag===3?s.stateNode:null}var Gl={};function l5(s,a,l,c){this.tag=s,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function oa(s,a,l,c){return new l5(s,a,l,c)}function Zp(s){return s=s.prototype,!(!s||!s.isReactComponent)}function Cn(s,a){var l=s.alternate;return l===null?(l=oa(s.tag,a,s.key,s.mode),l.elementType=s.elementType,l.type=s.type,l.stateNode=s.stateNode,l.alternate=s,s.alternate=l):(l.pendingProps=a,l.type=s.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=s.flags&65011712,l.childLanes=s.childLanes,l.lanes=s.lanes,l.child=s.child,l.memoizedProps=s.memoizedProps,l.memoizedState=s.memoizedState,l.updateQueue=s.updateQueue,a=s.dependencies,l.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},l.sibling=s.sibling,l.index=s.index,l.ref=s.ref,l.refCleanup=s.refCleanup,l}function tb(s,a){s.flags&=65011714;var l=s.alternate;return l===null?(s.childLanes=0,s.lanes=a,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=l.childLanes,s.lanes=l.lanes,s.child=l.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=l.memoizedProps,s.memoizedState=l.memoizedState,s.updateQueue=l.updateQueue,s.type=l.type,a=l.dependencies,s.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),s}function Wc(s,a,l,c,m,f){var S=0;if(c=s,typeof s=="function")Zp(s)&&(S=1);else if(typeof s=="string")S=uA(s,l,G.current)?26:s==="html"||s==="head"||s==="body"?27:5;else e:switch(s){case K:return s=oa(31,l,a,m),s.elementType=K,s.lanes=f,s;case w:return Jr(l.children,m,f,a);case A:S=8,m|=24;break;case C:return s=oa(12,l,a,m|2),s.elementType=C,s.lanes=f,s;case M:return s=oa(13,l,a,m),s.elementType=M,s.lanes=f,s;case z:return s=oa(19,l,a,m),s.elementType=z,s.lanes=f,s;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case T:S=10;break e;case E:S=9;break e;case D:S=11;break e;case O:S=14;break e;case H:S=16,c=null;break e}S=29,l=Error(o(130,s===null?"null":typeof s,"")),c=null}return a=oa(S,l,a,m),a.elementType=s,a.type=c,a.lanes=f,a}function Jr(s,a,l,c){return s=oa(7,s,c,a),s.lanes=l,s}function Wp(s,a,l){return s=oa(6,s,null,a),s.lanes=l,s}function sb(s){var a=oa(18,null,null,0);return a.stateNode=s,a}function Jp(s,a,l){return a=oa(4,s.children!==null?s.children:[],s.key,a),a.lanes=l,a.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},a}var ab=new WeakMap;function Aa(s,a){if(typeof s=="object"&&s!==null){var l=ab.get(s);return l!==void 0?l:(a={value:s,source:a,stack:fe(a)},ab.set(s,a),a)}return{value:s,source:a,stack:fe(a)}}var Kl=[],ql=0,Jc=null,li=0,Ca=[],Ea=0,ar=null,rn=1,ln="";function En(s,a){Kl[ql++]=li,Kl[ql++]=Jc,Jc=s,li=a}function nb(s,a,l){Ca[Ea++]=rn,Ca[Ea++]=ln,Ca[Ea++]=ar,ar=s;var c=rn;s=ln;var m=32-Wt(c)-1;c&=~(1<<m),l+=1;var f=32-Wt(a)+m;if(30<f){var S=m-m%5;f=(c&(1<<S)-1).toString(32),c>>=S,m-=S,rn=1<<32-Wt(a)+m|l<<m|c,ln=f+s}else rn=1<<f|l<<m|c,ln=s}function em(s){s.return!==null&&(En(s,1),nb(s,1,0))}function tm(s){for(;s===Jc;)Jc=Kl[--ql],Kl[ql]=null,li=Kl[--ql],Kl[ql]=null;for(;s===ar;)ar=Ca[--Ea],Ca[Ea]=null,ln=Ca[--Ea],Ca[Ea]=null,rn=Ca[--Ea],Ca[Ea]=null}function rb(s,a){Ca[Ea++]=rn,Ca[Ea++]=ln,Ca[Ea++]=ar,rn=a.id,ln=a.overflow,ar=s}var Cs=null,Mt=null,ct=!1,nr=null,Ra=!1,sm=Error(o(519));function rr(s){var a=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw oi(Aa(a,s)),sm}function lb(s){var a=s.stateNode,l=s.type,c=s.memoizedProps;switch(a[Ht]=s,a[ss]=c,l){case"dialog":et("cancel",a),et("close",a);break;case"iframe":case"object":case"embed":et("load",a);break;case"video":case"audio":for(l=0;l<ki.length;l++)et(ki[l],a);break;case"source":et("error",a);break;case"img":case"image":case"link":et("error",a),et("load",a);break;case"details":et("toggle",a);break;case"input":et("invalid",a),vg(a,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":et("invalid",a);break;case"textarea":et("invalid",a),wg(a,c.value,c.defaultValue,c.children)}l=c.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||a.textContent===""+l||c.suppressHydrationWarning===!0||j0(a.textContent,l)?(c.popover!=null&&(et("beforetoggle",a),et("toggle",a)),c.onScroll!=null&&et("scroll",a),c.onScrollEnd!=null&&et("scrollend",a),c.onClick!=null&&(a.onclick=Nn),a=!0):a=!1,a||rr(s,!0)}function ob(s){for(Cs=s.return;Cs;)switch(Cs.tag){case 5:case 31:case 13:Ra=!1;return;case 27:case 3:Ra=!0;return;default:Cs=Cs.return}}function Ql(s){if(s!==Cs)return!1;if(!ct)return ob(s),ct=!0,!1;var a=s.tag,l;if((l=a!==3&&a!==27)&&((l=a===5)&&(l=s.type,l=!(l!=="form"&&l!=="button")||yx(s.type,s.memoizedProps)),l=!l),l&&Mt&&rr(s),ob(s),a===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(o(317));Mt=O0(s)}else if(a===31){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(o(317));Mt=O0(s)}else a===27?(a=Mt,vr(s.type)?(s=Ax,Ax=null,Mt=s):Mt=a):Mt=Cs?Da(s.stateNode.nextSibling):null;return!0}function el(){Mt=Cs=null,ct=!1}function am(){var s=nr;return s!==null&&(Ys===null?Ys=s:Ys.push.apply(Ys,s),nr=null),s}function oi(s){nr===null?nr=[s]:nr.push(s)}var nm=_(null),tl=null,Rn=null;function lr(s,a,l){I(nm,a._currentValue),a._currentValue=l}function kn(s){s._currentValue=nm.current,L(nm)}function rm(s,a,l){for(;s!==null;){var c=s.alternate;if((s.childLanes&a)!==a?(s.childLanes|=a,c!==null&&(c.childLanes|=a)):c!==null&&(c.childLanes&a)!==a&&(c.childLanes|=a),s===l)break;s=s.return}}function lm(s,a,l,c){var m=s.child;for(m!==null&&(m.return=s);m!==null;){var f=m.dependencies;if(f!==null){var S=m.child;f=f.firstContext;e:for(;f!==null;){var k=f;f=m;for(var F=0;F<a.length;F++)if(k.context===a[F]){f.lanes|=l,k=f.alternate,k!==null&&(k.lanes|=l),rm(f.return,l,s),c||(S=null);break e}f=k.next}}else if(m.tag===18){if(S=m.return,S===null)throw Error(o(341));S.lanes|=l,f=S.alternate,f!==null&&(f.lanes|=l),rm(S,l,s),S=null}else S=m.child;if(S!==null)S.return=m;else for(S=m;S!==null;){if(S===s){S=null;break}if(m=S.sibling,m!==null){m.return=S.return,S=m;break}S=S.return}m=S}}function Yl(s,a,l,c){s=null;for(var m=a,f=!1;m!==null;){if(!f){if((m.flags&524288)!==0)f=!0;else if((m.flags&262144)!==0)break}if(m.tag===10){var S=m.alternate;if(S===null)throw Error(o(387));if(S=S.memoizedProps,S!==null){var k=m.type;la(m.pendingProps.value,S.value)||(s!==null?s.push(k):s=[k])}}else if(m===W.current){if(S=m.alternate,S===null)throw Error(o(387));S.memoizedState.memoizedState!==m.memoizedState.memoizedState&&(s!==null?s.push(Mi):s=[Mi])}m=m.return}s!==null&&lm(a,s,l,c),a.flags|=262144}function ed(s){for(s=s.firstContext;s!==null;){if(!la(s.context._currentValue,s.memoizedValue))return!0;s=s.next}return!1}function sl(s){tl=s,Rn=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function Es(s){return ib(tl,s)}function td(s,a){return tl===null&&sl(s),ib(s,a)}function ib(s,a){var l=a._currentValue;if(a={context:a,memoizedValue:l,next:null},Rn===null){if(s===null)throw Error(o(308));Rn=a,s.dependencies={lanes:0,firstContext:a},s.flags|=524288}else Rn=Rn.next=a;return l}var o5=typeof AbortController<"u"?AbortController:function(){var s=[],a=this.signal={aborted:!1,addEventListener:function(l,c){s.push(c)}};this.abort=function(){a.aborted=!0,s.forEach(function(l){return l()})}},i5=t.unstable_scheduleCallback,c5=t.unstable_NormalPriority,as={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function om(){return{controller:new o5,data:new Map,refCount:0}}function ii(s){s.refCount--,s.refCount===0&&i5(c5,function(){s.controller.abort()})}var ci=null,im=0,Xl=0,Zl=null;function d5(s,a){if(ci===null){var l=ci=[];im=0,Xl=ux(),Zl={status:"pending",value:void 0,then:function(c){l.push(c)}}}return im++,a.then(cb,cb),a}function cb(){if(--im===0&&ci!==null){Zl!==null&&(Zl.status="fulfilled");var s=ci;ci=null,Xl=0,Zl=null;for(var a=0;a<s.length;a++)(0,s[a])()}}function u5(s,a){var l=[],c={status:"pending",value:null,reason:null,then:function(m){l.push(m)}};return s.then(function(){c.status="fulfilled",c.value=a;for(var m=0;m<l.length;m++)(0,l[m])(a)},function(m){for(c.status="rejected",c.reason=m,m=0;m<l.length;m++)(0,l[m])(void 0)}),c}var db=R.S;R.S=function(s,a){qv=Gt(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&d5(s,a),db!==null&&db(s,a)};var al=_(null);function cm(){var s=al.current;return s!==null?s:Tt.pooledCache}function sd(s,a){a===null?I(al,al.current):I(al,a.pool)}function ub(){var s=cm();return s===null?null:{parent:as._currentValue,pool:s}}var Wl=Error(o(460)),dm=Error(o(474)),ad=Error(o(542)),nd={then:function(){}};function pb(s){return s=s.status,s==="fulfilled"||s==="rejected"}function mb(s,a,l){switch(l=s[l],l===void 0?s.push(a):l!==a&&(a.then(Nn,Nn),a=l),a.status){case"fulfilled":return a.value;case"rejected":throw s=a.reason,fb(s),s;default:if(typeof a.status=="string")a.then(Nn,Nn);else{if(s=Tt,s!==null&&100<s.shellSuspendCounter)throw Error(o(482));s=a,s.status="pending",s.then(function(c){if(a.status==="pending"){var m=a;m.status="fulfilled",m.value=c}},function(c){if(a.status==="pending"){var m=a;m.status="rejected",m.reason=c}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw s=a.reason,fb(s),s}throw rl=a,Wl}}function nl(s){try{var a=s._init;return a(s._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(rl=l,Wl):l}}var rl=null;function xb(){if(rl===null)throw Error(o(459));var s=rl;return rl=null,s}function fb(s){if(s===Wl||s===ad)throw Error(o(483))}var Jl=null,di=0;function rd(s){var a=di;return di+=1,Jl===null&&(Jl=[]),mb(Jl,s,a)}function ui(s,a){a=a.props.ref,s.ref=a!==void 0?a:null}function ld(s,a){throw a.$$typeof===y?Error(o(525)):(s=Object.prototype.toString.call(a),Error(o(31,s==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":s)))}function hb(s){function a(Y,$){if(s){var ee=Y.deletions;ee===null?(Y.deletions=[$],Y.flags|=16):ee.push($)}}function l(Y,$){if(!s)return null;for(;$!==null;)a(Y,$),$=$.sibling;return null}function c(Y){for(var $=new Map;Y!==null;)Y.key!==null?$.set(Y.key,Y):$.set(Y.index,Y),Y=Y.sibling;return $}function m(Y,$){return Y=Cn(Y,$),Y.index=0,Y.sibling=null,Y}function f(Y,$,ee){return Y.index=ee,s?(ee=Y.alternate,ee!==null?(ee=ee.index,ee<$?(Y.flags|=67108866,$):ee):(Y.flags|=67108866,$)):(Y.flags|=1048576,$)}function S(Y){return s&&Y.alternate===null&&(Y.flags|=67108866),Y}function k(Y,$,ee,de){return $===null||$.tag!==6?($=Wp(ee,Y.mode,de),$.return=Y,$):($=m($,ee),$.return=Y,$)}function F(Y,$,ee,de){var Pe=ee.type;return Pe===w?ce(Y,$,ee.props.children,de,ee.key):$!==null&&($.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===H&&nl(Pe)===$.type)?($=m($,ee.props),ui($,ee),$.return=Y,$):($=Wc(ee.type,ee.key,ee.props,null,Y.mode,de),ui($,ee),$.return=Y,$)}function te(Y,$,ee,de){return $===null||$.tag!==4||$.stateNode.containerInfo!==ee.containerInfo||$.stateNode.implementation!==ee.implementation?($=Jp(ee,Y.mode,de),$.return=Y,$):($=m($,ee.children||[]),$.return=Y,$)}function ce(Y,$,ee,de,Pe){return $===null||$.tag!==7?($=Jr(ee,Y.mode,de,Pe),$.return=Y,$):($=m($,ee),$.return=Y,$)}function pe(Y,$,ee){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return $=Wp(""+$,Y.mode,ee),$.return=Y,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case N:return ee=Wc($.type,$.key,$.props,null,Y.mode,ee),ui(ee,$),ee.return=Y,ee;case j:return $=Jp($,Y.mode,ee),$.return=Y,$;case H:return $=nl($),pe(Y,$,ee)}if(Q($)||Z($))return $=Jr($,Y.mode,ee,null),$.return=Y,$;if(typeof $.then=="function")return pe(Y,rd($),ee);if($.$$typeof===T)return pe(Y,td(Y,$),ee);ld(Y,$)}return null}function ae(Y,$,ee,de){var Pe=$!==null?$.key:null;if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return Pe!==null?null:k(Y,$,""+ee,de);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case N:return ee.key===Pe?F(Y,$,ee,de):null;case j:return ee.key===Pe?te(Y,$,ee,de):null;case H:return ee=nl(ee),ae(Y,$,ee,de)}if(Q(ee)||Z(ee))return Pe!==null?null:ce(Y,$,ee,de,null);if(typeof ee.then=="function")return ae(Y,$,rd(ee),de);if(ee.$$typeof===T)return ae(Y,$,td(Y,ee),de);ld(Y,ee)}return null}function oe(Y,$,ee,de,Pe){if(typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint")return Y=Y.get(ee)||null,k($,Y,""+de,Pe);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case N:return Y=Y.get(de.key===null?ee:de.key)||null,F($,Y,de,Pe);case j:return Y=Y.get(de.key===null?ee:de.key)||null,te($,Y,de,Pe);case H:return de=nl(de),oe(Y,$,ee,de,Pe)}if(Q(de)||Z(de))return Y=Y.get(ee)||null,ce($,Y,de,Pe,null);if(typeof de.then=="function")return oe(Y,$,ee,rd(de),Pe);if(de.$$typeof===T)return oe(Y,$,ee,td($,de),Pe);ld($,de)}return null}function Ce(Y,$,ee,de){for(var Pe=null,xt=null,De=$,Ke=$=0,rt=null;De!==null&&Ke<ee.length;Ke++){De.index>Ke?(rt=De,De=null):rt=De.sibling;var ft=ae(Y,De,ee[Ke],de);if(ft===null){De===null&&(De=rt);break}s&&De&&ft.alternate===null&&a(Y,De),$=f(ft,$,Ke),xt===null?Pe=ft:xt.sibling=ft,xt=ft,De=rt}if(Ke===ee.length)return l(Y,De),ct&&En(Y,Ke),Pe;if(De===null){for(;Ke<ee.length;Ke++)De=pe(Y,ee[Ke],de),De!==null&&($=f(De,$,Ke),xt===null?Pe=De:xt.sibling=De,xt=De);return ct&&En(Y,Ke),Pe}for(De=c(De);Ke<ee.length;Ke++)rt=oe(De,Y,Ke,ee[Ke],de),rt!==null&&(s&&rt.alternate!==null&&De.delete(rt.key===null?Ke:rt.key),$=f(rt,$,Ke),xt===null?Pe=rt:xt.sibling=rt,xt=rt);return s&&De.forEach(function(Nr){return a(Y,Nr)}),ct&&En(Y,Ke),Pe}function Le(Y,$,ee,de){if(ee==null)throw Error(o(151));for(var Pe=null,xt=null,De=$,Ke=$=0,rt=null,ft=ee.next();De!==null&&!ft.done;Ke++,ft=ee.next()){De.index>Ke?(rt=De,De=null):rt=De.sibling;var Nr=ae(Y,De,ft.value,de);if(Nr===null){De===null&&(De=rt);break}s&&De&&Nr.alternate===null&&a(Y,De),$=f(Nr,$,Ke),xt===null?Pe=Nr:xt.sibling=Nr,xt=Nr,De=rt}if(ft.done)return l(Y,De),ct&&En(Y,Ke),Pe;if(De===null){for(;!ft.done;Ke++,ft=ee.next())ft=pe(Y,ft.value,de),ft!==null&&($=f(ft,$,Ke),xt===null?Pe=ft:xt.sibling=ft,xt=ft);return ct&&En(Y,Ke),Pe}for(De=c(De);!ft.done;Ke++,ft=ee.next())ft=oe(De,Y,Ke,ft.value,de),ft!==null&&(s&&ft.alternate!==null&&De.delete(ft.key===null?Ke:ft.key),$=f(ft,$,Ke),xt===null?Pe=ft:xt.sibling=ft,xt=ft);return s&&De.forEach(function(SA){return a(Y,SA)}),ct&&En(Y,Ke),Pe}function kt(Y,$,ee,de){if(typeof ee=="object"&&ee!==null&&ee.type===w&&ee.key===null&&(ee=ee.props.children),typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case N:e:{for(var Pe=ee.key;$!==null;){if($.key===Pe){if(Pe=ee.type,Pe===w){if($.tag===7){l(Y,$.sibling),de=m($,ee.props.children),de.return=Y,Y=de;break e}}else if($.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===H&&nl(Pe)===$.type){l(Y,$.sibling),de=m($,ee.props),ui(de,ee),de.return=Y,Y=de;break e}l(Y,$);break}else a(Y,$);$=$.sibling}ee.type===w?(de=Jr(ee.props.children,Y.mode,de,ee.key),de.return=Y,Y=de):(de=Wc(ee.type,ee.key,ee.props,null,Y.mode,de),ui(de,ee),de.return=Y,Y=de)}return S(Y);case j:e:{for(Pe=ee.key;$!==null;){if($.key===Pe)if($.tag===4&&$.stateNode.containerInfo===ee.containerInfo&&$.stateNode.implementation===ee.implementation){l(Y,$.sibling),de=m($,ee.children||[]),de.return=Y,Y=de;break e}else{l(Y,$);break}else a(Y,$);$=$.sibling}de=Jp(ee,Y.mode,de),de.return=Y,Y=de}return S(Y);case H:return ee=nl(ee),kt(Y,$,ee,de)}if(Q(ee))return Ce(Y,$,ee,de);if(Z(ee)){if(Pe=Z(ee),typeof Pe!="function")throw Error(o(150));return ee=Pe.call(ee),Le(Y,$,ee,de)}if(typeof ee.then=="function")return kt(Y,$,rd(ee),de);if(ee.$$typeof===T)return kt(Y,$,td(Y,ee),de);ld(Y,ee)}return typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint"?(ee=""+ee,$!==null&&$.tag===6?(l(Y,$.sibling),de=m($,ee),de.return=Y,Y=de):(l(Y,$),de=Wp(ee,Y.mode,de),de.return=Y,Y=de),S(Y)):l(Y,$)}return function(Y,$,ee,de){try{di=0;var Pe=kt(Y,$,ee,de);return Jl=null,Pe}catch(De){if(De===Wl||De===ad)throw De;var xt=oa(29,De,null,Y.mode);return xt.lanes=de,xt.return=Y,xt}finally{}}}var ll=hb(!0),gb=hb(!1),or=!1;function um(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function pm(s,a){s=s.updateQueue,a.updateQueue===s&&(a.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function ir(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function cr(s,a,l){var c=s.updateQueue;if(c===null)return null;if(c=c.shared,(vt&2)!==0){var m=c.pending;return m===null?a.next=a:(a.next=m.next,m.next=a),c.pending=a,a=Zc(s),eb(s,null,l),a}return Xc(s,c,a,l),Zc(s)}function pi(s,a,l){if(a=a.updateQueue,a!==null&&(a=a.shared,(l&4194048)!==0)){var c=a.lanes;c&=s.pendingLanes,l|=c,a.lanes=l,it(s,l)}}function mm(s,a){var l=s.updateQueue,c=s.alternate;if(c!==null&&(c=c.updateQueue,l===c)){var m=null,f=null;if(l=l.firstBaseUpdate,l!==null){do{var S={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};f===null?m=f=S:f=f.next=S,l=l.next}while(l!==null);f===null?m=f=a:f=f.next=a}else m=f=a;l={baseState:c.baseState,firstBaseUpdate:m,lastBaseUpdate:f,shared:c.shared,callbacks:c.callbacks},s.updateQueue=l;return}s=l.lastBaseUpdate,s===null?l.firstBaseUpdate=a:s.next=a,l.lastBaseUpdate=a}var xm=!1;function mi(){if(xm){var s=Zl;if(s!==null)throw s}}function xi(s,a,l,c){xm=!1;var m=s.updateQueue;or=!1;var f=m.firstBaseUpdate,S=m.lastBaseUpdate,k=m.shared.pending;if(k!==null){m.shared.pending=null;var F=k,te=F.next;F.next=null,S===null?f=te:S.next=te,S=F;var ce=s.alternate;ce!==null&&(ce=ce.updateQueue,k=ce.lastBaseUpdate,k!==S&&(k===null?ce.firstBaseUpdate=te:k.next=te,ce.lastBaseUpdate=F))}if(f!==null){var pe=m.baseState;S=0,ce=te=F=null,k=f;do{var ae=k.lane&-536870913,oe=ae!==k.lane;if(oe?(nt&ae)===ae:(c&ae)===ae){ae!==0&&ae===Xl&&(xm=!0),ce!==null&&(ce=ce.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var Ce=s,Le=k;ae=a;var kt=l;switch(Le.tag){case 1:if(Ce=Le.payload,typeof Ce=="function"){pe=Ce.call(kt,pe,ae);break e}pe=Ce;break e;case 3:Ce.flags=Ce.flags&-65537|128;case 0:if(Ce=Le.payload,ae=typeof Ce=="function"?Ce.call(kt,pe,ae):Ce,ae==null)break e;
vendor: 5,673 bytes, line 48
48pe=g({},pe,ae);break e;case 2:or=!0}}ae=k.callback,ae!==null&&(s.flags|=64,oe&&(s.flags|=8192),oe=m.callbacks,oe===null?m.callbacks=[ae]:oe.push(ae))}else oe={lane:ae,tag:k.tag,payload:k.payload,callback:k.callback,next:null},ce===null?(te=ce=oe,F=pe):ce=ce.next=oe,S|=ae;if(k=k.next,k===null){if(k=m.shared.pending,k===null)break;oe=k,k=oe.next,oe.next=null,m.lastBaseUpdate=oe,m.shared.pending=null}}while(!0);ce===null&&(F=pe),m.baseState=F,m.firstBaseUpdate=te,m.lastBaseUpdate=ce,f===null&&(m.shared.lanes=0),xr|=S,s.lanes=S,s.memoizedState=pe}}function bb(s,a){if(typeof s!="function")throw Error(o(191,s));s.call(a)}function vb(s,a){var l=s.callbacks;if(l!==null)for(s.callbacks=null,s=0;s<l.length;s++)bb(l[s],a)}var eo=_(null),od=_(0);function yb(s,a){s=zn,I(od,s),I(eo,a),zn=s|a.baseLanes}function fm(){I(od,zn),I(eo,eo.current)}function hm(){zn=od.current,L(eo),L(od)}var ia=_(null),ka=null;function dr(s){var a=s.alternate;I(Jt,Jt.current&1),I(ia,s),ka===null&&(a===null||eo.current!==null||a.memoizedState!==null)&&(ka=s)}function gm(s){I(Jt,Jt.current),I(ia,s),ka===null&&(ka=s)}function wb(s){s.tag===22?(I(Jt,Jt.current),I(ia,s),ka===null&&(ka=s)):ur()}function ur(){I(Jt,Jt.current),I(ia,ia.current)}function ca(s){L(ia),ka===s&&(ka=null),L(Jt)}var Jt=_(0);function id(s){for(var a=s;a!==null;){if(a.tag===13){var l=a.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||jx(l)||Nx(l)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===s)break;for(;a.sibling===null;){if(a.return===null||a.return===s)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var Dn=0,Ge=null,Et=null,ns=null,cd=!1,to=!1,ol=!1,dd=0,fi=0,so=null,p5=0;function Kt(){throw Error(o(321))}function bm(s,a){if(a===null)return!1;for(var l=0;l<a.length&&l<s.length;l++)if(!la(s[l],a[l]))return!1;return!0}function vm(s,a,l,c,m,f){return Dn=f,Ge=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,R.H=s===null||s.memoizedState===null?nv:Mm,ol=!1,f=l(c,m),ol=!1,to&&(f=jb(a,l,c,m)),Sb(s),f}function Sb(s){R.H=bi;var a=Et!==null&&Et.next!==null;if(Dn=0,ns=Et=Ge=null,cd=!1,fi=0,so=null,a)throw Error(o(300));s===null||rs||(s=s.dependencies,s!==null&&ed(s)&&(rs=!0))}function jb(s,a,l,c){Ge=s;var m=0;do{if(to&&(so=null),fi=0,to=!1,25<=m)throw Error(o(301));if(m+=1,ns=Et=null,s.updateQueue!=null){var f=s.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}R.H=rv,f=a(l,c)}while(to);return f}function m5(){var s=R.H,a=s.useState()[0];return a=typeof a.then=="function"?hi(a):a,s=s.useState()[0],(Et!==null?Et.memoizedState:null)!==s&&(Ge.flags|=1024),a}function ym(){var s=dd!==0;return dd=0,s}function wm(s,a,l){a.updateQueue=s.updateQueue,a.flags&=-2053,s.lanes&=~l}function Sm(s){if(cd){for(s=s.memoizedState;s!==null;){var a=s.queue;a!==null&&(a.pending=null),s=s.next}cd=!1}Dn=0,ns=Et=Ge=null,to=!1,fi=dd=0,so=null}function zs(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ns===null?Ge.memoizedState=ns=s:ns=ns.next=s,ns}function es(){if(Et===null){var s=Ge.alternate;s=s!==null?s.memoizedState:null}else s=Et.next;var a=ns===null?Ge.memoizedState:ns.next;if(a!==null)ns=a,Et=s;else{if(s===null)throw Ge.alternate===null?Error(o(467)):Error(o(310));Et=s,s={memoizedState:Et.memoizedState,baseState:Et.baseState,baseQueue:Et.baseQueue,queue:Et.queue,next:null},ns===null?Ge.memoizedState=ns=s:ns=ns.next=s}return ns}function ud(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function hi(s){var a=fi;return fi+=1,so===null&&(so=[]),s=mb(so,s,a),a=Ge,(ns===null?a.memoizedState:ns.next)===null&&(a=a.alternate,R.H=a===null||a.memoizedState===null?nv:Mm),s}function pd(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return hi(s);if(s.$$typeof===T)return Es(s)}throw Error(o(438,String(s)))}function jm(s){var a=null,l=Ge.updateQueue;if(l!==null&&(a=l.memoCache),a==null){var c=Ge.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(a={data:c.data.map(function(m){return m.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),l===null&&(l=ud(),Ge.updateQueue=l),l.memoCache=a,l=a.data[a.index],l===void 0)for(l=a.data[a.index]=Array(s),c=0;c<s;c++)l[c]=ne;return a.index++,l}function Tn(s,a){return typeof a=="function"?a(s):a}function md(s){var a=es();return Nm(a,Et,s)}function Nm(s,a,l){var c=s.queue;if(c===null)throw Error(o(311));c.lastRenderedReducer=l;var m=s.baseQueue,f=c.pending;if(f!==null){if(m!==null){var S=m.next;m.next=f.next,f.next=S}a.baseQueue=m=f,c.pending=null}if(f=s.baseState,m===null)s.memoizedState=f;else{a=m.next;var k=S=null,F=null,te=a,ce=!1;do{var pe=te.lane&-536870913;if(pe!==te.lane?(nt&pe)===pe:(Dn&pe)===pe){var ae=te.revertLane;if(ae===0)F!==null&&(F=F.next={lane:0,revertLane:0,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null}),pe===Xl&&(ce=!0);else if((Dn&ae)===ae){te=te.next,ae===Xl&&(ce=!0);continue}else pe={lane:0,revertLane:te.revertLane,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},F===null?(k=F=pe,S=f):F=F.next=pe,Ge.lanes|=ae,xr|=ae;pe=te.action,ol&&l(f,pe),f=te.hasEagerState?te.eagerState:l(f,pe)}else ae={lane:pe,revertLane:te.revertLane,gesture:te.gesture,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},F===null?(k=F=ae,S=f):F=F.next=ae,Ge.lanes|=pe,xr|=pe;te=te.next}
vendor: 16,827 bytes, line 48
48while(te!==null&&te!==a);if(F===null?S=f:F.next=k,!la(f,s.memoizedState)&&(rs=!0,ce&&(l=Zl,l!==null)))throw l;s.memoizedState=f,s.baseState=S,s.baseQueue=F,c.lastRenderedState=f}return m===null&&(c.lanes=0),[s.memoizedState,c.dispatch]}function Am(s){var a=es(),l=a.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=s;var c=l.dispatch,m=l.pending,f=a.memoizedState;if(m!==null){l.pending=null;var S=m=m.next;do f=s(f,S.action),S=S.next;while(S!==m);la(f,a.memoizedState)||(rs=!0),a.memoizedState=f,a.baseQueue===null&&(a.baseState=f),l.lastRenderedState=f}return[f,c]}function Nb(s,a,l){var c=Ge,m=es(),f=ct;if(f){if(l===void 0)throw Error(o(407));l=l()}else l=a();var S=!la((Et||m).memoizedState,l);if(S&&(m.memoizedState=l,rs=!0),m=m.queue,Rm(Eb.bind(null,c,m,s),[s]),m.getSnapshot!==a||S||ns!==null&&ns.memoizedState.tag&1){if(c.flags|=2048,ao(9,{destroy:void 0},Cb.bind(null,c,m,l,a),null),Tt===null)throw Error(o(349));f||(Dn&127)!==0||Ab(c,a,l)}return l}function Ab(s,a,l){s.flags|=16384,s={getSnapshot:a,value:l},a=Ge.updateQueue,a===null?(a=ud(),Ge.updateQueue=a,a.stores=[s]):(l=a.stores,l===null?a.stores=[s]:l.push(s))}function Cb(s,a,l,c){a.value=l,a.getSnapshot=c,Rb(a)&&kb(s)}function Eb(s,a,l){return l(function(){Rb(a)&&kb(s)})}function Rb(s){var a=s.getSnapshot;s=s.value;try{var l=a();return!la(s,l)}catch{return!0}}function kb(s){var a=Wr(s,2);a!==null&&Xs(a,s,2)}function Cm(s){var a=zs();if(typeof s=="function"){var l=s;if(s=l(),ol){Ls(!0);try{l()}finally{Ls(!1)}}}return a.memoizedState=a.baseState=s,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Tn,lastRenderedState:s},a}function Db(s,a,l,c){return s.baseState=l,Nm(s,Et,typeof c=="function"?c:Tn)}function x5(s,a,l,c,m){if(hd(s))throw Error(o(485));if(s=a.action,s!==null){var f={payload:m,action:s,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){f.listeners.push(S)}};R.T!==null?l(!0):f.isTransition=!1,c(f),l=a.pending,l===null?(f.next=a.pending=f,Tb(a,f)):(f.next=l.next,a.pending=l.next=f)}}function Tb(s,a){var l=a.action,c=a.payload,m=s.state;if(a.isTransition){var f=R.T,S={};R.T=S;try{var k=l(m,c),F=R.S;F!==null&&F(S,k),Ob(s,a,k)}catch(te){Em(s,a,te)}finally{f!==null&&S.types!==null&&(f.types=S.types),R.T=f}}else try{f=l(m,c),Ob(s,a,f)}catch(te){Em(s,a,te)}}function Ob(s,a,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(c){_b(s,a,c)},function(c){return Em(s,a,c)}):_b(s,a,l)}function _b(s,a,l){a.status="fulfilled",a.value=l,Mb(a),s.state=l,a=s.pending,a!==null&&(l=a.next,l===a?s.pending=null:(l=l.next,a.next=l,Tb(s,l)))}function Em(s,a,l){var c=s.pending;if(s.pending=null,c!==null){c=c.next;do a.status="rejected",a.reason=l,Mb(a),a=a.next;while(a!==c)}s.action=null}function Mb(s){s=s.listeners;for(var a=0;a<s.length;a++)(0,s[a])()}function Pb(s,a){return a}function Hb(s,a){if(ct){var l=Tt.formState;if(l!==null){e:{var c=Ge;if(ct){if(Mt){t:{for(var m=Mt,f=Ra;m.nodeType!==8;){if(!f){m=null;break t}if(m=Da(m.nextSibling),m===null){m=null;break t}}f=m.data,m=f==="F!"||f==="F"?m:null}if(m){Mt=Da(m.nextSibling),c=m.data==="F!";break e}}rr(c)}c=!1}c&&(a=l[0])}}return l=zs(),l.memoizedState=l.baseState=a,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pb,lastRenderedState:a},l.queue=c,l=tv.bind(null,Ge,c),c.dispatch=l,c=Cm(!1),f=_m.bind(null,Ge,!1,c.queue),c=zs(),m={state:a,dispatch:null,action:s,pending:null},c.queue=m,l=x5.bind(null,Ge,m,f,l),m.dispatch=l,c.memoizedState=s,[a,l,!1]}function Lb(s){var a=es();return zb(a,Et,s)}function zb(s,a,l){if(a=Nm(s,a,Pb)[0],s=md(Tn)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var c=hi(a)}catch(S){throw S===Wl?ad:S}else c=a;a=es();var m=a.queue,f=m.dispatch;return l!==a.memoizedState&&(Ge.flags|=2048,ao(9,{destroy:void 0},f5.bind(null,m,l),null)),[c,f,s]}function f5(s,a){s.action=a}function Ib(s){var a=es(),l=Et;if(l!==null)return zb(a,l,s);es(),a=a.memoizedState,l=es();var c=l.queue.dispatch;return l.memoizedState=s,[a,c,!1]}function ao(s,a,l,c){return s={tag:s,create:l,deps:c,inst:a,next:null},a=Ge.updateQueue,a===null&&(a=ud(),Ge.updateQueue=a),l=a.lastEffect,l===null?a.lastEffect=s.next=s:(c=l.next,l.next=s,s.next=c,a.lastEffect=s),s}function Bb(){return es().memoizedState}function xd(s,a,l,c){var m=zs();Ge.flags|=s,m.memoizedState=ao(1|a,{destroy:void 0},l,c===void 0?null:c)}function fd(s,a,l,c){var m=es();c=c===void 0?null:c;var f=m.memoizedState.inst;Et!==null&&c!==null&&bm(c,Et.memoizedState.deps)?m.memoizedState=ao(a,f,l,c):(Ge.flags|=s,m.memoizedState=ao(1|a,f,l,c))}function Vb(s,a){xd(8390656,8,s,a)}function Rm(s,a){fd(2048,8,s,a)}function h5(s){Ge.flags|=4;var a=Ge.updateQueue;if(a===null)a=ud(),Ge.updateQueue=a,a.events=[s];else{var l=a.events;l===null?a.events=[s]:l.push(s)}}function Fb(s){var a=es().memoizedState;return h5({ref:a,nextImpl:s}),function(){if((vt&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}function Ub(s,a){return fd(4,2,s,a)}function $b(s,a){return fd(4,4,s,a)}function Gb(s,a){if(typeof a=="function"){s=s();var l=a(s);return function(){typeof l=="function"?l():a(null)}}if(a!=null)return s=s(),a.current=s,function(){a.current=null}}function Kb(s,a,l){l=l!=null?l.concat([s]):null,fd(4,4,Gb.bind(null,a,s),l)}function km(){}function qb(s,a){var l=es();a=a===void 0?null:a;var c=l.memoizedState;return a!==null&&bm(a,c[1])?c[0]:(l.memoizedState=[s,a],s)}function Qb(s,a){var l=es();a=a===void 0?null:a;var c=l.memoizedState;if(a!==null&&bm(a,c[1]))return c[0];if(c=s(),ol){Ls(!0);try{s()}finally{Ls(!1)}}return l.memoizedState=[c,a],c}function Dm(s,a,l){return l===void 0||(Dn&1073741824)!==0&&(nt&261930)===0?s.memoizedState=a:(s.memoizedState=l,s=Yv(),Ge.lanes|=s,xr|=s,l)}function Yb(s,a,l,c){return la(l,a)?l:eo.current!==null?(s=Dm(s,l,c),la(s,a)||(rs=!0),s):(Dn&42)===0||(Dn&1073741824)!==0&&(nt&261930)===0?(rs=!0,s.memoizedState=l):(s=Yv(),Ge.lanes|=s,xr|=s,a)}function Xb(s,a,l,c,m){var f=P.p;P.p=f!==0&&8>f?f:8;var S=R.T,k={};R.T=k,_m(s,!1,a,l);try{var F=m(),te=R.S;if(te!==null&&te(k,F),F!==null&&typeof F=="object"&&typeof F.then=="function"){var ce=u5(F,c);gi(s,a,ce,pa(s))}else gi(s,a,c,pa(s))}catch(pe){gi(s,a,{then:function(){},status:"rejected",reason:pe},pa())}finally{P.p=f,S!==null&&k.types!==null&&(S.types=k.types),R.T=S}}function g5(){}function Tm(s,a,l,c){if(s.tag!==5)throw Error(o(476));var m=Zb(s).queue;Xb(s,m,a,B,l===null?g5:function(){return Wb(s),l(c)})}function Zb(s){var a=s.memoizedState;if(a!==null)return a;a={memoizedState:B,baseState:B,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Tn,lastRenderedState:B},next:null};var l={};return a.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Tn,lastRenderedState:l},next:null},s.memoizedState=a,s=s.alternate,s!==null&&(s.memoizedState=a),a}function Wb(s){var a=Zb(s);a.next===null&&(a=s.alternate.memoizedState),gi(s,a.next.queue,{},pa())}function Om(){return Es(Mi)}function Jb(){return es().memoizedState}function ev(){return es().memoizedState}function b5(s){for(var a=s.return;a!==null;){switch(a.tag){case 24:case 3:var l=pa();s=ir(l);var c=cr(a,s,l);c!==null&&(Xs(c,a,l),pi(c,a,l)),a={cache:om()},s.payload=a;return}a=a.return}}function v5(s,a,l){var c=pa();l={lane:c,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},hd(s)?sv(a,l):(l=Xp(s,a,l,c),l!==null&&(Xs(l,s,c),av(l,a,c)))}function tv(s,a,l){var c=pa();gi(s,a,l,c)}function gi(s,a,l,c){var m={lane:c,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(hd(s))sv(a,m);else{var f=s.alternate;if(s.lanes===0&&(f===null||f.lanes===0)&&(f=a.lastRenderedReducer,f!==null))try{var S=a.lastRenderedState,k=f(S,l);if(m.hasEagerState=!0,m.eagerState=k,la(k,S))return Xc(s,a,m,0),Tt===null&&Yc(),!1}catch{}finally{}if(l=Xp(s,a,m,c),l!==null)return Xs(l,s,c),av(l,a,c),!0}return!1}function _m(s,a,l,c){if(c={lane:2,revertLane:ux(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},hd(s)){if(a)throw Error(o(479))}else a=Xp(s,l,c,2),a!==null&&Xs(a,s,2)}function hd(s){var a=s.alternate;return s===Ge||a!==null&&a===Ge}function sv(s,a){to=cd=!0;var l=s.pending;l===null?a.next=a:(a.next=l.next,l.next=a),s.pending=a}function av(s,a,l){if((l&4194048)!==0){var c=a.lanes;c&=s.pendingLanes,l|=c,a.lanes=l,it(s,l)}}var bi={readContext:Es,use:pd,useCallback:Kt,useContext:Kt,useEffect:Kt,useImperativeHandle:Kt,useLayoutEffect:Kt,useInsertionEffect:Kt,useMemo:Kt,useReducer:Kt,useRef:Kt,useState:Kt,useDebugValue:Kt,useDeferredValue:Kt,useTransition:Kt,useSyncExternalStore:Kt,useId:Kt,useHostTransitionStatus:Kt,useFormState:Kt,useActionState:Kt,useOptimistic:Kt,useMemoCache:Kt,useCacheRefresh:Kt};bi.useEffectEvent=Kt;var nv={readContext:Es,use:pd,useCallback:function(s,a){return zs().memoizedState=[s,a===void 0?null:a],s},useContext:Es,useEffect:Vb,useImperativeHandle:function(s,a,l){l=l!=null?l.concat([s]):null,xd(4194308,4,Gb.bind(null,a,s),l)},useLayoutEffect:function(s,a){return xd(4194308,4,s,a)},useInsertionEffect:function(s,a){xd(4,2,s,a)},useMemo:function(s,a){var l=zs();a=a===void 0?null:a;var c=s();if(ol){Ls(!0);try{s()}finally{Ls(!1)}}return l.memoizedState=[c,a],c},useReducer:function(s,a,l){var c=zs();if(l!==void 0){var m=l(a);if(ol){Ls(!0);try{l(a)}finally{Ls(!1)}}}else m=a;return c.memoizedState=c.baseState=m,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:m},c.queue=s,s=s.dispatch=v5.bind(null,Ge,s),[c.memoizedState,s]},useRef:function(s){var a=zs();return s={current:s},a.memoizedState=s},useState:function(s){s=Cm(s);var a=s.queue,l=tv.bind(null,Ge,a);return a.dispatch=l,[s.memoizedState,l]},useDebugValue:km,useDeferredValue:function(s,a){var l=zs();return Dm(l,s,a)},useTransition:function(){var s=Cm(!1);return s=Xb.bind(null,Ge,s.queue,!0,!1),zs().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,a,l){var c=Ge,m=zs();if(ct){if(l===void 0)throw Error(o(407));l=l()}else{if(l=a(),Tt===null)throw Error(o(349));(nt&127)!==0||Ab(c,a,l)}m.memoizedState=l;var f={value:l,getSnapshot:a};return m.queue=f,Vb(Eb.bind(null,c,f,s),[s]),c.flags|=2048,ao(9,{destroy:void 0},Cb.bind(null,c,f,l,a),null),l},useId:function(){var s=zs(),a=Tt.identifierPrefix;if(ct){var l=ln,c=rn;l=(c&~(1<<32-Wt(c)-1)).toString(32)+l,a="_"+a+"R_"+l,l=dd++,0<l&&(a+="H"+l.toString(32)),a+="_"}else l=p5++,a="_"+a+"r_"+l.toString(32)+"_";return s.memoizedState=a},useHostTransitionStatus:Om,useFormState:Hb,useActionState:Hb,useOptimistic:function(s){var a=zs();a.memoizedState=a.baseState=s;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=l,a=_m.bind(null,Ge,!0,l),l.dispatch=a,[s,a]},useMemoCache:jm,useCacheRefresh:function(){return zs().memoizedState=b5.bind(null,Ge)},useEffectEvent:function(s){var a=zs(),l={impl:s};return a.memoizedState=l,function(){if((vt&2)!==0)throw Error(o(440));return l.impl.apply(void 0,arguments)}}},Mm={readContext:Es,use:pd,useCallback:qb,useContext:Es,useEffect:Rm,useImperativeHandle:Kb,useInsertionEffect:Ub,useLayoutEffect:$b,useMemo:Qb,useReducer:md,useRef:Bb,useState:function(){return md(Tn)},useDebugValue:km,useDeferredValue:function(s,a){var l=es();return Yb(l,Et.memoizedState,s,a)},useTransition:function(){var s=md(Tn)[0],a=es().memoizedState;return[typeof s=="boolean"?s:hi(s),a]},useSyncExternalStore:Nb,useId:Jb,useHostTransitionStatus:Om,useFormState:Lb,useActionState:Lb,useOptimistic:function(s,a){var l=es();return Db(l,Et,s,a)},useMemoCache:jm,useCacheRefresh:ev};Mm.useEffectEvent=Fb;var rv={readContext:Es,use:pd,useCallback:qb,useContext:Es,useEffect:Rm,useImperativeHandle:Kb,useInsertionEffect:Ub,useLayoutEffect:$b,useMemo:Qb,useReducer:Am,useRef:Bb,useState:function(){return Am(Tn)},useDebugValue:km,useDeferredValue:function(s,a){var l=es();return Et===null?Dm(l,s,a):Yb(l,Et.memoizedState,s,a)},useTransition:function(){var s=Am(Tn)[0],a=es().memoizedState;return[typeof s=="boolean"?s:hi(s),a]},useSyncExternalStore:Nb,useId:Jb,useHostTransitionStatus:Om,useFormState:Ib,useActionState:Ib,useOptimistic:function(s,a){var l=es();return Et!==null?Db(l,Et,s,a):(l.baseState=s,[s,l.queue.dispatch])},useMemoCache:jm,useCacheRefresh:ev};rv.useEffectEvent=Fb;function Pm(s,a,l,c){a=s.memoizedState,l=l(c,a),l=l==null?a:g({},a,l),s.memoizedState=l,s.lanes===0&&(s.updateQueue.baseState=l)}var Hm={enqueueSetState:function(s,a,l){s=s._reactInternals;var c=pa(),m=ir(c);m.payload=a,l!=null&&(m.callback=l),a=cr(s,m,c),a!==null&&(Xs(a,s,c),pi(a,s,c))},enqueueReplaceState:function(s,a,l){s=s._reactInternals;var c=pa(),m=ir(c);m.tag=1,m.payload=a,l!=null&&(m.callback=l),a=cr(s,m,c),a!==null&&(Xs(a,s,c),pi(a,s,c))},enqueueForceUpdate:function(s,a){s=s._reactInternals;var l=pa(),c=ir(l);c.tag=2,a!=null&&(c.callback=a),a=cr(s,c,l),a!==null&&(Xs(a,s,l),pi(a,s,l))}};function lv(s,a,l,c,m,f,S){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(c,f,S):a.prototype&&a.prototype.isPureReactComponent?!ni(l,c)||!ni(m,f):!0}function ov(s,a,l,c){s=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(l,c),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(l,c),a.state!==s&&Hm.enqueueReplaceState(a,a.state,null)}function il(s,a){var l=a;if("ref"in a){l={};for(var c in a)c!=="ref"&&(l[c]=a[c])}if(s=s.defaultProps){l===a&&(l=g({},l));for(var m in s)l[m]===void 0&&(l[m]=s[m])}return l}function iv(s){Qc(s)}function cv(s){console.error(s)}function dv(s){Qc(s)}function gd(s,a){try{var l=s.onUncaughtError;l(a.value,{componentStack:a.stack})}catch(c){setTimeout(function(){throw c})}}function uv(s,a,l){try{var c=s.onCaughtError;c(l.value,{componentStack:l.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(m){setTimeout(function(){throw m})}}function Lm(s,a,l){return l=ir(l),l.tag=3,l.payload={element:null},l.callback=function(){gd(s,a)},l}function pv(s){return s=ir(s),s.tag=3,s}function mv(s,a,l,c){var m=l.type.getDerivedStateFromError;if(typeof m=="function"){var f=c.value;s.payload=function(){return m(f)},s.callback=function(){uv(a,l,c)}}var S=l.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(s.callback=function(){uv(a,l,c),typeof m!="function"&&(fr===null?fr=new Set([this]):fr.add(this));var k=c.stack;this.componentDidCatch(c.value,{componentStack:k!==null?k:""})})}function y5(s,a,l,c,m){if(l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(a=l.alternate,a!==null&&Yl(a,l,m,!0),l=ia.current,l!==null){switch(l.tag){case 31:case 13:return ka===null?kd():l.alternate===null&&qt===0&&(qt=3),l.flags&=-257,l.flags|=65536,l.lanes=m,c===nd?l.flags|=16384:(a=l.updateQueue,a===null?l.updateQueue=new Set([c]):a.add(c),ix(s,c,m)),!1;case 22:return l.flags|=65536,c===nd?l.flags|=16384:(a=l.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([c])},l.updateQueue=a):(l=a.retryQueue,l===null?a.retryQueue=new Set([c]):l.add(c)),ix(s,c,m)),!1}throw Error(o(435,l.tag))}return ix(s,c,m),kd(),!1}if(ct)return a=ia.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=m,c!==sm&&(s=Error(o(422),{cause:c}),oi(Aa(s,l)))):(c!==sm&&(a=Error(o(423),{cause:c}),oi(Aa(a,l))),s=s.current.alternate,s.flags|=65536,m&=-m,s.lanes|=m,c=Aa(c,l),m=Lm(s.stateNode,c,m),mm(s,m),qt!==4&&(qt=2)),!1;var f=Error(o(520),{cause:c});if(f=Aa(f,l),Ci===null?Ci=[f]:Ci.push(f),qt!==4&&(qt=2),a===null)return!0;c=Aa(c,l),l=a;do{switch(l.tag){case 3:return l.flags|=65536,s=m&-m,l.lanes|=s,s=Lm(l.stateNode,c,s),mm(l,s),!1;case 1:if(a=l.type,f=l.stateNode,(l.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(fr===null||!fr.has(f))))return l.flags|=65536,m&=-m,l.lanes|=m,m=pv(m),mv(m,s,l,c),mm(l,m),!1}l=l.return}while(l!==null);return!1}var zm=Error(o(461)),rs=!1;function Rs(s,a,l,c){a.child=s===null?gb(a,null,l,c):ll(a,s.child,l,c)}function xv(s,a,l,c,m){l=l.render;var f=a.ref;if("ref"in c){var S={};for(var k in c)k!=="ref"&&(S[k]=c[k])}else S=c;return sl(a),c=vm(s,a,l,S,f,m),k=ym(),s!==null&&!rs?(wm(s,a,m),On(s,a,m)):(ct&&k&&em(a),a.flags|=1,Rs(s,a,c,m),a.child)}function fv(s,a,l,c,m){if(s===null){var f=l.type;return typeof f=="function"&&!Zp(f)&&f.defaultProps===void 0&&l.compare===null?(a.tag=15,a.type=f,hv(s,a,f,c,m)):(s=Wc(l.type,null,c,a,a.mode,m),s.ref=a.ref,s.return=a,a.child=s)}if(f=s.child,!Km(s,m)){var S=f.memoizedProps;if(l=l.compare,l=l!==null?l:ni,l(S,c)&&s.ref===a.ref)return On(s,a,m)}return a.flags|=1,s=Cn(f,c),s.ref=a.ref,s.return=a,a.child=s}function hv(s,a,l,c,m){if(s!==null){var f=s.memoizedProps;if(ni(f,c)&&s.ref===a.ref)if(rs=!1,a.pendingProps=c=f,Km(s,m))(s.flags&131072)!==0&&(rs=!0);else return a.lanes=s.lanes,On(s,a,m)}return Im(s,a,l,c,m)}
vendor: 2,143 bytes, line 48
48function gv(s,a,l,c){var m=c.children,f=s!==null?s.memoizedState:null;if(s===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((a.flags&128)!==0){if(f=f!==null?f.baseLanes|l:l,s!==null){for(c=a.child=s.child,m=0;c!==null;)m=m|c.lanes|c.childLanes,c=c.sibling;c=m&~f}else c=0,a.child=null;return bv(s,a,f,l,c)}if((l&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},s!==null&&sd(a,f!==null?f.cachePool:null),f!==null?yb(a,f):fm(),wb(a);else return c=a.lanes=536870912,bv(s,a,f!==null?f.baseLanes|l:l,l,c)}else f!==null?(sd(a,f.cachePool),yb(a,f),ur(),a.memoizedState=null):(s!==null&&sd(a,null),fm(),ur());return Rs(s,a,m,l),a.child}function vi(s,a){return s!==null&&s.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function bv(s,a,l,c,m){var f=cm();return f=f===null?null:{parent:as._currentValue,pool:f},a.memoizedState={baseLanes:l,cachePool:f},s!==null&&sd(a,null),fm(),wb(a),s!==null&&Yl(s,a,c,!0),a.childLanes=m,null}function bd(s,a){return a=yd({mode:a.mode,children:a.children},s.mode),a.ref=s.ref,s.child=a,a.return=s,a}function vv(s,a,l){return ll(a,s.child,null,l),s=bd(a,a.pendingProps),s.flags|=2,ca(a),a.memoizedState=null,s}function w5(s,a,l){var c=a.pendingProps,m=(a.flags&128)!==0;if(a.flags&=-129,s===null){if(ct){if(c.mode==="hidden")return s=bd(a,c),a.lanes=536870912,vi(null,s);if(gm(a),(s=Mt)?(s=T0(s,Ra),s=s!==null&&s.data==="&"?s:null,s!==null&&(a.memoizedState={dehydrated:s,treeContext:ar!==null?{id:rn,overflow:ln}:null,retryLane:536870912,hydrationErrors:null},l=sb(s),l.return=a,a.child=l,Cs=a,Mt=null)):s=null,s===null)throw rr(a);return a.lanes=536870912,null}return bd(a,c)}var f=s.memoizedState;if(f!==null){var S=f.dehydrated;if(gm(a),m)if(a.flags&256)a.flags&=-257,a=vv(s,a,l);else if(a.memoizedState!==null)a.child=s.child,a.flags|=128,a=null;else throw Error(o(558));else if(rs||Yl(s,a,l,!1),m=(l&s.childLanes)!==0,rs||m){if(c=Tt,c!==null&&(S=pt(c,l),S!==0&&S!==f.retryLane))throw f.retryLane=S,Wr(s,S),Xs(c,s,S),zm;kd(),a=vv(s,a,l)}
vendor: 4,594 bytes, line 48
48else s=f.treeContext,Mt=Da(S.nextSibling),Cs=a,ct=!0,nr=null,Ra=!1,s!==null&&rb(a,s),a=bd(a,c),a.flags|=4096;return a}return s=Cn(s.child,{mode:c.mode,children:c.children}),s.ref=a.ref,a.child=s,s.return=a,s}function vd(s,a){var l=a.ref;if(l===null)s!==null&&s.ref!==null&&(a.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(o(284));(s===null||s.ref!==l)&&(a.flags|=4194816)}}function Im(s,a,l,c,m){return sl(a),l=vm(s,a,l,c,void 0,m),c=ym(),s!==null&&!rs?(wm(s,a,m),On(s,a,m)):(ct&&c&&em(a),a.flags|=1,Rs(s,a,l,m),a.child)}function yv(s,a,l,c,m,f){return sl(a),a.updateQueue=null,l=jb(a,c,l,m),Sb(s),c=ym(),s!==null&&!rs?(wm(s,a,f),On(s,a,f)):(ct&&c&&em(a),a.flags|=1,Rs(s,a,l,f),a.child)}function wv(s,a,l,c,m){if(sl(a),a.stateNode===null){var f=Gl,S=l.contextType;typeof S=="object"&&S!==null&&(f=Es(S)),f=new l(c,f),a.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=Hm,a.stateNode=f,f._reactInternals=a,f=a.stateNode,f.props=c,f.state=a.memoizedState,f.refs={},um(a),S=l.contextType,f.context=typeof S=="object"&&S!==null?Es(S):Gl,f.state=a.memoizedState,S=l.getDerivedStateFromProps,typeof S=="function"&&(Pm(a,l,S,c),f.state=a.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(S=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),S!==f.state&&Hm.enqueueReplaceState(f,f.state,null),xi(a,c,f,m),mi(),f.state=a.memoizedState),typeof f.componentDidMount=="function"&&(a.flags|=4194308),c=!0}else if(s===null){f=a.stateNode;var k=a.memoizedProps,F=il(l,k);f.props=F;var te=f.context,ce=l.contextType;S=Gl,typeof ce=="object"&&ce!==null&&(S=Es(ce));var pe=l.getDerivedStateFromProps;ce=typeof pe=="function"||typeof f.getSnapshotBeforeUpdate=="function",k=a.pendingProps!==k,ce||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(k||te!==S)&&ov(a,f,c,S),or=!1;var ae=a.memoizedState;f.state=ae,xi(a,c,f,m),mi(),te=a.memoizedState,k||ae!==te||or?(typeof pe=="function"&&(Pm(a,l,pe,c),te=a.memoizedState),(F=or||lv(a,l,F,c,ae,te,S))?(ce||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(a.flags|=4194308)):(typeof f.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=c,a.memoizedState=te),f.props=c,f.state=te,f.context=S,c=F):(typeof f.componentDidMount=="function"&&(a.flags|=4194308),c=!1)}else{f=a.stateNode,pm(s,a),S=a.memoizedProps,ce=il(l,S),f.props=ce,pe=a.pendingProps,ae=f.context,te=l.contextType,F=Gl,typeof te=="object"&&te!==null&&(F=Es(te)),k=l.getDerivedStateFromProps,(te=typeof k=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(S!==pe||ae!==F)&&ov(a,f,c,F),or=!1,ae=a.memoizedState,f.state=ae,xi(a,c,f,m),mi();var oe=a.memoizedState;S!==pe||ae!==oe||or||s!==null&&s.dependencies!==null&&ed(s.dependencies)?(typeof k=="function"&&(Pm(a,l,k,c),oe=a.memoizedState),(ce=or||lv(a,l,ce,c,ae,oe,F)||s!==null&&s.dependencies!==null&&ed(s.dependencies))?(te||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(c,oe,F),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(c,oe,F)),typeof f.componentDidUpdate=="function"&&(a.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof f.componentDidUpdate!="function"||S===s.memoizedProps&&ae===s.memoizedState||(a.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||S===s.memoizedProps&&ae===s.memoizedState||(a.flags|=1024),a.memoizedProps=c,a.memoizedState=oe),f.props=c,f.state=oe,f.context=F,c=ce):(typeof f.componentDidUpdate!="function"||S===s.memoizedProps&&ae===s.memoizedState||(a.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||S===s.memoizedProps&&ae===s.memoizedState||(a.flags|=1024),c=!1)}return f=c,vd(s,a),c=(a.flags&128)!==0,f||c?(f=a.stateNode,l=c&&typeof l.getDerivedStateFromError!="function"?null:f.render(),a.flags|=1,s!==null&&c?(a.child=ll(a,s.child,null,m),a.child=ll(a,null,l,m)):Rs(s,a,l,m),a.memoizedState=f.state,s=a.child):s=On(s,a,m),s}
vendor: 2,632 bytes, line 48
48function Sv(s,a,l,c){return el(),a.flags|=256,Rs(s,a,l,c),a.child}var Bm={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Vm(s){return{baseLanes:s,cachePool:ub()}}function Fm(s,a,l){return s=s!==null?s.childLanes&~l:0,a&&(s|=ua),s}function jv(s,a,l){var c=a.pendingProps,m=!1,f=(a.flags&128)!==0,S;if((S=f)||(S=s!==null&&s.memoizedState===null?!1:(Jt.current&2)!==0),S&&(m=!0,a.flags&=-129),S=(a.flags&32)!==0,a.flags&=-33,s===null){if(ct){if(m?dr(a):ur(),(s=Mt)?(s=T0(s,Ra),s=s!==null&&s.data!=="&"?s:null,s!==null&&(a.memoizedState={dehydrated:s,treeContext:ar!==null?{id:rn,overflow:ln}:null,retryLane:536870912,hydrationErrors:null},l=sb(s),l.return=a,a.child=l,Cs=a,Mt=null)):s=null,s===null)throw rr(a);return Nx(s)?a.lanes=32:a.lanes=536870912,null}var k=c.children;return c=c.fallback,m?(ur(),m=a.mode,k=yd({mode:"hidden",children:k},m),c=Jr(c,m,l,null),k.return=a,c.return=a,k.sibling=c,a.child=k,c=a.child,c.memoizedState=Vm(l),c.childLanes=Fm(s,S,l),a.memoizedState=Bm,vi(null,c)):(dr(a),Um(a,k))}var F=s.memoizedState;if(F!==null&&(k=F.dehydrated,k!==null)){if(f)a.flags&256?(dr(a),a.flags&=-257,a=$m(s,a,l)):a.memoizedState!==null?(ur(),a.child=s.child,a.flags|=128,a=null):(ur(),k=c.fallback,m=a.mode,c=yd({mode:"visible",children:c.children},m),k=Jr(k,m,l,null),k.flags|=2,c.return=a,k.return=a,c.sibling=k,a.child=c,ll(a,s.child,null,l),c=a.child,c.memoizedState=Vm(l),c.childLanes=Fm(s,S,l),a.memoizedState=Bm,a=vi(null,c));else if(dr(a),Nx(k)){if(S=k.nextSibling&&k.nextSibling.dataset,S)var te=S.dgst;S=te,c=Error(o(419)),c.stack="",c.digest=S,oi({value:c,source:null,stack:null}),a=$m(s,a,l)}else if(rs||Yl(s,a,l,!1),S=(l&s.childLanes)!==0,rs||S){if(S=Tt,S!==null&&(c=pt(S,l),c!==0&&c!==F.retryLane))throw F.retryLane=c,Wr(s,c),Xs(S,s,c),zm;jx(k)||kd(),a=$m(s,a,l)}else jx(k)?(a.flags|=192,a.child=s.child,a=null):(s=F.treeContext,Mt=Da(k.nextSibling),Cs=a,ct=!0,nr=null,Ra=!1,s!==null&&rb(a,s),a=Um(a,c.children),a.flags|=4096);return a}return m?(ur(),k=c.fallback,m=a.mode,F=s.child,te=F.sibling,c=Cn(F,{mode:"hidden",children:c.children}),c.subtreeFlags=F.subtreeFlags&65011712,te!==null?k=Cn(te,k):(k=Jr(k,m,l,null),k.flags|=2),k.return=a,c.return=a,c.sibling=k,a.child=c,vi(null,c),c=a.child,k=s.child.memoizedState,k===null?k=Vm(l):(m=k.cachePool,m!==null?(F=as._currentValue,m=m.parent!==F?{parent:F,pool:F}:m):m=ub(),k={baseLanes:k.baseLanes|l,cachePool:m}),c.memoizedState=k,c.childLanes=Fm(s,S,l),a.memoizedState=Bm,vi(s.child,c)):(dr(a),l=s.child,s=l.sibling,l=Cn(l,{mode:"visible",children:c.children}),l.return=a,l.sibling=null,s!==null&&(S=a.deletions,S===null?(a.deleti
vendor: 6,363 bytes, line 48
48ons=[s],a.flags|=16):S.push(s)),a.child=l,a.memoizedState=null,l)}function Um(s,a){return a=yd({mode:"visible",children:a},s.mode),a.return=s,s.child=a}function yd(s,a){return s=oa(22,s,null,a),s.lanes=0,s}function $m(s,a,l){return ll(a,s.child,null,l),s=Um(a,a.pendingProps.children),s.flags|=2,a.memoizedState=null,s}function Nv(s,a,l){s.lanes|=a;var c=s.alternate;c!==null&&(c.lanes|=a),rm(s.return,a,l)}function Gm(s,a,l,c,m,f){var S=s.memoizedState;S===null?s.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:c,tail:l,tailMode:m,treeForkCount:f}:(S.isBackwards=a,S.rendering=null,S.renderingStartTime=0,S.last=c,S.tail=l,S.tailMode=m,S.treeForkCount=f)}function Av(s,a,l){var c=a.pendingProps,m=c.revealOrder,f=c.tail;c=c.children;var S=Jt.current,k=(S&2)!==0;if(k?(S=S&1|2,a.flags|=128):S&=1,I(Jt,S),Rs(s,a,c,l),c=ct?li:0,!k&&s!==null&&(s.flags&128)!==0)e:for(s=a.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&Nv(s,l,a);else if(s.tag===19)Nv(s,l,a);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break e;for(;s.sibling===null;){if(s.return===null||s.return===a)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}switch(m){case"forwards":for(l=a.child,m=null;l!==null;)s=l.alternate,s!==null&&id(s)===null&&(m=l),l=l.sibling;l=m,l===null?(m=a.child,a.child=null):(m=l.sibling,l.sibling=null),Gm(a,!1,m,l,f,c);break;case"backwards":case"unstable_legacy-backwards":for(l=null,m=a.child,a.child=null;m!==null;){if(s=m.alternate,s!==null&&id(s)===null){a.child=m;break}s=m.sibling,m.sibling=l,l=m,m=s}Gm(a,!0,l,null,f,c);break;case"together":Gm(a,!1,null,null,void 0,c);break;default:a.memoizedState=null}return a.child}function On(s,a,l){if(s!==null&&(a.dependencies=s.dependencies),xr|=a.lanes,(l&a.childLanes)===0)if(s!==null){if(Yl(s,a,l,!1),(l&a.childLanes)===0)return null}else return null;if(s!==null&&a.child!==s.child)throw Error(o(153));if(a.child!==null){for(s=a.child,l=Cn(s,s.pendingProps),a.child=l,l.return=a;s.sibling!==null;)s=s.sibling,l=l.sibling=Cn(s,s.pendingProps),l.return=a;l.sibling=null}return a.child}function Km(s,a){return(s.lanes&a)!==0?!0:(s=s.dependencies,!!(s!==null&&ed(s)))}function S5(s,a,l){switch(a.tag){case 3:he(a,a.stateNode.containerInfo),lr(a,as,s.memoizedState.cache),el();break;case 27:case 5:He(a);break;case 4:he(a,a.stateNode.containerInfo);break;case 10:lr(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,gm(a),null;break;case 13:var c=a.memoizedState;if(c!==null)return c.dehydrated!==null?(dr(a),a.flags|=128,null):(l&a.child.childLanes)!==0?jv(s,a,l):(dr(a),s=On(s,a,l),s!==null?s.sibling:null);dr(a);break;case 19:var m=(s.flags&128)!==0;if(c=(l&a.childLanes)!==0,c||(Yl(s,a,l,!1),c=(l&a.childLanes)!==0),m){if(c)return Av(s,a,l);a.flags|=128}if(m=a.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),I(Jt,Jt.current),c)break;return null;case 22:return a.lanes=0,gv(s,a,l,a.pendingProps);case 24:lr(a,as,s.memoizedState.cache)}return On(s,a,l)}function Cv(s,a,l){if(s!==null)if(s.memoizedProps!==a.pendingProps)rs=!0;else{if(!Km(s,l)&&(a.flags&128)===0)return rs=!1,S5(s,a,l);rs=(s.flags&131072)!==0}else rs=!1,ct&&(a.flags&1048576)!==0&&nb(a,li,a.index);switch(a.lanes=0,a.tag){case 16:e:{var c=a.pendingProps;if(s=nl(a.elementType),a.type=s,typeof s=="function")Zp(s)?(c=il(s,c),a.tag=1,a=wv(null,a,s,c,l)):(a.tag=0,a=Im(null,a,s,c,l));else{if(s!=null){var m=s.$$typeof;if(m===D){a.tag=11,a=xv(null,a,s,c,l);break e}else if(m===O){a.tag=14,a=fv(null,a,s,c,l);break e}}throw a=q(s)||s,Error(o(306,a,""))}}return a;case 0:return Im(s,a,a.type,a.pendingProps,l);case 1:return c=a.type,m=il(c,a.pendingProps),wv(s,a,c,m,l);case 3:e:{if(he(a,a.stateNode.containerInfo),s===null)throw Error(o(387));c=a.pendingProps;var f=a.memoizedState;m=f.element,pm(s,a),xi(a,c,null,l);var S=a.memoizedState;if(c=S.cache,lr(a,as,c),c!==f.cache&&lm(a,[as],l,!0),mi(),c=S.element,f.isDehydrated)if(f={element:c,isDehydrated:!1,cache:S.cache},a.updateQueue.baseState=f,a.memoizedState=f,a.flags&256){a=Sv(s,a,c,l);break e}else if(c!==m){m=Aa(Error(o(424)),a),oi(m),a=Sv(s,a,c,l);break e}else{switch(s=a.stateNode.containerInfo,s.nodeType){case 9:s=s.body;break;default:s=s.nodeName==="HTML"?s.ownerDocument.body:s}for(Mt=Da(s.firstChild),Cs=a,ct=!0,nr=null,Ra=!0,l=gb(a,null,c,l),a.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(el(),c===m){a=On(s,a,l);break e}Rs(s,a,c,l)}a=a.child}return a;case 26:return vd(s,a),s===null?(l=L0(a.type,null,a.pendingProps,null))?a.memoizedState=l:ct||(l=a.type,s=a.pendingProps,c=Hd(me.current).createElement(l),c[Ht]=a,c[ss]=s,ks(c,l,s),be(c),a.stateNode=c):a.memoizedState=L0(a.type,s.memoizedProps,a.pendingProps,s.memoizedState),null;case 27:return He(a),s===null&&ct&&(c=a.stateNode=M0(a.type,a.pendingProps,me.current),Cs=a,Ra=!0,m=Mt,vr(a.type)?(Ax=m,Mt=Da(c.firstChild)):Mt=m),Rs(s,a,a.pendingProps.children,l),vd(s,a),s===null&&(a.flags|=4194304),a.child;case 5:return s===null&&ct&&((m=c=Mt)&&(c=W5(c,a.type,a.pendingProps,Ra),c!==null?(a.stateNode=c,Cs=a,Mt=Da(c.firstChild),Ra=!1,m=!0):m=!1),m||rr(a)),He(a),m=a.type,f=a.pendingProps,S=s!==null?s.memoizedProps:null,c=f.children,yx(m,f)?c=null:S!==null&&yx(m,S)&&(a.flags|=32),a.memoizedState!==null&&(m=vm(s,a,m5,null,null,l),Mi._currentValue=m),vd(s,a),Rs(s,a,c,l),a.child;case 6:return s===null&&ct&&((s=l=Mt)&&(l=J5(l,a.pendingProps,Ra),l!==null?(a.stateNode=l,Cs=a,Mt=null,s=!0):s=!1),s||rr(a)),null;case 13:return jv(s,a,l);case 4:return he(a,a.stateNode.containerInfo),c=a.pendingProps,s===null?a.child=ll(a,null,c,l):Rs(s,a,c,l),a.child;case 11:return xv(s,a,a.type,a.pendingProps,l);case 7:return Rs(s,a,a.pendingProps,l),a.child;case 8:return Rs(s,a,a.pendingProps.children,l),a.child;case 12:return Rs(s,a,a.pendingProps.children,l),a.child;case 10:return c=a.pendingProps,lr(a,a.type,c.value),Rs(s,a,c.children,l),a.child;case 9:return m=a.type._context,c=a.pendingProps.children,sl(a),m=Es(m),c=c(m),a.flags|=1,Rs(s,a,c,l),a.child;case 14:return fv(s,a,a.type,a.pendingProps,l);case 15:return hv(s,a,a.type,a.pendingProps,l);case 19:return Av(s,a,l);case 31:return w5(s,a,l);case 22:return gv(s,a,l,a.pendingProps);case 24:return sl(a),c=Es(as),s===null?(m=cm(),m===null&&(m=Tt,f=om(),m.pooledCache=f,f.refCount++,f!==null&&(m.pooledCacheLanes|=l),m=f),a.memoizedState={parent:c,cache:m}
vendor: 3,123 bytes, line 48
48,um(a),lr(a,as,m)):((s.lanes&l)!==0&&(pm(s,a),xi(a,null,null,l),mi()),m=s.memoizedState,f=a.memoizedState,m.parent!==c?(m={parent:c,cache:c},a.memoizedState=m,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=m),lr(a,as,c)):(c=f.cache,lr(a,as,c),c!==m.cache&&lm(a,[as],l,!0))),Rs(s,a,a.pendingProps.children,l),a.child;case 29:throw a.pendingProps}throw Error(o(156,a.tag))}function _n(s){s.flags|=4}function qm(s,a,l,c,m){if((a=(s.mode&32)!==0)&&(a=!1),a){if(s.flags|=16777216,(m&335544128)===m)if(s.stateNode.complete)s.flags|=8192;else if(Jv())s.flags|=8192;else throw rl=nd,dm}else s.flags&=-16777217}function Ev(s,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)s.flags&=-16777217;else if(s.flags|=16777216,!F0(a))if(Jv())s.flags|=8192;else throw rl=nd,dm}function wd(s,a){a!==null&&(s.flags|=4),s.flags&16384&&(a=s.tag!==22?gt():536870912,s.lanes|=a,oo|=a)}function yi(s,a){if(!ct)switch(s.tailMode){case"hidden":a=s.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?s.tail=null:l.sibling=null;break;case"collapsed":l=s.tail;for(var c=null;l!==null;)l.alternate!==null&&(c=l),l=l.sibling;c===null?a||s.tail===null?s.tail=null:s.tail.sibling=null:c.sibling=null}}function Pt(s){var a=s.alternate!==null&&s.alternate.child===s.child,l=0,c=0;if(a)for(var m=s.child;m!==null;)l|=m.lanes|m.childLanes,c|=m.subtreeFlags&65011712,c|=m.flags&65011712,m.return=s,m=m.sibling;else for(m=s.child;m!==null;)l|=m.lanes|m.childLanes,c|=m.subtreeFlags,c|=m.flags,m.return=s,m=m.sibling;return s.subtreeFlags|=c,s.childLanes=l,a}function j5(s,a,l){var c=a.pendingProps;switch(tm(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pt(a),null;case 1:return Pt(a),null;case 3:return l=a.stateNode,c=null,s!==null&&(c=s.memoizedState.cache),a.memoizedState.cache!==c&&(a.flags|=2048),kn(as),ve(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(s===null||s.child===null)&&(Ql(a)?_n(a):s===null||s.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,am())),Pt(a),null;case 26:var m=a.type,f=a.memoizedState;return s===null?(_n(a),f!==null?(Pt(a),Ev(a,f)):(Pt(a),qm(a,m,null,c,l))):f?f!==s.memoizedState?(_n(a),Pt(a),Ev(a,f)):(Pt(a),a.flags&=-16777217):(s=s.memoizedProps,s!==c&&_n(a),Pt(a),qm(a,m,s,c,l)),null;case 27:if(ze(a),l=me.current,m=a.type,s!==null&&a.stateNode!=null)s.memoizedProps!==c&&_n(a);else{if(!c){if(a.stateNode===null)throw Error(o(166));return Pt(a),null}s=G.current,Ql(a)?lb(a):(s=M0(m,c,l),a.stateNode=s,_n(a))}return Pt(a),null;case 5:if(ze(a),m=a.type,s!==null&&a.stateNode!=null)s.memoizedProps!==c&&_n(a);else{if(!c){if(a.stateNode===null)throw Error(o(166));return Pt(a),null}if(f=G.current,Ql(a))lb(a);else{var S=Hd(me.current);switch(f){case 1:f=S.createElementNS("http://www.w3.org/2000/svg",m);break;case 2:f=S.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;default:switch(m){case"svg":f=S.createElementNS("http://www.w3.org/2000/svg",m);break;case"math":f=S.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;case"script":f=S.createElement("div"),f.innerHTML="<script><\/script>
48",f=f.removeChild(f.firstChild);break;case"select":f=typeof c.is=="string"?S.createElement("select",{is:c.is}):S.createElement("select"),c.multiple?f.multiple=!0:c.size&&(f.size=c.size);break;default:f=typeof c.is=="string"?S.createElement(m,{is:c.is}):S.createElement(m)}}f[Ht]=a,f[ss]=c;e:for(S=a.child;S!==null;){if(S.tag===5||S.tag===6)f.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===a)break e;for(;S.sibling===null;){if(S.return===null||S.return===a)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}a.stateNode=f;e:switch(ks(f,m,c),m){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&_n(a)}}return Pt(a),qm(a,a.type,s===null?null:s.memoizedProps,a.pendingProps,l),null;case 6:if(s&&a.stateNode!=null)s.memoizedProps!==c&&_n(a);else{if(typeof c!="string"&&a.stateNode===null)throw Error(o(166));if(s=me.current,Ql(a)){if(s=a.stateNode,l=a.memoizedProps,c=null,m=Cs,m!==null)switch(m.tag){case 27:case 5:c=m.memoizedProps}s[Ht]=a,s=!!(s.nodeValue===l||c!==null&&c.suppressHydrationWarning===!0||j0(s.nodeValue,l)),s||rr(a,!0)}else s=Hd(s).createTextNode(c),s[Ht]=a,a.stateNode=s}return Pt(a),null;case 31:if(l=a.memoizedState,s===null||s.memoizedState!==null){if(c=Ql(a),l!==null){if(s===null){if(!c)throw Error(o(318));if(s=a.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(o(557));s[Ht]=a}else el(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Pt(a),s=!1}else l=am(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=l),s=!0;if(!s)return a.flags&256?(ca(a),a):(ca(a),null);if((a.flags&128)!==0)throw Error(o(558))}return Pt(a),null;case 13:if(c=a.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(m=Ql(a),c!==null&&c.dehydrated!==null){if(s===null){if(!m)throw Error(o(318));if(m=a.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(o(317));m[Ht]=a}else el(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Pt(a),m=!1}else m=am(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=m),m=!0;if(!m)return a.flags&256?(ca(a),a):(ca(a),null)}return ca(a),(a.flags&128)!==0?(a.lanes=l,a):(l=c!==null,s=s!==null&&s.memoizedState!==null,l&&(c=a.child,m=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(m=c.alternate.memoizedState.cachePool.pool),f=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(f=c.memoizedState.cachePool.pool),f!==m&&(c.flags|=2048)),l!==s&&l&&(a.child.flags|=8192),wd(a,a.updateQueue),Pt(a),null);case 4:return ve(),s===null&&fx(a.stateNode.containerInfo),Pt(a),null;case 10:return kn(a.type),Pt(a),null;case 19:if(L(Jt),c=a.memoizedState,c===null)return Pt(a),null;if(m=(a.flags&128)!==0,f=c.rendering,f===null)if(m)yi(c,!1);else{if(qt!==0||s!==null&&(s.flags&128)!==0)for(s=a.child;s!==null;){if(f=id(s),f!==null){for(a.flags|=128,yi(c,!1),s=f.updateQueue,a.updateQueue=s,wd(a,s),a.subtreeFlags=0,s=l,l=a.child;l!==null;)tb(l,s),l=l.sibling;return I(Jt,Jt.current&1|2),ct&&En(a,c.treeForkCount),a.child}s=s.sibling}c.tail!==null&&Gt()>Cd&&(a.flags|=128,m=!0,yi(c,!1),a.lanes=4194304)}else{if(!m)if(s=id(f),s!==null){if(a.flags|=128,m=!0,s=s.updateQueue,a.updateQueue=s,wd(a,s),yi(c,!0),c.tail===null&&c.tailMode==="hidden"&&!f.alternate&&!ct)return Pt(a),null}else 2*Gt()-c.renderingStartTime>Cd&&l!==536870912&&(a.flags|=128,m=!0,yi(c,!1),a.lanes=4194304);c.isBackwards?(f.sibling=a.child,a.child=f):(s=c.last,s!==null?s.sibling=f:a.child=f,c.last=f)}return c.tail!==null?(s=c.tail,c.rendering=s,c.tail=s.sibling,c.renderingStartTime=Gt(),s.sibling=null,l=Jt.current,I(Jt,m?l&1|2:l&1),ct&&En(a,c.treeForkCount),s):(Pt(a),null);case 22:case 23:return ca(a),hm(),c=a.memoizedState!==null,s!==null?s.memoizedState!==null!==c&&(a.flags|=8192):c&&(a.flags|=8192),c?(l&536870912)!==0&&(a.flags&128)===0&&(Pt(a),a.subtreeFlags&6&&(a.flags|=8192)):Pt(a),l=a.updateQueue,l!==null&&wd(a,l.retryQueue),l=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(l=s.memoizedState.cachePool.pool),c=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),c!==l&&(a.flags|=2048),s!==null&&L(al),null;case 24:return l=null,s!==null&&(l=s.memoizedState.cache),a.memoizedState.cache!==l&&(a.flags|=2048),kn(as),Pt(a),null;case 25:return null;case 30:return null}throw Error(o(156,a.tag))}function N5(s,a){switch(tm(a),a.tag){case 1:return s=a.flags,s&65536?(a.flags=s&-65537|128,a):null;case 3:return kn(as),ve(),s=a.flags,(s&65536)!==0&&(s&128)===0?(a.flags=s&-65537|128,a):null;case 26:case 27:case 5:return ze(a),null;case 31:if(a.memoizedState!==null){if(ca(a),a.alternate===null)throw Error(o(340));el()}return s=a.flags,s&65536?(a.flags=s&-65537|128,a):null;case 13:if(ca(a),s=a.memoizedState,s!==null&&s.dehydrated!==null){if(a.alternate===null)throw Error(o(340));el()}return s=a.flags,s&65536?(a.flags=s&-65537|128,a):null;case 19:return L(Jt),null;case 4:return ve(),null;case 10:return kn(a.type),null;case 22:case 23:return ca(a),hm(),s!==null&&L(al),s=a.flags,s&65536?(a.flags=s&-65537|128,a):null;case 24:return kn(as),null;case 25:return null;default:return null}}function Rv(s,a){switch(tm(a),a.tag){case 3:kn(as),ve();break;case 26:case 27:case 5:ze(a);break;case 4:ve();break;case 31:a.memoizedState!==null&&ca(a);break;case 13:ca(a);break;case 19:L(Jt);break;case 10:kn(a.type);break;case 22:case 23:ca(a),hm(),s!==null&&L(al);break;case 24:kn(as)}}function wi(s,a){try{var l=a.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var m=c.next;l=m;do{if((l.tag&s)===s){c=void 0;var f=l.create,S=l.inst;c=f(),S.destroy=c}l=l.next}while(l!==m)}}catch(k){Nt(a,a.return,k)}}function pr(s,a,l){try{var c=a.updateQueue,m=c!==null?c.lastEffect:null;if(m!==null){var f=m.next;c=f;do{if((c.tag&s)===s){var S=c.inst,k=S.destroy;if(k!==void 0){S.destroy=void 0,m=a;var F=l,te=k;try{te()}catch(ce){Nt(m,F,ce)}}}c=c.next}while(c!==f)}}catch(ce){Nt(a,a.return,ce)}}function kv(s){var a=s.updateQueue;if(a!==null){var l=s.stateNode;try{vb(a,l)}catch(c){Nt(s,s.return,c)}}}function Dv(s,a,l){l.props=il(s.type,s.memoizedProps),l.state=s.memoizedState;
vendor: 16,946 bytes, line 48
48try{l.componentWillUnmount()}catch(c){Nt(s,a,c)}}function Si(s,a){try{var l=s.ref;if(l!==null){switch(s.tag){case 26:case 27:case 5:var c=s.stateNode;break;case 30:c=s.stateNode;break;default:c=s.stateNode}typeof l=="function"?s.refCleanup=l(c):l.current=c}}catch(m){Nt(s,a,m)}}function on(s,a){var l=s.ref,c=s.refCleanup;if(l!==null)if(typeof c=="function")try{c()}catch(m){Nt(s,a,m)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(m){Nt(s,a,m)}else l.current=null}function Tv(s){var a=s.type,l=s.memoizedProps,c=s.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":l.autoFocus&&c.focus();break e;case"img":l.src?c.src=l.src:l.srcSet&&(c.srcset=l.srcSet)}}catch(m){Nt(s,s.return,m)}}function Qm(s,a,l){try{var c=s.stateNode;K5(c,s.type,l,a),c[ss]=a}catch(m){Nt(s,s.return,m)}}function Ov(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&vr(s.type)||s.tag===4}function Ym(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||Ov(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&vr(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function Xm(s,a,l){var c=s.tag;if(c===5||c===6)s=s.stateNode,a?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(s,a):(a=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,a.appendChild(s),l=l._reactRootContainer,l!=null||a.onclick!==null||(a.onclick=Nn));else if(c!==4&&(c===27&&vr(s.type)&&(l=s.stateNode,a=null),s=s.child,s!==null))for(Xm(s,a,l),s=s.sibling;s!==null;)Xm(s,a,l),s=s.sibling}function Sd(s,a,l){var c=s.tag;if(c===5||c===6)s=s.stateNode,a?l.insertBefore(s,a):l.appendChild(s);else if(c!==4&&(c===27&&vr(s.type)&&(l=s.stateNode),s=s.child,s!==null))for(Sd(s,a,l),s=s.sibling;s!==null;)Sd(s,a,l),s=s.sibling}function _v(s){var a=s.stateNode,l=s.memoizedProps;try{for(var c=s.type,m=a.attributes;m.length;)a.removeAttributeNode(m[0]);ks(a,c,l),a[Ht]=s,a[ss]=l}catch(f){Nt(s,s.return,f)}}var Mn=!1,ls=!1,Zm=!1,Mv=typeof WeakSet=="function"?WeakSet:Set,js=null;function A5(s,a){if(s=s.containerInfo,bx=Ud,s=Kg(s),$p(s)){if("selectionStart"in s)var l={start:s.selectionStart,end:s.selectionEnd};else e:{l=(l=s.ownerDocument)&&l.defaultView||window;var c=l.getSelection&&l.getSelection();if(c&&c.rangeCount!==0){l=c.anchorNode;var m=c.anchorOffset,f=c.focusNode;c=c.focusOffset;try{l.nodeType,f.nodeType}catch{l=null;break e}var S=0,k=-1,F=-1,te=0,ce=0,pe=s,ae=null;t:for(;;){for(var oe;pe!==l||m!==0&&pe.nodeType!==3||(k=S+m),pe!==f||c!==0&&pe.nodeType!==3||(F=S+c),pe.nodeType===3&&(S+=pe.nodeValue.length),(oe=pe.firstChild)!==null;)ae=pe,pe=oe;for(;;){if(pe===s)break t;if(ae===l&&++te===m&&(k=S),ae===f&&++ce===c&&(F=S),(oe=pe.nextSibling)!==null)break;pe=ae,ae=pe.parentNode}pe=oe}l=k===-1||F===-1?null:{start:k,end:F}}else l=null}l=l||{start:0,end:0}}else l=null;for(vx={focusedElem:s,selectionRange:l},Ud=!1,js=a;js!==null;)if(a=js,s=a.child,(a.subtreeFlags&1028)!==0&&s!==null)s.return=a,js=s;else for(;js!==null;){switch(a=js,f=a.alternate,s=a.flags,a.tag){case 0:if((s&4)!==0&&(s=a.updateQueue,s=s!==null?s.events:null,s!==null))for(l=0;l<s.length;l++)m=s[l],m.ref.impl=m.nextImpl;break;case 11:case 15:break;case 1:if((s&1024)!==0&&f!==null){s=void 0,l=a,m=f.memoizedProps,f=f.memoizedState,c=l.stateNode;try{var Ce=il(l.type,m);s=c.getSnapshotBeforeUpdate(Ce,f),c.__reactInternalSnapshotBeforeUpdate=s}catch(Le){Nt(l,l.return,Le)}}break;case 3:if((s&1024)!==0){if(s=a.stateNode.containerInfo,l=s.nodeType,l===9)Sx(s);else if(l===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":Sx(s);break;default:s.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((s&1024)!==0)throw Error(o(163))}if(s=a.sibling,s!==null){s.return=a.return,js=s;break}js=a.return}}function Pv(s,a,l){var c=l.flags;switch(l.tag){case 0:case 11:case 15:Hn(s,l),c&4&&wi(5,l);break;case 1:if(Hn(s,l),c&4)if(s=l.stateNode,a===null)try{s.componentDidMount()}catch(S){Nt(l,l.return,S)}else{var m=il(l.type,a.memoizedProps);a=a.memoizedState;try{s.componentDidUpdate(m,a,s.__reactInternalSnapshotBeforeUpdate)}catch(S){Nt(l,l.return,S)}}c&64&&kv(l),c&512&&Si(l,l.return);break;case 3:if(Hn(s,l),c&64&&(s=l.updateQueue,s!==null)){if(a=null,l.child!==null)switch(l.child.tag){case 27:case 5:a=l.child.stateNode;break;case 1:a=l.child.stateNode}try{vb(s,a)}catch(S){Nt(l,l.return,S)}}break;case 27:a===null&&c&4&&_v(l);case 26:case 5:Hn(s,l),a===null&&c&4&&Tv(l),c&512&&Si(l,l.return);break;case 12:Hn(s,l);break;case 31:Hn(s,l),c&4&&zv(s,l);break;case 13:Hn(s,l),c&4&&Iv(s,l),c&64&&(s=l.memoizedState,s!==null&&(s=s.dehydrated,s!==null&&(l=M5.bind(null,l),eA(s,l))));break;case 22:if(c=l.memoizedState!==null||Mn,!c){a=a!==null&&a.memoizedState!==null||ls,m=Mn;var f=ls;Mn=c,(ls=a)&&!f?Ln(s,l,(l.subtreeFlags&8772)!==0):Hn(s,l),Mn=m,ls=f}break;case 30:break;default:Hn(s,l)}}function Hv(s){var a=s.alternate;a!==null&&(s.alternate=null,Hv(a)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(a=s.stateNode,a!==null&&Hl(a)),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}var Lt=null,Ks=!1;function Pn(s,a,l){for(l=l.child;l!==null;)Lv(s,a,l),l=l.sibling}function Lv(s,a,l){if(us&&typeof us.onCommitFiberUnmount=="function")try{us.onCommitFiberUnmount(va,l)}catch{}switch(l.tag){case 26:ls||on(l,a),Pn(s,a,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:ls||on(l,a);var c=Lt,m=Ks;vr(l.type)&&(Lt=l.stateNode,Ks=!1),Pn(s,a,l),Ti(l.stateNode),Lt=c,Ks=m;break;case 5:ls||on(l,a);case 6:if(c=Lt,m=Ks,Lt=null,Pn(s,a,l),Lt=c,Ks=m,Lt!==null)if(Ks)try{(Lt.nodeType===9?Lt.body:Lt.nodeName==="HTML"?Lt.ownerDocument.body:Lt).removeChild(l.stateNode)}catch(f){Nt(l,a,f)}else try{Lt.removeChild(l.stateNode)}catch(f){Nt(l,a,f)}break;case 18:Lt!==null&&(Ks?(s=Lt,k0(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,l.stateNode),ho(s)):k0(Lt,l.stateNode));break;case 4:c=Lt,m=Ks,Lt=l.stateNode.containerInfo,Ks=!0,Pn(s,a,l),Lt=c,Ks=m;break;case 0:case 11:case 14:case 15:pr(2,l,a),ls||pr(4,l,a),Pn(s,a,l);break;case 1:ls||(on(l,a),c=l.stateNode,typeof c.componentWillUnmount=="function"&&Dv(l,a,c)),Pn(s,a,l);break;case 21:Pn(s,a,l);break;case 22:ls=(c=ls)||l.memoizedState!==null,Pn(s,a,l),ls=c;break;default:Pn(s,a,l)}}function zv(s,a){if(a.memoizedState===null&&(s=a.alternate,s!==null&&(s=s.memoizedState,s!==null))){s=s.dehydrated;try{ho(s)}catch(l){Nt(a,a.return,l)}}}function Iv(s,a){if(a.memoizedState===null&&(s=a.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{ho(s)}catch(l){Nt(a,a.return,l)}}function C5(s){switch(s.tag){case 31:case 13:case 19:var a=s.stateNode;return a===null&&(a=s.stateNode=new Mv),a;case 22:return s=s.stateNode,a=s._retryCache,a===null&&(a=s._retryCache=new Mv),a;default:throw Error(o(435,s.tag))}}function jd(s,a){var l=C5(s);a.forEach(function(c){if(!l.has(c)){l.add(c);var m=P5.bind(null,s,c);c.then(m,m)}})}function qs(s,a){var l=a.deletions;if(l!==null)for(var c=0;c<l.length;c++){var m=l[c],f=s,S=a,k=S;e:for(;k!==null;){switch(k.tag){case 27:if(vr(k.type)){Lt=k.stateNode,Ks=!1;break e}break;case 5:Lt=k.stateNode,Ks=!1;break e;case 3:case 4:Lt=k.stateNode.containerInfo,Ks=!0;break e}k=k.return}if(Lt===null)throw Error(o(160));Lv(f,S,m),Lt=null,Ks=!1,f=m.alternate,f!==null&&(f.return=null),m.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)Bv(a,s),a=a.sibling}var $a=null;function Bv(s,a){var l=s.alternate,c=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:qs(a,s),Qs(s),c&4&&(pr(3,s,s.return),wi(3,s),pr(5,s,s.return));break;case 1:qs(a,s),Qs(s),c&512&&(ls||l===null||on(l,l.return)),c&64&&Mn&&(s=s.updateQueue,s!==null&&(c=s.callbacks,c!==null&&(l=s.shared.hiddenCallbacks,s.shared.hiddenCallbacks=l===null?c:l.concat(c))));break;case 26:var m=$a;if(qs(a,s),Qs(s),c&512&&(ls||l===null||on(l,l.return)),c&4){var f=l!==null?l.memoizedState:null;if(c=s.memoizedState,l===null)if(c===null)if(s.stateNode===null){e:{c=s.type,l=s.memoizedProps,m=m.ownerDocument||m;t:switch(c){case"title":f=m.getElementsByTagName("title")[0],(!f||f[Jn]||f[Ht]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=m.createElement(c),m.head.insertBefore(f,m.querySelector("head > title"))),ks(f,c,l),f[Ht]=s,be(f),c=f;break e;case"link":var S=B0("link","href",m).get(c+(l.href||""));if(S){for(var k=0;k<S.length;k++)if(f=S[k],f.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&f.getAttribute("rel")===(l.rel==null?null:l.rel)&&f.getAttribute("title")===(l.title==null?null:l.title)&&f.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){S.splice(k,1);break t}}f=m.createElement(c),ks(f,c,l),m.head.appendChild(f);break;case"meta":if(S=B0("meta","content",m).get(c+(l.content||""))){for(k=0;k<S.length;k++)if(f=S[k],f.getAttribute("content")===(l.content==null?null:""+l.content)&&f.getAttribute("name")===(l.name==null?null:l.name)&&f.getAttribute("property")===(l.property==null?null:l.property)&&f.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&f.getAttribute("charset")===(l.charSet==null?null:l.charSet)){S.splice(k,1);break t}}f=m.createElement(c),ks(f,c,l),m.head.appendChild(f);break;default:throw Error(o(468,c))}f[Ht]=s,be(f),c=f}s.stateNode=c}else V0(m,s.type,s.stateNode);else s.stateNode=I0(m,c,s.memoizedProps);else f!==c?(f===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):f.count--,c===null?V0(m,s.type,s.stateNode):I0(m,c,s.memoizedProps)):c===null&&s.stateNode!==null&&Qm(s,s.memoizedProps,l.memoizedProps)}break;case 27:qs(a,s),Qs(s),c&512&&(ls||l===null||on(l,l.return)),l!==null&&c&4&&Qm(s,s.memoizedProps,l.memoizedProps);break;case 5:if(qs(a,s),Qs(s),c&512&&(ls||l===null||on(l,l.return)),s.flags&32){m=s.stateNode;try{zl(m,"")}catch(Ce){Nt(s,s.return,Ce)}}c&4&&s.stateNode!=null&&(m=s.memoizedProps,Qm(s,m,l!==null?l.memoizedProps:m)),c&1024&&(Zm=!0);break;case 6:if(qs(a,s),Qs(s),c&4){if(s.stateNode===null)throw Error(o(162));c=s.memoizedProps,l=s.stateNode;try{l.nodeValue=c}catch(Ce){Nt(s,s.return,Ce)}}break;case 3:if(Id=null,m=$a,$a=Ld(a.containerInfo),qs(a,s),$a=m,Qs(s),c&4&&l!==null&&l.memoizedState.isDehydrated)try{ho(a.containerInfo)}catch(Ce){Nt(s,s.return,Ce)}Zm&&(Zm=!1,Vv(s));break;case 4:c=$a,$a=Ld(s.stateNode.containerInfo),qs(a,s),Qs(s),$a=c;break;case 12:qs(a,s),Qs(s);break;case 31:qs(a,s),Qs(s),c&4&&(c=s.updateQueue,c!==null&&(s.updateQueue=null,jd(s,c)));break;case 13:qs(a,s),Qs(s),s.child.flags&8192&&s.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Ad=Gt()),c&4&&(c=s.updateQueue,c!==null&&(s.updateQueue=null,jd(s,c)));break;case 22:m=s.memoizedState!==null;var F=l!==null&&l.memoizedState!==null,te=Mn,ce=ls;if(Mn=te||m,ls=ce||F,qs(a,s),ls=ce,Mn=te,Qs(s),c&8192)e:for(a=s.stateNode,a._visibility=m?a._visibility&-2:a._visibility|1,m&&(l===null||F||Mn||ls||cl(s)),l=null,a=s;;){if(a.tag===5||a.tag===26){if(l===null){F=l=a;try{if(f=F.stateNode,m)S=f.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none";else{k=F.stateNode;var pe=F.memoizedProps.style,ae=pe!=null&&pe.hasOwnProperty("display")?pe.display:null;k.style.display=ae==null||typeof ae=="boolean"?"":(""+ae).trim()}}catch(Ce){Nt(F,F.return,Ce)}}}else if(a.tag===6){if(l===null){F=a;try{F.stateNode.nodeValue=m?"":F.memoizedProps}catch(Ce){Nt(F,F.return,Ce)}}}else if(a.tag===18){if(l===null){F=a;try{var oe=F.stateNode;m?D0(oe,!0):D0(F.stateNode,!1)}catch(Ce){Nt(F,F.return,Ce)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===s)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===s)break e;for(;a.sibling===null;){if(a.return===null||a.return===s)break e;l===a&&(l=null),a=a.return}l===a&&(l=null),a.sibling.return=a.return,a=a.sibling}c&4&&(c=s.updateQueue,c!==null&&(l=c.retryQueue,l!==null&&(c.retryQueue=null,jd(s,l))));break;case 19:qs(a,s),Qs(s),c&4&&(c=s.updateQueue,c!==null&&(s.updateQueue=null,jd(s,c)));break;case 30:break;case 21:break;default:qs(a,s),Qs(s)}}function Qs(s){var a=s.flags;if(a&2){try{for(var l,c=s.return;c!==null;){if(Ov(c)){l=c;break}c=c.return}if(l==null)throw Error(o(160));switch(l.tag){case 27:var m=l.stateNode,f=Ym(s);Sd(s,f,m);break;case 5:var S=l.stateNode;l.flags&32&&(zl(S,""),l.flags&=-33);var k=Ym(s);Sd(s,k,S);break;case 3:case 4:var F=l.stateNode.containerInfo,te=Ym(s);Xm(s,te,F);break;default:throw Error(o(161))}}catch(ce){Nt(s,s.return,ce)}s.flags&=-3}a&4096&&(s.flags&=-4097)}function Vv(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var a=s;Vv(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),s=s.sibling}}function Hn(s,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)Pv(s,a.alternate,a),a=a.sibling}function cl(s){for(s=s.child;s!==null;){var a=s;switch(a.tag){case 0:case 11:case 14:case 15:pr(4,a,a.return),cl(a);break;case 1:on(a,a.return);var l=a.stateNode;typeof l.componentWillUnmount=="function"&&Dv(a,a.return,l),cl(a);break;case 27:Ti(a.stateNode);case 26:case 5:on(a,a.return),cl(a);break;case 22:a.memoizedState===null&&cl(a);break;case 30:cl(a);break;default:cl(a)}s=s.sibling}}function Ln(s,a,l){for(l=l&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var c=a.alternate,m=s,f=a,S=f.flags;switch(f.tag){case 0:case 11:case 15:Ln(m,f,l),wi(4,f);break;case 1:if(Ln(m,f,l),c=f,m=c.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(te){Nt(c,c.return,te)}if(c=f,m=c.updateQueue,m!==null){var k=c.stateNode;try{var F=m.shared.hiddenCallbacks;if(F!==null)for(m.shared.hiddenCallbacks=null,m=0;m<F.length;m++)bb(F[m],k)}catch(te){Nt(c,c.return,te)}}l&&S&64&&kv(f),Si(f,f.return);break;case 27:_v(f);case 26:case 5:Ln(m,f,l),l&&c===null&&S&4&&Tv(f),Si(f,f.return);break;case 12:Ln(m,f,l);break;case 31:Ln(m,f,l),l&&S&4&&zv(m,f);break;case 13:Ln(m,f,l),l&&S&4&&Iv(m,f);break;case 22:f.memoizedState===null&&Ln(m,f,l),Si(f,f.return);break;case 30:break;default:Ln(m,f,l)}a=a.sibling}}function Wm(s,a){var l=null;s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(l=s.memoizedState.cachePool.pool),s=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(s=a.memoizedState.cachePool.pool),s!==l&&(s!=null&&s.refCount++,l!=null&&ii(l))}function Jm(s,a){s=null,a.alternate!==null&&(s=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==s&&(a.refCount++,s!=null&&ii(s))}function Ga(s,a,l,c){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)Fv(s,a,l,c),a=a.sibling}function Fv(s,a,l,c){var m=a.flags;switch(a.tag){case 0:case 11:case 15:Ga(s,a,l,c),m&2048&&wi(9,a);break;case 1:Ga(s,a,l,c);break;case 3:Ga(s,a,l,c),m&2048&&(s=null,a.alternate!==null&&(s=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==s&&(a.refCount++,s!=null&&ii(s)));break;case 12:if(m&2048){Ga(s,a,l,c),s=a.stateNode;try{var f=a.memoizedProps,S=f.id,k=f.onPostCommit;typeof k=="function"&&k(S,a.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(F){Nt(a,a.return,F)}}else Ga(s,a,l,c);break;case 31:Ga(s,a,l,c);break;case 13:Ga(s,a,l,c);break;case 23:break;case 22:f=a.stateNode,S=a.alternate,a.memoizedState!==null?f._visibility&2?Ga(s,a,l,c):ji(s,a):f._visibility&2?Ga(s,a,l,c):(f._visibility|=2,no(s,a,l,c,(a.subtreeFlags&10256)!==0||!1)),m&2048&&Wm(S,a);break;case 24:Ga(s,a,l,c),m&2048&&Jm(a.alternate,a);break;default:Ga(s,a,l,c)}}function no(s,a,l,c,m){for(m=m&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var f=s,S=a,k=l,F=c,te=S.flags;switch(S.tag){case 0:case 11:case 15:no(f,S,k,F,m),wi(8,S);break;case 23:break;case 22:var ce=S.stateNode;S.memoizedState!==null?ce._visibility&2?no(f,S,k,F,m):ji(f,S):(ce._visibility|=2,no(f,S,k,F,m)),m&&te&2048&&Wm(S.alternate,S);break;case 24:no(f,S,k,F,m),m&&te&2048&&Jm(S.alternate,S);break;default:no(f,S,k,F,m)}a=a.sibling}}function ji(s,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var l=s,c=a,m=c.flags;switch(c.tag){case 22:ji(l,c),m&2048&&Wm(c.alternate,c);break;case 24:ji(l,c),m&2048&&Jm(c.alternate,c);break;default:ji(l,c)}a=a.sibling}}var Ni=8192;function ro(s,a,l){if(s.subtreeFlags&Ni)for(s=s.child;s!==null;)Uv(s,a,l),s=s.sibling}function Uv(s,a,l){switch(s.tag){case 26:ro(s,a,l),s.flags&Ni&&s.memoizedState!==null&&pA(l,$a,s.memoizedState,s.memoizedProps);break;case 5:ro(s,a,l);break;case 3:case 4:var c=$a;$a=Ld(s.stateNode.containerInfo),ro(s,a,l),$a=c;break;case 22:s.memoizedState===null&&(c=s.alternate,c!==null&&c.memoizedState!==null?(c=Ni,Ni=16777216,ro(s,a,l),Ni=c):ro(s,a,l));break;default:ro(s,a,l)}}function $v(s){var a=s.alternate;if(a!==null&&(s=a.child,s!==null)){a.child=null;do a=s.sibling,s.sibling=null,s=a;while(s!==null)}}function Ai(s){var a=s.deletions;if((s.flags&16)!==0){if(a!==null)for(var l=0;l<a.length;l++){var c=a[l];
vendor: 18,425 bytes, line 48
48js=c,Kv(c,s)}$v(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)Gv(s),s=s.sibling}function Gv(s){switch(s.tag){case 0:case 11:case 15:Ai(s),s.flags&2048&&pr(9,s,s.return);break;case 3:Ai(s);break;case 12:Ai(s);break;case 22:var a=s.stateNode;s.memoizedState!==null&&a._visibility&2&&(s.return===null||s.return.tag!==13)?(a._visibility&=-3,Nd(s)):Ai(s);break;default:Ai(s)}}function Nd(s){var a=s.deletions;if((s.flags&16)!==0){if(a!==null)for(var l=0;l<a.length;l++){var c=a[l];js=c,Kv(c,s)}$v(s)}for(s=s.child;s!==null;){switch(a=s,a.tag){case 0:case 11:case 15:pr(8,a,a.return),Nd(a);break;case 22:l=a.stateNode,l._visibility&2&&(l._visibility&=-3,Nd(a));break;default:Nd(a)}s=s.sibling}}function Kv(s,a){for(;js!==null;){var l=js;switch(l.tag){case 0:case 11:case 15:pr(8,l,a);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var c=l.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:ii(l.memoizedState.cache)}if(c=l.child,c!==null)c.return=l,js=c;else e:for(l=s;js!==null;){c=js;var m=c.sibling,f=c.return;if(Hv(c),c===l){js=null;break e}if(m!==null){m.return=f,js=m;break e}js=f}}}var E5={getCacheForType:function(s){var a=Es(as),l=a.data.get(s);return l===void 0&&(l=s(),a.data.set(s,l)),l},cacheSignal:function(){return Es(as).controller.signal}},R5=typeof WeakMap=="function"?WeakMap:Map,vt=0,Tt=null,Je=null,nt=0,jt=0,da=null,mr=!1,lo=!1,ex=!1,zn=0,qt=0,xr=0,dl=0,tx=0,ua=0,oo=0,Ci=null,Ys=null,sx=!1,Ad=0,qv=0,Cd=1/0,Ed=null,fr=null,ms=0,hr=null,io=null,In=0,ax=0,nx=null,Qv=null,Ei=0,rx=null;function pa(){return(vt&2)!==0&&nt!==0?nt&-nt:R.T!==null?ux():nn()}function Yv(){if(ua===0)if((nt&536870912)===0||ct){var s=st;st<<=1,(st&3932160)===0&&(st=262144),ua=s}else ua=536870912;return s=ia.current,s!==null&&(s.flags|=32),ua}function Xs(s,a,l){(s===Tt&&(jt===2||jt===9)||s.cancelPendingCommit!==null)&&(co(s,0),gr(s,nt,ua,!1)),at(s,l),((vt&2)===0||s!==Tt)&&(s===Tt&&((vt&2)===0&&(dl|=l),qt===4&&gr(s,nt,ua,!1)),cn(s))}function Xv(s,a,l){if((vt&6)!==0)throw Error(o(327));var c=!l&&(a&127)===0&&(a&s.expiredLanes)===0||Fe(s,a),m=c?T5(s,a):ox(s,a,!0),f=c;do{if(m===0){lo&&!c&&gr(s,a,0,!1);break}else{if(l=s.current.alternate,f&&!k5(l)){m=ox(s,a,!1),f=!1;continue}if(m===2){if(f=a,s.errorRecoveryDisabledLanes&f)var S=0;else S=s.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){a=S;e:{var k=s;m=Ci;var F=k.current.memoizedState.isDehydrated;if(F&&(co(k,S).flags|=256),S=ox(k,S,!1),S!==2){if(ex&&!F){k.errorRecoveryDisabledLanes|=f,dl|=f,m=4;break e}f=Ys,Ys=m,f!==null&&(Ys===null?Ys=f:Ys.push.apply(Ys,f))}m=S}if(f=!1,m!==2)continue}}if(m===1){co(s,0),gr(s,a,0,!0);break}e:{switch(c=s,f=m,f){case 0:case 1:throw Error(o(345));case 4:if((a&4194048)!==a)break;case 6:gr(c,a,ua,!mr);break e;case 2:Ys=null;break;case 3:case 5:break;default:throw Error(o(329))}if((a&62914560)===a&&(m=Ad+300-Gt(),10<m)){if(gr(c,a,ua,!mr),Ae(c,0,!0)!==0)break e;In=a,c.timeoutHandle=E0(Zv.bind(null,c,l,Ys,Ed,sx,a,ua,dl,oo,mr,f,"Throttled",-0,0),m);break e}Zv(c,l,Ys,Ed,sx,a,ua,dl,oo,mr,f,null,-0,0)}}break}while(!0);cn(s)}function Zv(s,a,l,c,m,f,S,k,F,te,ce,pe,ae,oe){if(s.timeoutHandle=-1,pe=a.subtreeFlags,pe&8192||(pe&16785408)===16785408){pe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Nn},Uv(a,f,pe);var Ce=(f&62914560)===f?Ad-Gt():(f&4194048)===f?qv-Gt():0;if(Ce=mA(pe,Ce),Ce!==null){In=f,s.cancelPendingCommit=Ce(r0.bind(null,s,a,f,l,c,m,S,k,F,ce,pe,null,ae,oe)),gr(s,f,S,!te);return}}r0(s,a,f,l,c,m,S,k,F)}function k5(s){for(var a=s;;){var l=a.tag;if((l===0||l===11||l===15)&&a.flags&16384&&(l=a.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var c=0;c<l.length;c++){var m=l[c],f=m.getSnapshot;m=m.value;try{if(!la(f(),m))return!1}catch{return!1}}if(l=a.child,a.subtreeFlags&16384&&l!==null)l.return=a,a=l;else{if(a===s)break;for(;a.sibling===null;){if(a.return===null||a.return===s)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function gr(s,a,l,c){a&=~tx,a&=~dl,s.suspendedLanes|=a,s.pingedLanes&=~a,c&&(s.warmLanes|=a),c=s.expirationTimes;for(var m=a;0<m;){var f=31-Wt(m),S=1<<f;c[f]=-1,m&=~S}l!==0&&Us(s,l,a)}function Rd(){return(vt&6)===0?(Ri(0),!1):!0}function lx(){if(Je!==null){if(jt===0)var s=Je.return;else s=Je,Rn=tl=null,Sm(s),Jl=null,di=0,s=Je;for(;s!==null;)Rv(s.alternate,s),s=s.return;Je=null}}function co(s,a){var l=s.timeoutHandle;l!==-1&&(s.timeoutHandle=-1,Y5(l)),l=s.cancelPendingCommit,l!==null&&(s.cancelPendingCommit=null,l()),In=0,lx(),Tt=s,Je=l=Cn(s.current,null),nt=a,jt=0,da=null,mr=!1,lo=Fe(s,a),ex=!1,oo=ua=tx=dl=xr=qt=0,Ys=Ci=null,sx=!1,(a&8)!==0&&(a|=a&32);var c=s.entangledLanes;if(c!==0)for(s=s.entanglements,c&=a;0<c;){var m=31-Wt(c),f=1<<m;a|=s[m],c&=~f}return zn=a,Yc(),l}function Wv(s,a){Ge=null,R.H=bi,a===Wl||a===ad?(a=xb(),jt=3):a===dm?(a=xb(),jt=4):jt=a===zm?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,da=a,Je===null&&(qt=1,gd(s,Aa(a,s.current)))}function Jv(){var s=ia.current;return s===null?!0:(nt&4194048)===nt?ka===null:(nt&62914560)===nt||(nt&536870912)!==0?s===ka:!1}function e0(){var s=R.H;return R.H=bi,s===null?bi:s}function t0(){var s=R.A;return R.A=E5,s}function kd(){qt=4,mr||(nt&4194048)!==nt&&ia.current!==null||(lo=!0),(xr&134217727)===0&&(dl&134217727)===0||Tt===null||gr(Tt,nt,ua,!1)}function ox(s,a,l){var c=vt;vt|=2;var m=e0(),f=t0();(Tt!==s||nt!==a)&&(Ed=null,co(s,a)),a=!1;var S=qt;e:do try{if(jt!==0&&Je!==null){var k=Je,F=da;switch(jt){case 8:lx(),S=6;break e;case 3:case 2:case 9:case 6:ia.current===null&&(a=!0);var te=jt;if(jt=0,da=null,uo(s,k,F,te),l&&lo){S=0;break e}break;default:te=jt,jt=0,da=null,uo(s,k,F,te)}}D5(),S=qt;break}catch(ce){Wv(s,ce)}while(!0);return a&&s.shellSuspendCounter++,Rn=tl=null,vt=c,R.H=m,R.A=f,Je===null&&(Tt=null,nt=0,Yc()),S}function D5(){for(;Je!==null;)s0(Je)}function T5(s,a){var l=vt;vt|=2;var c=e0(),m=t0();Tt!==s||nt!==a?(Ed=null,Cd=Gt()+500,co(s,a)):lo=Fe(s,a);e:do try{if(jt!==0&&Je!==null){a=Je;var f=da;t:switch(jt){case 1:jt=0,da=null,uo(s,a,f,1);break;case 2:case 9:if(pb(f)){jt=0,da=null,a0(a);break}a=function(){jt!==2&&jt!==9||Tt!==s||(jt=7),cn(s)},f.then(a,a);break e;case 3:jt=7;break e;case 4:jt=5;break e;case 7:pb(f)?(jt=0,da=null,a0(a)):(jt=0,da=null,uo(s,a,f,7));break;case 5:var S=null;switch(Je.tag){case 26:S=Je.memoizedState;case 5:case 27:var k=Je;if(S?F0(S):k.stateNode.complete){jt=0,da=null;var F=k.sibling;if(F!==null)Je=F;else{var te=k.return;te!==null?(Je=te,Dd(te)):Je=null}break t}}jt=0,da=null,uo(s,a,f,5);break;case 6:jt=0,da=null,uo(s,a,f,6);break;case 8:lx(),qt=6;break e;default:throw Error(o(462))}}O5();break}catch(ce){Wv(s,ce)}while(!0);return Rn=tl=null,R.H=c,R.A=m,vt=l,Je!==null?0:(Tt=null,nt=0,Yc(),qt)}function O5(){for(;Je!==null&&!$t();)s0(Je)}function s0(s){var a=Cv(s.alternate,s,zn);s.memoizedProps=s.pendingProps,a===null?Dd(s):Je=a}function a0(s){var a=s,l=a.alternate;switch(a.tag){case 15:case 0:a=yv(l,a,a.pendingProps,a.type,void 0,nt);break;case 11:a=yv(l,a,a.pendingProps,a.type.render,a.ref,nt);break;case 5:Sm(a);default:Rv(l,a),a=Je=tb(a,zn),a=Cv(l,a,zn)}s.memoizedProps=s.pendingProps,a===null?Dd(s):Je=a}function uo(s,a,l,c){Rn=tl=null,Sm(a),Jl=null,di=0;var m=a.return;try{if(y5(s,m,a,l,nt)){qt=1,gd(s,Aa(l,s.current)),Je=null;return}}catch(f){if(m!==null)throw Je=m,f;qt=1,gd(s,Aa(l,s.current)),Je=null;return}a.flags&32768?(ct||c===1?s=!0:lo||(nt&536870912)!==0?s=!1:(mr=s=!0,(c===2||c===9||c===3||c===6)&&(c=ia.current,c!==null&&c.tag===13&&(c.flags|=16384))),n0(a,s)):Dd(a)}function Dd(s){var a=s;do{if((a.flags&32768)!==0){n0(a,mr);return}s=a.return;var l=j5(a.alternate,a,zn);if(l!==null){Je=l;return}if(a=a.sibling,a!==null){Je=a;return}Je=a=s}while(a!==null);qt===0&&(qt=5)}function n0(s,a){do{var l=N5(s.alternate,s);if(l!==null){l.flags&=32767,Je=l;return}if(l=s.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!a&&(s=s.sibling,s!==null)){Je=s;return}Je=s=l}while(s!==null);qt=6,Je=null}function r0(s,a,l,c,m,f,S,k,F){s.cancelPendingCommit=null;do Td();while(ms!==0);if((vt&6)!==0)throw Error(o(327));if(a!==null){if(a===s.current)throw Error(o(177));if(f=a.lanes|a.childLanes,f|=Yp,Ct(s,l,f,S,k,F),s===Tt&&(Je=Tt=null,nt=0),io=a,hr=s,In=l,ax=f,nx=m,Qv=c,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(s.callbackNode=null,s.callbackPriority=0,H5(Hs,function(){return d0(),null})):(s.callbackNode=null,s.callbackPriority=0),c=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||c){c=R.T,R.T=null,m=P.p,P.p=2,S=vt,vt|=4;try{A5(s,a,l)}finally{vt=S,P.p=m,R.T=c}}ms=1,l0(),o0(),i0()}}function l0(){if(ms===1){ms=0;var s=hr,a=io,l=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||l){l=R.T,R.T=null;var c=P.p;P.p=2;var m=vt;vt|=4;try{Bv(a,s);var f=vx,S=Kg(s.containerInfo),k=f.focusedElem,F=f.selectionRange;if(S!==k&&k&&k.ownerDocument&&Gg(k.ownerDocument.documentElement,k)){if(F!==null&&$p(k)){var te=F.start,ce=F.end;if(ce===void 0&&(ce=te),"selectionStart"in k)k.selectionStart=te,k.selectionEnd=Math.min(ce,k.value.length);else{var pe=k.ownerDocument||document,ae=pe&&pe.defaultView||window;if(ae.getSelection){var oe=ae.getSelection(),Ce=k.textContent.length,Le=Math.min(F.start,Ce),kt=F.end===void 0?Le:Math.min(F.end,Ce);!oe.extend&&Le>kt&&(S=kt,kt=Le,Le=S);var Y=$g(k,Le),$=$g(k,kt);if(Y&&$&&(oe.rangeCount!==1||oe.anchorNode!==Y.node||oe.anchorOffset!==Y.offset||oe.focusNode!==$.node||oe.focusOffset!==$.offset)){var ee=pe.createRange();ee.setStart(Y.node,Y.offset),oe.removeAllRanges(),Le>kt?(oe.addRange(ee),oe.extend($.node,$.offset)):(ee.setEnd($.node,$.offset),oe.addRange(ee))}}}}for(pe=[],oe=k;oe=oe.parentNode;)oe.nodeType===1&&pe.push({element:oe,left:oe.scrollLeft,top:oe.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;k<pe.length;k++){var de=pe[k];de.element.scrollLeft=de.left,de.element.scrollTop=de.top}}Ud=!!bx,vx=bx=null}finally{vt=m,P.p=c,R.T=l}}s.current=a,ms=2}}function o0(){if(ms===2){ms=0;var s=hr,a=io,l=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||l){l=R.T,R.T=null;var c=P.p;P.p=2;var m=vt;vt|=4;try{Pv(s,a.alternate,a)}finally{vt=m,P.p=c,R.T=l}}ms=3}}function i0(){if(ms===4||ms===3){ms=0,ys();var s=hr,a=io,l=In,c=Qv;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?ms=5:(ms=0,io=hr=null,c0(s,s.pendingLanes));var m=s.pendingLanes;if(m===0&&(fr=null),ps(l),a=a.stateNode,us&&typeof us.onCommitFiberRoot=="function")try{us.onCommitFiberRoot(va,a,void 0,(a.current.flags&128)===128)}catch{}if(c!==null){a=R.T,m=P.p,P.p=2,R.T=null;try{for(var f=s.onRecoverableError,S=0;S<c.length;S++){var k=c[S];f(k.value,{componentStack:k.stack})}}finally{R.T=a,P.p=m}}(In&3)!==0&&Td(),cn(s),m=s.pendingLanes,(l&261930)!==0&&(m&42)!==0?s===rx?Ei++:(Ei=0,rx=s):Ei=0,Ri(0)}}function c0(s,a){(s.pooledCacheLanes&=a)===0&&(a=s.pooledCache,a!=null&&(s.pooledCache=null,ii(a)))}function Td(){return l0(),o0(),i0(),d0()}function d0(){if(ms!==5)return!1;var s=hr,a=ax;ax=0;var l=ps(In),c=R.T,m=P.p;try{P.p=32>l?32:l,R.T=null,l=nx,nx=null;var f=hr,S=In;if(ms=0,io=hr=null,In=0,(vt&6)!==0)throw Error(o(331));var k=vt;if(vt|=4,Gv(f.current),Fv(f,f.current,S,l),vt=k,Ri(0,!1),us&&typeof us.onPostCommitFiberRoot=="function")try{us.onPostCommitFiberRoot(va,f)}catch{}return!0}finally{P.p=m,R.T=c,c0(s,a)}}function u0(s,a,l){a=Aa(l,a),a=Lm(s.stateNode,a,2),s=cr(s,a,2),s!==null&&(at(s,2),cn(s))}function Nt(s,a,l){if(s.tag===3)u0(s,s,l);else for(;a!==null;){if(a.tag===3){u0(a,s,l);break}else if(a.tag===1){var c=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(fr===null||!fr.has(c))){s=Aa(l,s),l=pv(2),c=cr(a,l,2),c!==null&&(mv(l,c,a,s),at(c,2),cn(c));break}}a=a.return}}function ix(s,a,l){var c=s.pingCache;if(c===null){c=s.pingCache=new R5;var m=new Set;c.set(a,m)}else m=c.get(a),m===void 0&&(m=new Set,c.set(a,m));m.has(l)||(ex=!0,m.add(l),s=_5.bind(null,s,a,l),a.then(s,s))}function _5(s,a,l){var c=s.pingCache;c!==null&&c.delete(a),s.pingedLanes|=s.suspendedLanes&l,s.warmLanes&=~l,Tt===s&&(nt&l)===l&&(qt===4||qt===3&&(nt&62914560)===nt&&300>Gt()-Ad?(vt&2)===0&&co(s,0):tx|=l,oo===nt&&(oo=0)),cn(s)}function p0(s,a){a===0&&(a=gt()),s=Wr(s,a),s!==null&&(at(s,a),cn(s))}function M5(s){var a=s.memoizedState,l=0;a!==null&&(l=a.retryLane),p0(s,l)}function P5(s,a){var l=0;switch(s.tag){case 31:case 13:var c=s.stateNode,m=s.memoizedState;m!==null&&(l=m.retryLane);break;case 19:c=s.stateNode;break;case 22:c=s.stateNode._retryCache;break;default:throw Error(o(314))}c!==null&&c.delete(a),p0(s,l)}function H5(s,a){return St(s,a)}var Od=null,po=null,cx=!1,_d=!1,dx=!1,br=0;function cn(s){s!==po&&s.next===null&&(po===null?Od=po=s:po=po.next=s),_d=!0,cx||(cx=!0,z5())}function Ri(s,a){if(!dx&&_d){dx=!0;do for(var l=!1,c=Od;c!==null;){if(s!==0){var m=c.pendingLanes;if(m===0)var f=0;else{var S=c.suspendedLanes,k=c.pingedLanes;f=(1<<31-Wt(42|s)+1)-1,f&=m&~(S&~k),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(l=!0,h0(c,f))}else f=nt,f=Ae(c,c===Tt?f:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(f&3)===0||Fe(c,f)||(l=!0,h0(c,f));c=c.next}while(l);dx=!1}}function L5(){m0()}function m0(){_d=cx=!1;var s=0;br!==0&&Q5()&&(s=br);for(var a=Gt(),l=null,c=Od;c!==null;){var m=c.next,f=x0(c,a);f===0?(c.next=null,l===null?Od=m:l.next=m,m===null&&(po=l)):(l=c,(s!==0||(f&3)!==0)&&(_d=!0)),c=m}ms!==0&&ms!==5||Ri(s),br!==0&&(br=0)}function x0(s,a){for(var l=s.suspendedLanes,c=s.pingedLanes,m=s.expirationTimes,f=s.pendingLanes&-62914561;0<f;){var S=31-Wt(f),k=1<<S,F=m[S];F===-1?((k&l)===0||(k&c)!==0)&&(m[S]=yt(k,a)):F<=a&&(s.expiredLanes|=k),f&=~k}if(a=Tt,l=nt,l=Ae(s,s===a?l:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),c=s.callbackNode,l===0||s===a&&(jt===2||jt===9)||s.cancelPendingCommit!==null)return c!==null&&c!==null&&ta(c),s.callbackNode=null,s.callbackPriority=0;if((l&3)===0||Fe(s,l)){if(a=l&-l,a===s.callbackPriority)return a;switch(c!==null&&ta(c),ps(l)){case 2:case 8:l=Fs;break;case 32:l=Hs;break;case 268435456:l=Ds;break;default:l=Hs}return c=f0.bind(null,s),l=St(l,c),s.callbackPriority=a,s.callbackNode=l,a}return c!==null&&c!==null&&ta(c),s.callbackPriority=2,s.callbackNode=null,2}function f0(s,a){if(ms!==0&&ms!==5)return s.callbackNode=null,s.callbackPriority=0,null;var l=s.callbackNode;if(Td()&&s.callbackNode!==l)return null;var c=nt;return c=Ae(s,s===Tt?c:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),c===0?null:(Xv(s,c,a),x0(s,Gt()),s.callbackNode!=null&&s.callbackNode===l?f0.bind(null,s):null)}function h0(s,a){if(Td())return null;Xv(s,a,!0)}function z5(){X5(function(){(vt&6)!==0?St(sa,L5):m0()})}function ux(){if(br===0){var s=Xl;s===0&&(s=Xe,Xe<<=1,(Xe&261888)===0&&(Xe=256)),br=s}return br}function g0(s){return s==null||typeof s=="symbol"||typeof s=="boolean"?null:typeof s=="function"?s:Vc(""+s)}function b0(s,a){var l=a.ownerDocument.createElement("input");return l.name=a.name,l.value=a.value,s.id&&l.setAttribute("form",s.id),a.parentNode.insertBefore(l,a),s=new FormData(s),l.parentNode.removeChild(l),s}function I5(s,a,l,c,m){if(a==="submit"&&l&&l.stateNode===m){var f=g0((m[ss]||null).action),S=c.submitter;S&&(a=(a=S[ss]||null)?g0(a.formAction):S.getAttribute("formAction"),a!==null&&(f=a,S=null));var k=new Gc("action","action",null,c,m);s.push({event:k,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(br!==0){var F=S?b0(m,S):new FormData(m);Tm(l,{pending:!0,data:F,method:m.method,action:f},null,F)}}else typeof f=="function"&&(k.preventDefault(),F=S?b0(m,S):new FormData(m),Tm(l,{pending:!0,data:F,method:m.method,action:f},f,F))},currentTarget:m}]})}}for(var px=0;px<Qp.length;px++){var mx=Qp[px],B5=mx.toLowerCase(),V5=mx[0].toUpperCase()+mx.slice(1);Ua(B5,"on"+V5)}Ua(Yg,"onAnimationEnd"),Ua(Xg,"onAnimationIteration"),Ua(Zg,"onAnimationStart"),Ua("dblclick","onDoubleClick"),Ua("focusin","onFocus"),Ua("focusout","onBlur"),Ua(a5,"onTransitionRun"),Ua(n5,"onTransitionStart"),Ua(r5,"onTransitionCancel"),Ua(Wg,"onTransitionEnd"),Ss("onMouseEnter",["mouseout","mouseover"]),Ss("onMouseLeave",["mouseout","mouseover"]),Ss("onPointerEnter",["pointerout","pointerover"]),Ss("onPointerLeave",["pointerout","pointerover"]),We("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),We("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),We("onBeforeInput",["compositionend","keypress","textInput","paste"]),We("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),We("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),We("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ki="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),F5=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ki));function v0(s,a){a=(a&4)!==0;for(var l=0;l<s.length;l++){var c=s[l],m=c.event;c=c.listeners;e:{var f=void 0;if(a)for(var S=c.length-1;0<=S;S--){var k=c[S],F=k.instance,te=k.currentTarget;if(k=k.listener,F!==f&&m.isPropagationStopped())break e;f=k,m.currentTarget=te;try{f(m)}catch(ce){Qc(ce)}m.currentTarget=null,f=F}else for(S=0;S<c.length;S++){if(k=c[S],F=k.instance,te=k.currentTarget,k=k.listener,F!==f&&m.isPropagationStopped())break e;f=k,m.currentTarget=te;try{f(m)}catch(ce){Qc(ce)}m.currentTarget=null,f=F}}}}function et(s,a){var l=a[ra];l===void 0&&(l=a[ra]=new Set);var c=s+"__bubble";l.has(c)||(y0(a,s,2,!1),l.add(c))}function xx(s,a,l){var c=0;a&&(c|=4),y0(l,s,c,a)}var Md="_reactListening"+Math.random().toString(36).slice(2);function fx(s){if(!s[Md]){s[Md]=!0,bt.forEach(function(l){l!=="selectionchange"&&(F5.has(l)||xx(l,!1,s),xx(l,!0,s))});var a=s.nodeType===9?s:s.ownerDocument;a===null||a[Md]||(a[Md]=!0,xx("selectionchange",!1,a))}}function y0(s,a,l,c){switch(Y0(a)){case 2:var m=hA;break;case 8:m=gA;break;default:m=Dx}l=m.bind(null,a,l,s),m=void 0,!Pp||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(m=!0),c?m!==void 0?s.addEventListener(a,l,{capture:!0,passive:m}):s.addEventListener(a,l,!0):m!==void 0?s.addEventListener(a,l,{passive:m}):s.addEventListener(a,l,!1)}function hx(s,a,l,c,m){var f=c;if((a&1)===0&&(a&2)===0&&c!==null)e:for(;;){if(c===null)return;var S=c.tag;if(S===3||S===4){var k=c.stateNode.containerInfo;
vendor: 2,755 bytes, line 48
48if(k===m)break;if(S===4)for(S=c.return;S!==null;){var F=S.tag;if((F===3||F===4)&&S.stateNode.containerInfo===m)return;S=S.return}for(;k!==null;){if(S=ya(k),S===null)return;if(F=S.tag,F===5||F===6||F===26||F===27){c=f=S;continue e}k=k.parentNode}}c=c.return}Ag(function(){var te=f,ce=_p(l),pe=[];e:{var ae=Jg.get(s);if(ae!==void 0){var oe=Gc,Ce=s;switch(s){case"keypress":if(Uc(l)===0)break e;case"keydown":case"keyup":oe=P4;break;case"focusin":Ce="focus",oe=Ip;break;case"focusout":Ce="blur",oe=Ip;break;case"beforeblur":case"afterblur":oe=Ip;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":oe=Rg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":oe=j4;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":oe=z4;break;case Yg:case Xg:case Zg:oe=C4;break;case Wg:oe=B4;break;case"scroll":case"scrollend":oe=w4;break;case"wheel":oe=F4;break;case"copy":case"cut":case"paste":oe=R4;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":oe=Dg;break;case"toggle":case"beforetoggle":oe=$4}var Le=(a&4)!==0,kt=!Le&&(s==="scroll"||s==="scrollend"),Y=Le?ae!==null?ae+"Capture":null:ae;Le=[];for(var $=te,ee;$!==null;){var de=$;if(ee=de.stateNode,de=de.tag,de!==5&&de!==26&&de!==27||ee===null||Y===null||(de=Zo($,Y),de!=null&&Le.push(Di($,de,ee))),kt)break;$=$.return}0<Le.length&&(ae=new oe(ae,Ce,null,l,ce),pe.push({event:ae,listeners:Le}))}}if((a&7)===0){e:{if(ae=s==="mouseover"||s==="pointerover",oe=s==="mouseout"||s==="pointerout",ae&&l!==Op&&(Ce=l.relatedTarget||l.fromElement)&&(ya(Ce)||Ce[na]))break e;if((oe||ae)&&(ae=ce.window===ce?ce:(ae=ce.ownerDocument)?ae.defaultView||ae.parentWindow:window,oe?(Ce=l.relatedTarget||l.toElement,oe=te,Ce=Ce?ya(Ce):null,Ce!==null&&(kt=d(Ce),Le=Ce.tag,Ce!==kt||Le!==5&&Le!==27&&Le!==6)&&(Ce=null)):(oe=null,Ce=te),oe!==Ce)){if(Le=Rg,de="onMouseLeave",Y="onMouseEnter",$="mouse",(s==="pointerout"||s==="pointerover")&&(Le=Dg,de="onPointerLeave",Y="onPointerEnter",$="pointer"),kt=oe==null?ae:qr(oe),ee=Ce==null?ae:qr(Ce),ae=new Le(de,$+"leave",oe,l,ce),ae.target=kt,ae.relatedTarget=ee,de=null,ya(ce)===te&&(Le=new Le(Y,$+"enter",Ce,l,ce),Le.target=ee,Le.relatedTarget=kt,de=Le),kt=de,oe&&Ce)t:{for(Le=U5,Y=oe,$=Ce,ee=0,de=Y;de;de=Le(de))ee++;de=0;for(var Pe=$;Pe;Pe=Le(Pe))de++;for(;0<ee-de;)Y=Le(Y),ee--;for(;0<de-ee;)$=Le($),de--;for(;ee--;){if(Y===$||$!==null&&Y===$.alternate){Le=Y;break t}Y=Le(Y),$=Le($)}Le=null}else Le=null;oe!==null&&w0(pe,ae,oe,Le,!1),Ce!==null&&kt!==null&&w0(pe,kt,Ce,Le,!0)}}
vendor: 5,244 bytes, lines 48-49
48e:{if(ae=te?qr(te):window,oe=ae.nodeName&&ae.nodeName.toLowerCase(),oe==="select"||oe==="input"&&ae.type==="file")var xt=zg;else if(Hg(ae))if(Ig)xt=e5;else{xt=W4;var De=Z4}else oe=ae.nodeName,!oe||oe.toLowerCase()!=="input"||ae.type!=="checkbox"&&ae.type!=="radio"?te&&Tp(te.elementType)&&(xt=zg):xt=J4;if(xt&&(xt=xt(s,te))){Lg(pe,xt,l,ce);break e}De&&De(s,ae,te),s==="focusout"&&te&&ae.type==="number"&&te.memoizedProps.value!=null&&Dp(ae,"number",ae.value)}switch(De=te?qr(te):window,s){case"focusin":(Hg(De)||De.contentEditable==="true")&&(Fl=De,Gp=te,ri=null);break;case"focusout":ri=Gp=Fl=null;break;case"mousedown":Kp=!0;break;case"contextmenu":case"mouseup":case"dragend":Kp=!1,qg(pe,l,ce);break;case"selectionchange":if(s5)break;case"keydown":case"keyup":qg(pe,l,ce)}var Ke;if(Vp)e:{switch(s){case"compositionstart":var rt="onCompositionStart";break e;case"compositionend":rt="onCompositionEnd";break e;case"compositionupdate":rt="onCompositionUpdate";break e}rt=void 0}else Vl?Mg(s,l)&&(rt="onCompositionEnd"):s==="keydown"&&l.keyCode===229&&(rt="onCompositionStart");rt&&(Tg&&l.locale!=="ko"&&(Vl||rt!=="onCompositionStart"?rt==="onCompositionEnd"&&Vl&&(Ke=Cg()):(sr=ce,Hp="value"in sr?sr.value:sr.textContent,Vl=!0)),De=Pd(te,rt),0<De.length&&(rt=new kg(rt,s,null,l,ce),pe.push({event:rt,listeners:De}),Ke?rt.data=Ke:(Ke=Pg(l),Ke!==null&&(rt.data=Ke)))),(Ke=K4?q4(s,l):Q4(s,l))&&(rt=Pd(te,"onBeforeInput"),0<rt.length&&(De=new kg("onBeforeInput","beforeinput",null,l,ce),pe.push({event:De,listeners:rt}),De.data=Ke)),I5(pe,s,te,l,ce)}v0(pe,a)})}function Di(s,a,l){return{instance:s,listener:a,currentTarget:l}}function Pd(s,a){for(var l=a+"Capture",c=[];s!==null;){var m=s,f=m.stateNode;if(m=m.tag,m!==5&&m!==26&&m!==27||f===null||(m=Zo(s,l),m!=null&&c.unshift(Di(s,m,f)),m=Zo(s,a),m!=null&&c.push(Di(s,m,f))),s.tag===3)return c;s=s.return}return[]}function U5(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5&&s.tag!==27);return s||null}function w0(s,a,l,c,m){for(var f=a._reactName,S=[];l!==null&&l!==c;){var k=l,F=k.alternate,te=k.stateNode;if(k=k.tag,F!==null&&F===c)break;k!==5&&k!==26&&k!==27||te===null||(F=te,m?(te=Zo(l,f),te!=null&&S.unshift(Di(l,te,F))):m||(te=Zo(l,f),te!=null&&S.push(Di(l,te,F)))),l=l.return}S.length!==0&&s.push({event:a,listeners:S})}var $5=/\r\n?/g,G5=/\u0000|\uFFFD/g;function S0(s){return(typeof s=="string"?s:""+s).replace($5,` 49`).replace(G5,"")}function j0(s,a){return a=S0(a),S0(s)===a}function Rt(s,a,l,c,m,f){switch(l){case"children":typeof c=="string"?a==="body"||a==="textarea"&&c===""||zl(s,c):(typeof c=="number"||typeof c=="bigint")&&a!=="body"&&zl(s,""+c);break;case"className":Qr(s,"class",c);break;case"tabIndex":Qr(s,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":Qr(s,l,c);break;case"style":jg(s,c,f);break;case"data":if(a!=="object"){Qr(s,"data",c);break}case"src":case"href":if(c===""&&(a!=="a"||l!=="href")){s.removeAttribute(l);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){s.removeAttribute(l);break}c=Vc(""+c),s.setAttribute(l,c);break;case"action":case"formAction":if(typeof c=="function"){s.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof f=="function"&&(l==="formAction"?(a!=="input"&&Rt(s,a,"name",m.name,m,null),Rt(s,a,"formEncType",m.formEncType,m,null),Rt(s,a,"formMethod",m.formMethod,m,null),Rt(s,a,"formTarget",m.formTarget,m,null)):(Rt(s,a,"encType",m.encType,m,null),Rt(s,a,"method",m.method,m,null),Rt(s,a,"target",m.target,m,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){s.removeAttribute(l);break}c=Vc(""+c),s.setAttribute(l,c);break;case"onClick":c!=null&&(s.onclick=Nn);break;case"onScroll":c!=null&&et("scroll",s);break;case"onScrollEnd":c!=null&&et("scrollend",s);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(o(61));if(l=c.__html,l!=null){if(m.children!=null)throw Error(o(60));s.innerHTML=l}}break;case"multiple":s.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":s.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){s.removeAttribute("xlink:href");break}l=Vc(""+c),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?s.setAttribute(l,""+c):s.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInl
49ine":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":c&&typeof c!="function"&&typeof c!="symbol"?s.setAttribute(l,""):s.removeAttribute(l);break;case"capture":case"download":c===!0?s.setAttribute(l,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?s.setAttribute(l,c):s.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?s.setAttribute(l,c):s.removeAttribute(l);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?s.removeAttribute(l):s.setAttribute(l,c);break;case"popover":et("beforetoggle",s),et("toggle",s),tr(s,"popover",c);break;case"xlinkActuate":Fa(s,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Fa(s,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Fa(s,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Fa(s,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Fa(s,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Fa(s,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Fa(s,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Fa(s,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Fa(s,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":tr(s,"is",c);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=v4.get(l)||l,tr(s,l,c))}}function gx(s,a,l,c,m,f){switch(l){case"style":jg(s,c,f);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(o(61));if(l=c.__html,l!=null){if(m.children!=null)throw Error(o(60));s.innerHTML=l}}break;case"children":typeof c=="string"?zl(s,c):(typeof c=="number"||typeof c=="bigint")&&zl(s,""+c);break;case"onScroll":c!=null&&et("scroll",s);break;case"onScrollEnd":c!=null&&et("scrollend",s);break;case"onClick":c!=null&&(s.onclick=Nn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ze.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(m=l.endsWith("Capture"),a=l.slice(2,m?l.length-7:void 0),f=s[ss]||null,f=f!=null?f[l]:null,typeof f=="function"&&s.removeEventListener(a,f,m),typeof c=="function")){typeof f!="function"&&f!==null&&(l in s?s[l]=null:s.hasAttribute(l)&&s.removeAttribute(l)),s.addEventListener(a,c,m);break e}l in s?s[l]=c:c===!0?s.setAttribute(l,""):tr(s,l,c)}}}function ks(s,a,l){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":et("error",s),et("load",s);var c=!1,m=!1,f;for(f in l)if(l.hasOwnProperty(f)){var S=l[f];if(S!=null)switch(f){case"src":c=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,a));default:Rt(s,a,f,S,l,null)}}m&&Rt(s,a,"srcSet",l.srcSet,l,null),c&&Rt(s,a,"src",l.src,l,null);return;case"input":et("invalid",s);var k=f=S=m=null,F=null,te=null;for(c in l)if(l.hasOwnProperty(c)){var ce=l[c];if(ce!=null)switch(c){case"name":m=ce;break;case"type":S=ce;break;case"checked":F=ce;break;case"defaultChecked":te=ce;break;case"value":f=ce;break;case"defaultValue":k=ce;break;case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(o(137,a));break;default:Rt(s,a,c,ce,l,null)}}vg(s,f,k,F,te,S,m,!1);return;case"select":et("invalid",s),c=S=f=null;for(m in l)if(l.hasOwnProperty(m)&&(k=l[m],k!=null))switch(m){case"value":f=k;break;case"defaultValue":S=k;break;case"multiple":c=k;default:Rt(s,a,m,k,l,null)}a=f,l=S,s.multiple=!!c,a!=null?Ll(s,!!c,a,!1):l!=null&&Ll(s,!!c,l,!0);return;case"textarea":et("invalid",s),f=m=c=null;for(S in l)if(l.hasOwnProperty(S)&&(k=l[S],k!=null))switch(S){case"value":c=k;break;case"defaultValue":m=k;break;case"children":f=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(o(91));break;default:Rt(s,a,S,k,l,null)}wg(s,c,m,f);return;case"option":for(F in l)if(l.hasOwnProperty(F)&&(c=l[F],c!=null))switch(F){case"selected":s.selected=c&&typeof c!="function"&&typeof c!="symbol";break;default:Rt(s,a,F,c,l,null)}return;case"dialog":et("beforetoggle",s),et("toggle",s),et("cancel",s),et("close",s
vendor: 8,747 bytes, line 49
49);break;case"iframe":case"object":et("load",s);break;case"video":case"audio":for(c=0;c<ki.length;c++)et(ki[c],s);break;case"image":et("error",s),et("load",s);break;case"details":et("toggle",s);break;case"embed":case"source":case"link":et("error",s),et("load",s);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(te in l)if(l.hasOwnProperty(te)&&(c=l[te],c!=null))switch(te){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,a));default:Rt(s,a,te,c,l,null)}return;default:if(Tp(a)){for(ce in l)l.hasOwnProperty(ce)&&(c=l[ce],c!==void 0&&gx(s,a,ce,c,l,void 0));return}}for(k in l)l.hasOwnProperty(k)&&(c=l[k],c!=null&&Rt(s,a,k,c,l,null))}function K5(s,a,l,c){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var m=null,f=null,S=null,k=null,F=null,te=null,ce=null;for(oe in l){var pe=l[oe];if(l.hasOwnProperty(oe)&&pe!=null)switch(oe){case"checked":break;case"value":break;case"defaultValue":F=pe;default:c.hasOwnProperty(oe)||Rt(s,a,oe,null,c,pe)}}for(var ae in c){var oe=c[ae];if(pe=l[ae],c.hasOwnProperty(ae)&&(oe!=null||pe!=null))switch(ae){case"type":f=oe;break;case"name":m=oe;break;case"checked":te=oe;break;case"defaultChecked":ce=oe;break;case"value":S=oe;break;case"defaultValue":k=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(o(137,a));break;default:oe!==pe&&Rt(s,a,ae,oe,c,pe)}}kp(s,S,k,F,te,ce,f,m);return;case"select":oe=S=k=ae=null;for(f in l)if(F=l[f],l.hasOwnProperty(f)&&F!=null)switch(f){case"value":break;case"multiple":oe=F;default:c.hasOwnProperty(f)||Rt(s,a,f,null,c,F)}for(m in c)if(f=c[m],F=l[m],c.hasOwnProperty(m)&&(f!=null||F!=null))switch(m){case"value":ae=f;break;case"defaultValue":k=f;break;case"multiple":S=f;default:f!==F&&Rt(s,a,m,f,c,F)}a=k,l=S,c=oe,ae!=null?Ll(s,!!l,ae,!1):!!c!=!!l&&(a!=null?Ll(s,!!l,a,!0):Ll(s,!!l,l?[]:"",!1));return;case"textarea":oe=ae=null;for(k in l)if(m=l[k],l.hasOwnProperty(k)&&m!=null&&!c.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:Rt(s,a,k,null,c,m)}for(S in c)if(m=c[S],f=l[S],c.hasOwnProperty(S)&&(m!=null||f!=null))switch(S){case"value":ae=m;break;case"defaultValue":oe=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(o(91));break;default:m!==f&&Rt(s,a,S,m,c,f)}yg(s,ae,oe);return;case"option":for(var Ce in l)if(ae=l[Ce],l.hasOwnProperty(Ce)&&ae!=null&&!c.hasOwnProperty(Ce))switch(Ce){case"selected":s.selected=!1;break;default:Rt(s,a,Ce,null,c,ae)}for(F in c)if(ae=c[F],oe=l[F],c.hasOwnProperty(F)&&ae!==oe&&(ae!=null||oe!=null))switch(F){case"selected":s.selected=ae&&typeof ae!="function"&&typeof ae!="symbol";break;default:Rt(s,a,F,ae,c,oe)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Le in l)ae=l[Le],l.hasOwnProperty(Le)&&ae!=null&&!c.hasOwnProperty(Le)&&Rt(s,a,Le,null,c,ae);for(te in c)if(ae=c[te],oe=l[te],c.hasOwnProperty(te)&&ae!==oe&&(ae!=null||oe!=null))switch(te){case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(o(137,a));break;default:Rt(s,a,te,ae,c,oe)}return;default:if(Tp(a)){for(var kt in l)ae=l[kt],l.hasOwnProperty(kt)&&ae!==void 0&&!c.hasOwnProperty(kt)&&gx(s,a,kt,void 0,c,ae);for(ce in c)ae=c[ce],oe=l[ce],!c.hasOwnProperty(ce)||ae===oe||ae===void 0&&oe===void 0||gx(s,a,ce,ae,c,oe);return}}for(var Y in l)ae=l[Y],l.hasOwnProperty(Y)&&ae!=null&&!c.hasOwnProperty(Y)&&Rt(s,a,Y,null,c,ae);for(pe in c)ae=c[pe],oe=l[pe],!c.hasOwnProperty(pe)||ae===oe||ae==null&&oe==null||Rt(s,a,pe,ae,c,oe)}function N0(s){switch(s){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function q5(){if(typeof performance.getEntriesByType=="function"){for(var s=0,a=0,l=performance.getEntriesByType("resource"),c=0;c<l.length;c++){var m=l[c],f=m.transferSize,S=m.initiatorType,k=m.duration;if(f&&k&&N0(S)){for(S=0,k=m.responseEnd,c+=1;c<l.length;c++){var F=l[c],te=F.startTime;if(te>k)break;var ce=F.transferSize,pe=F.initiatorType;ce&&N0(pe)&&(F=F.responseEnd,S+=ce*(F<k?1:(k-te)/(F-te)))}if(--c,a+=8*(f+S)/(m.duration/1e3),s++,10<s)break}}if(0<s)return a/s/1e6}return navigator.connection&&(s=navigator.connection.downlink,typeof s=="number")?s:5}var bx=null,vx=null;function Hd(s){return s.nodeType===9?s:s.ownerDocument}function A0(s){switch(s){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function C0(s,a){if(s===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return s===1&&a==="foreignObject"?0:s}function yx(s,a){return s==="textarea"||s==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var wx=null;function Q5(){var s=window.event;return s&&s.type==="popstate"?s===wx?!1:(wx=s,!0):(wx=null,!1)}var E0=typeof setTimeout=="function"?setTimeout:void 0,Y5=typeof clearTimeout=="function"?clearTimeout:void 0,R0=typeof Promise=="function"?Promise:void 0,X5=typeof queueMicrotask=="function"?queueMicrotask:typeof R0<"u"?function(s){return R0.resolve(null).then(s).catch(Z5)}:E0;function Z5(s){setTimeout(function(){throw s})}function vr(s){return s==="head"}function k0(s,a){var l=a,c=0;do{var m=l.nextSibling;if(s.removeChild(l),m&&m.nodeType===8)if(l=m.data,l==="/$"||l==="/&"){if(c===0){s.removeChild(m),ho(a);return}c--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")c++;else if(l==="html")Ti(s.ownerDocument.documentElement);else if(l==="head"){l=s.ownerDocument.head,Ti(l);for(var f=l.firstChild;f;){var S=f.nextSibling,k=f.nodeName;f[Jn]||k==="SCRIPT"||k==="STYLE"||k==="LINK"&&f.rel.toLowerCase()==="stylesheet"||l.removeChild(f),f=S}}else l==="body"&&Ti(s.ownerDocument.body);l=m}while(l);ho(a)}function D0(s,a){var l=s;s=0;do{var c=l.nextSibling;if(l.nodeType===1?a?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(a?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),c&&c.nodeType===8)if(l=c.data,l==="/$"){if(s===0)break;s--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||s++;l=c}while(l)}function Sx(s){var a=s.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var l=a;switch(a=a.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Sx(l),Hl(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}s.removeChild(l)}}function W5(s,a,l,c){for(;s.nodeType===1;){var m=l;if(s.nodeName.toLowerCase()!==a.toLowerCase()){if(!c&&(s.nodeName!=="INPUT"||s.type!=="hidden"))break}else if(c){if(!s[Jn])switch(a){case"meta":if(!s.hasAttribute("itemprop"))break;return s;case"link":if(f=s.getAttribute("rel"),f==="stylesheet"&&s.hasAttribute("data-precedence"))break;if(f!==m.rel||s.getAttribute("href")!==(m.href==null||m.href===""?null:m.href)||s.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin)||s.getAttribute("title")!==(m.title==null?null:m.title))break;return s;case"style":if(s.hasAttribute("data-precedence"))break;return s;case"script":if(f=s.getAttribute("src"),(f!==(m.src==null?null:m.src)||s.getAttribute("type")!==(m.type==null?null:m.type)||s.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin))&&f&&s.hasAttribute("async")&&!s.hasAttribute("itemprop"))break;return s;default:return s}}else if(a==="input"&&s.type==="hidden"){var f=m.name==null?null:""+m.name;if(m.type==="hidden"&&s.getAttribute("name")===f)return s}else return s;if(s=Da(s.nextSibling),s===null)break}return null}function J5(s,a,l){if(a==="")return null;for(;s.nodeType!==3;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!l||(s=Da(s.nextSibling),s===null))return null;return s}function T0(s,a){for(;s.nodeType!==8;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!a||(s=Da(s.nextSibling),s===null))return null;return s}function jx(s){return s.data==="$?"||s.data==="$~"}function Nx(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState!=="loading"}function eA(s,a){var l=s.ownerDocument;if(s.data==="$~")s._reactRetry=a;else if(s.data!=="$?"||l.readyState!=="loading")a();else{var c=function(){a(),l.removeEventListener("DOMContentLoaded",c)};l.addEventListener("DOMContentLoaded",c),s._reactRetry=c}}function Da(s){for(;s!=null;s=s.nextSibling){var a=s.nodeType;if(a===1||a===3)break;if(a===8){if(a=s.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;
vendor: 8,816 bytes, line 49
49if(a==="/$"||a==="/&")return null}}return s}var Ax=null;function O0(s){s=s.nextSibling;for(var a=0;s;){if(s.nodeType===8){var l=s.data;if(l==="/$"||l==="/&"){if(a===0)return Da(s.nextSibling);a--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||a++}s=s.nextSibling}return null}function _0(s){s=s.previousSibling;for(var a=0;s;){if(s.nodeType===8){var l=s.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(a===0)return s;a--}else l!=="/$"&&l!=="/&"||a++}s=s.previousSibling}return null}function M0(s,a,l){switch(a=Hd(l),s){case"html":if(s=a.documentElement,!s)throw Error(o(452));return s;case"head":if(s=a.head,!s)throw Error(o(453));return s;case"body":if(s=a.body,!s)throw Error(o(454));return s;default:throw Error(o(451))}}function Ti(s){for(var a=s.attributes;a.length;)s.removeAttributeNode(a[0]);Hl(s)}var Ta=new Map,P0=new Set;function Ld(s){return typeof s.getRootNode=="function"?s.getRootNode():s.nodeType===9?s:s.ownerDocument}var Bn=P.d;P.d={f:tA,r:sA,D:aA,C:nA,L:rA,m:lA,X:iA,S:oA,M:cA};function tA(){var s=Bn.f(),a=Rd();return s||a}function sA(s){var a=Va(s);a!==null&&a.tag===5&&a.type==="form"?Wb(a):Bn.r(s)}var mo=typeof document>"u"?null:document;function H0(s,a,l){var c=mo;if(c&&typeof a=="string"&&a){var m=ja(a);m='link[rel="'+s+'"][href="'+m+'"]',typeof l=="string"&&(m+='[crossorigin="'+l+'"]'),P0.has(m)||(P0.add(m),s={rel:s,crossOrigin:l,href:a},c.querySelector(m)===null&&(a=c.createElement("link"),ks(a,"link",s),be(a),c.head.appendChild(a)))}}function aA(s){Bn.D(s),H0("dns-prefetch",s,null)}function nA(s,a){Bn.C(s,a),H0("preconnect",s,a)}function rA(s,a,l){Bn.L(s,a,l);var c=mo;if(c&&s&&a){var m='link[rel="preload"][as="'+ja(a)+'"]';a==="image"&&l&&l.imageSrcSet?(m+='[imagesrcset="'+ja(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(m+='[imagesizes="'+ja(l.imageSizes)+'"]')):m+='[href="'+ja(s)+'"]';var f=m;switch(a){case"style":f=xo(s);break;case"script":f=fo(s)}Ta.has(f)||(s=g({rel:"preload",href:a==="image"&&l&&l.imageSrcSet?void 0:s,as:a},l),Ta.set(f,s),c.querySelector(m)!==null||a==="style"&&c.querySelector(Oi(f))||a==="script"&&c.querySelector(_i(f))||(a=c.createElement("link"),ks(a,"link",s),be(a),c.head.appendChild(a)))}}function lA(s,a){Bn.m(s,a);var l=mo;if(l&&s){var c=a&&typeof a.as=="string"?a.as:"script",m='link[rel="modulepreload"][as="'+ja(c)+'"][href="'+ja(s)+'"]',f=m;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=fo(s)}if(!Ta.has(f)&&(s=g({rel:"modulepreload",href:s},a),Ta.set(f,s),l.querySelector(m)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(_i(f)))return}c=l.createElement("link"),ks(c,"link",s),be(c),l.head.appendChild(c)}}}function oA(s,a,l){Bn.S(s,a,l);var c=mo;if(c&&s){var m=U(c).hoistableStyles,f=xo(s);a=a||"default";var S=m.get(f);if(!S){var k={loading:0,preload:null};if(S=c.querySelector(Oi(f)))k.loading=5;else{s=g({rel:"stylesheet",href:s,"data-precedence":a},l),(l=Ta.get(f))&&Cx(s,l);var F=S=c.createElement("link");be(F),ks(F,"link",s),F._p=new Promise(function(te,ce){F.onload=te,F.onerror=ce}),F.addEventListener("load",function(){k.loading|=1}),F.addEventListener("error",function(){k.loading|=2}),k.loading|=4,zd(S,a,c)}S={type:"stylesheet",instance:S,count:1,state:k},m.set(f,S)}}}function iA(s,a){Bn.X(s,a);var l=mo;if(l&&s){var c=U(l).hoistableScripts,m=fo(s),f=c.get(m);f||(f=l.querySelector(_i(m)),f||(s=g({src:s,async:!0},a),(a=Ta.get(m))&&Ex(s,a),f=l.createElement("script"),be(f),ks(f,"link",s),l.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},c.set(m,f))}}function cA(s,a){Bn.M(s,a);var l=mo;if(l&&s){var c=U(l).hoistableScripts,m=fo(s),f=c.get(m);f||(f=l.querySelector(_i(m)),f||(s=g({src:s,async:!0,type:"module"},a),(a=Ta.get(m))&&Ex(s,a),f=l.createElement("script"),be(f),ks(f,"link",s),l.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},c.set(m,f))}}function L0(s,a,l,c){var m=(m=me.current)?Ld(m):null;if(!m)throw Error(o(446));switch(s){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(a=xo(l.href),l=U(m).hoistableStyles,c=l.get(a),c||(c={type:"style",instance:null,count:0,state:null},l.set(a,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){s=xo(l.href);var f=U(m).hoistableStyles,S=f.get(s);if(S||(m=m.ownerDocument||m,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(s,S),(f=m.querySelector(Oi(s)))&&!f._p&&(S.instance=f,S.state.loading=5),Ta.has(s)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Ta.set(s,l),f||dA(m,s,l,S.state))),a&&c===null)throw Error(o(528,""));return S}if(a&&c!==null)throw Error(o(529,""));return null;case"script":return a=l.async,l=l.src,typeof l=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=fo(l),l=U(m).hoistableScripts,c=l.get(a),c||(c={type:"script",instance:null,count:0,state:null},l.set(a,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,s))}}function xo(s){return'href="'+ja(s)+'"'}function Oi(s){return'link[rel="stylesheet"]['+s+"]"}function z0(s){return g({},s,{"data-precedence":s.precedence,precedence:null})}function dA(s,a,l,c){s.querySelector('link[rel="preload"][as="style"]['+a+"]")?c.loading=1:(a=s.createElement("link"),c.preload=a,a.addEventListener("load",function(){return c.loading|=1}),a.addEventListener("error",function(){return c.loading|=2}),ks(a,"link",l),be(a),s.head.appendChild(a))}function fo(s){return'[src="'+ja(s)+'"]'}function _i(s){return"script[async]"+s}function I0(s,a,l){if(a.count++,a.instance===null)switch(a.type){case"style":var c=s.querySelector('style[data-href~="'+ja(l.href)+'"]');if(c)return a.instance=c,be(c),c;var m=g({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return c=(s.ownerDocument||s).createElement("style"),be(c),ks(c,"style",m),zd(c,l.precedence,s),a.instance=c;case"stylesheet":m=xo(l.href);var f=s.querySelector(Oi(m));if(f)return a.state.loading|=4,a.instance=f,be(f),f;c=z0(l),(m=Ta.get(m))&&Cx(c,m),f=(s.ownerDocument||s).createElement("link"),be(f);var S=f;return S._p=new Promise(function(k,F){S.onload=k,S.onerror=F}),ks(f,"link",c),a.state.loading|=4,zd(f,l.precedence,s),a.instance=f;case"script":return f=fo(l.src),(m=s.querySelector(_i(f)))?(a.instance=m,be(m),m):(c=l,(m=Ta.get(f))&&(c=g({},l),Ex(c,m)),s=s.ownerDocument||s,m=s.createElement("script"),be(m),ks(m,"link",c),s.head.appendChild(m),a.instance=m);case"void":return null;default:throw Error(o(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(c=a.instance,a.state.loading|=4,zd(c,l.precedence,s));return a.instance}function zd(s,a,l){for(var c=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=c.length?c[c.length-1]:null,f=m,S=0;S<c.length;S++){var k=c[S];if(k.dataset.precedence===a)f=k;else if(f!==m)break}f?f.parentNode.insertBefore(s,f.nextSibling):(a=l.nodeType===9?l.head:l,a.insertBefore(s,a.firstChild))}function Cx(s,a){s.crossOrigin==null&&(s.crossOrigin=a.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=a.referrerPolicy),s.title==null&&(s.title=a.title)}function Ex(s,a){s.crossOrigin==null&&(s.crossOrigin=a.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=a.referrerPolicy),s.integrity==null&&(s.integrity=a.integrity)}var Id=null;function B0(s,a,l){if(Id===null){var c=new Map,m=Id=new Map;m.set(l,c)}else m=Id,c=m.get(l),c||(c=new Map,m.set(l,c));if(c.has(s))return c;for(c.set(s,null),l=l.getElementsByTagName(s),m=0;m<l.length;m++){var f=l[m];if(!(f[Jn]||f[Ht]||s==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var S=f.getAttribute(a)||"";S=s+S;var k=c.get(S);k?k.push(f):c.set(S,[f])}}return c}function V0(s,a,l){s=s.ownerDocument||s,s.head.insertBefore(l,a==="title"?s.querySelector("head > title"):null)}function uA(s,a,l){if(l===1||a.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;switch(a.rel){case"stylesheet":return s=a.disabled,typeof a.precedence=="string"&&s==null;default:return!0}case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function F0(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function pA(s,a,l,c){if(l.type==="stylesheet"&&(typeof c.media!="str
49ing"||matchMedia(c.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var m=xo(c.href),f=a.querySelector(Oi(m));if(f){a=f._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(s.count++,s=Bd.bind(s),a.then(s,s)),l.state.loading|=4,l.instance=f,be(f);return}f=a.ownerDocument||a,c=z0(c),(m=Ta.get(m))&&Cx(c,m),f=f.createElement("link"),be(f);var S=f;S._p=new Promise(function(k,F){S.onload=k,S.onerror=F}),ks(f,"link",c),l.instance=f}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(l,a),(a=l.state.preload)&&(l.state.loading&3)===0&&(s.count++,l=Bd.bind(s),a.addEventListener("load",l),a.addEventListener("error",l))}}var Rx=0;function mA(s,a){return s.stylesheets&&s.count===0&&Fd(s,s.stylesheets),0<s.count||0<s.imgCount?function(l){var c=setTimeout(function(){if(s.stylesheets&&Fd(s,s.stylesheets),s.unsuspend){var f=s.unsuspend;s.unsuspend=null,f()}},6e4+a);0<s.imgBytes&&Rx===0&&(Rx=62500*q5());var m=setTimeout(function(){if(s.waitingForImages=!1,s.count===0&&(s.stylesheets&&Fd(s,s.stylesheets),s.unsuspend)){var f=s.unsuspend;s.unsuspend=null,f()}},(s.imgBytes>Rx?50:800)+a);return s.unsuspend=l,function(){s.unsuspend=null,clearTimeout(c),clearTimeout(m)}}:null}function Bd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Fd(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var Vd=null;function Fd(s,a){s.stylesheets=null,s.unsuspend!==null&&(s.count++,Vd=new Map,a.forEach(xA,s),Vd=null,Bd.call(s))}function xA(s,a){if(!(a.state.loading&4)){var l=Vd.get(s);if(l)var c=l.get(null);else{l=new Map,Vd.set(s,l);for(var m=s.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<m.length;f++){var S=m[f];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(l.set(S.dataset.precedence,S),c=S)}c&&l.set(null,c)}m=a.instance,S=m.getAttribute("data-precedence"),f=l.get(S)||c,f===c&&l.set(null,m),l.set(S,m),this.count++,c=Bd.bind(this),m.addEventListener("load",c),m.addEventListener("error",c),f?f.parentNode.insertBefore(m,f.nextSibling):(s=s.nodeType===9?s.head:s,s.insertBefore(m,s.firstChild)),a.state.loading|=4}}var Mi={$$typeof:T,Provider:null,Consumer:null,_currentValue:B,_currentValue2:B,_threadCount:0};function fA(s,a,l,c,m,f,S,k,F){this.tag=1,this.containerInfo=s,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ws(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ws(0),this.hiddenUpdates=ws(null),this.identifierPrefix=c,this.onUncaughtError=m,this.onCaughtError=f,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=F,this.incompleteTransitions=new Map}function U0(s,a,l,c,m,f,S,k,F,te,ce,pe){return s=new fA(s,a,l,S,F,te,ce,pe,k),a=1,f===!0&&(a|=24),f=oa(3,null,null,a),s.current=f,f.stateNode=s,a=om(),a.refCount++,s.pooledCache=a,a.refCount++,f.memoizedState={element:c,isDehydrated:l,cache:a},um(f),s}function $0(s){return s?(s=Gl,s):Gl}function G0(s,a,l,c,m,f){m=$0(m),c.context===null?c.context=m:c.pendingContext=m,c=ir(a),c.payload={element:l},f=f===void 0?null:f,f!==null&&(c.callback=f),l=cr(s,c,a),l!==null&&(Xs(l,s,a),pi(l,s,a))}function K0(s,a){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var l=s.retryLane;s.retryLane=l!==0&&l<a?l:a}}function kx(s,a){K0(s,a),(s=s.alternate)&&K0(s,a)}function q0(s){if(s.tag===13||s.tag===31){var a=Wr(s,67108864);a!==null&&Xs(a,s,67108864),kx(s,67108864)}}function Q0(s){if(s.tag===13||s.tag===31){var a=pa();a=je(a);var l=Wr(s,a);l!==null&&Xs(l,s,a),kx(s,a)}}var Ud=!0;function hA(s,a,l,c){var m=R.T;R.T=null;var f=P.p;try{P.p=2,Dx(s,a,l,c)}finally{P.p=f,R.T=m}}function gA(s,a,l,c){var m=R.T;R.T=null;var f=P.p;try{P.p=8,Dx(s,a,l,c)}finally{P.p=f,R.T=m}}function Dx(s,a,l,c){if(Ud){var m=Tx(c);if(m===null)hx(s,a,c,$d,l),X0(s,c);else if(vA(m,s,a,l,c))c.stopPropagation();else if(X0(s,c),a&4&&-1<bA.indexOf(s)){for(;m!==null;){var f=Va(m);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var S=ut(f.pen
vendor: 2,082 bytes, line 49
49dingLanes);if(S!==0){var k=f;for(k.pendingLanes|=2,k.entangledLanes|=2;S;){var F=1<<31-Wt(S);k.entanglements[1]|=F,S&=~F}cn(f),(vt&6)===0&&(Cd=Gt()+500,Ri(0))}}break;case 31:case 13:k=Wr(f,2),k!==null&&Xs(k,f,2),Rd(),kx(f,2)}if(f=Tx(c),f===null&&hx(s,a,c,$d,l),f===m)break;m=f}m!==null&&c.stopPropagation()}else hx(s,a,c,null,l)}}function Tx(s){return s=_p(s),Ox(s)}var $d=null;function Ox(s){if($d=null,s=ya(s),s!==null){var a=d(s);if(a===null)s=null;else{var l=a.tag;if(l===13){if(s=u(a),s!==null)return s;s=null}else if(l===31){if(s=p(a),s!==null)return s;s=null}else if(l===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;s=null}else a!==s&&(s=null)}}return $d=s,null}function Y0(s){switch(s){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ia()){case sa:return 2;case Fs:return 8;case Hs:case aa:return 32;case Ds:return 268435456;default:return 32}default:return 32}}var _x=!1,yr=null,wr=null,Sr=null,Pi=new Map,Hi=new Map,jr=[],bA="mou
49sedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function X0(s,a){switch(s){case"focusin":case"focusout":yr=null;break;case"dragenter":case"dragleave":wr=null;break;case"mouseover":case"mouseout":Sr=null;break;case"pointerover":case"pointerout":Pi.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Hi.delete(a.pointerId)}}function Li(s,a,l,c,m,f){return s===null||s.nativeEvent!==f?(s={blockedOn:a,domEventName:l,eventSystemFlags:c,nativeEvent:f,targetContainers:[m]},a!==null&&(a=Va(a),a!==null&&q0(a)),s):(s.eventSystemFlags|=c,a=s.targetContainers,m!==null&&a.indexOf(m)===-1&&a.push(m),s)}function vA(s,a,l,c,m){switch(a){case"focusin":return yr=Li(yr,s,a,l,c,m),!0;case"dragenter":return wr=Li(wr,s,a,l,c,m),!0;case"mouseover":return Sr=Li(Sr,s,a,l,c,m),!0;case"pointerover":var f=m.pointerId;return Pi.set(f,Li(Pi.get(f)||null,s,a,l,c,m)),!0;case"gotpointercapture":return f=m.pointerId,Hi.set(f,Li(Hi.get(f)||null,s,a,l,c,m)),!0}return!1}function Z0(s){var a=ya(s.target);if(a!==null){var l=d(a);if(l!==null){if(a=l.tag,a===13){if(a=u(l),a!==null){s.blockedOn=a,_l(s.priority,function(){Q0(l)});return}}else if(a===31){if(a=p(l),a!==null){s.blockedOn=a,_l(s.priority,function(){Q0(l)});return}}else if(a===3&&l.stateNode.current.memoizedState.isDehydrated){s.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}s.blockedOn=null}function Gd(s){if(s.blockedOn!==null)return!1;for(var a=s.targetContainers;0<a.length;){var l=Tx(s.nativeEvent);if(l===null){l=s.nativeEvent;var c=new l.constructor(l.type,l);Op=c,l.target.dispatchEvent(c),Op=null}else return a=Va(l),a!==null&&q0(a),s.blockedOn=l,!1;a.shift()}return!0}function W0(s,a,l){Gd(s)&&l.delete(a)}function yA(){_x=!1,yr!==null&&Gd(yr)&&(yr=null),wr!==null&&Gd(wr)&&(wr=null),Sr!==null&&Gd(Sr)&&(Sr=null),Pi.forEach(W0),Hi.forEach(W0)}function Kd(s,a){s.blockedOn===a&&(s.blockedOn=null,_x||(_x=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,yA)))}var qd=null;function J0(s){qd!==s&&(qd=s,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){qd===s&&(qd=null);for(var a=0;a<s.length;a+=3){var l=s[a],c=s[a+1],m=s[a+2];if(typeof c!="function"){if(Ox(c||l)===null)continue;break}var f=Va(l);f!==null&&(s.splice(a,3),a-=3,Tm(f,{pending:!0,data:m,method:l.method,action:c},c,m))}}))}function ho(s){function a(F){return Kd(F,s)}yr!==null&&Kd(yr,s),wr!==null&&Kd(wr,s),Sr!==null&&Kd(Sr,s),Pi.forEach(a),Hi.forEach(a);for(var l=0;l<jr.length;l++){var c=jr[l];c.blockedOn===s&&(c.blockedOn=null)}for(;0<jr.length&&(l=jr[0],l.blockedOn===null);)Z0(l),l.blockedOn===null&&jr.shift();if(l=(s.ownerDocument||s).$$reactFormReplay,l!=null)for(c=0;c<l.length;c+=3){var m=l[c],f=l[c+1],S=m[ss]||null;if(typeof f=="function")S||J0(l);else if(S){var k=null;if(f&&f.hasAttribute("formAction")){if(m=f,S=f[ss]||null)k=S.formAction;else if(Ox(m)!==null)continue}else k=S.action;typeof k=="function"?l[c+1]=k:(l.splice(c,3),c-=3),J0(l)}}}function ey(){function s(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(S){return m=S})},focusReset:"manual",scroll:"manual"})}function a(){m!==null&&(m(),m=null),c||setTimeout(l,20)}function l(){if(!c&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,m=null;return navigation.addEventListener("navigate",s),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(l,100),function(){c=!0,navigation.removeEventListener("navigate",s),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),m!==null&&(m(),m=null)}}}function Mx(s){this._internalRoot=s}Qd.prototype.render=Mx.prototype.render=function(s){var a=this._internalRoot;if(a===null)throw Error(o(409));var l=a.current,c=pa();
49G0(l,c,s,a,null,null)},Qd.prototype.unmount=Mx.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var a=s.containerInfo;G0(s.current,2,null,s,null,null),Rd(),a[na]=null}};function Qd(s){this._internalRoot=s}Qd.prototype.unstable_scheduleHydration=function(s){if(s){var a=nn();s={blockedOn:null,target:s,priority:a};for(var l=0;l<jr.length&&a!==0&&a<jr[l].priority;l++);jr.splice(l,0,s),l===0&&Z0(s)}};var ty=n.version;if(ty!=="19.2.1")throw Error(o(527,ty,"19.2.1"));P.findDOMNode=function(s){var a=s._reactInternals;if(a===void 0)throw typeof s.render=="function"?Error(o(188)):(s=Object.keys(s).join(","),Error(o(268,s)));return s=h(a),s=s!==null?v(s):null,s=s===null?null:s.stateNode,s};var wA={bundleType:0,version:"19.2.1",rendererPackageName:"react-dom",currentDispatcherRef:R,reconcilerVersion:"19.2.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Yd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Yd.isDisabled&&Yd.supportsFiber)try{va=Yd.inject(wA),us=Yd}catch{}}return Bi.createRoot=function(s,a){if(!i(s))throw Error(o(299));var l=!1,c="",m=iv,f=cv,S=dv;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(m=a.onUncaughtError),a.onCaughtError!==void 0&&(f=a.onCaughtError),a.onRecoverableError!==void 0&&(S=a.onRecoverableError)),a=U0(s,1,!1,null,null,l,c,null,m,f,S,ey),s[na]=a.current,fx(s),new Mx(a)},Bi.hydrateRoot=function(s,a,l){if(!i(s))throw Error(o(299));var c=!1,m="",f=iv,S=cv,k=dv,F=null;return l!=null&&(l.unstable_strictMode===!0&&(c=!0),l.identifierPrefix!==void 0&&(m=l.identifierPrefix),l.onUncaughtError!==void 0&&(f=l.onUncaughtError),l.onCaughtError!==void 0&&(S=l.onCaughtError),l.onRecoverableError!==void 0&&(k=l.onRecoverableError),l.formState!==void 0&&(F=l.formState)),a=U0(s,1,!0,a,l??null,c,m,F,f,S,k,ey),a.context=$0(null),l=a.current,c=pa(),c=je(c),m=ir(c),m.callback=null,cr(l,m,c),l=c,a.current.lanes=l,at(a,l),cn(a),s[na]=a.current,fx(s),new Qd(a)},Bi.version="19.2.1",Bi}var Ey;function LE(){if(Ey)return Vx.exports;Ey=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}return t(),Vx.exports=HE(),Vx.exports}var zE=LE(),IE=(function(){function t(){this.keyToValue=new Map,this.valueToKey=new Map}return t.prototype.set=function(n,r){this.keyToValue.set(n,r),this.valueToKey.set(r,n)},t.prototype.getByKey=function(n){return this.keyToValue.get(n)},t.prototype.getByValue=function(n){return this.valueToKey.get(n)},t.prototype.clear=function(){this.keyToValue.clear(),this.valueToKey.clear()},t})(),l2=(function(){function t(n){this.generateIdentifier=n,this.kv=new IE}return t.prototype.register=function(n,r){this.kv.getByValue(n)||(r||(r=this.generateIdentifier(n)),this.kv.set(r,n))},t.prototype.clear=function(){this.kv.clear()},t.prototype.getIdentifier=function(n){return this.kv.getByValue(n)},t.prototype.getValue=function(n){return this.kv.getByKey(n)},t})(),BE=(function(){var t=function(n,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,i){o.__proto__=i}||function(o,i){for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&(o[d]=i[d])},t(n,r)};return function(n,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(n,r);function o(){this.constructor=n}n.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}})(),VE=(function(t){BE(n,t);function n(){var r=t.call(this,function(o){return o.name})||this;return r.classToAllowedProps=new Map,r}return n.prototype.register=function(r,o){typeof o=="object"?(o.allowProps&&this.classToAllowedProps.set(r,o.allowProps),t.prototype.register.call(this,r,o.identifier)):t.prototype.register.call(this,r,o)},n.prototype.getAllowedProps=function(r){return this.classToAllowedProps.get(r)},n})(l2),FE=function(t,n){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var o=r.call(t),i,d=[],u;try{for(;(n===void 0||n-- >0)&&!(i=o.next()).done;)d.push(i.value)}catch(p){u={error:p}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(u)throw u.error}}return d};function UE(t){if("values"in Object)return Object.values(t);var n=[];for(var r in t)t.hasOwnProperty(r)&&n.push(t[r]);return n}function $E(t,n){var r=UE(t);if("find"in r)return r.find(n);
49for(var o=r,i=0;i<o.length;i++){var d=o[i];if(n(d))return d}}function _o(t,n){Object.entries(t).forEach(function(r){var o=FE(r,2),i=o[0],d=o[1];return n(d,i)})}function gu(t,n){return t.indexOf(n)!==-1}function Ry(t,n){for(var r=0;r<t.length;r++){var o=t[r];if(n(o))return o}}var GE=(function(){function t(){this.transfomers={}}return t.prototype.register=function(n){this.transfomers[n.name]=n},t.prototype.findApplicable=function(n){return $E(this.transfomers,function(r){return r.isApplicable(n)})},t.prototype.findByName=function(n){return this.transfomers[n]},t})(),KE=function(t){return Object.prototype.toString.call(t).slice(8,-1)},o2=function(t){return typeof t>"u"},qE=function(t){return t===null},ac=function(t){return typeof t!="object"||t===null||t===Object.prototype?!1:Object.getPrototypeOf(t)===null?!0:Object.getPrototypeOf(t)===Object.prototype},kf=function(t){return ac(t)&&Object.keys(t).length===0},Mr=function(t){return Array.isArray(t)},QE=function(t){return typeof t=="string"},YE=function(t){return typeof t=="number"&&!isNaN(t)},XE=function(t){return typeof t=="boolean"},ZE=function(t){return t instanceof RegExp},nc=function(t){return t instanceof Map},rc=function(t){return t instanceof Set},i2=function(t){return KE(t)==="Symbol"},WE=function(t){return t instanceof Date&&!isNaN(t.valueOf())},JE=function(t){return t instanceof Error},ky=function(t){return typeof t=="number"&&isNaN(t)},eR=function(t){return XE(t)||qE(t)||o2(t)||YE(t)||QE(t)||i2(t)},tR=function(t){return typeof t=="bigint"},sR=function(t){return t===1/0||t===-1/0},aR=function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},nR=function(t){return t instanceof URL},c2=function(t){return t.replace(/\./g,"\\.")},Gx=function(t){return t.map(String).map(c2).join(".")},Qi=function(t){for(var n=[],r="",o=0;o<t.length;o++){var i=t.charAt(o),d=i==="\\"&&t.charAt(o+1)===".";if(d){r+=".",o++;continue}var u=i===".";if(u){n.push(r),r="";
49continue}r+=i}var p=r;return n.push(p),n},Df=function(){return Df=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Df.apply(this,arguments)},Tf=function(t,n){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var o=r.call(t),i,d=[],u;try{for(;(n===void 0||n-- >0)&&!(i=o.next()).done;)d.push(i.value)}catch(p){u={error:p}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(u)throw u.error}}return d},Of=function(t,n){for(var r=0,o=n.length,i=t.length;r<o;r++,i++)t[i]=n[r];return t};function dn(t,n,r,o){return{isApplicable:t,annotation:n,transform:r,untransform:o}}var d2=[dn(o2,"undefined",function(){return null},function(){}),dn(tR,"bigint",function(t){return t.toString()},function(t){return typeof BigInt<"u"?BigInt(t):(console.error("Please add a BigInt polyfill."),t)}),dn(WE,"Date",function(t){return t.toISOString()},function(t){return new Date(t)}),dn(JE,"Error",function(t,n){var r={
49name:t.name,message:t.message};return n.allowedErrorProps.forEach(function(o){r[o]=t[o]}),r},function(t,n){var r=new Error(t.message);return r.name=t.name,r.stack=t.stack,n.allowedErrorProps.forEach(function(o){r[o]=t[o]}),r}),dn(ZE,"regexp",function(t){return""+t},function(t){var n=t.slice(1,t.lastIndexOf("/")),r=t.slice(t.lastIndexOf("/")+1);return new RegExp(n,r)}),dn(rc,"set",function(t){return Of([],Tf(t.values()))},function(t){return new Set(t)}),dn(nc,"map",function(t){return Of([],Tf(t.entries()))},function(t){return new Map(t)}),dn(function(t){return ky(t)||sR(t)},"number",function(t){return ky(t)?"NaN":t>0?"Infinity":"-Infinity"},Number),dn(function(t){return t===0&&1/t===-1/0},"number",function(){return"-0"},Number),dn(nR,"URL",function(t){return t.toString()},function(t){return new URL(t)})];function Xu(t,n,r,o){return{isApplicable:t,annotation:n,transform:r,untransform:o}}var u2=Xu(function(t,n){if(i2(t)){var r=!!n.symbolRegistry.getIdentifier(t);return r}return!1},function(t,n){var r=n.symbolRegistry.getIdentifier(t);return["symbol",r]},function(t){return t.description},function(t,n,r){var o=r.symbolRegistry.getValue(n[1]);if(!o)throw new Error("Trying to deserialize unknown symbol");return o}),rR=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce(function(t,n){return t[n.name]=n,t},{}),p2=Xu(aR,function(t){return["typed-array",t.constructor.name]},function(t){return Of([],Tf(t))},function(t,n){var r=rR[n[1]];if(!r)throw new Error("Trying to deserialize unknown typed array");return new r(t)});function m2(t,n){if(t?.constructor){var r=!!n.classRegistry.getIdentifier(t.constructor);return r}return!1}var x2=Xu(m2,function(t,n){var r=n.classRegistry.getIdentifier(t.constructor);return["class",r]},function(t,n){var r=n.classRegistry.getAllowedProps(t.constructor);if(!r)return Df({},t);var o={};return r.forEach(function(i){o[i]=t[i]}),o},function(t,n,r){var o=r.classRegistry.getValue(n[1]);if(!o)throw new Error("Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564");return Object.assign(Object.create(o.prototype),t)}),f2=Xu(function(t,n){return!!n.customTransformerRegistry.findApplicable(t)},function(t,n){var r=n.customTransformerRegistry.findApplicable(t);return["custom",r.name]},function(t,n){var r=n.customTransformerRegistry.findApplicable(t);return r.serialize(t)},function(t,n,r){var o=r.customTransformerRegistry.findByName(n[1]);if(!o)throw new Error("Trying to deserialize unknown custom value");return o.deserialize(t)}),lR=[x2,u2,f2,p2],Dy=function(t,n){var r=Ry(lR,function(i){return i.isApplicable(t,n)});if(r)return{value:r.transform(t,n),type:r.annotation(t,n)};var o=Ry(d2,function(i){return i.isApplicable(t,n)});if(o)return{value:o.transform(t,n),type:o.annotation}},h2={};d2.forEach(function(t){h2[t.annotation]=t});var oR=function(t,n,r){if(Mr(n))switch(n[0]){case"symbol":return u2.untransform(t,n,r);case"class":return x2.untransform(t,n,r);case"custom":return f2.untransform(t,n,r);case"typed-array":return p2.untransform(t,n,r);default:throw new Error("Unknown transformation: "+n)}else{var o=h2[n];if(!o)throw new Error("Unknown transformation: "+n);return o.untransform(t,r)}},Co=function(t,n){for(var r=t.keys();n>0;)r.next(),n--;return r.next().value};function g2(t){if(gu(t,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(gu(t,"prototype"))throw new Error("prototype is not allowed as a property");if(gu(t,"constructor"))throw new Error("constructor is not allowed as a property")}var iR=function(t,n){g2(n);for(var r=0;r<n.length;r++){var o=n[r];if(rc(t))t=Co(t,+o);else if(nc(t)){var i=+o,d=+n[++r]==0?"key":"value",u=Co(t,i);switch(d){case"key":t=u;break;case"value":t=t.get(u);break}}else t=t[o]}return t},_f=function(t,n,r){if(g2(n),n.length===0)return r(t);for(var o=t,i=0;i<n.length-1;i++){var d=n[i];if(Mr(o)){var u=+d;o=o[u]}else if(ac(o))o=o[d];else if(rc(o)){var p=+d;o=Co(o,p)}else if(nc(o)){var x=i===n.length-2;if(x)break;var p=+d,h=+n[++i]==0?"key":"value",v=Co(o,p);switch(h){case"key":o=v;break;case"value":o=o.get(v);break}}}var g=n[n.length-1];if(Mr(o)?o[+g]=r(o[+g]):ac(o)&&(o[g]=r(o[g])),rc(o)){var y=Co(o,+g),N=r(y);y!==N&&(o.delete(y),o.add(N))}if(nc(o)){var p=+n[n.length-2],j=Co(o,p),h=+g==0?"key":"value";switch(h){case"key":{var w=r(j);o.set(w,o.get(j)),w!==j&&o.delete(j);break}case"value":{o.set(j,r(o.get(j)));break}}}return t},Fn=function(t,n){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var o=r.call(t),i,d=[],u;try{for(;(n===void 0||n-- >0)&&!(i=o.next()).done;)d.push(i.value)}catch(p){u={error:p}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(u)throw u.error}}return d},kr=function(t,n){for(var r=0,o=n.length,i=t.length;r<o;r++,i++)t[i]=n[r];return t};function Mf(t,n,r){if(r===void 0&&(r=[]),!!t){if(!Mr(t)){_o(t,function(u,p){return Mf(u,n,kr(kr([],Fn(r)),Fn(Qi(p))))});return}var o=Fn(t,2),i=o[0],d=o[1];d&&_o(d,function(u,p){Mf(u,n,kr(kr([],Fn(r)),Fn(Qi(p))))}),n(i,r)}}function cR(t,n,r){return Mf(n,function(o,i){t=_f(t,i,function(d){return oR(d,o,r)})}),t}function dR(t,n){function r(u,p){var x=iR(t,Qi(p));
49u.map(Qi).forEach(function(h){t=_f(t,h,function(){return x})})}if(Mr(n)){var o=Fn(n,2),i=o[0],d=o[1];i.forEach(function(u){t=_f(t,Qi(u),function(){return t})}),d&&_o(d,r)}else _o(n,r);return t}var uR=function(t,n){return ac(t)||Mr(t)||nc(t)||rc(t)||m2(t,n)};function pR(t,n,r){var o=r.get(t);o?o.push(n):r.set(t,[n])}function mR(t,n){var r={},o=void 0;return t.forEach(function(i){if(!(i.length<=1)){n||(i=i.map(function(x){return x.map(String)}).sort(function(x,h){return x.length-h.length}));var d=Fn(i),u=d[0],p=d.slice(1);u.length===0?o=p.map(Gx):r[Gx(u)]=p.map(Gx)}}),o?kf(r)?[o]:[o,r]:kf(r)?void 0:r}var b2=function(t,n,r,o,i,d,u){var p;i===void 0&&(i=[]),d===void 0&&(d=[]),u===void 0&&(u=new Map);var x=eR(t);if(!x){pR(t,i,n);var h=u.get(t);if(h)return o?{transformedValue:null}:h}if(!uR(t,r)){var v=Dy(t,r),g=v?{transformedValue:v.value,annotations:[v.type]}:{transformedValue:t};return x||u.set(t,g),g}if(gu(d,t))return{transformedValue:null};var y=Dy(t,r),N=(p=y?.value)!==null&&p!==void 0?p:t,j=Mr(N)?[]:{},w={};_o(N,function(C,E){var T=b2(C,n,r,o,kr(kr([],Fn(i)),[E]),kr(kr([],Fn(d)),[t]),u);j[E]=T.transformedValue,Mr(T.annotations)?w[E]=T.annotations:ac(T.annotations)&&_o(T.annotations,function(D,M){w[c2(E)+"."+M]=D})});var A=kf(w)?{transformedValue:j,annotations:y?[y.type]:void 0}:{transformedValue:j,annotations:y?[y.type,w]:w};return x||u.set(t,A),A};function v2(t){return Object.prototype.toString.call(t).slice(8,-1)}function Ty(t){return v2(t)==="Array"}function xR(t){if(v2(t)!=="Object")return!1;const n=Object.getPrototypeOf(t);return!!n&&n.constructor===Object&&n===Object.prototype}function fR(t,n,r,o,i){const d={}.propertyIsEnumerable.call(o,n)?"enumerable":"nonenumerable";d==="enumerable"&&(t[n]=r),i&&d==="nonenumerable"&&Object.defineProperty(t,n,{value:r,enumerable:!1,writable:!0,configurable:!0})}function Pf(t,n={}){if(Ty(t))return t.map(i=>Pf(i,n));if(!xR(t))return t;const r=Object.getOwnPropertyNames(t),o=Object.getOwnPropertySymbols(t);return[...r,...o].reduce((i,d)=>{if(Ty(n.props)&&!n.props.includes(d))return i;const u=t[d],p=Pf(u,n);return fR(i,d,p,t,n.nonenumerable),i},{})}var fl=function(){return fl=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},fl.apply(this,arguments)},hR=function(t,n){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var o=r.call(t),i,d=[],u;try{for(;(n===void 0||n-- >0)&&!(i=o.next()).done;)d.push(i.value)}catch(p){u={error:p}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(u)throw u.error}}return d},gR=function(t,n){for(var r=0,o=n.length,i=t.length;r<o;r++,i++)t[i]=n[r];return t},Qn=(function(){function t(n){var r=n===void 0?{}:n,o=r.dedupe,i=o===void 0?!1:o;this.classRegistry=new VE,this.symbolRegistry=new l2(function(d){var u;return(u=d.description)!==null&&u!==void 0?u:""}),this.customTransformerRegistry=new GE,this.allowedErrorProps=[],this.dedupe=i}return t.prototype.serialize=function(n){var r=new Map,o=b2(n,r,this,this.dedupe),i={json:o.transformedValue};o.annotations&&(i.meta=fl(fl({},i.meta),{values:o.annotations}));var d=mR(r,this.dedupe);return d&&(i.meta=fl(fl({},i.meta),{referentialEqualities:d})),i},t.prototype.deserialize=function(n){var r=n.json,o=n.meta,i=Pf(r);return o?.values&&(i=cR(i,o.values,this)),o?.referentialEqualities&&(i=dR(i,o.referentialEqualities)),i},t.prototype.stringify=function(n){return JSON.stringify(this.serialize(n))},t.prototype.parse=function(n){return this.deserialize(JSON.parse(n))},t.prototype.registerClass=function(n,r){this.classRegistry.register(n,r)},t.prototype.registerSymbol=function(n,r){this.symbolRegistry.register(n,r)},t.prototype.registerCustom=function(n,r){this.customTransformerRegistry.register(fl({name:r},n))},t.prototype.allowErrorProps=function(){for(var n,r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];(n=this.allowedErrorProps).push.apply(n,gR([],hR(r)))},t.defaultInstance=new t,t.serialize=t.defaultInstance.serialize.bind(t.defaultInstance),t.deserialize=t.defaultInstance.deserialize.bind(t.defaultInstance),t.stringify=t.defaultInstance.stringify.bind(t.defaultInstance),t.parse=t.defaultInstance.parse.bind(t.defaultInstance),t.registerClass=t.defaultInstance.registerClass.bind(t.defaultInstance),t.registerSymbol=t.defaultInstance.registerSymbol.bind(t.defaultInstance),t.registerCustom=t.defaultInstance.registerCustom.bind(t.defaultInstance),t.allowErrorProps=t.defaultInstance.allowErrorProps.bind(t.defaultInstance),t})();Qn.serialize;Qn.deserialize;Qn.stringify;Qn.parse;Qn.registerClass;Qn.registerCustom;Qn.registerSymbol;Qn.allowErrorProps;var bR=(t,n,r,o,i,d,u,p)=>{let x=document.documentElement,h=["light","dark"];
vendor: 7,464 bytes, line 49
49function v(N){(Array.isArray(t)?t:[t]).forEach(j=>{let w=j==="class",A=w&&d?i.map(C=>d[C]||C):i;w?(x.classList.remove(...A),x.classList.add(d&&d[N]?d[N]:N)):x.setAttribute(j,N)}),g(N)}function g(N){p&&h.includes(N)&&(x.style.colorScheme=N)}function y(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(o)v(o);else try{let N=localStorage.getItem(n)||r,j=u&&N==="system"?y():N;v(j)}catch{}},vR=b.createContext(void 0),yR={setTheme:t=>{},themes:[]},wR=()=>{var t;return(t=b.useContext(vR))!=null?t:yR};b.memo(({forcedTheme:t,storageKey:n,attribute:r,enableSystem:o,enableColorScheme:i,defaultTheme:d,value:u,themes:p,nonce:x,scriptProps:h})=>{let v=JSON.stringify([r,n,d,t,p,u,o,i]).slice(1,-1);return b.createElement("script",{...h,suppressHydrationWarning:!0,nonce:typeof window>"u"?x:"",dangerouslySetInnerHTML:{__html:`(${bR.toString()})(${v})`}})});var vc=r2();const y2=bw(vc);function SR(t){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",n.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}const jR=t=>{switch(t){case"success":return CR;case"info":return RR;case"warning":return ER;case"error":return kR;default:return null}},NR=Array(12).fill(0),AR=({visible:t,className:n})=>se.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":t},se.createElement("div",{className:"sonner-spinner"},NR.map((r,o)=>se.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${o}`})))),CR=se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},se.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),ER=se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},se.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),RR=se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},se.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),kR=se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},se.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),DR=se.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},se.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),se.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),TR=()=>{const[t,n]=se.useState(document.hidden);return se.useEffect(()=>{const r=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),t};let Hf=1;class OR{constructor(){this.subscribe=n=>(this.subscribers.push(n),()=>{const r=this.subscribers.indexOf(n);this.subscribers.splice(r,1)}),this.publish=n=>{this.subscribers.forEach(r=>r(n))},this.addToast=n=>{this.publish(n),this.toasts=[...this.toasts,n]},this.create=n=>{var r;const{message:o,...i}=n,d=typeof n?.id=="number"||((r=n.id)==null?void 0:r.length)>0?n.id:Hf++,u=this.toasts.find(x=>x.id===d),p=n.dismissible===void 0?!0:n.dismissible;return this.dismissedToasts.has(d)&&this.dismissedToasts.delete(d),u?this.toasts=this.toasts.map(x=>x.id===d?(this.publish({...x,...n,id:d,title:o}),{...x,...n,id:d,dismissible:p,title:o}):x):this.addToast({title:o,...i,dismissible:p,id:d}),d},this.dismiss=n=>(n?(this.dismissedToasts.add(n),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:n,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(o=>o({id:r.id,dismiss:!0}))}),n),this.message=(n,r)=>this.create({...r,message:n}),this.error=(n,r)=>this.create({...r,message:n,type:"error"}),this.success=(n,r)=>this.create({...r,type:"success",message:n}),this.info=(n,r)=>this.create({...r,type:"info",message:n}),this.warning=(n,r)=>this.create({...r,type:"warning",message:n}),this.loading=(n,r)=>this.create({...r,type:"loading",message:n}),this.promise=(n,r)=>{if(!r)return;let o;r.loading!==void 0&&(o=this.create({...r,promise:n,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const i=Promise.resolve(n instanceof Function?n():n);let d=o!==void 0,u;const p=i.then(async h=>{if(u=["resolve",h],se.isValidElement(h))d=!1,this.create({id:o,type:"default",message:h});else if(MR(h)&&!h.ok){d=!1;const g=typeof r.error=="function"?await r.error(`HTTP error! status: ${h.status}`):r.error,y=typeof r.description=="function"?await r.description(`HTTP error! status: ${h.status}`):r.description,j=typeof g=="object"&&!se.isValidElement(g)?g:{message:g};this.create({id:o,type:"error",description:y,...j})}else if(h instanceof Error){d=!1;const g=typeof r.error=="function"?await r.error(h):r.error,y=typeof r.description=="function"?await r.description(h):r.description,j=typeof g=="object"&&!se.isValidElement(g)?g:{message:g};this.create({id:o,type:"error",description:y,...j})}else if(r.success!==void 0){d=!1;const g=typeof r.success=="function"?await r.success(h):r.success,y=typeof r.description=="function"?await r.description(h):r.description,j=typeof g=="object"&&!se.isValidElement(g)?g:{message:g};this.create({id:o,type:"success",description:y,...j})}}).catch(async h=>{if(u=["reject",h],r.error!==void 0){d=!1;const v=typeof r.error=="function"?await r.error(h):r.error,g=typeof r.description=="function"?await r.description(h):r.description,N=typeof v=="object"&&!se.isValidElement(v)?v:{message:v};this.create({id:o,type:"error",description:g,...N})}}).finally(()=>{d&&(this.dismiss(o),o=void 0),r.finally==null||r.finally.call(r)}),x=()=>new Promise((h,v)=>p.then(()=>u[0]==="reject"?v(u[1]):h(u[1])).catch(v));return typeof o!="string"&&typeof o!="number"?{unwrap:x}:Object.assign(o,{unwrap:x})},this.custom=(n,r)=>{const o=r?.id||Hf++;return this.create({jsx:n(o),id:o,...r}),o},this.getActiveToasts=()=>this.toasts.filter(n=>!this.dismissedToasts.has(n.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Zs=new OR,_R=(t,n)=>{const r=n?.id||Hf++;return Zs.addToast({title:t,...n,id:r}),r},MR=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",PR=_R,HR=()=>Zs.toasts,LR=()=>Zs.getActiveToasts(),xe=Object.assign(PR,{success:Zs.success,info:Zs.info,warning:Zs.warning,error:Zs.error,custom:Zs.custom,message:Zs.message,promise:Zs.promise,dismiss:Zs.dismiss,loading:Zs.loading},{getHistory:HR,getToasts:LR});SR
vendor: 14,873 bytes, line 49
49("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function
vendor: 956 bytes, line 49
49eu(t){return t.label!==void 0}const zR=3,IR="24px",BR="16px",Oy=4e3,VR=356,FR=14,UR=45,$R=200;function un(...t){return t.filter(Boolean).join(" ")}function GR(t){const[n,r]=t.split("-"),o=[];return n&&o.push(n),r&&o.push(r),o}const KR=t=>{var n,r,o,i,d,u,p,x,h;const{invert:v,toast:g,unstyled:y,interacting:N,setHeights:j,visibleToasts:w,heights:A,index:C,toasts:E,expanded:T,removeToast:D,defaultRichColors:M,closeButton:z,style:O,cancelButtonStyle:H,actionButtonStyle:K,className:ne="",descriptionClassName:le="",duration:Z,position:X,gap:q,expandByDefault:Q,classNames:R,icons:P,closeButtonAriaLabel:B="Close toast"}=t,[V,re]=se.useState(null),[_,L]=se.useState(null),[I,G]=se.useState(!1),[J,me]=se.useState(!1),[W,he]=se.useState(!1),[ve,He]=se.useState(!1),[ze,Be]=se.useState(!1),[dt,Ne]=se.useState(0),[As,vs]=se.useState(0),ot=se.useRef(g.duration||Z||Oy),fe=se.useRef(null),$e=se.useRef(null),St=C===0,ta=C+1<=w,$t=g.type,ys=g.dismissible!==!1,Gt
vendor: 19,232 bytes, line 49
49=g.className||"",Ia=g.descriptionClassName||"",sa=se.useMemo(()=>A.findIndex(Ae=>Ae.toastId===g.id)||0,[A,g.id]),Fs=se.useMemo(()=>{var Ae;return(Ae=g.closeButton)!=null?Ae:z},[g.closeButton,z]),Hs=se.useMemo(()=>g.duration||Z||Oy,[g.duration,Z]),aa=se.useRef(0),Ds=se.useRef(0),Zn=se.useRef(0),Ts=se.useRef(null),[va,us]=X.split("-"),Ls=se.useMemo(()=>A.reduce((Ae,Fe,yt)=>yt>=sa?Ae:Ae+Fe.height,0),[A,sa]),Wt=TR(),Wn=g.invert||v,Ba=$t==="loading";Ds.current=se.useMemo(()=>sa*q+Ls,[sa,Ls]),se.useEffect(()=>{ot.current=Hs},[Hs]),se.useEffect(()=>{G(!0)},[]),se.useEffect(()=>{const Ae=$e.current;if(Ae){const Fe=Ae.getBoundingClientRect().height;return vs(Fe),j(yt=>[{toastId:g.id,height:Fe,position:g.position},...yt]),()=>j(yt=>yt.filter(gt=>gt.toastId!==g.id))}},[j,g.id]),se.useLayoutEffect(()=>{if(!I)return;const Ae=$e.current,Fe=Ae.style.height;Ae.style.height="auto";const yt=Ae.getBoundingClientRect().height;Ae.style.height=Fe,vs(yt),j(gt=>gt.find(at=>at.toastId===g.id)?gt.map(at=>at.toastId===g.id?{...at,height:yt}:at):[{toastId:g.id,height:yt,position:g.position},...gt])},[I,g.title,g.description,j,g.id,g.jsx,g.action,g.cancel]);const ke=se.useCallback(()=>{me(!0),Ne(Ds.current),j(Ae=>Ae.filter(Fe=>Fe.toastId!==g.id)),setTimeout(()=>{D(g)},$R)},[g,D,j,Ds]);se.useEffect(()=>{if(g.promise&&$t==="loading"||g.duration===1/0||g.type==="loading")return;let Ae;return T||N||Wt?(()=>{if(Zn.current<aa.current){const gt=new Date().getTime()-aa.current;ot.current=ot.current-gt}Zn.current=new Date().getTime()})():(()=>{ot.current!==1/0&&(aa.current=new Date().getTime(),Ae=setTimeout(()=>{g.onAutoClose==null||g.onAutoClose.call(g,g),ke()},ot.current))})(),()=>clearTimeout(Ae)},[T,N,g,$t,Wt,ke]),se.useEffect(()=>{g.delete&&(ke(),g.onDismiss==null||g.onDismiss.call(g,g))},[ke,g.delete]);function Xe(){var Ae;if(P?.loading){var Fe;return se.createElement("div",{className:un(R?.loader,g==null||(Fe=g.classNames)==null?void 0:Fe.loader,"sonner-loader"),"data-visible":$t==="loading"},P.loading)}return se.createElement(AR,{className:un(R?.loader,g==null||(Ae=g.classNames)==null?void 0:Ae.loader),visible:$t==="loading"})}const st=g.icon||P?.[$t]||jR($t);var Ve,ut;return se.createElement("li",{tabIndex:0,ref:$e,className:un(ne,Gt,R?.toast,g==null||(n=g.classNames)==null?void 0:n.toast,R?.default,R?.[$t],g==null||(r=g.classNames)==null?void 0:r[$t]),"data-sonner-toast":"","data-rich-colors":(Ve=g.richColors)!=null?Ve:M,"data-styled":!(g.jsx||g.unstyled||y),"data-mounted":I,"data-promise":!!g.promise,"data-swiped":ze,"data-removed":J,"data-visible":ta,"data-y-position":va,"data-x-position":us,"data-index":C,"data-front":St,"data-swiping":W,"data-dismissible":ys,"data-type":$t,"data-invert":Wn,"data-swipe-out":ve,"data-swipe-direction":_,"data-expanded":!!(T||Q&&I),"data-testid":g.testId,style:{"--index":C,"--toasts-before":C,"--z-index":E.length-C,"--offset":`${J?dt:Ds.current}px`,"--initial-height":Q?"auto":`${As}px`,...O,...g.style},onDragEnd:()=>{he(!1),re(null),Ts.current=null},onPointerDown:Ae=>{Ae.button!==2&&(Ba||!ys||(fe.current=new Date,Ne(Ds.current),Ae.target.setPointerCapture(Ae.pointerId),Ae.target.tagName!=="BUTTON"&&(he(!0),Ts.current={x:Ae.clientX,y:Ae.clientY})))},onPointerUp:()=>{var Ae,Fe,yt;if(ve||!ys)return;Ts.current=null;const gt=Number(((Ae=$e.current)==null?void 0:Ae.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),ws=Number(((Fe=$e.current)==null?void 0:Fe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),at=new Date().getTime()-((yt=fe.current)==null?void 0:yt.getTime()),Ct=V==="x"?gt:ws,Us=Math.abs(Ct)/at;if(Math.abs(Ct)>=UR||Us>.11){Ne(Ds.current),g.onDismiss==null||g.onDismiss.call(g,g),L(V==="x"?gt>0?"right":"left":ws>0?"down":"up"),ke(),He(!0);return}else{var it,pt;(it=$e.current)==null||it.style.setProperty("--swipe-amount-x","0px"),(pt=$e.current)==null||pt.style.setProperty("--swipe-amount-y","0px")}Be(!1),he(!1),re(null)},onPointerMove:Ae=>{var Fe,yt,gt;if(!Ts.current||!ys||((Fe=window.getSelection())==null?void 0:Fe.toString().length)>0)return;const at=Ae.clientY-Ts.current.y,Ct=Ae.clientX-Ts.current.x;var Us;const it=(Us=t.swipeDirections)!=null?Us:GR(X);!V&&(Math.abs(Ct)>1||Math.abs(at)>1)&&re(Math.abs(Ct)>Math.abs(at)?"x":"y");let pt={x:0,y:0};const je=ps=>1/(1.5+Math.abs(ps)/20);if(V==="y"){if(it.includes("top")||it.includes("bottom"))if(it.includes("top")&&at<0||it.includes("bottom")&&at>0)pt.y=at;else{const ps=at*je(at);pt.y=Math.abs(ps)<Math.abs(at)?ps:at}}else if(V==="x"&&(it.includes("left")||it.includes("right")))if(it.includes("left")&&Ct<0||it.includes("right")&&Ct>0)pt.x=Ct;else{const ps=Ct*je(Ct);pt.x=Math.abs(ps)<Math.abs(Ct)?ps:Ct}(Math.abs(pt.x)>0||Math.abs(pt.y)>0)&&Be(!0),(yt=$e.current)==null||yt.style.setProperty("--swipe-amount-x",`${pt.x}px`),(gt=$e.current)==null||gt.style.setProperty("--swipe-amount-y",`${pt.y}px`)}},Fs&&!g.jsx&&$t!=="loading"?se.createElement("button",{"aria-label":B,"data-disabled":Ba,"data-close-button":!0,onClick:Ba||!ys?()=>{}:()=>{ke(),g.onDismiss==null||g.onDismiss.call(g,g)},className:un(R?.closeButton,g==null||(o=g.classNames)==null?void 0:o.closeButton)},(ut=P?.close)!=null?ut:DR):null,($t||g.icon||g.promise)&&g.icon!==null&&(P?.[$t]!==null||g.icon)?se.createElement("div",{"data-icon":"",className:un(R?.icon,g==null||(i=g.classNames)==null?void 0:i.icon)},g.promise||g.type==="loading"&&!g.icon?g.icon||Xe():null,g.type!=="loading"?st:null):null,se.createElement("div",{"data-content":"",className:un(R?.content,g==null||(d=g.classNames)==null?void 0:d.content)},se.createElement("div",{"data-title":"",className:un(R?.title,g==null||(u=g.classNames)==null?void 0:u.title)},g.jsx?g.jsx:typeof g.title=="function"?g.title():g.title),g.description?se.createElement("div",{"data-description":"",className:un(le,Ia,R?.description,g==null||(p=g.classNames)==null?void 0:p.description)},typeof g.description=="function"?g.description():g.description):null),se.isValidElement(g.cancel)?g.cancel:g.cancel&&eu(g.cancel)?se.createElement("button",{"data-button":!0,"data-cancel":!0,style:g.cancelButtonStyle||H,onClick:Ae=>{eu(g.cancel)&&ys&&(g.cancel.onClick==null||g.cancel.onClick.call(g.cancel,Ae),ke())},className:un(R?.cancelButton,g==null||(x=g.classNames)==null?void 0:x.cancelButton)},g.cancel.label):null,se.isValidElement(g.action)?g.action:g.action&&eu(g.action)?se.createElement("button",{"data-button":!0,"data-action":!0,style:g.actionButtonStyle||K,onClick:Ae=>{eu(g.action)&&(g.action.onClick==null||g.action.onClick.call(g.action,Ae),!Ae.defaultPrevented&&ke())},className:un(R?.actionButton,g==null||(h=g.classNames)==null?void 0:h.actionButton)},g.action.label):null)};function _y(){if(typeof window>"u"||typeof document>"u")return"ltr";const t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function qR(t,n){const r={};return[t,n].forEach((o,i)=>{const d=i===1,u=d?"--mobile-offset":"--offset",p=d?BR:IR;function x(h){["top","right","bottom","left"].forEach(v=>{r[`${u}-${v}`]=typeof h=="number"?`${h}px`:h})}typeof o=="number"||typeof o=="string"?x(o):typeof o=="object"?["top","right","bottom","left"].forEach(h=>{o[h]===void 0?r[`${u}-${h}`]=p:r[`${u}-${h}`]=typeof o[h]=="number"?`${o[h]}px`:o[h]}):x(p)}),r}const QR=se.forwardRef(function(n,r){const{id:o,invert:i,position:d="bottom-right",hotkey:u=["altKey","KeyT"],expand:p,closeButton:x,className:h,offset:v,mobileOffset:g,theme:y="light",richColors:N,duration:j,style:w,visibleToasts:A=zR,toastOptions:C,dir:E=_y(),gap:T=FR,icons:D,containerAriaLabel:M="Notifications"}=n,[z,O]=se.useState([]),H=se.useMemo(()=>o?z.filter(I=>I.toasterId===o):z.filter(I=>!I.toasterId),[z,o]),K=se.useMemo(()=>Array.from(new Set([d].concat(H.filter(I=>I.position).map(I=>I.position)))),[H,d]),[ne,le]=se.useState([]),[Z,X]=se.useState(!1),[q,Q]=se.useState(!1),[R,P]=se.useState(y!=="system"?y:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),B=se.useRef(null),V=u.join("+").replace(/Key/g,"").replace(/Digit/g,""),re=se.useRef(null),_=se.useRef(!1),L=se.useCallback(I=>{O(G=>{var J;return(J=G.find(me=>me.id===I.id))!=null&&J.delete||Zs.dismiss(I.id),G.filter(({id:me})=>me!==I.id)})},[]);return se.useEffect(()=>Zs.subscribe(I=>{if(I.dismiss){requestAnimationFrame(()=>{O(G=>G.map(J=>J.id===I.id?{...J,delete:!0}:J))});return}setTimeout(()=>{y2.flushSync(()=>{O(G=>{const J=G.findIndex(me=>me.id===I.id);return J!==-1?[...G.slice(0,J),{...G[J],...I},...G.slice(J+1)]:[I,...G]})})})}),[z]),se.useEffect(()=>{if(y!=="system"){P(y);return}if(y==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?P("dark"):P("light")),typeof window>"u")return;const I=window.matchMedia("(prefers-color-scheme: dark)");try{I.addEventListener("change",({matches:G})=>{P(G?"dark":"light")})}catch{I.addListener(({matches:J})=>{try{P(J?"dark":"light")}catch(me){console.error(me)}})}},[y]),se.useEffect(()=>{z.length<=1&&X(!1)},[z]),se.useEffect(()=>{const I=G=>{var J;if(u.every(he=>G[he]||G.code===he)){var W;X(!0),(W=B.current)==null||W.focus()}G.code==="Escape"&&(document.activeElement===B.current||(J=B.current)!=null&&J.contains(document.activeElement))&&X(!1)};return document.addEventListener("keydown",I),()=>document.removeEventListener("keydown",I)},[u]),se.useEffect(()=>{if(B.current)return()=>{re.current&&(re.current.focus({preventScroll:!0}),re.current=null,_.current=!1)}},[B.current]),se.createElement("section",{ref:r,"aria-label":`${M} ${V}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},K.map((I,G)=>{var J;const[me,W]=I.split("-");return H.length?se.createElement("ol",{key:I,dir:E==="auto"?_y():E,tabIndex:-1,ref:B,className:h,"data-sonner-toaster":!0,"data-sonner-theme":R,"data-y-position":me,"data-x-position":W,style:{"--front-toast-height":`${((J=ne[0])==null?void 0:J.height)||0}px`,"--width":`${VR}px`,"--gap":`${T}px`,...w,...qR(v,g)},onBlur:he=>{_.current&&!he.currentTarget.contains(he.relatedTarget)&&(_.current=!1,re.current&&(re.current.focus({preventScroll:!0}),re.current=null))},onFocus:he=>{he.target instanceof HTMLElement&&he.target.dataset.dismissible==="false"||_.current||(_.current=!0,re.current=he.relatedTarget)},onMouseEnter:()=>X(!0),onMouseMove:()=>X(!0),onMouseLeave:()=>{q||X(!1)},onDragEnd:()=>X(!1),onPointerDown:he=>{he.target instanceof HTMLElement&&he.target.dataset.dismissible==="false"||Q(!0)},onPointerUp:()=>Q(!1)},H.filter(he=>!he.position&&G===0||he.position===I).map((he,ve)=>{var He,ze;return se.createElement(KR,{key:he.id,icons:D,index:ve,toast:he,defaultRichColors:N,duration:(He=C?.duration)!=null?He:j,className:C?.className,descriptionClassName:C?.descriptionClassName,invert:i,visibleToasts:A,closeButton:(ze=C?.closeButton)!=null?ze:x,interacting:q,position:I,style:C?.style,unstyled:C?.unstyled,classNames:C?.classNames,cancelButtonStyle:C?.cancelButtonStyle,actionButtonStyle:C?.actionButtonStyle,closeButtonAriaLabel:C?.closeButtonAriaLabel,removeToast:L,toasts:H.filter(Be=>Be.position==he.position),heights:ne.filter(Be=>Be.position==he.position),setHeights:le,expandByDefault:p,gap:T,expanded:Z,swipeDirections:n.swipeDirections})})):null}))}),YR=({...t})=>{const{theme:n="system"}=wR();return e.jsx(QR,{"data-loc":"client/src/components/ui/sonner.tsx:8",theme:n,className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...t})};function we(t,n,{checkForDefaultPrevented:r=!0}={}){return function(i){if(t?.(i),r===!1||!i.defaultPrevented)return n?.(i)}}function My(t,n){if(typeof t=="function")return t(n);t!=null&&(t.current=n)}function Gn(...t){return n=>{let r=!1;const o=t.map(i=>{const d=My(i,n);return!r&&typeof d=="function"&&(r=!0),d});if(r)return()=>{for(let i=0;i<o.length;i++){const d=o[i];typeof d=="function"?d():My(t[i],null)}}}}function lt(...t){return b.useCallback(Gn(...t),t)}function XR(t,n){const r=b.createContext(n),o=d=>{const{children:u,...p}=d,x=b.useMemo(()=>p,Object.values(p));return e.jsx(r.Provider,{value:x,children:u})};o.displayName=t+"Provider";function i(d){const u=b.useContext(r);if(u)return u;if(n!==void 0)return n;throw new Error(`\`${d}\` must be used within \`${t}\``)}return[o,i]}function Bs(t,n=[]){let r=[];function o(d,u){const p=b.createContext(u),x=r.length;r=[...r,u];const h=g=>{const{scope:y,children:N,...j}=g,w=y?.[t]?.[x]||p,A=b.useMemo(()=>j,Object.values(j));return e.jsx(w.Provider,{value:A,children:N})};h.displayName=d+"Provider";function v(g,y){const N=y?.[t]?.[x]||p,j=b.useContext(N);if(j)return j;if(u!==void 0)return u;throw new Error(`\`${g}\` must be used within \`${d}\``)}return[h,v]}const i=()=>{const d=r.map(u=>b.createContext(u));return function(p){const x=p?.[t]||d;return b.useMemo(()=>({[`__scope${t}`]:{...p,[t]:x}}),[p,x])}};return i.scopeName=t,[o,ZR(i,...n)]}function ZR(...t){const n=t[0];if(t.length===1)return n;const r=()=>{const o=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(d){const u=o.reduce((p,{useScope:x,scopeName:h})=>{const g=x(d)[`__scope${h}`];return{...p,...g}},{});return b.useMemo(()=>({[`__scope${n.scopeName}`]:u}),[u])}};return r.scopeName=n.scopeName,r}function Pr(t){const n=WR(t),r=b.forwardRef((o,i)=>{const{children:d,...u}=o,p=b.Children.toArray(d),x=p.find(JR);if(x){const h=x.props.children,v=p.map(g=>g===x?b.Children.count(h)>1?b.Children.only(null):b.isValidElement(h)?h.props.children:null:g);return e.jsx(n,{...u,ref:i,children:b.isValidElement(h)?b.cloneElement(h,void 0,v):null})}return e.jsx(n,{...u,ref:i,children:d})});return r.displayName=`${t}.Slot`,r}var vh=Pr("Slot");function WR(t){const n=b.forwardRef((r,o)=>{const{children:i,...d}=r;if(b.isValidElement(i)){const u=tk(i),p=ek(d,i.props);return i.type!==b.Fragment&&(p.ref=o?Gn(o,u):u),b.cloneElement(i,p)}return b.Children.count(i)>1?b.Children.only(null):null});return n.displayName=`${t}.SlotClone`,n}var w2=Symbol("radix.slottable");function S2(t){const n=({children:r})=>e.jsx(e.Fragment,{children:r});return n.displayName=`${t}.Slottable`,n.__radixId=w2,n}function JR(t){return b.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===w2}function ek(t,n){const r={...n};for(const o in n){const i=t[o],d=n[o];/^on[A-Z]/.test(o)?i&&d?r[o]=(...p)=>{const x=d(...p);return i(...p),x}:i&&(r[o]=i):o==="style"?r[o]={...i,...d}:o==="className"&&(r[o]=[i,d].filter(Boolean).join(" "))}return{...t,...r}}function tk(t){let n=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?t.ref:(n=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var sk=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Oe=sk.reduce((t,n)=>{const r=Pr(`Primitive.${n}`),o=b.forwardRef((i,d)=>{const{asChild:u,...p}=i,x=u?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),e.jsx(x,{...p,ref:d})});return o.displayName=`Primitive.${n}`,{...t,[n]:o}},{});function j2(t,n){t&&vc.flushSync(()=>t.dispatchEvent(n))}function Za(t){const n=b.useRef(t);return b.useEffect(()=>{n.current=t}),b.useMemo(()=>(...r)=>n.current?.(...r),[])}function ak(t,n=globalThis?.document){const r=Za(t);b.useEffect(()=>{const o=i=>{i.key==="Escape"&&r(i)};return n.addEventListener("keydown",o,{capture:!0}),()=>n.removeEventListener("keydown",o,{capture:!0})},[r,n])}var nk="DismissableLayer",Lf="dismissableLayer.update",rk="dismissableLayer.pointerDownOutside",lk="dismissableLayer.focusOutside",Py,N2=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Io=b.forwardRef((t,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:d,onInteractOutside:u,onDismiss:p,...x}=t,h=b.useContext(N2),[v,g]=b.useState(null),y=v?.ownerDocument??globalThis?.document,[,N]=b.useState({}),j=lt(n,O=>g(O)),w=Array.from(h.layers),[A]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),C=w.indexOf(A),E=v?w.indexOf(v):-1,T=h.layersWithOutsidePointerEventsDisabled.size>0,D=E>=C,M=ck(O=>{const H=O.target,K=[...h.branches].some(ne=>ne.contains(H));!D||K||(i?.(O),u?.(O),O.defaultPrevented||p?.())},y),z=dk(O=>{const H=O.target;[...h.branches].some(ne=>ne.contains(H))||(d?.(O),u?.(O),O.defaultPrevented||p?.())},y);return ak(O=>{E===h.layers.size-1&&(o?.(O),!O.defaultPrevented&&p&&(O.preventDefault(),p()))},y),b.useEffect(()=>{if(v)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(Py=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(v)),h.layers.add(v),Hy(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=Py)}},[v,y,r,h]),b.useEffect(()=>()=>{v&&(h.layers.delete(v),h.layersWithOutsidePointerEventsDisabled.delete(v),Hy())},[v,h]),b.useEffect(()=>{const O=()=>N({});return document.addEventListener(Lf,O),()=>document.removeEventListener(Lf,O)},[]),e.jsx(Oe.div,{...x,ref:j,style:{pointerEvents:T?D?"auto":"none":void 0,...t.style},onFocusCapture:we(t.onFocusCapture,z.onFocusCapture),onBlurCapture:we(t.onBlurCapture,z.onBlurCapture),onPointerDownCapture:we(t.onPointerDownCapture,M.onPointerDownCapture)})});Io.displayName=nk;var ok="DismissableLayerBranch",ik=b.forwardRef((t,n)=>{const r=b.useContext(N2),o=b.useRef(null),i=lt(n,o);return b.useEffect(()=>{const d=o.current;if(d)return r.branches.add(d),()=>{r.branches.delete(d)}},[r.branches]),e.jsx(Oe.div,{...t,ref:i})});ik.displayName=ok;function ck(t,n=globalThis?.document){const r=Za(t),o=b.useRef(!1),i=b.useRef(()=>{});return b.useEffect(()=>{const d=p=>{if(p.target&&!o.current){let x=function(){A2(rk,r,h,{discrete:!0})};const h={originalEvent:p};p.pointerType==="touch"?(n.removeEventListener("click",i.current),i.current=x,n.addEventListener("click",i.current,{once:!0})):x()}else n.removeEventListener("click",i.current);o.current=!1},u=window.setTimeout(()=>{n.addEventListener("pointerdown",d)},0);return()=>{window.clearTimeout(u),n.removeEventListener("pointerdown",d),n.removeEventListener("click",i.current)}},[n,r]),{onPointerDownCapture:()=>o.current=!0}}function dk(t,n=globalThis?.document){const r=Za(t),o=b.useRef(!1);return b.useEffect(()=>{const i=d=>{d.target&&!o.current&&A2(lk,r,{originalEvent:d},{discrete:!1})};return n.addEventListener("focusin",i),()=>n.removeEventListener("focusin",i)},[n,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Hy(){const t=new CustomEvent(Lf);document.dispatchEvent(t)}function A2(t,n,r,{discrete:o}){const i=r.originalEvent.target,d=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});n&&i.addEventListener(t,n,{once:!0}),o?j2(i,d):i.dispatchEvent(d)}var cs=globalThis?.document?b.useLayoutEffect:()=>{},uk=$u[" useId ".trim().toString()]||(()=>{}),pk=0;function bs(t){const[n,r]=b.useState(uk());return cs(()=>{r(o=>o??String(pk++))},[t]),t||(n?`radix-${n}`:"")}const mk=["top","right","bottom","left"],Hr=Math.min,ma=Math.max,Nu=Math.round,tu=Math.floor,gn=t=>({x:t,y:t}
vendor: 18,159 bytes, line 49
49),xk={left:"right",right:"left",bottom:"top",top:"bottom"},fk={start:"end",end:"start"};function zf(t,n,r){return ma(t,Hr(n,r))}function Kn(t,n){return typeof t=="function"?t(n):t}function qn(t){return t.split("-")[0]}function Bo(t){return t.split("-")[1]}function yh(t){return t==="x"?"y":"x"}function wh(t){return t==="y"?"height":"width"}const hk=new Set(["top","bottom"]);function fn(t){return hk.has(qn(t))?"y":"x"}function Sh(t){return yh(fn(t))}function gk(t,n,r){r===void 0&&(r=!1);const o=Bo(t),i=Sh(t),d=wh(i);let u=i==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return n.reference[d]>n.floating[d]&&(u=Au(u)),[u,Au(u)]}function bk(t){const n=Au(t);return[If(t),n,If(n)]}function If(t){return t.replace(/start|end/g,n=>fk[n])}const Ly=["left","right"],zy=["right","left"],vk=["top","bottom"],yk=["bottom","top"];function wk(t,n,r){switch(t){case"top":case"bottom":return r?n?zy:Ly:n?Ly:zy;case"left":case"right":return n?vk:yk;default:return[]}}function Sk(t,n,r,o){const i=Bo(t);let d=wk(qn(t),r==="start",o);return i&&(d=d.map(u=>u+"-"+i),n&&(d=d.concat(d.map(If)))),d}function Au(t){return t.replace(/left|right|bottom|top/g,n=>xk[n])}function jk(t){return{top:0,right:0,bottom:0,left:0,...t}}function C2(t){return typeof t!="number"?jk(t):{top:t,right:t,bottom:t,left:t}}function Cu(t){const{x:n,y:r,width:o,height:i}=t;return{width:o,height:i,top:r,left:n,right:n+o,bottom:r+i,x:n,y:r}}function Iy(t,n,r){let{reference:o,floating:i}=t;const d=fn(n),u=Sh(n),p=wh(u),x=qn(n),h=d==="y",v=o.x+o.width/2-i.width/2,g=o.y+o.height/2-i.height/2,y=o[p]/2-i[p]/2;let N;switch(x){case"top":N={x:v,y:o.y-i.height};break;case"bottom":N={x:v,y:o.y+o.height};break;case"right":N={x:o.x+o.width,y:g};break;case"left":N={x:o.x-i.width,y:g};break;default:N={x:o.x,y:o.y}}switch(Bo(n)){case"start":N[u]-=y*(r&&h?-1:1);break;case"end":N[u]+=y*(r&&h?-1:1);break}return N}const Nk=async(t,n,r)=>{const{placement:o="bottom",strategy:i="absolute",middleware:d=[],platform:u}=r,p=d.filter(Boolean),x=await(u.isRTL==null?void 0:u.isRTL(n));let h=await u.getElementRects({reference:t,floating:n,strategy:i}),{x:v,y:g}=Iy(h,o,x),y=o,N={},j=0;for(let w=0;w<p.length;w++){const{name:A,fn:C}=p[w],{x:E,y:T,data:D,reset:M}=await C({x:v,y:g,initialPlacement:o,placement:y,strategy:i,middlewareData:N,rects:h,platform:u,elements:{reference:t,floating:n}});v=E??v,g=T??g,N={...N,[A]:{...N[A],...D}},M&&j<=50&&(j++,typeof M=="object"&&(M.placement&&(y=M.placement),M.rects&&(h=M.rects===!0?await u.getElementRects({reference:t,floating:n,strategy:i}):M.rects),{x:v,y:g}=Iy(h,y,x)),w=-1)}return{x:v,y:g,placement:y,strategy:i,middlewareData:N}};async function lc(t,n){var r;n===void 0&&(n={});const{x:o,y:i,platform:d,rects:u,elements:p,strategy:x}=t,{boundary:h="clippingAncestors",rootBoundary:v="viewport",elementContext:g="floating",altBoundary:y=!1,padding:N=0}=Kn(n,t),j=C2(N),A=p[y?g==="floating"?"reference":"floating":g],C=Cu(await d.getClippingRect({element:(r=await(d.isElement==null?void 0:d.isElement(A)))==null||r?A:A.contextElement||await(d.getDocumentElement==null?void 0:d.getDocumentElement(p.floating)),boundary:h,rootBoundary:v,strategy:x})),E=g==="floating"?{x:o,y:i,width:u.floating.width,height:u.floating.height}:u.reference,T=await(d.getOffsetParent==null?void 0:d.getOffsetParent(p.floating)),D=await(d.isElement==null?void 0:d.isElement(T))?await(d.getScale==null?void 0:d.getScale(T))||{x:1,y:1}:{x:1,y:1},M=Cu(d.convertOffsetParentRelativeRectToViewportRelativeRect?await d.convertOffsetParentRelativeRectToViewportRelativeRect({elements:p,rect:E,offsetParent:T,strategy:x}):E);return{top:(C.top-M.top+j.top)/D.y,bottom:(M.bottom-C.bottom+j.bottom)/D.y,left:(C.left-M.left+j.left)/D.x,right:(M.right-C.right+j.right)/D.x}}const Ak=t=>({name:"arrow",options:t,async fn(n){const{x:r,y:o,placement:i,rects:d,platform:u,elements:p,middlewareData:x}=n,{element:h,padding:v=0}=Kn(t,n)||{};if(h==null)return{};const g=C2(v),y={x:r,y:o},N=Sh(i),j=wh(N),w=await u.getDimensions(h),A=N==="y",C=A?"top":"left",E=A?"bottom":"right",T=A?"clientHeight":"clientWidth",D=d.reference[j]+d.reference[N]-y[N]-d.floating[j],M=y[N]-d.reference[N],z=await(u.getOffsetParent==null?void 0:u.getOffsetParent(h));let O=z?z[T]:0;(!O||!await(u.isElement==null?void 0:u.isElement(z)))&&(O=p.floating[T]||d.floating[j]);const H=D/2-M/2,K=O/2-w[j]/2-1,ne=Hr(g[C],K),le=Hr(g[E],K),Z=ne,X=O-w[j]-le,q=O/2-w[j]/2+H,Q=zf(Z,q,X),R=!x.arrow&&Bo(i)!=null&&q!==Q&&d.reference[j]/2-(q<Z?ne:le)-w[j]/2<0,P=R?q<Z?q-Z:q-X:0;return{[N]:y[N]+P,data:{[N]:Q,centerOffset:q-Q-P,...R&&{alignmentOffset:P}},reset:R}}}),Ck=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(n){var r,o;const{placement:i,middlewareData:d,rects:u,initialPlacement:p,platform:x,elements:h}=n,{mainAxis:v=!0,crossAxis:g=!0,fallbackPlacements:y,fallbackStrategy:N="bestFit",fallbackAxisSideDirection:j="none",flipAlignment:w=!0,...A}=Kn(t,n);if((r=d.arrow)!=null&&r.alignmentOffset)return{};const C=qn(i),E=fn(p),T=qn(p)===p,D=await(x.isRTL==null?void 0:x.isRTL(h.floating)),M=y||(T||!w?[Au(p)]:bk(p)),z=j!=="none";!y&&z&&M.push(...Sk(p,w,j,D));const O=[p,...M],H=await lc(n,A),K=[];let ne=((o=d.flip)==null?void 0:o.overflows)||[];if(v&&K.push(H[C]),g){const q=gk(i,u,D);K.push(H[q[0]],H[q[1]])}if(ne=[...ne,{placement:i,overflows:K}],!K.every(q=>q<=0)){var le,Z;const q=(((le=d.flip)==null?void 0:le.index)||0)+1,Q=O[q];if(Q&&(!(g==="alignment"?E!==fn(Q):!1)||ne.every(B=>fn(B.placement)===E?B.overflows[0]>0:!0)))return{data:{index:q,overflows:ne},reset:{placement:Q}};let R=(Z=ne.filter(P=>P.overflows[0]<=0).sort((P,B)=>P.overflows[1]-B.overflows[1])[0])==null?void 0:Z.placement;if(!R)switch(N){case"bestFit":{var X;const P=(X=ne.filter(B=>{if(z){const V=fn(B.placement);return V===E||V==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(V=>V>0).reduce((V,re)=>V+re,0)]).sort((B,V)=>B[1]-V[1])[0])==null?void 0:X[0];P&&(R=P);break}case"initialPlacement":R=p;break}if(i!==R)return{reset:{placement:R}}}return{}}}};function By(t,n){return{top:t.top-n.height,right:t.right-n.width,bottom:t.bottom-n.height,left:t.left-n.width}}function Vy(t){return mk.some(n=>t[n]>=0)}const Ek=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(n){const{rects:r}=n,{strategy:o="referenceHidden",...i}=Kn(t,n);switch(o){case"referenceHidden":{const d=await lc(n,{...i,elementContext:"reference"}),u=By(d,r.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:Vy(u)}}}case"escaped":{const d=await lc(n,{...i,altBoundary:!0}),u=By(d,r.floating);return{data:{escapedOffsets:u,escaped:Vy(u)}}}default:return{}}}}},E2=new Set(["left","top"]);async function Rk(t,n){const{placement:r,platform:o,elements:i}=t,d=await(o.isRTL==null?void 0:o.isRTL(i.floating)),u=qn(r),p=Bo(r),x=fn(r)==="y",h=E2.has(u)?-1:1,v=d&&x?-1:1,g=Kn(n,t);let{mainAxis:y,crossAxis:N,alignmentAxis:j}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return p&&typeof j=="number"&&(N=p==="end"?j*-1:j),x?{x:N*v,y:y*h}:{x:y*h,y:N*v}}const kk=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(n){var r,o;const{x:i,y:d,placement:u,middlewareData:p}=n,x=await Rk(n,t);return u===((r=p.offset)==null?void 0:r.placement)&&(o=p.arrow)!=null&&o.alignmentOffset?{}:{x:i+x.x,y:d+x.y,data:{...x,placement:u}}}}},Dk=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(n){const{x:r,y:o,placement:i}=n,{mainAxis:d=!0,crossAxis:u=!1,limiter:p={fn:A=>{let{x:C,y:E}=A;return{x:C,y:E}}},...x}=Kn(t,n),h={x:r,y:o},v=await lc(n,x),g=fn(qn(i)),y=yh(g);let N=h[y],j=h[g];if(d){const A=y==="y"?"top":"left",C=y==="y"?"bottom":"right",E=N+v[A],T=N-v[C];N=zf(E,N,T)}if(u){const A=g==="y"?"top":"left",C=g==="y"?"bottom":"right",E=j+v[A],T=j-v[C];j=zf(E,j,T)}const w=p.fn({...n,[y]:N,[g]:j});return{...w,data:{x:w.x-r,y:w.y-o,enabled:{[y]:d,[g]:u}}}}}},Tk=function(t){return t===void 0&&(t={}),{options:t,fn(n){const{x:r,y:o,placement:i,rects:d,middlewareData:u}=n,{offset:p=0,mainAxis:x=!0,crossAxis:h=!0}=Kn(t,n),v={x:r,y:o},g=fn(i),y=yh(g);let N=v[y],j=v[g];const w=Kn(p,n),A=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(x){const T=y==="y"?"height":"width",D=d.reference[y]-d.floating[T]+A.mainAxis,M=d.reference[y]+d.reference[T]-A.mainAxis;N<D?N=D:N>M&&(N=M)}if(h){var C,E;const T=y==="y"?"width":"height",D=E2.has(qn(i)),M=d.reference[g]-d.floating[T]+(D&&((C=u.offset)==null?void 0:C[g])||0)+(D?0:A.crossAxis),z=d.reference[g]+d.reference[T]+(D?0:((E=u.offset)==null?void 0:E[g])||0)-(D?A.crossAxis:0);j<M?j=M:j>z&&(j=z)}return{[y]:N,[g]:j}}}},Ok=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(n){var r,o;const{placement:i,rects:d,platform:u,elements:p}=n,{apply:x=()=>{},...h}=Kn(t,n),v=await lc(n,h),g=qn(i),y=Bo(i),N=fn(i)==="y",{width:j,height:w}=d.floating;let A,C;g==="top"||g==="bottom"?(A=g,C=y===(await(u.isRTL==null?void 0:u.isRTL(p.floating))?"start":"end")?"left":"right"):(C=g,A=y==="end"?"top":"bottom");const E=w-v.top-v.bottom,T=j-v.left-v.right,D=Hr(w-v[A],E),M=Hr(j-v[C],T),z=!n.middlewareData.shift;let O=D,H=M;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(H=T),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(O=E),z&&!y){const ne=ma(v.left,0),le=ma(v.right,0),Z=ma(v.top,0),X=ma(v.bottom,0);N?H=j-2*(ne!==0||le!==0?ne+le:ma(v.left,v.right)):O=w-2*(Z!==0||X!==0?Z+X:ma(v.top,v.bottom))}await x({...n,availableWidth:H,availableHeight:O});const K=await u.getDimensions(p.floating);return j!==K.width||w!==K.height?{reset:{rects:!0}}:{}}}};function Zu(){return typeof window<"u"}function Vo(t){return R2(t)?(t.nodeName||"").toLowerCase():"#document"}function ha(t){var n;return(t==null||(n=t.ownerDocument)==null?void 0:n.defaultView)||window}function Sn(t){var n;return(n=(R2(t)?t.ownerDocument:t.document)||window.document)==null?void 0:n.documentElement}function R2(t){return Zu()?t instanceof Node||t instanceof ha(t).Node:!1}function Wa(t){return Zu()?t instanceof Element||t instanceof ha(t).Element:!1}function vn(t){return Zu()?t instanceof HTMLElement||t instanceof ha(t).HTMLElement:!1}function Fy(t){return!Zu()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof ha(t).ShadowRoot}const _k=new Set(["inline","contents"]);function yc(t){const{overflow:n,overflowX:r,overflowY:o,display:i}=Ja(t);return/auto|scroll|overlay|hidden|clip/.test(n+o+r)&&!_k.has(i)}const Mk=new Set(["table","td","th"]);function Pk(t){return Mk.has(Vo(t))}const Hk=[":popover-open",":modal"];function Wu(t){return Hk.some(n=>{try{return t.matches(n)}catch{return!1}})}const Lk=["transform","translate","scale","rotate","perspective"],zk=["transform","translate","scale","rotate","perspective","filter"],Ik=["paint","layout","strict","content"];function jh(t){const n=Nh(),r=Wa(t)?Ja(t):t;return Lk.some(o=>r[o]?r[o]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!n&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!n&&(r.filter?r.filter!=="none":!1)||zk.some(o=>(r.willChange||"").includes(o))||Ik.some(o=>(r.contain||"").includes(o))}function Bk(t){let n=Lr(t);for(;vn(n)&&!Mo(n);){if(jh(n))return n;if(Wu(n))return null;n=Lr(n)}return null}function Nh(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Vk=new Set(["html","body","#document"]);function Mo(t){return Vk.has(Vo(t))}function Ja(t){return ha(t).getComputedStyle(t)}function Ju(t){return Wa(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Lr(t){if(Vo(t)==="html")return t;const n=t.assignedSlot||t.parentNode||Fy(t)&&t.host||Sn(t);return Fy(n)?n.host:n}function k2(t){const n=Lr(t);return Mo(n)?t.ownerDocument?t.ownerDocument.body:t.body:vn(n)&&yc(n)?n:k2(n)}function oc(t,n,r){var o;n===void 0&&(n=[]),r===void 0&&(r=!0);const i=k2(t),d=i===((o=t.ownerDocument)==null?void 0:o.body),u=ha(i);if(d){const p=Bf(u);return n.concat(u,u.visualViewport||[],yc(i)?i:[],p&&r?oc(p):[])}return n.concat(i,oc(i,[],r))}function Bf(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function D2(t){const n=Ja(t);let r=parseFloat(n.width)||0,o=parseFloat(n.height)||0;const i=vn(t),d=i?t.offsetWidth:r,u=i?t.offsetHeight:o,p=Nu(r)!==d||Nu(o)!==u;return p&&(r=d,o=u),{width:r,height:o,$:p}}function Ah(t){return Wa(t)?t:t.contextElement}function ko(t){const n=Ah(t);if(!vn(n))return gn(1);const r=n.getBoundingClientRect(),{width:o,height:i,$:d}=D2(n);let u=(d?Nu(r.width):r.width)/o,p=(d?Nu(r.height):r.height)/i;return(!u||!Number.isFinite(u))&&(u=1),(!p||!Number.isFinite(p))&&(p=1),{x:u,y:p}}const Fk=gn(0);function T2(t){const n=ha(t);return!Nh()||!n.visualViewport?Fk:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function Uk(t,n,r){return n===void 0&&(n=!1),!r||n&&r!==ha(t)?!1:n}function Sl(t,n,r,o){n===void 0&&(n=!1),r===void 0&&(r=!1);const i=t.getBoundingClientRect(),d=Ah(t);let u=gn(1);n&&(o?Wa(o)&&(u=ko(o)):u=ko(t));const p=Uk(d,r,o)?T2(d):gn(0);let x=(i.left+p.x)/u.x,h=(i.top+p.y)/u.y,v=i.width/u.x,g=i.height/u.y;if(d){const y=ha(d),N=o&&Wa(o)?ha(o):o;let j=y,w=Bf(j);for(;w&&o&&N!==j;){const A=ko(w),C=w.getBoundingClientRect(),E=Ja(w),T=C.left+(w.clientLeft+parseFloat(E.paddingLeft))*A.x,D=C.top+(w.clientTop+parseFloat(E.paddingTop))*A.y;x*=A.x,h*=A.y,v*=A.x,g*=A.y,x+=T,h+=D,j=ha(w),w=Bf(j)}}return Cu({width:v,height:g,x,y:h})}function ep(t,n){const r=Ju(t).scrollLeft;return n?n.left+r:Sl(Sn(t)).left+r}function O2(t,n){const r=t.getBoundingClientRect(),o=r.left+n.scrollLeft-ep(t,r),i=r.top+n.scrollTop;return{x:o,y:i}}function $k(t){let{elements:n,rect:r,offsetParent:o,strategy:i}=t;const d=i==="fixed",u=Sn(o),p=n?Wu(n.floating):!1;if(o===u||p&&d)return r;let x={scrollLeft:0,scrollTop:0},h=gn(1);const v=gn(0),g=vn(o);if((g||!g&&!d)&&((Vo(o)!=="body"||yc(u))&&(x=Ju(o)),vn(o))){const N=Sl(o);h=ko(o),v.x=N.x+o.clientLeft,v.y=N.y+o.clientTop}const y=u&&!g&&!d?O2(u,x):gn(0);return{width:r.width*h.x,height:r.height*h.y,x:r.x*h.x-x.scrollLeft*h.x+v.x+y.x,y:r.y*h.y-x.scrollTop*h.y+v.y+y.y}}function Gk(t){return Array.from(t.getClientRects())}function Kk(t){const n=Sn(t),r=Ju(t),o=t.ownerDocument.body,i=ma(n.scrollWidth,n.clientWidth,o.scrollWidth,o.clientWidth),d=ma(n.scrollHeight,n.clientHeight,o.scrollHeight,o.clientHeight);let u=-r.scrollLeft+ep(t);const p=-r.scrollTop;return Ja(o).direction==="rtl"&&(u+=ma(n.clientWidth,o.clientWidth)-i),{width:i,height:d,x:u,y:p}}const Uy=25;function qk(t,n){const r=ha(t),o=Sn(t),i=r.visualViewport;let d=o.clientWidth,u=o.clientHeight,p=0,x=0;if(i){d=i.width,u=i.height;const v=Nh();(!v||v&&n==="fixed")&&(p=i.offsetLeft,x=i.offsetTop)}const h=ep(o);if(h<=0){const v=o.ownerDocument,g=v.body,y=getComputedStyle(g),N=v.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,j=Math.abs(o.clientWidth-g.clientWidth-N);j<=Uy&&(d-=j)}else h<=Uy&&(d+=h);return{width:d,height:u,x:p,y:x}}const Qk=new Set(["absolute","fixed"]);function Yk(t,n){const r=Sl(t,!0,n==="fixed"),o=r.top+t.clientTop,i=r.left+t.clientLeft,d=vn(t)?ko(t):gn(1),u=t.clientWidth*d.x,p=t.clientHeight*d.y,x=i*d.x,h=o*d.y;return{width:u,height:p,x,y:h}}function $y(t,n,r){let o;if(n==="viewport")o=qk(t,r);else if(n==="document")o=Kk(Sn(t));else if(Wa(n))o=Yk(n,r);else{const i=T2(t);o={x:n.x-i.x,y:n.y-i.y,width:n.width,height:n.height}}return Cu(o)}function _2(t,n){const r=Lr(t);return r===n||!Wa(r)||Mo(r)?!1:Ja(r).position==="fixed"||_2(r,n)}function Xk(t,n){const r=n.get(t);if(r)return r;let o=oc(t,[],!1).filter(p=>Wa(p)&&Vo(p)!=="body"),i=null;const d=Ja(t).position==="fixed";let u=d?Lr(t):t;for(;Wa(u)&&!Mo(u);){const p=Ja(u),x=jh(u);!x&&p.position==="fixed"&&(i=null),(d?!x&&!i:!x&&p.position==="static"&&!!i&&Qk.has(i.position)||yc(u)&&!x&&_2(t,u))?o=o.filter(v=>v!==u):i=p,u=Lr(u)}return n.set(t,o),o}function Zk(t){let{element:n,boundary:r,rootBoundary:o,strategy:i}=t;const u=[...r==="clippingAncestors"?Wu(n)?[]:Xk(n,this._c):[].concat(r),o],p=u[0],x=u.reduce((h,v)=>{const g=$y(n,v,i);return h.top=ma(g.top,h.top),h.right=Hr(g.right,h.right),h.bottom=Hr(g.bottom,h.bottom),h.left=ma(g.left,h.left),h},$y(n,p,i));return{width:x.right-x.left,height:x.bottom-x.top,x:x.left,y:x.top}}function Wk(t){const{width:n,height:r}=D2(t);return{width:n,height:r}}function Jk(t,n,r){const o=vn(n),i=Sn(n),d=r==="fixed",u=Sl(t,!0,d,n);let p={scrollLeft:0,scrollTop:0};const x=gn(0);function h(){x.x=ep(i)}if(o||!o&&!d)if((Vo(n)!=="body"||yc(i))&&(p=Ju(n)),o){const N=Sl(n,!0,d,n);x.x=N.x+n.clientLeft,x.y=N.y+n.clientTop}else i&&h();d&&!o&&i&&h();const v=i&&!o&&!d?O2(i,p):gn(0),g=u.left+p.scrollLeft-x.x-v.x,y=u.top+p.scrollTop-x.y-v.y;return{x:g,y,width:u.width,height:u.height}}function Kx(t){return Ja(t).position==="static"}function Gy(t,n){if(!vn(t)||Ja(t).position==="fixed")return null;if(n)return n(t);let r=t.offsetParent;return Sn(t)===r&&(r=r.ownerDocument.body),r}function M2(t,n){const r=ha(t);if(Wu(t))return r;if(!vn(t)){let i=Lr(t);for(;i&&!Mo(i);){if(Wa(i)&&!Kx(i))return i;i=Lr(i)}return r}let o=Gy(t,n);for(;o&&Pk(o)&&Kx(o);)o=Gy(o,n);return o&&Mo(o)&&Kx(o)&&!jh(o)?r:o||Bk(t)||r}const eD=async function(t){const n=this.getOffsetParent||M2,r=this.getDimensions,o=await r(t.floating);return{reference:Jk(t.reference,await n(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function tD(t){return Ja(t).direction==="rtl"}const sD={convertOffsetParentRelativeRectToViewportRelativeRect:$k,getDocumentElement:Sn,getClippingRect:Zk,getOffsetParent:M2,getElementRects:eD,getClientRects:Gk,getDimensions:Wk,getScale:ko,isElement:Wa,isRTL:tD};function P2(t,n){return t.x===n.x&&t.y===n.y&&t.width===n.width&&t.height===n.height}function aD(t,n){let r=null,o;const i=Sn(t);function d(){var p;clearTimeout(o),(p=r)==null||p.disconnect(),r=null}function u(p,x){p===void 0&&(p=!1),x===void 0&&(x=1),d();const h=t.getBoundingClientRect(),{left:v,top:g,width:y,height:N}=h;if(p||n(),!y||!N)return;const j=tu(g),w=tu(i.clientWidth-(v+y)),A=tu(i.clientHeight-(g+N)),C=tu(v),T={rootMargin:-j+"px "+-w+"px "+-A+"px "+-C+"px",threshold:ma(0,Hr(1,x))||1};let D=!0;function M(z){const O=z[0].intersectionRatio;
vendor: 8,977 bytes, line 49
49if(O!==x){if(!D)return u();O?u(!1,O):o=setTimeout(()=>{u(!1,1e-7)},1e3)}O===1&&!P2(h,t.getBoundingClientRect())&&u(),D=!1}try{r=new IntersectionObserver(M,{...T,root:i.ownerDocument})}catch{r=new IntersectionObserver(M,T)}r.observe(t)}return u(!0),d}function nD(t,n,r,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:d=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:p=typeof IntersectionObserver=="function",animationFrame:x=!1}=o,h=Ah(t),v=i||d?[...h?oc(h):[],...oc(n)]:[];v.forEach(C=>{i&&C.addEventListener("scroll",r,{passive:!0}),d&&C.addEventListener("resize",r)});const g=h&&p?aD(h,r):null;let y=-1,N=null;u&&(N=new ResizeObserver(C=>{let[E]=C;E&&E.target===h&&N&&(N.unobserve(n),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var T;(T=N)==null||T.observe(n)})),r()}),h&&!x&&N.observe(h),N.observe(n));let j,w=x?Sl(t):null;x&&A();function A(){const C=Sl(t);w&&!P2(w,C)&&r(),w=C,j=requestAnimationFrame(A)}return r(),()=>{var C;v.forEach(E=>{i&&E.removeEventListener("scroll",r),d&&E.removeEventListener("resize",r)}),g?.(),(C=N)==null||C.disconnect(),N=null,x&&cancelAnimationFrame(j)}}const rD=kk,lD=Dk,oD=Ck,iD=Ok,cD=Ek,Ky=Ak,dD=Tk,uD=(t,n,r)=>{const o=new Map,i={platform:sD,...r},d={...i.platform,_c:o};return Nk(t,n,{...i,platform:d})};var pD=typeof document<"u",mD=function(){},bu=pD?b.useLayoutEffect:mD;function Eu(t,n){if(t===n)return!0;if(typeof t!=typeof n)return!1;if(typeof t=="function"&&t.toString()===n.toString())return!0;let r,o,i;if(t&&n&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!==n.length)return!1;for(o=r;o--!==0;)if(!Eu(t[o],n[o]))return!1;return!0}if(i=Object.keys(t),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!{}.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){const d=i[o];if(!(d==="_owner"&&t.$$typeof)&&!Eu(t[d],n[d]))return!1}return!0}return t!==t&&n!==n}function H2(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function qy(t,n){const r=H2(t);return Math.round(n*r)/r}function qx(t){const n=b.useRef(t);return bu(()=>{n.current=t}),n}function xD(t){t===void 0&&(t={});const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:i,elements:{reference:d,floating:u}={},transform:p=!0,whileElementsMounted:x,open:h}=t,[v,g]=b.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[y,N]=b.useState(o);Eu(y,o)||N(o);const[j,w]=b.useState(null),[A,C]=b.useState(null),E=b.useCallback(B=>{B!==z.current&&(z.current=B,w(B))},[]),T=b.useCallback(B=>{B!==O.current&&(O.current=B,C(B))},[]),D=d||j,M=u||A,z=b.useRef(null),O=b.useRef(null),H=b.useRef(v),K=x!=null,ne=qx(x),le=qx(i),Z=qx(h),X=b.useCallback(()=>{if(!z.current||!O.current)return;const B={placement:n,strategy:r,middleware:y};le.current&&(B.platform=le.current),uD(z.current,O.current,B).then(V=>{const re={...V,isPositioned:Z.current!==!1};q.current&&!Eu(H.current,re)&&(H.current=re,vc.flushSync(()=>{g(re)}))})},[y,n,r,le,Z]);bu(()=>{h===!1&&H.current.isPositioned&&(H.current.isPositioned=!1,g(B=>({...B,isPositioned:!1})))},[h]);const q=b.useRef(!1);bu(()=>(q.current=!0,()=>{q.current=!1}),[]),bu(()=>{if(D&&(z.current=D),M&&(O.current=M),D&&M){if(ne.current)return ne.current(D,M,X);X()}},[D,M,X,ne,K]);const Q=b.useMemo(()=>({reference:z,floating:O,setReference:E,setFloating:T}),[E,T]),R=b.useMemo(()=>({reference:D,floating:M}),[D,M]),P=b.useMemo(()=>{const B={position:r,left:0,top:0};if(!R.floating)return B;const V=qy(R.floating,v.x),re=qy(R.floating,v.y);return p?{...B,transform:"translate("+V+"px, "+re+"px)",...H2(R.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:V,top:re}},[r,p,R.floating,v.x,v.y]);return b.useMemo(()=>({...v,update:X,refs:Q,elements:R,floatingStyles:P}),[v,X,Q,R,P])}const fD=t=>{function n(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:o,padding:i}=typeof t=="function"?t(r):t;return o&&n(o)?o.current!=null?Ky({element:o.current,padding:i}).fn(r):{}:o?Ky({element:o,padding:i}).fn(r):{}}}},hD=(t,n)=>({...rD(t),options:[t,n]}),gD=(t,n)=>({...lD(t),options:[t,n]}),bD=(t,n)=>({...dD(t),options:[t,n]}),vD=(t,n)=>({...oD(t),options:[t,n]}),yD=(t,n)=>({...iD(t),options:[t,n]}),wD=(t,n)=>({...cD(t),options:[t,n]}),SD=(t,n)=>({...fD(t),options:[t,n]});var jD="Arrow",L2=b.forwardRef((t,n)=>{const{children:r,width:o=10,height:i=5,...d}=t;return e.jsx(Oe.svg,{...d,ref:n,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:e.jsx("polygon",{points:"0,0 30,0 15,10"})})});L2.displayName=jD;var ND=L2;function z2(t){const[n,r]=b.useState(void 0);return cs(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const o=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const d=i[0];let u,p;if("borderBoxSize"in d){const x=d.borderBoxSize,h=Array.isArray(x)?x[0]:x;u=h.inlineSize,p=h.blockSize}else u=t.offsetWidth,p=t.offsetHeight;r({width:u,height:p})});return o.observe(t,{box:"border-box"}),()=>o.unobserve(t)}else r(void 0)},[t]),n}var Ch="Popper",[I2,Fr]=Bs(Ch),[AD,B2]=I2(Ch),V2=t=>{const{__scopePopper:n,children:r}=t,[o,i]=b.useState(null);return e.jsx(AD,{scope:n,anchor:o,onAnchorChange:i,children:r})};V2.displayName=Ch;var F2="PopperAnchor",U2=b.forwardRef((t,n)=>{const{__scopePopper:r,virtualRef:o,...i}=t,d=B2(F2,r),u=b.useRef(null),p=lt(n,u),x=b.useRef(null);return b.useEffect(()=>{const h=x.current;x.current=o?.current||u.current,h!==x.current&&d.onAnchorChange(x.current)}),o?null:e.jsx(Oe.div,{...i,ref:p})});U2.displayName=F2;var Eh="PopperContent",[CD,ED]=I2(Eh),$2=b.forwardRef((t,n)=>{const{__scopePopper:r,side:o="bottom",sideOffset:i=0,align:d="center",alignOffset:u=0,arrowPadding:p=0,avoidCollisions:x=!0,collisionBoundary:h=[],collisionPadding:v=0,sticky:g="partial",hideWhenDetached:y=!1,updatePositionStrategy:N="optimized",onPlaced:j,...w}=t,A=B2(Eh,r),[C,E]=b.useState(null),T=lt(n,W=>E(W)),[D,M]=b.useState(null),z=z2(D),O=z?.width??0,H=z?.height??0,K=o+(d!=="center"?"-"+d:""),ne=typeof v=="number"?v:{top:0,right:0,bottom:0,left:0,...v},le=Array.isArray(h)?h:[h],Z=le.length>0,X={padding:ne,boundary:le.filter(kD),altBoundary:Z},{refs:q,floatingStyles:Q,placement:R,isPositioned:P,middlewareData:B}=xD({strategy:"fixed",placement:K,whileElementsMounted:(...W)=>nD(...W,{animationFrame:N==="always"}),elements:{reference:A.anchor},middleware:[hD({mainAxis:i+H,alignmentAxis:u}),x&&gD({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?bD():void 0,...X}),x&&vD({...X}),yD({...X,apply:({elements:W,rects:he,availableWidth:ve,availableHeight:He})=>{const{width:ze,height:Be}=he.reference,dt=W.floating.style;dt.setProperty("--radix-popper-available-width",`${ve}px`),dt.setProperty("--radix-popper-available-height",`${He}px`),dt.setProperty("--radix-popper-anchor-width",`${ze}px`),dt.setProperty("--radix-popper-anchor-height",`${Be}px`)}}),D&&SD({element:D,padding:p}),DD({arrowWidth:O,arrowHeight:H}),y&&wD({strategy:"referenceHidden",...X})]}),[V,re]=q2(R),_=Za(j);cs(()=>{P&&_?.()},[P,_]);const L=B.arrow?.x,I=B.arrow?.y,G=B.arrow?.centerOffset!==0,[J,me]=b.useState();return cs(()=>{C&&me(window.getComputedStyle(C).zIndex)},[C]),e.jsx("div",{ref:q.setFloating,"data-radix-popper-content-wrapper":"",style:{...Q,transform:P?Q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:J,"--radix-popper-transform-origin":[B.transformOrigin?.x,B.transformOrigin?.y].join(" "),...B.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:e.jsx(CD,{scope:r,placedSide:V,onArrowChange:M,arrowX:L,arrowY:I,shouldHideArrow:G,children:e.jsx(Oe.div,{"data-side":V,"data-align":re,...w,ref:T,style:{...w.style,animation:P?void 0:"none"}})})})});$2.displayName=Eh;var G2="PopperArrow",RD={top:"bottom",right:"left",bottom:"top",left:"right"},K2=b.forwardRef(function(n,r){const{__scopePopper:o,...i}=n,d=ED(G2,o),u=RD[d.placedSide];return e.jsx("span",{ref:d.onArrowChange,style:{position:"absolute",left:d.arrowX,top:d.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[d.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[d.placedSide],visibility:d.shouldHideArrow?"hidden":void 0},children:e.jsx(ND,{...i,ref:r,style:{...i.style,display:"block"}})})});K2.displayName=G2;function kD(t){return t!==null}var DD=t=>({name:"transformOrigin",options:t,fn(n){const{placement:r,rects:o,middlewareData:i}=n,u=i.arrow?.centerOffset!==0,p=u?0:t.arrowWidth,x=u?0:t.arrowHeight,[h,v]=q2(r),g={start:"0%",center:"50%",end:"100%"}[v],y=(i.arrow?.x??0)+p/2,N=(i.arrow?.y??0)+x/2;let j="",w="";return h==="bottom"?(j=u?g:`${y}px`,w=`${-x}px`):h==="top"?(j=u?g:`${y}px`,w=`${o.floating.height+x}px`):h==="right"?(j=`${-x}px`,w=u?g:`${N}px`):h==="left"&&(j=`${o.floating.width+x}px`,w=u?g:`${N}px`),{data:{x:j,y:w}}}});function q2(t){const[n,r="center"]=t.split("-");return[n,r]}
vendor: 4,081 bytes, line 49
49var tp=V2,wc=U2,sp=$2,ap=K2,TD="Portal",Fo=b.forwardRef((t,n)=>{const{container:r,...o}=t,[i,d]=b.useState(!1);cs(()=>d(!0),[]);const u=r||i&&globalThis?.document?.body;return u?y2.createPortal(e.jsx(Oe.div,{...o,ref:n}),u):null});Fo.displayName=TD;function OD(t,n){return b.useReducer((r,o)=>n[r][o]??r,t)}var Js=t=>{const{present:n,children:r}=t,o=_D(n),i=typeof r=="function"?r({present:o.isPresent}):b.Children.only(r),d=lt(o.ref,MD(i));return typeof r=="function"||o.isPresent?b.cloneElement(i,{ref:d}):null};Js.displayName="Presence";function _D(t){const[n,r]=b.useState(),o=b.useRef(null),i=b.useRef(t),d=b.useRef("none"),u=t?"mounted":"unmounted",[p,x]=OD(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const h=su(o.current);d.current=p==="mounted"?h:"none"},[p]),cs(()=>{const h=o.current,v=i.current;if(v!==t){const y=d.current,N=su(h);t?x("MOUNT"):N==="none"||h?.display==="none"?x("UNMOUNT"):x(v&&y!==N?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,x]),cs(()=>{if(n){let h;const v=n.ownerDocument.defaultView??window,g=N=>{const w=su(o.current).includes(CSS.escape(N.animationName));if(N.target===n&&w&&(x("ANIMATION_END"),!i.current)){const A=n.style.animationFillMode;n.style.animationFillMode="forwards",h=v.setTimeout(()=>{n.style.animationFillMode==="forwards"&&(n.style.animationFillMode=A)})}},y=N=>{N.target===n&&(d.current=su(o.current))};return n.addEventListener("animationstart",y),n.addEventListener("animationcancel",g),n.addEventListener("animationend",g),()=>{v.clearTimeout(h),n.removeEventListener("animationstart",y),n.removeEventListener("animationcancel",g),n.removeEventListener("animationend",g)}}else x("ANIMATION_END")},[n,x]),{isPresent:["mounted","unmountSuspended"].includes(p),ref:b.useCallback(h=>{o.current=h?getComputedStyle(h):null,r(h)},[])}}function su(t){return t?.animationName||"none"}function MD(t){let n=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?t.ref:(n=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var PD=$u[" useInsertionEffect ".trim().toString()]||cs;function yn({prop:t,defaultProp:n,onChange:r=()=>{},caller:o}){const[i,d,u]=HD({defaultProp:n,onChange:r}),p=t!==void 0,x=p?t:i;{const v=b.useRef(t!==void 0);b.useEffect(()=>{const g=v.current;g!==p&&console.warn(`${o} is changing from ${g?"controlled":"uncontrolled"} to ${p?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),v.current=p},[p,o])}const h=b.useCallback(v=>{if(p){const g=LD(v)?v(t):v;g!==t&&u.current?.(g)}else d(v)},[p,t,d,u]);return[x,h]}function HD({defaultProp:t,onChange:n}){const[r,o]=b.useState(t),i=b.useRef(r),d=b.useRef(n);return PD(()=>{d.current=n},[n]),b.useEffect(()=>{i.current!==r&&(d.current?.(r),i.current=r)},[r,i]),[r,o,d]}function LD(t){return typeof t=="function"}var Q2=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),zD="VisuallyHidden",Y2=b.forwardRef((t,n)=>e.jsx(Oe.span,{...t,ref:n,style:{...Q2,...t.style}}));Y2.displayName=zD;var ID=Y2,[np]=Bs("Tooltip",[Fr]),rp=Fr(),X2="TooltipProvider",BD=700,Vf="tooltip.open",[VD,Rh]=np(X2),Z2=t=>{const{__scopeTooltip:n,delayDuration:r=BD,skipDelayDuration:o=300,disableHoverableContent:i=!1,children:d}=t,u=b.useRef(!0),p=b.useRef(!1),x=b.useRef(0);return b.useEffect(()=>{const h=x.current;return()=>window.clearTimeout(h)},[]),e.jsx(VD,{scope:n,isOpenDelayedRef:u,delayDuration:r,onOpen:b.useCallback(()=>{window.clearTimeout(x.current),u.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(x.current),x.current=window.setTimeout(()=>u.current=!0,o)},[o]),isPointerInTransitRef:p,onPointerInTransitChange:b.useCallback(h=>{p.current=h}
vendor: 14,547 bytes, line 49
49,[]),disableHoverableContent:i,children:d})};Z2.displayName=X2;var ic="Tooltip",[FD,Sc]=np(ic),W2=t=>{const{__scopeTooltip:n,children:r,open:o,defaultOpen:i,onOpenChange:d,disableHoverableContent:u,delayDuration:p}=t,x=Rh(ic,t.__scopeTooltip),h=rp(n),[v,g]=b.useState(null),y=bs(),N=b.useRef(0),j=u??x.disableHoverableContent,w=p??x.delayDuration,A=b.useRef(!1),[C,E]=yn({prop:o,defaultProp:i??!1,onChange:O=>{O?(x.onOpen(),document.dispatchEvent(new CustomEvent(Vf))):x.onClose(),d?.(O)},caller:ic}),T=b.useMemo(()=>C?A.current?"delayed-open":"instant-open":"closed",[C]),D=b.useCallback(()=>{window.clearTimeout(N.current),N.current=0,A.current=!1,E(!0)},[E]),M=b.useCallback(()=>{window.clearTimeout(N.current),N.current=0,E(!1)},[E]),z=b.useCallback(()=>{window.clearTimeout(N.current),N.current=window.setTimeout(()=>{A.current=!0,E(!0),N.current=0},w)},[w,E]);return b.useEffect(()=>()=>{N.current&&(window.clearTimeout(N.current),N.current=0)},[]),e.jsx(tp,{...h,children:e.jsx(FD,{scope:n,contentId:y,open:C,stateAttribute:T,trigger:v,onTriggerChange:g,onTriggerEnter:b.useCallback(()=>{x.isOpenDelayedRef.current?z():D()},[x.isOpenDelayedRef,z,D]),onTriggerLeave:b.useCallback(()=>{j?M():(window.clearTimeout(N.current),N.current=0)},[M,j]),onOpen:D,onClose:M,disableHoverableContent:j,children:r})})};W2.displayName=ic;var Ff="TooltipTrigger",J2=b.forwardRef((t,n)=>{const{__scopeTooltip:r,...o}=t,i=Sc(Ff,r),d=Rh(Ff,r),u=rp(r),p=b.useRef(null),x=lt(n,p,i.onTriggerChange),h=b.useRef(!1),v=b.useRef(!1),g=b.useCallback(()=>h.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",g),[g]),e.jsx(wc,{asChild:!0,...u,children:e.jsx(Oe.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...o,ref:x,onPointerMove:we(t.onPointerMove,y=>{y.pointerType!=="touch"&&!v.current&&!d.isPointerInTransitRef.current&&(i.onTriggerEnter(),v.current=!0)}),onPointerLeave:we(t.onPointerLeave,()=>{i.onTriggerLeave(),v.current=!1}),onPointerDown:we(t.onPointerDown,()=>{i.open&&i.onClose(),h.current=!0,document.addEventListener("pointerup",g,{once:!0})}),onFocus:we(t.onFocus,()=>{h.current||i.onOpen()}),onBlur:we(t.onBlur,i.onClose),onClick:we(t.onClick,i.onClose)})})});J2.displayName=Ff;var kh="TooltipPortal",[UD,$D]=np(kh,{forceMount:void 0}),eS=t=>{const{__scopeTooltip:n,forceMount:r,children:o,container:i}=t,d=Sc(kh,n);return e.jsx(UD,{scope:n,forceMount:r,children:e.jsx(Js,{present:r||d.open,children:e.jsx(Fo,{asChild:!0,container:i,children:o})})})};eS.displayName=kh;var Po="TooltipContent",tS=b.forwardRef((t,n)=>{const r=$D(Po,t.__scopeTooltip),{forceMount:o=r.forceMount,side:i="top",...d}=t,u=Sc(Po,t.__scopeTooltip);return e.jsx(Js,{present:o||u.open,children:u.disableHoverableContent?e.jsx(sS,{side:i,...d,ref:n}):e.jsx(GD,{side:i,...d,ref:n})})}),GD=b.forwardRef((t,n)=>{const r=Sc(Po,t.__scopeTooltip),o=Rh(Po,t.__scopeTooltip),i=b.useRef(null),d=lt(n,i),[u,p]=b.useState(null),{trigger:x,onClose:h}=r,v=i.current,{onPointerInTransitChange:g}=o,y=b.useCallback(()=>{p(null),g(!1)},[g]),N=b.useCallback((j,w)=>{const A=j.currentTarget,C={x:j.clientX,y:j.clientY},E=YD(C,A.getBoundingClientRect()),T=XD(C,E),D=ZD(w.getBoundingClientRect()),M=JD([...T,...D]);p(M),g(!0)},[g]);return b.useEffect(()=>()=>y(),[y]),b.useEffect(()=>{if(x&&v){const j=A=>N(A,v),w=A=>N(A,x);return x.addEventListener("pointerleave",j),v.addEventListener("pointerleave",w),()=>{x.removeEventListener("pointerleave",j),v.removeEventListener("pointerleave",w)}}},[x,v,N,y]),b.useEffect(()=>{if(u){const j=w=>{const A=w.target,C={x:w.clientX,y:w.clientY},E=x?.contains(A)||v?.contains(A),T=!WD(C,u);E?y():T&&(y(),h())};return document.addEventListener("pointermove",j),()=>document.removeEventListener("pointermove",j)}},[x,v,u,h,y]),e.jsx(sS,{...t,ref:d})}),[KD,qD]=np(ic,{isInside:!1}),QD=S2("TooltipContent"),sS=b.forwardRef((t,n)=>{const{__scopeTooltip:r,children:o,"aria-label":i,onEscapeKeyDown:d,onPointerDownOutside:u,...p}=t,x=Sc(Po,r),h=rp(r),{onClose:v}=x;return b.useEffect(()=>(document.addEventListener(Vf,v),()=>document.removeEventListener(Vf,v)),[v]),b.useEffect(()=>{if(x.trigger){const g=y=>{y.target?.contains(x.trigger)&&v()};return window.addEventListener("scroll",g,{capture:!0}),()=>window.removeEventListener("scroll",g,{capture:!0})}},[x.trigger,v]),e.jsx(Io,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:d,onPointerDownOutside:u,onFocusOutside:g=>g.preventDefault(),onDismiss:v,children:e.jsxs(sp,{"data-state":x.stateAttribute,...h,...p,ref:n,style:{...p.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[e.jsx(QD,{children:o}),e.jsx(KD,{scope:r,isInside:!0,children:e.jsx(ID,{id:x.contentId,role:"tooltip",children:i||o})})]})})});tS.displayName=Po;var aS="TooltipArrow",nS=b.forwardRef((t,n)=>{const{__scopeTooltip:r,...o}=t,i=rp(r);return qD(aS,r).isInside?null:e.jsx(ap,{...i,...o,ref:n})});nS.displayName=aS;function YD(t,n){const r=Math.abs(n.top-t.y),o=Math.abs(n.bottom-t.y),i=Math.abs(n.right-t.x),d=Math.abs(n.left-t.x);switch(Math.min(r,o,i,d)){case d:return"left";case i:return"right";case r:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function XD(t,n,r=5){const o=[];switch(n){case"top":o.push({x:t.x-r,y:t.y+r},{x:t.x+r,y:t.y+r});break;case"bottom":o.push({x:t.x-r,y:t.y-r},{x:t.x+r,y:t.y-r});break;case"left":o.push({x:t.x+r,y:t.y-r},{x:t.x+r,y:t.y+r});break;case"right":o.push({x:t.x-r,y:t.y-r},{x:t.x-r,y:t.y+r});break}return o}function ZD(t){const{top:n,right:r,bottom:o,left:i}=t;return[{x:i,y:n},{x:r,y:n},{x:r,y:o},{x:i,y:o}]}function WD(t,n){const{x:r,y:o}=t;let i=!1;for(let d=0,u=n.length-1;d<n.length;u=d++){const p=n[d],x=n[u],h=p.x,v=p.y,g=x.x,y=x.y;v>o!=y>o&&r<(g-h)*(o-v)/(y-v)+h&&(i=!i)}return i}function JD(t){const n=t.slice();return n.sort((r,o)=>r.x<o.x?-1:r.x>o.x?1:r.y<o.y?-1:r.y>o.y?1:0),e6(n)}function e6(t){if(t.length<=1)return t.slice();const n=[];for(let o=0;o<t.length;o++){const i=t[o];for(;n.length>=2;){const d=n[n.length-1],u=n[n.length-2];if((d.x-u.x)*(i.y-u.y)>=(d.y-u.y)*(i.x-u.x))n.pop();else break}n.push(i)}n.pop();const r=[];for(let o=t.length-1;o>=0;o--){const i=t[o];for(;r.length>=2;){const d=r[r.length-1],u=r[r.length-2];if((d.x-u.x)*(i.y-u.y)>=(d.y-u.y)*(i.x-u.x))r.pop();else break}r.push(i)}return r.pop(),n.length===1&&r.length===1&&n[0].x===r[0].x&&n[0].y===r[0].y?n:n.concat(r)}var t6=Z2,s6=W2,a6=J2,n6=eS,r6=tS,l6=nS;function rS(t){var n,r,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(n=0;n<i;n++)t[n]&&(r=rS(t[n]))&&(o&&(o+=" "),o+=r)}else for(r in t)t[r]&&(o&&(o+=" "),o+=r);return o}function lS(){for(var t,n,r=0,o="",i=arguments.length;r<i;r++)(t=arguments[r])&&(n=rS(t))&&(o&&(o+=" "),o+=n);return o}const Dh="-",o6=t=>{const n=c6(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=t;return{getClassGroupId:u=>{const p=u.split(Dh);return p[0]===""&&p.length!==1&&p.shift(),oS(p,n)||i6(u)},getConflictingClassGroupIds:(u,p)=>{const x=r[u]||[];return p&&o[u]?[...x,...o[u]]:x}}},oS=(t,n)=>{if(t.length===0)return n.classGroupId;const r=t[0],o=n.nextPart.get(r),i=o?oS(t.slice(1),o):void 0;if(i)return i;if(n.validators.length===0)return;const d=t.join(Dh);return n.validators.find(({validator:u})=>u(d))?.classGroupId},Qy=/^\[(.+)\]$/,i6=t=>{if(Qy.test(t)){const n=Qy.exec(t)[1],r=n?.substring(0,n.indexOf(":"));if(r)return"arbitrary.."+r}},c6=t=>{const{theme:n,classGroups:r}=t,o={nextPart:new Map,validators:[]};for(const i in r)Uf(r[i],o,i,n);return o},Uf=(t,n,r,o)=>{t.forEach(i=>{if(typeof i=="string"){const d=i===""?n:Yy(n,i);d.classGroupId=r;return}if(typeof i=="function"){if(d6(i)){Uf(i(o),n,r,o);return}n.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([d,u])=>{Uf(u,Yy(n,d),r,o)})})},Yy=(t,n)=>{let r=t;return n.split(Dh).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},d6=t=>t.isThemeGetter,u6=t=>{if(t<1)return{get:()=>{},set:()=>{}};let n=0,r=new Map,o=new Map;const i=(d,u)=>{r.set(d,u),n++,n>t&&(n=0,o=r,r=new Map)};return{get(d){let u=r.get(d);if(u!==void 0)return u;if((u=o.get(d))!==void 0)return i(d,u),u},set(d,u){r.has(d)?r.set(d,u):i(d,u)}}},$f="!",Gf=":",p6=Gf.length,m6=t=>{const{prefix:n,experimentalParseClassName:r}=t;let o=i=>{const d=[];let u=0,p=0,x=0,h;for(let j=0;j<i.length;j++){let w=i[j];if(u===0&&p===0){if(w===Gf){d.push(i.slice(x,j)),x=j+p6;continue}if(w==="/"){h=j;continue}}w==="["?u++:w==="]"?u--:w==="("?p++:w===")"&&p--}const v=d.length===0?i:i.substring(x),g=x6(v),y=g!==v,N=h&&h>x?h-x:void 0;return{modifiers:d,hasImportantModifier:y,baseClassName:g,maybePostfixModifierPosition:N}};if(n){const i=n+Gf,d=o;o=u=>u.startsWith(i)?d(u.substring(i.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:u,maybePostfixModifierPosition:void 0}}if(r){const i=o;o=d=>r({className:d,parseClassName:i})}return o},x6=t=>t.endsWith($f)?t.substring(0,t.length-1):t.startsWith($f)?t.substring(1):t,f6=t=>{const n=Object.fromEntries(t.orderSensitiveModifiers.map(o=>[o,!0]));return o=>{if(o.length<=1)return o;const i=[];let d=[];return o.forEach(u=>{u[0]==="["||n[u]?(i.push(...d.sort(),u),d=[]):d.push(u)}),i.push(...d.sort()),i}},h6=t=>({cache:u6(t.cacheSize),parseClassName:m6(t),sortModifiers:f6(t),...o6(t)}),g6=/\s+/,b6=(t,n)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:i,sortModifiers:d}=n,u=[],p=t.trim().split(g6);let x="";for(let h=p.length-1;h>=0;h-=1){const v=p[h],{isExternal:g,modifiers:y,hasImportantModifier:N,baseClassName:j,maybePostfixModifierPosition:w}=r(v);if(g){x=v+(x.length>0?" "+x:x);continue}let A=!!w,C=o(A?j.substring(0,w):j);if(!C){if(!A){x=v+(x.length>0?" "+x:x);continue}if(C=o(j),!C){x=v+(x.length>0?" "+x:x);continue}A=!1}const E=d(y).join(":"),T=N?E+$f:E,D=T+C;if(u.includes(D))continue;u.push(D);const M=i(C,A);for(let z=0;z<M.length;++z){const O=M[z];u.push(T+O)}x=v+(x.length>0?" "+x:x)}return x};function v6(){let t=0,n,r,o="";for(;t<arguments.length;)(n=arguments[t++])&&(r=iS(n))&&(o&&(o+=" "),o+=r);return o}const iS=t=>{if(typeof t=="string")return t;let n,r="";for(let o=0;o<t.length;o++)t[o]&&(n=iS(t[o]))&&(r&&(r+=" "),r+=n);return r};function y6(t,...n){let r,o,i,d=u;function u(x){const h=n.reduce((v,g)=>g(v),t());return r=h6(h),o=r.cache.get,i=r.cache.set,d=p,p(x)}function p(x){const h=o(x);if(h)return h;const v=b6(x,r);return i(x,v),v}return function(){return d(v6.apply(null,arguments))}}const xs=t=>{const n=r=>r[t]||[];return n.isThemeGetter=!0,n},cS=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,dS=/^\((?:(\w[\w-]*):)?(.+)\)$/i,w6=/^\d+\/\d+$/,S6=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,j6=/\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$/,N6=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,A6=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,C6=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,bo=t=>w6.test(t),Ye=t=>!!t&&!Number.isNaN(Number(t)),Ar=t=>!!t&&Number.isInteger(Number(t)),Qx=t=>t.endsWith("%")&&Ye(t.slice(0,-1)),Vn=t=>S6.test(t),E6=()=>!0,R6=t=>j6.test(t)&&!N6.test(t),uS=()=>!1,k6=t=>A6.test(t),D6=t=>C6.test(t),T6=t=>!Ee(t)&&!Re(t),O6=t=>Uo(t,xS,uS),Ee=t=>cS.test(t),ul=t=>Uo(t,fS,R6),Yx=t=>Uo(t,L6,Ye),Xy=t=>Uo(t,pS,uS),_6=t=>Uo(t,mS,D6),au=t=>Uo(t,hS,k6),Re=t=>dS.test(t),Vi=t=>$o(t,fS),M6=t=>$o(t,z6),Zy=t=>$o(t,pS),P6=t=>$o(t,xS),H6=t=>$o(t,mS),nu=t=>$o(t,hS,!0),Uo=(t,n,r)=>{const o=cS.exec(t);return o?o[1]?n(o[1]):r(o[2]):!1},$o=(t,n,r=!1)=>{const o=dS.exec(t);return o?o[1]?n(o[1]):r:!1},pS=t=>t==="position"||t==="percentage",mS=t=>t==="image"||t==="url",xS=t=>t==="length"||t==="size"||t==="bg-size",fS=t=>t==="length",L6=t=>t==="number",z6=t=>t==="family-name",hS=t=>t==="shadow",I6=()=>{const t=xs("color"),n=xs("font"),r=xs("text"),o=xs("font-weight"),i=xs("tracking"),d=xs("leading"),u=xs("breakpoint"),p=xs("container"),x=xs("spacing"),h=xs("radius"),v=xs("shadow"),g=xs("inset-shadow"),y=xs("text-shadow"),N=xs("drop-shadow"),j=xs("blur"),w=xs("perspective"),A=xs("aspect"),C=xs("ease"),E=xs("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],M=()=>[...D(),Re,Ee],z=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],H=()=>[Re,Ee,x],K=()=>[bo,"full","auto",...H()],ne=()=>[Ar,"none","subgrid",Re,Ee],le=()=>["auto",{span:["full",Ar,Re,Ee]},Ar,Re,Ee],Z=()=>[Ar,"auto",Re,Ee],X=()=>["auto","min","max","fr",Re,Ee],q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Q=()=>["start","end","center","stretch","center-safe","end-safe"],R=()=>["auto",...H()],P=()=>[bo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...H()],B=()=>[t,Re,Ee],V=()=>[...D(),Zy,Xy,{position:[Re,Ee]}],re=()=>["no-repeat",{repeat:["","x","y","space","round"]}],_=()=>["auto","cover","contain",P6,O6,{size:[Re,Ee]}],L=()=>[Qx,Vi,ul],I=()=>["","none","full",h,Re,Ee],G=()=>["",Ye,Vi,ul],J=()=>["solid","dashed","dotted","double"],me=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],W=()=>[Ye,Qx,Zy,Xy],he=()=>["","none",j,Re,Ee],ve=()=>["none",Ye,Re,Ee],He=()=>["none",Ye,Re,Ee],ze=()=>[Ye,Re,Ee],Be=()=>[bo,"full",...H()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Vn],breakpoint:[Vn],color:[E6],container:[Vn],"drop-shadow":[Vn],ease:["in","out","in-out"],font:[T6],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Vn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Vn],shadow:[Vn],spacing:["px",Ye],text:[Vn],"text-shadow":[Vn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",bo,Ee,Re,A]}
vendor: 5,622 bytes, line 49
49],container:["container"],columns:[{columns:[Ye,Ee,Re,p]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"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:M()}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:K()}],"inset-x":[{"inset-x":K()}],"inset-y":[{"inset-y":K()}],start:[{start:K()}],end:[{end:K()}],top:[{top:K()}],right:[{right:K()}],bottom:[{bottom:K()}],left:[{left:K()}],visibility:["visible","invisible","collapse"],z:[{z:[Ar,"auto",Re,Ee]}],basis:[{basis:[bo,"full","auto",p,...H()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ye,bo,"auto","initial","none",Ee]}],grow:[{grow:["",Ye,Re,Ee]}],shrink:[{shrink:["",Ye,Re,Ee]}],order:[{order:[Ar,"first","last","none",Re,Ee]}],"grid-cols":[{"grid-cols":ne()}],"col-start-end":[{col:le()}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":ne()}],"row-start-end":[{row:le()}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":X()}],"auto-rows":[{"auto-rows":X()}],gap:[{gap:H()}],"gap-x":[{"gap-x":H()}],"gap-y":[{"gap-y":H()}],"justify-content":[{justify:[...q(),"normal"]}],"justify-items":[{"justify-items":[...Q(),"normal"]}],"justify-self":[{"justify-self":["auto",...Q()]}],"align-content":[{content:["normal",...q()]}],"align-items":[{items:[...Q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Q(),{baseline:["","last"]}]}],"place-content":[{"place-content":q()}],"place-items":[{"place-items":[...Q(),"baseline"]}],"place-self":[{"place-self":["auto",...Q()]}],p:[{p:H()}],px:[{px:H()}],py:[{py:H()}],ps:[{ps:H()}],pe:[{pe:H()}],pt:[{pt:H()}],pr:[{pr:H()}],pb:[{pb:H()}],pl:[{pl:H()}],m:[{m:R()}],mx:[{mx:R()}],my:[{my:R()}],ms:[{ms:R()}],me:[{me:R()}],mt:[{mt:R()}],mr:[{mr:R()}],mb:[{mb:R()}],ml:[{ml:R()}],"space-x":[{"space-x":H()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":H()}],"space-y-reverse":["space-y-reverse"],size:[{size:P()}],w:[{w:[p,"screen",...P()]}],"min-w":[{"min-w":[p,"screen","none",...P()]}],"max-w":[{"max-w":[p,"screen","none","prose",{screen:[u]},...P()]}],h:[{h:["screen","lh",...P()]}],"min-h":[{"min-h":["screen","lh","none",...P()]}],"max-h":[{"max-h":["screen","lh",...P()]}],"font-size":[{text:["base",r,Vi,ul]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,Re,Yx]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Qx,Ee]}],"font-family":[{font:[M6,Ee,n]}],"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:[i,Re,Ee]}],"line-clamp":[{"line-clamp":[Ye,"none",Re,Yx]}],leading:[{leading:[d,...H()]}],"list-image":[{"list-image":["none",Re,Ee]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Re,Ee]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:B()}],"text-color":[{text:B()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...J(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ye,"from-font","auto",Re,ul]}],"text-decoration-color":[{decoration:B()}],"underline-offset":[{"underline-offset":[Ye,"auto",Re,Ee]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:H()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Re,Ee]}],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",Re,Ee]}],"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:re()}],"bg-size":[{bg:_()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ar,Re,Ee],radial:["",Re,Ee],conic:[Ar,Re,Ee]},H6,_6]}],"bg-color":[{bg:B()}],"gradient-from-pos":[{from:L()}
49],"gradient-via-pos":[{via:L()}],"gradient-to-pos":[{to:L()}],"gradient-from":[{from:B()}],"gradient-via":[{via:B()}],"gradient-to":[{to:B()}],rounded:[{rounded:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"border-w":[{border:G()}],"border-w-x":[{"border-x":G()}],"border-w-y":[{"border-y":G()}],"border-w-s":[{"border-s":G()}],"border-w-e":[{"border-e":G()}],"border-w-t":[{"border-t":G()}],"border-w-r":[{"border-r":G()}],"border-w-b":[{"border-b":G()}],"border-w-l":[{"border-l":G()}],"divide-x":[{"divide-x":G()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":G()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...J(),"hidden","none"]}],"divide-style":[{divide:[...J(),"hidden","none"]}],"border-color":[{border:B()}],"border-color-x":[{"border-x":B()}],"border-color-y":[{"border-y":B()}],"border-color-s":[{"border-s":B()}],"border-color-e":[{"border-e":B()}],"border-color-t":[{"border-t":B()}],"border-color-r":[{"border-r":B()}],"border-color-b":[{"border-b":B()}],"border-color-l":[{"border-l":B()}
vendor: 5,735 bytes, line 49
49],"divide-color":[{divide:B()}],"outline-style":[{outline:[...J(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ye,Re,Ee]}],"outline-w":[{outline:["",Ye,Vi,ul]}],"outline-color":[{outline:B()}],shadow:[{shadow:["","none",v,nu,au]}],"shadow-color":[{shadow:B()}],"inset-shadow":[{"inset-shadow":["none",g,nu,au]}],"inset-shadow-color":[{"inset-shadow":B()}],"ring-w":[{ring:G()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:B()}],"ring-offset-w":[{"ring-offset":[Ye,ul]}],"ring-offset-color":[{"ring-offset":B()}],"inset-ring-w":[{"inset-ring":G()}],"inset-ring-color":[{"inset-ring":B()}],"text-shadow":[{"text-shadow":["none",y,nu,au]}],"text-shadow-color":[{"text-shadow":B()}],opacity:[{opacity:[Ye,Re,Ee]}],"mix-blend":[{"mix-blend":[...me(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":me()}],"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":[Ye]}],"mask-image-linear-from-pos":[{"mask-linear-from":W()}],"mask-image-linear-to-pos":[{"mask-linear-to":W()}],"mask-image-linear-from-color":[{"mask-linear-from":B()}],"mask-image-linear-to-color":[{"mask-linear-to":B()}],"mask-image-t-from-pos":[{"mask-t-from":W()}],"mask-image-t-to-pos":[{"mask-t-to":W()}],"mask-image-t-from-color":[{"mask-t-from":B()}],"mask-image-t-to-color":[{"mask-t-to":B()}],"mask-image-r-from-pos":[{"mask-r-from":W()}],"mask-image-r-to-pos":[{"mask-r-to":W()}],"mask-image-r-from-color":[{"mask-r-from":B()}],"mask-image-r-to-color":[{"mask-r-to":B()}],"mask-image-b-from-pos":[{"mask-b-from":W()}],"mask-image-b-to-pos":[{"mask-b-to":W()}],"mask-image-b-from-color":[{"mask-b-from":B()}],"mask-image-b-to-color":[{"mask-b-to":B()}],"mask-image-l-from-pos":[{"mask-l-from":W()}],"mask-image-l-to-pos":[{"mask-l-to":W()}],"mask-image-l-from-color":[{"mask-l-from":B()}],"mask-image-l-to-color":[{"mask-l-to":B()}],"mask-image-x-from-pos":[{"mask-x-from":W()}],"mask-image-x-to-pos":[{"mask-x-to":W()}],"mask-image-x-from-color":[{"mask-x-from":B()}],"mask-image-x-to-color":[{"mask-x-to":B()}],"mask-image-y-from-pos":[{"mask-y-from":W()}],"mask-image-y-to-pos":[{"mask-y-to":W()}],"mask-image-y-from-color":[{"mask-y-from":B()}],"mask-image-y-to-color":[{"mask-y-to":B()}],"mask-image-radial":[{"mask-radial":[Re,Ee]}],"mask-image-radial-from-pos":[{"mask-radial-from":W()}],"mask-image-radial-to-pos":[{"mask-radial-to":W()}],"mask-image-radial-from-color":[{"mask-radial-from":B()}],"mask-image-radial-to-color":[{"mask-radial-to":B()}],"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":D()}],"mask-image-conic-pos":[{"mask-conic":[Ye]}],"mask-image-conic-from-pos":[{"mask-conic-from":W()}],"mask-image-conic-to-pos":[{"mask-conic-to":W()}],"mask-image-conic-from-color":[{"mask-conic-from":B()}],"mask-image-conic-to-color":[{"mask-conic-to":B()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:V()}],"mask-repeat":[{mask:re()}],"mask-size":[{mask:_()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Re,Ee]}],filter:[{filter:["","none",Re,Ee]}],blur:[{blur:he()}],brightness:[{brightness:[Ye,Re,Ee]}],contrast:[{contrast:[Ye,Re,Ee]}],"drop-shadow":[{"drop-shadow":["","none",N,nu,au]}],"drop-shadow-color":[{"drop-shadow":B()}],grayscale:[{grayscale:["",Ye,Re,Ee]}],"hue-rotate":[{"hue-rotate":[Ye,Re,Ee]}],invert:[{invert:["",Ye,Re,Ee]}],saturate:[{saturate:[Ye,Re,Ee]}],sepia:[{sepia:["",Ye,Re,Ee]}],"backdrop-filter":[{"backdrop-filter":["","none",Re,Ee]}],"backdrop-blur":[{"backdrop-blur":he()}],"backdrop-brightness":[{"backdrop-brightness":[Ye,Re,Ee]}],"backdrop-contrast":[{"backdrop-contrast":[Ye,Re,Ee]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ye,Re,Ee]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ye,Re,Ee]}],"backdrop-invert":[{"backdrop-invert":["",Ye,Re,Ee]}],"backdrop-opacity":[{"backdrop-opacity":[Ye,Re,Ee]}],"backdrop-saturate":[{"backdrop-saturate":[Ye,Re,Ee]}],"backdrop-sepia":[{"backdrop-sepia":["",Ye,Re,Ee]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":H()}],"border-spacing-x":[{"border-spacing-x":H()}],"border-spacing-y":[{"border-spacing-y":H()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Re,Ee]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ye,"initial",Re,Ee]}],ease:[{ease:["linear","initial",C,Re,Ee]}],delay:[{delay:[Ye,Re,Ee]}],animate:[{animate:["none",E,Re,Ee]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,Re,Ee]}],"perspective-origin":[{"perspective-origin":M()}],rotate:[{rotate:ve()}],"rotate-x":[{"rotate-x":ve()}],"rotate-y":[{"rotate-y":ve()}],"rotate-z":[{"rotate-z":ve()}],scale:[{scale:He()}],"scale-x":[{"scale-x":He()}],"scale-y":[{"scale-y":He()}],"scale-z":[{"scale-z":He()}],"scale-3d":["scale-3d"],skew:[{skew:ze()}],"skew-x":[{"skew-x":ze()}],"skew-y":[{"skew-y":ze()}],transform:[{transform:[Re,Ee,"","none","gpu","cpu"]}],"transform-origin":[{origin:M()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Be()}],"translate-x":[{"translate-x":Be()}],"translate-y":[{"translate-y":Be()}],"translate-z":[{"translate-z":Be()}],"translate-none":["translate-none"],accent:[{accent:B()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:B()}
vendor: 10,628 bytes, lines 49-74
49],"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",Re,Ee]}],"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":H()}],"scroll-mx":[{"scroll-mx":H()}],"scroll-my":[{"scroll-my":H()}],"scroll-ms":[{"scroll-ms":H()}],"scroll-me":[{"scroll-me":H()}],"scroll-mt":[{"scroll-mt":H()}],"scroll-mr":[{"scroll-mr":H()}],"scroll-mb":[{"scroll-mb":H()}],"scroll-ml":[{"scroll-ml":H()}],"scroll-p":[{"scroll-p":H()}],"scroll-px":[{"scroll-px":H()}],"scroll-py":[{"scroll-py":H()}],"scroll-ps":[{"scroll-ps":H()}],"scroll-pe":[{"scroll-pe":H()}],"scroll-pt":[{"scroll-pt":H()}],"scroll-pr":[{"scroll-pr":H()}],"scroll-pb":[{"scroll-pb":H()}],"scroll-pl":[{"scroll-pl":H()}],"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",Re,Ee]}],fill:[{fill:["none",...B()]}],"stroke-w":[{stroke:[Ye,Vi,ul,Yx]}],stroke:[{stroke:["none",...B()]}],"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"]}},B6=y6(I6);function ye(...t){return B6(lS(t))}function Th({delayDuration:t=0,...n}){return e.jsx(t6,{"data-loc":"client/src/components/ui/tooltip.tsx:11","data-slot":"tooltip-provider",delayDuration:t,...n})}function Kf({...t}){return e.jsx(Th,{"data-loc":"client/src/components/ui/tooltip.tsx:23",children:e.jsx(s6,{"data-loc":"client/src/components/ui/tooltip.tsx:24","data-slot":"tooltip",...t})})}function qf({...t}){return e.jsx(a6,{"data-loc":"client/src/components/ui/tooltip.tsx:32","data-slot":"tooltip-trigger",...t})}function Qf({className:t,sideOffset:n=0,children:r,...o}){return e.jsx(n6,{"data-loc":"client/src/components/ui/tooltip.tsx:42",children:e.jsxs(r6,{"data-loc":"client/src/components/ui/tooltip.tsx:43","data-slot":"tooltip-content",sideOffset:n,className:ye("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",t),...o,children:[r,e.jsx(l6,{"data-loc":"client/src/components/ui/tooltip.tsx:53",className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const Wy=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Jy=lS,Oh=(t,n)=>r=>{var o;if(n?.variants==null)return Jy(t,r?.class,r?.className);const{variants:i,defaultVariants:d}=n,u=Object.keys(i).map(h=>{const v=r?.[h],g=d?.[h];if(v===null)return null;const y=Wy(v)||Wy(g);return i[h][y]}),p=r&&Object.entries(r).reduce((h,v)=>{let[g,y]=v;return y===void 0||(h[g]=y),h},{}),x=n==null||(o=n.compoundVariants)===null||o===void 0?void 0:o.reduce((h,v)=>{let{class:g,className:y,...N}=v;return Object.entries(N).every(j=>{let[w,A]=j;return Array.isArray(A)?A.includes({...d,...p}[w]):{...d,...p}[w]===A})?[...h,g,y]:h},[]);return Jy(t,u,x,r?.class,r?.className)},_h=Oh("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-transparent shadow-xs hover:bg-accent dark:bg-transparent dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function ie({className:t,variant:n,size:r,asChild:o=!1,...i}){const d=o?vh:"button";return e.jsx(d,{"data-loc":"client/src/components/ui/button.tsx:52","data-slot":"button",className:ye(_h({variant:n,size:r,className:t})),...i})}function _e({className:t,...n}){return e.jsx("div",{"data-loc":"client/src/components/ui/card.tsx:7","data-slot":"card",className:ye("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",t),...n})}function Ft({className:t,...n}){return e.jsx("div",{"data-loc":"client/src/components/ui/card.tsx:20","data-slot":"card-header",className:ye("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",t),...n})}function Xt({className:t,...n}){return e.jsx("div",{"data-loc":"client/src/components/ui/card.tsx:33","data-slot":"card-title",className:ye("leading-none font-semibold",t),...n})}function Me({className:t,...n}){return e.jsx("div",{"data-loc":"client/src/components/ui/card.tsx:66","data-slot":"card-content",className:ye("px-6",t),...n})}/** 50 * @license lucide-react v0.453.0 - ISC 51 * 52 * This source code is licensed under the ISC license. 53 * See the LICENSE file in the root directory of this source tree. 54 */const V6=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),gS=(...t)=>t.filter((n,r,o)=>!!n&&o.indexOf(n)===r).join(" ");/** 55 * @license lucide-react v0.453.0 - ISC 56 * 57 * This source code is licensed under the ISC license. 58 * See the LICENSE file in the root directory of this source tree. 59 */var F6={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** 60 * @license lucide-react v0.453.0 - ISC 61 * 62 * This source code is licensed under the ISC license. 63 * See the LICENSE file in the root directory of this source tree. 64 */const U6=b.forwardRef(({color:t="currentColor",size:n=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:i="",children:d,iconNode:u,...p},x)=>b.createElement("svg",{ref:x,...F6,width:n,height:n,stroke:t,strokeWidth:o?Number(r)*24/Number(n):r,className:gS("lucide",i),...p},[...u.map(([h,v])=>b.createElement(h,v)),...Array.isArray(d)?d:[d]]));/** 65 * @license lucide-react v0.453.0 - ISC 66 * 67 * This source code is licensed under the ISC license. 68 * See the LICENSE file in the root directory of this source tree. 69 */const ge=(t,n)=>{const r=b.forwardRef(({className:o,...i},d)=>b.createElement(U6,{ref:d,iconNode:n,className:gS(`lucide-${V6(t)}`,o),...i}));return r.displayName=`${t}`,r};/** 70 * @license lucide-react v0.453.0 - ISC 71 * 72 * This source code is licensed under the ISC license. 73 * See the LICENSE file in the root directory of this source tree. 74 */const $6=ge("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l
74-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** 75 * @license lucide-react v0.453.0 - ISC 76 * 77 * This source code is licensed under the ISC license. 78 * See the LICENSE file in the root directory of this source tree. 79 */const cc=ge("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** 80 * @license lucide-react v0.453.0 - ISC 81 * 82 * This source code is licensed under the ISC license. 83 * See the LICENSE file in the root directory of this source tree. 84 */const Yi=ge("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 85 * @license lucide-react v0.453.0 - ISC 86 * 87 * This source code is licensed under the ISC license. 88 * See the LICENSE file in the root directory of this source tree. 89 */const Ut=ge("Award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);/** 90 * @license lucide-react v0.453.0 - ISC 91 * 92 * This source code is licensed under the ISC license. 93 * See the LICENSE file in the root directory of this source tree. 94 */const Yf=ge("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);/** 95 * @license lucide-react v0.453.0 - ISC 96 * 97 * This source code is licensed under the ISC license. 98 * See the LICENSE file in the root directory of this source tree. 99 */const Xx=ge("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/** 100 * @license lucide-react v0.453.0 - ISC 101 * 102 * This source code is licensed under the ISC license. 103 * See the LICENSE file in the root directory of this source tree. 104 */const bS=ge("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/** 105 * @license lucide-react v0.453.0 - ISC 106 * 107 * This source code is licensed under the ISC license. 108 * See the LICENSE file in the root directory of this source tree. 109 */const G6=ge("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);/** 110 * @license lucide-react v0.453.0 - ISC 111 * 112 * This source code is licensed under the ISC license. 113 * See the LICENSE file in the root directory of this source tree. 114 */const Ms=ge("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/** 115 * @license lucide-react v0.453.0 - ISC 116 * 117 * This source code is licensed under the ISC license. 118 * See the LICENSE file in the root directory of this source tree. 119 */const vS=ge("Calculator",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["line",{x1:"8",x2:"16",y1:"6",y2:"6",key:"x4nwl0"}],["line",{x1:"16",x2:"16",y1:"14",y2:"18",key:"wjye3r"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M8 18h.01",key:"lrp35t"}]]);/** 120 * @license lucide-react v0.453.0 - ISC 121 * 122 * This source code is licensed under the ISC license. 123 * See the LICENSE file in the root directory of this source tree. 124 */const Mh=ge("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** 125 * @license lucide-react v0.453.0 - ISC 126 * 127 * This source code is licensed under the ISC license. 128 * See the LICENSE file in the root directory of this source tree. 129 */const bn=ge("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/** 130 * @license lucide-react v0.453.0 - ISC 131 * 132 * This source code is licensed under the ISC license. 133 * See the LICENSE file in the root directory of this source tree. 134 */const Cr=ge("CheckCheck",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]]);/** 135 * @license lucide-react v0.453.0 - ISC 136 * 137 * This source code is licensed under the ISC license. 138 * See the LICENSE file in the root directory of this source tree. 139 */const dc=ge("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 140 * @license lucide-react v0.453.0 - ISC 141 * 142 * This source code is licensed under the ISC license. 143 * See the LICENSE file in the root directory of this source tree. 144 */const Ps=ge("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 145 * @license lucide-react v0.453.0 - ISC 146 * 147 * This source code is licensed under the ISC license. 148 * See the LICENSE file in the root directory of this source tree. 149 */const hn=ge("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** 150 * @license lucide-react v0.453.0 - ISC 151 * 152 * This source code is licensed under the ISC license. 153 * See the LICENSE file in the root directory of this source tree. 154 */const qe=ge("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** 155 * @license lucide-react v0.453.0 - ISC 156 * 157 * This source code is licensed under the ISC license. 158 * See the LICENSE file in the root directory of this source tree. 159 */const Ph=ge("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** 160 * @license lucide-react v0.453.0 - ISC 161 * 162 * This source code is licensed under the ISC license. 163 * See the LICENSE file in the root directory of this source tree. 164 */const K6=ge("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);/** 165 * @license lucide-react v0.453.0 - ISC 166 * 167 * This source code is licensed under the ISC license. 168 * See the LICENSE file in the root directory of this source tree. 169 */const tt=ge("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** 170 * @license lucide-react v0.453.0 - ISC 171 * 172 * This source code is licensed under the ISC license. 173 * See the LICENSE file in the root directory of this source tree. 174 */const Un=ge("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** 175 * @license lucide-react v0.453.0 - ISC 176 * 177 * This source code is licensed under the ISC license. 178 * See the LICENSE file in the root directory of this source tree. 179 */const Te=ge("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 180 * @license lucide-react v0.453.0 - ISC 181 * 182 * This source code is licensed under the ISC license. 183 * See the LICENSE file in the root directory of this source tree. 184 */const Go=ge("CircleMinus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}]]);/** 185 * @license lucide-react v0.453.0 - ISC 186 * 187 * This source code is licensed under the ISC license. 188 * See the LICENSE file in the root directory of this source tree. 189 */const Zt=ge("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/** 190 * @license lucide-react v0.453.0 - ISC 191 * 192 * This source code is licensed under the ISC license. 193 * See the LICENSE file in the root directory of this source tree. 194 */const q6=ge("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** 195 * @license lucide-react v0.453.0 - ISC 196 * 197 * This source code is licensed under the ISC license. 198 * See the LICENSE file in the root directory of this source tree.
199 */const yS=ge("ClipboardCheck",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"m9 14 2 2 4-4",key:"df797q"}]]);/** 200 * @license lucide-react v0.453.0 - ISC 201 * 202 * This source code is licensed under the ISC license. 203 * See the LICENSE file in the root directory of this source tree. 204 */const Ho=ge("ClipboardList",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);/** 205 * @license lucide-react v0.453.0 - ISC 206 * 207 * This source code is licensed under the ISC license. 208 * See the LICENSE file in the root directory of this source tree. 209 */const Bt=ge("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** 210 * @license lucide-react v0.453.0 - ISC 211 * 212 * This source code is licensed under the ISC license. 213 * See the LICENSE file in the root directory of this source tree. 214 */const zr=ge("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** 215 * @license lucide-react v0.453.0 - ISC 216 * 217 * This source code is licensed under the ISC license. 218 * See the LICENSE file in the root directory of this source tree. 219 */const Zx=ge("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/** 220 * @license lucide-react v0.453.0 - ISC 221 * 222 * This source code is licensed under the ISC license. 223 * See the LICENSE file in the root directory of this source tree. 224 */const uc=ge("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** 225 * @license lucide-react v0.453.0 - ISC 226 * 227 * This source code is licensed under the ISC license. 228 * See the LICENSE file in the root directory of this source tree. 229 */const Ya=ge("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** 230 * @license lucide-react v0.453.0 - ISC 231 * 232 * This source code is licensed under the ISC license. 233 * See the LICENSE file in the root directory of this source tree. 234 */const Q6=ge("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** 235 * @license lucide-react v0.453.0 - ISC 236 * 237 * This source code is licensed under the ISC license. 238 * See the LICENSE file in the root directory of this source tree. 239 */const wS=ge("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** 240 * @license lucide-react v0.453.0 - ISC 241 * 242 * This source code is licensed under the ISC license. 243 * See the LICENSE file in the root directory of this source tree. 244 */const Hh=ge("FileCheck",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m9 15 2 2 4-4",key:"1grp1n"}]]);/** 245 * @license lucide-react v0.453.0 - ISC 246 * 247 * This source code is licensed under the ISC license. 248 * See the LICENSE file in the root directory of this source tree. 249 */const Dt=ge("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** 250 * @license lucide-react v0.453.0 - ISC 251 * 252 * This source code is licensed under the ISC license. 253 * See the LICENSE file in the root directory of this source tree. 254 */const Y6=ge("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/** 255 * @license lucide-react v0.453.0 - ISC 256 * 257 * This source code is licensed under the ISC license. 258 * See the LICENSE file in the root directory of this source tree. 259 */const SS=ge("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/** 260 * @license lucide-react v0.453.0 - ISC 261 * 262 * This source code is licensed under the ISC license. 263 * See the LICENSE file in the root directory of this source tree. 264 */const Ko=ge("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** 265 * @license lucide-react v0.453.0 - ISC 266 * 267 * This source code is licensed under the ISC license. 268 * See the LICENSE file in the root directory of this source tree. 269 */const X6=ge("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/** 270 * @license lucide-react v0.453.0 - ISC 271 * 272 * This source code is licensed under the ISC license. 273 * See the LICENSE file in the root directory of this source tree. 274 */const Xi=ge("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** 275 * @license lucide-react v0.453.0 - ISC 276 * 277 * This source code is licensed under the ISC license. 278 * See the LICENSE file in the root directory of this source tree. 279 */const Eo=ge("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/** 280 * @license lucide-react v0.453.0 - ISC 281 * 282 * This source code is licensed under the ISC license. 283 * See the LICENSE file in the root directory of this source tree.
284 */const jS=ge("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** 285 * @license lucide-react v0.453.0 - ISC 286 * 287 * This source code is licensed under the ISC license. 288 * See the LICENSE file in the root directory of this source tree. 289 */const e1=ge("LayoutTemplate",[["rect",{width:"18",height:"7",x:"3",y:"3",rx:"1",key:"f1a2em"}],["rect",{width:"9",height:"7",x:"3",y:"14",rx:"1",key:"jqznyg"}],["rect",{width:"5",height:"7",x:"16",y:"14",rx:"1",key:"q5h2i8"}]]);/** 290 * @license lucide-react v0.453.0 - ISC 291 * 292 * This source code is licensed under the ISC license. 293 * See the LICENSE file in the root directory of this source tree. 294 */const Ns=ge("Leaf",[["path",{d:"M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z",key:"nnexq3"}],["path",{d:"M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12",key:"mt58a7"}]]);/** 295 * @license lucide-react v0.453.0 - ISC 296 * 297 * This source code is licensed under the ISC license. 298 * See the LICENSE file in the root directory of this source tree. 299 */const t1=ge("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/** 300 * @license lucide-react v0.453.0 - ISC 301 * 302 * This source code is licensed under the ISC license. 303 * See the LICENSE file in the root directory of this source tree. 304 */const Xf=ge("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/** 305 * @license lucide-react v0.453.0 - ISC 306 * 307 * This source code is licensed under the ISC license. 308 * See the LICENSE file in the root directory of this source tree. 309 */const It=ge("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 310 * @license lucide-react v0.453.0 - ISC 311 * 312 * This source code is licensed under the ISC license. 313 * See the LICENSE file in the root directory of this source tree. 314 */const Lh=ge("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** 315 * @license lucide-react v0.453.0 - ISC 316 * 317 * This source code is licensed under the ISC license. 318 * See the LICENSE file in the root directory of this source tree. 319 */const Tr=ge("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/** 320 * @license lucide-react v0.453.0 - ISC 321 * 322 * This source code is licensed under the ISC license. 323 * See the LICENSE file in the root directory of this source tree. 324 */const Z6=ge("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/** 325 * @license lucide-react v0.453.0 - ISC 326 * 327 * This source code is licensed under the ISC license. 328 * See the LICENSE file in the root directory of this source tree. 329 */const W6=ge("Map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);/** 330 * @license lucide-react v0.453.0 - ISC 331 * 332 * This source code is licensed under the ISC license. 333 * See the LICENSE file in the root directory of this source tree. 334 */const J6=ge("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/** 335 * @license lucide-react v0.453.0 - ISC 336 * 337 * This source code is licensed under the ISC license. 338 * See the LICENSE file in the root directory of this source tree. 339 */const zh=ge("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/** 340 * @license lucide-react v0.453.0 - ISC 341 * 342 * This source code is licensed under the ISC license. 343 * See the LICENSE file in the root directory of this source tree. 344 */const Dl=ge("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/** 345 * @license lucide-react v0.453.0 - ISC 346 * 347 * This source code is licensed under the ISC license. 348 * See the LICENSE file in the root directory of this source tree. 349 */const NS=ge("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/** 350 * @license lucide-react v0.453.0 - ISC 351 * 352 * This source code is licensed under the ISC license. 353 * See the LICENSE file in the root directory of this source tree. 354 */const s1=ge("Paperclip",[["path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48",key:"1u3ebp"}]]);/** 355 * @license lucide-react v0.453.0 - ISC 356 * 357 * This source code is licensed under the ISC license. 358 * See the LICENSE file in the root directory of this source tree. 359 */const eT=ge("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/** 360 * @license lucide-react v0.453.0 - ISC 361 * 362 * This source code is licensed under the ISC license. 363 * See the LICENSE file in the root directory of this source tree. 364 */const tT=ge("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/** 365 * @license lucide-react v0.453.0 - ISC 366 * 367 * This source code is licensed under the ISC license. 368 * See the LICENSE file in the root directory of this source tree. 369 */const sT=ge("Plane",[["path",{d:"M17.8 19.2 16 11l3.5-3.5C21 6 21.5 4 21 3c-1-.5-3 0-4.5 1.5L13 8 4.8 6.2c-.5-.
3691-.9.1-1.1.5l-.3.5c-.2.5-.1 1 .3 1.3L9 12l-2 3H4l-1 1 3 2 2 3 1-1v-3l3-2 3.5 5.3c.3.4.8.5 1.3.3l.5-.2c.4-.3.6-.7.5-1.2z",key:"1v9wt8"}]]);/** 370 * @license lucide-react v0.453.0 - ISC 371 * 372 * This source code is licensed under the ISC license. 373 * See the LICENSE file in the root directory of this source tree. 374 */const jc=ge("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** 375 * @license lucide-react v0.453.0 - ISC 376 * 377 * This source code is licensed under the ISC license. 378 * See the LICENSE file in the root directory of this source tree. 379 */const aT=ge("Printer",[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]]);/** 380 * @license lucide-react v0.453.0 - ISC 381 * 382 * This source code is licensed under the ISC license. 383 * See the LICENSE file in the root directory of this source tree. 384 */const nT=ge("Recycle",[["path",{d:"M7 19H4.815a1.83 1.83 0 0 1-1.57-.881 1.785 1.785 0 0 1-.004-1.784L7.196 9.5",key:"x6z5xu"}],["path",{d:"M11 19h8.203a1.83 1.83 0 0 0 1.556-.89 1.784 1.784 0 0 0 0-1.775l-1.226-2.12",key:"1x4zh5"}],["path",{d:"m14 16-3 3 3 3",key:"f6jyew"}],["path",{d:"M8.293 13.596 7.196 9.5 3.1 10.598",key:"wf1obh"}],["path",{d:"m9.344 5.811 1.093-1.892A1.83 1.83 0 0 1 11.985 3a1.784 1.784 0 0 1 1.546.888l3.943 6.843",key:"9tzpgr"}],["path",{d:"m13.378 9.633 4.096 1.098 1.097-4.096",key:"1oe83g"}]]);/** 385 * @license lucide-react v0.453.0 - ISC 386 * 387 * This source code is licensed under the ISC license. 388 * See the LICENSE file in the root directory of this source tree. 389 */const Or=ge("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** 390 * @license lucide-react v0.453.0 - ISC 391 * 392 * This source code is licensed under the ISC license. 393 * See the LICENSE file in the root directory of this source tree. 394 */const AS=ge("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/** 395 * @license lucide-react v0.453.0 - ISC 396 * 397 * This source code is licensed under the ISC license. 398 * See the LICENSE file in the root directory of this source tree. 399 */const vl=ge("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/** 400 * @license lucide-react v0.453.0 - ISC 401 * 402 * This source code is licensed under the ISC license. 403 * See the LICENSE file in the root directory of this source tree. 404 */const CS=ge("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 405 * @license lucide-react v0.453.0 - ISC 406 * 407 * This source code is licensed under the ISC license. 408 * See the LICENSE file in the root directory of this source tree. 409 */const rT=ge("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/** 410 * @license lucide-react v0.453.0 - ISC 411 * 412 * This source code is licensed under the ISC license. 413 * See the LICENSE file in the root directory of this source tree. 414 */const qa=ge("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/** 415 * @license lucide-react v0.453.0 - ISC 416 * 417 * This source code is licensed under the ISC license. 418 * See the LICENSE file in the root directory of this source tree. 419 */const ba=ge("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
419y:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 420 * @license lucide-react v0.453.0 - ISC 421 * 422 * This source code is licensed under the ISC license. 423 * See the LICENSE file in the root directory of this source tree. 424 */const ES=ge("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/** 425 * @license lucide-react v0.453.0 - ISC 426 * 427 * This source code is licensed under the ISC license. 428 * See the LICENSE file in the root directory of this source tree. 429 */const lT=ge("ShoppingCart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]);/** 430 * @license lucide-react v0.453.0 - ISC 431 * 432 * This source code is licensed under the ISC license. 433 * See the LICENSE file in the root directory of this source tree. 434 */const a1=ge("SkipForward",[["polygon",{points:"5 4 15 12 5 20 5 4",key:"16p6eg"}],["line",{x1:"19",x2:"19",y1:"5",y2:"19",key:"futhcm"}]]);/** 435 * @license lucide-react v0.453.0 - ISC 436 * 437 * This source code is licensed under the ISC license. 438 * See the LICENSE file in the root directory of this source tree. 439 */const oT=ge("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** 440 * @license lucide-react v0.453.0 - ISC 441 * 442 * This source code is licensed under the ISC license. 443 * See the LICENSE file in the root directory of this source tree. 444 */const RS=ge("Star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]]);/** 445 * @license lucide-react v0.453.0 - ISC 446 * 447 * This source code is licensed under the ISC license. 448 * See the LICENSE file in the root directory of this source tree. 449 */const iT=ge("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/** 450 * @license lucide-react v0.453.0 - ISC 451 * 452 * This source code is licensed under the ISC license. 453 * See the LICENSE file in the root directory of this source tree. 454 */const cT=ge("ThumbsUp",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]);/** 455 * @license lucide-react v0.453.0 - ISC 456 * 457 * This source code is licensed under the ISC license. 458 * See the LICENSE file in the root directory of this source tree. 459 */const pc=ge("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** 460 * @license lucide-react v0.453.0 - ISC 461 * 462 * This source code is licensed under the ISC license. 463 * See the LICENSE file in the root directory of this source tree. 464 */const kS=ge("TrendingDown",[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]]);/** 465 * @license lucide-react v0.453.0 - ISC 466 * 467 * This source code is licensed under the ISC license. 468 * See the LICENSE file in the root directory of this source tree. 469 */const Yn=ge("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/** 470 * @license lucide-react v0.453.0 - ISC 471 * 472 * This source code is licensed under the ISC license. 473 * See the LICENSE file in the root directory of this source tree. 474 */const sn=ge("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** 475 * @license lucide-react v0.453.0 - ISC 476 * 477 * This source code is licensed under the ISC license. 478 * See the LICENSE file in the root directory of this source tree. 479 */const DS=ge("Truck",[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]]);/** 480 * @license lucide-react v0.453.0 - ISC 481 * 482 * This source code is licensed under the ISC license. 483 * See the LICENSE file in the root directory of this source tree. 484 */const Ro=ge("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/** 485 * @license lucide-react v0.453.0 - ISC 486 * 487 * This source code is licensed under the ISC license. 488 * See the LICENSE file in the root directory of this source tree. 489 */const n1=ge("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/** 490 * @license lucide-react v0.453.0 - ISC 491 * 492 * This source code is licensed under the ISC license. 493 * See the LICENSE file in the root directory of this source tree. 494 */const dT=ge("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** 495 * @license lucide-react v0.453.0 - ISC 496 * 497 * This source code is licensed under the ISC license. 498 * See the LICENSE file in the root directory of this source tree. 499 */const Ws=ge("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** 500 * @license lucide-react v0.453.0 - ISC 501 * 502 * This source code is licensed under the ISC license. 503 * See the LICENSE file in the root directory of this source tree. 504 */const Nc=ge("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
504],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** 505 * @license lucide-react v0.453.0 - ISC 506 * 507 * This source code is licensed under the ISC license. 508 * See the LICENSE file in the root directory of this source tree. 509 */const Ur=ge("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function uT(t,n){if(t instanceof RegExp)return{keys:!1,pattern:t};var r,o,i,d,u=[],p="",x=t.split("/");for(x[0]||x.shift();i=x.shift();)r=i[0],r==="*"?(u.push(r),p+=i[1]==="?"?"(?:/(.*))?":"/(.*)"):r===":"?(o=i.indexOf("?",1),d=i.indexOf(".",1),u.push(i.substring(1,~o?o:~d?d:i.length)),p+=~o&&!~d?"(?:/([^/]+?))?":"/([^/]+?)",~d&&(p+=(~o?"?":"")+"\\"+i.substring(d))):p+="/"+i;return{keys:u,pattern:new RegExp("^"+p+(n?"(?=$|/)":"/?$"),"i")}}var Wx={exports:{}},Jx={};/** 510 * @license React 511 * use-sync-external-store-shim.production.js 512 * 513 * Copyright (c) Meta Platforms, Inc. and affiliates. 514 * 515 * This source code is licensed under the MIT license found in the 516 * LICENSE file in the root directory of this source tree. 517 */var r1;function pT(){if(r1)return Jx;r1=1;var t=Uu();function n(g,y){return g===y&&(g!==0||1/g===1/y)||g!==g&&y!==y}var r=typeof Object.is=="function"?Object.is:n,o=t.useState,i=t.useEffect,d=t.useLayoutEffect,u=t.useDebugValue;function p(g,y){var N=y(),j=o({inst:{value:N,getSnapshot:y}}),w=j[0].inst,A=j[1];return d(function(){w.value=N,w.getSnapshot=y,x(w)&&A({inst:w})},[g,N,y]),i(function(){return x(w)&&A({inst:w}),g(function(){x(w)&&A({inst:w})})},[g]),u(N),N}function x(g){var y=g.getSnapshot;g=g.value;try{var N=y();return!r(g,N)}catch{return!0}}function h(g,y){return y()}var v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:p;return Jx.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:v,Jx}var l1;function mT(){return l1||(l1=1,Wx.exports=pT()),Wx.exports}var TS=mT();const xT=$u.useInsertionEffect,fT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",hT=fT?b.useLayoutEffect:b.useEffect,gT=xT||hT,OS=t=>{const n=b.useRef([t,(...r)=>n[0](...r)]).current;return gT(()=>{n[0]=t}),n[1]},bT="popstate",Ih="pushState",Bh="replaceState",vT="hashchange",o1=[bT,Ih,Bh,vT],yT=t=>{for(const n of o1)addEventListener(n,t);return()=>{for(const n of o1)removeEventListener(n,t)}},_S=(t,n)=>TS.useSyncExternalStore(yT,t,n),wT=()=>location.search,ST=({ssrSearch:t=""}={})=>_S(wT,()=>t),i1=()=>location.pathname,jT=({ssrPath:t}={})=>_S(i1,t?()=>t:i1),NT=(t,{replace:n=!1,state:r=null}={})=>history[n?Bh:Ih](r,"",t),AT=(t={})=>[jT(t),NT],c1=Symbol.for("wouter_v3");if(typeof history<"u"&&typeof window[c1]>"u"){for(const t of[Ih,Bh]){const n=history[t];history[t]=function(){const r=n.apply(this,arguments),o=new Event(t);return o.arguments=arguments,dispatchEvent(o),r}}Object.defineProperty(window,c1,{value:!0})}const CT=(t,n)=>n.toLowerCase().indexOf(t.toLowerCase())?"~"+n:n.slice(t.length)||"/",MS=(t="")=>t==="/"?"":t,ET=(t,n)=>t[0]==="~"?t.slice(1):MS(n)+t,RT=(t="",n)=>CT(d1(MS(t)),d1(n)),d1=t=>{try{return decodeURI(t)}catch{return t}},PS={hook:AT,searchHook:ST,parser:uT,base:"",ssrPath:void 0,ssrSearch:void 0,ssrContext:void 0,hrefs:t=>t},HS=b.createContext(PS),Ac=()=>b.useContext(HS),LS={},zS=b.createContext(LS),ea=()=>b.useContext(zS),lp=t=>{const[n,r]=t.hook(t);return[RT(t.base,n),OS((o,i)=>r(ET(o,t.base),i))]},ds=()=>lp(Ac()),IS=(t,n,r,o)=>{const{pattern:i,keys:d}=n instanceof RegExp?{keys:!1,pattern:n}:t(n||"*",o),u=i.exec(r)||[],[p,...x]=u;return p!==void 0?[!0,(()=>{const h=d!==!1?Object.fromEntries(d.map((g,y)=>[g,x[y]])):u.groups;let v={...x};return h&&Object.assign(v,h),v})(),...o?[p]:[]]:[!1,null]},kT=({children:t,...n})=>{const r=Ac(),o=n.hook?PS:r;let i=o;const[d,u]=n.ssrPath?.split("?")??[];u&&(n.ssrSearch=u,n.ssrPath=d),n.hrefs=n.hrefs??n.hook?.hrefs;let p=b.useRef({}),x=p.current,h=x;for(let v in o){const g=v==="base"?o[v]+(n[v]||""):n[v]||o[v];x===h&&g!==h[v]&&(p.current=h={...h}),h[v]=g,(g!==o[v]||g!==i[v])&&(i=h)}return b.createElement(HS.Provider,{value:i,children:t})},u1=({children:t,component:n},r)=>n?b.createElement(n,{params:r}):typeof t=="function"?t(r):t,DT=t=>{let n=b.useRef(LS);const r=n.current;return n.current=Object.keys(t).length!==Object.keys(r).length||Object.entries(t).some(([o,i])=>i!==r[o])?t:r},mt=({path:t,nest:n,match:r,...o}
517)=>{const i=Ac(),[d]=lp(i),[u,p,x]=r??IS(i.parser,t,d,n),h=DT({...ea(),...p});if(!u)return null;const v=x?b.createElement(kT,{base:x},u1(o,h)):u1(o,h);return b.createElement(zS.Provider,{value:h,children:v})},en=b.forwardRef((t,n)=>{const r=Ac(),[o,i]=lp(r),{to:d="",href:u=d,onClick:p,asChild:x,children:h,className:v,replace:g,state:y,...N}=t,j=OS(A=>{A.ctrlKey||A.metaKey||A.altKey||A.shiftKey||A.button!==0||(p?.(A),A.defaultPrevented||(A.preventDefault(),i(u,t)))}),w=r.hrefs(u[0]==="~"?u.slice(1):r.base+u,r);return x&&b.isValidElement(h)?b.cloneElement(h,{onClick:j,href:w}):b.createElement("a",{...N,onClick:j,href:w,className:v?.call?v(o===u):v,children:h,ref:n})}),Zf=t=>Array.isArray(t)?t.flatMap(n=>Zf(n&&n.type===b.Fragment?n.props.children:n)):[t],TT=({children:t,location:n})=>{const r=Ac(),[o]=lp(r);typeof window<"u"&&(window.__WOUTER_ROUTES__||(window.__WOUTER_ROUTES__=[]),Zf(t).forEach(d=>{if(b.isValidElement(d)&&d.props.path){const u=d.props.path;window.__WOUTER_ROUTES__.includes(u)||window.__WOUTER_ROUTES__.push(u)}}));for(const i of Zf(t)){let d=0;if(b.isValidElement(i)&&(d=IS(r.parser,i.props.path,n||o,i.props.nest))[0])return b.cloneElement(i,{match:d})}return null};function p1(){const[,t]=ds(),n=()=>{t("/")};return e.jsx("div",{"data-loc":"client/src/pages/NotFound.tsx:14",className:"min-h-screen w-full flex items-center justify-center bg-gradient-to-br from-slate-50 to-slate-100",children:e.jsx(_e,{"data-loc":"client/src/pages/NotFound.tsx:15",className:"w-full max-w-lg mx-4 shadow-lg border-0 bg-white/80 backdrop-blur-sm",children:e.jsxs(Me,{"data-loc":"client/src/pages/NotFound.tsx:16",className:"pt-8 pb-8 text-center",children:[e.jsx("div",{"data-loc":"client/src/pages/NotFound.tsx:17",className:"flex justify-center mb-6",children:e.jsxs("div",{"data-loc":"client/src/pages/NotFound.tsx:18",className:"relative",children:[e.jsx("div",{"data-loc":"client/src/pages/NotFound.tsx:19",className:"absolute inset-0 bg-red-100 rounded-full animate-pulse"}),e.jsx(tt,{"data-loc":"client/src/pages/NotFound.tsx:20",className:"relative h-16 w-16 text-red-500"})]})}),e.jsx("h1",{"data-loc":"client/src/pages/NotFound.tsx:24",className:"text-4xl font-bold text-slate-900 mb-2",children:"404"}),e.jsx("h2",{"data-loc":"client/src/pages/NotFound.tsx:26",className:"text-xl font-semibold text-slate-700 mb-4",children:"Page Not Found"}),e.jsxs("p",{"data-loc":"client/src/pages/NotFound.tsx:30",className:"text-slate-600 mb-8 leading-relaxed",children:["Sorry, the page you are looking for doesn't exist.",e.jsx("br",{"data-loc":"client/src/pages/NotFound.tsx:32"}),"It may have been moved or deleted."]}),e.jsx("div",{"data-loc":"client/src/pages/NotFound.tsx:36",id:"not-found-button-group",className:"flex flex-col sm:flex-row gap-3 justify-center",children:e.jsxs(ie,{"data-loc":"client/src/pages/NotFound.tsx:40",onClick:n,className:"bg-blue-600 hover:bg-blue-700 text-white px-6 py-2.5 rounded-lg transition-all duration-200 shadow-md hover:shadow-lg",children:[e.jsx(X6,{"data-loc":"client/src/pages/NotFound.tsx:44",className:"w-4 h-4 mr-2"}),"Go Home"]})})]})})})}class OT extends b.Component{constructor(n){super(n),this.state={hasError:!1,error:null}}static getDerivedStateFromError(n){return{hasError:!0,error:n}}render(){return this.state.hasError?e.jsx("div",{"data-loc":"client/src/components/ErrorBoundary.tsx:27",className:"flex items-center justify-center min-h-screen p-8 bg-background",children:e.jsxs("div",{"data-loc":"client/src/components/ErrorBoundary.tsx:28",className:"flex flex-col items-center w-full max-w-2xl p-8",children:[e.jsx(sn,{"data-loc":"client/src/components/ErrorBoundary.tsx:29",size:48,className:"text-destructive mb-6 flex-shrink-0"}),e.jsx("h2",{"data-loc":"client/src/components/ErrorBoundary.tsx:34",className:"text-xl mb-4",children:"An unexpected error occurred."}),e.jsx("div",{"data-loc":"client/src/components/ErrorBoundary.tsx:36",className:"p-4 w-full rounded bg-muted overflow-auto mb-6",children:e.jsx("pre",{"data-loc":"client/src/components/ErrorBoundary.tsx:37",className:"text-sm text-muted-foreground whitespace-break-spaces",children:this.state.error?.stack})}),e.jsxs("button",{"data-loc":"client/src/components/ErrorBoundary.tsx:42",onClick:()=>window.location.reload(),className:ye("flex items-center gap-2 px-4 py-2 rounded-lg","bg-primary text-primary-foreground","hover:opacity-90 cursor-pointer"),children:[e.jsx(AS,{"data-loc":"client/src/components/ErrorBoundary.tsx:50",size:16}),"Reload Page"]})]})}):this.props.children}}const _T=b.createContext(void 0);function MT({children:t,defaultTheme:n="light",switchable:r=!1}){const[o,i]=b.useState(()=>r&&localStorage.getItem("theme")||n);b.useEffect(()=>{const u=document.documentElement;o==="dark"?u.classList.add("dark"):u.classList.remove("dark"),r&&localStorage.setItem("theme",o)},[o,r]);const d=r?()=>{i(u=>u==="light"?"dark":"light")}:void 0;return e.jsx(_T.Provider,{"data-loc":"client/src/contexts/ThemeContext.tsx:52",value:{theme:o,toggleTheme:d,switchable:r},children:t})}const Xa=t=>{const n="https://manus.im",r="H8CHggWsCTye9vFvDX3dr4",o=`${window.location.origin}/api/oauth/callback`,d=btoa(o),u=new URL(`${n}/app-auth`);return u.searchParams.set("appId",r),u.searchParams.set("redirectUri",o),u.searchParams.set("state",d),u.searchParams.set("type","signIn"),u.toString()};function za(t){const{redirectOnUnauthenticated:n=!1,redirectPath:r=Xa()}=t??{},o=ue.useUtils(),i=ue.auth.me.useQuery(void 0,{retry:!1,refetchOnWindowFocus:!1}),d=ue.auth.logout.useMutation({onSuccess:()=>{o.auth.me.setData(void 0,null)}}),u=b.useCallback(async()=>{try{await d.mutateAsync()}
517catch(x){x instanceof Oo&&x.data?.code==="UNAUTHORIZED"||console.warn("Logout error:",x)}finally{try{sessionStorage.removeItem("manus-cookie")}catch{}window.location.href="/"}},[d]),p=b.useMemo(()=>(localStorage.setItem("manus-runtime-user-info",JSON.stringify(i.data)),{user:i.data??null,loading:i.isLoading||d.isPending,error:i.error??d.error??null,isAuthenticated:!!i.data}),[i.data,i.error,i.isLoading,d.error,d.isPending]);return b.useEffect(()=>{n&&(i.isLoading||d.isPending||p.user||typeof window>"u"||window.location.pathname!==r&&(window.location.href=r))},[n,r,d.isPending,i.isLoading,p.user]),{...p,refresh:()=>i.refetch(),logout:u}}const PT=[{icon:e.jsx(yS,{"data-loc":"client/src/pages/Home.tsx:13",className:"w-7 h-7"}),title:"Evidence Auditor",desc:"Upload documents and receive structured verdicts with strengths, gaps, and recommendations for each criterion.",accent:"border-envora-cyan",iconBg:"bg-envora-cyan/10 text-envora-cyan"},{icon:e.jsx(bn,{"data-loc":"client/src/pages/Home.tsx:20",className:"w-7 h-7"}),title:"Transparent Scoring",desc:"2-point scoring across Environment, Labor, Ethics, and Procurement. N/A redistribution ensures fair scoring for all business types.",accent:"border-envora-green",iconBg:"bg-envora-green/10 text-envora-green"},{icon:e.jsx(Ms,{"data-loc":"client/src/pages/Home.tsx:27",className:"w-7 h-7"}),title:"Hotel Integration",desc:"Hotels send invitation links to suppliers, review audited reports, and make Accept/Conditional/Reject decisions with full transparency.",accent:"border-envora-pine",iconBg:"bg-envora-pine/10 text-envora-pine"},{icon:e.jsx(ES,{"data-loc":"client/src/pages/Home.tsx:34",className:"w-7 h-7"}),title:"Verified Badge and Certificate",desc:"Earn a publicly verifiable Envora badge and certificate. Share your score with any hotel via a secure, expiry-controlled link.",accent:"border-envora-gold",iconBg:"bg-envora-gold/10 text-envora-gold"},{icon:e.jsx(Dt,{"data-loc":"client/src/pages/Home.tsx:41",className:"w-7 h-7"}),title:"GSTC and Green Key Mapping",desc:"Every criterion maps to GSTC Hotel Standard and Green Key clauses. Evidence packs are ready for hotel certification audits.",accent:"border-envora-cyan",iconBg:"bg-envora-cyan/10 text-envora-cyan"},{icon:e.jsx(Ko,{"data-loc":"client/src/pages/Home.tsx:48",className:"w-7 h-7"}),title:"International Frameworks",desc:"Built on ISO 14001, SA8000, UN SDGs, and GSTC criteria, covering all major sustainability standards.",accent:"border-envora-green",iconBg:"bg-envora-green/10 text-envora-green"}],m1=[{num:"01",title:"Register and Profile",desc:"Create your supplier account and complete your business profile. Your industry and size activate the relevant criteria automatically."},{num:"02",title:"Self-Assessment",desc:"Answer 60-80 criteria across 4 themes. Upload evidence documents for each criterion. Mark N/A where criteria don't apply."},{num:"03",title:"Evidence Audit",desc:"Your uploaded evidence is analysed against each criterion, scored, and compiled into a comprehensive Supplier Readiness Report."},{num:"04",title:"Hotel Review",desc:"Share your report with hotels. Purchasing managers review the audit findings and make a transparent Accept or Conditional decision."}],HT=[{name:"Gold",range:"75-100",color:"text-amber-600 bg-amber-50 border-amber-300"},{name:"Silver",range:"60-74",color:"text-slate-600 bg-slate-50 border-slate-300"},{name:"Bronze",range:"45-59",color:"text-amber-800 bg-amber-50 border-amber-300"}];function LT(){const{user:t,isAuthenticated:n}=za(),[,r]=ds(),o=()=>{n?r("/supplier/dashboard"):window.location.href=Xa()},i=()=>{n?r("/hotel/dashboard"):window.location.href=Xa()};return e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:90",className:"min-h-screen bg-background font-body",children:[e.jsx("nav",{"data-loc":"client/src/pages/Home.tsx:92",className:"fixed top-0 left-0 right-0 z-50 bg-background/95 backdrop-blur-sm border-b border-border",children:e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:93",className:"max-w-7xl mx-auto px-6 py-4 flex items-center justify-between",children:[e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:94",className:"flex items-center",children:e.jsx("img",{"data-loc":"client/src/pages/Home.tsx:95",src:"/manus-storage/envora-logo_f789bcb1.webp",alt:"Envora Consulting",className:"h-10 w-auto"})}),e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:97",className:"hidden md:flex items-center gap-2",children:[e.jsx("a",{"data-loc":"client/src/pages/Home.tsx:98",href:"#how-it-works",className:"px-4 py-2 rounded-lg text-sm font-bold text-envora-pine bg-envora-pine/8 hover:bg-envora-pine/15 transition-all duration-150 tracking-tight",children:"Get Verified"}),e.jsx("a",{"data-loc":"client/src/pages/Home.tsx:99",href:"#frameworks",className:"px-4 py-2 rounded-lg text-sm font-bold text-envora-pine bg-envora-pine/8 hover:bg-envora-pine/15 transition-all duration-150 tracking-tight",children:"Why Envora"}),e.jsx("a",{"data-loc":"client/src/pages/Home.tsx:100",href:"#pricing",className:"px-4 py-2 rounded-lg text-sm font-bold text-white bg-envora-pine hover:bg-envora-pine/90 transition-all duration-150 tracking-tight shadow-sm",children:"See Plans"})]}),e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:102",className:"flex items-center gap-3",children:n?e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:104",className:"flex items-center gap-3",children:[e.jsx("span",{"data-loc":"client/src/pages/Home.tsx:105",className:"text-sm font-medium text-foreground
517/70 hidden md:block",children:t?.name}),e.jsx(ie,{"data-loc":"client/src/pages/Home.tsx:106",onClick:()=>r("/supplier/dashboard"),size:"sm",className:"bg-envora-pine hover:bg-envora-pine/90 text-white font-semibold",children:"Dashboard"})]}):e.jsxs(e.Fragment,{children:[e.jsx(ie,{"data-loc":"client/src/pages/Home.tsx:112",onClick:()=>window.location.href=Xa(),variant:"ghost",size:"sm",className:"text-foreground/70 font-medium",children:"Sign In"}),e.jsx(ie,{"data-loc":"client/src/pages/Home.tsx:115",onClick:o,size:"sm",className:"bg-envora-pine hover:bg-envora-pine/90 text-white font-semibold",children:"Get Started"})]})})]})}),e.jsxs("section",{"data-loc":"client/src/pages/Home.tsx:125",className:"pt-32 pb-24 px-6 bg-gradient-to-br from-envora-pine via-[#1a4a38] to-[#1d5c42] text-white relative overflow-hidden",children:[e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:127",className:"absolute inset-0 opacity-[0.07]",style:{backgroundImage:"radial-gradient(circle at 25% 25%, #33B7E1 0%, transparent 50%), radial-gradient(circle at 75% 75%, #F0AB00 0%, transparent 50%)"}}),e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:128",className:"absolute top-0 right-0 w-1/2 h-full opacity-5",style:{backgroundImage:"repeating-linear-gradient(45deg, white 0, white 1px, transparent 0, transparent 50%)",backgroundSize:"20px 20px"}}),e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:130",className:"max-w-5xl mx-auto relative",children:[e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:131",className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-white/10 border border-white/20 text-white/80 text-xs font-semibold tracking-wide uppercase mb-8",children:[e.jsx(Ur,{"data-loc":"client/src/pages/Home.tsx:132",className:"w-3.5 h-3.5 text-envora-cyan"})," Supplier Sustainability Assessment"]}),e.jsxs("h1",{"data-loc":"client/src/pages/Home.tsx:135",className:"font-display text-5xl sm:text-6xl lg:text-7xl font-extrabold leading-[1.05] tracking-tight mb-7 text-white",children:["Sustainable Suppliers,",e.jsx("br",{"data-loc":"client/src/pages/Home.tsx:136"}),e.jsx("span",{"data-loc":"client/src/pages/Home.tsx:137",className:"text-envora-cyan",children:"Preferred Partners."})]}),e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:140",className:"text-lg sm:text-xl text-white/75 max-w-2xl mb-10 leading-relaxed font-normal",children:"Envora is the hospitality industry's supplier sustainability platform. Complete a structured self-assessment, earn your Verified badge, and share your score with any sustainability-certified hotel."}),e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:144",className:"flex flex-wrap gap-4 mb-14",children:[e.jsxs(ie,{"data-loc":"client/src/pages/Home.tsx:145",onClick:o,size:"lg",className:"bg-envora-cyan hover:bg-envora-cyan/90 text-envora-pine font-bold px-8 h-12 text-base shadow-lg shadow-envora-cyan/20",children:["Start Your Assessment ",e.jsx(Yi,{"data-loc":"client/src/pages/Home.tsx:146",className:"w-4 h-4 ml-2"})]}),e.jsxs(ie,{"data-loc":"client/src/pages/Home.tsx:148",onClick:i,variant:"outline",size:"lg",className:"border-white/30 text-white hover:bg-white/10 px-8 h-12 text-base font-semibold bg-transparent",children:["I'm a Hotel ",e.jsx(qe,{"data-loc":"client/src/pages/Home.tsx:149",className:"w-4 h-4 ml-1"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:153",className:"flex flex-wrap gap-6 text-sm text-white/60 font-medium",children:[e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:154",className:"flex items-center gap-2",children:[e.jsx(Te,{"data-loc":"client/src/pages/Home.tsx:154",className:"w-4 h-4 text-envora-cyan flex-shrink-0"})," GSTC and Green Key Mapped"]}),e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:155",className:"flex items-center gap-2",children:[e.jsx(Te,{"data-loc":"client/src/pages/Home.tsx:155",className:"w-4 h-4 text-envora-cyan flex-shrink-0"})," ISO 14001 / SA8000"]}),e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:156",className:"flex items-center gap-2",children:[e.jsx(Te,{"data-loc":"client/src/pages/Home.tsx:156",className:"w-4 h-4 text-envora-cyan flex-shrink-0"})," Evidence Audit"]}),e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:157",className:"flex items-center gap-2",children:[e.jsx(Te,{"data-loc":"client/src/pages/Home.tsx:157",className:"w-4 h-4 text-envora-cyan flex-shrink-0"})," Publicly Verifiable Badge"]})]})]})]}),e.jsx("section",{"data-loc":"client/src/pages/Home.tsx:163",className:"py-10 px-6 bg-white border-b border-border",children:e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:164",className:"max-w-4xl mx-auto",children:e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:165",className:"flex flex-wrap items-center justify-center gap-3",children:[e.jsx("span",{"data-loc":"client/src/pages/Home.tsx:166",className:"text-xs font-bold text-foreground
517/40 uppercase tracking-widest mr-2",children:"Readiness Bands"}),HT.map(d=>e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:168",className:`flex items-center gap-2 px-4 py-2 rounded-full border font-semibold text-sm ${d.color}`,children:[e.jsx(Ut,{"data-loc":"client/src/pages/Home.tsx:169",className:"w-4 h-4"}),d.name,e.jsx("span",{"data-loc":"client/src/pages/Home.tsx:171",className:"text-xs font-normal opacity-60",children:d.range})]},d.name)),e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:174",className:"flex items-center gap-2 px-4 py-2 rounded-full border border-border text-foreground/40 bg-muted font-semibold text-sm",children:[e.jsx(Ut,{"data-loc":"client/src/pages/Home.tsx:175",className:"w-4 h-4"}),"Not Yet Rated",e.jsx("span",{"data-loc":"client/src/pages/Home.tsx:177",className:"text-xs font-normal opacity-60",children:"0-44"})]})]})})}),e.jsx("section",{"data-loc":"client/src/pages/Home.tsx:184",className:"py-24 px-6 bg-background",children:e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:185",className:"max-w-6xl mx-auto",children:[e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:186",className:"text-center mb-16",children:[e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:187",className:"inline-block text-xs font-bold text-envora-pine uppercase tracking-widest mb-4 px-3 py-1 bg-envora-pine/8 rounded-full",children:"Platform Features"}),e.jsxs("h2",{"data-loc":"client/src/pages/Home.tsx:188",className:"font-display text-4xl sm:text-5xl font-extrabold text-foreground mb-5 tracking-tight",children:["Everything You Need to",e.jsx("br",{"data-loc":"client/src/pages/Home.tsx:188",className:"hidden sm:block"})," Demonstrate Compliance"]}),e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:189",className:"text-foreground/55 text-lg max-w-2xl mx-auto leading-relaxed",children:"Built specifically for hospitality supply chains, Envora covers every dimension of sustainability that sustainability-certified hotels require from their suppliers."})]}),e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:191",className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:PT.map(d=>e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:193",className:`p-7 rounded-2xl bg-card border-l-4 ${d.accent} border border-border hover:shadow-lg transition-all duration-200 group`,children:[e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:194",className:`w-14 h-14 rounded-xl flex items-center justify-center mb-5 ${d.iconBg}`,children:d.icon}),e.jsx("h3",{"data-loc":"client/src/pages/Home.tsx:197",className:"font-display text-lg font-bold text-foreground mb-2.5 tracking-tight",children:d.title}),e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:198",className:"text-foreground/55 text-sm leading-relaxed",children:d.desc})]},d.title))})]})}),e.jsx("section",{"data-loc":"client/src/pages/Home.tsx:206",id:"how-it-works",className:"py-24 px-6 bg-secondary/30",children:e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:207",className:"max-w-5xl mx-auto",children:[e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:208",className:"text-center mb-16",children:[e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:209",className:"inline-block text-xs font-bold text-envora-pine uppercase tracking-widest mb-4 px-3 py-1 bg-envora-pine/8 rounded-full",children:"Process"}),e.jsxs("h2",{"data-loc":"client/src/pages/Home.tsx:210",className:"font-display text-4xl sm:text-5xl font-extrabold text-foreground tracking-tight",children:["From Registration to Verified",e.jsx("br",{"data-loc":"client/src/pages/Home.tsx:210",className:"hidden sm:block"})," in 4 Steps"]})]}),e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:212",className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:m1.map((d,u)=>e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:214",className:"relative",children:[u<m1.length-1&&e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:216",className:"hidden lg:block absolute top-9 left-full w-full h-px bg-border z-0",style:{width:"calc(100% - 2rem)",left:"calc(100% - 1rem)"}}),e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:218",className:"bg-card rounded-2xl p-7 border border-border relative z-10 h-full",children:[e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:219",className:"font-display text-5xl font-extrabold text-envora-pine/15 mb-4 leading-none text-center",children:d.num}),e.jsx("h3",{"data-loc":"client/src/pages/Home.tsx:220",className:"font-display text-base font-bold text-foreground mb-2 tracking-tight",children:d.title}),e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:221",className:"text-foreground
517/55 text-sm leading-relaxed",children:d.desc})]})]},d.num))})]})}),e.jsx("section",{"data-loc":"client/src/pages/Home.tsx:230",id:"frameworks",className:"py-24 px-6 bg-background",children:e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:231",className:"max-w-5xl mx-auto",children:e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:232",className:"grid grid-cols-1 lg:grid-cols-2 gap-14 items-center",children:[e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:233",children:[e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:234",className:"inline-block text-xs font-bold text-envora-pine uppercase tracking-widest mb-4 px-3 py-1 bg-envora-pine/8 rounded-full",children:"International Frameworks"}),e.jsxs("h2",{"data-loc":"client/src/pages/Home.tsx:235",className:"font-display text-4xl sm:text-5xl font-extrabold text-foreground mb-6 tracking-tight leading-tight",children:["Built on the World's",e.jsx("br",{"data-loc":"client/src/pages/Home.tsx:235"}),"Leading Standards"]}),e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:236",className:"text-foreground/60 leading-relaxed mb-8 text-base",children:"Envora's 72-criterion assessment library is built against the most recognised sustainability frameworks in the hospitality industry, ensuring your score is credible and internationally recognised."}),e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:239",className:"space-y-4",children:[{name:"GSTC Hotel Standard v4",desc:"Global Sustainable Tourism Criteria, the international baseline"},{name:"ISO 14001:2015",desc:"Environmental management systems"},{name:"SA8000",desc:"Social accountability and labor rights"},{name:"UN SDGs",desc:"Sustainable Development Goals alignment"}].map(d=>e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:246",className:"flex items-start gap-3",children:[e.jsx(Te,{"data-loc":"client/src/pages/Home.tsx:247",className:"w-5 h-5 text-envora-green mt-0.5 flex-shrink-0"}),e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:248",children:[e.jsx("span",{"data-loc":"client/src/pages/Home.tsx:249",className:"font-bold text-foreground text-sm",children:d.name}),e.jsxs("span",{"data-loc":"client/src/pages/Home.tsx:250",className:"text-foreground/50 text-sm",children:[", ",d.desc]})]})]},d.name))})]}),e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:256",className:"bg-envora-pine rounded-3xl p-8 text-white shadow-2xl shadow-envora-pine/30",children:[e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:257",className:"text-xs font-bold text-white/50 uppercase tracking-widest mb-5",children:"Assessment Themes"}),e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:258",className:"space-y-4",children:[{theme:"Environment",weight:"30%",criteria:20,color:"bg-envora-green"},{theme:"Labor and Human Rights",weight:"30%",criteria:18,color:"bg-envora-cyan"},{theme:"Ethics and Governance",weight:"20%",criteria:16,color:"bg-envora-gold"},{theme:"Sustainable Procurement",weight:"20%",criteria:18,color:"bg-white/40"}].map(d=>e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:265",className:"bg-white/10 rounded-xl p-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:266",className:"flex items-center justify-between mb-2.5",children:[e.jsx("span",{"data-loc":"client/src/pages/Home.tsx:267",className:"font-semibold text-sm",children:d.theme}),e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:268",className:"flex items-center gap-2",children:[e.jsxs("span",{"data-loc":"client/src/pages/Home.tsx:269",className:"text-xs text-white/50",children:[d.criteria," criteria"]}),e.jsx("span",{"data-loc":"client/src/pages/Home.tsx:270",className:"text-xs font-bold bg-white/20 text-white px-2 py-0.5 rounded-md",children:d.weight})]})]}),e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:273",className:"h-2 bg-white/15 rounded-full overflow-hidden",children:e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:274",className:`h-full ${d.color} rounded-full`,style:{width:d.weight}})})]},d.theme))}),e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:279",className:"mt-6 pt-5 border-t border-white/15 text-xs text-white/40 font-medium",children:"72 criteria total / Scoring: 2 Compliant / 1 Partial / 0 Non-Compliant / N/A"})]})]})})}),e.jsx("section",{"data-loc":"client/src/pages/Home.tsx:288",className:"py-24 px-6 bg-secondary/30",children:e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:289",className:"max-w-5xl mx-auto",children:[e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:290",className:"text-center mb-16",children:[e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:291",className:"inline-block text-xs font-bold text-envora-pine uppercase tracking-widest mb-4 px-3 py-1 bg-envora-pine/8 rounded-full",children:"For Hotels"}),e.jsxs("h2",{"data-loc":"client/src/pages/Home.tsx:292",className:"font-display text-4xl sm:text-5xl font-extrabold text-foreground mb-5 tracking-tight",children:["Streamline Your Supplier",e.jsx("br",{"data-loc":"client/src/pages/Home.tsx:292",className:"hidden sm:block"})," Sustainability Review"]}),e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:293",className:"text-foreground
517/55 text-lg max-w-2xl mx-auto",children:"Send invitation links to your suppliers, review audited reports, and make transparent decisions, all in one platform."})]}),e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:295",className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-12",children:[{icon:e.jsx(Ws,{"data-loc":"client/src/pages/Home.tsx:297",className:"w-7 h-7"}),title:"Invite Suppliers",desc:"Send a branded invitation link to any supplier. They register, complete the assessment, and you get notified when it's ready for review."},{icon:e.jsx(yS,{"data-loc":"client/src/pages/Home.tsx:298",className:"w-7 h-7"}),title:"Audit and Human Review",desc:"The evidence auditor provides an initial verdict. Your purchasing manager makes the final Accept, Conditional, or Development Required decision."},{icon:e.jsx(Dt,{"data-loc":"client/src/pages/Home.tsx:299",className:"w-7 h-7"}),title:"Evidence Pack Export",desc:"Export a full evidence pack with GSTC and Green Key clause mapping, ready to submit as part of your hotel's certification audit."}].map(d=>e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:301",className:"bg-card rounded-2xl p-7 border border-border border-l-4 border-l-envora-pine hover:shadow-lg transition-all duration-200",children:[e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:302",className:"w-14 h-14 rounded-xl bg-envora-pine/10 text-envora-pine flex items-center justify-center mb-5",children:d.icon}),e.jsx("h3",{"data-loc":"client/src/pages/Home.tsx:305",className:"font-display text-lg font-bold text-foreground mb-2.5 tracking-tight",children:d.title}),e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:306",className:"text-foreground/55 text-sm leading-relaxed",children:d.desc})]},d.title))}),e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:310",className:"text-center",children:e.jsxs(ie,{"data-loc":"client/src/pages/Home.tsx:311",onClick:i,size:"lg",className:"bg-envora-pine hover:bg-envora-pine/90 text-white font-bold px-10 h-12 text-base",children:["Set Up Your Hotel Account ",e.jsx(Yi,{"data-loc":"client/src/pages/Home.tsx:312",className:"w-4 h-4 ml-2"})]})})]})}),e.jsx("section",{"data-loc":"client/src/pages/Home.tsx:319",id:"pricing",className:"py-24 px-6 bg-background",children:e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:320",className:"max-w-5xl mx-auto",children:[e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:321",className:"text-center mb-16",children:[e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:322",className:"inline-block text-xs font-bold text-envora-pine uppercase tracking-widest mb-4 px-3 py-1 bg-envora-pine/8 rounded-full",children:"Pricing"}),e.jsx("h2",{"data-loc":"client/src/pages/Home.tsx:323",className:"font-display text-4xl sm:text-5xl font-extrabold text-foreground tracking-tight",children:"Simple, Transparent Pricing"})]}),e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:325",className:"grid grid-cols-1 md:grid-cols-2 gap-8 max-w-2xl mx-auto",children:[{name:"Verified",price:"AED 299",period:"/year",desc:"For individual suppliers",features:["Full 72-criterion assessment","Evidence audit","Verified badge and certificate","Share report with hotels","GSTC and Green Key mapping"],cta:"Get Verified",highlight:!1},{name:"Verified Plus",price:"AED 599",period:"/year",desc:"For growing suppliers",features:["Everything in Verified","Priority audit processing","Corrective action plan","Gap-to-resolution guidance","Renewal reminders"],cta:"Get Verified Plus",highlight:!0}].map(d=>e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:346",className:`rounded-2xl p-8 border ${d.highlight?"bg-envora-pine text-white border-envora-pine shadow-2xl shadow-envora-pine/25 scale-[1.02]":"bg-card border-border"}`,children:[e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:347",className:`text-xs font-bold uppercase tracking-widest mb-3 ${d.highlight?"text-envora-cyan":"text-envora-pine"}`,children:d.name}),e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:348",className:"flex items-end gap-1.5 mb-2",children:[e.jsx("span",{"data-loc":"client/src/pages/Home.tsx:349",className:`font-display text-4xl font-extrabold tracking-tight ${d.highlight?"text-white":"text-foreground"}`,children:d.price}),e.jsx("span",{"data-loc":"client/src/pages/Home.tsx:350",className:`text-sm mb-1.5 font-medium ${d.highlight?"text-white/50":"text-foreground
517/40"}`,children:d.period})]}),e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:352",className:`text-sm mb-7 font-medium ${d.highlight?"text-white/60":"text-foreground/50"}`,children:d.desc}),e.jsx("ul",{"data-loc":"client/src/pages/Home.tsx:353",className:"space-y-3 mb-8",children:d.features.map(u=>e.jsxs("li",{"data-loc":"client/src/pages/Home.tsx:355",className:`flex items-center gap-2.5 text-sm font-medium ${d.highlight?"text-white/85":"text-foreground/70"}`,children:[e.jsx(Te,{"data-loc":"client/src/pages/Home.tsx:356",className:`w-4 h-4 flex-shrink-0 ${d.highlight?"text-envora-cyan":"text-envora-green"}`}),u]},u))}),e.jsx(ie,{"data-loc":"client/src/pages/Home.tsx:361",onClick:o,className:`w-full h-11 font-bold text-sm ${d.highlight?"bg-envora-cyan hover:bg-envora-cyan/90 text-envora-pine":"bg-envora-pine hover:bg-envora-pine/90 text-white"}`,children:d.cta})]},d.name))})]})}),e.jsxs("section",{"data-loc":"client/src/pages/Home.tsx:374",className:"py-24 px-6 bg-envora-pine text-white relative overflow-hidden",children:[e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:375",className:"absolute inset-0 opacity-[0.06]",style:{backgroundImage:"radial-gradient(circle at 80% 50%, #33B7E1 0%, transparent 60%)"}}),e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:376",className:"max-w-3xl mx-auto text-center relative",children:[e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:377",className:"w-16 h-16 rounded-2xl bg-white/10 flex items-center justify-center mx-auto mb-7",children:e.jsx(RS,{"data-loc":"client/src/pages/Home.tsx:378",className:"w-8 h-8 text-envora-gold"})}),e.jsx("h2",{"data-loc":"client/src/pages/Home.tsx:380",className:"font-display text-4xl sm:text-5xl font-extrabold mb-5 tracking-tight",children:"Ready to Get Envora Verified?"}),e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:381",className:"text-white/65 text-lg mb-10 leading-relaxed font-normal max-w-xl mx-auto",children:"Join hospitality suppliers who have demonstrated their sustainability credentials to certified hotels across the UAE and beyond."}),e.jsxs(ie,{"data-loc":"client/src/pages/Home.tsx:384",onClick:o,size:"lg",className:"bg-envora-cyan hover:bg-envora-cyan/90 text-envora-pine font-bold px-10 h-12 text-base shadow-lg shadow-envora-cyan/20",children:["Start Your Free Assessment ",e.jsx(Yi,{"data-loc":"client/src/pages/Home.tsx:385",className:"w-4 h-4 ml-2"})]})]})]}),e.jsx("footer",{"data-loc":"client/src/pages/Home.tsx:391",className:"py-10 px-6 bg-[#0d1f17] text-white/40",children:e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:392",className:"max-w-6xl mx-auto flex flex-col md:flex-row items-center justify-between gap-4",children:[e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:393",className:"flex items-center",children:e.jsx("img",{"data-loc":"client/src/pages/Home.tsx:394",src:"/manus-storage/envora-logo_f789bcb1.webp",alt:"Envora Consulting",className:"h-8 w-auto opacity-90"})}),e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:396",className:"text-xs text-white/30 font-medium",children:["© ",new Date().getFullYear()," Envora. Built for the hospitality industry. Aligned with GSTC, ISO 14001, and SA8000."]})]})})]})}var ef="focusScope.autoFocusOnMount",tf="focusScope.autoFocusOnUnmount",x1={bubbles:!1,cancelable:!0},zT="FocusScope",Cc=b.forwardRef((t,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:d,...u}=t,[p,x]=b.useState(null),h=Za(i),v=Za(d),g=b.useRef(null),y=lt(n,w=>x(w)),N=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(o){let w=function(T){if(N.paused||!p)return;const D=T.target;p.contains(D)?g.current=D:Er(g.current,{select:!0})},A=function(T){if(N.paused||!p)return;const D=T.relatedTarget;D!==null&&(p.contains(D)||Er(g.current,{select:!0}))},C=function(T){if(document.activeElement===document.body)for(const M of T)M.removedNodes.length>0&&Er(p)};document.addEventListener("focusin",w),document.addEventListener("focusout",A);const E=new MutationObserver(C);return p&&E.observe(p,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",A),E.disconnect()}}},[o,p,N.paused]),b.useEffect(()=>{if(p){h1.add(N);const w=document.activeElement;
vendor: 8,239 bytes, lines 517-532
517if(!p.contains(w)){const C=new CustomEvent(ef,x1);p.addEventListener(ef,h),p.dispatchEvent(C),C.defaultPrevented||(IT($T(BS(p)),{select:!0}),document.activeElement===w&&Er(p))}return()=>{p.removeEventListener(ef,h),setTimeout(()=>{const C=new CustomEvent(tf,x1);p.addEventListener(tf,v),p.dispatchEvent(C),C.defaultPrevented||Er(w??document.body,{select:!0}),p.removeEventListener(tf,v),h1.remove(N)},0)}}},[p,h,v,N]);const j=b.useCallback(w=>{if(!r&&!o||N.paused)return;const A=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,C=document.activeElement;if(A&&C){const E=w.currentTarget,[T,D]=BT(E);T&&D?!w.shiftKey&&C===D?(w.preventDefault(),r&&Er(T,{select:!0})):w.shiftKey&&C===T&&(w.preventDefault(),r&&Er(D,{select:!0})):C===E&&w.preventDefault()}},[r,o,N.paused]);return e.jsx(Oe.div,{tabIndex:-1,...u,ref:y,onKeyDown:j})});Cc.displayName=zT;function IT(t,{select:n=!1}={}){const r=document.activeElement;for(const o of t)if(Er(o,{select:n}),document.activeElement!==r)return}function BT(t){const n=BS(t),r=f1(n,t),o=f1(n.reverse(),t);return[r,o]}function BS(t){const n=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const i=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||i?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)n.push(r.currentNode);return n}function f1(t,n){for(const r of t)if(!VT(r,{upTo:n}))return r}function VT(t,{upTo:n}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(n!==void 0&&t===n)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function FT(t){return t instanceof HTMLInputElement&&"select"in t}function Er(t,{select:n=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&FT(t)&&n&&t.select()}}var h1=UT();function UT(){let t=[];return{add(n){const r=t[0];n!==r&&r?.pause(),t=g1(t,n),t.unshift(n)},remove(n){t=g1(t,n),t[0]?.resume()}}}function g1(t,n){const r=[...t],o=r.indexOf(n);return o!==-1&&r.splice(o,1),r}function $T(t){return t.filter(n=>n.tagName!=="A")}var sf=0;function op(){b.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??b1()),document.body.insertAdjacentElement("beforeend",t[1]??b1()),sf++,()=>{sf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),sf--}},[])}function b1(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var xn=function(){return xn=Object.assign||function(n){for(var r,o=1,i=arguments.length;o<i;o++){r=arguments[o];for(var d in r)Object.prototype.hasOwnProperty.call(r,d)&&(n[d]=r[d])}return n},xn.apply(this,arguments)};function VS(t,n){var r={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(r[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(t);i<o.length;i++)n.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(t,o[i])&&(r[o[i]]=t[o[i]]);return r}function GT(t,n,r){if(r||arguments.length===2)for(var o=0,i=n.length,d;o<i;o++)(d||!(o in n))&&(d||(d=Array.prototype.slice.call(n,0,o)),d[o]=n[o]);return t.concat(d||Array.prototype.slice.call(n))}var vu="right-scroll-bar-position",yu="width-before-scroll-bar",KT="with-scroll-bars-hidden",qT="--removed-body-scroll-bar-size";function af(t,n){return typeof t=="function"?t(n):t&&(t.current=n),t}function QT(t,n){var r=b.useState(function(){return{value:t,callback:n,facade:{get current(){return r.value},set current(o){var i=r.value;i!==o&&(r.value=o,r.callback(o,i))}}}})[0];return r.callback=n,r.facade}var YT=typeof window<"u"?b.useLayoutEffect:b.useEffect,v1=new WeakMap;function XT(t,n){var r=QT(null,function(o){return t.forEach(function(i){return af(i,o)})});return YT(function(){var o=v1.get(r);if(o){var i=new Set(o),d=new Set(t),u=r.current;i.forEach(function(p){d.has(p)||af(p,null)}),d.forEach(function(p){i.has(p)||af(p,u)})}v1.set(r,t)},[t]),r}function ZT(t){return t}function WT(t,n){n===void 0&&(n=ZT);var r=[],o=!1,i={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:t},useMedium:function(d){var u=n(d,o);return r.push(u),function(){r=r.filter(function(p){return p!==u})}},assignSyncMedium:function(d){for(o=!0;r.length;){var u=r;r=[],u.forEach(d)}r={push:function(p){return d(p)},filter:function(){return r}}},assignMedium:function(d){o=!0;var u=[];if(r.length){var p=r;r=[],p.forEach(d),u=r}var x=function(){var v=u;u=[],v.forEach(d)},h=function(){return Promise.resolve().then(x)};h(),r={push:function(v){u.push(v),h()},filter:function(v){return u=u.filter(v),r}}}};return i}function JT(t){t===void 0&&(t={});var n=WT(null);return n.options=xn({async:!0,ssr:!1},t),n}var FS=function(t){var n=t.sideCar,r=VS(t,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=n.read();if(!o)throw new Error("Sidecar medium not found");return b.createElement(o,xn({},r))};FS.isSideCarExport=!0;function e7(t,n){return t.useMedium(n),FS}var US=JT(),nf=function(){},ip=b.forwardRef(function(t,n){var r=b.useRef(null),o=b.useState({onScrollCapture:nf,onWheelCapture:nf,onTouchMoveCapture:nf}),i=o[0],d=o[1],u=t.forwardProps,p=t.children,x=t.className,h=t.removeScrollBar,v=t.enabled,g=t.shards,y=t.sideCar,N=t.noRelative,j=t.noIsolation,w=t.inert,A=t.allowPinchZoom,C=t.as,E=C===void 0?"div":C,T=t.gapMode,D=VS(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),M=y,z=XT([r,n]),O=xn(xn({},D),i);return b.createElement(b.Fragment,null,v&&b.createElement(M,{sideCar:US,removeScrollBar:h,shards:g,noRelative:N,noIsolation:j,inert:w,setCallbacks:d,allowPinchZoom:!!A,lockRef:r,gapMode:T}),u?b.cloneElement(b.Children.only(p),xn(xn({},O),{ref:z})):b.createElement(E,xn({},O,{className:x,ref:z}),p))});ip.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ip.classNames={fullWidth:yu,zeroRight:vu};var t7=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function s7(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var n=t7();return n&&t.setAttribute("nonce",n),t}function a7(t,n){t.styleSheet?t.styleSheet.cssText=n:t.appendChild(document.createTextNode(n))}function n7(t){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(t)}var r7=function(){var t=0,n=null;return{add:function(r){t==0&&(n=s7())&&(a7(n,r),n7(n)),t++},remove:function(){t--,!t&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},l7=function(){var t=r7();return function(n,r){b.useEffect(function(){return t.add(n),function(){t.remove()}},[n&&r])}},$S=function(){var t=l7(),n=function(r){var o=r.styles,i=r.dynamic;return t(o,i),null};return n},o7={left:0,top:0,right:0,gap:0},rf=function(t){return parseInt(t||"",10)||0},i7=function(t){var n=window.getComputedStyle(document.body),r=n[t==="padding"?"paddingLeft":"marginLeft"],o=n[t==="padding"?"paddingTop":"marginTop"],i=n[t==="padding"?"paddingRight":"marginRight"];return[rf(r),rf(o),rf(i)]},c7=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return o7;var n=i7(t),r=document.documentElement.clientWidth,o=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,o-r+n[2]-n[0])}},d7=$S(),Do="data-scroll-locked",u7=function(t,n,r,o){var i=t.left,d=t.top,u=t.right,p=t.gap;return r===void 0&&(r="margin"),` 518 .`.concat(KT,` { 519 overflow: hidden `).concat(o,`; 520 padding-right: `).concat(p,"px ").concat(o,`; 521 } 522 body[`).concat(Do,`] { 523 overflow: hidden `).concat(o,`; 524 overscroll-behavior: contain; 525 `).concat([n&&"position: relative ".concat(o,";"),r==="margin"&&` 526 padding-left: `.concat(i,`px; 527 padding-top: `).concat(d,`px; 528 padding-right: `).concat(u,`px; 529 margin-left:0; 530 margin-top:0; 531 margin-right: `).concat(p,"px ").concat(o,`; 532 `),r==="padding"&&"padding-right: ".concat(p,"px ").concat(o,";
532")].filter(Boolean).join(""),` 533 } 534 535 .`).concat(vu,` { 536 right: `).concat(p,"px ").concat(o,`; 537 } 538 539 .`).concat(yu,` { 540 margin-right: `).concat(p,"px ").concat(o,`; 541 } 542 543 .`).concat(vu," .").concat(vu,` { 544 right: 0 `).concat(o,`; 545 } 546 547 .`).concat(yu," .").concat(yu,` { 548 margin-right: 0 `).concat(o,`; 549 } 550 551 body[`).concat(Do,`] { 552 `).concat(qT,": ").concat(p,`px; 553 } 554`)},y1=function(){var t=parseInt(document.body.getAttribute(Do)||"0",10);return isFinite(t)?t:0},p7=function(){b.useEffect(function(){return document.body.setAttribute(Do,(y1()+1).toString()),function(){var t=y1()-1;t<=0?document.body.removeAttribute(Do):document.body.setAttribute(Do,t.toString())}},[])},m7=function(t){var n=t.noRelative,r=t.noImportant,o=t.gapMode,i=o===void 0?"margin":o;p7();var d=b.useMemo(function(){return c7(i)},[i]);return b.createElement(d7,{styles:u7(d,!n,i,r?"":"!important")})},Wf=!1;if(typeof window<"u")try{var ru=Object.defineProperty({},"passive",{get:function(){return Wf=!0,!0}});window.addEventListener("test",ru,ru),window.removeEventListener("test",ru,ru)}catch{Wf=!1}var vo=Wf?{passive:!1}:!1,x7=function(t){return t.tagName==="TEXTAREA"},GS=function(t,n){if(!(t instanceof Element))return!1;var r=window.getComputedStyle(t);return r[n]!=="hidden"&&!(r.overflowY===r.overflowX&&!x7(t)&&r[n]==="visible")},f7=function(t){return GS(t,"overflowY")},h7=function(t){return GS(t,"overflowX")},w1=function(t,n){var r=n.ownerDocument,o=n;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var i=KS(t,o);if(i){var d=qS(t,o),u=d[1],p=d[2];if(u>p)return!0}o=o.parentNode}while(o&&o!==r.body);return!1},g7=function(t){var n=t.scrollTop,r=t.scrollHeight,o=t.clientHeight;return[n,r,o]},b7=function(t){var n=t.scrollLeft,r=t.scrollWidth,o=t.clientWidth;return[n,r,o]},KS=function(t,n){return t==="v"?f7(n):h7(n)},qS=function(t,n){return t==="v"?g7(n):b7(n)},v7=function(t,n){return t==="h"&&n==="rtl"?-1:1},y7=function(t,n,r,o,i){var d=v7(t,window.getComputedStyle(n).direction),u=d*o,p=r.target,x=n.contains(p),h=!1,v=u>0,g=0,y=0;do{if(!p)break;var N=qS(t,p),j=N[0],w=N[1],A=N[2],C=w-A-d*j;(j||C)&&KS(t,p)&&(g+=C,y+=j);var E=p.parentNode;p=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!x&&p!==document.body||x&&(n.contains(p)||n===p));return(v&&Math.abs(g)<1||!v&&Math.abs(y)<1)&&(h=!0),h},lu=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},S1=function(t){return[t.deltaX,t.deltaY]},j1=function(t){return t&&"current"in t?t.current:t},w7=function(t,n){return t[0]===n[0]&&t[1]===n[1]},S7=function(t){return` 555 .block-interactivity-`.concat(t,` {pointer-events: none;} 556 .allow-interactivity-`).concat(t,` {pointer-events: all;} 557`)},j7=0,yo=[];function N7(t){var n=b.useRef([]),r=b.useRef([0,0]),o=b.useRef(),i=b.useState(j7++)[0],d=b.useState($S)[0],u=b.useRef(t);b.useEffect(function(){u.current=t},[t]),b.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var w=GT([t.lockRef.current],(t.shards||[]).map(j1),!0).filter(Boolean);return w.forEach(function(A){return A.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEac
vendor: 4,344 bytes, line 557
557h(function(A){return A.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var p=b.useCallback(function(w,A){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!u.current.allowPinchZoom;var C=lu(w),E=r.current,T="deltaX"in w?w.deltaX:E[0]-C[0],D="deltaY"in w?w.deltaY:E[1]-C[1],M,z=w.target,O=Math.abs(T)>Math.abs(D)?"h":"v";if("touches"in w&&O==="h"&&z.type==="range")return!1;var H=w1(O,z);if(!H)return!0;if(H?M=O:(M=O==="v"?"h":"v",H=w1(O,z)),!H)return!1;if(!o.current&&"changedTouches"in w&&(T||D)&&(o.current=M),!M)return!0;var K=o.current||M;return y7(K,A,w,K==="h"?T:D)},[]),x=b.useCallback(function(w){var A=w;if(!(!yo.length||yo[yo.length-1]!==d)){var C="deltaY"in A?S1(A):lu(A),E=n.current.filter(function(M){return M.name===A.type&&(M.target===A.target||A.target===M.shadowParent)&&w7(M.delta,C)})[0];if(E&&E.should){A.cancelable&&A.preventDefault();return}if(!E){var T=(u.current.shards||[]).map(j1).filter(Boolean).filter(function(M){return M.contains(A.target)}),D=T.length>0?p(A,T[0]):!u.current.noIsolation;D&&A.cancelable&&A.preventDefault()}}},[]),h=b.useCallback(function(w,A,C,E){var T={name:w,delta:A,target:C,should:E,shadowParent:A7(C)};n.current.push(T),setTimeout(function(){n.current=n.current.filter(function(D){return D!==T})},1)},[]),v=b.useCallback(function(w){r.current=lu(w),o.current=void 0},[]),g=b.useCallback(function(w){h(w.type,S1(w),w.target,p(w,t.lockRef.current))},[]),y=b.useCallback(function(w){h(w.type,lu(w),w.target,p(w,t.lockRef.current))},[]);b.useEffect(function(){return yo.push(d),t.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:y}),document.addEventListener("wheel",x,vo),document.addEventListener("touchmove",x,vo),document.addEventListener("touchstart",v,vo),function(){yo=yo.filter(function(w){return w!==d}),document.removeEventListener("wheel",x,vo),document.removeEventListener("touchmove",x,vo),document.removeEventListener("touchstart",v,vo)}},[]);var N=t.removeScrollBar,j=t.inert;return b.createElement(b.Fragment,null,j?b.createElement(d,{styles:S7(i)}):null,N?b.createElement(m7,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function A7(t){for(var n=null;t!==null;)t instanceof ShadowRoot&&(n=t.host,t=t.host),t=t.parentNode;return n}const C7=e7(US,N7);var Ec=b.forwardRef(function(t,n){return b.createElement(ip,xn({},t,{ref:n,sideCar:C7}))});Ec.classNames=ip.classNames;var E7=function(t){if(typeof document>"u")return null;var n=Array.isArray(t)?t[0]:t;return n.ownerDocument.body},wo=new WeakMap,ou=new WeakMap,iu={},lf=0,QS=function(t){return t&&(t.host||QS(t.parentNode))},R7=function(t,n){return n.map(function(r){if(t.contains(r))return r;var o=QS(r);return o&&t.contains(o)?o:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return!!r})},k7=function(t,n,r,o){var i=R7(n,Array.isArray(t)?t:[t]);iu[r]||(iu[r]=new WeakMap);var d=iu[r],u=[],p=new Set,x=new Set(i),h=function(g){!g||p.has(g)||(p.add(g),h(g.parentNode))};i.forEach(h);var v=function(g){!g||x.has(g)||Array.prototype.forEach.call(g.children,function(y){if(p.has(y))v(y);else try{var N=y.getAttribute(o),j=N!==null&&N!=="false",w=(wo.get(y)||0)+1,A=(d.get(y)||0)+1;wo.set(y,w),d.set(y,A),u.push(y),w===1&&j&&ou.set(y,!0),A===1&&y.setAttribute(r,"true"),j||y.setAttribute(o,"true")}catch(C){console.error("aria-hidden: cannot operate on ",y,C)}})};return v(n),p.clear(),lf++,function(){u.forEach(function(g){var y=wo.get(g)-1,N=d.get(g)-1;wo.set(g,y),d.set(g,N),y||(ou.has(g)||g.removeAttribute(o),ou.delete(g)),N||g.removeAttribute(r)}),lf--,lf||(wo=new WeakMap,wo=new WeakMap,ou=new WeakMap,iu={})}},cp=function(t,n,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(t)?t:[t]),i=E7(t);return i?(o.push.apply(o,Array.from(i.querySelectorAll("[aria-live], script"))),k7(o,i,r,"aria-hidden")):function(){return null}},dp="Dialog",[YS,XS]=Bs(dp),[D7,an]=YS(dp),ZS=t=>{const{__scopeDialog:n,children:r,open:o,defaultOpen:i,onOpenChange:d,modal:u=!0}=t,p=b.useRef(null),x=b.useRef(null),[h,v]=yn({prop:o,defaultProp:i??!1,onChange:d,caller:dp});return e.jsx(D7,{scope:n,triggerRef:p,contentRef:x,contentId:bs(),titleId:bs(),descriptionId:bs(),open:h,onOpenChange:v,onOpenToggle:b.useCallback(()=>v(g=>!g),[v]),modal:u,children:r})};ZS.displayName=dp;
vendor: 6,414 bytes, lines 557-561
557var WS="DialogTrigger",JS=b.forwardRef((t,n)=>{const{__scopeDialog:r,...o}=t,i=an(WS,r),d=lt(n,i.triggerRef);return e.jsx(Oe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Uh(i.open),...o,ref:d,onClick:we(t.onClick,i.onOpenToggle)})});JS.displayName=WS;var Vh="DialogPortal",[T7,ej]=YS(Vh,{forceMount:void 0}),tj=t=>{const{__scopeDialog:n,forceMount:r,children:o,container:i}=t,d=an(Vh,n);return e.jsx(T7,{scope:n,forceMount:r,children:b.Children.map(o,u=>e.jsx(Js,{present:r||d.open,children:e.jsx(Fo,{asChild:!0,container:i,children:u})}))})};tj.displayName=Vh;var Ru="DialogOverlay",sj=b.forwardRef((t,n)=>{const r=ej(Ru,t.__scopeDialog),{forceMount:o=r.forceMount,...i}=t,d=an(Ru,t.__scopeDialog);return d.modal?e.jsx(Js,{present:o||d.open,children:e.jsx(_7,{...i,ref:n})}):null});sj.displayName=Ru;var O7=Pr("DialogOverlay.RemoveScroll"),_7=b.forwardRef((t,n)=>{const{__scopeDialog:r,...o}=t,i=an(Ru,r);return e.jsx(Ec,{as:O7,allowPinchZoom:!0,shards:[i.contentRef],children:e.jsx(Oe.div,{"data-state":Uh(i.open),...o,ref:n,style:{pointerEvents:"auto",...o.style}})})}),jl="DialogContent",aj=b.forwardRef((t,n)=>{const r=ej(jl,t.__scopeDialog),{forceMount:o=r.forceMount,...i}=t,d=an(jl,t.__scopeDialog);return e.jsx(Js,{present:o||d.open,children:d.modal?e.jsx(M7,{...i,ref:n}):e.jsx(P7,{...i,ref:n})})});aj.displayName=jl;var M7=b.forwardRef((t,n)=>{const r=an(jl,t.__scopeDialog),o=b.useRef(null),i=lt(n,r.contentRef,o);return b.useEffect(()=>{const d=o.current;if(d)return cp(d)},[]),e.jsx(nj,{...t,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:we(t.onCloseAutoFocus,d=>{d.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:we(t.onPointerDownOutside,d=>{const u=d.detail.originalEvent,p=u.button===0&&u.ctrlKey===!0;(u.button===2||p)&&d.preventDefault()}),onFocusOutside:we(t.onFocusOutside,d=>d.preventDefault())})}),P7=b.forwardRef((t,n)=>{const r=an(jl,t.__scopeDialog),o=b.useRef(!1),i=b.useRef(!1);return e.jsx(nj,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:d=>{t.onCloseAutoFocus?.(d),d.defaultPrevented||(o.current||r.triggerRef.current?.focus(),d.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:d=>{t.onInteractOutside?.(d),d.defaultPrevented||(o.current=!0,d.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const u=d.target;r.triggerRef.current?.contains(u)&&d.preventDefault(),d.detail.originalEvent.type==="focusin"&&i.current&&d.preventDefault()}})}),nj=b.forwardRef((t,n)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:d,...u}=t,p=an(jl,r),x=b.useRef(null),h=lt(n,x);return op(),e.jsxs(e.Fragment,{children:[e.jsx(Cc,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:d,children:e.jsx(Io,{role:"dialog",id:p.contentId,"aria-describedby":p.descriptionId,"aria-labelledby":p.titleId,"data-state":Uh(p.open),...u,ref:h,onDismiss:()=>p.onOpenChange(!1)})}),e.jsxs(e.Fragment,{children:[e.jsx(L7,{titleId:p.titleId}),e.jsx(I7,{contentRef:x,descriptionId:p.descriptionId})]})]})}),Fh="DialogTitle",rj=b.forwardRef((t,n)=>{const{__scopeDialog:r,...o}=t,i=an(Fh,r);return e.jsx(Oe.h2,{id:i.titleId,...o,ref:n})});rj.displayName=Fh;var lj="DialogDescription",oj=b.forwardRef((t,n)=>{const{__scopeDialog:r,...o}=t,i=an(lj,r);return e.jsx(Oe.p,{id:i.descriptionId,...o,ref:n})});oj.displayName=lj;var ij="DialogClose",cj=b.forwardRef((t,n)=>{const{__scopeDialog:r,...o}=t,i=an(ij,r);return e.jsx(Oe.button,{type:"button",...o,ref:n,onClick:we(t.onClick,()=>i.onOpenChange(!1))})});cj.displayName=ij;function Uh(t){return t?"open":"closed"}var dj="DialogTitleWarning",[H7,uj]=XR(dj,{contentName:jl,titleName:Fh,docsSlug:"dialog"}),L7=({titleId:t})=>{const n=uj(dj),r=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users. 558 559If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component. 560 561For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return b.useEffect(()=>{t&&(document.getElementById(t)||console.error(r))},[r,t]),null},z7="DialogDescriptionWarning",I7=({contentRef:t,descriptionId:n})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${uj(z7).contentName}}.`;return b.useEffect(()=>{const i=t.current?.getAttribute("aria-describedby");n&&i&&(document.getElementById(n)||console.warn(o))},[o,t,n]),null},Rc=ZS,B7=JS,kc=tj,Dc=sj,Tc=aj,up=rj,pj=oj,pp=cj;const mj=b.createContext({isComposing:()=>!1,setComposing:()=>{},justEndedComposing:()=>!1,markCompositionEnd:()=>{}}),$h=()=>b.useContext(mj);function ku({...t}){const n=b.useRef(!1),r=b.useRef(!1),o=b.useRef(null),i=b.useMemo(()=>({isComposing:()=>n.current,setComposing:d=>{n.current=d},justEndedComposing:()=>r.current,markCompositionEnd:()=>{r.current=!0,o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{r.current=!1},150)}}),[]);return e.jsx(mj.Provider,{"data-loc":"client/src/components/ui/dialog.tsx:50",value:i,children:e.jsx(Rc,{"data-loc":"client/src/components/ui/dialog.tsx:51","data-slot":"dialog",...t})})}function V7({...t}){return e.jsx(kc,{"data-loc":"client/src/components/ui/dialog.tsx:65","data-slot":"dialog-portal",...t})}function xj({className:t,...n}){return e.jsx(Dc,{"data-loc":"client/src/components/ui/dialog.tsx:79","data-slot":"dialog-overlay",className:ye("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...n})}xj.displayName="DialogOverlay";function Du({className:t,children:n,showCloseButton:r=!0,onEscapeKeyDown:o,...i}){const{isComposing:d}=$h(),u=b.useCallback(p=>{if(p.isComposing||d()){p.preventDefault();return}o?.(p)},[d,o]);return e.jsxs(V7,{"data-loc":"client/src/components/ui/dialog.tsx:122","data-slot":"dialog-portal",children:[e.jsx(xj,{"data-loc":"client/src/components/ui/dialog.tsx:123"}),e.jsxs(Tc,{"data-loc":"client/src/components/ui/dialog.tsx:124","data-slot":"dialog-content",className:ye("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 roun
561ded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),onEscapeKeyDown:u,...i,children:[n,r&&e.jsxs(pp,{"data-loc":"client/src/components/ui/dialog.tsx:135","data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[e.jsx(Nc,{"data-loc":"client/src/components/ui/dialog.tsx:139"}),e.jsx("span",{"data-loc":"client/src/components/ui/dialog.tsx:140",className:"sr-only",children:"Close"})]})]})]})}function Tu({className:t,...n}){return e.jsx("div",{"data-loc":"client/src/components/ui/dialog.tsx:150","data-slot":"dialog-header",className:ye("flex flex-col gap-2 text-center sm:text-left",t),...n})}function Zi({className:t,...n}){return e.jsx("div",{"data-loc":"client/src/components/ui/dialog.tsx:160","data-slot":"dialog-footer",className:ye("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...n})}function Ou({className:t,...n}){return e.jsx(up,{"data-loc":"client/src/components/ui/dialog.tsx:176","data-slot":"dialog-title",className:ye("text-lg leading-none font-semibold",t),...n})}function cu(t){const n=b.useRef(t);n.current=t;const r=b.useRef(null);return r.current||(r.current=function(...o){return n.current.apply(this,o)}),r.current}function fj(t={}){const{onKeyDown:n,onCompositionStart:r,onCompositionEnd:o}=t,i=b.useRef(!1),d=b.useRef(null),u=b.useRef(null),p=cu(g=>{d.current&&(clearTimeout(d.current),d.current=null),u.current&&(clearTimeout(u.current),u.current=null),i.current=!0,r?.(g)}),x=cu(g=>{d.current=setTimeout(()=>{u.current=setTimeout(()=>{i.current=!1})}),o?.(g)}),h=cu(g=>{if(i.current&&(g.key==="Escape"||g.key==="Enter"&&!g.shiftKey)){g.stopPropagation();return}n?.(g)}),v=cu(()=>i.current);return{onCompositionStart:p,onCompositionEnd:x,onKeyDown:h,isComposing:v}}function Ot({className:t,type:n,onKeyDown:r,onCompositionStart:o,onCompositionEnd:i,...d}){const u=$h(),{onCompositionStart:p,onCompositionEnd:x,onKeyDown:h}=fj({onKeyDown:v=>{const g=v.nativeEvent.isComposing||u.justEndedComposing();v.key==="Enter"&&g||r?.(v)},onCompositionStart:v=>{u.setComposing(!0),o?.(v)},onCompositionEnd:v=>{u.markCompositionEnd(),setTimeout(()=>{u.setComposing(!1)},100),i?.(v)}});return e.jsx("input",{"data-loc":"client/src/components/ui/input.tsx:53",type:n,"data-slot":"input",className:ye("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t),onCompositionStart:p,onCompositionEnd:x,onKeyDown:h,...d})}var F7="Label",hj=b.forwardRef((t,n)=>e.jsx(Oe.label,{...t,ref:n,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(t.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));hj.displayName=F7;var U7=hj;function At({className:t,...n}){return e.jsx(U7,{"data-loc":"client/src/components/ui/label.tsx:11","data-slot":"label",className:ye("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...n})}function N1(t,[n,r]){return Math.min(r,Math.max(n,t))}function Gh(t){const n=t+"CollectionProvider",[r,o]=Bs(n),[i,d]=r(n,{collectionRef:{current:null},itemMap:new Map}),u=w=>{const{scope:A,children:C}=w,E=se.useRef(null),T=se.useRef(new Map).current;return e.jsx(i,{scope:A,itemMap:T,collectionRef:E,children:C})};u.displayName=n;const p=t+"CollectionSlot",x=Pr(p),h=se.forwardRef((w,A)=>{const{scope:C,children:E}=w,T=d(p,C),D=lt(A,T.collectionRef);return e.jsx(x,{ref:D,children:E})});h.displayName=p;const v=t+"CollectionItemSlot",g="data-radix-collection-item",y=Pr(v),N=se.forwardRef((w,A)=>{const{scope:C,children:E,...T}=w,D=se.useRef(null),M=lt(A,D),z=d(v,C);return se.useEffect(()=>(z.itemMap.set(D,{ref:D,...T}),()=>void z.itemMap.delete(D))),e.jsx(y,{[g]:"",ref:M,children:E})});N.displayName=v;function j(w){const A=d(t+"CollectionConsumer",w);return se.useCallback(()=>{const E=A.collectionRef.current;if(!E)return[];const T=Array.from(E.querySelectorAll(`[${g}]`));return Array.from(A.itemMap.values()).sort((z,O)=>T.indexOf(z.ref.current)-T.indexOf(O.ref.current))},[A.collectionRef,A.itemMap])}return[{Provider:u,Slot:h,ItemSlot:N},j,o]}var $7=b.createContext(void 0);function mp(t){const n=b.useContext($7);return t||n||"ltr"}function gj(t){const n=b.useRef({value:t,previous:t});return b.useMemo(()=>(n.current.value!==t&&(n.current.previous=n.current.value,n.current.value=t),n.current.previous),[t])}var G7=[" ","Enter","ArrowUp","ArrowDown"],K7=[" ","Enter"],Nl="Select",[xp,fp,q7]=Gh(Nl),[qo]=Bs(Nl,[q7,Fr]),hp=Fr(
vendor: 7,149 bytes, line 561
561),[Q7,$r]=qo(Nl),[Y7,X7]=qo(Nl),bj=t=>{const{__scopeSelect:n,children:r,open:o,defaultOpen:i,onOpenChange:d,value:u,defaultValue:p,onValueChange:x,dir:h,name:v,autoComplete:g,disabled:y,required:N,form:j}=t,w=hp(n),[A,C]=b.useState(null),[E,T]=b.useState(null),[D,M]=b.useState(!1),z=mp(h),[O,H]=yn({prop:o,defaultProp:i??!1,onChange:d,caller:Nl}),[K,ne]=yn({prop:u,defaultProp:p,onChange:x,caller:Nl}),le=b.useRef(null),Z=A?j||!!A.closest("form"):!0,[X,q]=b.useState(new Set),Q=Array.from(X).map(R=>R.props.value).join(";");return e.jsx(tp,{...w,children:e.jsxs(Q7,{required:N,scope:n,trigger:A,onTriggerChange:C,valueNode:E,onValueNodeChange:T,valueNodeHasChildren:D,onValueNodeHasChildrenChange:M,contentId:bs(),value:K,onValueChange:ne,open:O,onOpenChange:H,dir:z,triggerPointerDownPosRef:le,disabled:y,children:[e.jsx(xp.Provider,{scope:n,children:e.jsx(Y7,{scope:t.__scopeSelect,onNativeOptionAdd:b.useCallback(R=>{q(P=>new Set(P).add(R))},[]),onNativeOptionRemove:b.useCallback(R=>{q(P=>{const B=new Set(P);return B.delete(R),B})},[]),children:r})}),Z?e.jsxs(Bj,{"aria-hidden":!0,required:N,tabIndex:-1,name:v,autoComplete:g,value:K,onChange:R=>ne(R.target.value),disabled:y,form:j,children:[K===void 0?e.jsx("option",{value:""}):null,Array.from(X)]},Q):null]})})};bj.displayName=Nl;var vj="SelectTrigger",yj=b.forwardRef((t,n)=>{const{__scopeSelect:r,disabled:o=!1,...i}=t,d=hp(r),u=$r(vj,r),p=u.disabled||o,x=lt(n,u.onTriggerChange),h=fp(r),v=b.useRef("touch"),[g,y,N]=Fj(w=>{const A=h().filter(T=>!T.disabled),C=A.find(T=>T.value===u.value),E=Uj(A,w,C);E!==void 0&&u.onValueChange(E.value)}),j=w=>{p||(u.onOpenChange(!0),N()),w&&(u.triggerPointerDownPosRef.current={x:Math.round(w.pageX),y:Math.round(w.pageY)})};return e.jsx(wc,{asChild:!0,...d,children:e.jsx(Oe.button,{type:"button",role:"combobox","aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:p,"data-disabled":p?"":void 0,"data-placeholder":Vj(u.value)?"":void 0,...i,ref:x,onClick:we(i.onClick,w=>{w.currentTarget.focus(),v.current!=="mouse"&&j(w)}),onPointerDown:we(i.onPointerDown,w=>{v.current=w.pointerType;const A=w.target;A.hasPointerCapture(w.pointerId)&&A.releasePointerCapture(w.pointerId),w.button===0&&w.ctrlKey===!1&&w.pointerType==="mouse"&&(j(w),w.preventDefault())}),onKeyDown:we(i.onKeyDown,w=>{const A=g.current!=="";!(w.ctrlKey||w.altKey||w.metaKey)&&w.key.length===1&&y(w.key),!(A&&w.key===" ")&&G7.includes(w.key)&&(j(),w.preventDefault())})})})});yj.displayName=vj;var wj="SelectValue",Sj=b.forwardRef((t,n)=>{const{__scopeSelect:r,className:o,style:i,children:d,placeholder:u="",...p}=t,x=$r(wj,r),{onValueNodeHasChildrenChange:h}=x,v=d!==void 0,g=lt(n,x.onValueNodeChange);return cs(()=>{h(v)},[h,v]),e.jsx(Oe.span,{...p,ref:g,style:{pointerEvents:"none"},children:Vj(x.value)?e.jsx(e.Fragment,{children:u}):d})});Sj.displayName=wj;var Z7="SelectIcon",jj=b.forwardRef((t,n)=>{const{__scopeSelect:r,children:o,...i}=t;return e.jsx(Oe.span,{"aria-hidden":!0,...i,ref:n,children:o||"â¼"})});jj.displayName=Z7;var W7="SelectPortal",Nj=t=>e.jsx(Fo,{asChild:!0,...t});Nj.displayName=W7;var Al="SelectContent",Aj=b.forwardRef((t,n)=>{const r=$r(Al,t.__scopeSelect),[o,i]=b.useState();if(cs(()=>{i(new DocumentFragment)},[]),!r.open){const d=o;return d?vc.createPortal(e.jsx(Cj,{scope:t.__scopeSelect,children:e.jsx(xp.Slot,{scope:t.__scopeSelect,children:e.jsx("div",{children:t.children})})}),d):null}return e.jsx(Ej,{...t,ref:n})});Aj.displayName=Al;var Ka=10,[Cj,Gr]=qo(Al),J7="SelectContentImpl",e8=Pr("SelectContent.RemoveScroll"),Ej=b.forwardRef((t,n)=>{const{__scopeSelect:r,position:o="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:d,onPointerDownOutside:u,side:p,sideOffset:x,align:h,alignOffset:v,arrowPadding:g,collisionBoundary:y,collisionPadding:N,sticky:j,hideWhenDetached:w,avoidCollisions:A,...C}=t,E=$r(Al,r),[T,D]=b.useState(null),[M,z]=b.useState(null),O=lt(n,W=>D(W)),[H,K]=b.useState(null),[ne,le]=b.useState(null),Z=fp(r),[X,q]=b.useState(!1),Q=b.useRef(!1);b.useEffect(()=>{if(T)return cp(T)},[T]),op();const R=b.useCallback(W=>{const[he,...ve]=Z().map(Be=>Be.ref.current),[He]=ve.slice(-1),ze=document.activeElement;for(const Be of W)if(Be===ze||(Be?.scrollIntoView({block:"nearest"}),Be===he&&M&&(M.scrollTop=0),Be===He&&M&&(M.scrollTop=M.scrollHeight),Be?.focus(),document.activeElement!==ze))return},[Z,M]),P=b.useCallback(()=>R([H,T]),[R,H,T]);b.useEffect(()=>{X&&P()},[X,P]);const{onOpenChange:B,triggerPointerDownPosRef:V}=E;b.useEffect(()=>{if(T){let W={x:0,y:0};const he=He=>{W={x:Math.abs(Math.round(He.pageX)-(V.current?.x??0)),y:Math.abs(Math.round(He.pageY)-(V.current?.y??0))}},ve=He=>{W.x<=10&&W.y<=10?He.preventDefault():T.contains(He.target)||B(!1),document.removeEventListener("pointermove",he),V.current=null};return V.current!==null&&(document.addEventListener("pointermove",he),document.addEventListener("pointerup",ve,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",he),document.removeEventListener("pointerup",ve,{capture:!0})}}},[T,B,V]),b.useEffect(()=>{const W=()=>B(!1);return window.addEventListener("blur",W),window.addEventListener("resize",W),()=>{window.removeEventListener("blur",W),window.removeEventListener("resize",W)}},[B]);const[re,_]=Fj(W=>{const he=Z().filter(ze=>!ze.disabled),ve=he.find(ze=>ze.ref.current===document.activeElement),He=Uj(he,W,ve);He&&setTimeout(()=>He.ref.current.focus())}),L=b.useCallback((W,he,ve)=>{const He=!Q.current&&!ve;(E.value!==void 0&&E.value===he||He)&&(K(W),He&&(Q.current=!0))},[E.value]),I=b.useCallback(()=>T?.focus(),[T]),G=b.useCallback((W,he,ve)=>{const He=!Q.current&&!ve;(E.value!==void 0&&E.value===he||He)&&le(W)},[E.value]),J=o==="popper"?Jf:Rj,me=J===Jf?{side:p,sideOffset:x,align:h,alignOffset:v,arrowPadding:g,collisionBoundary:y,collisionPadding:N,sticky:j,hideWhenDetached:w,avoidCollisions:A}:{};return e.jsx(Cj,{scope:r,content:T,viewport:M,onViewportChange:z,itemRefCallback:L,selectedItem:H,onItemLeave:I,itemTextRefCallback:G,focusSelectedItem:P,selectedItemText:ne,position:o,isPositioned:X,searchRef:re,children:e.jsx(Ec,{as:e8,allowPinchZoom:!0,children:e.jsx(Cc,{asChild:!0,trapped:E.open,onMountAutoFocus:W=>{W.preventDefault()},onUnmountAutoFocus:we(i,W=>{E.trigger?.focus({preventScroll:!0}),W.preventDefault()}),children:e.jsx(Io,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:d,onPointerDownOutside:u,onFocusOutside:W=>W.preventDefault(),onDismiss:()=>E.onOpenChange(!1),children:e.jsx(J,{role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:W=>W.preventDefault(),...C,...me,onPlaced:()=>q(!0),ref:O,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:we(C.onKeyDown,W=>{const he=W.ctrlKey||W.altKey||W.metaKey;if(W.key==="Tab"&&W.preventDefault(),!he&&W.key.length===1&&_(W.key),["ArrowUp","ArrowDown","Home","End"].includes(W.key)){let He=Z().filter(ze=>!ze.disabled).map(ze=>ze.ref.current);if(["ArrowUp","End"].includes(W.key)&&(He=He.slice().reverse()),["ArrowUp","ArrowDown"].includes(W.key)){const ze=W.target,Be
vendor: 1,396 bytes, line 561
561=He.indexOf(ze);He=He.slice(Be+1)}setTimeout(()=>R(He)),W.preventDefault()}})})})})})})});Ej.displayName=J7;var t8="SelectItemAlignedPosition",Rj=b.forwardRef((t,n)=>{const{__scopeSelect:r,onPlaced:o,...i}=t,d=$r(Al,r),u=Gr(Al,r),[p,x]=b.useState(null),[h,v]=b.useState(null),g=lt(n,O=>v(O)),y=fp(r),N=b.useRef(!1),j=b.useRef(!0),{viewport:w,selectedItem:A,selectedItemText:C,focusSelectedItem:E}=u,T=b.useCallback(()=>{if(d.trigger&&d.valueNode&&p&&h&&w&&A&&C){const O=d.trigger.getBoundingClientRect(),H=h.getBoundingClientRect(),K=d.valueNode.getBoundingClientRect(),ne=C.getBoundingClientRect();if(d.dir!=="rtl"){const ze=ne.left-H.left,Be=K.left-ze,dt=O.left-Be,Ne=O.width+dt,As=Math.max(Ne,H.width),vs=window.innerWidth-Ka,ot=N1(Be,[Ka,Math.max(Ka,vs-As)]);p.style.minWidth=Ne+"px",p.style.left=ot+"px"}else{const ze=H.right-ne.right,Be=window.innerWidth-K.right-ze,dt=window.innerWidth-O.right-Be,Ne=O.width+dt,As=Math.max(Ne,H.width),vs=window.innerWidth-Ka,ot=N1(Be,[Ka,Math.max(Ka,vs-As)]);p.style.minWidth=Ne+"px",p.style.right=ot+"px"}const le=y(),Z=window.innerHeight-Ka*2,X=w.scrollHeight,q=window.getComputedStyle(h),Q=parseInt(q.borderTopWidth,10),R=parseInt(q.paddingTop,10),P=parseInt(q.borderBottomWidth,10),B=parseInt(q.paddingBottom,10),V=Q+R+X+B+P,re=Math.min(A.offsetHeight*5,V),_=window.getComputedStyle(w),L=parseInt(_.paddingTop,10),I=parseInt(_.paddingBottom,10),G=O.to
vendor: 4,507 bytes, line 561
561p+O.height/2-Ka,J=Z-G,me=A.offsetHeight/2,W=A.offsetTop+me,he=Q+R+W,ve=V-he;if(he<=G){const ze=le.length>0&&A===le[le.length-1].ref.current;p.style.bottom="0px";const Be=h.clientHeight-w.offsetTop-w.offsetHeight,dt=Math.max(J,me+(ze?I:0)+Be+P),Ne=he+dt;p.style.height=Ne+"px"}else{const ze=le.length>0&&A===le[0].ref.current;p.style.top="0px";const dt=Math.max(G,Q+w.offsetTop+(ze?L:0)+me)+ve;p.style.height=dt+"px",w.scrollTop=he-G+w.offsetTop}p.style.margin=`${Ka}px 0`,p.style.minHeight=re+"px",p.style.maxHeight=Z+"px",o?.(),requestAnimationFrame(()=>N.current=!0)}},[y,d.trigger,d.valueNode,p,h,w,A,C,d.dir,o]);cs(()=>T(),[T]);const[D,M]=b.useState();cs(()=>{h&&M(window.getComputedStyle(h).zIndex)},[h]);const z=b.useCallback(O=>{O&&j.current===!0&&(T(),E?.(),j.current=!1)},[T,E]);return e.jsx(a8,{scope:r,contentWrapper:p,shouldExpandOnScrollRef:N,onScrollButtonChange:z,children:e.jsx("div",{ref:x,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:D},children:e.jsx(Oe.div,{...i,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});Rj.displayName=t8;var s8="SelectPopperPosition",Jf=b.forwardRef((t,n)=>{const{__scopeSelect:r,align:o="start",collisionPadding:i=Ka,...d}=t,u=hp(r);return e.jsx(sp,{...u,...d,ref:n,align:o,collisionPadding:i,style:{boxSizing:"border-box",...d.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Jf.displayName=s8;var[a8,Kh]=qo(Al,{}),eh="SelectViewport",kj=b.forwardRef((t,n)=>{const{__scopeSelect:r,nonce:o,...i}=t,d=Gr(eh,r),u=Kh(eh,r),p=lt(n,d.onViewportChange),x=b.useRef(0);return e.jsxs(e.Fragment,{children:[e.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),e.jsx(xp.Slot,{scope:r,children:e.jsx(Oe.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:p,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:we(i.onScroll,h=>{const v=h.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:y}=u;if(y?.current&&g){const N=Math.abs(x.current-v.scrollTop);if(N>0){const j=window.innerHeight-Ka*2,w=parseFloat(g.style.minHeight),A=parseFloat(g.style.height),C=Math.max(w,A);if(C<j){const E=C+N,T=Math.min(j,E),D=E-T;g.style.height=T+"px",g.style.bottom==="0px"&&(v.scrollTop=D>0?D:0,g.style.justifyContent="flex-end")}}}x.current=v.scrollTop})})})]})});kj.displayName=eh;var Dj="SelectGroup",[n8,r8]=qo(Dj),l8=b.forwardRef((t,n)=>{const{__scopeSelect:r,...o}=t,i=bs();return e.jsx(n8,{scope:r,id:i,children:e.jsx(Oe.div,{role:"group","aria-labelledby":i,...o,ref:n})})});l8.displayName=Dj;var Tj="SelectLabel",o8=b.forwardRef((t,n)=>{const{__scopeSelect:r,...o}=t,i=r8(Tj,r);return e.jsx(Oe.div,{id:i.id,...o,ref:n})});o8.displayName=Tj;var _u="SelectItem",[i8,Oj]=qo(_u),_j=b.forwardRef((t,n)=>{const{__scopeSelect:r,value:o,disabled:i=!1,textValue:d,...u}=t,p=$r(_u,r),x=Gr(_u,r),h=p.value===o,[v,g]=b.useState(d??""),[y,N]=b.useState(!1),j=lt(n,E=>x.itemRefCallback?.(E,o,i)),w=bs(),A=b.useRef("touch"),C=()=>{i||(p.onValueChange(o),p.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return e.jsx(i8,{scope:r,value:o,disabled:i,textId:w,isSelected:h,onItemTextChange:b.useCallback(E=>{g(T=>T||(E?.textContent??"").trim())},[]),children:e.jsx(xp.ItemSlot,{scope:r,value:o,disabled:i,textValue:v,children:e.jsx(Oe.div,{role:"option","aria-labelledby":w,"data-highlighted":y?"":void 0,"aria-selected":h&&y,"data-state":h?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...u,ref:j,onFocus:we(u.onFocus,()=>N(!0)),onBlur:we(u.onBlur,()=>N(!1)),onClick:we(u.onClick,()=>{A.current!=="mouse"&&C()}),onPointerUp:we(u.onPointerUp,()=>{A.current==="mouse"&&C()}),onPointerDown:we(u.onPointerDown,E=>{A.current=E.pointerType}),onPointerMove:we(u.onPointerMove,E=>{A.current=E.pointerType,i?x.onItemLeave?.():A.current==="mouse"&&E.currentTarget.focu
vendor: 4,812 bytes, line 561
561s({preventScroll:!0})}),onPointerLeave:we(u.onPointerLeave,E=>{E.currentTarget===document.activeElement&&x.onItemLeave?.()}),onKeyDown:we(u.onKeyDown,E=>{x.searchRef?.current!==""&&E.key===" "||(K7.includes(E.key)&&C(),E.key===" "&&E.preventDefault())})})})})});_j.displayName=_u;var Gi="SelectItemText",Mj=b.forwardRef((t,n)=>{const{__scopeSelect:r,className:o,style:i,...d}=t,u=$r(Gi,r),p=Gr(Gi,r),x=Oj(Gi,r),h=X7(Gi,r),[v,g]=b.useState(null),y=lt(n,C=>g(C),x.onItemTextChange,C=>p.itemTextRefCallback?.(C,x.value,x.disabled)),N=v?.textContent,j=b.useMemo(()=>e.jsx("option",{value:x.value,disabled:x.disabled,children:N},x.value),[x.disabled,x.value,N]),{onNativeOptionAdd:w,onNativeOptionRemove:A}=h;return cs(()=>(w(j),()=>A(j)),[w,A,j]),e.jsxs(e.Fragment,{children:[e.jsx(Oe.span,{id:x.textId,...d,ref:y}),x.isSelected&&u.valueNode&&!u.valueNodeHasChildren?vc.createPortal(d.children,u.valueNode):null]})});Mj.displayName=Gi;var Pj="SelectItemIndicator",Hj=b.forwardRef((t,n)=>{const{__scopeSelect:r,...o}=t;return Oj(Pj,r).isSelected?e.jsx(Oe.span,{"aria-hidden":!0,...o,ref:n}):null});Hj.displayName=Pj;var th="SelectScrollUpButton",Lj=b.forwardRef((t,n)=>{const r=Gr(th,t.__scopeSelect),o=Kh(th,t.__scopeSelect),[i,d]=b.useState(!1),u=lt(n,o.onScrollButtonChange);return cs(()=>{if(r.viewport&&r.isPositioned){let p=function(){const h=x.scrollTop>0;d(h)};const x=r.viewport;return p(),x.addEventListener("scroll",p),()=>x.removeEventListener("scroll",p)}},[r.viewport,r.isPositioned]),i?e.jsx(Ij,{...t,ref:u,onAutoScroll:()=>{const{viewport:p,selectedItem:x}=r;p&&x&&(p.scrollTop=p.scrollTop-x.offsetHeight)}}):null});Lj.displayName=th;var sh="SelectScrollDownButton",zj=b.forwardRef((t,n)=>{const r=Gr(sh,t.__scopeSelect),o=Kh(sh,t.__scopeSelect),[i,d]=b.useState(!1),u=lt(n,o.onScrollButtonChange);return cs(()=>{if(r.viewport&&r.isPositioned){let p=function(){const h=x.scrollHeight-x.clientHeight,v=Math.ceil(x.scrollTop)<h;d(v)};const x=r.viewport;return p(),x.addEventListener("scroll",p),()=>x.removeEventListener("scroll",p)}},[r.viewport,r.isPositioned]),i?e.jsx(Ij,{...t,ref:u,onAutoScroll:()=>{const{viewport:p,selectedItem:x}=r;p&&x&&(p.scrollTop=p.scrollTop+x.offsetHeight)}}):null});zj.displayName=sh;var Ij=b.forwardRef((t,n)=>{const{__scopeSelect:r,onAutoScroll:o,...i}=t,d=Gr("SelectScrollButton",r),u=b.useRef(null),p=fp(r),x=b.useCallback(()=>{u.current!==null&&(window.clearInterval(u.current),u.current=null)},[]);return b.useEffect(()=>()=>x(),[x]),cs(()=>{p().find(v=>v.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[p]),e.jsx(Oe.div,{"aria-hidden":!0,...i,ref:n,style:{flexShrink:0,...i.style},onPointerDown:we(i.onPointerDown,()=>{u.current===null&&(u.current=window.setInterval(o,50))}),onPointerMove:we(i.onPointerMove,()=>{d.onItemLeave?.(),u.current===null&&(u.current=window.setInterval(o,50))}),onPointerLeave:we(i.onPointerLeave,()=>{x()})})}),c8="SelectSeparator",d8=b.forwardRef((t,n)=>{const{__scopeSelect:r,...o}=t;return e.jsx(Oe.div,{"aria-hidden":!0,...o,ref:n})});d8.displayName=c8;var ah="SelectArrow",u8=b.forwardRef((t,n)=>{const{__scopeSelect:r,...o}=t,i=hp(r),d=$r(ah,r),u=Gr(ah,r);return d.open&&u.position==="popper"?e.jsx(ap,{...i,...o,ref:n}):null});u8.displayName=ah;var p8="SelectBubbleInput",Bj=b.forwardRef(({__scopeSelect:t,value:n,...r},o)=>{const i=b.useRef(null),d=lt(o,i),u=gj(n);return b.useEffect(()=>{const p=i.current;if(!p)return;const x=window.HTMLSelectElement.prototype,v=Object.getOwnPropertyDescriptor(x,"value").set;if(u!==n&&v){const g=new Event("change",{bubbles:!0});v.call(p,n),p.dispatchEvent(g)}},[u,n]),e.jsx(Oe.select,{...r,style:{...Q2,...r.style},ref:d,defaultValue:n})});Bj.displayName=p8;function Vj(t){return t===""||t===void 0}function Fj(t){const n=Za(t),r=b.useRef(""),o=b.useRef(0),i=b.useCallback(u=>{const p=r.current+u;n(p),(function x(h){r.current=h,window.clearTimeout(o.current),h!==""&&(o.current=window.setTimeout(()=>x(""),1e3))})(p)},[n]),d=b.useCallback(()=>{r.current="",window.clearTimeout(o.current)},[]);return b.useEffect(()=>()=>window.clearTimeout(o.current),[]),[r,i,d]}function Uj(t,n,r){const i=n.length>1&&Array.from(n).every(h=>h===n[0])?n[0]:n,d=r?t.indexOf(r):-1;let u=m8(t,Math.max(d,0));i.length===1&&(u=u.filter(h=>h!==r));const x=u.find(h=>h.textValue.toLowerCase().startsWith(i.toLowerCase()));return x!==r?x:void 0}function m8(t,n){return t.map((r,o)=>t[(n+o)%t.length])}var x8=bj,f8=yj,h8=Sj,g8=jj,b8=Nj,v8=Aj,y8=kj,w8=_j,S8=Mj,j8=Hj,N8=Lj,A8=zj;function _a({...t}){return e.jsx(x8,{"data-loc":"client/src/components/ui/select.tsx:10","data-slot":"select",...t})}function Ma({...t}){return e.jsx(h8,{"data-loc":"client/src/components/ui/select.tsx:22","data-slot":"select-value",...t})}function Pa({className:t,size:n="default",children:r,...o}
561){return e.jsxs(f8,{"data-loc":"client/src/components/ui/select.tsx:34","data-slot":"select-trigger","data-size":n,className:ye("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...o,children:[r,e.jsx(g8,{"data-loc":"client/src/components/ui/select.tsx:44",asChild:!0,children:e.jsx(Ps,{"data-loc":"client/src/components/ui/select.tsx:45",className:"size-4 opacity-50"})})]})}function Ha({className:t,children:n,position:r="popper",align:o="center",...i}){return e.jsx(b8,{"data-loc":"client/src/components/ui/select.tsx:59",children:e.jsxs(v8,{"data-loc":"client/src/components/ui/select.tsx:60","data-slot":"select-content",className:ye("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:r,align:o,...i,children:[e.jsx(C8,{"data-loc":"client/src/components/ui/select.tsx:72"}),e.jsx(y8,{"data-loc":"client/src/components/ui/select.tsx:73",className:ye("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:n}),e.jsx(E8,{"data-loc":"client/src/components/ui/select.tsx:82"})]})})}function os({className:t,children:n,...r}){return e.jsxs(w8,{"data-loc":"client/src/components/ui/select.tsx:107","data-slot":"select-item",className:ye("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t),...r,children:[e.jsx("span",{"data-loc":"client/src/components/ui/select.tsx:115",className:"absolute right-2 flex size-3.5 items-center justify-center",children:e.jsx(j8,{"data-loc":"client/src/components/ui/select.tsx:116",children:e.jsx(dc,{"data-loc":"client/src/components/ui/select.tsx:117",className:"size-4"})})}),e.jsx(S8,{"data-loc":"client/src/components/ui/select.tsx:120",children:n})]})}function C8({className:t,...n}){return e.jsx(N8,{"data-loc":"client/src/components/ui/select.tsx:143","data-slot":"select-scroll-up-button",className:ye("flex cursor-default items-center justify-center py-1",t),...n,children:e.jsx(Ph,{"data-loc":"client/src/components/ui/select.tsx:151",className:"size-4"})})}function E8({className:t,...n}){return e.jsx(A8,{"data-loc":"client/src/components/ui/select.tsx:161","data-slot":"select-scroll-down-button",className:ye("flex cursor-default items-center justify-center py-1",t),...n,children:e.jsx(Ps,{"data-loc":"client/src/components/ui/select.tsx:169",className:"size-4"})})}function Qa({className:t,onKeyDown:n,onCompositionStart:r,onCompositionEnd:o,...i}){const d=$h(),{onCompositionStart:u,onCompositionEnd:p,onKeyDown:x}=fj({onKeyDown:h=>{const v=h.nativeEvent.isComposing||d.justEndedComposing();h.key==="Enter"&&!h.shiftKey&&v||n?.(h)},onCompositionStart:h=>{d.setComposing(!0),r?.(h)},onCompositionEnd:h=>{d.markCompositionEnd(),setTimeout(()=>{d.setComposing(!1)},100),o?.(h)}});return e.jsx("textarea",{"data-loc":"client/src/components/ui/textarea.tsx:53","data-slot":"textarea",className:ye("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),onCompositionStart:u,onCompositionEnd:p,onKeyDown:x,...i})}var A1=1,R8=.9,k8=.8,D8=.17,of=.1,cf=.999,T8=.9999,O8=.99,_8=/[\\\/_+.#"@\[\(\{&]/,M8=/[\\\/_+.#"@\[\(\{&]/g,P8=/[\s-]/,$j=/[\s-]/g;function nh(t,n,r,o,i,d,u){if(d===n.length)return i===t.length?A1:O8;var p=`${i},${d}`;if(u[p]!==void 0)return u[p];for(var x=o.charAt(d),h=r.indexOf(x,i),v=0,g,y,N,j;h>=0;)g=nh(t,n,r,o,h+1,d+1,u),g>v&&(h===i?g*=A1:_8.test(t.charAt(h-1))?(g*=k8,N=t.slice(i,h-1).match(M8),N&&i>0&&(g*=Math.pow(cf,N.length))):P8.test(t.charAt(h-1))?(g*=R8,j=t.slice(i,h-1).match($j),j&&i>0&&(g*=Math.pow(cf,j.length))):(g*=D8,i>0&&(g*=Math.pow(cf,h-i))),t.charAt(h)!==n.charAt(d)&&(g*=T8)),(g<of&&r.charAt(h-1)===o.charAt(d+1)||o.charAt(d+1)===o.charAt(d)&&r.charAt(h-1)!==o.charAt(d))&&
vendor: 13,729 bytes, line 561
561(y=nh(t,n,r,o,h+1,d+2,u),y*of>g&&(g=y*of)),g>v&&(v=g),h=r.indexOf(x,h+1);return u[p]=v,v}function C1(t){return t.toLowerCase().replace($j," ")}function H8(t,n,r){return t=r&&r.length>0?`${t+" "+r.join(" ")}`:t,nh(t,n,C1(t),C1(n),0,0,{})}var Fi='[cmdk-group=""]',df='[cmdk-group-items=""]',L8='[cmdk-group-heading=""]',Gj='[cmdk-item=""]',E1=`${Gj}:not([aria-disabled="true"])`,rh="cmdk-item-select",No="data-value",z8=(t,n,r)=>H8(t,n,r),Kj=b.createContext(void 0),Oc=()=>b.useContext(Kj),qj=b.createContext(void 0),qh=()=>b.useContext(qj),Qj=b.createContext(void 0),Yj=b.forwardRef((t,n)=>{let r=Ao(()=>{var L,I;return{search:"",value:(I=(L=t.value)!=null?L:t.defaultValue)!=null?I:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),o=Ao(()=>new Set),i=Ao(()=>new Map),d=Ao(()=>new Map),u=Ao(()=>new Set),p=Xj(t),{label:x,children:h,value:v,onValueChange:g,filter:y,shouldFilter:N,loop:j,disablePointerSelection:w=!1,vimBindings:A=!0,...C}=t,E=bs(),T=bs(),D=bs(),M=b.useRef(null),z=Y8();Cl(()=>{if(v!==void 0){let L=v.trim();r.current.value=L,O.emit()}},[v]),Cl(()=>{z(6,X)},[]);let O=b.useMemo(()=>({subscribe:L=>(u.current.add(L),()=>u.current.delete(L)),snapshot:()=>r.current,setState:(L,I,G)=>{var J,me,W,he;if(!Object.is(r.current[L],I)){if(r.current[L]=I,L==="search")Z(),ne(),z(1,le);else if(L==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ve=document.getElementById(D);ve?ve.focus():(J=document.getElementById(E))==null||J.focus()}if(z(7,()=>{var ve;r.current.selectedItemId=(ve=q())==null?void 0:ve.id,O.emit()}),G||z(5,X),((me=p.current)==null?void 0:me.value)!==void 0){let ve=I??"";(he=(W=p.current).onValueChange)==null||he.call(W,ve);return}}O.emit()}},emit:()=>{u.current.forEach(L=>L())}}),[]),H=b.useMemo(()=>({value:(L,I,G)=>{var J;I!==((J=d.current.get(L))==null?void 0:J.value)&&(d.current.set(L,{value:I,keywords:G}),r.current.filtered.items.set(L,K(I,G)),z(2,()=>{ne(),O.emit()}))},item:(L,I)=>(o.current.add(L),I&&(i.current.has(I)?i.current.get(I).add(L):i.current.set(I,new Set([L]))),z(3,()=>{Z(),ne(),r.current.value||le(),O.emit()}),()=>{d.current.delete(L),o.current.delete(L),r.current.filtered.items.delete(L);let G=q();z(4,()=>{Z(),G?.getAttribute("id")===L&&le(),O.emit()})}),group:L=>(i.current.has(L)||i.current.set(L,new Set),()=>{d.current.delete(L),i.current.delete(L)}),filter:()=>p.current.shouldFilter,label:x||t["aria-label"],getDisablePointerSelection:()=>p.current.disablePointerSelection,listId:E,inputId:D,labelId:T,listInnerRef:M}),[]);function K(L,I){var G,J;let me=(J=(G=p.current)==null?void 0:G.filter)!=null?J:z8;return L?me(L,r.current.search,I):0}function ne(){if(!r.current.search||p.current.shouldFilter===!1)return;let L=r.current.filtered.items,I=[];r.current.filtered.groups.forEach(J=>{let me=i.current.get(J),W=0;me.forEach(he=>{let ve=L.get(he);W=Math.max(ve,W)}),I.push([J,W])});let G=M.current;Q().sort((J,me)=>{var W,he;let ve=J.getAttribute("id"),He=me.getAttribute("id");return((W=L.get(He))!=null?W:0)-((he=L.get(ve))!=null?he:0)}).forEach(J=>{let me=J.closest(df);me?me.appendChild(J.parentElement===me?J:J.closest(`${df} > *`)):G.appendChild(J.parentElement===G?J:J.closest(`${df} > *`))}),I.sort((J,me)=>me[1]-J[1]).forEach(J=>{var me;let W=(me=M.current)==null?void 0:me.querySelector(`${Fi}[${No}="${encodeURIComponent(J[0])}"]`);W?.parentElement.appendChild(W)})}function le(){let L=Q().find(G=>G.getAttribute("aria-disabled")!=="true"),I=L?.getAttribute(No);O.setState("value",I||void 0)}function Z(){var L,I,G,J;if(!r.current.search||p.current.shouldFilter===!1){r.current.filtered.count=o.current.size;return}r.current.filtered.groups=new Set;let me=0;for(let W of o.current){let he=(I=(L=d.current.get(W))==null?void 0:L.value)!=null?I:"",ve=(J=(G=d.current.get(W))==null?void 0:G.keywords)!=null?J:[],He=K(he,ve);r.current.filtered.items.set(W,He),He>0&&me++}for(let[W,he]of i.current)for(let ve of he)if(r.current.filtered.items.get(ve)>0){r.current.filtered.groups.add(W);break}r.current.filtered.count=me}function X(){var L,I,G;let J=q();J&&(((L=J.parentElement)==null?void 0:L.firstChild)===J&&((G=(I=J.closest(Fi))==null?void 0:I.querySelector(L8))==null||G.scrollIntoView({block:"nearest"})),J.scrollIntoView({block:"nearest"}))}function q(){var L;return(L=M.current)==null?void 0:L.querySelector(`${Gj}[aria-selected="true"]`)}function Q(){var L;return Array.from(((L=M.current)==null?void 0:L.querySelectorAll(E1))||[])}function R(L){let I=Q()[L];I&&O.setState("value",I.getAttribute(No))}function P(L){var I;let G=q(),J=Q(),me=J.findIndex(he=>he===G),W=J[me+L];(I=p.current)!=null&&I.loop&&(W=me+L<0?J[J.length-1]:me+L===J.length?J[0]:J[me+L]),W&&O.setState("value",W.getAttribute(No))}function B(L){let I=q(),G=I?.closest(Fi),J;for(;G&&!J;)G=L>0?q8(G,Fi):Q8(G,Fi),J=G?.querySelector(E1);J?O.setState("value",J.getAttribute(No)):P(L)}let V=()=>R(Q().length-1),re=L=>{L.preventDefault(),L.metaKey?V():L.altKey?B(1):P(1)},_=L=>{L.preventDefault(),L.metaKey?R(0):L.altKey?B(-1):P(-1)};return b.createElement(Oe.div,{ref:n,tabIndex:-1,...C,"cmdk-root":"",onKeyDown:L=>{var I;(I=C.onKeyDown)==null||I.call(C,L);let G=L.nativeEvent.isComposing||L.keyCode===229;if(!(L.defaultPrevented||G))switch(L.key){case"n":case"j":{A&&L.ctrlKey&&re(L);break}case"ArrowDown":{re(L);break}case"p":case"k":{A&&L.ctrlKey&&_(L);break}case"ArrowUp":{_(L);break}case"Home":{L.preventDefault(),R(0);break}case"End":{L.preventDefault(),V();break}case"Enter":{L.preventDefault();let J=q();if(J){let me=new Event(rh);J.dispatchEvent(me)}}}}},b.createElement("label",{"cmdk-label":"",htmlFor:H.inputId,id:H.labelId,style:Z8},x),gp(t,L=>b.createElement(qj.Provider,{value:O},b.createElement(Kj.Provider,{value:H},L))))}),I8=b.forwardRef((t,n)=>{var r,o;let i=bs(),d=b.useRef(null),u=b.useContext(Qj),p=Oc(),x=Xj(t),h=(o=(r=x.current)==null?void 0:r.forceMount)!=null?o:u?.forceMount;Cl(()=>{if(!h)return p.item(i,u?.id)},[h]);let v=Zj(i,d,[t.value,t.children,d],t.keywords),g=qh(),y=Ir(z=>z.value&&z.value===v.current),N=Ir(z=>h||p.filter()===!1?!0:z.search?z.filtered.items.get(i)>0:!0);b.useEffect(()=>{let z=d.current;if(!(!z||t.disabled))return z.addEventListener(rh,j),()=>z.removeEventListener(rh,j)},[N,t.onSelect,t.disabled]);function j(){var z,O;w(),(O=(z=x.current).onSelect)==null||O.call(z,v.current)}function w(){g.setState("value",v.current,!0)}if(!N)return null;let{disabled:A,value:C,onSelect:E,forceMount:T,keywords:D,...M}=t;return b.createElement(Oe.div,{ref:Gn(d,n),...M,id:i,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!y,"data-disabled":!!A,"data-selected":!!y,onPointerMove:A||p.getDisablePointerSelection()?void 0:w,onClick:A?void 0:j},t.children)}),B8=b.forwardRef((t,n)=>{let{heading:r,children:o,forceMount:i,...d}=t,u=bs(),p=b.useRef(null),x=b.useRef(null),h=bs(),v=Oc(),g=Ir(N=>i||v.filter()===!1?!0:N.search?N.filtered.groups.has(u):!0);Cl(()=>v.group(u),[]),Zj(u,p,[t.value,t.heading,x]);let y=b.useMemo(()=>({id:u,forceMount:i}),[i]);return b.createElement(Oe.div,{ref:Gn(p,n),...d,"cmdk-group":"",role:"presentation",hidden:g?void 0:!0},r&&b.createElement("div",{ref:x,"cmdk-group-heading":"","aria-hidden":!0,id:h},r),gp(t,N=>b.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?h:void 0},b.createElement(Qj.Provider,{value:y},N))))}),V8=b.forwardRef((t,n)=>{let{alwaysRender:r,...o}=t,i=b.useRef(null),d=Ir(u=>!u.search);return!r&&!d?null:b.createElement(Oe.div,{ref:Gn(i,n),...o,"cmdk-separator":"",role:"separator"})}),F8=b.forwardRef((t,n)=>{let{onValueChange:r,...o}=t,i=t.value!=null,d=qh(),u=Ir(h=>h.search),p=Ir(h=>h.selectedItemId),x=Oc();return b.useEffect(()=>{t.value!=null&&d.setState("search",t.value)},[t.value]),b.createElement(Oe.input,{ref:n,...o,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":x.listId,"aria-labelledby":x.labelId,"aria-activedescendant":p,id:x.inputId,type:"text",value:i?t.value:u,onChange:h=>{i||d.setState("search",h.target.value),r?.(h.target.value)}})}),U8=b.forwardRef((t,n)=>{let{children:r,label:o="Suggestions",...i}=t,d=b.useRef(null),u=b.useRef(null),p=Ir(h=>h.selectedItemId),x=Oc();return b.useEffect(()=>{if(u.current&&d.current){let h=u.current,v=d.current,g,y=new ResizeObserver(()=>{g=requestAnimationFrame(()=>{let N=h.offsetHeight;v.style.setProperty("--cmdk-list-height",N.toFixed(1)+"px")})});return y.observe(h),()=>{cancelAnimationFrame(g),y.unobserve(h)}}},[]),b.createElement(Oe.div,{ref:Gn(d,n),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":p,"aria-label":o,id:x.listId},gp(t,h=>b.createElement("div",{ref:Gn(u,x.listInnerRef),"cmdk-list-sizer":""},h)))}),$8=b.forwardRef((t,n)=>{let{open:r,onOpenChange:o,overlayClassName:i,contentClassName:d,container:u,...p}=t;return b.createElement(Rc,{open:r,onOpenChange:o},b.createElement(kc,{container:u},b.createElement(Dc,{"cmdk-overlay":"",className:i}),b.createElement(Tc,{"aria-label":t.label,"cmdk-dialog":"",className:d},b.createElement(Yj,{ref:n,...p}))))}),G8=b.forwardRef((t,n)=>Ir(r=>r.filtered.count===0)?b.createElement(Oe.div,{ref:n,...t,"cmdk-empty":"",role:"presentation"}):null),K8=b.forwardRef((t,n)=>{let{progress:r,children:o,label:i="Loading...",...d}=t;return b.createElement(Oe.div,{ref:n,...d,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},gp(t,u=>b.createElement("div",{"aria-hidden":!0},u)))}),Qo=Object.assign(Yj,{List:U8,Item:I8,Input:F8,Group:B8,Separator:V8,Dialog:$8,Empty:G8,Loading:K8});function q8(t,n){let r=t.nextElementSibling;for(;r;){if(r.matches(n))return r;r=r.nextElementSibling}}function Q8(t,n){let r=t.previousElementSibling;for(;r;){if(r.matches(n))return r;r=r.previousElementSibling}}function Xj(t){let n=b.useRef(t);return Cl(()=>{n.current=t}),n}var Cl=typeof window>"u"?b.useEffect:b.useLayoutEffect;function Ao(t){let n=b.useRef();return n.current===void 0&&(n.current=t()),n}function Ir(t){let n=qh(),r=()=>t(n.snapshot());return b.useSyncExternalStore(n.subscribe,r,r)}function Zj(t,n,r,o=[]){let i=b.useRef(),d=Oc();return Cl(()=>{var u;let p=(()=>{var h;for(let v of r){if(typeof v=="string")return v.trim();if(typeof v=="object"&&"current"in v)return v.current?(h=v.current.textContent)==null?void 0:h.trim():i.current}})(),x=o.map(h=>h.trim());d.value(t,p,x),(u=n.current)==null||u.setAttribute(No,p),i.current=p}),i}var Y8=()=>{let[t,n]=b.useState(),r=Ao(()=>new Map);return Cl(()=>{r.current.forEach(o=>o()),r.current=new Map},[t]),(o,i)=>{r.current.set(o,i),n({})}};function X8(t){let n=t.type;return typeof n=="function"?n(t.props):"render"in n?n.render(t.props):t}function gp({asChild:t,children:n},r){return t&&b.isValidElement(n)?b.cloneElement(X8(n),{ref:n.ref},r(n.props.children)):r(n)}var Z8={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function Wj({className:t,...n}){return e.jsx(Qo,{"data-loc":"client/src/components/ui/command.tsx:21","data-slot":"command",className:ye("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),...n})}function Jj({className:t,...n}){return e.jsxs("div",{"data-loc":"client/src/components/ui/command.tsx:68","data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[e.jsx(CS,{"data-loc":"client/src/components/ui/command.tsx:72",className:"size-4 shrink-0 opacity-50"}),e.jsx(Qo.Input,{"data-loc":"client/src/components/ui/command.tsx:73","data-slot":"command-input",className:ye("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),...n})]})}function W8({className:t,...n}){return e.jsx(Qo.List,{"data-loc":"client/src/components/ui/command.tsx:90","data-slot":"command-list",className:ye("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),...n})}function J8({...t}){return e.jsx(Qo.Empty,{"data-loc":"client/src/components/ui/command.tsx:105","data-slot":"command-empty",className:"py-6 text-center text-sm",...t})}function eO({className:t,...n}){return e.jsx(Qo.Group,{"data-loc":"client/src/components/ui/command.tsx:118","data-slot":"command-group",className:ye("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),...n})}function tO({className:t,...n}){return e.jsx(Qo.Item,{"data-loc":"client/src/components/ui/command.tsx:147","data-slot":"command-item",className:ye("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...n})}var bp="Popover",[eN]=Bs(bp,[Fr]),_c=Fr(),[sO,Kr]=eN(bp),tN=t=>{const{__scopePopover:n,children:r,open:o,defaultOpen:i,onOpenChange:d,modal:u=!1}=t,p=_c(n),x=b.useRef(null),[h,v]=b.useState(!1),[g,y]=yn({prop:o,defaultProp:i??!1,onChange:d,caller:bp});return e.jsx(tp,{...p,children:e.jsx(sO,{scope:n,contentId:bs(),triggerRef:x,open:g,onOpenChange:y,onOpenToggle:b.useCallback(()=>y(N=>!N),[y]),hasCustomAnchor:h,onCustomAnchorAdd:b.useCallback(()=>v(!0),[]),onCustomAnchorRemove:b.useCallback(()=>v(!1),[]),modal:u,children:r})})};tN.displayName=bp;
vendor: 4,694 bytes, line 561
561var sN="PopoverAnchor",aO=b.forwardRef((t,n)=>{const{__scopePopover:r,...o}=t,i=Kr(sN,r),d=_c(r),{onCustomAnchorAdd:u,onCustomAnchorRemove:p}=i;return b.useEffect(()=>(u(),()=>p()),[u,p]),e.jsx(wc,{...d,...o,ref:n})});aO.displayName=sN;var aN="PopoverTrigger",nN=b.forwardRef((t,n)=>{const{__scopePopover:r,...o}=t,i=Kr(aN,r),d=_c(r),u=lt(n,i.triggerRef),p=e.jsx(Oe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":cN(i.open),...o,ref:u,onClick:we(t.onClick,i.onOpenToggle)});return i.hasCustomAnchor?p:e.jsx(wc,{asChild:!0,...d,children:p})});nN.displayName=aN;var Qh="PopoverPortal",[nO,rO]=eN(Qh,{forceMount:void 0}),rN=t=>{const{__scopePopover:n,forceMount:r,children:o,container:i}=t,d=Kr(Qh,n);return e.jsx(nO,{scope:n,forceMount:r,children:e.jsx(Js,{present:r||d.open,children:e.jsx(Fo,{asChild:!0,container:i,children:o})})})};rN.displayName=Qh;var Lo="PopoverContent",lN=b.forwardRef((t,n)=>{const r=rO(Lo,t.__scopePopover),{forceMount:o=r.forceMount,...i}=t,d=Kr(Lo,t.__scopePopover);return e.jsx(Js,{present:o||d.open,children:d.modal?e.jsx(oO,{...i,ref:n}):e.jsx(iO,{...i,ref:n})})});lN.displayName=Lo;var lO=Pr("PopoverContent.RemoveScroll"),oO=b.forwardRef((t,n)=>{const r=Kr(Lo,t.__scopePopover),o=b.useRef(null),i=lt(n,o),d=b.useRef(!1);return b.useEffect(()=>{const u=o.current;if(u)return cp(u)},[]),e.jsx(Ec,{as:lO,allowPinchZoom:!0,children:e.jsx(oN,{...t,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:we(t.onCloseAutoFocus,u=>{u.preventDefault(),d.current||r.triggerRef.current?.focus()}),onPointerDownOutside:we(t.onPointerDownOutside,u=>{const p=u.detail.originalEvent,x=p.button===0&&p.ctrlKey===!0,h=p.button===2||x;d.current=h},{checkForDefaultPrevented:!1}),onFocusOutside:we(t.onFocusOutside,u=>u.preventDefault(),{checkForDefaultPrevented:!1})})})}),iO=b.forwardRef((t,n)=>{const r=Kr(Lo,t.__scopePopover),o=b.useRef(!1),i=b.useRef(!1);return e.jsx(oN,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:d=>{t.onCloseAutoFocus?.(d),d.defaultPrevented||(o.current||r.triggerRef.current?.focus(),d.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:d=>{t.onInteractOutside?.(d),d.defaultPrevented||(o.current=!0,d.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const u=d.target;r.triggerRef.current?.contains(u)&&d.preventDefault(),d.detail.originalEvent.type==="focusin"&&i.current&&d.preventDefault()}})}),oN=b.forwardRef((t,n)=>{const{__scopePopover:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:d,disableOutsidePointerEvents:u,onEscapeKeyDown:p,onPointerDownOutside:x,onFocusOutside:h,onInteractOutside:v,...g}=t,y=Kr(Lo,r),N=_c(r);return op(),e.jsx(Cc,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:d,children:e.jsx(Io,{asChild:!0,disableOutsidePointerEvents:u,onInteractOutside:v,onEscapeKeyDown:p,onPointerDownOutside:x,onFocusOutside:h,onDismiss:()=>y.onOpenChange(!1),children:e.jsx(sp,{"data-state":cN(y.open),role:"dialog",id:y.contentId,...N,...g,ref:n,style:{...g.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),iN="PopoverClose",cO=b.forwardRef((t,n)=>{const{__scopePopover:r,...o}=t,i=Kr(iN,r);return e.jsx(Oe.button,{type:"button",...o,ref:n,onClick:we(t.onClick,()=>i.onOpenChange(!1))})});cO.displayName=iN;var dO="PopoverArrow",uO=b.forwardRef((t,n)=>{const{__scopePopover:r,...o}=t,i=_c(r);return e.jsx(ap,{...i,...o,ref:n})});uO.displayName=dO;function cN(t){return t?"open":"closed"}var pO=tN,mO=nN,xO=rN,fO=lN;function hO({...t}){return e.jsx(pO,{"data-loc":"client/src/components/ui/popover.tsx:9","data-slot":"popover",...t})}function gO({...t}){return e.jsx(mO,{"data-loc":"client/src/components/ui/popover.tsx:15","data-slot":"popover-trigger",...t})}function bO({className:t,align:n="center",sideOffset:r=4,...o}){return e.jsx(xO,{"data-loc":"client/src/components/ui/popover.tsx:25",children:e.jsx(fO,{"data-loc":"client/src/components/ui/popover.tsx:26","data-slot":"popover-content",align:n,sideOffset:r,className:ye("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
561de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",t),...o})})}const vO=["Afghanistan","Albania","Algeria","Andorra","Angola","Antigua and Barbuda","Argentina","Armenia","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bhutan","Bolivia","Bosnia and Herzegovina","Botswana","Brazil","Brunei","Bulgaria","Burkina Faso","Burundi","Cabo Verde","Cambodia","Cameroon","Canada","Central African Republic","Chad","Chile","China","Colombia","Comoros","Congo (Brazzaville)","Congo (Kinshasa)","Costa Rica","Croatia","Cuba","Cyprus","Czech Republic","Denmark","Djibouti","Dominica","Dominican Republic","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Eswatini","Ethiopia","Fiji","Finland","France","Gabon","Gambia","Georgia","Germany","Ghana","Greece","Grenada","Guatemala","Guinea","Guinea-Bissau","Guyana","Haiti","Honduras","Hungary","Iceland","India","Indonesia","Iran","Iraq","Ireland","Israel","Italy","Jamaica","Japan","Jordan","Kazakhstan","Kenya","Kiribati","Kuwait","Kyrgyzstan","Laos","Latvia","Lebanon","Lesotho","Liberia","Libya","Liechtenstein","Lithuania","Luxembourg","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Marshall Islands","Mauritania","Mauritius","Mexico","Micronesia","Moldova","Monaco","Mongolia","Montenegro","Morocco","Mozambique","Myanmar","Namibia","Nauru","Nepal","Netherlands","New Zealand","Nicaragua","Niger","Nigeria","North Korea","North Macedonia","Norway","Oman","Pakistan","Palau","Palestine","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Poland","Portugal","Qatar","Romania","Russia","Rwanda","Saint Kitts and Nevis","Saint Lucia","Saint Vincent and the Grenadines","Samoa","San Marino","Sao Tome and Principe","Saudi Arabia","Senegal","Serbia","Seychelles","Sierra Leone","Singapore","Slovakia","Slovenia","Solomon Islands","Somalia","South Africa","South Korea","South Sudan","Spain","Sri Lanka","Sudan","Suriname","Sweden","Switzerland","Syria","Taiwan","Tajikistan","Tanzania","Thailand","Timor-Leste","Togo","Tonga","Trinidad and Tobago","Tunisia","Turkey","Turkmenistan","Tuvalu","UAE","Uganda","Ukraine","United Kingdom","United States","Uruguay","Uzbekistan","Vanuatu","Vatican City","Venezuela","Vietnam","Yemen","Zambia","Zimbabwe"];function yO({value:t,onChange:n,placeholder:r="Search country...",className:o}){const[i,d]=b.useState(!1);return e.jsxs(hO,{"data-loc":"client/src/components/CountryCombobox.tsx:69",open:i,onOpenChange:d,children:[e.jsx(gO,{"data-loc":"client/src/components/CountryCombobox.tsx:70",asChild:!0,children:e.jsxs(ie,{"data-loc":"client/src/components/CountryCombobox.tsx:71",variant:"outline",role:"combobox","aria-expanded":i,className:ye("w-full justify-between mt-1 font-normal bg-background",!t&&"text-muted-foreground",o),children:[t||r,e.jsx(K6,{"data-loc":"client/src/components/CountryCombobox.tsx:82",className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),e.jsx(bO,{"data-loc":"client/src/components/CountryCombobox.tsx:85",className:"w-[--radix-popover-trigger-width] p-0",align:"start",children:e.jsxs(Wj,{"data-loc":"client/src/components/CountryCombobox.tsx:86",children:[e.jsx(Jj,{"data-loc":"client/src/components/CountryCombobox.tsx:87",placeholder:r}),e.jsxs(W8,{"data-loc":"client/src/components/CountryCombobox.tsx:88",children:[e.jsx(J8,{"data-loc":"client/src/components/CountryCombobox.tsx:89",children:"No country found."}),e.jsx(eO,{"data-loc":"client/src/components/CountryCombobox.tsx:90",children:vO.map(u=>e.jsxs(tO,{"data-loc":"client/src/components/CountryCombobox.tsx:92",value:u,onSelect:p=>{n(p===t?"":p),d(!1)},children:[e.jsx(dc,{"data-loc":"client/src/components/CountryCombobox.tsx:100",className:ye("mr-2 h-4 w-4",t===u?"opacity-100":"opacity-0")}),u]},u))})]})]})})]})}const pl=[{id:1,title:"Business Details",icon:Ms},{id:2,title:"Location & Size",icon:Ko},{id:3,title:"About Your Business",icon:Ws},{id:4,title:"Ready to Start",icon:Te}];function wO(){const[t,n]=b.useState(1),[,r]=ds(),[o,i]=b.useState({}),[d,u]=b.useState({businessName:"",registrationNumber:"",website:"",phone:"",country:"UAE",emirate:"",sizeband:"sme",employeeCount:"",publicDescription:""}),p=(y,N)=>{u(j=>({...j,[y]:N})),o[y]&&i(j=>({...j,[y]:""}))},x=ue.supplier.upsertProfile.useMutation({onSuccess:()=>{xe.success("Profile saved!"),n(4)},onError:y=>xe.error(y.message)}),h=()=>{const y={};return t===1&&d.businessName.trim().length<2&&(y.businessName="Business name must be at least 2 characters"),i(y),Object.keys(y).length===0},v=()=>{h()&&n(y=>y+1)},g=y=>{y.preventDefault(),h()&&x.mutate({businessName:d.businessName,registrationNumber:d.registrationNumber||void 0,website:d.website||void 0,phone:d.phone||void 0,country:d.country||"UAE",emirate:d.emirate||void 0,sizeband:d.sizeband,employeeCount:d.employeeCount?parseInt(d.employeeCount):void 0,publicDescription:d.publicDescription||void 0})};return e.jsxs("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:82",className:"min-h-screen bg-muted/40 flex",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:84",className:"hidden lg:flex w-96 bg-envora-pine text-white flex-col p-10",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:85",className:"flex items-center gap-2 mb-12",children:e.jsx("img",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:86",src:"/manus-storage/envora-logo_f789bcb1.webp",alt:"Envora Consulting",className:"h-10 w-auto"})}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:88",className:"flex-1",children:[e.jsx("h2",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:89",className:"font-display text-3xl font-bold mb-4",children:"Set Up Your Supplier Profile"}),e.jsx("p",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:90",className:"text-white/70 text-sm leading-relaxed mb-10",children:"Your profile helps us activate the right assessment criteria for your business type and size."}),e.jsx("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:93",className:"space-y-4",children:pl.map(y=>e.jsxs("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:95",className:`flex items-center gap-3 p-3 rounded-xl transition-colors ${t===y.id?"bg-white/20":t>y.id?"opacity-60":"opacity-40"}`,children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:96",className:`w-8 h-8 rounded-lg flex items-center justify-center ${t>=y.id?"bg-envora-cyan text-envora-pine":"bg-white/10 text-white/40"}`,children:t>y.id?"â":e.jsx(y.icon,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:97",className:"w-4 h-4"})}),e.jsx("span",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:99",className:"text-sm font-medium",children:y.title})]},y.id))})]})]}),e.jsx("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:107",className:"flex-1 flex items-center justify-center p-8",children:e.jsxs("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:108",className:"w-full max-w-lg",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:110",className:"lg:hidden mb-8",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:111",className:"flex items-center justify-between mb-3",children:pl.map((y,N)=>e.jsxs("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:113",className:"flex items-center",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:114",className:`flex items-center justify-center w-8 h-8 rounded-full text-xs font-bold transition-colors ${t>y.id?"bg-envora-pine text-white":t===y.id?"bg-envora-pine text-white ring-4 ring-envora-pine/20":"bg-muted text-muted-foreground"}`,children:t>y.id?"â":y.id}),N<pl.length-1&&e.jsx("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:122",className:`h-0.5 w-8 sm:w-16 mx-1 transition-colors ${t>y.id?"bg-envora-pine":"bg-muted"}`})]},y.id))}),e.jsx("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:127",className:"text-xs text-muted-foreground",children:t<pl.length?`Step ${t} of ${pl.length-1}`:"Complete"})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:130",className:"mb-8",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:131",className:"hidden lg:block text-sm text-muted-foreground mb-1",children:["Step ",t," of ",pl.length]}),e.jsx("h1",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:132",className:"font-display text-2xl font-bold text-foreground",children:pl[t-1]?.title})]}),e.jsxs("form",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:135",onSubmit:g,className:"space-y-6",children:[t===1&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:138",children:[e.jsx(At,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:139",htmlFor:"businessName",children:"Business N
561ame *"}),e.jsx(Ot,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:140",id:"businessName",value:d.businessName,onChange:y=>p("businessName",y.target.value),placeholder:"e.g. Al Baraka Foods LLC",className:"mt-1"}),o.businessName&&e.jsx("p",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:141",className:"text-red-500 text-xs mt-1",children:o.businessName})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:143",children:[e.jsx(At,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:144",htmlFor:"registrationNumber",children:"Trade License / Registration Number"}),e.jsx(Ot,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:145",id:"registrationNumber",value:d.registrationNumber,onChange:y=>p("registrationNumber",y.target.value),placeholder:"e.g. CN-1234567",className:"mt-1"})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:147",children:[e.jsx(At,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:148",htmlFor:"website",children:"Website"}),e.jsx(Ot,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:149",id:"website",value:d.website,onChange:y=>p("website",y.target.value),placeholder:"https://yourcompany.com",className:"mt-1"})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:151",children:[e.jsx(At,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:152",htmlFor:"phone",children:"Phone Number"}),e.jsx(Ot,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:153",id:"phone",value:d.phone,onChange:y=>p("phone",y.target.value),placeholder:"+971 4 000 0000",className:"mt-1"})]})]}),t===2&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:160",children:[e.jsx(At,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:161",children:"Country"}),e.jsx(yO,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:162",value:d.country,onChange:y=>{p("country",y),p("emirate","")},placeholder:"Search country..."})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:168",children:[e.jsx(At,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:169",children:d.country==="UAE"?"Emirate":"City / Region"}),d.country==="UAE"?e.jsxs(_a,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:171",value:d.emirate,onValueChange:y=>p("emirate",y),children:[e.jsx(Pa,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:172",className:"mt-1",children:e.jsx(Ma,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:172",placeholder:"Select emirate"})}),e.jsx(Ha,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:173",children:["Abu Dhabi","Dubai","Sharjah","Ajman","Umm Al Quwain","Ras Al Khaimah","Fujairah"].map(y=>e.jsx(os,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:175",value:y,children:y},y))})]}):e.jsx(Ot,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:180",value:d.emirate,onChange:y=>p("emirate",y.target.value),placeholder:"e.g. London, Paris, New York...",className:"mt-1"})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:188",children:[e.jsx(At,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:189",children:"Business Size"}),e.jsxs(_a,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:190",value:d.sizeband,onValueChange:y=>p("sizeband",y),children:[e.jsx(Pa,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:191",className:"mt-1",children:e.jsx(Ma,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:191"})}),e.jsxs(Ha,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:192",children:[e.jsx(os,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:193",value:"micro",children:"Micro (1-9 employees)"}),e.jsx(os,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:194",value:"sme",children:"SME (10-249 employees)"}),e.jsx(os,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:195",value:"large",children:"Large (250+ employees)"})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:199",children:[e.jsx(At,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:200",htmlFor:"employeeCount",children:"Number of Employees"}),e.jsx(Ot,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:201",id:"employeeCount",type:"number",value:d.employeeCount,onChange:y=>p("employeeCount",y.target.value),placeholder:"e.g. 45",className:"mt-1"})]})]}),t===3&&e.jsx(e.Fragment,{children:e.jsxs("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:208",children:[e.jsx(At,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:209",htmlFor:"publicDescription",children:"Business Description"}),e.jsx(Qa,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:210",id:"publicDescription",value:d.publicDescription,onChange:y=>p("publicDescription",y.target.value),placeholder:"Briefly describe your business, products/services, and sustainability commitments...",className:"mt-1 h-32"}),e.jsx("p",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:217",className:"text-xs text-muted-foreground mt-1",children:"This will appear on your public Envora profile"})]})}),t===4&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:223",className:"space-y-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:225",className:"flex items-center gap-3 p-4 rounded-xl bg-envora-green/10 border border-envora-green/20",children:[e.jsx(Te,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:226",className:"w-6 h-6 text-envora-green flex-shrink-0"}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:227",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:228",className:"font-semibold text-foreground text-sm",children:"Profile Complete"}),e.jsx("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:229",className:"text-xs text-muted-foreground",children:"Your business profile has been saved. Next: start your self-assessment."})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:234",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:235",className:"font-semibold text-foreground text-sm mb-3",children:"Your journey on Envora"}),e.jsx("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:236",className:"space-y-2",children:[{icon:Te,color:"text-envora-green bg-envora-green/10",title:"Profile Setup",de
561sc:"Done â your business details are saved",state:"done"},{icon:Ho,color:"text-envora-pine bg-envora-pine/10",title:"Self-Assessment",desc:"72 questions across 4 sustainability themes â takes ~30 min",state:"next"},{icon:Ut,color:"text-envora-gold bg-envora-gold/10",title:"Evidence Review",desc:"AI-powered audit of your uploaded evidence",state:"upcoming"},{icon:qa,color:"text-envora-cyan bg-envora-cyan/10",title:"Share Your Score",desc:"Share your verified readiness report with hotels",state:"upcoming"}].map((y,N)=>e.jsxs("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:243",className:`flex items-center gap-3 p-3 rounded-xl border transition-all ${y.state==="done"?"border-envora-green/20 bg-envora-green/5":y.state==="next"?"border-envora-pine/40 bg-envora-pine/5 ring-1 ring-envora-pine/20":"border-border bg-muted/20 opacity-60"}`,children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:251",className:`w-9 h-9 rounded-lg flex items-center justify-center flex-shrink-0 ${y.color}`,children:e.jsx(y.icon,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:252",className:"w-4 h-4"})}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:254",className:"flex-1",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:255",className:"font-medium text-sm text-foreground flex items-center gap-2",children:[y.title,y.state==="next"&&e.jsx("span",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:258",className:"text-[10px] font-semibold bg-envora-pine text-white px-1.5 py-0.5 rounded-full uppercase tracking-wide",children:"Up Next"})]}),e.jsx("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:261",className:"text-xs text-muted-foreground",children:y.desc})]}),y.state==="done"&&e.jsx(Te,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:263",className:"w-4 h-4 text-envora-green flex-shrink-0"}),y.state==="next"&&e.jsx(qe,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:264",className:"w-4 h-4 text-envora-pine flex-shrink-0"})]},N))})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:271",className:"text-center text-xs text-muted-foreground",children:["â± Most suppliers complete the assessment in ",e.jsx("span",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:272",className:"font-semibold text-foreground",children:"25â35 minutes"}),". You can save progress and return anytime."]})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:277",className:"flex items-center justify-between pt-4",children:[t>1&&t<4?e.jsxs(ie,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:279",type:"button",variant:"outline",onClick:()=>n(t-1),children:[e.jsx(hn,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:280",className:"w-4 h-4 mr-1"})," Back"]}):e.jsx("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:282"}),t===4?e.jsxs("div",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:284",className:"flex flex-col gap-2 w-full",children:[e.jsxs(ie,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:285",type:"button",onClick:()=>r("/supplier/assessment"),className:"bg-envora-pine hover:bg-envora-pine/90 text-white w-full text-base py-5 font-semibold shadow-md",children:["Start My Assessment ",e.jsx(qe,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:290",className:"w-5 h-5 ml-1"})]}),e.jsx("button",{"data-loc":"client/src/pages/supplier/Onboarding.tsx:292",type:"button",onClick:()=>r("/supplier/dashboard"),className:"text-xs text-muted-foreground hover:text-foreground transition-colors text-center py-1",children:"Go to dashboard instead"})]}):t<3?e.jsxs(ie,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:301",type:"button",onClick:v,className:"bg-envora-pine hover:bg-envora-pine/90 text-white",children:["Continue ",e.jsx(qe,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:302",className:"w-4 h-4 ml-1"})]}):e.jsx(ie,{"data-loc":"client/src/pages/supplier/Onboarding.tsx:305",type:"submit",disabled:x.isPending,className:"bg-envora-pine hover:bg-envora-pine/90 text-white",children:x.isPending?"Saving...":"Complete Setup"})]})]})]})})]})}const SO=Oh("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function Qe({className:t,variant:n,asChild:r=!1,...o}){const i=r?vh:"span";return e.jsx(i,{"data-loc":"client/src/components/ui/badge.tsx:38","data-slot":"badge",className:ye(SO({variant:n}),t),...o})}var Yh="Progress",Xh=100,[jO]=Bs(Yh),[NO,AO]=jO(Yh),dN=b.forwardRef((t,
561n)=>{const{__scopeProgress:r,value:o=null,max:i,getValueLabel:d=CO,...u}=t;(i||i===0)&&!R1(i)&&console.error(EO(`${i}`,"Progress"));const p=R1(i)?i:Xh;o!==null&&!k1(o,p)&&console.error(RO(`${o}`,"Progress"));const x=k1(o,p)?o:null,h=Mu(x)?d(x,p):void 0;return e.jsx(NO,{scope:r,value:x,max:p,children:e.jsx(Oe.div,{"aria-valuemax":p,"aria-valuemin":0,"aria-valuenow":Mu(x)?x:void 0,"aria-valuetext":h,role:"progressbar","data-state":mN(x,p),"data-value":x??void 0,"data-max":p,...u,ref:n})})});dN.displayName=Yh;var uN="ProgressIndicator",pN=b.forwardRef((t,n)=>{const{__scopeProgress:r,...o}=t,i=AO(uN,r);return e.jsx(Oe.div,{"data-state":mN(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...o,ref:n})});pN.displayName=uN;function CO(t,n){return`${Math.round(t/n*100)}%`}function mN(t,n){return t==null?"indeterminate":t===n?"complete":"loading"}function Mu(t){return typeof t=="number"}function R1(t){return Mu(t)&&!isNaN(t)&&t>0}function k1(t,n){return Mu(t)&&!isNaN(t)&&t<=n&&t>=0}function EO(t,n){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${n}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Xh}\`.`}function RO(t,n){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${n}\`. The \`value\` prop must be: 562 - a positive number 563 - less than the value passed to \`max\` (or ${Xh} if no \`max\` prop is set) 564 - \`null\` or \`undefined\` if the progress is indeterminate. 565 566Defaulting to \`null\`.`}var kO=dN,DO=pN;function vp({className:t,value:n,...r}){return e.jsx(kO,{"data-loc":"client/src/components/ui/progress.tsx:12","data-slot":"progress",className:ye("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",t),...r,children:e.jsx(DO,{"data-loc":"client/src/components/ui/progress.tsx:20","data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:`translateX(-${100-(n||0)}%)`}})})}function Ue({className:t,...n}){return e.jsx("div",{"data-loc":"client/src/components/ui/skeleton.tsx:5","data-slot":"skeleton",className:ye("bg-accent animate-pulse rounded-md",t),...n})}const D1={gold:{label:"Gold",bg:"bg-amber-50",text:"text-amber-700",border:"border-amber-300",dot:"bg-amber-400"},silver:{label:"Silver",bg:"bg-slate-50",text:"text-slate-600",border:"border-slate-300",dot:"bg-slate-400"},bronze:{label:"Bronze",bg:"bg-orange-50",text:"text-orange-700",border:"border-orange-300",dot:"bg-orange-400"},not_yet_rated:{label:"Not Rated",bg:"bg-muted",text:"text-muted-foreground",border:"border-border",dot:"bg-muted-foreground/40"}},T1={draft:{label:"In Progress",color:"bg-muted text-foreground/70",icon:e.jsx(Bt,{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:38",className:"w-3 h-3"})},submitted:{label:"Submitted",color:"bg-blue-100 text-blue-700",icon:e.jsx(Hh,{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:39",className:"w-3 h-3"})},ai_audited:{label:"Audited",color:"bg-green-100 text-green-700",icon:e.jsx(Te,{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:40",className:"w-3 h-3"})},verified:{label:"Verified",color:"bg-green-100 text-green-700",icon:e.jsx(Ut,{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:41",className:"w-3 h-3"})},expiring:{label:"Expiring Soon",color:"bg-amber-100 text-amber-700",icon:e.jsx(tt,{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:42",className:"w-3 h-3"})},expired:{label:"Expired",color:"bg-red-100 text-red-700",icon:e.jsx(tt,{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:43",className:"w-3 h-3"})}},lh=[{key:"envScore",label:"Environment",color:"bg-emerald-500"},{key:"laborScore",label:"Labor & Human Rights",color:"bg-cyan-500"},{key:"ethicsScore",label:"Ethics & Governance",color:"bg-amber-500"},{key:"procurementScore",label:"Sustainable Procurement",color:"bg-teal-600"}];function TO({entries:t}){const n=[...t].filter(y=>y.overallScore!=null).reverse();if(n.length<2)return null;const r=n.map(y=>y.overallScore),o=Math.max(0,Math.min(...r)-10),d=Math.min(100,Math.max(...r)+10)-o||1,u=120,p=40,x=r.map((y,N)=>
566{const j=N/(r.length-1)*u,w=p-(y-o)/d*p;return`${j},${w}`}),h=r[r.length-1],v=r[r.length-2],g=h-v;return e.jsxs("div",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:74",className:"flex items-center gap-3 mt-3 pt-3 border-t border-border",children:[e.jsxs("div",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:75",className:"flex-1",children:[e.jsx("div",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:76",className:"text-xs text-muted-foreground mb-1",children:"Score trend"}),e.jsxs("svg",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:77",width:u,height:p,viewBox:`0 0 ${u} ${p}`,className:"overflow-visible",children:[e.jsx("polyline",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:78",points:x.join(" "),fill:"none",stroke:"var(--envora-pine, #2E9E6B)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),r.map((y,N)=>{const j=N/(r.length-1)*u,w=p-(y-o)/d*p;return e.jsx("circle",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:89",cx:j,cy:w,r:"3",fill:"var(--envora-pine, #2E9E6B)"},N)})]})]}),e.jsxs("div",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:93",className:"text-right flex-shrink-0",children:[e.jsx("div",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:94",className:"text-xs text-muted-foreground",children:"vs last"}),e.jsxs("div",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:95",className:`flex items-center gap-1 text-sm font-bold ${g>0?"text-green-600":g<0?"text-red-500":"text-muted-foreground"}`,children:[g>0?e.jsx(Yn,{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:96",className:"w-3.5 h-3.5"}):g<0?e.jsx(kS,{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:96",className:"w-3.5 h-3.5"}):e.jsx(zh,{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:96",className:"w-3.5 h-3.5"}),g>0?"+":"",Math.round(g)]})]})]})}function OO({entry:t,prevEntry:n}){return lh.some(({key:o})=>t[o]!=null)?e.jsx("div",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:109",className:"mt-3 pt-3 border-t border-border space-y-2",children:lh.map(({key:o,label:i,color:d})=>{const u=t[o];if(u==null)return null;const p=n?.[o],x=p!=null?Math.round(u-p):null;return e.jsxs("div",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:116",children:[e.jsxs("div",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:117",className:"flex items-center justify-between mb-1",children:[e.jsx("span",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:118",className:"text-xs text-muted-foreground",children:i}),e.jsxs("div",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:119",className:"flex items-center gap-1.5",children:[x!==null&&e.jsxs("span",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:121",className:`text-xs font-semibold ${x>0?"text-green-600":x<0?"text-red-500":"text-muted-foreground"}`,children:[x>0?"+":"",x]}),e.jsx("span",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:125",className:"text-xs font-bold text-foreground",children:Math.round(u)})]})]}),e.jsx("div",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:128",className:"h-1.5 rounded-full bg-muted overflow-hidden",children:e.jsx("div",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:129",className:`h-full rounded-full ${d}`,style:{width:`${u}%`,transition:"width 0.8s cubic-bezier(0.23,1,0.32,1)"}})})]},o)})}):null}function _O({history:t}){const[,n]=ds(),[r,o]=b.useState(new Set),i=ue.supplier.startAssessment.useMutation({onSuccess:x=>n(`/supplier/assessment/${x.assessmentId}`),onError:x=>xe.error(x.message)}),d=x=>{o(h=>{const v=new Set(h);return v.has(x)?v.delete(x):v.add(x),v})},u=[...t].sort((x,h)=>x.version-h.version),p=u.some(x=>x.overallScore!=null);return t.length<=1?null:e.jsxs(_e,{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:170",className:"border-0 shadow-sm",children:[e.jsxs(Ft,{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:171",className:"pb-3",children:[e.jsxs("div",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:172",className:"flex items-center justify-between",children:[e.jsxs(Xt,{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:173",className:"text-base font-bold text-foreground flex items-center gap-2",children:[e.jsx(Yn,{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:174",className:"w-4 h-4 text-envora-pine"}),"Assessment History"]}),e.jsxs(Qe,{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:177",variant:"outline",className:"text-xs text-muted-foreground",children:[t.length," assessments"]})]}),p&&e.jsx(TO,{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:181",entries:u})]}),e.jsx(Me,{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:183",className:"pt-0",children:e.jsxs("div",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:184",className:"relative",children:[e.jsx("div",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:186",className:"absolute left-[18px] top-2 bottom-2 w-px bg-border"}),e.jsx("div",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:188",className:"space-y-4",children:u.map((x,h)=>{const v=h===u.length-1,g=h>0?u[h-1]:null,y=x.band??"not_yet_rated",N=D1[y]??D1.not_yet_rated,j=T1[x.state]??T1.draft,w=x.overallScore!=null&&g?.overallScore!=null?Math.round(x.overallScore-g.overallScore):null,A=x.aiAuditedAt?new Date(x.aiAuditedAt).toLocaleDateString(void 0,{month:"short",year:"numeric"}):x.submittedAt?new Date(x.submittedAt).toLocaleDateString(void 0,{month:"short",year:"numeric"}):x.createdAt?new Date(x.createdAt).toLocaleDateString(void 0,{month:"short",year:"numeric"}
566):null,C=lh.some(({key:D})=>x[D]!=null),E=r.has(x.id),T=x.state==="verified"||x.state==="expiring"||x.state==="expired";return e.jsxs("div",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:211",className:"relative flex items-start gap-4 pl-10",children:[e.jsx("div",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:213",className:`absolute left-[13px] top-2 w-2.5 h-2.5 rounded-full border-2 border-background ${v?"bg-envora-pine":N.dot}`}),e.jsxs("div",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:216",className:`flex-1 rounded-xl border p-3.5 transition-shadow ${v?"border-envora-pine/30 bg-envora-pine/5":"border-border bg-card"}`,children:[e.jsxs("div",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:218",className:"flex items-start justify-between gap-2 flex-wrap",children:[e.jsxs("div",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:219",className:"flex items-center gap-2 flex-wrap",children:[e.jsxs("span",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:220",className:"text-sm font-bold text-foreground",children:["v",x.version,v&&e.jsx("span",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:222",className:"text-xs font-medium text-envora-pine ml-1",children:"Current"})]}),x.overallScore!=null&&e.jsxs(Qe,{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:225",className:`text-xs px-2 py-0.5 border font-semibold ${N.bg} ${N.text} ${N.border}`,children:[e.jsx(Ut,{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:226",className:"w-3 h-3 mr-1"}),N.label]}),e.jsxs("span",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:230",className:`inline-flex items-center gap-1 text-xs px-2 py-0.5 rounded-full font-medium ${j.color}`,children:[j.icon," ",j.label]})]}),e.jsx("div",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:234",className:"flex items-center gap-2 flex-shrink-0",children:x.overallScore!=null?e.jsxs("div",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:236",className:"flex items-center gap-1.5",children:[e.jsx("span",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:237",className:"text-lg font-extrabold text-foreground leading-none",children:Math.round(x.overallScore)}),e.jsx("span",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:240",className:"text-xs text-muted-foreground",children:"/100"}),w!==null&&e.jsxs("span",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:242",className:`text-xs font-semibold ${w>0?"text-green-600":w<0?"text-red-500":"text-muted-foreground"}`,children:[w>0?"+":"",w]})]}):e.jsx("span",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:248",className:"text-xs text-muted-foreground italic",children:"No score yet"})})]}),C&&E&&e.jsx(OO,{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:255",entry:x,prevEntry:g}),e.jsxs("div",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:259",className:"flex items-center justify-between mt-2 gap-2 flex-wrap",children:[e.jsxs("div",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:260",className:"flex items-center gap-2",children:[A&&e.jsx("span",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:262",className:"text-xs text-muted-foreground",children:A}),C&&e.jsxs("button",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:265",onClick:()=>d(x.id),className:"inline-flex items-center gap-0.5 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[E?e.jsx(Ph,{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:269",className:"w-3 h-3"}):e.jsx(Ps,{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:269",className:"w-3 h-3"}),E?"Hide":"Themes"]})]}),e.jsxs("div",{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:274",className:"flex items-center gap-1.5 ml-auto",children:[(x.state==="ai_audited"||x.state==="verified")&&e.jsxs(ie,{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:276",variant:"ghost",size:"sm",className:"h-6 text-xs px-2 text-envora-pine hover:text-envora-pine/80 hover:bg-envora-pine/5",onClick:()=>n(`/supplier/report/${x.id}`),children:["View Report ",e.jsx(qe,{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:282",className:"w-3 h-3 ml-0.5"})]}),x.state==="draft"&&e.jsxs(ie,{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:286",variant:"ghost",size:"sm",className:"h-6 text-xs px-2 text-envora-pine hover:text-envora-pine/80 hover:bg-envora-pine/5",onClick:()=>n(`/supplier/assessment/${x.id}`),children:["Continue ",e.jsx(qe,{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:292",className:"w-3 h-3 ml-0.5"})]}),T&&v&&e.jsxs(ie,{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:296",variant:"ghost",size:"sm",className:"h-6 text-xs px-2 text-amber-600 hover:text-amber-700 hover:bg-amber-50",disabled:i.isPending,onClick:()=>i.mutate(),children:[e.jsx(Or,{"data-loc":"client/src/components/AssessmentHistoryTimeline.tsx:303",className:"w-3 h-3 mr-0.5"}),"Renew Assessment"]})]})]})]})]},x.id)})})]})})]})}var uf="rovingFocusGroup.onEntryFocus",MO={bubbles:!1,cancelable:!0},Mc="RovingFocusGroup",[oh,xN,PO]=Gh(Mc),[HO,yp]=Bs(Mc,[PO]),[LO,zO]=HO(Mc),fN=b.forwardRef((t,
vendor: 4,312 bytes, line 566
566n)=>e.jsx(oh.Provider,{scope:t.__scopeRovingFocusGroup,children:e.jsx(oh.Slot,{scope:t.__scopeRovingFocusGroup,children:e.jsx(IO,{...t,ref:n})})}));fN.displayName=Mc;var IO=b.forwardRef((t,n)=>{const{__scopeRovingFocusGroup:r,orientation:o,loop:i=!1,dir:d,currentTabStopId:u,defaultCurrentTabStopId:p,onCurrentTabStopIdChange:x,onEntryFocus:h,preventScrollOnEntryFocus:v=!1,...g}=t,y=b.useRef(null),N=lt(n,y),j=mp(d),[w,A]=yn({prop:u,defaultProp:p??null,onChange:x,caller:Mc}),[C,E]=b.useState(!1),T=Za(h),D=xN(r),M=b.useRef(!1),[z,O]=b.useState(0);return b.useEffect(()=>{const H=y.current;if(H)return H.addEventListener(uf,T),()=>H.removeEventListener(uf,T)},[T]),e.jsx(LO,{scope:r,orientation:o,dir:j,loop:i,currentTabStopId:w,onItemFocus:b.useCallback(H=>A(H),[A]),onItemShiftTab:b.useCallback(()=>E(!0),[]),onFocusableItemAdd:b.useCallback(()=>O(H=>H+1),[]),onFocusableItemRemove:b.useCallback(()=>O(H=>H-1),[]),children:e.jsx(Oe.div,{tabIndex:C||z===0?-1:0,"data-orientation":o,...g,ref:N,style:{outline:"none",...t.style},onMouseDown:we(t.onMouseDown,()=>{M.current=!0}),onFocus:we(t.onFocus,H=>{const K=!M.current;if(H.target===H.currentTarget&&K&&!C){const ne=new CustomEvent(uf,MO);if(H.currentTarget.dispatchEvent(ne),!ne.defaultPrevented){const le=D().filter(R=>R.focusable),Z=le.find(R=>R.active),X=le.find(R=>R.id===w),Q=[Z,X,...le].filter(Boolean).map(R=>R.ref.current);bN(Q,v)}}M.current=!1}),onBlur:we(t.onBlur,()=>E(!1))})})}),hN="RovingFocusGroupItem",gN=b.forwardRef((t,n)=>{const{__scopeRovingFocusGroup:r,focusable:o=!0,active:i=!1,tabStopId:d,children:u,...p}=t,x=bs(),h=d||x,v=zO(hN,r),g=v.currentTabStopId===h,y=xN(r),{onFocusableItemAdd:N,onFocusableItemRemove:j,currentTabStopId:w}=v;return b.useEffect(()=>{if(o)return N(),()=>j()},[o,N,j]),e.jsx(oh.ItemSlot,{scope:r,id:h,focusable:o,active:i,children:e.jsx(Oe.span,{tabIndex:g?0:-1,"data-orientation":v.orientation,...p,ref:n,onMouseDown:we(t.onMouseDown,A=>{o?v.onItemFocus(h):A.preventDefault()}),onFocus:we(t.onFocus,()=>v.onItemFocus(h)),onKeyDown:we(t.onKeyDown,A=>{if(A.key==="Tab"&&A.shiftKey){v.onItemShiftTab();return}if(A.target!==A.currentTarget)return;const C=FO(A,v.orientation,v.dir);if(C!==void 0){if(A.metaKey||A.ctrlKey||A.altKey||A.shiftKey)return;A.preventDefault();let T=y().filter(D=>D.focusable).map(D=>D.ref.current);if(C==="last")T.reverse();else if(C==="prev"||C==="next"){C==="prev"&&T.reverse();const D=T.indexOf(A.currentTarget);T=v.loop?UO(T,D+1):T.slice(D+1)}setTimeout(()=>bN(T))}}),children:typeof u=="function"?u({isCurrentTabStop:g,hasTabStop:w!=null}):u})})});gN.displayName=hN;var BO={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function VO(t,n){return n!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function FO(t,n,r){const o=VO(t.key,r);if(!(n==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(n==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return BO[o]}function bN(t,n=!1){const r=document.activeElement;for(const o of t)if(o===r||(o.focus({preventScroll:n}),document.activeElement!==r))return}function UO(t,n){return t.map((r,o)=>t[(n+o)%t.length])}var vN=fN,yN=gN,ih=["Enter"," "],$O=["ArrowDown","PageUp","Home"],wN=["ArrowUp","PageDown","End"],GO=[...$O,...wN],KO={ltr:[...ih,"ArrowRight"],rtl:[...ih,"ArrowLeft"]},qO={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Pc="Menu",[mc,QO,YO]=Gh(Pc),[Tl,SN]=Bs(Pc,[YO,Fr,yp]),wp=Fr(),jN=yp(),[XO,Ol]=Tl(Pc),[ZO,Hc]=Tl(Pc),NN=t=>{const{__scopeMenu:n,open:r=!1,children:o,dir:i,onOpenChange:d,modal:u=!0}=t,p=wp(n),[x,h]=b.useState(null),v=b.useRef(!1),g=Za(d),y=mp(i);return b.useEffect(()=>{const N=()=>{v.current=!0,document.addEventListener("pointerdown",j,{capture:!0,once:!0}),document.addEventListener("pointermove",j,{capture:!0,once:!0})},j=()=>v.current=!1;return document.addEventListener("keydown",N,{capture:!0}),()=>{document.removeEventListener("keydown",N,{capture:!0}),document.removeEventListener("pointerdown",j,{capture:!0}),document.removeEventListener("pointermove",j,{capture:!0})}},[]),e.jsx(tp,{...p,children:e.jsx(XO,{scope:n,open:r,onOpenChange:g,content:x,onContentChange:h,children:e.jsx(ZO,{scope:n,onClose:b.useCallback(()=>g(!1),[g]),isUsingKeyboardRef:v,dir:y,modal:u,children:o})})})};NN.displayName=Pc;
vendor: 17,950 bytes, line 566
566var WO="MenuAnchor",Zh=b.forwardRef((t,n)=>{const{__scopeMenu:r,...o}=t,i=wp(r);return e.jsx(wc,{...i,...o,ref:n})});Zh.displayName=WO;var Wh="MenuPortal",[JO,AN]=Tl(Wh,{forceMount:void 0}),CN=t=>{const{__scopeMenu:n,forceMount:r,children:o,container:i}=t,d=Ol(Wh,n);return e.jsx(JO,{scope:n,forceMount:r,children:e.jsx(Js,{present:r||d.open,children:e.jsx(Fo,{asChild:!0,container:i,children:o})})})};CN.displayName=Wh;var La="MenuContent",[e_,Jh]=Tl(La),EN=b.forwardRef((t,n)=>{const r=AN(La,t.__scopeMenu),{forceMount:o=r.forceMount,...i}=t,d=Ol(La,t.__scopeMenu),u=Hc(La,t.__scopeMenu);return e.jsx(mc.Provider,{scope:t.__scopeMenu,children:e.jsx(Js,{present:o||d.open,children:e.jsx(mc.Slot,{scope:t.__scopeMenu,children:u.modal?e.jsx(t_,{...i,ref:n}):e.jsx(s_,{...i,ref:n})})})})}),t_=b.forwardRef((t,n)=>{const r=Ol(La,t.__scopeMenu),o=b.useRef(null),i=lt(n,o);return b.useEffect(()=>{const d=o.current;if(d)return cp(d)},[]),e.jsx(eg,{...t,ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:we(t.onFocusOutside,d=>d.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),s_=b.forwardRef((t,n)=>{const r=Ol(La,t.__scopeMenu);return e.jsx(eg,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),a_=Pr("MenuContent.ScrollLock"),eg=b.forwardRef((t,n)=>{const{__scopeMenu:r,loop:o=!1,trapFocus:i,onOpenAutoFocus:d,onCloseAutoFocus:u,disableOutsidePointerEvents:p,onEntryFocus:x,onEscapeKeyDown:h,onPointerDownOutside:v,onFocusOutside:g,onInteractOutside:y,onDismiss:N,disableOutsideScroll:j,...w}=t,A=Ol(La,r),C=Hc(La,r),E=wp(r),T=jN(r),D=QO(r),[M,z]=b.useState(null),O=b.useRef(null),H=lt(n,O,A.onContentChange),K=b.useRef(0),ne=b.useRef(""),le=b.useRef(0),Z=b.useRef(null),X=b.useRef("right"),q=b.useRef(0),Q=j?Ec:b.Fragment,R=j?{as:a_,allowPinchZoom:!0}:void 0,P=V=>{const re=ne.current+V,_=D().filter(W=>!W.disabled),L=document.activeElement,I=_.find(W=>W.ref.current===L)?.textValue,G=_.map(W=>W.textValue),J=f_(G,re,I),me=_.find(W=>W.textValue===J)?.ref.current;(function W(he){ne.current=he,window.clearTimeout(K.current),he!==""&&(K.current=window.setTimeout(()=>W(""),1e3))})(re),me&&setTimeout(()=>me.focus())};b.useEffect(()=>()=>window.clearTimeout(K.current),[]),op();const B=b.useCallback(V=>X.current===Z.current?.side&&g_(V,Z.current?.area),[]);return e.jsx(e_,{scope:r,searchRef:ne,onItemEnter:b.useCallback(V=>{B(V)&&V.preventDefault()},[B]),onItemLeave:b.useCallback(V=>{B(V)||(O.current?.focus(),z(null))},[B]),onTriggerLeave:b.useCallback(V=>{B(V)&&V.preventDefault()},[B]),pointerGraceTimerRef:le,onPointerGraceIntentChange:b.useCallback(V=>{Z.current=V},[]),children:e.jsx(Q,{...R,children:e.jsx(Cc,{asChild:!0,trapped:i,onMountAutoFocus:we(d,V=>{V.preventDefault(),O.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:u,children:e.jsx(Io,{asChild:!0,disableOutsidePointerEvents:p,onEscapeKeyDown:h,onPointerDownOutside:v,onFocusOutside:g,onInteractOutside:y,onDismiss:N,children:e.jsx(vN,{asChild:!0,...T,dir:C.dir,orientation:"vertical",loop:o,currentTabStopId:M,onCurrentTabStopIdChange:z,onEntryFocus:we(x,V=>{C.isUsingKeyboardRef.current||V.preventDefault()}),preventScrollOnEntryFocus:!0,children:e.jsx(sp,{role:"menu","aria-orientation":"vertical","data-state":UN(A.open),"data-radix-menu-content":"",dir:C.dir,...E,...w,ref:H,style:{outline:"none",...w.style},onKeyDown:we(w.onKeyDown,V=>{const _=V.target.closest("[data-radix-menu-content]")===V.currentTarget,L=V.ctrlKey||V.altKey||V.metaKey,I=V.key.length===1;_&&(V.key==="Tab"&&V.preventDefault(),!L&&I&&P(V.key));const G=O.current;if(V.target!==G||!GO.includes(V.key))return;V.preventDefault();const me=D().filter(W=>!W.disabled).map(W=>W.ref.current);wN.includes(V.key)&&me.reverse(),m_(me)}),onBlur:we(t.onBlur,V=>{V.currentTarget.contains(V.target)||(window.clearTimeout(K.current),ne.current="")}),onPointerMove:we(t.onPointerMove,xc(V=>{const re=V.target,_=q.current!==V.clientX;if(V.currentTarget.contains(re)&&_){const L=V.clientX>q.current?"right":"left";X.current=L,q.current=V.clientX}}))})})})})})})});EN.displayName=La;var n_="MenuGroup",tg=b.forwardRef((t,n)=>{const{__scopeMenu:r,...o}=t;return e.jsx(Oe.div,{role:"group",...o,ref:n})});tg.displayName=n_;var r_="MenuLabel",RN=b.forwardRef((t,n)=>{const{__scopeMenu:r,...o}=t;return e.jsx(Oe.div,{...o,ref:n})});RN.displayName=r_;var Pu="MenuItem",O1="menu.itemSelect",Sp=b.forwardRef((t,n)=>{const{disabled:r=!1,onSelect:o,...i}=t,d=b.useRef(null),u=Hc(Pu,t.__scopeMenu),p=Jh(Pu,t.__scopeMenu),x=lt(n,d),h=b.useRef(!1),v=()=>{const g=d.current;if(!r&&g){const y=new CustomEvent(O1,{bubbles:!0,cancelable:!0});g.addEventListener(O1,N=>o?.(N),{once:!0}),j2(g,y),y.defaultPrevented?h.current=!1:u.onClose()}};return e.jsx(kN,{...i,ref:x,disabled:r,onClick:we(t.onClick,v),onPointerDown:g=>{t.onPointerDown?.(g),h.current=!0},onPointerUp:we(t.onPointerUp,g=>{h.current||g.currentTarget?.click()}),onKeyDown:we(t.onKeyDown,g=>{const y=p.searchRef.current!=="";r||y&&g.key===" "||ih.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})})});Sp.displayName=Pu;var kN=b.forwardRef((t,n)=>{const{__scopeMenu:r,disabled:o=!1,textValue:i,...d}=t,u=Jh(Pu,r),p=jN(r),x=b.useRef(null),h=lt(n,x),[v,g]=b.useState(!1),[y,N]=b.useState("");return b.useEffect(()=>{const j=x.current;j&&N((j.textContent??"").trim())},[d.children]),e.jsx(mc.ItemSlot,{scope:r,disabled:o,textValue:i??y,children:e.jsx(yN,{asChild:!0,...p,focusable:!o,children:e.jsx(Oe.div,{role:"menuitem","data-highlighted":v?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...d,ref:h,onPointerMove:we(t.onPointerMove,xc(j=>{o?u.onItemLeave(j):(u.onItemEnter(j),j.defaultPrevented||j.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:we(t.onPointerLeave,xc(j=>u.onItemLeave(j))),onFocus:we(t.onFocus,()=>g(!0)),onBlur:we(t.onBlur,()=>g(!1))})})})}),l_="MenuCheckboxItem",DN=b.forwardRef((t,n)=>{const{checked:r=!1,onCheckedChange:o,...i}=t;return e.jsx(PN,{scope:t.__scopeMenu,checked:r,children:e.jsx(Sp,{role:"menuitemcheckbox","aria-checked":Hu(r)?"mixed":r,...i,ref:n,"data-state":ag(r),onSelect:we(i.onSelect,()=>o?.(Hu(r)?!0:!r),{checkForDefaultPrevented:!1})})})});DN.displayName=l_;var TN="MenuRadioGroup",[o_,i_]=Tl(TN,{value:void 0,onValueChange:()=>{}}),ON=b.forwardRef((t,n)=>{const{value:r,onValueChange:o,...i}=t,d=Za(o);return e.jsx(o_,{scope:t.__scopeMenu,value:r,onValueChange:d,children:e.jsx(tg,{...i,ref:n})})});ON.displayName=TN;var _N="MenuRadioItem",MN=b.forwardRef((t,n)=>{const{value:r,...o}=t,i=i_(_N,t.__scopeMenu),d=r===i.value;return e.jsx(PN,{scope:t.__scopeMenu,checked:d,children:e.jsx(Sp,{role:"menuitemradio","aria-checked":d,...o,ref:n,"data-state":ag(d),onSelect:we(o.onSelect,()=>i.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});MN.displayName=_N;var sg="MenuItemIndicator",[PN,c_]=Tl(sg,{checked:!1}),HN=b.forwardRef((t,n)=>{const{__scopeMenu:r,forceMount:o,...i}=t,d=c_(sg,r);return e.jsx(Js,{present:o||Hu(d.checked)||d.checked===!0,children:e.jsx(Oe.span,{...i,ref:n,"data-state":ag(d.checked)})})});HN.displayName=sg;var d_="MenuSeparator",LN=b.forwardRef((t,n)=>{const{__scopeMenu:r,...o}=t;return e.jsx(Oe.div,{role:"separator","aria-orientation":"horizontal",...o,ref:n})});LN.displayName=d_;var u_="MenuArrow",zN=b.forwardRef((t,n)=>{const{__scopeMenu:r,...o}=t,i=wp(r);return e.jsx(ap,{...i,...o,ref:n})});zN.displayName=u_;var p_="MenuSub",[nL,IN]=Tl(p_),Ki="MenuSubTrigger",BN=b.forwardRef((t,n)=>{const r=Ol(Ki,t.__scopeMenu),o=Hc(Ki,t.__scopeMenu),i=IN(Ki,t.__scopeMenu),d=Jh(Ki,t.__scopeMenu),u=b.useRef(null),{pointerGraceTimerRef:p,onPointerGraceIntentChange:x}=d,h={__scopeMenu:t.__scopeMenu},v=b.useCallback(()=>{u.current&&window.clearTimeout(u.current),u.current=null},[]);return b.useEffect(()=>v,[v]),b.useEffect(()=>{const g=p.current;return()=>{window.clearTimeout(g),x(null)}},[p,x]),e.jsx(Zh,{asChild:!0,...h,children:e.jsx(kN,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":i.contentId,"data-state":UN(r.open),...t,ref:Gn(n,i.onTriggerChange),onClick:g=>{t.onClick?.(g),!(t.disabled||g.defaultPrevented)&&(g.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:we(t.onPointerMove,xc(g=>{d.onItemEnter(g),!g.defaultPrevented&&!t.disabled&&!r.open&&!u.current&&(d.onPointerGraceIntentChange(null),u.current=window.setTimeout(()=>{r.onOpenChange(!0),v()},100))})),onPointerLeave:we(t.onPointerLeave,xc(g=>{v();const y=r.content?.getBoundingClientRect();if(y){const N=r.content?.dataset.side,j=N==="right",w=j?-5:5,A=y[j?"left":"right"],C=y[j?"right":"left"];d.onPointerGraceIntentChange({area:[{x:g.clientX+w,y:g.clientY},{x:A,y:y.top},{x:C,y:y.top},{x:C,y:y.bottom},{x:A,y:y.bottom}],side:N}),window.clearTimeout(p.current),p.current=window.setTimeout(()=>d.onPointerGraceIntentChange(null),300)}else{if(d.onTriggerLeave(g),g.defaultPrevented)return;d.onPointerGraceIntentChange(null)}})),onKeyDown:we(t.onKeyDown,g=>{const y=d.searchRef.current!=="";t.disabled||y&&g.key===" "||KO[o.dir].includes(g.key)&&(r.onOpenChange(!0),r.content?.focus(),g.preventDefault())})})})});BN.displayName=Ki;var VN="MenuSubContent",FN=b.forwardRef((t,n)=>{const r=AN(La,t.__scopeMenu),{forceMount:o=r.forceMount,...i}=t,d=Ol(La,t.__scopeMenu),u=Hc(La,t.__scopeMenu),p=IN(VN,t.__scopeMenu),x=b.useRef(null),h=lt(n,x);return e.jsx(mc.Provider,{scope:t.__scopeMenu,children:e.jsx(Js,{present:o||d.open,children:e.jsx(mc.Slot,{scope:t.__scopeMenu,children:e.jsx(eg,{id:p.contentId,"aria-labelledby":p.triggerId,...i,ref:h,align:"start",side:u.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:v=>{u.isUsingKeyboardRef.current&&x.current?.focus(),v.preventDefault()},onCloseAutoFocus:v=>v.preventDefault(),onFocusOutside:we(t.onFocusOutside,v=>{v.target!==p.trigger&&d.onOpenChange(!1)}),onEscapeKeyDown:we(t.onEscapeKeyDown,v=>{u.onClose(),v.preventDefault()}),onKeyDown:we(t.onKeyDown,v=>{const g=v.currentTarget.contains(v.target),y=qO[u.dir].includes(v.key);g&&y&&(d.onOpenChange(!1),p.trigger?.focus(),v.preventDefault())})})})})})});FN.displayName=VN;function UN(t){return t?"open":"closed"}function Hu(t){return t==="indeterminate"}function ag(t){return Hu(t)?"indeterminate":t?"checked":"unchecked"}function m_(t){const n=document.activeElement;for(const r of t)if(r===n||(r.focus(),document.activeElement!==n))return}function x_(t,n){return t.map((r,o)=>t[(n+o)%t.length])}function f_(t,n,r){const i=n.length>1&&Array.from(n).every(h=>h===n[0])?n[0]:n,d=r?t.indexOf(r):-1;let u=x_(t,Math.max(d,0));i.length===1&&(u=u.filter(h=>h!==r));const x=u.find(h=>h.toLowerCase().startsWith(i.toLowerCase()));return x!==r?x:void 0}function h_(t,n){const{x:r,y:o}=t;let i=!1;for(let d=0,u=n.length-1;d<n.length;u=d++){const p=n[d],x=n[u],h=p.x,v=p.y,g=x.x,y=x.y;v>o!=y>o&&r<(g-h)*(o-v)/(y-v)+h&&(i=!i)}return i}function g_(t,n){if(!n)return!1;const r={x:t.clientX,y:t.clientY};return h_(r,n)}function xc(t){return n=>n.pointerType==="mouse"?t(n):void 0}var b_=NN,v_=Zh,y_=CN,w_=EN,S_=tg,j_=RN,N_=Sp,A_=DN,C_=ON,E_=MN,R_=HN,k_=LN,D_=zN,T_=BN,O_=FN,jp="DropdownMenu",[__]=Bs(jp,[SN]),Vs=SN(),[M_,$N]=__(jp),GN=t=>{const{__scopeDropdownMenu:n,children:r,dir:o,open:i,defaultOpen:d,onOpenChange:u,modal:p=!0}=t,x=Vs(n),h=b.useRef(null),[v,g]=yn({prop:i,defaultProp:d??!1,onChange:u,caller:jp});return e.jsx(M_,{scope:n,triggerId:bs(),triggerRef:h,contentId:bs(),open:v,onOpenChange:g,onOpenToggle:b.useCallback(()=>g(y=>!y),[g]),modal:p,children:e.jsx(b_,{...x,open:v,onOpenChange:g,dir:o,modal:p,children:r})})};GN.displayName=jp;var KN="DropdownMenuTrigger",qN=b.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,disabled:o=!1,...i}=t,d=$N(KN,r),u=Vs(r);return e.jsx(v_,{asChild:!0,...u,children:e.jsx(Oe.button,{type:"button",id:d.triggerId,"aria-haspopup":"menu","aria-expanded":d.open,"aria-controls":d.open?d.contentId:void 0,"data-state":d.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...i,ref:Gn(n,d.triggerRef),onPointerDown:we(t.onPointerDown,p=>{!o&&p.button===0&&p.ctrlKey===!1&&(d.onOpenToggle(),d.open||p.preventDefault())}),onKeyDown:we(t.onKeyDown,p=>{o||(["Enter"," "].includes(p.key)&&d.onOpenToggle(),p.key==="ArrowDown"&&d.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(p.key)&&p.preventDefault())})})})});qN.displayName=KN;var P_="DropdownMenuPortal",QN=t=>{const{__scopeDropdownMenu:n,...r}=t,o=Vs(n);return e.jsx(y_,{...o,...r})};QN.displayName=P_;var YN="DropdownMenuContent",XN=b.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,i=$N(YN,r),d=Vs(r),u=b.useRef(!1);return e.jsx(w_,{id:i.contentId,"aria-labelledby":i.triggerId,...d,...o,ref:n,onCloseAutoFocus:we(t.onCloseAutoFocus,p=>{u.current||i.triggerRef.current?.focus(),u.current=!1,p.preventDefault()}),onInteractOutside:we(t.onInteractOutside,p=>{const x=p.detail.originalEvent,h=x.button===0&&x.ctrlKey===!0,v=x.button===2||h;(!i.modal||v)&&(u.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});XN.displayName=YN;var H_="DropdownMenuGroup",L_=b.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,i=Vs(r);return e.jsx(S_,{...i,...o,ref:n})});L_.displayName=H_;var z_="DropdownMenuLabel",I_=b.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,i=Vs(r);return e.jsx(j_,{...i,...o,ref:n})});I_.displayName=z_;var B_="DropdownMenuItem",ZN=b.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,i=Vs(r);return e.jsx(N_,{...i,...o,ref:n})});ZN.displayName=B_;var V_="DropdownMenuCheckboxItem",F_=b.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,i=Vs(r);return e.jsx(A_,{...i,...o,ref:n})});F_.displayName=V_;var U_="DropdownMenuRadioGroup",$_=b.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,i=Vs(r);return e.jsx(C_,{...i,...o,ref:n})});$_.displayName=U_;var G_="DropdownMenuRadioItem",K_=b.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,i=Vs(r);return e.jsx(E_,{...i,...o,ref:n})});K_.displayName=G_;var q_="DropdownMenuItemIndicator",Q_=b.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,i=Vs(r);return e.jsx(R_,{...i,...o,ref:n})});Q_.displayName=q_;var Y_="DropdownMenuSeparator",WN=b.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,i=Vs(r);return e.jsx(k_,{...i,...o,ref:n})});WN.displayName=Y_;var X_="DropdownMenuArrow",Z_=b.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,i=Vs(r);return e.jsx(D_,{...i,...o,ref:n})});Z_.displayName=X_;var W_="DropdownMenuSubTrigger",J_=b.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,i=Vs(r);return e.jsx(T_,{...i,...o,ref:n})});J_.displayName=W_;var eM="DropdownMenuSubContent",tM=b.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,i=Vs(r);return e.jsx(O_,{...i,...o,ref:n,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});tM.displayName=eM;var sM=GN,aM=qN,nM=QN,rM=XN,lM=ZN,oM=WN;function ng({...t}){return e.jsx(sM,{"data-loc":"client/src/components/ui/dropdown-menu.tsx:10","data-slot":"dropdown-menu",...t})}function rg({...t}){return e.jsx(aM,{"data-loc":"client/src/components/ui/dropdown-menu.tsx:25","data-slot":"dropdown-menu-trigger",...t})}function lg({className:t,sideOffset:n=4,...r}){return e.jsx(nM,{"data-loc":"client/src/components/ui/dropdown-menu.tsx:38",children:e.jsx(rM,{"data-loc":"client/src/components/ui/dropdown-menu.tsx:39","data-slot":"dropdown-menu-content",sideOffset:n,className:ye("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",t),...r})})}function Lu({className:t,inset:n,variant:r="default",...o}){return e.jsx(lM,{"data-loc":"client/src/components/ui/dropdown-menu.tsx:70","data-slot":"dropdown-menu-item","data-inset":n,"data-variant":r,className:ye("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...o})}function JN({className:t,...n}){return e.jsx(oM,{"data-loc":"client/src/components/ui/dropdown-menu.tsx:169","data-slot":"dropdown-menu-separator",className:ye("bg-border -mx-1 my-1 h-px",t),...n})}const pf={gold:"text-amber-600 bg-amber-50 border-amber-300",silver:"text-slate-600 bg-slate-50 border-slate-300",bronze:"text-amber-800 bg-amber-50 border-amber-300",not_rated:"text-foreground
566/40 bg-muted border-border"},iM={environment:"bg-envora-green",labor:"bg-envora-cyan",ethics:"bg-envora-gold",procurement:"bg-envora-pine"},_1={draft:{label:"In Progress",color:"bg-muted text-foreground/70",icon:e.jsx(Bt,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:39",className:"w-3.5 h-3.5"})},submitted:{label:"Submitted",color:"bg-blue-100 text-blue-700",icon:e.jsx(Hh,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:40",className:"w-3.5 h-3.5"})},ai_audited:{label:"Audited",color:"bg-envora-green/10 text-envora-green",icon:e.jsx(Te,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:41",className:"w-3.5 h-3.5"})},verified:{label:"Verified",color:"bg-envora-green/10 text-envora-green",icon:e.jsx(Ut,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:42",className:"w-3.5 h-3.5"})},expiring:{label:"Expiring Soon",color:"bg-amber-100 text-amber-700",icon:e.jsx(tt,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:43",className:"w-3.5 h-3.5"})},expired:{label:"Expired",color:"bg-red-100 text-red-700",icon:e.jsx(tt,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:44",className:"w-3.5 h-3.5"})}};function cM(){const[,t]=ds(),{user:n,isAuthenticated:r,loading:o,logout:i}=za(),{data:d,isLoading:u}=ue.supplier.getProfile.useQuery(void 0,{enabled:r}),{data:p,isLoading:x}=ue.supplier.getLatestAssessment.useQuery(void 0,{enabled:r}),{data:h}=ue.supplier.getAssessmentHistory.useQuery(void 0,{enabled:r}),{data:v}=ue.supplier.getAssessmentProgress.useQuery({assessmentId:p?.id??0},{enabled:r&&!!p&&p.state==="draft"}),g=[],y=ue.supplier.startAssessment.useMutation({onSuccess:D=>t(`/supplier/assessment/${D.assessmentId}`),onError:D=>xe.error(D.message)}),N=ue.supplier.submitAssessment.useMutation({onSuccess:()=>xe.success("Assessment submitted â running evidence review now..."),onError:D=>xe.error(D.message)}),{data:j,refetch:w}=ue.supplier.getLatestAssessment.useQuery(void 0,{enabled:!1}),A=ue.supplier.triggerAiAudit.useMutation({onSuccess:()=>{xe.success("Evidence review started â results will appear in about 1 minute."),w(),p&&t(`/supplier/report/${p.id}`)},onError:D=>xe.error("Evidence review failed: "+D.message)});if(b.useEffect(()=>{!o&&r&&!u&&!d&&t("/supplier/onboarding")},[o,r,u,d,t]),o||u||x)return e.jsx("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:90",className:"min-h-screen bg-background p-8",children:e.jsxs("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:91",className:"max-w-5xl mx-auto space-y-6",children:[e.jsx(Ue,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:92",className:"h-20 w-full rounded-2xl"}),e.jsx("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:93",className:"grid grid-cols-3 gap-4",children:[1,2,3].map(D=>e.jsx(Ue,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:94",className:"h-32 rounded-2xl"},D))}),e.jsx(Ue,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:96",className:"h-64 w-full rounded-2xl"})]})});const C=p?_1[p.state]??_1.draft:null,E=p?.band?pf[p.band]??pf.not_rated:pf.not_rated,T={environment:Number(p?.envScore??0),labor:Number(p?.laborScore??0),ethics:Number(p?.ethicsScore??0),procurement:Number(p?.procurementScore??0)};return e.jsxs("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:112",className:"min-h-screen bg-background",children:[e.jsxs("nav",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:114",className:"bg-card border-b border-border px-6 py-3.5 flex items-center justify-between sticky top-0 z-10",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:115",className:"flex items-center gap-6",children:[e.jsx("img",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:116",src:"/manus-storage/envora-logo_f789bcb1.webp",alt:"Envora Consulting",className:"h-9 w-auto"}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:117",className:"hidden md:flex items-center gap-1",children:[e.jsx(ie,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:118",variant:"ghost",size:"sm",className:"font-medium text-envora-pine bg-envora-pine/5",onClick:()=>t("/supplier/dashboard"),children:"Dashboard"}),e.jsx(ie,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:119",variant:"ghost",size:"sm",className:"font-medium text-foreground
566/60 hover:text-foreground",onClick:()=>t("/supplier/assessment"),children:"Assessment"}),e.jsx(ie,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:120",variant:"ghost",size:"sm",className:"font-medium text-foreground/60 hover:text-foreground",onClick:()=>t("/supplier/report"),children:"Report"}),e.jsx(ie,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:121",variant:"ghost",size:"sm",className:"font-medium text-foreground/60 hover:text-foreground",onClick:()=>t("/supplier/scope3"),children:"Scope 3"}),e.jsx(ie,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:122",variant:"ghost",size:"sm",className:"font-medium text-foreground/60 hover:text-foreground",onClick:()=>t("/supplier/profile"),children:"Profile"})]})]}),e.jsx("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:125",className:"flex items-center gap-3",children:e.jsxs(ng,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:126",children:[e.jsx(rg,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:127",asChild:!0,children:e.jsxs("button",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:128",className:"flex items-center gap-2 rounded-full hover:bg-muted/60 px-2 py-1 transition-colors",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:129",className:"w-8 h-8 rounded-full bg-envora-pine/10 flex items-center justify-center text-envora-pine text-sm font-bold",children:n?.name?.[0]?.toUpperCase()??"S"}),e.jsx("span",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:132",className:"hidden md:block text-sm font-medium text-foreground/80",children:n?.name??"Supplier"})]})}),e.jsxs(lg,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:135",align:"end",className:"w-48",children:[e.jsx(Lu,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:136",onClick:()=>t("/supplier/profile"),className:"cursor-pointer",children:"Profile"}),e.jsx(JN,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:139"}),e.jsxs(Lu,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:140",onClick:i,className:"cursor-pointer text-destructive focus:text-destructive",children:[e.jsx(Lh,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:141",className:"mr-2 h-4 w-4"}),"Sign out"]})]})]})})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:149",className:"max-w-5xl mx-auto p-8 space-y-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:151",className:"flex items-start justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:152",children:[e.jsxs("h1",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:153",className:"font-display text-3xl font-extrabold text-foreground tracking-tight",children:["Welcome back, ",n?.name??"Supplier"]}),e.jsxs("p",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:156",className:"text-muted-foreground mt-1 font-medium",children:[d?.businessName?e.jsxs(e.Fragment,{children:[d.businessName," · "]}):null,"Sustainability readiness dashboard"]})]}),p?.state==="draft"&&e.jsxs(ie,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:161",onClick:()=>t(`/supplier/assessment/${p.id}`),className:"bg-envora-pine hover:bg-envora-pine/90 text-white",children:["Continue Assessment ",e.jsx(qe,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:162",className:"w-4 h-4 ml-1"})]}),!p&&e.jsx(ie,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:166",onClick:()=>y.mutate(),disabled:y.isPending,className:"bg-envora-pine hover:bg-envora-pine/90 text-white",children:y.isPending?"Creating...":"Start Assessment"})]}),p?.state==="draft"&&v&&v.total>0&&(()=>{const O=[{key:"environment",label:"Env",color:"#2E9E6B",offset:0},{key:"labor",label:"Labor",color:"#0EA5E9",offset:40.85},{key:"ethics",label:"Ethics",color:"#F0AB00",offset:81.7},{key:"procurement",label:"Proc",color:"#1B4332",offset:122.55000000000001}],H=v.byTheme;return e.jsx(_e,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:187",className:"border-0 shadow-sm",children:e.jsx(Me,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:188",className:"p-5",children:e.jsxs("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:189",className:"flex items-center gap-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:191",className:"relative w-20 h-20 flex-shrink-0",children:[e.jsxs("svg",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:192",className:"w-20 h-20
566-rotate-90",viewBox:"0 0 64 64",children:[O.map(K=>e.jsx("circle",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:195",cx:"32",cy:"32",r:"26",fill:"none",stroke:"#e7e5e4",strokeWidth:"6",strokeDasharray:`${38.85} ${163.4-38.85}`,strokeDashoffset:-K.offset},`track-${K.key}`)),O.map(K=>{const le=38.85*(H?.[K.key]?.percent??0)/100;return e.jsx("circle",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:205",cx:"32",cy:"32",r:"26",fill:"none",stroke:K.color,strokeWidth:"6",strokeLinecap:"round",strokeDasharray:`${le} ${163.4-le}`,strokeDashoffset:-K.offset,style:{transition:"stroke-dasharray 0.8s cubic-bezier(0.23,1,0.32,1)"}},`fill-${K.key}`)})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:213",className:"absolute inset-0 flex flex-col items-center justify-center",children:[e.jsxs("span",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:214",className:"text-base font-extrabold text-foreground leading-none",children:[v.percent,"%"]}),e.jsx("span",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:215",className:"text-[9px] text-muted-foreground leading-none mt-0.5",children:"done"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:218",className:"flex-1 min-w-0",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:219",className:"font-semibold text-foreground text-sm mb-1",children:"Assessment Progress"}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:220",className:"text-xs text-muted-foreground mb-2",children:[v.answered," of ",v.total," criteria answered"]}),e.jsx("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:221",className:"grid grid-cols-2 gap-x-4 gap-y-1",children:O.map(K=>{const ne=H?.[K.key];return e.jsxs("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:225",className:"flex items-center gap-1.5",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:226",className:"w-2 h-2 rounded-full flex-shrink-0",style:{background:K.color}}),e.jsx("span",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:227",className:"text-xs text-muted-foreground truncate",children:K.label}),e.jsxs("span",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:228",className:"text-xs font-semibold text-foreground ml-auto",children:[ne?.answered??0,"/",ne?.total??0]})]},K.key)})})]}),e.jsxs(ie,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:234",size:"sm",className:"bg-envora-pine hover:bg-envora-pine/90 text-white flex-shrink-0",onClick:()=>t(`/supplier/assessment/${p.id}`),children:["Continue ",e.jsx(qe,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:239",className:"w-3.5 h-3.5 ml-1"})]})]})})})})(),p&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:249",className:"bg-card border border-border rounded-2xl p-4",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:250",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider mb-3",children:"Your Progress"}),e.jsx("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:251",className:"flex items-center gap-2 overflow-x-auto pb-1",children:[{label:"Profile",done:!!d,active:!1,path:"/supplier/profile"},{label:"Assessment",done:p.state!=="draft",active:p.state==="draft",path:`/supplier/assessment/${p.id}`},{label:"Evidence Review",done:p.state==="ai_audited"||p.state==="verified",active:p.state==="submitted",path:null},{label:"Report Ready",done:p.state==="ai_audited"||p.state==="verified",active:!1,path:p.state==="ai_audited"||p.state==="verified"?`/supplier/readiness-report/${p.id}`:null}].map((D,M,z)=>e.jsxs("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:258",className:"flex items-center gap-2 flex-shrink-0",children:[e.jsxs("button",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:259",onClick:()=>D.path&&t(D.path),className:`flex items-center gap-1.5 px-3 py-1.5 rounded-full text-xs font-medium transition-colors ${D.done?"bg-envora-green/10 text-envora-green border border-envora-green/20":D.active?"bg-envora-pine text-white":"bg-muted text-muted-foreground border border-border"} ${D.path?"cursor-pointer hover:opacity-80":"cursor-default"}`,children:[D.done?e.jsx(Te,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:267",className:"w-3 h-3"}):D.active?e.jsx(qe,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:267",className:"w-3 h-3"}):e.jsx("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:267",className:"w-3 h-3 rounded-full border border-current"}),D.label]}),M<z.length-1&&e.jsx("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:270",className:"w-4 h-px bg-border flex-shrink-0"})]},M))})]}),p?e.jsxs("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:279",className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[e.jsx(_e,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:281",className:"md:col-span-1 border-0 shadow-sm",children:e.jsxs(Me,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:282",className:"p-6 flex flex-col items-center text-center",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:283",className:"relative w-28 h-28 mb-4",children:[e.jsxs("svg",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:284",className:"w-28 h-28 -rotate-90",viewBox:"0 0 100 100",children:[e.jsx("circle",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:285",cx:"50",cy:"50",r:"42",fill:"none",stroke:"#e7e5e4",strokeWidth:"8"}),e.jsx("circle",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:286",cx:"50",cy:"50",r:"42",fill:"none",stroke:p.band==="gold"?"#F0AB00":p.band==="silver"?"#9CA3AF":"#2E9E6B",strokeWidth:"8",strokeLinecap:"round",strokeDasharray:"264",strokeDashoffset:264-264*Number(p.overallScore??0)/100,style:{transition:"stroke-dashoffset 1s cubic-bezier(0.23,1,0.32,1)"}})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:295",className:"absolute inset-0 flex flex-col items-center justify-center",children:[e.jsx("span",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:296",className:"font-display text-3xl font-extrabold text-foreground",children:p.overallScore!=null?Math.round(Number(p.overallScore)):"--"}),e.jsx("span",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:297",className:"text-xs text-muted-foreground",children:"/ 100"})]})]}),e.jsxs(Qe,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:300",className:`text-sm px-3 py-1 border ${E}`,children:[e.jsx(Ut,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:301",className:"w-3.5 h-3.5 mr-1.5"}),p.band?p.band.charAt(0).toUpperCase()+p.band.slice(1).replace("_"," "):"Not Rated"]}),C&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:305",className:`mt-3 flex items-center gap-1.5 text-xs px-2.5 py-1 rounded-full ${C.color}`,children:[C.icon," ",C.label]})]})}),e.jsxs(_e,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:313",className:"md:col-span-2 border-0 shadow-sm",children:[e.jsx(Ft,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:314",className:"pb-2",children:e.jsx(Xt,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:315",className:"text-base font-bold text-foreground",children:"Theme Scores"})}),e.jsx(Me,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:317",className:"space-y-4",children:[{key:"environment",label:"Environment",weight:"30%"},{key:"labor",label:"Labor & Human Rights",weight:"30%"},{key:"ethics",label:"Ethics & Governance",weight:"20%"},{key:"procurement",label:"Sustainable Procurement",weight:"20%"}].map(D=>{const M=T[D.key]??0;return e.jsxs("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:326",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:327",className:"flex items-center justify-between mb-1.5",children:[e.jsx("span",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:328",className:"text-sm font-medium text-foreground
566/80",children:D.label}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:329",className:"flex items-center gap-2",children:[e.jsx("span",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:330",className:"text-xs text-muted-foreground",children:D.weight}),e.jsxs("span",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:331",className:"text-sm font-bold text-foreground",children:[M,"/100"]})]})]}),e.jsx(vp,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:334",value:M,className:"h-2",style:{"--progress-color":iM[D.key]}})]},D.key)})})]})]}):e.jsx(_e,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:342",className:"border-2 border-dashed border-border bg-card shadow-none",children:e.jsxs(Me,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:343",className:"p-12 text-center",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:344",className:"w-16 h-16 rounded-2xl bg-envora-pine/10 flex items-center justify-center mx-auto mb-4",children:e.jsx(bn,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:345",className:"w-8 h-8 text-envora-pine"})}),e.jsx("h3",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:347",className:"font-display text-xl font-bold text-foreground mb-2",children:"No Assessment Yet"}),e.jsx("p",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:348",className:"text-muted-foreground text-sm mb-6 max-w-sm mx-auto",children:"Start your Envora Supplier Readiness Assessment to receive your sustainability score and verified badge."}),e.jsx(ie,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:351",onClick:()=>y.mutate(),disabled:y.isPending,className:"bg-envora-pine hover:bg-envora-pine/90 text-white",children:y.isPending?"Creating...":"Start Assessment"})]})}),p&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:360",className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[p.state==="draft"&&e.jsx(_e,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:362",className:"border-0 shadow-sm cursor-pointer hover:shadow-md transition-shadow",onClick:()=>t(`/supplier/assessment/${p.id}`),children:e.jsxs(Me,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:363",className:"p-5 flex items-center gap-4",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:364",className:"w-10 h-10 rounded-xl bg-envora-pine/10 flex items-center justify-center text-envora-pine",children:e.jsx(Hh,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:365",className:"w-5 h-5"})}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:367",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:368",className:"font-semibold text-foreground text-sm",children:"Continue Assessment"}),e.jsx("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:369",className:"text-xs text-muted-foreground",children:"In progress"})]}),e.jsx(qe,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:371",className:"w-4 h-4 text-muted-foreground/70 ml-auto"})]})}),p.state==="draft"&&e.jsx(_e,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:376",className:"border-0 shadow-sm cursor-pointer hover:shadow-md transition-shadow",onClick:()=>N.mutate({assessmentId:p.id}),children:e.jsxs(Me,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:377",className:"p-5 flex items-center gap-4",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:378",className:"w-10 h-10 rounded-xl bg-envora-green/10 flex items-center justify-center text-envora-green",children:e.jsx(Te,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:379",className:"w-5 h-5"})}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:381",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:382",className:"font-semibold text-foreground text-sm",children:"Submit for Audit"}),e.jsx("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:383",className:"text-xs text-muted-foreground",children:"Get your verified score"})]}),e.jsx(qe,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:385",className:"w-4 h-4 text-muted-foreground
566/70 ml-auto"})]})}),p.state==="submitted"&&e.jsx(_e,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:390",className:"border-0 shadow-sm cursor-pointer hover:shadow-md transition-shadow",onClick:()=>!A.isPending&&A.mutate({assessmentId:p.id}),children:e.jsxs(Me,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:392",className:"p-5 flex items-center gap-4",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:393",className:"w-10 h-10 rounded-xl bg-envora-pine/10 flex items-center justify-center text-envora-pine",children:A.isPending?e.jsx(It,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:394",className:"w-5 h-5 animate-spin"}):e.jsx(Ho,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:394",className:"w-5 h-5"})}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:396",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:397",className:"font-semibold text-foreground text-sm",children:A.isPending?"Evidence Review in progress...":"Run Evidence Review"}),e.jsx("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:400",className:"text-xs text-muted-foreground",children:A.isPending?"This may take a minute, please wait":"Your assessment is ready â click to run the evidence review"})]}),!A.isPending&&e.jsx(qe,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:404",className:"w-4 h-4 text-muted-foreground/70 ml-auto"})]})}),(p.state==="ai_audited"||p.state==="verified")&&e.jsxs(e.Fragment,{children:[e.jsx(_e,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:410",className:"border-0 shadow-sm cursor-pointer hover:shadow-md transition-shadow",onClick:()=>t(`/supplier/report/${p.id}`),children:e.jsxs(Me,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:411",className:"p-5 flex items-center gap-4",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:412",className:"w-10 h-10 rounded-xl bg-envora-cyan/10 flex items-center justify-center text-envora-cyan",children:e.jsx(bn,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:413",className:"w-5 h-5"})}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:415",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:416",className:"font-semibold text-foreground text-sm",children:"View Full Report"}),e.jsx("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:417",className:"text-xs text-muted-foreground",children:"Detailed asse
566ssment results"})]}),e.jsx(qe,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:419",className:"w-4 h-4 text-muted-foreground/70 ml-auto"})]})}),e.jsx(_e,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:422",className:"border-0 shadow-sm cursor-pointer hover:shadow-md transition-shadow",onClick:()=>t("/supplier/scope3"),children:e.jsxs(Me,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:423",className:"p-5 flex items-center gap-4",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:424",className:"w-10 h-10 rounded-xl bg-emerald-100 flex items-center justify-center text-emerald-600",children:e.jsx(bn,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:425",className:"w-5 h-5"})}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:427",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:428",className:"font-semibold text-foreground text-sm",children:"Scope 3 Calculator"}),e.jsx("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:429",className:"text-xs text-muted-foreground",children:"Carbon footprint data"})]}),e.jsx(qe,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:431",className:"w-4 h-4 text-muted-foreground/70 ml-auto"})]})}),e.jsx(_e,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:434",className:"border-0 shadow-sm cursor-pointer hover:shadow-md transition-shadow",onClick:()=>t(`/supplier/readiness-report/${p.id}`),children:e.jsxs(Me,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:435",className:"p-5 flex items-center gap-4",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:436",className:"w-10 h-10 rounded-xl bg-envora-gold/10 flex items-center justify-center text-envora-gold",children:e.jsx(qa,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:437",className:"w-5 h-5"})}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:439",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:440",className:"font-semibold text-foreground text-sm",children:"Readiness Report"}),e.jsx("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:441",className:"text-xs text-muted-foreground",children:"Generate and share with hotels"})]}),e.jsx(qe,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:443",className:"w-4 h-4 text-muted-foreground/70 ml-auto"})]})})]}),(p.state==="expiring"||p.state==="expired")&&e.jsx(_e,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:449",className:"border-0 shadow-sm cursor-pointer hover:shadow-md transition-shadow",onClick:()=>y.mutate(),children:e.jsxs(Me,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:450",className:"p-5 flex items-center gap-4",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:451",className:"w-10 h-10 rounded-xl bg-amber-100 flex items-center justify-center text-amber-600",children:e.jsx(Or,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:452",className:"w-5 h-5"})}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:454",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:455",className:"font-semibold text-foreground text-sm",children:"Re-assess"}),e.jsx("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:456",className:"text-xs text-muted-foreground",children:"Renew your certification"})]}),e.jsx(qe,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:458",className:"w-4 h-4 text-muted-foreground/70 ml-auto"})]})})]}),h&&h.length>1&&e.jsx(_O,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:467",history:h}),g&&g.length>0&&e.jsxs(_e,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:472",className:"border-0 shadow-sm",children:[e.jsx(Ft,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:473",children:e.jsx(Xt,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:474",className:"text-base font-bold text-foreground",children:"Hotel Decisions"})}),e.jsx(Me,{"data-loc":"client/src/pages/supplier/Dashboard.tsx:476",className:"space-y-3",children:g.map(D=>e.jsxs("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:478",className:"flex items-start gap-4 p-4 rounded-xl bg-muted/50 border border-border",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:479",className:`w-2 h-2 rounded-full mt-2 flex-shrink-0 ${D.decision==="approved"?"bg-envora-green":D.decision==="conditional"?"bg-envora-gold":"bg-red-400"}`}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:480",className:"flex-1",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:481",className:"flex items-center justify-between",children:[e.jsx("span",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:482",className:"font-semibold text-foreground text-sm capitalize",children:D.decision.replace("_"," ")}),e.jsx("span",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:483",className:"text-xs text-muted-foreground",children:new Date(D.createdAt).toLocaleDateString()})]}),D.isSharedWithSupplier&&D.feedback&&e.jsx("p",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:486",className:"text-sm text-foreground
566/70 mt-1",children:D.feedback}),!D.isSharedWithSupplier&&e.jsx("p",{"data-loc":"client/src/pages/supplier/Dashboard.tsx:489",className:"text-xs text-muted-foreground mt-1 italic",children:"Feedback not yet shared by hotel"})]})]},D.id))})]})]})]})}function dM(){return TS.useSyncExternalStore(uM,()=>!0,()=>!1)}function uM(){return()=>{}}var og="Avatar",[pM]=Bs(og),[mM,e3]=pM(og),t3=b.forwardRef((t,n)=>{const{__scopeAvatar:r,...o}=t,[i,d]=b.useState("idle");return e.jsx(mM,{scope:r,imageLoadingStatus:i,onImageLoadingStatusChange:d,children:e.jsx(Oe.span,{...o,ref:n})})});t3.displayName=og;var s3="AvatarImage",xM=b.forwardRef((t,n)=>{const{__scopeAvatar:r,src:o,onLoadingStatusChange:i=()=>{},...d}=t,u=e3(s3,r),p=fM(o,d),x=Za(h=>{i(h),u.onImageLoadingStatusChange(h)});return cs(()=>{p!=="idle"&&x(p)},[p,x]),p==="loaded"?e.jsx(Oe.img,{...d,ref:n,src:o}):null});xM.displayName=s3;var a3="AvatarFallback",n3=b.forwardRef((t,n)=>{const{__scopeAvatar:r,delayMs:o,...i}=t,d=e3(a3,r),[u,p]=b.useState(o===void 0);return b.useEffect(()=>{if(o!==void 0){const x=window.setTimeout(()=>p(!0),o);return()=>window.clearTimeout(x)}},[o]),u&&d.imageLoadingStatus!=="loaded"?e.jsx(Oe.span,{...i,ref:n}):null});n3.displayName=a3;function M1(t,n){return t?n?(t.src!==n&&(t.src=n),t.complete&&t.naturalWidth>0?"loaded":"loading"):"error":"idle"}function fM(t,{referrerPolicy:n,crossOrigin:r}){const o=dM(),i=b.useRef(null),d=o?(i.current||(i.current=new window.Image),i.current):null,[u,p]=b.useState(()=>M1(d,t));return cs(()=>{p(M1(d,t))},[d,t]),cs(()=>{const x=g=>()=>{p(g)};if(!d)return;const h=x("loaded"),v=x("error");return d.addEventListener("load",h),d.addEventListener("error",v),n&&(d.referrerPolicy=n),typeof r=="string"&&(d.crossOrigin=r),()=>{d.removeEventListener("load",h),d.removeEventListener("error",v)}},[d,r,n]),u}var hM=t3,gM=n3;function bM({className:t,...n}){return e.jsx(hM,{"data-loc":"client/src/components/ui/avatar.tsx:11","data-slot":"avatar",className:ye("relative flex size-8 shrink-0 overflow-hidden rounded-full",t),...n})}function vM({className:t,...n}){return e.jsx(gM,{"data-loc":"client/src/components/ui/avatar.tsx:40","data-slot":"avatar-fallback",className:ye("bg-muted flex size-full items-center justify-center rounded-full",t),...n})}var yM="Separator",P1="horizontal",wM=["horizontal","vertical"],r3=b.forwardRef((t,n)=>{const{decorative:r,orientation:o=P1,...i}=t,d=SM(o)?o:P1,p=r?{role:"none"}:{"aria-orientation":d==="vertical"?d:void 0,role:"separator"};return e.jsx(Oe.div,{"data-orientation":d,...p,...i,ref:n})});r3.displayName=yM;function SM(t){return wM.includes(t)}var jM=r3;function ig({className:t,orientation:n="horizontal",decorative:r=!0,...o}){return e.jsx(jM,{"data-loc":"client/src/components/ui/separator.tsx:13","data-slot":"separator",decorative:r,orientation:n,className:ye("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...o})}function l3({...t}){return e.jsx(Rc,{"data-loc":"client/src/components/ui/sheet.tsx:10","data-slot":"sheet",...t})}function NM({...t}){return e.jsx(kc,{"data-loc":"client/src/components/ui/sheet.tsx:28","data-slot":"sheet-portal",...t})}function AM({className:t,...n}){return e.jsx(Dc,{"data-loc":"client/src/components/ui/sheet.tsx:36","data-slot":"sheet-overlay",className:ye("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...n})}function o3({className:t,children:n,side:r="right",...o}){return e.jsxs(NM,{"data-loc":"client/src/components/ui/sheet.tsx:56",children:[e.jsx(AM,{"data-loc":"client/src/components/ui/sheet.tsx:57"}),e.jsxs(Tc,{"data-loc":"client/src/components/ui/sheet.tsx:58","data-slot":"sheet-content",className:ye("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",r==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",r==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",r==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",r==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",t),...o,children:[n,e.jsxs(pp,{"data-loc":"client/src/components/ui/sheet.tsx:75",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[e.jsx(Nc,{"data-loc":"client/src/components/ui/sheet.tsx:76",className:"size-4"}),e.jsx("span",{"data-loc":"client/src/components/ui/sheet.tsx:77",className:"sr-only",children:"Close"})]})]})]})}function i3({className:t,...n}){return e.jsx("div",{"data-loc":"client/src/components/ui/sheet.tsx:86","data-slot":"sheet-header",className:ye("flex flex-col gap-1.5 p-4",t),...n})}function c3({className:t,...n}){return e.jsx(up,{"data-loc":"client/src/components/ui/sheet.tsx:109","data-slot":"sheet-title",className:ye("text-foreground font-semibold",t),...n})}function CM({className:t,...n}){return e.jsx(pj,{"data-loc":"client/src/components/ui/sheet.tsx:122","data-slot":"sheet-
566description",className:ye("text-muted-foreground text-sm",t),...n})}const mf=768;function cg(){const[t,n]=b.useState(void 0);return b.useEffect(()=>{const r=window.matchMedia(`(max-width: ${mf-1}px)`),o=()=>{n(window.innerWidth<mf)};return r.addEventListener("change",o),n(window.innerWidth<mf),()=>r.removeEventListener("change",o)},[]),!!t}const EM="sidebar_state",RM=3600*24*7,kM="16rem",DM="18rem",TM="3rem",OM="b",d3=b.createContext(null);function Np(){const t=b.useContext(d3);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function _M({defaultOpen:t=!0,open:n,onOpenChange:r,className:o,style:i,children:d,...u}){const p=cg(),[x,h]=b.useState(!1),[v,g]=b.useState(t),y=n??v,N=b.useCallback(C=>{const E=typeof C=="function"?C(y):C;r?r(E):g(E),document.cookie=`${EM}=${E}; path=/; max-age=${RM}`},[r,y]),j=b.useCallback(()=>p?h(C=>!C):N(C=>!C),[p,N,h]);b.useEffect(()=>{const C=E=>{E.key===OM&&(E.metaKey||E.ctrlKey)&&(E.preventDefault(),j())};return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[j]);const w=y?"expanded":"collapsed",A=b.useMemo(()=>({state:w,open:y,setOpen:N,isMobile:p,openMobile:x,setOpenMobile:h,toggleSidebar:j}),[w,y,N,p,x,h,j]);return e.jsx(d3.Provider,{"data-loc":"client/src/components/ui/sidebar.tsx:129",value:A,children:e.jsx(Th,{"data-loc":"client/src/components/ui/sidebar.tsx:130",delayDuration:0,children:e.jsx("div",{"data-loc":"client/src/components/ui/sidebar.tsx:131","data-slot":"sidebar-wrapper",style:{"--sidebar-width":kM,"--sidebar-width-icon":TM,...i},className:ye("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",o),...u,children:d})})})}function MM({side:t="left",variant:n="sidebar",collapsible:r="offcanvas",disableTransition:o=!1,className:i,children:d,...u}){const{isMobile:p,state:x,openMobile:h,setOpenMobile:v}=Np();return r==="none"?e.jsx("div",{"data-loc":"client/src/components/ui/sidebar.tsx:171","data-slot":"sidebar",className:ye("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",i),...u,children:d}):p?e.jsx(l3,{"data-loc":"client/src/components/ui/sidebar.tsx:186",open:h,onOpenChange:v,...u,children:e.jsxs(o3,{"data-loc":"client/src/components/ui/sidebar.tsx:187","data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":DM},side:t,children:[e.jsxs(i3,{"data-loc":"client/src/components/ui/sidebar.tsx:199",className:"sr-only",children:[e.jsx(c3,{"data-loc":"client/src/components/ui/sidebar.tsx:200",children:"Sidebar"}),e.jsx(CM,{"data-loc":"client/src/components/ui/sidebar.tsx:201",children:"Displays the mobile sidebar."})]}),e.jsx("div",{"data-loc":"client/src/components/ui/sidebar.tsx:203",className:"flex h-full w-full flex-col",children:d})]})}):e.jsxs("div",{"data-loc":"client/src/components/ui/sidebar.tsx:210",className:"group peer text-sidebar-foreground hidden md:block","data-state":x,"data-collapsible":x==="collapsed"?r:"","data-variant":n,"data-side":t,"data-slot":"sidebar",children:[e.jsx("div",{"data-loc":"client/src/components/ui/sidebar.tsx:219","data-slot":"sidebar-gap",className:ye("relative w-(--sidebar-width) bg-transparent",o?"transition-none":"transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",n==="floating"||n==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),e.jsx("div",{"data-loc":"client/src/components/ui/sidebar.tsx:233","data-slot":"sidebar-container",className:ye("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) md:flex",o?"transition-none":"transition-[left,right,width] duration-200 ease-linear",t==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",n==="floating"||n==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",i),...u,children:e.jsx("div",{"data-loc":"client/src/components/ui/sidebar.tsx:251","data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:d})})]})}function PM({className:t,onClick:n,...r}){const{toggleSidebar:o}=Np();return e.jsxs(ie,{"data-loc":"client/src/components/ui/sidebar.tsx:271","data-sidebar":"trigger","data-slot":"sidebar-tr
566igger",variant:"ghost",size:"icon",className:ye("size-7",t),onClick:i=>{n?.(i),o()},...r,children:[e.jsx(NS,{"data-loc":"client/src/components/ui/sidebar.tsx:283"}),e.jsx("span",{"data-loc":"client/src/components/ui/sidebar.tsx:284",className:"sr-only",children:"Toggle Sidebar"})]})}function HM({className:t,...n}){return e.jsx("main",{"data-loc":"client/src/components/ui/sidebar.tsx:316","data-slot":"sidebar-inset",className:ye("bg-background relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),...n})}function LM({className:t,...n}){return e.jsx("div",{"data-loc":"client/src/components/ui/sidebar.tsx:344","data-slot":"sidebar-header","data-sidebar":"header",className:ye("flex flex-col gap-2 p-2",t),...n})}function zM({className:t,...n}){return e.jsx("div",{"data-loc":"client/src/components/ui/sidebar.tsx:355","data-slot":"sidebar-footer","data-sidebar":"footer",className:ye("flex flex-col gap-2 p-2",t),...n})}function IM({className:t,...n}){return e.jsx("div",{"data-loc":"client/src/components/ui/sidebar.tsx:380","data-slot":"sidebar-content","data-sidebar":"content",className:ye("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t),...n})}function BM({className:t,...n}){return e.jsx("ul",{"data-loc":"client/src/components/ui/sidebar.tsx:463","data-slot":"sidebar-menu","data-sidebar":"menu",className:ye("flex w-full min-w-0 flex-col gap-1",t),...n})}function VM({className:t,...n}){return e.jsx("li",{"data-loc":"client/src/components/ui/sidebar.tsx:474","data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:ye("group/menu-item relative",t),...n})}const FM=Oh("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function UM({asChild:t=!1,isActive:n=!1,variant:r="default",size:o="default",tooltip:i,className:d,...u}){const p=t?vh:"button",{isMobile:x,state:h}=Np(),v=e.jsx(p,{"data-loc":"client/src/components/ui/sidebar.tsx:522","data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":o,"data-active":n,className:ye(FM({variant:r,size:o}),d),...u});return i?(typeof i=="string"&&(i={children:i}),e.jsxs(Kf,{"data-loc":"client/src/components/ui/sidebar.tsx:543",children:[e.jsx(qf,{"data-loc":"client/src/components/ui/sidebar.tsx:544",asChild:!0,children:v}),e.jsx(Qf,{"data-loc":"client/src/components/ui/sidebar.tsx:545",side:"right",align:"center",hidden:h!=="collapsed"||x,...i})]})):v}function $M(){return e.jsxs("div",{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:5",className:"flex min-h-screen bg-background",children:[e.jsxs("div",{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:7",className:"w-[280px] border-r border-border bg-background p-4 space-y-6",children:[e.jsxs("div",{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:9",className:"flex items-center gap-3 px-2",children:[e.jsx(Ue,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:10",className:"h-8 w-8 rounded-md"}),e.jsx(Ue,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:11",className:"h-4 w-24"})]}),e.jsxs("div",{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:15",className:"space-y-2 px-2",children:[e.jsx(Ue,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:16",className:"h-10 w-full rounded-lg"}),e.jsx(Ue,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:17",className:"h-10 w-full rounded-lg"}),e.jsx(Ue,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:18",className:"h-10 w-full rounded-lg"})]}),e.jsx("div",{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:22",className:"absolute bottom-4 left-4 right-4",children:e.jsxs("div",{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:23",className:"flex items-center gap-3 px-1",children:[e.jsx(Ue,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:24",className:"h-9 w-9 rounded-full"}),e.jsxs("div",{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:25",className:"flex-1 space-y-2",children:[e.jsx(Ue,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:26",className:"h-3 w-20"}),e.jsx(Ue,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:27",className:"h-2 w-32"})]})]})})]}),e.jsxs("div",{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:34",className:"flex-1 p-4 space-y-4",children:[e.jsx(Ue,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:36",className:"h-12 w-48 rounded-lg"}),e.jsxs("div",{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:37",className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:[e.jsx(Ue,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:38",className:"h-32 rounded-xl"}),e.jsx(Ue,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:39",className:"h-32 rounded-xl"}),e.jsx(Ue,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:40",className:"h-32 rounded-xl"})]}),e.jsx(Ue,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:42",className:"h-64 roun
566ded-xl"})]})]})}const GM=[{icon:jS,label:"Dashboard",path:"/supplier/dashboard"},{icon:Dt,label:"Assessment",path:"/supplier/assessment"},{icon:bn,label:"Readiness Report",path:"/supplier/report"},{icon:vS,label:"Scope 3 Carbon",path:"/supplier/scope3"},{icon:Ho,label:"Corrective Actions",path:"/supplier/corrective-actions"},{icon:Ms,label:"My Profile",path:"/supplier/profile"},{icon:Eo,label:"API Keys",path:"/settings/api-keys"}],KM=[{icon:jS,label:"Dashboard",path:"/hotel/dashboard"},{icon:Ws,label:"Supplier Network",path:"/hotel/portfolio"},{icon:rT,label:"Invitations",path:"/hotel/invitations"},{icon:Ut,label:"Campaigns",path:"/hotel/campaigns"},{icon:Eo,label:"API Keys",path:"/settings/api-keys"}],H1="sidebar-width",qM=240,QM=200,YM=320;function Br({children:t,portalType:n="supplier"}){const[r,o]=b.useState(()=>{const u=localStorage.getItem(H1);return u?parseInt(u,10):qM}),{loading:i,user:d}=za();return b.useEffect(()=>{localStorage.setItem(H1,r.toString())},[r]),i?e.jsx($M,{"data-loc":"client/src/components/DashboardLayout.tsx:76"}):d?e.jsx(_M,{"data-loc":"client/src/components/DashboardLayout.tsx:103",style:{"--sidebar-width":`${r}px`},children:e.jsx(XM,{"data-loc":"client/src/components/DashboardLayout.tsx:106",setSidebarWidth:o,portalType:n,children:t})}):e.jsx("div",{"data-loc":"client/src/components/DashboardLayout.tsx:81",className:"flex items-center justify-center min-h-screen bg-background",children:e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:82",className:"flex flex-col items-center gap-8 p-8 max-w-md w-full",children:[e.jsx("img",{"data-loc":"client/src/components/DashboardLayout.tsx:83",src:"/manus-storage/envora-logo_f789bcb1.webp",alt:"Envora Consulting",className:"h-12 w-auto"}),e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:84",className:"flex flex-col items-center gap-3 text-center",children:[e.jsx("h1",{"data-loc":"client/src/components/DashboardLayout.tsx:85",className:"text-2xl font-bold tracking-tight text-foreground",children:"Sign in to continue"}),e.jsx("p",{"data-loc":"client/src/components/DashboardLayout.tsx:86",className:"text-sm text-muted-foreground max-w-sm",children:"Access to this dashboard requires authentication. Continue to launch the login flow."})]}),e.jsx(ie,{"data-loc":"client/src/components/DashboardLayout.tsx:90",onClick:()=>{window.location.href=Xa()},size:"lg",className:"w-full bg-envora-pine hover:bg-envora-pine/90 text-white font-bold",children:"Sign In"})]})})}function XM({children:t,setSidebarWidth:n,portalType:r}){const{user:o,logout:i}=za(),[d,u]=ds(),{state:p,toggleSidebar:x}=Np(),h=p==="collapsed",[v,g]=b.useState(!1),y=b.useRef(null),N=cg(),j=r==="hotel"?KM:GM,w=j.find(A=>d.startsWith(A.path));return b.useEffect(()=>{h&&g(!1)},[h]),b.useEffect(()=>{const A=E=>{if(!v)return;const T=y.current?.getBoundingClientRect().left??0,D=E.clientX-T;D>=QM&&D<=YM&&n(D)},C=()=>g(!1);return v&&(document.addEventListener("mousemove",A),document.addEventListener("mouseup",C),document.body.style.cursor="col-resize",document.body.style.userSelect="none"),()=>{document.removeEventListener("mousemove",A),document.removeEventListener("mouseup",C),document.body.style.cursor="",document.body.style.userSelect=""}},[v,n]),e.jsxs(e.Fragment,{children:[e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:163",className:"relative",ref:y,children:[e.jsxs(MM,{"data-loc":"client/src/components/DashboardLayout.tsx:164",collapsible:"icon",className:"border-r border-border bg-card",disableTransition:v,children:[e.jsx(LM,{"data-loc":"client/src/components/DashboardLayout.tsx:166",className:"h-16 justify-center border-b border-border",children:e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:167",className:"flex items-center gap-3 px-2 w-full",children:[e.jsx("button",{"data-loc":"client/src/components/DashboardLayout.tsx:168",onClick:x,className:"h-8 w-8 flex items-center justify-center hover:bg-accent rounded-lg transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-ring shrink-0","aria-label":"Toggle navigation",children:e.jsx(NS,{"data-loc":"client/src/components/DashboardLayout.t
566sx:173",className:"h-4 w-4 text-muted-foreground"})}),!h&&e.jsx("img",{"data-loc":"client/src/components/DashboardLayout.tsx:176",src:"/manus-storage/envora-logo_f789bcb1.webp",alt:"Envora Consulting",className:"h-7 w-auto"})]})}),!h&&e.jsx("div",{"data-loc":"client/src/components/DashboardLayout.tsx:187",className:"px-4 pt-4 pb-1",children:e.jsx("span",{"data-loc":"client/src/components/DashboardLayout.tsx:188",className:"text-[10px] font-bold uppercase tracking-widest text-muted-foreground",children:r==="hotel"?"Hotel Portal":"Supplier Portal"})}),e.jsx(IM,{"data-loc":"client/src/components/DashboardLayout.tsx:194",className:"gap-0",children:e.jsx(BM,{"data-loc":"client/src/components/DashboardLayout.tsx:195",className:"px-2 py-1",children:j.map(A=>{const C=d.startsWith(A.path);return e.jsx(VM,{"data-loc":"client/src/components/DashboardLayout.tsx:199",children:e.jsxs(UM,{"data-loc":"client/src/components/DashboardLayout.tsx:200",isActive:C,onClick:()=>u(A.path),tooltip:A.label,className:`h-10 transition-all font-medium rounded-lg ${C?"bg-envora-pine/10 text-envora-pine font-semibold":"text-foreground/70 hover:text-foreground hover:bg-accent"}`,children:[e.jsx(A.icon,{"data-loc":"client/src/components/DashboardLayout.tsx:210",className:`h-4 w-4 ${C?"text-envora-pine":""}`}),e.jsx("span",{"data-loc":"client/src/components/DashboardLayout.tsx:211",children:A.label})]})},A.path)})})}),e.jsx(zM,{"data-loc":"client/src/components/DashboardLayout.tsx:219",className:"p-3 border-t border-border",children:e.jsxs(ng,{"data-loc":"client/src/components/DashboardLayout.tsx:220",children:[e.jsx(rg,{"data-loc":"client/src/components/DashboardLayout.tsx:221",asChild:!0,children:e.jsxs("button",{"data-loc":"client/src/components/DashboardLayout.tsx:222",className:"flex items-center gap-3 rounded-lg px-2 py-2 hover:bg-accent/60 transition-colors w-full text-left focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[e.jsx(bM,{"data-loc":"client/src/components/DashboardLayout.tsx:223",className:"h-8 w-8 border border-border shrink-0",children:e.jsx(vM,{"data-loc":"client/src/components/DashboardLayout.tsx:224",className:"text-xs font-bold bg-envora-pine/10 text-envora-pine",children:o?.name?.charAt(0).toUpperCase()})}),!h&&e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:229",className:"flex-1 min-w-0",children:[e.jsx("p",{"data-loc":"client/src/components/DashboardLayout.tsx:230",className:"text-sm font-semibold truncate leading-none text-foreground",children:o?.name||"-"}),e.jsx("p",{"data-loc":"client/src/components/DashboardLayout.tsx:231",className:"text-xs text-muted-foreground truncate mt-1",children:o?.email||"-"})]})]})}),e.jsx(lg,{"data-loc":"client/src/components/DashboardLayout.tsx:236",align:"end",className:"w-48",children:e.jsxs(Lu,{"data-loc":"client/src/components/DashboardLayout.tsx:237",onClick:i,className:"cursor-pointer text-destructive focus:text-destructive",children:[e.jsx(Lh,{"data-loc":"client/src/components/DashboardLayout.tsx:241",className:"mr-2 h-4 w-4"}),e.jsx("span",{"data-loc":"client/src/components/DashboardLayout.tsx:242",children:"Sign out"})]})})]})})]}),e.jsx("div",{"data-loc":"client/src/components/DashboardLayout.tsx:250",className:`absolute top-0 right-0 w-1 h-full cursor-col-resize hover:bg-envora-pine/20 transition-colors ${h?"hidden":""}`,onMouseDown:()=>{h||g(!0)},style:{zIndex:50}})]}),e.jsxs(HM,{"data-loc":"client/src/components/DashboardLayout.tsx:257",className:"bg-background",children:[N&&e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:259",className:"flex border-b border-border h-14 items-center justify-between bg-background/95 px-4 backdrop-blur supports-[backdrop-filter]:backdrop-blur sticky top-0 z-40",children:[e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:260",className:"flex items-center gap-3",children:[e.jsx(PM,{"data-loc":"client/src/components/DashboardLayout.tsx:261",className:"h-9 w-9 rounded-lg"}),e.jsx("span",{"data-loc":"client/src/components/DashboardLayout.tsx:262",className:"font-semibold text-foreground tracking-tight",children:w?.label??"Menu"})]}),e.jsx("img",{"data-loc":"client/src/components/DashboardLayout.t
566sx:266",src:"/manus-storage/envora-logo_f789bcb1.webp",alt:"Envora",className:"h-6 w-auto"})]}),e.jsx("main",{"data-loc":"client/src/components/DashboardLayout.tsx:269",className:"flex-1 p-4 md:p-6",children:t})]})]})}var Ap="Switch",[ZM]=Bs(Ap),[WM,JM]=ZM(Ap),u3=b.forwardRef((t,n)=>{const{__scopeSwitch:r,name:o,checked:i,defaultChecked:d,required:u,disabled:p,value:x="on",onCheckedChange:h,form:v,...g}=t,[y,N]=b.useState(null),j=lt(n,T=>N(T)),w=b.useRef(!1),A=y?v||!!y.closest("form"):!0,[C,E]=yn({prop:i,defaultProp:d??!1,onChange:h,caller:Ap});return e.jsxs(WM,{scope:r,checked:C,disabled:p,children:[e.jsx(Oe.button,{type:"button",role:"switch","aria-checked":C,"aria-required":u,"data-state":f3(C),"data-disabled":p?"":void 0,disabled:p,value:x,...g,ref:j,onClick:we(t.onClick,T=>{E(D=>!D),A&&(w.current=T.isPropagationStopped(),w.current||T.stopPropagation())})}),A&&e.jsx(x3,{control:y,bubbles:!w.current,name:o,value:x,checked:C,required:u,disabled:p,form:v,style:{transform:"translateX(-100%)"}})]})});u3.displayName=Ap;var p3="SwitchThumb",m3=b.forwardRef((t,n)=>{const{__scopeSwitch:r,...o}=t,i=JM(p3,r);return e.jsx(Oe.span,{"data-state":f3(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:n})});m3.displayName=p3;var e9="SwitchBubbleInput",x3=b.forwardRef(({__scopeSwitch:t,control:n,checked:r,bubbles:o=!0,...i},d)=>{const u=b.useRef(null),p=lt(u,d),x=gj(r),h=z2(n);return b.useEffect(()=>{const v=u.current;if(!v)return;const g=window.HTMLInputElement.prototype,N=Object.getOwnPropertyDescriptor(g,"checked").set;if(x!==r&&N){const j=new Event("click",{bubbles:o});N.call(v,r),v.dispatchEvent(j)}},[x,r,o]),e.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...i,tabIndex:-1,ref:p,style:{...i.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});x3.displayName=e9;function f3(t){return t?"checked":"unchecked"}var t9=u3,s9=m3;function a9({className:t,...n}){return e.jsx(t9,{"data-loc":"client/src/components/ui/switch.tsx:11","data-slot":"switch",className:ye("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...n,children:e.jsx(s9,{"data-loc":"client/src/components/ui/switch.tsx:19","data-slot":"switch-thumb",className:ye("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}const gl="#1B4332",n9=["Abu Dhabi","Dubai","Sharjah","Ajman","Umm Al Quwain","Ras Al Khaimah","Fujairah"],r9=["UAE","Saudi Arabia","Qatar","Kuwait","Bahrain","Oman","Egypt","Jordan","Lebanon","UK","USA","Other"],l9=["Under AED 500K","AED 500K â 2M","AED 2M â 10M","AED 10M â 50M","Over AED 50M"],o9=["English","Arabic","French","Hindi","Urdu","Tagalog","Other"],i9=["Abu Dhabi","Dubai","Sharjah","Ajman","Ras Al Khaimah","Fujairah","Nationwide UAE","GCC Region","International"];function So({icon:t,title:n}){return e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:29",className:"flex items-center gap-2 px-4 py-2.5 rounded-t-xl -mx-6 -mt-6 mb-5",style:{background:`${gl}14`},children:[e.jsx("span",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:33",style:{color:gl},children:t}),e.jsx("h3",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:34",className:"font-bold text-sm",style:{color:gl,fontFamily:"'Fraunces', serif"},children:n})]})}function L1({options:t,selected:n,onChange:r,placeholder:o}){const[i,d]=b.useState(!1),u=p=>r(n.includes(p)?n.filter(x=>x!==p):[...n,p]);return e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:55",className:"relative",children:[e.jsx("button",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:56",type:"button",onClick:()=>d(!i),className:"w-full min-h-10 px-3 py-2 text-left border border-input rounded-md text-sm bg-background hover:bg-accent/40 transition-colors flex flex-wrap gap-1",children:n.length===0?e.jsx("span",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:62",className:"text-muted-foreground",children:o}):n.map(p=>e.jsxs(Qe,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:65",variant:"secondary",className:"text-xs gap-1",children:[p,e.jsx(Nc,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:67",className:"w-3 h-3 cursor-pointer",onClick:x=>{x.stopPropagation(),u(p)}})]},p))}),i&&e.jsx("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:76",className:"absolute z-50 mt-1 w-full bg-popover border border-border rounded-md shadow-lg max-h-56 overflow-y-auto",children:t.map(p=>e.jsxs("button",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:78",type:"button",onClick:()=>u(p),className:`w-full text-left px-3 py-2 text-sm hover:bg-accent transition-colors flex items-center gap-2 ${n.includes(p)?"text-foreground font-medium":"text-muted-foreground"}`,children:[n.includes(p)?e.jsx(Te,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:84",className:"w-3.5 h-3.5 text-envora-pine"}):e.jsx(jc,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:84",className:"w-3.5 h-3.5 opacity-30"}),p]},p))})]})}function c9(){const{data:t,isLoading:n,refetch:r}=ue.supplier.getProfile.useQuery(),{data:o}=ue.supplier.getCategories.useQuery(),[i,d]=b.useState(!1),[u,p]=b.useState({businessName:"",registrationNumber:"",categoryId:void 0,parentCategoryId:void 0,sizeband:"sme",employeeCount:void 0,annualRevenueBand:"",country:"UAE",emirate:"",serviceLocations:[],languages:[],website:"",phone:"",publicProfileEnabled:!1,publicDescription:""});b.useEffect(()=>{t&&p({businessName:t.businessName??"",registrationNumber:t.registrationNumber??"",categoryId:t.categoryId??void 0,parentCategoryId:t.parentCategoryId??void 0,sizeband:t.sizeband??"sme",employeeCount:t.employeeCount??void 0,annualRevenueBand:t.annualRevenueBand??"",country:t.country??"UAE",emirate:t.emirate??"",serviceLocations:t.serviceLocations??[],languages:t.languages??[],website:t.website??"",phone:t.phone??"",publicProfileEnabled:t.publicProfileEnabled??!1,publicDescription:t.publicDescription??""})},[t]);const x=ue.supplier.upsertProfile.useMutation({onSuccess:async()=>{await r(),d(!1),xe.success("Profile saved successfully.")},onError:y=>xe.error(y.message)});function h(){x.mutate({...u,employeeCount:u.employeeCount??void 0,categoryId:u.categoryId??void 0,parentCategoryId:u.parentCategoryId??void 0,annualRevenueBand:u.annualRevenueBand||void 0,emirate:u.emirate||void 0,website:u.website||void 0,phone:u.phone||void 0,registrationNumber:u.registrationNumber||void 0,publicDescription:u.publicDescription||void 0})}const v=o?.filter(y=>y.level===1)??[],g=o?.filter(y=>y.level===2&&y.parentId===u.parentCategoryId)??[];return n?e.jsx(Br,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:170",portalType:"supplier",children:e.jsx("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:171",className:"flex items-center justify-center py-32",children:e.jsx("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:172",className:"w-8 h-8 border-2 border-envora-pine border-t-transparent roun
566ded-full animate-spin"})})}):e.jsx(Br,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:179",portalType:"supplier",children:e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:180",className:"max-w-3xl mx-auto py-8 px-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:182",className:"flex items-center justify-between mb-8",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:183",children:[e.jsx("h1",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:184",className:"text-2xl font-bold text-foreground",style:{fontFamily:"'Fraunces', serif"},children:"Business Profile"}),e.jsx("p",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:187",className:"text-sm text-muted-foreground mt-1",children:"Your profile information is used in your Readiness Report and Verified badge."})]}),i?e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:201",className:"flex gap-2",children:[e.jsxs(ie,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:202",variant:"outline",onClick:()=>{d(!1)},className:"gap-2",children:[e.jsx(Nc,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:203",className:"w-4 h-4"})," Cancel"]}),e.jsxs(ie,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:205",onClick:h,disabled:x.isPending,className:"gap-2 text-white",style:{background:gl},children:[e.jsx(vl,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:211",className:"w-4 h-4"}),x.isPending?"Saving...":"Save Changes"]})]}):e.jsxs(ie,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:192",onClick:()=>d(!0),variant:"outline",className:"gap-2",style:{borderColor:gl,color:gl},children:[e.jsx(eT,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:198",className:"w-4 h-4"})," Edit Profile"]})]}),!t&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:220",className:"mb-6 p-4 rounded-xl border border-amber-300 bg-amber-50 text-amber-800 text-sm flex items-start gap-3",children:[e.jsx(Dt,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:221",className:"w-5 h-5 shrink-0 mt-0.5"}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:222",children:[e.jsx("p",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:223",className:"font-semibold mb-1",children:"Profile not yet completed"}),e.jsx("p",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:224",children:"Complete your business profile to unlock the assessment and generate your Readiness Report."})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:229",className:"space-y-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:231",className:"bg-white border border-border rounded-xl p-6",children:[e.jsx(So,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:232",icon:e.jsx(Ms,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:232",className:"w-4 h-4"}),title:"Business Details"}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:233",className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:234",className:"sm:col-span-2",children:[e.jsx(At,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:235",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide mb-1.5 block",children:"Business Name *"}),i?e.jsx(Ot,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:237",value:u.businessName,onChange:y=>p({...u,businessName:y.target.value}),placeholder:"e.g. Al Noor Catering LLC"}):e.jsx("p",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:239",className:"text-sm font-medium text-foreground",children:t?.businessName||e.jsx("span",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:239",className:"text-muted-foreground italic",children:"Not set"})})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:242",children:[e.jsx(At,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:243",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide mb-1.5 block",children:"Trade Licence / Reg. Number"}),i?e.jsx(Ot,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:245",value:u.registrationNumber,onChange:y=>p({...u,registrationNumber:y.target.value}),placeholder:"e.g. CN-1234567"}):e.jsx("p",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:247",className:"text-sm text-foreground",children:t?.registrationNumber||e.jsx("span",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:247",className:"text-muted-foreground italic",children:"Not set"})})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:250",children:[e.jsx(At,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:251",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide mb-1.5 block",children:"Business Size"}),i?e.jsxs(_a,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:253",value:u.sizeband,onValueChange:y=>p({...u,sizeband:y}),children:[e.jsx(Pa,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:254",children:e.jsx(Ma,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:254"})}),e.jsxs(Ha,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:255",children:[e.jsx(os,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:256",value:"micro",children:"Micro (1â9 employees)"}),e.jsx(os,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:257",value:"sme",children:"SME (10â249 employees)"}),e.jsx(os,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:258",value:"large",children:"Large (250+ employees)"})]})]}):e.jsx("p",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:262",className:"text-sm text-foreground capitalize",children:t?.sizeband||e.jsx("span",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:262",className:"text-muted-foreground italic",children:"Not set"})})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:265",children:[e.jsx(At,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:266",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide mb-1.5 block",children:"Number of Employees"}),i?e.jsx(Ot,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:268",type:"number",value:u.employeeCount??"",onChange:y=>p({...u,employeeCount:y.target.value?parseInt(y.target.value):void 0}),placeholder:"e.g. 45"}):e.jsx("p",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:275",className:"text-sm text-foreground",children:t?.employeeCount??e.jsx("span",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:275",className:"text-muted-foreground italic",children:"Not set"})})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:278",children:[e.jsx(At,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:279",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide mb-1.5 block",children:"Annual Revenue Band"}),i?e.jsxs(_a,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:281",value:u.annualRevenueBand||"none",onValueChange:y=>p({...u,annualRevenueBand:y==="none"?"":y}),children:[e.jsx(Pa,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:282",children:e.jsx(Ma,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:282",placeholder:"Select range"})}),e.jsxs(Ha,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:283",children:[e.jsx(os,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:284",value:"none",children:"Prefer not to say"}),l9.map(y=>e.jsx(os,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:285",value:y,children:y},y))]})]}):e.jsx("p",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:289",className:"text-sm text-foreground",children:t?.annualRevenueBand||e.jsx("span",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:289",className:"text-muted-foreground italic",children:"Not set"})})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:296",className:"bg-white border border-border rounded-xl p-6",children:[e.jsx(So,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:297",icon:e.jsx(G6,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:297",className:"w-4 h-4"}),title:"Industry Category"}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:298",className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:299",children:[e.jsx(At,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:300",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide mb-1.5 block",children:"Industry Sector"}),i?e.jsxs(_a,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:302",value:u.parentCategoryId?.toString()??"none",onValueChange:y=>p({...u,parentCategoryId:y==="none"?void 0:parseInt(y),categoryId:void 0}),children:[e.jsx(Pa,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:306",children:e.jsx(Ma,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:306",placeholder:"Select sector"})}),e.jsxs(Ha,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:307",children:[e.jsx(os,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:308",value:"none",children:"Not specified"}),v.map(y=>e.jsx(os,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:309",value:y.id.toString(),children:y.name},y.id))]})]}):e.jsx("p",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:313",className:"text-sm text-foreground",children:v.find(y=>y.id===t?.parentCategoryId)?.name||e.jsx("span",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:314",className:"text-muted-foreground italic",children:"Not set"})})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:318",children:[e.jsx(At,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:319",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide mb-1.5 block",children:"Sub-category"}),i?e.jsxs(_a,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:321",value:u.categoryId?.toString()??"none",onValueChange:y=>p({...u,categoryId:y==="none"?void 0:parseInt(y)}),disabled:!u.parentCategoryId,children:[e.jsx(Pa,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:326",children:e.jsx(Ma,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:326",placeholder:u.parentCategoryId?"Select sub-category":"Select sector first"})}),e.jsxs(Ha,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:327",children:[e.jsx(os,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:328",value:"none",children:"Not specified"}),g.map(y=>e.jsx(os,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:329",value:y.id.toString(),children:y.name},y.id))]})]}):e.jsx("p",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:333",className:"text-sm text-foreground",children:o?.find(y=>y.id===t?.categoryId)?.name||e.jsx("span",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:334",className:"text-muted-foreground italic",children:"Not set"})})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:342",className:"bg-white border border-border rounded-xl p-6",children:[e.jsx(So,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:343",icon:e.jsx(Z6,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:343",className:"w-4 h-4"}),title:"Location and Service Area"}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:344",className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:345",children:[e.jsx(At,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:346",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide mb-1.5 block",children:"Country"}),i?e.jsxs(_a,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:348",value:u.country,onValueChange:y=>p({...u,country:y,emirate:""}),children:[e.jsx(Pa,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:349",children:e.jsx(Ma,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:349"})}),e.jsx(Ha,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:350",children:r9.map(y=>e.jsx(os,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:351",value:y,children:y},y))})]}):e.jsx("p",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:355",className:"text-sm text-foreground",children:t?.country||"UAE"})]}),(u.country==="UAE"||t?.country==="UAE")&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:359",children:[e.jsx(At,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:360",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide mb-1.5 block",children:"Emirate"}),i?e.jsxs(_a,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:362",value:u.emirate||"none",onValueChange:y=>p({...u,emirate:y==="none"?"":y}),children:[e.jsx(Pa,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:363",children:e.jsx(Ma,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:363",placeholder:"Select emirate"})}),e.jsxs(Ha,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:364",children:[e.jsx(os,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:365",value:"none",children:"Not specified"}),n9.map(y=>e.jsx(os,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:366",value:y,children:y},y))]})]}):e.jsx("p",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:370",className:"text-sm text-foreground",children:t?.emirate||e.jsx("span",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:370",className:"text-muted-foreground italic",children:"Not set"})})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:374",className:"sm:col-span-2",children:[e.jsx(At,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:375",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide mb-1.5 block",children:"Service Locations"}),i?e.jsx(L1,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:377",options:i9,selected:u.serviceLocations,onChange:y=>p({...u,serviceLocations:y}),placeholder:"Select all that apply"}):e.jsx("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:384",className:"flex flex-wrap gap-1.5",children:t?.serviceLocations?.length?(t?.serviceLocations).map(y=>e.jsx(Qe,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:386",variant:"secondary",className:"text-xs",children:y},y)):e.jsx("span",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:388",className:"text-sm text-muted-foreground italic",children:"Not set"})})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:397",className:"bg-white border border-border rounded-xl p-6",children:[e.jsx(So,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:398",icon:e.jsx(tT,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:398",className:"w-4 h-4"}),title:"Contact and Online Presence"}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:399",className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:400",children:[e.jsx(At,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:401",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide mb-1.5 block",children:"Phone Number"}),i?e.jsx(Ot,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:403",value:u.phone,onChange:y=>p({...u,phone:y.target.value}),placeholder:"+971 4 XXX XXXX"}):e.jsx("p",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:405",className:"text-sm text-foreground",children:t?.phone||e.jsx("span",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:405",className:"text-muted-foreground italic",children:"Not set"})})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:408",children:[e.jsx(At,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:409",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide mb-1.5 block",children:"We
566bsite"}),i?e.jsx(Ot,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:411",value:u.website,onChange:y=>p({...u,website:y.target.value}),placeholder:"https://yourcompany.com"}):t?.website?e.jsxs("a",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:414",href:t.website,target:"_blank",rel:"noreferrer",className:"text-sm text-envora-cyan hover:underline flex items-center gap-1",children:[e.jsx(Ko,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:415",className:"w-3.5 h-3.5"})," ",t.website]}):e.jsx("span",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:417",className:"text-sm text-muted-foreground italic",children:"Not set"})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:420",className:"sm:col-span-2",children:[e.jsx(At,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:421",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide mb-1.5 block",children:"Languages Spoken"}),i?e.jsx(L1,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:423",options:o9,selected:u.languages,onChange:y=>p({...u,languages:y}),placeholder:"Select languages"}):e.jsx("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:430",className:"flex flex-wrap gap-1.5",children:t?.languages?.length?(t?.languages).map(y=>e.jsx(Qe,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:432",variant:"secondary",className:"text-xs",children:y},y)):e.jsx("span",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:434",className:"text-sm text-muted-foreground italic",children:"Not set"})})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:443",className:"bg-white border border-border rounded-xl p-6",children:[e.jsx(So,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:444",icon:e.jsx(Ws,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:444",className:"w-4 h-4"}),title:"Public Directory Listing"}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:445",className:"space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:446",className:"flex items-center justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:447",children:[e.jsx("p",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:448",className:"text-sm font-medium text-foreground",children:"Enable public profile"}),e.jsx("p",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:449",className:"text-xs text-muted-foreground mt-0.5",children:"Allow hotels to find your business in the Envora supplier directory."})]}),i?e.jsx(a9,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:452",checked:u.publicProfileEnabled,onCheckedChange:y=>p({...u,publicProfileEnabled:y})}):e.jsx(Qe,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:457",variant:t?.publicProfileEnabled?"default":"secondary",className:t?.publicProfileEnabled?"bg-envora-pine text-white":"",children:t?.publicProfileEnabled?"Enabled":"Disabled"})]}),e.jsx(ig,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:462"}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:463",children:[e.jsx(At,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:464",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide mb-1.5 block",children:"Public Description"}),i?e.jsx(Qa,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:466",value:u.publicDescription,onChange:y=>p({...u,publicDescription:y.target.value}),placeholder:"Briefly describe your business, services, and sustainability commitments (shown on your public profile).",rows:4}):e.jsx("p",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:473",className:"text-sm text-foreground whitespace-pre-wrap",children:t?.publicDescription||e.jsx("span",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:474",className:"text-muted-foreground italic",children:"No description provided"})})]})]})]}),t?.slug&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:483",className:"bg-white border border-border rounded-xl p-6",children:[e.jsx(So,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:484",icon:e.jsx(Te,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:484",className:"w-4 h-4"}),title:"Verification URL"}),e.jsx("p",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:485",className:"text-xs text-muted-foreground mb-2",children:"Share this URL to let anyone verify your Envora status."}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:486",className:"flex items-center gap-2 bg-muted/50 rounded-lg px-3 py-2",children:[e.jsxs("span",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:487",className:"text-sm font-mono text-foreground break-all",children:[window.location.origin,"/verify/",t.slug]}),e.jsx(ie,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:490",size:"sm",variant:"ghost",className:"shrink-0 h-7 px-2 text-xs",onClick:()=>{navigator.clipboard.writeText(`${window.location.origin}/verify/${t.slug}`),xe.success("URL copied to clipboard.")},children:"Copy"})]})]}),i&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:507",className:"flex justify-end gap-3 pt-2",children:[e.jsx(ie,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:508",variant:"outline",onClick:()=>d(!1),children:"Cancel"}),e.jsxs(ie,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:509",onClick:h,disabled:x.isPending,className:"gap-2 text-white",style:{background:gl},children:[e.jsx(vl,{"data-loc":"client/src/pages/supplier/SupplierProfile.tsx:515",className:"w-4 h-4"}),x.isPending?"Saving...":"Save Changes"]})]})]})]})})}var Cp="Tabs",[d9]=Bs(Cp,[yp]),h3=yp(),[u9,dg]=d9(Cp),g3=b.forwardRef((t,
vendor: 4,103 bytes, line 566
566n)=>{const{__scopeTabs:r,value:o,onValueChange:i,defaultValue:d,orientation:u="horizontal",dir:p,activationMode:x="automatic",...h}=t,v=mp(p),[g,y]=yn({prop:o,onChange:i,defaultProp:d??"",caller:Cp});return e.jsx(u9,{scope:r,baseId:bs(),value:g,onValueChange:y,orientation:u,dir:v,activationMode:x,children:e.jsx(Oe.div,{dir:v,"data-orientation":u,...h,ref:n})})});g3.displayName=Cp;var b3="TabsList",v3=b.forwardRef((t,n)=>{const{__scopeTabs:r,loop:o=!0,...i}=t,d=dg(b3,r),u=h3(r);return e.jsx(vN,{asChild:!0,...u,orientation:d.orientation,dir:d.dir,loop:o,children:e.jsx(Oe.div,{role:"tablist","aria-orientation":d.orientation,...i,ref:n})})});v3.displayName=b3;var y3="TabsTrigger",w3=b.forwardRef((t,n)=>{const{__scopeTabs:r,value:o,disabled:i=!1,...d}=t,u=dg(y3,r),p=h3(r),x=N3(u.baseId,o),h=A3(u.baseId,o),v=o===u.value;return e.jsx(yN,{asChild:!0,...p,focusable:!i,active:v,children:e.jsx(Oe.button,{type:"button",role:"tab","aria-selected":v,"aria-controls":h,"data-state":v?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:x,...d,ref:n,onMouseDown:we(t.onMouseDown,g=>{!i&&g.button===0&&g.ctrlKey===!1?u.onValueChange(o):g.preventDefault()}),onKeyDown:we(t.onKeyDown,g=>{[" ","Enter"].includes(g.key)&&u.onValueChange(o)}),onFocus:we(t.onFocus,()=>{const g=u.activationMode!=="manual";!v&&!i&&g&&u.onValueChange(o)})})})});w3.displayName=y3;var S3="TabsContent",j3=b.forwardRef((t,n)=>{const{__scopeTabs:r,value:o,forceMount:i,children:d,...u}=t,p=dg(S3,r),x=N3(p.baseId,o),h=A3(p.baseId,o),v=o===p.value,g=b.useRef(v);return b.useEffect(()=>{const y=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(y)},[]),e.jsx(Js,{present:i||v,children:({present:y})=>e.jsx(Oe.div,{"data-state":v?"active":"inactive","data-orientation":p.orientation,role:"tabpanel","aria-labelledby":x,hidden:!y,id:h,tabIndex:0,...u,ref:n,style:{...t.style,animationDuration:g.current?"0s":void 0},children:y&&d})})});j3.displayName=S3;function N3(t,n){return`${t}-trigger-${n}`}function A3(t,n){return`${t}-content-${n}`}var p9=g3,m9=v3,x9=w3,f9=j3;function z1({className:t,...n}){return e.jsx(p9,{"data-loc":"client/src/components/ui/tabs.tsx:11","data-slot":"tabs",className:ye("flex flex-col gap-2",t),...n})}function I1({className:t,...n}){return e.jsx(m9,{"data-loc":"client/src/components/ui/tabs.tsx:24","data-slot":"tabs-list",className:ye("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",t),...n})}function du({className:t,...n}){return e.jsx(x9,{"data-loc":"client/src/components/ui/tabs.tsx:40","data-slot":"tabs-trigger",className:ye("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...n})}function uu({className:t,...n}){return e.jsx(f9,{"data-loc":"client/src/components/ui/tabs.tsx:56","data-slot":"tabs-content",className:ye("flex-1 outline-none",t),...n})}var Ep="Collapsible",[h9]=Bs(Ep),[g9,ug]=h9(Ep),C3=b.forwardRef((t,n)=>{const{__scopeCollapsible:r,open:o,defaultOpen:i,disabled:d,onOpenChange:u,...p}=t,[x,h]=yn({prop:o,defaultProp:i??!1,onChange:u,caller:Ep});return e.jsx(g9,{scope:r,disabled:d,contentId:bs(),open:x,onOpenToggle:b.useCallback(()=>h(v=>!v),[h]),children:e.jsx(Oe.div,{"data-state":mg(x),"data-disabled":d?"":void 0,...p,ref:n})})});C3.displayName=Ep;var E3="CollapsibleTrigger",R3=b.forwardRef((t,n)=>{const{__scopeCollapsible:r,...o}=t,i=ug(E3,r);return e.jsx(Oe.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":mg(i.open
vendor: 4,349 bytes, lines 566-572
566),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...o,ref:n,onClick:we(t.onClick,i.onOpenToggle)})});R3.displayName=E3;var pg="CollapsibleContent",k3=b.forwardRef((t,n)=>{const{forceMount:r,...o}=t,i=ug(pg,t.__scopeCollapsible);return e.jsx(Js,{present:r||i.open,children:({present:d})=>e.jsx(b9,{...o,ref:n,present:d})})});k3.displayName=pg;var b9=b.forwardRef((t,n)=>{const{__scopeCollapsible:r,present:o,children:i,...d}=t,u=ug(pg,r),[p,x]=b.useState(o),h=b.useRef(null),v=lt(n,h),g=b.useRef(0),y=g.current,N=b.useRef(0),j=N.current,w=u.open||p,A=b.useRef(w),C=b.useRef(void 0);return b.useEffect(()=>{const E=requestAnimationFrame(()=>A.current=!1);return()=>cancelAnimationFrame(E)},[]),cs(()=>{const E=h.current;if(E){C.current=C.current||{transitionDuration:E.style.transitionDuration,animationName:E.style.animationName},E.style.transitionDuration="0s",E.style.animationName="none";const T=E.getBoundingClientRect();g.current=T.height,N.current=T.width,A.current||(E.style.transitionDuration=C.current.transitionDuration,E.style.animationName=C.current.animationName),x(o)}},[u.open,o]),e.jsx(Oe.div,{"data-state":mg(u.open),"data-disabled":u.disabled?"":void 0,id:u.contentId,hidden:!w,...d,ref:v,style:{"--radix-collapsible-content-height":y?`${y}px`:void 0,"--radix-collapsible-content-width":j?`${j}px`:void 0,...t.style},children:w&&i})});function mg(t){return t?"open":"closed"}var v9=C3;function B1({...t}){return e.jsx(v9,{"data-loc":"client/src/components/ui/collapsible.tsx:6","data-slot":"collapsible",...t})}function V1({...t}){return e.jsx(R3,{"data-loc":"client/src/components/ui/collapsible.tsx:13","data-slot":"collapsible-trigger",...t})}function F1({...t}){return e.jsx(k3,{"data-loc":"client/src/components/ui/collapsible.tsx:24","data-slot":"collapsible-content",...t})}var D3="AlertDialog",[y9]=Bs(D3,[XS]),Xn=XS(),T3=t=>{const{__scopeAlertDialog:n,...r}=t,o=Xn(n);return e.jsx(Rc,{...o,...r,modal:!0})};T3.displayName=D3;var w9="AlertDialogTrigger",O3=b.forwardRef((t,n)=>{const{__scopeAlertDialog:r,...o}=t,i=Xn(r);return e.jsx(B7,{...i,...o,ref:n})});O3.displayName=w9;var S9="AlertDialogPortal",_3=t=>{const{__scopeAlertDialog:n,...r}=t,o=Xn(n);return e.jsx(kc,{...o,...r})};_3.displayName=S9;var j9="AlertDialogOverlay",M3=b.forwardRef((t,n)=>{const{__scopeAlertDialog:r,...o}=t,i=Xn(r);return e.jsx(Dc,{...i,...o,ref:n})});M3.displayName=j9;var To="AlertDialogContent",[N9,A9]=y9(To),C9=S2("AlertDialogContent"),P3=b.forwardRef((t,n)=>{const{__scopeAlertDialog:r,children:o,...i}=t,d=Xn(r),u=b.useRef(null),p=lt(n,u),x=b.useRef(null);return e.jsx(H7,{contentName:To,titleName:H3,docsSlug:"alert-dialog",children:e.jsx(N9,{scope:r,cancelRef:x,children:e.jsxs(Tc,{role:"alertdialog",...d,...i,ref:p,onOpenAutoFocus:we(i.onOpenAutoFocus,h=>{h.preventDefault(),x.current?.focus({preventScroll:!0})}),onPointerDownOutside:h=>h.preventDefault(),onInteractOutside:h=>h.preventDefault(),children:[e.jsx(C9,{children:o}),e.jsx(R9,{contentRef:u})]})})})});P3.displayName=To;var H3="AlertDialogTitle",L3=b.forwardRef((t,n)=>{const{__scopeAlertDialog:r,...o}=t,i=Xn(r);return e.jsx(up,{...i,...o,ref:n})});L3.displayName=H3;var z3="AlertDialogDescription",I3=b.forwardRef((t,n)=>{const{__scopeAlertDialog:r,...o}=t,i=Xn(r);return e.jsx(pj,{...i,...o,ref:n})});I3.displayName=z3;var E9="AlertDialogAction",B3=b.forwardRef((t,n)=>{const{__scopeAlertDialog:r,...o}=t,i=Xn(r);return e.jsx(pp,{...i,...o,ref:n})});B3.displayName=E9;var V3="AlertDialogCancel",F3=b.forwardRef((t,n)=>{const{__scopeAlertDialog:r,...o}=t,{cancelRef:i}=A9(V3,r),d=Xn(r),u=lt(n,i);return e.jsx(pp,{...d,...o,ref:u})});F3.displayName=V3;var R9=({contentRef:t})=>{const n=`\`${To}\` requires a description for the component to be accessible for screen reader users. 567 568You can add a description to the \`${To}\` by passing a \`${z3}\` component as a child, which also benefits sighted users by adding visible context to the dialog. 569 570Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${To}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. 571 572For more information, see https://radix-ui.com/primitives/docs/components/
572alert-dialog`;return b.useEffect(()=>{document.getElementById(t.current?.getAttribute("aria-describedby"))||console.warn(n)},[n,t]),null},k9=T3,D9=O3,T9=_3,O9=M3,_9=P3,M9=B3,P9=F3,H9=L3,L9=I3;function U3({...t}){return e.jsx(k9,{"data-loc":"client/src/components/ui/alert-dialog.tsx:10","data-slot":"alert-dialog",...t})}function z9({...t}){return e.jsx(D9,{"data-loc":"client/src/components/ui/alert-dialog.tsx:17","data-slot":"alert-dialog-trigger",...t})}function I9({...t}){return e.jsx(T9,{"data-loc":"client/src/components/ui/alert-dialog.tsx:25","data-slot":"alert-dialog-portal",...t})}function B9({className:t,...n}){return e.jsx(O9,{"data-loc":"client/src/components/ui/alert-dialog.tsx:34","data-slot":"alert-dialog-overlay",className:ye("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...n})}function $3({className:t,...n}){return e.jsxs(I9,{"data-loc":"client/src/components/ui/alert-dialog.tsx:50",children:[e.jsx(B9,{"data-loc":"client/src/components/ui/alert-dialog.tsx:51"}),e.jsx(_9,{"data-loc":"client/src/components/ui/alert-dialog.tsx:52","data-slot":"alert-dialog-content",className:ye("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),...n})]})}function G3({className:t,...n}){return e.jsx("div",{"data-loc":"client/src/components/ui/alert-dialog.tsx:69","data-slot":"alert-dialog-header",className:ye("flex flex-col gap-2 text-center sm:text-left",t),...n})}function K3({className:t,...n}){return e.jsx("div",{"data-loc":"client/src/components/ui/alert-dialog.tsx:82","data-slot":"alert-dialog-footer",className:ye("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...n})}function q3({className:t,...n}){return e.jsx(H9,{"data-loc":"client/src/components/ui/alert-dialog.tsx:98","data-slot":"alert-dialog-title",className:ye("text-lg font-semibold",t),...n})}function Q3({className:t,...n}){return e.jsx(L9,{"data-loc":"client/src/components/ui/alert-dialog.tsx:111","data-slot":"alert-dialog-description",className:ye("text-muted-foreground text-sm",t),...n})}function Y3({className:t,...n}){return e.jsx(M9,{"data-loc":"client/src/components/ui/alert-dialog.tsx:124",className:ye(_h(),t),...n})}function X3({className:t,...n}){return e.jsx(P9,{"data-loc":"client/src/components/ui/alert-dialog.tsx:136",className:ye(_h({variant:"outline"}),t),...n})}function V9({doc:t,savedEntry:n,assessmentId:r,criterionId:o,criterionCode:i,criterionTitle:d,criterionGuidance:u,onSaved:p,token:x}){const[h,v]=b.useState(!1),[g,y]=b.useState(!1),[N,j]=b.useState({}),[w,A]=b.useState(""),[C,E]=b.useState(!1),[T,D]=b.useState(null),[M,z]=b.useState(!1),[O,H]=b.useState(!1),[K,ne]=b.useState(null),[le,Z]=b.useState(null),[X,q]=b.useState(!1),[Q,R]=b.useState(""),P=b.useRef(null),B=b.useRef(!1);b.useEffect(()=>{n&&!B.current&&(j(n.fields??{}),A(n.notes??""),R(n.naReason??""),E(!1))},[n?.id,n?.updatedAt]);const V=ue.supplierToken.dbSaveEntry.useMutation(),re=ue.supplierToken.dbGetOcrUploadUrl.useMutation(),_=ue.supplierToken.dbRunOcr.useMutation(),L=ue.supplierToken.dbMarkOcrApplied.useMutation(),I=ue.documentBuilder.saveEntry.useMutation(),G=ue.documentBuilder.getOcrUploadUrl.useMutation(),J=ue.documentBuilder.runOcr.useMutation(),me=ue.documentBuilder.markOcrApplied.useMutation(),W=x?V:I,he=(fe,$e)=>{j(St=>({...St,[fe]:$e})),E(!0)},ve=async fe=>{try{x?await V.mutateAsync({token:x,assessmentId:r,criterionId:o,documentType:t.documentType,fields:N,notes:w||void 0,status:fe}):await I.mutateAsync({assessmentId:r,criterionId:o,documentType:t.documentType,fields:N,notes:w||void 0,status:fe}),E(!1),xe.success(fe==="complete"?"Document marked as complete":"Draft saved"),p()}catch{xe.error("Failed to save. Please try again.")}},He=async()=>{try{x?await V.mutateAsync({token:x,assessmentId:r,criterionId:o,documentType:t.documentType,fields:{},notes:void 0,status:"na",naReason:Q||"Not applicable"}):await I.mutateAsync({assessmentId:r,criterionId:o,documentType:t.documentType,fields:{},notes:void 0,status:"na",naReason:Q||"Not applicable"}),E(!1),q(!1),xe.success("Document marked as Not Applicable"),p()}catch{xe.error("Failed to save. Please try again.")}},ze=async fe=>{ne(null),Z(fe),z(!0);try{const $e=await new Promise((Ia,sa)=>{const Fs=new FileReader;Fs.onload=()=>{const aa=Fs.result.split(",")[1];Ia(aa)},Fs.onerror=()=>sa(new Error("Failed to read file")),Fs.readAsDataURL(fe)}),St=x?await re.mutateAsync({token:x,assessmentId:r,criterionId:o,documentType:t.documentType,fileName:fe.name,mimeType:fe.type}):await G.mutateAsync({assessmentId:r,criterionId:o,documentType:t.documentType,fileName:fe.name,mimeType:fe.type}),ta=await fetch(St.uploadPath,{method:"POST",headers:{"Content-Type":fe.type||"application/octet-stream"},body:fe});if(!ta.ok)throw new Error("Upload failed");const $t=await ta.json();z(!1),H(!0);const Gt=x?await _.mutateAsync({token:x,assessmentId:r,criterionId:o,documentType:t.documentType,fileName:fe.name,fileKey:St.key,fileUrl:$t.url??St.key,mimeType:fe.type,fileBase64:$e,criterionCode:i,criterionTitle:d,documentLabel:t.label,documentDescription:t.description,criterionGuidance:u}):await J.mutateAsync({assessmentId:r,criterionId:o,documentType:t.documentType,fileName:fe.name,fileKey:St.key,fileUrl:$t.url??St.key,mimeType:fe.type,fileBase64:$e,criterionCode:i,criterionTitle:d,documentLabel:t.label,documentDescription:t.description,criterionGuidance:u});D(Gt),H(!1),y(!0),Gt.rejected||xe.success("Extraction complete. Review and apply the results below.")}catch($e){z(!1),H(!1);const St=$e instanceof Error?$e.message:"OCR failed";ne(St),xe.error(St,{action:{label:"Retry",onClick:()=>{le?(ne(null),ze(le)):P.current?.click()}},duration:1e4})}},Be=async()=>
572{if(!T)return;const fe={...N};for(const[$e,St]of Object.entries(T.extractedFields))St&&St.toString().trim()&&(fe[$e]=St.toString());B.current=!0,j(fe),E(!0),T.id&&(x?await L.mutateAsync({token:x,ocrId:T.id}):await me.mutateAsync({ocrId:T.id})),D(null),xe.success("OCR results applied. Save the form to keep these values.")},dt=async fe=>{await ve(fe),B.current=!1},Ne=n?.status??"draft",As=n?.updatedAt?new Date(n.updatedAt):null,vs=Ne==="na",ot=()=>Ne==="complete"?e.jsx(Qe,{"data-loc":"client/src/components/DocumentBuilder.tsx:321",className:"bg-emerald-500/15 text-emerald-600 border-emerald-200 text-[10px]",children:"Complete"}):Ne==="na"?e.jsx(Qe,{"data-loc":"client/src/components/DocumentBuilder.tsx:322",className:"bg-slate-400/15 text-slate-500 border-slate-200 text-[10px]",children:"N/A"}):n?e.jsx(Qe,{"data-loc":"client/src/components/DocumentBuilder.tsx:323",className:"bg-amber-500/15 text-amber-600 border-amber-200 text-[10px]",children:"Draft"}):e.jsx(Qe,{"data-loc":"client/src/components/DocumentBuilder.tsx:324",variant:"outline",className:"text-muted-foreground text-[10px]",children:"Not started"});return e.jsxs(e.Fragment,{children:[e.jsx(_e,{"data-loc":"client/src/components/DocumentBuilder.tsx:329",className:`transition-all duration-200 ${vs?"opacity-60":""} ${Ne==="complete"?"border-emerald-200 bg-emerald-50/30 dark:bg-emerald-950/10":""}`,children:e.jsxs(B1,{"data-loc":"client/src/components/DocumentBuilder.tsx:330",open:h,onOpenChange:v,children:[e.jsx(V1,{"data-loc":"client/src/components/DocumentBuilder.tsx:331",asChild:!0,children:e.jsx(Ft,{"data-loc":"client/src/components/DocumentBuilder.tsx:332",className:"cursor-pointer hover:bg-muted/30 rounded-t-lg transition-colors py-3 px-4",children:e.jsxs("div",{"data-loc":"client/src/components/DocumentBuilder.tsx:333",className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{"data-loc":"client/src/components/DocumentBuilder.tsx:334",className:"flex items-center gap-3 min-w-0",children:[h?e.jsx(Ps,{"data-loc":"client/src/components/DocumentBuilder.tsx:336",className:"h-4 w-4 text-muted-foreground shrink-0"}):e.jsx(qe,{"data-loc":"client/src/components/DocumentBuilder.tsx:338",className:"h-4 w-4 text-muted-foreground shrink-0"}),e.jsx(Dt,{"data-loc":"client/src/components/DocumentBuilder.tsx:340",className:"h-4 w-4 text-primary shrink-0"}),e.jsxs("div",{"data-loc":"client/src/components/DocumentBuilder.tsx:341",className:"min-w-0",children:[e.jsx("p",{"data-loc":"client/src/components/DocumentBuilder.tsx:342",className:"font-medium text-sm truncate",children:t.label}),e.jsx("p",{"data-loc":"client/src/components/DocumentBuilder.tsx:343",className:"text-xs text-muted-foreground line-clamp-1",children:t.description})]})]}),e.jsxs("div",{"data-loc":"client/src/components/DocumentBuilder.tsx:346",className:"flex items-center gap-2 shrink-0",children:[C&&e.jsx("span",{"data-loc":"client/src/components/DocumentBuilder.tsx:347",className:"text-[10px] text-amber-500 font-medium",children:"Unsaved"}),As&&!C&&e.jsx("span",{"data-loc":"client/src/components/DocumentBuilder.tsx:349",className:"text-[10px] text-muted-foreground hidden sm:block",children:As.toLocaleDateString()}),ot()]})]})})}),e.jsx(F1,{"data-loc":"client/src/components/DocumentBuilder.tsx:359",children:e.jsx(Me,{"data-loc":"client/src/components/DocumentBuilder.tsx:360",className:"pt-0 pb-4 px-4 space-y-4",children:vs?e.jsxs("div",{"data-loc":"client/src/components/DocumentBuilder.tsx:362",className:"flex items-center gap-3 p-3 rounded-lg bg-slate-100 dark:bg-slate-800/50",children:[e.jsx(Yf,{"data-loc":"client/src/components/DocumentBuilder.tsx:363",className:"h-4 w-4 text-slate-400 shrink-0"}),e.jsxs("div",{"data-loc":"client/src/components/DocumentBuilder.tsx:364",className:"min-w-0",children:[e.jsx("p",{"data-loc":"client/src/components/DocumentBuilder.tsx:365",className:"text-sm font-medium text-slate-600 dark:text-slate-300",children:"Marked as Not Applicable"}),n?.naReason&&e.jsx("p",{"data-loc":"client/src/components/DocumentBuilder.tsx:367",className:"text-xs text-muted-foreground mt-0.5 truncate",children:n.naReason})]}),e.jsx(ie,{"data-loc":"client/src/components/DocumentBuilder.tsx:370",variant:"ghost",size:"sm",className:"ml-auto text-xs shrink-0",onClick:()=>ve("draft"),children:"Undo N/A"})]}):e.jsxs(e.Fragment,{children:[e.jsxs(B1,{"data-loc":"client/src/components/DocumentBuilder.tsx:382",open:g,onOpenChange:y,children:[e.jsx(V1,{"data-loc":"client/src/components/DocumentBuilder.tsx:383",asChild:!0,children:e.jsxs(ie,{"data-loc":"client/src/components/DocumentBuilder.tsx:384",variant:"outline",size:"sm",className:"w-full justify-between text-xs gap-2",children:[e.jsxs("span",{"data-loc":"client/src/components/DocumentBuilder.tsx:385",className:"flex items-center gap-2",children:[e.jsx(oT,{"data-loc":"client/src/components/DocumentBuilder.tsx:386",className:"h-3.5 w-3.5 text-violet-500"}),"AI Document Scanner",T&&e.jsx(Qe,{"data-loc":"client/src/components/DocumentBuilder.tsx:389",className:"bg-violet-100 text-violet-700 text-[10px] px-1.5 py-0",children:"Result ready"})]}),g?e.jsx(Ps,{"data-loc":"client/src/components/DocumentBuilder.tsx:394",className:"h-3.5 w-3.5"}):e.jsx(qe,{"data-loc":"client/src/components/DocumentBuilder.tsx:394",className:"h-3.5 w-3.5"})]})}),e.jsx(F1,{"data-loc":"client/src/components/DocumentBuilder.tsx:397",children:e.jsxs("div",{"data-loc":"client/src/components/DocumentBuilder.tsx:398",className:"mt-2 p-3 rounded-lg border bg-violet-50/50 dark:bg-violet-950/20 space-y-3",children:[e.jsxs("p",{"data-loc":"client/src/components/DocumentBuilder.tsx:399",className:"text-xs text-muted-foreground",children:["Upload a PDF, image, or document for ",e.jsx("strong",{"data-loc":"client/src/components/DocumentBuilder.tsx:400",children:t.label}),". The AI will extract relevant fields and pre-fill the form."]}),e.jsxs("div",{"data-loc":"client/src/components/DocumentBuilder.tsx:402",className:"flex gap-2 p-2 rounded-md bg-amber-50 border border-amber-200 text-amber-800 dark:bg-amber-950/30 dark:border-amber-800 dark:text-amber-300",children:[e.jsx("span",{"data-loc":"client/src/components/DocumentBuilder.tsx:403",className:"text-amber-500 shrink-0 mt-0.5",children:"â "}),e.jsxs("p",{"data-loc":"client/src/components/DocumentBuilder.tsx:404",className:"text-[11px] leading-relaxed",children:[e.jsx("strong",{"data-loc":"client/src/components/DocumentBuilder.tsx:405",children:"Upload the actual document"}),", not a screenshot of this platform. Screenshots of the app will be rejected. Accepted formats: PDF, JPG, PNG, TIFF."]})]}),e.jsx("input",{"data-loc":"client/src/components/DocumentBuilder.tsx:408",ref:P,type:"file",className:"hidden",accept:".pdf,.jpg,.jpeg,.png,.webp,.tiff,.bmp",onChange:fe=>{const $e=fe.target.files?.[0];$e&&ze($e),fe.target.value=""}}),e.jsx(ie,{"data-loc":"client/src/components/DocumentBuilder.tsx:419",variant:"outline",size:"sm",className:"w-full gap-2 text-xs",disabled:M||O,onClick:()=>P.current?.click(),children:M?e.jsxs(e.Fragment,{children:[e.jsx(It,{"data-loc":"client/src/components/DocumentBuilder.tsx:427",className:"h-3.5 w-3.5 animate-spin"})," Uploadingâ¦"]}):O?e.jsxs(e.Fragment,{children:[e.jsx(It,{"data-loc":"client/src/components/DocumentBuilder.tsx:429",className:"h-3.5 w-3.5 animate-spin"})," AI extractingâ¦"]}):e.jsxs(e.Fragment,{children:[e.jsx(Ro,{"data-loc":"client/src/components/DocumentBuilder.tsx:431",className:"h-3.5 w-3.5"})," Upload document for OCR"]})}),T&&e.jsx("div",{"data-loc":"client/src/components/DocumentBuilder.tsx:436",className:"space-y-2",children:T.rejected?e.jsxs("div",{"data-loc":"client/src/components/DocumentBuilder.tsx:439",className:"rounded-md border border-amber-200 bg-amber-50 p-3 space-y-1.5",children:[e.jsxs("div",{"data-loc":"client/src/components/DocumentBuilder.tsx:440",className:"flex items-start gap-2",children:[e.jsx("span",{"data-loc":"client/src/components/DocumentBuilder.tsx:441",className:"text-amber-600 mt-0.5",children:"â "}),e.jsxs("div",{"data-loc":"client/src/components/DocumentBuilder.tsx:442",className:"space-y-1",children:[e.jsx("p",{"data-loc":"client/src/components/DocumentBuilder.tsx:443",className:"text-xs font-semibold text-amber-800",children:"Wrong document type"}),e.jsx("p",{"data-loc":"client/src/components/DocumentBuilder.tsx:444",className:"text-xs text-amber-700",children:T.rejectionReason}),e.jsx("p",{"data-loc":"client/src/components/DocumentBuilder.tsx:445",className:"text-xs text-amber-600",children:"Please upload the correct document and try again."})]})]}),e.jsx(ie,{"data-loc":"client/src/components/DocumentBuilder.tsx:448",size:"sm",variant:"ghost",className:"text-xs w-full mt-1",onClick:()=>D(null),children:"Dismiss"})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{"data-loc":"client/src/components/DocumentBuilder.tsx:455",className:"flex items-center justify-between",children:[e.jsx("span",{"data-loc":"client/src/components/DocumentBuilder.tsx:456",className:"text-xs font-medium text-violet-700 dark:text-violet-300",children:"Extraction results"}),e.jsxs(Qe,{"data-loc":"client/src/components/DocumentBuilder.tsx:457",className:`text-[10px] px-1.5 ${T.confidence>=.7?"bg-emerald-100 text-emerald-700":T.confidence>=.4?"bg-amber-100 text-amber-700":"bg-red-100 text-red-700"}`,children:[T.confidence>=.7?"High":T.confidence>=.4?"Medium":"Low"," confidence"]})]}),T.rawTextSummary&&e.jsx("p",{"data-loc":"client/src/components/DocumentBuilder.tsx:4
57262",className:"text-xs text-muted-foreground italic border-l-2 border-violet-200 pl-2",children:T.rawTextSummary}),e.jsx("div",{"data-loc":"client/src/components/DocumentBuilder.tsx:466",className:"grid grid-cols-1 gap-1 max-h-40 overflow-y-auto",children:Object.entries(T.extractedFields).filter(([,fe])=>fe&&fe.toString().trim()).map(([fe,$e])=>e.jsxs("div",{"data-loc":"client/src/components/DocumentBuilder.tsx:470",className:"flex gap-2 text-xs",children:[e.jsxs("span",{"data-loc":"client/src/components/DocumentBuilder.tsx:471",className:"text-muted-foreground shrink-0 w-32 truncate",children:[fe,":"]}),e.jsx("span",{"data-loc":"client/src/components/DocumentBuilder.tsx:472",className:"font-medium truncate",children:$e.toString()})]},fe))}),e.jsxs("div",{"data-loc":"client/src/components/DocumentBuilder.tsx:476",className:"flex gap-2",children:[e.jsxs(ie,{"data-loc":"client/src/components/DocumentBuilder.tsx:477",size:"sm",className:"flex-1 text-xs gap-1.5",onClick:Be,children:[e.jsx(Te,{"data-loc":"client/src/components/DocumentBuilder.tsx:478",className:"h-3.5 w-3.5"})," Apply to form"]}),e.jsx(ie,{"data-loc":"client/src/components/DocumentBuilder.tsx:480",size:"sm",variant:"ghost",className:"text-xs",onClick:()=>D(null),children:e.jsx(Zt,{"data-loc":"client/src/components/DocumentBuilder.tsx:481",className:"h-3.5 w-3.5"})})]})]})})]})})]}),e.jsxs("div",{"data-loc":"client/src/components/DocumentBuilder.tsx:493",className:"space-y-3",children:[t.fields.map(fe=>e.jsxs("div",{"data-loc":"client/src/components/DocumentBuilder.tsx:495",className:"space-y-1",children:[e.jsxs("label",{"data-loc":"client/src/components/DocumentBuilder.tsx:496",className:"text-xs font-medium text-foreground",children:[fe.label,fe.required&&e.jsx("span",{"data-loc":"client/src/components/DocumentBuilder.tsx:498",className:"text-destructive ml-1",children:"*"})]}),fe.type==="textarea"?e.jsx(Qa,{"data-loc":"client/src/components/DocumentBuilder.tsx:501",placeholder:fe.placeholder,value:N[fe.key]??"",onChange:$e=>he(fe.key,$e.target.value),className:"text-sm min-h-[80px] resize-none"}):fe.type==="select"&&fe.options?e.jsxs(_a,{"data-loc":"client/src/components/DocumentBuilder.tsx:508",value:N[fe.key]??"",onValueChange:$e=>he(fe.key,$e),children:[e.jsx(Pa,{"data-loc":"client/src/components/DocumentBuilder.tsx:512",className:"text-sm h-9",children:e.jsx(Ma,{"data-loc":"client/src/components/DocumentBuilder.tsx:513",placeholder:fe.placeholder??"Selectâ¦"})}),e.jsx(Ha,{"data-loc":"client/src/components/DocumentBuilder.tsx:515",children:fe.options.map($e=>e.jsx(os,{"data-loc":"client/src/components/DocumentBuilder.tsx:517",value:$e,children:$e},$e))})]}):e.jsx(Ot,{"data-loc":"client/src/components/DocumentBuilder.tsx:522",type:fe.type==="number"?"number":fe.type==="date"?"date":"text",placeholder:fe.placeholder,value:N[fe.key]??"",onChange:$e=>he(fe.key,$e.target.value),className:"text-sm h-9"})]},fe.key)),e.jsxs("div",{"data-loc":"client/src/components/DocumentBuilder.tsx:534",className:"space-y-1",children:[e.jsx("label",{"data-loc":"client/src/components/DocumentBuilder.tsx:535",className:"text-xs font-medium text-muted-foreground",children:"Additional Notes"}),e.jsx(Qa,{"data-loc":"client/src/components/DocumentBuilder.tsx:536",placeholder:"Any additional context or notes for this documentâ¦",value:w,onChange:fe=>{A(fe.target.value),E(!0)},className:"text-sm min-h-[60px] resize-none"})]})]}),e.jsxs("div",{"data-loc":"client/src/components/DocumentBuilder.tsx:546",className:"flex items-center gap-2 pt-1 flex-wrap",children:[e.jsxs(ie,{"data-loc":"client/src/components/DocumentBuilder.tsx:547",size:"sm",variant:"outline",className:"gap-1.5 text-xs",disabled:W.isPending,onClick:()=>dt("draft"),children:[W.isPending?e.jsxs(e.Fragment,{children:[e.jsx(It,{"data-loc":"client/src/components/DocumentBuilder.tsx:555",className:"h-3.5 w-3.5 animate-spin"})," Savingâ¦"]}):e.jsxs(e.Fragment,{children:[e.jsx(vl,{"data-loc":"client/src/components/DocumentBuilder.tsx:557",className:"h-3.5 w-3.5"})," "]}),"Save Draft"]}),e.jsxs(ie,{"data-loc":"client/src/components/DocumentBuilder.tsx:561",size:"sm",className:"gap-1.5 text-xs bg-emerald-600 hover:bg-emerald-700",disabled:W.
572isPending,onClick:()=>dt("complete"),children:[e.jsx(Te,{"data-loc":"client/src/components/DocumentBuilder.tsx:567",className:"h-3.5 w-3.5"}),"Mark Complete"]}),e.jsxs(ie,{"data-loc":"client/src/components/DocumentBuilder.tsx:570",size:"sm",variant:"ghost",className:"gap-1.5 text-xs text-muted-foreground ml-auto",onClick:()=>q(!0),children:[e.jsx(Yf,{"data-loc":"client/src/components/DocumentBuilder.tsx:576",className:"h-3.5 w-3.5"}),"N/A"]})]})]})})})]})}),e.jsx(U3,{"data-loc":"client/src/components/DocumentBuilder.tsx:588",open:X,onOpenChange:q,children:e.jsxs($3,{"data-loc":"client/src/components/DocumentBuilder.tsx:589",children:[e.jsxs(G3,{"data-loc":"client/src/components/DocumentBuilder.tsx:590",children:[e.jsx(q3,{"data-loc":"client/src/components/DocumentBuilder.tsx:591",children:"Mark as Not Applicable?"}),e.jsxs(Q3,{"data-loc":"client/src/components/DocumentBuilder.tsx:592",children:['Mark "',e.jsx("strong",{"data-loc":"client/src/components/DocumentBuilder.tsx:593",children:t.label}),'" as not applicable for this assessment. You can optionally provide a reason.']})]}),e.jsx(Qa,{"data-loc":"client/src/components/DocumentBuilder.tsx:597",placeholder:"Reason (optional), e.g. 'Not relevant to our operations', 'Covered under parent company policy'",value:Q,onChange:fe=>R(fe.target.value),className:"text-sm min-h-[80px] resize-none mt-2"}),e.jsxs(K3,{"data-loc":"client/src/components/DocumentBuilder.tsx:603",children:[e.jsx(X3,{"data-loc":"client/src/components/DocumentBuilder.tsx:604",children:"Cancel"}),e.jsx(Y3,{"data-loc":"client/src/components/DocumentBuilder.tsx:605",onClick:He,className:"bg-slate-600 hover:bg-slate-700",children:"Mark as N/A"})]})]})})]})}function U1({assessmentId:t,criterionId:n,criterionCode:r,criterionTitle:o,criterionGuidance:i,token:d}){const u=ue.supplierToken.getDocuments.useQuery({criterionCode:r},{enabled:!!d,staleTime:1/0,retry:!1}),p=ue.documentBuilder.getDocuments.useQuery({criterionCode:r},{enabled:!d,staleTime:1/0}),{data:x,isLoading:h}=d?u:p,v=ue.supplierToken.dbGetAllEntries.useQuery({token:d??"",assessmentId:t,criterionId:n},{enabled:!!d&&!!t&&!!n,retry:!1}),g=ue.documentBuilder.getAllEntries.useQuery({assessmentId:t,criterionId:n},{enabled:!d&&!!t&&!!n,retry:!1}),{data:y,isLoading:N,error:j,refetch:w}=d?v:g,A=x?.documents??[],C=y??[],E=H=>C.find(K=>K.documentType===H)??null,T=A.length,D=C.filter(H=>H.status==="complete").length,M=C.filter(H=>H.status==="na").length,z=C.filter(H=>H.status==="draft").length,O=T-D-M-z;return h||N?e.jsxs("div",{"data-loc":"client/src/components/DocumentBuilder.tsx:673",className:"flex items-center justify-center py-12 text-muted-foreground gap-2",children:[e.jsx(It,{"data-loc":"client/src/components/DocumentBuilder.tsx:674",className:"h-5 w-5 animate-spin"}),e.jsx("span",{"data-loc":"client/src/components/DocumentBuilder.tsx:675",className:"text-sm",children:"Loading document builderâ¦"})]}):j?e.jsxs("div",{"data-loc":"client/src/components/DocumentBuilder.tsx:682",className:"flex flex-col items-center justify-center py-12 text-muted-foreground gap-2",children:[e.jsx(tt,{"data-loc":"client/src/components/DocumentBuilder.tsx:683",className:"h-8 w-8 opacity-40"}),e.jsx("p",{"data-loc":"client/src/components/DocumentBuilder.tsx:684",className:"text-sm",children:"Could not load document builder. Please refresh and try again."}),e.jsx("button",{"data-loc":"client/src/components/DocumentBuilder.tsx:685",onClick:()=>w(),className:"text-xs text-envora-green underline mt-1",children:"Retry"})]}):A.length===0?e.jsxs("div",{"data-loc":"client/src/components/DocumentBuilder.tsx:692",className:"flex flex-col items-center justify-center py-12 text-muted-foreground gap-2",children:[e.jsx(tt,{"data-loc":"client/src/components/DocumentBuilder.tsx:693",className:"h-8 w-8 opacity-40"}),e.jsx("p",{"data-loc":"client/src/components/DocumentBuilder.tsx:694",className:"text-sm",children:"No required documents defined for this criterion."})]}):e.jsxs("div",{"data-loc":"client/src/components/DocumentBuilder.tsx:700",className:"space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/components/DocumentBuilder.tsx:702",className:"flex items-center gap-3 p-3 rounded-lg bg-muted/40 border text-xs flex-wrap",children:[e.jsxs("span",{"data-loc":"client/src/components/DocumentBuilder.tsx:703",className:"font-medium text-foreground",children:[T," required documents"]}),e.jsxs("div",{"data-loc":"client/src/components/DocumentBuilder.tsx:704",className:"flex items-center gap-3 ml-auto flex-wrap",children:[D>0&&e.jsxs("span",{"data-loc":"client/src/components/DocumentBuilder.tsx:706",className:"flex items-center gap-1 text-emerald-600",children:[e.jsx(Te,{"data-loc":"client/src/components/DocumentBuilder.tsx:707",className:"h-3.5 w-3.5"})," ",D," complete"]}),z>0&&e.jsxs("span",{"data-loc":"client/src/components/DocumentBuilder.tsx:711",className:"flex items-center gap-1 text-amber-600",children:[e.jsx(vl,{"data-loc":"client/src/components/DocumentBuilder.tsx:712",className:"h-3.5 w-3.5"})," ",z," draft"]}),M>0&&e.jsxs("span",{"data-loc":"client/src/components/DocumentBuilder.tsx:716",className:"flex items-center gap-1 text-slate-500",children:[e.jsx(Yf,{"data-loc":"client/src/components/DocumentBuilder.tsx:717",className:"h-3.5 w-3.5"})," ",M," N/A"]}),O>0&&e.jsxs("span",{"data-loc":"client/src/components/DocumentBuilder.tsx:721",className:"flex items-center gap-1 text-muted-foreground",children:[e.jsx(Dt,{"data-loc":"client/src/components/DocumentBuilder.tsx:722",className:"h-3.5 w-3.5"})," ",O," not started"]})]})]}),e.jsx("div",{"data-loc":"client/src/components/DocumentBuilder.tsx:729",className:"space-y-2",children:A.map(H=>e.jsx(V9,{"data-loc":"client/src/components/DocumentBuilder.tsx:731",doc:H,savedEntry:E(H.documentType),assessmentId:t,criterionId:n,criterionCode:r,criterionTitle:o,criterionGuidance:i,onSaved:()=>w(),token:d},H.documentType))})]})}function F9(t){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",n.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}const Z3=se.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{}
572,openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),Lc=()=>{const t=se.useContext(Z3);if(!t)throw new Error("useDrawerContext must be used within a Drawer.Root");return t};F9(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not( 573[data-state=closed] 574){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;
574left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function U9(){const t=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(t)&&/Mobile/.test(t)||/FxiOS/.test(t))}function $9(){return xg(/^Mac/)}function G9(){return xg(/^iPhone/)}function $1(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function K9(){return xg(/^iPad/)||$9()&&navigator.maxTouchPoints>1}function W3(){return G9()||K9()}function xg(t){return typeof window<"u"&&window.navigator!=null?t.test(window.navigator.platform):void 0}const q9=24,Q9=typeof window<"u"?b.useLayoutEffect:b.useEffect;function G1(...t){return(...n)=>{for(let r of t)typeof r=="function"&&r(...n)}}const xf=typeof document<"u"&&window.visualViewport;function K1(t){let n=window.getComputedStyle(t);return/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY)}function J3(t){for(K1(t)&&(t=t.parentElement);t&&!K1(t);)t=t.parentElement;return t||document.scrollingElement||document.documentElement}const Y9=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let pu=0,ff;function X9(t={}){let{isDisabled:n}=t;Q9(()=>{if(!n)return pu++,pu===1&&W3()&&(ff=Z9()),()=>{pu--,pu===0&&ff?.()}},[n])}function Z9(){let t,n=0,r=g=>{t=J3(g.target),!(t===document.documentElement&&t===document.body)&&(n=g.changedTouches[0].pageY)},o=g=>{if(!t||t===document.documentElement||t===document.body){g.preventDefault();return}let y=g.changedTouches[0].pageY,N=t.scrollTop,j=t.scrollHeight-t.clientHeight;j!==0&&((N<=0&&y>n||N>=j&&y<n)&&g.preventDefault(),n=y)},i=g=>{let y=g.target;ch(y)&&y!==document.activeElement&&(g.preventDefault(),y.style.transform="translateY(-2000px)",y.focus(),requestAnimationFrame(()=>{y.style.transform=""}))},d=g=>{let y=g.target;ch(y)&&(y.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{y.style.transform="",xf&&(xf.height<window.innerHeight?requestAnimationFrame(()=>{q1(y)}):xf.addEventListener("resize",()=>q1(y),{once:!0}))}))},u=()=>{window.scrollTo(0,0)},p=window.pageXOffset,x=window.pageYOffset,h=G1(W9(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let v=G1(Ui(document,"touchstart",r,{passive:!1,capture:!0}),Ui(document,"touchmove",o,{passive:!1,capture:!0}),Ui(document,"touchend",i,{passive:!1,capture:!0}),Ui(document,"focus",d,!0),Ui(window,"scroll",u));return()=>{h(),v(),window.scrollTo(p,x)}}function W9(t,n,r){let o=t.style[n];return t.style[n]=r,()=>{t.style[n]=o}}function Ui(t,n,r,o){return t.addEventListener(n,r,o),()=>{t.removeEventListener(n,r,o)}}function q1(t){let n=document.scrollingElement||document.documentElement;for(;t&&t!==n;){let r=J3(t);if(r!==document.documentElement&&r!==document.body&&r!==t){let o=r.getBoundingClientRect().top,i=t.getBoundingClientRect().top,d=t.getBoundingClientRect().bottom;const u=r.getBoundingClientRect().bottom+q9;d>u&&(r.scrollTop+=i-o)}t=r.parentElement}}function ch(t){return t instanceof HTMLInputElement&&!Y9.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable}function J9(t,n){typeof t=="function"?t(n):t!=null&&(t.current=n)}function eP(...t){return n=>t.forEach(r=>J9(r,n))}function e4(...t){return b.useCallback(eP(...t),t)}const t4=new WeakMap;function hs(t,n,r=!1){if(!t||!(t instanceof HTMLElement))return;let o={};
574Object.entries(n).forEach(([i,d])=>{if(i.startsWith("--")){t.style.setProperty(i,d);return}o[i]=t.style[i],t.style[i]=d}),!r&&t4.set(t,o)}function tP(t,n){if(!t||!(t instanceof HTMLElement))return;let r=t4.get(t);r&&(t.style[n]=r[n])}const is=t=>{switch(t){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return t}};function mu(t,n){if(!t)return null;const r=window.getComputedStyle(t),o=r.transform||r.webkitTransform||r.mozTransform;let i=o.match(/^matrix3d\((.+)\)$/);return i?parseFloat(i[1].split(", ")[is(n)?13:12]):(i=o.match(/^matrix\((.+)\)$/),i?parseFloat(i[1].split(", ")[is(n)?5:4]):null)}function sP(t){return 8*(Math.log(t+1)-2)}function hf(t,n){if(!t)return()=>{};const r=t.style.cssText;return Object.assign(t.style,n),()=>{t.style.cssText=r}}function aP(...t){return(...n)=>{for(const r of t)typeof r=="function"&&r(...n)}}const Vt={DURATION:.5,EASE:[.32,.72,0,1]},s4=.4,nP=.25,rP=100,a4=8,ml=16,dh=26,gf="vaul-dragging";function n4(t){const n=se.useRef(t);return se.useEffect(()=>{n.current=t}),se.useMemo(()=>(...r)=>n.current==null?void 0:n.current.call(n,...r),[])}function lP({defaultProp:t,onChange:n}){const r=se.useState(t),[o]=r,i=se.useRef(o),d=n4(n);return se.useEffect(()=>{i.current!==o&&(d(o),i.current=o)},[o,i,d]),r}function r4({prop:t,defaultProp:n,onChange:r=()=>{}}){const[o,i]=lP({defaultProp:n,onChange:r}),d=t!==void 0,u=d?t:o,p=n4(r),x=se.useCallback(h=>{if(d){const g=typeof h=="function"?h(t):h;g!==t&&p(g)}else i(h)},[d,t,i,p]);return[u,x]}function oP({activeSnapPointProp:t,setActiveSnapPointProp:n,snapPoints:r,drawerRef:o,overlayRef:i,fadeFromIndex:d,onSnapPointChange:u,direction:p="bottom",container:x,snapToSequentialPoint:h}){const[v,g]=r4({prop:t,defaultProp:r?.[0],onChange:n}),[y,N]=se.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);se.useEffect(()=>{function O(){N({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",O),()=>window.removeEventListener("resize",O)},[]);const j=se.useMemo(()=>v===r?.[r.length-1]||null,[r,v]),w=se.useMemo(()=>{var O;return(O=r?.findIndex(H=>H===v))!=null?O:null},[r,v]),A=r&&r.length>0&&(d||d===0)&&!Number.isNaN(d)&&r[d]===v||!r,C=se.useMemo(()=>{const O=x?{width:x.getBoundingClientRect().width,height:x.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var H;return(H=r?.map(K=>{const ne=typeof K=="string";let le=0;if(ne&&(le=parseInt(K,10)),is(p)){const X=ne?le:y?K*O.height:0;return y?p==="bottom"?O.height-X:-O.height+X:X}const Z=ne?le:y?K*O.width:0;return y?p==="right"?O.width-Z:-O.width+Z:Z}))!=null?H:[]},[r,y,x]),E=se.useMemo(()=>w!==null?C?.[w]:null,[C,w]),T=se.useCallback(O=>{var H;const K=(H=C?.findIndex(ne=>ne===O))!=null?H:null;u(K),hs(o.current,{transition:`transform ${Vt.DURATION}s cubic-bezier(${Vt.EASE.join(",")})`,transform:is(p)?`translate3d(0, ${O}px, 0)`:`translate3d(${O}px, 0, 0)`}),C&&K!==C.length-1&&d!==void 0&&K!==d&&K<d?hs(i.current,{transition:`opacity ${Vt.DURATION}s cubic-bezier(${Vt.EASE.join(",")})`,opacity:"0"}):hs(i.current,{transition:`opacity ${Vt.DURATION}s cubic-bezier(${Vt.EASE.join(",")})`,opacity:"1"}),g(r?.[Math.max(K,0)])},[o.current,r,C,d,i,g]);se.useEffect(()=>{if(v||t){var O;const H=(O=r?.findIndex(K=>K===t||K===v))!=null?O:-1;C&&H!==-1&&typeof C[H]=="number"&&T(C[H])}},[v,t,r,C,T]);function D({draggedDistance:O,closeDrawer:H,velocity:K,dismissible:ne}){if(d===void 0)return;const le=p==="bottom"||p==="right"?(E??0)-O:(E??0)+O,Z=w===d-1,X=w===0,q=O>0;if(Z&&hs(i.current,{transition:`opacity ${Vt.DURATION}s cubic-bezier(${Vt.EASE.join(",")})`}),!h&&K>2&&!q){ne?H():T(C[0]);return}if(!h&&K>2&&q&&C&&r){T(C[r.length-1]);return}const Q=C?.reduce((P,B)=>typeof P!="number"||typeof B!="number"?P:Math.abs(B-le)<Math.abs(P-le)?B:P),R=is(p)?window.innerHeight:window.innerWidth;if(K>s4&&Math.abs(O)<R*.4){const P=q?1:-1;if(P>0&&j&&r){T(C[r.length-1]);return}if(X&&P<0&&ne&&H(),w===null)return;T(C[w+P]);return}T(Q)}function M({draggedDistance:O}){if(E===null)return;const H=p==="bottom"||p==="right"?E-O:E+O;(p==="bottom"||p==="right")&&H<C[C.length-1]||(p==="top"||p==="left")&&H>C[C.length-1]||hs(o.current,{transform:is(p)?`translate3d(0, ${H}px, 0)`:`translate3d(${H}px, 0, 0)`})}function z(O,H){if(!r||typeof w!="number"||!C||d===void 0)return null;const K=w===d-1;if(w>=d&&H)return 0;if(K&&!H)return 1;if(!A&&!K)return null;const le=K?w+1:w-1,Z=K?C[le]-C[le-1]:C[le+1]-C[le],X=O/Math.abs(Z);return K?1-X:X}return{isLastSnapPoint:j,activeSnapPoint:v,shouldFade:A,getPercentageDragged:z,setActiveSnapPoint:g,activeSnapPointIndex:w,onRelease:D,onDrag:M,snapPointsOffset:C}}const iP=()=>()=>{};
574function cP(){const{direction:t,isOpen:n,shouldScaleBackground:r,setBackgroundColorOnScale:o,noBodyStyles:i}=Lc(),d=se.useRef(null),u=b.useMemo(()=>document.body.style.backgroundColor,[]);function p(){return(window.innerWidth-dh)/window.innerWidth}se.useEffect(()=>{if(n&&r){d.current&&clearTimeout(d.current);const x=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!x)return;aP(o&&!i?hf(document.body,{background:"black"}):iP,hf(x,{transformOrigin:is(t)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${Vt.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Vt.EASE.join(",")})`}));const h=hf(x,{borderRadius:`${a4}px`,overflow:"hidden",...is(t)?{transform:`scale(${p()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${p()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{h(),d.current=window.setTimeout(()=>{u?document.body.style.background=u:document.body.style.removeProperty("background")},Vt.DURATION*1e3)}}},[n,r,u])}let $i=null;function dP({isOpen:t,modal:n,nested:r,hasBeenOpened:o,preventScrollRestoration:i,noBodyStyles:d}){const[u,p]=se.useState(()=>typeof window<"u"?window.location.href:""),x=se.useRef(0),h=se.useCallback(()=>{if($1()&&$i===null&&t&&!d){$i={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:g,innerHeight:y}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-x.current}px`,left:`${-g}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const N=y-window.innerHeight;N&&x.current>=y&&(document.body.style.top=`${-(x.current+N)}px`)}),300)}},[t]),v=se.useCallback(()=>{if($1()&&$i!==null&&!d){const g=-parseInt(document.body.style.top,10),y=-parseInt(document.body.style.left,10);Object.assign(document.body.style,$i),window.requestAnimationFrame(()=>{if(i&&u!==window.location.href){p(window.location.href);return}window.scrollTo(y,g)}),$i=null}},[u]);return se.useEffect(()=>{function g(){x.current=window.scrollY}return g(),window.addEventListener("scroll",g),()=>{window.removeEventListener("scroll",g)}},[]),se.useEffect(()=>{if(n)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||v()}},[n,v]),se.useEffect(()=>{r||!o||(t?(!window.matchMedia("(display-mode: standalone)").matches&&h(),n||window.setTimeout(()=>{v()},500)):v())},[t,o,u,n,r,h,v]),{restorePositionSetting:v}}function uP({open:t,onOpenChange:n,children:r,onDrag:o,onRelease:i,snapPoints:d,shouldScaleBackground:u=!1,setBackgroundColorOnScale:p=!0,closeThreshold:x=nP,scrollLockTimeout:h=rP,dismissible:v=!0,handleOnly:g=!1,fadeFromIndex:y=d&&d.length-1,activeSnapPoint:N,setActiveSnapPoint:j,fixed:w,modal:A=!0,onClose:C,nested:E,noBodyStyles:T=!1,direction:D="bottom",defaultOpen:M=!1,disablePreventScroll:z=!0,snapToSequentialPoint:O=!1,preventScrollRestoration:H=!1,repositionInputs:K=!0,onAnimationEnd:ne,container:le,autoFocus:Z=!1}){var X,q;const[Q=!1,R]=r4({defaultProp:M,prop:t,onChange:ke=>{n?.(ke),!ke&&!E&&Fs(),setTimeout(()=>{ne?.(ke)},Vt.DURATION*1e3),ke&&!A&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),ke||(document.body.style.pointerEvents="auto")}}),[P,B]=se.useState(!1),[V,re]=se.useState(!1),[_,L]=se.useState(!1),I=se.useRef(null),G=se.useRef(null),J=se.useRef(null),me=se.useRef(null),W=se.useRef(null),he=se.useRef(!1),ve=se.useRef(null),He=se.useRef(0),ze=se.useRef(!1),Be=se.useRef(!M),dt=se.useRef(0),Ne=se.useRef(null),As=se.useRef(((X=Ne.current)==null?void 0:X.getBoundingClientRect().height)||0),vs=se.useRef(((q=Ne.current)==null?void 0:q.getBoundingClientRect().width)||0),ot=se.useRef(0),fe=se.useCallback(ke=>{d&&ke===ys.length-1&&(G.current=new Date)},[]),{activeSnapPoint:$e,activeSnapPointIndex:St,setActiveSnapPoint:ta,onRelease:$t,snapPointsOffset:ys,onDrag:Gt,shouldFade:Ia,getPercentageDragged:sa}=oP({snapPoints:d,activeSnapPointProp:N,setActiveSnapPointProp:j,drawerRef:Ne,fadeFromIndex:y,overlayRef:I,onSnapPointChange:fe,direction:D,container:le,snapToSequentialPoint:O});
574X9({isDisabled:!Q||V||!A||_||!P||!K||!z});const{restorePositionSetting:Fs}=dP({isOpen:Q,modal:A,nested:E??!1,hasBeenOpened:P,preventScrollRestoration:H,noBodyStyles:T});function Hs(){return(window.innerWidth-dh)/window.innerWidth}function aa(ke){var Xe,st;!v&&!d||Ne.current&&!Ne.current.contains(ke.target)||(As.current=((Xe=Ne.current)==null?void 0:Xe.getBoundingClientRect().height)||0,vs.current=((st=Ne.current)==null?void 0:st.getBoundingClientRect().width)||0,re(!0),J.current=new Date,W3()&&window.addEventListener("touchend",()=>he.current=!1,{once:!0}),ke.target.setPointerCapture(ke.pointerId),He.current=is(D)?ke.pageY:ke.pageX)}function Ds(ke,Xe){var st;let Ve=ke;const ut=(st=window.getSelection())==null?void 0:st.toString(),Ae=Ne.current?mu(Ne.current,D):null,Fe=new Date;if(Ve.tagName==="SELECT"||Ve.hasAttribute("data-vaul-no-drag")||Ve.closest("[data-vaul-no-drag]"))return!1;if(D==="right"||D==="left")return!0;if(G.current&&Fe.getTime()-G.current.getTime()<500)return!1;if(Ae!==null&&(D==="bottom"?Ae>0:Ae<0))return!0;if(ut&&ut.length>0)return!1;if(W.current&&Fe.getTime()-W.current.getTime()<h&&Ae===0||Xe)return W.current=Fe,!1;for(;Ve;){if(Ve.scrollHeight>Ve.clientHeight){if(Ve.scrollTop!==0)return W.current=new Date,!1;if(Ve.getAttribute("role")==="dialog")return!0}Ve=Ve.parentNode}return!0}function Zn(ke){if(Ne.current&&V){const Xe=D==="bottom"||D==="right"?1:-1,st=(He.current-(is(D)?ke.pageY:ke.pageX))*Xe,Ve=st>0,ut=d&&!v&&!Ve;if(ut&&St===0)return;const Ae=Math.abs(st),Fe=document.querySelector("[data-vaul-drawer-wrapper]"),yt=D==="bottom"||D==="top"?As.current:vs.current;let gt=Ae/yt;const ws=sa(Ae,Ve);if(ws!==null&&(gt=ws),ut&>>=1||!he.current&&!Ds(ke.target,Ve))return;if(Ne.current.classList.add(gf),he.current=!0,hs(Ne.current,{transition:"none"}),hs(I.current,{transition:"none"}),d&&Gt({draggedDistance:st}),Ve&&!d){const Ct=sP(st),Us=Math.min(Ct*-1,0)*Xe;hs(Ne.current,{transform:is(D)?`translate3d(0, ${Us}px, 0)`:`translate3d(${Us}px, 0, 0)`});return}const at=1-gt;if((Ia||y&&St===y-1)&&(o?.(ke,gt),hs(I.current,{opacity:`${at}`,transition:"none"},!0)),Fe&&I.current&&u){const Ct=Math.min(Hs()+gt*(1-Hs()),1),Us=8-gt*8,it=Math.max(0,14-gt*14);hs(Fe,{borderRadius:`${Us}px`,transform:is(D)?`scale(${Ct}) translate3d(0, ${it}px, 0)`:`scale(${Ct}) translate3d(${it}px, 0, 0)`,transition:"none"},!0)}if(!d){const Ct=Ae*Xe;hs(Ne.current,{transform:is(D)?`translate3d(0, ${Ct}px, 0)`:`translate3d(${Ct}px, 0, 0)`})}}}se.useEffect(()=>{window.requestAnimationFrame(()=>{Be.current=!0})},[]),se.useEffect(()=>{var ke;
574function Xe(){if(!Ne.current||!K)return;const st=document.activeElement;if(ch(st)||ze.current){var Ve;const ut=((Ve=window.visualViewport)==null?void 0:Ve.height)||0,Ae=window.innerHeight;let Fe=Ae-ut;const yt=Ne.current.getBoundingClientRect().height||0,gt=yt>Ae*.8;ot.current||(ot.current=yt);const ws=Ne.current.getBoundingClientRect().top;if(Math.abs(dt.current-Fe)>60&&(ze.current=!ze.current),d&&d.length>0&&ys&&St){const at=ys[St]||0;Fe+=at}if(dt.current=Fe,yt>ut||ze.current){const at=Ne.current.getBoundingClientRect().height;let Ct=at;at>ut&&(Ct=ut-(gt?ws:dh)),w?Ne.current.style.height=`${at-Math.max(Fe,0)}px`:Ne.current.style.height=`${Math.max(Ct,ut-ws)}px`}else U9()||(Ne.current.style.height=`${ot.current}px`);d&&d.length>0&&!ze.current?Ne.current.style.bottom="0px":Ne.current.style.bottom=`${Math.max(Fe,0)}px`}}return(ke=window.visualViewport)==null||ke.addEventListener("resize",Xe),()=>{var st;return(st=window.visualViewport)==null?void 0:st.removeEventListener("resize",Xe)}},[St,d,ys]);function Ts(ke){us(),C?.(),ke||R(!1),setTimeout(()=>{d&&ta(d[0])},Vt.DURATION*1e3)}function va(){if(!Ne.current)return;const ke=document.querySelector("[data-vaul-drawer-wrapper]"),Xe=mu(Ne.current,D);hs(Ne.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${Vt.DURATION}s cubic-bezier(${Vt.EASE.join(",")})`}),hs(I.current,{transition:`opacity ${Vt.DURATION}s cubic-bezier(${Vt.EASE.join(",")})`,opacity:"1"}),u&&Xe&&Xe>0&&Q&&hs(ke,{borderRadius:`${a4}px`,overflow:"hidden",...is(D)?{transform:`scale(${Hs()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${Hs()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${Vt.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Vt.EASE.join(",")})`},!0)}function us(){!V||!Ne.current||(Ne.current.classList.remove(gf),he.current=!1,re(!1),me.current=new Date)}function Ls(ke){if(!V||!Ne.current)return;Ne.current.classList.remove(gf),he.current=!1,re(!1),me.current=new Date;const Xe=mu(Ne.current,D);
574if(!ke||!Ds(ke.target,!1)||!Xe||Number.isNaN(Xe)||J.current===null)return;const st=me.current.getTime()-J.current.getTime(),Ve=He.current-(is(D)?ke.pageY:ke.pageX),ut=Math.abs(Ve)/st;if(ut>.05&&(L(!0),setTimeout(()=>{L(!1)},200)),d){$t({draggedDistance:Ve*(D==="bottom"||D==="right"?1:-1),closeDrawer:Ts,velocity:ut,dismissible:v}),i?.(ke,!0);return}if(D==="bottom"||D==="right"?Ve>0:Ve<0){va(),i?.(ke,!0);return}if(ut>s4){Ts(),i?.(ke,!1);return}var Ae;const Fe=Math.min((Ae=Ne.current.getBoundingClientRect().height)!=null?Ae:0,window.innerHeight);var yt;const gt=Math.min((yt=Ne.current.getBoundingClientRect().width)!=null?yt:0,window.innerWidth),ws=D==="left"||D==="right";if(Math.abs(Xe)>=(ws?gt:Fe)*x){Ts(),i?.(ke,!1);return}i?.(ke,!0),va()}se.useEffect(()=>(Q&&(hs(document.documentElement,{scrollBehavior:"auto"}),G.current=new Date),()=>{tP(document.documentElement,"scrollBehavior")}),[Q]);function Wt(ke){const Xe=ke?(window.innerWidth-ml)/window.innerWidth:1,st=ke?-ml:0;ve.current&&window.clearTimeout(ve.current),hs(Ne.current,{transition:`transform ${Vt.DURATION}s cubic-bezier(${Vt.EASE.join(",")})`,transform:is(D)?`scale(${Xe}) translate3d(0, ${st}px, 0)`:`scale(${Xe}) translate3d(${st}px, 0, 0)`}),!ke&&Ne.current&&(ve.current=setTimeout(()=>{const Ve=mu(Ne.current,D);hs(Ne.current,{transition:"none",transform:is(D)?`translate3d(0, ${Ve}px, 0)`:`translate3d(${Ve}px, 0, 0)`})},500))}function Wn(ke,Xe){if(Xe<0)return;const st=(window.innerWidth-ml)/window.innerWidth,Ve=st+Xe*(1-st),ut=-ml+Xe*ml;hs(Ne.current,{transform:is(D)?`scale(${Ve}) translate3d(0, ${ut}px, 0)`:`scale(${Ve}) translate3d(${ut}px, 0, 0)`,transition:"none"})}function Ba(ke,Xe){const st=is(D)?window.innerHeight:window.innerWidth,Ve=Xe?(st-ml)/st:1,ut=Xe?-ml:0;Xe&&hs(Ne.current,{transition:`transform ${Vt.DURATION}s cubic-bezier(${Vt.EASE.join(",")})`,transform:is(D)?`scale(${Ve}) translate3d(0, ${ut}px, 0)`:`scale(${Ve}) translate3d(${ut}px, 0, 0)`})}return se.useEffect(()=>{A||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[A]),se.createElement(Rc,{defaultOpen:M,onOpenChange:ke=>{!v&&!ke||(ke?B(!0):Ts(!0),R(ke))},open:Q}
574,se.createElement(Z3.Provider,{value:{activeSnapPoint:$e,snapPoints:d,setActiveSnapPoint:ta,drawerRef:Ne,overlayRef:I,onOpenChange:n,onPress:aa,onRelease:Ls,onDrag:Zn,dismissible:v,shouldAnimate:Be,handleOnly:g,isOpen:Q,isDragging:V,shouldFade:Ia,closeDrawer:Ts,onNestedDrag:Wn,onNestedOpenChange:Wt,onNestedRelease:Ba,keyboardIsOpen:ze,modal:A,snapPointsOffset:ys,activeSnapPointIndex:St,direction:D,shouldScaleBackground:u,setBackgroundColorOnScale:p,noBodyStyles:T,container:le,autoFocus:Z}},r))}const l4=se.forwardRef(function({...t},n){const{overlayRef:r,snapPoints:o,onRelease:i,shouldFade:d,isOpen:u,modal:p,shouldAnimate:x}=Lc(),h=e4(n,r),v=o&&o.length>0;if(!p)return null;const g=se.useCallback(y=>i(y),[i]);return se.createElement(Dc,{onMouseUp:g,ref:h,"data-vaul-overlay":"","data-vaul-snap-points":u&&v?"true":"false","data-vaul-snap-points-overlay":u&&d?"true":"false","data-vaul-animate":x?.current?"true":"false",...t})});l4.displayName="Drawer.Overlay";const o4=se.forwardRef(function({onPointerDownOutside:t,style:n,onOpenAutoFocus:r,...o},i){const{drawerRef:d,onPress:u,onRelease:p,onDrag:x,keyboardIsOpen:h,snapPointsOffset:v,activeSnapPointIndex:g,modal:y,isOpen:N,direction:j,snapPoints:w,container:A,handleOnly:C,shouldAnimate:E,autoFocus:T}=Lc(),[D,M]=se.useState(!1),z=e4(i,d),O=se.useRef(null),H=se.useRef(null),K=se.useRef(!1),ne=w&&w.length>0;cP();const le=(X,q,Q=0)=>{if(K.current)return!0;const R=Math.abs(X.y),P=Math.abs(X.x),B=P>R,V=["bottom","right"].includes(q)?1:-1;if(q==="left"||q==="right"){if(!(X.x*V<0)&&P>=0&&P<=Q)return B}else if(!(X.y*V<0)&&R>=0&&R<=Q)return!B;return K.current=!0,!0};se.useEffect(()=>{ne&&window.requestAnimationFrame(()=>{M(!0)})},[]);function Z(X){O.current=null,K.current=!1,p(X)}return se.createElement(Tc,{"data-vaul-drawer-direction":j,"data-vaul-drawer":"","data-vaul-delayed-snap-points":D?"true":"false","data-vaul-snap-points":N&&ne?"true":"false","data-vaul-custom-container":A?"true":"false","data-vaul-animate":E?.current?"true":"false",...o,ref:z,style:v&&v.length>0?{"--snap-point-height":`${v[g??0]}px`,...n}:n,onPointerDown:X=>{C||(o.onPointerDown==null||o.onPointerDown.call(o,X),O.current={x:X.pageX,y:X.pageY},u(X))},onOpenAutoFocus:X=>{r?.(X),T||X.preventDefault()},onPointerDownOutside:X=>{if(t?.(X),!y||X.defaultPrevented){X.preventDefault();return}h.current&&(h.current=!1)},onFocusOutside:X=>{if(!y){X.preventDefault();return}},onPointerMove:X=>{if(H.current=X,C||(o.onPointerMove==null||o.onPointerMove.call(o,X),!O.current))return;const q=X.pageY-O.current.y,Q=X.pageX-O.current.x,R=X.pointerType==="touch"?10:2;le({x:Q,y:q},j,R)?x(X):(Math.abs(Q)>R||Math.abs(q)>R)&&(O.current=null)},onPointerUp:X=>{o.onPointerUp==null||o.onPointerUp.call(o,X),O.current=null,K.current=!1,p(X)},onPointerOut:X=>{o.onPointerOut==null||o.onPointerOut.call(o,X),Z(H.current)},onContextMenu:X=>{o.onContextMenu==null||o.onContextMenu.call(o,X),H.current&&Z(H.current)}})});o4.displayName="Drawer.Content";const pP=250,mP=120,xP=se.forwardRef(function({preventCycle:t=!1,children:n,...r},o){const{closeDrawer:i,isDragging:d,snapPoints:u,activeSnapPoint:p,setActiveSnapPoint:x,dismissible:h,handleOnly:v,isOpen:g,onPress:y,onDrag:N}=Lc(),j=se.useRef(null),w=se.useRef(!1);function A(){if(w.current){T();return}window.setTimeout(()=>{C()},mP)}function C(){if(d||t||w.current){T();return}if(T(),!u||u.length===0){h||i();return}if(p===u[u.length-1]&&h){i();return}const M=u.findIndex(O=>O===p);if(M===-1)return;const z=u[M+1];x(z)}function E(){j.current=window.setTimeout(()=>{w.current=!0},pP)}function T(){j.current&&window.clearTimeout(j.current),w.current=!1}return se.createElement("div",{onClick:A,onPointerCancel:T,onPointerDown:D=>{v&&y(D),E()},onPointerMove:D=>{v&&N(D)},ref:o,"data-vaul-drawer-visible":g?"true":"false","data-vaul-handle":"","aria-hidden":"true",...r},se.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},n))});xP.displayName="Drawer.Handle";function fP(t){const n=Lc(),{container:r=n.container,...o}=t;return se.createElement(kc,{container:r,...o})}const zc={Root:uP,Content:o4,Overlay:l4,Portal:fP,Title:up};function hP({...t}){return e.jsx(zc.Root,{"data-loc":"client/src/components/ui/drawer.tsx:9","data-slot":"drawer",...t})}function gP({...t}){return e.jsx(zc.Portal,{"data-loc":"client/src/components/ui/drawer.tsx:21","data-slot":"drawer-portal",...t})}function bP({className:t,...n}){return e.jsx(zc.Overlay,{"data-loc":"client/src/components/ui/drawer.tsx:35","data-slot":"drawer-overlay",className:ye("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...n})}function vP({className:t,children:n,...r}){return e.jsxs(gP,{"data-loc":"client/src/components/ui/drawer.tsx:52","data-slot":"drawer-portal",children:[e.jsx(bP,{"data-loc":"client/src/components/ui/drawer.tsx:53"}),e.jsxs(zc.Content,{"data-loc":"client/src/components/ui/drawer.tsx:54","data-slot":"drawer-content",className:ye("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",t),...r,children:[e.jsx("div",{"data-loc":"client/src/components/ui/drawer.tsx:66",className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),n]})]})}function yP({className:t,...n}){return e.jsx("div",{"data-loc":"client/src/components/ui/drawer.tsx:75","data-slot":"drawer-header",className:ye("flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left",t),...n})}function wP({className:t,...n}){return e.jsx(zc.Title,{"data-loc":"client/src/components/ui/drawer.tsx:101","data-slot":"drawer-title",className:ye("text-foreground font-semibold",t),...n})}const SP={A:e.jsx(Dl,{"data-loc":"client/src/components/Scope3HotelSection.tsx:45",className:"h-5 w-5"}),B:e.jsx(DS,{"data-loc":"client/src/components/Scope3HotelSection.tsx:46",className:"h-5 w-5"}),C:e.jsx(Ns,{"data-loc":"client/src/components/Scope3HotelSection.tsx:47",className:"h-5 w-5"}),D:e.jsx(nT,{"data-loc":"client/src/components/Scope3HotelSection.tsx:48",className:"h-5 w-5"})},jP={tier1_supplier_specific:"bg-green-100 text-green-800 border-green-200",tier2_average_data:"bg-amber-100 text-amber-800 border-amber-200",tier3_spend_based:"bg-gray-100 text-gray-700 border-gray-200"};function NP({assessmentId:t,hotelInviteTokenId:n,hotelId:r,supplierCategory:o,onComplete:i,token:d,readOnly:u=!1}){const[p,x]=b.useState({productCategory:o??"",isRefrigerated:!1,hasPcfOrEpd:!1,offersTakebackPackaging:!1,localSourcingPct:"0_25",renew
574ableEnergyUsed:"none",packagingType:"mixed",annualVolumeUnit:"kg"}),[h,v]=b.useState({A:!0,B:!1,C:!1,D:!1}),[g,y]=b.useState(!1),[N,j]=b.useState(!1),w=p.productCategory||"other",{data:A}=ue.scope3.getHotelScope3.useQuery({assessmentId:t,hotelInviteTokenId:n},{enabled:!u&&!d}),{data:C}=ue.scope3.getHotelScope3ByToken.useQuery({token:d??"",assessmentId:t},{enabled:!u&&!!d}),E=d?C:A,{data:T}=ue.scope3.getQuestions.useQuery({supplierCategory:w},{enabled:!0}),D=b.useMemo(()=>({productCategory:w,annualVolumeKg:p.annualVolumeKg,annualVolumeAed:p.annualVolumeAed,annualVolumeUnit:p.annualVolumeUnit,transportMode:p.transportMode,distanceKm:p.distanceKm,isRefrigerated:p.isRefrigerated,hasPcfOrEpd:p.hasPcfOrEpd,pcfKgCo2ePerKg:p.pcfKgCo2ePerKg,localSourcingPct:p.localSourcingPct,renewableEnergyUsed:p.renewableEnergyUsed}),[p]),{data:M}=ue.scope3.previewCalculation.useQuery(D,{enabled:!!(p.annualVolumeKg||p.annualVolumeAed)}),z=ue.scope3.saveAndCalculate.useMutation({onSuccess:Q=>{j(!0),Q.calculation&&i&&i(Q.calculation.totalTonnesCo2e),xe.success("Scope 3 data saved and calculated successfully.")},onError:Q=>{xe.error("Failed to save Scope 3 data: "+Q.message)}}),O=ue.scope3.saveAndCalculateToken.useMutation({onSuccess:Q=>{j(!0),Q.calculation&&i&&i(Q.calculation.totalTonnesCo2e),xe.success("Scope 3 data saved and calculated successfully.")},onError:Q=>{xe.error("Failed to save Scope 3 data: "+Q.message)}});b.useEffect(()=>{if(E){const Q={};E.productCategory&&(Q.productCategory=E.productCategory),E.deliveryFrequency&&(Q.deliveryFrequency=E.deliveryFrequency),E.annualVolumeKg&&(Q.annualVolumeKg=parseFloat(E.annualVolumeKg)),E.annualVolumeAed&&(Q.annualVolumeAed=parseFloat(E.annualVolumeAed)),E.annualVolumeUnit&&(Q.annualVolumeUnit=E.annualVolumeUnit),E.avgDeliveryWeightKg&&(Q.avgDeliveryWeightKg=parseFloat(E.avgDeliveryWeightKg)),E.transportMode&&(Q.transportMode=E.transportMode),E.distanceKm&&(Q.distanceKm=parseFloat(E.distanceKm)),Q.isRefrigerated=E.isRefrigerated??!1,Q.hasPcfOrEpd=E.hasPcfOrEpd??!1,E.pcfKgCo2ePerKg&&(Q.pcfKgCo2ePerKg=parseFloat(E.pcfKgCo2ePerKg)),E.localSourcingPct&&(Q.localSourcingPct=E.localSourcingPct),E.renewableEnergyUsed&&(Q.renewableEnergyUsed=E.renewableEnergyUsed),E.packagingType&&(Q.packagingType=E.packagingType),Q.offersTakebackPackaging=E.offersTakebackPackaging??!1,x(R=>({...R,...Q})),E.isComplete&&j(!0)}},[E]);const H=(Q,R)=>{x(P=>({...P,[Q]:R}))},K=async(Q=!1)=>{y(!0);const R={assessmentId:t,hotelInviteTokenId:n,hotelId:r,productCategory:p.productCategory||void 0,deliveryFrequency:p.deliveryFrequency||void 0,annualVolumeKg:p.annualVolumeKg||void 0,annualVolumeAed:p.annualVolumeAed||void 0,annualVolumeUnit:p.annualVolumeUnit||void 0,avgDeliveryWeightKg:p.avgDeliveryWeightKg||void 0,transportMode:p.transportMode||void 0,distanceKm:p.distanceKm||void 0,isRefrigerated:p.isRefrigerated,hasPcfOrEpd:p.hasPcfOrEpd,pcfKgCo2ePerKg:p.pcfKgCo2ePerKg||void 0,localSourcingPct:p.localSourcingPct||void 0,renewableEnergyUsed:p.renewableEnergyUsed||void 0,packagingType:p.packagingType||void 0,offersTakebackPackaging:p.offersTakebackPackaging,isComplete:Q};try{d?await O.mutateAsync({...R,token:d}):await z.mutateAsync(R)}finally{y(!1)}},ne=Q=>{v(R=>({...R,[Q]:!R[Q]}))},le=T?.questions??[],Z=T?.sectionLabels??{},X=["A","B","C","D"],q=Q=>{const R=p[Q.id];return Q.id==="pcfKgCo2ePerKg"&&!p.hasPcfOrEpd||Q.id==="annualVolumeAed"&&w!=="professional_services"||Q.id==="annualVolumeKg"&&w==="professional_services"?null:e.jsxs("div",{"data-loc":"client/src/components/Scope3HotelSection.tsx:239",className:"space-y-2",children:[e.jsxs("div",{"data-loc":"client/src/components/Scope3HotelSection.tsx:240",className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{"data-loc":"client/src/components/Scope3HotelSection.tsx:241",className:"flex-1",children:[e.jsxs(At,{"data-loc":"client/src/components/Scope3HotelSection.tsx:242",className:"text-sm font-medium text-gray-900 leading-snug",children:[Q.label,Q.required&&e.jsx("span",{"data-loc":"client/src/components/Scope3HotelSection.tsx:244",className:"text-red-500 ml-1",children:"*"})]}),e.jsx("p",{"data-loc":"client/src/components/Scope3HotelSection.tsx:246",className:"text-xs text-gray-500 mt-0.5 leading-relaxed",children:Q.description})]}),e.jsx(Qe,{"data-loc":"client/src/components/Scope3HotelSection.tsx:248",variant:"outline",className:"text-xs shrink-0 mt-0.5 text-gray-400 border-gray-200",children:Q.ghgCategory})]}),Q.type==="select"&&Q.options&&e.jsxs(_a,{"data-loc":"client/src/components/Scope3HotelSection.tsx:254",value:R||"",onValueChange:P=>H(Q.id,P),disabled:u,children:[e.jsx(Pa,{"data-loc":"client/src/components/Scope3HotelSection.tsx:259",className:"w-full",children:e.jsx(Ma,{"data-loc":"client/src/components/Scope3HotelSection.tsx:260",placeholder:"Select an option..."})}),e.jsx(Ha,{"data-loc":"client/src/components/Scope3HotelSection.tsx:262",children:Q.options.map(P=>e.jsx(os,{"data-loc":"client/src/components/Scope3HotelSection.tsx:264",value:P.value,children:P.label},P.value))})]}),Q.type==="number"&&e.jsxs("div",{"data-loc":"client/src/components/Scope3HotelSection.tsx:273",className:"flex gap-2 items-center",children:[e.jsx(Ot,{"data-loc":"client/src/components/Scope3HotelSection.tsx:274",type:"number",min:0,step:"any",value:R||"",onChange:P=>H(Q.id,P.target.value?parseFloat(P.target.value):""),placeholder:"Enter value...",disabled:u,className:"flex-1"}),Q.unit&&e.jsx("span",{"data-loc":"client/src/components/Scope3HotelSection.tsx:285",className:"text-sm text-gray-500 shrink-0 min-w-[80px]",children:Q.unit})]}),Q.type==="boolean"&&e.jsx("div",{"data-loc":"client/src/components/Scope3HotelSection.tsx:291",className:"flex gap-3",children:[{value:!0,label:"Yes"},{value:!1,label:"No"}].map(P=>e.jsx("button",{"data-loc":"client/src/components/Scope3HotelSection.tsx:296",type:"button",disabled:u,onClick:()=>H(Q.id,P.value),className:`px-4 py-2 rounded-lg border text-sm font-medium transition-all ${R===P.value?"bg-[#1a3c2e] text-white border-[#1a3c2e]":"bg-white text-gray-700 border-gray-200 hover:border-[#1a3c2e]"}`,children:P.label},String(P.value)))})]},Q.id)};return e.jsxs("div",{"data-loc":"client/src/components/Scope3HotelSection.tsx:317",className:"space-y-4",children:[e.jsx("div",{"data-loc":"client/src/components/Scope3HotelSection.tsx:319",className:"bg-[#1a3c2e]/5 border border-[#1a3c2e]/20 rounded-xl p-4",children:e.jsxs("div",{"data-loc":"client/src/components/Scope3HotelSection.tsx:320",className:"flex items-start gap-3",children:[e.jsx("div",{"data-loc":"client/src/components/Scope3HotelSection.tsx:321",className:"p-2 bg-[#1a3c2e] rounded-lg shrink-0",children:e.jsx(Ns,{"data-loc":"client/src/components/Scope3HotelSection.tsx:322",className:"h-5 w-5 text-white"})}),e.jsxs("div",{"data-loc":"client/src/components/Scope3HotelSection.tsx:324",children:[e.jsx("h3",{"data-loc":"client/src/components/Scope3HotelSection.tsx:325",className:"font-semibold text-[#1a3c2e] text-base",children:"Scope 3 Supply Chain Carbon Data"}),e.jsxs("p",{"data-loc":"client/src/components/Scope3HotelSection.tsx:328",className:"text-sm text-gray-600 mt-0.5",children:["This section captures the carbon footprint of your supply specifically to this hotel. Data is calculated using the"," ",e.jsx("span",{"data-loc":"client/src/components/Scope3HotelSection.tsx:331",className:"font-medium",children:"GHG Protocol Scope 3 Standard"})," (Categories 1 & 4) with ",e.jsx("span",{"data-loc":"client/src/components/Scope3HotelSection.tsx:332",className:"font-medium",children:"DEFRA 2023"})," emission factors."]})]})]})}),M&&e.jsxs(_e,{"data-loc":"client/src/components/Scope3HotelSection.tsx:340",className:"border-[#1a3c2e]/30 bg-gradient-to-br from-[#1a3c2e]/5 to-white",children:[e.jsx(Ft,{"data-loc":"client/src/components/Scope3HotelSection.tsx:341",className:"pb-3 pt-4 px-4",children:e.jsxs(Xt,{"data-loc":"client/src/components/Scope3HotelSection.tsx:342",className:"text-sm font-semibold text-[#1a3c2e] flex items-center gap-2",children:[e.jsx(vS,{"data-loc":"client/src/components/Scope3HotelSection.tsx:343",className:"h-4 w-4"}),"Live Calculation Preview"]})}),e.jsxs(Me,{"data-loc":"client/src/components/Scope3HotelSection.tsx:347",className:"px-4 pb-4 space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/components/Scope3HotelSection.tsx:348",className:"grid grid-cols-3 gap-3",children:[e.jsxs("div",{"data-loc":"client/src/components/Scope3HotelSection.tsx:349",className:"text-center p-3 bg-white rounded-lg border border-gray-100",children:[e.jsx("div",{"data-loc":"client/src/components/Scope3HotelSection.tsx:350",className:"text-lg font-bold text-[#1a3c2e]",children:M.cat1TonnesCo2e.toFixed(2)}),e.jsx("div",{"data-loc":"client/src/components/Scope3HotelSection.tsx:353",className:"text-xs text-gray-500",children:"tCO2e"}),e.jsx("div",{"data-loc":"client/src/components/Scope3HotelSection.tsx:354",className:"text-xs font-medium text-gray-600 mt-0.5",children:"Category 1"}),e.jsx("div",{"data-loc":"client/src/components/Scope3HotelSection.tsx:355",className:"text-xs text-gray-400",children:"Purchased Goods"})]}),e.jsxs("div",{"data-loc":"client/src/components/Scope3HotelSection.tsx:357",className:"text-center p-3 bg-white rounded-lg border border-gray-100",children:[e.jsx("div",{"data-loc":"client/src/components/Scope3HotelSection.tsx:358",className:"text-lg font-bold text-[#1a3c2e]",children:M.cat4TonnesCo2e.toFixed(2)}),e.jsx("div",{"data-loc":"client/src/components/Scope3HotelSection.tsx:361",className:"text-xs text-gray-500",children:"tCO2e"}),e.jsx("div",{"data-loc":"client/src/components/Scope3HotelSection.tsx:362",className:"text-xs font-medium text-gray-600 mt-0.5",children:"Category 4"}),e.jsx("div",{"data-loc":"client/src/components/Scope3HotelSection.tsx:363",className:"text-xs text-gray-400",children:"Transport"})]}),e.jsxs("div",{"data-loc":"client/src/components/Scope3HotelSection.tsx:365",className:"text-center p-3 bg-[#1a3c2e] rounded-lg",children:[e.jsx("div",{"data-loc":"client/src/components/Scope3HotelSection.tsx:366",className:"text-lg font-bold text-white",children:M.totalTonnesCo2e.toFixed(2)}),e.jsx("div",{"data-loc":"client/src/components/Scope3HotelSection.tsx:369",className:"text-xs text-white/70",children:"tCO2e"}),e.jsx("div",{"data-loc":"client/src/components/Scope3HotelSection.tsx:370",className:"text-xs font-medium text-white mt-0.5",children:"Total Scope 3"}),e.jsx("div",{"data-loc":"client/src/components/Scope3HotelSection.tsx:371",className:"text-xs text-white/60",children:"to this hotel"})]})]}),M.dataQualityInfo&&e.jsxs("div",{"data-loc":"client/src/components/Scope3HotelSection.tsx:375",className:`flex items-center gap-2 px-3 py-2 rounded-lg border text-xs ${jP[M.dataQualityTier]??"bg-gray-50 text-gray-600 border-gray-200"}`,children:[e.jsx(Xi,{"data-loc":"client/src/components/Scope3HotelSection.tsx:376",className:"h-3.5 w-3.5 shrink-0"}),e.jsxs("span",{"data-loc":"client/src/components/Scope3HotelSection.tsx:377",className:"font-medium",children:[M.dataQualityInfo.label,":"]}
574),e.jsx("span",{"data-loc":"client/src/components/Scope3HotelSection.tsx:378",children:M.dataQualityInfo.description})]})]})]}),X.map(Q=>{const R=le.filter(V=>V.section===Q);if(R.length===0)return null;const P=Z[Q],B=h[Q];return e.jsxs("div",{"data-loc":"client/src/components/Scope3HotelSection.tsx:393",className:"border border-gray-200 rounded-xl overflow-hidden",children:[e.jsxs("button",{"data-loc":"client/src/components/Scope3HotelSection.tsx:394",type:"button",className:"w-full flex items-center justify-between px-4 py-3 bg-gray-50 hover:bg-gray-100 transition-colors",onClick:()=>ne(Q),children:[e.jsxs("div",{"data-loc":"client/src/components/Scope3HotelSection.tsx:399",className:"flex items-center gap-3",children:[e.jsx("div",{"data-loc":"client/src/components/Scope3HotelSection.tsx:400",className:"p-1.5 bg-[#1a3c2e]/10 rounded-lg text-[#1a3c2e]",children:SP[Q]}),e.jsxs("div",{"data-loc":"client/src/components/Scope3HotelSection.tsx:403",className:"text-left",children:[e.jsxs("div",{"data-loc":"client/src/components/Scope3HotelSection.tsx:404",className:"text-sm font-semibold text-gray-900",children:["Section ",Q,": ",P?.title??""]}),e.jsxs("div",{"data-loc":"client/src/components/Scope3HotelSection.tsx:407",className:"text-xs text-gray-500",children:[R.length," questions"]})]})]}),B?e.jsx(Ps,{"data-loc":"client/src/components/Scope3HotelSection.tsx:411",className:"h-4 w-4 text-gray-400"}):e.jsx(qe,{"data-loc":"client/src/components/Scope3HotelSection.tsx:413",className:"h-4 w-4 text-gray-400"})]}),B&&e.jsxs("div",{"data-loc":"client/src/components/Scope3HotelSection.tsx:418",className:"px-4 py-4 space-y-5",children:[P?.description&&e.jsx("p",{"data-loc":"client/src/components/Scope3HotelSection.tsx:420",className:"text-xs text-gray-500 bg-blue-50 border border-blue-100 rounded-lg px-3 py-2 leading-relaxed",children:P.description}),R.map(V=>q(V))]})]},Q)}),e.jsxs("div",{"data-loc":"client/src/components/Scope3HotelSection.tsx:432",className:"flex items-start gap-2 text-xs text-gray-500 bg-gray-50 border border-gray-200 rounded-lg px-3 py-2",children:[e.jsx(tt,{"data-loc":"client/src/components/Scope3HotelSection.tsx:433",className:"h-3.5 w-3.5 shrink-0 mt-0.5 text-gray-400"}),e.jsxs("span",{"data-loc":"client/src/components/Scope3HotelSection.tsx:434",children:["Calculations follow the"," ",e.jsx("span",{"data-loc":"client/src/components/Scope3HotelSection.tsx:436",className:"font-medium",children:"GHG Protocol Corporate Value Chain (Scope 3) Standard"}),". Category 1 uses DEFRA 2023 average-data emission factors unless a verified PCF/EPD is provided. Category 4 uses DEFRA 2023 freight transport factors. All results are in tonnes CO2 equivalent (tCO2e)."]})]}),!u&&e.jsxs("div",{"data-loc":"client/src/components/Scope3HotelSection.tsx:444",className:"flex gap-3 pt-2",children:[e.jsx(ie,{"data-loc":"client/src/components/Scope3HotelSection.tsx:445",variant:"outline",onClick:()=>K(!1),disabled:g,className:"flex-1",children:g?"Saving...":"Save Progress"}),e.jsx(ie,{"data-loc":"client/src/components/Scope3HotelSection.tsx:453",onClick:()=>K(!0),disabled:g||!p.productCategory,className:"flex-1 bg-[#1a3c2e] hover:bg-[#1a3c2e]/90 text-white",children:N?e.jsxs(e.Fragment,{children:[e.jsx(Te,{"data-loc":"client/src/components/Scope3HotelSection.tsx:460",className:"h-4 w-4 mr-2"}),"Update & Complete"]}):"Save & Complete Section"})]})]})}const Q1=[{value:"2",label:"Compliant",description:"Fully meets the requirement with documented evidence",colorClass:"text-emerald-700",bgClass:"bg-emerald-50",borderClass:"border-emerald-500",icon:e.jsx(Te,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:29",className:"w-5 h-5 text-emerald-600"})}
574,{value:"1",label:"Partial",description:"Partially meets the requirement, some evidence exists but gaps remain",colorClass:"text-amber-700",bgClass:"bg-amber-50",borderClass:"border-amber-500",icon:e.jsx(tt,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:30",className:"w-5 h-5 text-amber-600"})},{value:"0",label:"Non-Compliant",description:"Does not meet the requirement, no evidence or significant gaps",colorClass:"text-red-700",bgClass:"bg-red-50",borderClass:"border-red-500",icon:e.jsx(Zt,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:31",className:"w-5 h-5 text-red-600"})},{value:"na",label:"Not Applicable",description:"This criterion does not apply to your business operations",colorClass:"text-slate-600",bgClass:"bg-slate-50",borderClass:"border-slate-400",icon:e.jsx(Go,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:32",className:"w-5 h-5 text-slate-500"})}],jo={environment:{label:"Environment",color:"text-emerald-700",bg:"bg-emerald-100"},labor:{label:"Labor & Human Rights",color:"text-blue-700",bg:"bg-blue-100"},ethics:{label:"Ethics & Governance",color:"text-purple-700",bg:"bg-purple-100"},procurement:{label:"Sustainable Procurement",color:"text-amber-700",bg:"bg-amber-100"}};function i4({token:t,tokenAssessmentId:n,supplierName:r,onBack:o}={}){const{id:i}=ea(),[,d]=ds(),u=t?n??0:parseInt(i||"0",10),p=!!t,[x,h]=b.useState("environment"),[v,g]=b.useState(0),[y,N]=b.useState(!0),[j,w]=b.useState(null),[A,C]=b.useState(""),[E,T]=b.useState(""),[D,M]=b.useState(!1),[z,O]=b.useState(!1),[H,K]=b.useState(null),[ne,le]=b.useState(!1),[Z,X]=b.useState(!1),[q,Q]=b.useState(!1),[R,P]=b.useState(""),[B,V]=b.useState(""),[re,_]=b.useState(null),[L,I]=b.useState(!1),G=cg();b.useRef(null);const[J,me]=b.useState(null),[W,he]=b.useState("assessment"),{data:ve=[],isLoading:He}=ue.supplier.getCriteria.useQuery({theme:void 0},{staleTime:6e4,enabled:!p}),{data:ze=[],isLoading:Be}=ue.supplierToken.getCriteria.useQuery({theme:void 0},{staleTime:6e4,enabled:p&&!!t}),dt=p?ze:ve,Ne=p?Be:He,{data:As=[]}=ue.supplier.getMyAssessments.useQuery(void 0,{enabled:u>0&&!p}),{data:vs}=ue.supplierToken.getAssessmentStatus.useQuery({token:t??"",assessmentId:u},{enabled:p&&!!t&&u>0,refetchInterval:U=>{const be=U.state.data?.state;return be==="submitted"||be==="audit_running"?5e3:!1}}),ot=p?vs:As.find(U=>U.id===u),fe=!ot||ot.state==="draft",{data:$e=[],refetch:St}=ue.supplier.getResponses.useQuery({assessmentId:u},{enabled:u>0&&!p,staleTime:0,refetchOnMount:!0}),{data:ta=[],refetch:$t}=ue.supplierToken.getResponses.useQuery({token:t??"",assessmentId:u},{enabled:p&&!!t&&u>0,staleTime:0,refetchOnMount:!0}),ys=p?ta:$e,{data:Gt=[],refetch:Ia}=ue.supplier.getEvidenceItems.useQuery({assessmentId:u},{enabled:u>0&&!p,staleTime:0,refetchOnMount:!0}),{data:sa=[],refetch:Fs}=ue.supplierToken.getEvidenceItems.useQuery({token:t??"",assessmentId:u},{enabled:p&&!!t&&u>0,staleTime:0,refetchOnMount:!0}),Hs=p?sa:Gt,aa=ue.supplier.saveResponse.useMutation({onSuccess:(U,be)=>{K(be.criterionId),setTimeout(()=>K(null),2500),M(!1),St()},onError:U=>xe.error("Save failed: "+U.message)}),Ds=ue.supplierToken.saveResponse.useMutation({onSuccess:(U,be)=>{K(be.criterionId),setTimeout(()=>K(null),2500),M(!1),$t()},onError:U=>xe.error("Save failed: "+U.message)}),Zn=p?Ds:aa,Ts=ue.supplier.getUploadUrl.useMutation(),va=ue.supplierToken.getUploadUrl.useMutation(),us=ue.supplier.saveEvidenceItem.useMutation({onSuccess:()=>Ia()}),Ls=ue.supplierToken.saveEvidenceItem.useMutation({onSuccess:()=>Fs()}),Wt=ue.supplier.deleteEvidenceItem.useMutation({onSuccess:()=>Ia()}),Wn=ue.supplierToken.deleteEvidenceItem.useMutation({onSuccess:()=>Fs()}),Ba=ue.supplier.triggerAiAudit.useMutation({onSuccess:(U,be)=>{xe.success("Evidence review started â results will appear in about 1 minute."),d(`/supplier/report/${be.assessmentId}`)},onError:U=>{xe.error("Evidence review failed: "+U.message),d("/supplier/dashboard")}}),ke=ue.supplierToken.triggerAiAudit.useMutation({onSuccess:()=>{xe.success("Evidence review started â your score will appear here in about 1 minute.")},onError:U=>{xe.error("Evidence review failed: "+U.message)}}),Xe=p?ke:Ba,st=ue.supplier.submitAssessment.useMutation({onSuccess:()=>{xe.success("Assessment submitted â running evidence review now..."),Ba.mutate({assessmentId:u})},onError:U=>xe.error(U.message)}),Ve=ue.supplierToken.submitAssessment.useMutation({onSuccess:()=>{xe.success("Assessment submitted â running evidence review now..."),ke.mutate({token:t??"",assessmentId:u})},onError:U=>xe.error(U.message)}),Ae=(p?Ve:st).isPending||Xe.isPending,Fe=ue.supplier.resetToDraft.useMutation({onSuccess:()=>{xe.success("Assessment reopened. You can now edit your responses."),p||ue.useUtils().supplier.getMyAssessments.invalidate()},onError:U=>xe.error(U.message)}),yt=ue.supplierToken.resetToDraft.useMutation({onSuccess:()=>{xe.success("Assessment reopened. You can now edit your responses."),ue.useUtils().supplierToken.getAssessmentStatus.invalidate()},onError:U=>xe.error(U.message)}),gt=Fe.isPending||yt.isPending,ws=()=>{p?yt.mutate({token:t??"",assessmentId:u}):Fe.mutate({assessmentId:u})},at=ue.supplierToken.createShareLink.useMutation({onSuccess:U=>{_(U.shareUrl),U.emailSent?xe.success(`Report shared! Email sent to ${B}. Link valid for 30 days.`):B.trim()?(xe.success("Share link created (30 days)."),xe.warning(`Email to ${B} could not be confirmed. Copy the link and send it manually.`)):xe.success("Share link created! Valid for 30 days.")},onError:U=>xe.error(U.message??"Could not create share link.")}),Ct=()=>{!t||!u||at.mutate({token:t,assessmentId:u,hotelEmail:B.trim()||void 0})},Us=()=>{re&&navigator.clipboard.writeText(re).then(()=>{I(!0),xe.success("Hotel share link copied!"),setTimeout(()=>I(!1),3e3)}).catch(()=>xe.error("Could not copy."))},it=["environment","labor","ethics","procurement"],pt=dt.filter(U=>U.theme===x),je=pt[v],ps=new Map(ys.map(U=>[U.criterionId,U])),nn=new Map;for(const U of Hs)nn.has(U.criterionId)||nn.set(U.criterionId,[]),nn.get(U.criterionId).push(U);const _l=it.map(U=>{const be=dt.filter(Ze=>Ze.theme===U),bt=be.filter(Ze=>{const We=ps.get(Ze.id);return We&&We.selfScore!==null&&We.selfScore!==void 0}).length;return{theme:U,total:be.length,answered:bt}}),$s=_l.reduce((U,be)=>U+be.answered,0),Ht=dt.length,ss=Ht>0?Math.round($s/Ht*100):0,na=dt.filter(U=>{const be=ps.get(U.id);if(!be||String(be.selfScore)!=="2")return!1;const bt=be.selfNotes&&be.selfNotes.trim().length>0,Ze=(nn.get(U.id)?.length??0)>0;return!bt&&!Ze}),ra=ss===100&&na.length===0;b.useEffect(()=>{if(!je)return;const U=ps.get(je.id),be=U?.selfScore;w(be??null),C(U?.selfNotes??""),T(U?.naJustification??""),M(!1)},[je?.id,ys.length]);const Ic=U=>{w(U),M(!0)},Ml=b.useCallback(async()=>
574{if(je){if(j===null){xe.error("Please select a compliance level before saving.");return}O(!0);try{p?await Ds.mutateAsync({token:t??"",assessmentId:u,criterionId:je.id,selfScore:j,selfNotes:A||void 0,isNaRequested:j==="na",naJustification:j==="na"&&E||void 0}):await aa.mutateAsync({assessmentId:u,criterionId:je.id,selfScore:j,selfNotes:A||void 0,isNaRequested:j==="na",naJustification:j==="na"&&E||void 0}),xe.success("Response saved")}finally{O(!1)}}},[je,j,A,E,u,Zn,p,t,Ds,aa]),Pl=async()=>{if(await Ml(),v<pt.length-1)g(U=>U+1);else{const U=it.indexOf(x)+1;U<it.length&&(h(it[U]),g(0))}},Jn=async U=>{if(je){le(!0);try{let be,bt;if(p){const Ss=await va.mutateAsync({token:t??"",assessmentId:u,criterionId:je.id,fileName:U.name,mimeType:U.type});be=Ss.uploadPath,bt=Ss.key}else{const Ss=await Ts.mutateAsync({assessmentId:u,criterionId:je.id,fileName:U.name,mimeType:U.type});be=Ss.uploadPath,bt=Ss.key}const Ze=await fetch(be,{method:"POST",body:U,headers:{"Content-Type":U.type||"application/octet-stream"}});if(!Ze.ok)throw new Error("Upload failed");const{url:We}=await Ze.json().catch(()=>({url:`/api/storage/file/${encodeURIComponent(bt)}`}));p?await Ls.mutateAsync({token:t??"",assessmentId:u,criterionId:je.id,fileName:U.name,fileKey:bt,fileUrl:We,mimeType:U.type,fileSizeBytes:U.size}):await us.mutateAsync({assessmentId:u,criterionId:je.id,fileName:U.name,fileKey:bt,fileUrl:We,mimeType:U.type,fileSizeBytes:U.size}),xe.success(`${U.name} uploaded`)}catch(be){xe.error("Upload failed: "+(be instanceof Error?be.message:"Unknown error"))}finally{le(!1)}}},Hl=b.useCallback(()=>{for(const U of it){const bt=dt.filter(Ze=>Ze.theme===U).findIndex(Ze=>{const We=ps.get(Ze.id);return!We||We.selfScore===null||We.selfScore===void 0});if(bt!==-1){h(U),g(bt),G&&X(!0);return}}xe.success("All criteria answered!")},[ve,ps,it,G]);if(b.useEffect(()=>{const U=be=>{const bt=be.target.tagName;if(!(bt==="TEXTAREA"||bt==="INPUT")){if(be.key==="ArrowRight"||be.key==="ArrowDown")if(be.preventDefault(),v<pt.length-1)g(Ze=>Ze+1);else{const Ze=it.indexOf(x)+1;Ze<it.length&&(h(it[Ze]),g(0))}else if(be.key==="ArrowLeft"||be.key==="ArrowUp")if(be.preventDefault(),v>0)g(Ze=>Ze-1);else{const Ze=it.indexOf(x)-1;if(Ze>=0){const We=ve.filter(Ss=>Ss.theme===it[Ze]);h(it[Ze]),g(We.length-1)}}}};return window.addEventListener("keydown",U),()=>window.removeEventListener("keydown",U)},[x,v,pt.length,it,ve]),Ne)return e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:414",className:"min-h-screen flex items-center justify-center",style:{background:"var(--color-bg-primary)"},children:e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:415",className:"text-center",children:[e.jsx(It,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:416",className:"w-10 h-10 animate-spin mx-auto mb-4",style:{color:"var(--color-pine)"}}),e.jsx("p",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:417",style:{color:"var(--color-text-secondary)"},children:"Loading assessment criteria..."})]})});if(dt.length===0)return e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:425",className:"min-h-screen flex items-center justify-center",style:{background:"var(--color-bg-primary)"},children:e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:426",className:"text-center max-w-md p-8",children:[e.jsx(tt,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:427",className:"w-12 h-12 mx-auto mb-4 text-amber-500"}),e.jsx("h2",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:428",className:"text-xl font-semibold mb-2",style:{color:"var(--color-text-primary)"},children:"Criteria Not Available"}),e.jsx("p",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:429",className:"mb-4",style:{color:"var(--color-text-secondary)"},children:"The assessment criteria library is empty. Please contact your administrator."}),e.jsx(ie,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:430",onClick:()=>p&&o?o():d("/supplier/dashboard"),children:"Back to Dashboard"})]})});const ya=je?nn.get(je.id)??[]:[],Va=je&&H===je.id,qr=U=>{g(U),G&&X(!0),Q(!1)};return e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:447",className:"min-h-screen",style:{background:"var(--color-bg-primary)"},children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:449",className:"sticky top-0 z-30 border-b",style:{background:"var(--color-pine)",borderColor:"rgba(255,255,255,0.1)"},children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:450",className:"max-w-7xl mx-auto px-3 py-2 flex items-center gap-2",children:[e.jsx("img",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:452",src:"/manus-storage/envora-logo_f789bcb1.webp",alt:"Envora Consulting",className:"h-7 w-auto flex-shrink-0"}),e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:457",className:"w-px h-5 flex-shrink-0",style:{background:"rgba(255,255,255,0.2)"}}),e.jsxs("button",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:459",onClick:()=>
574p&&o?o():d("/supplier/dashboard"),className:"flex items-center gap-1.5 text-sm font-medium transition-opacity hover:opacity-80 flex-shrink-0 px-2 py-1 rounded-lg hover:bg-white/10",style:{color:"rgba(255,255,255,0.85)"},children:[e.jsx(cc,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:462",className:"w-4 h-4"}),e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:463",className:"hidden sm:inline",children:p?"Welcome":"Dashboard"})]}),e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:465",style:{color:"rgba(255,255,255,0.25)"},children:"/"}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:467",className:"flex items-center gap-1.5 flex-1 min-w-0",children:[e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:468",className:"text-white/60 text-xs hidden md:inline truncate",children:jo[x]?.label}),je&&e.jsxs(e.Fragment,{children:[e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:473",className:"text-white/30 hidden md:inline",children:"/"}),e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:474",className:"text-white text-xs font-mono hidden md:inline",children:je.code}),e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:475",className:"text-white text-xs font-semibold truncate hidden lg:inline ml-1",children:je.title})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:480",className:"flex items-center gap-2 flex-shrink-0",children:[fe&&$s<Ht&&e.jsxs("button",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:483",onClick:Hl,className:"hidden sm:flex items-center gap-1.5 text-xs font-medium px-2.5 py-1.5 rounded-lg transition-colors hover:bg-white/15",style:{color:"rgba(255,255,255,0.85)",border:"1px solid rgba(255,255,255,0.2)"},title:"Jump to first unanswered question",children:[e.jsx(a1,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:487",className:"w-3.5 h-3.5"}),e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:488",children:"Next Unanswered"})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:492",className:"flex items-center gap-2",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:493",className:"w-16 sm:w-28 h-1.5 rounded-full bg-white/20 overflow-hidden",children:e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:494",className:"h-full rounded-full transition-all duration-500",style:{width:`${ss}%`,background:"var(--color-gold)"}})}),e.jsxs("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:497",className:"text-white text-xs font-semibold",children:[ss,"%"]})]}),e.jsxs("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:499",className:"text-white/50 text-xs hidden sm:inline",children:[$s,"/",Ht]}),e.jsxs("button",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:501",onClick:()=>Q(!0),className:"flex items-center gap-1.5 text-xs font-medium px-2.5 py-1.5 rounded-lg transition-colors hover:bg-white/15",style:{color:"rgba(255,255,255,0.85)",border:"1px solid rgba(255,255,255,0.2)"},title:"Open question navigator",children:[e.jsx(W6,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:505",className:"w-3.5 h-3.5"}),e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:506",className:"hidden sm:inline",children:"Navigator"})]})]})]}),!G&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:512",className:"max-w-7xl mx-auto px-3 pb-1 flex items-center gap-3",children:[e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:513",className:"text-white/35 text-xs",children:"Tip: use"}),e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:514",className:"text-white/50 text-xs font-mono bg-white/10 px-1.5 py-0.5 rounded",children:"â â"}),e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:515",className:"text-white/35 text-xs",children:"to navigate questions"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:520",className:"max-w-7xl mx-auto px-4 py-6 flex gap-6",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:522",className:G?"w-full":"w-72 flex-shrink-0",children:e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:523",className:"sticky top-20 space-y-3",children:[it.map(U=>{const be=_l.find(_t=>_t.theme===U),bt=jo[U],Ze=dt.filter(_t=>_t.theme===U),We=x===U&&W==="assessment",Ss=be.total>0?Math.round(be.answered/be.total*100):0;return e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:531",className:"rounded-xl border overflow-hidden",style:{borderColor:We?"var(--color-pine)":"var(--color-border)",background:"var(--color-bg-card)"},children:[e.jsxs("button",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:533",className:"w-full px-4 py-3 flex items-center justify-between text-left transition-colors",style:{background:We?"var(--color-pine)":"transparent"},onClick:()=>{he("assessment"),h(U),g(0),X(!1)},children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:536",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:537",className:"text-sm font-semibold",style:{color:We?"white":"var(--color-text-primary)"},children:bt.label}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:538",className:"text-xs mt-0.5",style:{color:We?"rgba(255,255,255,0.7)":"var(--color-text-secondary)"},children:[be.answered,"/",be.total," answered"]})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:542",className:"w-10 h-10 rounded-full flex items-center justify-center text-xs font-bold",style:{background:We?"rgba(255,255,255,0.15)":bt.bg,color:We?"white":bt.color},children:[Ss,"%"]})]}),We&&e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:548",className:"max-h-72 overflow-y-auto divide-y",style:{borderColor:"var(--color-border)"},children:Ze.map((_t,jn)=>{const er=ps.get(_t.id),wa=er?.selfScore,tr=wa!=null,Qr=jn===v,Fa=String(wa)==="2"&&(nn.get(_t.id)?.length??0)===0&&!(er?.selfNotes&&er.selfNotes.trim().length>0);return e.jsxs("button",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:557",className:"w-full px-3 py-2.5 flex items-center gap-2.5 text-left text-xs transition-colors hover:bg-slate-50",style:{background:Qr?"rgba(15,74,55,0.06)":"transparent"},onClick:()=>qr(jn),children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:561",className:"flex-shrink-0 relative",children:[tr?wa==="2"?e.jsx(Te,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:563",className:"w-5 h-5 text-emerald-500"}):wa==="1"?e.jsx(tt,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:564",className:"w-5 h-5 text-amber-500"}):wa==="0"?e.jsx(Zt,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:565",className:"w-5 h-5 text-red-500"}):e.jsx(Go,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:566",className:"w-5 h-5 text-slate-400"}):e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:562",className:"w-5 h-5 rounded-full border-2 border-dashed",style:{borderColor:"var(--color-border)"}}
574),Fa&&fe&&e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:568",className:"absolute -top-0.5 -right-0.5 w-2.5 h-2.5 rounded-full bg-amber-400 border border-white",title:"Needs evidence"})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:571",className:"flex-1 min-w-0",children:[e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:572",className:"font-mono text-xs",style:{color:"var(--color-text-secondary)"},children:_t.code}),e.jsx("p",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:573",className:"truncate font-medium",style:{color:Qr?"var(--color-pine)":"var(--color-text-primary)"},children:_t.title})]})]},_t.id)})})]},U)}),p&&e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:587",className:"rounded-xl border overflow-hidden",style:{borderColor:W==="scope3"?"#0ea5e9":"var(--color-border)",background:"var(--color-bg-card)"},children:e.jsxs("button",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:589",className:"w-full px-4 py-3 flex items-center justify-between text-left transition-colors",style:{background:W==="scope3"?"#0ea5e9":"transparent"},onClick:()=>he("scope3"),children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:592",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:593",className:"text-sm font-semibold",style:{color:W==="scope3"?"white":"var(--color-text-primary)"},children:"Scope 3 Supply Data"}),e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:596",className:"text-xs mt-0.5",style:{color:W==="scope3"?"rgba(255,255,255,0.7)":"var(--color-text-secondary)"},children:J!==null?`${J.toFixed(2)} tCOâe/yr â complete`:"Optional â fill in after assessment"})]}),e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:600",className:"w-10 h-10 rounded-full flex items-center justify-center text-xs font-bold",style:{background:W==="scope3"?"rgba(255,255,255,0.15)":J!==null?"#e0f2fe":"#f1f5f9",color:W==="scope3"?"white":J!==null?"#0369a1":"#64748b"},children:J!==null?"â":"S3"})]})})]})}),W==="scope3"&&!G?e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:612",className:"flex-1 min-w-0",children:e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:613",className:"rounded-2xl border-2 overflow-hidden",style:{borderColor:"#0ea5e9",background:"var(--color-bg-card)"},children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:614",className:"px-5 py-3 flex items-center gap-2",style:{background:"#0ea5e9"},children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:615",className:"w-7 h-7 rounded-full bg-white/20 flex items-center justify-center",children:e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:616",className:"text-white text-sm font-bold",children:"S3"})}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:618",children:[e.jsx("p",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:619",className:"font-semibold text-sm text-white",children:"Scope 3 Supply Chain Data"}),e.jsx("p",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:620",className:"text-xs text-white/80",children:"Help your hotel measure their supply chain emissions â takes about 2 minutes"})]}),J!==null&&e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:623",className:"ml-auto bg-white/20 rounded-full px-3 py-1",children:e.jsxs("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:624",className:"text-white text-xs font-semibold",children:[J.toFixed(2)," tCOâe/yr"]})})]}),e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:628",className:"p-4",children:e.jsx(NP,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:629",assessmentId:u,token:t,onComplete:U=>me(U)})})]})}):je&&!G?e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:638",className:"flex-1 min-w-0 space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:640",className:"rounded-2xl p-6 border",style:{background:"var(--color-bg-card)",borderColor:"var(--color-border)"},children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:641",className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:642",className:"flex-1",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:643",className:"flex items-center gap-2 mb-2 flex-wrap",children:[e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:644",className:"font-mono text-sm font-bold px-2 py-0.5 rounded",style:{background:"var(--color-pine)",color:"white"},children:je.code}),e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:647",className:`text-xs px-2 py-0.5 rounded-full font-medium ${jo[je.theme]?.bg} ${jo[je.theme]?.color}`,children:jo[je.theme]?.label}),Va&&e.jsxs("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:651",className:"text-xs px-2 py-0.5 rounded-full bg-emerald-100 text-emerald-700 font-medium flex items-center gap-1",children:[e.jsx(Cr,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:652",className:"w-3 h-3"})," Saved"]})]}),e.jsx("h2",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:656",className:"text-xl font-bold mb-2",style:{color:"var(--color-text-primary)",fontFamily:"var(--font-display)"},children:je.title}),e.jsx("p",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:659",className:"text-sm leading-relaxed",style:{color:"var(--color-text-secondary)"},children:je.description})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:663",className:"text-right flex-shrink-0",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:664",className:"text-xs mb-1",style:{color:"var(--color-text-secondary)"},children:[v+1," of ",pt.length]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:667",className:"flex gap-1",children:[e.jsx(ie,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:668",variant:"outline",size:"sm",onClick:()=>g(U=>Math.max(0,U-1)),disabled:v===0,children:e.jsx(hn,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:669",className:"w-4 h-4"})}),e.jsx(ie,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:671",variant:"outline",size:"sm",onClick:()=>g(U=>Math.min(pt.length-1,U+1)),disabled:v===pt.length-1,children:e.jsx(qe,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:672",className:"w-4 h-4"})})]})]})]}
574),Array.isArray(je.gstcClauses)&&je.gstcClauses.length>0&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:678",className:"mt-3 flex flex-wrap gap-1.5",children:[je.gstcClauses.map(U=>e.jsxs("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:680",className:"text-xs px-2 py-0.5 rounded border font-mono",style:{borderColor:"var(--color-cyan)",color:"var(--color-cyan)",background:"rgba(51,183,225,0.08)"},children:["GSTC ",U]},U)),Array.isArray(je.iso14001Clauses)&&je.iso14001Clauses.map(U=>e.jsxs("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:686",className:"text-xs px-2 py-0.5 rounded border font-mono",style:{borderColor:"var(--color-green)",color:"var(--color-green)",background:"rgba(46,158,107,0.08)"},children:["ISO 14001 ",U]},U))]})]}),e.jsxs(z1,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:696",defaultValue:"assessment",className:"w-full",children:[e.jsxs(I1,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:697",className:"w-full mb-4",children:[e.jsxs(du,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:698",value:"assessment",className:"flex-1 gap-1.5",children:[e.jsx(Xx,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:699",className:"w-4 h-4"}),"Assessment"]}),e.jsxs(du,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:702",value:"document-builder",className:"flex-1 gap-1.5",children:[e.jsx(e1,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:703",className:"w-4 h-4"}),"Document Builder"]})]}),e.jsxs(uu,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:709",value:"assessment",className:"space-y-4 mt-0",children:[!fe&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:712",className:"rounded-xl border px-4 py-3 flex items-center gap-3",style:{background:"var(--color-pine-muted, #f0f7f4)",borderColor:"var(--color-pine)"},children:[e.jsx(Xi,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:713",className:"w-4 h-4 flex-shrink-0",style:{color:"var(--color-pine)"}}),e.jsxs("p",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:714",className:"text-sm",style:{color:"var(--color-pine)"},children:["This assessment has been submitted and is ",e.jsx("strong",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:715",children:"read-only"}),". Responses can no longer be edited."]})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:720",className:"rounded-2xl border overflow-hidden",style:{background:"var(--color-bg-card)",borderColor:"var(--color-border)"},children:[e.jsxs("button",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:721",className:"w-full px-5 py-3 flex items-center justify-between text-left",style:{borderBottom:y?"1px solid var(--color-border)":"none"},onClick:()=>N(U=>!U),children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:724",className:"flex items-center gap-2 font-semibold text-sm",style:{color:"var(--color-text-primary)"},children:[e.jsx(Xx,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:725",className:"w-4 h-4",style:{color:"var(--color-cyan)"}}),"Assessment Guidance"]}),e.jsx(Xi,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:728",className:"w-4 h-4",style:{color:"var(--color-text-secondary)"}})]}),y&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:731",className:"px-5 py-4 space-y-4",children:[je.guidance?e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:733",className:"flex gap-3",children:[e.jsx(t1,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:734",className:"w-4 h-4 flex-shrink-0 mt-0.5",style:{color:"var(--color-gold)"}}),e.jsx("p",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:735",className:"text-sm leading-relaxed",style:{color:"var(--color-text-primary)"},children:je.guidance})]}):e.jsx("p",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:740",className:"text-sm",style:{color:"var(--color-text-secondary)"},children:"No guidance available for this criterion."}),Array.isArray(je.evidenceExamples)&&je.evidenceExamples.length>0&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:743",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:744",className:"flex items-center gap-2 mb-2 text-xs font-semibold uppercase tracking-wide",style:{color:"var(--color-text-secondary)"},children:[e.jsx(Dt,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:745",className:"w-3.5 h-3.5"})," Acceptable Evidence Examples"]}),e.jsx("ul",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:747",className:"space-y-1.5",children:je.evidenceExamples.map((U,be)=>e.jsxs("li",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:749",className:"flex items-start gap-2 text-sm",style:{color:"var(--color-text-primary)"},children:[e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:750",className:"w-1.5 h-1.5 rounded-full flex-shrink-0 mt-1.5",style:{background:"var(--color-pine)"}}),U]},be))})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:762",className:"rounded-2xl border p-5",style:{background:"var(--color-bg-card)",borderColor:"var(--color-border)"},children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:763",className:"text-sm font-semibold mb-3 flex items-center gap-2",style:{color:"var(--color-text-primary)"},children:[e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:764",children:"Compliance Level"}),fe&&e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:765",className:"text-red-500",children:"*"}),fe&&e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:766",className:"text-xs font-normal ml-1",style:{color:"var(--color-text-secondary)"},children:"Select one option and save"})]}),e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:768",className:"grid grid-cols-2 gap-3",children:Q1.map(U=>{const be=j===U.value;return e.jsxs("button",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:772",onClick:()=>fe&&Ic(U.value),disabled:!fe,className:`relative flex items-start gap-3 p-4 rounded-xl border-2 text-left transition-all duration-150 hover:shadow-md active:scale-[0.98] ${be?`${U.bgClass} ${U.borderClass}`:"bg-white border-slate-200 hover:border-slate-300"}`,children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:774",className:"flex-shrink-0 mt-0.5",children:U.icon}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:775",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:776",className:`font-semibold text-sm ${be?U.colorClass:"text-slate-700"}`,children:U.label}),e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:777",className:"text-xs mt-0.5 text-slate-500 leading-tight",children:U.description})]}),be&&e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:780",className:"absolute top-2 right-2",children:e.jsx(Cr,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:781",className:"w-4 h-4 text-emerald-600"})})]},U.value)})}),j==="na"&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:789",className:"mt-4 p-4 rounded-xl bg-slate-50 border border-slate-200",children:[e.jsxs("label",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:790",className:"block text-xs font-semibold mb-2 text-slate-600",children:["Justification for Not Applicable ",e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:791",className:"text-red-500",children:"*"})]}),e.jsx(Qa,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:793",value:E,onChange:U=>{T(U.target.value),M(!0)},placeholder:"Explain why this criterion does not apply to your business...",rows:3,className:"text-sm"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:802",className:"rounded-2xl border p-5",style:{background:"var(--color-bg-card)",borderColor:"var(--color-border)"},children:[e.jsxs("label",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:803",className:"block text-sm font-semibold mb-2",style:{color:"var(--color-text-primary)"},children:["Assessment Notes",e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:805",className:"ml-2 text-xs font-normal",style:{color:"var(--color-text-secondary)"},children:"Describe your current practices, certifications held, or planned improvements"})]}),e.jsx(Qa,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:809",value:A,onChange:U=>{fe&&(C(U.target.value),M(!0))},readOnly:!fe,placeholder:"Describe your current practices, any certifications held, or actions taken to meet this requirement...",rows:4,className:`text-sm ${fe?"":"opacity-70 cursor-default"}`})]}),fe&&je&&String(j)==="2"&&ya.length===0&&!(A&&A.trim().length>0)&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:818",className:"flex items-start gap-2.5 rounded-xl border border-amber-300 bg-amber-50 px-4 py-3",children:[e.jsx(tt,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:819",className:"w-4 h-4 text-amber-600 flex-shrink-0 mt-0.5"}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:820",children:[e.jsx("p",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:821",className:"text-sm font-semibold text-amber-800",children:"Evidence required for Compliant"}),e.jsx("p",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:822",className:"text-xs text-amber-700 mt-0.5",children:"Criteria marked Compliant must include assessment notes or at least one uploaded document. This is required before submission."})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:828",className:"rounded-2xl border p-5",style:{background:"var(--color-bg-card)",borderColor:"var(--color-border)"},children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:829",className:"flex items-center justify-between mb-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:830",className:"text-sm font-semibold",style:{color:"var(--color-text-primary)"},children:["Supporting Evidence",e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:832",className:"ml-2 text-xs font-normal",style:{color:"var(--color-text-secondary)"},children:"Upload certificates, policies, reports, or other documents"})]}),fe&&e.jsxs("label",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:837",className:"cursor-pointer",children:[e.jsx("input",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:838",type:"file",className:"hidden",multiple:!0,accept:".pdf,.doc,.docx,.xls,.xlsx,.png,.jpg,.jpeg",onChange:U=>
574{Array.from(U.target.files||[]).forEach(Jn),U.target.value=""},disabled:ne}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:841",className:"flex items-center gap-1.5 text-xs font-medium px-3 py-1.5 rounded-lg border transition-colors cursor-pointer hover:bg-slate-50",style:{borderColor:"var(--color-pine)",color:"var(--color-pine)"},children:[ne?e.jsx(It,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:843",className:"w-3.5 h-3.5 animate-spin"}):e.jsx(Ro,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:843",className:"w-3.5 h-3.5"}),ne?"Uploading...":"Upload File"]})]})]}),ya.length>0?e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:850",className:"space-y-2",children:ya.map(U=>e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:852",className:"flex items-center gap-3 p-3 rounded-lg border",style:{borderColor:"var(--color-border)",background:"var(--color-bg-primary)"},children:[e.jsx(Dt,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:854",className:"w-4 h-4 flex-shrink-0",style:{color:"var(--color-cyan)"}}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:855",className:"flex-1 min-w-0",children:[e.jsx("p",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:856",className:"text-sm font-medium truncate",style:{color:"var(--color-text-primary)"},children:U.fileName}),e.jsx("p",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:857",className:"text-xs",style:{color:"var(--color-text-secondary)"},children:U.fileSizeBytes?`${Math.round(U.fileSizeBytes/1024)} KB`:""})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:861",className:"flex items-center gap-1",children:[U.fileUrl&&e.jsx("a",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:863",href:U.fileUrl,target:"_blank",rel:"noopener noreferrer",className:"p-1.5 rounded hover:bg-slate-100 transition-colors",children:e.jsx(Ya,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:865",className:"w-3.5 h-3.5",style:{color:"var(--color-text-secondary)"}})}),fe&&e.jsx("button",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:869",onClick:()=>p?Wn.mutate({token:t??"",assessmentId:u,id:U.id}):Wt.mutate({id:U.id}),className:"p-1.5 rounded hover:bg-red-50 transition-colors",title:"Remove evidence",children:e.jsx(pc,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:871",className:"w-3.5 h-3.5 text-red-400"})})]})]},U.id))}):e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:879",className:"text-center py-6 rounded-xl border-2 border-dashed",style:{borderColor:"var(--color-border)"},children:[e.jsx(Ro,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:880",className:"w-8 h-8 mx-auto mb-2",style:{color:"var(--color-text-secondary)"}}),e.jsx("p",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:881",className:"text-sm",style:{color:"var(--color-text-secondary)"},children:"No evidence uploaded yet. Upload supporting documents to strengthen your assessment."})]})]}),ss===100&&fe&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:890",className:"rounded-2xl border-2 p-5 space-y-3",style:{borderColor:ra?"var(--color-pine)":"#D97706",background:"var(--color-bg-card)"},children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:891",className:"flex items-start gap-3",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:892",className:"w-10 h-10 rounded-full flex items-center justify-center flex-shrink-0",style:{background:ra?"var(--color-pine)":"#D97706"},children:ra?e.jsx(Cr,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:893",className:"w-5 h-5 text-white"}):e.jsx(tt,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:893",className:"w-5 h-5 text-white"})}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:895",children:[e.jsx("p",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:896",className:"font-semibold text-sm",style:{color:"var(--color-text-primary)"},children:ra?"All criteria answered":`${na.length} Compliant answer${na.length>
5741?"s":""} need evidence`}),e.jsx("p",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:899",className:"text-xs mt-0.5",style:{color:"var(--color-text-secondary)"},children:ra?"Your self-assessment is complete. Submit to run the evidence review and generate your readiness report.":"Criteria marked Compliant must include assessment notes or at least one uploaded document to support the claim."})]})]}),!ra&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:907",className:"rounded-lg p-3 bg-amber-50 border border-amber-200 space-y-1",children:[e.jsx("p",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:908",className:"text-xs font-semibold text-amber-700 mb-1",children:"Criteria requiring evidence:"}),na.slice(0,5).map(U=>e.jsxs("button",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:910",className:"flex items-center gap-1.5 text-xs text-amber-700 hover:text-amber-900 hover:underline w-full text-left",onClick:()=>{const be=it.indexOf(U.theme),bt=dt.filter(Ze=>Ze.theme===U.theme).findIndex(Ze=>Ze.id===U.id);be>=0&&h(it[be]),bt>=0&&g(bt)},children:[e.jsx(tt,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:920",className:"w-3 h-3 flex-shrink-0"}),U.code,": ",U.title]},U.id)),na.length>5&&e.jsxs("p",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:925",className:"text-xs text-amber-600",children:["...and ",na.length-5," more"]})]}),e.jsx(ie,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:929",className:"w-full font-semibold gap-2",style:{background:ra?"var(--color-pine)":"#D97706",color:"white"},disabled:Ae||!ra,onClick:()=>p?Ve.mutate({token:t??"",assessmentId:u}):st.mutate({assessmentId:u}),children:Ae?e.jsxs(e.Fragment,{children:[e.jsx(It,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:935",className:"w-4 h-4 animate-spin"})," Running Evidence Review..."]}):ra?e.jsxs(e.Fragment,{children:["Submit for Evidence Review ",e.jsx(qe,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:937",className:"w-4 h-4"})]}):e.jsxs(e.Fragment,{children:["Add Evidence to Continue ",e.jsx(tt,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:938",className:"w-4 h-4"})]})})]}),!fe&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:945",className:"rounded-2xl border-2 overflow-hidden",style:{borderColor:"var(--color-pine)"},children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:947",className:"px-5 py-4 flex items-start gap-3",style:{background:"var(--color-pine)"},children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:948",className:"w-9 h-9 rounded-full bg-white/20 flex items-center justify-center flex-shrink-0",children:ot?.state==="audit_running"?e.jsx(It,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:950",className:"w-5 h-5 text-white animate-spin"}):e.jsx(Cr,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:951",className:"w-5 h-5 text-white"})}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:953",children:[e.jsx("p",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:954",className:"font-semibold text-sm text-white",children:ot?.state==="audit_running"?"Evidence review in progressâ¦":"Assessment submitted"}),e.jsx("p",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:957",className:"text-xs mt-0.5 text-white/70",children:ot?.state==="audit_running"?"AI is reviewing your 72 criteria. This takes about 1 minute. This page will update automatically.":ot?.state==="ai_audited"||ot?.state==="verified"?"Your evidence review is complete.":"Your assessment is being reviewed."})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:967",className:"p-4 space-y-3",style:{background:"var(--color-bg-card)"},children:[(ot?.state==="ai_audited"||ot?.state==="verified")&&ot?.overallScore!=null&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:970",className:"rounded-xl border border-border p-4 flex items-center gap-4 bg-white",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:971",className:"text-center shrink-0",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:972",className:"text-3xl font-black",style:{color:"var(--color-pine)"},children:[Math.round(Number(ot.overallScore)),"%"]}),e.jsx("p",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:975",className:"text-xs text-muted-foreground",children:"Overall Score"})]}),e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:977",className:"flex-1 space-y-1.5",children:[{key:"envScore",label:"Environment",color:"#2E9E6B"},{key:"laborScore",label:"Labor",color:"#33B7E1"},{key:"ethicsScore",label:"Ethics",color:"#F0AB00"},{key:"procurementScore",label:"Procurement",color:"#8B5CF6"}].map(({key:U,label:be,color:bt})=>{const Ze=ot?.[U],We=Ze!=null?Math.round(Number(Ze)):null;return e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:987",className:"flex items-center gap-2",children:[e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:988",className:"text-xs text-muted-foreground w-20 shrink-0",children:be}),e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:989",className:"flex-1 h-1.5 rounded-full bg-muted overflow-hidden",children:e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:990",className:"h-full rounded-full",style:{width:`${We??0}%`,background:bt}})}),e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:992",className:"text-xs font-semibold w-8 text-right",style:{color:bt},children:We!==null?`${We}%`:"--"})]},U)})})]}),(ot?.state==="ai_audited"||ot?.state==="verified")&&e.jsxs(ie,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1002",className:"w-full font-semibold gap-2",style:{background:"var(--color-pine)",color:"white"},onClick:()=>p?d(`/supplier/invite/${t}/report`):window.location.href=`/supplier/readiness-report/${u}`,children:["View Readiness Report ",e.jsx(qe,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1006",className:"w-4 h-4"})]}),p&&(ot?.state==="ai_audited"||ot?.state==="verified")&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1012",className:"border-t border-border pt-3 space-y-3",children:[e.jsx("p",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1013",className:"text-xs font-semibold",style:{color:"var(--color-text-primary)"},children:"Share with hotel"}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1014",className:"flex gap-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1015",className:"relative flex-1",children:[e.jsx(Tr,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1016",className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-muted-foreground"}),e.jsx(Ot,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1017",type:"email",placeholder:"[email protected]",value:B,onChange:U=>V(U.target.value),className:"pl-8 text-xs h-8",onKeyDown:U=>U.key==="Enter"&&Ct()})]}),e.jsxs(ie,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1026",size:"sm",onClick:Ct,disabled:at.isPending,className:"shrink-0 gap-1.5 text-xs font-semibold",style:{background:"var(--color-pine)",color:"white"},children:[at.isPending?e.jsx(It,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1033",className:"w-3.5 h-3.5 animate-spin"}):e.jsx(qa,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1034",className:"w-3.5 h-3.5"}),B.trim()?"Send":"Get Link"]})]}),re&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1039",className:"flex gap-2",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1040",className:"flex-1 text-xs px-2.5 py-1.5 rounded-lg border border-border bg-muted/40 text-muted-foreground truncate font-mono",children:re}),e.jsxs(ie,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1043",size:"sm",variant:"outline",onClick:Us,className:"shrink-0 gap-1 text-xs",style:{borderColor:L?"#16A34A":void 0,color:L?"#16A34A":void 0},children:[L?e.jsx(dc,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1045",className:"w-3.5 h-3.5"}):e.jsx(zr,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1045",className:"w-3.5 h-3.5"}),L?"Copied":"Copy"]}),e.jsxs(ie,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1048",size:"sm",variant:"outline",onClick:()=>window.open(re,"_blank"),className:"shrink-0 gap-1 text-xs",children:[e.jsx(Ya,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1049",className:"w-3.5 h-3.5"})," Open"]})]})]}),e.jsxs(U3,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1057",children:[e.jsx(z9,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1058",asChild:!0,children:e.jsxs(ie,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1059",variant:"outline",className:"w-full gap-2 text-sm",disabled:gt,children:[gt?e.jsx(It,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1060",className:"w-4 h-4 animate-spin"}):e.jsx(AS,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1060",className:"w-4 h-4"}),"Edit Assessment"]})}),e.jsxs($3,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1064",children:[e.jsxs(G3,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1065",children:[e.jsx(q3,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1066",children:"Reo
574pen assessment for editing?"}),e.jsx(Q3,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1067",children:"This will reset your assessment back to draft and clear the current AI audit results. You can make changes and resubmit for a new evidence review."})]}),e.jsxs(K3,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1071",children:[e.jsx(X3,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1072",children:"Cancel"}),e.jsx(Y3,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1073",onClick:ws,className:"bg-amber-600 hover:bg-amber-700",children:"Yes, reopen for editing"})]})]})]}),ot?.state==="submitted"&&e.jsx(ie,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1082",className:"w-full font-semibold gap-2",style:{background:"var(--color-pine)",color:"white"},disabled:Ae,onClick:()=>p?ke.mutate({token:t??"",assessmentId:u}):Ba.mutate({assessmentId:u}),children:Ae?e.jsxs(e.Fragment,{children:[e.jsx(It,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1091",className:"w-4 h-4 animate-spin"})," Running Evidence Review..."]}):e.jsxs(e.Fragment,{children:["Re-run Evidence Review ",e.jsx(qe,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1092",className:"w-4 h-4"})]})})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1100",className:"flex items-center justify-between gap-3 pb-8",children:[e.jsxs(ie,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1101",variant:"outline",onClick:()=>g(U=>Math.max(0,U-1)),disabled:v===0,className:"gap-1.5",children:[e.jsx(hn,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1103",className:"w-4 h-4"})," Previous"]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1105",className:"flex items-center gap-3",children:[fe&&D&&e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1106",className:"text-xs",style:{color:"var(--color-text-secondary)"},children:"Unsaved changes"}),fe&&Va&&e.jsxs("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1108",className:"text-xs text-emerald-600 flex items-center gap-1",children:[e.jsx(Cr,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1109",className:"w-3.5 h-3.5"})," Saved"]}),fe?e.jsxs(e.Fragment,{children:[e.jsxs(ie,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1114",variant:"outline",onClick:Ml,disabled:z||j===null,className:"gap-1.5",children:[z?e.jsx(It,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1115",className:"w-4 h-4 animate-spin"}):e.jsx(vl,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1115",className:"w-4 h-4"}),"Save"]}),e.jsxs(ie,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1118",onClick:Pl,disabled:z||j===null,className:"gap-1.5 font-semibold",style:{background:"var(--color-pine)",color:"white"},children:[z&&e.jsx(It,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1120",className:"w-4 h-4 animate-spin"}),"Save & Next ",e.jsx(qe,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1121",className:"w-4 h-4"})]})]}):e.jsxs(ie,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1125",variant:"outline",onClick:()=>g(U=>Math.min(pt.length-1,U+1)),disabled:v===pt.length-1,className:"gap-1.5",children:["Next ",e.jsx(qe,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1127",className:"w-4 h-4"})]})]})]})]}),e.jsxs(uu,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1135",value:"document-builder",className:"mt-0",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1136",className:"rounded-2xl border p-6",style:{background:"var(--color-bg-card)",borderColor:"var(--color-border)"},children:e.jsx(U1,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1137",assessmentId:u,criterionId:je.id,criterionCode:je.code,criterionTitle:je.title,criterionGuidance:je.guidance,token:p?t??void 0:void 0})}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1147",className:"flex items-center justify-between gap-3 pb-8 mt-4",children:[e.jsxs(ie,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1148",variant:"outline",onClick:()=>g(U=>Math.max(0,U-1)),disabled:v===0,className:"gap-1.5",children:[e.jsx(hn,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1150",className:"w-4 h-4"})," Previous"]}),e.jsxs(ie,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1152",variant:"outline",onClick:()=>g(U=>Math.min(pt.length-1,U+1)),disabled:v===pt.length-1,className:"gap-1.5",children:["Next ",e.jsx(qe,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1154",className:"w-4 h-4"})]})]})]})]})]}):!G&&e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1162",className:"flex-1 flex items-center justify-center",children:e.jsx("p",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1163",style:{color:"var(--color-text-secondary)"},children:"Select a criterion from the sidebar to begin."})})]}),G&&e.jsx(hP,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1171",open:Z,onOpenChange:X,children:e.jsxs(vP,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1172",className:"max-h-[92vh] flex flex-col",children:[e.jsxs(yP,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1173",className:"flex-shrink-0 pb-2 border-b",style:{borderColor:"var(--color-border)"},children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1174",className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1175",className:"flex items-center gap-2 flex-wrap min-w-0",children:[je&&e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1177",className:"font-mono text-xs font-bold px-2 py-0.5 rounded flex-shrink-0",style:{background:"var(--color-pine)",color:"white"},children:je.code}),e.jsx(wP,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1181",className:"text-sm font-semibold leading-tight truncate",style:{color:"var(--color-text-primary)"},children:je?.title??""})]}),e.jsx("button",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1185",onClick:()=>X(!1),className:"flex-shrink-0 p-1.5 rounded-full hover:bg-slate-100",children:e.jsx(Nc,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1186",className:"w-4 h-4",style:{color:"var(--color-text-secondary)"}})})]}
574),je&&Array.isArray(je.gstcClauses)&&je.gstcClauses.length>0&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1190",className:"mt-2 flex flex-wrap gap-1",children:[je.gstcClauses.map(U=>e.jsxs("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1192",className:"text-xs px-1.5 py-0.5 rounded border font-mono",style:{borderColor:"var(--color-cyan)",color:"var(--color-cyan)",background:"rgba(51,183,225,0.08)"},children:["GSTC ",U]},U)),Array.isArray(je?.iso14001Clauses)&&je.iso14001Clauses.map(U=>e.jsxs("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1198",className:"text-xs px-1.5 py-0.5 rounded border font-mono",style:{borderColor:"var(--color-green)",color:"var(--color-green)",background:"rgba(46,158,107,0.08)"},children:["ISO ",U]},U))]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1206",className:"flex items-center justify-between mt-2",children:[e.jsxs(ie,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1207",variant:"outline",size:"sm",className:"gap-1 text-xs",onClick:()=>g(U=>Math.max(0,U-1)),disabled:v===0,children:[e.jsx(hn,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1210",className:"w-3.5 h-3.5"})," Prev"]}),e.jsxs("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1212",className:"text-xs",style:{color:"var(--color-text-secondary)"},children:[v+1," / ",pt.length]}),e.jsxs(ie,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1215",variant:"outline",size:"sm",className:"gap-1 text-xs",onClick:()=>g(U=>Math.min(pt.length-1,U+1)),disabled:v===pt.length-1,children:["Next ",e.jsx(qe,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1218",className:"w-3.5 h-3.5"})]})]})]}),e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1224",className:"flex-1 overflow-y-auto px-4 py-4 space-y-4",children:je&&e.jsxs(e.Fragment,{children:[e.jsx("p",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1227",className:"text-sm leading-relaxed",style:{color:"var(--color-text-secondary)"},children:je.description}),e.jsxs(z1,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1231",defaultValue:"assessment",className:"w-full",children:[e.jsxs(I1,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1232",className:"w-full mb-3",children:[e.jsxs(du,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1233",value:"assessment",className:"flex-1 gap-1 text-xs",children:[e.jsx(Xx,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1234",className:"w-3.5 h-3.5"})," Assessment"]}),e.jsxs(du,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1236",value:"document-builder",className:"flex-1 gap-1 text-xs",children:[e.jsx(e1,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1237",className:"w-3.5 h-3.5"})," Doc Builder"]})]}),e.jsxs(uu,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1241",value:"assessment",className:"space-y-4 mt-0",children:[!fe&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1244",className:"rounded-xl border px-3 py-2.5 flex items-center gap-2",style:{background:"var(--color-pine-muted, #f0f7f4)",borderColor:"var(--color-pine)"},children:[e.jsx(Xi,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1245",className:"w-3.5 h-3.5 flex-shrink-0",style:{color:"var(--color-pine)"}}),e.jsxs("p",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1246",className:"text-xs",style:{color:"var(--color-pine)"},children:["Assessment submitted â ",e.jsx("strong",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1246",children:"read-only"})]})]}),je.guidance&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1251",className:"rounded-xl border p-4",style:{background:"var(--color-bg-card)",borderColor:"var(--color-border)"},children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1252",className:"flex gap-2",children:[e.jsx(t1,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1253",className:"w-4 h-4 flex-shrink-0 mt-0.5",style:{color:"var(--color-gold)"}}),e.jsx("p",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1254",className:"text-sm leading-relaxed",style:{color:"var(--color-text-primary)"},children:je.guidance})]}),Array.isArray(je.evidenceExamples)&&je.evidenceExamples.length>0&&e.jsx("ul",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1259",className:"mt-3 space-y-1.5",children:je.evidenceExamples.map((U,be)=>e.jsxs("li",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1261",className:"flex items-start gap-2 text-sm",style:{color:"var(--color-text-primary)"},children:[e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1262",className:"w-1.5 h-1.5 rounded-full flex-shrink-0 mt-1.5",style:{background:"var(--color-pine)"}}),U]},be))})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1272",className:"rounded-xl border p-4",style:{background:"var(--color-bg-card)",borderColor:"var(--color-border)"},children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1273",className:"text-sm font-semibold mb-3",style:{color:"var(--color-text-primary)"},children:["Compliance Level ",fe&&e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1273",className:"text-red-500",children:"*"})]}),e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1274",className:"grid grid-cols-2 gap-2",children:Q1.map(U=>{const be=j===U.value;return e.jsxs("button",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1278",onClick:()=>fe&&Ic(U.value),disabled:!fe,className:`relative flex items-start gap-2 p-3 rounded-xl border-2 text-left transition-all duration-150 active:scale-[0.98] ${be?`${U.bgClass} ${U.borderClass}`:"bg-white border-slate-200"}`,children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1280",className:"flex-shrink-0 mt-0.5",children:U.icon}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1281",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1282",className:`font-semibold text-xs ${be?U.colorClass:"text-slate-700"}`,children:U.label}),e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1283",className:"text-xs mt-0.5 text-slate-500 leading-tight hidden sm:block",children:U.description})]}),be&&e.jsx(Cr,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1285",className:"absolute top-2 right-2 w-3.5 h-3.5 text-emerald-600"})]},U.value)})}),j==="na"&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1291",className:"mt-3 p-3 rounded-xl bg-slate-50 border border-slate-200",children:[e.jsxs("label",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1292",className:"block text-xs font-semibold mb-2 text-slate-600",children:["Justification ",e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1292",className:"text-red-500",children:"*"})]}),e.jsx(Qa,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1293",value:E,onChange:U=>{T(U.target.value),M(!0)},placeholder:"Explain why this criterion does not apply...",rows:3,className:"text-sm"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1301",className:"rounded-xl border p-4",style:{background:"var(--color-bg-card)",borderColor:"var(--color-border)"},children:[e.jsx("label",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1302",className:"block text-sm font-semibold mb-2",style:{color:"var(--color-text-primary)"},children:"Assessment Notes"}),e.jsx(Qa,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1303",value:A,onChange:U=>{fe&&(C(U.target.value),M(!0))},readOnly:!fe,placeholder:"Describe your current practices...",rows:3,className:`text-sm ${fe?"":"opacity-70 cursor-default"}`})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1310",className:"rounded-xl border p-4",style:{background:"var(--color-bg-card)",borderColor:"var(--color-border)"},children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1311",className:"flex items-center justify-between mb-3",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1312",className:"text-sm font-semibold",style:{color:"var(--color-text-primary)"},children:"Evidence"}),fe&&e.jsxs("label",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1314",className:"cursor-pointer",children:[e.jsx("input",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1315",type:"file",className:"hidden",multiple:!0,accept:".pdf,.doc,.docx,.xls,.xlsx,.png,.jpg,.jpeg",onChange:U=>
574{Array.from(U.target.files||[]).forEach(Jn),U.target.value=""},disabled:ne}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1318",className:"flex items-center gap-1 text-xs font-medium px-2.5 py-1.5 rounded-lg border cursor-pointer hover:bg-slate-50",style:{borderColor:"var(--color-pine)",color:"var(--color-pine)"},children:[ne?e.jsx(It,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1320",className:"w-3 h-3 animate-spin"}):e.jsx(Ro,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1320",className:"w-3 h-3"}),ne?"Uploading...":"Upload"]})]})]}),ya.length>0?e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1327",className:"space-y-2",children:ya.map(U=>e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1329",className:"flex items-center gap-2 p-2.5 rounded-lg border",style:{borderColor:"var(--color-border)",background:"var(--color-bg-primary)"},children:[e.jsx(Dt,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1331",className:"w-4 h-4 flex-shrink-0",style:{color:"var(--color-cyan)"}}),e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1332",className:"flex-1 min-w-0",children:e.jsx("p",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1333",className:"text-xs font-medium truncate",style:{color:"var(--color-text-primary)"},children:U.fileName})}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1335",className:"flex items-center gap-1 flex-shrink-0",children:[U.fileUrl&&e.jsx("a",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1337",href:U.fileUrl,target:"_blank",rel:"noopener noreferrer",className:"p-1 rounded hover:bg-slate-100",children:e.jsx(Ya,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1338",className:"w-3.5 h-3.5",style:{color:"var(--color-text-secondary)"}})}),fe&&e.jsx("button",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1342",onClick:()=>p?Wn.mutate({token:t??"",assessmentId:u,id:U.id}):Wt.mutate({id:U.id}),className:"p-1 rounded hover:bg-red-50",title:"Remove evidence",children:e.jsx(pc,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1343",className:"w-3.5 h-3.5 text-red-400"})})]})]},U.id))}):e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1351",className:"text-center py-4 rounded-xl border-2 border-dashed",style:{borderColor:"var(--color-border)"},children:[e.jsx(Ro,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1352",className:"w-6 h-6 mx-auto mb-1",style:{color:"var(--color-text-secondary)"}}),e.jsx("p",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1353",className:"text-xs",style:{color:"var(--color-text-secondary)"},children:"No evidence uploaded yet"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1359",className:"flex items-center justify-between gap-3 pb-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1360",className:"flex items-center gap-2",children:[fe&&D&&e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1361",className:"text-xs",style:{color:"var(--color-text-secondary)"},children:"Unsaved"}),fe&&Va&&e.jsxs("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1362",className:"text-xs text-emerald-600 flex items-center gap-1",children:[e.jsx(Cr,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1362",className:"w-3 h-3"})," Saved"]})]}),e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1364",className:"flex gap-2",children:fe?e.jsxs(e.Fragment,{children:[e.jsxs(ie,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1367",variant:"outline",size:"sm",onClick:Ml,disabled:z||j===null,className:"gap-1 text-xs",children:[z?e.jsx(It,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1368",className:"w-3 h-3 animate-spin"}):e.jsx(vl,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1368",className:"w-3 h-3"})," Save"]}),e.jsxs(ie,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1370",size:"sm",onClick:Pl,disabled:z||j===null,className:"gap-1 text-xs font-semibold",style:{background:"var(--color-pine)",color:"white"},children:[z&&e.jsx(It,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1372",className:"w-3 h-3 animate-spin"}),"Save & Next ",e.jsx(qe,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1373",className:"w-3.5 h-3.5"})]})]}):e.jsxs(ie,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1377",size:"sm",variant:"outline",onClick:()=>g(U=>Math.min(pt.length-1,U+1)),disabled:v===pt.length-1,className:"gap-1 text-xs",children:["Next ",e.jsx(qe,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1379",className:"w-3.5 h-3.5"})]})})]})]}),e.jsx(uu,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1386",value:"document-builder",className:"mt-0 pb-6",children:e.jsx(U1,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1387",assessmentId:u,criterionId:je.id,criterionCode:je.code,criterionTitle:je.title,criterionGuidance:je.guidance,token:p?t??void 0:void 0})})]})]})}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1402",className:"flex-shrink-0 border-t px-4 py-3 flex items-center gap-2",style:{borderColor:"var(--color-border)",background:"var(--color-bg-card)"},children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1403",className:"flex-1 min-w-0",children:[fe&&D&&e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1404",className:"text-xs",style:{color:"var(--color-text-secondary)"},children:"Unsaved changes"}),fe&&Va&&e.jsxs("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1405",className:"text-xs text-emerald-600 flex items-center gap-1",children:[e.jsx(Cr,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1405",className:"w-3 h-3"})," Saved"]}),!fe&&e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1406",className:"text-xs",style:{color:"var(--color-pine)"},children:"Read-only"})]}),fe?e.jsxs(e.Fragment,{children:[e.jsxs(ie,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1410",variant:"outline",size:"sm",onClick:Ml,disabled:z||j===null,className:"gap-1 text-xs",children:[z?e.jsx(It,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1411",className:"w-3 h-3 animate-spin"}):e.jsx(vl,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1411",className:"w-3 h-3"})," Save"]}),e.jsxs(ie,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1413",size:"sm",onClick:Pl,disabled:z||j===null,className:"gap-1 text-xs font-semibold",style:{background:"var(--color-pine)",color:"white"},children:[z&&e.jsx(It,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1415",className:"w-3 h-3 animate-spin"}),"Save & Next ",e.jsx(qe,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1416",className:"w-3.5 h-3.5"})]})]}):e.jsxs(ie,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1420",size:"sm",variant:"outline",onClick:()=>{g(U=>Math.min(pt.length-1,U+1)),X(!1)},className:"gap-1 text-xs",children:["Next ",e.jsx(qe,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1421",className:"w-3.5 h-3.5"})]})]})]})}),e.jsx(l3,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1430",open:q,onOpenChange:Q,children:e.jsxs(o3,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1431",side:"right",className:"w-full sm:w-96 flex flex-col p-0",style:{background:"var(--color-bg-primary)"},children:[e.jsxs(i3,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1432",className:"px-4 pt-4 pb-3 border-b flex-shrink-0",style:{borderColor:"var(--color-border)"},children:[e.jsx(c3,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1433",className:"text-base font-bold",style:{color:"var(--color-text-primary)"},children:"Question Navigator"}),e.jsxs("p",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1434",className:"text-xs mt-0.5",style:{color:"var(--color-text-secondary)"},children:[$s," of ",Ht," answered â ",ss,"% complete"]})]}),e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1439",className:"px-4 py-2 border-b flex-shrink-0",style:{borderColor:"var(--color-border)"},children:e.jsx(Wj,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1440",className:"rounded-lg border",style:{borderColor:"var(--color-border)",background:"var(--color-bg-card)"},children:e.jsx(Jj,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1441",placeholder:"Search questions...",value:R,onValueChange:P,className:"text-sm"})})}),fe&&$s<Ht&&e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1451",className:"px-4 py-2 flex-shrink-0",children:e.jsxs("button",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1452",onClick:()=>{Hl(),Q(!1)},className:"w-full flex items-center justify-center gap-2 text-sm font-medium py-2 rounded-lg transition-colors",style:{background:"var(--color-pine)",color:"white"},children:[e.jsx(a1,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1456",className:"w-4 h-4"}),"Jump to First Unanswered"]})}),e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:14
57462",className:"flex-1 overflow-y-auto px-2 pb-4",children:it.map(U=>{const be=jo[U],bt=dt.filter(_t=>_t.theme===U),Ze=bt.filter(_t=>R===""||_t.title.toLowerCase().includes(R.toLowerCase())||_t.code.toLowerCase().includes(R.toLowerCase()));if(Ze.length===0)return null;const We=_l.find(_t=>_t.theme===U),Ss=We.total>0?Math.round(We.answered/We.total*100):0;return e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1475",className:"mt-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1477",className:"flex items-center justify-between px-2 mb-1",children:[e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1478",className:`text-xs font-bold px-2 py-0.5 rounded-full ${be.bg} ${be.color}`,children:be.label}),e.jsxs("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1479",className:"text-xs",style:{color:"var(--color-text-secondary)"},children:[We.answered,"/",We.total," ⢠",Ss,"%"]})]}),Ze.map(_t=>{const jn=ps.get(_t.id),er=jn&&jn.selfScore!==null&&jn.selfScore!==void 0,wa=x===U&&pt[v]?.id===_t.id,tr=bt.indexOf(_t);return e.jsxs("button",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1488",onClick:()=>{h(U),g(tr),G&&X(!0),Q(!1)},className:`w-full text-left flex items-start gap-2.5 px-2 py-2 rounded-lg mb-0.5 transition-colors ${wa?"ring-1":"hover:bg-black/5 dark:hover:bg-white/5"}`,style:wa?{background:"var(--color-pine-muted, #e8f5ef)",outline:"1px solid var(--color-pine)"}:{},children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1502",className:"flex-shrink-0 mt-0.5",children:er?e.jsx(Te,{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1504",className:"w-4 h-4 text-emerald-500"}):e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1506",className:"w-4 h-4 rounded-full border-2",style:{borderColor:"var(--color-border)"}})}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1509",className:"flex-1 min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1510",className:"flex items-center gap-1.5 mb-0.5",children:[e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1511",className:"font-mono text-xs font-bold",style:{color:"var(--color-pine)"},children:_t.code}),wa&&e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1512",className:"text-xs px-1.5 py-0.5 rounded",style:{background:"var(--color-pine)",color:"white"},children:"Current"})]}),e.jsx("p",{"data-loc":"client/src/pages/supplier/AssessmentEngine.tsx:1514",className:"text-xs leading-snug line-clamp-2",style:{color:"var(--color-text-primary)"},children:_t.title})]})]},_t.id)})]},U)})})]})})]})}const Y1={gold:{color:"text-amber-500",bg:"bg-amber-50 border-amber-200",label:"Gold"},silver:{color:"text-muted-foreground",bg:"bg-muted/40 border-border",label:"Silver"},bronze:{color:"text-amber-700",bg:"bg-amber-50 border-amber-200",label:"Bronze"},not_yet_rated:{color:"text-muted-foreground/70",bg:"bg-muted/40 border-border",label:"Not Yet Rated"}},AP={pass:e.jsx(Te,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:24",className:"w-4 h-4 text-envora-green"}),partial:e.jsx(tt,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:25",className:"w-4 h-4 text-envora-gold"}),fail:e.jsx(Zt,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:26",className:"w-4 h-4 text-red-400"}),na:e.jsx(zh,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:27",className:"w-4 h-4 text-border"})};function CP(){const{id:t}=ea(),n=parseInt(t??"0"),[,r]=ds(),[o,i]=b.useState(null),[d,u]=b.useState(!1),{data:p,isLoading:x}=ue.supplier.getMyAssessments.useQuery(),h=p?.find(D=>D.id===n),{data:v,isLoading:g}=ue.supplier.getReport.useQuery({assessmentId:n},{enabled:!!n}),y=x||g,N=ue.supplier.createShareLink.useMutation({onSuccess:D=>{const M=`${window.location.origin}/shared/${D.token}`;i(M),u(!0)},onError:D=>xe.error(D.message)});if(y)return e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:56",className:"min-h-screen bg-muted/40 p-8",children:e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:57",className:"max-w-4xl mx-auto
574space-y-4",children:[e.jsx(Ue,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:58",className:"h-16 rounded-2xl"}),e.jsx(Ue,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:59",className:"h-48 rounded-2xl"}),e.jsx(Ue,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:60",className:"h-64 rounded-2xl"})]})});if(!y&&!h)return e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:68",className:"min-h-screen bg-muted/40 flex items-center justify-center",children:e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:69",className:"text-muted-foreground text-sm",children:"Assessment not found."})});const j=h,w=j.band??"not_yet_rated",A=Y1[w]??Y1.not_yet_rated,C=v?.reportData??null,E=C?.criterionResults??{},T=[{key:"envScore",label:"Environment",weight:"30%"},{key:"laborScore",label:"Labor & Human Rights",weight:"30%"},{key:"ethicsScore",label:"Ethics & Governance",weight:"20%"},{key:"procurementScore",label:"Sustainable Procurement",weight:"20%"}];return e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:88",className:"min-h-screen bg-muted/40",children:[e.jsxs("nav",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:89",className:"bg-card border-b border-border px-6 py-4 flex items-center gap-3 sticky top-0 z-10",children:[e.jsx("button",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:90",onClick:()=>r("/supplier/dashboard"),className:"text-muted-foreground/70 hover:text-foreground/80 transition-colors",children:e.jsx(hn,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:91",className:"w-5 h-5"})}),e.jsx("img",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:93",src:"/manus-storage/envora-logo_f789bcb1.webp",alt:"Envora Consulting",className:"h-9 w-auto"}),e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:94",className:"text-border",children:"/"}),e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:95",className:"text-foreground/70 text-sm",children:"Readiness Report"}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:96",className:"ml-auto flex items-center gap-2",children:[j.state==="verified"&&e.jsxs(ie,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:98",onClick:()=>N.mutate({assessmentId:n,expiresInDays:30}),disabled:N.isPending,size:"sm",variant:"outline",className:"border-envora-pine/30 text-envora-pine hover:bg-envora-pine/5",children:[e.jsx(qa,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:105",className:"w-4 h-4 mr-1.5"}),"Share Report"]}),e.jsxs(ie,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:109",onClick:()=>window.print(),size:"sm",variant:"ghost",children:[e.jsx(uc,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:110",className:"w-4 h-4 mr-1.5"}),"Export"]})]})]}),d&&o&&e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:117",className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:118",className:"bg-card rounded-2xl p-6 max-w-md w-full shadow-2xl",children:[e.jsx("h3",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:119",className:"font-display text-lg font-bold text-foreground mb-2",children:"Share Your Report"}),e.jsx("p",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:120",className:"text-muted-foreground text-sm mb-4",children:"This link is valid for 30 days. Anyone with the link can view your Supplier Readiness Report."}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:121",className:"flex items-center gap-2 bg-muted/40 rounded-xl p-3 mb-4",children:[e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:122",className:"text-xs text-foreground/70 flex-1 truncate",children:o}),e.jsx("button",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:123",onClick:()=>{navigator.clipboard.writeText(o),xe.success("Link copied!")},className:"text-envora-pine hover:text-envora-pine/80",children:e.jsx(zr,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:127",className:"w-4 h-4"})})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:130",className:"flex gap-2",children:[e.jsx(ie,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:131",onClick:()=>u(!1),variant:"ghost",className:"flex-1",children:"Close"}),e.jsxs(ie,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:132",onClick:()=>{navigator.clipboard.writeText(o),xe.success("Link copied!")},className:"flex-1 bg-envora-pine hover:bg-envora-pine/90 text-white",children:[e.jsx(zr,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:136",className:"w-4 h-4 mr-1.5"})," Copy Link"]})]})]})}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:143",className:"max-w-4xl mx-auto p-8 space-y-6",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:144",className:"bg-envora-pine text-white rounded-2xl p-8",children:e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:145",className:"flex items-start justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:14
5746",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:147",className:"text-xs font-semibold text-white/60 uppercase tracking-wider mb-2",children:"Supplier Readiness Report"}),e.jsx("h1",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:148",className:"font-display text-3xl font-bold mb-1",children:"Your Assessment Results"}),e.jsxs("p",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:149",className:"text-white/70 text-sm",children:["Assessment #",j.id," / ",j.state==="verified"?"Verified":j.state==="ai_audited"?"AI Audited":j.state]})]}),e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:153",className:"text-right",children:j.overallScore?e.jsxs(e.Fragment,{children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:156",className:"font-display text-5xl font-bold",children:Number(j.overallScore).toFixed(0)}),e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:157",className:"text-white/60 text-sm",children:"/ 100"}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:158",className:`mt-2 inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full border text-sm font-semibold ${A.bg} ${A.color}`,children:[e.jsx(Ut,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:159",className:"w-4 h-4"}),A.label]})]}):e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:164",className:"text-white/40 text-sm",children:"Score pending"})})]})}),e.jsxs(_e,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:170",className:"border-0 shadow-sm",children:[e.jsx(Ft,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:171",className:"pb-2",children:e.jsx(Xt,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:172",className:"text-base font-semibold text-foreground",children:"Theme Breakdown"})}),e.jsx(Me,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:174",className:"space-y-4",children:T.map(D=>{const M=Number(j[D.key]??0);return e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:178",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:179",className:"flex items-center justify-between mb-1.5",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:180",className:"flex items-center gap-2",children:[e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:181",className:"text-sm font-medium text-foreground/90",children:D.label}),e.jsx(Qe,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:182",className:"text-xs bg-muted text-muted-foreground border-border",children:D.weight})]}),e.jsxs("span",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:184",className:"text-sm font-bold text-foreground",children:[M.toFixed(0),"/100"]})]}),e.jsx(vp,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:186",value:M,className:"h-2.5"})]},D.key)})})]}),C&&e.jsxs(_e,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:194",className:"border-0 shadow-sm",children:[e.jsx(Ft,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:195",className:"pb-2",children:e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:196",className:"flex items-center gap-2",children:[e.jsx(bS,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:197",className:"w-4 h-4 text-envora-pine"}),e.jsx(Xt,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:198",className:"text-base font-semibold text-foreground",children:"AI Audit Summary"})]})}),e.jsxs(Me,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:201",className:"space-y-4",children:[C.executiveSummary&&e.jsx("p",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:203",className:"text-sm text-foreground/80 leading-relaxed",children:C.executiveSummary}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:205",className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[Array.isArray(C.keyStrengths)&&C.keyStrengths.length>0&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:207",className:"bg-envora-green/5 rounded-xl p-4",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:208",className:"text-xs font-semibold text-envora-green uppercase tracking-wider mb-3",children:"Key Strengths"}),e.jsx("ul",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:209",className:"space-y-2",children:C.keyStrengths.map((D,M)=>e.jsxs("li",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:211",className:"flex items-start gap-2 text-sm text-foreground
574/80",children:[e.jsx(Te,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:212",className:"w-3.5 h-3.5 text-envora-green mt-0.5 flex-shrink-0"}),D]},M))})]}),Array.isArray(C.criticalGaps)&&C.criticalGaps.length>0&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:220",className:"bg-red-50 rounded-xl p-4",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:221",className:"text-xs font-semibold text-red-500 uppercase tracking-wider mb-3",children:"Critical Gaps"}),e.jsx("ul",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:222",className:"space-y-2",children:C.criticalGaps.map((D,M)=>e.jsxs("li",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:224",className:"flex items-start gap-2 text-sm text-foreground/80",children:[e.jsx(Zt,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:225",className:"w-3.5 h-3.5 text-red-400 mt-0.5 flex-shrink-0"}),D]},M))})]})]})]})]}),Object.keys(E).length>0&&e.jsxs(_e,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:238",className:"border-0 shadow-sm",children:[e.jsx(Ft,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:239",className:"pb-2",children:e.jsx(Xt,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:240",className:"text-base font-semibold text-foreground",children:"Criterion-Level Results"})}),e.jsx(Me,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:242",className:"p-0",children:e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:243",className:"divide-y divide-border/60",children:Object.entries(E).map(([D,M])=>e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:245",className:"px-6 py-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:246",className:"flex items-center gap-3 mb-2",children:[AP[M.verdict??"na"],e.jsx("span",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:248",className:"font-mono text-xs text-muted-foreground/70",children:D}),e.jsx(Qe,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:249",className:`text-xs ${M.verdict==="pass"?"bg-envora-green/10 text-envora-green border-envora-green/20":M.verdict==="partial"?"bg-envora-gold/10 text-envora-gold border-envora-gold/20":M.verdict==="fail"?"bg-red-50 text-red-500 border-red-200":"bg-muted text-muted-foreground/70 border-border"}`,children:M.verdict?.toUpperCase()??"N/A"})]}),M.recommendations?.length>0&&e.jsx("div",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:254",className:"ml-7 text-xs text-muted-foreground space-y-1",children:M.recommendations.map((z,O)=>e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:256",className:"flex items-start gap-1.5",children:[e.jsx(Ya,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:257",className:"w-3 h-3 mt-0.5 flex-shrink-0 text-envora-pine"}),z]},O))})]},D))})})]}),Array.isArray(C?.correctiveActions)&&(C?.correctiveActions).length>0&&e.jsxs(_e,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:271",className:"border-0 shadow-sm",children:[e.jsx(Ft,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:272",className:"pb-2",children:e.jsx(Xt,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:273",className:"text-base font-semibold text-foreground",children:"Corrective Action Plan"})}),e.jsx(Me,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:275",className:"space-y-3",children:C.correctiveActions.map((D,M)=>e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:277",className:"flex items-start gap-3 p-3 rounded-xl bg-muted/40",children:[e.jsx(Qe,{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:278",className:`text-xs flex-shrink-0 mt-0.5 ${D.priority==="high"?"bg-red-50 text-red-500 border-red-200":D.priority==="medium"?"bg-envora-gold/10 text-envora-gold border-envora-gold/20":"bg-muted text-muted-foreground border-border"}`,children:D.priority?.toUpperCase()}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:281",className:"flex-1",children:[e.jsx("p",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:282",className:"text-sm text-foreground
574/90",children:D.action}),D.timeline&&e.jsxs("p",{"data-loc":"client/src/pages/supplier/AssessmentReport.tsx:283",className:"text-xs text-muted-foreground/70 mt-1",children:["Timeline: ",D.timeline]})]})]},M))})]})]})]})}function EP(){const[,t]=ds(),[n,r]=b.useState({name:"",brand:"",country:"UAE",emirate:"",starRating:5}),o=ue.hotel.setupProperty.useMutation({onSuccess:()=>{xe.success("Hotel profile saved!"),t("/hotel/dashboard")},onError:i=>xe.error(i.message)});return e.jsx("div",{"data-loc":"client/src/pages/hotel/Onboarding.tsx:20",className:"min-h-screen bg-muted/40 flex items-center justify-center p-4",children:e.jsx(_e,{"data-loc":"client/src/pages/hotel/Onboarding.tsx:21",className:"border-0 shadow-sm max-w-lg w-full",children:e.jsxs(Me,{"data-loc":"client/src/pages/hotel/Onboarding.tsx:22",className:"p-8",children:[e.jsx("div",{"data-loc":"client/src/pages/hotel/Onboarding.tsx:23",className:"flex items-center gap-2 mb-6",children:e.jsx("img",{"data-loc":"client/src/pages/hotel/Onboarding.tsx:24",src:"/manus-storage/envora-logo_f789bcb1.webp",alt:"Envora Consulting",className:"h-9 w-auto"})}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/Onboarding.tsx:26",className:"mb-6",children:[e.jsx("h1",{"data-loc":"client/src/pages/hotel/Onboarding.tsx:27",className:"font-display text-2xl font-extrabold text-foreground mb-1 tracking-tight",children:"Set Up Your Hotel"}),e.jsx("p",{"data-loc":"client/src/pages/hotel/Onboarding.tsx:28",className:"text-muted-foreground text-sm",children:"Configure your hotel profile to start managing supplier sustainability."})]}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/Onboarding.tsx:30",className:"space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/hotel/Onboarding.tsx:31",children:[e.jsx("label",{"data-loc":"client/src/pages/hotel/Onboarding.tsx:32",className:"text-sm font-medium text-foreground/80 mb-1 block",children:"Hotel Name *"}),e.jsx(Ot,{"data-loc":"client/src/pages/hotel/Onboarding.tsx:33",value:n.name,onChange:i=>r({...n,name:i.target.value}),placeholder:"Grand Hyatt Dubai"})]}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/Onboarding.tsx:35",children:[e.jsx("label",{"data-loc":"client/src/pages/hotel/Onboarding.tsx:36",className:"text-sm font-medium text-foreground/80 mb-1 block",children:"Brand / Chain"}),e.jsx(Ot,{"data-loc":"client/src/pages/hotel/Onboarding.tsx:37",value:n.brand,onChange:i=>r({...n,brand:i.target.value}),placeholder:"Hyatt"})]}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/Onboarding.tsx:39",className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/hotel/Onboarding.tsx:40",children:[e.jsx("label",{"data-loc":"client/src/pages/hotel/Onboarding.tsx:41",className:"text-sm font-medium text-foreground/80 mb-1 block",children:"Country"}),e.jsx(Ot,{"data-loc":"client/src/pages/hotel/Onboarding.tsx:42",value:n.country,onChange:i=>r({...n,country:i.target.value})})]}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/Onboarding.tsx:44",children:[e.jsx("label",{"data-loc":"client/src/pages/hotel/Onboarding.tsx:45",className:"text-sm font-medium text-foreground/80 mb-1 block",children:"Emirate / City"}),e.jsx(Ot,{"data-loc":"client/src/pages/hotel/Onboarding.tsx:46",value:n.emirate,onChange:i=>r({...n,emirate:i.target.value}),placeholder:"Dubai"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/Onboarding.tsx:49",children:[e.jsx("label",{"data-loc":"client/src/pages/hotel/Onboarding.tsx:50",className:"text-sm font-medium text-foreground/80 mb-1 block",children:"Star Rating"}),e.jsx("div",{"data-loc":"client/src/pages/hotel/Onboarding.tsx:51",className:"flex gap-2",children:[3,4,5,6,7].map(i=>e.jsxs("button",{"data-loc":"client/src/pages/hotel/Onboarding.tsx:53",onClick:()=>r({...n,starRating:i}),className:`flex-1 py-2 rounded-lg border text-sm font-medium transition-all ${n.starRating===i?"bg-envora-pine text-white border-envora-pine":"border-border text-foreground/70 hover:border-envora-pine"}`,children:[i,"â
"]},i))})]}),e.jsx(ie,{"data-loc":"client/src/pages/hotel/Onboarding.tsx:60",onClick:()=>o.mutate(n),disabled:!n.name||o.isPending,className:"w-full bg-envora-pine hover:bg-envora-pine/90 text-white mt-2",children:o.isPending?"Saving...":"Save Hotel Profile"})]})]})})})}const X1={gold:"bg-amber-50 text-amber-600 border-amber-200",silver:"bg-muted/40 text-muted-foreground border-border",bronze:"bg-orange-50 text-orange-600 border-orange-200",not_yet_rated:"bg-muted/40 text-muted-foreground
574/70 border-border"},RP={approved:"bg-envora-green/10 text-envora-green border-envora-green/20",conditional:"bg-amber-50 text-amber-600 border-amber-200",development_required:"bg-red-50 text-red-500 border-red-200"};function kP(){const[,t]=ds(),{user:n,isAuthenticated:r,loading:o,logout:i}=za(),[d,u]=b.useState(""),[p,x]=b.useState(""),[h,v]=b.useState(""),[g,y]=b.useState(""),[N,j]=b.useState(!1),[w,A]=b.useState(null),{data:C,isLoading:E}=ue.hotel.getProperty.useQuery(void 0,{enabled:r}),{data:T,isLoading:D,refetch:M}=ue.hotel.getSupplierNetwork.useQuery(void 0,{enabled:r&&!!C}),{data:z}=ue.hotel.getStats.useQuery(void 0,{enabled:r&&!!C}),{data:O=[]}=ue.hotel.getInvitations.useQuery(void 0,{enabled:r&&!!C}),H=ue.hotel.createInvitation.useMutation({onSuccess:q=>{const Q=q.inviteUrl?.startsWith("http")?q.inviteUrl:`${window.location.origin}${q.inviteUrl}`;A({token:q.token,inviteUrl:Q,emailSent:q.emailSent??!1}),q.emailSent?xe.success(`Invitation sent to ${p}`):xe.success("Invitation link created â copy and share it below."),M()},onError:q=>xe.error(q.message)});function K(){j(!1),x(""),v(""),y(""),A(null)}if(o||E)return e.jsx("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:89",className:"min-h-screen bg-muted/40 p-8",children:e.jsxs("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:90",className:"max-w-6xl mx-auto space-y-6",children:[e.jsx(Ue,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:91",className:"h-20 rounded-2xl"}),e.jsx("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:92",className:"grid grid-cols-4 gap-4",children:[1,2,3,4].map(q=>e.jsx(Ue,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:93",className:"h-28 rounded-2xl"},q))}),e.jsx(Ue,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:95",className:"h-64 rounded-2xl"})]})});if(!C)return e.jsx("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:103",className:"min-h-screen bg-muted/40 flex items-center justify-center",children:e.jsx(_e,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:104",className:"border-0 shadow-sm max-w-md w-full mx-4",children:e.jsxs(Me,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:105",className:"p-8 text-center",children:[e.jsx("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:106",className:"w-16 h-16 rounded-2xl bg-envora-pine/10 flex items-center justify-center mx-auto mb-4",children:e.jsx(Ms,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:107",className:"w-8 h-8 text-envora-pine"})}),e.jsx("h2",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:109",className:"font-display text-xl font-bold text-foreground mb-2",children:"Set Up Your Hotel Profile"}),e.jsx("p",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:110",className:"text-muted-foreground text-sm mb-6",children:"Complete your hotel profile to start managing supplier sustainability."}),e.jsx(ie,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:111",onClick:()=>t("/hotel/onboarding"),className:"bg-envora-pine hover:bg-envora-pine/90 text-white w-full",children:"Set Up Profile"})]})})});const le=(T?.suppliers??[]).filter(q=>!d||q.profile?.businessName?.toLowerCase().includes(d.toLowerCase())||q.profile?.industry?.toLowerCase().includes(d.toLowerCase())),Z=O.filter(q=>q.status==="pending"||q.status==="opened").filter(q=>!d||(q.supplierEmail??"").toLowerCase().includes(d.toLowerCase())||(q.supplierName??"").toLowerCase().includes(d.toLowerCase())),X=T?.stats??{total:0,verified:0,expiring:0,expired:0};return e.jsxs("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:138",className:"min-h-screen bg-muted/40",children:[e.jsxs("nav",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:140",className:"bg-card border-b border-border px-6 py-3.5 flex items-center justify-between sticky top-0 z-10",children:[e.jsxs("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:141",className:"flex items-center gap-3",children:[e.jsx("img",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:142",src:"/manus-storage/envora-logo_f789bcb1.webp",alt:"Envora Consulting",className:"h-9 w-auto"}),e.jsx("span",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:143",className:"text-border mx-1",children:"/"}),e.jsx("span",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:144",className:"text-foreground
574/70 text-sm font-medium",children:C.name})]}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:146",className:"flex items-center gap-3",children:[e.jsx(ie,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:147",variant:"ghost",size:"sm",onClick:()=>t("/hotel/invitations"),children:"Invitations"}),e.jsx(ie,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:148",variant:"ghost",size:"sm",onClick:()=>t("/hotel/campaigns"),children:"Campaigns"}),e.jsxs(ie,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:149",onClick:()=>j(!0),size:"sm",className:"bg-envora-pine hover:bg-envora-pine/90 text-white gap-1.5",children:[e.jsx(n1,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:150",className:"w-4 h-4"})," Add Supplier"]}),e.jsxs(ng,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:152",children:[e.jsx(rg,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:153",asChild:!0,children:e.jsx("button",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:154",className:"w-8 h-8 rounded-full bg-envora-pine/10 flex items-center justify-center text-envora-pine text-sm font-bold hover:bg-envora-pine/20 transition-colors",children:n?.name?.[0]?.toUpperCase()??"H"})}),e.jsxs(lg,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:158",align:"end",className:"w-48",children:[e.jsxs("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:159",className:"px-3 py-2",children:[e.jsx("p",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:160",className:"text-sm font-medium truncate",children:n?.name}),e.jsx("p",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:161",className:"text-xs text-muted-foreground truncate",children:n?.email})]}),e.jsx(JN,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:163"}),e.jsxs(Lu,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:164",onClick:i,className:"cursor-pointer text-destructive focus:text-destructive",children:[e.jsx(Lh,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:165",className:"mr-2 h-4 w-4"}),"Sign out"]})]})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:173",className:"max-w-6xl mx-auto p-8 space-y-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:175",children:[e.jsx("h1",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:176",className:"font-display text-3xl font-extrabold text-foreground tracking-tight",children:"Supplier Network"}),e.jsx("p",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:177",className:"text-muted-foreground mt-1",children:"Manage and review your suppliers' sustainability readiness"})]}),e.jsx("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:181",className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[{label:"Total Suppliers",value:X.total,icon:e.jsx(Ws,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:183",className:"w-5 h-5"}),color:"text-envora-pine bg-envora-pine/10"},{label:"Verified",value:X.verified,icon:e.jsx(Ut,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:184",className:"w-5 h-5"}),color:"text-envora-green bg-envora-green/10"},{label:"Expiring Soon",value:X.expiring,icon:e.jsx(Bt,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:185",className:"w-5 h-5"}),color:"text-envora-gold bg-envora-gold/10"},{label:"Expired",value:X.expired,icon:e.jsx(sn,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:186",className:"w-5 h-5"}),color:"text-red-500 bg-red-50"}].map(q=>e.jsx(_e,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:188",className:"border-0 shadow-sm",children:e.jsxs(Me,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:189",className:"p-5 flex items-center gap-4",children:[e.jsx("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:190",className:`w-10 h-10 rounded-xl flex items-center justify-center ${q.color}`,children:q.icon}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:193",children:[e.jsx("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:194",className:"font-display text-2xl font-bold text-foreground",children:q.value}),e.jsx("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:195",className:"text-xs text-muted-foreground",children:q.label})]})]})},q.label))}),e.jsx(ku,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:203",open:N,onOpenChange:q=>{q||K()},children:e.jsxs(Du,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:204",className:"sm:max-w-md",children:[e.jsx(Tu,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:205",children:e.jsxs(Ou,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:206",className:"flex items-center gap-2",style:{fontFamily:"'Fraunces', serif"},children:[e.jsx(n1,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:207",className:"w-5 h-5 text-envora-pine"}),"Add New Supplier"]})}),w?e.jsxs("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:251",className:"space-y-4 py-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:252",className:"flex flex-col items-center text-center gap-3 py-4",children:[e.jsx("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:253",className:"w-14 h-14 roun
574ded-2xl bg-envora-green/10 flex items-center justify-center",children:w.emailSent?e.jsx(Tr,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:255",className:"w-7 h-7 text-envora-green"}):e.jsx(Xf,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:256",className:"w-7 h-7 text-envora-pine"})}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:258",children:[e.jsx("p",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:259",className:"font-semibold text-foreground",children:w.emailSent?`Invitation sent to ${p}`:"Invitation link created"}),e.jsx("p",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:262",className:"text-sm text-muted-foreground mt-1",children:w.emailSent?"The supplier will receive an email with a link to complete their assessment.":"Copy the link below and share it with your supplier."})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:269",className:"flex items-center gap-2 bg-muted/50 border border-border rounded-lg px-3 py-2.5",children:[e.jsx("span",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:270",className:"text-xs font-mono text-foreground/60 flex-1 truncate",children:w.inviteUrl}),e.jsx("button",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:273",onClick:()=>{navigator.clipboard.writeText(w.inviteUrl),xe.success("Link copied!")},className:"shrink-0 p-1 rounded hover:bg-muted text-envora-pine hover:text-envora-pine/80 transition-colors",title:"Copy link",children:e.jsx(zr,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:281",className:"w-4 h-4"})})]})]}):e.jsxs("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:213",className:"space-y-4 py-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:214",children:[e.jsx(At,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:215",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide mb-1.5 block",children:"Supplier Name"}),e.jsx(Ot,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:216",placeholder:"e.g. Al Noor Catering LLC",value:h,onChange:q=>v(q.target.value)})]}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:222",children:[e.jsx(At,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:223",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide mb-1.5 block",children:"Email Address *"}),e.jsx(Ot,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:224",type:"email",placeholder:"[email protected]",value:p,onChange:q=>x(q.target.value),onKeyDown:q=>{q.key==="Enter"&&p&&H.mutate({supplierEmail:p,supplierName:h||void 0,message:g||void 0})}}),e.jsx("p",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:235",className:"text-xs text-muted-foreground/70 mt-1",children:"An invitation email will be sent automatically."})]}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:237",children:[e.jsx(At,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:238",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide mb-1.5 block",children:"Personal Message (optional)"}),e.jsx(Qa,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:239",placeholder:"Add a personal note to the supplier...",value:g,onChange:q=>y(q.target.value),rows:3})]}),e.jsx("p",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:246",className:"text-xs text-muted-foreground/70 bg-muted/40 rounded-lg px-3 py-2",children:"Hotel-invited suppliers complete the assessment at no cost â the subscription fee is waived."})]}),e.jsx(Zi,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:287",children:w?e.jsx(ie,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:301",onClick:K,className:"bg-envora-pine hover:bg-envora-pine/90 text-white w-full",children:"Done"}):e.jsxs(e.Fragment,{children:[e.jsx(ie,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:290",variant:"outline",onClick:K,children:"Cancel"}),e.jsxs(ie,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:291",onClick:()=>H.mutate({supplierEmail:p,supplierName:h||void 0,message:g||void 0}),disabled:!p||H.isPending,className:"bg-envora-pine hover:bg-envora-pine/90 text-white gap-2",children:[e.jsx(Tr,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:296",className:"w-4 h-4"}),H.isPending?"Sending...":"Send Invitation"]})]})})]})}),e.jsxs(_e,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:308",className:"border-0 shadow-sm",children:[e.jsx(Ft,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:309",className:"pb-3",children:e.jsxs("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:310",className:"flex items-center justify-between",children:[e.jsxs(Xt,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:311",className:"text-base font-semibold text-foreground",children:["Suppliers (",le.length,")"]}),e.jsx("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:312",className:"flex items-center gap-2",children:e.jsxs("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:313",className:"relative",children:[e.jsx(CS,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:314",className:"w-4 h-4 absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground
574/70"}),e.jsx(Ot,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:315",placeholder:"Search suppliers...",value:d,onChange:q=>u(q.target.value),className:"pl-9 w-56 text-sm"})]})})]})}),e.jsx(Me,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:325",className:"p-0",children:D?e.jsx("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:327",className:"p-6 space-y-3",children:[1,2,3].map(q=>e.jsx(Ue,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:328",className:"h-16 rounded-xl"},q))}):le.length===0&&Z.length===0?e.jsxs("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:331",className:"p-12 text-center",children:[e.jsx(Ws,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:332",className:"w-10 h-10 text-muted-foreground/30 mx-auto mb-3"}),e.jsx("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:333",className:"font-semibold text-foreground/70 mb-1",children:"No suppliers yet"}),e.jsx("p",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:334",className:"text-sm text-muted-foreground/70 mb-4",children:"Invite your first supplier to get started"}),e.jsxs(ie,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:335",onClick:()=>j(!0),variant:"outline",size:"sm",children:[e.jsx(jc,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:336",className:"w-4 h-4 mr-1.5"})," Invite Supplier"]})]}):e.jsxs("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:340",className:"divide-y divide-border/60",children:[Z.map(q=>e.jsxs("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:343",className:"flex items-center gap-4 px-6 py-4 opacity-70",children:[e.jsx("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:344",className:"w-10 h-10 rounded-xl bg-muted flex items-center justify-center text-muted-foreground flex-shrink-0",children:e.jsx(Tr,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:345",className:"w-4 h-4"})}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:347",className:"flex-1 min-w-0",children:[e.jsx("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:348",className:"font-semibold text-foreground text-sm truncate",children:q.supplierName||q.supplierEmail||"Invited Supplier"}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:351",className:"text-xs text-muted-foreground",children:["Invited ",new Date(q.createdAt).toLocaleDateString()]})]}),e.jsxs(Qe,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:355",className:"text-xs border bg-amber-50 text-amber-600 border-amber-200",children:[e.jsx(Bt,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:356",className:"w-3 h-3 mr-1"}),"Pending"]})]},`inv-${q.id}`)),le.map(q=>{const Q=q.assessment?.band??"not_yet_rated",R=q.latestDecision?.decision;return e.jsxs("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:365",className:"flex items-center gap-4 px-6 py-4 hover:bg-muted/40 cursor-pointer transition-colors",onClick:()=>t(`/hotel/supplier/${q.link.supplierId}`),children:[e.jsx("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:370",className:"w-10 h-10 rounded-xl bg-envora-pine/10 flex items-center justify-center text-envora-pine font-bold text-sm flex-shrink-0",children:q.profile?.businessName?.[0]?.toUpperCase()??"?"}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:373",className:"flex-1 min-w-0",children:[e.jsx("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:374",className:"font-semibold text-foreground text-sm truncate",children:q.profile?.businessName??"Unknown Supplier"}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:375",className:"text-xs text-muted-foreground",children:[q.profile?.industry," / ",q.profile?.country]})]}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:377",className:"flex items-center gap-2",children:[q.assessment?.overallScore&&e.jsxs("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:379",className:"text-right",children:[e.jsx("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:380",className:"font-display text-lg font-bold text-foreground",children:Number(q.assessment.overallScore).toFixed(0)}),e.jsx("div",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:381",className:"text-xs text-muted-foreground
574/70",children:"/ 100"})]}),e.jsx(Qe,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:384",className:`text-xs border ${X1[Q]??X1.not_yet_rated}`,children:Q.replace("_"," ").replace(/\b\w/g,P=>P.toUpperCase())}),R&&e.jsx(Qe,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:388",className:`text-xs border ${RP[R]??""}`,children:R.replace("_"," ").replace(/\b\w/g,P=>P.toUpperCase())})]}),q.shareToken&&e.jsxs("button",{"data-loc":"client/src/pages/hotel/Dashboard.tsx:394",onClick:P=>{P.stopPropagation(),window.open(`/portal/supplier-review/${q.shareToken}`,"_blank")},className:"flex items-center gap-1 px-2.5 py-1 rounded-lg text-xs font-semibold bg-envora-pine text-white hover:bg-envora-pine/90 transition-colors flex-shrink-0",title:"View Readiness Report",children:[e.jsx(Dt,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:399",className:"w-3.5 h-3.5"}),"View Report"]}),e.jsx(qe,{"data-loc":"client/src/pages/hotel/Dashboard.tsx:403",className:"w-4 h-4 text-muted-foreground/70 flex-shrink-0"})]},q.link.id)})]})})]})]})]})}const Z1={complete:{label:"Complete",icon:e.jsx(Te,{"data-loc":"client/src/components/DocumentReviewPanel.tsx:39",className:"w-3.5 h-3.5"}),className:"bg-envora-green/10 text-envora-green border-envora-green/20"},draft:{label:"Draft",icon:e.jsx(Bt,{"data-loc":"client/src/components/DocumentReviewPanel.tsx:44",className:"w-3.5 h-3.5"}),className:"bg-amber-50 text-amber-600 border-amber-200"},na:{label:"N/A",icon:e.jsx(Go,{"data-loc":"client/src/components/DocumentReviewPanel.tsx:49",className:"w-3.5 h-3.5"}),className:"bg-muted/60 text-muted-foreground border-border"}};function DP({entry:t}){const[n,r]=b.useState(!1),o=Z1[t.status]??Z1.draft,i=Object.entries(t.fields??{}).filter(([,u])=>u&&String(u).trim()),d=t.attachments??[];return e.jsxs("div",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:62",className:"rounded-xl border border-border bg-card overflow-hidden",children:[e.jsxs("button",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:63",className:"w-full flex items-center gap-3 px-4 py-3 text-left hover:bg-muted/30 transition-colors",onClick:()=>r(u=>!u),children:[e.jsxs("div",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:67",className:"flex-1 min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:68",className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:69",className:"text-sm font-medium text-foreground truncate",children:t.documentType.replace(/_/g," ").replace(/\b\w/g,u=>u.toUpperCase())}),e.jsxs(Qe,{"data-loc":"client/src/components/DocumentReviewPanel.tsx:72",variant:"outline",className:`text-[11px] px-2 py-0 flex items-center gap-1 ${o.className}`,children:[o.icon,o.label]}),d.length>0&&e.jsxs("span",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:80",className:"flex items-center gap-1 text-[11px] text-muted-foreground",children:[e.jsx(s1,{"data-loc":"client/src/components/DocumentReviewPanel.tsx:81",className:"w-3 h-3"}),d.length," file",d.length>1?"s":""]})]}),t.naReason&&e.jsxs("p",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:87",className:"text-xs text-muted-foreground mt-0.5 truncate",children:["N/A: ",t.naReason]})]}),n?e.jsx(Ps,{"data-loc":"client/src/components/DocumentReviewPanel.tsx:91",className:"w-4 h-4 text-muted-foreground flex-shrink-0"}):e.jsx(qe,{"data-loc":"client/src/components/DocumentReviewPanel.tsx:93",className:"w-4 h-4 text-muted-foreground flex-shrink-0"})]}),n&&e.jsxs("div",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:98",className:"px-4 pb-4 space-y-3 border-t border-border bg-muted/10",children:[i.length>0?e.jsx("div",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:101",className:"grid grid-cols-1 sm:grid-cols-2 gap-3 pt-3",children:i.map(([u,p])=>e.jsxs("div",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:103",children:[e.jsx("div",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:104",className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider mb-0.5",children:u.replace(/([A-Z])/g," $1").replace(/^./,x=>x.toUpperCase())}),e.jsx("div",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:107",className:"text-sm text-foreground
574/90 leading-snug break-words",children:p})]},u))}):t.status!=="na"&&e.jsx("p",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:113",className:"text-xs text-muted-foreground pt-3 italic",children:"No field data entered yet."}),t.notes&&e.jsxs("div",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:119",className:"pt-1",children:[e.jsx("div",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:120",className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider mb-0.5",children:"Notes"}),e.jsx("p",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:121",className:"text-sm text-foreground/80 leading-relaxed",children:t.notes})]}),d.length>0&&e.jsxs("div",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:127",className:"pt-1",children:[e.jsx("div",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:128",className:"text-[11px] font-semibold text-muted-foreground uppercase tracking-wider mb-1.5",children:"Attachments"}),e.jsx("div",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:129",className:"space-y-1.5",children:d.map(u=>e.jsxs("a",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:131",href:u.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-sm text-envora-pine hover:text-envora-pine/80 transition-colors group",children:[e.jsx(s1,{"data-loc":"client/src/components/DocumentReviewPanel.tsx:138",className:"w-3.5 h-3.5 flex-shrink-0"}),e.jsx("span",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:139",className:"truncate",children:u.name}),e.jsx(Ya,{"data-loc":"client/src/components/DocumentReviewPanel.tsx:140",className:"w-3 h-3 flex-shrink-0 opacity-0 group-hover:opacity-100 transition-opacity"})]},u.key))})]}),t.status==="na"&&t.naReason&&e.jsxs("div",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:149",className:"pt-1 flex items-start gap-2 text-sm text-muted-foreground",children:[e.jsx(Go,{"data-loc":"client/src/components/DocumentReviewPanel.tsx:150",className:"w-3.5 h-3.5 mt-0.5 flex-shrink-0"}),e.jsxs("span",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:151",children:["Marked as not applicable: ",t.naReason]})]})]})]})}function TP({criterion:t,entries:n}){const[r,o]=b.useState(!0),i=n.filter(x=>x.status==="complete").length,d=n.filter(x=>x.status==="na").length,u=n.filter(x=>x.status==="draft").length,p={environment:"bg-envora-green/10 text-envora-green",labor:"bg-blue-50 text-blue-600",ethics:"bg-purple-50 text-purple-600",procurement:"bg-envora-gold/10 text-envora-gold"};return e.jsxs("div",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:181",className:"rounded-xl border border-border overflow-hidden",children:[e.jsxs("button",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:182",className:"w-full flex items-center gap-3 px-4 py-3.5 text-left bg-card hover:bg-muted/30 transition-colors",onClick:()=>o(x=>!x),children:[e.jsxs("div",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:186",className:"flex-1 min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:187",className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:188",className:`text-[11px] font-bold px-2 py-0.5 rounded-md ${p[t.theme]??"bg-muted text-muted-foreground"}`,children:t.code}),e.jsx("span",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:191",className:"text-sm font-semibold text-foreground truncate",children:t.title})]}),e.jsxs("div",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:193",className:"flex items-center gap-3 mt-1 text-[11px] text-muted-foreground",children:[e.jsxs("span",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:194",className:"flex items-center gap-1",children:[e.jsx(Te,{"data-loc":"client/src/components/DocumentReviewPanel.tsx:195",className:"w-3 h-3 text-envora-green"}),i," complete"]}),u>0&&e.jsxs("span",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:199",className:"flex items-center gap-1",children:[e.jsx(Bt,{"data-loc":"client/src/components/DocumentReviewPanel.tsx:200",className:"w-3 h-3 text-amber-500"}),u," draft"]}),d>0&&e.jsxs("span",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:205",className:"flex items-center gap-1",children:[e.jsx(Go,{"data-loc":"client/src/components/DocumentReviewPanel.tsx:206",className:"w-3 h-3 text-muted-foreground"}),d," N/A"]})]})]}),r?e.jsx(Ps,{"data-loc":"client/src/components/DocumentReviewPanel.tsx:213",className:"w-4 h-4 text-muted-foreground flex-shrink-0"}):e.jsx(qe,{"data-loc":"client/src/components/DocumentReviewPanel.tsx:215",className:"w-4 h-4 text-muted-foreground flex-shrink-0"})]}),r&&e.jsx("div",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:220",className:"px-4 pb-4 pt-2 space-y-2 border-t border-border bg-muted/5",children:n.length===0?e.jsx("p",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:222",className:"text-xs text-muted-foreground italic py-2",children:"No documents submitted for this criterion."}):n.map(x=>e.jsx(DP,{"data-loc":"client/src/components/DocumentReviewPanel.tsx:224",entry:x},x.id))})]})}function OP({supplierId:t}){const{data:n,isLoading:r}=ue.hotel.getSupplierDocuments.useQuery({supplierId:t},{enabled:!!t});if(r)return e.jsxs("div",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:241",className:"space-y-3",children:[e.jsx(Ue,{"data-loc":"client/src/components/DocumentReviewPanel.tsx:242",className:"h-16 rounded-xl"}),e.jsx(Ue,{"data-loc":"client/src/components/DocumentReviewPanel.tsx:243",className:"h-16 rounded-xl"}),e.jsx(Ue,{"data-loc":"client/src/components/DocumentReviewPanel.tsx:244",className:"h-16 rounded-xl"})]});if(!n||n.entries.length===0)return e.jsxs("div",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:251",className:"flex flex-col items-center justify-center py-16 text-center",children:[e.jsx("div",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:252",className:"w-14 h-14 roun
574ded-2xl bg-muted/60 flex items-center justify-center mb-4",children:e.jsx(SS,{"data-loc":"client/src/components/DocumentReviewPanel.tsx:253",className:"w-7 h-7 text-muted-foreground/50"})}),e.jsx("p",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:255",className:"text-sm font-medium text-foreground/70",children:"No documents submitted yet"}),e.jsx("p",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:256",className:"text-xs text-muted-foreground mt-1",children:"The supplier has not filled in any Document Builder entries for this assessment."})]});const o=new Map;for(const h of n.entries){const v=o.get(h.criterionId)??[];v.push(h),o.set(h.criterionId,v)}const i=n.criteria.filter(h=>o.has(h.id)),d=n.entries.length,u=n.entries.filter(h=>h.status==="complete").length,p=n.entries.filter(h=>h.status==="na").length,x=d-u-p;return e.jsxs("div",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:283",className:"space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:285",className:"flex items-center gap-4 p-4 rounded-xl bg-muted/30 border border-border text-sm flex-wrap",children:[e.jsxs("div",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:286",className:"flex items-center gap-1.5",children:[e.jsx(Dt,{"data-loc":"client/src/components/DocumentReviewPanel.tsx:287",className:"w-4 h-4 text-muted-foreground"}),e.jsx("span",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:288",className:"font-semibold text-foreground",children:d}),e.jsx("span",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:289",className:"text-muted-foreground",children:"documents"})]}),e.jsxs("div",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:291",className:"flex items-center gap-1.5",children:[e.jsx(Te,{"data-loc":"client/src/components/DocumentReviewPanel.tsx:292",className:"w-4 h-4 text-envora-green"}),e.jsx("span",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:293",className:"font-semibold text-envora-green",children:u}),e.jsx("span",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:294",className:"text-muted-foreground",children:"complete"})]}),x>0&&e.jsxs("div",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:297",className:"flex items-center gap-1.5",children:[e.jsx(Bt,{"data-loc":"client/src/components/DocumentReviewPanel.tsx:298",className:"w-4 h-4 text-amber-500"}),e.jsx("span",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:299",className:"font-semibold text-amber-600",children:x}),e.jsx("span",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:300",className:"text-muted-foreground",children:"draft"})]}),p>0&&e.jsxs("div",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:304",className:"flex items-center gap-1.5",children:[e.jsx(Go,{"data-loc":"client/src/components/DocumentReviewPanel.tsx:305",className:"w-4 h-4 text-muted-foreground"}),e.jsx("span",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:306",className:"font-semibold text-muted-foreground",children:p}),e.jsx("span",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:307",className:"text-muted-foreground",children:"N/A"})]}),e.jsxs("div",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:310",className:"flex items-center gap-1.5 ml-auto",children:[e.jsx(tt,{"data-loc":"client/src/components/DocumentReviewPanel.tsx:311",className:"w-4 h-4 text-muted-foreground/60"}),e.jsx("span",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:312",className:"text-xs text-muted-foreground",children:"Read-only view"})]})]}),e.jsx("div",{"data-loc":"client/src/components/DocumentReviewPanel.tsx:317",className:"space-y-3",children:i.map(h=>e.jsx(TP,{"data-loc":"client/src/components/DocumentReviewPanel.tsx:319",criterion:h,entries:o.get(h.id)??[]},h.id))})]})}const W1={high:{label:"High",color:"#DC2626",bg:"#FEF2F2"},medium:{label:"Medium",color:"#D97706",bg:"#FFFBEB"},low:{label:"Low",color:"#16A34A",bg:"#F0FDF4"}},J1={open:{label:"Open",color:"#DC2626",bg:"#FEF2F2"},in_progress:{label:"In Progress",color:"#D97706",bg:"#FFFBEB"},resolved:{label:"Resolved",color:"#16A34A",bg:"#F0FDF4"}},_P=[{value:"approved",label:"Approved",desc:"Supplier meets your sustainability requirements",color:"border-envora-green bg-envora-green/5 text-envora-green",icon:e.jsx(Te,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:31",className:"w-5 h-5"})},{value:"conditional",label:"Conditional",desc:"Approved with conditions to be met within a timeframe",color:"border-envora-gold bg-envora-gold/5 text-envora-gold",icon:e.jsx(tt,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:32",className:"w-5 h-5"})},{value:"development_required",label:"Development Required",desc:"Supplier needs to improve before approval",color:"border-red-400 bg-red-50 text-red-600",icon:e.jsx(Zt,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:33",className:"w-5 h-5"})}],MP={gold:"text-amber-500 bg-amber-50 border-amber-200",silver:"text-muted-foreground bg-muted/40 border-border",bronze:"text-amber-700 bg-amber-50 border-amber-200",not_yet_rated:"text-muted-foreground
574/70 bg-muted/40 border-border"};function PP(){const{id:t}=ea(),n=parseInt(t??"0"),[,r]=ds(),[o,i]=b.useState(""),[d,u]=b.useState(""),[p,x]=b.useState(!1),[h,v]=b.useState("overview"),{data:g,isLoading:y,refetch:N}=ue.hotel.getSupplierDetail.useQuery({supplierId:n},{enabled:!!n}),j=ue.hotel.reopenAssessment.useMutation({onSuccess:()=>{xe.success("Assessment re-opened â the supplier can now update and resubmit."),N()},onError:Z=>xe.error(Z.message)}),w=ue.hotel.makeDecision.useMutation({onSuccess:()=>{xe.success("Decision recorded successfully"),x(!1),i(""),u(""),N()},onError:Z=>xe.error(Z.message)}),A=ue.hotel.shareDecision.useMutation({onSuccess:()=>{xe.success("Decision shared with supplier"),N()},onError:Z=>xe.error(Z.message)});if(y)return e.jsx("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:81",className:"min-h-screen bg-muted/40 p-8",children:e.jsxs("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:82",className:"max-w-4xl mx-auto space-y-4",children:[e.jsx(Ue,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:83",className:"h-16 rounded-2xl"}),e.jsx(Ue,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:84",className:"h-48 rounded-2xl"}),e.jsx(Ue,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:85",className:"h-64 rounded-2xl"})]})});if(!g?.profile)return e.jsx("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:93",className:"min-h-screen bg-muted/40 flex items-center justify-center",children:e.jsx("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:94",className:"text-muted-foreground",children:"Supplier not found"})});const{profile:C,assessment:E,decisions:T,report:D,scope3:M,shareToken:z}=g,O=E?.band??"not_yet_rated",H=D?.reportData??null,K=T?.[0],ne=E&&(E.state==="ai_audited"||E.state==="verified"),le=E&&["submitted","ai_audited","verified","expiring"].includes(E.state);return e.jsxs("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:108",className:"min-h-screen bg-muted/40",children:[e.jsxs("nav",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:110",className:"bg-card border-b border-border px-6 py-4 flex items-center gap-3 sticky top-0 z-10",children:[e.jsx("button",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:111",onClick:()=>r("/hotel/dashboard"),className:"text-muted-foreground/70 hover:text-foreground/80 transition-colors",children:e.jsx(hn,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:112",className:"w-5 h-5"})}),e.jsx("img",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:114",src:"/manus-storage/envora-logo_f789bcb1.webp",alt:"Envora Consulting",className:"h-9 w-auto"}),e.jsx("span",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:115",className:"text-border",children:"/"}),e.jsx("span",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:116",className:"text-foreground/70 text-sm",children:C.businessName})]}),e.jsx("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:120",className:"border-b border-border bg-card",children:e.jsxs("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:121",className:"max-w-4xl mx-auto px-8 flex items-center gap-1",children:[e.jsx("button",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:122",onClick:()=>v("overview"),className:`px-4 py-3 text-sm font-medium border-b-2 transition-colors ${h==="overview"?"border-envora-pine text-envora-pine":"border-transparent text-muted-foreground hover:text-foreground"}`,children:"Overview"}),e.jsxs("button",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:132",onClick:()=>v("documents"),className:`flex items-center gap-1.5 px-4 py-3 text-sm font-medium border-b-2 transition-colors ${h==="documents"?"border-envora-pine text-envora-pine":"border-transparent text-muted-foreground hover:text-foreground"}`,children:[e.jsx(SS,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:140",className:"w-3.5 h-3.5"}),"Documents"]})]})}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:14
5746",className:"max-w-4xl mx-auto p-8 space-y-6",children:[h==="documents"&&e.jsx(OP,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:149",supplierId:n}),h==="overview"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:155",className:"flex items-start justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:156",children:[e.jsx("h1",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:157",className:"font-display text-2xl font-bold text-foreground",children:C.businessName}),e.jsxs("p",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:158",className:"text-muted-foreground text-sm mt-1",children:[C.country," / ",C.sizeband?.toUpperCase()]})]}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:160",className:"flex items-center gap-3",children:[z&&e.jsxs(ie,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:162",size:"sm",className:"bg-envora-pine hover:bg-envora-pine/90 text-white gap-1.5",onClick:()=>window.open(`/portal/supplier-review/${z}`,"_blank"),children:[e.jsx(Dt,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:167",className:"w-4 h-4"}),"View Readiness Report"]}),E?.overallScore&&e.jsxs("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:172",className:"text-right",children:[e.jsx("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:173",className:"font-display text-3xl font-bold text-foreground",children:Number(E.overallScore).toFixed(0)}),e.jsx("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:174",className:"text-xs text-muted-foreground/70",children:"/ 100"})]}),e.jsxs(Qe,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:177",className:`text-sm px-3 py-1 border ${MP[O]}`,children:[e.jsx(Ut,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:178",className:"w-3.5 h-3.5 mr-1.5"}),O.replace("_"," ").replace(/\b\w/g,Z=>Z.toUpperCase())]})]})]}),E&&e.jsxs(_e,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:186",className:"border-0 shadow-sm",children:[e.jsx(Ft,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:187",className:"pb-2",children:e.jsx(Xt,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:188",className:"text-base font-semibold text-foreground",children:"Assessment Scores"})}),e.jsx(Me,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:190",className:"space-y-3",children:[{key:"envScore",label:"Environment",weight:"30%"},{key:"laborScore",label:"Labor & Human Rights",weight:"30%"},{key:"ethicsScore",label:"Ethics & Governance",weight:"20%"},{key:"procurementScore",label:"Sustainable Procurement",weight:"20%"}].map(Z=>{const X=Number(E[Z.key]??0);return e.jsxs("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:199",children:[e.jsxs("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:200",className:"flex items-center justify-between mb-1",children:[e.jsx("span",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:201",className:"text-sm text-foreground/80",children:Z.label}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:202",className:"flex items-center gap-2",children:[e.jsx("span",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:203",className:"text-xs text-muted-foreground/70",children:Z.weight}),e.jsxs("span",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:204",className:"text-sm font-semibold text-foreground",children:[X.toFixed(0),"/100"]})]})]}),e.jsx(vp,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:207",value:X,className:"h-2"})]},Z.key)})})]}),M&&M.totalScope3TonnesCo2e&&e.jsxs(_e,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:217",className:"border-0 shadow-sm bg-emerald-50/50",children:[e.jsx(Ft,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:218",className:"pb-2",children:e.jsxs("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:219",className:"flex items-center gap-2",children:[e.jsx(Ns,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:220",className:"w-4 h-4 text-envora-pine"}),e.jsx(Xt,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:221",className:"text-base font-semibold text-foreground",children:"Scope 3 Carbon Footprint"})]})}),e.jsxs(Me,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:224",children:[e.jsxs("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:225",className:"flex items-end gap-2",children:[e.jsx("span",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:226",className:"font-display text-3xl font-bold text-envora-pine",children:Number(M.totalScope3TonnesCo2e).toFixed(1)}),e.jsx("span",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:229",className:"text-sm text-muted-foreground mb-1",children:"tCOâe / year"})]}),e.jsxs("p",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:231",className:"text-xs text-muted-foreground mt-1",children:["Reported for ",M.reportingYear??"current year"," â Category 1 (Purchased Goods & Services) and upstream activities. This figure is attributed to your hotel under Scope 3 in the Carbon Tracking module."]})]})]}),H&&e.jsxs(_e,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:241",className:"border-0 shadow-sm",children:[e.jsx(Ft,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:242",className:"pb-2",children:e.jsxs("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:243",className:"flex items-center gap-2",children:[e.jsx(bS,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:244",className:"w-4 h-4 text-envora-pine"}),e.jsx(Xt,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:245",className:"text-base font-semibold text-foreground",children:"AI Audit Summary"})]})}),e.jsxs(Me,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:248",className:"space-y-4",children:[H.executiveSummary&&e.jsx("p",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:250",className:"text-sm text-foreground
574/80 leading-relaxed",children:H.executiveSummary}),Array.isArray(H.keyStrengths)&&H.keyStrengths.length>0&&e.jsxs("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:253",children:[e.jsx("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:254",className:"text-xs font-semibold text-envora-green uppercase tracking-wider mb-2",children:"Key Strengths"}),e.jsx("ul",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:255",className:"space-y-1",children:H.keyStrengths.map((Z,X)=>e.jsxs("li",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:257",className:"flex items-start gap-2 text-sm text-foreground/80",children:[e.jsx(Te,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:258",className:"w-3.5 h-3.5 text-envora-green mt-0.5 flex-shrink-0"}),Z]},X))})]}),Array.isArray(H.criticalGaps)&&H.criticalGaps.length>0&&e.jsxs("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:266",children:[e.jsx("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:267",className:"text-xs font-semibold text-red-500 uppercase tracking-wider mb-2",children:"Critical Gaps"}),e.jsx("ul",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:268",className:"space-y-1",children:H.criticalGaps.map((Z,X)=>e.jsxs("li",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:270",className:"flex items-start gap-2 text-sm text-foreground/80",children:[e.jsx(Zt,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:271",className:"w-3.5 h-3.5 text-red-400 mt-0.5 flex-shrink-0"}),Z]},X))})]})]})]}),e.jsxs(_e,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:283",className:"border-0 shadow-sm",children:[e.jsx(Ft,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:284",className:"pb-2",children:e.jsxs("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:285",className:"flex items-center justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:286",className:"flex items-center gap-2",children:[e.jsx(dT,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:287",className:"w-4 h-4 text-envora-pine"}),e.jsx(Xt,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:288",className:"text-base font-semibold text-foreground",children:"Procurement Decision"})]}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:290",className:"flex items-center gap-2",children:[le&&e.jsxs(ie,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:292",variant:"outline",size:"sm",disabled:j.isPending,onClick:()=>{confirm("Re-open this assessment? The supplier will be able to edit and resubmit their responses.")&&j.mutate({assessmentId:E.id,supplierId:n})},className:"text-amber-600 border-amber-300 hover:bg-amber-50",children:[e.jsx(Or,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:303",className:"w-3.5 h-3.5 mr-1.5"}),j.isPending?"Re-opening...":"Re-open Assessment"]}),ne&&!p&&e.jsx(ie,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:308",onClick:()=>x(!0),size:"sm",className:"bg-envora-pine hover:bg-envora-pine/90 text-white",children:"Make Decision"})]})]})}),e.jsx(Me,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:315",children:K&&!p?e.jsxs("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:317",className:"space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:318",className:`p-4 rounded-xl border-2 ${K.decision==="approved"?"border-envora-green bg-envora-green/5":K.decision==="conditional"?"border-envora-gold bg-envora-gold/5":"border-red-400 bg-red-50"}`,children:[e.jsxs("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:323",className:"flex items-center justify-between mb-2",children:[e.jsx("span",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:324",className:"font-semibold text-foreground capitalize",children:K.decision.replace("_"," ")}),e.jsx("span",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:325",className:"text-xs text-muted-foreground/70",children:new Date(K.createdAt).toLocaleDateString()})]}),K.feedback&&e.jsx("p",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:328",className:"text-sm text-foreground
574/80",children:K.feedback})]}),!K.isSharedWithSupplier&&e.jsxs(ie,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:332",onClick:()=>A.mutate({decisionId:K.id}),disabled:A.isPending,variant:"outline",size:"sm",className:"w-full",children:[e.jsx(qa,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:339",className:"w-4 h-4 mr-1.5"}),"Share Decision with Supplier"]}),K.isSharedWithSupplier&&e.jsxs("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:344",className:"flex items-center gap-2 text-xs text-envora-green",children:[e.jsx(Te,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:345",className:"w-3.5 h-3.5"}),"Decision shared with supplier"]}),e.jsx(ie,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:349",onClick:()=>x(!0),variant:"ghost",size:"sm",children:"Update Decision"})]}):p?e.jsxs("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:354",className:"space-y-4",children:[e.jsx("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:355",className:"grid grid-cols-1 gap-3",children:_P.map(Z=>e.jsx("button",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:357",onClick:()=>i(Z.value),className:`p-4 rounded-xl border-2 text-left transition-all ${o===Z.value?Z.color:"border-border bg-card hover:border-stone-300"}`,children:e.jsxs("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:362",className:"flex items-center gap-3",children:[Z.icon,e.jsxs("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:364",children:[e.jsx("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:365",className:"font-semibold text-sm",children:Z.label}),e.jsx("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:366",className:"text-xs opacity-70",children:Z.desc})]})]})},Z.value))}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:372",children:[e.jsxs("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:373",className:"text-sm font-semibold text-foreground mb-2",children:["Feedback / Reason ",e.jsx("span",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:374",className:"text-red-500",children:"*"}),e.jsx("span",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:375",className:"text-xs font-normal text-muted-foreground/70 ml-2",children:"(Required, will be shared with supplier)"})]}),e.jsx(Qa,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:377",value:d,onChange:Z=>u(Z.target.value),placeholder:"Explain your decision in detail. This feedback will be shared with the supplier...",className:"h-28 text-sm"})]}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:384",className:"flex gap-2",children:[e.jsx(ie,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:385",onClick:()=>{if(!o){xe.error("Please select a decision");return}if(d.length<10){xe.error("Feedback must be at least 10 characters");return}w.mutate({supplierId:n,assessmentId:E.id,decision:o,feedback:d})},disabled:w.isPending||!o||d.length<10,className:"bg-envora-pine hover:bg-envora-pine/90 text-white flex-1",children:w.isPending?"Saving...":"Confirm Decision"}),e.jsx(ie,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:401",variant:"ghost",onClick:()=>x(!1),children:"Cancel"})]})]}):e.jsx("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:405",className:"text-center py-6 text-muted-foreground/70 text-sm",children:ne?"No decision made yet. Click 'Make Decision' to proceed.":"Assessment must be AI-audited before a decision can be made."})})]}),E&&Array.isArray(g.correctiveActions)&&g.correctiveActions.length>0&&(()=>{const Z=g.correctiveActions,X=Z.filter(R=>R.status==="open").length,q=Z.filter(R=>R.status==="in_progress").length,Q=Z.filter(R=>R.status==="resolved").length;return e.jsxs(_e,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:420",className:"border-0 shadow-sm",children:[e.jsx(Ft,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:421",className:"pb-2",children:e.jsxs("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:422",className:"flex items-center justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:423",className:"flex items-center gap-2",children:[e.jsx(sn,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:424",className:"w-4 h-4 text-amber-500"}),e.jsx(Xt,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:425",className:"text-base font-semibold text-foreground",children:"Corrective Actions"})]}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:427",className:"flex items-center gap-2 text-xs",children:[X>0&&e.jsxs("span",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:428",className:"px-2 py-0.5 rounded-full font-medium",style:{background:"#FEF2F2",color:"#DC2626"},children:[X," open"]}),q>0&&e.jsxs("span",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:429",className:"px-2 py-0.5 rounded-full font-medium",style:{background:"#FFFBEB",color:"#D97706"},children:[q," in progress"]}),Q>0&&e.jsxs("span",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:430",className:"px-2 py-0.5 rounded-full font-medium",style:{background:"#F0FDF4",color:"#16A34A"},children:[Q," resolved"]})]})]})}),e.jsx(Me,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:434",className:"space-y-3",children:Z.map(R=>{const P=W1[R.priority]??W1.low,B=J1[R.status]??J1.open;return e.jsxs("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:439",className:"rounded-xl border border-border p-4 space-y-2",style:{background:P.bg+"80"},children:[e.jsxs("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:440",className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:441",className:"flex-1 min-w-0",children:[e.jsx("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:442",className:"font-semibold text-foreground text-sm leading-snug",children:R.resolutionTitle??R.gapDescription}),R.resolutionTitle&&e.jsx("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:446",className:"text-xs text-muted-foreground mt-1 leading-relaxed",children:R.gapDescription})]}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:449",className:"flex items-center gap-1.5 flex-shrink-0",children:[e.jsx("span",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:450",className:"text-[11px] font-semibold px-2 py-0.5 rounded-full",style:{background:P.bg,color:P.color,border:`1px solid ${P.color}40`},children:P.label}),e.jsx("span",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:451",className:"text-[11px] font-semibold px-2 py-0.5 rounded-full",style:{background:B.bg,color:B.color,border:`1px solid ${B.color}40`},children:B.label})]})]}),R.resolvedAt&&e.jsxs("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:455",className:"text-xs text-envora-green flex items-center gap-1",children:[e.jsx(Te,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:456",className:"w-3 h-3"}),"Resolved ",new Date(R.resolvedAt).toLocaleDateString()]})]},R.id)})})]})})(),E&&e.jsx(_e,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:470",className:"border-0 shadow-sm",children:e.jsxs(Me,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:471",className:"p-5 flex items-center gap-4",children:[e.jsx("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:472",className:"w-10 h-10 rounded-xl bg-envora-cyan/10 flex items-center justify-center text-envora-cyan",children:e.jsx(uc,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:473",className:"w-5 h-5"})}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:475",className:"flex-1",children:[e.jsx("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:476",className:"font-semibold text-foreground text-sm",children:"Certification
574Evidence Pack"}),e.jsx("div",{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:477",className:"text-xs text-muted-foreground",children:"GSTC + Green Key clause mapping, all evidence documents"})]}),e.jsxs(ie,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:479",variant:"outline",size:"sm",onClick:()=>r(`/hotel/supplier/${n}/evidence-pack`),children:[e.jsx(Ya,{"data-loc":"client/src/pages/hotel/SupplierDetail.tsx:484",className:"w-4 h-4 mr-1.5"}),"View Pack"]})]})})]})]})]})}function HP(){const[,t]=ds(),[n,r]=b.useState(""),[o,i]=b.useState(null),{data:d,isLoading:u,refetch:p}=ue.hotelInvite.listInvites.useQuery(),x=ue.hotelInvite.resendInvite.useMutation({onMutate:y=>i(y.inviteId),onSuccess:()=>{xe.success("Invitation resent!"),i(null)},onError:y=>{xe.error(y.message),i(null)}}),h=ue.hotelInvite.sendInvite.useMutation({onSuccess:y=>{xe.success("Invitation created!");const N=`${window.location.origin}/invite/hotel/${y.invite?.token??""}`;navigator.clipboard.writeText(N).then(()=>xe.info("Invite link copied to clipboard")),r(""),p()},onError:y=>xe.error(y.message)}),v={pending:"bg-amber-50 text-amber-600 border-amber-200",opened:"bg-blue-50 text-blue-600 border-blue-200",registered:"bg-envora-green/10 text-envora-green border-envora-green/20",completed:"bg-sky-50 text-sky-600 border-sky-200"},g={pending:e.jsx(Bt,{"data-loc":"client/src/pages/hotel/Invitations.tsx:43",className:"w-3.5 h-3.5"}),opened:e.jsx(Bt,{"data-loc":"client/src/pages/hotel/Invitations.tsx:44",className:"w-3.5 h-3.5"}),registered:e.jsx(Te,{"data-loc":"client/src/pages/hotel/Invitations.tsx:45",className:"w-3.5 h-3.5"}),completed:e.jsx(Te,{"data-loc":"client/src/pages/hotel/Invitations.tsx:46",className:"w-3.5 h-3.5"})};return e.jsxs("div",{"data-loc":"client/src/pages/hotel/Invitations.tsx:50",className:"min-h-screen bg-muted/40",children:[e.jsxs("nav",{"data-loc":"client/src/pages/hotel/Invitations.tsx:51",className:"bg-card border-b border-border px-6 py-3.5 flex items-center gap-3 sticky top-0 z-10",children:[e.jsx("button",{"data-loc":"client/src/pages/hotel/Invitations.tsx:52",onClick:()=>t("/hotel/dashboard"),className:"text-muted-foreground/70 hover:text-foreground/80",children:e.jsx(hn,{"data-loc":"client/src/pages/hotel/Invitations.tsx:53",className:"w-5 h-5"})}),e.jsx("img",{"data-loc":"client/src/pages/hotel/Invitations.tsx:55",src:"/manus-storage/envora-logo_f789bcb1.webp",alt:"Envora Consulting",className:"h-8 w-auto"}),e.jsx("span",{"data-loc":"client/src/pages/hotel/Invitations.tsx:56",className:"text-border mx-1",children:"/"}),e.jsx("span",{"data-loc":"client/src/pages/hotel/Invitations.tsx:57",className:"text-foreground/70 text-sm font-medium",children:"Supplier Invitations"})]}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/Invitations.tsx:60",className:"max-w-3xl mx-auto p-8 space-y-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/hotel/Invitations.tsx:61",children:[e.jsx("h1",{"data-loc":"client/src/pages/hotel/Invitations.tsx:62",className:"font-display text-2xl font-extrabold text-foreground tracking-tight",children:"Supplier Invitations"}),e.jsx("p",{"data-loc":"client/src/pages/hotel/Invitations.tsx:63",className:"text-muted-foreground text-sm mt-1",children:"Invite suppliers to complete their sustainability assessment. Hotel-invited suppliers bypass the subscription fee."})]}),e.jsx(_e,{"data-loc":"client/src/pages/hotel/Invitations.tsx:68",className:"border-0 shadow-sm",children:e.jsxs(Me,{"data-loc":"client/src/pages/hotel/Invitations.tsx:69",className:"p-5",children:[e.jsx("div",{"data-loc":"client/src/pages/hotel/Invitations.tsx:70",className:"text-sm font-semibold text-foreground mb-3",children:"Send New Invitation"}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/Invitations.tsx:71",className:"flex gap-2",children:[e.jsx(Ot,{"data-loc":"client/src/pages/hotel/Invitations.tsx:72",type:"email",placeholder:"[email protected] (optional)",value:n,onChange:y=>r(y.target.value),className:"flex-1",onKeyDown:y=>{y.key==="Enter"&&n&&h.mutate({supplierEmail:n})}}),e.jsxs(ie,{"data-loc":"client/src/pages/hotel/Invitations.tsx:80",onClick:()=>{n?h.mutate({supplierEmail:n}):xe.error("Please enter a supplier email address.")},disabled:h.isPending,className:"bg-envora-pine hover:bg-envora-pine/90 text-white",children:[e.jsx(jc,{"data-loc":"client/src/pages/hotel/Invitations.tsx:85",className:"w-4 h-4 mr-1.5"}),h.isPending?"Creating...":"Create Link"]})]}),e.jsx("p",{"data-loc":"client/src/pages/hotel/Invitations.tsx:89",className:"text-xs text-muted-foreground
574/70 mt-2",children:"Leave email blank to create an open invite link. The supplier will need to sign up and accept the invite."})]})}),e.jsxs(_e,{"data-loc":"client/src/pages/hotel/Invitations.tsx:95",className:"border-0 shadow-sm",children:[e.jsx(Ft,{"data-loc":"client/src/pages/hotel/Invitations.tsx:96",children:e.jsx(Xt,{"data-loc":"client/src/pages/hotel/Invitations.tsx:97",className:"text-base font-semibold text-foreground",children:"All Invitations"})}),e.jsx(Me,{"data-loc":"client/src/pages/hotel/Invitations.tsx:99",className:"p-0",children:u?e.jsx("div",{"data-loc":"client/src/pages/hotel/Invitations.tsx:101",className:"p-6 space-y-2",children:[1,2,3].map(y=>e.jsx(Ue,{"data-loc":"client/src/pages/hotel/Invitations.tsx:102",className:"h-14 rounded-lg"},y))}):d?.length?e.jsx("div",{"data-loc":"client/src/pages/hotel/Invitations.tsx:109",className:"divide-y divide-border/60",children:d.map(y=>{const N=`${window.location.origin}/invite/hotel/${y.token}`,j=y.status??"pending";return e.jsxs("div",{"data-loc":"client/src/pages/hotel/Invitations.tsx:114",className:"flex items-center gap-4 px-6 py-4",children:[e.jsx(Tr,{"data-loc":"client/src/pages/hotel/Invitations.tsx:115",className:"w-4 h-4 text-muted-foreground/70 flex-shrink-0"}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/Invitations.tsx:116",className:"flex-1 min-w-0",children:[e.jsx("div",{"data-loc":"client/src/pages/hotel/Invitations.tsx:117",className:"text-sm text-foreground/80 truncate",children:y.supplierEmail||"Open invitation"}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/Invitations.tsx:120",className:"text-xs text-muted-foreground/70",children:["Created ",new Date(y.createdAt).toLocaleDateString(),y.expiresAt?` / Expires ${new Date(y.expiresAt).toLocaleDateString()}`:""]})]}),e.jsxs(Qe,{"data-loc":"client/src/pages/hotel/Invitations.tsx:125",className:`text-xs border flex items-center gap-1 ${v[j]??""}`,children:[g[j],j]}),y.supplierEmail&&(y.status==="pending"||y.status==="opened")&&e.jsx("button",{"data-loc":"client/src/pages/hotel/Invitations.tsx:130",onClick:()=>x.mutate({inviteId:y.id}),disabled:o===y.id,className:"text-muted-foreground/70 hover:text-envora-pine transition-colors disabled:opacity-50",title:"Resend invitation email",children:e.jsx(Or,{"data-loc":"client/src/pages/hotel/Invitations.tsx:136",className:`w-4 h-4 ${o===y.id?"animate-spin":""}`})}),e.jsx("button",{"data-loc":"client/src/pages/hotel/Invitations.tsx:139",onClick:()=>{navigator.clipboard.writeText(N),xe.success("Invite link copied!")},className:"text-muted-foreground/70 hover:text-envora-pine transition-colors",title:"Copy invite link",children:e.jsx(zr,{"data-loc":"client/src/pages/hotel/Invitations.tsx:147",className:"w-4 h-4"})})]},y.id)})}):e.jsx("div",{"data-loc":"client/src/pages/hotel/Invitations.tsx:105",className:"p-8 text-center text-muted-foreground/70 text-sm",children:"No invitations yet. Create your first invite link above."})})]})]})]})}function LP(){const[,t]=ds(),[n,r]=b.useState(""),{data:o,isLoading:i,refetch:d}=ue.hotel.getCampaigns.useQuery(),u=ue.hotel.createCampaign.useMutation({onSuccess:()=>{xe.success("Campaign created!"),r(""),d()},onError:p=>xe.error(p.message)});return e.jsxs("div",{"data-loc":"client/src/pages/hotel/Campaigns.tsx:22",className:"min-h-screen bg-muted/40",children:[e.jsxs("nav",{"data-loc":"client/src/pages/hotel/Campaigns.tsx:23",className:"bg-card border-b border-border px-6 py-4 flex items-center gap-3 sticky top-0 z-10",children:[e.jsx("button",{"data-loc":"client/src/pages/hotel/Campaigns.tsx:24",onClick:()=>t("/hotel/dashboard"),className:"text-muted-foreground/70 hover:text-foreground/80",children:e.jsx(hn,{"data-loc":"client/src/pages/hotel/Campaigns.tsx:24",className:"w-5 h-5"})}),e.jsx("span",{"data-loc":"client/src/pages/hotel/Campaigns.tsx:26",className:"font-display text-lg font-extrabold text-envora-pine",children:"Envora"}),e.jsx("span",{"data-loc":"client/src/pages/hotel/Campaigns.tsx:27",className:"text-border",children:"/"}),e.jsx("span",{"data-loc":"client/src/pages/hotel/Campaigns.tsx:28",className:"text-foreground
574/70 text-sm",children:"Campaigns"})]}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/Campaigns.tsx:30",className:"max-w-3xl mx-auto p-8 space-y-6",children:[e.jsx("h1",{"data-loc":"client/src/pages/hotel/Campaigns.tsx:31",className:"font-display text-2xl font-bold text-foreground",children:"Invitation Campaigns"}),e.jsx(_e,{"data-loc":"client/src/pages/hotel/Campaigns.tsx:32",className:"border-0 shadow-sm",children:e.jsxs(Me,{"data-loc":"client/src/pages/hotel/Campaigns.tsx:33",className:"p-5",children:[e.jsx("div",{"data-loc":"client/src/pages/hotel/Campaigns.tsx:34",className:"text-sm font-semibold text-foreground mb-3",children:"New Campaign"}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/Campaigns.tsx:35",className:"flex gap-2",children:[e.jsx(Ot,{"data-loc":"client/src/pages/hotel/Campaigns.tsx:36",placeholder:"Campaign name (e.g. Q1 2026 Food Suppliers)",value:n,onChange:p=>r(p.target.value),className:"flex-1"}),e.jsxs(ie,{"data-loc":"client/src/pages/hotel/Campaigns.tsx:37",onClick:()=>u.mutate({name:n}),disabled:!n||u.isPending,className:"bg-envora-pine hover:bg-envora-pine/90 text-white",children:[e.jsx(jc,{"data-loc":"client/src/pages/hotel/Campaigns.tsx:38",className:"w-4 h-4 mr-1.5"}),"Create"]})]})]})}),e.jsxs(_e,{"data-loc":"client/src/pages/hotel/Campaigns.tsx:43",className:"border-0 shadow-sm",children:[e.jsx(Ft,{"data-loc":"client/src/pages/hotel/Campaigns.tsx:44",children:e.jsx(Xt,{"data-loc":"client/src/pages/hotel/Campaigns.tsx:44",className:"text-base font-semibold text-foreground",children:"All Campaigns"})}),e.jsx(Me,{"data-loc":"client/src/pages/hotel/Campaigns.tsx:45",className:"p-0",children:i?e.jsx("div",{"data-loc":"client/src/pages/hotel/Campaigns.tsx:46",className:"p-6 space-y-2",children:[1,2].map(p=>e.jsx(Ue,{"data-loc":"client/src/pages/hotel/Campaigns.tsx:46",className:"h-12 rounded-lg"},p))}):o?.length?e.jsx("div",{"data-loc":"client/src/pages/hotel/Campaigns.tsx:48",className:"divide-y divide-border/60",children:o.map(p=>e.jsxs("div",{"data-loc":"client/src/pages/hotel/Campaigns.tsx:50",className:"flex items-center gap-4 px-6 py-4",children:[e.jsx(iT,{"data-loc":"client/src/pages/hotel/Campaigns.tsx:51",className:"w-4 h-4 text-envora-pine flex-shrink-0"}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/Campaigns.tsx:52",className:"flex-1",children:[e.jsx("div",{"data-loc":"client/src/pages/hotel/Campaigns.tsx:53",className:"text-sm font-medium text-foreground",children:p.name}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/Campaigns.tsx:54",className:"text-xs text-muted-foreground/70",children:["Created ",new Date(p.createdAt).toLocaleDateString()]})]})]},p.id))}):e.jsx("div",{"data-loc":"client/src/pages/hotel/Campaigns.tsx:47",className:"p-8 text-center text-muted-foreground/70 text-sm",children:"No campaigns yet"})})]})]})]})}const zP={pass:e.jsx(Te,{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:10",className:"w-4 h-4 text-envora-green"}),partial:e.jsx(tt,{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:11",className:"w-4 h-4 text-envora-gold"}),fail:e.jsx(Zt,{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:12",className:"w-4 h-4 text-red-400"}),na:e.jsx(zh,{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:13",className:"w-4 h-4 text-border"})},IP={2:"Compliant",1:"Partial",0:"Non-Compliant"};function BP(){const{id:t}=ea(),n=parseInt(t??"0"),[,r]=ds(),{data:o}=ue.hotel.getSupplierDetail.useQuery({supplierId:n},{enabled:!!n}),i=o?.assessment?.id??0,{data:d,isLoading:u}=ue.hotel.getEvidencePack.useQuery({supplierId:n,assessmentId:i},{enabled:!!n&&!!i});if(u)return e.jsx("div",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:33",className:"min-h-screen bg-muted/40 p-8",children:e.jsxs("div",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:34",className:"max-w-5xl mx-auto space-y-4",children:[e.jsx(Ue,{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:35",className:"h-16 rounded-2xl"}),e.jsx(Ue,{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:36",className:"h-48 rounded-2xl"}),e.jsx(Ue,{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:37",className:"h-96 rounded-2xl"})]})});if(!d)return e.jsx("div",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:45",className:"min-h-screen bg-muted/40 flex items-center justify-center",children:e.jsx("div",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:46",className:"text-muted-foreground text-sm",children:"Evidence pack not found."})});const{hotel:p,profile:x,assessment:h,report:v,mappingTable:g,evidenceItems:y,generatedAt:N}=d,j={};for(const w of g)j[w.theme]||(j[w.theme]=[]),j[w.theme].push(w);return e.jsxs("div",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:68",className:"min-h-screen bg-muted/40",children:[e.jsxs("nav",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:69",className:"bg-card border-b border-border px-6 py-4 flex items-center gap-3 sticky top-0 z-10 print:hidden",children:[e.jsx("button",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:70",onClick:()=>r(`/hotel/supplier/${n}
574`),className:"text-muted-foreground/70 hover:text-foreground/80",children:e.jsx(hn,{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:71",className:"w-5 h-5"})}),e.jsx("span",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:74",className:"font-display text-lg font-extrabold text-envora-pine",children:"Envora"}),e.jsx("span",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:75",className:"text-border",children:"/"}),e.jsx("span",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:76",className:"text-foreground/70 text-sm",children:"Evidence Pack"}),e.jsx("div",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:77",className:"ml-auto",children:e.jsxs("button",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:78",onClick:()=>window.print(),className:"flex items-center gap-1.5 text-sm text-envora-pine hover:text-envora-pine/80 transition-colors",children:[e.jsx(uc,{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:79",className:"w-4 h-4"})," Print / Export PDF"]})})]}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:84",className:"max-w-5xl mx-auto p-8 space-y-8",children:[e.jsxs("div",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:86",className:"bg-envora-pine text-white rounded-2xl p-8",children:[e.jsxs("div",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:87",className:"flex items-start justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:88",children:[e.jsx("div",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:89",className:"text-xs font-semibold text-white/60 uppercase tracking-wider mb-2",children:"Envora Certification Evidence Pack"}),e.jsx("h1",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:90",className:"font-display text-3xl font-bold mb-1",children:x?.businessName}),e.jsxs("p",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:91",className:"text-white/70 text-sm",children:[x?.country," / ",x?.sizeband?.toUpperCase()]}),e.jsxs("p",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:92",className:"text-white/60 text-xs mt-2",children:["Prepared for: ",p.name]})]}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:94",className:"text-right",children:[e.jsx("div",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:95",className:"font-display text-5xl font-bold",children:h?.overallScore?Number(h.overallScore).toFixed(0):"-"}),e.jsx("div",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:96",className:"text-white/60 text-sm",children:"/ 100"}),e.jsx(Qe,{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:97",className:"mt-2 bg-card/20 text-white border-white/30 text-sm",children:(h?.band??"not_yet_rated").replace("_"," ").replace(/\b\w/g,w=>w.toUpperCase())})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:102",className:"mt-4 pt-4 border-t border-white/20 text-xs text-white/50",children:["Generated: ",new Date(N).toLocaleString()," / Envora Supplier Readiness System"]})]}),e.jsxs(_e,{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:108",className:"border-0 shadow-sm",children:[e.jsxs(Ft,{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:109",children:[e.jsx(Xt,{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:110",className:"text-base font-semibold text-foreground",children:"GSTC & Green Key Clause Mapping"}),e.jsx("p",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:111",className:"text-xs text-muted-foreground mt-1",children:"This table maps each assessed criterion to its corresponding GSTC Hotel Standard and Green Key certification clauses."})]}),e.jsx(Me,{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:113",className:"p-0",children:e.jsx("div",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:114",className:"overflow-x-auto",children:e.jsxs("table",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:115",className:"w-full text-sm",children:[e.jsx("thead",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:116",children:e.jsxs("tr",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:117",className:"border-b border-border/60 bg-muted/40",children:[e.jsx("th",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:118",className:"text-left px-4 py-3 text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:"Code"}),e.jsx("th",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:119",className:"text-left px-4 py-3 text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:"Criterion"}),e.jsx("th",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:120",className:"text-left px-4 py-3 text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:"Theme"}),e.jsx("th",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:121",className:"text-left px-4 py-3 text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:"GSTC"}),e.jsx("th",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:122",className:"text-left px-4 py-3 text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:"Green Key"}),e.jsx("th",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:123",className:"text-left px-4 py-3 text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:"Score"}),e.jsx("th",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:124",className:"text-left px-4 py-3 text-xs font-semibold text-muted-foreground uppercase tracking-wider",children:"AI Verdict"})]})}),e.jsx("tbody",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:127",className:"divide-y divide-border/60",children:g.map(w=>e.jsxs("tr",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:129",className:"hover:bg-muted/40",children:[e.jsx("td",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:130",className:"px-4 py-3 font-mono text-xs text-muted-foreground",children:w.
574criterionCode}),e.jsx("td",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:131",className:"px-4 py-3 text-foreground/90 font-medium",children:w.criterionTitle}),e.jsx("td",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:132",className:"px-4 py-3",children:e.jsx(Qe,{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:133",className:"text-xs bg-envora-pine/10 text-envora-pine border-envora-pine/20",children:w.theme.replace("_"," ").replace(/\b\w/g,A=>A.toUpperCase())})}),e.jsx("td",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:137",className:"px-4 py-3 text-xs text-muted-foreground",children:Array.isArray(w.gstcClauses)?w.gstcClauses.join(", "):"-"}),e.jsx("td",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:138",className:"px-4 py-3 text-xs text-muted-foreground",children:Array.isArray(w.greenKeyClauses)?w.greenKeyClauses.join(", "):"-"}),e.jsx("td",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:139",className:"px-4 py-3",children:w.finalScore!==null?e.jsxs("span",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:141",className:`text-xs font-semibold ${w.finalScore===2?"text-envora-green":w.finalScore===1?"text-envora-gold":"text-red-500"}`,children:[w.finalScore,", ",IP[w.finalScore]]}):e.jsx("span",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:144",className:"text-border text-xs",children:"N/A"})}),e.jsx("td",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:146",className:"px-4 py-3",children:e.jsxs("div",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:147",className:"flex items-center gap-1.5",children:[zP[w.aiVerdict??"na"],e.jsx("span",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:149",className:"text-xs text-foreground/70 capitalize",children:w.aiVerdict??"N/A"})]})})]},w.criterionCode))})]})})})]}),y.length>0&&e.jsxs(_e,{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:162",className:"border-0 shadow-sm",children:[e.jsx(Ft,{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:163",children:e.jsxs(Xt,{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:164",className:"text-base font-semibold text-foreground",children:["Evidence Documents (",y.length,")"]})}),e.jsx(Me,{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:166",className:"p-0",children:e.jsx("div",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:167",className:"divide-y divide-border/60",children:y.map(w=>e.jsxs("div",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:169",className:"flex items-center gap-4 px-6 py-3",children:[e.jsx("div",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:170",className:"w-8 h-8 rounded-lg bg-envora-pine/10 flex items-center justify-center flex-shrink-0",children:e.jsx(uc,{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:171",className:"w-4 h-4 text-envora-pine"})}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:173",className:"flex-1 min-w-0",children:[e.jsx("div",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:174",className:"text-sm text-foreground/90 truncate",children:w.fileName}),e.jsx("div",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:175",className:"text-xs text-muted-foreground/70",children:new Date(w.uploadedAt).toLocaleDateString()})]}),e.jsx("a",{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:177",href:w.fileUrl,target:"_blank",rel:"noopener noreferrer",className:"text-envora-pine hover:text-envora-pine/80 transition-colors",children:e.jsx(Ya,{"data-loc":"client/src/pages/hotel/EvidencePack.tsx:178",className:"w-4 h-4"})})]},w.id))})})]})]})]})}const ew=[{key:"envScore",label:"Environment",short:"ENV"},{key:"laborScore",label:"Labor & HR",short:"LAB"},{key:"ethicsScore",label:"Ethics",short:"ETH"},{key:"procurementScore",label:"Infrastructure",short:"INF"}];function tw(t){return t===null?"bg-white/5 text-white/30":t>=75?"bg-[#2E9E6B]/30 text-[#2E9E6B]":t>=50?"bg-[#F0AB00]/20 text-[#F0AB00]":"bg-red-500/20 text-red-400"}function sw(t){return t===null?"No data":t>=75?"Low Risk":t>=50?"Medium Risk":"High Risk"}function VP(t,n){return n==="expired"?e.jsx(Zt,{"data-loc":"client/src/components/RiskHeatmap.tsx:45",className:"w-3.5 h-3.5 text-red-400"}):n==="expiring"?e.jsx(Bt,{"data-loc":"client/src/components/RiskHeatmap.tsx:46",className:"w-3.5 h-3.5 text-amber-400"}):t==="gold"?e.jsx(Un,{"data-loc":"client/src/components/RiskHeatmap.tsx:47",className:"w-3.5 h-3.5 text-amber-400"}):t==="silver"?e.jsx(Un,{"data-loc":"client/src/components/RiskHeatmap.tsx:48",className:"w-3.5 h-3.5 text-white/50"}):t==="bronze"?e.jsx(Un,{"data-loc":"client/src/components/RiskHeatmap.tsx:49",className:"w-3.5 h-3.5 text-amber-700"}):e.jsx(sn,{"data-loc":"client/src/components/RiskHeatmap.tsx:50",className:"w-3.5 h-3.5 text-white/30"})}function FP({suppliers:t}){const n=b.useMemo(()=>{const r=t.length,o=t.filter(p=>p.overallScore!==null&&p.overallScore<50).length,i=t.filter(p=>p.overallScore!==null&&p.overallScore>=50&&p.overallScore<75).length,d=t.filter(p=>p.overallScore!==null&&p.overallScore>=75).length,u=t.filter(p=>p.overallScore===null).length;return{total:r,highRisk:o,medRisk:i,lowRisk:d,noData:u}},[t]);return t.length===0?e.jsxs("div",{"data-loc":"client/src/components/RiskHeatmap.tsx:65",className:"rounded-2xl bg-white/5 border border-white/10 p-8 text-center",children:[e.jsx(sn,{"data-loc":"client/src/components/RiskHeatmap.tsx:66",className:"w-8 h-8 text-white/20 mx-auto mb-3"}),e.jsx("p",{"data-loc":"client/src/components/RiskHeatmap.tsx:67",className:"text-white/40 text-sm",children:"No suppliers in your network yet."}),e.jsx("p",{"data-loc":"client/src/components/RiskHeatmap.tsx:68",className:"text-white/25 text-xs mt-1",children:"Invite suppliers to see the risk heatmap."})]}):e.jsxs("div",{"data-loc":"client/src/components/RiskHeatmap.tsx:74",className:"space-y-4",children:[e.jsx("div",{"data-loc":"client/src/components/RiskHeatmap.tsx:76",className:"grid grid-cols-4 gap-3",children:[{label:"High Risk",count:n.highRisk,color:"text-red-400",bg:"bg-red-500/10 border-red-500/20"},{label:"Medium Risk",count:n.medRisk,color:"text-amber-400",bg:"bg-amber-500/10 border-amber-500/20"},{label:"Low Risk",count:n.lowRisk,color:"text-[#2E9E6B]",bg:"bg-[#2E9E6B]/10 border-[#2E9E6B]/20"},{label:"No Data",count:n.noData,color:"text-white/40",bg:"bg-white/5 border-white/10"}].map(r=>e.jsxs("div",{"data-loc":"client/src/components/RiskHeatmap.tsx:83",className:`rounded-xl border p-3 text-center ${r.bg}`,children:[e.jsx("div",{"data-loc":"client/src/components/RiskHeatmap.tsx:84",className:`text-2xl font-bold font-display ${r.color}`,children:r.count}),e.jsx("div",{"data-loc":"client/src/components/RiskHeatmap.tsx:85",className:"text-white/50 text-xs mt-0.5",children:r.label})]},r.label))}),e.jsxs("div",{"data-loc":"client/src/components/RiskHeatmap.tsx:91",className:"rounded-2xl bg-white/5 border border-white/10 overflow-hidden",children:[e.jsxs("div",{"data-loc":"client/src/components/RiskHeatmap.tsx:93",className:"grid border-b border-white/10",style:{gridTemplateColumns:"2fr repeat(4, 1fr) 80px"},children:[e.jsx("div",{"data-loc":"client/src/components/RiskHeatmap.tsx:94",className:"px-4 py-2.5 text-white/40 text-xs font-medium uppercase tracking-wider",children:"Supplier"}),ew.map(r=>e.jsx("div",{"data-loc":"client/src/components/RiskHeatmap.tsx:96",className:"px-2 py-2.5 text-white/40 text-xs font-medium uppercase tracking-wider text-center",children:r.short},r.key)),e.jsx("div",{"data-loc":"client/src/components/RiskHeatmap.tsx:98",className:"px-2 py-2.5 text-white/40 text-xs font-medium uppercase tracking-wider text-center",children:"Overall"})]}),e.jsx("div",{"data-loc":"client/src/components/RiskHeatmap.tsx:102",className:"divide-y divide-white/5",children:t.map(r=>e.jsxs("div",{"data-loc":"client/src/components/RiskHeatmap.tsx:104",className:"grid items-center hover:bg-white/5 transition-colors",style:{gridTemplateColumns:"2fr repeat(4, 1fr) 80px"},children:[e.jsxs("div",{"data-loc":"client/src/components/RiskHeatmap.tsx:110",className:"px-4 py-3 flex items-center gap-2 min-w-0",children:[VP(r.band,r.state),e.jsx("span",{"data-loc":"client/src/components/RiskHeatmap.tsx:112",className:"text-white/80 text-sm truncate",children:r.businessName}),r.state==="expiring"&&e.jsx(Qe,{"data-loc":"client/src/components/RiskHeatmap.tsx:114",className:"bg-amber-500/20 text-amber-400 border-amber-500/30 text-[10px] px-1.5 py-0 flex-shrink-0",children:"Expiring"})]}),ew.map(o=>{const i=r[o.key];return e.jsxs(Kf,{"data-loc":"client/src/components/RiskHeatmap.tsx:122",children:[e.jsx(qf,{"data-loc":"client/src/components/RiskHeatmap.tsx:123",asChild:!0,children:e.jsx("div",{"data-loc":"client/src/components/RiskHeatmap.tsx:124",className:"px-2 py-3 flex justify-center",children:e.jsx("div",{"data-loc":"client/src/components/RiskHeatmap.tsx:125",className:`w-12 h-8 rounded-lg flex items-center justify-center text-xs font-semibold cursor-default ${tw(i)}`,children:i!==null?`${Math.round(i)}`:"-"})})}),e.jsxs(Qf,{"data-loc":"client/src/components/RiskHeatmap.tsx:130",side:"top",className:"bg-[#1a3a2e] border-white/20 text-white",children:[e.jsx("p",{"data-loc":"client/src/components/RiskHeatmap.tsx:131",className:"font-medium",children:o.label}),e.jsx("p",{"data-loc":"client/src/components/RiskHeatmap.tsx:132",className:"text-white/60 text-xs",children:i!==null?`${Math.round(i)}/100, ${sw(i)}`:"Not assessed"})]})]},o.key)}),e.jsx("div",{"data-loc":"client/src/components/RiskHeatmap.tsx:139",className:"px-2 py-3 flex justify-center",children:e.jsxs(Kf,{"data-loc":"client/src/components/RiskHeatmap.tsx:140",children:[e.jsx(qf,{"data-loc":"client/src/components/RiskHeatmap.tsx:141",asChild:!0,children:e.jsx("div",{"data-loc":"client/src/components/RiskHeatmap.tsx:142",className:`w-14 h-8 rounded-lg flex items-center justify-center text-xs font-bold cursor-default ${tw(r.overallScore)}`,children:r.overallScore!==null?`${Math.round(r.overallScore)}`:"-"})}),e.jsxs(Qf,{"data-loc":"client/src/components/RiskHeatmap.tsx:146",side:"top",className:"bg-[#1a3a2e] border-white/20 text-white",children:[e.jsx("p",{"data-loc":"client/src/components/RiskHeatmap.tsx:147",className:"font-medium",children:"Overall Score"}),e.jsx("p",{"data-loc":"client/src/components/RiskHeatmap.tsx:148",className:"text-white/60 text-xs",children:r.overallScore!==null?`${Math.round(r.overallScore)}/100, ${sw(r.overallScore)}`:"Not yet assessed"}),r.band&&e.jsxs("p",{"data-loc":"client/src/components/RiskHeatmap.tsx:149",className:"text-white/60 text-xs capitalize",children:["Band: ",r.band.replace("_"," ")]})]})]})})]},r.id))})]}),e.jsxs("div",{"data-loc":"client/src/components/RiskHeatmap.tsx:159",className:"flex items-center gap-4 text-xs text-white/40",children:[e.jsx("span",{"data-loc":"client/src/components/RiskHeatmap.tsx:160",children:"Score key:"}),e.jsxs("span",{"data-loc":"client/src/components/RiskHeatmap.tsx:161",className:"flex items-center gap-1.5",children:[e.jsx("span",{"data-loc":"client/src/components/RiskHeatmap.tsx:161",className:"w-3 h-3 rounded bg-[#2E9E6B]/30 inline-block"}),"75-100 Low Risk"]}),e.jsxs("span",{"data-loc":"client/src/components/RiskHeatmap.tsx:162",className:"flex items-center gap-1.5",children:[e.jsx("span",{"data-loc":"client/src/components/RiskHeatmap.tsx:162",className:"w-3 h-3 rounded bg-[#F0AB00]/20 inline-block"}),"50-74 Medium Risk"]}),e.jsxs("span",{"data-loc":"client/src/components/RiskHeatmap.tsx:163",className:"flex items-center gap-1.5",children:[e.jsx("span",{"data-loc":"client/src/components/RiskHeatmap.tsx:163",className:"w-3 h-3 rounded bg-red-500/20 inline-block"}),"0-49 High Risk"]})]})]})}function gs({className:t,...n}){return e.jsx(It,{"data-loc":"client/src/components/ui/spinner.tsx:7",role:"status","aria-label":"Loading",className:ye("size-4 animate-spin",t),...n})}function UP(){const{isAuthenticated:t,loading:n}=za(),{data:r,isLoading:o}=ue.hotel.getSupplierNetwork.useQuery(void 0,{enabled:t}),i=b.useMemo(()=>r?r.suppliers.map(u=>({id:u.link.supplierId,businessName:u.profile?.businessName??"Unknown",band:u.assessment?.band??null,overallScore:u.assessment?.overallScore?parseFloat(u.assessment.overallScore):null,envScore:u.assessment?.envScore?parseFloat(u.assessment.envScore):null,laborScore:u.assessment?.laborScore?parseFloat(u.assessment.laborScore):null,ethicsScore:u.assessment?.ethicsScore?parseFloat(u.assessment.ethicsScore):null,procurementScore:u.assessment?.procurementScore?parseFloat(u.assessment.procurementScore):null,state:u.assessment?.state??null,expiresAt:u.assessment?.expiresAt??null})):[],[r]),d=b.useMemo(()=>{const u=i.length,p=i.filter(v=>v.band!==null).length,x=i.filter(v=>v.overallScore!==null).reduce((v,g)=>v+(g.overallScore??0),0)/Math.max(1,i.filter(v=>v.overallScore!==null).length),h=i.filter(v=>v.overallScore!==null&&v.overallScore<50).length;return{total:u,verified:p,avgScore:isNaN(x)?0:x,highRisk:h}},[i]);return n?e.jsx("div",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:48",className:"min-h-screen bg-background flex items-center justify-center",children:e.jsx(gs,{"data-loc":"client/src/pages/hotel/Portfolio.tsx:49",className:"text-envora-green w-8 h-8"})}):t?e.jsxs("div",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:68",className:"min-h-screen bg-background",children:[e.jsxs("div",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:70",className:"border-b border-border bg-card shadow-sm px-6 py-4 flex items-center justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:71",className:"flex items-center gap-3",children:[e.jsx(en,{"data-loc":"client/src/pages/hotel/Portfolio.tsx:72",href:"/hotel/dashboard",children:e.jsxs("div",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:73",className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("div",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:74",className:"w-8 h-8 rounded-lg bg-envora-pine/10 flex items-center justify-center",children:e.jsx(Ns,{"data-loc":"client/src/pages/hotel/Portfolio.tsx:75",className:"w-4 h-4 text-envora-pine"})}),e.jsx("span",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:77",className:"font-semibold text-envora-pine",style:{fontFamily:"var(--font-display)"},children:"Envora"})]})}),e.jsx("span",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:80",className:"text-muted-foreground
574/40",children:"/"}),e.jsx("span",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:81",className:"text-muted-foreground text-sm",children:"Portfolio Analytics"})]}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:83",className:"flex items-center gap-2",children:[e.jsxs(ie,{"data-loc":"client/src/pages/hotel/Portfolio.tsx:84",variant:"outline",size:"sm",onClick:()=>xe.info("Export feature coming soon"),children:[e.jsx(uc,{"data-loc":"client/src/pages/hotel/Portfolio.tsx:89",className:"w-4 h-4 mr-2"}),"Export Report"]}),e.jsx(en,{"data-loc":"client/src/pages/hotel/Portfolio.tsx:92",href:"/hotel/dashboard",children:e.jsx(ie,{"data-loc":"client/src/pages/hotel/Portfolio.tsx:93",size:"sm",className:"bg-envora-pine hover:bg-envora-pine/90 text-white",children:"Dashboard"})})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:100",className:"max-w-7xl mx-auto px-6 py-8",children:[e.jsxs("div",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:102",className:"mb-8",children:[e.jsxs("div",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:103",className:"flex items-center gap-2 mb-2",children:[e.jsx("div",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:104",className:"w-8 h-8 rounded-lg bg-envora-pine/10 flex items-center justify-center",children:e.jsx(bn,{"data-loc":"client/src/pages/hotel/Portfolio.tsx:105",className:"w-4 h-4 text-envora-pine"})}),e.jsx("h1",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:107",className:"text-2xl font-bold text-envora-pine",style:{fontFamily:"var(--font-display)"},children:"Portfolio Risk Analytics"}),e.jsx(Qe,{"data-loc":"client/src/pages/hotel/Portfolio.tsx:108",className:"bg-envora-green/10 text-envora-green border-envora-green/30 text-xs",children:"Live"})]}),e.jsx("p",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:110",className:"text-muted-foreground text-sm",children:"Sustainability risk overview across your entire supplier network. Scores are based on the Envora 72-criterion assessment framework."})]}),e.jsx("div",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:116",className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-8",children:o?Array.from({length:4}).map((u,p)=>e.jsx(Ue,{"data-loc":"client/src/pages/hotel/Portfolio.tsx:119",className:"h-24 rounded-2xl"},p)):e.jsxs(e.Fragment,{children:[e.jsx(_e,{"data-loc":"client/src/pages/hotel/Portfolio.tsx:123",className:"border-border/60 shadow-sm",children:e.jsxs(Me,{"data-loc":"client/src/pages/hotel/Portfolio.tsx:124",className:"p-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:125",className:"flex items-center gap-2 mb-2",children:[e.jsx(Ws,{"data-loc":"client/src/pages/hotel/Portfolio.tsx:126",className:"w-4 h-4 text-muted-foreground"}),e.jsx("span",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:127",className:"text-muted-foreground text-xs uppercase tracking-wider",children:"Total Suppliers"})]}),e.jsx("div",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:129",className:"text-3xl font-bold text-envora-pine",style:{fontFamily:"var(--font-display)"},children:d.total})]})}),e.jsx(_e,{"data-loc":"client/src/pages/hotel/Portfolio.tsx:132",className:"border-envora-pine/20 shadow-sm",style:{background:"oklch(28% 0.09 155 / 0.04)"},children:e.jsxs(Me,{"data-loc":"client/src/pages/hotel/Portfolio.tsx:133",className:"p-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:134",className:"flex items-center gap-2 mb-2",children:[e.jsx(Ms,{"data-loc":"client/src/pages/hotel/Portfolio.tsx:135",className:"w-4 h-4 text-envora-green"}),e.jsx("span",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:136",className:"text-muted-foreground text-xs uppercase tracking-wider",children:"Verified"})]}),e.jsx("div",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:138",className:"text-3xl font-bold text-envora-pine",style:{fontFamily:"var(--font-display)"},children:d.verified}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:139",className:"text-muted-foreground text-xs mt-1",children:[d.total>0?Math.round(d.verified/d.total*100):0,"% of network"]})]})}),e.jsx(_e,{"data-loc":"client/src/pages/hotel/Portfolio.tsx:142",className:"border-blue-200 shadow-sm",style:{background:"oklch(60% 0.12 220 / 0.04)"},children:e.jsxs(Me,{"data-loc":"client/src/pages/hotel/Portfolio.tsx:143",className:"p-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:144",className:"flex items-center gap-2 mb-2",children:[e.jsx(Yn,{"data-loc":"client/src/pages/hotel/Portfolio.tsx:145",className:"w-4 h-4 text-blue-500"}),e.jsx("span",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:146",className:"text-muted-foreground text-xs uppercase tracking-wider",children:"Avg. Score"})]}),e.jsx("div",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:148",className:"text-3xl font-bold text-blue-600",style:{fontFamily:"var(--font-display)"},children:Math.round(d.avgScore)}),e.jsx("div",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:149",className:"text-muted-foreground text-xs mt-1",children:"out of 100"})]})}),e.jsx(_e,{"data-loc":"client/src/pages/hotel/Portfolio.tsx:152",className:"border-red-200 shadow-sm",style:{background:"oklch(60% 0.15 25 / 0.04)"},children:e.jsxs(Me,{"data-loc":"client/src/pages/hotel/Portfolio.tsx:153",className:"p-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:154",className:"flex items-center gap-2 mb-2",children:[e.jsx(sn,{"data-loc":"client/src/pages/hotel/Portfolio.tsx:155",className:"w-4 h-4 text-red-400"}),e.jsx("span",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:156",className:"text-muted-foreground text-xs uppercase tracking-wider",children:"High Risk"})]}),e.jsx("div",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:158",className:"text-3xl font-bold text-red-500",style:{fontFamily:"var(--font-display)"},children:d.highRisk}),e.jsx("div",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:159",className:"text-muted-foreground text-xs mt-1",children:"score below 50"})]})})]})}),e.jsxs("div",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:167",className:"mb-6",children:[e.jsx("h2",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:168",className:"text-lg font-semibold text-foreground mb-4",style:{fontFamily:"var(--font-display)"},children:"Supplier Risk Heatmap"}),o?e.jsx("div",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:170",className:"space-y-2",children:Array.from({length:5}).map((u,p)=>e.jsx(Ue,{"data-loc":"client/src/pages/hotel/Portfolio.tsx:172",className:"h-12 rounded-xl"},p))}):e.jsx(FP,{"data-loc":"client/src/pages/hotel/Portfolio.tsx:176",suppliers:i})]}),e.jsx(_e,{"data-loc":"client/src/pages/hotel/Portfolio.tsx:181",className:"border-border/40 shadow-sm",children:e.jsxs(Me,{"data-loc":"client/src/pages/hotel/Portfolio.tsx:182",className:"p-4 text-sm text-muted-foreground",children:[e.jsx("span",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:183",className:"text-foreground font-medium",children:"Assessment Framework:"})," Scores are calculated across 72 criteria mapped to GSTC Hotel Standard (A13 Procurement, B2 Local Employment), ISO 14001, SA8000, ILO Core Conventions, and EcoVadis methodology. Scores above 75 indicate low sustainability risk; 50-74 medium risk; below 50 high risk requiring corrective action."]})})]})]}):e.jsx("div",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:56",className:"min-h-screen bg-background flex items-center justify-center px-6",children:e.jsxs("div",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:57",className:"text-center",children:[e.jsx("h2",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:58",className:"text-2xl font-bold text-envora-pine mb-3",style:{fontFamily:"var(--font-display)"},children:"Sign in to view portfolio"}),e.jsx("a",{"data-loc":"client/src/pages/hotel/Portfolio.tsx:59",href:Xa(),children:e.jsx(ie,{"data-loc":"client/src/pages/hotel/Portfolio.tsx:60",className:"bg-envora-pine hover:bg-envora-pine/90 text-white",children:"Sign In"})})]})})}function $P(){const{user:t,isAuthenticated:n,loading:r}=za(),[o,i]=b.useState(!1),[d,u]=b.useState(!1),p=ue.admin.seedCriteria.useMutation({onSuccess:w=>{u(!0),i(!1),xe.success(`Criteria library seeded successfully, ${w.criteriaCount} criteria, ${w.categoriesCount} categories.`)},onError:w=>{i(!1),xe.error(`Seeding failed: ${w.message}`)}}),{data:x,isLoading:h,refetch:v}=ue.admin.getCriteriaStats.useQuery(void 0,{enabled:n}),{data:g,isLoading:y,refetch:N}=ue.admin.getAuditWorkerStatus.useQuery(void 0,{enabled:n,refetchInterval:3e4});if(r)return e.jsx("div",{"data-loc":"client/src/pages/Admin.tsx:42",className:"min-h-screen bg-background flex items-center justify-center",children:e.jsx(gs,{"data-loc":"client/src/pages/Admin.tsx:43",className:"text-envora-green w-8 h-8"})});if(!n)return e.jsx("div",{"data-loc":"client/src/pages/Admin.tsx:50",className:"min-h-screen bg-background flex items-center justify-center px-6",children:e.jsxs("div",{"data-loc":"client/src/pages/Admin.tsx:51",className:"text-center",children:[e.jsx(ba,{"data-loc":"client/src/pages/Admin.tsx:52",className:"w-12 h-12 text-muted-foreground
574/30 mx-auto mb-4"}),e.jsx("h2",{"data-loc":"client/src/pages/Admin.tsx:53",className:"text-2xl font-bold text-envora-pine mb-3",style:{fontFamily:"var(--font-display)"},children:"Admin Access Required"}),e.jsx("a",{"data-loc":"client/src/pages/Admin.tsx:54",href:Xa(),children:e.jsx(ie,{"data-loc":"client/src/pages/Admin.tsx:55",className:"bg-envora-pine hover:bg-envora-pine/90 text-white",children:"Sign In"})})]})});const j=t?.role==="admin";return e.jsxs("div",{"data-loc":"client/src/pages/Admin.tsx:65",className:"min-h-screen bg-background",children:[e.jsxs("div",{"data-loc":"client/src/pages/Admin.tsx:67",className:"border-b border-border bg-card shadow-sm px-6 py-4 flex items-center justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/Admin.tsx:68",className:"flex items-center gap-3",children:[e.jsx(en,{"data-loc":"client/src/pages/Admin.tsx:69",href:"/",children:e.jsxs("div",{"data-loc":"client/src/pages/Admin.tsx:70",className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("div",{"data-loc":"client/src/pages/Admin.tsx:71",className:"w-8 h-8 rounded-lg bg-envora-pine/10 flex items-center justify-center",children:e.jsx(Ns,{"data-loc":"client/src/pages/Admin.tsx:72",className:"w-4 h-4 text-envora-pine"})}),e.jsx("span",{"data-loc":"client/src/pages/Admin.tsx:74",className:"font-semibold text-envora-pine",style:{fontFamily:"var(--font-display)"},children:"Envora"})]})}),e.jsx("span",{"data-loc":"client/src/pages/Admin.tsx:77",className:"text-muted-foreground/40",children:"/"}),e.jsx("span",{"data-loc":"client/src/pages/Admin.tsx:78",className:"text-muted-foreground text-sm",children:"Admin Panel"})]}),e.jsx(Qe,{"data-loc":"client/src/pages/Admin.tsx:80",className:j?"bg-envora-pine/10 text-envora-pine border-envora-pine/20":"bg-red-50 text-red-600 border-red-200",children:j?"Admin":"Not Admin"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Admin.tsx:85",className:"max-w-4xl mx-auto px-6 py-8",children:[e.jsxs("div",{"data-loc":"client/src/pages/Admin.tsx:86",className:"mb-8",children:[e.jsx("h1",{"data-loc":"client/src/pages/Admin.tsx:87",className:"text-2xl font-bold text-envora-pine mb-2",style:{fontFamily:"var(--font-display)"},children:"Platform Administration"}),e.jsx("p",{"data-loc":"client/src/pages/Admin.tsx:88",className:"text-muted-foreground text-sm",children:"Manage the Envora platform, seed criteria, view stats, and configure system settings."})]}),e.jsx("div",{"data-loc":"client/src/pages/Admin.tsx:92",className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-8",children:h?Array.from({length:4}).map((w,A)=>e.jsx(Ue,{"data-loc":"client/src/pages/Admin.tsx:95",className:"h-24 rounded-2xl"},A)):e.jsxs(e.Fragment,{children:[e.jsx(_e,{"data-loc":"client/src/pages/Admin.tsx:99",className:"border-border/60 shadow-sm",children:e.jsxs(Me,{"data-loc":"client/src/pages/Admin.tsx:100",className:"p-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Admin.tsx:101",className:"flex items-center gap-2 mb-2",children:[e.jsx(Ws,{"data-loc":"client/src/pages/Admin.tsx:102",className:"w-4 h-4 text-muted-foreground"}),e.jsx("span",{"data-loc":"client/src/pages/Admin.tsx:103",className:"text-muted-foreground text-xs uppercase tracking-wider",children:"Users"})]}),e.jsx("div",{"data-loc":"client/src/pages/Admin.tsx:105",className:"text-3xl font-bold text-envora-pine",style:{fontFamily:"var(--font-display)"},children:x?.total??0})]})}),e.jsx(_e,{"data-loc":"client/src/pages/Admin.tsx:108",className:"border-blue-200 shadow-sm",children:e.jsxs(Me,{"data-loc":"client/src/pages/Admin.tsx:109",className:"p-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Admin.tsx:110",className:"flex items-center gap-2 mb-2",children:[e.jsx(Zx,{"data-loc":"client/src/pages/Admin.tsx:111",className:"w-4 h-4 text-blue-500"}),e.jsx("span",{"data-loc":"client/src/pages/Admin.tsx:112",className:"text-muted-foreground text-xs uppercase tracking-wider",children:"Criteria"})]}),e.jsx("div",{"data-loc":"client/src/pages/Admin.tsx:114",className:"text-3xl font-bold text-blue-600",style:{fontFamily:"var(--font-display)"},children:x?.total??0})]})}),e.jsx(_e,{"data-loc":"client/src/pages/Admin.tsx:117",className:"border-envora-pine/20 shadow-sm",children:e.jsxs(Me,{"data-loc":"client/src/pages/Admin.tsx:118",className:"p-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Admin.tsx:119",className:"flex items-center gap-2 mb-2",children:[e.jsx(bn,{"data-loc":"client/src/pages/Admin.tsx:120",className:"w-4 h-4 text-envora-green"}),e.jsx("span",{"data-loc":"client/src/pages/Admin.tsx:121",className:"text-muted-foreground text-xs uppercase tracking-wider",children:"Assessments"})]}),e.jsx("div",{"data-loc":"client/src/pages/Admin.tsx:123",className:"text-3xl font-bold text-envora-pine",style:{fontFamily:"var(--font-display)"},children:x?.byTheme?.environment??0})]})}),e.jsx(_e,{"data-loc":"client/src/pages/Admin.tsx:126",className:"border-amber-200 shadow-sm",children:e.jsxs(Me,{"data-loc":"client/src/pages/Admin.tsx:127",className:"p-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Admin.tsx:128",className:"flex items-center gap-2 mb-2",children:[e.jsx(ba,{"data-loc":"client/src/pages/Admin.tsx:129",className:"w-4 h-4 text-amber-500"}),e.jsx("span",{"data-loc":"client/src/pages/Admin.tsx:130",className:"text-muted-foreground text-xs uppercase tracking-wider",children:"Badges"})]}),e.jsx("div",{"data-loc":"client/src/pages/Admin.tsx:132",className:"text-3xl font-bold text-amber-600",
574style:{fontFamily:"var(--font-display)"},children:x?.byTheme?.labor??0})]})})]})}),e.jsx(ig,{"data-loc":"client/src/pages/Admin.tsx:139",className:"mb-8"}),e.jsx(_e,{"data-loc":"client/src/pages/Admin.tsx:142",className:"border-border/60 shadow-sm mb-6",children:e.jsxs(Me,{"data-loc":"client/src/pages/Admin.tsx:143",className:"p-6",children:[e.jsx("div",{"data-loc":"client/src/pages/Admin.tsx:144",className:"flex items-start justify-between mb-4",children:e.jsxs("div",{"data-loc":"client/src/pages/Admin.tsx:145",children:[e.jsxs("div",{"data-loc":"client/src/pages/Admin.tsx:146",className:"flex items-center gap-2 mb-1",children:[e.jsx(Zx,{"data-loc":"client/src/pages/Admin.tsx:147",className:"w-5 h-5 text-blue-500"}),e.jsx("h2",{"data-loc":"client/src/pages/Admin.tsx:148",className:"text-lg font-semibold text-foreground",style:{fontFamily:"var(--font-display)"},children:"Criteria Library"}),(x?.total??0)>0&&e.jsxs(Qe,{"data-loc":"client/src/pages/Admin.tsx:150",className:"bg-envora-pine/10 text-envora-pine border-envora-pine/20 text-xs",children:[x?.total," criteria loaded"]})]}),e.jsx("p",{"data-loc":"client/src/pages/Admin.tsx:155",className:"text-muted-foreground text-sm",children:"Seed the 72-criterion assessment library across Environment, Labor & Human Rights, Ethics & Governance, and Sustainable Procurement themes. This is idempotent, safe to run multiple times."})]})}),e.jsx("div",{"data-loc":"client/src/pages/Admin.tsx:161",className:"grid grid-cols-2 md:grid-cols-4 gap-3 mb-6",children:[{theme:"Environment",count:20,color:"text-envora-pine",bg:"bg-envora-pine/8 border-envora-pine/20"},{theme:"Labor & HR",count:18,color:"text-blue-600",bg:"bg-blue-50 border-blue-200"},{theme:"Ethics",count:16,color:"text-amber-600",bg:"bg-amber-50 border-amber-200"},{theme:"Infrastructure",count:18,color:"text-muted-foreground",bg:"bg-muted border-border"}].map(w=>e.jsxs("div",{"data-loc":"client/src/pages/Admin.tsx:168",className:`rounded-xl border p-3 text-center ${w.bg}`,children:[e.jsx("div",{"data-loc":"client/src/pages/Admin.tsx:169",className:`text-xl font-bold ${w.color}`,style:{fontFamily:"var(--font-display)"},children:w.count}),e.jsx("div",{"data-loc":"client/src/pages/Admin.tsx:170",className:"text-muted-foreground text-xs mt-0.5",children:w.theme})]},w.theme))}),e.jsxs("div",{"data-loc":"client/src/pages/Admin.tsx:175",className:"flex items-center gap-3",children:[j?d?e.jsxs("div",{"data-loc":"client/src/pages/Admin.tsx:182",className:"flex items-center gap-2 text-envora-green text-sm",children:[e.jsx(Un,{"data-loc":"client/src/pages/Admin.tsx:183",className:"w-4 h-4"}),e.jsx("span",{"data-loc":"client/src/pages/Admin.tsx:184",children:"Criteria library seeded successfully."})]}):e.jsx(ie,{"data-loc":"client/src/pages/Admin.tsx:187",onClick:()=>{i(!0),p.mutate()},disabled:o,className:"bg-envora-pine hover:bg-envora-pine/90 text-white",children:o?e.jsxs(e.Fragment,{children:[e.jsx(Or,{"data-loc":"client/src/pages/Admin.tsx:196",className:"w-4 h-4 mr-2 animate-spin"}),"Seeding..."]}):e.jsxs(e.Fragment,{children:[e.jsx(Zx,{"data-loc":"client/src/pages/Admin.tsx:198",className:"w-4 h-4 mr-2"}),"Seed 72 Criteria"]})}):e.jsxs("div",{"data-loc":"client/src/pages/Admin.tsx:177",className:"flex items-center gap-2 text-red-500 text-sm",children:[e.jsx(sn,{"data-loc":"client/src/pages/Admin.tsx:178",className:"w-4 h-4"}),e.jsx("span",{"data-loc":"client/src/pages/Admin.tsx:179",children:"Admin role required to seed criteria. Promote your user to admin in the database first."})]}),e.jsxs(ie,{"data-loc":"client/src/pages/Admin.tsx:202",variant:"outline",size:"sm",onClick:()=>v(),children:[e.jsx(Or,{"data-loc":"client/src/pages/Admin.tsx:207",className:"w-4 h-4 mr-1"}),"Refresh Stats"]})]})]})}),e.jsx(_e,{"data-loc":"client/src/pages/Admin.tsx:215",className:"border-border/60 shadow-sm mb-6",children:e.jsxs(Me,{"data-loc":"client/src/pages/Admin.tsx:216",className:"p-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/Admin.tsx:217",className:"flex items-start justify-between mb-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Admin.tsx:218",children:[e.jsxs("div",{"data-loc":"client/src/pages/Admin.tsx:219",className:"flex items-center gap-2 mb-1",children:[e.jsx($6,{"data-loc":"client/src/pages/Admin.tsx:220",className:"w-5 h-5 text-envora-green"}),e.jsx("h2",{"data-loc":"client/src/pages/Admin.tsx:221",className:"text-lg font-semibold text-foreground",style:{fontFamily:"var(--font-display)"},children:"AI Audit Worker"}),g&&e.jsx(Qe,{"data-loc":"client/src/pages/Admin.tsx:223",className:g.pendingCount>0?"bg-amber-100 text-amber-700 border-amber-300":"bg-envora-green/10 text-envora-green border-envora-green/20",children:g.pendingCount>0?`${g.pendingCount} pending`:"Idle"})]}),e.jsx("p",{"data-loc":"client/src/pages/Admin.tsx:228",className:"text-muted-foreground text-sm",children:"Heartbeat cron that picks up submitted asse
574ssments and runs the 4-batch AI scoring pipeline. Fires every 60 seconds."})]}),e.jsxs(ie,{"data-loc":"client/src/pages/Admin.tsx:230",variant:"outline",size:"sm",onClick:()=>N(),disabled:y,children:[e.jsx(Or,{"data-loc":"client/src/pages/Admin.tsx:231",className:`w-4 h-4 mr-1 ${y?"animate-spin":""}`}),"Refresh"]})]}),y?e.jsx("div",{"data-loc":"client/src/pages/Admin.tsx:236",className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[1,2,3,4].map(w=>e.jsx(Ue,{"data-loc":"client/src/pages/Admin.tsx:237",className:"h-20 rounded-xl"},w))}):g?e.jsxs("div",{"data-loc":"client/src/pages/Admin.tsx:240",className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Admin.tsx:241",className:"rounded-xl border border-envora-pine/20 bg-envora-pine/5 p-3 text-center",children:[e.jsx("div",{"data-loc":"client/src/pages/Admin.tsx:242",className:"text-2xl font-bold text-envora-pine",style:{fontFamily:"var(--font-display)"},children:g.auditedCount}),e.jsx("div",{"data-loc":"client/src/pages/Admin.tsx:243",className:"text-muted-foreground text-xs mt-0.5",children:"Total Audited"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Admin.tsx:245",className:`rounded-xl border p-3 text-center ${g.pendingCount>0?"border-amber-200 bg-amber-50":"border-border bg-muted"}`,children:[e.jsx("div",{"data-loc":"client/src/pages/Admin.tsx:246",className:`text-2xl font-bold ${g.pendingCount>0?"text-amber-600":"text-muted-foreground"}`,style:{fontFamily:"var(--font-display)"},children:g.pendingCount}),e.jsx("div",{"data-loc":"client/src/pages/Admin.tsx:247",className:"text-muted-foreground text-xs mt-0.5",children:"Pending Audits"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Admin.tsx:249",className:"rounded-xl border border-blue-200 bg-blue-50 p-3 text-center",children:[e.jsx(Ur,{"data-loc":"client/src/pages/Admin.tsx:250",className:"w-4 h-4 text-blue-500 mx-auto mb-1"}),e.jsx("div",{"data-loc":"client/src/pages/Admin.tsx:251",className:"text-xs font-semibold text-blue-700",children:g.workerCron}),e.jsx("div",{"data-loc":"client/src/pages/Admin.tsx:252",className:"text-muted-foreground text-xs mt-0.5",children:"Cron Schedule"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Admin.tsx:254",className:"rounded-xl border border-border bg-muted p-3 text-center",children:[e.jsx(Bt,{"data-loc":"client/src/pages/Admin.tsx:255",className:"w-4 h-4 text-muted-foreground mx-auto mb-1"}),e.jsx("div",{"data-loc":"client/src/pages/Admin.tsx:256",className:"text-xs font-semibold text-foreground truncate",children:g.lastAuditedAt?new Date(g.lastAuditedAt).toLocaleString():"No audits yet"}),e.jsx("div",{"data-loc":"client/src/pages/Admin.tsx:259",className:"text-muted-foreground text-xs mt-0.5",children:"Last Completed"})]})]}):e.jsx("p",{"data-loc":"client/src/pages/Admin.tsx:263",className:"text-muted-foreground text-sm",children:"Could not load worker status."})]})}),e.jsx(_e,{"data-loc":"client/src/pages/Admin.tsx:269",className:"border-border/40 shadow-sm",children:e.jsxs(Me,{"data-loc":"client/src/pages/Admin.tsx:270",className:"p-4 text-sm text-muted-foreground",children:[e.jsx("p",{"data-loc":"client/src/pages/Admin.tsx:271",className:"font-medium text-foreground mb-2",children:"Criteria Framework Mappings"}),e.jsx("p",{"data-loc":"client/src/pages/Admin.tsx:272",children:"Each criterion is mapped to one or more of: GSTC Hotel Standard (A13, B2, C1-C7, D1-D5), ISO 14001:2015, SA8000:2014, ILO Core Conventions, EcoVadis Methodology, Green Key Standard, and UN SDGs. The scoring uses a 2/1/0/N/A scale with N/A redistribution across themes."})]})})]})]})}const aw={gold:"text-amber-500 bg-amber-50 border-amber-200",silver:"text-muted-foreground bg-muted/40 border-border",bronze:"text-amber-700 bg-amber-50 border-amber-200",not_yet_rated:"text-muted-foreground/70 bg-muted/40 border-border"};function GP(){const{slug:t}=ea(),{data:n,isLoading:r}=ue.supplier.getPublicProfile.useQuery({slug:t??""},{enabled:!!t});if(r)return e.jsx("div",{"data-loc":"client/src/pages/public/Verify.tsx:21",className:"min-h-screen bg-muted/40 flex items-center justify-center p-4",children:e.jsx(Ue,{"data-loc":"client/src/pages/public/Verify.tsx:22",className:"h-64 w-full max-w-md rounded-2xl"})});if(!n||!n.profile)return e.jsx("div",{"data-loc":"client/src/pages/public/Verify.tsx:29",className:"min-h-screen bg-muted/40 flex items-center justify-center p-4",children:e.jsxs("div",{"data-loc":"client/src/pages/public/Verify.tsx:30",className:"text-center",children:[e.jsx(ES,{"data-loc":"client/src/pages/public/Verify.tsx:31",className:"w-12 h-12 text-border mx-auto mb-3"}),e.jsx("h2",{"data-loc":"client/src/pages/public/Verify.tsx:32",className:"font-display text-xl font-bold text-foreground
574/80 mb-2",children:"Supplier Not Found"}),e.jsx("p",{"data-loc":"client/src/pages/public/Verify.tsx:33",className:"text-muted-foreground text-sm",children:"This verification link is invalid or the supplier is not yet verified."})]})});const{profile:o,assessment:i}=n,d=i?.band??"not_yet_rated",u=i?.overallScore,p=i?.state==="ai_audited"||i?.state==="verified";return e.jsx("div",{"data-loc":"client/src/pages/public/Verify.tsx:45",className:"min-h-screen bg-muted/40 flex items-center justify-center p-4",children:e.jsxs("div",{"data-loc":"client/src/pages/public/Verify.tsx:46",className:"max-w-md w-full space-y-4",children:[e.jsx("div",{"data-loc":"client/src/pages/public/Verify.tsx:48",className:"flex items-center justify-center gap-2 mb-6",children:e.jsx("img",{"data-loc":"client/src/pages/public/Verify.tsx:49",src:"/manus-storage/envora-logo_f789bcb1.webp",alt:"Envora Consulting",className:"h-9 w-auto"})}),e.jsx(_e,{"data-loc":"client/src/pages/public/Verify.tsx:53",className:"border-0 shadow-lg",children:e.jsxs(Me,{"data-loc":"client/src/pages/public/Verify.tsx:54",className:"p-8 text-center",children:[e.jsx("div",{"data-loc":"client/src/pages/public/Verify.tsx:55",className:"w-20 h-20 rounded-2xl bg-envora-green/10 flex items-center justify-center mx-auto mb-4",children:e.jsx(Te,{"data-loc":"client/src/pages/public/Verify.tsx:56",className:"w-10 h-10 text-envora-green"})}),e.jsx("div",{"data-loc":"client/src/pages/public/Verify.tsx:58",className:"text-xs font-semibold text-envora-green uppercase tracking-wider mb-2",children:"Envora Verified Supplier"}),e.jsx("h1",{"data-loc":"client/src/pages/public/Verify.tsx:59",className:"font-display text-2xl font-bold text-foreground mb-1",children:o.businessName}),e.jsx("p",{"data-loc":"client/src/pages/public/Verify.tsx:60",className:"text-muted-foreground text-sm mb-4",children:o.country}),u&&p&&e.jsxs("div",{"data-loc":"client/src/pages/public/Verify.tsx:63",className:"flex items-center justify-center gap-4 mb-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/Verify.tsx:64",children:[e.jsx("div",{"data-loc":"client/src/pages/public/Verify.tsx:65",className:"font-display text-4xl font-bold text-foreground",children:Number(u).toFixed(0)}),e.jsx("div",{"data-loc":"client/src/pages/public/Verify.tsx:66",className:"text-xs text-muted-foreground/70",children:"/ 100"})]}),e.jsxs(Qe,{"data-loc":"client/src/pages/public/Verify.tsx:68",className:`text-sm px-3 py-1.5 border ${aw[d]??aw.not_yet_rated}`,children:[e.jsx(Ut,{"data-loc":"client/src/pages/public/Verify.tsx:69",className:"w-4 h-4 mr-1.5"}),d.replace("_"," ").replace(/\b\w/g,x=>x.toUpperCase())]})]}),e.jsxs("div",{"data-loc":"client/src/pages/public/Verify.tsx:75",className:"text-xs text-muted-foreground/70 mt-4 pt-4 border-t border-border/60",children:["Verified by Envora Supplier Readiness System / ",new Date().getFullYear()]})]})}),e.jsx("p",{"data-loc":"client/src/pages/public/Verify.tsx:81",className:"text-center text-xs text-muted-foreground/70",children:"This verification is issued by Envora and is based on the supplier's self-assessment and evidence audit."})]})})}function KP(){const{token:t}=ea(),{data:n,isLoading:r}=ue.supplier.getSharedReport.useQuery({token:t??""},{enabled:!!t});if(r)return e.jsx("div",{"data-loc":"client/src/pages/public/SharedReport.tsx:15",className:"min-h-screen bg-muted/40 p-8",children:e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReport.tsx:16",className:"max-w-3xl mx-auto space-y-4",children:[e.jsx(Ue,{"data-loc":"client/src/pages/public/SharedReport.tsx:17",className:"h-20 rounded-2xl"}),e.jsx(Ue,{"data-loc":"client/src/pages/public/SharedReport.tsx:18",className:"h-48 rounded-2xl"}),e.jsx(Ue,{"data-loc":"client/src/pages/public/SharedReport.tsx:19",className:"h-64 rounded-2xl"})]})});if(!n?.profile)return e.jsx("div",{"data-loc":"client/src/pages/public/SharedReport.tsx:27",className:"min-h-screen bg-muted/40 flex items-center justify-center",children:e.jsx("div",{"data-loc":"client/src/pages/public/SharedReport.tsx:28",className:"text-muted-foreground text-sm",children:"Report not found or link has expired."})});const o=n.profile,i=n.assessment,u=n.report?.reportData??null,p=i?.band??"not_yet_rated";return e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReport.tsx:40",className:"min-h-screen bg-muted/40",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReport.tsx:41",className:"bg-card border-b border-border px-6 py-3.5 flex items-center gap-3",children:[e.jsx("img",{"data-loc":"client/src/pages/public/SharedReport.tsx:42",src:"/manus-storage/envora-logo_f789bcb1.webp",alt:"Envora Consulting",className:"h-9 w-auto"}),e.jsx("span",{"data-loc":"client/src/pages/public/SharedReport.tsx:43",className:"text-border mx-1",children:"/"}),e.jsx("span",{"data-loc":"client/src/pages/public/SharedReport.tsx:44",className:"text-foreground
574/70 text-sm font-medium",children:"Supplier Readiness Report"})]}),e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReport.tsx:46",className:"max-w-3xl mx-auto p-8 space-y-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReport.tsx:47",className:"flex items-start justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReport.tsx:48",children:[e.jsx("h1",{"data-loc":"client/src/pages/public/SharedReport.tsx:49",className:"font-display text-2xl font-extrabold text-foreground tracking-tight",children:o.businessName}),e.jsx("p",{"data-loc":"client/src/pages/public/SharedReport.tsx:50",className:"text-muted-foreground text-sm",children:o.country})]}),e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReport.tsx:52",className:"flex items-center gap-3",children:[i?.overallScore&&e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReport.tsx:54",className:"text-right",children:[e.jsx("div",{"data-loc":"client/src/pages/public/SharedReport.tsx:55",className:"font-display text-3xl font-extrabold text-foreground",children:Number(i.overallScore).toFixed(0)}),e.jsx("div",{"data-loc":"client/src/pages/public/SharedReport.tsx:56",className:"text-xs text-muted-foreground/70",children:"/ 100"})]}),e.jsxs(Qe,{"data-loc":"client/src/pages/public/SharedReport.tsx:59",className:`text-sm px-3 py-1 border ${p==="gold"?"text-amber-500 bg-amber-50 border-amber-200":p==="silver"?"text-muted-foreground bg-muted/40 border-border":p==="bronze"?"text-amber-700 bg-amber-50 border-amber-200":"text-muted-foreground/70 bg-muted/40 border-border"}`,children:[e.jsx(Ut,{"data-loc":"client/src/pages/public/SharedReport.tsx:60",className:"w-3.5 h-3.5 mr-1.5"}),p.replace("_"," ").replace(/\b\w/g,x=>x.toUpperCase())]})]})]}),e.jsxs(_e,{"data-loc":"client/src/pages/public/SharedReport.tsx:66",className:"border-0 shadow-sm",children:[e.jsx(Ft,{"data-loc":"client/src/pages/public/SharedReport.tsx:67",children:e.jsx(Xt,{"data-loc":"client/src/pages/public/SharedReport.tsx:67",className:"text-base font-semibold",children:"Theme Scores"})}),e.jsx(Me,{"data-loc":"client/src/pages/public/SharedReport.tsx:68",className:"space-y-3",children:[{key:"envScore",label:"Environment",weight:"30%"},{key:"laborScore",label:"Labor & Human Rights",weight:"30%"},{key:"ethicsScore",label:"Ethics & Governance",weight:"20%"},{key:"procurementScore",label:"Sustainable Procurement",weight:"20%"}].map(x=>{const h=Number(i[x.key]??0);return e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReport.tsx:77",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReport.tsx:78",className:"flex justify-between mb-1",children:[e.jsx("span",{"data-loc":"client/src/pages/public/SharedReport.tsx:79",className:"text-sm text-foreground/80",children:x.label}),e.jsxs("span",{"data-loc":"client/src/pages/public/SharedReport.tsx:80",className:"text-sm font-semibold text-foreground",children:[h.toFixed(0),"/100"]})]}),e.jsx(vp,{"data-loc":"client/src/pages/public/SharedReport.tsx:82",value:h,className:"h-2"})]},x.key)})})]}),u&&e.jsxs(_e,{"data-loc":"client/src/pages/public/SharedReport.tsx:90",className:"border-0 shadow-sm",children:[e.jsx(Ft,{"data-loc":"client/src/pages/public/SharedReport.tsx:91",children:e.jsx(Xt,{"data-loc":"client/src/pages/public/SharedReport.tsx:91",className:"text-base font-semibold",children:"AI Audit Summary"})}),e.jsx(Me,{"data-loc":"client/src/pages/public/SharedReport.tsx:92",className:"space-y-3",children:u.executiveSummary&&e.jsx("p",{"data-loc":"client/src/pages/public/SharedReport.tsx:93",className:"text-sm text-foreground/80 leading-relaxed",children:u.executiveSummary})})]})]})]})}const xu="envora_pending_invite_token",bf="envora_pending_invite_ts";function qP(){const{token:t}=ea(),[,n]=ds(),{isAuthenticated:r,loading:o}=za(),[i,d]=b.useState(!1),[u,p]=b.useState(null),x=ue.hotel.acceptInvitation.useMutation({onSuccess:()=>{d(!0),localStorage.removeItem(xu),localStorage.removeItem(bf),xe.success("Invitation accepted! Setting up your profile..."),setTimeout(()=>n("/supplier/onboarding"),1800)},onError:v=>{p(v.message),localStorage.removeItem(xu),localStorage.removeItem(bf)}});b.useEffect(()=>{t&&(localStorage.setItem(xu,t),localStorage.setItem(bf,String(Date.now())))},[t]),b.useEffect(()=>{if(!r||o)return;const v=t||localStorage.getItem(xu);v&&!i&&!x.isPending&&x.mutate({token:v})},[r,o]);const h=()=>{window.location.href=Xa()};return o?e.jsx("div",{"data-loc":"client/src/pages/public/InviteAccept.tsx:67",className:"min-h-screen bg-gradient-to-br from-envora-pine to-envora-
574pine/80 flex items-center justify-center p-4",children:e.jsx(Ue,{"data-loc":"client/src/pages/public/InviteAccept.tsx:68",className:"h-64 w-full max-w-md rounded-2xl"})}):e.jsx("div",{"data-loc":"client/src/pages/public/InviteAccept.tsx:74",className:"min-h-screen bg-gradient-to-br from-envora-pine to-envora-pine/80 flex items-center justify-center p-4",children:e.jsxs("div",{"data-loc":"client/src/pages/public/InviteAccept.tsx:75",className:"w-full max-w-md space-y-4",children:[e.jsx("div",{"data-loc":"client/src/pages/public/InviteAccept.tsx:77",className:"flex items-center justify-center mb-2",children:e.jsx("img",{"data-loc":"client/src/pages/public/InviteAccept.tsx:78",src:"/manus-storage/envora-logo_f789bcb1.webp",alt:"Envora Consulting",className:"h-10 w-auto"})}),e.jsx(_e,{"data-loc":"client/src/pages/public/InviteAccept.tsx:81",className:"border-0 shadow-xl",children:e.jsx(Me,{"data-loc":"client/src/pages/public/InviteAccept.tsx:82",className:"p-8 text-center",children:i?e.jsxs(e.Fragment,{children:[e.jsx("div",{"data-loc":"client/src/pages/public/InviteAccept.tsx:85",className:"w-16 h-16 rounded-2xl bg-envora-green/10 flex items-center justify-center mx-auto mb-4",children:e.jsx(Te,{"data-loc":"client/src/pages/public/InviteAccept.tsx:86",className:"w-8 h-8 text-envora-green"})}),e.jsx("h2",{"data-loc":"client/src/pages/public/InviteAccept.tsx:88",className:"font-display text-xl font-bold text-foreground mb-2",children:"Invitation Accepted!"}),e.jsx("p",{"data-loc":"client/src/pages/public/InviteAccept.tsx:89",className:"text-muted-foreground text-sm",children:"Taking you to your profile setup..."})]}):u?e.jsxs(e.Fragment,{children:[e.jsx("div",{"data-loc":"client/src/pages/public/InviteAccept.tsx:93",className:"w-16 h-16 rounded-2xl bg-red-50 flex items-center justify-center mx-auto mb-4",children:e.jsx(Tr,{"data-loc":"client/src/pages/public/InviteAccept.tsx:94",className:"w-8 h-8 text-red-500"})}),e.jsx("h2",{"data-loc":"client/src/pages/public/InviteAccept.tsx:96",className:"font-display text-xl font-bold text-foreground mb-2",children:"Invitation Error"}),e.jsx("p",{"data-loc":"client/src/pages/public/InviteAccept.tsx:97",className:"text-muted-foreground text-sm mb-6",children:u}),e.jsx(ie,{"data-loc":"client/src/pages/public/InviteAccept.tsx:98",onClick:()=>n("/"),variant:"outline",className:"w-full",children:"Go to Homepage"})]}):x.isPending?e.jsxs(e.Fragment,{children:[e.jsx("div",{"data-loc":"client/src/pages/public/InviteAccept.tsx:104",className:"w-16 h-16 rounded-2xl bg-envora-pine/10 flex items-center justify-center mx-auto mb-4",children:e.jsx(It,{"data-loc":"client/src/pages/public/InviteAccept.tsx:105",className:"w-8 h-8 text-envora-pine animate-spin"})}),e.jsx("h2",{"data-loc":"client/src/pages/public/InviteAccept.tsx:107",className:"font-display text-xl font-bold text-foreground mb-2",children:"Accepting Invitation..."}),e.jsx("p",{"data-loc":"client/src/pages/public/InviteAccept.tsx:108",className:"text-muted-foreground text-sm",children:"Linking your account to the hotel. Please wait."})]}):r?e.jsxs(e.Fragment,{children:[e.jsx("div",{"data-loc":"client/src/pages/public/InviteAccept.tsx:134",className:"w-16 h-16 rounded-2xl bg-envora-pine/10 flex items-center justify-center mx-auto mb-4",children:e.jsx(It,{"data-loc":"client/src/pages/public/InviteAccept.tsx:135",className:"w-8 h-8 text-envora-pine animate-spin"})}),e.jsx("h2",{"data-loc":"client/src/pages/public/InviteAccept.tsx:137",className:"font-display text-xl font-bold text-foreground mb-2",children:"Processing Invitation..."}),e.jsx("p",{"data-loc":"client/src/pages/public/InviteAccept.tsx:138",className:"text-muted-foreground text-sm",children:"Please wait while we link your account."})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{"data-loc":"client/src/pages/public/InviteAccept.tsx:112",className:"w-16 h-16 rounded-2xl bg-envora-pine/10 flex items-center justify-center mx-auto mb-4",children:e.jsx(Ms,{"data-loc":"client/src/pages/public/InviteAccept.tsx:113",className:"w-8 h-8 text-envora-pine"})}),e.jsx("h2",{"data-loc":"client/src/pages/public/InviteAccept.tsx:115",className:"font-display text-xl font-bold text-foreground mb-2",children:"You've Been Invited"}),e.jsxs("p",{"data-loc":"client/src/pages/public/InviteAccept.tsx:116",className:"text-muted-foreground text-sm mb-2",children:["A hotel has invited you to complete a ",e.jsx("strong",{"data-loc":"client/src/pages/public/InviteAccept.tsx:117",children:"sustainability readiness asse
574ssment"})," on Envora."]}),e.jsx("p",{"data-loc":"client/src/pages/public/InviteAccept.tsx:119",className:"text-muted-foreground text-sm mb-6",children:"Sign in or create a free account to accept this invitation and get started."}),e.jsx(ie,{"data-loc":"client/src/pages/public/InviteAccept.tsx:122",onClick:h,className:"w-full bg-envora-pine hover:bg-envora-pine/90 text-white mb-3",children:"Sign In / Create Account"}),e.jsx("p",{"data-loc":"client/src/pages/public/InviteAccept.tsx:128",className:"text-xs text-muted-foreground/60",children:"Your invitation will be automatically linked after you sign in."})]})})}),e.jsx("p",{"data-loc":"client/src/pages/public/InviteAccept.tsx:144",className:"text-center text-xs text-white/50",children:"Envora Consulting â Supplier Sustainability Platform"})]})})}function QP(){const{token:t}=ea();return ds(),b.useEffect(()=>{t&&window.location.replace(`/supplier/invite/${t}`)},[t]),e.jsx("div",{"data-loc":"client/src/pages/public/HotelInviteAccept.tsx:24",className:"min-h-screen flex items-center justify-center bg-background",children:e.jsx(gs,{"data-loc":"client/src/pages/public/HotelInviteAccept.tsx:25",className:"text-envora-green w-10 h-10"})})}const YP=[{icon:e.jsx(Ho,{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:27",className:"w-7 h-7 text-[#1a4731]"}),title:"Answer 72 sustainability questions",description:"Rate your business across four key areas: Environment, Labor & Human Rights, Ethics & Governance, and Sustainable Procurement. Each question takes about 30 seconds.",color:"bg-emerald-50 border-emerald-200"},{icon:e.jsx(Ro,{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:33",className:"w-7 h-7 text-blue-600"}),title:"Upload supporting documents",description:"Attach certificates, policies, or photos as evidence for your answers. PDFs, Word files, and images are all accepted. Evidence is optional but strengthens your score.",color:"bg-blue-50 border-blue-200"},{icon:e.jsx(bn,{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:39",className:"w-7 h-7 text-purple-600"}),title:"Receive your Readiness Report",description:"Once submitted, our AI reviews your responses and generates a Supplier Readiness Report with your sustainability score, band rating, and improvement recommendations.",color:"bg-purple-50 border-purple-200"},{icon:e.jsx(qa,{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:45",className:"w-7 h-7 text-amber-600"}),title:"Share with hotels you work with",description:"Your report can be shared with any hotel partner â not just the one who invited you. One assessment, multiple uses. Your data stays private unless you share it.",color:"bg-amber-50 border-amber-200"}];function XP({invite:t,onStart:n}){return e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:61",className:"min-h-screen bg-gradient-to-b from-[#f0f7f4] to-white",children:[e.jsx("div",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:63",className:"bg-white border-b border-slate-200 px-4 py-3 flex items-center justify-center",children:e.jsx("img",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:64",src:"/manus-storage/envora-logo_f789bcb1.webp",alt:"Envora Consulting",className:"h-12 w-auto"})}),e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:71",className:"max-w-2xl mx-auto px-4 py-10 space-y-8",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:73",className:"text-center space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:74",className:"inline-flex items-center gap-2 bg-[#1a4731]/10 text-[#1a4731] text-xs font-semibold px-3 py-1.5 rounded-full",children:[e.jsx(ba,{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:75",className:"w-3.5 h-3.5"}),"Sustainability Self-Assessment"]}),e.jsx("h1",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:78",className:"text-2xl sm:text-3xl font-bold text-slate-900 leading-tight",children:t?.supplierName?`Welcome, ${t.supplierName}`:"Welcome to your Sustainability Assessment"}),e.jsx("p",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:83",className:"text-slate-600 text-base leading-relaxed",children:t?.hotelName?`${t.hotelName} has invited you to complete a sustainability self-assessment as part of their responsible procurement programme.`:"You have been invited to complete a sustainability self-assessment."}),t?.message&&t.message!=="Invited via Envora Consulting Sustainability Hub"&&e.jsx("div",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:89",className:"bg-white border border-slate-200 rounded-xl p-4 text-left",children:e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:90",className:"flex items-start gap-2",children:[e.jsx(Ms,{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:91",className:"w-4 h-4 text-slate-400 flex-shrink-0 mt-0.5"}),e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:92",children:[e.jsx("p",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:93",className:"text-xs text-slate-500 mb-0.5",children:"Message from hotel"}),e.jsxs("p",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:94",className:"text-sm text-slate-700 italic",children:['"',t.message,'"']})]})]})})]}),e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:102",className:"space-y-3",children:[e.jsx("h2",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:103",className:"text-sm font-semibold text-slate-500 uppercase tracking-wide text-center",children:"What to expect"}),e.jsx("div",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:106",className:"grid gap-3",children:YP.map((r,o)=>e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:108",className:`flex items-start gap-4 p-4 rounded-xl border ${r.color} transition-all hover:shadow-sm cursor-default`,children:[e.jsx("div",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:112",className:"flex-shrink-0 w-12 h-12 bg-white rounded-xl flex items-center justify-center shadow-sm border border-white/80",children:r.icon}),e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:115",className:"min-w-0",children:[e.jsx("div",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:116",className:"flex items-center gap-2 mb-1",children:e.jsxs("span",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:117",className:"text-xs font-bold text-slate-400 uppercase tracking-wide",children:["Step ",o+1]})}),e.jsx("p",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:119",className:"text-sm font-semibold text-slate-900 leading-snug",children:r.title}),e.jsx("p",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:120",className:"text-xs text-slate-600 mt-1 leading-relaxed",children:r.description})]})]},o))})]}),e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:128",className:"bg-[#1a4731] rounded-2xl p-5 text-white",children:[e.jsx("h3",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:129",className:"text-sm font-semibold mb-3 opacity-80",children:"Qu
574ick facts"}),e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:130",className:"grid grid-cols-3 gap-4 text-center",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:131",children:[e.jsx("p",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:132",className:"text-2xl font-bold",children:"72"}),e.jsx("p",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:133",className:"text-xs opacity-70 mt-0.5",children:"Questions"})]}),e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:135",children:[e.jsx("p",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:136",className:"text-2xl font-bold",children:"4"}),e.jsx("p",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:137",className:"text-xs opacity-70 mt-0.5",children:"Themes"})]}),e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:139",children:[e.jsx("p",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:140",className:"text-2xl font-bold",children:"~30"}),e.jsx("p",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:141",className:"text-xs opacity-70 mt-0.5",children:"Minutes"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:144",className:"mt-4 pt-4 border-t border-white/20 flex items-center gap-2",children:[e.jsx(ba,{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:145",className:"w-4 h-4 opacity-70 flex-shrink-0"}),e.jsx("p",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:146",className:"text-xs opacity-70",children:"Your responses are saved automatically as you go. You can return to this link at any time to continue."})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:151",className:"text-center space-y-3",children:[e.jsxs(ie,{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:152",onClick:n,size:"lg",className:"bg-[#1a4731] hover:bg-[#1a4731]/90 text-white px-10 py-6 text-base font-semibold rounded-xl shadow-lg hover:shadow-xl transition-all",children:["Start Assessment",e.jsx(Yi,{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:158",className:"w-5 h-5 ml-2"})]}),e.jsx("p",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:160",className:"text-xs text-slate-400",children:"No account required · Free of charge · Takes ~30 minutes"})]}),e.jsx("div",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:164",className:"text-center pt-4 border-t border-slate-200",children:e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:165",className:"flex items-center justify-center gap-2 text-xs text-slate-400",children:[e.jsx(Ns,{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:166",className:"w-3.5 h-3.5 text-emerald-500"}),e.jsx("span",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:167",children:"Powered by Envora Consulting Sustainability Hub"})]})})]})]})}function ZP(){const{token:t}=ea(),[n,r]=b.useState("welcome"),[o,i]=b.useState(null),[d,u]=b.useState(null),[p,x]=b.useState(!1),{data:h,isLoading:v,error:g}=ue.supplierToken.getInvite.useQuery({token:t??""},{enabled:!!t,retry:!1}),y=ue.supplierToken.getOrCreateContext.useMutation({onSuccess:N=>{i(N.assessmentId),x(!1)},onError:N=>{u(N.message),x(!1)}});if(b.useEffect(()=>{t&&h&&!o&&(x(!0),y.mutate({token:t}))},[t,h]),v||p)return e.jsx("div",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:216",className:"min-h-screen flex items-center justify-center bg-[#f0f7f4]",children:e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:217",className:"text-center space-y-4",children:[e.jsx("img",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:218",src:"/manus-storage/envora-logo_f789bcb1.webp",alt:"Envora Consulting",className:"h-12 w-auto mx-auto"}),e.jsx(gs,{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:219",className:"w-8 h-8 mx-auto text-[#1a4731]"}),e.jsx("p",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:220",className:"text-slate-500 text-sm",children:"Loading your assessment..."})]})});
574if(g||d){const N=g?.message??d??"Unknown error";return e.jsx("div",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:229",className:"min-h-screen flex items-center justify-center bg-[#f0f7f4] p-4",children:e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:230",className:"max-w-md w-full bg-white rounded-2xl shadow-sm border border-slate-200 p-8 text-center space-y-4",children:[e.jsx("img",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:231",src:"/manus-storage/envora-logo_f789bcb1.webp",alt:"Envora Consulting",className:"h-12 w-auto mx-auto"}),e.jsx("div",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:232",className:"w-12 h-12 bg-red-100 rounded-full flex items-center justify-center mx-auto",children:e.jsx(Zt,{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:233",className:"w-6 h-6 text-red-600"})}),e.jsx("h2",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:235",className:"text-lg font-semibold text-slate-900",children:"Unable to load assessment"}),e.jsx("p",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:236",className:"text-slate-600 text-sm",children:N}),e.jsx("p",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:237",className:"text-slate-500 text-xs",children:"If this link was sent to you by a hotel, please contact them for a new invite link."})]})})}return n==="welcome"?e.jsx(XP,{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:246",invite:h,onStart:()=>r("assessment")}):o?e.jsx(i4,{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:267",token:t,tokenAssessmentId:o,supplierName:h?.supplierName??void 0,onBack:()=>r("welcome")}):e.jsx("div",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:256",className:"min-h-screen flex items-center justify-center bg-[#f0f7f4]",children:e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:257",className:"text-center space-y-4",children:[e.jsx("img",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:258",src:"/manus-storage/envora-logo_f789bcb1.webp",alt:"Envora Consulting",className:"h-12 w-auto mx-auto"}),e.jsx(It,{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:259",className:"w-8 h-8 mx-auto text-[#1a4731] animate-spin"}),e.jsx("p",{"data-loc":"client/src/pages/public/SupplierQuestionnaire.tsx:260",className:"text-slate-500 text-sm",children:"Preparing your assessment..."})]})})}const Qt="#1B4332",ga="#2E9E6B",Yo="#F0AB00",Wi="#33B7E1",zu={gold:{label:"Gold",color:"#92400e",bg:"#FEF3C7",border:"#F59E0B"},silver:{label:"Silver",color:"#374151",bg:"#F3F4F6",border:"#9CA3AF"},bronze:{label:"Bronze",color:"#78350F",bg:"#FEF3C7",border:"#B45309"},not_yet_rated:{label:"Not Yet Rated",color:"#6B7280",bg:"#F9FAFB",border:"#D1D5DB"}},c4={environment:{label:"Environment",icon:Ns,color:ga},labor:{label:"Labour",icon:Ws,color:Wi},ethics:{label:"Ethics",icon:ba,color:Qt},procurement:{label:"Procurement",icon:Dl,color:Yo}},nw={pass:{label:"Pass",color:"#166534",bg:"#DCFCE7",icon:Te},partial:{label:"Partial",color:"#92400e",bg:"#FEF3C7",icon:tt},fail:{label:"Fail",color:"#991B1B",bg:"#FEE2E2",icon:Zt},pending:{label:"Pending",color:"#6B7280",bg:"#F3F4F6",icon:Bt},na:{label:"N/A",color:"#6B7280",bg:"#F3F4F6",icon:Bt}},rw={"executive summary":Ut,"sustainability performance":Yn,"scope 3":Ns,"key strengths":Te,"areas for improvement":tt,"hotel procurement recommendation":ba},WP={"executive summary":Qt,"sustainability performance":Wi,"scope 3":ga,"key strengths":ga,"areas for improvement":Yo,"hotel procurement recommendation":Qt},JP={approved:{label:"Approved Supplier",bg:"#DCFCE7",border:"#16A34A",color:"#166534",icon:Te},conditional:{label:"Conditional Approval",bg:"#FEF3C7",border:"#F59E0B",color:"#92400e",icon:tt},development:{label:"Development Required",bg:"#FEE2E2",border:"#EF4444",color:"#991B1B",icon:Zt}};function eH(t){return t==null?"#9CA3AF":t>=70?ga:t>=50?Yo:"#EF4444"}function tH({score:t,band:n}){const r=t??0,o=80,i=100,d=100,u=Math.PI*o,p=r/100*u,x=n==="gold"?Yo:n==="silver"?"#9CA3AF":n==="bronze"?"#B45309":n==="not_yet_rated"?"#D1D5DB":ga,h=zu[n??"not_yet_rated"]??zu.not_yet_rated;return e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:81",className:"flex flex-col items-center",children:[e.jsxs("svg",{"data-loc":"client/src/pages/public/SharedReportView.tsx:82",width:"200",height:"120",viewBox:"0 0 200 120",children:[e.jsx("path",{"data-loc":"client/src/pages/public/SharedReportView.tsx:83",d:`M ${i-o} ${d} A ${o} ${o} 0 0 1 ${i+o} ${d}`,fill:"none",stroke:"#E5E7EB",strokeWidth:"16",strokeLinecap:"round"}),e.jsx("path",{"data-loc":"client/src/pages/public/SharedReportView.tsx:85",d:`M ${i-o} ${d} A ${o} ${o} 0 0 1 ${i+o} ${d}`,fill:"none",stroke:x,strokeWidth:"16",strokeLinecap:"round",strokeDasharray:`${p} ${u}`}),e.jsx("text",{"data-loc":"client/src/pages/public/SharedReportView.tsx:88",x:i,y:d-8,textAnchor:"middle",fontSize:"32",fontWeight:"700",fill:Qt,fontFamily:"'Plus Jakarta Sans', sans-serif",children:t!=null?Math.round(t):"--"}),e.jsx("text",{"data-loc":"client/src/pages/public/SharedReportView.tsx:92",x:i,y:d+14,textAnchor:"middle",fontSize:"13",fill:"#6B7280",fontFamily:"'Plus Jakarta Sans', sans-serif",children:"out of 100"})]}),e.jsx("span",{"data-loc":"client/src/pages/public/SharedReportView.tsx:95",className:"mt-1 px-4 py-1.5 rounded-full text-sm font-semibold border",style:{color:h.color,background:h.bg,borderColor:h.border},children:h.label})]})}function sH({label:t,score:n,color:r,icon:o}){const i=n??0;return e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:106",className:"flex items-center gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:107",className:"flex items-center gap-1.5 w-32 shrink-0",children:[e.jsx(o,{"data-loc":"client/src/pages/public/SharedReportView.tsx:108",className:"w-3.5 h-3.5",style:{color:r}}),e.jsx("span",{"data-loc":"client/src/pages/public/SharedReportView.tsx:109",className:"text-xs font-medium text-foreground",children:t})]}),e.jsx("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:111",className:"flex-1 h-3 bg-gray-100 rounded-full overflow-hidden",children:e.jsx("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:112",className:"h-full rounded-full transition-all duration-700",style:{width:`${i}%`,background:r}})}),e.jsx("span",{"data-loc":"client/src/pages/public/SharedReportView.tsx:114",className:"text-xs font-semibold w-10 text-right",style:{color:eH(n)},children:n!=null?`${Math.round(n)}%`:"--"})]})}function aH({pass:t,partial:n,fail:r,total:o}){return o===0?null:e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:124",className:"h-4 rounded-full overflow-hidden flex",children:[e.jsx("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:125",style:{width:`${t/o*100}%`,background:"#16A34A"}}),e.jsx("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:126",style:{width:`${n/o*100}%`,background:Yo}}),e.jsx("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:127",style:{width:`${r/o*100}%`,background:"#EF4444"}})]})}function lw({text:t}){const n=t.split(` 575`),r=[];let o=[];function i(u){o.length!==0&&(r.push(e.jsx("ul",{"data-loc":"client/src/pages/public/SharedReportView.tsx:141",className:"space-y-1.5 my-2 pl-1",children:o.map((p,x)=>e.jsxs("li",{"data-loc":"client/src/pages/public/SharedReportView.tsx:143",className:"flex items-start gap-2 text-sm text-foreground leading-relaxed",children:[e.jsx("span",{"data-loc":"client/src/pages/public/SharedReportView.tsx:144",className:"mt-1.5 w-1.5 h-1.5 rounded-full shrink-0",style:{background:Qt}}),e.jsx("span",{"data-loc":"client/src/pages/public/SharedReportView.tsx:145",dangerouslySetInnerHTML:{__html:d(p)}})]},x))},`ul-${u}`)),o=[])}function d(u){return u.replace(/\*\*(.+?)\*\*/g,"<strong>$1</strong>").replace(/\*(.+?)\*/g,"<em>$1</em>")}
575return n.forEach((u,p)=>{const x=u.trim();if(!x){i(String(p));return}x.startsWith("- ")||x.startsWith("⢠")||x.startsWith("* ")?o.push(x.replace(/^[-\u2022*]\s*/,"")):/^\d+\.\s/.test(x)?o.push(x.replace(/^\d+\.\s*/,"")):(i(String(p)),r.push(e.jsx("p",{"data-loc":"client/src/pages/public/SharedReportView.tsx:169",className:"text-sm text-foreground leading-relaxed mb-1",dangerouslySetInnerHTML:{__html:d(x)}},p)))}),i("end"),e.jsx("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:175",className:"space-y-0.5",children:r})}function nH(t){const n=[],r=t.split(` 576`);let o=null;for(const i of r)i.startsWith("## ")?(o&&n.push(o),o={heading:i.replace(/^##\s*/,"").trim(),body:""}):o&&(o.body+=(o.body?` 577`:"")+i);return o&&n.push(o),n}function rH(t){const n=t.toLowerCase(),r=n.indexOf("hotel procurement recommendation");if(r===-1)return{verdict:null,text:""};const o=t.slice(r+40,r+800);return n.includes("approved")&&!n.includes("conditional")?{verdict:"approved",text:o}:n.includes("conditional")?{verdict:"conditional",text:o}:n.includes("development required")||n.includes("not recommended")?{verdict:"development",text:o}:{verdict:null,text:o}}function lH({theme:t,rows:n}){const[r,o]=b.useState(!0),[i,d]=b.useState(null),u=c4[t]??{label:t,icon:Dt,color:Qt},p=u.icon,x=n.filter(v=>v.aiVerdict==="pass").length,h=n.filter(v=>v.aiVerdict==="fail").length;return e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:219",className:"border border-border rounded-xl overflow-hidden mb-3",children:[e.jsxs("button",{"data-loc":"client/src/pages/public/SharedReportView.tsx:220",className:"w-full flex items-center justify-between px-4 py-3 bg-muted/30 hover:bg-muted/50 transition-colors",onClick:()=>o(!r),children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:222",className:"flex items-center gap-2",children:[e.jsx(p,{"data-loc":"client/src/pages/public/SharedReportView.tsx:223",className:"w-4 h-4",style:{color:u.color}}),e.jsx("span",{"data-loc":"client/src/pages/public/SharedReportView.tsx:224",className:"font-semibold text-sm text-foreground",children:u.label}),e.jsxs("span",{"data-loc":"client/src/pages/public/SharedReportView.tsx:225",className:"text-xs text-muted-foreground ml-1",children:["(",n.length," criteria)"]})]}),e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:227",className:"flex items-center gap-2",children:[e.jsxs("span",{"data-loc":"client/src/pages/public/SharedReportView.tsx:228",className:"text-xs px-2 py-0.5 rounded-full font-medium",style:{background:"#DCFCE7",color:"#166534"},children:[x," pass"]}),e.jsxs("span",{"data-loc":"client/src/pages/public/SharedReportView.tsx:229",className:"text-xs px-2 py-0.5 rounded-full font-medium",style:{background:"#FEE2E2",color:"#991B1B"},children:[h," fail"]}),r?e.jsx(Ps,{"data-loc":"client/src/pages/public/SharedReportView.tsx:230",className:"w-4 h-4 text-muted-foreground"}):e.jsx(qe,{"data-loc":"client/src/pages/public/SharedReportView.tsx:230",className:"w-4 h-4 text-muted-foreground"})]})]}),r&&e.jsx("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:234",className:"divide-y divide-border/50",children:n.map(v=>{const g=nw[v.aiVerdict??"pending"]??nw.pending,y=g.icon,N=i===v.id,j=v.aiReasoning||v.aiStrengths?.length>0||v.aiGaps?.length>0||v.aiRecommendations?.length>0;return e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:241",children:[e.jsxs("button",{"data-loc":"client/src/pages/public/SharedReportView.tsx:242",className:"w-full flex items-center gap-3 px-4 py-3 text-left hover:bg-muted/20 transition-colors",onClick:()=>j&&d(N?null:v.id),children:[e.jsx("span",{"data-loc":"client/src/pages/public/SharedReportView.tsx:244",className:"text-xs font-mono text-muted-foreground w-14 shrink-0",children:v.code}),e.jsx("span",{"data-loc":"client/src/pages/public/SharedReportView.tsx:245",className:"flex-1 text-sm text-foreground",children:v.title}),e.jsxs("span",{"data-loc":"client/src/pages/public/SharedReportView.tsx:246",className:"flex items-center gap-1 text-xs font-medium px-2 py-0.5 rounded-full shrink-0",style:{color:g.color,background:g.bg},children:[e.jsx(y,{"data-loc":"client/src/pages/public/SharedReportView.tsx:248",className:"w-3 h-3"}),g.label]}),j&&(N?e.jsx(Ps,{"data-loc":"client/src/pages/public/SharedReportView.tsx:251",className:"w-3.5 h-3.5 text-muted-foreground shrink-0"}):e.jsx(qe,{"data-loc":"client/src/pages/public/SharedReportView.tsx:252",className:"w-3.5 h-3.5 text-muted-foreground shrink-0"}))]}),N&&j&&e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:255",className:"px-4 pb-4 pt-1 bg-muted/10 space-y-3",children:[v.aiReasoning&&e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:257",children:[e.jsx("p",{"data-loc":"client/src/pages/public/SharedReportView.tsx:258",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide mb-1",children:"Assessment Reasoning"}),e.jsx("p",{"data-loc":"client/src/pages/public/SharedReportView.tsx:259",className:"text-sm text-foreground leading-relaxed",children:v.aiReasoning})]}),v.aiStrengths?.length>0&&e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:263",children:[e.jsx("p",{"data-loc":"client/src/pages/public/SharedReportView.tsx:264",className:"text-xs font-semibold mb-1",style:{color:ga},children:"Strengths"}),e.jsx("ul",{"data-loc":"client/src/pages/public/SharedReportView.tsx:265",className:"space-y-1",children:v.aiStrengths.map((w,A)=>e.jsxs("li",{"data-loc":"client/src/pages/public/SharedReportView.tsx:267",className:"flex items-start gap-1.5 text-sm text-foreground",children:[e.jsx(Te,{"data-loc":"client/src/pages/public/SharedReportView.tsx:268",className:"w-3.5 h-3.5 mt-0.5 shrink-0",style:{color:ga}}),w]},A))})]}),v.aiGaps?.length>0&&e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:275",children:[e.jsx("p",{"data-loc":"client/src/pages/public/SharedReportView.tsx:276",className:"text-xs font-semibold mb-1",style:{color:"#D97706"},children:"Gaps"}),e.jsx("ul",{"data-loc":"client/src/pages/public/SharedReportView.tsx:277",className:"space-y-1",children:v.aiGaps.map((w,A)=>e.jsxs("li",{"data-loc":"client/src/pages/public/SharedReportView.tsx:279",className:"flex items-start gap-1.5 text-sm text-foreground",children:[e.jsx(tt,{"data-loc":"client/src/pages/public/SharedReportView.tsx:280",className:"w-3.5 h-3.5 mt-0.5 shrink-0",style:{color:"#D97706"}}),w]},A))})]}),v.aiRecommendations?.length>0&&e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:287",children:[e.jsx("p",{"data-loc":"client/src/pages/public/SharedReportView.tsx:288",className:"text-xs font-semibold mb-1",style:{color:Qt},children:"Recommendations"}),e.jsx("ul",{"data-loc":"client/src/pages/public/SharedReportView.tsx:289",className:"space-y-1",children:v.aiRecommendations.map((w,A)=>e.jsxs("li",{"data-loc":"client/src/pages/public/SharedReportView.tsx:291",className:"flex items-start gap-1.5 text-sm text-foreground",children:[e.jsx(Ur,{"data-loc":"client/src/pages/public/SharedReportView.tsx:292",className:"w-3.5 h-3.5 mt-0.5 shrink-0",style:{color:Qt}}),w]},A))})]})]})]},v.id)})})]})}function oH({scope3:t}){const n=Number(t.totalScope3TonnesCo2e??0),r=t.reportingYear??"",o=[{label:"Purchased Goods (Cat 1)",value:Number(t.purchasedGoodsSpendAed??0)*25e-5},{label:"Upstream Fuel (Cat 3)",value:Number(t.upstreamFuelKwh??0)*233e-6},{label:"Freight (Cat 4)",value:Number(t.freightTonneKm??0)*12e-5}
577,{label:"Waste (Cat 5)",value:Number(t.wasteGeneratedTonnes??0)*.45},{label:"Business Travel (Cat 6)",value:Number(t.flightKm??0)*115e-6},{label:"Commuting (Cat 7)",value:Number(t.employeeCount??0)*1.2}].filter(u=>u.value>0),i=n<50?{label:"Low",color:ga}:n<200?{label:"Medium",color:Yo}:n<500?{label:"High",color:"#F97316"}:{label:"Very High",color:"#EF4444"},d=Math.max(...o.map(u=>u.value),1);return e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:327",className:"bg-white rounded-xl border border-border p-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:328",className:"flex items-center gap-2 mb-4",children:[e.jsx(Ns,{"data-loc":"client/src/pages/public/SharedReportView.tsx:329",className:"w-4 h-4",style:{color:ga}}),e.jsx("h3",{"data-loc":"client/src/pages/public/SharedReportView.tsx:330",className:"font-semibold text-sm text-foreground",children:"Scope 3 Carbon Footprint"}),r&&e.jsxs("span",{"data-loc":"client/src/pages/public/SharedReportView.tsx:331",className:"text-xs text-muted-foreground ml-auto",children:["Reporting year: ",r]})]}),e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:333",className:"flex items-end gap-4 mb-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:334",children:[e.jsx("p",{"data-loc":"client/src/pages/public/SharedReportView.tsx:335",className:"text-3xl font-bold",style:{color:Qt},children:n.toFixed(1)}),e.jsx("p",{"data-loc":"client/src/pages/public/SharedReportView.tsx:336",className:"text-xs text-muted-foreground",children:"tCO2e total"})]}),e.jsxs("span",{"data-loc":"client/src/pages/public/SharedReportView.tsx:338",className:"px-3 py-1 rounded-full text-xs font-semibold mb-1",style:{background:`${i.color}22`,color:i.color},children:[i.label," Footprint"]})]}),o.length>0&&e.jsx("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:342",className:"space-y-2",children:o.map(u=>e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:344",className:"flex items-center gap-2",children:[e.jsx("span",{"data-loc":"client/src/pages/public/SharedReportView.tsx:345",className:"text-xs text-muted-foreground w-44 shrink-0 truncate",children:u.label}),e.jsx("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:346",className:"flex-1 h-2 bg-gray-100 rounded-full overflow-hidden",children:e.jsx("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:347",className:"h-full rounded-full",style:{width:`${u.value/d*100}%`,background:ga}})}),e.jsxs("span",{"data-loc":"client/src/pages/public/SharedReportView.tsx:349",className:"text-xs font-medium w-14 text-right text-foreground",children:[u.value.toFixed(1)," t"]})]},u.label))})]})}function iH(){const{token:t}=ea(),{data:n,isLoading:r,error:o}=ue.hotelInvite.viewSharedReport.useQuery({token:t??""},{enabled:!!t}),i=b.useMemo(()=>n?.report?.reportData?.aiNarrativeReport??"",[n]),d=b.useMemo(()=>nH(i),[i]),u=b.useMemo(()=>rH(i),[i]),p=n?.assessment,x=n?.profile,h=n?.scope3,v=n?.shareLink,g=p?.overallScore!=null?Number(p.overallScore):null,y=p?.band??"not_yet_rated",N=b.useMemo(()=>[{key:"environment",score:p?.envScore!=null?Number(p.envScore):null},{key:"labor",score:p?.laborScore!=null?Number(p.laborScore):null},{key:"ethics",score:p?.ethicsScore!=null?Number(p.ethicsScore):null},{key:"procurement",score:p?.procurementScore!=null?Number(p.procurementScore):null}],[p]),j=b.useMemo(()=>{const E=n?.allCriteria??[],T=n?.criterionResponses??[],D=new Map(T.map(z=>[z.criterionId,z])),M=z=>{if(Array.isArray(z))return z;if(typeof z=="string")try{return JSON.parse(z)}catch{return[]}return[]};return E.map(z=>{const O=D.get(z.id);return{id:z.id,code:z.code,title:z.title,theme:z.theme,aiVerdict:O?.aiVerdict??null,aiStrengths:M(O?.aiStrengths),aiGaps:M(O?.aiGaps),aiRecommendations:M(O?.aiRecommendations),aiReasoning:O?.aiReasoning??null}})},[n]),w=b.useMemo(()=>{const E=j.filter(z=>z.aiVerdict==="pass").length,T=j.filter(z=>z.aiVerdict==="partial").length,D=j.filter(z=>z.aiVerdict==="fail").length,M=j.filter(z=>z.aiVerdict&&z.aiVerdict!=="pending").length;return{pass:E,partial:T,fail:D,total:M}},[j]),A=b.useMemo(()=>{const E={};for(const T of j)E[T.theme]||(E[T.theme]=[]),E[T.theme].push(T);return E},[j]),C=zu[y]??zu.not_yet_rated;return r?e.jsx("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:430",className:"min-h-screen flex items-center justify-center bg-background",children:e.jsx(gs,{"data-loc":"client/src/pages/public/SharedReportView.tsx:431",className:"w-10 h-10",
577style:{color:ga}})}):o||!n?e.jsx("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:438",className:"min-h-screen flex items-center justify-center bg-background p-4",children:e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:439",className:"max-w-md w-full bg-white rounded-2xl border border-border shadow-lg p-8 text-center",children:[e.jsx(tt,{"data-loc":"client/src/pages/public/SharedReportView.tsx:440",className:"w-12 h-12 text-red-400 mx-auto mb-4"}),e.jsx("h2",{"data-loc":"client/src/pages/public/SharedReportView.tsx:441",className:"text-xl font-semibold mb-2 text-foreground",children:"Report Not Available"}),e.jsx("p",{"data-loc":"client/src/pages/public/SharedReportView.tsx:442",className:"text-muted-foreground text-sm",children:o?.message??"This report link is invalid or has expired."})]})}):e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:449",className:"min-h-screen bg-background",children:[e.jsx("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:451",className:"border-b border-border bg-white shadow-sm sticky top-0 z-20",children:e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:452",className:"max-w-5xl mx-auto px-4 py-3 flex items-center justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:453",className:"flex items-center gap-2",children:[e.jsx("img",{"data-loc":"client/src/pages/public/SharedReportView.tsx:454",src:"/manus-storage/envora-logo_f789bcb1.webp",alt:"Envora",className:"h-7 w-auto"}),e.jsx("span",{"data-loc":"client/src/pages/public/SharedReportView.tsx:455",className:"text-xs text-muted-foreground hidden sm:inline",children:"Supplier Readiness Report"})]}),e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:457",className:"flex items-center gap-3 text-xs text-muted-foreground",children:[e.jsxs("span",{"data-loc":"client/src/pages/public/SharedReportView.tsx:458",className:"flex items-center gap-1",children:[e.jsx(Bt,{"data-loc":"client/src/pages/public/SharedReportView.tsx:459",className:"w-3 h-3"}),"Expires ",v?.expiresAt?new Date(v.expiresAt).toLocaleDateString():"-"]}),e.jsxs("span",{"data-loc":"client/src/pages/public/SharedReportView.tsx:462",className:"flex items-center gap-1",children:[e.jsx(Ms,{"data-loc":"client/src/pages/public/SharedReportView.tsx:463",className:"w-3 h-3"}),v?.accessCount??0," views"]})]})]})}),e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:470",className:"max-w-5xl mx-auto px-4 py-8 space-y-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:473",className:"rounded-2xl overflow-hidden border border-border",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:474",className:"px-6 py-5 flex items-start justify-between gap-4",style:{background:`linear-gradient(135deg, ${Qt} 0%, #2D6A4F 100%)`},children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:476",children:[e.jsx("img",{"data-loc":"client/src/pages/public/SharedReportView.tsx:477",src:"/manus-storage/envora-logo_f789bcb1.webp",alt:"Envora Consulting",className:"h-10 w-auto mb-4"}),e.jsx("h1",{"data-loc":"client/src/pages/public/SharedReportView.tsx:479",className:"text-2xl font-bold text-white mb-1",style:{fontFamily:"'Fraunces', serif"},children:"Supplier Readiness Report"}),e.jsx("p",{"data-loc":"client/src/pages/public/SharedReportView.tsx:482",className:"text-white/70 text-sm",children:"Sustainability Readiness Assessment"})]}),e.jsx("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:484",className:"text-right shrink-0",children:e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:485",className:"inline-flex items-center gap-1.5 px-4 py-2 rounded-full text-sm font-bold border-2",style:{color:C.color,background:C.bg,borderColor:C.border},children:[e.jsx(Ut,{"data-loc":"client/src/pages/public/SharedReportView.tsx:487",className:"w-4 h-4"}),C.label]})})]}),e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:491",className:"bg-white px-6 py-4 flex flex-wrap gap-4 border-t border-border",children:[!!x?.businessName&&e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:493",className:"flex items-center gap-1.5 text-sm text-foreground",children:[e.jsx(Ms,{"data-loc":"client/src/pages/public/SharedReportView.tsx:494",className:"w-3.5 h-3.5 text-muted-foreground"}),e.jsx("span",{"data-loc":"client/src/pages/public/SharedReportView.tsx:495",className:"font-semibold",children:String(x.businessName)})]}),!!x?.country&&e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:499",className:"flex items-center gap-1.5 text-sm text-muted-foreground",children:[e.jsx(Ko,{"data-loc":"client/src/pages/public/SharedReportView.tsx:500",className:"w-3.5 h-3.5"}),String(x.country)]}),n?.report?.generatedAt&&e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:504",className:"flex items-center gap-1.5 text-sm text-muted-foreground",children:[e.jsx(Mh,{"data-loc":"client/src/pages/public/SharedReportView.tsx:505",className:"w-3.5 h-3.5"}),new Date(n.report.generatedAt).toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric"})]}),e.jsx("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:509",className:"ml-auto",children:e.jsxs(Qe,{"data-loc":"client/src/pages/public/SharedReportView.tsx:510",variant:"outline",className:"text-xs",style:{borderColor:ga,color:ga},children:[e.jsx(Te,{"data-loc":"client/src/pages/public/SharedReportView.tsx:511",className:"w-3 h-3 mr-1"}),"Verified Report"]})})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:518",className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:519",className:"bg-white rounded-xl border border-border overflow-hidden flex flex-col items-center",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:520",className:"w-full px-5 py-3 flex items-center gap-2",style:{background:`${Qt}18`},children:[e.jsx(Ut,{"data-loc":"client/src/pages/public/SharedReportView.tsx:521",className:"w-4 h-4 shrink-0",style:{color:Qt}}),e.jsx("h3",{"data-loc":"client/src/pages/public/SharedReportView.tsx:522",className:"font-bold text-sm",style:{color:Qt,fontFamily:"'Fraunces', serif"},children:"Overall Readiness Score"})]}),e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:524",className:"p-5 flex flex-col items-center w-full",children:[e.jsx(tH,{"data-loc":"client/src/pages/public/SharedReportView.tsx:525",score:g,band:y}),e.jsx("p",{"data-loc":"client/src/pages/public/SharedReportView.tsx:526",className:"text-xs text-muted-foreground text-center mt-3 max-w-xs",children:y==="gold"?"Exceptional sustainability performance. Recommended for preferred supplier status.":y==="silver"?"Strong performance with minor gaps. Suitable for most hotel procurement requirements.":y==="bronze"?"Meets baseline requirements. Improvement plan recommended before preferred status.":"Assessment complete."})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:534",className:"bg-white rounded-xl border border-border overflow-hidden",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:535",className:"px-5 py-3 flex items-center gap-2",style:{background:`${Wi}18`},children:[e.jsx(Yn,{"data-loc":"client/src/pages/public/SharedReportView.tsx:536",className:"w-4 h-4 shrink-0",style:{color:Wi}}),e.jsx("h3",{"data-loc":"client/src/pages/public/SharedReportView.tsx:537",className:"font-bold text-sm",style:{color:Wi,fontFamily:"'Fraunces', serif"},children:"Theme Performance"})]}),e.jsx("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:539",className:"p-5",children:e.jsx("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:540",className:"space-y-3.5",children:N.map(({key:E,score:T})=>{const D=c4[E];return e.jsx(sH,{"data-loc":"client/src/pages/public/SharedReportView.tsx:543",label:D.label,score:T,color:D.color,icon:D.icon},E)})})})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:551",className:"bg-white rounded-xl border border-border overflow-hidden",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:552",className:"px-5 py-3 flex items-center gap-2",style:{background:`${Qt}18`},children:[e.jsx(ba,{"data-loc":"client/src/pages/public/SharedReportView.tsx:553",className:"w-4 h-4 shrink-0",style:{color:Qt}}),e.jsx("h3",{"data-loc":"client/src/pages/public/SharedReportView.tsx:554",className:"font-bold text-sm",style:{color:Qt,fontFamily:"'Fraunces', serif"},children:"Audit Verdict Breakdown"})]}),e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:556",className:"p-5",children:[e.jsx("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:557",className:"grid grid-cols-3 gap-3 mb-4",children:[{count:w.pass,label:"Pass",color:"#16A34A",bg:"#DCFCE7",icon:Te},{count:w.partial,label:"Partial",color:"#D97706",bg:"#FEF3C7",icon:tt},{count:w.fail,label:"Fail",color:"#DC2626",bg:"#FEE2E2",icon:Zt}].map(({count:E,label:T,color:D,bg:M,icon:z})=>e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:563",className:"rounded-xl p-4 text-center",style:{background:M},children:[e.jsx(z,{"data-loc":"client/src/pages/public/SharedReportView.tsx:564",className:"w-5 h-5 mx-auto mb-1",style:{color:D}}),e.jsx("p",{"data-loc":"client/src/pages/public/SharedReportView.tsx:565",className:"text-2xl font-bold",style:{color:D},children:E}),e.jsx("p",{"data-loc":"client/src/pages/public/SharedReportView.tsx:566",className:"text-xs font-medium",style:{color:D},children:T})]},T))}),e.jsx(aH,{"data-loc":"client/src/pages/public/SharedReportView.tsx:570",pass:w.pass,partial:w.partial,fail:w.fail,total:w.total}),e.jsxs("p",{"data-loc":"client/src/pages/public/SharedReportView.tsx:571",className:"text-xs text-muted-foreground mt-2",children:[w.total," criteria assessed"]})]})]}),d.length>0?e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:577",className:"space-y-4",children:[e.jsx("h3",{"data-loc":"client/src/pages/public/SharedReportView.tsx:578",className:"font-semibold text-sm text-foreground",children:"Assessment Narrative"}),d.map(E=>{const T=E.heading.toLowerCase(),D=Object.keys(rw).find(O=>T.includes(O)),M=D?rw[D]:Dt,z=D?WP[D]:Qt;return e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:585",className:"bg-white rounded-xl border border-border p-5 border-l-4",style:{borderLeftColor:z},children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:587",className:"flex items-center gap-2 mb-3 -mx-5 -mt-5 px-5 py-3 rounded-t-xl",style:{background:`${z}18`},children:[e.jsx(M,{"data-loc":"client/src/pages/public/SharedReportView.tsx:589",className:"w-4 h-4 shrink-0",style:{color:z}}),e.jsx("h4",{"data-loc":"client/src/pages/public/SharedReportView.tsx:590",className:"font-bold text-sm",style:{color:z,fontFamily:"'Fraunces', serif"},children:E.heading})]}),e.jsx(lw,{"data-loc":"client/src/pages/public/SharedReportView.tsx:592",text:E.body.trim()})]},E.heading)})]}):i?e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:598",className:"bg-white rounded-xl border border-border p-5 border-l-4",style:{borderLeftColor:Qt},children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:599",className:"flex items-center gap-2 mb-3",children:[e.jsx(Dt,{"data-loc":"client/src/pages/public/SharedReportView.tsx:600",className:"w-4 h-4",style:{color:Qt}}),e.jsx("h4",{"data-loc":"client/src/pages/public/SharedReportView.tsx:601",className:"font-semibold text-sm text-foreground",children:"Assessment Narrative"})]}),e.jsx(lw,{"data-loc":"client/src/pages/public/SharedReportView.tsx:603",text:i})]}):null,h&&e.jsx(oH,{"data-loc":"client/src/pages/public/SharedReportView.tsx:608",scope3:h}),u.verdict&&(()=>{const E=JP[u.verdict],T=E.icon;return e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:615",className:"rounded-xl border-2 p-5",style:{background:E.bg,borderColor:E.border},children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:616",className:"flex items-center gap-2 mb-2",children:[e.jsx(T,{"data-loc":"client/src/pages/public/SharedReportView.tsx:617",className:"w-5 h-5",style:{color:E.color}}),e.jsx("h3",{"data-loc":"client/src/pages/public/SharedReportView.tsx:618",className:"font-bold text-sm",style:{color:E.color},children:"Hotel Procurement Recommendation"}),e.jsx("span",{"data-loc":"client/src/pages/public/SharedReportView.tsx:619",className:"ml-auto px-3 py-1 rounded-full text-xs font-bold border",style:{color:E.color,borderColor:E.border,background:"white"},children:E.label})]}),e.jsx("p",{"data-loc":"client/src/pages/public/SharedReportView.tsx:624",className:"text-sm leading-relaxed",style:{color:E.color},children:u.text.trim().slice(0,400)})]})})(),e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:632",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:633",className:"px-5 py-3 mb-3 rounded-xl flex items-center gap-2",style:{background:`${Qt}18`},children:[e.jsx(Dt,{"data-loc":"client/src/pages/public/SharedReportView.tsx:634",className:"w-4 h-4 shrink-0",style:{color:Qt}}),e.jsx("h3",{"data-loc":"client/src/pages/public/SharedReportView.tsx:635",className:"font-bold text-sm",style:{color:Qt,fontFamily:"'Fraunces', serif"},children:"Criteria Detail by Theme"})]}),Object.entries(A).map(([E,T])=>e.jsx(lH,{"data-loc":"client/src/pages/public/SharedReportView.tsx:638",theme:E,rows:T},E))]}),e.jsxs("div",{"data-loc":"client/src/pages/public/SharedReportView.tsx:643",className:"text-center text-muted-foreground
577/60 text-xs pb-4 flex items-center justify-center gap-1.5",children:[e.jsx(Ms,{"data-loc":"client/src/pages/public/SharedReportView.tsx:644",className:"w-3 h-3"}),e.jsx("span",{"data-loc":"client/src/pages/public/SharedReportView.tsx:645",children:"Envora Supplier Readiness Platform"}),e.jsx("span",{"data-loc":"client/src/pages/public/SharedReportView.tsx:646",children:"·"}),e.jsx("span",{"data-loc":"client/src/pages/public/SharedReportView.tsx:647",children:"Confidential Sustainability Report"})]})]})]})}const zt="#1B4332",fg="#2E9E6B",d4="#F0AB00",$n="#33B7E1",ow={gold:{label:"Gold",color:"#92400e",bg:"#FEF3C7",border:"#F59E0B"},silver:{label:"Silver",color:"#374151",bg:"#F3F4F6",border:"#9CA3AF"},bronze:{label:"Bronze",color:"#78350F",bg:"#FEF3C7",border:"#B45309"},not_yet_rated:{label:"Not Yet Rated",color:"#6B7280",bg:"#F9FAFB",border:"#D1D5DB"}},u4={environment:{label:"Environment",color:fg,icon:Ns},labor:{label:"Labor & Human Rights",color:$n,icon:Ws},ethics:{label:"Ethics & Governance",color:d4,icon:ba},procurement:{label:"Sustainable Procurement",color:"#8B5CF6",icon:Dl}},iw={environment:Ns,labor:Ws,ethics:ba,procurement:Dl,strength:Te,gap:tt,recommendation:Yn,summary:Dt,overview:Dt,carbon:Ur},cH={environment:fg,labor:$n,ethics:d4,procurement:"#8B5CF6",strength:"#16A34A",gap:"#DC2626",recommendation:zt,summary:zt,overview:zt,carbon:$n},dH={approved:{label:"Approved",color:"#166534",bg:"#DCFCE7",border:"#16A34A",icon:Te},conditional:{label:"Conditional Approval",color:"#92400E",bg:"#FEF3C7",border:"#D97706",icon:tt},development:{label:"Development Required",color:"#991B1B",bg:"#FEE2E2",border:"#DC2626",icon:Zt}};function uH(t){if(!t)return[];const n=[],r=t.split(` 578`);let o=null;for(const i of r){const d=i.match(/^#{1,3}\s+(.+)/);d?(o&&n.push(o),o={heading:d[1].trim(),body:""}):o&&(o.body+=i+` 579`)}return o&&n.push(o),n}function pH(t){const n=t.toLowerCase();return n.includes("approved")?{verdict:"approved",text:t}:n.includes("conditional")?{verdict:"conditional",text:t}:n.includes("development required")?{verdict:"development",text:t}:{verdict:null,text:t}}function mH({label:t,score:n,color:r,icon:o}){const i=n!==null?Math.round(n):null;return e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:90",className:"flex items-center gap-3",children:[e.jsx(o,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:91",className:"w-4 h-4 shrink-0",style:{color:r}}),e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:92",className:"flex-1 min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:93",className:"flex justify-between items-center mb-1",children:[e.jsx("span",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:94",className:"text-xs font-medium text-foreground truncate",children:t}),e.jsx("span",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:95",className:"text-xs font-bold ml-2 shrink-0",style:{color:r},children:i!==null?`${i}%`:"â"})]}),e.jsx("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:97",className:"h-2 rounded-full bg-muted overflow-hidden",children:e.jsx("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:98",className:"h-full rounded-full transition-all duration-700",style:{width:`${i??0}%`,background:r}})})]})]})}function xH({pass:t,partial:n,fail:r,total:o}){return o?e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:108",className:"flex rounded-full overflow-hidden h-3 w-full gap-0.5",children:[e.jsx("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:109",className:"h-full rounded-l-full",style:{width:`${t/o*100}%`,background:"#16A34A"}}),e.jsx("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:110",className:"h-full",style:{width:`${n/o*100}%`,background:"#D97706"}}),e.jsx("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:111",className:"h-full rounded-r-full",style:{width:`${r/o*100}%`,background:"#DC2626"}})]}):null}function cw({text:t}){const n=t.split(` 580`).filter(r=>r.trim());return e.jsx("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:119",className:"space-y-1.5",children:n.map((r,o)=>{const i=r.match(/^[-*â¢]\s+(.*)/);return i?e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:123",className:"flex gap-2 text-sm text-foreground
580/80",children:[e.jsx("span",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:124",className:"shrink-0 mt-1.5 w-1.5 h-1.5 rounded-full",style:{background:zt}}),e.jsx("span",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:125",children:i[1]})]},o):e.jsx("p",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:128",className:"text-sm text-foreground/80 leading-relaxed",children:r},o)})})}function fH({scope3:t}){const n=Number(t.totalScope3TonnesCo2e??0),r=t.reportingYear??"",o=[{label:"Purchased Goods (Cat 1)",value:Number(t.purchasedGoodsSpendAed??0)*25e-5},{label:"Upstream Fuel (Cat 3)",value:Number(t.upstreamFuelKwh??0)*233e-6},{label:"Freight (Cat 4)",value:Number(t.freightTonneKm??0)*12e-5},{label:"Waste (Cat 5)",value:Number(t.wasteGeneratedTonnes??0)*.45},{label:"Business Travel (Cat 6)",value:Number(t.flightKm??0)*115e-6},{label:"Commuting (Cat 7)",value:Number(t.employeeCount??0)*1.2}].filter(i=>i.value>0);return e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:146",className:"bg-white rounded-xl border border-border overflow-hidden",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:147",className:"px-5 py-3 flex items-center gap-2",style:{background:`${$n}18`},children:[e.jsx(Ur,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:148",className:"w-4 h-4 shrink-0",style:{color:$n}}),e.jsx("h3",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:149",className:"font-bold text-sm",style:{color:$n,fontFamily:"'Fraunces', serif"},children:"Scope 3 Carbon Footprint"}),r&&e.jsx("span",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:150",className:"ml-auto text-xs text-muted-foreground",children:r})]}),e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:152",className:"p-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:153",className:"text-3xl font-bold mb-1",style:{color:zt},children:[n.toFixed(1)," ",e.jsx("span",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:153",className:"text-base font-normal text-muted-foreground",children:"tCOâe"})]}),e.jsx("p",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:154",className:"text-xs text-muted-foreground mb-4",children:"Total estimated Scope 3 emissions"}),e.jsx("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:155",className:"space-y-2",children:o.map(i=>e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:157",className:"flex justify-between items-center text-sm",children:[e.jsx("span",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:158",className:"text-foreground/70",children:i.label}),e.jsxs("span",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:159",className:"font-medium text-foreground",children:[i.value.toFixed(2)," tCOâe"]})]},i.label))})]})]})}function hH({theme:t,rows:n}){const[r,o]=b.useState(!1),i=u4[t]??{label:t,color:zt,icon:Dt},d=i.icon,u=n.filter(p=>p.aiVerdict==="pass").length;return e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:180",className:"mb-3 bg-white rounded-xl border border-border overflow-hidden",children:[e.jsxs("button",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:181",className:"w-full flex items-center gap-3 px-5 py-3 text-left hover:bg-muted/30 transition-colors",onClick:()=>o(p=>!p),children:[e.jsx(d,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:183",className:"w-4 h-4 shrink-0",style:{color:i.color}}),e.jsx("span",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:184",className:"font-semibold text-sm text-foreground flex-1",children:i.label}),e.jsxs("span",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:185",className:"text-xs text-muted-foreground",children:[u,"/",n.length," pass"]}),r?e.jsx(Ps,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:186",className:"w-4 h-4 text-muted-foreground"}):e.jsx(qe,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:186",className:"w-4 h-4 text-muted-foreground"})]}),r&&e.jsx("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:189",className:"divide-y divide-border border-t border-border",children:n.map(p=>{const x=p.aiVerdict==="pass"?"#16A34A":p.aiVerdict==="partial"?"#D97706":p.aiVerdict==="fail"?"#DC2626":"#9
580CA3AF",h=p.aiVerdict==="pass"?Te:p.aiVerdict==="partial"?tt:p.aiVerdict==="fail"?Zt:Bt;return e.jsx("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:194",className:"px-5 py-3",children:e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:195",className:"flex items-start gap-2 mb-1",children:[e.jsx(h,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:196",className:"w-4 h-4 shrink-0 mt-0.5",style:{color:x}}),e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:197",className:"flex-1 min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:198",className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:199",className:"text-xs font-mono font-bold",style:{color:i.color},children:p.code}),e.jsx("span",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:200",className:"text-sm font-medium text-foreground",children:p.title}),p.aiVerdict&&e.jsx("span",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:202",className:"text-xs px-2 py-0.5 rounded-full font-medium capitalize",style:{color:x,background:`${x}18`},children:p.aiVerdict})]}),p.aiStrengths.length>0&&e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:208",className:"mt-1.5 text-xs text-muted-foreground",children:[e.jsx("span",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:209",className:"font-medium text-green-700",children:"Strengths: "}),p.aiStrengths.slice(0,2).join(" · ")]}),p.aiGaps.length>0&&e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:214",className:"mt-0.5 text-xs text-muted-foreground",children:[e.jsx("span",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:215",className:"font-medium text-amber-700",children:"Gaps: "}),p.aiGaps.slice(0,2).join(" · ")]})]})]})},p.id)})})]})}function gH(){const{token:t}=ea(),{data:n,isLoading:r,error:o}=ue.supplierToken.getTokenReport.useQuery({token:t??""},{enabled:!!t,retry:!1}),i=b.useMemo(()=>n?.report?.reportData?.aiNarrativeReport??"",[n]),d=b.useMemo(()=>uH(i),[i]),u=b.useMemo(()=>pH(i),[i]),p=n?.assessment,x=n?.profile,h=n?.scope3,v=n?.inviteMeta,g=p?.overallScore!=null?Number(p.overallScore):null,y=p?.band??"not_yet_rated",N=b.useMemo(()=>[{key:"environment",score:p?.envScore!=null?Number(p.envScore):null},{key:"labor",score:p?.laborScore!=null?Number(p.laborScore):null},{key:"ethics",score:p?.ethicsScore!=null?Number(p.ethicsScore):null},{key:"procurement",score:p?.procurementScore!=null?Number(p.procurementScore):null}],[p]),j=b.useMemo(()=>{const R=n?.allCriteria??[],P=n?.criterionResponses??[],B=new Map(P.map(re=>[re.criterionId,re])),V=re=>{if(Array.isArray(re))return re;if(typeof re=="string")try{return JSON.parse(re)}catch{return[]}return[]};return R.map(re=>{const _=B.get(re.id);return{id:re.id,code:re.code,title:re.title,theme:re.theme,aiVerdict:_?.aiVerdict??null,aiStrengths:V(_?.aiStrengths),aiGaps:V(_?.aiGaps),aiRecommendations:V(_?.aiRecommendations),aiReasoning:_?.aiReasoning??null}})},[n]),w=b.useMemo(()=>{const R=j.filter(re=>re.aiVerdict==="pass").length,P=j.filter(re=>re.aiVerdict==="partial").length,B=j.filter(re=>re.aiVerdict==="fail").length,V=j.filter(re=>re.aiVerdict&&re.aiVerdict!=="pending").length;return{pass:R,partial:P,fail:B,total:V}},[j]),A=b.useMemo(()=>{const R={};for(const P of j)R[P.theme]||(R[P.theme]=[]),R[P.theme].push(P);return R},[j]),C=ow[y]??ow.not_yet_rated,E=x?.businessName||v?.supplierName||"Supplier",[T,D]=b.useState(""),[M,z]=b.useState(null),[O,H]=b.useState(!1),[K,ne]=b.useState(!1),le=p?.id,Z=ue.supplierToken.createShareLink.useMutation({onSuccess:R=>{z(R.shareUrl),R.emailSent?xe.success(`Report shared! Email sent to ${T}. Link valid for 30 days.`):T.trim()?(xe.success("Share link created (30 days)."),xe.warning(`Email delivery to ${T} could not be confirmed. Copy the link and send it manually.`)):xe.success("Share link created! Valid for 30 days.")},onError:R=>xe.error(R.message??"Could not create share link.")}),X=()=>{!t||!le||Z.mutate({token:t,assessmentId:le,hotelEmail:T.trim()||void 0})},q=()=>{M&&navigator.clipboard.writeText(M).then(()=>{H(!0),xe.success("Hotel share link copied!"),setTimeout(()=>H(!1),3e3)}).catch(()=>xe.error("Could not copy â please copy the URL manually."))},Q=()=>{const R=typeof window<"u"?window.location.href:"";navigator.clipboard.writeText(R).then(()=>{ne(!0),xe.success("Page link copied!"),setTimeout(()=>ne(!1),3e3)}).catch(()=>xe.error("Could not copy link."))};if(r)return e.jsx("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:350",className:"min-h-screen flex items-center justify-center bg-background",children:e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:351",className:"text-center",children:[e.jsx(gs,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:352",className:"w-10 h-10 mx-auto mb-4",style:{color:fg}}),e.jsx("p",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:353",className:"text-sm text-muted-foreground",children:"Loading your reportâ¦"})]})});if(o||!n){const R=o?.message??"Report not available yet.",P=R.includes("not ready")||R.includes("not generated")||o?.data?.code==="BAD_REQUEST";return e.jsx("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:363",className:"min-h-screen flex items-center justify-center bg-background p-4",children:e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:364",className:"max-w-md w-full bg-white rounded-2xl border border-border shadow-lg p-8 text-center",children:[e.jsx("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:365",className:"w-14 h-14 roun
580ded-full flex items-center justify-center mx-auto mb-4",style:{background:P?"#FEF3C7":"#FEE2E2"},children:P?e.jsx(Bt,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:368",className:"w-7 h-7",style:{color:"#D97706"}}):e.jsx(tt,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:369",className:"w-7 h-7 text-red-400"})}),e.jsx("h2",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:371",className:"text-xl font-semibold mb-2 text-foreground",children:P?"Report Not Ready Yet":"Report Not Available"}),e.jsx("p",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:374",className:"text-muted-foreground text-sm mb-6",children:R}),t&&e.jsxs(en,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:376",href:`/supplier/invite/${t}`,className:"inline-flex items-center gap-2 text-sm font-medium px-4 py-2 rounded-lg text-white",style:{background:zt},children:[e.jsx(cc,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:379",className:"w-4 h-4"}),"Back to Assessment"]})]})})}return e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:389",className:"min-h-screen bg-background",children:[e.jsx("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:391",className:"border-b border-border bg-white shadow-sm sticky top-0 z-20",children:e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:392",className:"max-w-5xl mx-auto px-4 py-3 flex items-center justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:393",className:"flex items-center gap-3",children:[e.jsx("img",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:394",src:"/manus-storage/envora-logo_f789bcb1.webp",alt:"Envora",className:"h-8 w-auto"}),e.jsx("span",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:395",className:"text-xs text-muted-foreground hidden sm:inline",children:"Supplier Readiness Report"})]}),e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:397",className:"flex items-center gap-2",children:[e.jsxs("button",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:398",onClick:Q,className:"inline-flex items-center gap-1.5 text-xs font-semibold px-3 py-1.5 rounded-lg transition-colors text-white",style:{background:K?"#16A34A":zt},children:[K?e.jsx(dc,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:402",className:"w-3.5 h-3.5"}):e.jsx(Xf,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:402",className:"w-3.5 h-3.5"}),K?"Copied!":"Copy Link"]}),t&&e.jsxs(en,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:406",href:`/supplier/invite/${t}`,className:"inline-flex items-center gap-1.5 text-xs font-medium px-3 py-1.5 rounded-lg border border-border hover:bg-muted/40 transition-colors text-foreground",children:[e.jsx(cc,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:408",className:"w-3.5 h-3.5"}),"Back"]})]})]})}),e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:416",className:"max-w-5xl mx-auto px-4 py-8 space-y-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:418",className:"rounded-2xl overflow-hidden border border-border",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:419",className:"px-6 py-5 flex items-start justify-between gap-4",style:{background:`linear-gradient(135deg, ${zt} 0%, #2D6A4F 100%)`},children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:421",children:[e.jsx("img",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:422",src:"/manus-storage/envora-logo_f789bcb1.webp",alt:"Envora Consulting",className:"h-10 w-auto mb-4"}),e.jsx("h1",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:424",className:"text-2xl font-bold text-white mb-1",style:{fontFamily:"'Fraunces', serif"},children:"Supplier Readiness Report"}),e.jsx("p",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:427",className:"text-white/70 text-sm",children:"Sustainability Self-Assessment"})]}),e.jsx("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:429",className:"text-right shrink-0",children:e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:430",className:"inline-flex items-center gap-1.5 px-4 py-2 rounded-full text-sm font-bold border-2",style:{color:C.color,background:C.bg,borderColor:C.border},children:[e.jsx(Ut,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:432",className:"w-4 h-4"}),C.label]})})]}),e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:436",className:"bg-white px-6 py-4 flex flex-wrap gap-4 border-t border-border",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:437",className:"flex items-center gap-1.5 text-sm text-foreground",children:[e.jsx(Ms,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:438",className:"w-3.5 h-3.5 text-muted-foreground"}),e.jsx("span",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:439",className:"font-semibold",children:E})]}),!!x?.country&&e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:442",className:"flex items-center gap-1.5 text-sm text-muted-foreground",children:[e.jsx(Ko,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:443",className:"w-3.5 h-3.5"}),e.jsx("span",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:443",children:String(x.country)})]}),!!p?.aiAuditedAt&&e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:447",className:"flex items-center gap-1.5 text-sm text-muted-foreground",children:[e.jsx(Mh,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:448",className:"w-3.5 h-3.5"}),e.jsx("span",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:449",children:new Date(String(p.aiAuditedAt)).toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric"})})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:456",className:"rounded-2xl border-2 overflow-hidden",style:{borderColor:zt},children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:458",className:"px-5 py-4 flex items-center gap-3",style:{background:zt},children:[e.jsx("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:459",className:"w-9 h-9 rounded-full bg-white/20 flex items-center justify-center shrink-0",children:e.jsx(qa,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:460",className:"w-4 h-4 text-white"})}),e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:462",children:[e.jsx("p",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:463",className:"font-bold text-sm text-white",children:"Share Your Report with the Hotel"}),e.jsx("p",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:464",className:"text-xs text-white/70 mt-0.5",children:"Create a secure link or email the report directly to your hotel partner"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:468",className:"bg-white p-5 space-y-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:470",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:471",className:"flex items-center gap-2 mb-2",children:[e.jsx("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:472",className:"w-6 h-6 rounded-full flex items-center justify-center text-xs font-bold text-white",style:{background:zt},children:"1"}),e.jsx("p",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:473",className:"text-sm font-semibold text-foreground",children:"Email directly to hotel"})]}),e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:475",className:"flex gap-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:476",className:"relative flex-1",children:[e.jsx(Tr,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:477",className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(Ot,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:478",type:"email",placeholder:"[email protected]",value:T,onChange:R=>D(R.target.value),className:"pl-9 text-sm",onKeyDown:R=>R.key==="Enter"&&X()})]}),e.jsx(ie,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:487",onClick:X,disabled:Z.isPending||!le,className:"shrink-0 font-semibold gap-1.5",style:{background:zt,color:"white"},children:Z.isPending?e.jsxs("span",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:493",className:"flex items-center gap-1.5",children:[e.jsx(gs,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:493",className:"w-4 h-4"})," Sending..."]}):e.jsxs("span",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:494",className:"flex items-center gap-1.5",children:[e.jsx(Tr,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:494",className:"w-4 h-4"})," Send Report"]})})]}),e.jsx("p",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:497",className:"text-xs text-muted-foreground mt-1.5",children:"The hotel will receive an email with a secure link valid for 30 days. No login required."})]}),e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:501",className:"border-t border-border pt-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:502",className:"flex items-center gap-2 mb-2",children:[e.jsx("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:503",className:"w-6 h-6 rounded-full flex items-center justify-center text-xs font-bold text-white",style:{background:zt},children:"2"}),e.jsx("p",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:504",className:"text-sm font-semibold text-foreground",children:"Copy a hotel share link"})]}),M?e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:507",className:"flex gap-2",children:[e.jsx("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:508",className:"flex-1 text-xs px-3 py-2 rounded-lg border border-border bg-muted/40 text-muted-foreground truncate font-mono",children:M}),e.jsxs(ie,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:511",variant:"outline",onClick:q,className:"shrink-0 gap-1.5 font-semibold",style:{borderColor:O?"#16A34A":void 0,color:O?"#16A34A":void 0},children:[O?e.jsx(dc,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:516",className:"w-4 h-4"}):e.jsx(zr,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:516",className:"w-4 h-4"}),O?"Copied!":"Copy"]}),e.jsxs(ie,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:519",variant:"outline",onClick:()=>window.open(M,"_blank"),className:"shrink-0 gap-1.5",children:[e.jsx(Ya,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:523",className:"w-4 h-4"})," Open"]})]}):e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:527",className:"flex gap-2",children:[e.jsx(ie,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:528",variant:"outline",onClick:X,disabled:Z.isPending||!le,className:"gap-1.5 font-semibold",children:Z.isPending?e.jsxs(e.Fragment,{children:[e.jsx(gs,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:534",className:"w-4 h-4"})," Creating..."]}):e.jsxs(e.Fragment,{children:[e.jsx(Xf,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:535",className:"w-4 h-4"})," Generate Hotel Link"]})}),e.jsx("p",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:537",className:"text-xs text-muted-foreground self-center",children:"Creates a 30-day secure link for any hotel to view"})]})]}),M&&e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:544",className:"border-t border-border pt-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:545",className:"flex items-center gap-2 mb-2",children:[e.jsx("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:546",className:"w-6 h-6 rounded-full flex items-center justify-center text-xs font-bold text-white",style:{background:zt},children:"3"}),e.jsx("p",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:547",className:"text-sm font-semibold text-foreground",children:"Preview what the hotel sees"})]}),e.jsxs(ie,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:549",variant:"outline",onClick:()=>window.open(M,"_blank"),className:"gap-1.5 font-semibold",children:[e.jsx(Ya,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:553",className:"w-4 h-4"})," Open Hotel View"]}),e.jsx("p",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:555",className:"text-xs text-muted-foreground mt-1.5",children:"Opens the hotel-facing report in a
580new tab. This is exactly what the hotel will see."})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:562",className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:563",className:"sm:col-span-1 bg-white rounded-xl border border-border p-5 flex flex-col items-center justify-center text-center gap-2",children:[(()=>{const R=g??0,P=72,B=90,V=90,re=Math.PI*P,_=R/100*re,L=y==="gold"?"#F0AB00":y==="silver"?"#9CA3AF":y==="bronze"?"#B45309":"#D1D5DB";return e.jsxs("svg",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:572",width:"180",height:"108",viewBox:"0 0 180 108",children:[e.jsx("path",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:573",d:`M ${B-P} ${V} A ${P} ${P} 0 0 1 ${B+P} ${V}`,fill:"none",stroke:"#E5E7EB",strokeWidth:"14",strokeLinecap:"round"}),e.jsx("path",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:574",d:`M ${B-P} ${V} A ${P} ${P} 0 0 1 ${B+P} ${V}`,fill:"none",stroke:L,strokeWidth:"14",strokeLinecap:"round",strokeDasharray:`${_} ${re}`,style:{transition:"stroke-dasharray 1s ease"}}),e.jsx("text",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:576",x:B,y:V-6,textAnchor:"middle",fontSize:"28",fontWeight:"700",fill:"#1B4332",fontFamily:"'Plus Jakarta Sans', sans-serif",children:g!==null?Math.round(g):"â"}),e.jsx("text",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:579",x:B,y:V+12,textAnchor:"middle",fontSize:"11",fill:"#6B7280",fontFamily:"'Plus Jakarta Sans', sans-serif",children:"out of 100"})]})})(),e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:584",className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full text-xs font-bold border",style:{color:C.color,background:C.bg,borderColor:C.border},children:[e.jsx(Ut,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:586",className:"w-3 h-3"}),C.label," Band"]}),e.jsx("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:589",className:"flex gap-1",children:[{key:"not_yet_rated",label:"Not Rated",range:"0-44",color:"#D1D5DB",textColor:"#6B7280"},{key:"bronze",label:"Bronze",range:"45-59",color:"#B45309",textColor:"#78350F"},{key:"silver",label:"Silver",range:"60-74",color:"#9CA3AF",textColor:"#374151"},{key:"gold",label:"Gold",range:"75-100",color:"#F0AB00",textColor:"#92400e"}].map(R=>{const P=(y??"not_yet_rated")===R.key;return e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:598",className:"flex flex-col items-center px-1.5 py-1 rounded-md",style:{background:P?`${R.color}30`:"#F9FAFB",border:P?`2px solid ${R.color}`:"2px solid #E5E7EB",minWidth:48},children:[e.jsx("span",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:600",className:"text-[9px] font-bold",style:{color:P?R.textColor:"#9CA3AF"},children:R.label}),e.jsx("span",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:601",className:"text-[8px]",style:{color:P?R.textColor:"#C4C4C4"},children:R.range})]},R.key)})})]}),e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:607",className:"sm:col-span-2 bg-white rounded-xl border border-border overflow-hidden",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:608",className:"px-5 py-3 flex items-center gap-2",style:{background:`${$n}18`},children:[e.jsx(Yn,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:609",className:"w-4 h-4 shrink-0",style:{color:$n}}),e.jsx("h3",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:610",className:"font-bold text-sm",style:{color:$n,fontFamily:"'Fraunces', serif"},children:"Theme Performance"})]}),e.jsx("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:612",className:"p-5",children:e.jsx("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:613",className:"space-y-3.5",children:N.map(({key:R,score:P})=>{const B=u4[R];return e.jsx(mH,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:616",label:B.label,score:P,color:B.color,icon:B.icon},R)})})})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:624",className:"bg-white rounded-xl border border-border overflow-hidden",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:625",className:"px-5 py-3 flex items-center gap-2",style:{background:`${zt}18`},children:[e.jsx(ba,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:626",className:"w-4 h-4 shrink-0",style:{color:zt}}),e.jsx("h3",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:627",className:"font-bold text-sm",style:{color:zt,fontFamily:"'Fraunces', serif"},children:"Audit Verdict Breakdown"})]}),e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:629",className:"p-5",children:[e.jsx("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:630",className:"grid grid-cols-3 gap-3 mb-4",children:[{count:w.pass,label:"Pass",color:"#16A34A",bg:"#DCFCE7",icon:Te},{count:w.partial,label:"Partial",color:"#D97706",bg:"#FEF3C7",icon:tt},{count:w.fail,label:"Fail",color:"#DC2626",bg:"#FEE2E2",icon:Zt}].map(({count:R,label:P,color:B,bg:V,icon:re})=>e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:636",className:"rounded-xl p-4 text-center",style:{background:V},children:[e.jsx(re,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:637",className:"w-5 h-5 mx-auto mb-1",style:{color:B}}),e.jsx("p",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:638",className:"text-2xl font-bold",style:{color:B},children:R}),e.jsx("p",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:639",className:"text-xs font-medium",style:{color:B},children:P})]},P))}),e.jsx(xH,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:643",pass:w.pass,partial:w.partial,fail:w.fail,total:w.total}),e.jsxs("p",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:644",className:"text-xs text-muted-foreground mt-2",children:[w.total," criteria assessed"]})]})]}),d.length>0?e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:650",className:"space-y-4",children:[e.jsx("h3",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:651",className:"font-semibold text-sm text-foreground",children:"Assessment Narrative"}),d.map(R=>{const P=R.heading.toLowerCase(),B=Object.keys(iw).find(_=>P.includes(_)),V=B?iw[B]:Dt,re=B?cH[B]:zt;return e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:658",className:"bg-white rounded-xl border border-border p-5 border-l-4",style:{borderLeftColor:re},children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:660",className:"flex items-center gap-2 mb-3 -mx-5 -mt-5 px-5 py-3 rounded-t-xl",style:{background:`${re}18`},children:[e.jsx(V,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:662",className:"w-4 h-4 shrink-0",style:{color:re}}),e.jsx("h4",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:663",className:"font-bold text-sm",style:{color:re,fontFamily:"'Fraunces', serif"},children:R.heading})]}),e.jsx(cw,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:665",text:R.body.trim()})]},R.heading)})]}):i?e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:671",className:"bg-white rounded-xl border border-border p-5 border-l-4",style:{borderLeftColor:zt},children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:672",className:"flex items-center gap-2 mb-3",children:[e.jsx(Dt,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:673",className:"w-4 h-4",style:{color:zt}}),e.jsx("h4",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:674",className:"font-semibold text-sm text-foreground",children:"Assessment Narrative"})]}),e.jsx(cw,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:676",text:i})]}):null,h&&e.jsx(fH,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:681",scope3:h}),u.verdict&&(()=>{const R=dH[u.verdict],P=R.icon;return e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:688",className:"rounded-xl border-2 p-5",style:{background:R.bg,borderColor:R.border},children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:689",className:"flex items-center gap-2 mb-2",children:[e.jsx(P,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:690",className:"w-5 h-5",style:{color:R.color}}),e.jsx("h3",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:691",className:"font-bold text-sm",style:{color:R.color},children:"Hotel Procurement Recommendation"}),e.jsx("span",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:692",className:"ml-auto px-3 py-1 rounded-full text-xs font-bold border",style:{color:R.color,borderColor:R.border,background:"white"},children:R.label})]}),e.jsx("p",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:697",className:"text-sm leading-relaxed",style:{color:R.color},children:u.text.trim().slice(0,400)})]})})(),e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:705",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:706",className:"px-5 py-3 mb-3 rounded-xl flex items-center gap-2",style:{background:`${zt}18`},children:[e.jsx(Dt,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:707",className:"w-4 h-4 shrink-0",style:{color:zt}}),e.jsx("h3",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:708",className:"font-bold text-sm",style:{color:zt,fontFamily:"'Fraunces', serif"},children:"Criteria Detail by Theme"})]}),Object.entries(A).map(([R,P])=>e.jsx(hH,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:711",theme:R,rows:P},R))]}),e.jsxs("div",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:716",className:"text-center text-muted-foreground
580/60 text-xs pb-4 flex items-center justify-center gap-1.5",children:[e.jsx(Ms,{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:717",className:"w-3 h-3"}),e.jsx("span",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:718",children:"Envora Supplier Readiness Platform"}),e.jsx("span",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:719",children:"·"}),e.jsx("span",{"data-loc":"client/src/pages/public/SupplierTokenReportView.tsx:720",children:"Confidential Sustainability Report"})]})]})]})}const fs="#1B4332",Rr="#2E9E6B",Iu="#F0AB00",hg="#33B7E1",Bu={gold:{label:"Gold",color:"#92400e",bg:"#FEF3C7",border:"#F59E0B"},silver:{label:"Silver",color:"#374151",bg:"#F3F4F6",border:"#9CA3AF"},bronze:{label:"Bronze",color:"#78350F",bg:"#FEF3C7",border:"#B45309"},not_yet_rated:{label:"Not Yet Rated",color:"#6B7280",bg:"#F9FAFB",border:"#D1D5DB"}},dw={environment:{label:"Environment",icon:Ns,color:Rr},labor:{label:"Labour",icon:Ws,color:hg},ethics:{label:"Ethics",icon:ba,color:fs},procurement:{label:"Procurement",icon:Dl,color:Iu}},uw={pass:{label:"Pass",color:"#166534",bg:"#DCFCE7",icon:Te},partial:{label:"Partial",color:"#92400e",bg:"#FEF3C7",icon:tt},fail:{label:"Fail",color:"#991B1B",bg:"#FEE2E2",icon:Zt},pending:{label:"Pending",color:"#6B7280",bg:"#F3F4F6",icon:Bt},na:{label:"N/A",color:"#6B7280",bg:"#F3F4F6",icon:Bt}},p4=[{key:"not_yet_rated",label:"Not Yet Rated",range:"0â44",color:"#D1D5DB",textColor:"#6B7280",desc:"Significant gaps identified. Supplier needs development before approval."},{key:"bronze",label:"Bronze",range:"45â59",color:"#B45309",textColor:"#78350F",desc:"Basic sustainability practices in place. Conditional approval may apply."},{key:"silver",label:"Silver",range:"60â74",color:"#9CA3AF",textColor:"#374151",desc:"Good sustainability performance. Suitable for most procurement categories."},{key:"gold",label:"Gold",range:"75â100",color:"#F0AB00",textColor:"#92400e",desc:"Excellent sustainability performance. Preferred supplier status recommended."}],bH=[{step:1,icon:wS,color:hg,title:"Review the Report",desc:"Read through the supplier's full Sustainability Readiness Report, including AI-audited scores across all 4 themes."},{step:2,icon:bn,color:Rr,title:"Check the Score & Band",desc:"The overall score (0â100) maps to a band: Gold (75+), Silver (60â74), Bronze (45â59), or Not Yet Rated (0â44)."},{step:3,icon:J6,color:Iu,title:"Review AI Findings",desc:"Expand each theme to see per-criterion verdicts, identified gaps, and AI recommendations."},{step:4,icon:cT,color:fs,title:"Make Your Decision",desc:"Approve, request more info, or flag for follow-up in your Envora portal. Your decision is recorded against this supplier."}];function vH({score:t,band:n}){const r=Math.min(100,Math.max(0,t)),o=56,i=70,d=70,u=Math.PI*o,p=u*(1-r/100),x=Bu[n]??Bu.not_yet_rated;return e.jsxs("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:72",className:"flex flex-col items-center gap-2",children:[e.jsxs("svg",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:73",width:"140",height:"80",viewBox:"0 0 140 80",children:[e.jsx("path",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:74",d:`M ${i-o} ${d} A ${o} ${o} 0 0 1 ${i+o} ${d}`,fill:"none",stroke:"#E5E7EB",strokeWidth:"10",strokeLinecap:"round"}),e.jsx("path",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:76",d:`M ${i-o} ${d} A ${o} ${o} 0 0 1 ${i+o} ${d}`,fill:"none",stroke:x.border,strokeWidth:"10",strokeLinecap:"round",strokeDasharray:u,strokeDashoffset:p,style:{transition:"stroke-dashoffset 0.8s cubic-bezier(0.23,1,0.32,1)"}}),e.jsx("text",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:80",x:i,y:d-6,textAnchor:"middle",fontSize:"22",fontWeight:"900",fill:fs,children:Math.round(r)}),e.jsx("text",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:81",x:i,y:d+10,textAnchor:"middle",fontSize:"9",fill:"#6B7280",children:"/100"})]}),e.jsx("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:84",className:"flex items-center gap-1 text-[10px] text-muted-foreground",children:p4.map((h,v)=>e.jsxs("span",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:86",className:"flex items-center gap-0.5",children:[v>0&&e.jsx("span",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:87",className:"text-muted-foreground
580/40",children:"·"}),e.jsxs("span",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:88",className:`font-semibold ${h.key===n?"underline":""}`,style:{color:h.key===n?h.textColor:void 0},children:[h.label," ",h.range]})]},h.key))}),e.jsxs("span",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:94",className:"px-3 py-1 rounded-full text-xs font-bold border",style:{color:x.color,background:x.bg,borderColor:x.border},children:[x.label," Band"]})]})}function yH({label:t,score:n,color:r,icon:o}){return e.jsxs("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:105",className:"flex items-center gap-3",children:[e.jsx("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:106",className:"w-7 h-7 rounded-lg flex items-center justify-center shrink-0",style:{background:`${r}18`},children:e.jsx(o,{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:107",className:"w-3.5 h-3.5",style:{color:r}})}),e.jsxs("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:109",className:"flex-1 min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:110",className:"flex justify-between text-xs mb-1",children:[e.jsx("span",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:111",className:"font-medium text-foreground",children:t}),e.jsxs("span",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:112",className:"font-bold",style:{color:r},children:[Math.round(n),"%"]})]}),e.jsx("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:114",className:"h-1.5 rounded-full bg-muted overflow-hidden",children:e.jsx("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:115",className:"h-full rounded-full transition-all duration-700",style:{width:`${n}%`,background:r}})})]})]})}function wH({criterion:t,response:n}){const[r,o]=b.useState(!1),i=uw[n?.aiVerdict??"pending"]??uw.pending,d=i.icon,u=(n?.aiGaps?.length??0)>0||(n?.aiRecommendations?.length??0)>0;return e.jsxs("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:129",className:"border-b border-border last:border-0",children:[e.jsxs("button",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:130",className:"w-full flex items-center gap-3 px-4 py-3 text-left hover:bg-muted/30 transition-colors",onClick:()=>u&&o(!r),children:[e.jsx("span",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:132",className:"text-xs font-mono text-muted-foreground w-14 shrink-0",children:t.code}),e.jsx("span",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:133",className:"flex-1 text-sm text-foreground",children:t.title}),e.jsxs("span",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:134",className:"px-2 py-0.5 rounded-full text-xs font-semibold flex items-center gap-1 shrink-0",style:{color:i.color,background:i.bg},children:[e.jsx(d,{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:136",className:"w-3 h-3"}),i.label]}),u&&(r?e.jsx(Ps,{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:138",className:"w-3.5 h-3.5 text-muted-foreground shrink-0"}):e.jsx(qe,{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:138",className:"w-3.5 h-3.5 text-muted-foreground shrink-0"}))]}),r&&u&&e.jsxs("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:141",className:"px-4 pb-3 space-y-2",children:[(n?.aiGaps?.length??0)>0&&e.jsxs("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:143",children:[e.jsx("p",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:144",className:"text-[10px] font-bold uppercase tracking-wide text-muted-foreground mb-1",children:"Gaps Identified"}),e.jsx("ul",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:145",className:"space-y-0.5",children:n.aiGaps.map((p,x)=>e.jsxs("li",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:147",className:"text-xs text-foreground flex gap-1.5",children:[e.jsx(Zt,{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:147",className:"w-3 h-3 text-red-500 mt-0.5 shrink-0"}),p]},x))})]}),(n?.aiRecommendations?.length??0)>0&&e.jsxs("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:153",children:[e.jsx("p",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:154",className:"text-[10px] font-bold uppercase tracking-wide text-muted-foreground mb-1",children:"Recommendations"}),e.jsx("ul",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:155",className:"space-y-0.5",children:n.aiRecommendations.map((p,x)=>e.jsxs("li",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:157",className:"text-xs text-foreground flex gap-1.5",children:[e.jsx(Te,{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:157",className:"w-3 h-3 text-green-600 mt-0.5 shrink-0"}),p]},x))})]})]})]})}function SH(){const{shareToken:t}=ea(),[n,r]=b.useState(!1),[o,i]=b.useState(null),{data:d,isLoading:u,error:p}=ue.hotelInvite.viewSharedReport.useQuery({token:t??""},{enabled:!!t,retry:!1}),x=b.useMemo(()=>
580{if(!d)return{};const w={},A=new Map(d.criterionResponses.map(C=>[C.criterionId,C]));for(const C of d.allCriteria){const E=C.theme??"other";w[E]||(w[E]=[]),w[E].push({criterion:C,response:A.get(C.id)??null})}return w},[d]);if(!t)return e.jsx("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:192",className:"min-h-screen flex items-center justify-center",children:e.jsx("p",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:192",className:"text-muted-foreground",children:"Invalid review link."})});if(u)return e.jsx("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:197",className:"min-h-screen flex items-center justify-center",children:e.jsxs("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:198",className:"flex flex-col items-center gap-3",children:[e.jsx(gs,{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:199",className:"w-8 h-8",style:{color:fs}}),e.jsx("p",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:200",className:"text-sm text-muted-foreground",children:"Loading supplier report..."})]})});if(p)return e.jsx("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:208",className:"min-h-screen flex items-center justify-center",children:e.jsxs("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:209",className:"text-center max-w-sm",children:[e.jsx(tt,{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:210",className:"w-10 h-10 mx-auto mb-3",style:{color:Iu}}),e.jsx("h2",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:211",className:"font-bold text-foreground mb-1",children:"Report Unavailable"}),e.jsx("p",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:212",className:"text-sm text-muted-foreground",children:p.message??"This report link may have expired or been revoked."})]})});const{report:h,profile:v,assessment:g}=d,y=Number(g?.overallScore??0),N=g?.band??"not_yet_rated",j=Bu[N]??Bu.not_yet_rated;return e.jsxs("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:224",className:"min-h-screen",style:{background:"#F8FAF9"},children:[e.jsx("header",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:226",className:"sticky top-0 z-30 border-b border-border bg-white/95 backdrop-blur-sm",children:e.jsxs("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:227",className:"max-w-5xl mx-auto px-4 py-3 flex items-center gap-3",children:[e.jsx("img",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:228",src:"/manus-storage/envora-logo_f789bcb1.webp",alt:"Envora Consulting",className:"h-8 w-auto"}),e.jsx(Qe,{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:229",variant:"outline",className:"ml-auto text-xs",children:"Hotel Review Portal"})]})}),e.jsxs("main",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:233",className:"max-w-5xl mx-auto px-4 py-8 space-y-8",children:[e.jsx("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:236",className:"rounded-2xl overflow-hidden",style:{background:fs},children:e.jsxs("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:237",className:"px-8 py-8 flex flex-col sm:flex-row gap-6 items-start sm:items-center",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:238",className:"flex-1",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:239",className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full text-xs font-semibold mb-3",style:{background:`${Rr}40`,color:"#86EFAC"},children:[e.jsx(Ut,{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:241",className:"w-3.5 h-3.5"})," Supplier Readiness Report"]}),e.jsx("h1",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:243",className:"text-2xl font-bold text-white mb-1",style:{fontFamily:"'Fraunces', serif"},children:v?.businessName??"Supplier"}),v?.categoryId&&e.jsxs("p",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:247",className:"text-white/60 text-sm flex items-center gap-1.5",children:[e.jsx(Dl,{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:248",className:"w-3.5 h-3.5"})," Category ",v.categoryId]}),e.jsxs("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:251",className:"mt-4 flex flex-wrap gap-3",children:[e.jsxs("span",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:252",className:"px-3 py-1 rounded-full text-xs font-bold border",style:{color:j.color,background:j.bg,borderColor:j.border},children:[j.label," Band"]}),e.jsxs("span",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:256",className:"text-white/70 text-sm",children:[Math.round(y),"/100 overall score"]})]})]}),e.jsx("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:259",className:"shrink-0",children:e.jsx(vH,{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:260",score:y,band:N})})]})}),e.jsxs("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:266",children:[e.jsx("h2",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:267",className:"text-lg font-bold mb-4",style:{color:fs,fontFamily:"'Fraunces', serif"},children:"How to Review This Report"}),e.jsx("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:270",className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:bH.map(w=>{const A=w.icon;return e.jsxs("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:274",className:"bg-white rounded-xl border border-border p-5 flex gap-4",children:[e.jsx("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:275",className:"shrink-0 w-10 h-10 rounded-xl flex items-center justify-center",style:{background:`${w.color}18`},children:e.jsx(A,{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:277",className:"w-5 h-5",style:{color:w.color}})}),e.jsxs("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:279",children:[e.jsxs("span",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:280",className:"text-xs font-bold px-2 py-0.5 rounded-full inline-block mb-1",style:{background:`${w.color}18`,color:w.color},children:["Step ",w.step]}),e.jsx("h3",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:284",className:"font-semibold text-sm text-foreground mb-1",children:w.title}),e.jsx("p",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:285",className:"text-xs text-muted-foreground leading-relaxed",children:w.desc})]})]},w.step)})})]}),e.jsxs("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:294",className:"bg-white rounded-xl border border-border overflow-hidden",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:295",className:"px-5 py-3 flex items-center gap-2 border-b border-border",style:{background:`${fs}08`},children:[e.jsx(Ut,{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:296",className:"w-4 h-4",style:{color:fs}}),e.jsx("h2",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:297",className:"font-bold text-sm",style:{color:fs,fontFamily:"'Fraunces', serif"},children:"Band Reference Guide"})]}),e.jsx("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:299",className:"p-5 grid grid-cols-1 sm:grid-cols-2 gap-3",children:p4.map(w=>e.jsxs("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:301",className:"flex gap-3 p-3 rounded-lg border",style:{borderColor:`${w.color}60`,background:`${w.color}0A`,boxShadow:w.key===N?`0 0 0 2px ${w.color}`:void 0},children:[e.jsxs("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:304",className:"shrink-0 w-14 text-center",children:[e.jsx("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:305",className:"text-sm font-black",style:{color:w.textColor},children:w.range}),e.jsx("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:306",className:"text-[10px] font-semibold mt-0.5",style:{color:w.textColor},children:w.label}),w.key===N&&e.jsx("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:307",className:"text-[9px] font-bold mt-1 px-1 py-0.5 rounded",style:{background:w.color,color:"white"},children:"THIS SUPPLIER"})]}),e.jsx("p",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:309",className:"text-xs text-muted-foreground leading-relaxed",children:w.desc})]},w.key))})]}),e.jsxs("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:316",className:"bg-white rounded-xl border border-border overflow-hidden",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:317",className:"px-5 py-3 flex items-center gap-2 border-b border-border",style:{background:`${fs}08`},children:[e.jsx(bn,{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:318",className:"w-4 h-4",style:{color:fs}}),e.jsx("h2",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:319",className:"font-bold text-sm",style:{color:fs,fontFamily:"'Fraunces', serif"},children:"Theme Scores"})]}),e.jsx("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:321",className:"p-5 space-y-4",children:Object.entries(dw).map(([w,A])=>{const C=`${w}Score`,E=g?.[C]??0;return e.jsx(yH,{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:325",label:A.label,score:E,color:A.color,
580icon:A.icon},w)})})]}),e.jsxs("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:331",className:"space-y-4",children:[e.jsx("h2",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:332",className:"text-lg font-bold",style:{color:fs,fontFamily:"'Fraunces', serif"},children:"Detailed AI Findings"}),Object.entries(dw).map(([w,A])=>{const C=A.icon,E=x[w]??[],T=E.filter(z=>z.response?.aiVerdict==="fail").length,D=E.filter(z=>z.response?.aiVerdict==="pass").length,M=o===w;return e.jsxs("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:342",className:"bg-white rounded-xl border border-border overflow-hidden",children:[e.jsxs("button",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:343",className:"w-full flex items-center gap-3 px-5 py-4 text-left hover:bg-muted/20 transition-colors",onClick:()=>i(M?null:w),children:[e.jsx("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:346",className:"w-8 h-8 rounded-lg flex items-center justify-center shrink-0",style:{background:`${A.color}18`},children:e.jsx(C,{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:348",className:"w-4 h-4",style:{color:A.color}})}),e.jsxs("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:350",className:"flex-1",children:[e.jsx("span",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:351",className:"font-semibold text-sm text-foreground",children:A.label}),e.jsxs("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:352",className:"flex gap-3 mt-0.5",children:[D>0&&e.jsxs("span",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:353",className:"text-xs text-green-700",children:[D," pass"]}),T>0&&e.jsxs("span",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:354",className:"text-xs text-red-700",children:[T," fail"]})]})]}),M?e.jsx(Ps,{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:357",className:"w-4 h-4 text-muted-foreground"}):e.jsx(qe,{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:357",className:"w-4 h-4 text-muted-foreground"})]}),M&&e.jsx("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:360",className:"border-t border-border",children:E.map(({criterion:z,response:O})=>e.jsx(wH,{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:362",criterion:z,response:O},z.id))})]},w)})]}),(d?.hotelScope3||d?.scope3)&&(()=>{const w=d.hotelScope3,A=d.scope3,C={tier1_supplier_specific:{label:"Tier 1 â Supplier-Specific PCF",color:Rr,desc:"Highest accuracy: based on the supplier's own Product Carbon Footprint or EPD certificate."},tier2_average_data:{label:"Tier 2 â Average-Data Method",color:Iu,desc:"Good accuracy: uses DEFRA 2023 emission factors for this product category and measured weight."},tier3_spend_based:{label:"Tier 3 â Spend-Based Estimate",color:"#9CA3AF",desc:"Indicative: based on AED spend and a sector average emission factor. Improve by providing volume data."}},E=w?.dataQualityTier?C[w.dataQualityTier]:null;return e.jsxs("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:382",className:"bg-white rounded-xl border border-border overflow-hidden",children:[e.jsxs("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:383",className:"px-5 py-3 flex items-center gap-2 border-b border-border",style:{background:`${Rr}0A`},children:[e.jsx(Ns,{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:384",className:"w-4 h-4",style:{color:Rr}}),e.jsx("h2",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:385",className:"font-bold text-sm",style:{color:fs,fontFamily:"'Fraunces', serif"},children:"Scope 3 Supply Chain Emissions â This Hotel"}),E&&e.jsx("span",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:389",className:"ml-auto text-[10px] font-semibold px-2 py-0.5 rounded-full border",style:{color:E.color,borderColor:E.color,background:`${E.color}12`},children:E.label})]}),w?e.jsxs("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:396",className:"p-5 space-y-4",children:[e.jsx("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:398",className:"grid grid-cols-3 gap-3",children:[{label:"Category 1",sub:"Purchased Goods",value:Number(w.cat1TonnesCo2e??0),color:Rr},{label:"Category 4",sub:"Upstream Transport",value:Number(w.cat4TonnesCo2e??0),color:hg},{label:"Total Scope 3",sub:"Cat 1 + Cat 4",value:Number(w.totalTonnesCo2e??0),color:fs}].map(T=>e.jsxs("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:404",className:"text-center p-3 rounded-lg border",style:{background:`${T.color}08`,borderColor:`${T.color}30`},children:[e.jsx("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:405",className:"text-2xl font-black",style:{color:T.color},children:T.value.toFixed(2)}),e.jsx("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:406",className:"text-[10px] font-semibold text-muted-foreground",children:"tCOâe"}),e.jsx("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:407",className:"text-xs font-bold mt-0.5",style:{color:T.color},children:T.label}),e.jsx("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:408",className:"text-[10px] text-muted-foreground",children:T.sub})]},T.label))}),e.jsx("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:413",className:"grid grid-cols-2 sm:grid-cols-3 gap-2 text-xs",children:[{label:"Product Category",value:w.productCategory?.replace(/_/g," ")}
580,{label:"Annual Volume",value:w.annualVolumeKg?`${Number(w.annualVolumeKg).toLocaleString()} kg`:w.annualVolumeAed?`AED ${Number(w.annualVolumeAed).toLocaleString()}`:null},{label:"Delivery Frequency",value:w.deliveryFrequency?.replace(/_/g," ")},{label:"Transport Mode",value:w.transportMode?.replace(/_/g," ")},{label:"Distance",value:w.distanceKm?`${Number(w.distanceKm).toFixed(0)} km`:null},{label:"Refrigerated",value:w.isRefrigerated?"Yes":"No"}].filter(T=>T.value).map(T=>e.jsxs("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:422",className:"p-2 rounded bg-muted/30",children:[e.jsx("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:423",className:"text-[10px] text-muted-foreground font-medium",children:T.label}),e.jsx("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:424",className:"font-semibold capitalize",children:T.value})]},T.label))}),w.calculationNotes&&e.jsxs("details",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:430",className:"text-xs",children:[e.jsx("summary",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:431",className:"cursor-pointer text-muted-foreground hover:text-foreground font-medium",children:"Calculation methodology"}),e.jsxs("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:432",className:"mt-2 p-3 bg-muted/20 rounded text-muted-foreground leading-relaxed",children:[e.jsx("p",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:433",className:"font-semibold text-foreground mb-1",children:w.calculationMethod}),e.jsx("p",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:434",children:w.calculationNotes}),e.jsx("p",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:435",className:"mt-1 text-[10px]",children:"Standard: GHG Protocol Corporate Value Chain (Scope 3) Standard (2011). Emission factors: UK DEFRA 2023."})]})]}),E&&e.jsx("p",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:440",className:"text-[11px] text-muted-foreground italic",children:E.desc})]}):A?e.jsxs("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:445",className:"p-5",children:[e.jsx("p",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:446",className:"text-xs text-muted-foreground mb-3 italic",children:"General operational Scope 3 (supplier's own business â not hotel-specific)"}),e.jsx("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:447",className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:[{label:"Total Scope 3",value:A.totalScope3TonnesCo2e,unit:"tCOâe"},{label:"Purchased Goods",value:A.purchasedGoodsSpendAed,unit:"AED spend"},{label:"Freight",value:A.freightTonneKm,unit:"tonne·km"},{label:"Waste",value:A.wasteGeneratedTonnes,unit:"tonnes"}].filter(T=>T.value!=null).map(T=>e.jsxs("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:454",className:"text-center p-3 rounded-lg",style:{background:`${Rr}08`},children:[e.jsx("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:455",className:"text-xl font-black",style:{color:fs},children:Number(T.value).toFixed(1)}),e.jsx("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:456",className:"text-xs text-muted-foreground",children:T.unit}),e.jsx("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:457",className:"text-xs font-medium text-foreground mt-0.5",children:T.label})]},T.label))})]}):null]})})(),h&&e.jsxs("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:469",className:"space-y-4",children:[e.jsx("h2",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:470",className:"text-lg font-bold",style:{color:fs,fontFamily:"'Fraunces', serif"},children:"Full Readiness Report"}),h.reportData?.sections?.map((w,A)=>e.jsxs("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:474",className:"bg-white rounded-xl border border-border overflow-hidden",children:[e.jsx("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:475",className:"px-5 py-3 border-b border-border",style:{background:`${fs}08`},children:e.jsx("h3",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:476",className:"font-bold text-sm",style:{color:fs,fontFamily:"'Fraunces', serif"},children:w.title})}),e.jsx("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:480",className:"px-5 py-4 text-sm text-foreground leading-relaxed whitespace-pre-wrap",children:w.
580content})]},A))]}),e.jsx("div",{"data-loc":"client/src/pages/public/HotelSupplierReview.tsx:489",className:"h-8"})]})]})}const jH=[{id:"cat1",icon:lT,label:"Category 1: Purchased Goods & Services",iconClass:"text-emerald-600",fields:[{key:"purchasedGoodsSpendAed",label:"Annual spend on goods & services (AED)",type:"number",placeholder:"e.g. 500000",help:"Total annual procurement spend in AED"},{key:"purchasedGoodsEmissionFactor",label:"Emission factor (tCO2e per AED)",type:"number",placeholder:"0.00025 (default)",help:"Leave blank to use spend-based default (0.00025 tCO2e/AED)"}]},{id:"cat3",icon:Ur,label:"Category 3: Upstream Energy",iconClass:"text-yellow-600",fields:[{key:"upstreamFuelKwh",label:"Upstream fuel & energy use (kWh)",type:"number",placeholder:"e.g. 120000",help:"Transmission & distribution losses from purchased electricity"}]},{id:"cat4",icon:DS,label:"Category 4: Upstream Transportation & Distribution",iconClass:"text-blue-600",fields:[{key:"freightTonneKm",label:"Freight transported (tonne-km)",type:"number",placeholder:"e.g. 50000",help:"Total weight à distance for all inbound freight"},{key:"freightMode",label:"Primary freight mode",type:"select",options:["road","sea","air","rail"],help:"Select the dominant mode of transport"}]},{id:"cat5",icon:pc,label:"Category 5: Waste Generated in Operations",iconClass:"text-orange-600",fields:[{key:"wasteGeneratedTonnes",label:"Total waste generated (tonnes)",type:"number",placeholder:"e.g. 12.5",help:"Total operational waste per year"},{key:"wasteLandfillPct",label:"% sent to landfill",type:"number",placeholder:"e.g. 60",help:"Percentage of waste going to landfill"},{key:"wasteRecyclePct",label:"% recycled",type:"number",placeholder:"e.g. 40",help:"Percentage of waste recycled or composted"}]},{id:"cat6",icon:sT,label:"Category 6: Business Travel",iconClass:"text-purple-600",fields:[{key:"flightKm",label:"Total flight distance (km)",type:"number",placeholder:"e.g. 80000",help:"Sum of all employee flight distances per year"},{key:"flightClass",label:"Dominant cabin class",type:"select",options:["economy","business","first"],help:"Most common cabin class used"},{key:"hotelNights",label:"Hotel nights booked",type:"number",placeholder:"e.g. 200",help:"Total hotel nights for business travel"}]},{id:"cat7",icon:Ws,label:"Category 7: Employee Commuting",iconClass:"text-cyan-600",fields:[{key:"employeeCount",label:"Number of employees",type:"number",placeholder:"e.g. 45",help:"Total headcount"},{key:"avgCommuteKmPerDay",label:"Average commute distance (km/day)",type:"number",placeholder:"e.g. 25",help:"Average one-way commute distance per employee"},{key:"workingDaysPerYear",label:"Working days per year",type:"number",placeholder:"250",help:"Typical working days per year"},{key:"commuteMode",label:"Primary commute mode",type:"select",options:["car","bus","metro","walk"],help:"Most common commute mode"}]}];function NH(){za({redirectOnUnauthenticated:!0});const[t,n]=b.useState({reportingYear:2024,freightMode:"road",flightClass:"economy",commuteMode:"car",wasteLandfillPct:100,wasteRecyclePct:0,workingDaysPerYear:250}),[r,o]=b.useState(null),[i,d]=b.useState(!1),{data:u}=ue.hotelInvite.getScope3.useQuery({}),{data:p}=ue.hotelInvite.getScope3History.useQuery(),x=ue.hotelInvite.saveScope3.useMutation({onError:j=>xe.error(j.message)});b.useEffect(()=>{if(u){const j={};Object.entries(u).forEach(([w,A])=>{A!=null&&!(A instanceof Date)&&(j[w]=typeof A=="string"&&parseFloat(A)||A)}),n(w=>({...w,...j})),u.totalScope3TonnesCo2e&&o(parseFloat(String(u.totalScope3TonnesCo2e)))}},[u]);function h(j,w){n(A=>({...A,[j]:w})),d(!1)}async function v(){const j={};["reportingYear","purchasedGoodsSpendAed","purchasedGoodsEmissionFactor","upstreamFuelKwh","freightTonneKm","wasteGeneratedTonnes","wasteLandfillPct","wasteRecyclePct","flightKm","hotelNights","employeeCount","avgCommuteKmPerDay","workingDaysPerYear"].forEach(C=>{const E=t[C];E!==void 0&&E!==""&&(j[C]=Number(E))}),["freightMode","flightClass","commuteMode"].forEach(C=>{t[C]&&(j[C]=String(t[C]))}),j.reportingYear=Number(t.reportingYear??2024);const A=await x.mutateAsync(j);o(A.totalScope3TonnesCo2e),d(!0),xe.success("Scope 3 data saved and calculated.")}const g=j=>j<50?{label:"Low Footprint",color:"bg-envora-pine/10 text-envora-pine border-envora-pine/20"}:j<200?{label:"Medium Footprint",color:"bg-envora-gold/10 text-envora-gold border-envora-gold/30"}:j<500?{label:"High Footprint",color:"bg-orange-50 text-orange-700 border-orange-200"}:{label:"Very High Footprint",color:"bg-red-50 text-red-700 border-red-200"},y=(p??[]).filter(j=>j.totalScope3TonnesCo2e!=null).map(j=>({year:j.reportingYear,value:parseFloat(String(j.totalScope3TonnesCo2e))})),N=y.length>0?Math.max(...y.map(j=>j.value)):1;return e.jsx(Br,{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:166",children:e.jsxs("div",{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:167",className:"max-w-3xl mx-auto
580space-y-6 pb-10",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:169",className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:170",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:171",className:"flex items-center gap-2 mb-1",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:172",className:"w-8 h-8 rounded-lg bg-envora-pine/10 flex items-center justify-center",children:e.jsx(Ns,{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:173",className:"w-4 h-4 text-envora-pine"})}),e.jsx("h1",{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:175",className:"text-2xl font-bold text-envora-pine",style:{fontFamily:"var(--font-display)"},children:"Scope 3 Carbon Calculator"})]}),e.jsx("p",{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:177",className:"text-muted-foreground text-sm mt-1",children:"Calculate your supply chain and value chain emissions using GHG Protocol methodology. Results are included in your Supplier Readiness Report."})]}),e.jsx("div",{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:182",className:"flex items-center gap-2 shrink-0",children:e.jsxs(_a,{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:183",value:String(t.reportingYear??2024),onValueChange:j=>h("reportingYear",Number(j)),children:[e.jsx(Pa,{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:187",className:"w-28 text-sm",children:e.jsx(Ma,{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:188"})}),e.jsx(Ha,{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:190",children:[2022,2023,2024,2025].map(j=>e.jsx(os,{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:192",value:String(j),children:j},j))})]})})]}),r!==null&&e.jsx(_e,{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:201",className:"border-envora-pine/20",style:{background:"linear-gradient(135deg, oklch(28% 0.09 155 / 0.06) 0%, oklch(57% 0.14 155 / 0.04) 100%)"},children:e.jsxs(Me,{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:202",className:"py-4 flex items-center justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:203",children:[e.jsx("p",{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:204",className:"text-envora-pine/70 text-sm font-medium",children:"Total Scope 3 Emissions"}),e.jsxs("p",{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:205",className:"text-3xl font-bold text-envora-pine mt-0.5",style:{fontFamily:"var(--font-display)"},children:[r.toFixed(2)," ",e.jsx("span",{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:206",className:"text-lg font-normal text-envora-pine/60",children:"tCO2e"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:209",className:"text-right",children:[e.jsx(Qe,{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:210",className:`${g(r).color} border text-sm px-3 py-1 font-semibold`,children:g(r).label}),i&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:214",className:"flex items-center gap-1 mt-2 text-envora-green text-xs",children:[e.jsx(Te,{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:215",className:"w-3 h-3"}),e.jsx("span",{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:216",children:"Saved"})]})]})]})}),y.length>=2&&e.jsxs(_e,{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:226",className:"border-border/60 shadow-sm",children:[e.jsx(Ft,{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:227",className:"pb-3 border-b border-border/40",children:e.jsxs(Xt,{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:228",className:"text-base flex items-center gap-2 text-foreground",style:{fontFamily:"var(--font-display)"},children:[e.jsx(kS,{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:229",className:"w-4 h-4 text-envora-pine"}),"Year-on-Year Emissions Trend"]})}),e.jsxs(Me,{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:233",className:"pt-5",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:234",className:"flex items-end gap-3 h-32",children:y.map((j,w)=>{const A=N>0?Math.max(8,Math.round(j.value/N*112)):8,C=w>0?y[w-1].value:null,E=C!==null?(j.value-C)/C*100:null,T=E!==null&&E<0;return e.jsxs("div",{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:241",className:"flex flex-col items-center gap-1 flex-1",children:[e.jsx("span",{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:242",className:`text-xs font-semibold ${T?"text-envora-pine":E!==null?"text-orange-600":"text-muted-foreground"}`,children:E!==null?`${T?"":"+"}${E.toFixed(1)}%`:""}),e.jsx("div",{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:245",className:"w-full rounded-t-md transition-all duration-500",style:{height:A,background:T?"oklch(28% 0.09 155)":E!==null?"oklch(70% 0.18 60)":"oklch(50% 0.12 155 / 0.5)"}}),e.jsx("span",{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:256",className:"text-xs text-muted-foreground font-medium",children:j.year}),e.jsx("span",{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:257",className:"text-xs text-foreground font-semibold",children:j.value.toFixed(1)})]},j.year)})}),e.jsx("p",{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:262",className:"text-muted-foreground text-xs mt-3",children:"tCO2e per reporting year. Green bars indicate year-on-year reduction."})]})]}),jH.map(j=>{const w=j.icon;return e.jsxs(_e,{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:271",className:"border-border/60 shadow-sm",children:[e.jsx(Ft,{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:272",className:"pb-3 border-b border-border/40",children:e.jsxs(Xt,{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:273",className:"text-base flex items-center gap-2 text-foreground",style:{fontFamily:"var(--font-display)"},children:[e.jsx(w,{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:274",className:`w-4 h-4 ${j.iconClass}`}),j.label]})}),e.jsx(Me,{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:278",className:"space-y-4",children:j.fields.map(A=>e.jsxs("div",{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:280",children:[e.jsx(At,{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:281",className:"text-foreground text-sm mb-1.5 block",children:A.label}),A.type==="select"?e.jsxs(_a,{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:283",value:String(t[A.key]??A.options?.[0]??""),onValueChange:C=>h(A.key,C),children:[e.jsx(Pa,{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:287",children:e.jsx(Ma,{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:288"})}),e.jsx(Ha,{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:290",children:(A.options??[]).map(C=>e.jsx(os,{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:292",value:C,className:"capitalize",children:C},C))})]}):e.jsx(Ot,{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:297",type:"number",min:0,placeholder:A.placeholder,value:t[A.key]!==void 0?String(t[A.key]):"",onCh
580ange:C=>h(A.key,C.target.value===""?"":parseFloat(C.target.value))}),A.help&&e.jsxs("p",{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:306",className:"text-muted-foreground text-xs mt-1 flex items-center gap-1",children:[e.jsx(Xi,{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:307",className:"w-3 h-3"})," ",A.help]})]},A.key))})]},j.id)}),e.jsx(ig,{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:317"}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:319",className:"flex items-center justify-between",children:[e.jsx("p",{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:320",className:"text-muted-foreground text-xs",children:"Emission factors sourced from GHG Protocol, DEFRA 2024, and IPCC AR6."}),e.jsx(ie,{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:323",className:"bg-envora-pine hover:bg-envora-pine/90 text-white font-semibold px-8 shadow-sm",onClick:v,disabled:x.isPending,children:x.isPending?e.jsxs(e.Fragment,{children:[e.jsx(gs,{"data-loc":"client/src/pages/supplier/Scope3Calculator.tsx:328",className:"w-4 h-4 mr-2"})," Saving..."]}):"Save & Calculate"})]})]})})}const wt="#1B4332",fa="#2E9E6B",Xo="#F0AB00",Ji="#33B7E1",Vu={gold:{label:"Gold",color:"#92400e",bg:"#FEF3C7",border:"#F59E0B"},silver:{label:"Silver",color:"#374151",bg:"#F3F4F6",border:"#9CA3AF"},bronze:{label:"Bronze",color:"#78350F",bg:"#FEF3C7",border:"#B45309"},not_yet_rated:{label:"Not Yet Rated",color:"#6B7280",bg:"#F9FAFB",border:"#D1D5DB"}},m4={environment:{label:"Environment",icon:Ns,color:fa},labor:{label:"Labour",icon:Ws,color:Ji},ethics:{label:"Ethics",icon:ba,color:wt},procurement:{label:"Procurement",icon:Dl,color:Xo}},pw={pass:{label:"Pass",color:"#166534",bg:"#DCFCE7",icon:Te},partial:{label:"Partial",color:"#92400e",bg:"#FEF3C7",icon:tt},fail:{label:"Fail",color:"#991B1B",bg:"#FEE2E2",icon:Zt},pending:{label:"Pending",color:"#6B7280",bg:"#F3F4F6",icon:Bt},na:{label:"N/A",color:"#6B7280",bg:"#F3F4F6",icon:Bt}};function AH(t){return t==null?"#9CA3AF":t>=70?fa:t>=50?Xo:"#EF4444"}const CH=[{key:"not_yet_rated",label:"Not Rated",range:"0-44",color:"#D1D5DB",textColor:"#6B7280"},{key:"bronze",label:"Bronze",range:"45-59",color:"#B45309",textColor:"#78350F"},{key:"silver",label:"Silver",range:"60-74",color:"#9CA3AF",textColor:"#374151"},{key:"gold",label:"Gold",range:"75-100",color:"#F0AB00",textColor:"#92400e"}];function EH({score:t,band:n}){const r=t??0,o=80,i=100,d=100,u=Math.PI*o,p=r/100*u,x=n??"not_yet_rated",h=Vu[x]??Vu.not_yet_rated,v=n==="gold"?Xo:n==="silver"?"#9CA3AF":n==="bronze"?"#B45309":"#D1D5DB";return e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:78",className:"flex flex-col items-center gap-2",children:[e.jsxs("svg",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:79",width:"200",height:"120",viewBox:"0 0 200 120",children:[e.jsx("path",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:80",d:`M ${i-o} ${d} A ${o} ${o} 0 0 1 ${i+o} ${d}`,fill:"none",stroke:"#E5E7EB",strokeWidth:"16",strokeLinecap:"round"}),e.jsx("path",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:82",d:`M ${i-o} ${d} A ${o} ${o} 0 0 1 ${i+o} ${d}`,fill:"none",stroke:v,strokeWidth:"16",strokeLinecap:"round",strokeDasharray:`${p} ${u}`,style:{transition:"stroke-dasharray 1s ease"}}),e.jsx("text",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:86",x:i,y:d-8,textAnchor:"middle",fontSize:"32",fontWeight:"700",fill:wt,fontFamily:"'Plus Jakarta Sans', sans-serif",children:t!=null?Math.round(t):"--"}),e.jsx("text",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:90",x:i,y:d+14,textAnchor:"middle",fontSize:"13",fill:"#6B7280",fontFamily:"'Plus Jakarta Sans', sans-serif",children:"out of 100"})]}),e.jsxs("span",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:94",className:"px-4 py-1.5 rounded-full text-sm font-bold border",style:{color:h.color,background:h.bg,borderColor:h.border},children:[h.label," Band"]}),e.jsx("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:99",className:"flex gap-1 mt-0.5",children:CH.map(g=>{const y=x===g.key;return e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:103",className:"flex flex-col items-center px-2 py-1 rounded-md text-center transition-all",style:{background:y?`${g.color}
58030`:"#F9FAFB",border:y?`2px solid ${g.color}`:"2px solid #E5E7EB",minWidth:58},children:[e.jsx("span",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:110",className:"text-[10px] font-bold",style:{color:y?g.textColor:"#9CA3AF"},children:g.label}),e.jsx("span",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:111",className:"text-[9px]",style:{color:y?g.textColor:"#C4C4C4"},children:g.range})]},g.key)})})]})}function RH({label:t,score:n,color:r,icon:o}){const i=n??0;return e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:124",className:"flex items-center gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:125",className:"flex items-center gap-1.5 w-32 shrink-0",children:[e.jsx(o,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:126",className:"w-3.5 h-3.5",style:{color:r}}),e.jsx("span",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:127",className:"text-xs font-medium text-foreground",children:t})]}),e.jsx("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:129",className:"flex-1 h-3 bg-gray-100 rounded-full overflow-hidden",children:e.jsx("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:130",className:"h-full rounded-full transition-all duration-700",style:{width:`${i}%`,background:r}})}),e.jsx("span",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:133",className:"text-xs font-semibold w-10 text-right",style:{color:AH(n)},children:n!=null?`${Math.round(n)}%`:"--"})]})}function kH({pass:t,partial:n,fail:r,total:o}){return o===0?null:e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:144",className:"h-4 rounded-full overflow-hidden flex",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:145",style:{width:`${t/o*100}%`,background:"#16A34A"}}),e.jsx("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:146",style:{width:`${n/o*100}%`,background:Xo}}),e.jsx("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:147",style:{width:`${r/o*100}%`,background:"#EF4444"}})]})}function mw({text:t}){const n=t.split(` 581`),r=[];let o=[];function i(u){o.length!==0&&(r.push(e.jsx("ul",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:162",className:"space-y-1.5 my-2 pl-1",children:o.map((p,x)=>e.jsxs("li",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:164",className:"flex items-start gap-2 text-sm text-foreground leading-relaxed",children:[e.jsx("span",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:165",className:"mt-1.5 w-1.5 h-1.5 rounded-full shrink-0",style:{background:wt}}),e.jsx("span",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:166",dangerouslySetInnerHTML:{__html:d(p)}})]},x))},`ul-${u}`)),o=[])}function d(u){return u.replace(/\*\*(.+?)\*\*/g,"<strong>$1</strong>").replace(/\*(.+?)\*/g,"<em>$1</em>")}return n.forEach((u,p)=>{const x=u.trim();if(!x){i(String(p));return}x.startsWith("- ")||x.startsWith("⢠")||x.startsWith("* ")?o.push(x.replace(/^[-â¢*]\s*/,"")):/^\d+\.\s/.test(x)?o.push(x.replace(/^\d+\.\s*/,"")):(i(String(p)),r.push(e.jsx("p",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:190",className:"text-sm text-foreground leading-relaxed mb-1",dangerouslySetInnerHTML:{__html:d(x)}},p)))}),i("end"),e.jsx("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:196",className:"space-y-0.5",children:r})}const xw={"executive summary":Ut,"sustainability performance":Yn,"scope 3":Ns,"key strengths":Te,"areas for improvement":tt,"hotel procurement recommendation":ba},DH={"executive summary":wt,"sustainability performance":Ji,"scope 3":fa,"key strengths":fa,"areas for improvement":Xo,"hotel procurement recommendation":wt};function TH(t){const n=[],r=t.split(` 582`);let o=null;for(const i of r)i.startsWith("## ")?(o&&n.push(o),o={heading:i.replace(/^##\s*/,"").trim(),body:""}):o&&(o.body+=(o.body?` 583`:"")+i);return o&&n.push(o),n}function OH(t){const n=t.toLowerCase(),r=n.indexOf("hotel procurement recommendation");if(r===-1)return{verdict:null,text:""};const o=t.slice(r+40,r+800);return n.includes("approved")&&!n.includes("conditional")?{verdict:"approved",text:o}:n.includes("conditional")?{verdict:"conditional",text:o}:n.includes("development required")||n.includes("not recommended")?{verdict:"development",text:o}:{verdict:null,text:o}}const _H={approved:{label:"Approved Supplier",bg:"#DCFCE7",border:"#16A34A",color:"#166534",icon:Te}
583,conditional:{label:"Conditional Approval",bg:"#FEF3C7",border:"#F59E0B",color:"#92400e",icon:tt},development:{label:"Development Required",bg:"#FEE2E2",border:"#EF4444",color:"#991B1B",icon:Zt}};function MH({theme:t,rows:n}){const[r,o]=b.useState(!0),[i,d]=b.useState(null),u=m4[t]??{label:t,icon:Dt,color:wt},p=u.icon,x=n.filter(v=>v.aiVerdict==="pass").length,h=n.filter(v=>v.aiVerdict==="fail").length;return e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:269",className:"border border-border rounded-xl overflow-hidden mb-3",children:[e.jsxs("button",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:270",className:"w-full flex items-center justify-between px-4 py-3 bg-muted/30 hover:bg-muted/50 transition-colors",onClick:()=>o(!r),children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:274",className:"flex items-center gap-2",children:[e.jsx(p,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:275",className:"w-4 h-4",style:{color:u.color}}),e.jsx("span",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:276",className:"font-semibold text-sm text-foreground",children:u.label}),e.jsxs("span",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:277",className:"text-xs text-muted-foreground ml-1",children:["(",n.length," criteria)"]})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:279",className:"flex items-center gap-2",children:[e.jsxs("span",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:280",className:"text-xs px-2 py-0.5 rounded-full font-medium",style:{background:"#DCFCE7",color:"#166534"},children:[x," pass"]}),e.jsxs("span",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:281",className:"text-xs px-2 py-0.5 rounded-full font-medium",style:{background:"#FEE2E2",color:"#991B1B"},children:[h," fail"]}),r?e.jsx(Ps,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:282",className:"w-4 h-4 text-muted-foreground"}):e.jsx(qe,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:282",className:"w-4 h-4 text-muted-foreground"})]})]}),r&&e.jsx("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:286",className:"divide-y divide-border/50",children:n.map(v=>{const g=pw[v.aiVerdict??"pending"]??pw.pending,y=g.icon,N=i===v.id,j=v.aiReasoning||v.aiStrengths?.length>0||v.aiGaps?.length>0||v.aiRecommendations?.length>0;return e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:293",children:[e.jsxs("button",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:294",className:"w-full flex items-center gap-3 px-4 py-3 text-left hover:bg-muted/20 transition-colors",onClick:()=>j&&d(N?null:v.id),children:[e.jsx("span",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:298",className:"text-xs font-mono text-muted-foreground w-14 shrink-0",children:v.code}),e.jsx("span",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:299",className:"flex-1 text-sm text-foreground",children:v.title}),e.jsxs("span",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:300",className:"flex items-center gap-1 text-xs font-medium px-2 py-0.5 rounded-full shrink-0",style:{color:g.color,background:g.bg},children:[e.jsx(y,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:302",className:"w-3 h-3"}),g.label]}),j&&(N?e.jsx(Ps,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:305",className:"w-3.5 h-3.5 text-muted-foreground shrink-0"}):e.jsx(qe,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:306",className:"w-3.5 h-3.5 text-muted-foreground shrink-0"}))]}),N&&j&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:309",className:"px-4 pb-4 pt-1 bg-muted/10 space-y-3",children:[v.aiReasoning&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:311",children:[e.jsx("p",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:312",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide mb-1",children:"Assessment Reasoning"}),e.jsx("p",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:313",className:"text-sm text-foreground leading-relaxed",children:v.aiReasoning})]}),v.aiStrengths?.length>0&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:317",children:[e.jsx("p",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:318",className:"text-xs font-semibold mb-1",style:{color:fa},children:"Strengths"}),e.jsx("ul",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:319",className:"space-y-1",children:v.aiStrengths.map((w,A)=>e.jsxs("li",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:321",className:"flex items-start gap-1.5 text-sm text-foreground",children:[e.jsx(Te,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:322",className:"w-3.5 h-3.5 mt-0.5 shrink-0",style:{color:fa}}),w]},A))})]}),v.aiGaps?.length>0&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:329",children:[e.jsx("p",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:330",className:"text-xs font-semibold mb-1",style:{color:"#D97706"},children:"Gaps"}),e.jsx("ul",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:331",className:"space-y-1",children:v.aiGaps.map((w,A)=>e.jsxs("li",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:333",className:"flex items-start gap-1.5 text-sm text-foreground",children:[e.jsx(tt,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:334",className:"w-3.5 h-3.5 mt-0.5 shrink-0",style:{color:"#D97706"}}),w]},A))})]}),v.aiRecommendations?.length>0&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:341",children:[e.jsx("p",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:342",className:"text-xs font-semibold mb-1",style:{color:wt},children:"Recommendations"}),e.jsx("ul",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:343",className:"space-y-1",children:v.aiRecommendations.map((w,A)=>e.jsxs("li",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:345",className:"flex items-start gap-1.5 text-sm text-foreground",children:[e.jsx(Ur,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:346",className:"w-3.5 h-3.5 mt-0.5 shrink-0",style:{color:wt}}),w]},A))})]})]})]},v.id)})})]})}function PH({scope3:t}){const n=Number(t.totalScope3TonnesCo2e??0),r=t.reportingYear??"",o=[{label:"Purchased Goods (Cat 1)",value:Number(t.purchasedGoodsSpendAed??0)*25e-5},{label:"Upstream Fuel (Cat 3)",value:Number(t.upstreamFuelKwh??0)*233e-6},{label:"Freight (Cat 4)",value:Number(t.freightTonneKm??0)*12e-5}
583,{label:"Waste (Cat 5)",value:Number(t.wasteGeneratedTonnes??0)*.45},{label:"Business Travel (Cat 6)",value:Number(t.flightKm??0)*115e-6},{label:"Commuting (Cat 7)",value:Number(t.employeeCount??0)*1.2}].filter(u=>u.value>0),i=n<50?{label:"Low",color:fa}:n<200?{label:"Medium",color:Xo}:n<500?{label:"High",color:"#F97316"}:{label:"Very High",color:"#EF4444"},d=Math.max(...o.map(u=>u.value),1);return e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:383",className:"bg-white rounded-xl border border-border p-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:384",className:"flex items-center gap-2 mb-4",children:[e.jsx(Ns,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:385",className:"w-4 h-4",style:{color:fa}}),e.jsx("h3",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:386",className:"font-semibold text-sm text-foreground",children:"Scope 3 Carbon Footprint"}),r&&e.jsxs("span",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:387",className:"text-xs text-muted-foreground ml-auto",children:["Reporting year: ",r]})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:389",className:"flex items-end gap-4 mb-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:390",children:[e.jsx("p",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:391",className:"text-3xl font-bold",style:{color:wt},children:n.toFixed(1)}),e.jsx("p",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:392",className:"text-xs text-muted-foreground",children:"tCO2e total"})]}),e.jsxs("span",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:394",className:"px-3 py-1 rounded-full text-xs font-semibold mb-1",style:{background:`${i.color}22`,color:i.color},children:[i.label," Footprint"]})]}),o.length>0&&e.jsx("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:400",className:"space-y-2",children:o.map(u=>e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:402",className:"flex items-center gap-2",children:[e.jsx("span",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:403",className:"text-xs text-muted-foreground w-44 shrink-0 truncate",children:u.label}),e.jsx("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:404",className:"flex-1 h-2 bg-gray-100 rounded-full overflow-hidden",children:e.jsx("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:405",className:"h-full rounded-full",style:{width:`${u.value/d*100}%`,background:fa}})}),e.jsxs("span",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:407",className:"text-xs font-medium w-14 text-right text-foreground",children:[u.value.toFixed(1)," t"]})]},u.label))})]})}function HH(){const{id:t}=ea(),n=parseInt(t??"0",10),[r,o]=b.useState(!1),[i,d]=b.useState(""),[u,p]=b.useState(!1),{data:x,isLoading:h,refetch:v}=ue.hotelInvite.getGeneratedReport.useQuery({assessmentId:n},{enabled:!!n,retry:!1}),{data:g,refetch:y}=ue.hotelInvite.listShares.useQuery({assessmentId:n},{enabled:!!n}),N=ue.hotelInvite.generateReport.useMutation({onError:V=>{xe.error(V.message),p(!1)}}),j=ue.hotelInvite.shareReport.useMutation({onError:V=>xe.error(V.message)}),w=ue.hotelInvite.revokeShare.useMutation({onError:V=>xe.error(V.message)});async function A(){p(!0),await N.mutateAsync({assessmentId:n}),await v(),p(!1),xe.success("Report generated successfully.")}async function C(){const V=await j.mutateAsync({assessmentId:n,hotelEmail:i.trim()||void 0});await y(),o(!1),d(""),i.trim()&&V.emailSent?xe.success("Share link created and email sent to "+i.trim()+" (valid 30 days)."):i.trim()&&!V.emailSent?(xe.success("Share link created (valid 30 days)."),xe.warning("Email could not be delivered to "+i.trim()+". Please copy the link and send it manually.")):xe.success("Share link created (valid 30 days)."),await navigator.clipboard.writeText(V.shareUrl).catch(()=>{}),xe.info("Link copied to clipboard.")}async function E(V){await w.mutateAsync({shareId:V}),await y(),xe.success("Share link revoked.")}function T(V){navigator.clipboard.writeText(V).then(()=>xe.success("Link copied!")).catch(()=>xe.error("Could not copy."))}const D=b.useMemo(()=>x?.report?.reportData?.aiNarrativeReport??"",[x]),M=b.useMemo(()=>TH(D),[D]),z=b.useMemo(()=>OH(D),[D]),O=x?.assessment,H=x?.profile,K=x?.scope3,ne=O?.overallScore!=null?Number(O.overallScore):null,le=O?.band??"not_yet_rated",Z=b.useMemo(()=>[{key:"environment",score:O?.envScore!=null?Number(O.envScore):null},{key:"labor",score:O?.laborScore!=null?Number(O.laborScore):null},{key:"ethics",score:O?.ethicsScore!=null?Number(O.ethicsScore):null},{key:"procurement",score:O?.procurementScore!=null?Number(O.procurementScore):null}],[O]),X=b.useMemo(()=>{const V=x?.allCriteria??[],re=x?.criterionResponses??[],_=new Map(re.map(I=>[I.criterionId,I])),L=I=>{if(Array.isArray(I))return I;
583if(typeof I=="string")try{return JSON.parse(I)}catch{return[]}return[]};return V.map(I=>{const G=_.get(I.id);return{id:I.id,code:I.code,title:I.title,theme:I.theme,aiVerdict:G?.aiVerdict??null,aiConfidence:G?.aiConfidence??null,aiStrengths:L(G?.aiStrengths),aiGaps:L(G?.aiGaps),aiRecommendations:L(G?.aiRecommendations),aiReasoning:G?.aiReasoning??null,selfScore:G?.selfScore??null}})},[x]),q=b.useMemo(()=>{const V=X.filter(I=>I.aiVerdict==="pass").length,re=X.filter(I=>I.aiVerdict==="partial").length,_=X.filter(I=>I.aiVerdict==="fail").length,L=X.filter(I=>I.aiVerdict&&I.aiVerdict!=="pending").length;return{pass:V,partial:re,fail:_,total:L}},[X]),Q=b.useMemo(()=>{const V={};for(const re of X)V[re.theme]||(V[re.theme]=[]),V[re.theme].push(re);return V},[X]),R=(g??[]).filter(V=>!V.expiresAt||new Date<new Date(V.expiresAt)),P=!!D,B=Vu[le]??Vu.not_yet_rated;return e.jsx(Br,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:546",children:e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:547",className:"print-report max-w-5xl mx-auto px-4 pb-16",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:550",className:"print-hide sticky top-0 z-20 bg-background/95 backdrop-blur border-b border-border py-3 mb-6 -mx-4 px-4 flex items-center justify-between gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:551",className:"flex items-center gap-2",children:[e.jsx(Dt,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:552",className:"w-4 h-4",style:{color:wt}}),e.jsx("span",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:553",className:"font-semibold text-sm text-foreground",children:"Supplier Readiness Report"}),P&&x?.report?.generatedAt&&e.jsxs("span",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:555",className:"text-xs text-muted-foreground hidden sm:inline",children:["Generated ",new Date(x.report.generatedAt).toLocaleDateString()]})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:560",className:"flex items-center gap-2",children:[P&&e.jsxs(e.Fragment,{children:[e.jsxs(ie,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:563",variant:"outline",size:"sm",className:"gap-1.5 text-xs",onClick:()=>window.print(),children:[e.jsx(aT,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:564",className:"w-3.5 h-3.5"})," Print"]}),e.jsxs(ie,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:566",variant:"outline",size:"sm",className:"gap-1.5 text-xs border-envora-pine/30 text-envora-pine",onClick:()=>o(!0),children:[e.jsx(qa,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:567",className:"w-3.5 h-3.5"})," Share"]})]}),e.jsxs(ie,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:571",size:"sm",className:"gap-1.5 text-xs text-white font-semibold",style:{background:wt},onClick:A,disabled:u,children:[u?e.jsx(gs,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:573",className:"w-3 h-3"}):e.jsx(Or,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:573",className:"w-3.5 h-3.5"}),P?"Re-generate":"Generate Report"]})]})]}),h&&e.jsx("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:580",className:"flex items-center justify-center py-24",children:e.jsx(gs,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:581",className:"w-6 h-6",style:{color:wt}})}),u&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:586",className:"flex flex-col items-center justify-center py-24 text-center",children:[e.jsx(gs,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:587",className:"w-10 h-10 mb-4",style:{color:fa}}),e.jsx("h2",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:588",className:"text-lg font-bold mb-1",style:{color:wt},children:"Generating your report..."}),e.jsx("p",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:589",className:"text-muted-foreground text-sm max-w-xs",children:"Analysing your assessment data and Scope 3 emissions. This takes 15-30 seconds."})]}),!h&&!P&&!u&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:594",className:"flex flex-col items-center justify-center py-24 text-center",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:595",className:"w-16 h-16 rounded-full flex items-center justify-center mb-4",style:{background:`${wt}15`},children:e.jsx(Dt,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:596",className:"w-7 h-7",style:{color:wt}})}),e.jsx("h2",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:598",className:"text-xl font-bold mb-2",style:{color:wt},children:"No Report Yet"}),e.jsx("p",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:599",className:"text-muted-foreground text-sm mb-6 max-w-sm",children:"Generate your Supplier Readiness Report to share with hotel procurement teams."}),e.jsxs(ie,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:602",className:"gap-2 text-white font-semibold",style:{background:wt},onClick:A,disabled:u,children:[e.jsx(Ur,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:604",className:"w-4 h-4"})," Generate Report"]})]}),P&&!u&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:610",className:"space-y-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:613",className:"rounded-2xl overflow-hidden border border-border",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:614",className:"px-6 py-5 flex items-start justify-between gap-4",style:{background:`linear-gradient(135deg, ${wt} 0%, #2D6A4F 100%)`},children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:616",children:[e.jsx("img",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:617",src:"/manus-storage/envora-logo_f789bcb1.webp",alt:"Envora Consulting",className:"h-10 w-auto mb-4"}),e.jsx("h1",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:619",className:"text-2xl font-bold text-white mb-1",style:{fontFamily:"'Fraunces', serif"},children:"Supplier Readiness Report"}),e.jsx("p",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:622",className:"text-white/70 text-sm",children:"Sustainability Readiness Assessment"})]}),e.jsx("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:624",className:"text-right shrink-0",children:e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:625",className:"inline-flex items-center gap-1.5 px-4 py-2 rounded-full text-sm font-bold border-2",style:{color:B.color,background:B.bg,borderColor:B.border},children:[e.jsx(Ut,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:627",className:"w-4 h-4"}),B.label]})})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:631",className:"bg-white px-6 py-4 flex flex-wrap gap-4 border-t border-border",children:[!!H?.businessName&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:633",className:"flex items-center gap-1.5 text-sm text-foreground",children:[e.jsx(Ms,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:634",className:"w-3.5 h-3.5 text-muted-foreground"}),e.jsx("span",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:635",className:"font-semibold",children:String(H.businessName)})]}),!!H?.country&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:639",className:"flex items-center gap-1.5 text-sm text-muted-foreground",children:[e.jsx(Ko,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:640",className:"w-3.5 h-3.5"}),String(H.country)]}),x?.report?.generatedAt&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:644",className:"flex items-center gap-1.5 text-sm text-muted-foreground",children:[e.jsx(Mh,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:645",className:"w-3.5 h-3.5"}),new Date(x.report.generatedAt).toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric"})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:653",className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:654",className:"bg-white rounded-xl border border-border overflow-hidden flex flex-col items-center",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:655",className:"w-full flex items-center gap-2 px-5 py-3",style:{background:`${wt}12`},children:[e.jsx(Ut,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:656",className:"w-4 h-4 shrink-0",style:{color:wt}}),e.jsx("h3",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:657",className:"font-bold text-sm",style:{color:wt,fontFamily:"'Fraunces', serif"},children:"Overall Readiness Score"})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:659",className:"p-5 flex flex-col items-center w-full",children:[e.jsx(EH,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:660",score:ne,band:le}),e.jsx("p",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:661",className:"text-xs text-muted-foreground text-center mt-3 max-w-xs",children:le==="gold"?"Exceptional sustainability performance. Recommended for preferred supplier status.":le==="silver"?"Strong performance with minor gaps. Suitable for most hotel procurement requirements.":le==="bronze"?"Meets baseline requirements. Improvement plan recommended before preferred status.":"Assessment complete. Generate your report to receive your readiness band."})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:669",className:"bg-white rounded-xl border border-border overflow-hidden",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:670",className:"flex items-center gap-2 px-5 py-3",style:{background:`${Ji}18`},children:[e.jsx(Yn,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:671",className:"w-4 h-4 shrink-0",style:{color:Ji}}),e.jsx("h3",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:672",className:"font-bold text-sm",style:{color:Ji,fontFamily:"'Fraunces', serif"},children:"Theme Performance"})]}),e.jsx("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:674",className:"p-5",children:e.jsx("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:675",className:"space-y-3.5",children:Z.map(({key:V,score:re})=>{const _=m4[V];return e.jsx(RH,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:678",label:_.label,score:re,color:_.color,
583icon:_.icon},V)})})})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:686",className:"bg-white rounded-xl border border-border overflow-hidden",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:687",className:"flex items-center gap-2 px-5 py-3",style:{background:`${fa}18`},children:[e.jsx(Te,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:688",className:"w-4 h-4 shrink-0",style:{color:fa}}),e.jsx("h3",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:689",className:"font-bold text-sm",style:{color:fa,fontFamily:"'Fraunces', serif"},children:"Audit Verdict Breakdown"})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:691",className:"p-5",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:692",className:"grid grid-cols-3 gap-3 mb-4",children:[{count:q.pass,label:"Pass",color:"#16A34A",bg:"#DCFCE7",icon:Te},{count:q.partial,label:"Partial",color:"#D97706",bg:"#FEF3C7",icon:tt},{count:q.fail,label:"Fail",color:"#DC2626",bg:"#FEE2E2",icon:Zt}].map(({count:V,label:re,color:_,bg:L,icon:I})=>e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:698",className:"rounded-xl p-4 text-center",style:{background:L},children:[e.jsx(I,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:699",className:"w-5 h-5 mx-auto mb-1",style:{color:_}}),e.jsx("p",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:700",className:"text-2xl font-bold",style:{color:_},children:V}),e.jsx("p",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:701",className:"text-xs font-medium",style:{color:_},children:re})]},re))}),e.jsx(kH,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:705",pass:q.pass,partial:q.partial,fail:q.fail,total:q.total}),e.jsxs("p",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:706",className:"text-xs text-muted-foreground mt-2",children:[q.total," criteria assessed out of ",X.length," total"]})]})]}),M.length>0?e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:714",className:"space-y-4",children:[e.jsx("h3",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:715",className:"font-semibold text-sm text-foreground",children:"Assessment Narrative"}),M.map(V=>{const re=V.heading.toLowerCase(),_=Object.keys(xw).find(G=>re.includes(G)),L=_?xw[_]:Dt,I=_?DH[_]:wt;return e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:722",className:"bg-white rounded-xl border border-border p-5 border-l-4",style:{borderLeftColor:I},children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:724",className:"flex items-center gap-2 mb-3 -mx-5 -mt-5 px-5 py-3 rounded-t-xl",style:{background:`${I}18`},children:[e.jsx(L,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:726",className:"w-4 h-4 shrink-0",style:{color:I}}),e.jsx("h4",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:727",className:"font-bold text-sm",style:{color:I,fontFamily:"'Fraunces', serif"},children:V.heading})]}),e.jsx(mw,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:729",text:V.body.trim()})]},V.heading)})]}):D?e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:735",className:"bg-white rounded-xl border border-border p-5 border-l-4",style:{borderLeftColor:wt},children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:736",className:"flex items-center gap-2 mb-3",children:[e.jsx(Dt,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:737",className:"w-4 h-4",style:{color:wt}}),e.jsx("h4",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:738",className:"font-semibold text-sm text-foreground",children:"Assessment Narrative"})]}),e.jsx(mw,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:740",text:D})]}):null,K&&e.jsx(PH,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:745",scope3:K}),z.verdict&&(()=>{const V=_H[z.verdict],re=V.icon;return e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:752",className:"rounded-xl border-2 p-5",style:{background:V.bg,borderColor:V.border},children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:753",className:"flex items-center gap-2 mb-2",children:[e.jsx(re,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:754",className:"w-5 h-5",style:{color:V.color}}),e.jsx("h3",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:755",className:"font-bold text-sm",style:{color:V.color},children:"Hotel Procurement Recommendation"}),e.jsx("span",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:756",className:"ml-auto px-3 py-1 rounded-full text-xs font-bold border",style:{color:V.color,borderColor:V.border,background:"white"},children:V.label})]}),e.jsx("p",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:761",className:"text-sm leading-relaxed",style:{color:V.color},children:z.text.trim().slice(0,400)})]})})(),e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:769",className:"bg-white rounded-xl border border-border overflow-hidden",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:770",className:"flex items-center gap-2 px-5 py-3",style:{background:`${wt}12`},children:[e.jsx(Dt,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:771",className:"w-4 h-4 shrink-0",style:{color:wt}}),e.jsx("h3",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:772",className:"font-bold text-sm",style:{color:wt,fontFamily:"'Fraunces', serif"},children:"Criteria Detail by Theme"})]}),e.jsx("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:774",className:"p-4",children:Object.entries(Q).map(([V,re])=>e.jsx(MH,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:776",theme:V,rows:re},V))})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:782",className:"print-hide bg-white rounded-xl border border-border p-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:783",className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:784",className:"flex items-center gap-2",children:[e.jsx(qa,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:785",className:"w-4 h-4",style:{color:wt}}),e.jsx("h3",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:786",className:"font-semibold text-sm text-foreground",children:"Share with Hotels"})]}),e.jsxs(ie,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:788",size:"sm",variant:"outline",className:"gap-1.5 text-xs border-envora-pine/30 text-envora-pine hover:bg-envora-pine/5",onClick:()=>o(!0),children:[e.jsx(qa,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:791",className:"w-3 h-3"})," Create Link"]})]}),R.length===0?e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:795",className:"text-center py-6 text-muted-foreground",children:[e.jsx(Ms,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:796",className:"w-8 h-8 mx-auto mb-2 opacity-40"}),e.jsx("p",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:797",className:"text-sm",children:"No active share links. Create one to share with a hotel."})]}):e.jsx("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:800",className:"space-y-2",children:R.map(V=>{const re=`${window.location.origin}/shared/${V.token}`,_=V.expiresAt&&new Date>new Date(V.expiresAt);return e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:805",className:"flex items-center justify-between p-3 bg-muted/40 rounded-lg border border-border/60",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:806",className:"min-w-0 flex-1",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:807",className:"flex items-center gap-2 mb-0.5",children:[V.sharedWithEmail?e.jsx("span",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:809",className:"text-foreground text-sm font-medium truncate",children:V.sharedWithEmail}):e.jsx("span",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:810",className:"text-muted-foreground text-sm italic",children:"Generic link"}),_?e.jsx(Qe,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:812",variant:"outline",className:"border-red-300 text-red-500 text-xs",children:"Expired"}):e.jsx(Qe,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:813",variant:"outline",className:"border-envora-green/40 text-envora-green text-xs",children:"Active"})]}),e.jsxs("p",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:815",className:"text-muted-foreground text-xs",children:["Expires ",V.expiresAt?new Date(V.expiresAt).toLocaleDateString():"-"," / ",V.accessCount??0," views"]})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:819",className:"flex items-center gap-1 ml-3",children:[e.jsx(ie,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:820",variant:"ghost",size:"icon",className:"w-7 h-7 text-muted-foreground hover:text-foreground",onClick:()=>T(re),children:e.jsx(zr,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:821",className:"w-3 h-3"})}),e.jsx(ie,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:823",variant:"ghost",size:"icon",className:"w-7 h-7 text-muted-foreground hover:text-foreground",onClick:()=>window.open(re,"_blank"),children:e.jsx(Ya,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:824",className:"w-3 h-3"})}),e.jsx(ie,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:826",variant:"ghost",size:"icon",className:"w-7 h-7 text-red-400/60 hover:text-red-500",onClick:()=>E(V.id),disabled:w.isPending,children:e.jsx(pc,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:828",className:"w-3 h-3"})})]})]},V.id)})})]})]}),e.jsx(ku,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:842",open:r,onOpenChange:o,children:e.jsxs(Du,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:843",className:"max-w-sm",children:[e.jsx(Tu,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:844",children:e.jsxs(Ou,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:845",className:"flex items-center gap-2",children:[e.jsx(qa,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:846",className:"w-4 h-4",style:{color:wt}}),"Create Share Link"]})}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:850",className:"space-y-4 py-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:851",children:[e.jsx(At,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:852",className:"text-foreground text-sm mb-1.5 block",children:"Hotel email (optional)"}),e.jsx(Ot,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:853",type:"email",placeholder:"[email protected]",value:i,onChange:V=>d(V.target.value)}),e.jsx("p",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:855",className:"text-muted-foreground text-xs mt-1",children:"Leave blank to create a generic link you can share manually."})]}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:857",className:"bg-amber-50 border border-amber-200 rounded-lg p-3",children:[e.jsx("p",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:858",className:"text-amber-700 text-xs font-medium mb-0.5",children:"30-day expiry"}),e.jsx("p",{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:859",className:"text-amber-600/70 text-xs",children:"This link will expire automatically after 30 days. You can revoke it at any time."})]})]}),e.jsxs(Zi,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:862",children:[e.jsx(ie,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:863",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),e.jsxs(ie,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:864",className:"text-white font-semibold",style:{background:wt},onClick:C,disabled:j.isPending,children:[j.isPending?e.jsx(gs,{"data-loc":"client/src/pages/supplier/SupplierReport.tsx:866",className:"w-3 h-3 mr-1"}):null,"Create Link"]})]})]})})]})})}const LH="#1B4332";function zH(){const[,t]=ds(),{data:n,isLoading:r}=ue.supplier.getLatestAssessment.useQuery();return b.useEffect(()=>{if(!r){if(!n){t("/supplier/dashboard");return}n.state==="ai_audited"||n.state==="verified"?t(`/supplier/readiness-report/${n.id}`,{replace:!0}):t(`/supplier/report/${n.id}`,{replace:!0})}},[r,n,t]),e.jsx(Br,{"data-loc":"client/src/pages/supplier/SupplierReportRedirect.tsx:34",portalType:"supplier",children:e.jsxs("div",{"data-loc":"client/src/pages/supplier/SupplierReportRedirect.tsx:35",className:"flex flex-col items-center justify-center py-32 text-center",children:[e.jsx(gs,{"data-loc":"client/src/pages/supplier/SupplierReportRedirect.tsx:36",className:"w-10 h-10 mb-4",style:{color:LH}}),e.jsx("p",{"data-loc":"client/src/pages/supplier/SupplierReportRedirect.tsx:37",className:"text-sm text-muted-foreground",children:"Loading your report..."})]})})}const IH="#1B4332";function BH(){const[,t]=ds(),{data:n,isLoading:r}
583=ue.supplier.getLatestAssessment.useQuery(),o=ue.supplier.startAssessment.useMutation({onSuccess:i=>{t(`/supplier/assessment/${i.assessmentId}`,{replace:!0})},onError:i=>{xe.error(i.message),t("/supplier/dashboard",{replace:!0})}});return b.useEffect(()=>{r||(n?t(`/supplier/assessment/${n.id}`,{replace:!0}):o.isPending||o.mutate())},[r,n]),e.jsx(Br,{"data-loc":"client/src/pages/supplier/AssessmentRedirect.tsx:38",portalType:"supplier",children:e.jsxs("div",{"data-loc":"client/src/pages/supplier/AssessmentRedirect.tsx:39",className:"flex flex-col items-center justify-center py-32 text-center",children:[e.jsx(gs,{"data-loc":"client/src/pages/supplier/AssessmentRedirect.tsx:40",className:"w-10 h-10 mb-4",style:{color:IH}}),e.jsx("p",{"data-loc":"client/src/pages/supplier/AssessmentRedirect.tsx:41",className:"text-sm text-muted-foreground",children:"Loading your assessment..."})]})})}const pn="#1B4332",ec="#DC2626",fc="#D97706",bl="#16A34A",x4={high:{label:"High",color:ec,bg:"#FEF2F2",icon:sn},medium:{label:"Medium",color:fc,bg:"#FFFBEB",icon:Bt},low:{label:"Low",color:bl,bg:"#F0FDF4",icon:q6}},VH={open:{label:"Open",color:ec,bg:"#FEF2F2",icon:sn},in_progress:{label:"In Progress",color:fc,bg:"#FFFBEB",icon:Bt},resolved:{label:"Resolved",color:bl,bg:"#F0FDF4",icon:Te}};function FH({action:t,onStatusChange:n,isUpdating:r}){const[o,i]=b.useState(!1),d=x4[t.priority],u=VH[t.status],p=d.icon,x=u.icon;return e.jsxs("div",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:67",className:"bg-white rounded-xl border border-border overflow-hidden transition-shadow hover:shadow-md print-break-avoid",style:{borderLeft:`4px solid ${d.color}`},children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:72",className:"flex items-start gap-3 p-4",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:73",className:"mt-0.5 flex-shrink-0",children:e.jsx(p,{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:74",className:"w-4 h-4",style:{color:d.color}})}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:76",className:"flex-1 min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:77",className:"flex flex-wrap items-center gap-2 mb-1",children:[e.jsxs("span",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:79",className:"inline-flex items-center gap-1 text-xs font-semibold px-2 py-0.5 rounded-full",style:{background:d.bg,color:d.color},children:[d.label," Priority"]}),e.jsxs("span",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:86",className:"inline-flex items-center gap-1 text-xs font-medium px-2 py-0.5 rounded-full",style:{background:u.bg,color:u.color},children:[e.jsx(x,{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:90",className:"w-3 h-3"}),u.label]}),t.resolvedAt&&e.jsxs("span",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:94",className:"text-xs text-muted-foreground",children:["Resolved ",new Date(t.resolvedAt).toLocaleDateString()]})]}),e.jsx("p",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:99",className:"text-sm font-medium text-foreground leading-snug",children:t.resolutionTitle??"Corrective Action Required"}),o&&e.jsx("p",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:103",className:"mt-2 text-sm text-muted-foreground leading-relaxed",children:t.gapDescription})]}),e.jsx("button",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:108",onClick:()=>i(h=>!h),className:"flex-shrink-0 text-muted-foreground hover:text-foreground transition-colors p-1","aria-label":o?"Collapse":"Expand",children:o?e.jsx(Ph,{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:113",className:"w-4 h-4"}):e.jsx(Ps,{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:113",className:"w-4 h-4"})})]}),o&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:119",className:"border-t border-border bg-muted/30 px-4 py-3 flex flex-wrap gap-2",children:[t.status!=="in_progress"&&t.status!=="resolved"&&e.jsxs(ie,{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:121",size:"sm",variant:"outline",className:"text-xs gap-1.5",style:{borderColor:fc,color:fc},disabled:r,onClick:()=>n(t.id,"in_progress"),children:[r?e.jsx(gs,{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:129",className:"w-3 h-3"}):e.jsx(Bt,{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:129",className:"w-3 h-3"}),"Mark In Progress"]}),t.status!=="resolved"&&e.jsxs(ie,{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:134",size:"sm",className:"text-xs gap-1.5 text-white",style:{background:bl},disabled:r,onClick:()=>n(t.id,"resolved"),children:[r?e.jsx(gs,{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:141",className:"w-3 h-3"}):e.jsx(Te,{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:141",className:"w-3 h-3"}),"Mark Resolved"]}),t.status==="resolved"&&e.jsx(ie,{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:146",size:"sm",variant:"outline",className:"text-xs gap-1.5",disabled:r,onClick:()=>
583n(t.id,"open"),children:"Reopen"}),e.jsxs("span",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:156",className:"ml-auto text-xs text-muted-foreground self-center",children:["Added ",new Date(t.createdAt).toLocaleDateString()]})]})]})}function UH(){const[,t]=ds(),[n,r]=b.useState("all"),[o,i]=b.useState("all"),[d,u]=b.useState(null),{data:p}=ue.supplier.getLatestAssessment.useQuery(),{data:x,isLoading:h,refetch:v}=ue.supplier.getCorrectiveActions.useQuery({assessmentId:p?.id??0},{enabled:!!p?.id}),g=ue.supplier.updateCorrectiveActionStatus.useMutation({onSuccess:()=>{v(),xe.success("Action status updated."),u(null)},onError:T=>{xe.error(T.message??"Failed to update action."),u(null)}}),y=(T,D)=>{u(T),g.mutate({actionId:T,status:D})},N=(x??[]).filter(T=>!(n!=="all"&&T.status!==n||o!=="all"&&T.priority!==o)),j=x?.length??0,w=x?.filter(T=>T.status==="open").length??0,A=x?.filter(T=>T.status==="in_progress").length??0,C=x?.filter(T=>T.status==="resolved").length??0,E=x?.filter(T=>T.priority==="high").length??0;return e.jsx(Br,{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:216",children:e.jsxs("div",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:217",className:"max-w-4xl mx-auto px-4 pb-16",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:220",className:"pt-6 pb-4 flex items-start gap-4",children:[e.jsx("button",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:221",onClick:()=>t("/supplier/dashboard"),className:"mt-1 text-muted-foreground hover:text-foreground transition-colors",children:e.jsx(cc,{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:225",className:"w-4 h-4"})}),e.jsxs("div",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:227",className:"flex-1",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:228",className:"flex items-center gap-2 mb-1",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:229",className:"w-8 h-8 rounded-lg flex items-center justify-center",style:{background:`${pn}15`},children:e.jsx(Ho,{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:233",className:"w-4 h-4",style:{color:pn}})}),e.jsx("h1",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:235",className:"text-2xl font-bold",style:{fontFamily:"'Plus Jakarta Sans', sans-serif",color:pn},children:"Corrective Actions"})]}),e.jsx("p",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:242",className:"text-sm text-muted-foreground",children:"AI-identified gaps from your sustainability assessment. Track and resolve each action to improve your readiness score."})]})]}),j>0&&e.jsx("div",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:250",className:"grid grid-cols-2 sm:grid-cols-4 gap-3 mb-6",children:[{label:"Total Actions",value:j,color:pn,bg:`${pn}10`},{label:"Open",value:w,color:ec,bg:"#FEF2F2"},{label:"In Progress",value:A,color:fc,bg:"#FFFBEB"},{label:"Resolved",value:C,color:bl,bg:"#F0FDF4"}].map(({label:T,value:D,color:M,bg:z})=>e.jsxs("div",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:257",className:"bg-white rounded-xl border border-border p-4 text-center",children:[e.jsx("div",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:258",className:"text-2xl font-bold",style:{color:M},children:D}),e.jsx("div",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:259",className:"text-xs text-muted-foreground mt-0.5",children:T})]},T))}),E>0&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:267",className:"flex items-center gap-2 rounded-lg px-4 py-3 mb-5 text-sm font-medium",style:{background:"#FEF2F2",color:ec,border:`1px solid ${ec}30`},children:[e.jsx(sn,{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:271",className:"w-4 h-4 flex-shrink-0"}),E," high-priority action",E>1?"s":""," require",E===1?"s":""," immediate attention."]}),j>0&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:278",className:"flex flex-wrap items-center gap-2 mb-5",children:[e.jsx(Y6,{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:279",className:"w-3.5 h-3.5 text-muted-foreground"}),e.jsx("span",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:280",className:"text-xs text-muted-foreground mr-1",children:"Status:"}),["all","open","in_progress","resolved"].map(T=>e.jsx("button",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:282",onClick:()=>r(T),className:`text-xs px-2.5 py-1 rounded-full border transition-colors ${n===T?"text-white border-transparent":"text-muted-foreground border-border hover:border-foreground
583/30"}`,style:n===T?{background:pn}:{},children:T==="all"?"All":T==="in_progress"?"In Progress":T.charAt(0).toUpperCase()+T.slice(1)},T)),e.jsx("span",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:295",className:"text-xs text-muted-foreground ml-3 mr-1",children:"Priority:"}),["all","high","medium","low"].map(T=>e.jsx("button",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:297",onClick:()=>i(T),className:`text-xs px-2.5 py-1 rounded-full border transition-colors ${o===T?"text-white border-transparent":"text-muted-foreground border-border hover:border-foreground/30"}`,style:o===T?{background:pn}:{},children:T.charAt(0).toUpperCase()+T.slice(1)},T))]}),h&&e.jsx("div",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:315",className:"flex items-center justify-center py-24",children:e.jsx(gs,{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:316",className:"w-6 h-6",style:{color:pn}})}),!h&&!p&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:321",className:"text-center py-20",children:[e.jsx(Ho,{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:322",className:"w-10 h-10 mx-auto mb-3 text-muted-foreground/40"}),e.jsx("p",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:323",className:"text-muted-foreground text-sm",children:"No assessment found. Complete your sustainability assessment first."}),e.jsx(ie,{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:324",className:"mt-4 text-white text-sm",style:{background:pn},onClick:()=>t("/supplier/assessment"),children:"Start Assessment"})]}),!h&&p&&j===0&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:331",className:"text-center py-20",children:[e.jsx(Te,{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:332",className:"w-10 h-10 mx-auto mb-3",style:{color:bl}}),e.jsx("p",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:333",className:"font-semibold text-foreground mb-1",children:"No corrective actions found"}),e.jsx("p",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:334",className:"text-muted-foreground text-sm",children:p.state==="ai_audited"?"Excellent â your AI audit found no gaps requiring corrective action.":"Run the AI audit on your assessment to generate corrective actions."}),p.state!=="ai_audited"&&e.jsx(ie,{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:340",className:"mt-4 text-white text-sm",style:{background:pn},onClick:()=>t("/supplier/dashboard"),children:"Go to Dashboard"})]}),!h&&N.length===0&&j>0&&e.jsx("div",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:348",className:"text-center py-12 text-muted-foreground text-sm",children:"No actions match the selected filters."}),!h&&N.length>0&&e.jsx("div",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:354",className:"space-y-3",children:["high","medium","low"].map(T=>{const D=N.filter(z=>z.priority===T);if(D.length===0)return null;const M=x4[T];return e.jsxs("div",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:361",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:362",className:"flex items-center gap-2 mb-2",children:[e.jsx(M.icon,{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:363",className:"w-3.5 h-3.5",style:{color:M.color}}),e.jsxs("span",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:364",className:"text-xs font-semibold uppercase tracking-wide",style:{color:M.color},children:[M.label," Priority (",D.length,")"]})]}),e.jsx("div",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:368",className:"space-y-2",children:D.map(z=>e.jsx(FH,{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:370",action:z,onStatusChange:y,isUpdating:d===z.id},z.id))})]},T)})}),j>0&&C>0&&e.jsxs("div",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:386",className:"mt-8 bg-white rounded-xl border border-border p-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:387",className:"flex items-center justify-between mb-2",children:[e.jsx("span",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:388",className:"text-sm font-semibold text-foreground",children:"Resolution Progress"}),e.jsxs("span",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:389",className:"text-sm font-bold",style:{color:bl},children:[Math.round(C/j*100),"% complete"]})]}),e.jsx("div",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:393",className:"h-2.5 rounded-full bg-muted overflow-hidden",children:e.jsx("div",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:394",className:"h-full rounded-full transition-all duration-500",style:{width:`${C/j*100}%`,background:bl}}
583)}),e.jsxs("p",{"data-loc":"client/src/pages/supplier/CorrectiveActions.tsx:399",className:"text-xs text-muted-foreground mt-2",children:[C," of ",j," corrective actions resolved.",w>0&&` ${w} still open.`]})]})]})})}function fw({text:t}){const[n,r]=b.useState(!1),o=async()=>{await navigator.clipboard.writeText(t),r(!0),setTimeout(()=>r(!1),2e3)};return e.jsx("button",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:38",onClick:o,className:"ml-2 p-1 rounded hover:bg-muted transition-colors text-muted-foreground hover:text-foreground",title:"Copy to clipboard",children:n?e.jsx(Te,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:43",className:"w-4 h-4 text-envora-green"}):e.jsx(zr,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:43",className:"w-4 h-4"})})}function $H(){const t=ue.useUtils(),{data:n=[],isLoading:r}=ue.apiKeys.list.useQuery(),[o,i]=b.useState(!1),[d,u]=b.useState(""),[p,x]=b.useState(""),[h,v]=b.useState(null),[g,y]=b.useState(!1),[N,j]=b.useState(null),w=ue.apiKeys.create.useMutation({onSuccess:D=>{v(D.rawKey),y(!0),u(""),x(""),t.apiKeys.list.invalidate()},onError:D=>xe.error(D.message)}),A=ue.apiKeys.revoke.useMutation({onSuccess:()=>{xe.success("API key revoked."),j(null),t.apiKeys.list.invalidate()},onError:D=>xe.error(D.message)}),C=()=>{if(!d.trim()){xe.error("Please enter a name for the API key.");return}w.mutate({name:d.trim(),scopes:"read",expiresInDays:p?parseInt(p):void 0})},E=D=>D.expiresAt&&new Date(D.expiresAt)<new Date,T=D=>{if(!D.expiresAt)return!1;const M=(new Date(D.expiresAt).getTime()-Date.now())/864e5;return M>0&&M<14};return e.jsxs(Br,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:96",children:[e.jsxs("div",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:97",className:"max-w-3xl mx-auto py-8 px-4 space-y-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:99",className:"flex items-center justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:100",children:[e.jsxs("h1",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:101",className:"font-display text-2xl font-bold text-foreground flex items-center gap-2",children:[e.jsx(Eo,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:102",className:"w-6 h-6 text-envora-pine"}),"API Keys"]}),e.jsx("p",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:105",className:"text-sm text-muted-foreground mt-1",children:"Use API keys to connect external platforms (e.g. Protel, Opera, procurement tools) to your Envora account."})]}),e.jsxs(ie,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:109",onClick:()=>{i(!0),v(null)},className:"bg-envora-pine hover:bg-envora-pine/90 text-white",size:"sm",children:[e.jsx(jc,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:114",className:"w-4 h-4 mr-1.5"}),"New API Key"]})]}),e.jsx(_e,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:120",className:"border-0 bg-envora-pine/5 shadow-none",children:e.jsxs(Me,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:121",className:"p-4 space-y-2",children:[e.jsx("div",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:122",className:"text-xs font-semibold text-envora-pine uppercase tracking-wider",children:"REST API Base URL"}),e.jsxs("div",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:123",className:"flex items-center gap-1 font-mono text-sm text-foreground bg-card rounded-lg px-3 py-2 border border-border",children:[e.jsxs("span",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:124",className:"flex-1 truncate",children:[window.location.origin,"/api/v1"]}),e.jsx(fw,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:125",text:`${window.location.origin}/api/v1`})]}),e.jsxs("p",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:127",className:"text-xs text-muted-foreground",children:["Authenticate by passing your key as a ",e.jsx("code",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:128",className:"bg-muted px-1 rounded text-[11px]",children:"Authorization: Bearer env_..."})," header."]}),e.jsxs("div",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:130",className:"text-xs text-muted-foreground space-y-0.5 pt-1",children:[e.jsxs("div",{"data-loc":"client/src/pages/sett
583ings/ApiKeys.tsx:131",children:[e.jsx("span",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:131",className:"font-semibold text-foreground",children:"GET"})," /api/v1/me â account info"]}),e.jsxs("div",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:132",children:[e.jsx("span",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:132",className:"font-semibold text-foreground",children:"GET"})," /api/v1/supplier/profile â supplier profile"]}),e.jsxs("div",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:133",children:[e.jsx("span",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:133",className:"font-semibold text-foreground",children:"GET"})," /api/v1/supplier/assessment â latest assessment scores & state"]})]})]})}),r?e.jsx("div",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:140",className:"text-sm text-muted-foreground py-8 text-center",children:"Loading keysâ¦"}):n.length===0?e.jsx(_e,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:142",className:"border-0 shadow-sm",children:e.jsxs(Me,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:143",className:"py-12 flex flex-col items-center gap-3 text-muted-foreground",children:[e.jsx(Eo,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:144",className:"w-10 h-10 opacity-30"}),e.jsx("p",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:145",className:"text-sm",children:"No API keys yet. Create one to get started."})]})}):e.jsx("div",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:149",className:"space-y-3",children:n.map(D=>e.jsx(_e,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:151",className:`border-0 shadow-sm ${E(D)?"opacity-60":""}`,children:e.jsxs(Me,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:152",className:"p-4 flex items-start gap-4",children:[e.jsx("div",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:153",className:"w-9 h-9 rounded-xl bg-envora-pine/10 flex items-center justify-center text-envora-pine flex-shrink-0",children:e.jsx(Eo,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:154",className:"w-4 h-4"})}),e.jsxs("div",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:156",className:"flex-1 min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:157",className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:158",className:"font-semibold text-foreground text-sm",children:D.name}),E(D)&&e.jsx(Qe,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:159",variant:"destructive",className:"text-[10px] px-1.5 py-0",children:"Expired"}),T(D)&&!E(D)&&e.jsxs(Qe,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:161",className:"text-[10px] px-1.5 py-0 bg-amber-100 text-amber-700 border-amber-200",children:[e.jsx(sn,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:162",className:"w-2.5 h-2.5 mr-1"}),"Expiring soon"]})]}),e.jsx("div",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:167",className:"flex items-center gap-1 mt-1",children:e.jsxs("code",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:168",className:"text-xs text-muted-foreground font-mono bg-muted px-1.5 py-0.5 rounded",children:[D.keyPrefix,"â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢"]})}),e.jsxs("div",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:170",className:"flex items-center gap-3 mt-1.5 text-[11px] text-muted-foreground/70 flex-wrap",children:[e.jsxs("span",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:171",children:["Scopes: ",e.jsx("span",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:171",className:"text-foreground/70",children:D.scopes})]}),e.jsxs("span",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:172",children:["Created ",new Date(D.createdAt).toLocaleDateString()]}),D.lastUsedAt&&e.jsxs("span",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:173",className:"flex items-center gap-1",children:[e.jsx(Bt,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:173",className:"w-3 h-3"}),"Last used ",new Date(D.lastUsedAt).toLocaleDateString()]}),D.expiresAt&&e.jsxs("span",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:174",children:["Expires ",new Date(D.expiresAt).toLocaleDateString()]})]})]}
583),e.jsx(ie,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:177",variant:"ghost",size:"sm",className:"text-red-500 hover:text-red-600 hover:bg-red-50 flex-shrink-0",onClick:()=>j(D),children:e.jsx(pc,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:183",className:"w-4 h-4"})})]})},D.id))})]}),e.jsx(ku,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:193",open:o,onOpenChange:D=>{D||(i(!1),v(null))},children:e.jsxs(Du,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:194",className:"max-w-md",children:[e.jsx(Tu,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:195",children:e.jsxs(Ou,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:196",className:"flex items-center gap-2",children:[e.jsx(Eo,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:197",className:"w-5 h-5 text-envora-pine"}),h?"API Key Created":"Create API Key"]})}),h?e.jsxs("div",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:203",className:"space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:204",className:"rounded-xl bg-envora-green/5 border border-envora-green/20 p-4 space-y-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:205",className:"flex items-center gap-2 text-envora-green text-sm font-semibold",children:[e.jsx(Te,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:206",className:"w-4 h-4"}),"Copy your key now â it won't be shown again"]}),e.jsxs("div",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:209",className:"flex items-center gap-1 bg-card rounded-lg border border-border px-3 py-2 font-mono text-xs break-all",children:[e.jsx("span",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:210",className:"flex-1",children:g?h:h.slice(0,8)+"â¢".repeat(h.length-8)}),e.jsx("button",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:211",onClick:()=>y(D=>!D),className:"ml-1 text-muted-foreground hover:text-foreground",children:g?e.jsx(Q6,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:212",className:"w-3.5 h-3.5"}):e.jsx(wS,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:212",className:"w-3.5 h-3.5"})}),e.jsx(fw,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:214",text:h})]})]}),e.jsx("p",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:217",className:"text-xs text-muted-foreground",children:"Store this key in your integration platform's secrets manager. Envora never stores the raw key."}),e.jsx(Zi,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:220",children:e.jsx(ie,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:221",onClick:()=>{i(!1),v(null)},className:"w-full bg-envora-pine hover:bg-envora-pine/90 text-white",children:"Done"})})]}):e.jsxs("div",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:227",className:"space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:228",children:[e.jsxs("label",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:229",className:"text-sm font-semibold text-foreground mb-1.5 block",children:["Key Name ",e.jsx("span",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:229",className:"text-red-500",children:"*"})]}),e.jsx(Ot,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:230",value:d,onChange:D=>u(D.target.value),placeholder:"e.g. Protel Integration, Opera PMS, Procurement Tool",onKeyDown:D=>D.key==="Enter"&&C()})]}),e.jsxs("div",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:237",children:[e.jsx("label",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:238",className:"text-sm font-semibold text-foreground mb-1.5 block",children:"Expiry (optional)"}),e.jsxs("select",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:239",value:p,onChange:D=>x(D.target.value),className:"w-full rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground",children:[e.jsx("option",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:244",value:"",children:"Never expires"}),e.jsx("option",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:245",value:"30",children:"30 days"}),e.jsx("option",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:246",value:"90",children:"90 days"}
583),e.jsx("option",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:247",value:"180",children:"180 days"}),e.jsx("option",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:248",value:"365",children:"1 year"})]})]}),e.jsxs("p",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:251",className:"text-xs text-muted-foreground",children:["The key will have ",e.jsx("strong",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:252",children:"read"})," scope â it can read your profile and assessment data but cannot modify anything."]}),e.jsxs(Zi,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:254",children:[e.jsx(ie,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:255",variant:"ghost",onClick:()=>i(!1),children:"Cancel"}),e.jsx(ie,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:256",onClick:C,disabled:w.isPending||!d.trim(),className:"bg-envora-pine hover:bg-envora-pine/90 text-white",children:w.isPending?"Creatingâ¦":"Create Key"})]})]})]})}),e.jsx(ku,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:270",open:!!N,onOpenChange:D=>{D||j(null)},children:e.jsxs(Du,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:271",className:"max-w-sm",children:[e.jsx(Tu,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:272",children:e.jsx(Ou,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:273",className:"text-red-600",children:"Revoke API Key?"})}),e.jsxs("p",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:275",className:"text-sm text-muted-foreground",children:["Revoking ",e.jsxs("strong",{"data-loc":"client/src/pages/settings/ApiKeys.tsx:276",children:['"',N?.name,'"']})," will immediately invalidate it. Any integrations using this key will stop working."]}),e.jsxs(Zi,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:278",children:[e.jsx(ie,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:279",variant:"ghost",onClick:()=>j(null),children:"Cancel"}),e.jsx(ie,{"data-loc":"client/src/pages/settings/ApiKeys.tsx:280",variant:"destructive",disabled:A.isPending,onClick:()=>N&&A.mutate({id:N.id}),children:A.isPending?"Revokingâ¦":"Revoke Key"})]})]})})]})}const GH=[{key:"verified",name:"Envora Verified",price:"AED 299",period:"/year",badge:null,icon:Un,borderColor:"border-envora-pine/20",ringColor:"",btnClass:"bg-envora-pine hover:bg-envora-pine/90 text-white",description:"For individual suppliers ready to demonstrate sustainability compliance to hotel partners.",features:["Full 72-criterion self-assessment","AI evidence audit & scoring","Verified badge (SVG + PNG)","PDF certificate of verification","Share report with hotels","GSTC & Green Key clause mapping","Public verification page"]},{key:"verifiedPlus",name:"Envora Verified Plus",price:"AED 599",period:"/year",badge:"Most Popular",icon:RS,borderColor:"border-amber-300",ringColor:"ring-1 ring-amber-400/50 scale-[1.02]",btnClass:"bg-amber-500 hover:bg-amber-400 text-black font-semibold",description:"For suppliers who want priority processing, corrective action guidance, and renewal support.",features:["Everything in Verified","Priority AI audit processing","Corrective action plan","Gap-to-resolution guidance library","Renewal reminders (90 & 30 days)","Dedicated support channel"]},{key:"portfolio",name:"Envora Portfolio",price:"AED 1,499",period:"/year",badge:"For Groups",icon:Ms,borderColor:"border-envora-green/30",ringColor:"",btnClass:"bg-envora-pine hover:bg-envora-pine/90 text-white",description:"For hotel groups and chains managing multiple properties and supplier networks.",features:["Unlimited hotel properties","Group portfolio analytics","Bulk supplier invitation campaigns","Consolidated evidence packs","Risk heatmap across portfolio","Dedicated account support"]}];function KH(){const{isAuthenticated:t}=za(),[n,r]=b.useState(null),{data:o}=ue.stripe.getStatus.useQuery(void 0,{enabled:t}),i=ue.stripe.createCheckout.useMutation(),d=async u=>{if(!t){window.location.href=Xa();return}r(u);try{const p=await i.mutateAsync({tier:u});p.checkoutUrl&&(xe.info("Redirecting to secure checkout..."),window.open(p.checkoutUrl,"_blank"))}catch{xe.error("Failed to start checkout. Please try again.")}finally{r(null)}};return e.jsxs("div",{"data-loc":"client/src/pages/Subscription.tsx:102",className:"min-h-screen bg-background",children:[e.jsxs("div",{"data-loc":"client/src/pages/Subscription.tsx:104",className:"border-b border-border bg-card shadow-sm px-6 py-4 flex items-center justify-between",children:[e.jsxs(en,{"data-loc":"client/src/pages/Subscription.tsx:105",href:"/",className:"flex items-center gap-2",children:[e.jsx("div",{"data-loc":"client/src/pages/Subscription.tsx:106",className:"w-8 h-8 rounded-lg bg-envora-pine/10 flex items-center justify-center",children:e.jsx(Ns,{"data-loc":"client/src/pages/Subscription.tsx:107",className:"w-4 h-4 text-envora-pine"})}),e.jsx("span",{"data-loc":"client/src/pages/Subscription.tsx:109",className:"font-semibold text-envora-pine",style:{fontFamily:"var(--font-display)"},children:"Envora"})]}),t?e.jsx(en,{"data-loc":"client/src/pages/Subscription.tsx:112",href:"/supplier/dashboard",children:e.jsx(ie,{"data-loc":"client/src/pages/Subscription.tsx:113",variant:"outline",size:"sm",children:"Dashboard"})}):e.jsx("a",{"data-loc":"client/src/pages/Subscription.tsx:116",href:Xa(),children:e.jsx(ie,{"data-loc":"client/src/pages/Subscription.tsx:117",size:"sm",className:"bg-envora-pine hover:bg-envora-pine/90 text-white",children:"Sign In"})})]}),e.jsxs("div",{"data-loc":"client/src/pages/Subscription.tsx:122",className:"max-w-6xl mx-auto px-6 py-16",children:[e.jsxs("div",{"data-loc":"client/src/pages/Subscription.tsx:124",className:"text-center mb-14",children:[e.jsx(Qe,{"data-loc":"client/src/pages/Subscription.tsx:125",className:"bg-envora-pine/10 text-envora-pine border-envora-pine/20 mb-4",children:"Transparent Pricing"}),e.jsx("h1",{"data-loc":"client/src/pages/Subscription.tsx:126",className:"text-4xl md:text-5xl font-bold text-envora-pine mb-4",style:{fontFamily:"var(--font-display)"},children:"Choose Your Readiness Plan"}),e.jsx("p",{"data-loc":"client/src/pages/Subscription.tsx:129",className:"text-muted-foreground text-lg max-w-2xl mx-auto",children:"Annual subscriptions. No hidden fees. Cancel anytime. All plans include the full assessment framework built on GSTC, ISO 14001, SA8000, and EcoVadis methodology."})]}),o&&e.jsxs("div",{"data-loc":"client/src/pages/Subscription.tsx:136",className:"mb-8 p-4 rounded-xl bg-envora-pine/8 border border-envora-pine/20 flex items-center gap-3",children:[e.jsx(Un,{"data-loc":"client/src/pages/Subscription.tsx:137",className:"text-envora-green w-5 h-5 flex-shrink-0"}),e.jsxs("div",{"data-loc":"client/src/pages/Subscription.tsx:138",children:[e.jsxs("p",{"data-loc":"client/src/pages/Subscription.tsx:139",className:"text-foreground font-medium",children:["You have an active ",e.jsx("span",{"data-loc":"client/src/pages/Subscription.tsx:140",className:"text-envora-pine font-semibold",children:o.tier.replace("_"," ").replace(/\b\w/g,u=>u.toUpperCase())})," subscription"]}),e.jsxs("p",{"data-loc":"client/src/pages/Subscription.tsx:142",className:"text-muted-foreground text-sm",children:["Valid until ",new Date(o.currentPeriodEnd).toLocaleDateString("en-GB",{day:"2-digit",month:"long",year:"numeric"})]})]})]}),e.jsx("div",{"data-loc":"client/src/pages/Subscription.tsx:150",className:"grid md:grid-cols-3 gap-6",children:GH.map(u=>{const p=u.icon,x=o?.tier===u.key.replace(/([A-Z])/g,"_$1").toLowerCase(),h=n===u.key;return e.jsxs("div",{"data-loc":"client/src/pages/Subscription.tsx:157",className:`relative rounded-2xl border bg-card p-6 flex flex-col transition-all duration-200 hover:shadow-md ${u.borderColor} ${u.ringColor} shadow-sm`,children:[u.badge&&e.jsx("div",{"data-loc":"client/src/pages/Subscription.tsx:162",className:"absolute -top-3 left-1/2 -translate-x-1/2",children:e.jsx(Qe,{"data-loc":"client/src/pages/Subscription.tsx:163",className:`${u.badge==="Most Popular"?"bg-amber-500 text-black":"bg-envora-pine text-white"} text-xs font-semibold px-3 py-1 shadow-sm`,children:u.badge})}),e.jsxs("div",{"data-loc":"client/src/pages/Subscription.tsx:169",className:"mb-4",children:[e.jsx("div",{"data-loc":"client/src/pages/Subscription.tsx:170",className:"w-10 h-10 rounded-xl bg-envora-pine/10 flex items-center justify-center mb-3",children:e.jsx(p,{"data-loc":"client/src/pages/Subscription.tsx:171",className:"w-5 h-5 text-envora-pine"})}),e.jsx("h3",{"data-loc":"client/src/pages/Subscription.tsx:173",className:"text-xl font-bold text-foreground",style:{fontFamily:"var(--font-display)"},children:u.name}),e.jsx("p",{"data-loc":"client/src/pages/Subscription.tsx:174",className:"text-muted-foreground text-sm mt-1",children:u.description})]}),e.jsxs("div",{"data-loc":"client/src/pages/Subscription.tsx:177",className:"mb-6",children:[e.jsx("span",{"data-loc":"client/src/pages/Subscription.tsx:178",className:"text-3xl font-bold text-envora-pine",style:{fontFamily:"var(--font-display)"},children:u.price}),e.jsx("span",{"data-loc":"client/src/pages/Subscription.tsx:179",className:"text-muted-foreground text-sm",children:u.period})]}),e.jsx("ul",{"data-loc":"client/src/pages/Subscription.tsx:182",className:"space-y-2 mb-8 flex-1",children:u.features.map(v=>e.jsxs("li",{"data-loc":"client/src/pages/Subscription.tsx:184",className:"flex items-start gap-2 text-sm text-foreground
583/80",children:[e.jsx(Un,{"data-loc":"client/src/pages/Subscription.tsx:185",className:"w-4 h-4 text-envora-green flex-shrink-0 mt-0.5"}),v]},v))}),e.jsx(ie,{"data-loc":"client/src/pages/Subscription.tsx:191",onClick:()=>d(u.key),disabled:h||x,className:`w-full ${x?"bg-envora-pine/10 text-envora-pine border border-envora-pine/30 cursor-default":u.btnClass}`,children:h?e.jsxs(e.Fragment,{children:[e.jsx(It,{"data-loc":"client/src/pages/Subscription.tsx:197",className:"w-4 h-4 animate-spin mr-2"}),"Processing..."]}):x?e.jsxs(e.Fragment,{children:[e.jsx(Un,{"data-loc":"client/src/pages/Subscription.tsx:199",className:"w-4 h-4 mr-2"}),"Current Plan"]}):e.jsxs(e.Fragment,{children:[e.jsx(Ya,{"data-loc":"client/src/pages/Subscription.tsx:201",className:"w-4 h-4 mr-2"}),"Subscribe Now"]})})]},u.key)})}),e.jsx("div",{"data-loc":"client/src/pages/Subscription.tsx:210",className:"mt-10 p-4 rounded-xl bg-muted/60 border border-border text-center",children:e.jsxs("p",{"data-loc":"client/src/pages/Subscription.tsx:211",className:"text-muted-foreground text-sm",children:[e.jsx("span",{"data-loc":"client/src/pages/Subscription.tsx:212",className:"text-foreground font-medium",children:"Test payments:"})," Use card number"," ",e.jsx("code",{"data-loc":"client/src/pages/Subscription.tsx:213",className:"bg-background border border-border px-2 py-0.5 rounded text-foreground font-mono text-xs",children:"4242 4242 4242 4242"})," ","with any future expiry and any 3-digit CVC."]})}),e.jsxs("div",{"data-loc":"client/src/pages/Subscription.tsx:219",className:"mt-14 text-center",children:[e.jsx("p",{"data-loc":"client/src/pages/Subscription.tsx:220",className:"text-muted-foreground/60 text-xs uppercase tracking-widest mb-4",children:"Assessment Frameworks"}),e.jsx("div",{"data-loc":"client/src/pages/Subscription.tsx:221",className:"flex flex-wrap justify-center gap-3",children:["GSTC Hotel Standard","ISO 14001","SA8000","EcoVadis Methodology","UN SDGs","Green Key Standard","ILO Core Conventions"].map(u=>e.jsx("span",{"data-loc":"client/src/pages/Subscription.tsx:223",className:"text-muted-foreground text-sm border border-border/60 rounded-full px-3 py-1 bg-card",children:u},u))})]})]})]})}function qH(){const t=ue.useUtils();return b.useEffect(()=>{setTimeout(()=>{t.stripe.getStatus.invalidate()},2e3)},[t]),e.jsx("div",{"data-loc":"client/src/pages/SubscriptionSuccess.tsx:18",className:"min-h-screen bg-background flex items-center justify-center px-6",children:e.jsxs("div",{"data-loc":"client/src/pages/SubscriptionSuccess.tsx:19",className:"max-w-md w-full text-center",children:[e.jsx("div",{"data-loc":"client/src/pages/SubscriptionSuccess.tsx:20",className:"w-20 h-20 rounded-full bg-envora-pine/10 border border-envora-pine/20 flex items-center justify-center mx-auto mb-6",children:e.jsx(Un,{"data-loc":"client/src/pages/SubscriptionSuccess.tsx:21",className:"w-10 h-10 text-envora-green"})}),e.jsx("h1",{"data-loc":"client/src/pages/SubscriptionSuccess.tsx:23",className:"text-3xl font-bold text-envora-pine mb-3",style:{fontFamily:"var(--font-display)"},children:"Subscription Activated!"}),e.jsx("p",{"data-loc":"client/src/pages/SubscriptionSuccess.tsx:24",className:"text-muted-foreground mb-8",children:"Your Envora subscription is now active. You can start your sustainability assessment and share your verified status with hotel partners."}),e.jsxs("div",{"data-loc":"client/src/pages/SubscriptionSuccess.tsx:27",className:"flex flex-col gap-3",children:[e.jsx(en,{"data-loc":"client/src/pages/SubscriptionSuccess.tsx:28",href:"/supplier/dashboard",children:e.jsxs(ie,{"data-loc":"client/src/pages/SubscriptionSuccess.tsx:29",className:"w-full bg-envora-pine hover:bg-envora-pine/90 text-white font-semibold",children:["Go to Dashboard ",e.jsx(Yi,{"data-loc":"client/src/pages/SubscriptionSuccess.tsx:30",className:"w-4 h-4 ml-2"})]})}),e.jsx(en,{"data-loc":"client/src/pages/SubscriptionSuccess.tsx:33",href:"/supplier/assessment",children:e.jsx(ie,{"data-loc":"client/src/pages/SubscriptionSuccess.tsx:34",variant:"outline",className:"w-full",children:"Start Assessment"})})]})]})})}function QH(){return e.jsx("div",{"data-loc":"client/src/pages/SubscriptionCancel.tsx:7",className:"min-h-screen bg-background flex items-center justify-center px-6",children:e.jsxs("div",{"data-loc":"client/src/pages/SubscriptionCancel.tsx:8",className:"max-w-md w-full text-center",children:[e.jsx("div",{"data-loc":"client/src/pages/SubscriptionCancel.tsx:9",className:"w-20 h-20 rounded-full bg-muted border border-border flex items-center justify-center mx-auto mb-6",children:e.jsx(Zt,{"data-loc":"client/src/pages/SubscriptionCancel.tsx:10",className:"w-10 h-10 text-muted-foreground"})}),e.jsx("h1",{"data-loc":"client/src/pages/SubscriptionCancel.tsx:12",className:"text-3xl font-bold text-foreground mb-3",style:{fontFamily:"var(--font-display)"},children:"Checkout Cancelled"}),e.jsx("p",{"data-loc":"client/src/pages/SubscriptionCancel.tsx:13",className:"text-muted-foreground mb-8",children:"No charge was made. You can return to the pricing page whenever you are ready to subscribe."}),e.jsxs("div",{"data-loc":"client/src/pages/SubscriptionCancel.tsx:16",className:"flex flex-col gap-3",children:[e.jsx(en,{"data-loc":"client/src/pages/SubscriptionCancel.tsx:17",href:"/subscription",children:e.jsx(ie,{"data-loc":"client/src/pages/SubscriptionCancel.tsx:18",className:"w-full bg-envora-pine hover:bg-envora-pine/90 text-white font-semibold",children:"View Plans"})}),e.jsx(en,{"data-loc":"client/src/pages/SubscriptionCancel.tsx:22",href:"/",children:e.jsxs(ie,{"data-loc":"client/src/pages/SubscriptionCancel.tsx:23",variant:"outline",className:"w-full",children:[e.jsx(cc,{"data-loc":"client/src/pages/SubscriptionCancel.tsx:24",className:"w-4 h-4 mr-2"})," Back to Home"]})})]})]})})}function YH(){const{user:t,loading:n}=za(),r=zo(),o=b.useRef(void 0);return b.useEffect(()=>{if(n)return;const i=t?.id??null;if(o.current===void 0){o.current=i;return}o.current!==i&&(r.clear(),o.current=i)},[t?.id,n,r]),null}const hw="envora_pending_invite_token",gw="envora_pending_invite_ts",XH=1800*1e3;function ZH(){const{isAuthenticated:t,loading:n}=za(),[r,o]=ds();return b.useEffect(()=>{if(n||!t)return;const i=localStorage.getItem(hw),d=localStorage.getItem(gw);if(!i)return;if(Date.now()-Number(d??0)>XH){localStorage.removeItem(hw),localStorage.removeItem(gw);return}r.startsWith("/invite/")||o(`/invite/${i}`)},[t,n]),null}function WH(){return e.jsxs(TT,{"data-loc":"client/src/App.tsx:102",children:[e.jsx(mt,{"data-loc":"client/src/App.tsx:104",path:"/",component:LT}),e.jsx(mt,{"data-loc":"client/src/App.tsx:105",path:"/verify/:slug",component:GP}),e.jsx(mt,{"data-loc":"client/src/App.tsx:106",path:"/shared/:token",component:KP}),e.jsx(mt,{"data-loc":"client/src/App.tsx:107",path:"/invite/:token",component:qP}),e.jsx(mt,{"data-loc":"client/src/App.tsx:108",path:"/invite/hotel/:token",component:QP}),e.jsx(mt,{"data-loc":"client/src/App.tsx:109",path:"/supplier/invite/:token/report",component:gH}),e.jsx(mt,{"data-loc":"client/src/App.tsx:110",path:"/supplier/invite/:token",component:ZP}),e.jsx(mt,{"data-loc":"client/src/App.tsx:111",path:"/report/:token",component:iH}),e.jsx(mt,{"data-loc":"client/src/App.tsx:112",path:"/portal/supplier-review/:shareToken",component:SH}),e.jsx(mt,{"data-loc":"client/src/App.tsx:115",path:"/subscription",component:KH}),e.jsx(mt,{"data-loc":"client/src/App.tsx:116",path:"/subscription/success",component:qH}),e.jsx(mt,{"data-loc":"client/src/App.tsx:117",path:"/subscription/cancel",component:QH}),e.jsx(mt,{"data-loc":"client/src/App.tsx:120",path:"/supplier/onboarding",component:wO}),e.jsx(mt,{"data-loc":"client/src/App.tsx:121",path:"/supplier/dashboard",component:cM}),e.jsx(mt,{"data-loc":"client/src/App.tsx:122",path:"/supplier/profile",component:c9}),e.jsx(mt,{"data-loc":"client/src/App.tsx:123",path:"/supplier/assessment",component:BH}),e.jsx(mt,{"data-loc":"client/src/App.tsx:124",path:"/supplier/assessment/:id",children:()=>e.jsx(i4,{"data-loc":"client/src/App.tsx:124"})}),e.jsx(mt,{"data-loc":"client/src/App.tsx:125",path:"/supplier/report/:id",component:CP}),e.jsx(mt,{"data-loc":"client/src/App.tsx:126",path:"/supplier/report",component:zH}),e.jsx(mt,{"data-loc":"client/src/App.tsx:127",path:"/supplier/scope3",component:NH}),e.jsx(mt,{"data-loc":"client/src/App.tsx:128",path:"/supplier/readiness-report/:id",component:HH}),e.jsx(mt,{"data-loc":"client/src/App.tsx:129",path:"/supplier/corrective-actions",component:UH}),e.jsx(mt,{"data-loc":"client/src/App.tsx:130",path:"/settings/api-keys",component:$H}
583),e.jsx(mt,{"data-loc":"client/src/App.tsx:133",path:"/hotel/onboarding",component:EP}),e.jsx(mt,{"data-loc":"client/src/App.tsx:134",path:"/hotel/dashboard",component:kP}),e.jsx(mt,{"data-loc":"client/src/App.tsx:135",path:"/hotel/supplier/:id",component:PP}),e.jsx(mt,{"data-loc":"client/src/App.tsx:136",path:"/hotel/supplier/:id/evidence-pack",component:BP}),e.jsx(mt,{"data-loc":"client/src/App.tsx:137",path:"/hotel/invitations",component:HP}),e.jsx(mt,{"data-loc":"client/src/App.tsx:138",path:"/hotel/campaigns",component:LP}),e.jsx(mt,{"data-loc":"client/src/App.tsx:139",path:"/hotel/portfolio",component:UP}),e.jsx(mt,{"data-loc":"client/src/App.tsx:140",path:"/admin",component:$P}),e.jsx(mt,{"data-loc":"client/src/App.tsx:142",path:"/404",component:p1}),e.jsx(mt,{"data-loc":"client/src/App.tsx:143",component:p1})]})}function JH(){return e.jsx(OT,{"data-loc":"client/src/App.tsx:150",children:e.jsx(MT,{"data-loc":"client/src/App.tsx:151",defaultTheme:"light",children:e.jsxs(Th,{"data-loc":"client/src/App.tsx:152",children:[e.jsx(YR,{"data-loc":"client/src/App.tsx:153",richColors:!0,position:"top-right"}),e.jsx(YH,{"data-loc":"client/src/App.tsx:154"}),e.jsx(ZH,{"data-loc":"client/src/App.tsx:155"}),e.jsx(WH,{"data-loc":"client/src/App.tsx:156"})]})})})}const Fu=new XA,eL=["/supplier/invite/","/invite/hotel/","/invite/","/shared/","/report/","/verify/"],tL=()=>{if(typeof window>"u")return!1;const t=window.location.pathname;return eL.some(n=>t.startsWith(n))},f4=t=>{!(t instanceof Oo)||typeof window>"u"||tL()||!(t.message===OE)||(window.location.href=Xa())};Fu.getQueryCache().subscribe(t=>{if(t.type==="updated"&&t.action.type==="error"){const n=t.query.state.error;f4(n),console.error("[API Query Error]",n)}});Fu.getMutationCache().subscribe(t=>{if(t.type==="updated"&&t.action.type==="error"){const n=t.mutation.state.error;f4(n),console.error("[API Mutation Error]",n)}});const sL=ue.createClient({links:[nE({url:"/api/trpc",transformer:Qn,headers(){try{const t=sessionStorage.getItem("manus-cookie");if(t){const n=`${TE}=`,o=t.split(";").find(i=>i.trim().startsWith(n))?.trim().slice(n.length);if(o)return{Authorization:`Bearer ${o}`}}}catch{}return{}},fetch(t,n){return globalThis.fetch(t,{...n??{},credentials:"include"})}})]});zE.createRoot(document.getElementById("root")).render(e.jsx(ue.Provider,{"data-loc":"client/src/main.tsx:87",client:sL,queryClient:Fu,children:e.jsx(WA,{"data-loc":"client/src/main.tsx:88",client:Fu,children:e.jsx(JH,{"data-loc":"client/src/main.tsx:89"})})}));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.