vendor: 28,070 bytes, lines 1-9
1function $A(t,s){for(var r=0;r<s.length;r++){const l=s[r];if(typeof l!="string"&&!Array.isArray(l)){for(const c in l)if(c!=="default"&&!(c in t)){const d=Object.getOwnPropertyDescriptor(l,c);d&&Object.defineProperty(t,c,d.get?d:{enumerable:!0,get:()=>l[c]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))l(c);new MutationObserver(c=>{for(const d of c)if(d.type==="childList")for(const u of d.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&l(u)}).observe(document,{childList:!0,subtree:!0});function r(c){const d={};return c.integrity&&(d.integrity=c.integrity),c.referrerPolicy&&(d.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?d.credentials="include":c.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function l(c){if(c.ep)return;c.ep=!0;const d=r(c);fetch(c.href,d)}})();function s2(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var xf={exports:{}},oi={};/** 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 H1;function WA(){if(H1)return oi;H1=1;var t=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function r(l,c,d){var u=null;if(d!==void 0&&(u=""+d),c.key!==void 0&&(u=""+c.key),"key"in c){d={};for(var x in c)x!=="key"&&(d[x]=c[x])}else d=c;return c=d.ref,{$$typeof:t,type:l,key:u,ref:c!==void 0?c:null,props:d}}return oi.Fragment=s,oi.jsx=r,oi.jsxs=r,oi}var q1;function QA(){return q1||(q1=1,xf.exports=WA()),xf.exports}var e=QA(),eo=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(){}},GA={setTimeout:(t,s)=>setTimeout(t,s),clearTimeout:t=>clearTimeout(t),setInterval:(t,s)=>setInterval(t,s),clearInterval:t=>clearInterval(t)},VA=class{#t=GA;#e=!1;setTimeoutProvider(t){this.#t=t}setTimeout(t,s){return this.#t.setTimeout(t,s)}clearTimeout(t){this.#t.clearTimeout(t)}setInterval(t,s){return this.#t.setInterval(t,s)}clearInterval(t){this.#t.clearInterval(t)}},Ol=new VA;function KA(t){setTimeout(t,0)}var Ul=typeof window>"u"||"Deno"in globalThis;function qa(){}function YA(t,s){return typeof t=="function"?t(s):t}function ag(t){return typeof t=="number"&&t>=0&&t!==1/0}function n2(t,s){return Math.max(t+(s||0)-Date.now(),0)}function Zr(t,s){return typeof t=="function"?t(s):t}function Vs(t,s){return typeof t=="function"?t(s):t}function $1(t,s){const{type:r="all",exact:l,fetchStatus:c,predicate:d,queryKey:u,stale:x}=t;if(u){if(l){if(s.queryHash!==Yg(u,s.options))return!1}else if(!Ci(s.queryKey,u))return!1}if(r!=="all"){const p=s.isActive();if(r==="active"&&!p||r==="inactive"&&p)return!1}return!(typeof x=="boolean"&&s.isStale()!==x||c&&c!==s.state.fetchStatus||d&&!d(s))}function W1(t,s){const{exact:r,status:l,predicate:c,mutationKey:d}=t;if(d){if(!s.options.mutationKey)return!1;if(r){if(Jr(s.options.mutationKey)!==Jr(d))return!1}else if(!Ci(s.options.mutationKey,d))return!1}return!(l&&s.state.status!==l||c&&!c(s))}function Yg(t,s){return(s?.queryKeyHashFn||Jr)(t)}function Jr(t){return JSON.stringify(t,(s,r)=>sg(r)?Object.keys(r).sort().reduce((l,c)=>(l[c]=r[c],l),{}):r)}function Ci(t,s){return t===s?!0:typeof t!=typeof s?!1:t&&s&&typeof t=="object"&&typeof s=="object"?Object.keys(s).every(r=>Ci(t[r],s[r])):!1}var XA=Object.prototype.hasOwnProperty;function Xg(t,s){if(t===s)return t;const r=Q1(t)&&Q1(s);if(!r&&!(sg(t)&&sg(s)))return s;const c=(r?t:Object.keys(t)).length,d=r?s:Object.keys(s),u=d.length,x=r?new Array(u):{};let p=0;for(let g=0;g<u;g++){const b=r?g:d[g],v=t[b],y=s[b];if(v===y){x[b]=v,(r?g<c:XA.call(t,b))&&p++;continue}if(v===null||y===null||typeof v!="object"||typeof y!="object"){x[b]=y;continue}const j=Xg(v,y);x[b]=j,j===v&&p++}return c===u&&p===c?t:x}function wi(t,s){if(!s||Object.keys(t).length!==Object.keys(s).length)return!1;for(const r in t)if(t[r]!==s[r])return!1;return!0}function Q1(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function sg(t){if(!G1(t))return!1;const s=t.constructor;if(s===void 0)return!0;const r=s.prototype;return!(!G1(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function G1(t){return Object.prototype.toString.call(t)==="[object Object]"}function ZA(t){return new Promise(s=>{Ol.setTimeout(s,t)})}function ng(t,s,r){return typeof r.structuralSharing=="function"?r.structuralSharing(t,s):r.structuralSharing!==!1?Xg(t,s):s}function JA(t,s,r=0){const l=[...t,s];return r&&l.length>r?l.slice(1):l}function eS(t,s,r=0){const l=[s,...t];return r&&l.length>r?l.slice(0,-1):l}var Ls=Symbol();function r2(t,s){return!t.queryFn&&s?.initialPromise?()=>s.initialPromise:!t.queryFn||t.queryFn===Ls?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function l2(t,s){return typeof t=="function"?t(...s):!!t}var tS=class extends eo{#t;#e;#a;constructor(){super(),this.#a=t=>{if(!Ul&&window.addEventListener){const s=()=>t();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}}}onSubscribe(){this.#e||this.setEventListener(this.#a)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#a=t,this.#e?.(),this.#e=t(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()})}setFocused(t){this.#t!==t&&(this.#t=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(s=>{s(t)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},Zg=new tS;function rg(){let t,s;const r=new Promise((c,d)=>{t=c,s=d});r.status="pending",r.catch(()=>{});function l(c){Object.assign(r,c),delete r.resolve,delete r.reject}return r.resolve=c=>{l({status:"fulfilled",value:c}),t(c)},r.reject=c=>{l({status:"rejected",reason:c}),s(c)},r}var aS=KA;function sS(){let t=[],s=0,r=x=>{x()},l=x=>{x()},c=aS;const d=x=>{s?t.push(x):c(()=>{r(x)})},u=()=>{const x=t;t=[],x.length&&c(()=>{l(()=>{x.forEach(p=>{r(p)})})})};return{batch:x=>{let p;s++;try{p=x()}finally{s--,s||u()}return p},batchCalls:x=>(...p)=>{d(()=>{x(...p)})},schedule:d,setNotifyFunction:x=>{r=x},setBatchNotifyFunction:x=>{l=x},setScheduler:x=>{c=x}}}var ia=sS(),nS=class extends eo{#t=!0;#e;#a;constructor(){super(),this.#a=t=>{if(!Ul&&window.addEventListener){const s=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#e||this.setEventListener(this.#a)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#a=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 nS;function rS(t){return Math.min(1e3*2**t,3e4)}function o2(t){return(t??"online")==="online"?Wu.isOnline():!0}var lg=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function c2(t){let s=!1,r=0,l;const c=rg(),d=()=>c.status!=="pending",u=N=>{if(!d()){const w=new lg(N);y(w),t.onCancel?.(w)}},x=()=>{s=!0},p=()=>{s=!1},g=()=>Zg.isFocused()&&(t.networkMode==="always"||Wu.isOnline())&&t.canRun(),b=()=>o2(t.networkMode)&&t.canRun(),v=N=>{d()||(l?.(),c.resolve(N))},y=N=>{d()||(l?.(),c.reject(N))},j=()=>new Promise(N=>{l=w=>{(d()||g())&&N(w)},t.onPause?.()}).then(()=>{l=void 0,d()||t.onContinue?.()}),S=()=>{if(d())return;let N;const w=r===0?t.initialPromise:void 0;try{N=w??t.fn()}catch(D){N=Promise.reject(D)}Promise.resolve(N).then(v).catch(D=>{if(d())return;const k=t.retry??(Ul?0:3),A=t.retryDelay??rS,_=typeof A=="function"?A(r,D):A,E=k===!0||typeof k=="number"&&r<k||typeof k=="function"&&k(r,D);if(s||!E){y(D);return}r++,t.onFail?.(r,D),ZA(_).then(()=>g()?void 0:j()).then(()=>{s?y(D):S()})})};return{promise:c,status:()=>c.status,cancel:u,continue:()=>(l?.(),c),cancelRetry:x,continueRetry:p,canStart:b,start:()=>(b()?S():j().then(S),c)}}var i2=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ag(this.gcTime)&&(this.#t=Ol.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Ul?1/0:300*1e3))}clearGcTimeout(){this.#t&&(Ol.clearTimeout(this.#t),this.#t=void 0)}},lS=class extends i2{#t;#e;#a;#n;#s;#r;#o;constructor(t){super(),this.#o=!1,this.#r=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#n=t.client,this.#a=this.#n.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=V1(this.options),this.state=t.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#s?.promise}setOptions(t){if(this.options={...this.#r,...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=V1(this.options);s.data!==void 0&&(this.setData(s.data,{updatedAt:s.dataUpdatedAt,manual:!0}),this.#t=s)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#a.remove(this)}setData(t,s){const r=ng(this.state.data,t,this.options);return this.#l({data:r,type:"success",dataUpdatedAt:s?.updatedAt,manual:s?.manual}),r}setState(t,s){this.#l({type:"setState",state:t,setStateOptions:s})}cancel(t){const s=this.#s?.promise;return this.#s?.cancel(t),s?s.then(qa).catch(qa):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#t)}isActive(){return this.observers.some(t=>Vs(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ls||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Zr(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:!n2(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(s=>s.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#s?.continue()}onOnline(){this.observers.find(s=>s.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#s?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#a.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(s=>s!==t),this.observers.length||(this.#s&&(this.#o?this.#s.cancel({revert:!0}):this.#s.cancelRetry()),this.scheduleGc()),this.#a.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(t,s){if(this.state.fetchStatus!=="idle"&&this.#s?.status()!=="rejected"){if(this.state.data!==void 0&&s?.cancelRefetch)this.cancel({silent:!0});else if(this.#s)return this.#s.continueRetry(),this.#s.promise}if(t&&this.setOptions(t),!this.options.queryFn){const x=this.observers.find(p=>p.options.queryFn);x&&this.setOptions(x.options)}const r=new AbortController,l=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(this.#o=!0,r.signal)})},c=()=>{const x=r2(this.options,s),g=(()=>{const b={client:this.#n,queryKey:this.queryKey,meta:this.meta};return l(b),b})();return this.#o=!1,this.options.persister?this.options.persister(x,g,this):x(g)},u=(()=>{const x={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:this.#n,state:this.state,fetchFn:c};return l(x),x})();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.#s=c2({initialPromise:s?.initialPromise,fn:u.fetchFn,onCancel:x=>{x instanceof lg&&x.revert&&this.setState({...this.#e,fetchStatus:"idle"}),r.abort()},onFail:(x,p)=>{this.#l({type:"failed",failureCount:x,error:p})},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 x=await this.#s.start();if(x===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(x),this.#a.config.onSuccess?.(x,this),this.#a.config.onSettled?.(x,this.state.error,this),x}catch(x){if(x instanceof lg){if(x.silent)return this.#s.promise;if(x.revert){if(this.state.data===void 0)throw x;return this.state.data}}throw this.#l({type:"error",error:x}),this.#a.config.onError?.(x,this),this.#a.config.onSettled?.(this.state.data,x,this),x}finally{this.scheduleGc()}}#l(t){const s=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,...d2(r.data,this.options),fetchMeta:t.meta??null};case"success":const l={...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?l:void 0,l;case"error":const c=t.error;return{...r,error:c,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:c,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=s(this.state),ia.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#a.notify({query:this,type:"updated",action:t})})}};function d2(t,s){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:o2(s.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function V1(t){const s=typeof t.initialData=="function"?t.initialData():t.initialData,r=s!==void 0,l=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:s,dataUpdateCount:0,dataUpdatedAt:r?l??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Ii=class extends eo{constructor(t,s){super(),this.options=s,this.#t=t,this.#l=null,this.#o=rg(),this.bindMethods(),this.setOptions(s)}#t;#e=void 0;#a=void 0;#n=void 0;#s;#r;#o;#l;#p;#u;#x;#i;#d;#c;#f=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),K1(this.#e,this.options)?this.#m():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return og(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return og(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#y(),this.#j(),this.#e.removeObserver(this)}setOptions(t){const s=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 Vs(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#N(),this.#e.setOptions(this.options),s._defaulted&&!wi(this.options,s)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const l=this.hasListeners();l&&Y1(this.#e,r,this.options,s)&&this.#m(),this.updateResult(),l&&(this.#e!==r||Vs(this.options.enabled,this.#e)!==Vs(s.enabled,this.#e)||Zr(this.options.staleTime,this.#e)!==Zr(s.staleTime,this.#e))&&this.#g();const c=this.#h();l&&(this.#e!==r||Vs(this.options.enabled,this.#e)!==Vs(s.enabled,this.#e)||c!==this.#c)&&this.#v(c)}getOptimisticResult(t){const s=this.#t.getQueryCache().build(this.#t,t),r=this.createResult(s,t);return cS(this,r)&&(this.#n=r,this.#r=this.options,this.#s=this.#e.state),r}getCurrentResult(){return this.#n}trackResult(t,s){return new Proxy(t,{get:(r,l)=>(this.trackProp(l),s?.(l),l==="promise"&&!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(r,l))})}trackProp(t){this.#f.add(t)}getCurrentQuery(){return this.#e}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const s=this.#t.defaultQueryOptions(t),r=this.#t.getQueryCache().build(this.#t,s);return r.fetch().then(()=>this.createResult(r,s))}fetch(t){return this.#m({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#m(t){this.#N();let s=this.#e.fetch(this.options,t);return t?.throwOnError||(s=s.catch(qa)),s}#g(){this.#y();const t=Zr(this.options.staleTime,this.#e);if(Ul||this.#n.isStale||!ag(t))return;const r=n2(this.#n.dataUpdatedAt,t)+1;this.#i=Ol.setTimeout(()=>{this.#n.isStale||this.updateResult()},r)}#h(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#v(t){this.#j(),this.#c=t,!(Ul||Vs(this.options.enabled,this.#e)===!1||!ag(this.#c)||this.#c===0)&&(this.#d=Ol.setInterval(()=>{(this.options.refetchIntervalInBackground||Zg.isFocused())&&this.#m()},this.#c))}#b(){this.#g(),this.#v(this.#h())}#y(){this.#i&&(Ol.clearTimeout(this.#i),this.#i=void 0)}#j(){this.#d&&(Ol.clearInterval(this.#d),this.#d=void 0)}createResult(t,s){const r=this.#e,l=this.options,c=this.#n,d=this.#s,u=this.#r,p=t!==r?t.state:this.#a,{state:g}=t;let b={...g},v=!1,y;if(s._optimisticResults){const z=this.hasListeners(),U=!z&&K1(t,s),B=z&&Y1(t,r,s,l);(U||B)&&(b={...b,...d2(g.data,t.options)}),s._optimisticResults==="isRestoring"&&(b.fetchStatus="idle")}let{error:j,errorUpdatedAt:S,status:N}=b;y=b.data;let w=!1;if(s.placeholderData!==void 0&&y===void 0&&N==="pending"){let z;c?.isPlaceholderData&&s.placeholderData===u?.placeholderData?(z=c.data,w=!0):z=typeof s.placeholderData=="function"?s.placeholderData(this.#x?.state.data,this.#x):s.placeholderData,z!==void 0&&(N="success",y=ng(c?.data,z,s),v=!0)}if(s.select&&y!==void 0&&!w)if(c&&y===d?.data&&s.select===this.#p)y=this.#u;else try{this.#p=s.select,y=s.select(y),y=ng(c?.data,y,s),this.#u=y,this.#l=null}catch(z){this.#l=z}this.#l&&(j=this.#l,y=this.#u,S=Date.now(),N="error");const D=b.fetchStatus==="fetching",k=N==="pending",A=N==="error",_=k&&D,E=y!==void 0,R={status:N,fetchStatus:b.fetchStatus,isPending:k,isSuccess:N==="success",isError:A,isInitialLoading:_,isLoading:_,data:y,dataUpdatedAt:b.dataUpdatedAt,error:j,errorUpdatedAt:S,failureCount:b.fetchFailureCount,failureReason:b.fetchFailureReason,errorUpdateCount:b.errorUpdateCount,isFetched:b.dataUpdateCount>0||b.errorUpdateCount>0,isFetchedAfterMount:b.dataUpdateCount>p.dataUpdateCount||b.errorUpdateCount>p.errorUpdateCount,isFetching:D,isRefetching:D&&!k,isLoadingError:A&&!E,isPaused:b.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:A&&E,isStale:Jg(t,s),refetch:this.refetch,promise:this.#o,isEnabled:Vs(s.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const z=F=>{R.status==="error"?F.reject(R.error):R.data!==void 0&&F.resolve(R.data)},U=()=>{const F=this.#o=R.promise=rg();z(F)},B=this.#o;switch(B.status){case"pending":t.queryHash===r.queryHash&&z(B);break;case"fulfilled":(R.status==="error"||R.data!==B.value)&&U();break;case"rejected":(R.status!=="error"||R.error!==B.reason)&&U();break}}return R}updateResult(){const t=this.#n,s=this.createResult(this.#e,this.options);if(this.#s=this.#e.state,this.#r=this.options,this.#s.data!==void 0&&(this.#x=this.#e),wi(s,t))return;this.#n=s;const r=()=>{if(!t)return!0;const{notifyOnChangeProps:l}=this.options,c=typeof l=="function"?l():l;if(c==="all"||!c&&!this.#f.size)return!0;const d=new Set(c??this.#f);return this.options.throwOnError&&d.add("error"),Object.keys(this.#n).some(u=>{const x=u;return this.#n[x]!==t[x]&&d.has(x)})};this.#C({listeners:r()})}#N(){const t=this.#t.getQueryCache().build(this.#t,this.options);if(t===this.#e)return;const s=this.#e;this.#e=t,this.#a=t.state,this.hasListeners()&&(s?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#C(t){ia.batch(()=>{t.listeners&&this.listeners.forEach(s=>{s(this.#n)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function oS(t,s){return Vs(s.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&s.retryOnMount===!1)}function K1(t,s){return oS(t,s)||t.state.data!==void 0&&og(t,s,s.refetchOnMount)}function og(t,s,r){if(Vs(s.enabled,t)!==!1&&Zr(s.staleTime,t)!=="static"){const l=typeof r=="function"?r(t):r;return l==="always"||l!==!1&&Jg(t,s)}return!1}function Y1(t,s,r,l){return(t!==s||Vs(l.enabled,t)===!1)&&(!r.suspense||t.state.status!=="error")&&Jg(t,r)}function Jg(t,s){return Vs(s.enabled,t)!==!1&&t.isStaleByTime(Zr(s.staleTime,t))}function cS(t,s){return!wi(t.getCurrentResult(),s)}function Qu(t){return{onFetch:(s,r)=>{const l=s.options,c=s.fetchOptions?.meta?.fetchMore?.direction,d=s.state.data?.pages||[],u=s.state.data?.pageParams||[];let x={pages:[],pageParams:[]},p=0;const g=async()=>{let b=!1;const v=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(s.signal.aborted?b=!0:s.signal.addEventListener("abort",()=>{b=!0}),s.signal)})},y=r2(s.options,s.fetchOptions),j=async(S,N,w)=>{if(b)return Promise.reject();if(N==null&&S.pages.length)return Promise.resolve(S);const k=(()=>{const I={client:s.client,queryKey:s.queryKey,pageParam:N,direction:w?"backward":"forward",meta:s.options.meta};return v(I),I})(),A=await y(k),{maxPages:_}=s.options,E=w?eS:JA;return{pages:E(S.pages,A,_),pageParams:E(S.pageParams,N,_)}};if(c&&d.length){const S=c==="backward",N=S?u2:cg,w={pages:d,pageParams:u},D=N(l,w);x=await j(w,D,S)}else{const S=t??d.length;do{const N=p===0?u[0]??l.initialPageParam:cg(l,x);if(p>0&&N==null)break;x=await j(x,N),p++}while(p<S)}return x};s.options.persister?s.fetchFn=()=>s.options.persister?.(g,{client:s.client,queryKey:s.queryKey,meta:s.options.meta,signal:s.signal},r):s.fetchFn=g}}}function cg(t,{pages:s,pageParams:r}){const l=s.length-1;return s.length>0?t.getNextPageParam(s[l],s,r[l],r):void 0}function u2(t,{pages:s,pageParams:r}){return s.length>0?t.getPreviousPageParam?.(s[0],s,r[0],r):void 0}function iS(t,s){return s?cg(t,s)!=null:!1}function dS(t,s){return!s||!t.getPreviousPageParam?!1:u2(t,s)!=null}var x2=class extends Ii{constructor(t,s){super(t,s)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(t){super.setOptions({...t,behavior:Qu()})}getOptimisticResult(t){return t.behavior=Qu(),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,s){const{state:r}=t,l=super.createResult(t,s),{isFetching:c,isRefetching:d,isError:u,isRefetchError:x}=l,p=r.fetchMeta?.fetchMore?.direction,g=u&&p==="forward",b=c&&p==="forward",v=u&&p==="backward",y=c&&p==="backward";return{...l,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:iS(s,r.data),hasPreviousPage:dS(s,r.data),isFetchNextPageError:g,isFetchingNextPage:b,isFetchPreviousPageError:v,isFetchingPreviousPage:y,isRefetchError:x&&!g&&!v,isRefetching:d&&!b&&!y}}},uS=class extends i2{#t;#e;#a;#n;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#a=t.mutationCache,this.#e=[],this.state=t.state||p2(),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.#a.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(s=>s!==t),this.scheduleGc(),this.#a.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#a.remove(this))}continue(){return this.#n?.continue()??this.execute(this.state.variables)}async execute(t){const s=()=>{this.#s({type:"continue"})},r={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#n=c2({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(d,u)=>{this.#s({type:"failed",failureCount:d,error:u})},onPause:()=>{this.#s({type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#a.canRun(this)});const l=this.state.status==="pending",c=!this.#n.canStart();try{if(l)s();else{this.#s({type:"pending",variables:t,isPaused:c}),await this.#a.config.onMutate?.(t,this,r);const u=await this.options.onMutate?.(t,r);u!==this.state.context&&this.#s({type:"pending",context:u,variables:t,isPaused:c})}const d=await this.#n.start();return await this.#a.config.onSuccess?.(d,t,this.state.context,this,r),await this.options.onSuccess?.(d,t,this.state.context,r),await this.#a.config.onSettled?.(d,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(d,null,t,this.state.context,r),this.#s({type:"success",data:d}),d}catch(d){try{throw await this.#a.config.onError?.(d,t,this.state.context,this,r),await this.options.onError?.(d,t,this.state.context,r),await this.#a.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.#s({type:"error",error:d})}}finally{this.#a.runNext(this)}}#s(t){const s=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=s(this.state),ia.batch(()=>{this.#e.forEach(r=>{r.onMutationUpdate(t)}),this.#a.notify({mutation:this,type:"updated",action:t})})}};function p2(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var xS=class extends eo{constructor(t={}){super(),this.config=t,this.#t=new Set,this.#e=new Map,this.#a=0}#t;#e;#a;build(t,s,r){const l=new uS({client:t,mutationCache:this,mutationId:++this.#a,options:t.defaultMutationOptions(s),state:r});return this.add(l),l}add(t){this.#t.add(t);const s=hu(t);if(typeof s=="string"){const r=this.#e.get(s);r?r.push(t):this.#e.set(s,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#t.delete(t)){const s=hu(t);if(typeof s=="string"){const r=this.#e.get(s);if(r)if(r.length>1){const l=r.indexOf(t);l!==-1&&r.splice(l,1)}else r[0]===t&&this.#e.delete(s)}}this.notify({type:"removed",mutation:t})}canRun(t){const s=hu(t);if(typeof s=="string"){const l=this.#e.get(s)?.find(c=>c.state.status==="pending");return!l||l===t}else return!0}runNext(t){const s=hu(t);return typeof s=="string"?this.#e.get(s)?.find(l=>
9l!==t&&l.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){ia.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 s={exact:!0,...t};return this.getAll().find(r=>W1(s,r))}findAll(t={}){return this.getAll().filter(s=>W1(t,s))}notify(t){ia.batch(()=>{this.listeners.forEach(s=>{s(t)})})}resumePausedMutations(){const t=this.getAll().filter(s=>s.state.isPaused);return ia.batch(()=>Promise.all(t.map(s=>s.continue().catch(qa))))}};function hu(t){return t.options.scope?.id}var pS=class extends eo{#t;#e=void 0;#a;#n;constructor(s,r){super(),this.#t=s,this.setOptions(r),this.bindMethods(),this.#s()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(s){const r=this.options;this.options=this.#t.defaultMutationOptions(s),wi(this.options,r)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#a,observer:this}),r?.mutationKey&&this.options.mutationKey&&Jr(r.mutationKey)!==Jr(this.options.mutationKey)?this.reset():this.#a?.state.status==="pending"&&this.#a.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#a?.removeObserver(this)}onMutationUpdate(s){this.#s(),this.#r(s)}getCurrentResult(){return this.#e}reset(){this.#a?.removeObserver(this),this.#a=void 0,this.#s(),this.#r()}mutate(s,r){return this.#n=r,this.#a?.removeObserver(this),this.#a=this.#t.getMutationCache().build(this.#t,this.options),this.#a.addObserver(this),this.#a.execute(s)}#s(){const s=this.#a?.state??p2();this.#e={...s,isPending:s.status==="pending",isSuccess:s.status==="success",isError:s.status==="error",isIdle:s.status==="idle",mutate:this.mutate,reset:this.reset}}#r(s){ia.batch(()=>{if(this.#n&&this.hasListeners()){const r=this.#e.variables,l=this.#e.context,c={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};s?.type==="success"?(this.#n.onSuccess?.(s.data,r,l,c),this.#n.onSettled?.(s.data,null,r,l,c)):s?.type==="error"&&(this.#n.onError?.(s.error,r,l,c),this.#n.onSettled?.(void 0,s.error,r,l,c))}this.listeners.forEach(r=>{r(this.#e)})})}};function X1(t,s){const r=new Set(s);return t.filter(l=>!r.has(l))}function mS(t,s,r){const l=t.slice(0);return l[s]=r,l}var fS=class extends eo{#t;#e;#a;#n;#s;#r;#o;#l;#p=[];constructor(t,s,r){super(),this.#t=t,this.#n=r,this.#a=[],this.#s=[],this.#e=[],this.setQueries(s)}onSubscribe(){this.listeners.size===1&&this.#s.forEach(t=>{t.subscribe(s=>{this.#d(t,s)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#s.forEach(t=>{t.destroy()})}setQueries(t,s){this.#a=t,this.#n=s,ia.batch(()=>{const r=this.#s,l=this.#i(this.#a);this.#p=l,l.forEach(b=>b.observer.setOptions(b.defaultedQueryOptions));const c=l.map(b=>b.observer),d=c.map(b=>b.getCurrentResult()),u=r.length!==c.length,x=c.some((b,v)=>b!==r[v]),p=u||x,g=p?!0:d.some((b,v)=>{const y=this.#e[v];return!y||!wi(b,y)});!p&&!g||(p&&(this.#s=c),this.#e=d,this.hasListeners()&&(p&&(X1(r,c).forEach(b=>{b.destroy()}),X1(c,r).forEach(b=>{b.subscribe(v=>{this.#d(b,v)})})),this.#c()))})}getCurrentResult(){return this.#e}getQueries(){return this.#s.map(t=>t.getCurrentQuery())}getObservers(){return this.#s}getOptimisticResult(t,s){const r=this.#i(t),l=r.map(c=>c.observer.getOptimisticResult(c.defaultedQueryOptions));return[l,c=>this.#x(c??l,s),()=>this.#u(l,r)]}#u(t,s){return s.map((r,l)=>{const c=t[l];return r.defaultedQueryOptions.notifyOnChangeProps?c:r.observer.trackResult(c,d=>{s.forEach(u=>{u.observer.trackProp(d)})})})}#x(t,s){return s?((!this.#r||this.#e!==this.#l||s!==this.#o)&&(this.#o=s,this.#l=this.#e,this.#r=Xg(this.#r,s(t))),this.#r):t}#i(t){const s=new Map(this.#s.map(l=>[l.options.queryHash,l])),r=[];return t.forEach(l=>{const c=this.#t.defaultQueryOptions(l),d=s.get(c.queryHash);d?r.push({defaultedQueryOptions:c,observer:d}):r.push({defaultedQueryOptions:c,observer:new Ii(this.#t,c)})}),r}#d(t,s){const r=this.#s.indexOf(t);r!==-1&&(this.#e=mS(this.#e,r,s),this.#c())}#c(){if(this.hasListeners()){const t=this.#r,s=this.#u(this.#e,this.#p),r=this.#x(s,this.#n?.combine);t!==r&&ia.batch(()=>
vendor: 9,954 bytes, lines 9-17
9{this.listeners.forEach(l=>{l(this.#e)})})}}},gS=class extends eo{constructor(t={}){super(),this.config=t,this.#t=new Map}#t;build(t,s,r){const l=s.queryKey,c=s.queryHash??Yg(l,s);let d=this.get(c);return d||(d=new lS({client:t,queryKey:l,queryHash:c,options:t.defaultQueryOptions(s),state:r,defaultOptions:t.getQueryDefaults(l)}),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 s=this.#t.get(t.queryHash);s&&(t.destroy(),s===t&&this.#t.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ia.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#t.get(t)}getAll(){return[...this.#t.values()]}find(t){const s={exact:!0,...t};return this.getAll().find(r=>$1(s,r))}findAll(t={}){const s=this.getAll();return Object.keys(t).length>0?s.filter(r=>$1(t,r)):s}notify(t){ia.batch(()=>{this.listeners.forEach(s=>{s(t)})})}onFocus(){ia.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ia.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},hS=class{#t;#e;#a;#n;#s;#r;#o;#l;constructor(t={}){this.#t=t.queryCache||new gS,this.#e=t.mutationCache||new xS,this.#a=t.defaultOptions||{},this.#n=new Map,this.#s=new Map,this.#r=0}mount(){this.#r++,this.#r===1&&(this.#o=Zg.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 s=this.defaultQueryOptions({queryKey:t});return this.#t.get(s.queryHash)?.state.data}ensureQueryData(t){const s=this.defaultQueryOptions(t),r=this.#t.build(this,s),l=r.state.data;return l===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime(Zr(s.staleTime,r))&&this.prefetchQuery(s),Promise.resolve(l))}getQueriesData(t){return this.#t.findAll(t).map(({queryKey:s,state:r})=>{const l=r.data;return[s,l]})}setQueryData(t,s,r){const l=this.defaultQueryOptions({queryKey:t}),d=this.#t.get(l.queryHash)?.state.data,u=YA(s,d);if(u!==void 0)return this.#t.build(this,l).setData(u,{...r,manual:!0})}setQueriesData(t,s,r){return ia.batch(()=>this.#t.findAll(t).map(({queryKey:l})=>[l,this.setQueryData(l,s,r)]))}getQueryState(t){const s=this.defaultQueryOptions({queryKey:t});return this.#t.get(s.queryHash)?.state}removeQueries(t){const s=this.#t;ia.batch(()=>{s.findAll(t).forEach(r=>{s.remove(r)})})}resetQueries(t,s){const r=this.#t;return ia.batch(()=>(r.findAll(t).forEach(l=>{l.reset()}),this.refetchQueries({type:"active",...t},s)))}cancelQueries(t,s={}){const r={revert:!0,...s},l=ia.batch(()=>this.#t.findAll(t).map(c=>c.cancel(r)));return Promise.all(l).then(qa).catch(qa)}invalidateQueries(t,s={}){return ia.batch(()=>(this.#t.findAll(t).forEach(r=>{r.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},s)))}refetchQueries(t,s={}){const r={...s,cancelRefetch:s.cancelRefetch??!0},l=ia.batch(()=>this.#t.findAll(t).filter(c=>!c.isDisabled()&&!c.isStatic()).map(c=>{let d=c.fetch(void 0,r);return r.throwOnError||(d=d.catch(qa)),c.state.fetchStatus==="paused"?Promise.resolve():d}));return Promise.all(l).then(qa)}fetchQuery(t){const s=this.defaultQueryOptions(t);s.retry===void 0&&(s.retry=!1);const r=this.#t.build(this,s);return r.isStaleByTime(Zr(s.staleTime,r))?r.fetch(s):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(qa).catch(qa)}fetchInfiniteQuery(t){return t.behavior=Qu(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(qa).catch(qa)}ensureInfiniteQueryData(t){return t.behavior=Qu(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.#a}setDefaultOptions(t){this.#a=t}setQueryDefaults(t,s){this.#n.set(Jr(t),{queryKey:t,defaultOptions:s})}getQueryDefaults(t){const s=[...this.#n.values()],r={};return s.forEach(l=>{Ci(t,l.queryKey)&&Object.assign(r,l.defaultOptions)}),r}setMutationDefaults(t,s){this.#s.set(Jr(t),{mutationKey:t,defaultOptions:s})}getMutationDefaults(t){const s=[...this.#s.values()],r={};return s.forEach(l=>{Ci(t,l.mutationKey)&&Object.assign(r,l.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;const s={...this.#a.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return s.queryHash||(s.queryHash=Yg(s.queryKey,s)),s.refetchOnReconnect===void 0&&(s.refetchOnReconnect=s.networkMode!=="always"),s.throwOnError===void 0&&(s.throwOnError=!!s.suspense),!s.networkMode&&s.persister&&(s.networkMode="offlineFirst"),s.queryFn===Ls&&(s.enabled=!1),s}defaultMutationOptions(t){return t?._defaulted?t:{...this.#a.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#t.clear(),this.#e.clear()}},pf={exports:{}},Ye={};/** 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 Z1;function vS(){if(Z1)return Ye;Z1=1;var t=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),u=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),y=Symbol.iterator;function j(P){return P===null||typeof P!="object"?null:(P=y&&P[y]||P["@@iterator"],typeof P=="function"?P:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,w={};function D(P,J,W){this.props=P,this.context=J,this.refs=w,this.updater=W||S}D.prototype.isReactComponent={},D.prototype.setState=function(P,J){if(typeof P!="object"&&typeof P!="function"&&P!=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,P,J,"setState")},D.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function k(){}k.prototype=D.prototype;function A(P,J,W){this.props=P,this.context=J,this.refs=w,this.updater=W||S}var _=A.prototype=new k;_.constructor=A,N(_,D.prototype),_.isPureReactComponent=!0;var E=Array.isArray;function I(){}var R={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function U(P,J,W){var H=W.ref;return{$$typeof:t,type:P,key:J,ref:H!==void 0?H:null,props:W}}function B(P,J){return U(P.type,J,P.props)}function F(P){return typeof P=="object"&&P!==null&&P.$$typeof===t}function V(P){var J={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(W){return J[W]})}var de=/\/+/g;function le(P,J){return typeof P=="object"&&P!==null&&P.key!=null?V(""+P.key):J.toString(36)}function xe(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(I,I):(P.status="pending",P.then(function(J){P.status==="pending"&&(P.status="fulfilled",P.value=J)},function(J){P.status==="pending"&&(P.status="rejected",P.reason=J)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function M(P,J,W,H,te){var pe=typeof P;(pe==="undefined"||pe==="boolean")&&(P=null);var ae=!1;if(P===null)ae=!0;else switch(pe){case"bigint":case"string":case"number":ae=!0;break;case"object":switch(P.$$typeof){case t:case s:ae=!0;break;case b:return ae=P._init,M(ae(P._payload),J,W,H,te)}}if(ae)return te=te(P),ae=H===""?"."+le(P,0):H,E(te)?(W="",ae!=null&&(W=ae.replace(de,"$&/")+"/"),M(te,J,W,"",function(Ce){return Ce})):te!=null&&(F(te)&&(te=B(te,W+(te.key==null||P&&P.key===te.key?"":(""+te.key).replace(de,"$&/")+"/")+ae)),J.push(te)),1;ae=0;var Ne=H===""?".":H+":";if(E(P))for(var Se=0;Se<P.length;Se++)H=P[Se],pe=Ne+le(H,Se),ae+=M(H,J,W,pe,te);else if(Se=j(P),typeof Se=="function")for(P=Se.call(P),Se=0;!(H=P.next()).done;)H=H.value,pe=Ne+le(H,Se++),ae+=M(H,J,W,pe,te);else if(pe==="object"){if(typeof P.then=="function")return M(xe(P),J,W,H,te);throw J=String(P),Error("Objects are not valid as a React child (found: "+(J==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":J)+"). If you meant to render a collection of children, use an array instead.")}return ae}function O(P,J,W){if(P==null)return P;var H=[],te=0;return M(P,H,"","",function(pe){return J.call(W,pe,te++)}),H}function T(P){if(P._status===-1){var J=P._result;J=J(),J.then(function(W){(P._status===0||P._status===-1)&&(P._status=1,P._result=W)},function(W){(P._status===0||P._status===-1)&&(P._status=2,P._result=W)}),P._status===-1&&(P._status=0,P._result=J)}if(P._status===1)return P._result.default;throw P._result}var K=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var J=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof P=="object"&&P!==null&&typeof P.message=="string"?String(P.message):String(P),error:P});if(!window.dispatchEvent(J))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",P);return}console.error(P)},ve={map:O,forEach:function(P,J,W){O(P,function(){J.apply(this,arguments)},W)},count:function(P){var J=0;return O(P,function(){J++}),J},toArray:function(P){return O(P,function(J){return J})||[]},only:function(P){if(!F(P))throw Error("React.Children.only expected to receive a single React element child.");return P}};
17return Ye.Activity=v,Ye.Children=ve,Ye.Component=D,Ye.Fragment=r,Ye.Profiler=c,Ye.PureComponent=A,Ye.StrictMode=l,Ye.Suspense=p,Ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=R,Ye.__COMPILER_RUNTIME={__proto__:null,c:function(P){return R.H.useMemoCache(P)}},Ye.cache=function(P){return function(){return P.apply(null,arguments)}},Ye.cacheSignal=function(){return null},Ye.cloneElement=function(P,J,W){if(P==null)throw Error("The argument must be a React element, but you passed "+P+".");var H=N({},P.props),te=P.key;if(J!=null)for(pe in J.key!==void 0&&(te=""+J.key),J)!z.call(J,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&J.ref===void 0||(H[pe]=J[pe]);var pe=arguments.length-2;if(pe===1)H.children=W;else if(1<pe){for(var ae=Array(pe),Ne=0;Ne<pe;Ne++)ae[Ne]=arguments[Ne+2];H.children=ae}return U(P.type,te,H)},Ye.createContext=function(P){return P={$$typeof:u,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null},P.Provider=P,P.Consumer={$$typeof:d,_context:P},P},Ye.createElement=function(P,J,W){var H,te={},pe=null;if(J!=null)for(H in J.key!==void 0&&(pe=""+J.key),J)z.call(J,H)&&H!=="key"&&H!=="__self"&&H!=="__source"&&(te[H]=J[H]);var ae=arguments.length-2;if(ae===1)te.children=W;else if(1<ae){for(var Ne=Array(ae),Se=0;Se<ae;Se++)Ne[Se]=arguments[Se+2];te.children=Ne}if(P&&P.defaultProps)for(H in ae=P.defaultProps,ae)te[H]===void 0&&(te[H]=ae[H]);return U(P,pe,te)},Ye.createRef=function(){return{current:null}},Ye.forwardRef=function(P){return{$$typeof:x,render:P}},Ye.isValidElement=F,Ye.lazy=function(P){return{$$typeof:b,_payload:{_status:-1,_result:P},_init:T}},Ye.memo=function(P,J){return{$$typeof:g,type:P,compare:J===void 0?null:J}},Ye.startTransition=function(P){var J=R.T,W={};R.T=W;try{var H=P(),te=R.S;te!==null&&te(W,H),typeof H=="object"&&H!==null&&typeof H.then=="function"&&H.then(I,K)}catch(pe){K(pe)}finally{J!==null&&W.types!==null&&(J.types=W.types),R.T=J}},Ye.unstable_useCacheRefresh=function(){return R.H.useCacheRefresh()},Ye.use=function(P){return R.H.use(P)},Ye.useActionState=function(P,J,W){return R.H.useActionState(P,J,W)},Ye.useCallback=function(P,J){return R.H.useCallback(P,J)},Ye.useContext=function(P){return R.H.useContext(P)},Ye.useDebugValue=function(){},Ye.useDeferredValue=function(P,J){return R.H.useDeferredValue(P,J)},Ye.useEffect=function(P,J){return R.H.useEffect(P,J)},Ye.useEffectEvent=function(P){return R.H.useEffectEvent(P)},Ye.useId=function(){return R.H.useId()},Ye.useImperativeHandle=function(P,J,W){return R.H.useImperativeHandle(P,J,W)},Ye.useInsertionEffect=function(P,J){return R.H.useInsertionEffect(P,J)},Ye.useLayoutEffect=function(P,J){return R.H.useLayoutEffect(P,J)},Ye.useMemo=function(P,J){return R.H.useMemo(P,J)},Ye.useOptimistic=function(P,J){return R.H.useOptimistic(P,J)},Ye.useReducer=function(P,J,W){return R.H.useReducer(P,J,W)},Ye.useRef=function(P){return R.H.useRef(P)},Ye.useState=function(P){return R.H.useState(P)},Ye.useSyncExternalStore=function(P,J,W){return R.H.useSyncExternalStore(P,J,W)},Ye.useTransition=function(){return R.H.useTransition()},Ye.version="19.2.1",Ye}var J1;function gx(){return J1||(J1=1,pf.exports=vS()),pf.exports}var f=gx();const ye=s2(f),hx=$A({__proto__:null,default:ye},[f]);var m2=f.createContext(void 0),Bi=t=>{const s=f.useContext(m2);if(t)return t;if(!s)throw new Error("No QueryClient set, use QueryClientProvider to set one");return s},bS=({client:t,children:s})=>(f.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),e.jsx(m2.Provider,{value:t,children:s})),f2=f.createContext(!1),g2=()=>f.useContext(f2);f2.Provider;function yS(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var jS=f.createContext(yS()),h2=()=>f.useContext(jS),v2=(t,s)=>{(t.suspense||t.throwOnError||t.experimental_prefetchInRender)&&(s.isReset()||(t.retryOnMount=!1))},b2=t=>{f.useEffect(()=>{t.clearReset()},[t])},y2=({result:t,errorResetBoundary:s,throwOnError:r,query:l,suspense:c})=>t.isError&&!s.isReset()&&!t.isFetching&&l&&(c&&t.data===void 0||l2(r,[t.error,l])),eh=(t,s)=>s.state.data===void 0,j2=t=>{if(t.suspense){const r=c=>c==="static"?c:Math.max(c??1e3,1e3),l=t.staleTime;t.staleTime=typeof l=="function"?(...c)=>r(l(...c)):r(l),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},N2=(t,s)=>t.isLoading&&t.isFetching&&!s,ig=(t,s)=>t?.suspense&&s.isPending,Gu=(t,s,r)=>s.fetchOptimistic(t).catch(()=>{r.clearReset()});function C2({queries:t,...s},r){const l=Bi(r),c=g2(),d=h2(),u=f.useMemo(()=>t.map(N=>{const w=l.defaultQueryOptions(N);return w._optimisticResults=c?"isRestoring":"optimistic",w}),[t,l,c]);u.forEach(N=>{j2(N),v2(N,d)}),b2(d);const[x]=f.useState(()=>new fS(l,u,s)),[p,g,b]=x.getOptimisticResult(u,s.combine),v=!c&&s.subscribed!==!1;f.useSyncExternalStore(f.useCallback(N=>v?x.subscribe(ia.batchCalls(N)):qa,[x,v]),()=>x.getCurrentResult(),()=>x.getCurrentResult()),f.useEffect(()=>{x.setQueries(u,s)},[u,s,x]);const j=p.some((N,w)=>ig(u[w],N))?p.flatMap((N,w)=>{const D=u[w];if(D){const k=new Ii(l,D);if(ig(D,N))return Gu(D,k,d);N2(N,c)&&Gu(D,k,d)}return[]}):[];if(j.length>0)throw Promise.all(j);const S=p.find((N,w)=>{const D=u[w];return D&&y2({result:N,errorResetBoundary:d,throwOnError:D.throwOnError,query:l.getQueryCache().get(D.queryHash),suspense:D.suspense})});if(S?.error)throw S.error;return g(b())}function vx(t,s,r){const l=g2(),c=h2(),d=Bi(r),u=d.defaultQueryOptions(t);d.getDefaultOptions().queries?._experimental_beforeQuery?.(u),u._optimisticResults=l?"isRestoring":"optimistic",j2(u),v2(u,c),b2(c);const x=!d.getQueryCache().get(u.queryHash),[p]=f.useState(()=>new s(d,u)),g=p.getOptimisticResult(u),b=!l&&t.subscribed!==!1;if(f.useSyncExternalStore(f.useCallback(v=>{const y=b?p.subscribe(ia.batchCalls(v)):qa;return p.updateResult(),y},[p,b]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),f.useEffect(()=>{p.setOptions(u)}
17,[u,p]),ig(u,g))throw Gu(u,p,c);if(y2({result:g,errorResetBoundary:c,throwOnError:u.throwOnError,query:d.getQueryCache().get(u.queryHash),suspense:u.suspense}))throw g.error;return d.getDefaultOptions().queries?._experimental_afterQuery?.(u,g),u.experimental_prefetchInRender&&!Ul&&N2(g,l)&&(x?Gu(u,p,c):d.getQueryCache().get(u.queryHash)?.promise)?.catch(qa).finally(()=>{p.updateResult()}),u.notifyOnChangeProps?g:p.trackResult(g)}function NS(t,s){return vx(t,Ii,s)}function CS(t,s){return vx({...t,enabled:!0,suspense:!0,throwOnError:eh,placeholderData:void 0},Ii,s)}function wS(t,s){return vx({...t,enabled:!0,suspense:!0,throwOnError:eh},x2,s)}function AS(t,s){return C2({...t,queries:t.queries.map(r=>({...r,suspense:!0,throwOnError:eh,enabled:!0,placeholderData:void 0}))},s)}function SS(t,s){const r=Bi(s);r.getQueryState(t.queryKey)||r.prefetchQuery(t)}function ES(t,s){const r=Bi(s);r.getQueryState(t.queryKey)||r.prefetchInfiniteQuery(t)}function DS(t,s){const r=Bi(s),[l]=f.useState(()=>new pS(r,t));f.useEffect(()=>{l.setOptions(t)},[l,t]);const c=f.useSyncExternalStore(f.useCallback(u=>l.subscribe(ia.batchCalls(u)),[l]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),d=f.useCallback((u,x)=>{l.mutate(u,x).catch(qa)},[l]);if(c.error&&l2(l.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:d,mutateAsync:c.mutate}}function MS(t,s){return vx(t,x2,s)}function Il(t){return!!t&&!Array.isArray(t)&&typeof t=="object"}const LS=typeof Symbol=="function"&&!!Symbol.asyncIterator;function w2(t){return LS&&Il(t)&&Symbol.asyncIterator in t}var kS=Object.create,A2=Object.defineProperty,RS=Object.getOwnPropertyDescriptor,S2=Object.getOwnPropertyNames,TS=Object.getPrototypeOf,_S=Object.prototype.hasOwnProperty,Fi=(t,s)=>function(){return s||(0,t[S2(t)[0]])((s={exports:{}}).exports,s),s.exports},OS=(t,s,r,l)=>{if(s&&typeof s=="object"||typeof s=="function")for(var c=S2(s),d=0,u=c.length,x;d<u;d++)x=c[d],!_S.call(t,x)&&x!==r&&A2(t,x,{get:(p=>s[p]).bind(null,x),enumerable:!(l=RS(s,x))||l.enumerable});return t},bx=(t,s,r)=>(r=t!=null?kS(TS(t)):{},OS(A2(r,"default",{value:t,enumerable:!0}),t));const E2=()=>{},ey=t=>{Object.freeze&&Object.freeze(t)};function D2(t,s,r){var l;const c=s.join(".");return(l=r[c])!==null&&l!==void 0||(r[c]=new Proxy(E2,{get(d,u){if(!(typeof u!="string"||u==="then"))return D2(t,[...s,u],r)},apply(d,u,x){const p=s[s.length-1];let g={args:x,path:s};return p==="call"?g={args:x.length>=2?[x[1]]:[],path:s.slice(0,-1)}:p==="apply"&&(g={args:x.length>=2?x[1]:[],path:s.slice(0,-1)}),ey(g.args),ey(g.path),t(g)}})),r[c]}const yx=t=>D2(t,[],Object.create(null)),th=t=>new Proxy(E2,{get(s,r){if(r!=="then")return t(r)}});var M2=Fi({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(t,s){function r(l){"@babel/helpers - typeof";return s.exports=r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},s.exports.__esModule=!0,s.exports.default=s.exports,r(l)}s.exports=r,s.exports.__esModule=!0,s.exports.default=s.exports}}),PS=Fi({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(t,s){var r=M2().default;function l(c,d){if(r(c)!="object"||!c)return c;var u=c[Symbol.toPrimitive];if(u!==void 0){var x=u.call(c,d||"default");if(r(x)!="object")return x;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(c)}s.exports=l,s.exports.__esModule=!0,s.exports.default=s.exports}}),zS=Fi({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(t,s){var r=M2().default,l=PS();function c(d){var u=l(d,"string");return r(u)=="symbol"?u:u+""}s.exports=c,s.exports.__esModule=!0,s.exports.default=s.exports}}),L2=Fi({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(t,s){var r=zS();function l(c,d,u){return(d=r(d))in c?Object.defineProperty(c,d,{value:u,enumerable:!0,configurable:!0,writable:!0}):c[d]=u,c}s.exports=l,s.exports.__esModule=!0,s.exports.default=s.exports}}),ah=Fi({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(t,s){var r=L2();function l(d,u){var x=Object.keys(d);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(d);u&&(p=p.filter(function(g){return Object.getOwnPropertyDescriptor(d,g).enumerable})),x.push.apply(x,p)}return x}function c(d){for(var u=1;u<arguments.length;u++){var x=arguments[u]!=null?arguments[u]:{};
17u%2?l(Object(x),!0).forEach(function(p){r(d,p,x[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(x)):l(Object(x)).forEach(function(p){Object.defineProperty(d,p,Object.getOwnPropertyDescriptor(x,p))})}return d}s.exports=c,s.exports.__esModule=!0,s.exports.default=s.exports}});bx(ah());bx(L2());var vu=bx(ah());function US(t,s){if("error"in t){const l=s.deserialize(t.error);return{ok:!1,error:(0,vu.default)((0,vu.default)({},t),{},{error:l})}}return{ok:!0,result:(0,vu.default)((0,vu.default)({},t.result),(!t.result.type||t.result.type==="data")&&{type:"data",data:s.deserialize(t.result.data)})}}var mf=class extends Error{constructor(){super("Unable to transform response from server")}};function IS(t,s){let r;try{r=US(t,s)}catch{throw new mf}if(!r.ok&&(!Il(r.error.error)||typeof r.error.error.code!="number"))throw new mf;if(r.ok&&!Il(r.result))throw new mf;return r}bx(ah());function jx(t){const s={subscribe(r){let l=null,c=!1,d=!1,u=!1;function x(){if(l===null){u=!0;return}d||(d=!0,typeof l=="function"?l():l&&l.unsubscribe())}return l=t({next(p){var g;c||(g=r.next)===null||g===void 0||g.call(r,p)},error(p){var g;c||(c=!0,(g=r.error)===null||g===void 0||g.call(r,p),x())},complete(){var p;c||(c=!0,(p=r.complete)===null||p===void 0||p.call(r),x())}}),u&&x(),{unsubscribe:x}},pipe(...r){return r.reduce(BS,s)}};return s}function BS(t,s){return s(t)}function FS(t){const s=new AbortController;return new Promise((l,c)=>{let d=!1;function u(){d||(d=!0,x.unsubscribe())}s.signal.addEventListener("abort",()=>{c(s.signal.reason)});const x=t.subscribe({next(p){d=!0,l(p),u()},error(p){c(p)},complete(){s.abort(),u()}})})}var HS=Object.create,k2=Object.defineProperty,qS=Object.getOwnPropertyDescriptor,R2=Object.getOwnPropertyNames,$S=Object.getPrototypeOf,WS=Object.prototype.hasOwnProperty,rl=(t,s)=>function(){return s||(0,t[R2(t)[0]])((s={exports:{}}).exports,s),s.exports},QS=(t,s,r,l)=>{if(s&&typeof s=="object"||typeof s=="function")for(var c=R2(s),d=0,u=c.length,x;d<u;d++)x=c[d],!WS.call(t,x)&&x!==r&&k2(t,x,{get:(p=>s[p]).bind(null,x),enumerable:!(l=qS(s,x))||l.enumerable});return t},to=(t,s,r)=>(r=t!=null?HS($S(t)):{},QS(s||!t||!t.__esModule?k2(r,"default",{value:t,enumerable:!0}):r,t)),GS=rl({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/objectWithoutPropertiesLoose.js"(t,s){function r(l,c){if(l==null)return{};var d={};for(var u in l)if({}.hasOwnProperty.call(l,u)){if(c.includes(u))continue;d[u]=l[u]}return d}s.exports=r,s.exports.__esModule=!0,s.exports.default=s.exports}}),VS=rl({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/objectWithoutProperties.js"(t,s){var r=GS();function l(c,d){if(c==null)return{};var u,x,p=r(c,d);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(c);for(x=0;x<g.length;x++)u=g[x],d.includes(u)||{}.propertyIsEnumerable.call(c,u)&&(p[u]=c[u])}return p}s.exports=l,s.exports.__esModule=!0,s.exports.default=s.exports}}),T2=rl({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(t,s){function r(l){"@babel/helpers - typeof";return s.exports=r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},s.exports.__esModule=!0,s.exports.default=s.exports,r(l)}s.exports=r,s.exports.__esModule=!0,s.exports.default=s.exports}}),KS=rl({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(t,s){var r=T2().default;function l(c,d){if(r(c)!="object"||!c)return c;var u=c[Symbol.toPrimitive];if(u!==void 0){var x=u.call(c,d||"default");if(r(x)!="object")return x;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(c)}s.exports=l,s.exports.__esModule=!0,s.exports.default=s.exports}}),YS=rl({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(t,s){var r=T2().default,l=KS();function c(d){var u=l(d,"string");return r(u)=="symbol"?u:u+""}s.exports=c,s.exports.__esModule=!0,s.exports.default=s.exports}}),XS=rl({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/
17defineProperty.js"(t,s){var r=YS();function l(c,d,u){return(d=r(d))in c?Object.defineProperty(c,d,{value:u,enumerable:!0,configurable:!0,writable:!0}):c[d]=u,c}s.exports=l,s.exports.__esModule=!0,s.exports.default=s.exports}}),Hi=rl({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(t,s){var r=XS();function l(d,u){var x=Object.keys(d);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(d);u&&(p=p.filter(function(g){return Object.getOwnPropertyDescriptor(d,g).enumerable})),x.push.apply(x,p)}return x}function c(d){for(var u=1;u<arguments.length;u++){var x=arguments[u]!=null?arguments[u]:{};u%2?l(Object(x),!0).forEach(function(p){r(d,p,x[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(x)):l(Object(x)).forEach(function(p){Object.defineProperty(d,p,Object.getOwnPropertyDescriptor(x,p))})}return d}s.exports=c,s.exports.__esModule=!0,s.exports.default=s.exports}}),ZS=to(VS(),1),ty=to(Hi(),1);
17const JS=["cursor","direction"];function Dn(t,s,r){const l=t.flatMap(c=>c.split("."));if(!s&&(!r||r==="any"))return l.length?[l]:[];if(r==="infinite"&&Il(s)&&("direction"in s||"cursor"in s)){const{cursor:c,direction:d}=s,u=(0,ZS.default)(s,JS);return[l,{input:u,type:"infinite"}]}return[l,(0,ty.default)((0,ty.default)({},typeof s<"u"&&s!==Ls&&{input:s}),r&&r!=="any"&&{type:r})]}function zu(t){return Dn(t,void 0,"any")}var eE=Object.create,_2=Object.defineProperty,tE=Object.getOwnPropertyDescriptor,O2=Object.getOwnPropertyNames,aE=Object.getPrototypeOf,sE=Object.prototype.hasOwnProperty,_n=(t,s)=>function(){return s||(0,t[O2(t)[0]])((s={exports:{}}).exports,s),s.exports},nE=(t,s,r,l)=>{if(s&&typeof s=="object"||typeof s=="function")for(var c=O2(s),d=0,u=c.length,x;d<u;d++)x=c[d],!sE.call(t,x)&&x!==r&&_2(t,x,{get:(p=>s[p]).bind(null,x),enumerable:!(l=tE(s,x))||l.enumerable});return t},xa=(t,s,r)=>(r=t!=null?eE(aE(t)):{},nE(s||!t||!t.__esModule?_2(r,"default",{value:t,enumerable:!0}):r,t)),P2=_n({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(t,s){function r(l){"@babel/helpers - typeof";return s.exports=r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},s.exports.__esModule=!0,s.exports.default=s.exports,r(l)}s.exports=r,s.exports.__esModule=!0,s.exports.default=s.exports}}),rE=_n({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(t,s){var r=P2().default;function l(c,d){if(r(c)!="object"||!c)return c;var u=c[Symbol.toPrimitive];if(u!==void 0){var x=u.call(c,d||"default");if(r(x)!="object")return x;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(c)}s.exports=l,s.exports.__esModule=!0,s.exports.default=s.exports}}),lE=_n({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(t,s){var r=P2().default,l=rE();function c(d){var u=l(d,"string");return r(u)=="symbol"?u:u+""}s.exports=c,s.exports.__esModule=!0,s.exports.default=s.exports}}),ao=_n({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(t,s){var r=lE();function l(c,d,u){return(d=r(d))in c?Object.defineProperty(c,d,{value:u,enumerable:!0,configurable:!0,writable:!0}):c[d]=u,c}s.exports=l,s.exports.__esModule=!0,s.exports.default=s.exports}}),gn=_n({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(t,s){var r=ao();function l(d,u){var x=Object.keys(d);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(d);u&&(p=p.filter(function(g){return Object.getOwnPropertyDescriptor(d,g).enumerable})),x.push.apply(x,p)}return x}function c(d){for(var u=1;u<arguments.length;u++){var x=arguments[u]!=null?arguments[u]:{};u%2?l(Object(x),!0).forEach(function(p){r(d,p,x[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(x)):l(Object(x)).forEach(function(p){Object.defineProperty(d,p,Object.getOwnPropertyDescriptor(x,p))})}return d}s.exports=c,s.exports.__esModule=!0,s.exports.default=s.exports}});function oE(t){return s=>{let r=0,l=null;const c=[];function d(){l||(l=s.subscribe({next(x){for(const g of c){var p;(p=g.next)===null||p===void 0||p.call(g,x)}},error(x){for(const g of c){var p;(p=g.error)===null||p===void 0||p.call(g,x)}},complete(){for(const p of c){var x;(x=p.complete)===null||x===void 0||x.call(p)}}}))}function u(){if(r===0&&l){const x=l;l=null,x.unsubscribe()}}return jx(x=>(r++,c.push(x),d(),{unsubscribe(){r--,u();const p=c.findIndex(g=>g===x);p>-1&&c.splice(p,1)}}))}}function cE(t){let s=t;const r=[],l=u=>{s!==void 0&&u.next(s),r.push(u)},c=u=>{r.splice(r.indexOf(u),1)},d=jx(u=>(l(u),()=>{c(u)}));return d.next=u=>{if(s!==u){s=u;for(const x of r)x.next(u)}},d.get=()=>s,d}function iE(t){return jx(s=>{function r(c=0,d=t.op){const u=t.links[c];if(!u)throw new Error("No more links to execute - did you forget to add an ending link?");return u({op:d,next(p){return r(c+1,p)}})}return r().subscribe(s)})}var bu=xa(ao(),1),Fo=xa(gn(),1);function dE(t){return t instanceof ec}function uE(t){return Il(t)&&Il(t.error)&&typeof t.error.code=="number"&&typeof t.error.message=="string"}function xE(t,s){return typeof t=="string"?t:Il(t)&&typeof t.message=="string"?t.message:s}
17var ec=class Uu extends Error{constructor(s,r){var l,c;const d=r?.cause;super(s,{cause:d}),(0,bu.default)(this,"cause",void 0),(0,bu.default)(this,"shape",void 0),(0,bu.default)(this,"data",void 0),(0,bu.default)(this,"meta",void 0),this.meta=r?.meta,this.cause=d,this.shape=r==null||(l=r.result)===null||l===void 0?void 0:l.error,this.data=r==null||(c=r.result)===null||c===void 0?void 0:c.error.data,this.name="TRPCClientError",Object.setPrototypeOf(this,Uu.prototype)}static from(s,r={}){const l=s;return dE(l)?(r.meta&&(l.meta=(0,Fo.default)((0,Fo.default)({},l.meta),r.meta)),l):uE(l)?new Uu(l.error.message,(0,Fo.default)((0,Fo.default)({},r),{},{result:l})):new Uu(xE(l,"Unknown error"),(0,Fo.default)((0,Fo.default)({},r),{},{cause:l}))}};function pE(t){const s=t;return s?"input"in s?s:{input:s,output:s}:{input:{serialize:r=>r,deserialize:r=>r},output:{serialize:r=>r,deserialize:r=>r}}}const ay=t=>typeof t=="function";function mE(t){if(t)return t;if(typeof window<"u"&&ay(window.fetch))return window.fetch;if(typeof globalThis<"u"&&ay(globalThis.fetch))return globalThis.fetch;throw new Error("No fetch implementation found")}var fi=xa(gn());function fE(t){return{url:t.url.toString(),fetch:t.fetch,transformer:pE(t.transformer),methodOverride:t.methodOverride}}function gE(t){const s={};for(let r=0;r<t.length;r++){const l=t[r];s[r]=l}return s}const hE={query:"GET",mutation:"POST",subscription:"PATCH"};function z2(t){return"input"in t?t.transformer.input.serialize(t.input):gE(t.inputs.map(s=>t.transformer.input.serialize(s)))}const U2=t=>{const s=t.url.split("?");let l=s[0].replace(/\/$/,"")+"/"+t.path;const c=[];if(s[1]&&c.push(s[1]),"inputs"in t&&c.push("batch=1"),t.type==="query"||t.type==="subscription"){const d=z2(t);d!==void 0&&t.methodOverride!=="POST"&&c.push(`input=${encodeURIComponent(JSON.stringify(d))}`)}return c.length&&(l+="?"+c.join("&")),l},vE=t=>{if(t.type==="query"&&t.methodOverride!=="POST")return;const s=z2(t);return s!==void 0?JSON.stringify(s):void 0},bE=t=>CE((0,fi.default)((0,fi.default)({},t),{},{contentTypeHeader:"application/json",getUrl:U2,getBody:vE}));var yE=class extends Error{constructor(){const t="AbortError";super(t),this.name=t,this.message=t}};const jE=t=>{var s;if(t?.aborted)throw(s=t.throwIfAborted)===null||s===void 0||s.call(t),typeof DOMException<"u"?new DOMException("AbortError","AbortError"):new yE};async function NE(t){var s;jE(t.signal);const r=t.getUrl(t),l=t.getBody(t),c=(s=t.methodOverride)!==null&&s!==void 0?s:hE[t.type],d=await(async()=>{const x=await t.headers();return Symbol.iterator in x?Object.fromEntries(x):x})(),u=(0,fi.default)((0,fi.default)((0,fi.default)({},t.contentTypeHeader&&c!=="GET"?{"content-type":t.contentTypeHeader}:{}),t.trpcAcceptHeader?{"trpc-accept":t.trpcAcceptHeader}:void 0),d);return mE(t.fetch)(r,{method:c,signal:t.signal,body:l,headers:u})}async function CE(t){const s={},r=await NE(t);s.response=r;const l=await r.json();return s.responseJSON=l,{json:l,meta:s}}xa(gn(),1);const sy=()=>{throw new Error("Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new")};function ny(t){let s=null,r=null;const l=()=>{clearTimeout(r),r=null,s=null};function c(x){const p=[[]];let g=0;for(;;){const y=x[g];if(!y)break;const j=p[p.length-1];if(y.aborted){var b;(b=y.reject)===null||b===void 0||b.call(y,new Error("Aborted")),g++;continue}if(t.validate(j.concat(y).map(N=>N.key))){j.push(y),g++;continue}if(j.length===0){var v;(v=y.reject)===null||v===void 0||v.call(y,new Error("Input is too big for a single dispatch")),g++;continue}p.push([])}return p}function d(){const x=c(s);l();for(const p of x){if(!p.length)continue;const g={items:p};for(const v of p)v.batch=g;t.fetch(g.items.map(v=>v.key)).then(async v=>{await Promise.all(v.map(async(j,S)=>{const N=g.items[S];try{var w;const k=await Promise.resolve(j);(w=N.resolve)===null||w===void 0||w.call(N,k)}catch(k){var D;(D=N.reject)===null||D===void 0||D.call(N,k)}N.batch=null,N.reject=null,N.resolve=null}));for(const j of g.items){var y;(y=j.reject)===null||y===void 0||y.call(j,new Error("Missing result")),j.batch=null}}).catch(v=>{for(const j of g.items){var y;(y=j.reject)===null||y===void 0||y.call(j,v),j.batch=null}})}}function u(x){var p;const g={aborted:!1,key:x,batch:null,resolve:sy,reject:sy},b=new Promise((v,y)=>{var j;g.reject=y,g.resolve=v,(j=s)!==null&&j!==void 0||(s=[]),s.push(g)});return(p=r)!==null&&p!==void 0||(r=setTimeout(d)),b}return{load:u}}function wE(...t){const s=new AbortController,r=t.length;let l=0;const c=()=>{++l===r&&s.abort()};for(const d of t)d?.aborted?c():d?.addEventListener("abort",c,{once:!0});return s.signal}var yu=xa(gn(),1);function AE(t){var s,r;const l=fE(t),c=(s=t.maxURLLength)!==null&&s!==void 0?s:1/0,d=(r=t.maxItems)!==null&&r!==void 0?r:1/0;return()=>{const u=b=>({validate(v){if(c===1/0&&d===1/0)return!0;
17if(v.length>d)return!1;const y=v.map(N=>N.path).join(","),j=v.map(N=>N.input);return U2((0,yu.default)((0,yu.default)({},l),{},{type:b,path:y,inputs:j,signal:null})).length<=c},async fetch(v){const y=v.map(k=>k.path).join(","),j=v.map(k=>k.input),S=wE(...v.map(k=>k.signal)),N=await bE((0,yu.default)((0,yu.default)({},l),{},{path:y,inputs:j,type:b,headers(){return t.headers?typeof t.headers=="function"?t.headers({opList:v}):t.headers:{}},signal:S}));return(Array.isArray(N.json)?N.json:v.map(()=>N.json)).map(k=>({meta:N.meta,json:k}))}}),x=ny(u("query")),p=ny(u("mutation")),g={query:x,mutation:p};return({op:b})=>jx(v=>{/* istanbul ignore if -- @preserve */if(b.type==="subscription")throw new Error("Subscriptions are unsupported by `httpLink` - use `httpSubscriptionLink` or `wsLink`");const j=g[b.type].load(b);let S;return j.then(N=>{S=N;const w=IS(N.json,l.transformer.output);if(!w.ok){v.error(ec.from(w.error,{meta:N.meta}));return}v.next({context:N.meta,result:w.result}),v.complete()}).catch(N=>{v.error(ec.from(N,{meta:S?.meta}))}),()=>{}})}}xa(gn(),1);const I2=(t,...s)=>typeof t=="function"?t(...s):t;xa(ao(),1);function SE(){let t,s;return{promise:new Promise((l,c)=>{t=l,s=c}),resolve:t,reject:s}}async function EE(t){const s=await I2(t.url);if(!t.connectionParams)return s;const l=`${s.includes("?")?"&":"?"}connectionParams=1`;return s+l}async function DE(t){const s={method:"connectionParams",data:await I2(t)};return JSON.stringify(s)}xa(ao(),1);var Tl=xa(ao(),1);function ME(t){const{promise:s,resolve:r,reject:l}=SE();return t.addEventListener("open",()=>{t.removeEventListener("error",l),r()}),t.addEventListener("error",l),s}function LE(t,{intervalMs:s,pongTimeoutMs:r}){let l,c;function d(){l=setTimeout(()=>{t.send("PING"),c=setTimeout(()=>{t.close()},r)},s)}function u(){clearTimeout(l),d()}function x(){clearTimeout(c),u()}t.addEventListener("open",d),t.addEventListener("message",({data:p})=>{clearTimeout(l),d(),p==="PONG"&&x()}),t.addEventListener("close",()=>{clearTimeout(l),clearTimeout(c)})}var kE=class dg{constructor(s){var r;if((0,Tl.default)(this,"id",++dg.connectCount),(0,Tl.default)(this,"WebSocketPonyfill",void 0),(0,Tl.default)(this,"urlOptions",void 0),(0,Tl.default)(this,"keepAliveOpts",void 0),(0,Tl.default)(this,"wsObservable",cE(null)),(0,Tl.default)(this,"openPromise",null),this.WebSocketPonyfill=(r=s.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=s.urlOptions,this.keepAliveOpts=s.keepAlive}get ws(){return this.wsObservable.get()}set ws(s){this.wsObservable.next(s)}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 s=this;if(s.openPromise)return s.openPromise;s.id=++dg.connectCount;const r=EE(s.urlOptions).then(l=>new s.WebSocketPonyfill(l));s.openPromise=r.then(async l=>{s.ws=l,l.addEventListener("message",function({data:c}){c==="PING"&&this.send("PONG")}),s.keepAliveOpts.enabled&&LE(l,s.keepAliveOpts),l.addEventListener("close",()=>{s.ws===l&&(s.ws=null)}),await ME(l),s.urlOptions.connectionParams&&l.send(await DE(s.urlOptions.connectionParams))});try{await s.openPromise}finally{s.openPromise=null}}async close(){var s=this;try{await s.openPromise}finally{var r;(r=s.ws)===null||r===void 0||r.close()}}};(0,Tl.default)(kE,"connectCount",0);xa(ao(),1);xa(gn(),1);var ff=xa(ao(),1),ry=xa(gn(),1),Nx=class{constructor(t){(0,ff.default)(this,"links",void 0),(0,ff.default)(this,"runtime",void 0),(0,ff.default)(this,"requestId",void 0),this.requestId=0,this.runtime={},this.links=t.links.map(s=>s(this.runtime))}$request(t){var s;return iE({links:this.links,op:(0,ry.default)((0,ry.default)({},t),{},{context:(s=t.context)!==null&&s!==void 0?s:{},id:++this.requestId})}).pipe(oE())}async requestAsPromise(t){var s=this;try{const r=s.$request(t);return(await FS(r)).result.data}catch(r){throw ec.from(r)}}query(t,s,r){return this.requestAsPromise({type:"query",path:t,input:s,context:r?.context,signal:r?.signal})}mutation(t,s,r){return this.requestAsPromise({type:"mutation",path:t,input:s,context:r?.context,signal:r?.signal})}subscription(t,s,r){return this.$request({type:"subscription",path:t,input:s,context:r.context,signal:r.signal}).subscribe({next(c){switch(c.result.type){case"state":{var d;(d=r.onConnectionStateChange)===null||d===void 0||d.call(r,c.result);break}case"started":{var u;(u=r.onStarted)===null||u===void 0||u.call(r,{context:c.context});break}case"stopped":{var x;(x=r.onStopped)===null||x===void 0||x.call(r);break}case"data":case void 0:{var p;(p=r.onData)===null||p===void 0||p.call(r,c.result.data);break}}},error(c){var d;(d=r.onError)===null||d===void 0||d.call(r,c)},complete(){var c;
17(c=r.onComplete)===null||c===void 0||c.call(r)}})}};const B2=Symbol.for("trpc_untypedClient"),RE={query:"query",mutate:"mutation",subscribe:"subscription"},TE=t=>RE[t];function F2(t){const s=yx(({path:r,args:l})=>{const c=[...r],d=TE(c.pop()),u=c.join(".");return t[d](u,...l)});return th(r=>r===B2?t:s[r])}function _E(t){const s=new Nx(t);return F2(s)}function sh(t){return t[B2]}xa(gn(),1);xa(gn(),1);var OE=_n({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js"(t,s){function r(c){var d,u,x,p=2;for(typeof Symbol<"u"&&(u=Symbol.asyncIterator,x=Symbol.iterator);p--;){if(u&&(d=c[u])!=null)return d.call(c);if(x&&(d=c[x])!=null)return new l(d.call(c));u="@@asyncIterator",x="@@iterator"}throw new TypeError("Object is not async iterable")}function l(c){function d(u){if(Object(u)!==u)return Promise.reject(new TypeError(u+" is not an object."));var x=u.done;return Promise.resolve(u.value).then(function(p){return{value:p,done:x}})}return l=function(x){this.s=x,this.n=x.next},l.prototype={s:null,n:null,next:function(){return d(this.n.apply(this.s,arguments))},return:function(x){var p=this.s.return;return p===void 0?Promise.resolve({value:x,done:!0}):d(p.apply(this.s,arguments))},throw:function(x){var p=this.s.return;return p===void 0?Promise.reject(x):d(p.apply(this.s,arguments))}},new l(c)}s.exports=r,s.exports.__esModule=!0,s.exports.default=s.exports}});xa(OE(),1);xa(gn(),1);var PE=_n({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(t,s){function r(){var l=typeof SuppressedError=="function"?SuppressedError:function(x,p){var g=Error();return g.name="SuppressedError",g.error=x,g.suppressed=p,g},c={},d=[];function u(x,p){if(p!=null){if(Object(p)!==p)throw new TypeError("using declarations can only be used with objects, functions, null, or undefined.");if(x)var g=p[Symbol.asyncDispose||Symbol.for("Symbol.asyncDispose")];if(g===void 0&&(g=p[Symbol.dispose||Symbol.for("Symbol.dispose")],x))var b=g;if(typeof g!="function")throw new TypeError("Object is not disposable.");b&&(g=function(){try{b.call(p)}catch(y){return Promise.reject(y)}}),d.push({v:p,d:g,a:x})}else x&&d.push({d:p,a:x});return p}return{e:c,u:u.bind(null,!1),a:u.bind(null,!0),d:function(){var p,g=this.e,b=0;function v(){for(;p=d.pop();)try{if(!p.a&&b===1)return b=0,d.push(p),Promise.resolve().then(v);if(p.d){var j=p.d.call(p.v);if(p.a)return b|=2,Promise.resolve(j).then(v,y)}else b|=1}catch(S){return y(S)}if(b===1)return g!==c?Promise.reject(g):Promise.resolve();if(g!==c)throw g}function y(j){return g=g!==c?new l(j,g):j,v()}return v()}}}s.exports=r,s.exports.__esModule=!0,s.exports.default=s.exports}}),H2=_n({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/OverloadYield.js"(t,s){function r(l,c){this.v=l,this.k=c}s.exports=r,s.exports.__esModule=!0,s.exports.default=s.exports}}),zE=_n({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/awaitAsyncGenerator.js"(t,s){var r=H2();function l(c){return new r(c,0)}s.exports=l,s.exports.__esModule=!0,s.exports.default=s.exports}}),UE=_n({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/wrapAsyncGenerator.js"(t,s){var r=H2();function l(d){return function(){return new c(d.apply(this,arguments))}}function c(d){var u,x;function p(b,v){try{var y=d[b](v),j=y.value,S=j instanceof r;Promise.resolve(S?j.v:j).then(function(N){if(S){var w=b==="return"?"return":"next";if(!j.k||N.done)return p(w,N);N=d[w](N).value}g(y.done?"return":"normal",N)},function(N){p("throw",N)})}catch(N){g("throw",N)}}function g(b,v){switch(b){case"return":u.resolve({value:v,done:!0});break;case"throw":u.reject(v);break;default:u.resolve({value:v,done:!1})}(u=u.next)?p(u.key,u.arg):x=null}this._invoke=function(b,v){return new Promise(function(y,j){var S={key:b,arg:v,resolve:y,reject:j,next:null};x?x=x.next=S:(u=x=S,p(b,v))})},typeof d.return!="function"&&(this.return=void 0)}c.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},c.prototype.next=function(d){return this._invoke("next",d)},c.prototype.throw=function(d){return this._invoke("throw",d)},c.prototype.return=function(d){return this._invoke("return",d)},s.exports=l,s.exports.__esModule=!0,s.exports.default=s.exports}});xa(PE(),1);xa(zE(),1);xa(UE(),1);xa(gn(),1);function IE(t){return yx(({path:s,args:r})=>{var l;const c=[...s],d=c.pop();if(d==="useMutation")return t[d](c,...r);if(d==="_def")return{path:c};const[u,...x]=r,p=(l=x[0])!==null&&l!==void 0?l:{};return t[d](c,u,p)})}var gf;const BE=["client","ssrContext","ssrState","abortOnUnmount"],FE=(gf=f.createContext)===null||gf===void 0?void 0:gf.call(hx,null),HE=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"invali
17date":case"refetch":case"reset":return"any"}};function qE(t){return yx(s=>{const r=[...s.path],l=r.pop(),c=[...s.args],d=c.shift(),u=HE(l),x=Dn(r,d,u);return{infiniteQueryOptions:()=>t.infiniteQueryOptions(r,x,c[0]),queryOptions:()=>t.queryOptions(r,x,...c),fetch:()=>t.fetchQuery(x,...c),fetchInfinite:()=>t.fetchInfiniteQuery(x,c[0]),prefetch:()=>t.prefetchQuery(x,...c),prefetchInfinite:()=>t.prefetchInfiniteQuery(x,c[0]),ensureData:()=>t.ensureQueryData(x,...c),invalidate:()=>t.invalidateQueries(x,...c),reset:()=>t.resetQueries(x,...c),refetch:()=>t.refetchQueries(x,...c),cancel:()=>t.cancelQuery(x,...c),setData:()=>{t.setQueryData(x,c[0],c[1])},setQueriesData:()=>t.setQueriesData(x,c[0],c[1],c[2]),setInfiniteData:()=>{t.setInfiniteQueryData(x,c[0],c[1])},getData:()=>t.getQueryData(x),getInfiniteData:()=>t.getInfiniteQueryData(x),setMutationDefaults:()=>t.setMutationDefaults(zu(r),d),getMutationDefaults:()=>t.getMutationDefaults(zu(r)),isMutating:()=>t.isMutating({mutationKey:zu(r)})}[l]()})}function $E(t){const s=F2(t.client),r=qE(t);return th(l=>{const c=l;return c==="client"?s:BE.includes(c)?t[c]:r[l]})}var WE=to(Hi(),1);function ly(t){const s=t instanceof Nx?t:sh(t);return yx(r=>{const l=r.path,c=l.join("."),[d,u]=r.args;return(0,WE.default)({queryKey:Dn(l,d,"query"),queryFn:()=>s.query(c,d,u?.trpc)},u)})}var hf=to(Hi(),1);function Va(t,s,r){var l;const c=t[0];let d=(l=t[1])===null||l===void 0?void 0:l.input;if(r){var u;d=(0,hf.default)((0,hf.default)((0,hf.default)({},(u=d)!==null&&u!==void 0?u:{}),r.pageParam?{cursor:r.pageParam}:{}),{},{direction:r.direction})}return[c.join("."),d,s?.trpc]}var QE=rl({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js"(t,s){function r(c){var d,u,x,p=2;for(typeof Symbol<"u"&&(u=Symbol.asyncIterator,x=Symbol.iterator);p--;){if(u&&(d=c[u])!=null)return d.call(c);if(x&&(d=c[x])!=null)return new l(d.call(c));u="@@asyncIterator",x="@@iterator"}throw new TypeError("Object is not async iterable")}function l(c){function d(u){if(Object(u)!==u)return Promise.reject(new TypeError(u+" is not an object."));var x=u.done;return Promise.resolve(u.value).then(function(p){return{value:p,done:x}})}return l=function(x){this.s=x,this.n=x.next},l.prototype={s:null,n:null,next:function(){return d(this.n.apply(this.s,arguments))},return:function(x){var p=this.s.return;return p===void 0?Promise.resolve({value:x,done:!0}):d(p.apply(this.s,arguments))},throw:function(x){var p=this.s.return;return p===void 0?Promise.reject(x):d(p.apply(this.s,arguments))}},new l(c)}s.exports=r,s.exports.__esModule=!0,s.exports.default=s.exports}}),GE=to(QE(),1);function ug(t){return{path:t.path.join(".")}}function ci(t){const s=ug(t);return f.useMemo(()=>s,[s])}async function q2(t,s,r){const c=s.getQueryCache().build(s,{queryKey:r});c.setState({data:[],status:"success"});const d=[];var u=!1,x=!1,p;try{for(var g=(0,GE.default)(t),b;u=!(b=await g.next()).done;u=!1){const v=b.value;d.push(v),c.setState({data:[...d]})}}catch(v){x=!0,p=v}finally{try{u&&g.return!=null&&await g.return()}finally{if(x)throw p}}return d}var jt=to(Hi(),1);function VE(t){const{client:s,queryClient:r}=t,l=s instanceof Nx?s:sh(s);return{infiniteQueryOptions:(c,d,u)=>{var x,p;const g=((x=d[1])===null||x===void 0?void 0:x.input)===Ls,b=async v=>{var y;const j=(0,jt.default)((0,jt.default)({},u),{},{trpc:(0,jt.default)((0,jt.default)({},u?.trpc),!(u==null||(y=u.trpc)===null||y===void 0)&&y.abortOnUnmount?{signal:v.signal}:{signal:null})});return await l.query(...Va(d,j,{direction:v.direction,pageParam:v.pageParam}))};return Object.assign((0,jt.default)((0,jt.default)({},u),{},{initialData:u?.initialData,queryKey:d,queryFn:g?Ls:b,initialPageParam:(p=u?.initialCursor)!==null&&p!==void 0?p:null}),{trpc:ug({path:c})})},queryOptions:(c,d,u)=>{var x;const p=((x=d[1])===null||x===void 0?void 0:x.input)===Ls,g=async b=>{var v;const y=(0,jt.default)((0,jt.default)({},u),{},{trpc:(0,jt.default)((0,jt.default)({},u?.trpc),!(u==null||(v=u.trpc)===null||v===void 0)&&v.abortOnUnmount?{signal:b.signal}:{signal:null})}),j=await l.query(...Va(d,y));return w2(j)?q2(j,r,d):j};return Object.assign((0,jt.default)((0,jt.default)({},u),{},{initialData:u?.initialData,queryKey:d,queryFn:p?Ls:g}),{trpc:ug({path:c})})},fetchQuery:(c,d)=>r.fetchQuery((0,jt.default)((0,jt.default)({},d),{},{queryKey:c,queryFn:()=>l.query(...Va(c,d))})),fetchInfiniteQuery:(c,d)=>{var u;return r.fetchInfiniteQuery((0,jt.default)((0,jt.default)({},d),{},{queryKey:c,queryFn:({pageParam:x,direction:p})=>l.query(...Va(c,d,{pageParam:x,direction:p})),initialPageParam:(u=d?.initialCursor)!==null&&u!==void 0?u:null}))},prefetchQuery:(c,d)=>r.prefetchQuery((0,jt.default)((0,jt.default)({},d),{},{queryKey:c,queryFn:()=>l.query(...Va(c,d))})),prefetchInfiniteQuery:(c,d)=>{var u;return r.prefetchInfiniteQuery((0,jt.default)((0,jt.default)({},d),{},{queryKey:c,queryFn:({pageParam:x,direction:p})=>l.query(...Va(c,d,{pageParam:x,direction:p})),initialPageParam:(u=d?.initialCursor)!==null&&u!==void 0?u:null}))},ensureQueryData:(c,d)=>r.ensureQueryData((0,jt.default)((0,jt.default)({},d),{},{queryKey:c,queryFn:()=>l.query(...Va(c,d))})),invalidateQueries:(c,d,u)=>
17r.invalidateQueries((0,jt.default)((0,jt.default)({},d),{},{queryKey:c}),u),resetQueries:(c,d,u)=>r.resetQueries((0,jt.default)((0,jt.default)({},d),{},{queryKey:c}),u),refetchQueries:(c,d,u)=>r.refetchQueries((0,jt.default)((0,jt.default)({},d),{},{queryKey:c}),u),cancelQuery:(c,d)=>r.cancelQueries({queryKey:c},d),setQueryData:(c,d,u)=>r.setQueryData(c,d,u),setQueriesData:(c,d,u,x)=>r.setQueriesData((0,jt.default)((0,jt.default)({},d),{},{queryKey:c}),u,x),getQueryData:c=>r.getQueryData(c),setInfiniteQueryData:(c,d,u)=>r.setQueryData(c,d,u),getInfiniteQueryData:c=>r.getQueryData(c),setMutationDefaults:(c,d)=>{const u=c[0],x=p=>l.mutation(...Va([u,{input:p}],t));return r.setMutationDefaults(c,typeof d=="function"?d({canonicalMutationFn:x}):d)},getMutationDefaults:c=>r.getMutationDefaults(c),isMutating:c=>r.isMutating((0,jt.default)((0,jt.default)({},c),{},{exact:!0}))}}var De=to(Hi());const oy=(t,s)=>new Proxy(t,{get(l,c){return s(c),l[c]}});function KE(t){var s,r;const l=(s=void 0)!==null&&s!==void 0?s:E=>E.originalFn(),c=(r=void 0)!==null&&r!==void 0?r:FE,d=_E,u=E=>{var I;const{abortOnUnmount:R=!1,queryClient:z,ssrContext:U}=E,[B,F]=f.useState((I=E.ssrState)!==null&&I!==void 0?I:!1),V=E.client instanceof Nx?E.client:sh(E.client),de=f.useMemo(()=>VE({client:V,queryClient:z}),[V,z]),le=f.useMemo(()=>(0,De.default)({abortOnUnmount:R,queryClient:z,client:V,ssrContext:U??null,ssrState:B},de),[R,V,de,z,U,B]);return f.useEffect(()=>{F(xe=>xe?"mounted":!1)},[]),e.jsx(c.Provider,{value:le,children:E.children})};function x(){const E=f.useContext(c);if(!E)throw new Error("Unable to find tRPC Context. Did you forget to wrap your App inside `withTRPC` HoC?");return E}function p(E,I){var R;const{queryClient:z,ssrState:U}=x();return U&&U!=="mounted"&&((R=z.getQueryCache().find({queryKey:E}))===null||R===void 0?void 0:R.state.status)==="error"?(0,De.default)({retryOnMount:!1},I):I}function g(E,I,R){var z,U,B,F,V;const de=x(),{abortOnUnmount:le,client:xe,ssrState:M,queryClient:O,prefetchQuery:T}=de,K=Dn(E,I,"query"),ve=O.getQueryDefaults(K),P=I===Ls;typeof window>"u"&&M==="prepass"&&(R==null||(z=R.trpc)===null||z===void 0?void 0:z.ssr)!==!1&&((U=R?.enabled)!==null&&U!==void 0?U:ve?.enabled)!==!1&&!P&&!O.getQueryCache().find({queryKey:K})&&T(K,R);const J=p(K,(0,De.default)((0,De.default)({},ve),R)),W=(B=(F=R==null||(V=R.trpc)===null||V===void 0?void 0:V.abortOnUnmount)!==null&&F!==void 0?F:void 0)!==null&&B!==void 0?B:le,H=NS((0,De.default)((0,De.default)({},J),{},{queryKey:K,queryFn:P?I:async te=>{const pe=(0,De.default)((0,De.default)({},J),{},{trpc:(0,De.default)((0,De.default)({},J?.trpc),W?{signal:te.signal}:{signal:null})}),ae=await xe.query(...Va(K,pe));return w2(ae)?q2(ae,O,K):ae}}),O);return H.trpc=ci({path:E}),H}function b(E,I,R){var z,U,B;const F=x(),V=Dn(E,I,"query"),de=I===Ls,le=(z=(U=R==null||(B=R.trpc)===null||B===void 0?void 0:B.abortOnUnmount)!==null&&U!==void 0?U:void 0)!==null&&z!==void 0?z:F.abortOnUnmount;SS((0,De.default)((0,De.default)({},R),{},{queryKey:V,queryFn:de?I:xe=>{const M={trpc:(0,De.default)((0,De.default)({},R?.trpc),le?{signal:xe.signal}:{})};return F.client.query(...Va(V,M))}}))}function v(E,I,R){var z,U,B;const F=x(),V=Dn(E,I,"query"),de=(z=(U=R==null||(B=R.trpc)===null||B===void 0?void 0:B.abortOnUnmount)!==null&&U!==void 0?U:void 0)!==null&&z!==void 0?z:F.abortOnUnmount,le=CS((0,De.default)((0,De.default)({},R),{},{queryKey:V,queryFn:xe=>{const M=(0,De.default)((0,De.default)({},R),{},{trpc:(0,De.default)((0,De.default)({},R?.trpc),de?{signal:xe.signal}:{signal:null})});return F.client.query(...Va(V,M))}}),F.queryClient);return le.trpc=ci({path:E}),[le.data,le]}function y(E,I){const{client:R,queryClient:z}=x(),U=zu(E),B=z.defaultMutationOptions(z.getMutationDefaults(U)),F=DS((0,De.default)((0,De.default)({},I),{},{mutationKey:U,mutationFn:V=>R.mutation(...Va([E,{input:V}],I)),onSuccess(...V){var de,le;return l({originalFn:()=>{var M,O,T;return(M=I==null||(O=I.onSuccess)===null||O===void 0?void 0:O.call(I,...V))!==null&&M!==void 0?M:B==null||(T=B.onSuccess)===null||T===void 0?void 0:T.call(B,...V)}
17,queryClient:z,meta:(de=(le=I?.meta)!==null&&le!==void 0?le:B?.meta)!==null&&de!==void 0?de:{}})}}),z);return F.trpc=ci({path:E}),F}const j={data:void 0,error:null,status:"idle"},S={data:void 0,error:null,status:"connecting"};/* istanbul ignore next -- @preserve */function N(E,I,R){var z;const U=(z=R?.enabled)!==null&&z!==void 0?z:I!==Ls,B=Jr(Dn(E,I,"any")),{client:F}=x(),V=f.useRef(R);f.useEffect(()=>{V.current=R});const[de]=f.useState(new Set([])),le=f.useCallback(P=>{de.add(P)},[de]),xe=f.useRef(null),M=f.useCallback(P=>{const J=T.current,W=T.current=P(J);let H=!1;for(const te of de)if(J[te]!==W[te]){H=!0;break}H&&ve(oy(W,le))},[le,de]),O=f.useCallback(()=>{var P;if((P=xe.current)===null||P===void 0||P.unsubscribe(),!U){M(()=>(0,De.default)((0,De.default)({},j),{},{reset:O}));return}M(()=>(0,De.default)((0,De.default)({},S),{},{reset:O}));const J=F.subscription(E.join("."),I??void 0,{onStarted:()=>{var W,H;(W=(H=V.current).onStarted)===null||W===void 0||W.call(H),M(te=>(0,De.default)((0,De.default)({},te),{},{status:"pending",error:null}))},onData:W=>{var H,te;(H=(te=V.current).onData)===null||H===void 0||H.call(te,W),M(pe=>(0,De.default)((0,De.default)({},pe),{},{status:"pending",data:W,error:null}))},onError:W=>{var H,te;(H=(te=V.current).onError)===null||H===void 0||H.call(te,W),M(pe=>(0,De.default)((0,De.default)({},pe),{},{status:"error",error:W}))},onConnectionStateChange:W=>{M(H=>{switch(W.state){case"idle":return(0,De.default)((0,De.default)({},H),{},{status:W.state,error:null,data:void 0});case"connecting":return(0,De.default)((0,De.default)({},H),{},{error:W.error,status:W.state});case"pending":return H}})},onComplete:()=>{var W,H;(W=(H=V.current).onComplete)===null||W===void 0||W.call(H),M(te=>(0,De.default)((0,De.default)({},te),{},{status:"idle",error:null,data:void 0}))}});xe.current=J},[F,B,U,M]);f.useEffect(()=>(O(),()=>{var P;(P=xe.current)===null||P===void 0||P.unsubscribe()}),[O]);const T=f.useRef(U?(0,De.default)((0,De.default)({},S),{},{reset:O}):(0,De.default)((0,De.default)({},j),{},{reset:O})),[K,ve]=f.useState(oy(T.current,le));return K}function w(E,I,R){var z,U,B,F,V;const{client:de,ssrState:le,prefetchInfiniteQuery:xe,queryClient:M,abortOnUnmount:O}=x(),T=Dn(E,I,"infinite"),K=M.getQueryDefaults(T),ve=I===Ls;typeof window>"u"&&le==="prepass"&&(R==null||(z=R.trpc)===null||z===void 0?void 0:z.ssr)!==!1&&((U=R?.enabled)!==null&&U!==void 0?U:K?.enabled)!==!1&&!ve&&!M.getQueryCache().find({queryKey:T})&&xe(T,(0,De.default)((0,De.default)({},K),R));const P=p(T,(0,De.default)((0,De.default)({},K),R)),J=(B=R==null||(F=R.trpc)===null||F===void 0?void 0:F.abortOnUnmount)!==null&&B!==void 0?B:O,W=MS((0,De.default)((0,De.default)({},P),{},{initialPageParam:(V=R.initialCursor)!==null&&V!==void 0?V:null,persister:R.persister,queryKey:T,queryFn:ve?I:H=>{var te;const pe=(0,De.default)((0,De.default)({},P),{},{trpc:(0,De.default)((0,De.default)({},P?.trpc),J?{signal:H.signal}:{signal:null})});return de.query(...Va(T,pe,{pageParam:(te=H.pageParam)!==null&&te!==void 0?te:R.initialCursor,direction:H.direction}))}}),M);return W.trpc=ci({path:E}),W}function D(E,I,R){var z,U,B;const F=x(),V=Dn(E,I,"infinite"),de=F.queryClient.getQueryDefaults(V),le=I===Ls,xe=p(V,(0,De.default)((0,De.default)({},de),R)),M=(z=R==null||(U=R.trpc)===null||U===void 0?void 0:U.abortOnUnmount)!==null&&z!==void 0?z:F.abortOnUnmount;ES((0,De.default)((0,De.default)({},R),{},{initialPageParam:(B=R.initialCursor)!==null&&B!==void 0?B:null,queryKey:V,queryFn:le?I:O=>{var T;const K=(0,De.default)((0,De.default)({},xe),{},{trpc:(0,De.default)((0,De.default)({},xe?.trpc),M?{signal:O.signal}:{})});return F.client.query(...Va(V,K,{pageParam:(T=O.pageParam)!==null&&T!==void 0?T:R.initialCursor,direction:O.direction}))}}))}function k(E,I,R){var z,U,B;const F=x(),V=Dn(E,I,"infinite"),de=F.queryClient.getQueryDefaults(V),le=p(V,(0,De.default)((0,De.default)({},de),R)),xe=(z=R==null||(U=R.trpc)===null||U===void 0?void 0:U.abortOnUnmount)!==null&&z!==void 0?z:F.abortOnUnmount,M=wS((0,De.default)((0,De.default)({},R),{},{initialPageParam:(B=R.initialCursor)!==null&&B!==void 0?B:null,queryKey:V,queryFn:O=>{var T;const K=(0,De.default)((0,De.default)({},le),{},{trpc:(0,De.default)((0,De.default)({},le?.trpc),xe?{signal:O.signal}:{})});return F.client.query(...Va(V,K,{pageParam:(T=O.pageParam)!==null&&T!==void 0?T:R.initialCursor,direction:O.direction}))}}),F.queryClient);return M.trpc=ci({path:E}),[M.data,M]}return{Provider:u,createClient:d,useContext:x,useUtils:x,useQuery:g,usePrefetchQuery:b,useSuspenseQuery:v,useQueries:(E,I)=>{const{ssrState:R,queryClient:z,prefetchQuery:U,client:B}=x(),F=ly(B),V=E(F);if(typeof window>"u"&&R==="prepass")for(const le of V){var de;const xe=le;((de=xe.trpc)===null||de===void 0?void 0:de.ssr)!==!1&&!z.getQueryCache().find({queryKey:xe.queryKey})&&U(xe.queryKey,xe)}return C2({queries:V.map(le=>(0,De.default)((0,De.default)({},le),{},{queryKey:le.queryKey})),combine:I?.combine},z)}
vendor: 9,542 bytes, lines 17-41
17,useSuspenseQueries:E=>{const{queryClient:I,client:R}=x(),z=ly(R),U=E(z),B=AS({queries:U.map(F=>(0,De.default)((0,De.default)({},F),{},{queryFn:F.queryFn,queryKey:F.queryKey}))},I);return[B.map(F=>F.data),B]},useMutation:y,useSubscription:N,useInfiniteQuery:w,usePrefetchInfiniteQuery:D,useSuspenseInfiniteQuery:k}}function YE(t){const s=IE(t);return th(r=>r==="useContext"||r==="useUtils"?()=>{const l=t.useUtils();return f.useMemo(()=>$E(l),[l])}:t.hasOwnProperty(r)?t[r]:s[r])}function XE(t){const s=KE();return YE(s)}const Y=XE(),ZE="Please login (10001)";var vf={exports:{}},ii={},bf={exports:{}},yf={};/** 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 cy;function JE(){return cy||(cy=1,(function(t){function s(M,O){var T=M.length;M.push(O);e:for(;0<T;){var K=T-1>>>1,ve=M[K];if(0<c(ve,O))M[K]=O,M[T]=ve,T=K;else break e}}function r(M){return M.length===0?null:M[0]}function l(M){if(M.length===0)return null;var O=M[0],T=M.pop();if(T!==O){M[0]=T;e:for(var K=0,ve=M.length,P=ve>>>1;K<P;){var J=2*(K+1)-1,W=M[J],H=J+1,te=M[H];if(0>c(W,T))H<ve&&0>c(te,W)?(M[K]=te,M[H]=T,K=H):(M[K]=W,M[J]=T,K=J);else if(H<ve&&0>c(te,T))M[K]=te,M[H]=T,K=H;else break e}}return O}function c(M,O){var T=M.sortIndex-O.sortIndex;return T!==0?T:M.id-O.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,x=u.now();t.unstable_now=function(){return u.now()-x}}var p=[],g=[],b=1,v=null,y=3,j=!1,S=!1,N=!1,w=!1,D=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function _(M){for(var O=r(g);O!==null;){if(O.callback===null)l(g);else if(O.startTime<=M)l(g),O.sortIndex=O.expirationTime,s(p,O);else break;O=r(g)}}function E(M){if(N=!1,_(M),!S)if(r(p)!==null)S=!0,I||(I=!0,V());else{var O=r(g);O!==null&&xe(E,O.startTime-M)}}var I=!1,R=-1,z=5,U=-1;function B(){return w?!0:!(t.unstable_now()-U<z)}function F(){if(w=!1,I){var M=t.unstable_now();U=M;var O=!0;try{e:{S=!1,N&&(N=!1,k(R),R=-1),j=!0;var T=y;try{t:{for(_(M),v=r(p);v!==null&&!(v.expirationTime>M&&B());){var K=v.callback;if(typeof K=="function"){v.callback=null,y=v.priorityLevel;var ve=K(v.expirationTime<=M);if(M=t.unstable_now(),typeof ve=="function"){v.callback=ve,_(M),O=!0;break t}v===r(p)&&l(p),_(M)}else l(p);v=r(p)}if(v!==null)O=!0;else{var P=r(g);P!==null&&xe(E,P.startTime-M),O=!1}}break e}finally{v=null,y=T,j=!1}O=void 0}}finally{O?V():I=!1}}}var V;if(typeof A=="function")V=function(){A(F)};else if(typeof MessageChannel<"u"){var de=new MessageChannel,le=de.port2;de.port1.onmessage=F,V=function(){le.postMessage(null)}}else V=function(){D(F,0)};function xe(M,O){R=D(function(){M(t.unstable_now())},O)}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(M){M.callback=null},t.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):z=0<M?Math.floor(1e3/M):5},t.unstable_getCurrentPriorityLevel=function(){return y},t.unstable_next=function(M){switch(y){case 1:case 2:case 3:var O=3;break;default:O=y}var T=y;y=O;try{return M()}finally{y=T}},t.unstable_requestPaint=function(){w=!0},t.unstable_runWithPriority=function(M,O){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var T=y;y=M;try{return O()}finally{y=T}},t.unstable_scheduleCallback=function(M,O,T){var K=t.unstable_now();switch(typeof T=="object"&&T!==null?(T=T.delay,T=typeof T=="number"&&0<T?K+T:K):T=K,M){case 1:var ve=-1;break;case 2:ve=250;break;case 5:ve=1073741823;break;case 4:ve=1e4;break;default:ve=5e3}return ve=T+ve,M={id:b++,callback:O,priorityLevel:M,startTime:T,expirationTime:ve,sortIndex:-1},T>K?(M.sortIndex=T,s(g,M),r(p)===null&&M===r(g)&&(N?(k(R),R=-1):N=!0,xe(E,T-K))):(M.sortIndex=ve,s(p,M),S||j||(S=!0,I||(I=!0,V()))),M},t.unstable_shouldYield=B,t.unstable_wrapCallback=function(M){var O=y;return function(){var T=y;y=O;try{return M.apply(this,arguments)}finally{y=T}}}})(yf)),yf}var iy;function e6(){return iy||(iy=1,bf.exports=JE()),bf.exports}var jf={exports:{}},Ha={};/** 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 dy;function t6(){if(dy)return Ha;dy=1;var t=gx();function s(p){var g="https://react.dev/errors/"+p;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)g+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+p+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var l={d:{f:r,r:function(){throw Error(s(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},c=Symbol.for("react.portal");function d(p,g,b){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:v==null?null:""+v,children:p,containerInfo:g,implementation:b}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function x(p,g){if(p==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return Ha.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,Ha.createPortal=function(p,g){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(s(299));return d(p,g,null,b)},Ha.flushSync=function(p){var g=u.T,b=l.p;try{if(u.T=null,l.p=2,p)return p()}finally{u.T=g,l.p=b,l.d.f()}},Ha.preconnect=function(p,g){typeof p=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,l.d.C(p,g))},Ha.prefetchDNS=function(p){typeof p=="string"&&l.d.D(p)},Ha.preinit=function(p,g){if(typeof p=="string"&&g&&typeof g.as=="string"){var b=g.as,v=x(b,g.crossOrigin),y=typeof g.integrity=="string"?g.integrity:void 0,j=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;b==="style"?l.d.S(p,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:v,integrity:y,fetchPriority:j}):b==="script"&&l.d.X(p,{crossOrigin:v,integrity:y,fetchPriority:j,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},Ha.preinitModule=function(p,g){if(typeof p=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var b=x(g.as,g.crossOrigin);l.d.M(p,{crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&l.d.M(p)},Ha.preload=function(p,g){if(typeof p=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var b=g.as,v=x(b,g.crossOrigin);l.d.L(p,b,{crossOrigin:v,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},Ha.preloadModule=function(p,g){if(typeof p=="string")if(g){var b=x(g.as,g.crossOrigin);l.d.m(p,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else l.d.m(p)},Ha.requestFormReset=function(p){l.d.r(p)},Ha.unstable_batchedUpdates=function(p,g){return p(g)},Ha.useFormState=function(p,g,b){return u.H.useFormState(p,g,b)},Ha.useFormStatus=function(){return u.H.useHostTransitionStatus()},Ha.version="19.2.1",Ha}var uy;function $2(){if(uy)return jf.exports;uy=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(s){console.error(s)}}return t(),jf.exports=t6(),jf.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 xy;function a6(){if(xy)return ii;xy=1;var t=e6(),s=gx(),r=$2();function l(a){var n="https://react.dev/errors/"+a;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)n+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+a+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function d(a){var n=a,o=a;if(a.alternate)for(;n.return;)n=n.return;else{a=n;do n=a,(n.flags&4098)!==0&&(o=n.return),a=n.return;while(a)}return n.tag===3?o:null}function u(a){if(a.tag===13){var n=a.memoizedState;if(n===null&&(a=a.alternate,a!==null&&(n=a.memoizedState)),n!==null)return n.dehydrated}return null}function x(a){if(a.tag===31){var n=a.memoizedState;if(n===null&&(a=a.alternate,a!==null&&(n=a.memoizedState)),n!==null)return n.dehydrated}return null}
vendor: 10,488 bytes, lines 41-48
41function p(a){if(d(a)!==a)throw Error(l(188))}function g(a){var n=a.alternate;if(!n){if(n=d(a),n===null)throw Error(l(188));return n!==a?null:a}for(var o=a,i=n;;){var m=o.return;if(m===null)break;var h=m.alternate;if(h===null){if(i=m.return,i!==null){o=i;continue}break}if(m.child===h.child){for(h=m.child;h;){if(h===o)return p(m),a;if(h===i)return p(m),n;h=h.sibling}throw Error(l(188))}if(o.return!==i.return)o=m,i=h;else{for(var C=!1,L=m.child;L;){if(L===o){C=!0,o=m,i=h;break}if(L===i){C=!0,i=m,o=h;break}L=L.sibling}if(!C){for(L=h.child;L;){if(L===o){C=!0,o=h,i=m;break}if(L===i){C=!0,i=h,o=m;break}L=L.sibling}if(!C)throw Error(l(189))}}if(o.alternate!==i)throw Error(l(190))}if(o.tag!==3)throw Error(l(188));return o.stateNode.current===o?a:n}function b(a){var n=a.tag;if(n===5||n===26||n===27||n===6)return a;for(a=a.child;a!==null;){if(n=b(a),n!==null)return n;a=a.sibling}return null}var v=Object.assign,y=Symbol.for("react.element"),j=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),A=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),U=Symbol.for("react.activity"),B=Symbol.for("react.memo_cache_sentinel"),F=Symbol.iterator;function V(a){return a===null||typeof a!="object"?null:(a=F&&a[F]||a["@@iterator"],typeof a=="function"?a:null)}var de=Symbol.for("react.client.reference");function le(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===de?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case N:return"Fragment";case D:return"Profiler";case w:return"StrictMode";case E:return"Suspense";case I:return"SuspenseList";case U:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case S:return"Portal";case A:return a.displayName||"Context";case k:return(a._context.displayName||"Context")+".Consumer";case _:var n=a.render;return a=a.displayName,a||(a=n.displayName||n.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case R:return n=a.displayName||null,n!==null?n:le(a.type)||"Memo";case z:n=a._payload,a=a._init;try{return le(a(n))}catch{}}return null}var xe=Array.isArray,M=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,T={pending:!1,data:null,method:null,action:null},K=[],ve=-1;function P(a){return{current:a}}function J(a){0>ve||(a.current=K[ve],K[ve]=null,ve--)}function W(a,n){ve++,K[ve]=a.current,a.current=n}var H=P(null),te=P(null),pe=P(null),ae=P(null);function Ne(a,n){switch(W(pe,n),W(te,a),W(H,null),n.nodeType){case 9:case 11:a=(a=n.documentElement)&&(a=a.namespaceURI)?u1(a):0;break;default:if(a=n.tagName,n=n.namespaceURI)n=u1(n),a=x1(n,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}J(H),W(H,a)}function Se(){J(H),J(te),J(pe)}function Ce(a){a.memoizedState!==null&&W(ae,a);var n=H.current,o=x1(n,a.type);n!==o&&(W(te,a),W(H,o))}function ke(a){te.current===a&&(J(H),J(te)),ae.current===a&&(J(ae),si._currentValue=T)}var Z,fe;function Ee(a){if(Z===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);Z=n&&n[1]||"",fe=-1<o.stack.indexOf(` 42 at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return` 43`+Z+a+fe}var Ie=!1;function qe(a,n){if(!a||Ie)return"";Ie=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(n){var be=function(){throw Error()};if(Object.defineProperty(be.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(be,[])}catch(ie){var re=ie}Reflect.construct(a,[],be)}else{try{be.call()}catch(ie){re=ie}a.call(be.prototype)}}else{try{throw Error()}catch(ie){re=ie}(be=a())&&typeof be.catch=="function"&&be.catch(function(){})}}catch(ie){if(ie&&re&&typeof ie.stack=="string")return[ie.stack,re.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=i.DetermineComponentFrameRoot(),C=h[0],L=h[1];if(C&&L){var $=C.split(` 44`),ne=L.split(` 45`);for(m=i=0;i<$.length&&!$[i].includes("DetermineComponentFrameRoot");)i++;for(;m<ne.length&&!ne[m].includes("DetermineComponentFrameRoot");)m++;if(i===$.length||m===ne.length)for(i=$.length-1,m=ne.length-1;1<=i&&0<=m&&$[i]!==ne[m];)m--;for(;1<=i&&0<=m;i--,m--)if($[i]!==ne[m]){if(i!==1||m!==1)do if(i--,m--,0>m||$[i]!==ne[m]){var me=` 46`+$[i].replace(" at new "," at ");return a.displayName&&me.includes("<anonymous>")&&(me=me.replace("<anonymous>",a.displayName)),me}while(1<=i&&0<=m);break}}}finally{Ie=!1,Error.prepareStackTrace=o}return(o=a?a.displayName||a.name:"")?Ee(o):""}function Ve(a,n){switch(a.tag){case 26:case 27:case 5:return Ee(a.type);case 16:return Ee("Lazy");case 13:return a.child!==n&&n!==null?Ee("Suspense Fallback"):Ee("Suspense");case 19:return Ee("SuspenseList");case 0:case 15:return qe(a.type,!1);case 11:return qe(a.type.render,!1);case 1:return qe(a.type,!0);case 31:return Ee("Activity");default:return""}}function Ht(a){try{var n="",o=null;do n+=Ve(a,o),o=a,a=a.return;while(a);return n}catch(i){return` 47Error generating stack: `+i.message+` 48`+i.stack}}var ht=Object.prototype.hasOwnProperty,Je=t.unstable_scheduleCallback,q=t.unstable_cancelCallback,Le=t.unstable_shouldYield,Be=t.unstable_requestPaint,Pe=t.unstable_now,mt=t.unstable_getCurrentPriorityLevel,dt=t.unstable_ImmediatePriority,qt=t.unstable_UserBlockingPriority,X=t.unstable_NormalPriority,vt=t.unstable_LowPriority,et=t.unstable_IdlePriority,Ke=t.log,nt=t.unstable_setDisableYieldValue,Gt=null,Vt=null;function sa(a){if(typeof Ke=="function"&&nt(a),Vt&&typeof Vt.setStrictMode=="function")try{Vt.setStrictMode(Gt,a)}catch{}}var Kt=Math.clz32?Math.clz32:Ra,en=Math.log,ts=Math.LN2;function Ra(a){return a>>>=0,a===0?32:31-(en(a)/ts|0)|0}var as=256,$a=262144,Nt=4194304;function Et(a){var n=a&42;if(n!==0)return n;switch(a&-a){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 a&261888;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function Re(a,n,o){var i=a.pendingLanes;if(i===0)return 0;var m=0,h=a.suspendedLanes,C=a.pingedLanes;a=a.warmLanes;var L=i&134217727;return L!==0?(i=L&~h,i!==0?m=Et(i):(C&=L,C!==0?m=Et(C):o||(o=L&~a,o!==0&&(m=Et(o))))):(L=i&~h,L!==0?m=Et(L):C!==0?m=Et(C):o||(o=i&~a,o!==0&&(m=Et(o)))),m===0?0:n!==0&&n!==m&&(n&h)===0&&(h=m&-m,o=n&-n,h>=o||h===32&&(o&4194048)!==0)?n:m}function tt(a,n){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&n)===0}function ut(a,n){switch(a){case 1:case 2:case 4:case 8:case 64:return n+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 n+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 ft(){var a=Nt;return Nt<<=1,(Nt&62914560)===0&&(Nt=4194304),a}function Yt(a){for(var n=[],o=0;31>o;o++)n.push(a);return n}function rt(a,n){a.pendingLanes|=n,n!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function ot(a,n,o,i,m,h){var C=a.pendingLanes;a.pendingLanes=o,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=o,a.entangledLanes&=o,a.errorRecoveryDisabledLanes&=o,a.shellSuspendCounter=0;var L=a.entanglements,$=a.expirationTimes,ne=a.hiddenUpdates;for(o=C&~o;0<o;){var me=31-Kt(o),be=1<<me;L[me]=0,$[me]=-1;var re=ne[me];if(re!==null)for(ne[me]=null,me=0;me<re.length;me++){var ie=re[me];ie!==null&&(ie.lane&=-536870913)}o&=~be}i!==0&&na(a,i,0),h!==0&&m===0&&a.tag!==0&&(a.suspendedLanes|=h&~(C&~n))}function na(a,n,o){a.pendingLanes|=n,a.suspendedLanes&=~n;var i=31-Kt(n);a.entangledLanes|=n,a.entanglements[i]=a.entanglements[i]|1073741824|o&261930}function Ct(a,n){var o=a.entangledLanes|=n;for(a=a.entanglements;o;){var i=31-Kt(o),m=1<<i;m&n|a[i]&n&&(a[i]|=n),o&=~m}}function Rt(a,n){var o=n&-n;return o=(o&42)!==0?1:Sa(o),(o&(a.suspendedLanes|n))!==0?0:o}function Sa(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=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:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function It(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function ra(){var a=O.p;return a!==0?a:(a=window.event,a===void 0?32:O1(a.type))}function gs(a,n){var o=O.p;try{return O.p=a,n()}finally{O.p=o}}var Ea=Math.random().toString(36).slice(2),aa="__reactFiber$"+Ea,ya="__reactProps$"+Ea,Us="__reactContainer$"+Ea,gr="__reactEvents$"+Ea,lo="__reactListeners$"+Ea,dl="__reactHandles$"+Ea,bn="__reactResources$"+Ea,tn="__reactMarker$"+Ea;function yn(a){delete a[aa],delete a[ya],delete a[gr],delete a[lo],delete a[dl]}function Wa(a){var n=a[aa];if(n)return n;for(var o=a.parentNode;o;){if(n=o[Us]||o[aa]){if(o=n.alternate,n.child!==null||o!==null&&o.child!==null)for(a=b1(a);a!==null;){if(o=a[aa])return o;a=b1(a)}return n}a=o,o=a.parentNode}return null}function hs(a){if(a=a[aa]||a[Us]){var n=a.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return a}return null}function Qa(a){var n=a.tag;if(n===5||n===26||n===27||n===6)return a.stateNode;throw Error(l(33))}function Is(a){var n=a[bn];return n||(n=a[bn]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Tt(a){a[tn]=!0}var hr=new Set,vr={};function ja(a,n){Ta(a,n),Ta(a+"Capture",n)}function Ta(a,n){for(vr[a]=n,a=0;a<n.length;a++)hr.add(n[a])}var zn=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u
48037D\\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]*$"),ul={},xl={};function Un(a){return ht.call(xl,a)?!0:ht.call(ul,a)?!1:zn.test(a)?xl[a]=!0:(ul[a]=!0,!1)}function jn(a,n,o){if(Un(n))if(o===null)a.removeAttribute(n);else{switch(typeof o){case"undefined":case"function":case"symbol":a.removeAttribute(n);return;case"boolean":var i=n.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){a.removeAttribute(n);return}}a.setAttribute(n,""+o)}}function ue(a,n,o){if(o===null)a.removeAttribute(n);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(n);return}a.setAttribute(n,""+o)}}function lt(a,n,o,i){if(i===null)a.removeAttribute(o);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(o);return}a.setAttributeNS(n,o,""+i)}}function ze(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function bc(a){var n=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Q(a,n,o){var i=Object.getOwnPropertyDescriptor(a.constructor.prototype,n);if(!a.hasOwnProperty(n)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var m=i.get,h=i.set;return Object.defineProperty(a,n,{configurable:!0,get:function(){return m.call(this)},set:function(C){o=""+C,h.call(this,C)}}),Object.defineProperty(a,n,{enumerable:i.enumerable}),{getValue:function(){return o},setValue:function(C){o=""+C},stopTracking:function(){a._valueTracker=null,delete a[n]}}}}function we(a){if(!a._valueTracker){var n=bc(a)?"checked":"value";a._valueTracker=Q(a,n,""+a[n])}}
vendor: 4,820 bytes, line 48
48function la(a){if(!a)return!1;var n=a._valueTracker;if(!n)return!0;var o=n.getValue(),i="";return a&&(i=bc(a)?a.checked?"true":"false":a.value),a=i,a!==o?(n.setValue(a),!0):!1}function wt(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var pl=/[\n"\\]/g;function pa(a){return a.replace(pl,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function rp(a,n,o,i,m,h,C,L){a.name="",C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?a.type=C:a.removeAttribute("type"),n!=null?C==="number"?(n===0&&a.value===""||a.value!=n)&&(a.value=""+ze(n)):a.value!==""+ze(n)&&(a.value=""+ze(n)):C!=="submit"&&C!=="reset"||a.removeAttribute("value"),n!=null?lp(a,C,ze(n)):o!=null?lp(a,C,ze(o)):i!=null&&a.removeAttribute("value"),m==null&&h!=null&&(a.defaultChecked=!!h),m!=null&&(a.checked=m&&typeof m!="function"&&typeof m!="symbol"),L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"?a.name=""+ze(L):a.removeAttribute("name")}function rv(a,n,o,i,m,h,C,L){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(a.type=h),n!=null||o!=null){if(!(h!=="submit"&&h!=="reset"||n!=null)){we(a);return}o=o!=null?""+ze(o):"",n=n!=null?""+ze(n):o,L||n===a.value||(a.value=n),a.defaultValue=n}i=i??m,i=typeof i!="function"&&typeof i!="symbol"&&!!i,a.checked=L?a.checked:!!i,a.defaultChecked=!!i,C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"&&(a.name=C),we(a)}function lp(a,n,o){n==="number"&&wt(a.ownerDocument)===a||a.defaultValue===""+o||(a.defaultValue=""+o)}function oo(a,n,o,i){if(a=a.options,n){n={};for(var m=0;m<o.length;m++)n["$"+o[m]]=!0;for(o=0;o<a.length;o++)m=n.hasOwnProperty("$"+a[o].value),a[o].selected!==m&&(a[o].selected=m),m&&i&&(a[o].defaultSelected=!0)}else{for(o=""+ze(o),n=null,m=0;m<a.length;m++){if(a[m].value===o){a[m].selected=!0,i&&(a[m].defaultSelected=!0);return}n!==null||a[m].disabled||(n=a[m])}n!==null&&(n.selected=!0)}}function lv(a,n,o){if(n!=null&&(n=""+ze(n),n!==a.value&&(a.value=n),o==null)){a.defaultValue!==n&&(a.defaultValue=n);return}a.defaultValue=o!=null?""+ze(o):""}function ov(a,n,o,i){if(n==null){if(i!=null){if(o!=null)throw Error(l(92));if(xe(i)){if(1<i.length)throw Error(l(93));i=i[0]}o=i}o==null&&(o=""),n=o}o=ze(n),a.defaultValue=o,i=a.textContent,i===o&&i!==""&&i!==null&&(a.value=i),we(a)}function co(a,n){if(n){var o=a.firstChild;if(o&&o===a.lastChild&&o.nodeType===3){o.nodeValue=n;return}}a.textContent=n}var I4=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 cv(a,n,o){var i=n.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?i?a.setProperty(n,""):n==="float"?a.cssFloat="":a[n]="":i?a.setProperty(n,o):typeof o!="number"||o===0||I4.has(n)?n==="float"?a.cssFloat=o:a[n]=(""+o).trim():a[n]=o+"px"}function iv(a,n,o){if(n!=null&&typeof n!="object")throw Error(l(62));if(a=a.style,o!=null){for(var i in o)!o.hasOwnProperty(i)||n!=null&&n.hasOwnProperty(i)||(i.indexOf("--")===0?a.setProperty(i,""):i==="float"?a.cssFloat="":a[i]="");for(var m in n)i=n[m],n.hasOwnProperty(m)&&o[m]!==i&&cv(a,m,i)}else for(var h in n)n.hasOwnProperty(h)&&cv(a,h,n[h])}function op(a){if(a.indexOf("-")===-1)return!1;switch(a){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 B4=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"]]),F4=/^[\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 cd(a){return F4.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function In(){}var cp=null;function ip(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var io=null,uo=null;function dv(a){var n=hs(a);if(n&&(a=n.stateNode)){var o=a[ya]||null;e:switch(a=n.stateNode,n.type){case"input":if(rp(a,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),n=o.name,o.type==="radio"&&n!=null){for(o=a;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+pa(""+n)+'"][type="radio"]'),n=0;n<o.length;n++){var i=o[n];if(i!==a&&i.form===a.form){var m=i[ya]||null;if(!m)throw Error(l(90));rp(i,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name)}}for(n=0;n<o.length;n++)i=o[n],i.form===a.form&&la(i)}break e;case"textarea":lv(a,o.value,o.defaultValue);break e;case"select":n=o.value,n!=null&&oo(a,!!o.multiple,n,!1)}}}var dp=!1;function uv(a,n,o){if(dp)return a(n,o);dp=!0;try{var i=a(n);return i}finally{if(dp=!1,(io!==null||uo!==null)&&(Kd(),io&&(n=io,a=uo,uo=io=null,dv(n),a)))for(n=0;n<a.length;n++)dv(a[n])}}function yc(a,n){var o=a.stateNode;if(o===null)return null;var i=o[ya]||null;if(i===null)return null;o=i[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(a=a.type,i=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!i;break e;default:a=!1}if(a)return null;if(o&&typeof o!="function")throw Error(l(231,n,typeof o));return o}var Bn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),up=!1;if(Bn)try{var jc={};Object.defineProperty(jc,"passive",{get:function(){up=!0}}),window.addEventListener("test",jc,jc),window.removeEventListener("test",jc,jc)}catch{up=!1}var br=null,xp=null,id=null;function xv(){if(id)return id;var a,n=xp,o=n.length,i,m="value"in br?br.value:br.textContent,h=m.length;for(a=0;a<o&&n[a]===m[a];a++);var C=o-a;for(i=1;i<=C&&n[o-i]===m[h-i];i++);return id=m.slice(a,1<i?1-i:void 0)}function dd(a){var n=a.keyCode;
vendor: 2,821 bytes, line 48
48return"charCode"in a?(a=a.charCode,a===0&&n===13&&(a=13)):a=n,a===10&&(a=13),32<=a||a===13?a:0}function ud(){return!0}function pv(){return!1}function ss(a){function n(o,i,m,h,C){this._reactName=o,this._targetInst=m,this.type=i,this.nativeEvent=h,this.target=C,this.currentTarget=null;for(var L in a)a.hasOwnProperty(L)&&(o=a[L],this[L]=o?o(h):h[L]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?ud:pv,this.isPropagationStopped=pv,this}return v(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=ud)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=ud)},persist:function(){},isPersistent:ud}),n}var ml={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xd=ss(ml),Nc=v({},ml,{view:0,detail:0}),H4=ss(Nc),pp,mp,Cc,pd=v({},Nc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:gp,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==Cc&&(Cc&&a.type==="mousemove"?(pp=a.screenX-Cc.screenX,mp=a.screenY-Cc.screenY):mp=pp=0,Cc=a),pp)},movementY:function(a){return"movementY"in a?a.movementY:mp}}),mv=ss(pd),q4=v({},pd,{dataTransfer:0}),$4=ss(q4),W4=v({},Nc,{relatedTarget:0}),fp=ss(W4),Q4=v({},ml,{animationName:0,elapsedTime:0,pseudoElement:0}),G4=ss(Q4),V4=v({},ml,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),K4=ss(V4),Y4=v({},ml,{data:0}),fv=ss(Y4),X4={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Z4={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"},J4={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function e5(a){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(a):(a=J4[a])?!!n[a]:!1}function gp(){return e5}var t5=v({},Nc,{key:function(a){if(a.key){var n=X4[a.key]||a.key;if(n!=="Unidentified")return n}
vendor: 4,492 bytes, line 48
48return a.type==="keypress"?(a=dd(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?Z4[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:gp,charCode:function(a){return a.type==="keypress"?dd(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?dd(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),a5=ss(t5),s5=v({},pd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),gv=ss(s5),n5=v({},Nc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:gp}),r5=ss(n5),l5=v({},ml,{propertyName:0,elapsedTime:0,pseudoElement:0}),o5=ss(l5),c5=v({},pd,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),i5=ss(c5),d5=v({},ml,{newState:0,oldState:0}),u5=ss(d5),x5=[9,13,27,32],hp=Bn&&"CompositionEvent"in window,wc=null;Bn&&"documentMode"in document&&(wc=document.documentMode);var p5=Bn&&"TextEvent"in window&&!wc,hv=Bn&&(!hp||wc&&8<wc&&11>=wc),vv=" ",bv=!1;function yv(a,n){switch(a){case"keyup":return x5.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jv(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var xo=!1;function m5(a,n){switch(a){case"compositionend":return jv(n);case"keypress":return n.which!==32?null:(bv=!0,vv);case"textInput":return a=n.data,a===vv&&bv?null:a;default:return null}}function f5(a,n){if(xo)return a==="compositionend"||!hp&&yv(a,n)?(a=xv(),id=xp=br=null,xo=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return hv&&n.locale!=="ko"?null:n.data;default:return null}}var g5={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 Nv(a){var n=a&&a.nodeName&&a.nodeName.toLowerCase();return n==="input"?!!g5[a.type]:n==="textarea"}function Cv(a,n,o,i){io?uo?uo.push(i):uo=[i]:io=i,n=au(n,"onChange"),0<n.length&&(o=new xd("onChange","change",null,o,i),a.push({event:o,listeners:n}))}var Ac=null,Sc=null;function h5(a){r1(a,0)}function md(a){var n=Qa(a);if(la(n))return a}function wv(a,n){if(a==="change")return n}var Av=!1;if(Bn){var vp;if(Bn){var bp="oninput"in document;if(!bp){var Sv=document.createElement("div");Sv.setAttribute("oninput","return;"),bp=typeof Sv.oninput=="function"}vp=bp}else vp=!1;Av=vp&&(!document.documentMode||9<document.documentMode)}function Ev(){Ac&&(Ac.detachEvent("onpropertychange",Dv),Sc=Ac=null)}function Dv(a){if(a.propertyName==="value"&&md(Sc)){var n=[];Cv(n,Sc,a,ip(a)),uv(h5,n)}}function v5(a,n,o){a==="focusin"?(Ev(),Ac=n,Sc=o,Ac.attachEvent("onpropertychange",Dv)):a==="focusout"&&Ev()}function b5(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return md(Sc)}function y5(a,n){if(a==="click")return md(n)}function j5(a,n){if(a==="input"||a==="change")return md(n)}function N5(a,n){return a===n&&(a!==0||1/a===1/n)||a!==a&&n!==n}var vs=typeof Object.is=="function"?Object.is:N5;function Ec(a,n){if(vs(a,n))return!0;if(typeof a!="object"||a===null||typeof n!="object"||n===null)return!1;var o=Object.keys(a),i=Object.keys(n);if(o.length!==i.length)return!1;for(i=0;i<o.length;i++){var m=o[i];if(!ht.call(n,m)||!vs(a[m],n[m]))return!1}return!0}function Mv(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function Lv(a,n){var o=Mv(a);a=0;for(var i;o;){if(o.nodeType===3){if(i=a+o.textContent.length,a<=n&&i>=n)return{node:o,offset:n-a};a=i}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Mv(o)}}function kv(a,n){return a&&n?a===n?!0:a&&a.nodeType===3?!1:n&&n.nodeType===3?kv(a,n.parentNode):"contains"in a?a.contains(n):a.compareDocumentPosition?!!(a.compareDocumentPosition(n)&16):!1:!1}function Rv(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var n=wt(a.document);n instanceof a.HTMLIFrameElement;){try{var o=typeof n.contentWindow.location.href=="string"}catch{o=!1}
vendor: 19,779 bytes, line 48
48if(o)a=n.contentWindow;else break;n=wt(a.document)}return n}function yp(a){var n=a&&a.nodeName&&a.nodeName.toLowerCase();return n&&(n==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||n==="textarea"||a.contentEditable==="true")}var C5=Bn&&"documentMode"in document&&11>=document.documentMode,po=null,jp=null,Dc=null,Np=!1;function Tv(a,n,o){var i=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Np||po==null||po!==wt(i)||(i=po,"selectionStart"in i&&yp(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),Dc&&Ec(Dc,i)||(Dc=i,i=au(jp,"onSelect"),0<i.length&&(n=new xd("onSelect","select",null,n,o),a.push({event:n,listeners:i}),n.target=po)))}function fl(a,n){var o={};return o[a.toLowerCase()]=n.toLowerCase(),o["Webkit"+a]="webkit"+n,o["Moz"+a]="moz"+n,o}var mo={animationend:fl("Animation","AnimationEnd"),animationiteration:fl("Animation","AnimationIteration"),animationstart:fl("Animation","AnimationStart"),transitionrun:fl("Transition","TransitionRun"),transitionstart:fl("Transition","TransitionStart"),transitioncancel:fl("Transition","TransitionCancel"),transitionend:fl("Transition","TransitionEnd")},Cp={},_v={};Bn&&(_v=document.createElement("div").style,"AnimationEvent"in window||(delete mo.animationend.animation,delete mo.animationiteration.animation,delete mo.animationstart.animation),"TransitionEvent"in window||delete mo.transitionend.transition);function gl(a){if(Cp[a])return Cp[a];if(!mo[a])return a;var n=mo[a],o;for(o in n)if(n.hasOwnProperty(o)&&o in _v)return Cp[a]=n[o];return a}var Ov=gl("animationend"),Pv=gl("animationiteration"),zv=gl("animationstart"),w5=gl("transitionrun"),A5=gl("transitionstart"),S5=gl("transitioncancel"),Uv=gl("transitionend"),Iv=new Map,wp="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(" ");wp.push("scrollEnd");function an(a,n){Iv.set(a,n),ja(n,[a])}var fd=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)},Bs=[],fo=0,Ap=0;function gd(){for(var a=fo,n=Ap=fo=0;n<a;){var o=Bs[n];Bs[n++]=null;var i=Bs[n];Bs[n++]=null;var m=Bs[n];Bs[n++]=null;var h=Bs[n];if(Bs[n++]=null,i!==null&&m!==null){var C=i.pending;C===null?m.next=m:(m.next=C.next,C.next=m),i.pending=m}h!==0&&Bv(o,m,h)}}function hd(a,n,o,i){Bs[fo++]=a,Bs[fo++]=n,Bs[fo++]=o,Bs[fo++]=i,Ap|=i,a.lanes|=i,a=a.alternate,a!==null&&(a.lanes|=i)}function Sp(a,n,o,i){return hd(a,n,o,i),vd(a)}function hl(a,n){return hd(a,null,null,n),vd(a)}function Bv(a,n,o){a.lanes|=o;var i=a.alternate;i!==null&&(i.lanes|=o);for(var m=!1,h=a.return;h!==null;)h.childLanes|=o,i=h.alternate,i!==null&&(i.childLanes|=o),h.tag===22&&(a=h.stateNode,a===null||a._visibility&1||(m=!0)),a=h,h=h.return;return a.tag===3?(h=a.stateNode,m&&n!==null&&(m=31-Kt(o),a=h.hiddenUpdates,i=a[m],i===null?a[m]=[n]:i.push(n),n.lane=o|536870912),h):null}function vd(a){if(50<Yc)throw Yc=0,Om=null,Error(l(185));for(var n=a.return;n!==null;)a=n,n=a.return;return a.tag===3?a.stateNode:null}var go={};function E5(a,n,o,i){this.tag=a,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function bs(a,n,o,i){return new E5(a,n,o,i)}function Ep(a){return a=a.prototype,!(!a||!a.isReactComponent)}function Fn(a,n){var o=a.alternate;return o===null?(o=bs(a.tag,n,a.key,a.mode),o.elementType=a.elementType,o.type=a.type,o.stateNode=a.stateNode,o.alternate=a,a.alternate=o):(o.pendingProps=n,o.type=a.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=a.flags&65011712,o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,n=a.dependencies,o.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},o.sibling=a.sibling,o.index=a.index,o.ref=a.ref,o.refCleanup=a.refCleanup,o}function Fv(a,n){a.flags&=65011714;var o=a.alternate;return o===null?(a.childLanes=0,a.lanes=n,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=o.childLanes,a.lanes=o.lanes,a.child=o.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=o.memoizedProps,a.memoizedState=o.memoizedState,a.updateQueue=o.updateQueue,a.type=o.type,n=o.dependencies,a.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),a}function bd(a,n,o,i,m,h){var C=0;if(i=a,typeof a=="function")Ep(a)&&(C=1);else if(typeof a=="string")C=RA(a,o,H.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case U:return a=bs(31,o,n,m),a.elementType=U,a.lanes=h,a;case N:return vl(o.children,m,h,n);case w:C=8,m|=24;break;case D:return a=bs(12,o,n,m|2),a.elementType=D,a.lanes=h,a;case E:return a=bs(13,o,n,m),a.elementType=E,a.lanes=h,a;case I:return a=bs(19,o,n,m),a.elementType=I,a.lanes=h,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case A:C=10;break e;case k:C=9;break e;case _:C=11;break e;case R:C=14;break e;case z:C=16,i=null;break e}C=29,o=Error(l(130,a===null?"null":typeof a,"")),i=null}return n=bs(C,o,n,m),n.elementType=a,n.type=i,n.lanes=h,n}function vl(a,n,o,i){return a=bs(7,a,i,n),a.lanes=o,a}function Dp(a,n,o){return a=bs(6,a,null,n),a.lanes=o,a}function Hv(a){var n=bs(18,null,null,0);return n.stateNode=a,n}function Mp(a,n,o){return n=bs(4,a.children!==null?a.children:[],a.key,n),n.lanes=o,n.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},n}var qv=new WeakMap;function Fs(a,n){if(typeof a=="object"&&a!==null){var o=qv.get(a);return o!==void 0?o:(n={value:a,source:n,stack:Ht(n)},qv.set(a,n),n)}return{value:a,source:n,stack:Ht(n)}}var ho=[],vo=0,yd=null,Mc=0,Hs=[],qs=0,yr=null,Nn=1,Cn="";function Hn(a,n){ho[vo++]=Mc,ho[vo++]=yd,yd=a,Mc=n}function $v(a,n,o){Hs[qs++]=Nn,Hs[qs++]=Cn,Hs[qs++]=yr,yr=a;var i=Nn;a=Cn;var m=32-Kt(i)-1;i&=~(1<<m),o+=1;var h=32-Kt(n)+m;if(30<h){var C=m-m%5;h=(i&(1<<C)-1).toString(32),i>>=C,m-=C,Nn=1<<32-Kt(n)+m|o<<m|i,Cn=h+a}else Nn=1<<h|o<<m|i,Cn=a}function Lp(a){a.return!==null&&(Hn(a,1),$v(a,1,0))}function kp(a){for(;a===yd;)yd=ho[--vo],ho[vo]=null,Mc=ho[--vo],ho[vo]=null;for(;a===yr;)yr=Hs[--qs],Hs[qs]=null,Cn=Hs[--qs],Hs[qs]=null,Nn=Hs[--qs],Hs[qs]=null}function Wv(a,n){Hs[qs++]=Nn,Hs[qs++]=Cn,Hs[qs++]=yr,Nn=n.id,Cn=n.overflow,yr=a}var _a=null,Xt=null,gt=!1,jr=null,$s=!1,Rp=Error(l(519));function Nr(a){var n=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Lc(Fs(n,a)),Rp}function Qv(a){var n=a.stateNode,o=a.type,i=a.memoizedProps;switch(n[aa]=a,n[ya]=i,o){case"dialog":it("cancel",n),it("close",n);break;case"iframe":case"object":case"embed":it("load",n);break;case"video":case"audio":for(o=0;o<Zc.length;o++)it(Zc[o],n);break;case"source":it("error",n);break;case"img":case"image":case"link":it("error",n),it("load",n);break;case"details":it("toggle",n);break;case"input":it("invalid",n),rv(n,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0);break;case"select":it("invalid",n);break;case"textarea":it("invalid",n),ov(n,i.value,i.defaultValue,i.children)}o=i.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||n.textContent===""+o||i.suppressHydrationWarning===!0||i1(n.textContent,o)?(i.popover!=null&&(it("beforetoggle",n),it("toggle",n)),i.onScroll!=null&&it("scroll",n),i.onScrollEnd!=null&&it("scrollend",n),i.onClick!=null&&(n.onclick=In),n=!0):n=!1,n||Nr(a,!0)}function Gv(a){for(_a=a.return;_a;)switch(_a.tag){case 5:case 31:case 13:$s=!1;return;case 27:case 3:$s=!0;return;default:_a=_a.return}}function bo(a){if(a!==_a)return!1;if(!gt)return Gv(a),gt=!0,!1;var n=a.tag,o;if((o=n!==3&&n!==27)&&((o=n===5)&&(o=a.type,o=!(o!=="form"&&o!=="button")||Ym(a.type,a.memoizedProps)),o=!o),o&&Xt&&Nr(a),Gv(a),n===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(l(317));Xt=v1(a)}else if(n===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(l(317));Xt=v1(a)}else n===27?(n=Xt,Pr(a.type)?(a=tf,tf=null,Xt=a):Xt=n):Xt=_a?Qs(a.stateNode.nextSibling):null;return!0}function bl(){Xt=_a=null,gt=!1}function Tp(){var a=jr;return a!==null&&(os===null?os=a:os.push.apply(os,a),jr=null),a}function Lc(a){jr===null?jr=[a]:jr.push(a)}var _p=P(null),yl=null,qn=null;function Cr(a,n,o){W(_p,n._currentValue),n._currentValue=o}function $n(a){a._currentValue=_p.current,J(_p)}function Op(a,n,o){for(;a!==null;){var i=a.alternate;if((a.childLanes&n)!==n?(a.childLanes|=n,i!==null&&(i.childLanes|=n)):i!==null&&(i.childLanes&n)!==n&&(i.childLanes|=n),a===o)break;a=a.return}}function Pp(a,n,o,i){var m=a.child;for(m!==null&&(m.return=a);m!==null;){var h=m.dependencies;if(h!==null){var C=m.child;h=h.firstContext;e:for(;h!==null;){var L=h;h=m;for(var $=0;$<n.length;$++)if(L.context===n[$]){h.lanes|=o,L=h.alternate,L!==null&&(L.lanes|=o),Op(h.return,o,a),i||(C=null);break e}h=L.next}}else if(m.tag===18){if(C=m.return,C===null)throw Error(l(341));C.lanes|=o,h=C.alternate,h!==null&&(h.lanes|=o),Op(C,o,a),C=null}else C=m.child;if(C!==null)C.return=m;else for(C=m;C!==null;){if(C===a){C=null;break}if(m=C.sibling,m!==null){m.return=C.return,C=m;break}C=C.return}m=C}}function yo(a,n,o,i){a=null;for(var m=n,h=!1;m!==null;){if(!h){if((m.flags&524288)!==0)h=!0;else if((m.flags&262144)!==0)break}if(m.tag===10){var C=m.alternate;if(C===null)throw Error(l(387));if(C=C.memoizedProps,C!==null){var L=m.type;vs(m.pendingProps.value,C.value)||(a!==null?a.push(L):a=[L])}}else if(m===ae.current){if(C=m.alternate,C===null)throw Error(l(387));C.memoizedState.memoizedState!==m.memoizedState.memoizedState&&(a!==null?a.push(si):a=[si])}m=m.return}a!==null&&Pp(n,a,o,i),n.flags|=262144}function jd(a){for(a=a.firstContext;a!==null;){if(!vs(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function jl(a){yl=a,qn=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function Oa(a){return Vv(yl,a)}function Nd(a,n){return yl===null&&jl(a),Vv(a,n)}function Vv(a,n){var o=n._currentValue;if(n={context:n,memoizedValue:o,next:null},qn===null){if(a===null)throw Error(l(308));qn=n,a.dependencies={lanes:0,firstContext:n},a.flags|=524288}else qn=qn.next=n;return o}var D5=typeof AbortController<"u"?AbortController:function(){var a=[],n=this.signal={aborted:!1,addEventListener:function(o,i){a.push(i)}};this.abort=function(){n.aborted=!0,a.forEach(function(o){return o()})}},M5=t.unstable_scheduleCallback,L5=t.unstable_NormalPriority,ma={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zp(){return{controller:new D5,data:new Map,refCount:0}}function kc(a){a.refCount--,a.refCount===0&&M5(L5,function(){a.controller.abort()})}var Rc=null,Up=0,jo=0,No=null;function k5(a,n){if(Rc===null){var o=Rc=[];Up=0,jo=Fm(),No={status:"pending",value:void 0,then:function(i){o.push(i)}}}return Up++,n.then(Kv,Kv),n}function Kv(){if(--Up===0&&Rc!==null){No!==null&&(No.status="fulfilled");var a=Rc;Rc=null,jo=0,No=null;for(var n=0;n<a.length;n++)(0,a[n])()}}function R5(a,n){var o=[],i={status:"pending",value:null,reason:null,then:function(m){o.push(m)}};return a.then(function(){i.status="fulfilled",i.value=n;for(var m=0;m<o.length;m++)(0,o[m])(n)},function(m){for(i.status="rejected",i.reason=m,m=0;m<o.length;m++)(0,o[m])(void 0)}),i}var Yv=M.S;M.S=function(a,n){T0=Pe(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&k5(a,n),Yv!==null&&Yv(a,n)};var Nl=P(null);function Ip(){var a=Nl.current;return a!==null?a:Bt.pooledCache}function Cd(a,n){n===null?W(Nl,Nl.current):W(Nl,n.pool)}function Xv(){var a=Ip();return a===null?null:{parent:ma._currentValue,pool:a}}var Co=Error(l(460)),Bp=Error(l(474)),wd=Error(l(542)),Ad={then:function(){}};function Zv(a){return a=a.status,a==="fulfilled"||a==="rejected"}function Jv(a,n,o){switch(o=a[o],o===void 0?a.push(n):o!==n&&(n.then(In,In),n=o),n.status){case"fulfilled":return n.value;case"rejected":throw a=n.reason,tb(a),a;default:if(typeof n.status=="string")n.then(In,In);else{if(a=Bt,a!==null&&100<a.shellSuspendCounter)throw Error(l(482));a=n,a.status="pending",a.then(function(i){if(n.status==="pending"){var m=n;m.status="fulfilled",m.value=i}},function(i){if(n.status==="pending"){var m=n;m.status="rejected",m.reason=i}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw a=n.reason,tb(a),a}throw wl=n,Co}}function Cl(a){try{var n=a._init;return n(a._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(wl=o,Co):o}}var wl=null;function eb(){if(wl===null)throw Error(l(459));var a=wl;return wl=null,a}function tb(a){if(a===Co||a===wd)throw Error(l(483))}var wo=null,Tc=0;function Sd(a){var n=Tc;return Tc+=1,wo===null&&(wo=[]),Jv(wo,a,n)}function _c(a,n){n=n.props.ref,a.ref=n!==void 0?n:null}function Ed(a,n){throw n.$$typeof===y?Error(l(525)):(a=Object.prototype.toString.call(n),Error(l(31,a==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":a)))}function ab(a){function n(ee,G){if(a){var se=ee.deletions;se===null?(ee.deletions=[G],ee.flags|=16):se.push(G)}}function o(ee,G){if(!a)return null;for(;G!==null;)n(ee,G),G=G.sibling;return null}function i(ee){for(var G=new Map;ee!==null;)ee.key!==null?G.set(ee.key,ee):G.set(ee.index,ee),ee=ee.sibling;return G}function m(ee,G){return ee=Fn(ee,G),ee.index=0,ee.sibling=null,ee}function h(ee,G,se){return ee.index=se,a?(se=ee.alternate,se!==null?(se=se.index,se<G?(ee.flags|=67108866,G):se):(ee.flags|=67108866,G)):(ee.flags|=1048576,G)}function C(ee){return a&&ee.alternate===null&&(ee.flags|=67108866),ee}function L(ee,G,se,he){return G===null||G.tag!==6?(G=Dp(se,ee.mode,he),G.return=ee,G):(G=m(G,se),G.return=ee,G)}function $(ee,G,se,he){var Fe=se.type;return Fe===N?me(ee,G,se.props.children,he,se.key):G!==null&&(G.elementType===Fe||typeof Fe=="object"&&Fe!==null&&Fe.$$typeof===z&&Cl(Fe)===G.type)?(G=m(G,se.props),_c(G,se),G.return=ee,G):(G=bd(se.type,se.key,se.props,null,ee.mode,he),_c(G,se),G.return=ee,G)}function ne(ee,G,se,he){return G===null||G.tag!==4||G.stateNode.containerInfo!==se.containerInfo||G.stateNode.implementation!==se.implementation?(G=Mp(se,ee.mode,he),G.return=ee,G):(G=m(G,se.children||[]),G.return=ee,G)}function me(ee,G,se,he,Fe){return G===null||G.tag!==7?(G=vl(se,ee.mode,he,Fe),G.return=ee,G):(G=m(G,se),G.return=ee,G)}function be(ee,G,se){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return G=Dp(""+G,ee.mode,se),G.return=ee,G;if(typeof G=="object"&&G!==null){switch(G.$$typeof){case j:return se=bd(G.type,G.key,G.props,null,ee.mode,se),_c(se,G),se.return=ee,se;case S:return G=Mp(G,ee.mode,se),G.return=ee,G;case z:return G=Cl(G),be(ee,G,se)}if(xe(G)||V(G))return G=vl(G,ee.mode,se,null),G.return=ee,G;if(typeof G.then=="function")return be(ee,Sd(G),se);if(G.$$typeof===A)return be(ee,Nd(ee,G),se);Ed(ee,G)}return null}function re(ee,G,se,he){var Fe=G!==null?G.key:null;if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return Fe!==null?null:L(ee,G,""+se,he);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case j:return se.key===Fe?$(ee,G,se,he):null;case S:return se.key===Fe?ne(ee,G,se,he):null;case z:return se=Cl(se),re(ee,G,se,he)}if(xe(se)||V(se))return Fe!==null?null:me(ee,G,se,he,null);if(typeof se.then=="function")return re(ee,G,Sd(se),he);if(se.$$typeof===A)return re(ee,G,Nd(ee,se),he);Ed(ee,se)}return null}function ie(ee,G,se,he,Fe){if(typeof he=="string"&&he!==""||typeof he=="number"||typeof he=="bigint")return ee=ee.get(se)||null,L(G,ee,""+he,Fe);if(typeof he=="object"&&he!==null){switch(he.$$typeof){case j:return ee=ee.get(he.key===null?se:he.key)||null,$(G,ee,he,Fe);case S:return ee=ee.get(he.key===null?se:he.key)||null,ne(G,ee,he,Fe);case z:return he=Cl(he),ie(ee,G,se,he,Fe)}if(xe(he)||V(he))return ee=ee.get(se)||null,me(G,ee,he,Fe,null);if(typeof he.then=="function")return ie(ee,G,se,Sd(he),Fe);if(he.$$typeof===A)return ie(ee,G,se,Nd(G,he),Fe);Ed(G,he)}return null}function Te(ee,G,se,he){for(var Fe=null,bt=null,Ue=G,Ze=G=0,pt=null;Ue!==null&&Ze<se.length;Ze++){Ue.index>Ze?(pt=Ue,Ue=null):pt=Ue.sibling;var yt=re(ee,Ue,se[Ze],he);if(yt===null){Ue===null&&(Ue=pt);break}a&&Ue&&yt.alternate===null&&n(ee,Ue),G=h(yt,G,Ze),bt===null?Fe=yt:bt.sibling=yt,bt=yt,Ue=pt}if(Ze===se.length)return o(ee,Ue),gt&&Hn(ee,Ze),Fe;if(Ue===null){for(;Ze<se.length;Ze++)Ue=be(ee,se[Ze],he),Ue!==null&&(G=h(Ue,G,Ze),bt===null?Fe=Ue:bt.sibling=Ue,bt=Ue);return gt&&Hn(ee,Ze),Fe}for(Ue=i(Ue);Ze<se.length;Ze++)pt=ie(Ue,ee,Ze,se[Ze],he),pt!==null&&(a&&pt.alternate!==null&&Ue.delete(pt.key===null?Ze:pt.key),G=h(pt,G,Ze),bt===null?Fe=pt:bt.sibling=pt,bt=pt);return a&&Ue.forEach(function(Fr){return n(ee,Fr)}),gt&&Hn(ee,Ze),Fe}function $e(ee,G,se,he){if(se==null)throw Error(l(151));for(var Fe=null,bt=null,Ue=G,Ze=G=0,pt=null,yt=se.next();Ue!==null&&!yt.done;Ze++,yt=se.next()){Ue.index>Ze?(pt=Ue,Ue=null):pt=Ue.sibling;var Fr=re(ee,Ue,yt.value,he);if(Fr===null){Ue===null&&(Ue=pt);break}a&&Ue&&Fr.alternate===null&&n(ee,Ue),G=h(Fr,G,Ze),bt===null?Fe=Fr:bt.sibling=Fr,bt=Fr,Ue=pt}if(yt.done)return o(ee,Ue),gt&&Hn(ee,Ze),Fe;if(Ue===null){for(;!yt.done;Ze++,yt=se.next())yt=be(ee,yt.value,he),yt!==null&&(G=h(yt,G,Ze),bt===null?Fe=yt:bt.sibling=yt,bt=yt);return gt&&Hn(ee,Ze),Fe}for(Ue=i(Ue);!yt.done;Ze++,yt=se.next())yt=ie(Ue,ee,Ze,yt.value,he),yt!==null&&(a&&yt.alternate!==null&&Ue.delete(yt.key===null?Ze:yt.key),G=h(yt,G,Ze),bt===null?Fe=yt:bt.sibling=yt,bt=yt);return a&&Ue.forEach(function(qA){return n(ee,qA)}),gt&&Hn(ee,Ze),Fe}function Ut(ee,G,se,he){if(typeof se=="object"&&se!==null&&se.type===N&&se.key===null&&(se=se.props.children),typeof se=="object"&&se!==null){switch(se.$$typeof){case j:e:{for(var Fe=se.key;G!==null;){if(G.key===Fe){if(Fe=se.type,Fe===N){if(G.tag===7){o(ee,G.sibling),he=m(G,se.props.children),he.return=ee,ee=he;break e}}else if(G.elementType===Fe||typeof Fe=="object"&&Fe!==null&&Fe.$$typeof===z&&Cl(Fe)===G.type){o(ee,G.sibling),he=m(G,se.props),_c(he,se),he.return=ee,ee=he;break e}o(ee,G);break}else n(ee,G);G=G.sibling}se.type===N?(he=vl(se.props.children,ee.mode,he,se.key),he.return=ee,ee=he):(he=bd(se.type,se.key,se.props,null,ee.mode,he),_c(he,se),he.return=ee,ee=he)}return C(ee);case S:e:{for(Fe=se.key;G!==null;){if(G.key===Fe)if(G.tag===4&&G.stateNode.containerInfo===se.containerInfo&&G.stateNode.implementation===se.implementation){o(ee,G.sibling),he=m(G,se.children||[]),he.return=ee,ee=he;break e}else{o(ee,G);break}else n(ee,G);G=G.sibling}he=Mp(se,ee.mode,he),he.return=ee,ee=he}return C(ee);
vendor: 4,946 bytes, line 48
48case z:return se=Cl(se),Ut(ee,G,se,he)}if(xe(se))return Te(ee,G,se,he);if(V(se)){if(Fe=V(se),typeof Fe!="function")throw Error(l(150));return se=Fe.call(se),$e(ee,G,se,he)}if(typeof se.then=="function")return Ut(ee,G,Sd(se),he);if(se.$$typeof===A)return Ut(ee,G,Nd(ee,se),he);Ed(ee,se)}return typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint"?(se=""+se,G!==null&&G.tag===6?(o(ee,G.sibling),he=m(G,se),he.return=ee,ee=he):(o(ee,G),he=Dp(se,ee.mode,he),he.return=ee,ee=he),C(ee)):o(ee,G)}return function(ee,G,se,he){try{Tc=0;var Fe=Ut(ee,G,se,he);return wo=null,Fe}catch(Ue){if(Ue===Co||Ue===wd)throw Ue;var bt=bs(29,Ue,null,ee.mode);return bt.lanes=he,bt.return=ee,bt}finally{}}}var Al=ab(!0),sb=ab(!1),wr=!1;function Fp(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Hp(a,n){a=a.updateQueue,n.updateQueue===a&&(n.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function Ar(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function Sr(a,n,o){var i=a.updateQueue;if(i===null)return null;if(i=i.shared,(At&2)!==0){var m=i.pending;return m===null?n.next=n:(n.next=m.next,m.next=n),i.pending=n,n=vd(a),Bv(a,null,o),n}return hd(a,i,n,o),vd(a)}function Oc(a,n,o){if(n=n.updateQueue,n!==null&&(n=n.shared,(o&4194048)!==0)){var i=n.lanes;i&=a.pendingLanes,o|=i,n.lanes=o,Ct(a,o)}}function qp(a,n){var o=a.updateQueue,i=a.alternate;if(i!==null&&(i=i.updateQueue,o===i)){var m=null,h=null;if(o=o.firstBaseUpdate,o!==null){do{var C={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};h===null?m=h=C:h=h.next=C,o=o.next}while(o!==null);h===null?m=h=n:h=h.next=n}else m=h=n;o={baseState:i.baseState,firstBaseUpdate:m,lastBaseUpdate:h,shared:i.shared,callbacks:i.callbacks},a.updateQueue=o;return}a=o.lastBaseUpdate,a===null?o.firstBaseUpdate=n:a.next=n,o.lastBaseUpdate=n}var $p=!1;function Pc(){if($p){var a=No;if(a!==null)throw a}}function zc(a,n,o,i){$p=!1;var m=a.updateQueue;wr=!1;var h=m.firstBaseUpdate,C=m.lastBaseUpdate,L=m.shared.pending;if(L!==null){m.shared.pending=null;var $=L,ne=$.next;$.next=null,C===null?h=ne:C.next=ne,C=$;var me=a.alternate;me!==null&&(me=me.updateQueue,L=me.lastBaseUpdate,L!==C&&(L===null?me.firstBaseUpdate=ne:L.next=ne,me.lastBaseUpdate=$))}if(h!==null){var be=m.baseState;C=0,me=ne=$=null,L=h;do{var re=L.lane&-536870913,ie=re!==L.lane;if(ie?(xt&re)===re:(i&re)===re){re!==0&&re===jo&&($p=!0),me!==null&&(me=me.next={lane:0,tag:L.tag,payload:L.payload,callback:null,next:null});e:{var Te=a,$e=L;re=n;var Ut=o;switch($e.tag){case 1:if(Te=$e.payload,typeof Te=="function"){be=Te.call(Ut,be,re);break e}be=Te;break e;case 3:Te.flags=Te.flags&-65537|128;case 0:if(Te=$e.payload,re=typeof Te=="function"?Te.call(Ut,be,re):Te,re==null)break e;be=v({},be,re);break e;case 2:wr=!0}}re=L.callback,re!==null&&(a.flags|=64,ie&&(a.flags|=8192),ie=m.callbacks,ie===null?m.callbacks=[re]:ie.push(re))}else ie={lane:re,tag:L.tag,payload:L.payload,callback:L.callback,next:null},me===null?(ne=me=ie,$=be):me=me.next=ie,C|=re;if(L=L.next,L===null){if(L=m.shared.pending,L===null)break;ie=L,L=ie.next,ie.next=null,m.lastBaseUpdate=ie,m.shared.pending=null}}while(!0);me===null&&($=be),m.baseState=$,m.firstBaseUpdate=ne,m.lastBaseUpdate=me,h===null&&(m.shared.lanes=0),kr|=C,a.lanes=C,a.memoizedState=be}}function nb(a,n){if(typeof a!="function")throw Error(l(191,a));a.call(n)}function rb(a,n){var o=a.callbacks;if(o!==null)for(a.callbacks=null,a=0;a<o.length;a++)nb(o[a],n)}var Ao=P(null),Dd=P(0);function lb(a,n){a=Jn,W(Dd,a),W(Ao,n),Jn=a|n.baseLanes}function Wp(){W(Dd,Jn),W(Ao,Ao.current)}function Qp(){Jn=Dd.current,J(Ao),J(Dd)}var ys=P(null),Ws=null;function Er(a){var n=a.alternate;W(da,da.current&1),W(ys,a),Ws===null&&(n===null||Ao.current!==null||n.memoizedState!==null)&&(Ws=a)}function Gp(a){W(da,da.current),W(ys,a),Ws===null&&(Ws=a)}function ob(a){a.tag===22?(W(da,da.current),W(ys,a),Ws===null&&(Ws=a)):Dr()}function Dr(){W(da,da.current),W(ys,ys.current)}function js(a){J(ys),Ws===a&&(Ws=null),J(da)}var da=P(0);function Md(a){for(var n=a;n!==null;){if(n.tag===13){var o=n.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||Jm(o)||ef(o)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===a)break;for(;n.sibling===null;){if(n.return===null||n.return===a)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Wn=0,Xe=null,Pt=null,fa=null,Ld=!1,So=!1,Sl=!1,kd=0,Uc=0,Eo=null,T5=0;function oa(){throw Error(l(321))}function Vp(a,n){if(n===null)return!1;for(var o=0;o<n.length&&o<a.length;
vendor: 19,125 bytes, line 48
48o++)if(!vs(a[o],n[o]))return!1;return!0}function Kp(a,n,o,i,m,h){return Wn=h,Xe=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,M.H=a===null||a.memoizedState===null?$b:dm,Sl=!1,h=o(i,m),Sl=!1,So&&(h=ib(n,o,i,m)),cb(a),h}function cb(a){M.H=Fc;var n=Pt!==null&&Pt.next!==null;if(Wn=0,fa=Pt=Xe=null,Ld=!1,Uc=0,Eo=null,n)throw Error(l(300));a===null||ga||(a=a.dependencies,a!==null&&jd(a)&&(ga=!0))}function ib(a,n,o,i){Xe=a;var m=0;do{if(So&&(Eo=null),Uc=0,So=!1,25<=m)throw Error(l(301));if(m+=1,fa=Pt=null,a.updateQueue!=null){var h=a.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}M.H=Wb,h=n(o,i)}while(So);return h}function _5(){var a=M.H,n=a.useState()[0];return n=typeof n.then=="function"?Ic(n):n,a=a.useState()[0],(Pt!==null?Pt.memoizedState:null)!==a&&(Xe.flags|=1024),n}function Yp(){var a=kd!==0;return kd=0,a}function Xp(a,n,o){n.updateQueue=a.updateQueue,n.flags&=-2053,a.lanes&=~o}function Zp(a){if(Ld){for(a=a.memoizedState;a!==null;){var n=a.queue;n!==null&&(n.pending=null),a=a.next}Ld=!1}Wn=0,fa=Pt=Xe=null,So=!1,Uc=kd=0,Eo=null}function Ga(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return fa===null?Xe.memoizedState=fa=a:fa=fa.next=a,fa}function ua(){if(Pt===null){var a=Xe.alternate;a=a!==null?a.memoizedState:null}else a=Pt.next;var n=fa===null?Xe.memoizedState:fa.next;if(n!==null)fa=n,Pt=a;else{if(a===null)throw Xe.alternate===null?Error(l(467)):Error(l(310));Pt=a,a={memoizedState:Pt.memoizedState,baseState:Pt.baseState,baseQueue:Pt.baseQueue,queue:Pt.queue,next:null},fa===null?Xe.memoizedState=fa=a:fa=fa.next=a}return fa}function Rd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ic(a){var n=Uc;return Uc+=1,Eo===null&&(Eo=[]),a=Jv(Eo,a,n),n=Xe,(fa===null?n.memoizedState:fa.next)===null&&(n=n.alternate,M.H=n===null||n.memoizedState===null?$b:dm),a}function Td(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return Ic(a);if(a.$$typeof===A)return Oa(a)}throw Error(l(438,String(a)))}function Jp(a){var n=null,o=Xe.updateQueue;if(o!==null&&(n=o.memoCache),n==null){var i=Xe.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(n={data:i.data.map(function(m){return m.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),o===null&&(o=Rd(),Xe.updateQueue=o),o.memoCache=n,o=n.data[n.index],o===void 0)for(o=n.data[n.index]=Array(a),i=0;i<a;i++)o[i]=B;return n.index++,o}function Qn(a,n){return typeof n=="function"?n(a):n}function _d(a){var n=ua();return em(n,Pt,a)}function em(a,n,o){var i=a.queue;if(i===null)throw Error(l(311));i.lastRenderedReducer=o;var m=a.baseQueue,h=i.pending;if(h!==null){if(m!==null){var C=m.next;m.next=h.next,h.next=C}n.baseQueue=m=h,i.pending=null}if(h=a.baseState,m===null)a.memoizedState=h;else{n=m.next;var L=C=null,$=null,ne=n,me=!1;do{var be=ne.lane&-536870913;if(be!==ne.lane?(xt&be)===be:(Wn&be)===be){var re=ne.revertLane;if(re===0)$!==null&&($=$.next={lane:0,revertLane:0,gesture:null,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null}),be===jo&&(me=!0);else if((Wn&re)===re){ne=ne.next,re===jo&&(me=!0);continue}else be={lane:0,revertLane:ne.revertLane,gesture:null,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null},$===null?(L=$=be,C=h):$=$.next=be,Xe.lanes|=re,kr|=re;be=ne.action,Sl&&o(h,be),h=ne.hasEagerState?ne.eagerState:o(h,be)}else re={lane:be,revertLane:ne.revertLane,gesture:ne.gesture,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null},$===null?(L=$=re,C=h):$=$.next=re,Xe.lanes|=be,kr|=be;ne=ne.next}while(ne!==null&&ne!==n);if($===null?C=h:$.next=L,!vs(h,a.memoizedState)&&(ga=!0,me&&(o=No,o!==null)))throw o;a.memoizedState=h,a.baseState=C,a.baseQueue=$,i.lastRenderedState=h}return m===null&&(i.lanes=0),[a.memoizedState,i.dispatch]}function tm(a){var n=ua(),o=n.queue;if(o===null)throw Error(l(311));o.lastRenderedReducer=a;var i=o.dispatch,m=o.pending,h=n.memoizedState;if(m!==null){o.pending=null;var C=m=m.next;do h=a(h,C.action),C=C.next;while(C!==m);vs(h,n.memoizedState)||(ga=!0),n.memoizedState=h,n.baseQueue===null&&(n.baseState=h),o.lastRenderedState=h}return[h,i]}function db(a,n,o){var i=Xe,m=ua(),h=gt;if(h){if(o===void 0)throw Error(l(407));o=o()}else o=n();var C=!vs((Pt||m).memoizedState,o);if(C&&(m.memoizedState=o,ga=!0),m=m.queue,nm(pb.bind(null,i,m,a),[a]),m.getSnapshot!==n||C||fa!==null&&fa.memoizedState.tag&1){if(i.flags|=2048,Do(9,{destroy:void 0},xb.bind(null,i,m,o,n),null),Bt===null)throw Error(l(349));h||(Wn&127)!==0||ub(i,n,o)}return o}function ub(a,n,o){a.flags|=16384,a={getSnapshot:n,value:o},n=Xe.updateQueue,n===null?(n=Rd(),Xe.updateQueue=n,n.stores=[a]):(o=n.stores,o===null?n.stores=[a]:o.push(a))}function xb(a,n,o,i){n.value=o,n.getSnapshot=i,mb(n)&&fb(a)}function pb(a,n,o){return o(function(){mb(n)&&fb(a)})}function mb(a){var n=a.getSnapshot;a=a.value;try{var o=n();return!vs(a,o)}catch{return!0}}function fb(a){var n=hl(a,2);n!==null&&cs(n,a,2)}function am(a){var n=Ga();if(typeof a=="function"){var o=a;if(a=o(),Sl){sa(!0);try{o()}finally{sa(!1)}}}return n.memoizedState=n.baseState=a,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qn,lastRenderedState:a},n}function gb(a,n,o,i){return a.baseState=o,em(a,Pt,typeof i=="function"?i:Qn)}function O5(a,n,o,i,m){if(zd(a))throw Error(l(485));if(a=n.action,a!==null){var h={payload:m,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(C){h.listeners.push(C)}};M.T!==null?o(!0):h.isTransition=!1,i(h),o=n.pending,o===null?(h.next=n.pending=h,hb(n,h)):(h.next=o.next,n.pending=o.next=h)}}function hb(a,n){var o=n.action,i=n.payload,m=a.state;if(n.isTransition){var h=M.T,C={};M.T=C;try{var L=o(m,i),$=M.S;$!==null&&$(C,L),vb(a,n,L)}catch(ne){sm(a,n,ne)}finally{h!==null&&C.types!==null&&(h.types=C.types),M.T=h}}else try{h=o(m,i),vb(a,n,h)}catch(ne){sm(a,n,ne)}}function vb(a,n,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(i){bb(a,n,i)},function(i){return sm(a,n,i)}):bb(a,n,o)}function bb(a,n,o){n.status="fulfilled",n.value=o,yb(n),a.state=o,n=a.pending,n!==null&&(o=n.next,o===n?a.pending=null:(o=o.next,n.next=o,hb(a,o)))}function sm(a,n,o){var i=a.pending;if(a.pending=null,i!==null){i=i.next;do n.status="rejected",n.reason=o,yb(n),n=n.next;while(n!==i)}a.action=null}function yb(a){a=a.listeners;for(var n=0;n<a.length;n++)(0,a[n])()}function jb(a,n){return n}function Nb(a,n){if(gt){var o=Bt.formState;if(o!==null){e:{var i=Xe;if(gt){if(Xt){t:{for(var m=Xt,h=$s;m.nodeType!==8;){if(!h){m=null;break t}if(m=Qs(m.nextSibling),m===null){m=null;break t}}h=m.data,m=h==="F!"||h==="F"?m:null}if(m){Xt=Qs(m.nextSibling),i=m.data==="F!";break e}}Nr(i)}i=!1}i&&(n=o[0])}}return o=Ga(),o.memoizedState=o.baseState=n,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jb,lastRenderedState:n},o.queue=i,o=Fb.bind(null,Xe,i),i.dispatch=o,i=am(!1),h=im.bind(null,Xe,!1,i.queue),i=Ga(),m={state:n,dispatch:null,action:a,pending:null},i.queue=m,o=O5.bind(null,Xe,m,h,o),m.dispatch=o,i.memoizedState=a,[n,o,!1]}function Cb(a){var n=ua();return wb(n,Pt,a)}function wb(a,n,o){if(n=em(a,n,jb)[0],a=_d(Qn)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var i=Ic(n)}catch(C){throw C===Co?wd:C}else i=n;n=ua();var m=n.queue,h=m.dispatch;return o!==n.memoizedState&&(Xe.flags|=2048,Do(9,{destroy:void 0},P5.bind(null,m,o),null)),[i,h,a]}function P5(a,n){a.action=n}function Ab(a){var n=ua(),o=Pt;if(o!==null)return wb(n,o,a);ua(),n=n.memoizedState,o=ua();var i=o.queue.dispatch;return o.memoizedState=a,[n,i,!1]}function Do(a,n,o,i){return a={tag:a,create:o,deps:i,inst:n,next:null},n=Xe.updateQueue,n===null&&(n=Rd(),Xe.updateQueue=n),o=n.lastEffect,o===null?n.lastEffect=a.next=a:(i=o.next,o.next=a,a.next=i,n.lastEffect=a),a}function Sb(){return ua().memoizedState}function Od(a,n,o,i){var m=Ga();Xe.flags|=a,m.memoizedState=Do(1|n,{destroy:void 0},o,i===void 0?null:i)}function Pd(a,n,o,i){var m=ua();i=i===void 0?null:i;var h=m.memoizedState.inst;Pt!==null&&i!==null&&Vp(i,Pt.memoizedState.deps)?m.memoizedState=Do(n,h,o,i):(Xe.flags|=a,m.memoizedState=Do(1|n,h,o,i))}function Eb(a,n){Od(8390656,8,a,n)}function nm(a,n){Pd(2048,8,a,n)}function z5(a){Xe.flags|=4;var n=Xe.updateQueue;if(n===null)n=Rd(),Xe.updateQueue=n,n.events=[a];else{var o=n.events;o===null?n.events=[a]:o.push(a)}}function Db(a){var n=ua().memoizedState;return z5({ref:n,nextImpl:a}),function(){if((At&2)!==0)throw Error(l(440));return n.impl.apply(void 0,arguments)}}function Mb(a,n){return Pd(4,2,a,n)}function Lb(a,n){return Pd(4,4,a,n)}function kb(a,n){if(typeof n=="function"){a=a();var o=n(a);return function(){typeof o=="function"?o():n(null)}}if(n!=null)return a=a(),n.current=a,function(){n.current=null}}function Rb(a,n,o){o=o!=null?o.concat([a]):null,Pd(4,4,kb.bind(null,n,a),o)}function rm(){}function Tb(a,n){var o=ua();n=n===void 0?null:n;var i=o.memoizedState;return n!==null&&Vp(n,i[1])?i[0]:(o.memoizedState=[a,n],a)}function _b(a,n){var o=ua();n=n===void 0?null:n;var i=o.memoizedState;if(n!==null&&Vp(n,i[1]))return i[0];if(i=a(),Sl){sa(!0);try{a()}finally{sa(!1)}}return o.memoizedState=[i,n],i}function lm(a,n,o){return o===void 0||(Wn&1073741824)!==0&&(xt&261930)===0?a.memoizedState=n:(a.memoizedState=o,a=O0(),Xe.lanes|=a,kr|=a,o)}function Ob(a,n,o,i){return vs(o,n)?o:Ao.current!==null?(a=lm(a,o,i),vs(a,n)||(ga=!0),a):(Wn&42)===0||(Wn&1073741824)!==0&&(xt&261930)===0?(ga=!0,a.memoizedState=o):(a=O0(),Xe.lanes|=a,kr|=a,n)}function Pb(a,n,o,i,m){var h=O.p;O.p=h!==0&&8>h?h:8;var C=M.T,L={};M.T=L,im(a,!1,n,o);try{var $=m(),ne=M.S;if(ne!==null&&ne(L,$),$!==null&&typeof $=="object"&&typeof $.then=="function"){var me=R5($,i);Bc(a,n,me,ws(a))}else Bc(a,n,i,ws(a))}catch(be){Bc(a,n,{then:function(){},status:"rejected",reason:be},ws())}finally{O.p=h,C!==null&&L.types!==null&&(C.types=L.types),M.T=C}}function U5(){}function om(a,n,o,i){if(a.tag!==5)throw Error(l(476));var m=zb(a).queue;Pb(a,m,n,T,o===null?U5:function(){return Ub(a),o(i)})}function zb(a){var n=a.memoizedState;if(n!==null)return n;n={memoizedState:T,baseState:T,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qn,lastRenderedState:T},next:null};var o={};return n.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qn,lastRenderedState:o},next:null},a.memoizedState=n,a=a.alternate,a!==null&&(a.memoizedState=n),n}function Ub(a){var n=zb(a);n.next===null&&(n=a.alternate.memoizedState),Bc(a,n.next.queue,{},ws())}function cm(){return Oa(si)}function Ib(){return ua().memoizedState}function Bb(){return ua().memoizedState}function I5(a){for(var n=a.return;n!==null;){switch(n.tag){case 24:case 3:var o=ws();a=Ar(o);var i=Sr(n,a,o);i!==null&&(cs(i,n,o),Oc(i,n,o)),n={cache:zp()},a.payload=n;return}n=n.return}}function B5(a,n,o){var i=ws();o={lane:i,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},zd(a)?Hb(n,o):(o=Sp(a,n,o,i),o!==null&&(cs(o,a,i),qb(o,n,i)))}function Fb(a,n,o){var i=ws();Bc(a,n,o,i)}function Bc(a,n,o,i){var m={lane:i,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(zd(a))Hb(n,m);else{var h=a.alternate;if(a.lanes===0&&(h===null||h.lanes===0)&&(h=n.lastRenderedReducer,h!==null))try{var C=n.lastRenderedState,L=h(C,o);if(m.hasEagerState=!0,m.eagerState=L,vs(L,C))return hd(a,n,m,0),Bt===null&&gd(),!1}catch{}finally{}if(o=Sp(a,n,m,i),o!==null)return cs(o,a,i),qb(o,n,i),!0}return!1}function im(a,n,o,i){if(i={lane:2,revertLane:Fm(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},zd(a)){if(n)throw Error(l(479))}else n=Sp(a,o,i,2),n!==null&&cs(n,a,2)}function zd(a){var n=a.alternate;return a===Xe||n!==null&&n===Xe}function Hb(a,n){So=Ld=!0;var o=a.pending;o===null?n.next=n:(n.next=o.next,o.next=n),a.pending=n}function qb(a,n,o){if((o&4194048)!==0){var i=n.lanes;i&=a.pendingLanes,o|=i,n.lanes=o,Ct(a,o)}}var Fc={readContext:Oa,use:Td,useCallback:oa,useContext:oa,useEffect:oa,useImperativeHandle:oa,useLayoutEffect:oa,useInsertionEffect:oa,useMemo:oa,useReducer:oa,useRef:oa,useState:oa,useDebugValue:oa,useDeferredValue:oa,useTransition:oa,useSyncExternalStore:oa,useId:oa,useHostTransitionStatus:oa,useFormState:oa,useActionState:oa,useOptimistic:oa,useMemoCache:oa,useCacheRefresh:oa};Fc.useEffectEvent=oa;var $b={readContext:Oa,use:Td,useCallback:function(a,n){return Ga().memoizedState=[a,n===void 0?null:n],a},useContext:Oa,useEffect:Eb,useImperativeHandle:function(a,n,o){o=o!=null?o.concat([a]):null,Od(4194308,4,kb.bind(null,n,a),o)},useLayoutEffect:function(a,n){return Od(4194308,4,a,n)},useInsertionEffect:function(a,n){Od(4,2,a,n)},useMemo:function(a,n){var o=Ga();n=n===void 0?null:n;var i=a();if(Sl){sa(!0);try{a()}finally{sa(!1)}}return o.memoizedState=[i,n],i},useReducer:function(a,n,o){var i=Ga();if(o!==void 0){var m=o(n);if(Sl){sa(!0);try{o(n)}finally{sa(!1)}}}else m=n;return i.memoizedState=i.baseState=m,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:m},i.queue=a,a=a.dispatch=B5.bind(null,Xe,a),[i.memoizedState,a]},useRef:function(a){var n=Ga();return a={current:a},n.memoizedState=a},useState:function(a){a=am(a);var n=a.queue,o=Fb.bind(null,Xe,n);return n.dispatch=o,[a.memoizedState,o]},useDebugValue:rm,useDeferredValue:function(a,n){var o=Ga();return lm(o,a,n)},useTransition:function(){var a=am(!1);return a=Pb.bind(null,Xe,a.queue,!0,!1),Ga().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,n,o){var i=Xe,m=Ga();if(gt){if(o===void 0)throw Error(l(407));o=o()}else{if(o=n(),Bt===null)throw Error(l(349));(xt&127)!==0||ub(i,n,o)}m.memoizedState=o;var h={value:o,getSnapshot:n};return m.queue=h,Eb(pb.bind(null,i,h,a),[a]),i.flags|=2048,Do(9,{destroy:void 0},xb.bind(null,i,h,o,n),null),o},useId:function(){var a=Ga(),n=Bt.identifierPrefix;if(gt){var o=Cn,i=Nn;o=(i&~(1<<32-Kt(i)-1)).toString(32)+o,n="_"+n+"R_"+o,o=kd++,0<o&&(n+="H"+o.toString(32)),n+="_"}else o=T5++,n="_"+n+"r_"+o.toString(32)+"_";return a.memoizedState=n},useHostTransitionStatus:cm,useFormState:Nb,useActionState:Nb,useOptimistic:function(a){var n=Ga();n.memoizedState=n.baseState=a;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=o,n=im.bind(null,Xe,!0,o),o.dispatch=n,[a,n]},useMemoCache:Jp,useCacheRefresh:function(){return Ga().memoizedState=I5.bind(null,Xe)},useEffectEvent:function(a){var n=Ga(),o={impl:a};return n.memoizedState=o,function(){if((At&2)!==0)throw Error(l(440));return o.impl.apply(void 0,arguments)}}},dm={readContext:Oa,use:Td,useCallback:Tb,useContext:Oa,useEffect:nm,useImperativeHandle:Rb,useInsertionEffect:Mb,useLayoutEffect:Lb,useMemo:_b,useReducer:_d,useRef:Sb,useState:function(){return _d(Qn)},useDebugValue:rm,useDeferredValue:function(a,n){var o=ua();return Ob(o,Pt.memoizedState,a,n)},useTransition:function(){var a=_d(Qn)[0],n=ua().memoizedState;return[typeof a=="boolean"?a:Ic(a),n]},useSyncExternalStore:db,useId:Ib,useHostTransitionStatus:cm,useFormState:Cb,useActionState:Cb,useOptimistic:function(a,n){var o=ua();return gb(o,Pt,a,n)},useMemoCache:Jp,useCacheRefresh:Bb};dm.useEffectEvent=Db;var Wb={readContext:Oa,use:Td,useCallback:Tb,useContext:Oa,useEffect:nm,useImperativeHandle:Rb,useInsertionEffect:Mb,useLayoutEffect:Lb,useMemo:_b,useReducer:tm,useRef:Sb,useState:function(){return tm(Qn)},useDebugValue:rm,useDeferredValue:function(a,n){var o=ua();return Pt===null?lm(o,a,n):Ob(o,Pt.memoizedState,a,n)},useTransition:function(){var a=tm(Qn)[0],n=ua().memoizedState;return[typeof a=="boolean"?a:Ic(a),n]},useSyncExternalStore:db,useId:Ib,useHostTransitionStatus:cm,useFormState:Ab,useActionState:Ab,useOptimistic:function(a,n){var o=ua();return Pt!==null?gb(o,Pt,a,n):(o.baseState=a,[a,o.queue.dispatch])},useMemoCache:Jp,useCacheRefresh:Bb};Wb.useEffectEvent=Db;function um(a,n,o,i){n=a.memoizedState,o=o(i,n),o=o==null?n:v({},n,o),a.memoizedState=o,a.lanes===0&&(a.updateQueue.baseState=o)}var xm={enqueueSetState:function(a,n,o){a=a._reactInternals;var i=ws(),m=Ar(i);m.payload=n,o!=null&&(m.callback=o),n=Sr(a,m,i),n!==null&&(cs(n,a,i),Oc(n,a,i))},enqueueReplaceState:function(a,n,o){a=a._reactInternals;var i=ws(),m=Ar(i);m.tag=1,m.payload=n,o!=null&&(m.callback=o),n=Sr(a,m,i),n!==null&&(cs(n,a,i),Oc(n,a,i))},enqueueForceUpdate:function(a,n){a=a._reactInternals;var o=ws(),i=Ar(o);i.tag=2,n!=null&&(i.callback=n),n=Sr(a,i,o),n!==null&&(cs(n,a,o),Oc(n,a,o))}};function Qb(a,n,o,i,m,h,C){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(i,h,C):n.prototype&&n.prototype.isPureReactComponent?!Ec(o,i)||!Ec(m,h):!0}function Gb(a,n,o,i){a=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(o,i),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(o,i),n.state!==a&&xm.enqueueReplaceState(n,n.state,null)}function El(a,n){var o=n;if("ref"in n){o={};for(var i in n)i!=="ref"&&(o[i]=n[i])}if(a=a.defaultProps){o===n&&(o=v({},o));for(var m in a)o[m]===void 0&&(o[m]=a[m])}return o}function Vb(a){fd(a)}function Kb(a){console.error(a)}function Yb(a){fd(a)}function Ud(a,n){try{var o=a.onUncaughtError;o(n.value,{componentStack:n.stack})}catch(i){setTimeout(function(){throw i})}}function Xb(a,n,o){try{var i=a.onCaughtError;i(o.value,{componentStack:o.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(m){setTimeout(function(){throw m})}}function pm(a,n,o){return o=Ar(o),o.tag=3,o.payload={element:null},o.callback=function(){Ud(a,n)},o}function Zb(a){return a=Ar(a),a.tag=3,a}function Jb(a,n,o,i){var m=o.type.getDerivedStateFromError;if(typeof m=="function"){var h=i.value;a.payload=function(){return m(h)},a.callback=function(){Xb(n,o,i)}}var C=o.stateNode;C!==null&&typeof C.componentDidCatch=="function"&&(a.callback=function(){Xb(n,o,i),typeof m!="function"&&(Rr===null?Rr=new Set([this]):Rr.add(this));var L=i.stack;this.componentDidCatch(i.value,{componentStack:L!==null?L:""})})}function F5(a,n,o,i,m){if(o.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(n=o.alternate,n!==null&&yo(n,o,m,!0),o=ys.current,o!==null){switch(o.tag){case 31:case 13:return Ws===null?Yd():o.alternate===null&&ca===0&&(ca=3),o.flags&=-257,o.flags|=65536,o.lanes=m,i===Ad?o.flags|=16384:(n=o.updateQueue,n===null?o.updateQueue=new Set([i]):n.add(i),Um(a,i,m)),!1;case 22:return o.flags|=65536,i===Ad?o.flags|=16384:(n=o.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([i])},o.updateQueue=n):(o=n.retryQueue,o===null?n.retryQueue=new Set([i]):o.add(i)),Um(a,i,m)),!1}throw Error(l(435,o.tag))}return Um(a,i,m),Yd(),!1}if(gt)return n=ys.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=m,i!==Rp&&(a=Error(l(422),{cause:i}),Lc(Fs(a,o)))):(i!==Rp&&(n=Error(l(423),{cause:i}),Lc(Fs(n,o))),a=a.current.alternate,a.flags|=65536,m&=-m,a.lanes|=m,i=Fs(i,o),m=pm(a.stateNode,i,m),qp(a,m),ca!==4&&(ca=2)),!1;var h=Error(l(520),{cause:i});if(h=Fs(h,o),Kc===null?Kc=[h]:Kc.push(h),ca!==4&&(ca=2),n===null)return!0;
vendor: 11,355 bytes, line 48
48i=Fs(i,o),o=n;do{switch(o.tag){case 3:return o.flags|=65536,a=m&-m,o.lanes|=a,a=pm(o.stateNode,i,a),qp(o,a),!1;case 1:if(n=o.type,h=o.stateNode,(o.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(Rr===null||!Rr.has(h))))return o.flags|=65536,m&=-m,o.lanes|=m,m=Zb(m),Jb(m,a,o,i),qp(o,m),!1}o=o.return}while(o!==null);return!1}var mm=Error(l(461)),ga=!1;function Pa(a,n,o,i){n.child=a===null?sb(n,null,o,i):Al(n,a.child,o,i)}function e0(a,n,o,i,m){o=o.render;var h=n.ref;if("ref"in i){var C={};for(var L in i)L!=="ref"&&(C[L]=i[L])}else C=i;return jl(n),i=Kp(a,n,o,C,h,m),L=Yp(),a!==null&&!ga?(Xp(a,n,m),Gn(a,n,m)):(gt&&L&&Lp(n),n.flags|=1,Pa(a,n,i,m),n.child)}function t0(a,n,o,i,m){if(a===null){var h=o.type;return typeof h=="function"&&!Ep(h)&&h.defaultProps===void 0&&o.compare===null?(n.tag=15,n.type=h,a0(a,n,h,i,m)):(a=bd(o.type,null,i,n,n.mode,m),a.ref=n.ref,a.return=n,n.child=a)}if(h=a.child,!Nm(a,m)){var C=h.memoizedProps;if(o=o.compare,o=o!==null?o:Ec,o(C,i)&&a.ref===n.ref)return Gn(a,n,m)}return n.flags|=1,a=Fn(h,i),a.ref=n.ref,a.return=n,n.child=a}function a0(a,n,o,i,m){if(a!==null){var h=a.memoizedProps;if(Ec(h,i)&&a.ref===n.ref)if(ga=!1,n.pendingProps=i=h,Nm(a,m))(a.flags&131072)!==0&&(ga=!0);else return n.lanes=a.lanes,Gn(a,n,m)}return fm(a,n,o,i,m)}function s0(a,n,o,i){var m=i.children,h=a!==null?a.memoizedState:null;if(a===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.mode==="hidden"){if((n.flags&128)!==0){if(h=h!==null?h.baseLanes|o:o,a!==null){for(i=n.child=a.child,m=0;i!==null;)m=m|i.lanes|i.childLanes,i=i.sibling;i=m&~h}else i=0,n.child=null;return n0(a,n,h,o,i)}if((o&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},a!==null&&Cd(n,h!==null?h.cachePool:null),h!==null?lb(n,h):Wp(),ob(n);else return i=n.lanes=536870912,n0(a,n,h!==null?h.baseLanes|o:o,o,i)}else h!==null?(Cd(n,h.cachePool),lb(n,h),Dr(),n.memoizedState=null):(a!==null&&Cd(n,null),Wp(),Dr());return Pa(a,n,m,o),n.child}function Hc(a,n){return a!==null&&a.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function n0(a,n,o,i,m){var h=Ip();return h=h===null?null:{parent:ma._currentValue,pool:h},n.memoizedState={baseLanes:o,cachePool:h},a!==null&&Cd(n,null),Wp(),ob(n),a!==null&&yo(a,n,i,!0),n.childLanes=m,null}function Id(a,n){return n=Fd({mode:n.mode,children:n.children},a.mode),n.ref=a.ref,a.child=n,n.return=a,n}function r0(a,n,o){return Al(n,a.child,null,o),a=Id(n,n.pendingProps),a.flags|=2,js(n),n.memoizedState=null,a}function H5(a,n,o){var i=n.pendingProps,m=(n.flags&128)!==0;if(n.flags&=-129,a===null){if(gt){if(i.mode==="hidden")return a=Id(n,i),n.lanes=536870912,Hc(null,a);if(Gp(n),(a=Xt)?(a=h1(a,$s),a=a!==null&&a.data==="&"?a:null,a!==null&&(n.memoizedState={dehydrated:a,treeContext:yr!==null?{id:Nn,overflow:Cn}:null,retryLane:536870912,hydrationErrors:null},o=Hv(a),o.return=n,n.child=o,_a=n,Xt=null)):a=null,a===null)throw Nr(n);return n.lanes=536870912,null}return Id(n,i)}var h=a.memoizedState;if(h!==null){var C=h.dehydrated;if(Gp(n),m)if(n.flags&256)n.flags&=-257,n=r0(a,n,o);else if(n.memoizedState!==null)n.child=a.child,n.flags|=128,n=null;else throw Error(l(558));else if(ga||yo(a,n,o,!1),m=(o&a.childLanes)!==0,ga||m){if(i=Bt,i!==null&&(C=Rt(i,o),C!==0&&C!==h.retryLane))throw h.retryLane=C,hl(a,C),cs(i,a,C),mm;Yd(),n=r0(a,n,o)}else a=h.treeContext,Xt=Qs(C.nextSibling),_a=n,gt=!0,jr=null,$s=!1,a!==null&&Wv(n,a),n=Id(n,i),n.flags|=4096;return n}return a=Fn(a.child,{mode:i.mode,children:i.children}),a.ref=n.ref,n.child=a,a.return=n,a}function Bd(a,n){var o=n.ref;if(o===null)a!==null&&a.ref!==null&&(n.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(l(284));(a===null||a.ref!==o)&&(n.flags|=4194816)}}function fm(a,n,o,i,m){return jl(n),o=Kp(a,n,o,i,void 0,m),i=Yp(),a!==null&&!ga?(Xp(a,n,m),Gn(a,n,m)):(gt&&i&&Lp(n),n.flags|=1,Pa(a,n,o,m),n.child)}function l0(a,n,o,i,m,h){return jl(n),n.updateQueue=null,o=ib(n,i,o,m),cb(a),i=Yp(),a!==null&&!ga?(Xp(a,n,h),Gn(a,n,h)):(gt&&i&&Lp(n),n.flags|=1,Pa(a,n,o,h),n.child)}function o0(a,n,o,i,m){if(jl(n),n.stateNode===null){var h=go,C=o.contextType;typeof C=="object"&&C!==null&&(h=Oa(C)),h=new o(i,h),n.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=xm,n.stateNode=h,h._reactInternals=n,h=n.stateNode,h.props=i,h.state=n.memoizedState,h.refs={},Fp(n),C=o.contextType,h.context=typeof C=="object"&&C!==null?Oa(C):go,h.state=n.memoizedState,C=o.getDerivedStateFromProps,typeof C=="function"&&(um(n,o,C,i),h.state=n.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(C=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),C!==h.state&&xm.enqueueReplaceState(h,h.state,null),zc(n,i,h,m),Pc(),h.state=n.memoizedState),typeof h.componentDidMount=="function"&&(n.flags|=4194308),i=!0}else if(a===null){h=n.stateNode;var L=n.memoizedProps,$=El(o,L);h.props=$;var ne=h.context,me=o.contextType;C=go,typeof me=="object"&&me!==null&&(C=Oa(me));var be=o.getDerivedStateFromProps;me=typeof be=="function"||typeof h.getSnapshotBeforeUpdate=="function",L=n.pendingProps!==L,me||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(L||ne!==C)&&Gb(n,h,i,C),wr=!1;var re=n.memoizedState;h.state=re,zc(n,i,h,m),Pc(),ne=n.memoizedState,L||re!==ne||wr?(typeof be=="function"&&(um(n,o,be,i),ne=n.memoizedState),($=wr||Qb(n,o,$,i,re,ne,C))?(me||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(n.flags|=4194308)):(typeof h.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=i,n.memoizedState=ne),h.props=i,h.state=ne,h.context=C,i=$):(typeof h.componentDidMount=="function"&&(n.flags|=4194308),i=!1)}else{h=n.stateNode,Hp(a,n),C=n.memoizedProps,me=El(o,C),h.props=me,be=n.pendingProps,re=h.context,ne=o.contextType,$=go,typeof ne=="object"&&ne!==null&&($=Oa(ne)),L=o.getDerivedStateFromProps,(ne=typeof L=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(C!==be||re!==$)&&Gb(n,h,i,$),wr=!1,re=n.memoizedState,h.state=re,zc(n,i,h,m),Pc();var ie=n.memoizedState;C!==be||re!==ie||wr||a!==null&&a.dependencies!==null&&jd(a.dependencies)?(typeof L=="function"&&(um(n,o,L,i),ie=n.memoizedState),(me=wr||Qb(n,o,me,i,re,ie,$)||a!==null&&a.dependencies!==null&&jd(a.dependencies))?(ne||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(i,ie,$),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(i,ie,$)),typeof h.componentDidUpdate=="function"&&(n.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof h.componentDidUpdate!="function"||C===a.memoizedProps&&re===a.memoizedState||(n.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||C===a.memoizedProps&&re===a.memoizedState||(n.flags|=1024),n.memoizedProps=i,n.memoizedState=ie),h.props=i,h.state=ie,h.context=$,i=me):(typeof h.componentDidUpdate!="function"||C===a.memoizedProps&&re===a.memoizedState||(n.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||C===a.memoizedProps&&re===a.memoizedState||(n.flags|=1024),i=!1)}return h=i,Bd(a,n),i=(n.flags&128)!==0,h||i?(h=n.stateNode,o=i&&typeof o.getDerivedStateFromError!="function"?null:h.render(),n.flags|=1,a!==null&&i?(n.child=Al(n,a.child,null,m),n.child=Al(n,null,o,m)):Pa(a,n,o,m),n.memoizedState=h.state,a=n.child):a=Gn(a,n,m),a}function c0(a,n,o,i){return bl(),n.flags|=256,Pa(a,n,o,i),n.child}var gm={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function hm(a){return{baseLanes:a,cachePool:Xv()}}function vm(a,n,o){return a=a!==null?a.childLanes&~o:0,n&&(a|=Cs),a}function i0(a,n,o){var i=n.pendingProps,m=!1,h=(n.flags&128)!==0,C;if((C=h)||(C=a!==null&&a.memoizedState===null?!1:(da.current&2)!==0),C&&(m=!0,n.flags&=-129),C=(n.flags&32)!==0,n.flags&=-33,a===null){if(gt){if(m?Er(n):Dr(),(a=Xt)?(a=h1(a,$s),a=a!==null&&a.data!=="&"?a:null,a!==null&&(n.memoizedState={dehydrated:a,treeContext:yr!==null?{id:Nn,overflow:Cn}:null,retryLane:536870912,hydrationErrors:null},o=Hv(a),o.return=n,n.child=o,_a=n,Xt=null)):a=null,a===null)throw Nr(n);return ef(a)?n.lanes=32:n.lanes=536870912,null}var L=i.children;return i=i.fallback,m?(Dr(),m=n.mode,L=Fd({mode:"hidden",children:L},m),i=vl(i,m,o,null),L.return=n,i.return=n,L.sibling=i,n.child=L,i=n.child,i.memoizedState=hm(o),i.childLanes=vm(a,C,o),n.memoizedState=gm,Hc(null,i)):(Er(n),bm(n,L))}var $=a.memoizedState;if($!==null&&(L=$.dehydrated,L!==null)){if(h)n.flags&256?(Er(n),n.flags&=-257,n=ym(a,n,o)):n.memoizedState!==null?(Dr(),n.child=a.child,n.flags|=128,n=null):(Dr(),L=i.fallback,m=n.mode,i=Fd({mode:"visible",children:i.children},m),L=vl(L,m,o,null),L.flags|=2,i.return=n,L.return=n,i.sibling=L,n.child=i,Al(n,a.child,null,o),i=n.child,i.memoizedState=hm(o),i.childLanes=vm(a,C,o),n.memoizedState=gm,n=Hc(null,i));else if(Er(n),ef(L)){if(C=L.nextSibling&&L.nextSibling.dataset,C)var ne=C.dgst;C=ne,i=Error(l(419)),i.stack="",i.digest=C,Lc({value:i,source:null,stack:null}),n=ym(a,n,o)}else if(ga||yo(a,n,o,!1),C=(o&a.childLanes)!==0,ga||C){if(C=Bt,C!==null&&(i=Rt(C,o),i!==0&&i!==$.retryLane))throw $.retryLane=i,hl(a,i),cs(C,a,i),mm;Jm(L)||Yd(),n=ym(a,n,o)}else Jm(L)?(n.flags|=192,n.child=a.child,n=null):(a=$.treeContext,Xt=Qs(L.nextSibling),_a=n,gt=!0,jr=null,$s=!1,a!==null&&Wv(n,a),n=bm(n,i.children),n.flags|=4096);return n}return m?(Dr(),L=i.fallback,m=n.mode,$=a.child,ne=$.sibling,i=Fn($,{mode:"hidden",children:i.children}),i.subtreeFlags=$.subtreeFlags&65011712,ne!==null?L=Fn(ne,L):(L=vl(L,m,o,null),L.flags|=2),L.return=n,i.return=n,i.sibling=L,n.child=i,Hc(null,i),i=n.child,L=a.child.memoizedState,L===null?L=hm(o):(m=L.cachePool,m!==null?($=ma._currentValue,m=m.parent!==$?{parent:$,pool:$}:m):m=Xv(),L={baseLanes:L.baseLanes|o,cachePool:m}),i.memoizedState=L,i.childLanes=vm(a,C,o),n.memoizedState=gm,Hc(a.child,i)):(Er(n),o=a.child,a=o.sibling,o=Fn(o,{mode:"visible",children:i.children}),o.return=n,o.sibling=null,a!==null&&(C=n.deletions,C===null?(n.deletions=[a],n.flags|=16):C.push(a)),n.child=o,n.memoizedState=null,o)}function bm(a,n){return n=Fd({mode:"visible",children:n},a.mode),n.return=a,a.child=n}function Fd(a,n){return a=bs(22,a,null,n),a.lanes=0,a}function ym(a,n,o){return Al(n,a.child,null,o),a=bm(n,n.pendingProps.children),a.flags|=2,n.memoizedState=null,a}function d0(a,n,o){a.lanes|=n;var i=a.alternate;i!==null&&(i.lanes|=n),Op(a.return,n,o)}function jm(a,n,o,i,m,h){var C=a.memoizedState;C===null?a.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:i,tail:o,tailMode:m,treeForkCount:h}:(C.isBackwards=n,C.rendering=null,C.renderingStartTime=0,C.last=i,C.tail=o,
vendor: 5,709 bytes, line 48
48C.tailMode=m,C.treeForkCount=h)}function u0(a,n,o){var i=n.pendingProps,m=i.revealOrder,h=i.tail;i=i.children;var C=da.current,L=(C&2)!==0;if(L?(C=C&1|2,n.flags|=128):C&=1,W(da,C),Pa(a,n,i,o),i=gt?Mc:0,!L&&a!==null&&(a.flags&128)!==0)e:for(a=n.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&d0(a,o,n);else if(a.tag===19)d0(a,o,n);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===n)break e;for(;a.sibling===null;){if(a.return===null||a.return===n)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(m){case"forwards":for(o=n.child,m=null;o!==null;)a=o.alternate,a!==null&&Md(a)===null&&(m=o),o=o.sibling;o=m,o===null?(m=n.child,n.child=null):(m=o.sibling,o.sibling=null),jm(n,!1,m,o,h,i);break;case"backwards":case"unstable_legacy-backwards":for(o=null,m=n.child,n.child=null;m!==null;){if(a=m.alternate,a!==null&&Md(a)===null){n.child=m;break}a=m.sibling,m.sibling=o,o=m,m=a}jm(n,!0,o,null,h,i);break;case"together":jm(n,!1,null,null,void 0,i);break;default:n.memoizedState=null}return n.child}function Gn(a,n,o){if(a!==null&&(n.dependencies=a.dependencies),kr|=n.lanes,(o&n.childLanes)===0)if(a!==null){if(yo(a,n,o,!1),(o&n.childLanes)===0)return null}else return null;if(a!==null&&n.child!==a.child)throw Error(l(153));if(n.child!==null){for(a=n.child,o=Fn(a,a.pendingProps),n.child=o,o.return=n;a.sibling!==null;)a=a.sibling,o=o.sibling=Fn(a,a.pendingProps),o.return=n;o.sibling=null}return n.child}function Nm(a,n){return(a.lanes&n)!==0?!0:(a=a.dependencies,!!(a!==null&&jd(a)))}function q5(a,n,o){switch(n.tag){case 3:Ne(n,n.stateNode.containerInfo),Cr(n,ma,a.memoizedState.cache),bl();break;case 27:case 5:Ce(n);break;case 4:Ne(n,n.stateNode.containerInfo);break;case 10:Cr(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Gp(n),null;break;case 13:var i=n.memoizedState;if(i!==null)return i.dehydrated!==null?(Er(n),n.flags|=128,null):(o&n.child.childLanes)!==0?i0(a,n,o):(Er(n),a=Gn(a,n,o),a!==null?a.sibling:null);Er(n);break;case 19:var m=(a.flags&128)!==0;if(i=(o&n.childLanes)!==0,i||(yo(a,n,o,!1),i=(o&n.childLanes)!==0),m){if(i)return u0(a,n,o);n.flags|=128}if(m=n.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),W(da,da.current),i)break;return null;case 22:return n.lanes=0,s0(a,n,o,n.pendingProps);case 24:Cr(n,ma,a.memoizedState.cache)}return Gn(a,n,o)}function x0(a,n,o){if(a!==null)if(a.memoizedProps!==n.pendingProps)ga=!0;else{if(!Nm(a,o)&&(n.flags&128)===0)return ga=!1,q5(a,n,o);ga=(a.flags&131072)!==0}else ga=!1,gt&&(n.flags&1048576)!==0&&$v(n,Mc,n.index);switch(n.lanes=0,n.tag){case 16:e:{var i=n.pendingProps;if(a=Cl(n.elementType),n.type=a,typeof a=="function")Ep(a)?(i=El(a,i),n.tag=1,n=o0(null,n,a,i,o)):(n.tag=0,n=fm(null,n,a,i,o));else{if(a!=null){var m=a.$$typeof;if(m===_){n.tag=11,n=e0(null,n,a,i,o);break e}else if(m===R){n.tag=14,n=t0(null,n,a,i,o);break e}}throw n=le(a)||a,Error(l(306,n,""))}}return n;case 0:return fm(a,n,n.type,n.pendingProps,o);case 1:return i=n.type,m=El(i,n.pendingProps),o0(a,n,i,m,o);case 3:e:{if(Ne(n,n.stateNode.containerInfo),a===null)throw Error(l(387));i=n.pendingProps;var h=n.memoizedState;m=h.element,Hp(a,n),zc(n,i,null,o);var C=n.memoizedState;if(i=C.cache,Cr(n,ma,i),i!==h.cache&&Pp(n,[ma],o,!0),Pc(),i=C.element,h.isDehydrated)if(h={element:i,isDehydrated:!1,cache:C.cache},n.updateQueue.baseState=h,n.memoizedState=h,n.flags&256){n=c0(a,n,i,o);break e}else if(i!==m){m=Fs(Error(l(424)),n),Lc(m),n=c0(a,n,i,o);break e}else{switch(a=n.stateNode.containerInfo,a.nodeType){case 9:a=a.body;break;default:a=a.nodeName==="HTML"?a.ownerDocument.body:a}for(Xt=Qs(a.firstChild),_a=n,gt=!0,jr=null,$s=!0,o=sb(n,null,i,o),n.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling}else{if(bl(),i===m){n=Gn(a,n,o);break e}Pa(a,n,i,o)}n=n.child}return n;case 26:return Bd(a,n),a===null?(o=C1(n.type,null,n.pendingProps,null))?n.memoizedState=o:gt||(o=n.type,a=n.pendingProps,i=su(pe.current).createElement(o),i[aa]=n,i[ya]=a,za(i,o,a),Tt(i),n.stateNode=i):n.memoizedState=C1(n.type,a.memoizedProps,n.pendingProps,a.memoizedState),null;case 27:return Ce(n),a===null&>&&(i=n.stateNode=y1(n.type,n.pendingProps,pe.current),_a=n,$s=!0,m=Xt,Pr(n.type)?(tf=m,Xt=Qs(i.firstChild)):Xt=m),Pa(a,n,n.pendingProps.children,o),Bd(a,n),a===null&&(n.flags|=4194304),n.child;case 5:return a===null&>&&((m=i=Xt)&&(i=bA(i,n.type,n.pendingProps,$s),i!==null?(n.stateNode=i,_a=n,Xt=Qs(i.firstChild),$s=!1,m=!0):m=!1),m||Nr(n)),Ce(n),m=n.type,h=n.pendingProps,C=a!==null?a.memoizedProps:null,i=h.children,Ym(m,h)?i=null:C!==null&&Ym(m,C)&&(n.flags|=32),n.memoizedState!==null&&(m=Kp(a,n,_5,null,null,o),si._currentValue=m),Bd(a,n),Pa(a,n,i,o),n.child;case 6:return a===null&>&&((a=o=Xt)&&(o=yA(o,n.pendingProps,$s),o!==null?(n.stateNode=o,_a=n,Xt=null,a=!0):a=!1),a||Nr(n)),null;case 13:return i0(a,n,o);case 4:return Ne(n,n.stateNode.containerInfo),i=n.pendingProps,a===null?n.child=Al(n,null,i,o):Pa(a,n,i,o),n.child;case 11:return e0(a,n,n.type,n.pendingProps,o);case 7:return Pa(a,n,n.pendingProps,o),n.child;case 8:return Pa(a,n,n.pendingProps.children,o),n.child;case 12:return Pa(a,n,n.pendingProps.children,o),n.child;case 10:return i=n.pendingProps,Cr(n,n.type,i.value),Pa(a,n,i.children,o),n.child;case 9:return m=n.type._context,i=n.pendingProps.children,jl(n),m=Oa(m),i=i(m),n.flags|=1,Pa(a,n,i,o),n.child;case 14:return t0(a,n,n.type,n.pendingProps,o);case 15:return a0(a,n,n.type,n.pendingProps,o);case 19:return u0(a,n,o);case 31:return H5(a,n,o);case 22:return s0(a,n,o,n.pendingProps);case 24:return jl(n),i=Oa(ma),a===null?(m=Ip(),m===null&&(m=Bt,h=zp(),m.pooledCache=h,h.refCount++,h!==null&&(m.pooledCacheLanes|=o),m=h),n.memoizedState={parent:i,
vendor: 9,363 bytes, line 48
48cache:m},Fp(n),Cr(n,ma,m)):((a.lanes&o)!==0&&(Hp(a,n),zc(n,null,null,o),Pc()),m=a.memoizedState,h=n.memoizedState,m.parent!==i?(m={parent:i,cache:i},n.memoizedState=m,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=m),Cr(n,ma,i)):(i=h.cache,Cr(n,ma,i),i!==m.cache&&Pp(n,[ma],o,!0))),Pa(a,n,n.pendingProps.children,o),n.child;case 29:throw n.pendingProps}throw Error(l(156,n.tag))}function Vn(a){a.flags|=4}function Cm(a,n,o,i,m){if((n=(a.mode&32)!==0)&&(n=!1),n){if(a.flags|=16777216,(m&335544128)===m)if(a.stateNode.complete)a.flags|=8192;else if(I0())a.flags|=8192;else throw wl=Ad,Bp}else a.flags&=-16777217}function p0(a,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!D1(n))if(I0())a.flags|=8192;else throw wl=Ad,Bp}function Hd(a,n){n!==null&&(a.flags|=4),a.flags&16384&&(n=a.tag!==22?ft():536870912,a.lanes|=n,Ro|=n)}function qc(a,n){if(!gt)switch(a.tailMode){case"hidden":n=a.tail;for(var o=null;n!==null;)n.alternate!==null&&(o=n),n=n.sibling;o===null?a.tail=null:o.sibling=null;break;case"collapsed":o=a.tail;for(var i=null;o!==null;)o.alternate!==null&&(i=o),o=o.sibling;i===null?n||a.tail===null?a.tail=null:a.tail.sibling=null:i.sibling=null}}function Zt(a){var n=a.alternate!==null&&a.alternate.child===a.child,o=0,i=0;if(n)for(var m=a.child;m!==null;)o|=m.lanes|m.childLanes,i|=m.subtreeFlags&65011712,i|=m.flags&65011712,m.return=a,m=m.sibling;else for(m=a.child;m!==null;)o|=m.lanes|m.childLanes,i|=m.subtreeFlags,i|=m.flags,m.return=a,m=m.sibling;return a.subtreeFlags|=i,a.childLanes=o,n}function $5(a,n,o){var i=n.pendingProps;switch(kp(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Zt(n),null;case 1:return Zt(n),null;case 3:return o=n.stateNode,i=null,a!==null&&(i=a.memoizedState.cache),n.memoizedState.cache!==i&&(n.flags|=2048),$n(ma),Se(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(a===null||a.child===null)&&(bo(n)?Vn(n):a===null||a.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Tp())),Zt(n),null;case 26:var m=n.type,h=n.memoizedState;return a===null?(Vn(n),h!==null?(Zt(n),p0(n,h)):(Zt(n),Cm(n,m,null,i,o))):h?h!==a.memoizedState?(Vn(n),Zt(n),p0(n,h)):(Zt(n),n.flags&=-16777217):(a=a.memoizedProps,a!==i&&Vn(n),Zt(n),Cm(n,m,a,i,o)),null;case 27:if(ke(n),o=pe.current,m=n.type,a!==null&&n.stateNode!=null)a.memoizedProps!==i&&Vn(n);else{if(!i){if(n.stateNode===null)throw Error(l(166));return Zt(n),null}a=H.current,bo(n)?Qv(n):(a=y1(m,i,o),n.stateNode=a,Vn(n))}return Zt(n),null;case 5:if(ke(n),m=n.type,a!==null&&n.stateNode!=null)a.memoizedProps!==i&&Vn(n);else{if(!i){if(n.stateNode===null)throw Error(l(166));return Zt(n),null}if(h=H.current,bo(n))Qv(n);else{var C=su(pe.current);switch(h){case 1:h=C.createElementNS("http://www.w3.org/2000/svg",m);break;case 2:h=C.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;default:switch(m){case"svg":h=C.createElementNS("http://www.w3.org/2000/svg",m);break;case"math":h=C.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;case"script":h=C.createElement("div"),h.innerHTML="<script><\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof i.is=="string"?C.createElement("select",{is:i.is}):C.createElement("select"),i.multiple?h.multiple=!0:i.size&&(h.size=i.size);break;default:h=typeof i.is=="string"?C.createElement(m,{is:i.is}):C.createElement(m)}}h[aa]=n,h[ya]=i;e:for(C=n.child;C!==null;){if(C.tag===5||C.tag===6)h.appendChild(C.stateNode);else if(C.tag!==4&&C.tag!==27&&C.child!==null){C.child.return=C,C=C.child;continue}if(C===n)break e;for(;C.sibling===null;){if(C.return===null||C.return===n)break e;C=C.return}C.sibling.return=C.return,C=C.sibling}n.stateNode=h;e:switch(za(h,m,i),m){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&Vn(n)}}return Zt(n),Cm(n,n.type,a===null?null:a.memoizedProps,n.pendingProps,o),null;case 6:if(a&&n.stateNode!=null)a.memoizedProps!==i&&Vn(n);else{if(typeof i!="string"&&n.stateNode===null)throw Error(l(166));if(a=pe.current,bo(n)){if(a=n.stateNode,o=n.memoizedProps,i=null,m=_a,m!==null)switch(m.tag){case 27:case 5:i=m.memoizedProps}a[aa]=n,a=!!(a.nodeValue===o||i!==null&&i.suppressHydrationWarning===!0||i1(a.nodeValue,o)),a||Nr(n,!0)}else a=su(a).createTextNode(i),a[aa]=n,n.stateNode=a}return Zt(n),null;case 31:if(o=n.memoizedState,a===null||a.memoizedState!==null){if(i=bo(n),o!==null){if(a===null){if(!i)throw Error(l(318));if(a=n.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(l(557));a[aa]=n}else bl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Zt(n),a=!1}else o=Tp(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=o),a=!0;if(!a)return n.flags&256?(js(n),n):(js(n),null);if((n.flags&128)!==0)throw Error(l(558))}return Zt(n),null;case 13:if(i=n.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(m=bo(n),i!==null&&i.dehydrated!==null){if(a===null){if(!m)throw Error(l(318));if(m=n.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(l(317));m[aa]=n}else bl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Zt(n),m=!1}else m=Tp(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=m),m=!0;if(!m)return n.flags&256?(js(n),n):(js(n),null)}return js(n),(n.flags&128)!==0?(n.lanes=o,n):(o=i!==null,a=a!==null&&a.memoizedState!==null,o&&(i=n.child,m=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(m=i.alternate.memoizedState.cachePool.pool),h=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(h=i.memoizedState.cachePool.pool),h!==m&&(i.flags|=2048)),o!==a&&o&&(n.child.flags|=8192),Hd(n,n.updateQueue),Zt(n),null);case 4:return Se(),a===null&&Wm(n.stateNode.containerInfo),Zt(n),null;case 10:return $n(n.type),Zt(n),null;case 19:if(J(da),i=n.memoizedState,i===null)return Zt(n),null;if(m=(n.flags&128)!==0,h=i.rendering,h===null)if(m)qc(i,!1);else{if(ca!==0||a!==null&&(a.flags&128)!==0)for(a=n.child;a!==null;){if(h=Md(a),h!==null){for(n.flags|=128,qc(i,!1),a=h.updateQueue,n.updateQueue=a,Hd(n,a),n.subtreeFlags=0,a=o,o=n.child;o!==null;)Fv(o,a),o=o.sibling;return W(da,da.current&1|2),gt&&Hn(n,i.treeForkCount),n.child}a=a.sibling}i.tail!==null&&Pe()>Gd&&(n.flags|=128,m=!0,qc(i,!1),n.lanes=4194304)}else{if(!m)if(a=Md(h),a!==null){if(n.flags|=128,m=!0,a=a.updateQueue,n.updateQueue=a,Hd(n,a),qc(i,!0),i.tail===null&&i.tailMode==="hidden"&&!h.alternate&&!gt)return Zt(n),null}else 2*Pe()-i.renderingStartTime>Gd&&o!==536870912&&(n.flags|=128,m=!0,qc(i,!1),n.lanes=4194304);i.isBackwards?(h.sibling=n.child,n.child=h):(a=i.last,a!==null?a.sibling=h:n.child=h,i.last=h)}return i.tail!==null?(a=i.tail,i.rendering=a,i.tail=a.sibling,i.renderingStartTime=Pe(),a.sibling=null,o=da.current,W(da,m?o&1|2:o&1),gt&&Hn(n,i.treeForkCount),a):(Zt(n),null);case 22:case 23:return js(n),Qp(),i=n.memoizedState!==null,a!==null?a.memoizedState!==null!==i&&(n.flags|=8192):i&&(n.flags|=8192),i?(o&536870912)!==0&&(n.flags&128)===0&&(Zt(n),n.subtreeFlags&6&&(n.flags|=8192)):Zt(n),o=n.updateQueue,o!==null&&Hd(n,o.retryQueue),o=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(o=a.memoizedState.cachePool.pool),i=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),i!==o&&(n.flags|=2048),a!==null&&J(Nl),null;case 24:return o=null,a!==null&&(o=a.memoizedState.cache),n.memoizedState.cache!==o&&(n.flags|=2048),$n(ma),Zt(n),null;case 25:return null;case 30:return null}throw Error(l(156,n.tag))}function W5(a,n){switch(kp(n),n.tag){case 1:return a=n.flags,a&65536?(n.flags=a&-65537|128,n):null;case 3:return $n(ma),Se(),a=n.flags,(a&65536)!==0&&(a&128)===0?(n.flags=a&-65537|128,n):null;case 26:case 27:case 5:return ke(n),null;case 31:if(n.memoizedState!==null){if(js(n),n.alternate===null)throw Error(l(340));bl()}return a=n.flags,a&65536?(n.flags=a&-65537|128,n):null;case 13:if(js(n),a=n.memoizedState,a!==null&&a.dehydrated!==null){if(n.alternate===null)throw Error(l(340));bl()}return a=n.flags,a&65536?(n.flags=a&-65537|128,n):null;case 19:return J(da),null;case 4:return Se(),null;case 10:return $n(n.type),null;case 22:case 23:return js(n),Qp(),a!==null&&J(Nl),a=n.flags,a&65536?(n.flags=a&-65537|128,n):null;case 24:return $n(ma),null;case 25:return null;default:return null}}function m0(a,n){switch(kp(n),n.tag){case 3:$n(ma),Se();break;case 26:case 27:case 5:ke(n);break;case 4:Se();break;case 31:n.memoizedState!==null&&js(n);break;case 13:js(n);break;case 19:J(da);break;case 10:$n(n.type);break;case 22:case 23:js(n),Qp(),a!==null&&J(Nl);break;case 24:$n(ma)}}function $c(a,n){try{var o=n.updateQueue,i=o!==null?o.lastEffect:null;if(i!==null){var m=i.next;o=m;do{if((o.tag&a)===a){i=void 0;var h=o.create,C=o.inst;i=h(),C.destroy=i}o=o.next}while(o!==m)}}catch(L){Ot(n,n.return,L)}}function Mr(a,n,o){try{var i=n.updateQueue,m=i!==null?i.lastEffect:null;if(m!==null){var h=m.next;i=h;do{if((i.tag&a)===a){var C=i.inst,L=C.destroy;if(L!==void 0){C.destroy=void 0,m=n;var $=o,ne=L;try{ne()}catch(me){Ot(m,$,me)}}}i=i.next}while(i!==h)}}catch(me){Ot(n,n.return,me)}}function f0(a){var n=a.updateQueue;if(n!==null){var o=a.stateNode;try{rb(n,o)}catch(i){Ot(a,a.return,i)}}}function g0(a,n,o){o.props=El(a.type,a.memoizedProps),o.state=a.memoizedState;
vendor: 16,841 bytes, line 48
48try{o.componentWillUnmount()}catch(i){Ot(a,n,i)}}function Wc(a,n){try{var o=a.ref;if(o!==null){switch(a.tag){case 26:case 27:case 5:var i=a.stateNode;break;case 30:i=a.stateNode;break;default:i=a.stateNode}typeof o=="function"?a.refCleanup=o(i):o.current=i}}catch(m){Ot(a,n,m)}}function wn(a,n){var o=a.ref,i=a.refCleanup;if(o!==null)if(typeof i=="function")try{i()}catch(m){Ot(a,n,m)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(m){Ot(a,n,m)}else o.current=null}function h0(a){var n=a.type,o=a.memoizedProps,i=a.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":o.autoFocus&&i.focus();break e;case"img":o.src?i.src=o.src:o.srcSet&&(i.srcset=o.srcSet)}}catch(m){Ot(a,a.return,m)}}function wm(a,n,o){try{var i=a.stateNode;pA(i,a.type,o,n),i[ya]=n}catch(m){Ot(a,a.return,m)}}function v0(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&Pr(a.type)||a.tag===4}function Am(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||v0(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&Pr(a.type)||a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function Sm(a,n,o){var i=a.tag;if(i===5||i===6)a=a.stateNode,n?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(a,n):(n=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,n.appendChild(a),o=o._reactRootContainer,o!=null||n.onclick!==null||(n.onclick=In));else if(i!==4&&(i===27&&Pr(a.type)&&(o=a.stateNode,n=null),a=a.child,a!==null))for(Sm(a,n,o),a=a.sibling;a!==null;)Sm(a,n,o),a=a.sibling}function qd(a,n,o){var i=a.tag;if(i===5||i===6)a=a.stateNode,n?o.insertBefore(a,n):o.appendChild(a);else if(i!==4&&(i===27&&Pr(a.type)&&(o=a.stateNode),a=a.child,a!==null))for(qd(a,n,o),a=a.sibling;a!==null;)qd(a,n,o),a=a.sibling}function b0(a){var n=a.stateNode,o=a.memoizedProps;try{for(var i=a.type,m=n.attributes;m.length;)n.removeAttributeNode(m[0]);za(n,i,o),n[aa]=a,n[ya]=o}catch(h){Ot(a,a.return,h)}}var Kn=!1,ha=!1,Em=!1,y0=typeof WeakSet=="function"?WeakSet:Set,Da=null;function Q5(a,n){if(a=a.containerInfo,Vm=du,a=Rv(a),yp(a)){if("selectionStart"in a)var o={start:a.selectionStart,end:a.selectionEnd};else e:{o=(o=a.ownerDocument)&&o.defaultView||window;var i=o.getSelection&&o.getSelection();if(i&&i.rangeCount!==0){o=i.anchorNode;var m=i.anchorOffset,h=i.focusNode;i=i.focusOffset;try{o.nodeType,h.nodeType}catch{o=null;break e}var C=0,L=-1,$=-1,ne=0,me=0,be=a,re=null;t:for(;;){for(var ie;be!==o||m!==0&&be.nodeType!==3||(L=C+m),be!==h||i!==0&&be.nodeType!==3||($=C+i),be.nodeType===3&&(C+=be.nodeValue.length),(ie=be.firstChild)!==null;)re=be,be=ie;for(;;){if(be===a)break t;if(re===o&&++ne===m&&(L=C),re===h&&++me===i&&($=C),(ie=be.nextSibling)!==null)break;be=re,re=be.parentNode}be=ie}o=L===-1||$===-1?null:{start:L,end:$}}else o=null}o=o||{start:0,end:0}}else o=null;for(Km={focusedElem:a,selectionRange:o},du=!1,Da=n;Da!==null;)if(n=Da,a=n.child,(n.subtreeFlags&1028)!==0&&a!==null)a.return=n,Da=a;else for(;Da!==null;){switch(n=Da,h=n.alternate,a=n.flags,n.tag){case 0:if((a&4)!==0&&(a=n.updateQueue,a=a!==null?a.events:null,a!==null))for(o=0;o<a.length;o++)m=a[o],m.ref.impl=m.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&h!==null){a=void 0,o=n,m=h.memoizedProps,h=h.memoizedState,i=o.stateNode;try{var Te=El(o.type,m);a=i.getSnapshotBeforeUpdate(Te,h),i.__reactInternalSnapshotBeforeUpdate=a}catch($e){Ot(o,o.return,$e)}}break;case 3:if((a&1024)!==0){if(a=n.stateNode.containerInfo,o=a.nodeType,o===9)Zm(a);else if(o===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":Zm(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(l(163))}if(a=n.sibling,a!==null){a.return=n.return,Da=a;break}Da=n.return}}function j0(a,n,o){var i=o.flags;switch(o.tag){case 0:case 11:case 15:Xn(a,o),i&4&&$c(5,o);break;case 1:if(Xn(a,o),i&4)if(a=o.stateNode,n===null)try{a.componentDidMount()}catch(C){Ot(o,o.return,C)}else{var m=El(o.type,n.memoizedProps);n=n.memoizedState;try{a.componentDidUpdate(m,n,a.__reactInternalSnapshotBeforeUpdate)}catch(C){Ot(o,o.return,C)}}i&64&&f0(o),i&512&&Wc(o,o.return);break;case 3:if(Xn(a,o),i&64&&(a=o.updateQueue,a!==null)){if(n=null,o.child!==null)switch(o.child.tag){case 27:case 5:n=o.child.stateNode;break;case 1:n=o.child.stateNode}try{rb(a,n)}catch(C){Ot(o,o.return,C)}}break;case 27:n===null&&i&4&&b0(o);case 26:case 5:Xn(a,o),n===null&&i&4&&h0(o),i&512&&Wc(o,o.return);break;case 12:Xn(a,o);break;case 31:Xn(a,o),i&4&&w0(a,o);break;case 13:Xn(a,o),i&4&&A0(a,o),i&64&&(a=o.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(o=tA.bind(null,o),jA(a,o))));break;case 22:if(i=o.memoizedState!==null||Kn,!i){n=n!==null&&n.memoizedState!==null||ha,m=Kn;var h=ha;Kn=i,(ha=n)&&!h?Zn(a,o,(o.subtreeFlags&8772)!==0):Xn(a,o),Kn=m,ha=h}break;case 30:break;default:Xn(a,o)}}function N0(a){var n=a.alternate;n!==null&&(a.alternate=null,N0(n)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(n=a.stateNode,n!==null&&yn(n)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var ea=null,ns=!1;function Yn(a,n,o){for(o=o.child;o!==null;)C0(a,n,o),o=o.sibling}function C0(a,n,o){if(Vt&&typeof Vt.onCommitFiberUnmount=="function")try{Vt.onCommitFiberUnmount(Gt,o)}catch{}switch(o.tag){case 26:ha||wn(o,n),Yn(a,n,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:ha||wn(o,n);var i=ea,m=ns;Pr(o.type)&&(ea=o.stateNode,ns=!1),Yn(a,n,o),ei(o.stateNode),ea=i,ns=m;break;case 5:ha||wn(o,n);case 6:if(i=ea,m=ns,ea=null,Yn(a,n,o),ea=i,ns=m,ea!==null)if(ns)try{(ea.nodeType===9?ea.body:ea.nodeName==="HTML"?ea.ownerDocument.body:ea).removeChild(o.stateNode)}catch(h){Ot(o,n,h)}else try{ea.removeChild(o.stateNode)}catch(h){Ot(o,n,h)}break;case 18:ea!==null&&(ns?(a=ea,f1(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,o.stateNode),Bo(a)):f1(ea,o.stateNode));break;case 4:i=ea,m=ns,ea=o.stateNode.containerInfo,ns=!0,Yn(a,n,o),ea=i,ns=m;break;case 0:case 11:case 14:case 15:Mr(2,o,n),ha||Mr(4,o,n),Yn(a,n,o);break;case 1:ha||(wn(o,n),i=o.stateNode,typeof i.componentWillUnmount=="function"&&g0(o,n,i)),Yn(a,n,o);break;case 21:Yn(a,n,o);break;case 22:ha=(i=ha)||o.memoizedState!==null,Yn(a,n,o),ha=i;break;default:Yn(a,n,o)}}function w0(a,n){if(n.memoizedState===null&&(a=n.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{Bo(a)}catch(o){Ot(n,n.return,o)}}}function A0(a,n){if(n.memoizedState===null&&(a=n.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{Bo(a)}catch(o){Ot(n,n.return,o)}}function G5(a){switch(a.tag){case 31:case 13:case 19:var n=a.stateNode;return n===null&&(n=a.stateNode=new y0),n;case 22:return a=a.stateNode,n=a._retryCache,n===null&&(n=a._retryCache=new y0),n;default:throw Error(l(435,a.tag))}}function $d(a,n){var o=G5(a);n.forEach(function(i){if(!o.has(i)){o.add(i);var m=aA.bind(null,a,i);i.then(m,m)}})}function rs(a,n){var o=n.deletions;if(o!==null)for(var i=0;i<o.length;i++){var m=o[i],h=a,C=n,L=C;e:for(;L!==null;){switch(L.tag){case 27:if(Pr(L.type)){ea=L.stateNode,ns=!1;break e}break;case 5:ea=L.stateNode,ns=!1;break e;case 3:case 4:ea=L.stateNode.containerInfo,ns=!0;break e}L=L.return}if(ea===null)throw Error(l(160));C0(h,C,m),ea=null,ns=!1,h=m.alternate,h!==null&&(h.return=null),m.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)S0(n,a),n=n.sibling}var sn=null;function S0(a,n){var o=a.alternate,i=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:rs(n,a),ls(a),i&4&&(Mr(3,a,a.return),$c(3,a),Mr(5,a,a.return));break;case 1:rs(n,a),ls(a),i&512&&(ha||o===null||wn(o,o.return)),i&64&&Kn&&(a=a.updateQueue,a!==null&&(i=a.callbacks,i!==null&&(o=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=o===null?i:o.concat(i))));break;case 26:var m=sn;if(rs(n,a),ls(a),i&512&&(ha||o===null||wn(o,o.return)),i&4){var h=o!==null?o.memoizedState:null;if(i=a.memoizedState,o===null)if(i===null)if(a.stateNode===null){e:{i=a.type,o=a.memoizedProps,m=m.ownerDocument||m;t:switch(i){case"title":h=m.getElementsByTagName("title")[0],(!h||h[tn]||h[aa]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=m.createElement(i),m.head.insertBefore(h,m.querySelector("head > title"))),za(h,i,o),h[aa]=a,Tt(h),i=h;break e;case"link":var C=S1("link","href",m).get(i+(o.href||""));if(C){for(var L=0;L<C.length;L++)if(h=C[L],h.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&h.getAttribute("rel")===(o.rel==null?null:o.rel)&&h.getAttribute("title")===(o.title==null?null:o.title)&&h.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){C.splice(L,1);break t}}h=m.createElement(i),za(h,i,o),m.head.appendChild(h);break;case"meta":if(C=S1("meta","content",m).get(i+(o.content||""))){for(L=0;L<C.length;L++)if(h=C[L],h.getAttribute("content")===(o.content==null?null:""+o.content)&&h.getAttribute("name")===(o.name==null?null:o.name)&&h.getAttribute("property")===(o.property==null?null:o.property)&&h.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&h.getAttribute("charset")===(o.charSet==null?null:o.charSet)){C.splice(L,1);break t}}h=m.createElement(i),za(h,i,o),m.head.appendChild(h);break;default:throw Error(l(468,i))}h[aa]=a,Tt(h),i=h}a.stateNode=i}else E1(m,a.type,a.stateNode);else a.stateNode=A1(m,i,a.memoizedProps);else h!==i?(h===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):h.count--,i===null?E1(m,a.type,a.stateNode):A1(m,i,a.memoizedProps)):i===null&&a.stateNode!==null&&wm(a,a.memoizedProps,o.memoizedProps)}break;case 27:rs(n,a),ls(a),i&512&&(ha||o===null||wn(o,o.return)),o!==null&&i&4&&wm(a,a.memoizedProps,o.memoizedProps);break;case 5:if(rs(n,a),ls(a),i&512&&(ha||o===null||wn(o,o.return)),a.flags&32){m=a.stateNode;try{co(m,"")}catch(Te){Ot(a,a.return,Te)}}i&4&&a.stateNode!=null&&(m=a.memoizedProps,wm(a,m,o!==null?o.memoizedProps:m)),i&1024&&(Em=!0);break;case 6:if(rs(n,a),ls(a),i&4){if(a.stateNode===null)throw Error(l(162));i=a.memoizedProps,o=a.stateNode;try{o.nodeValue=i}catch(Te){Ot(a,a.return,Te)}}break;case 3:if(lu=null,m=sn,sn=nu(n.containerInfo),rs(n,a),sn=m,ls(a),i&4&&o!==null&&o.memoizedState.isDehydrated)try{Bo(n.containerInfo)}catch(Te){Ot(a,a.return,Te)}Em&&(Em=!1,E0(a));break;case 4:i=sn,sn=nu(a.stateNode.containerInfo),rs(n,a),ls(a),sn=i;break;case 12:rs(n,a),ls(a);break;case 31:rs(n,a),ls(a),i&4&&(i=a.updateQueue,i!==null&&(a.updateQueue=null,$d(a,i)));break;case 13:rs(n,a),ls(a),a.child.flags&8192&&a.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(Qd=Pe()),i&4&&(i=a.updateQueue,i!==null&&(a.updateQueue=null,$d(a,i)));break;case 22:m=a.memoizedState!==null;var $=o!==null&&o.memoizedState!==null,ne=Kn,me=ha;if(Kn=ne||m,ha=me||$,rs(n,a),ha=me,Kn=ne,ls(a),i&8192)e:for(n=a.stateNode,n._visibility=m?n._visibility&-2:n._visibility|1,m&&(o===null||$||Kn||ha||Dl(a)),o=null,n=a;;){if(n.tag===5||n.tag===26){if(o===null){$=o=n;try{if(h=$.stateNode,m)C=h.style,typeof C.setProperty=="function"?C.setProperty("display","none","important"):C.display="none";else{L=$.stateNode;var be=$.memoizedProps.style,re=be!=null&&be.hasOwnProperty("display")?be.display:null;L.style.display=re==null||typeof re=="boolean"?"":(""+re).trim()}}catch(Te){Ot($,$.return,Te)}}}else if(n.tag===6){if(o===null){$=n;try{$.stateNode.nodeValue=m?"":$.memoizedProps}catch(Te){Ot($,$.return,Te)}}}else if(n.tag===18){if(o===null){$=n;try{var ie=$.stateNode;m?g1(ie,!0):g1($.stateNode,!1)}catch(Te){Ot($,$.return,Te)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===a)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===a)break e;for(;n.sibling===null;){if(n.return===null||n.return===a)break e;o===n&&(o=null),n=n.return}o===n&&(o=null),n.sibling.return=n.return,n=n.sibling}i&4&&(i=a.updateQueue,i!==null&&(o=i.retryQueue,o!==null&&(i.retryQueue=null,$d(a,o))));break;case 19:rs(n,a),ls(a),i&4&&(i=a.updateQueue,i!==null&&(a.updateQueue=null,$d(a,i)));break;case 30:break;case 21:break;default:rs(n,a),ls(a)}}function ls(a){var n=a.flags;if(n&2){try{for(var o,i=a.return;i!==null;){if(v0(i)){o=i;break}i=i.return}if(o==null)throw Error(l(160));switch(o.tag){case 27:var m=o.stateNode,h=Am(a);qd(a,h,m);break;case 5:var C=o.stateNode;o.flags&32&&(co(C,""),o.flags&=-33);var L=Am(a);qd(a,L,C);break;case 3:case 4:var $=o.stateNode.containerInfo,ne=Am(a);Sm(a,ne,$);break;default:throw Error(l(161))}}catch(me){Ot(a,a.return,me)}a.flags&=-3}n&4096&&(a.flags&=-4097)}function E0(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var n=a;E0(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),a=a.sibling}}function Xn(a,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)j0(a,n.alternate,n),n=n.sibling}function Dl(a){for(a=a.child;a!==null;){var n=a;switch(n.tag){case 0:case 11:case 14:case 15:Mr(4,n,n.return),Dl(n);break;case 1:wn(n,n.return);var o=n.stateNode;typeof o.componentWillUnmount=="function"&&g0(n,n.return,o),Dl(n);break;case 27:ei(n.stateNode);case 26:case 5:wn(n,n.return),Dl(n);break;case 22:n.memoizedState===null&&Dl(n);break;case 30:Dl(n);break;default:Dl(n)}a=a.sibling}}function Zn(a,n,o){for(o=o&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var i=n.alternate,m=a,h=n,C=h.flags;switch(h.tag){case 0:case 11:case 15:Zn(m,h,o),$c(4,h);break;case 1:if(Zn(m,h,o),i=h,m=i.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(ne){Ot(i,i.return,ne)}if(i=h,m=i.updateQueue,m!==null){var L=i.stateNode;try{var $=m.shared.hiddenCallbacks;if($!==null)for(m.shared.hiddenCallbacks=null,m=0;m<$.length;m++)nb($[m],L)}catch(ne){Ot(i,i.return,ne)}}o&&C&64&&f0(h),Wc(h,h.return);break;case 27:b0(h);case 26:case 5:Zn(m,h,o),o&&i===null&&C&4&&h0(h),Wc(h,h.return);break;case 12:Zn(m,h,o);break;case 31:Zn(m,h,o),o&&C&4&&w0(m,h);break;case 13:Zn(m,h,o),o&&C&4&&A0(m,h);break;case 22:h.memoizedState===null&&Zn(m,h,o),Wc(h,h.return);break;case 30:break;default:Zn(m,h,o)}n=n.sibling}}function Dm(a,n){var o=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(o=a.memoizedState.cachePool.pool),a=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(a=n.memoizedState.cachePool.pool),a!==o&&(a!=null&&a.refCount++,o!=null&&kc(o))}function Mm(a,n){a=null,n.alternate!==null&&(a=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==a&&(n.refCount++,a!=null&&kc(a))}function nn(a,n,o,i){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)D0(a,n,o,i),n=n.sibling}function D0(a,n,o,i){var m=n.flags;switch(n.tag){case 0:case 11:case 15:nn(a,n,o,i),m&2048&&$c(9,n);break;case 1:nn(a,n,o,i);break;case 3:nn(a,n,o,i),m&2048&&(a=null,n.alternate!==null&&(a=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==a&&(n.refCount++,a!=null&&kc(a)));break;case 12:if(m&2048){nn(a,n,o,i),a=n.stateNode;try{var h=n.memoizedProps,C=h.id,L=h.onPostCommit;typeof L=="function"&&L(C,n.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch($){Ot(n,n.return,$)}}else nn(a,n,o,i);break;case 31:nn(a,n,o,i);break;case 13:nn(a,n,o,i);break;case 23:break;case 22:h=n.stateNode,C=n.alternate,n.memoizedState!==null?h._visibility&2?nn(a,n,o,i):Qc(a,n):h._visibility&2?nn(a,n,o,i):(h._visibility|=2,Mo(a,n,o,i,(n.subtreeFlags&10256)!==0||!1)),m&2048&&Dm(C,n);break;case 24:nn(a,n,o,i),m&2048&&Mm(n.alternate,n);break;default:nn(a,n,o,i)}}function Mo(a,n,o,i,m){for(m=m&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var h=a,C=n,L=o,$=i,ne=C.flags;switch(C.tag){case 0:case 11:case 15:Mo(h,C,L,$,m),$c(8,C);break;case 23:break;case 22:var me=C.stateNode;C.memoizedState!==null?me._visibility&2?Mo(h,C,L,$,m):Qc(h,C):(me._visibility|=2,Mo(h,C,L,$,m)),m&&ne&2048&&Dm(C.alternate,C);break;case 24:Mo(h,C,L,$,m),m&&ne&2048&&Mm(C.alternate,C);break;default:Mo(h,C,L,$,m)}n=n.sibling}}function Qc(a,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var o=a,i=n,m=i.flags;switch(i.tag){case 22:Qc(o,i),m&2048&&Dm(i.alternate,i);break;case 24:Qc(o,i),m&2048&&Mm(i.alternate,i);break;default:Qc(o,i)}n=n.sibling}}var Gc=8192;function Lo(a,n,o){if(a.subtreeFlags&Gc)for(a=a.child;a!==null;)M0(a,n,o),a=a.sibling}function M0(a,n,o){switch(a.tag){case 26:Lo(a,n,o),a.flags&Gc&&a.memoizedState!==null&&TA(o,sn,a.memoizedState,a.memoizedProps);break;case 5:Lo(a,n,o);break;case 3:case 4:var i=sn;sn=nu(a.stateNode.containerInfo),Lo(a,n,o),sn=i;break;case 22:a.memoizedState===null&&(i=a.alternate,i!==null&&i.memoizedState!==null?(i=Gc,Gc=16777216,Lo(a,n,o),Gc=i):Lo(a,n,o));break;default:Lo(a,n,o)}}function L0(a){var n=a.alternate;if(n!==null&&(a=n.child,a!==null)){n.child=null;do n=a.sibling,a.sibling=null,a=n;while(a!==null)}}
vendor: 4,686 bytes, line 48
48function Vc(a){var n=a.deletions;if((a.flags&16)!==0){if(n!==null)for(var o=0;o<n.length;o++){var i=n[o];Da=i,R0(i,a)}L0(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)k0(a),a=a.sibling}function k0(a){switch(a.tag){case 0:case 11:case 15:Vc(a),a.flags&2048&&Mr(9,a,a.return);break;case 3:Vc(a);break;case 12:Vc(a);break;case 22:var n=a.stateNode;a.memoizedState!==null&&n._visibility&2&&(a.return===null||a.return.tag!==13)?(n._visibility&=-3,Wd(a)):Vc(a);break;default:Vc(a)}}function Wd(a){var n=a.deletions;if((a.flags&16)!==0){if(n!==null)for(var o=0;o<n.length;o++){var i=n[o];Da=i,R0(i,a)}L0(a)}for(a=a.child;a!==null;){switch(n=a,n.tag){case 0:case 11:case 15:Mr(8,n,n.return),Wd(n);break;case 22:o=n.stateNode,o._visibility&2&&(o._visibility&=-3,Wd(n));break;default:Wd(n)}a=a.sibling}}function R0(a,n){for(;Da!==null;){var o=Da;switch(o.tag){case 0:case 11:case 15:Mr(8,o,n);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var i=o.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:kc(o.memoizedState.cache)}if(i=o.child,i!==null)i.return=o,Da=i;else e:for(o=a;Da!==null;){i=Da;var m=i.sibling,h=i.return;if(N0(i),i===o){Da=null;break e}if(m!==null){m.return=h,Da=m;break e}Da=h}}}var V5={getCacheForType:function(a){var n=Oa(ma),o=n.data.get(a);return o===void 0&&(o=a(),n.data.set(a,o)),o},cacheSignal:function(){return Oa(ma).controller.signal}},K5=typeof WeakMap=="function"?WeakMap:Map,At=0,Bt=null,ct=null,xt=0,_t=0,Ns=null,Lr=!1,ko=!1,Lm=!1,Jn=0,ca=0,kr=0,Ml=0,km=0,Cs=0,Ro=0,Kc=null,os=null,Rm=!1,Qd=0,T0=0,Gd=1/0,Vd=null,Rr=null,Na=0,Tr=null,To=null,er=0,Tm=0,_m=null,_0=null,Yc=0,Om=null;function ws(){return(At&2)!==0&&xt!==0?xt&-xt:M.T!==null?Fm():ra()}function O0(){if(Cs===0)if((xt&536870912)===0||gt){var a=$a;$a<<=1,($a&3932160)===0&&($a=262144),Cs=a}else Cs=536870912;return a=ys.current,a!==null&&(a.flags|=32),Cs}function cs(a,n,o){(a===Bt&&(_t===2||_t===9)||a.cancelPendingCommit!==null)&&(_o(a,0),_r(a,xt,Cs,!1)),rt(a,o),((At&2)===0||a!==Bt)&&(a===Bt&&((At&2)===0&&(Ml|=o),ca===4&&_r(a,xt,Cs,!1)),An(a))}function P0(a,n,o){if((At&6)!==0)throw Error(l(327));var i=!o&&(n&127)===0&&(n&a.expiredLanes)===0||tt(a,n),m=i?Z5(a,n):zm(a,n,!0),h=i;do{if(m===0){ko&&!i&&_r(a,n,0,!1);break}else{if(o=a.current.alternate,h&&!Y5(o)){m=zm(a,n,!1),h=!1;continue}if(m===2){if(h=n,a.errorRecoveryDisabledLanes&h)var C=0;else C=a.pendingLanes&-536870913,C=C!==0?C:C&536870912?536870912:0;if(C!==0){n=C;e:{var L=a;m=Kc;var $=L.current.memoizedState.isDehydrated;if($&&(_o(L,C).flags|=256),C=zm(L,C,!1),C!==2){if(Lm&&!$){L.errorRecoveryDisabledLanes|=h,Ml|=h,m=4;break e}h=os,os=m,h!==null&&(os===null?os=h:os.push.apply(os,h))}m=C}if(h=!1,m!==2)continue}}if(m===1){_o(a,0),_r(a,n,0,!0);break}e:{switch(i=a,h=m,h){case 0:case 1:throw Error(l(345));case 4:if((n&4194048)!==n)break;case 6:_r(i,n,Cs,!Lr);break e;case 2:os=null;break;case 3:case 5:break;default:throw Error(l(329))}if((n&62914560)===n&&(m=Qd+300-Pe(),10<m)){if(_r(i,n,Cs,!Lr),Re(i,0,!0)!==0)break e;er=n,i.timeoutHandle=p1(z0.bind(null,i,o,os,Vd,Rm,n,Cs,Ml,Ro,Lr,h,"Throttled",-0,0),m);break e}z0(i,o,os,Vd,Rm,n,Cs,Ml,Ro,Lr,h,null,-0,0)}}break}while(!0);An(a)}function z0(a,n,o,i,m,h,C,L,$,ne,me,be,re,ie){if(a.timeoutHandle=-1,be=n.subtreeFlags,be&8192||(be&16785408)===16785408){be={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:In},M0(n,h,be);var Te=(h&62914560)===h?Qd-Pe():(h&4194048)===h?T0-Pe():0;if(Te=_A(be,Te),Te!==null){er=h,a.cancelPendingCommit=Te(W0.bind(null,a,n,h,o,i,m,C,L,$,me,be,null,re,ie)),_r(a,h,C,!ne);return}}W0(a,n,h,o,i,m,C,L,$)}function Y5(a){for(var n=a;;){var o=n.tag;if((o===0||o===11||o===15)&&n.flags&16384&&(o=n.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var i=0;i<o.length;i++){var m=o[i],h=m.getSnapshot;m=m.value;try{if(!vs(h(),m))return!1}catch{return!1}}if(o=n.child,n.subtreeFlags&16384&&o!==null)o.return=n,n=o;else{if(n===a)break;for(;n.sibling===null;){if(n.return===null||n.return===a)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function _r(a,n,o,i){n&=~km,n&=~Ml,a.suspendedLanes|=n,a.pingedLanes&=~n,i&&(a.warmLanes|=n),i=a.expirationTimes;for(var m=n;0<m;){var h=31-Kt(m),C=1<<h;i[h]=-1,m&=~C}o!==0&&na(a,o,n)}function Kd(){return(At&6)===0?(Xc(0),!1):!0}function Pm(){if(ct!==null){if(_t===0)var a=ct.return;else a=ct,qn=yl=null,Zp(a),wo=null,Tc=0,a=ct;for(;a!==null;)m0(a.alternate,a),a=a.return;ct=null}}function _o(a,n){var o=a.timeoutHandle;o!==-1&&(a.timeoutHandle=-1,gA(o)),o=a.cancelPendingCommit,o!==null&&(a.cancelPendingCommit=null,o()),er=0,Pm(),Bt=a,ct=o=Fn(a.current,null),xt=n,_t=0,Ns=null,
vendor: 4,785 bytes, line 48
48Lr=!1,ko=tt(a,n),Lm=!1,Ro=Cs=km=Ml=kr=ca=0,os=Kc=null,Rm=!1,(n&8)!==0&&(n|=n&32);var i=a.entangledLanes;if(i!==0)for(a=a.entanglements,i&=n;0<i;){var m=31-Kt(i),h=1<<m;n|=a[m],i&=~h}return Jn=n,gd(),o}function U0(a,n){Xe=null,M.H=Fc,n===Co||n===wd?(n=eb(),_t=3):n===Bp?(n=eb(),_t=4):_t=n===mm?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,Ns=n,ct===null&&(ca=1,Ud(a,Fs(n,a.current)))}function I0(){var a=ys.current;return a===null?!0:(xt&4194048)===xt?Ws===null:(xt&62914560)===xt||(xt&536870912)!==0?a===Ws:!1}function B0(){var a=M.H;return M.H=Fc,a===null?Fc:a}function F0(){var a=M.A;return M.A=V5,a}function Yd(){ca=4,Lr||(xt&4194048)!==xt&&ys.current!==null||(ko=!0),(kr&134217727)===0&&(Ml&134217727)===0||Bt===null||_r(Bt,xt,Cs,!1)}function zm(a,n,o){var i=At;At|=2;var m=B0(),h=F0();(Bt!==a||xt!==n)&&(Vd=null,_o(a,n)),n=!1;var C=ca;e:do try{if(_t!==0&&ct!==null){var L=ct,$=Ns;switch(_t){case 8:Pm(),C=6;break e;case 3:case 2:case 9:case 6:ys.current===null&&(n=!0);var ne=_t;if(_t=0,Ns=null,Oo(a,L,$,ne),o&&ko){C=0;break e}break;default:ne=_t,_t=0,Ns=null,Oo(a,L,$,ne)}}X5(),C=ca;break}catch(me){U0(a,me)}while(!0);return n&&a.shellSuspendCounter++,qn=yl=null,At=i,M.H=m,M.A=h,ct===null&&(Bt=null,xt=0,gd()),C}function X5(){for(;ct!==null;)H0(ct)}function Z5(a,n){var o=At;At|=2;var i=B0(),m=F0();Bt!==a||xt!==n?(Vd=null,Gd=Pe()+500,_o(a,n)):ko=tt(a,n);e:do try{if(_t!==0&&ct!==null){n=ct;var h=Ns;t:switch(_t){case 1:_t=0,Ns=null,Oo(a,n,h,1);break;case 2:case 9:if(Zv(h)){_t=0,Ns=null,q0(n);break}n=function(){_t!==2&&_t!==9||Bt!==a||(_t=7),An(a)},h.then(n,n);break e;case 3:_t=7;break e;case 4:_t=5;break e;case 7:Zv(h)?(_t=0,Ns=null,q0(n)):(_t=0,Ns=null,Oo(a,n,h,7));break;case 5:var C=null;switch(ct.tag){case 26:C=ct.memoizedState;case 5:case 27:var L=ct;if(C?D1(C):L.stateNode.complete){_t=0,Ns=null;var $=L.sibling;if($!==null)ct=$;else{var ne=L.return;ne!==null?(ct=ne,Xd(ne)):ct=null}break t}}_t=0,Ns=null,Oo(a,n,h,5);break;case 6:_t=0,Ns=null,Oo(a,n,h,6);break;case 8:Pm(),ca=6;break e;default:throw Error(l(462))}}J5();break}catch(me){U0(a,me)}while(!0);return qn=yl=null,M.H=i,M.A=m,At=o,ct!==null?0:(Bt=null,xt=0,gd(),ca)}function J5(){for(;ct!==null&&!Le();)H0(ct)}function H0(a){var n=x0(a.alternate,a,Jn);a.memoizedProps=a.pendingProps,n===null?Xd(a):ct=n}function q0(a){var n=a,o=n.alternate;switch(n.tag){case 15:case 0:n=l0(o,n,n.pendingProps,n.type,void 0,xt);break;case 11:n=l0(o,n,n.pendingProps,n.type.render,n.ref,xt);break;case 5:Zp(n);default:m0(o,n),n=ct=Fv(n,Jn),n=x0(o,n,Jn)}a.memoizedProps=a.pendingProps,n===null?Xd(a):ct=n}function Oo(a,n,o,i){qn=yl=null,Zp(n),wo=null,Tc=0;var m=n.return;try{if(F5(a,m,n,o,xt)){ca=1,Ud(a,Fs(o,a.current)),ct=null;return}}catch(h){if(m!==null)throw ct=m,h;ca=1,Ud(a,Fs(o,a.current)),ct=null;return}n.flags&32768?(gt||i===1?a=!0:ko||(xt&536870912)!==0?a=!1:(Lr=a=!0,(i===2||i===9||i===3||i===6)&&(i=ys.current,i!==null&&i.tag===13&&(i.flags|=16384))),$0(n,a)):Xd(n)}function Xd(a){var n=a;do{if((n.flags&32768)!==0){$0(n,Lr);return}a=n.return;var o=$5(n.alternate,n,Jn);if(o!==null){ct=o;return}if(n=n.sibling,n!==null){ct=n;return}ct=n=a}while(n!==null);ca===0&&(ca=5)}function $0(a,n){do{var o=W5(a.alternate,a);if(o!==null){o.flags&=32767,ct=o;return}if(o=a.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!n&&(a=a.sibling,a!==null)){ct=a;return}ct=a=o}while(a!==null);ca=6,ct=null}function W0(a,n,o,i,m,h,C,L,$){a.cancelPendingCommit=null;do Zd();while(Na!==0);if((At&6)!==0)throw Error(l(327));if(n!==null){if(n===a.current)throw Error(l(177));if(h=n.lanes|n.childLanes,h|=Ap,ot(a,o,h,C,L,$),a===Bt&&(ct=Bt=null,xt=0),To=n,Tr=a,er=o,Tm=h,_m=m,_0=i,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,sA(X,function(){return Y0(),null})):(a.callbackNode=null,a.callbackPriority=0),i=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||i){i=M.T,M.T=null,m=O.p,O.p=2,C=At,At|=4;try{Q5(a,n,o)}finally{At=C,O.p=m,M.T=i}}Na=1,Q0(),G0(),V0()}}function Q0(){if(Na===1){Na=0;var a=Tr,n=To,o=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||o){o=M.T,M.T=null;var i=O.p;O.p=2;var m=At;At|=4;try{S0(n,a);var h=Km,C=Rv(a.containerInfo),L=h.focusedElem,$=h.selectionRange;if(C!==L&&L&&L.ownerDocument&&kv(L.ownerDocument.documentElement,L)){if($!==null&&yp(L)){var ne=$.start,me=$.end;if(me===void 0&&(me=ne),"selectionStart"in L)L.selectionStart=ne,L.selectionEnd=Math.min(me,L.value.length);else{var be=L.ownerDocument||document,re=be&&be.defaultView||window;if(re.getSelection){var ie=re.getSelection(),Te=L.textContent.length,$e=Math.min($.start,Te),Ut=$.end===void 0?$e:Math.min($.end,Te);!ie.extend&&$e>Ut&&(C=Ut,Ut=$e,$e=C);var ee=Lv(L,$e),G=Lv(L,Ut);if(ee&&G&&(ie.rangeCount!==1||ie.anchorNode!==ee.node||ie.anchorOffset!==ee.offset||ie.focu
vendor: 6,850 bytes, line 48
48sNode!==G.node||ie.focusOffset!==G.offset)){var se=be.createRange();se.setStart(ee.node,ee.offset),ie.removeAllRanges(),$e>Ut?(ie.addRange(se),ie.extend(G.node,G.offset)):(se.setEnd(G.node,G.offset),ie.addRange(se))}}}}for(be=[],ie=L;ie=ie.parentNode;)ie.nodeType===1&&be.push({element:ie,left:ie.scrollLeft,top:ie.scrollTop});for(typeof L.focus=="function"&&L.focus(),L=0;L<be.length;L++){var he=be[L];he.element.scrollLeft=he.left,he.element.scrollTop=he.top}}du=!!Vm,Km=Vm=null}finally{At=m,O.p=i,M.T=o}}a.current=n,Na=2}}function G0(){if(Na===2){Na=0;var a=Tr,n=To,o=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||o){o=M.T,M.T=null;var i=O.p;O.p=2;var m=At;At|=4;try{j0(a,n.alternate,n)}finally{At=m,O.p=i,M.T=o}}Na=3}}function V0(){if(Na===4||Na===3){Na=0,Be();var a=Tr,n=To,o=er,i=_0;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?Na=5:(Na=0,To=Tr=null,K0(a,a.pendingLanes));var m=a.pendingLanes;if(m===0&&(Rr=null),It(o),n=n.stateNode,Vt&&typeof Vt.onCommitFiberRoot=="function")try{Vt.onCommitFiberRoot(Gt,n,void 0,(n.current.flags&128)===128)}catch{}if(i!==null){n=M.T,m=O.p,O.p=2,M.T=null;try{for(var h=a.onRecoverableError,C=0;C<i.length;C++){var L=i[C];h(L.value,{componentStack:L.stack})}}finally{M.T=n,O.p=m}}(er&3)!==0&&Zd(),An(a),m=a.pendingLanes,(o&261930)!==0&&(m&42)!==0?a===Om?Yc++:(Yc=0,Om=a):Yc=0,Xc(0)}}function K0(a,n){(a.pooledCacheLanes&=n)===0&&(n=a.pooledCache,n!=null&&(a.pooledCache=null,kc(n)))}function Zd(){return Q0(),G0(),V0(),Y0()}function Y0(){if(Na!==5)return!1;var a=Tr,n=Tm;Tm=0;var o=It(er),i=M.T,m=O.p;try{O.p=32>o?32:o,M.T=null,o=_m,_m=null;var h=Tr,C=er;if(Na=0,To=Tr=null,er=0,(At&6)!==0)throw Error(l(331));var L=At;if(At|=4,k0(h.current),D0(h,h.current,C,o),At=L,Xc(0,!1),Vt&&typeof Vt.onPostCommitFiberRoot=="function")try{Vt.onPostCommitFiberRoot(Gt,h)}catch{}return!0}finally{O.p=m,M.T=i,K0(a,n)}}function X0(a,n,o){n=Fs(o,n),n=pm(a.stateNode,n,2),a=Sr(a,n,2),a!==null&&(rt(a,2),An(a))}function Ot(a,n,o){if(a.tag===3)X0(a,a,o);else for(;n!==null;){if(n.tag===3){X0(n,a,o);break}else if(n.tag===1){var i=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Rr===null||!Rr.has(i))){a=Fs(o,a),o=Zb(2),i=Sr(n,o,2),i!==null&&(Jb(o,i,n,a),rt(i,2),An(i));break}}n=n.return}}function Um(a,n,o){var i=a.pingCache;if(i===null){i=a.pingCache=new K5;var m=new Set;i.set(n,m)}else m=i.get(n),m===void 0&&(m=new Set,i.set(n,m));m.has(o)||(Lm=!0,m.add(o),a=eA.bind(null,a,n,o),n.then(a,a))}function eA(a,n,o){var i=a.pingCache;i!==null&&i.delete(n),a.pingedLanes|=a.suspendedLanes&o,a.warmLanes&=~o,Bt===a&&(xt&o)===o&&(ca===4||ca===3&&(xt&62914560)===xt&&300>Pe()-Qd?(At&2)===0&&_o(a,0):km|=o,Ro===xt&&(Ro=0)),An(a)}function Z0(a,n){n===0&&(n=ft()),a=hl(a,n),a!==null&&(rt(a,n),An(a))}function tA(a){var n=a.memoizedState,o=0;n!==null&&(o=n.retryLane),Z0(a,o)}function aA(a,n){var o=0;switch(a.tag){case 31:case 13:var i=a.stateNode,m=a.memoizedState;m!==null&&(o=m.retryLane);break;case 19:i=a.stateNode;break;case 22:i=a.stateNode._retryCache;break;default:throw Error(l(314))}i!==null&&i.delete(n),Z0(a,o)}function sA(a,n){return Je(a,n)}var Jd=null,Po=null,Im=!1,eu=!1,Bm=!1,Or=0;function An(a){a!==Po&&a.next===null&&(Po===null?Jd=Po=a:Po=Po.next=a),eu=!0,Im||(Im=!0,rA())}function Xc(a,n){if(!Bm&&eu){Bm=!0;do for(var o=!1,i=Jd;i!==null;){if(a!==0){var m=i.pendingLanes;if(m===0)var h=0;else{var C=i.suspendedLanes,L=i.pingedLanes;h=(1<<31-Kt(42|a)+1)-1,h&=m&~(C&~L),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(o=!0,a1(i,h))}else h=xt,h=Re(i,i===Bt?h:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(h&3)===0||tt(i,h)||(o=!0,a1(i,h));i=i.next}while(o);Bm=!1}}function nA(){J0()}function J0(){eu=Im=!1;var a=0;Or!==0&&fA()&&(a=Or);for(var n=Pe(),o=null,i=Jd;i!==null;){var m=i.next,h=e1(i,n);h===0?(i.next=null,o===null?Jd=m:o.next=m,m===null&&(Po=o)):(o=i,(a!==0||(h&3)!==0)&&(eu=!0)),i=m}Na!==0&&Na!==5||Xc(a),Or!==0&&(Or=0)}function e1(a,n){for(var o=a.suspendedLanes,i=a.pingedLanes,m=a.expirationTimes,h=a.pendingLanes&-62914561;0<h;){var C=31-Kt(h),L=1<<C,$=m[C];$===-1?((L&o)===0||(L&i)!==0)&&(m[C]=ut(L,n)):$<=n&&(a.expiredLanes|=L),h&=~L}if(n=Bt,o=xt,o=Re(a,a===n?o:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),i=a.callbackNode,o===0||a===n&&(_t===2||_t===9)||a.cancelPendingCommit!==null)return i!==null&&i!==null&&q(i),a.callbackNode=null,a.callbackPriority=0;if((o&3)===0||tt(a,o)){if(n=o&-o,n===a.callbackPriority)return n;switch(i!==null&&q(i),It(o)){case 2:case 8:o=qt;break;case 32:o=X;break;case 268435456:o=et;break;default:o=X}return i=t1.bind(null,a),o=Je(o,i),a.callbackPriority=n,a.callbackNode=o,n}return i!==null&&i!==null&&q(i),a.callbackPriority=2,a.callbackNode=null,2}function t1(a,n){if(Na!==0&&Na!==5)return a.callbackNode=null,a.callbackPriority=0,null;var o=a.callbackNode;if(Zd()&&a.callbackNode!==o)return null;var i=xt;return i=Re(a,a===Bt?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),i===0?null:(P0(a,i,n),e1(a,Pe()),a.callbackNode!=null&&a.callbackNode===o?t1.bind(null,a):null)}function a1(a,n){if(Zd())return null;P0(a,n,!0)}function rA(){hA(function(){(At&6)!==0?Je(dt,nA):J0()})}function Fm(){if(Or===0){var a=jo;a===0&&(a=as,as<<=1,(as&261888)===0&&(as=256)),Or=a}return Or}function s1(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:cd(""+a)}function n1(a,n){var o=n.ownerDocument.createElement("input");return o.name=n.name,o.value=n.value,a.id&&o.setAttribute("form",a.id),n.parentNode.insertBefore(o,n),a=new FormData(a),o.parentNode.removeChild(o),a}function lA(a,n,o,i,m){if(n==="submit"&&o&&o.stateNode===m){var h=s1((m[ya]||null).action),C=i.submitter;C&&(n=(n=C[ya]||null)?s1(n.formAction):C.getAttribute("formAction"),n!==null&&(h=n,C=null));var L=new xd("action","action",null,i,m);a.push({event:L,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(Or!==0){var $=C?n1(m,C):new FormData(m);om(o,{pending:!0,data:$,method:m.method,action:h},null,$)}}else typeof h=="function"&&(L.preventDefault(),$=C?n1(m,C):new FormData(m),om(o,{pending:!0,data:$,method:m.method,action:h},h,$))},currentTarget:m}]})}}for(var Hm=0;Hm<wp.length;Hm++){var qm=wp[Hm],oA=qm.toLowerCase(),cA=qm[0].toUpperCase()+qm.slice(1);an(oA,"on"+cA)}an(Ov,"onAnimationEnd"),an(Pv,"onAnimationIteration"),an(zv,"onAnimationStart"),an("dblclick","onDoubleClick"),an("focusin","onFocus"),an("focusout","onBlur"),an(w5,"onTransitionRun"),an(A5,"onTransitionStart"),an(S5,"onTransitionCancel"),an(Uv,"onTransitionEnd"),Ta("onMouseEnter",["mouseout","mouseover"]),Ta("onMouseLeave",["mouseout","mouseover"]),Ta("onPointerEnter",["pointerout","pointerover"]),Ta("onPointerLeave",["pointerout","pointerover"]),ja("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ja("onSelect","focusout contextmenu dragend focu
48sin keydown keyup mousedown mouseup selectionchange".split(" ")),ja("onBeforeInput",["compositionend","keypress","textInput","paste"]),ja("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ja("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ja("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Zc="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(" "),iA=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Zc));function r1(a,n){n=(n&4)!==0;for(var o=0;o<a.length;o++){var i=a[o],m=i.event;i=i.listeners;e:{var h=void 0;if(n)for(var C=i.length-1;0<=C;C--){var L=i[C],$=L.instance,ne=L.currentTarget;if(L=L.listener,$!==h&&m.isPropagationStopped())break e;h=L,m.currentTarget=ne;try{h(m)}catch(me){fd(me)}m.currentTarget=null,h=$}else for(C=0;C<i.length;C++){if(L=i[C],$=L.instance,ne=L.currentTarget,L=L.listener,$!==h&&m.isPropagationStopped())break e;h=L,m.currentTarget=ne;try{h(m)}catch(me){fd(me)}m.currentTarget=null,h=$}}}}function it(a,n){var o=n[gr];o===void 0&&(o=n[gr]=new Set);var i=a+"__bubble";o.has(i)||(l1(n,a,2,!1),o.add(i))}function $m(a,n,o){var i=0;n&&(i|=4),l1(o,a,i,n)}var tu="_reactListening"+Math.random().toString(36).slice(2);function Wm(a){if(!a[tu]){a[tu]=!0,hr.forEach(function(o){o!=="selectionchange"&&(iA.has(o)||$m(o,!1,a),$m(o,!0,a))});var n=a.nodeType===9?a:a.ownerDocument;n===null||n[tu]||(n[tu]=!0,$m("selectionchange",!1,n))}}function l1(a,n,o,i){switch(O1(n)){case 2:var m=zA;break;case 8:m=UA;break;default:m=lf}o=m.bind(null,n,o,a),m=void 0,!up||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(m=!0),i?m!==void 0?a.addEventListener(n,o,{capture:!0,passive:m}):a.addEventListener(n,o,!0):m!==void 0?a.addEventListener(n,o,{passive:m}):a.addEventListener(n,o,!1)}function Qm(a,n,o,i,m){var h=i;if((n&1)===0&&(n&2)===0&&i!==null)e:for(;;){if(i===null)return;var C=i.tag;if(C===3||C===4){var L=i.stateNode.containerInfo;if(L===m)break;if(C===4)for(C=i.return;C!==null;){var $=C.tag;if(($===3||$===4)&&C.stateNode.containerInfo===m)return;C=C.return}for(;L!==null;){if(C=Wa(L),C===null)return;if($=C.tag,$===5||$===6||$===26||$===27){i=h=C;continue e}L=L.parentNode}}i=i.return}uv(function(){var ne=h,me=ip(o),be=[];e:{var re=Iv.get(a);if(re!==void 0){var ie=xd,Te=a;switch(a){case"keypress":if(dd(o)===0)break e;case"keydown":case"keyup":ie=a5;break;case"focusin":Te="focus",ie=fp;break;case"focusout":Te="blur",ie=fp;break;case"beforeblur":case"afterblur":ie=fp;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ie=mv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ie=$4;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ie=r5;break;case Ov:case Pv:case zv:ie=G4;break;case Uv:ie=o5;break;case"scroll":case"scrollend":ie=H4;break;case"wheel":ie=i5;break;case"copy":case"cut":case"paste":ie=K4;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ie=gv;break;case"toggle":case"beforetoggle":ie=u5}var $e=(n&4)!==0,Ut=!$e&&(a==="scroll"||a==="scrollend"),ee=$e?re!==null?re+"Capture":null:re;$e=[];for(var G=ne,se;G!==null;){var he=G;if(se=he.stateNode,he=he.tag,he!==5&&he!==26&&he!==27||se===null||ee===null||(he=yc(G,ee),he!=null&&$e.push(Jc(G,he,se))),Ut)break;G=G.return}0<$e.length&&(re=new ie(re,Te,null,o,me),be.push({event:re,listeners:$e}))}}if((n&7)===0){e:{if(re=a==="mouseover"||a==="pointerover",ie=a==="mouseout"||a==="pointerout",re&&o!==cp&&(Te=o.relatedTarget||o.fromElement)&&(Wa(Te)||Te[Us]))break e;if((ie||re)&&(re=me.window===me?me:(re=me.ownerDocument)?re.defaultView||re.parentWindow:window,ie?(Te=o.relatedTarget||o.toElement,ie=ne,Te=Te?Wa(Te):null,Te!==null&&(Ut=d(Te),$e=Te.tag,Te!==Ut||$e!==5&&$e!==27&&$e!==6)&&(Te=null)):(ie=null,Te=ne),ie!==Te)){if($e=mv,he="onMouseLeave",ee="onMouseEnter",G="mouse",(a==="pointerout"||a==="pointerover")&&($e=gv,he="onPointerLeave",ee="onPointerEnter",G="pointer"),Ut=ie==null?re:Qa(ie),se=Te==null?re:Qa(Te),re=new $e(he,G+"leave",ie,o,me),re.target=Ut,re.relatedTarget=se,he=null,Wa(me)===ne&&($e=new $e(ee,G+"enter",Te,o,me),$e.target=se,$e.relatedTarget=Ut,he=$e),Ut=he,ie&&Te)t:{for($e=dA,ee=ie,G=Te,se=0,he=ee;he;he=$e(he))se++;he=0;for(var Fe=G;Fe;Fe=$e(Fe))he++;for(;0<se-he;)ee=$e(ee),se--;for(;0<he-se;)G=$e(G),he--;for(;se--;){if(ee===G||G!==null&&ee===G.alternate){$e=ee;break t}ee=$e(ee),G=$e(G)}$e=null}else $e=null;ie!==null&&o1(be,re,ie,$e,!1),Te!==null&&Ut!==null&&o1(be,Ut,Te,$e,!0)}}
vendor: 5,244 bytes, lines 48-49
48e:{if(re=ne?Qa(ne):window,ie=re.nodeName&&re.nodeName.toLowerCase(),ie==="select"||ie==="input"&&re.type==="file")var bt=wv;else if(Nv(re))if(Av)bt=j5;else{bt=b5;var Ue=v5}else ie=re.nodeName,!ie||ie.toLowerCase()!=="input"||re.type!=="checkbox"&&re.type!=="radio"?ne&&op(ne.elementType)&&(bt=wv):bt=y5;if(bt&&(bt=bt(a,ne))){Cv(be,bt,o,me);break e}Ue&&Ue(a,re,ne),a==="focusout"&&ne&&re.type==="number"&&ne.memoizedProps.value!=null&&lp(re,"number",re.value)}switch(Ue=ne?Qa(ne):window,a){case"focusin":(Nv(Ue)||Ue.contentEditable==="true")&&(po=Ue,jp=ne,Dc=null);break;case"focusout":Dc=jp=po=null;break;case"mousedown":Np=!0;break;case"contextmenu":case"mouseup":case"dragend":Np=!1,Tv(be,o,me);break;case"selectionchange":if(C5)break;case"keydown":case"keyup":Tv(be,o,me)}var Ze;if(hp)e:{switch(a){case"compositionstart":var pt="onCompositionStart";break e;case"compositionend":pt="onCompositionEnd";break e;case"compositionupdate":pt="onCompositionUpdate";break e}pt=void 0}else xo?yv(a,o)&&(pt="onCompositionEnd"):a==="keydown"&&o.keyCode===229&&(pt="onCompositionStart");pt&&(hv&&o.locale!=="ko"&&(xo||pt!=="onCompositionStart"?pt==="onCompositionEnd"&&xo&&(Ze=xv()):(br=me,xp="value"in br?br.value:br.textContent,xo=!0)),Ue=au(ne,pt),0<Ue.length&&(pt=new fv(pt,a,null,o,me),be.push({event:pt,listeners:Ue}),Ze?pt.data=Ze:(Ze=jv(o),Ze!==null&&(pt.data=Ze)))),(Ze=p5?m5(a,o):f5(a,o))&&(pt=au(ne,"onBeforeInput"),0<pt.length&&(Ue=new fv("onBeforeInput","beforeinput",null,o,me),be.push({event:Ue,listeners:pt}),Ue.data=Ze)),lA(be,a,ne,o,me)}r1(be,n)})}function Jc(a,n,o){return{instance:a,listener:n,currentTarget:o}}function au(a,n){for(var o=n+"Capture",i=[];a!==null;){var m=a,h=m.stateNode;if(m=m.tag,m!==5&&m!==26&&m!==27||h===null||(m=yc(a,o),m!=null&&i.unshift(Jc(a,m,h)),m=yc(a,n),m!=null&&i.push(Jc(a,m,h))),a.tag===3)return i;a=a.return}return[]}function dA(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function o1(a,n,o,i,m){for(var h=n._reactName,C=[];o!==null&&o!==i;){var L=o,$=L.alternate,ne=L.stateNode;if(L=L.tag,$!==null&&$===i)break;L!==5&&L!==26&&L!==27||ne===null||($=ne,m?(ne=yc(o,h),ne!=null&&C.unshift(Jc(o,ne,$))):m||(ne=yc(o,h),ne!=null&&C.push(Jc(o,ne,$)))),o=o.return}C.length!==0&&a.push({event:n,listeners:C})}var uA=/\r\n?/g,xA=/\u0000|\uFFFD/g;function c1(a){return(typeof a=="string"?a:""+a).replace(uA,` 49`).replace(xA,"")}function i1(a,n){return n=c1(n),c1(a)===n}function zt(a,n,o,i,m,h){switch(o){case"children":typeof i=="string"?n==="body"||n==="textarea"&&i===""||co(a,i):(typeof i=="number"||typeof i=="bigint")&&n!=="body"&&co(a,""+i);break;case"className":ue(a,"class",i);break;case"tabIndex":ue(a,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":ue(a,o,i);break;case"style":iv(a,i,h);break;case"data":if(n!=="object"){ue(a,"data",i);break}case"src":case"href":if(i===""&&(n!=="a"||o!=="href")){a.removeAttribute(o);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){a.removeAttribute(o);break}i=cd(""+i),a.setAttribute(o,i);break;case"action":case"formAction":if(typeof i=="function"){a.setAttribute(o,"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 h=="function"&&(o==="formAction"?(n!=="input"&&zt(a,n,"name",m.name,m,null),zt(a,n,"formEncType",m.formEncType,m,null),zt(a,n,"formMethod",m.formMethod,m,null),zt(a,n,"formTarget",m.formTarget,m,null)):(zt(a,n,"encType",m.encType,m,null),zt(a,n,"method",m.method,m,null),zt(a,n,"target",m.target,m,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){a.removeAttribute(o);break}i=cd(""+i),a.setAttribute(o,i);break;case"onClick":i!=null&&(a.onclick=In);break;case"onScroll":i!=null&&it("scroll",a);break;case"onScrollEnd":i!=null&&it("scrollend",a);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(l(61));if(o=i.__html,o!=null){if(m.children!=null)throw Error(l(60));a.innerHTML=o}}break;case"multiple":a.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":a.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){a.removeAttribute("xlink:href");break}o=cd(""+i),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":i!=null&&typeof i!="function"&&typeof i!="symbol"?a.setAttribute(o,""+i):a.removeAttribute(o);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":i&&typeof i!="function"&&typeof i!="symbol"?a.setAttribute(o,""):a.removeAttribute(o);break;case"capture":case"download":i===!0?a.setAttribute(o,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?a.setAttribute(o,i):a.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?a.setAttribute(o,i):a.removeAttribute(o);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?a.removeAttribute(o):a.setAttribute(o,i);break;case"popover":it("beforetoggle",a),it("toggle",a),jn(a,"popover",i);break;case"xlinkActuate":lt(a,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":lt(a,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":lt(a,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":lt(a,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":lt(a,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":lt(a,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":lt(a,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":lt(a,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":lt(a,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":jn(a,"is",i);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=B4.get(o)||o,jn(a,o,i))}}function Gm(a,n,o,i,m,h){switch(o){case"style":iv(a,i,h);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(l(61));if(o=i.__html,o!=null){if(m.children!=null)throw Error(l(60));a.innerHTML=o}}break;case"children":typeof i=="string"?co(a,i):(typeof i=="number"||typeof i=="bigint")&&co(a,""+i);break;case"onScroll":i!=null&&it("scroll",a);break;case"onScrollEnd":i!=null&&it("scrollend",a);break;case"onClick":i!=null&&(a.onclick=In);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!vr.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(m=o.endsWith("Capture"),n=o.slice(2,m?o.length-7:void 0),h=a[ya]||null,h=h!=null?h[o]:null,typeof h=="function"&&a.removeEventListener(n,h,m),typeof i=="function")){typeof h!="function"&&h!==null&&(o in a?a[o]=null:a.hasAttribute(o)&&a.removeAttribute(o)),a.addEventListener(n,i,m);break e}o in a?a[o]=i:i===!0?a.setAttribute(o,""):jn(a,o,i)}}}function za(a,n,o){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":it("error",a),it("load",a);var i=!1,m=!1,h;for(h in o)if(o.hasOwnProperty(h)){var C=o[h];if(C!=null)switch(h){case"src":i=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,n));default:zt(a,n,h,C,o,null)}}m&&zt(a,n,"srcSet",o.srcSet,o,null),i&&zt(a,n,"src",o.src,o,null);return;case"input":it("invalid",a);var L=h=C=m=null,$=null,ne=null;for(i in o)if(o.hasOwnProperty(i)){var me=o[i];if(me!=null)switch(i){case"name":m=me;break;case"type":C=me;break;case"checked":$=me;break;case"defaultChecked":ne=me;break;case"value":h=me;break;case"defaultValue":L=me;break;case"children":case"dangerouslySetInnerHTML":if(me!=null)throw Error(l(137,n));break;default:zt(a,n,i,me,o,null)}}rv(a,h,L,$,ne,C,m,!1);return;case"select":it("invalid",a),i=C=h=null;for(m in o)if(o.hasOwnProperty(m)&&(L=o[m],L!=null))switch(m){case"value":h=L;break;case"defaultValue":C=L;break;case"multiple":i=L;default:zt(a,n,m,L,o,null)}n=h,o=C,a.multiple=!!i,n!=null?oo(a,!!i,n,!1):o!=null&&oo(a,!!i,o,!0);return;case"textarea":it("invalid",a),h=m=i=null;for(C in o)if(o.hasOwnProperty(C)&&(L=o[C],L!=null))switch(C){case"value":i=L;break;case"defaultValue":m=L;break;case"children":h=L;break;case"dangerouslySetInnerHTML":if(L!=null)throw Error(l(91));break;default:zt(a,n,C,L,o,null)}ov(a,i,m,h);return;case"option":for($ in o)if(o.hasOwnProperty($)&&(i=o[$],i!=null))switch($){case"selected":a.selected=i&&typeof i!="function"&&typeof i!="symbol";break;default:zt(a,n,$,i,o,null)}return;case"dialog":it("beforetoggle",a),it("toggle",a),it("cancel",a),it("close",a);break;case"iframe":case"object":it("load",a);break;case"video":case"audio":for(i=0;i<Zc.length;i++)it(Zc[i],a);break;case"image":it("error",a),it("load",a);break;case"details":it("toggle",a);break;case"embed":case"source":case"link":it("error",a),it("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ne in o)if(o.hasOwnProperty(ne)&&(i=o[ne],i!=null))switch(ne){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,n));default:zt(a,n,ne,i,o,null)}return;default:if(op(n)){for(me in o)o.hasOwnProperty(me)&&(i=o[me],i!==void 0&&Gm(a,n,me,i,o,void 0));return}}for(L in o)o.hasOwnProperty(L)&&(i=o[L],i!=null&&zt(a,n,L,i,o,null))}function pA(a,n,o,i){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var m=null,h=null,C=null,L=null,$=null,ne=null,me=null;for(ie in o){var be=o[ie];if(o.hasOwnProperty(ie)&&be!=null)switch(ie){case"checked":break;case"value":break;case"defaultValue":$=be;default:i.hasOwnProperty(ie)||zt(a,n,ie,null,i,be)}}for(var re in i){var ie=i[re];if(be=o[re],i.hasOwnProperty(re)&&(ie!=null||be!=null))switch(re){case"type":h=ie;break;case"name":m=ie;break;case"checked":ne=ie;break;case"defaultChecked":me=ie;break;case"value":C=ie;break;case"defaultValue":L=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(l(137,n));break;default:ie!==be&&zt(a,n,re,ie,i,be)}}rp(a,C,L,$,ne,me,h,m);return;case"select":ie=C=L=re=null;for(h in o)if($=o[h],o.hasOwnProperty(h)&&$!=null)switch(h){case"value":break;case"multiple":ie=$;default:i.hasOwnProperty(h)||zt(a,n,h,null,i,$)}for(m in i)if(h=i[m],$=o[m],i.hasOwnProperty(m)&&(h!=null||$!=null))switch(m){case"value":re=h;break;case"defaultValue":L=h;break;case"multiple":C=h;default:h!==$&&zt(a,n,m,h,i,$)}n=L,o=C,i=ie,re!=null?oo(a,!!o,re,!1):!!i!=!!o&&(n!=null?oo(a,!!o,n,!0):oo(a,!!o,o?[]:"",!1));return;case"textarea":ie=re=null;for(L in o)if(m=o[L],o.hasOwnProperty(L)&&m!=null&&!i.hasOwnProperty(L))switch(L){case"value":break;case"children":break;default:zt(a,n,L,null,i,m)}for(C in i)if(m=i[C],h=o[C],i.hasOwnProperty(C)&&(m!=null||h!=null))switch(C){case"value":re=m;break;case"defaultValue":ie=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(l(91));break;default:m!==h&&zt(a,n,C,m,i,h)}lv(a,re,ie);return;case"option":for(var Te in o)if(re=o[Te],o.hasOwnProperty(Te)&&re!=null&&!i.hasOwnProperty(Te))switch(Te){case"selected":a.selected=!1;break;default:zt(a,n,Te,null,i,re)}for($ in i)if(re=i[$],ie=o[$],i.hasOwnProperty($)&&re!==ie&&(re!=null||ie!=null))switch($){case"selected":a.selected=re&&typeof re!="function"&&typeof re!="symbol";break;default:zt(a,n,$,re,i,ie)}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 $e in o)re=o[$e],o.hasOwnProperty($e)&&re!=null&&!i.hasOwnProperty($e)&&zt(a,n,$e,null,i,re);
vendor: 4,760 bytes, line 49
49for(ne in i)if(re=i[ne],ie=o[ne],i.hasOwnProperty(ne)&&re!==ie&&(re!=null||ie!=null))switch(ne){case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(l(137,n));break;default:zt(a,n,ne,re,i,ie)}return;default:if(op(n)){for(var Ut in o)re=o[Ut],o.hasOwnProperty(Ut)&&re!==void 0&&!i.hasOwnProperty(Ut)&&Gm(a,n,Ut,void 0,i,re);for(me in i)re=i[me],ie=o[me],!i.hasOwnProperty(me)||re===ie||re===void 0&&ie===void 0||Gm(a,n,me,re,i,ie);return}}for(var ee in o)re=o[ee],o.hasOwnProperty(ee)&&re!=null&&!i.hasOwnProperty(ee)&&zt(a,n,ee,null,i,re);for(be in i)re=i[be],ie=o[be],!i.hasOwnProperty(be)||re===ie||re==null&&ie==null||zt(a,n,be,re,i,ie)}function d1(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function mA(){if(typeof performance.getEntriesByType=="function"){for(var a=0,n=0,o=performance.getEntriesByType("resource"),i=0;i<o.length;i++){var m=o[i],h=m.transferSize,C=m.initiatorType,L=m.duration;if(h&&L&&d1(C)){for(C=0,L=m.responseEnd,i+=1;i<o.length;i++){var $=o[i],ne=$.startTime;if(ne>L)break;var me=$.transferSize,be=$.initiatorType;me&&d1(be)&&($=$.responseEnd,C+=me*($<L?1:(L-ne)/($-ne)))}if(--i,n+=8*(h+C)/(m.duration/1e3),a++,10<a)break}}if(0<a)return n/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var Vm=null,Km=null;function su(a){return a.nodeType===9?a:a.ownerDocument}function u1(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function x1(a,n){if(a===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&n==="foreignObject"?0:a}function Ym(a,n){return a==="textarea"||a==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Xm=null;function fA(){var a=window.event;return a&&a.type==="popstate"?a===Xm?!1:(Xm=a,!0):(Xm=null,!1)}var p1=typeof setTimeout=="function"?setTimeout:void 0,gA=typeof clearTimeout=="function"?clearTimeout:void 0,m1=typeof Promise=="function"?Promise:void 0,hA=typeof queueMicrotask=="function"?queueMicrotask:typeof m1<"u"?function(a){return m1.resolve(null).then(a).catch(vA)}:p1;function vA(a){setTimeout(function(){throw a})}function Pr(a){return a==="head"}function f1(a,n){var o=n,i=0;do{var m=o.nextSibling;if(a.removeChild(o),m&&m.nodeType===8)if(o=m.data,o==="/$"||o==="/&"){if(i===0){a.removeChild(m),Bo(n);return}i--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")i++;else if(o==="html")ei(a.ownerDocument.documentElement);else if(o==="head"){o=a.ownerDocument.head,ei(o);for(var h=o.firstChild;h;){var C=h.nextSibling,L=h.nodeName;h[tn]||L==="SCRIPT"||L==="STYLE"||L==="LINK"&&h.rel.toLowerCase()==="stylesheet"||o.removeChild(h),h=C}}else o==="body"&&ei(a.ownerDocument.body);o=m}while(o);Bo(n)}function g1(a,n){var o=a;a=0;do{var i=o.nextSibling;if(o.nodeType===1?n?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(n?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),i&&i.nodeType===8)if(o=i.data,o==="/$"){if(a===0)break;a--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||a++;o=i}while(o)}function Zm(a){var n=a.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var o=n;switch(n=n.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":Zm(o),yn(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}a.removeChild(o)}}function bA(a,n,o,i){for(;a.nodeType===1;){var m=o;if(a.nodeName.toLowerCase()!==n.toLowerCase()){if(!i&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(i){if(!a[tn])switch(n){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(h=a.getAttribute("rel"),h==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(h!==m.rel||a.getAttribute("href")!==(m.href==null||m.href===""?null:m.href)||a.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin)||a.getAttribute("title")!==(m.title==null?null:m.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(h=a.getAttribute("src"),(h!==(m.src==null?null:m.src)||a.getAttribute("type")!==(m.type==null?null:m.type)||a.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin))&&h&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(n==="input"&&a.type==="hidden"){var h=m.name==null?null:""+m.name;if(m.type==="hidden"&&a.getAttribute("name")===h)return a}else return a;
vendor: 11,298 bytes, line 49
49if(a=Qs(a.nextSibling),a===null)break}return null}function yA(a,n,o){if(n==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!o||(a=Qs(a.nextSibling),a===null))return null;return a}function h1(a,n){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!n||(a=Qs(a.nextSibling),a===null))return null;return a}function Jm(a){return a.data==="$?"||a.data==="$~"}function ef(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function jA(a,n){var o=a.ownerDocument;if(a.data==="$~")a._reactRetry=n;else if(a.data!=="$?"||o.readyState!=="loading")n();else{var i=function(){n(),o.removeEventListener("DOMContentLoaded",i)};o.addEventListener("DOMContentLoaded",i),a._reactRetry=i}}function Qs(a){for(;a!=null;a=a.nextSibling){var n=a.nodeType;if(n===1||n===3)break;if(n===8){if(n=a.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return a}var tf=null;function v1(a){a=a.nextSibling;for(var n=0;a;){if(a.nodeType===8){var o=a.data;if(o==="/$"||o==="/&"){if(n===0)return Qs(a.nextSibling);n--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||n++}a=a.nextSibling}return null}function b1(a){a=a.previousSibling;for(var n=0;a;){if(a.nodeType===8){var o=a.data;if(o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"){if(n===0)return a;n--}else o!=="/$"&&o!=="/&"||n++}a=a.previousSibling}return null}function y1(a,n,o){switch(n=su(o),a){case"html":if(a=n.documentElement,!a)throw Error(l(452));return a;case"head":if(a=n.head,!a)throw Error(l(453));return a;case"body":if(a=n.body,!a)throw Error(l(454));return a;default:throw Error(l(451))}}function ei(a){for(var n=a.attributes;n.length;)a.removeAttributeNode(n[0]);yn(a)}var Gs=new Map,j1=new Set;function nu(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var tr=O.d;O.d={f:NA,r:CA,D:wA,C:AA,L:SA,m:EA,X:MA,S:DA,M:LA};function NA(){var a=tr.f(),n=Kd();return a||n}function CA(a){var n=hs(a);n!==null&&n.tag===5&&n.type==="form"?Ub(n):tr.r(a)}var zo=typeof document>"u"?null:document;function N1(a,n,o){var i=zo;if(i&&typeof n=="string"&&n){var m=pa(n);m='link[rel="'+a+'"][href="'+m+'"]',typeof o=="string"&&(m+='[crossorigin="'+o+'"]'),j1.has(m)||(j1.add(m),a={rel:a,crossOrigin:o,href:n},i.querySelector(m)===null&&(n=i.createElement("link"),za(n,"link",a),Tt(n),i.head.appendChild(n)))}}function wA(a){tr.D(a),N1("dns-prefetch",a,null)}function AA(a,n){tr.C(a,n),N1("preconnect",a,n)}function SA(a,n,o){tr.L(a,n,o);var i=zo;if(i&&a&&n){var m='link[rel="preload"][as="'+pa(n)+'"]';n==="image"&&o&&o.imageSrcSet?(m+='[imagesrcset="'+pa(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(m+='[imagesizes="'+pa(o.imageSizes)+'"]')):m+='[href="'+pa(a)+'"]';var h=m;switch(n){case"style":h=Uo(a);break;case"script":h=Io(a)}Gs.has(h)||(a=v({rel:"preload",href:n==="image"&&o&&o.imageSrcSet?void 0:a,as:n},o),Gs.set(h,a),i.querySelector(m)!==null||n==="style"&&i.querySelector(ti(h))||n==="script"&&i.querySelector(ai(h))||(n=i.createElement("link"),za(n,"link",a),Tt(n),i.head.appendChild(n)))}}function EA(a,n){tr.m(a,n);var o=zo;if(o&&a){var i=n&&typeof n.as=="string"?n.as:"script",m='link[rel="modulepreload"][as="'+pa(i)+'"][href="'+pa(a)+'"]',h=m;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=Io(a)}if(!Gs.has(h)&&(a=v({rel:"modulepreload",href:a},n),Gs.set(h,a),o.querySelector(m)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(ai(h)))return}i=o.createElement("link"),za(i,"link",a),Tt(i),o.head.appendChild(i)}}}function DA(a,n,o){tr.S(a,n,o);var i=zo;if(i&&a){var m=Is(i).hoistableStyles,h=Uo(a);n=n||"default";var C=m.get(h);if(!C){var L={loading:0,preload:null};if(C=i.querySelector(ti(h)))L.loading=5;else{a=v({rel:"stylesheet",href:a,"data-precedence":n},o),(o=Gs.get(h))&&af(a,o);var $=C=i.createElement("link");Tt($),za($,"link",a),$._p=new Promise(function(ne,me){$.onload=ne,$.onerror=me}),$.addEventListener("load",function(){L.loading|=1}),$.addEventListener("error",function(){L.loading|=2}),L.loading|=4,ru(C,n,i)}C={type:"stylesheet",instance:C,count:1,state:L},m.set(h,C)}}}function MA(a,n){tr.X(a,n);var o=zo;if(o&&a){var i=Is(o).hoistableScripts,m=Io(a),h=i.get(m);h||(h=o.querySelector(ai(m)),h||(a=v({src:a,async:!0},n),(n=Gs.get(m))&&sf(a,n),h=o.createElement("script"),Tt(h),za(h,"link",a),o.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},i.set(m,h))}}function LA(a,n){tr.M(a,n);var o=zo;if(o&&a){var i=Is(o).hoistableScripts,m=Io(a),h=i.get(m);h||(h=o.querySelector(ai(m)),h||(a=v({src:a,async:!0,type:"module"},n),(n=Gs.get(m))&&sf(a,n),h=o.createElement("script"),Tt(h),za(h,"link",a),o.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},i.set(m,h))}}function C1(a,n,o,i){var m=(m=pe.current)?nu(m):null;if(!m)throw Error(l(446));switch(a){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(n=Uo(o.href),o=Is(m).hoistableStyles,i=o.get(n),i||(i={type:"style",instance:null,count:0,state:null},o.set(n,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){a=Uo(o.href);var h=Is(m).hoistableStyles,C=h.get(a);if(C||(m=m.ownerDocument||m,C={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(a,C),(h=m.querySelector(ti(a)))&&!h._p&&(C.instance=h,C.state.loading=5),Gs.has(a)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},Gs.set(a,o),h||kA(m,a,o,C.state))),n&&i===null)throw Error(l(528,""));return C}if(n&&i!==null)throw Error(l(529,""));return null;case"script":return n=o.async,o=o.src,typeof o=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=Io(o),o=Is(m).hoistableScripts,i=o.get(n),i||(i={type:"script",instance:null,count:0,state:null},o.set(n,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,a))}}function Uo(a){return'href="'+pa(a)+'"'}function ti(a){return'link[rel="stylesheet"]['+a+"]"}function w1(a){return v({},a,{"data-precedence":a.precedence,precedence:null})}function kA(a,n,o,i){a.querySelector('link[rel="preload"][as="style"]['+n+"]")?i.loading=1:(n=a.createElement("link"),i.preload=n,n.addEventListener("load",function(){return i.loading|=1}),n.addEventListener("error",function(){return i.loading|=2}),za(n,"link",o),Tt(n),a.head.appendChild(n))}function Io(a){return'[src="'+pa(a)+'"]'}function ai(a){return"script[async]"+a}function A1(a,n,o){if(n.count++,n.instance===null)switch(n.type){case"style":var i=a.querySelector('style[data-href~="'+pa(o.href)+'"]');if(i)return n.instance=i,Tt(i),i;var m=v({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return i=(a.ownerDocument||a).createElement("style"),Tt(i),za(i,"style",m),ru(i,o.precedence,a),n.instance=i;case"stylesheet":m=Uo(o.href);var h=a.querySelector(ti(m));if(h)return n.state.loading|=4,n.instance=h,Tt(h),h;i=w1(o),(m=Gs.get(m))&&af(i,m),h=(a.ownerDocument||a).createElement("link"),Tt(h);var C=h;return C._p=new Promise(function(L,$){C.onload=L,C.onerror=$}),za(h,"link",i),n.state.loading|=4,ru(h,o.precedence,a),n.instance=h;case"script":return h=Io(o.src),(m=a.querySelector(ai(h)))?(n.instance=m,Tt(m),m):(i=o,(m=Gs.get(h))&&(i=v({},o),sf(i,m)),a=a.ownerDocument||a,m=a.createElement("script"),Tt(m),za(m,"link",i),a.head.appendChild(m),n.instance=m);case"void":return null;default:throw Error(l(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(i=n.instance,n.state.loading|=4,ru(i,o.precedence,a));return n.instance}function ru(a,n,o){for(var i=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=i.length?i[i.length-1]:null,h=m,C=0;C<i.length;C++){var L=i[C];if(L.dataset.precedence===n)h=L;else if(h!==m)break}h?h.parentNode.insertBefore(a,h.nextSibling):(n=o.nodeType===9?o.head:o,n.insertBefore(a,n.firstChild))}function af(a,n){a.crossOrigin==null&&(a.crossOrigin=n.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=n.referrerPolicy),a.title==null&&(a.title=n.title)}function sf(a,n){a.crossOrigin==null&&(a.crossOrigin=n.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=n.referrerPolicy),a.integrity==null&&(a.integrity=n.integrity)}var lu=null;function S1(a,n,o){if(lu===null){var i=new Map,m=lu=new Map;m.set(o,i)}else m=lu,i=m.get(o),i||(i=new Map,m.set(o,i));if(i.has(a))return i;for(i.set(a,null),o=o.getElementsByTagName(a),m=0;m<o.length;m++){var h=o[m];if(!(h[tn]||h[aa]||a==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var C=h.getAttribute(n)||"";C=a+C;var L=i.get(C);L?L.push(h):i.set(C,[h])}}return i}function E1(a,n,o){a=a.ownerDocument||a,a.head.insertBefore(o,n==="title"?a.querySelector("head > title"):null)}function RA(a,n,o){if(o===1||n.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;switch(n.rel){case"stylesheet":return a=n.disabled,typeof n.precedence=="string"&&a==null;default:return!0}case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function D1(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function TA(a,n,o,i){if(o.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var m=Uo(i.href),h=n.querySelector(ti(m));if(h){n=h._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(a.count++,a=ou.bind(a),n.then(a,a)),o.state.loading|=4,o.instance=h,Tt(h);return}h=n.ownerDocument||n,i=w1(i),(m=Gs.get(m))&&af(i,m),h=h.createElement("link"),Tt(h);var C=h;C._p=new Promise(function(L,$){C.onload=L,C.onerror=$}),za(h,"link",i),o.instance=h}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(o,n),(n=o.state.preload)&&(o.state.loading&3)===0&&(a.count++,o=ou.bind(a),n.addEventListener("load",o),n.addEventListener("error",o))}}var nf=0;function _A(a,n){return a.stylesheets&&a.count===0&&iu(a,a.stylesheets),0<a.count||0<a.imgCount?function(o){var i=setTimeout(function(){if(a.stylesheets&&iu(a,a.stylesheets),a.unsuspend){var h=a.unsuspend;a.unsuspend=null,h()}},6e4+n);0<a.imgBytes&&nf===0&&(nf=62500*mA());var m=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&iu(a,a.stylesheets),a.unsuspend)){var h=a.unsuspend;a.unsuspend=null,h()}},(a.imgBytes>nf?50:800)+n);return a.unsuspend=o,function(){a.unsuspend=null,clearTimeout(i),clearTimeout(m)}}:null}function ou(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)iu(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var cu=null;function iu(a,n){a.stylesheets=null,a.unsuspend!==null&&(a.count++,cu=new Map,n.forEac
vendor: 11,284 bytes, line 49
49h(OA,a),cu=null,ou.call(a))}function OA(a,n){if(!(n.state.loading&4)){var o=cu.get(a);if(o)var i=o.get(null);else{o=new Map,cu.set(a,o);for(var m=a.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<m.length;h++){var C=m[h];(C.nodeName==="LINK"||C.getAttribute("media")!=="not all")&&(o.set(C.dataset.precedence,C),i=C)}i&&o.set(null,i)}m=n.instance,C=m.getAttribute("data-precedence"),h=o.get(C)||i,h===i&&o.set(null,m),o.set(C,m),this.count++,i=ou.bind(this),m.addEventListener("load",i),m.addEventListener("error",i),h?h.parentNode.insertBefore(m,h.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(m,a.firstChild)),n.state.loading|=4}}var si={$$typeof:A,Provider:null,Consumer:null,_currentValue:T,_currentValue2:T,_threadCount:0};function PA(a,n,o,i,m,h,C,L,$){this.tag=1,this.containerInfo=a,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=Yt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yt(0),this.hiddenUpdates=Yt(null),this.identifierPrefix=i,this.onUncaughtError=m,this.onCaughtError=h,this.onRecoverableError=C,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=$,this.incompleteTransitions=new Map}function M1(a,n,o,i,m,h,C,L,$,ne,me,be){return a=new PA(a,n,o,C,$,ne,me,be,L),n=1,h===!0&&(n|=24),h=bs(3,null,null,n),a.current=h,h.stateNode=a,n=zp(),n.refCount++,a.pooledCache=n,n.refCount++,h.memoizedState={element:i,isDehydrated:o,cache:n},Fp(h),a}function L1(a){return a?(a=go,a):go}function k1(a,n,o,i,m,h){m=L1(m),i.context===null?i.context=m:i.pendingContext=m,i=Ar(n),i.payload={element:o},h=h===void 0?null:h,h!==null&&(i.callback=h),o=Sr(a,i,n),o!==null&&(cs(o,a,n),Oc(o,a,n))}function R1(a,n){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var o=a.retryLane;a.retryLane=o!==0&&o<n?o:n}}function rf(a,n){R1(a,n),(a=a.alternate)&&R1(a,n)}function T1(a){if(a.tag===13||a.tag===31){var n=hl(a,67108864);n!==null&&cs(n,a,67108864),rf(a,67108864)}}function _1(a){if(a.tag===13||a.tag===31){var n=ws();n=Sa(n);var o=hl(a,n);o!==null&&cs(o,a,n),rf(a,n)}}var du=!0;function zA(a,n,o,i){var m=M.T;M.T=null;var h=O.p;try{O.p=2,lf(a,n,o,i)}finally{O.p=h,M.T=m}}function UA(a,n,o,i){var m=M.T;M.T=null;var h=O.p;try{O.p=8,lf(a,n,o,i)}finally{O.p=h,M.T=m}}function lf(a,n,o,i){if(du){var m=of(i);if(m===null)Qm(a,n,i,uu,o),P1(a,i);else if(BA(m,a,n,o,i))i.stopPropagation();else if(P1(a,i),n&4&&-1<IA.indexOf(a)){for(;m!==null;){var h=hs(m);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var C=Et(h.pendingLanes);if(C!==0){var L=h;for(L.pendingLanes|=2,L.entangledLanes|=2;C;){var $=1<<31-Kt(C);L.entanglements[1]|=$,C&=~$}An(h),(At&6)===0&&(Gd=Pe()+500,Xc(0))}}break;case 31:case 13:L=hl(h,2),L!==null&&cs(L,h,2),Kd(),rf(h,2)}if(h=of(i),h===null&&Qm(a,n,i,uu,o),h===m)break;m=h}m!==null&&i.stopPropagation()}else Qm(a,n,i,null,o)}}function of(a){return a=ip(a),cf(a)}var uu=null;function cf(a){if(uu=null,a=Wa(a),a!==null){var n=d(a);if(n===null)a=null;else{var o=n.tag;if(o===13){if(a=u(n),a!==null)return a;a=null}else if(o===31){if(a=x(n),a!==null)return a;a=null}else if(o===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;a=null}else n!==a&&(a=null)}}return uu=a,null}function O1(a){switch(a){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(mt()){case dt:return 2;case qt:return 8;case X:case vt:return 32;case et:return 268435456;default:return 32}default:return 32}}var df=!1,zr=null,Ur=null,Ir=null,ni=new Map,ri=new Map,Br=[],IA="mousedown 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 P1(a,n){switch(a){case"focusin":case"focusout":zr=null;break;case"dragenter":case"dragleave":Ur=null;break;case"mouseover":case"mouseout":Ir=null;break;case"pointerover":case"pointerout":ni.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":ri.delete(n.pointerId)}}function li(a,n,o,i,m,h){return a===null||a.nativeEvent!==h?(a={blockedOn:n,domEventName:o,eventSystemFlags:i,nativeEvent:h,targetContainers:[m]},n!==null&&(n=hs(n),n!==null&&T1(n)),a):(a.eventSystemFlags|=i,n=a.targetContainers,m!==null&&n.indexOf(m)===-1&&n.push(m),a)}function BA(a,n,o,i,m){switch(n){case"focusin":return zr=li(zr,a,n,o,i,m),!0;case"dragenter":return Ur=li(Ur,a,n,o,i,m),!0;case"mouseover":return Ir=li(Ir,a,n,o,i,m),!0;case"pointerover":var h=m.pointerId;return ni.set(h,li(ni.get(h)||null,a,n,o,i,m)),!0;case"gotpointercapture":return h=m.pointerId,ri.set(h,li(ri.get(h)||null,a,n,o,i,m)),!0}return!1}function z1(a){var n=Wa(a.target);if(n!==null){var o=d(n);if(o!==null){if(n=o.tag,n===13){if(n=u(o),n!==null){a.blockedOn=n,gs(a.priority,function(){_1(o)});return}}else if(n===31){if(n=x(o),n!==null){a.blockedOn=n,gs(a.priority,function(){_1(o)});return}}else if(n===3&&o.stateNode.current.memoizedState.isDehydrated){a.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}a.blockedOn=null}function xu(a){if(a.blockedOn!==null)return!1;for(var n=a.targetContainers;0<n.length;){var o=of(a.nativeEvent);if(o===null){o=a.nativeEvent;var i=new o.constructor(o.type,o);cp=i,o.target.dispatchEvent(i),cp=null}else return n=hs(o),n!==null&&T1(n),a.blockedOn=o,!1;n.shift()}return!0}function U1(a,n,o){xu(a)&&o.delete(n)}function FA(){df=!1,zr!==null&&xu(zr)&&(zr=null),Ur!==null&&xu(Ur)&&(Ur=null),Ir!==null&&xu(Ir)&&(Ir=null),ni.forEach(U1),ri.forEach(U1)}function pu(a,n){a.blockedOn===n&&(a.blockedOn=null,df||(df=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,FA)))}var mu=null;function I1(a){mu!==a&&(mu=a,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){mu===a&&(mu=null);for(var n=0;n<a.length;n+=3){var o=a[n],i=a[n+1],m=a[n+2];if(typeof i!="function"){if(cf(i||o)===null)continue;break}var h=hs(o);h!==null&&(a.splice(n,3),n-=3,om(h,{pending:!0,data:m,method:o.method,action:i},i,m))}}))}function Bo(a){function n($){return pu($,a)}zr!==null&&pu(zr,a),Ur!==null&&pu(Ur,a),Ir!==null&&pu(Ir,a),ni.forEach(n),ri.forEach(n);for(var o=0;o<Br.length;o++){var i=Br[o];i.blockedOn===a&&(i.blockedOn=null)}for(;0<Br.length&&(o=Br[0],o.blockedOn===null);)z1(o),o.blockedOn===null&&Br.shift();if(o=(a.ownerDocument||a).$$reactFormReplay,o!=null)for(i=0;i<o.length;i+=3){var m=o[i],h=o[i+1],C=m[ya]||null;if(typeof h=="function")C||I1(o);else if(C){var L=null;if(h&&h.hasAttribute("formAction")){if(m=h,C=h[ya]||null)L=C.formAction;else if(cf(m)!==null)continue}else L=C.action;typeof L=="function"?o[i+1]=L:(o.splice(i,3),i-=3),I1(o)}}}function B1(){function a(h){h.canIntercept&&h.info==="react-transition"&&h.intercept({handler:function(){return new Promise(function(C){return m=C})},focusReset:"manual",scroll:"manual"})}function n(){m!==null&&(m(),m=null),i||setTimeout(o,20)}function o(){if(!i&&!navigation.transition){var h=navigation.currentEntry;h&&h.url!=null&&navigation.navigate(h.url,{state:h.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var i=!1,m=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(o,100),function(){i=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),m!==null&&(m(),m=null)}}}function uf(a){this._internalRoot=a}fu.prototype.render=uf.prototype.render=function(a){var n=this._internalRoot;if(n===null)throw Error(l(409));var o=n.current,i=ws();k1(o,i,a,n,null,null)},fu.prototype.unmount=uf.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var n=a.containerInfo;k1(a.current,2,null,a,null,null),Kd(),n[Us]=null}};function fu(a){this._internalRoot=a}fu.prototype.unstable_scheduleHydration=function(a){if(a){var n=ra();a={blockedOn:null,target:a,priority:n};for(var o=0;o<Br.length&&n!==0&&n<Br[o].priority;o++);Br.splice(o,0,a),o===0&&z1(a)}};var F1=s.version;if(F1!=="19.2.1")throw Error(l(527,F1,"19.2.1"));O.findDOMNode=function(a){var n=a._reactInternals;if(n===void 0)throw typeof a.render=="function"?Error(l(188)):(a=Object.keys(a).join(","),Error(l(268,a)));return a=g(n),a=a!==null?b(a):null,a=a===null?null:a.stateNode,a};var HA={bundleType:0,version:"19.2.1",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var gu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!gu.isDisabled&&gu.supportsFiber)try{Gt=gu.inject(HA),Vt=gu}catch{}}return ii.createRoot=function(a,n){if(!c(a))throw Error(l(299));var o=!1,i="",m=Vb,h=Kb,C=Yb;return n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(m=n.onUncaughtError),n.onCaughtError!==void 0&&(h=n.onCaughtError),n.onRecoverableError!==void 0&&(C=n.onRecoverableError)),n=M1(a,1,!1,null,null,o,i,null,m,h,C,B1),a[Us]=n.current,Wm(a),new uf(n)},ii.hydrateRoot=function(a,n,o){if(!c(a))throw Error(l(299));var i=!1,m="",h=Vb,C=Kb,L=Yb,$=null;return o!=null&&(o.unstable_strictMode===!0&&(i=!0),o.identifierPrefix!==void 0&&(m=o.identifierPrefix),o.onUncaughtError!==void 0&&(h=o.onUncaughtError),o.onCaughtError!==void 0&&(C=o.onCaughtError),o.onRecoverableError!==void 0&&(L=o.onRecoverableError),o.formState!==void 0&&($=o.formState)),n=M1(a,1,!0,n,o??null,i,m,$,h,C,L,B1),n.context=L1(null),o=n.current,i=ws(),i=Sa(i),m=Ar(i),m.callback=null,Sr(o,m,i),o=i,n.current.lanes=o,rt(n,o),An(n),a[Us]=n.current,Wm(a),new fu(n)},ii.version="19.2.1",ii}var py;function s6(){if(py)return vf.exports;py=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(s){console.error(s)}}
49return t(),vf.exports=a6(),vf.exports}var n6=s6(),r6=(function(){function t(){this.keyToValue=new Map,this.valueToKey=new Map}return t.prototype.set=function(s,r){this.keyToValue.set(s,r),this.valueToKey.set(r,s)},t.prototype.getByKey=function(s){return this.keyToValue.get(s)},t.prototype.getByValue=function(s){return this.valueToKey.get(s)},t.prototype.clear=function(){this.keyToValue.clear(),this.valueToKey.clear()},t})(),W2=(function(){function t(s){this.generateIdentifier=s,this.kv=new r6}return t.prototype.register=function(s,r){this.kv.getByValue(s)||(r||(r=this.generateIdentifier(s)),this.kv.set(r,s))},t.prototype.clear=function(){this.kv.clear()},t.prototype.getIdentifier=function(s){return this.kv.getByValue(s)},t.prototype.getValue=function(s){return this.kv.getByKey(s)},t})(),l6=(function(){var t=function(s,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,c){l.__proto__=c}||function(l,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(l[d]=c[d])},t(s,r)};return function(s,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(s,r);function l(){this.constructor=s}s.prototype=r===null?Object.create(r):(l.prototype=r.prototype,new l)}})(),o6=(function(t){l6(s,t);function s(){var r=t.call(this,function(l){return l.name})||this;return r.classToAllowedProps=new Map,r}return s.prototype.register=function(r,l){typeof l=="object"?(l.allowProps&&this.classToAllowedProps.set(r,l.allowProps),t.prototype.register.call(this,r,l.identifier)):t.prototype.register.call(this,r,l)},s.prototype.getAllowedProps=function(r){return this.classToAllowedProps.get(r)},s})(W2),c6=function(t,s){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var l=r.call(t),c,d=[],u;try{for(;(s===void 0||s-- >0)&&!(c=l.next()).done;)d.push(c.value)}catch(x){u={error:x}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(u)throw u.error}}return d};function i6(t){if("values"in Object)return Object.values(t);var s=[];for(var r in t)t.hasOwnProperty(r)&&s.push(t[r]);return s}function d6(t,s){var r=i6(t);if("find"in r)return r.find(s);for(var l=r,c=0;c<l.length;c++){var d=l[c];if(s(d))return d}}function tc(t,s){Object.entries(t).forEach(function(r){var l=c6(r,2),c=l[0],d=l[1];return s(d,c)})}function Iu(t,s){return t.indexOf(s)!==-1}function my(t,s){for(var r=0;r<t.length;r++){var l=t[r];if(s(l))return l}}var u6=(function(){function t(){this.transfomers={}}return t.prototype.register=function(s){this.transfomers[s.name]=s},t.prototype.findApplicable=function(s){return d6(this.transfomers,function(r){return r.isApplicable(s)})},t.prototype.findByName=function(s){return this.transfomers[s]},t})(),x6=function(t){return Object.prototype.toString.call(t).slice(8,-1)},Q2=function(t){return typeof t>"u"},p6=function(t){return t===null},Ai=function(t){return typeof t!="object"||t===null||t===Object.prototype?!1:Object.getPrototypeOf(t)===null?!0:Object.getPrototypeOf(t)===Object.prototype},xg=function(t){return Ai(t)&&Object.keys(t).length===0},el=function(t){return Array.isArray(t)},m6=function(t){return typeof t=="string"},f6=function(t){return typeof t=="number"&&!isNaN(t)},g6=function(t){return typeof t=="boolean"},h6=function(t){return t instanceof RegExp},Si=function(t){return t instanceof Map},Ei=function(t){return t instanceof Set},G2=function(t){return x6(t)==="Symbol"},v6=function(t){return t instanceof Date&&!isNaN(t.valueOf())},b6=function(t){return t instanceof Error},fy=function(t){return typeof t=="number"&&isNaN(t)},y6=function(t){return g6(t)||p6(t)||Q2(t)||f6(t)||m6(t)||G2(t)},j6=function(t){return typeof t=="bigint"},N6=function(t){return t===1/0||t===-1/0},C6=function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},w6=function(t){return t instanceof URL},V2=function(t){return t.replace(/\./g,"\\.")},Nf=function(t){return t.map(String).map(V2).join(".")},gi=function(t){for(var s=[],r="",l=0;l<t.length;l++){var c=t.charAt(l),d=c==="\\"&&t.charAt(l+1)===".";if(d){r+=".",l++;continue}var u=c===".";if(u){s.push(r),r="";
49continue}r+=c}var x=r;return s.push(x),s},pg=function(){return pg=Object.assign||function(t){for(var s,r=1,l=arguments.length;r<l;r++){s=arguments[r];for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(t[c]=s[c])}return t},pg.apply(this,arguments)},mg=function(t,s){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var l=r.call(t),c,d=[],u;try{for(;(s===void 0||s-- >0)&&!(c=l.next()).done;)d.push(c.value)}catch(x){u={error:x}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(u)throw u.error}}return d},fg=function(t,s){for(var r=0,l=s.length,c=t.length;r<l;r++,c++)t[c]=s[r];return t};function Sn(t,s,r,l){return{isApplicable:t,annotation:s,transform:r,untransform:l}}var K2=[Sn(Q2,"undefined",function(){return null},function(){}),Sn(j6,"bigint",function(t){return t.toString()},function(t){return typeof BigInt<"u"?BigInt(t):(console.error("Please add a BigInt polyfill."),t)}),Sn(v6,"Date",function(t){return t.toISOString()},function(t){return new Date(t)}),Sn(b6,"Error",function(t,s){var r={
49name:t.name,message:t.message};return s.allowedErrorProps.forEach(function(l){r[l]=t[l]}),r},function(t,s){var r=new Error(t.message);return r.name=t.name,r.stack=t.stack,s.allowedErrorProps.forEach(function(l){r[l]=t[l]}),r}),Sn(h6,"regexp",function(t){return""+t},function(t){var s=t.slice(1,t.lastIndexOf("/")),r=t.slice(t.lastIndexOf("/")+1);return new RegExp(s,r)}),Sn(Ei,"set",function(t){return fg([],mg(t.values()))},function(t){return new Set(t)}),Sn(Si,"map",function(t){return fg([],mg(t.entries()))},function(t){return new Map(t)}),Sn(function(t){return fy(t)||N6(t)},"number",function(t){return fy(t)?"NaN":t>0?"Infinity":"-Infinity"},Number),Sn(function(t){return t===0&&1/t===-1/0},"number",function(){return"-0"},Number),Sn(w6,"URL",function(t){return t.toString()},function(t){return new URL(t)})];function Cx(t,s,r,l){return{isApplicable:t,annotation:s,transform:r,untransform:l}}var Y2=Cx(function(t,s){if(G2(t)){var r=!!s.symbolRegistry.getIdentifier(t);return r}return!1},function(t,s){var r=s.symbolRegistry.getIdentifier(t);return["symbol",r]},function(t){return t.description},function(t,s,r){var l=r.symbolRegistry.getValue(s[1]);if(!l)throw new Error("Trying to deserialize unknown symbol");return l}),A6=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce(function(t,s){return t[s.name]=s,t},{}),X2=Cx(C6,function(t){return["typed-array",t.constructor.name]},function(t){return fg([],mg(t))},function(t,s){var r=A6[s[1]];if(!r)throw new Error("Trying to deserialize unknown typed array");return new r(t)});function Z2(t,s){if(t?.constructor){var r=!!s.classRegistry.getIdentifier(t.constructor);return r}return!1}var J2=Cx(Z2,function(t,s){var r=s.classRegistry.getIdentifier(t.constructor);return["class",r]},function(t,s){var r=s.classRegistry.getAllowedProps(t.constructor);if(!r)return pg({},t);var l={};return r.forEach(function(c){l[c]=t[c]}),l},function(t,s,r){var l=r.classRegistry.getValue(s[1]);if(!l)throw new Error("Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564");return Object.assign(Object.create(l.prototype),t)}),eN=Cx(function(t,s){return!!s.customTransformerRegistry.findApplicable(t)},function(t,s){var r=s.customTransformerRegistry.findApplicable(t);return["custom",r.name]},function(t,s){var r=s.customTransformerRegistry.findApplicable(t);return r.serialize(t)},function(t,s,r){var l=r.customTransformerRegistry.findByName(s[1]);if(!l)throw new Error("Trying to deserialize unknown custom value");return l.deserialize(t)}),S6=[J2,Y2,eN,X2],gy=function(t,s){var r=my(S6,function(c){return c.isApplicable(t,s)});if(r)return{value:r.transform(t,s),type:r.annotation(t,s)};var l=my(K2,function(c){return c.isApplicable(t,s)});if(l)return{value:l.transform(t,s),type:l.annotation}},tN={};K2.forEach(function(t){tN[t.annotation]=t});var E6=function(t,s,r){if(el(s))switch(s[0]){case"symbol":return Y2.untransform(t,s,r);case"class":return J2.untransform(t,s,r);case"custom":return eN.untransform(t,s,r);case"typed-array":return X2.untransform(t,s,r);default:throw new Error("Unknown transformation: "+s)}else{var l=tN[s];if(!l)throw new Error("Unknown transformation: "+s);return l.untransform(t,r)}},Go=function(t,s){for(var r=t.keys();s>0;)r.next(),s--;return r.next().value};function aN(t){if(Iu(t,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(Iu(t,"prototype"))throw new Error("prototype is not allowed as a property");if(Iu(t,"constructor"))throw new Error("constructor is not allowed as a property")}var D6=function(t,s){aN(s);for(var r=0;r<s.length;r++){var l=s[r];if(Ei(t))t=Go(t,+l);else if(Si(t)){var c=+l,d=+s[++r]==0?"key":"value",u=Go(t,c);switch(d){case"key":t=u;break;case"value":t=t.get(u);break}}else t=t[l]}return t},gg=function(t,s,r){if(aN(s),s.length===0)return r(t);for(var l=t,c=0;c<s.length-1;c++){var d=s[c];if(el(l)){var u=+d;l=l[u]}else if(Ai(l))l=l[d];else if(Ei(l)){var x=+d;l=Go(l,x)}else if(Si(l)){var p=c===s.length-2;if(p)break;var x=+d,g=+s[++c]==0?"key":"value",b=Go(l,x);switch(g){case"key":l=b;break;case"value":l=l.get(b);break}}}var v=s[s.length-1];if(el(l)?l[+v]=r(l[+v]):Ai(l)&&(l[v]=r(l[v])),Ei(l)){var y=Go(l,+v),j=r(y);y!==j&&(l.delete(y),l.add(j))}if(Si(l)){var x=+s[s.length-2],S=Go(l,x),g=+v==0?"key":"value";switch(g){case"key":{var N=r(S);l.set(N,l.get(S)),N!==S&&l.delete(S);break}case"value":{l.set(S,r(l.get(S)));break}}}return t},nr=function(t,s){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var l=r.call(t),c,d=[],u;try{for(;(s===void 0||s-- >0)&&!(c=l.next()).done;)d.push(c.value)}catch(x){u={error:x}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(u)throw u.error}}return d},Qr=function(t,s){for(var r=0,l=s.length,c=t.length;r<l;r++,c++)t[c]=s[r];return t};function hg(t,s,r){if(r===void 0&&(r=[]),!!t){if(!el(t)){tc(t,function(u,x){return hg(u,s,Qr(Qr([],nr(r)),nr(gi(x))))});return}var l=nr(t,2),c=l[0],d=l[1];d&&tc(d,function(u,x){hg(u,s,Qr(Qr([],nr(r)),nr(gi(x))))}),s(c,r)}}function M6(t,s,r){return hg(s,function(l,c){t=gg(t,c,function(d){return E6(d,l,r)})}),t}function L6(t,s){function r(u,x){var p=D6(t,gi(x));
49u.map(gi).forEach(function(g){t=gg(t,g,function(){return p})})}if(el(s)){var l=nr(s,2),c=l[0],d=l[1];c.forEach(function(u){t=gg(t,gi(u),function(){return t})}),d&&tc(d,r)}else tc(s,r);return t}var k6=function(t,s){return Ai(t)||el(t)||Si(t)||Ei(t)||Z2(t,s)};function R6(t,s,r){var l=r.get(t);l?l.push(s):r.set(t,[s])}function T6(t,s){var r={},l=void 0;return t.forEach(function(c){if(!(c.length<=1)){s||(c=c.map(function(p){return p.map(String)}).sort(function(p,g){return p.length-g.length}));var d=nr(c),u=d[0],x=d.slice(1);u.length===0?l=x.map(Nf):r[Nf(u)]=x.map(Nf)}}),l?xg(r)?[l]:[l,r]:xg(r)?void 0:r}var sN=function(t,s,r,l,c,d,u){var x;c===void 0&&(c=[]),d===void 0&&(d=[]),u===void 0&&(u=new Map);var p=y6(t);if(!p){R6(t,c,s);var g=u.get(t);if(g)return l?{transformedValue:null}:g}if(!k6(t,r)){var b=gy(t,r),v=b?{transformedValue:b.value,annotations:[b.type]}:{transformedValue:t};return p||u.set(t,v),v}if(Iu(d,t))return{transformedValue:null};var y=gy(t,r),j=(x=y?.value)!==null&&x!==void 0?x:t,S=el(j)?[]:{},N={};tc(j,function(D,k){var A=sN(D,s,r,l,Qr(Qr([],nr(c)),[k]),Qr(Qr([],nr(d)),[t]),u);S[k]=A.transformedValue,el(A.annotations)?N[k]=A.annotations:Ai(A.annotations)&&tc(A.annotations,function(_,E){N[V2(k)+"."+E]=_})});var w=xg(N)?{transformedValue:S,annotations:y?[y.type]:void 0}:{transformedValue:S,annotations:y?[y.type,N]:N};return p||u.set(t,w),w};function nN(t){return Object.prototype.toString.call(t).slice(8,-1)}function hy(t){return nN(t)==="Array"}function _6(t){if(nN(t)!=="Object")return!1;const s=Object.getPrototypeOf(t);return!!s&&s.constructor===Object&&s===Object.prototype}function O6(t,s,r,l,c){const d={}.propertyIsEnumerable.call(l,s)?"enumerable":"nonenumerable";d==="enumerable"&&(t[s]=r),c&&d==="nonenumerable"&&Object.defineProperty(t,s,{value:r,enumerable:!1,writable:!0,configurable:!0})}function vg(t,s={}){if(hy(t))return t.map(c=>vg(c,s));if(!_6(t))return t;const r=Object.getOwnPropertyNames(t),l=Object.getOwnPropertySymbols(t);return[...r,...l].reduce((c,d)=>{if(hy(s.props)&&!s.props.includes(d))return c;const u=t[d],x=vg(u,s);return O6(c,d,x,t,s.nonenumerable),c},{})}var _l=function(){return _l=Object.assign||function(t){for(var s,r=1,l=arguments.length;r<l;r++){s=arguments[r];for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(t[c]=s[c])}return t},_l.apply(this,arguments)},P6=function(t,s){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var l=r.call(t),c,d=[],u;try{for(;(s===void 0||s-- >0)&&!(c=l.next()).done;)d.push(c.value)}catch(x){u={error:x}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(u)throw u.error}}return d},z6=function(t,s){for(var r=0,l=s.length,c=t.length;r<l;r++,c++)t[c]=s[r];return t},pr=(function(){function t(s){var r=s===void 0?{}:s,l=r.dedupe,c=l===void 0?!1:l;this.classRegistry=new o6,this.symbolRegistry=new W2(function(d){var u;return(u=d.description)!==null&&u!==void 0?u:""}),this.customTransformerRegistry=new u6,this.allowedErrorProps=[],this.dedupe=c}return t.prototype.serialize=function(s){var r=new Map,l=sN(s,r,this,this.dedupe),c={json:l.transformedValue};l.annotations&&(c.meta=_l(_l({},c.meta),{values:l.annotations}));var d=T6(r,this.dedupe);return d&&(c.meta=_l(_l({},c.meta),{referentialEqualities:d})),c},t.prototype.deserialize=function(s){var r=s.json,l=s.meta,c=vg(r);return l?.values&&(c=M6(c,l.values,this)),l?.referentialEqualities&&(c=L6(c,l.referentialEqualities)),c},t.prototype.stringify=function(s){return JSON.stringify(this.serialize(s))},t.prototype.parse=function(s){return this.deserialize(JSON.parse(s))},t.prototype.registerClass=function(s,r){this.classRegistry.register(s,r)},t.prototype.registerSymbol=function(s,r){this.symbolRegistry.register(s,r)},t.prototype.registerCustom=function(s,r){this.customTransformerRegistry.register(_l({name:r},s))},t.prototype.allowErrorProps=function(){for(var s,r=[],l=0;l<arguments.length;l++)r[l]=arguments[l];(s=this.allowedErrorProps).push.apply(s,z6([],P6(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})();pr.serialize;pr.deserialize;pr.stringify;pr.parse;pr.registerClass;pr.registerCustom;pr.registerSymbol;pr.allowErrorProps;var U6=(t,s,r,l,c,d,u,x)=>{let p=document.documentElement,g=["light","dark"];
vendor: 7,464 bytes, line 49
49function b(j){(Array.isArray(t)?t:[t]).forEach(S=>{let N=S==="class",w=N&&d?c.map(D=>d[D]||D):c;N?(p.classList.remove(...w),p.classList.add(d&&d[j]?d[j]:j)):p.setAttribute(S,j)}),v(j)}function v(j){x&&g.includes(j)&&(p.style.colorScheme=j)}function y(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(l)b(l);else try{let j=localStorage.getItem(s)||r,S=u&&j==="system"?y():j;b(S)}catch{}},I6=f.createContext(void 0),B6={setTheme:t=>{},themes:[]},F6=()=>{var t;return(t=f.useContext(I6))!=null?t:B6};f.memo(({forcedTheme:t,storageKey:s,attribute:r,enableSystem:l,enableColorScheme:c,defaultTheme:d,value:u,themes:x,nonce:p,scriptProps:g})=>{let b=JSON.stringify([r,s,d,t,x,u,l,c]).slice(1,-1);return f.createElement("script",{...g,suppressHydrationWarning:!0,nonce:typeof window>"u"?p:"",dangerouslySetInnerHTML:{__html:`(${U6.toString()})(${b})`}})});var dn=$2();const rN=s2(dn);function H6(t){if(typeof document>"u")return;let s=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",s.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}const q6=t=>{switch(t){case"success":return Q6;case"info":return V6;case"warning":return G6;case"error":return K6;default:return null}},$6=Array(12).fill(0),W6=({visible:t,className:s})=>ye.createElement("div",{className:["sonner-loading-wrapper",s].filter(Boolean).join(" "),"data-visible":t},ye.createElement("div",{className:"sonner-spinner"},$6.map((r,l)=>ye.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${l}`})))),Q6=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ye.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"})),G6=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ye.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"})),V6=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ye.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"})),K6=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ye.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"})),Y6=ye.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"},ye.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ye.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),X6=()=>{const[t,s]=ye.useState(document.hidden);return ye.useEffect(()=>{const r=()=>{s(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),t};let bg=1;class Z6{constructor(){this.subscribe=s=>(this.subscribers.push(s),()=>{const r=this.subscribers.indexOf(s);this.subscribers.splice(r,1)}),this.publish=s=>{this.subscribers.forEach(r=>r(s))},this.addToast=s=>{this.publish(s),this.toasts=[...this.toasts,s]},this.create=s=>{var r;const{message:l,...c}=s,d=typeof s?.id=="number"||((r=s.id)==null?void 0:r.length)>0?s.id:bg++,u=this.toasts.find(p=>p.id===d),x=s.dismissible===void 0?!0:s.dismissible;return this.dismissedToasts.has(d)&&this.dismissedToasts.delete(d),u?this.toasts=this.toasts.map(p=>p.id===d?(this.publish({...p,...s,id:d,title:l}),{...p,...s,id:d,dismissible:x,title:l}):p):this.addToast({title:l,...c,dismissible:x,id:d}),d},this.dismiss=s=>(s?(this.dismissedToasts.add(s),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:s,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(l=>l({id:r.id,dismiss:!0}))}),s),this.message=(s,r)=>this.create({...r,message:s}),this.error=(s,r)=>this.create({...r,message:s,type:"error"}),this.success=(s,r)=>this.create({...r,type:"success",message:s}),this.info=(s,r)=>this.create({...r,type:"info",message:s}),this.warning=(s,r)=>this.create({...r,type:"warning",message:s}),this.loading=(s,r)=>this.create({...r,type:"loading",message:s}),this.promise=(s,r)=>{if(!r)return;let l;r.loading!==void 0&&(l=this.create({...r,promise:s,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const c=Promise.resolve(s instanceof Function?s():s);let d=l!==void 0,u;const x=c.then(async g=>{if(u=["resolve",g],ye.isValidElement(g))d=!1,this.create({id:l,type:"default",message:g});else if(eD(g)&&!g.ok){d=!1;const v=typeof r.error=="function"?await r.error(`HTTP error! status: ${g.status}`):r.error,y=typeof r.description=="function"?await r.description(`HTTP error! status: ${g.status}`):r.description,S=typeof v=="object"&&!ye.isValidElement(v)?v:{message:v};this.create({id:l,type:"error",description:y,...S})}else if(g instanceof Error){d=!1;const v=typeof r.error=="function"?await r.error(g):r.error,y=typeof r.description=="function"?await r.description(g):r.description,S=typeof v=="object"&&!ye.isValidElement(v)?v:{message:v};this.create({id:l,type:"error",description:y,...S})}else if(r.success!==void 0){d=!1;const v=typeof r.success=="function"?await r.success(g):r.success,y=typeof r.description=="function"?await r.description(g):r.description,S=typeof v=="object"&&!ye.isValidElement(v)?v:{message:v};this.create({id:l,type:"success",description:y,...S})}}).catch(async g=>{if(u=["reject",g],r.error!==void 0){d=!1;const b=typeof r.error=="function"?await r.error(g):r.error,v=typeof r.description=="function"?await r.description(g):r.description,j=typeof b=="object"&&!ye.isValidElement(b)?b:{message:b};this.create({id:l,type:"error",description:v,...j})}}).finally(()=>{d&&(this.dismiss(l),l=void 0),r.finally==null||r.finally.call(r)}),p=()=>new Promise((g,b)=>x.then(()=>u[0]==="reject"?b(u[1]):g(u[1])).catch(b));return typeof l!="string"&&typeof l!="number"?{unwrap:p}:Object.assign(l,{unwrap:p})},this.custom=(s,r)=>{const l=r?.id||bg++;return this.create({jsx:s(l),id:l,...r}),l},this.getActiveToasts=()=>this.toasts.filter(s=>!this.dismissedToasts.has(s.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const us=new Z6,J6=(t,s)=>{const r=s?.id||bg++;return us.addToast({title:t,...s,id:r}),r},eD=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",tD=J6,aD=()=>us.toasts,sD=()=>us.getActiveToasts(),ce=Object.assign(tD,{success:us.success,info:us.info,warning:us.warning,error:us.error,custom:us.custom,message:us.message,promise:us.promise,dismiss:us.dismiss,loading:us.loading},{getHistory:aD,getToasts:sD});H6
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: 2,353 bytes, line 49
49ju(t){return t.label!==void 0}const nD=3,rD="24px",lD="16px",vy=4e3,oD=356,cD=14,iD=45,dD=200;function En(...t){return t.filter(Boolean).join(" ")}function uD(t){const[s,r]=t.split("-"),l=[];return s&&l.push(s),r&&l.push(r),l}const xD=t=>{var s,r,l,c,d,u,x,p,g;const{invert:b,toast:v,unstyled:y,interacting:j,setHeights:S,visibleToasts:N,heights:w,index:D,toasts:k,expanded:A,removeToast:_,defaultRichColors:E,closeButton:I,style:R,cancelButtonStyle:z,actionButtonStyle:U,className:B="",descriptionClassName:F="",duration:V,position:de,gap:le,expandByDefault:xe,classNames:M,icons:O,closeButtonAriaLabel:T="Close toast"}=t,[K,ve]=ye.useState(null),[P,J]=ye.useState(null),[W,H]=ye.useState(!1),[te,pe]=ye.useState(!1),[ae,Ne]=ye.useState(!1),[Se,Ce]=ye.useState(!1),[ke,Z]=ye.useState(!1),[fe,Ee]=ye.useState(0),[Ie,qe]=ye.useState(0),Ve=ye.useRef(v.duration||V||vy),Ht=ye.useRef(null),ht=ye.useRef(null),Je=D===0,q=D+1<=N,Le=v.type,Be=v.dismissible!==!1,Pe=v.className||"",mt=v.descriptionClassName||"",dt=ye.useMemo(()=>w.findIndex(Re=>Re.toastId===v.id)||0,[w,v.id]),qt=ye.useMemo(()=>{var Re;return(Re=v.closeButton)!=null?Re:I},[v.closeButton,I]),X=ye.useMemo(()=>v.duration||V||vy,[v.duration,V]),vt=ye.useRef(0),et=ye.useRef(0),Ke=ye.useRef(0),nt=ye.useRef(null),[Gt,Vt]=de.split("-"),sa=ye.useMemo(()=>w.reduce((Re,tt,ut)=>ut>=dt?Re:Re+tt.height,0),[w,dt]),Kt=X6(),en=v.invert||b,ts=Le==="loading";et.current=ye.useMemo(()=>dt*le+sa,[dt,sa]),ye.useEffect(()=>{Ve.current=X},[X]),ye.useEffect(()=>{H(!0)},[]),ye.useEffect(()=>{const Re=ht.current;if(Re){const tt=Re.getBoundingClientRect().height;return qe(tt),S(ut=>[{toastId:v.id,height:tt,position:v.position},...ut]),()=>S(ut=>ut.filter(ft=>ft.toastId!==v.id))}},[S,v.id]),ye.useLayoutEffect(()=>{if(!W)return;const Re=ht.current,tt=Re.style.height;Re.style.height="auto";const ut=Re.getBoundingClientRect().height;Re.style.height=tt,qe(ut),S(ft=>ft.find(rt=>rt.toastId===v.id)?ft.map(rt=>rt.toastId===v.id?{...rt,height:ut}:rt):[{toastId:v.id,height:ut,position:v.position},...ft])},[W,v.title,v.description,S,v.id,v.jsx,v.action,v.cancel]);const Ra=ye.useCallback(()=>{pe(!0),Ee(et.current),S(Re=>Re.filter(tt=>tt.toastId!==v.id)),setTimeout(()=>{_(v)},dD)},[v,_,S,et]);ye.useEffect(()=>{if(v.promise&&Le==="loading"||v.duration===1/0||v.type==="loading")return;let Re;return A||j||Kt?(()=>
vendor: 17,862 bytes, line 49
49{if(Ke.current<vt.current){const ft=new Date().getTime()-vt.current;Ve.current=Ve.current-ft}Ke.current=new Date().getTime()})():(()=>{Ve.current!==1/0&&(vt.current=new Date().getTime(),Re=setTimeout(()=>{v.onAutoClose==null||v.onAutoClose.call(v,v),Ra()},Ve.current))})(),()=>clearTimeout(Re)},[A,j,v,Le,Kt,Ra]),ye.useEffect(()=>{v.delete&&(Ra(),v.onDismiss==null||v.onDismiss.call(v,v))},[Ra,v.delete]);function as(){var Re;if(O?.loading){var tt;return ye.createElement("div",{className:En(M?.loader,v==null||(tt=v.classNames)==null?void 0:tt.loader,"sonner-loader"),"data-visible":Le==="loading"},O.loading)}return ye.createElement(W6,{className:En(M?.loader,v==null||(Re=v.classNames)==null?void 0:Re.loader),visible:Le==="loading"})}const $a=v.icon||O?.[Le]||q6(Le);var Nt,Et;return ye.createElement("li",{tabIndex:0,ref:ht,className:En(B,Pe,M?.toast,v==null||(s=v.classNames)==null?void 0:s.toast,M?.default,M?.[Le],v==null||(r=v.classNames)==null?void 0:r[Le]),"data-sonner-toast":"","data-rich-colors":(Nt=v.richColors)!=null?Nt:E,"data-styled":!(v.jsx||v.unstyled||y),"data-mounted":W,"data-promise":!!v.promise,"data-swiped":ke,"data-removed":te,"data-visible":q,"data-y-position":Gt,"data-x-position":Vt,"data-index":D,"data-front":Je,"data-swiping":ae,"data-dismissible":Be,"data-type":Le,"data-invert":en,"data-swipe-out":Se,"data-swipe-direction":P,"data-expanded":!!(A||xe&&W),"data-testid":v.testId,style:{"--index":D,"--toasts-before":D,"--z-index":k.length-D,"--offset":`${te?fe:et.current}px`,"--initial-height":xe?"auto":`${Ie}px`,...R,...v.style},onDragEnd:()=>{Ne(!1),ve(null),nt.current=null},onPointerDown:Re=>{Re.button!==2&&(ts||!Be||(Ht.current=new Date,Ee(et.current),Re.target.setPointerCapture(Re.pointerId),Re.target.tagName!=="BUTTON"&&(Ne(!0),nt.current={x:Re.clientX,y:Re.clientY})))},onPointerUp:()=>{var Re,tt,ut;if(Se||!Be)return;nt.current=null;const ft=Number(((Re=ht.current)==null?void 0:Re.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Yt=Number(((tt=ht.current)==null?void 0:tt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),rt=new Date().getTime()-((ut=Ht.current)==null?void 0:ut.getTime()),ot=K==="x"?ft:Yt,na=Math.abs(ot)/rt;if(Math.abs(ot)>=iD||na>.11){Ee(et.current),v.onDismiss==null||v.onDismiss.call(v,v),J(K==="x"?ft>0?"right":"left":Yt>0?"down":"up"),Ra(),Ce(!0);return}else{var Ct,Rt;(Ct=ht.current)==null||Ct.style.setProperty("--swipe-amount-x","0px"),(Rt=ht.current)==null||Rt.style.setProperty("--swipe-amount-y","0px")}Z(!1),Ne(!1),ve(null)},onPointerMove:Re=>{var tt,ut,ft;if(!nt.current||!Be||((tt=window.getSelection())==null?void 0:tt.toString().length)>0)return;const rt=Re.clientY-nt.current.y,ot=Re.clientX-nt.current.x;var na;const Ct=(na=t.swipeDirections)!=null?na:uD(de);!K&&(Math.abs(ot)>1||Math.abs(rt)>1)&&ve(Math.abs(ot)>Math.abs(rt)?"x":"y");let Rt={x:0,y:0};const Sa=It=>1/(1.5+Math.abs(It)/20);if(K==="y"){if(Ct.includes("top")||Ct.includes("bottom"))if(Ct.includes("top")&&rt<0||Ct.includes("bottom")&&rt>0)Rt.y=rt;else{const It=rt*Sa(rt);Rt.y=Math.abs(It)<Math.abs(rt)?It:rt}}else if(K==="x"&&(Ct.includes("left")||Ct.includes("right")))if(Ct.includes("left")&&ot<0||Ct.includes("right")&&ot>0)Rt.x=ot;else{const It=ot*Sa(ot);Rt.x=Math.abs(It)<Math.abs(ot)?It:ot}(Math.abs(Rt.x)>0||Math.abs(Rt.y)>0)&&Z(!0),(ut=ht.current)==null||ut.style.setProperty("--swipe-amount-x",`${Rt.x}px`),(ft=ht.current)==null||ft.style.setProperty("--swipe-amount-y",`${Rt.y}px`)}},qt&&!v.jsx&&Le!=="loading"?ye.createElement("button",{"aria-label":T,"data-disabled":ts,"data-close-button":!0,onClick:ts||!Be?()=>{}:()=>{Ra(),v.onDismiss==null||v.onDismiss.call(v,v)},className:En(M?.closeButton,v==null||(l=v.classNames)==null?void 0:l.closeButton)},(Et=O?.close)!=null?Et:Y6):null,(Le||v.icon||v.promise)&&v.icon!==null&&(O?.[Le]!==null||v.icon)?ye.createElement("div",{"data-icon":"",className:En(M?.icon,v==null||(c=v.classNames)==null?void 0:c.icon)},v.promise||v.type==="loading"&&!v.icon?v.icon||as():null,v.type!=="loading"?$a:null):null,ye.createElement("div",{"data-content":"",className:En(M?.content,v==null||(d=v.classNames)==null?void 0:d.content)},ye.createElement("div",{"data-title":"",className:En(M?.title,v==null||(u=v.classNames)==null?void 0:u.title)},v.jsx?v.jsx:typeof v.title=="function"?v.title():v.title),v.description?ye.createElement("div",{"data-description":"",className:En(F,mt,M?.description,v==null||(x=v.classNames)==null?void 0:x.description)},typeof v.description=="function"?v.description():v.description):null),ye.isValidElement(v.cancel)?v.cancel:v.cancel&&ju(v.cancel)?ye.createElement("button",{"data-button":!0,"data-cancel":!0,style:v.cancelButtonStyle||z,onClick:Re=>{ju(v.cancel)&&Be&&(v.cancel.onClick==null||v.cancel.onClick.call(v.cancel,Re),Ra())},className:En(M?.cancelButton,v==null||(p=v.classNames)==null?void 0:p.cancelButton)},v.cancel.label):null,ye.isValidElement(v.action)?v.action:v.action&&ju(v.action)?ye.createElement("button",{"data-button":!0,"data-action":!0,style:v.actionButtonStyle||U,onClick:Re=>{ju(v.action)&&(v.action.onClick==null||v.action.onClick.call(v.action,Re),!Re.defaultPrevented&&Ra())},className:En(M?.actionButton,v==null||(g=v.classNames)==null?void 0:g.actionButton)},v.action.label):null)};function by(){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 pD(t,s){const r={};return[t,s].forEach((l,c)=>{const d=c===1,u=d?"--mobile-offset":"--offset",x=d?lD:rD;function p(g){["top","right","bottom","left"].forEach(b=>{r[`${u}-${b}`]=typeof g=="number"?`${g}px`:g})}typeof l=="number"||typeof l=="string"?p(l):typeof l=="object"?["top","right","bottom","left"].forEach(g=>{l[g]===void 0?r[`${u}-${g}`]=x:r[`${u}-${g}`]=typeof l[g]=="number"?`${l[g]}px`:l[g]}):p(x)}),r}const mD=ye.forwardRef(function(s,r){const{id:l,invert:c,position:d="bottom-right",hotkey:u=["altKey","KeyT"],expand:x,closeButton:p,className:g,offset:b,mobileOffset:v,theme:y="light",richColors:j,duration:S,style:N,visibleToasts:w=nD,toastOptions:D,dir:k=by(),gap:A=cD,icons:_,containerAriaLabel:E="Notifications"}=s,[I,R]=ye.useState([]),z=ye.useMemo(()=>l?I.filter(W=>W.toasterId===l):I.filter(W=>!W.toasterId),[I,l]),U=ye.useMemo(()=>Array.from(new Set([d].concat(z.filter(W=>W.position).map(W=>W.position)))),[z,d]),[B,F]=ye.useState([]),[V,de]=ye.useState(!1),[le,xe]=ye.useState(!1),[M,O]=ye.useState(y!=="system"?y:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),T=ye.useRef(null),K=u.join("+").replace(/Key/g,"").replace(/Digit/g,""),ve=ye.useRef(null),P=ye.useRef(!1),J=ye.useCallback(W=>{R(H=>{var te;return(te=H.find(pe=>pe.id===W.id))!=null&&te.delete||us.dismiss(W.id),H.filter(({id:pe})=>pe!==W.id)})},[]);return ye.useEffect(()=>us.subscribe(W=>{if(W.dismiss){requestAnimationFrame(()=>{R(H=>H.map(te=>te.id===W.id?{...te,delete:!0}:te))});return}setTimeout(()=>{rN.flushSync(()=>{R(H=>{const te=H.findIndex(pe=>pe.id===W.id);return te!==-1?[...H.slice(0,te),{...H[te],...W},...H.slice(te+1)]:[W,...H]})})})}),[I]),ye.useEffect(()=>{if(y!=="system"){O(y);return}if(y==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?O("dark"):O("light")),typeof window>"u")return;const W=window.matchMedia("(prefers-color-scheme: dark)");try{W.addEventListener("change",({matches:H})=>{O(H?"dark":"light")})}catch{W.addListener(({matches:te})=>{try{O(te?"dark":"light")}catch(pe){console.error(pe)}})}},[y]),ye.useEffect(()=>{I.length<=1&&de(!1)},[I]),ye.useEffect(()=>{const W=H=>{var te;if(u.every(Ne=>H[Ne]||H.code===Ne)){var ae;de(!0),(ae=T.current)==null||ae.focus()}H.code==="Escape"&&(document.activeElement===T.current||(te=T.current)!=null&&te.contains(document.activeElement))&&de(!1)};return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)},[u]),ye.useEffect(()=>{if(T.current)return()=>{ve.current&&(ve.current.focus({preventScroll:!0}),ve.current=null,P.current=!1)}},[T.current]),ye.createElement("section",{ref:r,"aria-label":`${E} ${K}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},U.map((W,H)=>{var te;const[pe,ae]=W.split("-");return z.length?ye.createElement("ol",{key:W,dir:k==="auto"?by():k,tabIndex:-1,ref:T,className:g,"data-sonner-toaster":!0,"data-sonner-theme":M,"data-y-position":pe,"data-x-position":ae,style:{"--front-toast-height":`${((te=B[0])==null?void 0:te.height)||0}px`,"--width":`${oD}px`,"--gap":`${A}px`,...N,...pD(b,v)},onBlur:Ne=>{P.current&&!Ne.currentTarget.contains(Ne.relatedTarget)&&(P.current=!1,ve.current&&(ve.current.focus({preventScroll:!0}),ve.current=null))},onFocus:Ne=>{Ne.target instanceof HTMLElement&&Ne.target.dataset.dismissible==="false"||P.current||(P.current=!0,ve.current=Ne.relatedTarget)},onMouseEnter:()=>de(!0),onMouseMove:()=>de(!0),onMouseLeave:()=>{le||de(!1)},onDragEnd:()=>de(!1),onPointerDown:Ne=>{Ne.target instanceof HTMLElement&&Ne.target.dataset.dismissible==="false"||xe(!0)},onPointerUp:()=>xe(!1)},z.filter(Ne=>!Ne.position&&H===0||Ne.position===W).map((Ne,Se)=>{var Ce,ke;return ye.createElement(xD,{key:Ne.id,icons:_,index:Se,toast:Ne,defaultRichColors:j,duration:(Ce=D?.duration)!=null?Ce:S,className:D?.className,descriptionClassName:D?.descriptionClassName,invert:c,visibleToasts:w,closeButton:(ke=D?.closeButton)!=null?ke:p,interacting:le,position:W,style:D?.style,unstyled:D?.unstyled,classNames:D?.classNames,cancelButtonStyle:D?.cancelButtonStyle,actionButtonStyle:D?.actionButtonStyle,closeButtonAriaLabel:D?.closeButtonAriaLabel,removeToast:J,toasts:z.filter(Z=>Z.position==Ne.position),heights:B.filter(Z=>Z.position==Ne.position),setHeights:F,expandByDefault:x,gap:A,expanded:V,swipeDirections:s.swipeDirections})})):null}))}),fD=({...t})=>{const{theme:s="system"}=F6();return e.jsx(mD,{"data-loc":"client/src/components/ui/sonner.tsx:8",theme:s,className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...t})};function Ae(t,s,{checkForDefaultPrevented:r=!0}={}){return function(c){if(t?.(c),r===!1||!c.defaultPrevented)return s?.(c)}}function yy(t,s){if(typeof t=="function")return t(s);t!=null&&(t.current=s)}function wx(...t){return s=>{let r=!1;const l=t.map(c=>{const d=yy(c,s);return!r&&typeof d=="function"&&(r=!0),d});if(r)return()=>{for(let c=0;c<l.length;c++){const d=l[c];typeof d=="function"?d():yy(t[c],null)}}}}function st(...t){return f.useCallback(wx(...t),t)}function gD(t,s){const r=f.createContext(s),l=d=>{const{children:u,...x}=d,p=f.useMemo(()=>x,Object.values(x));return e.jsx(r.Provider,{value:p,children:u})};l.displayName=t+"Provider";function c(d){const u=f.useContext(r);if(u)return u;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${t}\``)}return[l,c]}function zs(t,s=[]){let r=[];function l(d,u){const x=f.createContext(u),p=r.length;r=[...r,u];const g=v=>{const{scope:y,children:j,...S}=v,N=y?.[t]?.[p]||x,w=f.useMemo(()=>S,Object.values(S));return e.jsx(N.Provider,{value:w,children:j})};g.displayName=d+"Provider";function b(v,y){const j=y?.[t]?.[p]||x,S=f.useContext(j);if(S)return S;if(u!==void 0)return u;throw new Error(`\`${v}\` must be used within \`${d}\``)}return[g,b]}const c=()=>{const d=r.map(u=>f.createContext(u));return function(x){const p=x?.[t]||d;return f.useMemo(()=>({[`__scope${t}`]:{...x,[t]:p}}),[x,p])}};return c.scopeName=t,[l,hD(c,...s)]}function hD(...t){const s=t[0];if(t.length===1)return s;const r=()=>{const l=t.map(c=>({useScope:c(),scopeName:c.scopeName}));return function(d){const u=l.reduce((x,{useScope:p,scopeName:g})=>{const v=p(d)[`__scope${g}`];return{...x,...v}},{});return f.useMemo(()=>({[`__scope${s.scopeName}`]:u}),[u])}};return r.scopeName=s.scopeName,r}function tl(t){const s=vD(t),r=f.forwardRef((l,c)=>{const{children:d,...u}=l,x=f.Children.toArray(d),p=x.find(bD);if(p){const g=p.props.children,b=x.map(v=>v===p?f.Children.count(g)>1?f.Children.only(null):f.isValidElement(g)?g.props.children:null:v);return e.jsx(s,{...u,ref:c,children:f.isValidElement(g)?f.cloneElement(g,void 0,b):null})}return e.jsx(s,{...u,ref:c,children:d})});return r.displayName=`${t}.Slot`,r}var lN=tl("Slot");function vD(t){const s=f.forwardRef((r,l)=>{const{children:c,...d}=r;if(f.isValidElement(c)){const u=jD(c),x=yD(d,c.props);return c.type!==f.Fragment&&(x.ref=l?wx(l,u):u),f.cloneElement(c,x)}return f.Children.count(c)>1?f.Children.only(null):null});return s.displayName=`${t}.SlotClone`,s}var oN=Symbol("radix.slottable");function cN(t){const s=({children:r})=>e.jsx(e.Fragment,{children:r});return s.displayName=`${t}.Slottable`,s.__radixId=oN,s}function bD(t){return f.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===oN}function yD(t,s){const r={...s};for(const l in s){const c=t[l],d=s[l];/^on[A-Z]/.test(l)?c&&d?r[l]=(...x)=>{const p=d(...x);return c(...x),p}:c&&(r[l]=c):l==="style"?r[l]={...c,...d}:l==="className"&&(r[l]=[c,d].filter(Boolean).join(" "))}return{...t,...r}}function jD(t){let s=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=s&&"isReactWarning"in s&&s.isReactWarning;return r?t.ref:(s=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=s&&"isReactWarning"in s&&s.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var ND=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Qe=ND.reduce((t,s)=>{const r=tl(`Primitive.${s}`),l=f.forwardRef((c,d)=>{const{asChild:u,...x}=c,p=u?r:s;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),e.jsx(p,{...x,ref:d})});return l.displayName=`Primitive.${s}`,{...t,[s]:l}},{});function iN(t,s){t&&dn.flushSync(()=>t.dispatchEvent(s))}function La(t){const s=f.useRef(t);return f.useEffect(()=>{s.current=t}),f.useMemo(()=>(...r)=>s.current?.(...r),[])}function CD(t,s=globalThis?.document){const r=La(t);f.useEffect(()=>{const l=c=>{c.key==="Escape"&&r(c)};return s.addEventListener("keydown",l,{capture:!0}),()=>s.removeEventListener("keydown",l,{capture:!0})},[r,s])}var wD="DismissableLayer",yg="dismissableLayer.update",AD="dismissableLayer.pointerDownOutside",SD="dismissableLayer.focusOutside",jy,dN=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),cc=f.forwardRef((t,s)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:u,onDismiss:x,...p}=t,g=f.useContext(dN),[b,v]=f.useState(null),y=b?.ownerDocument??globalThis?.document,[,j]=f.useState({}),S=st(s,R=>v(R)),N=Array.from(g.layers),[w]=[...g.layersWithOutsidePointerEventsDisabled].slice(-1),D=N.indexOf(w),k=b?N.indexOf(b):-1,A=g.layersWithOutsidePointerEventsDisabled.size>0,_=k>=D,E=MD(R=>{const z=R.target,U=[...g.branches].some(B=>B.contains(z));!_||U||(c?.(R),u?.(R),R.defaultPrevented||x?.())},y),I=LD(R=>{const z=R.target;[...g.branches].some(B=>B.contains(z))||(d?.(R),u?.(R),R.defaultPrevented||x?.())},y);return CD(R=>{k===g.layers.size-1&&(l?.(R),!R.defaultPrevented&&x&&(R.preventDefault(),x()))},y),f.useEffect(()=>{if(b)return r&&(g.layersWithOutsidePointerEventsDisabled.size===0&&(jy=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),g.layersWithOutsidePointerEventsDisabled.add(b)),g.layers.add(b),Ny(),()=>{r&&g.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=jy)}},[b,y,r,g]),f.useEffect(()=>()=>{b&&(g.layers.delete(b),g.layersWithOutsidePointerEventsDisabled.delete(b),Ny())},[b,g]),f.useEffect(()=>{const R=()=>j({});return document.addEventListener(yg,R),()=>document.removeEventListener(yg,R)},[]),e.jsx(Qe.div,{...p,ref:S,style:{pointerEvents:A?_?"auto":"none":void 0,...t.style},onFocusCapture:Ae(t.onFocusCapture,I.onFocusCapture),onBlurCapture:Ae(t.onBlurCapture,I.onBlurCapture),onPointerDownCapture:Ae(t.onPointerDownCapture,E.onPointerDownCapture)})});cc.displayName=wD;var ED="DismissableLayerBranch",DD=f.forwardRef((t,s)=>{const r=f.useContext(dN),l=f.useRef(null),c=st(s,l);return f.useEffect(()=>{const d=l.current;if(d)return r.branches.add(d),()=>{r.branches.delete(d)}},[r.branches]),e.jsx(Qe.div,{...t,ref:c})});DD.displayName=ED;function MD(t,s=globalThis?.document){const r=La(t),l=f.useRef(!1),c=f.useRef(()=>{});return f.useEffect(()=>{const d=x=>{if(x.target&&!l.current){let p=function(){uN(AD,r,g,{discrete:!0})};const g={originalEvent:x};x.pointerType==="touch"?(s.removeEventListener("click",c.current),c.current=p,s.addEventListener("click",c.current,{once:!0})):p()}else s.removeEventListener("click",c.current);l.current=!1},u=window.setTimeout(()=>{s.addEventListener("pointerdown",d)},0);return()=>{window.clearTimeout(u),s.removeEventListener("pointerdown",d),s.removeEventListener("click",c.current)}},[s,r]),{onPointerDownCapture:()=>l.current=!0}}function LD(t,s=globalThis?.document){const r=La(t),l=f.useRef(!1);return f.useEffect(()=>{const c=d=>{d.target&&!l.current&&uN(SD,r,{originalEvent:d},{discrete:!1})};return s.addEventListener("focusin",c),()=>s.removeEventListener("focusin",c)},[s,r]),{onFocusCapture:()=>l.current=!0,onBlurCapture:()=>l.current=!1}}function Ny(){const t=new CustomEvent(yg);document.dispatchEvent(t)}function uN(t,s,r,{discrete:l}){const c=r.originalEvent.target,d=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});s&&c.addEventListener(t,s,{once:!0}),l?iN(c,d):c.dispatchEvent(d)}var ba=globalThis?.document?f.useLayoutEffect:()=>{},kD=hx[" useId ".trim().toString()]||(()=>{}),RD=0;function Xs(t){const[s,r]=f.useState(kD());return ba(()=>{r(l=>l??String(RD++))},[t]),t||(s?`radix-${s}`:"")}const TD=["top","right","bottom","left"],al=Math.min,Ms=Math.max,Vu=Math.round,Nu=Math.floor,kn=t=>({x:t,y:t}
vendor: 16,992 bytes, line 49
49),_D={left:"right",right:"left",bottom:"top",top:"bottom"},OD={start:"end",end:"start"};function jg(t,s,r){return Ms(t,al(s,r))}function cr(t,s){return typeof t=="function"?t(s):t}function ir(t){return t.split("-")[0]}function ic(t){return t.split("-")[1]}function nh(t){return t==="x"?"y":"x"}function rh(t){return t==="y"?"height":"width"}const PD=new Set(["top","bottom"]);function Ln(t){return PD.has(ir(t))?"y":"x"}function lh(t){return nh(Ln(t))}function zD(t,s,r){r===void 0&&(r=!1);const l=ic(t),c=lh(t),d=rh(c);let u=c==="x"?l===(r?"end":"start")?"right":"left":l==="start"?"bottom":"top";return s.reference[d]>s.floating[d]&&(u=Ku(u)),[u,Ku(u)]}function UD(t){const s=Ku(t);return[Ng(t),s,Ng(s)]}function Ng(t){return t.replace(/start|end/g,s=>OD[s])}const Cy=["left","right"],wy=["right","left"],ID=["top","bottom"],BD=["bottom","top"];function FD(t,s,r){switch(t){case"top":case"bottom":return r?s?wy:Cy:s?Cy:wy;case"left":case"right":return s?ID:BD;default:return[]}}function HD(t,s,r,l){const c=ic(t);let d=FD(ir(t),r==="start",l);return c&&(d=d.map(u=>u+"-"+c),s&&(d=d.concat(d.map(Ng)))),d}function Ku(t){return t.replace(/left|right|bottom|top/g,s=>_D[s])}function qD(t){return{top:0,right:0,bottom:0,left:0,...t}}function xN(t){return typeof t!="number"?qD(t):{top:t,right:t,bottom:t,left:t}}function Yu(t){const{x:s,y:r,width:l,height:c}=t;return{width:l,height:c,top:r,left:s,right:s+l,bottom:r+c,x:s,y:r}}function Ay(t,s,r){let{reference:l,floating:c}=t;const d=Ln(s),u=lh(s),x=rh(u),p=ir(s),g=d==="y",b=l.x+l.width/2-c.width/2,v=l.y+l.height/2-c.height/2,y=l[x]/2-c[x]/2;let j;switch(p){case"top":j={x:b,y:l.y-c.height};break;case"bottom":j={x:b,y:l.y+l.height};break;case"right":j={x:l.x+l.width,y:v};break;case"left":j={x:l.x-c.width,y:v};break;default:j={x:l.x,y:l.y}}switch(ic(s)){case"start":j[u]-=y*(r&&g?-1:1);break;case"end":j[u]+=y*(r&&g?-1:1);break}return j}const $D=async(t,s,r)=>{const{placement:l="bottom",strategy:c="absolute",middleware:d=[],platform:u}=r,x=d.filter(Boolean),p=await(u.isRTL==null?void 0:u.isRTL(s));let g=await u.getElementRects({reference:t,floating:s,strategy:c}),{x:b,y:v}=Ay(g,l,p),y=l,j={},S=0;for(let N=0;N<x.length;N++){const{name:w,fn:D}=x[N],{x:k,y:A,data:_,reset:E}=await D({x:b,y:v,initialPlacement:l,placement:y,strategy:c,middlewareData:j,rects:g,platform:u,elements:{reference:t,floating:s}});b=k??b,v=A??v,j={...j,[w]:{...j[w],..._}},E&&S<=50&&(S++,typeof E=="object"&&(E.placement&&(y=E.placement),E.rects&&(g=E.rects===!0?await u.getElementRects({reference:t,floating:s,strategy:c}):E.rects),{x:b,y:v}=Ay(g,y,p)),N=-1)}return{x:b,y:v,placement:y,strategy:c,middlewareData:j}};async function Di(t,s){var r;s===void 0&&(s={});const{x:l,y:c,platform:d,rects:u,elements:x,strategy:p}=t,{boundary:g="clippingAncestors",rootBoundary:b="viewport",elementContext:v="floating",altBoundary:y=!1,padding:j=0}=cr(s,t),S=xN(j),w=x[y?v==="floating"?"reference":"floating":v],D=Yu(await d.getClippingRect({element:(r=await(d.isElement==null?void 0:d.isElement(w)))==null||r?w:w.contextElement||await(d.getDocumentElement==null?void 0:d.getDocumentElement(x.floating)),boundary:g,rootBoundary:b,strategy:p})),k=v==="floating"?{x:l,y:c,width:u.floating.width,height:u.floating.height}:u.reference,A=await(d.getOffsetParent==null?void 0:d.getOffsetParent(x.floating)),_=await(d.isElement==null?void 0:d.isElement(A))?await(d.getScale==null?void 0:d.getScale(A))||{x:1,y:1}:{x:1,y:1},E=Yu(d.convertOffsetParentRelativeRectToViewportRelativeRect?await d.convertOffsetParentRelativeRectToViewportRelativeRect({elements:x,rect:k,offsetParent:A,strategy:p}):k);return{top:(D.top-E.top+S.top)/_.y,bottom:(E.bottom-D.bottom+S.bottom)/_.y,left:(D.left-E.left+S.left)/_.x,right:(E.right-D.right+S.right)/_.x}}const WD=t=>({name:"arrow",options:t,async fn(s){const{x:r,y:l,placement:c,rects:d,platform:u,elements:x,middlewareData:p}=s,{element:g,padding:b=0}=cr(t,s)||{};if(g==null)return{};const v=xN(b),y={x:r,y:l},j=lh(c),S=rh(j),N=await u.getDimensions(g),w=j==="y",D=w?"top":"left",k=w?"bottom":"right",A=w?"clientHeight":"clientWidth",_=d.reference[S]+d.reference[j]-y[j]-d.floating[S],E=y[j]-d.reference[j],I=await(u.getOffsetParent==null?void 0:u.getOffsetParent(g));let R=I?I[A]:0;(!R||!await(u.isElement==null?void 0:u.isElement(I)))&&(R=x.floating[A]||d.floating[S]);const z=_/2-E/2,U=R/2-N[S]/2-1,B=al(v[D],U),F=al(v[k],U),V=B,de=R-N[S]-F,le=R/2-N[S]/2+z,xe=jg(V,le,de),M=!p.arrow&&ic(c)!=null&&le!==xe&&d.reference[S]/2-(le<V?B:F)-N[S]/2<0,O=M?le<V?le-V:le-de:0;return{[j]:y[j]+O,data:{[j]:xe,centerOffset:le-xe-O,...M&&{alignmentOffset:O}},reset:M}}}),QD=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(s){var r,l;const{placement:c,middlewareData:d,rects:u,initialPlacement:x,platform:p,elements:g}=s,{mainAxis:b=!0,crossAxis:v=!0,fallbackPlacements:y,fallbackStrategy:j="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:N=!0,...w}=cr(t,s);if((r=d.arrow)!=null&&r.alignmentOffset)return{};const D=ir(c),k=Ln(x),A=ir(x)===x,_=await(p.isRTL==null?void 0:p.isRTL(g.floating)),E=y||(A||!N?[Ku(x)]:UD(x)),I=S!=="none";!y&&I&&E.push(...HD(x,N,S,_));const R=[x,...E],z=await Di(s,w),U=[];let B=((l=d.flip)==null?void 0:l.overflows)||[];if(b&&U.push(z[D]),v){const le=zD(c,u,_);U.push(z[le[0]],z[le[1]])}if(B=[...B,{placement:c,overflows:U}],!U.every(le=>le<=0)){var F,V;const le=(((F=d.flip)==null?void 0:F.index)||0)+1,xe=R[le];if(xe&&(!(v==="alignment"?k!==Ln(xe):!1)||B.every(T=>Ln(T.placement)===k?T.overflows[0]>0:!0)))return{data:{index:le,overflows:B},reset:{placement:xe}};let M=(V=B.filter(O=>O.overflows[0]<=0).sort((O,T)=>O.overflows[1]-T.overflows[1])[0])==null?void 0:V.placement;if(!M)switch(j){case"bestFit":{var de;const O=(de=B.filter(T=>{if(I){const K=Ln(T.placement);return K===k||K==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(K=>K>0).reduce((K,ve)=>K+ve,0)]).sort((T,K)=>T[1]-K[1])[0])==null?void 0:de[0];O&&(M=O);break}case"initialPlacement":M=x;break}if(c!==M)return{reset:{placement:M}}}return{}}}};function Sy(t,s){return{top:t.top-s.height,right:t.right-s.width,bottom:t.bottom-s.height,left:t.left-s.width}}function Ey(t){return TD.some(s=>t[s]>=0)}const GD=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(s){const{rects:r}=s,{strategy:l="referenceHidden",...c}=cr(t,s);switch(l){case"referenceHidden":{const d=await Di(s,{...c,elementContext:"reference"}),u=Sy(d,r.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:Ey(u)}}}case"escaped":{const d=await Di(s,{...c,altBoundary:!0}),u=Sy(d,r.floating);return{data:{escapedOffsets:u,escaped:Ey(u)}}}default:return{}}}}},pN=new Set(["left","top"]);async function VD(t,s){const{placement:r,platform:l,elements:c}=t,d=await(l.isRTL==null?void 0:l.isRTL(c.floating)),u=ir(r),x=ic(r),p=Ln(r)==="y",g=pN.has(u)?-1:1,b=d&&p?-1:1,v=cr(s,t);let{mainAxis:y,crossAxis:j,alignmentAxis:S}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:v.mainAxis||0,crossAxis:v.crossAxis||0,alignmentAxis:v.alignmentAxis};return x&&typeof S=="number"&&(j=x==="end"?S*-1:S),p?{x:j*b,y:y*g}:{x:y*g,y:j*b}}const KD=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(s){var r,l;const{x:c,y:d,placement:u,middlewareData:x}=s,p=await VD(s,t);return u===((r=x.offset)==null?void 0:r.placement)&&(l=x.arrow)!=null&&l.alignmentOffset?{}:{x:c+p.x,y:d+p.y,data:{...p,placement:u}}}}},YD=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(s){const{x:r,y:l,placement:c}=s,{mainAxis:d=!0,crossAxis:u=!1,limiter:x={fn:w=>{let{x:D,y:k}=w;return{x:D,y:k}}},...p}=cr(t,s),g={x:r,y:l},b=await Di(s,p),v=Ln(ir(c)),y=nh(v);let j=g[y],S=g[v];if(d){const w=y==="y"?"top":"left",D=y==="y"?"bottom":"right",k=j+b[w],A=j-b[D];j=jg(k,j,A)}if(u){const w=v==="y"?"top":"left",D=v==="y"?"bottom":"right",k=S+b[w],A=S-b[D];S=jg(k,S,A)}const N=x.fn({...s,[y]:j,[v]:S});return{...N,data:{x:N.x-r,y:N.y-l,enabled:{[y]:d,[v]:u}}}}}},XD=function(t){return t===void 0&&(t={}),{options:t,fn(s){const{x:r,y:l,placement:c,rects:d,middlewareData:u}=s,{offset:x=0,mainAxis:p=!0,crossAxis:g=!0}=cr(t,s),b={x:r,y:l},v=Ln(c),y=nh(v);let j=b[y],S=b[v];const N=cr(x,s),w=typeof N=="number"?{mainAxis:N,crossAxis:0}:{mainAxis:0,crossAxis:0,...N};if(p){const A=y==="y"?"height":"width",_=d.reference[y]-d.floating[A]+w.mainAxis,E=d.reference[y]+d.reference[A]-w.mainAxis;j<_?j=_:j>E&&(j=E)}if(g){var D,k;const A=y==="y"?"width":"height",_=pN.has(ir(c)),E=d.reference[v]-d.floating[A]+(_&&((D=u.offset)==null?void 0:D[v])||0)+(_?0:w.crossAxis),I=d.reference[v]+d.reference[A]+(_?0:((k=u.offset)==null?void 0:k[v])||0)-(_?w.crossAxis:0);S<E?S=E:S>I&&(S=I)}return{[y]:j,[v]:S}}}},ZD=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(s){var r,l;const{placement:c,rects:d,platform:u,elements:x}=s,{apply:p=()=>{},...g}=cr(t,s),b=await Di(s,g),v=ir(c),y=ic(c),j=Ln(c)==="y",{width:S,height:N}=d.floating;let w,D;v==="top"||v==="bottom"?(w=v,D=y===(await(u.isRTL==null?void 0:u.isRTL(x.floating))?"start":"end")?"left":"right"):(D=v,w=y==="end"?"top":"bottom");const k=N-b.top-b.bottom,A=S-b.left-b.right,_=al(N-b[w],k),E=al(S-b[D],A),I=!s.middlewareData.shift;let R=_,z=E;if((r=s.middlewareData.shift)!=null&&r.enabled.x&&(z=A),(l=s.middlewareData.shift)!=null&&l.enabled.y&&(R=k),I&&!y){const B=Ms(b.left,0),F=Ms(b.right,0),V=Ms(b.top,0),de=Ms(b.bottom,0);j?z=S-2*(B!==0||F!==0?B+F:Ms(b.left,b.right)):R=N-2*(V!==0||de!==0?V+de:Ms(b.top,b.bottom))}await p({...s,availableWidth:z,availableHeight:R});const U=await u.getDimensions(x.floating);return S!==U.width||N!==U.height?{reset:{rects:!0}}:{}}}};function Ax(){return typeof window<"u"}function dc(t){return mN(t)?(t.nodeName||"").toLowerCase():"#document"}function ks(t){var s;return(t==null||(s=t.ownerDocument)==null?void 0:s.defaultView)||window}function On(t){var s;return(s=(mN(t)?t.ownerDocument:t.document)||window.document)==null?void 0:s.documentElement}function mN(t){return Ax()?t instanceof Node||t instanceof ks(t).Node:!1}function xn(t){return Ax()?t instanceof Element||t instanceof ks(t).Element:!1}function Tn(t){return Ax()?t instanceof HTMLElement||t instanceof ks(t).HTMLElement:!1}function Dy(t){return!Ax()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof ks(t).ShadowRoot}const JD=new Set(["inline","contents"]);function qi(t){const{overflow:s,overflowX:r,overflowY:l,display:c}=pn(t);return/auto|scroll|overlay|hidden|clip/.test(s+l+r)&&!JD.has(c)}const e8=new Set(["table","td","th"]);function t8(t){return e8.has(dc(t))}const a8=[":popover-open",":modal"];function Sx(t){return a8.some(s=>{try{return t.matches(s)}catch{return!1}})}const s8=["transform","translate","scale","rotate","perspective"],n8=["transform","translate","scale","rotate","perspective","filter"],r8=["paint","layout","strict","content"];function oh(t){const s=ch(),r=xn(t)?pn(t):t;return s8.some(l=>r[l]?r[l]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!s&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!s&&(r.filter?r.filter!=="none":!1)||n8.some(l=>(r.willChange||"").includes(l))||r8.some(l=>(r.contain||"").includes(l))}function l8(t){let s=sl(t);for(;Tn(s)&&!ac(s);){if(oh(s))return s;if(Sx(s))return null;s=sl(s)}return null}function ch(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const o8=new Set(["html","body","#document"]);function ac(t){return o8.has(dc(t))}function pn(t){return ks(t).getComputedStyle(t)}function Ex(t){return xn(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function sl(t){if(dc(t)==="html")return t;const s=t.assignedSlot||t.parentNode||Dy(t)&&t.host||On(t);return Dy(s)?s.host:s}function fN(t){const s=sl(t);return ac(s)?t.ownerDocument?t.ownerDocument.body:t.body:Tn(s)&&qi(s)?s:fN(s)}function Mi(t,s,r){var l;s===void 0&&(s=[]),r===void 0&&(r=!0);const c=fN(t),d=c===((l=t.ownerDocument)==null?void 0:l.body),u=ks(c);if(d){const x=Cg(u);return s.concat(u,u.visualViewport||[],qi(c)?c:[],x&&r?Mi(x):[])}return s.concat(c,Mi(c,[],r))}function Cg(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function gN(t){const s=pn(t);let r=parseFloat(s.width)||0,l=parseFloat(s.height)||0;const c=Tn(t),d=c?t.offsetWidth:r,u=c?t.offsetHeight:l,x=Vu(r)!==d||Vu(l)!==u;return x&&(r=d,l=u),{width:r,height:l,$:x}}function ih(t){return xn(t)?t:t.contextElement}function Ko(t){const s=ih(t);if(!Tn(s))return kn(1);const r=s.getBoundingClientRect(),{width:l,height:c,$:d}=gN(s);let u=(d?Vu(r.width):r.width)/l,x=(d?Vu(r.height):r.height)/c;return(!u||!Number.isFinite(u))&&(u=1),(!x||!Number.isFinite(x))&&(x=1),{x:u,y:x}}const c8=kn(0);function hN(t){const s=ks(t);return!ch()||!s.visualViewport?c8:{x:s.visualViewport.offsetLeft,y:s.visualViewport.offsetTop}}function i8(t,s,r){return s===void 0&&(s=!1),!r||s&&r!==ks(t)?!1:s}function Bl(t,s,r,l){s===void 0&&(s=!1),r===void 0&&(r=!1);const c=t.getBoundingClientRect(),d=ih(t);let u=kn(1);s&&(l?xn(l)&&(u=Ko(l)):u=Ko(t));const x=i8(d,r,l)?hN(d):kn(0);let p=(c.left+x.x)/u.x,g=(c.top+x.y)/u.y,b=c.width/u.x,v=c.height/u.y;if(d){const y=ks(d),j=l&&xn(l)?ks(l):l;let S=y,N=Cg(S);for(;N&&l&&j!==S;){const w=Ko(N),D=N.getBoundingClientRect(),k=pn(N),A=D.left+(N.clientLeft+parseFloat(k.paddingLeft))*w.x,_=D.top+(N.clientTop+parseFloat(k.paddingTop))*w.y;p*=w.x,g*=w.y,b*=w.x,v*=w.y,p+=A,g+=_,S=ks(N),N=Cg(S)}}return Yu({width:b,height:v,x:p,y:g})}function Dx(t,s){const r=Ex(t).scrollLeft;return s?s.left+r:Bl(On(t)).left+r}function vN(t,s){const r=t.getBoundingClientRect(),l=r.left+s.scrollLeft-Dx(t,r),c=r.top+s.scrollTop;return{x:l,y:c}}function d8(t){let{elements:s,rect:r,offsetParent:l,strategy:c}=t;const d=c==="fixed",u=On(l),x=s?Sx(s.floating):!1;if(l===u||x&&d)return r;let p={scrollLeft:0,scrollTop:0},g=kn(1);const b=kn(0),v=Tn(l);if((v||!v&&!d)&&((dc(l)!=="body"||qi(u))&&(p=Ex(l)),Tn(l))){const j=Bl(l);g=Ko(l),b.x=j.x+l.clientLeft,b.y=j.y+l.clientTop}const y=u&&!v&&!d?vN(u,p):kn(0);return{width:r.width*g.x,height:r.height*g.y,x:r.x*g.x-p.scrollLeft*g.x+b.x+y.x,y:r.y*g.y-p.scrollTop*g.y+b.y+y.y}}function u8(t){return Array.from(t.getClientRects())}function x8(t){const s=On(t),r=Ex(t),l=t.ownerDocument.body,c=Ms(s.scrollWidth,s.clientWidth,l.scrollWidth,l.clientWidth),d=Ms(s.scrollHeight,s.clientHeight,l.scrollHeight,l.clientHeight);let u=-r.scrollLeft+Dx(t);const x=-r.scrollTop;return pn(l).direction==="rtl"&&(u+=Ms(s.clientWidth,l.clientWidth)-c),{width:c,height:d,x:u,y:x}}const My=25;function p8(t,s){const r=ks(t),l=On(t),c=r.visualViewport;let d=l.clientWidth,u=l.clientHeight,x=0,p=0;if(c){d=c.width,u=c.height;const b=ch();(!b||b&&s==="fixed")&&(x=c.offsetLeft,p=c.offsetTop)}const g=Dx(l);if(g<=0){const b=l.ownerDocument,v=b.body,y=getComputedStyle(v),j=b.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,S=Math.abs(l.clientWidth-v.clientWidth-j);S<=My&&(d-=S)}else g<=My&&(d+=g);return{width:d,height:u,x,y:p}}const m8=new Set(["absolute","fixed"]);function f8(t,s){const r=Bl(t,!0,s==="fixed"),l=r.top+t.clientTop,c=r.left+t.clientLeft,d=Tn(t)?Ko(t):kn(1),u=t.clientWidth*d.x,x=t.clientHeight*d.y,p=c*d.x,g=l*d.y;return{width:u,height:x,x:p,y:g}}function Ly(t,s,r){let l;if(s==="viewport")l=p8(t,r);else if(s==="document")l=x8(On(t));else if(xn(s))l=f8(s,r);else{const c=hN(t);l={x:s.x-c.x,y:s.y-c.y,width:s.width,height:s.height}}return Yu(l)}function bN(t,s){const r=sl(t);return r===s||!xn(r)||ac(r)?!1:pn(r).position==="fixed"||bN(r,s)}function g8(t,s){const r=s.get(t);if(r)return r;let l=Mi(t,[],!1).filter(x=>xn(x)&&dc(x)!=="body"),c=null;const d=pn(t).position==="fixed";let u=d?sl(t):t;for(;xn(u)&&!ac(u);){const x=pn(u),p=oh(u);!p&&x.position==="fixed"&&(c=null),(d?!p&&!c:!p&&x.position==="static"&&!!c&&m8.has(c.position)||qi(u)&&!p&&bN(t,u))?l=l.filter(b=>b!==u):c=x,u=sl(u)}return s.set(t,l),l}function h8(t){let{element:s,boundary:r,rootBoundary:l,strategy:c}=t;const u=[...r==="clippingAncestors"?Sx(s)?[]:g8(s,this._c):[].concat(r),l],x=u[0],p=u.reduce((g,b)=>{const v=Ly(s,b,c);return g.top=Ms(v.top,g.top),g.right=al(v.right,g.right),g.bottom=al(v.bottom,g.bottom),g.left=Ms(v.left,g.left),g},Ly(s,x,c));return{width:p.right-p.left,height:p.bottom-p.top,x:p.left,y:p.top}}function v8(t){const{width:s,height:r}=gN(t);return{width:s,height:r}}function b8(t,s,r){const l=Tn(s),c=On(s),d=r==="fixed",u=Bl(t,!0,d,s);let x={scrollLeft:0,scrollTop:0};const p=kn(0);function g(){p.x=Dx(c)}if(l||!l&&!d)if((dc(s)!=="body"||qi(c))&&(x=Ex(s)),l){const j=Bl(s,!0,d,s);p.x=j.x+s.clientLeft,p.y=j.y+s.clientTop}else c&&g();d&&!l&&c&&g();const b=c&&!l&&!d?vN(c,x):kn(0),v=u.left+x.scrollLeft-p.x-b.x,y=u.top+x.scrollTop-p.y-b.y;return{x:v,y,width:u.width,height:u.height}}function Cf(t){return pn(t).position==="static"}function ky(t,s){if(!Tn(t)||pn(t).position==="fixed")return null;if(s)return s(t);let r=t.offsetParent;return On(t)===r&&(r=r.ownerDocument.body),r}function yN(t,s){const r=ks(t);if(Sx(t))return r;if(!Tn(t)){let c=sl(t);for(;
vendor: 9,493 bytes, line 49
49c&&!ac(c);){if(xn(c)&&!Cf(c))return c;c=sl(c)}return r}let l=ky(t,s);for(;l&&t8(l)&&Cf(l);)l=ky(l,s);return l&&ac(l)&&Cf(l)&&!oh(l)?r:l||l8(t)||r}const y8=async function(t){const s=this.getOffsetParent||yN,r=this.getDimensions,l=await r(t.floating);return{reference:b8(t.reference,await s(t.floating),t.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}};function j8(t){return pn(t).direction==="rtl"}const N8={convertOffsetParentRelativeRectToViewportRelativeRect:d8,getDocumentElement:On,getClippingRect:h8,getOffsetParent:yN,getElementRects:y8,getClientRects:u8,getDimensions:v8,getScale:Ko,isElement:xn,isRTL:j8};function jN(t,s){return t.x===s.x&&t.y===s.y&&t.width===s.width&&t.height===s.height}function C8(t,s){let r=null,l;const c=On(t);function d(){var x;clearTimeout(l),(x=r)==null||x.disconnect(),r=null}function u(x,p){x===void 0&&(x=!1),p===void 0&&(p=1),d();const g=t.getBoundingClientRect(),{left:b,top:v,width:y,height:j}=g;if(x||s(),!y||!j)return;const S=Nu(v),N=Nu(c.clientWidth-(b+y)),w=Nu(c.clientHeight-(v+j)),D=Nu(b),A={rootMargin:-S+"px "+-N+"px "+-w+"px "+-D+"px",threshold:Ms(0,al(1,p))||1};let _=!0;function E(I){const R=I[0].intersectionRatio;if(R!==p){if(!_)return u();R?u(!1,R):l=setTimeout(()=>{u(!1,1e-7)},1e3)}R===1&&!jN(g,t.getBoundingClientRect())&&u(),_=!1}try{r=new IntersectionObserver(E,{...A,root:c.ownerDocument})}catch{r=new IntersectionObserver(E,A)}r.observe(t)}return u(!0),d}function w8(t,s,r,l){l===void 0&&(l={});const{ancestorScroll:c=!0,ancestorResize:d=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:x=typeof IntersectionObserver=="function",animationFrame:p=!1}=l,g=ih(t),b=c||d?[...g?Mi(g):[],...Mi(s)]:[];b.forEach(D=>{c&&D.addEventListener("scroll",r,{passive:!0}),d&&D.addEventListener("resize",r)});const v=g&&x?C8(g,r):null;let y=-1,j=null;u&&(j=new ResizeObserver(D=>{let[k]=D;k&&k.target===g&&j&&(j.unobserve(s),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var A;(A=j)==null||A.observe(s)})),r()}),g&&!p&&j.observe(g),j.observe(s));let S,N=p?Bl(t):null;p&&w();function w(){const D=Bl(t);N&&!jN(N,D)&&r(),N=D,S=requestAnimationFrame(w)}return r(),()=>{var D;b.forEach(k=>{c&&k.removeEventListener("scroll",r),d&&k.removeEventListener("resize",r)}),v?.(),(D=j)==null||D.disconnect(),j=null,p&&cancelAnimationFrame(S)}}const A8=KD,S8=YD,E8=QD,D8=ZD,M8=GD,Ry=WD,L8=XD,k8=(t,s,r)=>{const l=new Map,c={platform:N8,...r},d={...c.platform,_c:l};return $D(t,s,{...c,platform:d})};var R8=typeof document<"u",T8=function(){},Bu=R8?f.useLayoutEffect:T8;function Xu(t,s){if(t===s)return!0;if(typeof t!=typeof s)return!1;if(typeof t=="function"&&t.toString()===s.toString())return!0;let r,l,c;if(t&&s&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!==s.length)return!1;for(l=r;l--!==0;)if(!Xu(t[l],s[l]))return!1;return!0}if(c=Object.keys(t),r=c.length,r!==Object.keys(s).length)return!1;for(l=r;l--!==0;)if(!{}.hasOwnProperty.call(s,c[l]))return!1;for(l=r;l--!==0;){const d=c[l];if(!(d==="_owner"&&t.$$typeof)&&!Xu(t[d],s[d]))return!1}return!0}return t!==t&&s!==s}function NN(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Ty(t,s){const r=NN(t);return Math.round(s*r)/r}function wf(t){const s=f.useRef(t);return Bu(()=>{s.current=t}),s}function _8(t){t===void 0&&(t={});const{placement:s="bottom",strategy:r="absolute",middleware:l=[],platform:c,elements:{reference:d,floating:u}={},transform:x=!0,whileElementsMounted:p,open:g}=t,[b,v]=f.useState({x:0,y:0,strategy:r,placement:s,middlewareData:{},isPositioned:!1}),[y,j]=f.useState(l);Xu(y,l)||j(l);const[S,N]=f.useState(null),[w,D]=f.useState(null),k=f.useCallback(T=>{T!==I.current&&(I.current=T,N(T))},[]),A=f.useCallback(T=>{T!==R.current&&(R.current=T,D(T))},[]),_=d||S,E=u||w,I=f.useRef(null),R=f.useRef(null),z=f.useRef(b),U=p!=null,B=wf(p),F=wf(c),V=wf(g),de=f.useCallback(()=>{if(!I.current||!R.current)return;const T={placement:s,strategy:r,middleware:y};F.current&&(T.platform=F.current),k8(I.current,R.current,T).then(K=>{const ve={...K,isPositioned:V.current!==!1};le.current&&!Xu(z.current,ve)&&(z.current=ve,dn.flushSync(()=>{v(ve)}))})},[y,s,r,F,V]);Bu(()=>{g===!1&&z.current.isPositioned&&(z.current.isPositioned=!1,v(T=>({...T,isPositioned:!1})))},[g]);const le=f.useRef(!1);Bu(()=>(le.current=!0,()=>{le.current=!1}),[]),Bu(()=>{if(_&&(I.current=_),E&&(R.current=E),_&&E){if(B.current)return B.current(_,E,de);de()}},[_,E,de,B,U]);const xe=f.useMemo(()=>({reference:I,floating:R,setReference:k,setFloating:A}),[k,A]),M=f.useMemo(()=>({reference:_,floating:E}),[_,E]),O=f.useMemo(()=>{const T={position:r,left:0,top:0};if(!M.floating)return T;const K=Ty(M.floating,b.x),ve=Ty(M.floating,b.y);return x?{...T,transform:"translate("+K+"px, "+ve+"px)",...NN(M.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:K,top:ve}},[r,x,M.floating,b.x,b.y]);return f.useMemo(()=>({...b,update:de,refs:xe,elements:M,floatingStyles:O}),[b,de,xe,M,O])}const O8=t=>{function s(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:l,padding:c}=typeof t=="function"?t(r):t;return l&&s(l)?l.current!=null?Ry({element:l.current,padding:c}).fn(r):{}:l?Ry({element:l,padding:c}).fn(r):{}}}},P8=(t,s)=>({...A8(t),options:[t,s]}),z8=(t,s)=>({...S8(t),options:[t,s]}),U8=(t,s)=>({...L8(t),options:[t,s]}),I8=(t,s)=>({...E8(t),options:[t,s]}),B8=(t,s)=>({...D8(t),options:[t,s]}),F8=(t,s)=>({...M8(t),options:[t,s]}),H8=(t,s)=>({...O8(t),options:[t,s]});var q8="Arrow",CN=f.forwardRef((t,s)=>{const{children:r,width:l=10,height:c=5,...d}=t;return e.jsx(Qe.svg,{...d,ref:s,width:l,height:c,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:e.jsx("polygon",{points:"0,0 30,0 15,10"})})});CN.displayName=q8;var $8=CN;function W8(t){const[s,r]=f.useState(void 0);return ba(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const l=new ResizeObserver(c=>{if(!Array.isArray(c)||!c.length)return;const d=c[0];let u,x;if("borderBoxSize"in d){const p=d.borderBoxSize,g=Array.isArray(p)?p[0]:p;u=g.inlineSize,x=g.blockSize}else u=t.offsetWidth,x=t.offsetHeight;r({width:u,height:x})});return l.observe(t,{box:"border-box"}),()=>l.unobserve(t)}else r(void 0)},[t]),s}var dh="Popper",[wN,ll]=zs(dh),[Q8,AN]=wN(dh),SN=t=>{const{__scopePopper:s,children:r}=t,[l,c]=f.useState(null);return e.jsx(Q8,{scope:s,anchor:l,onAnchorChange:c,children:r})};SN.displayName=dh;var EN="PopperAnchor",DN=f.forwardRef((t,s)=>{const{__scopePopper:r,virtualRef:l,...c}=t,d=AN(EN,r),u=f.useRef(null),x=st(s,u),p=f.useRef(null);return f.useEffect(()=>{const g=p.current;p.current=l?.current||u.current,g!==p.current&&d.onAnchorChange(p.current)}),l?null:e.jsx(Qe.div,{...c,ref:x})});DN.displayName=EN;var uh="PopperContent",[G8,V8]=wN(uh),MN=f.forwardRef((t,s)=>{const{__scopePopper:r,side:l="bottom",sideOffset:c=0,align:d="center",alignOffset:u=0,arrowPadding:x=0,avoidCollisions:p=!0,collisionBoundary:g=[],collisionPadding:b=0,sticky:v="partial",hideWhenDetached:y=!1,updatePositionStrategy:j="optimized",onPlaced:S,...N}=t,w=AN(uh,r),[D,k]=f.useState(null),A=st(s,ae=>k(ae)),[_,E]=f.useState(null),I=W8(_),R=I?.width??0,z=I?.height??0,U=l+(d!=="center"?"-"+d:""),B=typeof b=="number"?b:{top:0,right:0,bottom:0,left:0,...b},F=Array.isArray(g)?g:[g],V=F.length>0,de={padding:B,boundary:F.filter(Y8),altBoundary:V},{refs:le,floatingStyles:xe,placement:M,isPositioned:O,middlewareData:T}=_8({strategy:"fixed",placement:U,whileElementsMounted:(...ae)=>w8(...ae,{animationFrame:j==="always"}),elements:{reference:w.anchor},middleware:[P8({mainAxis:c+z,alignmentAxis:u}),p&&z8({mainAxis:!0,crossAxis:!1,limiter:v==="partial"?U8():void 0,...de}),p&&I8({...de}),B8({...de,apply:({elements:ae,rects:Ne,availableWidth:Se,availableHeight:Ce})=>{const{width:ke,height:Z}=Ne.reference,fe=ae.floating.style;fe.setProperty("--radix-popper-available-width",`${Se}px`),fe.setProperty("--radix-popper-available-height",`${Ce}px`),fe.setProperty("--radix-popper-anchor-width",`${ke}px`),fe.setProperty("--radix-popper-anchor-height",`${Z}px`)}}),_&&H8({element:_,padding:x}),X8({arrowWidth:R,arrowHeight:z}),y&&F8({strategy:"referenceHidden",...de})]}),[K,ve]=RN(M),P=La(S);ba(()=>{O&&P?.()},[O,P]);const J=T.arrow?.x,W=T.arrow?.y,H=T.arrow?.centerOffset!==0,[te,pe]=f.useState();return ba(()=>{D&&pe(window.getComputedStyle(D).zIndex)},[D]),e.jsx("div",{ref:le.setFloating,"data-radix-popper-content-wrapper":"",style:{...xe,transform:O?xe.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:te,"--radix-popper-transform-origin":[T.transformOrigin?.x,T.transformOrigin?.y].join(" "),...T.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:e.jsx(G8,{scope:r,placedSide:K,onArrowChange:E,arrowX:J,arrowY:W,shouldHideArrow:H,children:e.jsx(Qe.div,{"data-side":K,"data-align":ve,...N,ref:A,style:{...N.style,animation:O?void 0:"none"}})})})});MN.displayName=uh;var LN="PopperArrow",K8={top:"bottom",right:"left",bottom:"top",left:"right"},kN=f.forwardRef(function(s,r){const{__scopePopper:l,...c}=s,d=V8(LN,l),u=K8[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}
vendor: 5,260 bytes, line 49
49,children:e.jsx($8,{...c,ref:r,style:{...c.style,display:"block"}})})});kN.displayName=LN;function Y8(t){return t!==null}var X8=t=>({name:"transformOrigin",options:t,fn(s){const{placement:r,rects:l,middlewareData:c}=s,u=c.arrow?.centerOffset!==0,x=u?0:t.arrowWidth,p=u?0:t.arrowHeight,[g,b]=RN(r),v={start:"0%",center:"50%",end:"100%"}[b],y=(c.arrow?.x??0)+x/2,j=(c.arrow?.y??0)+p/2;let S="",N="";return g==="bottom"?(S=u?v:`${y}px`,N=`${-p}px`):g==="top"?(S=u?v:`${y}px`,N=`${l.floating.height+p}px`):g==="right"?(S=`${-p}px`,N=u?v:`${j}px`):g==="left"&&(S=`${l.floating.width+p}px`,N=u?v:`${j}px`),{data:{x:S,y:N}}}});function RN(t){const[s,r="center"]=t.split("-");return[s,r]}var Mx=SN,$i=DN,Lx=MN,kx=kN,Z8="Portal",uc=f.forwardRef((t,s)=>{const{container:r,...l}=t,[c,d]=f.useState(!1);ba(()=>d(!0),[]);const u=r||c&&globalThis?.document?.body;return u?rN.createPortal(e.jsx(Qe.div,{...l,ref:s}),u):null});uc.displayName=Z8;function J8(t,s){return f.useReducer((r,l)=>s[r][l]??r,t)}var Fa=t=>{const{present:s,children:r}=t,l=e7(s),c=typeof r=="function"?r({present:l.isPresent}):f.Children.only(r),d=st(l.ref,t7(c));return typeof r=="function"||l.isPresent?f.cloneElement(c,{ref:d}):null};Fa.displayName="Presence";function e7(t){const[s,r]=f.useState(),l=f.useRef(null),c=f.useRef(t),d=f.useRef("none"),u=t?"mounted":"unmounted",[x,p]=J8(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const g=Cu(l.current);d.current=x==="mounted"?g:"none"},[x]),ba(()=>{const g=l.current,b=c.current;if(b!==t){const y=d.current,j=Cu(g);t?p("MOUNT"):j==="none"||g?.display==="none"?p("UNMOUNT"):p(b&&y!==j?"ANIMATION_OUT":"UNMOUNT"),c.current=t}},[t,p]),ba(()=>{if(s){let g;const b=s.ownerDocument.defaultView??window,v=j=>{const N=Cu(l.current).includes(CSS.escape(j.animationName));if(j.target===s&&N&&(p("ANIMATION_END"),!c.current)){const w=s.style.animationFillMode;s.style.animationFillMode="forwards",g=b.setTimeout(()=>{s.style.animationFillMode==="forwards"&&(s.style.animationFillMode=w)})}},y=j=>{j.target===s&&(d.current=Cu(l.current))};return s.addEventListener("animationstart",y),s.addEventListener("animationcancel",v),s.addEventListener("animationend",v),()=>{b.clearTimeout(g),s.removeEventListener("animationstart",y),s.removeEventListener("animationcancel",v),s.removeEventListener("animationend",v)}}else p("ANIMATION_END")},[s,p]),{isPresent:["mounted","unmountSuspended"].includes(x),ref:f.useCallback(g=>{l.current=g?getComputedStyle(g):null,r(g)},[])}}function Cu(t){return t?.animationName||"none"}function t7(t){let s=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=s&&"isReactWarning"in s&&s.isReactWarning;return r?t.ref:(s=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=s&&"isReactWarning"in s&&s.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var a7=hx[" useInsertionEffect ".trim().toString()]||ba;function nl({prop:t,defaultProp:s,onChange:r=()=>{},caller:l}){const[c,d,u]=s7({defaultProp:s,onChange:r}),x=t!==void 0,p=x?t:c;{const b=f.useRef(t!==void 0);f.useEffect(()=>{const v=b.current;v!==x&&console.warn(`${l} is changing from ${v?"controlled":"uncontrolled"} to ${x?"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.`),b.current=x},[x,l])}const g=f.useCallback(b=>{if(x){const v=n7(b)?b(t):b;v!==t&&u.current?.(v)}else d(b)},[x,t,d,u]);return[p,g]}function s7({defaultProp:t,onChange:s}){const[r,l]=f.useState(t),c=f.useRef(r),d=f.useRef(s);return a7(()=>{d.current=s},[s]),f.useEffect(()=>{c.current!==r&&(d.current?.(r),c.current=r)},[r,c]),[r,l,d]}function n7(t){return typeof t=="function"}var TN=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"}),r7="VisuallyHidden",_N=f.forwardRef((t,s)=>e.jsx(Qe.span,{...t,ref:s,style:{...TN,...t.style}}));_N.displayName=r7;var l7=_N,[Rx]=zs("Tooltip",[ll]),Tx=ll(),ON="TooltipProvider",o7=700,wg="tooltip.open",[c7,xh]=Rx(ON),PN=t=>{const{__scopeTooltip:s,delayDuration:r=o7,skipDelayDuration:l=300,disableHoverableContent:c=!1,children:d}=t,u=f.useRef(!0),x=f.useRef(!1),p=f.useRef(0);return f.useEffect(()=>{const g=p.current;return()=>window.clearTimeout(g)},[]),e.jsx(c7,{scope:s,isOpenDelayedRef:u,delayDuration:r,onOpen:f.useCallback(()=>{window.clearTimeout(p.current),u.current=!1},[]),onClose:f.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>u.current=!0,l)},[l]),isPointerInTransitRef:x,onPointerInTransitChange:f.useCallback(g=>{x.current=g},[]),disableHoverableContent:c,children:d})};PN.displayName=ON;var Li="Tooltip",[i7,Wi]=Rx(Li),zN=t=>{const{__scopeTooltip:s,children:r,open:l,defaultOpen:c,onOpenChange:d,disableHoverableContent:u,delayDuration:x}=t,p=xh(Li,t.__scopeTooltip),g=Tx(s),[b,v]=f.useState(null),y=Xs(),j=f.useRef(0),S=u??p.disableHoverableContent,N=x??p.delayDuration,w=f.useRef(!1),[D,k]=nl({prop:l,defaultProp:c??!1,onChange:R=>{R?(p.onOpen(),document.dispatchEvent(new CustomEvent(wg))):p.onClose(),d?.(R)},caller:Li}
vendor: 14,050 bytes, line 49
49),A=f.useMemo(()=>D?w.current?"delayed-open":"instant-open":"closed",[D]),_=f.useCallback(()=>{window.clearTimeout(j.current),j.current=0,w.current=!1,k(!0)},[k]),E=f.useCallback(()=>{window.clearTimeout(j.current),j.current=0,k(!1)},[k]),I=f.useCallback(()=>{window.clearTimeout(j.current),j.current=window.setTimeout(()=>{w.current=!0,k(!0),j.current=0},N)},[N,k]);return f.useEffect(()=>()=>{j.current&&(window.clearTimeout(j.current),j.current=0)},[]),e.jsx(Mx,{...g,children:e.jsx(i7,{scope:s,contentId:y,open:D,stateAttribute:A,trigger:b,onTriggerChange:v,onTriggerEnter:f.useCallback(()=>{p.isOpenDelayedRef.current?I():_()},[p.isOpenDelayedRef,I,_]),onTriggerLeave:f.useCallback(()=>{S?E():(window.clearTimeout(j.current),j.current=0)},[E,S]),onOpen:_,onClose:E,disableHoverableContent:S,children:r})})};zN.displayName=Li;var Ag="TooltipTrigger",UN=f.forwardRef((t,s)=>{const{__scopeTooltip:r,...l}=t,c=Wi(Ag,r),d=xh(Ag,r),u=Tx(r),x=f.useRef(null),p=st(s,x,c.onTriggerChange),g=f.useRef(!1),b=f.useRef(!1),v=f.useCallback(()=>g.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",v),[v]),e.jsx($i,{asChild:!0,...u,children:e.jsx(Qe.button,{"aria-describedby":c.open?c.contentId:void 0,"data-state":c.stateAttribute,...l,ref:p,onPointerMove:Ae(t.onPointerMove,y=>{y.pointerType!=="touch"&&!b.current&&!d.isPointerInTransitRef.current&&(c.onTriggerEnter(),b.current=!0)}),onPointerLeave:Ae(t.onPointerLeave,()=>{c.onTriggerLeave(),b.current=!1}),onPointerDown:Ae(t.onPointerDown,()=>{c.open&&c.onClose(),g.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:Ae(t.onFocus,()=>{g.current||c.onOpen()}),onBlur:Ae(t.onBlur,c.onClose),onClick:Ae(t.onClick,c.onClose)})})});UN.displayName=Ag;var ph="TooltipPortal",[d7,u7]=Rx(ph,{forceMount:void 0}),IN=t=>{const{__scopeTooltip:s,forceMount:r,children:l,container:c}=t,d=Wi(ph,s);return e.jsx(d7,{scope:s,forceMount:r,children:e.jsx(Fa,{present:r||d.open,children:e.jsx(uc,{asChild:!0,container:c,children:l})})})};IN.displayName=ph;var sc="TooltipContent",BN=f.forwardRef((t,s)=>{const r=u7(sc,t.__scopeTooltip),{forceMount:l=r.forceMount,side:c="top",...d}=t,u=Wi(sc,t.__scopeTooltip);return e.jsx(Fa,{present:l||u.open,children:u.disableHoverableContent?e.jsx(FN,{side:c,...d,ref:s}):e.jsx(x7,{side:c,...d,ref:s})})}),x7=f.forwardRef((t,s)=>{const r=Wi(sc,t.__scopeTooltip),l=xh(sc,t.__scopeTooltip),c=f.useRef(null),d=st(s,c),[u,x]=f.useState(null),{trigger:p,onClose:g}=r,b=c.current,{onPointerInTransitChange:v}=l,y=f.useCallback(()=>{x(null),v(!1)},[v]),j=f.useCallback((S,N)=>{const w=S.currentTarget,D={x:S.clientX,y:S.clientY},k=g7(D,w.getBoundingClientRect()),A=h7(D,k),_=v7(N.getBoundingClientRect()),E=y7([...A,..._]);x(E),v(!0)},[v]);return f.useEffect(()=>()=>y(),[y]),f.useEffect(()=>{if(p&&b){const S=w=>j(w,b),N=w=>j(w,p);return p.addEventListener("pointerleave",S),b.addEventListener("pointerleave",N),()=>{p.removeEventListener("pointerleave",S),b.removeEventListener("pointerleave",N)}}},[p,b,j,y]),f.useEffect(()=>{if(u){const S=N=>{const w=N.target,D={x:N.clientX,y:N.clientY},k=p?.contains(w)||b?.contains(w),A=!b7(D,u);k?y():A&&(y(),g())};return document.addEventListener("pointermove",S),()=>document.removeEventListener("pointermove",S)}},[p,b,u,g,y]),e.jsx(FN,{...t,ref:d})}),[p7,m7]=Rx(Li,{isInside:!1}),f7=cN("TooltipContent"),FN=f.forwardRef((t,s)=>{const{__scopeTooltip:r,children:l,"aria-label":c,onEscapeKeyDown:d,onPointerDownOutside:u,...x}=t,p=Wi(sc,r),g=Tx(r),{onClose:b}=p;return f.useEffect(()=>(document.addEventListener(wg,b),()=>document.removeEventListener(wg,b)),[b]),f.useEffect(()=>{if(p.trigger){const v=y=>{y.target?.contains(p.trigger)&&b()};return window.addEventListener("scroll",v,{capture:!0}),()=>window.removeEventListener("scroll",v,{capture:!0})}},[p.trigger,b]),e.jsx(cc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:d,onPointerDownOutside:u,onFocusOutside:v=>v.preventDefault(),onDismiss:b,children:e.jsxs(Lx,{"data-state":p.stateAttribute,...g,...x,ref:s,style:{...x.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(f7,{children:l}),e.jsx(p7,{scope:r,isInside:!0,children:e.jsx(l7,{id:p.contentId,role:"tooltip",children:c||l})})]})})});BN.displayName=sc;var HN="TooltipArrow",qN=f.forwardRef((t,s)=>{const{__scopeTooltip:r,...l}=t,c=Tx(r);return m7(HN,r).isInside?null:e.jsx(kx,{...c,...l,ref:s})});qN.displayName=HN;function g7(t,s){const r=Math.abs(s.top-t.y),l=Math.abs(s.bottom-t.y),c=Math.abs(s.right-t.x),d=Math.abs(s.left-t.x);switch(Math.min(r,l,c,d)){case d:return"left";case c:return"right";case r:return"top";case l:return"bottom";default:throw new Error("unreachable")}}function h7(t,s,r=5){const l=[];switch(s){case"top":l.push({x:t.x-r,y:t.y+r},{x:t.x+r,y:t.y+r});break;case"bottom":l.push({x:t.x-r,y:t.y-r},{x:t.x+r,y:t.y-r});break;case"left":l.push({x:t.x+r,y:t.y-r},{x:t.x+r,y:t.y+r});break;case"right":l.push({x:t.x-r,y:t.y-r},{x:t.x-r,y:t.y+r});break}return l}function v7(t){const{top:s,right:r,bottom:l,left:c}=t;return[{x:c,y:s},{x:r,y:s},{x:r,y:l},{x:c,y:l}]}function b7(t,s){const{x:r,y:l}=t;let c=!1;for(let d=0,u=s.length-1;d<s.length;u=d++){const x=s[d],p=s[u],g=x.x,b=x.y,v=p.x,y=p.y;b>l!=y>l&&r<(v-g)*(l-b)/(y-b)+g&&(c=!c)}return c}function y7(t){const s=t.slice();return s.sort((r,l)=>r.x<l.x?-1:r.x>l.x?1:r.y<l.y?-1:r.y>l.y?1:0),j7(s)}function j7(t){if(t.length<=1)return t.slice();const s=[];for(let l=0;l<t.length;l++){const c=t[l];for(;s.length>=2;){const d=s[s.length-1],u=s[s.length-2];if((d.x-u.x)*(c.y-u.y)>=(d.y-u.y)*(c.x-u.x))s.pop();else break}s.push(c)}s.pop();const r=[];for(let l=t.length-1;l>=0;l--){const c=t[l];for(;r.length>=2;){const d=r[r.length-1],u=r[r.length-2];if((d.x-u.x)*(c.y-u.y)>=(d.y-u.y)*(c.x-u.x))r.pop();else break}r.push(c)}return r.pop(),s.length===1&&r.length===1&&s[0].x===r[0].x&&s[0].y===r[0].y?s:s.concat(r)}var N7=PN,C7=zN,w7=UN,A7=IN,S7=BN,E7=qN;function $N(t){var s,r,l="";if(typeof t=="string"||typeof t=="number")l+=t;else if(typeof t=="object")if(Array.isArray(t)){var c=t.length;for(s=0;s<c;s++)t[s]&&(r=$N(t[s]))&&(l&&(l+=" "),l+=r)}else for(r in t)t[r]&&(l&&(l+=" "),l+=r);return l}function WN(){for(var t,s,r=0,l="",c=arguments.length;r<c;r++)(t=arguments[r])&&(s=$N(t))&&(l&&(l+=" "),l+=s);return l}const mh="-",D7=t=>{const s=L7(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:l}=t;return{getClassGroupId:u=>{const x=u.split(mh);return x[0]===""&&x.length!==1&&x.shift(),QN(x,s)||M7(u)},getConflictingClassGroupIds:(u,x)=>{const p=r[u]||[];return x&&l[u]?[...p,...l[u]]:p}}},QN=(t,s)=>{if(t.length===0)return s.classGroupId;const r=t[0],l=s.nextPart.get(r),c=l?QN(t.slice(1),l):void 0;if(c)return c;if(s.validators.length===0)return;const d=t.join(mh);return s.validators.find(({validator:u})=>u(d))?.classGroupId},_y=/^\[(.+)\]$/,M7=t=>{if(_y.test(t)){const s=_y.exec(t)[1],r=s?.substring(0,s.indexOf(":"));if(r)return"arbitrary.."+r}},L7=t=>{const{theme:s,classGroups:r}=t,l={nextPart:new Map,validators:[]};for(const c in r)Sg(r[c],l,c,s);return l},Sg=(t,s,r,l)=>{t.forEach(c=>{if(typeof c=="string"){const d=c===""?s:Oy(s,c);d.classGroupId=r;return}if(typeof c=="function"){if(k7(c)){Sg(c(l),s,r,l);return}s.validators.push({validator:c,classGroupId:r});return}Object.entries(c).forEach(([d,u])=>{Sg(u,Oy(s,d),r,l)})})},Oy=(t,s)=>{let r=t;return s.split(mh).forEach(l=>{r.nextPart.has(l)||r.nextPart.set(l,{nextPart:new Map,validators:[]}),r=r.nextPart.get(l)}),r},k7=t=>t.isThemeGetter,R7=t=>{if(t<1)return{get:()=>{},set:()=>{}};let s=0,r=new Map,l=new Map;const c=(d,u)=>{r.set(d,u),s++,s>t&&(s=0,l=r,r=new Map)};return{get(d){let u=r.get(d);if(u!==void 0)return u;if((u=l.get(d))!==void 0)return c(d,u),u},set(d,u){r.has(d)?r.set(d,u):c(d,u)}}},Eg="!",Dg=":",T7=Dg.length,_7=t=>{const{prefix:s,experimentalParseClassName:r}=t;let l=c=>{const d=[];let u=0,x=0,p=0,g;for(let S=0;S<c.length;S++){let N=c[S];if(u===0&&x===0){if(N===Dg){d.push(c.slice(p,S)),p=S+T7;continue}if(N==="/"){g=S;continue}}N==="["?u++:N==="]"?u--:N==="("?x++:N===")"&&x--}const b=d.length===0?c:c.substring(p),v=O7(b),y=v!==b,j=g&&g>p?g-p:void 0;return{modifiers:d,hasImportantModifier:y,baseClassName:v,maybePostfixModifierPosition:j}};if(s){const c=s+Dg,d=l;l=u=>u.startsWith(c)?d(u.substring(c.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:u,maybePostfixModifierPosition:void 0}}if(r){const c=l;l=d=>r({className:d,parseClassName:c})}return l},O7=t=>t.endsWith(Eg)?t.substring(0,t.length-1):t.startsWith(Eg)?t.substring(1):t,P7=t=>{const s=Object.fromEntries(t.orderSensitiveModifiers.map(l=>[l,!0]));return l=>{if(l.length<=1)return l;const c=[];let d=[];return l.forEach(u=>{u[0]==="["||s[u]?(c.push(...d.sort(),u),d=[]):d.push(u)}),c.push(...d.sort()),c}},z7=t=>({cache:R7(t.cacheSize),parseClassName:_7(t),sortModifiers:P7(t),...D7(t)}),U7=/\s+/,I7=(t,s)=>{const{parseClassName:r,getClassGroupId:l,getConflictingClassGroupIds:c,sortModifiers:d}=s,u=[],x=t.trim().split(U7);let p="";for(let g=x.length-1;g>=0;g-=1){const b=x[g],{isExternal:v,modifiers:y,hasImportantModifier:j,baseClassName:S,maybePostfixModifierPosition:N}=r(b);if(v){p=b+(p.length>0?" "+p:p);continue}let w=!!N,D=l(w?S.substring(0,N):S);if(!D){if(!w){p=b+(p.length>0?" "+p:p);continue}if(D=l(S),!D){p=b+(p.length>0?" "+p:p);continue}w=!1}const k=d(y).join(":"),A=j?k+Eg:k,_=A+D;if(u.includes(_))continue;u.push(_);const E=c(D,w);for(let I=0;I<E.length;++I){const R=E[I];u.push(A+R)}p=b+(p.length>0?" "+p:p)}return p};function B7(){let t=0,s,r,l="";for(;t<arguments.length;)(s=arguments[t++])&&(r=GN(s))&&(l&&(l+=" "),l+=r);return l}const GN=t=>{if(typeof t=="string")return t;let s,r="";for(let l=0;l<t.length;l++)t[l]&&(s=GN(t[l]))&&(r&&(r+=" "),r+=s);return r};function F7(t,...s){let r,l,c,d=u;function u(p){const g=s.reduce((b,v)=>v(b),t());return r=z7(g),l=r.cache.get,c=r.cache.set,d=x,x(p)}function x(p){const g=l(p);if(g)return g;const b=I7(p,r);return c(p,b),b}return function(){return d(B7.apply(null,arguments))}}const Ca=t=>{const s=r=>r[t]||[];return s.isThemeGetter=!0,s},VN=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,KN=/^\((?:(\w[\w-]*):)?(.+)\)$/i,H7=/^\d+\/\d+$/,q7=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,$7=/\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$/,W7=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Q7=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,G7=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ho=t=>H7.test(t),at=t=>!!t&&!Number.isNaN(Number(t)),Hr=t=>!!t&&Number.isInteger(Number(t)),Af=t=>t.endsWith("%")&&at(t.slice(0,-1)),ar=t=>q7.test(t),V7=()=>!0,K7=t=>$7.test(t)&&!W7.test(t),YN=()=>!1,Y7=t=>Q7.test(t),X7=t=>G7.test(t),Z7=t=>!_e(t)&&!Oe(t),J7=t=>xc(t,JN,YN),_e=t=>VN.test(t),Ll=t=>xc(t,eC,K7),Sf=t=>xc(t,nM,at),Py=t=>xc(t,XN,YN),eM=t=>xc(t,ZN,X7),wu=t=>xc(t,tC,Y7),Oe=t=>KN.test(t),di=t=>pc(t,eC),tM=t=>pc(t,rM),zy=t=>pc(t,XN),aM=t=>pc(t,JN),sM=t=>pc(t,ZN),Au=t=>pc(t,tC,!0),xc=(t,s,r)=>{const l=VN.exec(t);return l?l[1]?s(l[1]):r(l[2]):!1},pc=(t,s,r=!1)=>{const l=KN.exec(t);return l?l[1]?s(l[1]):r:!1},XN=t=>t==="position"||t==="percentage",ZN=t=>t==="image"||t==="url",JN=t=>t==="length"||t==="size"||t==="bg-size",eC=t=>t==="length",nM=t=>t==="number",rM=t=>t==="family-name",tC=t=>t==="shadow",lM=()=>{const t=Ca("color"),s=Ca("font"),r=Ca("text"),l=Ca("font-weight"),c=Ca("tracking"),d=Ca("leading"),u=Ca("breakpoint"),x=Ca("container"),p=Ca("spacing"),g=Ca("radius"),b=Ca("shadow"),v=Ca("inset-shadow"),y=Ca("text-shadow"),j=Ca("drop-shadow"),S=Ca("blur"),N=Ca("perspective"),w=Ca("aspect"),D=Ca("ease"),k=Ca("animate"),A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],_=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[..._(),Oe,_e],I=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto","contain","none"],z=()=>[Oe,_e,p],U=()=>[Ho,"full","auto",...z()],B=()=>[Hr,"none","subgrid",Oe,_e],F=()=>["auto",{span:["full",Hr,Oe,_e]},Hr,Oe,_e],V=()=>[Hr,"auto",Oe,_e],de=()=>["auto","min","max","fr",Oe,_e],le=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],xe=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...z()],O=()=>[Ho,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...z()],T=()=>[t,Oe,_e],K=()=>[..._(),zy,Py,{position:[Oe,_e]}],ve=()=>["no-repeat",{repeat:["","x","y","space","round"]}],P=()=>["auto","cover","contain",aM,J7,{size:[Oe,_e]}],J=()=>[Af,di,Ll],W=()=>["","none","full",g,Oe,_e],H=()=>["",at,di,Ll],te=()=>["solid","dashed","dotted","double"],pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ae=()=>[at,Af,zy,Py],Ne=()=>["","none",S,Oe,_e],Se=()=>["none",at,Oe,_e],Ce=()=>["none",at,Oe,_e],ke=()=>[at,Oe,_e],Z=()=>[Ho,"full",...z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ar],breakpoint:[ar],color:[V7],container:[ar],"drop-shadow":[ar],ease:["in","out","in-out"],font:[Z7],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ar],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ar],shadow:[ar],spacing:["px",at],text:[ar],"text-shadow":[ar],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ho,_e,Oe,w]}
vendor: 12,853 bytes, line 49
49],container:["container"],columns:[{columns:[at,_e,Oe,x]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"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:E()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:U()}],"inset-x":[{"inset-x":U()}],"inset-y":[{"inset-y":U()}],start:[{start:U()}],end:[{end:U()}],top:[{top:U()}],right:[{right:U()}],bottom:[{bottom:U()}],left:[{left:U()}],visibility:["visible","invisible","collapse"],z:[{z:[Hr,"auto",Oe,_e]}],basis:[{basis:[Ho,"full","auto",x,...z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[at,Ho,"auto","initial","none",_e]}],grow:[{grow:["",at,Oe,_e]}],shrink:[{shrink:["",at,Oe,_e]}],order:[{order:[Hr,"first","last","none",Oe,_e]}],"grid-cols":[{"grid-cols":B()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":B()}],"row-start-end":[{row:F()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":de()}],"auto-rows":[{"auto-rows":de()}],gap:[{gap:z()}],"gap-x":[{"gap-x":z()}],"gap-y":[{"gap-y":z()}],"justify-content":[{justify:[...le(),"normal"]}],"justify-items":[{"justify-items":[...xe(),"normal"]}],"justify-self":[{"justify-self":["auto",...xe()]}],"align-content":[{content:["normal",...le()]}],"align-items":[{items:[...xe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...xe(),{baseline:["","last"]}]}],"place-content":[{"place-content":le()}],"place-items":[{"place-items":[...xe(),"baseline"]}],"place-self":[{"place-self":["auto",...xe()]}],p:[{p:z()}],px:[{px:z()}],py:[{py:z()}],ps:[{ps:z()}],pe:[{pe:z()}],pt:[{pt:z()}],pr:[{pr:z()}],pb:[{pb:z()}],pl:[{pl:z()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":z()}],"space-y-reverse":["space-y-reverse"],size:[{size:O()}],w:[{w:[x,"screen",...O()]}],"min-w":[{"min-w":[x,"screen","none",...O()]}],"max-w":[{"max-w":[x,"screen","none","prose",{screen:[u]},...O()]}],h:[{h:["screen","lh",...O()]}],"min-h":[{"min-h":["screen","lh","none",...O()]}],"max-h":[{"max-h":["screen","lh",...O()]}],"font-size":[{text:["base",r,di,Ll]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[l,Oe,Sf]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Af,_e]}],"font-family":[{font:[tM,_e,s]}],"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:[c,Oe,_e]}],"line-clamp":[{"line-clamp":[at,"none",Oe,Sf]}],leading:[{leading:[d,...z()]}],"list-image":[{"list-image":["none",Oe,_e]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Oe,_e]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:T()}],"text-color":[{text:T()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:[at,"from-font","auto",Oe,Ll]}],"text-decoration-color":[{decoration:T()}],"underline-offset":[{"underline-offset":[at,"auto",Oe,_e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Oe,_e]}],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",Oe,_e]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:K()}],"bg-repeat":[{bg:ve()}],"bg-size":[{bg:P()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Hr,Oe,_e],radial:["",Oe,_e],conic:[Hr,Oe,_e]},sM,eM]}],"bg-color":[{bg:T()}],"gradient-from-pos":[{from:J()}],"gradient-via-pos":[{via:J()}],"gradient-to-pos":[{to:J()}],"gradient-from":[{from:T()}],"gradient-via":[{via:T()}],"gradient-to":[{to:T()}],rounded:[{rounded:W()}],"rounded-s":[{"rounded-s":W()}],"rounded-e":[{"rounded-e":W()}],"rounded-t":[{"rounded-t":W()}],"rounded-r":[{"rounded-r":W()}],"rounded-b":[{"rounded-b":W()}],"rounded-l":[{"rounded-l":W()}],"rounded-ss":[{"rounded-ss":W()}],"rounded-se":[{"rounded-se":W()}],"rounded-ee":[{"rounded-ee":W()}],"rounded-es":[{"rounded-es":W()}],"rounded-tl":[{"rounded-tl":W()}],"rounded-tr":[{"rounded-tr":W()}],"rounded-br":[{"rounded-br":W()}],"rounded-bl":[{"rounded-bl":W()}],"border-w":[{border:H()}],"border-w-x":[{"border-x":H()}],"border-w-y":[{"border-y":H()}],"border-w-s":[{"border-s":H()}],"border-w-e":[{"border-e":H()}],"border-w-t":[{"border-t":H()}],"border-w-r":[{"border-r":H()}],"border-w-b":[{"border-b":H()}],"border-w-l":[{"border-l":H()}],"divide-x":[{"divide-x":H()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":H()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...te(),"hidden","none"]}],"divide-style":[{divide:[...te(),"hidden","none"]}],"border-color":[{border:T()}],"border-color-x":[{"border-x":T()}],"border-color-y":[{"border-y":T()}],"border-color-s":[{"border-s":T()}],"border-color-e":[{"border-e":T()}],"border-color-t":[{"border-t":T()}],"border-color-r":[{"border-r":T()}],"border-color-b":[{"border-b":T()}],"border-color-l":[{"border-l":T()}],"divide-color":[{divide:T()}],"outline-style":[{outline:[...te(),"none","hidden"]}],"outline-offset":[{"outline-offset":[at,Oe,_e]}],"outline-w":[{outline:["",at,di,Ll]}],"outline-color":[{outline:T()}],shadow:[{shadow:["","none",b,Au,wu]}],"shadow-color":[{shadow:T()}],"inset-shadow":[{"inset-shadow":["none",v,Au,wu]}],"inset-shadow-color":[{"inset-shadow":T()}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:T()}],"ring-offset-w":[{"ring-offset":[at,Ll]}],"ring-offset-color":[{"ring-offset":T()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":T()}],"text-shadow":[{"text-shadow":["none",y,Au,wu]}],"text-shadow-color":[{"text-shadow":T()}],opacity:[{opacity:[at,Oe,_e]}],"mix-blend":[{"mix-blend":[...pe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":pe()}],"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":[at]}],"mask-image-linear-from-pos":[{"mask-linear-from":ae()}],"mask-image-linear-to-pos":[{"mask-linear-to":ae()}],"mask-image-linear-from-color":[{"mask-linear-from":T()}],"mask-image-linear-to-color":[{"mask-linear-to":T()}],"mask-image-t-from-pos":[{"mask-t-from":ae()}],"mask-image-t-to-pos":[{"mask-t-to":ae()}],"mask-image-t-from-color":[{"mask-t-from":T()}],"mask-image-t-to-color":[{"mask-t-to":T()}],"mask-image-r-from-pos":[{"mask-r-from":ae()}],"mask-image-r-to-pos":[{"mask-r-to":ae()}],"mask-image-r-from-color":[{"mask-r-from":T()}],"mask-image-r-to-color":[{"mask-r-to":T()}],"mask-image-b-from-pos":[{"mask-b-from":ae()}],"mask-image-b-to-pos":[{"mask-b-to":ae()}],"mask-image-b-from-color":[{"mask-b-from":T()}],"mask-image-b-to-color":[{"mask-b-to":T()}],"mask-image-l-from-pos":[{"mask-l-from":ae()}],"mask-image-l-to-pos":[{"mask-l-to":ae()}],"mask-image-l-from-color":[{"mask-l-from":T()}],"mask-image-l-to-color":[{"mask-l-to":T()}],"mask-image-x-from-pos":[{"mask-x-from":ae()}],"mask-image-x-to-pos":[{"mask-x-to":ae()}],"mask-image-x-from-color":[{"mask-x-from":T()}],"mask-image-x-to-color":[{"mask-x-to":T()}],"mask-image-y-from-pos":[{"mask-y-from":ae()}],"mask-image-y-to-pos":[{"mask-y-to":ae()}],"mask-image-y-from-color":[{"mask-y-from":T()}],"mask-image-y-to-color":[{"mask-y-to":T()}],"mask-image-radial":[{"mask-radial":[Oe,_e]}],"mask-image-radial-from-pos":[{"mask-radial-from":ae()}],"mask-image-radial-to-pos":[{"mask-radial-to":ae()}],"mask-image-radial-from-color":[{"mask-radial-from":T()}],"mask-image-radial-to-color":[{"mask-radial-to":T()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":_()}],"mask-image-conic-pos":[{"mask-conic":[at]}],"mask-image-conic-from-pos":[{"mask-conic-from":ae()}],"mask-image-conic-to-pos":[{"mask-conic-to":ae()}],"mask-image-conic-from-color":[{"mask-conic-from":T()}],"mask-image-conic-to-color":[{"mask-conic-to":T()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:K()}],"mask-repeat":[{mask:ve()}],"mask-size":[{mask:P()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Oe,_e]}],filter:[{filter:["","none",Oe,_e]}],blur:[{blur:Ne()}],brightness:[{brightness:[at,Oe,_e]}],contrast:[{contrast:[at,Oe,_e]}],"drop-shadow":[{"drop-shadow":["","none",j,Au,wu]}],"drop-shadow-color":[{"drop-shadow":T()}],grayscale:[{grayscale:["",at,Oe,_e]}],"hue-rotate":[{"hue-rotate":[at,Oe,_e]}],invert:[{invert:["",at,Oe,_e]}],saturate:[{saturate:[at,Oe,_e]}],sepia:[{sepia:["",at,Oe,_e]}],"backdrop-filter":[{"backdrop-filter":["","none",Oe,_e]}],"backdrop-blur":[{"backdrop-blur":Ne()}],"backdrop-brightness":[{"backdrop-brightness":[at,Oe,_e]}],"backdrop-contrast":[{"backdrop-contrast":[at,Oe,_e]}],"backdrop-grayscale":[{"backdrop-grayscale":["",at,Oe,_e]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[at,Oe,_e]}],"backdrop-invert":[{"backdrop-invert":["",at,Oe,_e]}],"backdrop-opacity":[{"backdrop-opacity":[at,Oe,_e]}],"backdrop-saturate":[{"backdrop-saturate":[at,Oe,_e]}],"backdrop-sepia":[{"backdrop-sepia":["",at,Oe,_e]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":z()}],"border-spacing-x":[{"border-spacing-x":z()}],"border-spacing-y":[{"border-spacing-y":z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Oe,_e]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[at,"initial",Oe,_e]}],ease:[{ease:["linear","initial",D,Oe,_e]}],delay:[{delay:[at,Oe,_e]}],animate:[{animate:["none",k,Oe,_e]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[N,Oe,_e]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:Se()}],"rotate-x":[{"rotate-x":Se()}],"rotate-y":[{"rotate-y":Se()}],"rotate-z":[{"rotate-z":Se()}],scale:[{scale:Ce()}],"scale-x":[{"scale-x":Ce()}],"scale-y":[{"scale-y":Ce()}],"scale-z":[{"scale-z":Ce()}],"scale-3d":["scale-3d"],skew:[{skew:ke()}],"skew-x":[{"skew-x":ke()}],"skew-y":[{"skew-y":ke()}],transform:[{transform:[Oe,_e,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Z()}],"translate-x":[{"translate-x":Z()}],"translate-y":[{"translate-y":Z()}],"translate-z":[{"translate-z":Z()}],"translate-none":["translate-none"],accent:[{accent:T()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:T()}
vendor: 5,466 bytes, line 49
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",Oe,_e]}],"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":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"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",Oe,_e]}],fill:[{fill:["none",...T()]}],"stroke-w":[{stroke:[at,di,Ll,Sf]}],stroke:[{stroke:["none",...T()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},oM=F7(lM);function Me(...t){return oM(WN(t))}function Zu({delayDuration:t=0,...s}){return e.jsx(N7,{"data-loc":"client/src/components/ui/tooltip.tsx:11","data-slot":"tooltip-provider",delayDuration:t,...s})}function Gr({...t}){return e.jsx(Zu,{"data-loc":"client/src/components/ui/tooltip.tsx:23",children:e.jsx(C7,{"data-loc":"client/src/components/ui/tooltip.tsx:24","data-slot":"tooltip",...t})})}function Vr({...t}){return e.jsx(w7,{"data-loc":"client/src/components/ui/tooltip.tsx:32","data-slot":"tooltip-trigger",...t})}function Kr({className:t,sideOffset:s=0,children:r,...l}){return e.jsx(A7,{"data-loc":"client/src/components/ui/tooltip.tsx:42",children:e.jsxs(S7,{"data-loc":"client/src/components/ui/tooltip.tsx:43","data-slot":"tooltip-content",sideOffset:s,className:Me("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]:sli
49de-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),...l,children:[r,e.jsx(E7,{"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 Uy=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Iy=WN,aC=(t,s)=>r=>{var l;if(s?.variants==null)return Iy(t,r?.class,r?.className);const{variants:c,defaultVariants:d}=s,u=Object.keys(c).map(g=>{const b=r?.[g],v=d?.[g];if(b===null)return null;const y=Uy(b)||Uy(v);return c[g][y]}),x=r&&Object.entries(r).reduce((g,b)=>{let[v,y]=b;return y===void 0||(g[v]=y),g},{}),p=s==null||(l=s.compoundVariants)===null||l===void 0?void 0:l.reduce((g,b)=>{let{class:v,className:y,...j}=b;return Object.entries(j).every(S=>{let[N,w]=S;return Array.isArray(w)?w.includes({...d,...x}[N]):{...d,...x}[N]===w})?[...g,v,y]:g},[]);return Iy(t,u,p,r?.class,r?.className)},fh=aC("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 oe({className:t,variant:s,size:r,asChild:l=!1,...c}){const d=l?lN:"button";return e.jsx(d,{"data-loc":"client/src/components/ui/button.tsx:52","data-slot":"button",className:Me(fh({variant:s,size:r,className:t})),...c})}function Wt({className:t,...s}){return e.jsx("div",{"data-loc":"client/src/components/ui/card.tsx:7","data-slot":"card",className:Me("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",t),...s})}function Es({className:t,...s}){return e.jsx("div",{"data-loc":"client/src/components/ui/card.tsx:20","data-slot":"card-header",className:Me("@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),...s})}function Ds({className:t,...s}){return e.jsx("div",{"data-loc":"client/src/components/ui/card.tsx:33","data-slot":"card-title",className:Me("leading-none font-semibold",t),...s})}function ta({className:t,...s}){return e.jsx("div",{"data-loc":"client/src/components/ui/card.tsx:66","data-slot":"card-content",className:Me("px-6",t),...s})}/** 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 cM=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),sC=(...t)=>t.filter((s,r,l)=>!!s&&l.indexOf(s)===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 iM={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 dM=f.forwardRef(({color:t="currentColor",size:s=24,strokeWidth:r=2,absoluteStrokeWidth:l,className:c="",children:d,iconNode:u,...x},p)=>f.createElement("svg",{ref:p,...iM,width:s,height:s,stroke:t,strokeWidth:l?Number(r)*24/Number(s):r,className:sC("lucide",c),...x},[...u.map(([g,b])=>f.createElement(g,b)),...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 je=(t,s)=>{const r=f.forwardRef(({className:l,...c},d)=>f.createElement(dM,{ref:d,iconNode:s,className:sC(`lucide-${cM(t)}`,l),...c}));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 uM=je("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 Fl=je("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 nC=je("ArrowRightLeft",[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]]);/** 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 xM=je("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);/** 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 By=je("Banknote",[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"2",key:"9lu3g6"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M6 12h.01M18 12h.01",key:"113zkx"}]]);/** 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 Yo=je("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/** 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 pM=je("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"}]]);/** 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 un=je("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"}]]);/** 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 mM=je("Building",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]]);/** 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 fM=je("CalendarCheck",[["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"}],["path",{d:"m9 16 2 2 4-4",key:"19s6y9"}]]);/** 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 gM=je("CalendarDays",[["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"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);/** 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 hM=je("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"}]]);/** 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 vM=je("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/** 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 Fy=je("CheckCheck",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]]);/** 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 Ya=je("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 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 Xa=je("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 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 nc=je("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** 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 Ia=je("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** 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 Qi=je("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** 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 ms=je("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 Ju=je("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 Ka=je("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 bM=je("CircleUser",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]);/** 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 Yr=je("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 yM=je("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"}]]);/** 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 Za=je("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** 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 jM=je("Columns2",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]]);/** 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 zl=je("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"}]]);/** 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 NM=je("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/** 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 gh=je("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"}]]);/** 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 Mg=je("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/** 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 Gi=je("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 rC=je("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 _x=je("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 Hl=je("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"}]]);/** 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 Ox=je("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/** 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 CM=je("Gem",[["path",{d:"M6 3h12l4 6-10 13L2 9Z",key:"1pcd5k"}],["path",{d:"M11 3 8 9l4 13 4-13-3-6",key:"1fcu3u"}],["path",{d:"M2 9h20",key:"16fsjt"}]]);/** 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 lr=je("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"}]]);/** 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 Hy=je("GraduationCap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]);/** 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 Vi=je("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/** 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 wM=je("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}
274]]);/** 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 Px=je("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"}]]);/** 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 lC=je("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);/** 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 qy=je("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/** 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 Lg=je("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"}]]);/** 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 AM=je("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"}]]);/** 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 hi=je("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 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 SM=je("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/** 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 EM=je("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]);/** 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 kg=je("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"}]]);/** 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 mr=je("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"}]]);/** 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 oC=je("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"}]]);/** 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 cC=je("Megaphone",[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]]);/** 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 DM=je("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** 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 Xr=je("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/** 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 Rn=je("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"}]]);/** 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 qo=je("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/** 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 $y=je("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** 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 Wy=je("MousePointer",[["path",{d:"M12.586 12.586 19 19",key:"ea5xo7"}],["path",{d:"M3.688 3.037a.497.497 0 0 0-.651.651l6.5 15.999a.501.501 0 0 0 .947-.062l1.569-6.083a2 2 0 0 1 1.448-1.479l6.124-1.5
36479a.5.5 0 0 0 .063-.947z",key:"277e5u"}]]);/** 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 Rg=je("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"}]]);/** 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 iC=je("Pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);/** 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 dr=je("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/** 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 hn=je("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"}]]);/** 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 MM=je("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/** 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 Jt=je("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** 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 LM=je("Puzzle",[["path",{d:"M19.439 7.85c-.049.322.059.648.289.878l1.568 1.568c.47.47.706 1.087.706 1.704s-.235 1.233-.706 1.704l-1.611 1.611a.98.98 0 0 1-.837.276c-.47-.07-.802-.48-.968-.925a2.501 2.501 0 1 0-3.214 3.214c.446.166.855.497.925.968a.979.979 0 0 1-.276.837l-1.61 1.61a2.404 2.404 0 0 1-1.705.707 2.402 2.402 0 0 1-1.704-.706l-1.568-1.568a1.026 1.026 0 0 0-.877-.29c-.493.074-.84.504-1.02.968a2.5 2.5 0 1 1-3.237-3.237c.464-.18.894-.527.967-1.02a1.026 1.026 0 0 0-.289-.877l-1.568-1.568A2.402 2.402 0 0 1 1.998 12c0-.617.236-1.234.706-1.704L4.23 8.77c.24-.24.581-.353.917-.303.515.077.877.528 1.073 1.01a2.5 2.5 0 1 0 3.259-3.259c-.482-.196-.933-.558-1.01-1.073-.05-.336.062-.676.303-.917l1.525-1.525A2.402 2.402 0 0 1 12 1.998c.617 0 1.234.236 1.704.706l1.568 1.568c.23.23.556.338.877.29.493-.074.84-.504 1.02-.968a2.5 2.5 0 1 1 3.237 3.237c-.464.18-.894.527-.967 1.02Z",key:"i0oyt7"}]]);/** 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 ur=je("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"}]]);/** 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 rc=je("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"}]]);/** 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 ex=je("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"}]]);/** 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 or=je("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 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 kM=je("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"}]]);/** 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 ki=je("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** 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 dC=je("ShieldAlert",[["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
434y:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/** 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 Fu=je("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",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 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 uC=je("ShieldOff",[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71",key:"1jlk70"}],["path",{d:"M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264",key:"18rp1v"}]]);/** 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 Vo=je("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"}]]);/** 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 RM=je("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/** 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 TM=je("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** 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 hh=je("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"}]]);/** 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 _M=je("StickyNote",[["path",{d:"M16 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8Z",key:"qazsjp"}],["path",{d:"M15 3v4a2 2 0 0 0 2 2h4",key:"40519r"}]]);/** 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 Qy=je("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/** 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 OM=je("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/** 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 Gy=je("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"}]]);/** 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 xC=je("Thermometer",[["path",{d:"M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z",key:"17jzev"}]]);/** 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 PM=je("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"}]]);/** 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 Tg=je("TimerOff",[["path",{d:"M10 2h4",key:"n1abiw"}],["path",{d:"M4.6 11a8 8 0 0 0 1.7 8.7 8 8 0 0 0 8.7 1.7",key:"10he05"}],["path",{d:"M7.4 7.4a8 8 0 0 1 10.3 1 8 8 0 0 1 .9 10.2",key:"15f7sh"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M12 12v-2",key:"fwoke6"}]]);/** 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 zM=je("ToggleLeft",[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"6",ry:"6",key:"f2vt7d"}],["circle",{cx:"8",cy:"12",r:"2",key:"1nvbw3"}]]);/** 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 UM=je("ToggleRight",[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"6",ry:"6",key:"f2vt7d"}],["circle",{cx:"16",cy:"12",r:"2",key:"4ma0v8"}]]);/** 510 * @license lucide-react v0.453.0 - ISC 511 * 512 * This source code is licensed under the ISC license. 513 * See the LICENSE file in the root directory of this source tree. 514 */const Ba=je("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}
514],["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"}]]);/** 515 * @license lucide-react v0.453.0 - ISC 516 * 517 * This source code is licensed under the ISC license. 518 * See the LICENSE file in the root directory of this source tree. 519 */const Pl=je("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"}]]);/** 520 * @license lucide-react v0.453.0 - ISC 521 * 522 * This source code is licensed under the ISC license. 523 * See the LICENSE file in the root directory of this source tree. 524 */const Ki=je("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"}]]);/** 525 * @license lucide-react v0.453.0 - ISC 526 * 527 * This source code is licensed under the ISC license. 528 * See the LICENSE file in the root directory of this source tree. 529 */const Vy=je("UserCheck",[["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"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]]);/** 530 * @license lucide-react v0.453.0 - ISC 531 * 532 * This source code is licensed under the ISC license. 533 * See the LICENSE file in the root directory of this source tree. 534 */const tx=je("UserCog",[["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m21.7 16.4-.9-.3",key:"12j9ji"}],["path",{d:"m15.2 13.9-.9-.3",key:"1fdjdi"}],["path",{d:"m16.6 18.7.3-.9",key:"heedtr"}],["path",{d:"m19.1 12.2.3-.9",key:"1af3ki"}],["path",{d:"m19.6 18.7-.4-1",key:"1x9vze"}],["path",{d:"m16.8 12.3-.4-1",key:"vqeiwj"}],["path",{d:"m14.3 16.6 1-.4",key:"1qlj63"}],["path",{d:"m20.7 13.8 1-.4",key:"1v5t8k"}]]);/** 535 * @license lucide-react v0.453.0 - ISC 536 * 537 * This source code is licensed under the ISC license. 538 * See the LICENSE file in the root directory of this source tree. 539 */const vh=je("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"}]]);/** 540 * @license lucide-react v0.453.0 - ISC 541 * 542 * This source code is licensed under the ISC license. 543 * See the LICENSE file in the root directory of this source tree. 544 */const IM=je("UserX",[["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:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]]);/** 545 * @license lucide-react v0.453.0 - ISC 546 * 547 * This source code is licensed under the ISC license. 548 * See the LICENSE file in the root directory of this source tree. 549 */const Ua=je("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"}]]);/** 550 * @license lucide-react v0.453.0 - ISC 551 * 552 * This source code is licensed under the ISC license. 553 * See the LICENSE file in the root directory of this source tree. 554 */const Ys=je("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"}]]);/** 555 * @license lucide-react v0.453.0 - ISC 556 * 557 * This source code is licensed under the ISC license. 558 * See the LICENSE file in the root directory of this source tree. 559 */const _g=je("Webhook",[["path",{d:"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2",key:"q3hayz"}],["path",{d:"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06",key:"1go1hn"}],["path",{d:"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8",key:"qlwsc0"}]]);/** 560 * @license lucide-react v0.453.0 - ISC 561 * 562 * This source code is licensed under the ISC license. 563 * See the LICENSE file in the root directory of this source tree. 564 */const Ky=je("WifiOff",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}
vendor: 4,260 bytes, lines 564-587
564],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** 565 * @license lucide-react v0.453.0 - ISC 566 * 567 * This source code is licensed under the ISC license. 568 * See the LICENSE file in the root directory of this source tree. 569 */const BM=je("Wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);/** 570 * @license lucide-react v0.453.0 - ISC 571 * 572 * This source code is licensed under the ISC license. 573 * See the LICENSE file in the root directory of this source tree. 574 */const va=je("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** 575 * @license lucide-react v0.453.0 - ISC 576 * 577 * This source code is licensed under the ISC license. 578 * See the LICENSE file in the root directory of this source tree. 579 */const bh=je("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 FM(t,s){if(t instanceof RegExp)return{keys:!1,pattern:t};var r,l,c,d,u=[],x="",p=t.split("/");for(p[0]||p.shift();c=p.shift();)r=c[0],r==="*"?(u.push(r),x+=c[1]==="?"?"(?:/(.*))?":"/(.*)"):r===":"?(l=c.indexOf("?",1),d=c.indexOf(".",1),u.push(c.substring(1,~l?l:~d?d:c.length)),x+=~l&&!~d?"(?:/([^/]+?))?":"/([^/]+?)",~d&&(x+=(~l?"?":"")+"\\"+c.substring(d))):x+="/"+c;return{keys:u,pattern:new RegExp("^"+x+(s?"(?=$|/)":"/?$"),"i")}}var Ef={exports:{}},Df={};/** 580 * @license React 581 * use-sync-external-store-shim.production.js 582 * 583 * Copyright (c) Meta Platforms, Inc. and affiliates. 584 * 585 * This source code is licensed under the MIT license found in the 586 * LICENSE file in the root directory of this source tree. 587 */var Yy;function HM(){if(Yy)return Df;Yy=1;var t=gx();function s(v,y){return v===y&&(v!==0||1/v===1/y)||v!==v&&y!==y}var r=typeof Object.is=="function"?Object.is:s,l=t.useState,c=t.useEffect,d=t.useLayoutEffect,u=t.useDebugValue;function x(v,y){var j=y(),S=l({inst:{value:j,getSnapshot:y}}),N=S[0].inst,w=S[1];return d(function(){N.value=j,N.getSnapshot=y,p(N)&&w({inst:N})},[v,j,y]),c(function(){return p(N)&&w({inst:N}),v(function(){p(N)&&w({inst:N})})},[v]),u(j),j}function p(v){var y=v.getSnapshot;v=v.value;try{var j=y();return!r(v,j)}catch{return!0}}function g(v,y){return y()}var b=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?g:x;return Df.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:b,Df}var Xy;function qM(){return Xy||(Xy=1,Ef.exports=HM()),Ef.exports}var pC=qM();const $M=hx.useInsertionEffect,WM=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",mC=WM?f.useLayoutEffect:f.useEffect,QM=$M||mC,yh=t=>{const s=f.useRef([t,(...r)=>s[0](...r)]).current;return QM(()=>{s[0]=t}),s[1]},GM="popstate",jh="pushState",Nh="replaceState",VM="hashchange",Zy=[GM,jh,Nh,VM],KM=t=>{for(const s of Zy)addEventListener(s,t);return()=>{for(const s of Zy)removeEventListener(s,t)}},fC=(t,s)=>pC.useSyncExternalStore(KM,t,s),YM=()=>location.search,XM=({ssrSearch:t=""}={})=>fC(YM,()=>t),Jy=()=>location.pathname,ZM=({ssrPath:t}={})=>fC(Jy,t?()=>t:Jy),JM=(t,{replace:s=!1,state:r=null}={})=>history[s?Nh:jh](r,"",t),eL=(t={})=>[ZM(t),JM],ej=Symbol.for("wouter_v3");if(typeof history<"u"&&typeof window[ej]>"u"){for(const t of[jh,Nh]){const s=history[t];history[t]=function(){const r=s.apply(this,arguments),l=new Event(t);return l.arguments=arguments,dispatchEvent(l),r}}Object.defineProperty(window,ej,{value:!0})}const tL=(t,s)=>s.toLowerCase().indexOf(t.toLowerCase())?"~"+s:s.slice(t.length)||"/",gC=(t="")=>t==="/"?"":t,aL=(t,s)=>t[0]==="~"?t.slice(1):gC(s)+t,sL=(t="",s)=>tL(Og(gC(t)),Og(s)),nL=t=>t[0]==="?"?t.slice(1):t,Og=t=>{try{return decodeURI(t)}catch{return t}},rL=t=>Og(nL(t)),hC={hook:eL,searchHook:XM,parser:FM,base:"",ssrPath:void 0,ssrSearch:void 0,ssrContext:void 0,hrefs:t=>t},vC=f.createContext(hC),so=()=>f.useContext(vC),bC={},yC=f.createContext(bC),mc=()=>f.useContext(yC),Yi=t=>{const[s,r]=t.hook(t);
587return[sL(t.base,s),yh((l,c)=>r(aL(l,t.base),c))]},fs=()=>Yi(so()),lL=()=>{const t=so();return rL(t.searchHook(t))},jC=(t,s,r,l)=>{const{pattern:c,keys:d}=s instanceof RegExp?{keys:!1,pattern:s}:t(s||"*",l),u=c.exec(r)||[],[x,...p]=u;return x!==void 0?[!0,(()=>{const g=d!==!1?Object.fromEntries(d.map((v,y)=>[v,p[y]])):u.groups;let b={...p};return g&&Object.assign(b,g),b})(),...l?[x]:[]]:[!1,null]},oL=({children:t,...s})=>{const r=so(),l=s.hook?hC:r;let c=l;const[d,u]=s.ssrPath?.split("?")??[];u&&(s.ssrSearch=u,s.ssrPath=d),s.hrefs=s.hrefs??s.hook?.hrefs;let x=f.useRef({}),p=x.current,g=p;for(let b in l){const v=b==="base"?l[b]+(s[b]||""):s[b]||l[b];p===g&&v!==g[b]&&(x.current=g={...g}),g[b]=v,(v!==l[b]||v!==c[b])&&(c=g)}return f.createElement(vC.Provider,{value:c,children:t})},tj=({children:t,component:s},r)=>s?f.createElement(s,{params:r}):typeof t=="function"?t(r):t,cL=t=>{let s=f.useRef(bC);const r=s.current;return s.current=Object.keys(t).length!==Object.keys(r).length||Object.entries(t).some(([l,c])=>c!==r[l])?t:r},$t=({path:t,nest:s,match:r,...l})=>{const c=so(),[d]=Yi(c),[u,x,p]=r??jC(c.parser,t,d,s),g=cL({...mc(),...x});if(!u)return null;const b=p?f.createElement(oL,{base:p},tj(l,g)):tj(l,g);return f.createElement(yC.Provider,{value:g,children:b})},xs=f.forwardRef((t,s)=>{const r=so(),[l,c]=Yi(r),{to:d="",href:u=d,onClick:x,asChild:p,children:g,className:b,replace:v,state:y,...j}=t,S=yh(w=>{w.ctrlKey||w.metaKey||w.altKey||w.shiftKey||w.button!==0||(x?.(w),w.defaultPrevented||(w.preventDefault(),c(u,t)))}),N=r.hrefs(u[0]==="~"?u.slice(1):r.base+u,r);return p&&f.isValidElement(g)?f.cloneElement(g,{onClick:S,href:N}):f.createElement("a",{...j,onClick:S,href:N,className:b?.call?b(l===u):b,children:g,ref:s})}),Pg=t=>Array.isArray(t)?t.flatMap(s=>Pg(s&&s.type===f.Fragment?s.props.children:s)):[t],aj=({children:t,location:s})=>{const r=so(),[l]=Yi(r);typeof window<"u"&&(window.__WOUTER_ROUTES__||(window.__WOUTER_ROUTES__=[]),Pg(t).forEach(d=>{if(f.isValidElement(d)&&d.props.path){const u=d.props.path;window.__WOUTER_ROUTES__.includes(u)||window.__WOUTER_ROUTES__.push(u)}}));for(const c of Pg(t)){let d=0;if(f.isValidElement(c)&&(d=jC(r.parser,c.props.path,s||l,c.props.nest))[0])return f.cloneElement(c,{match:d})}return null},iL=t=>{const{to:s,href:r=s}=t,l=so(),[,c]=Yi(l),d=yh(()=>c(s||r,t)),{ssrContext:u}=l;return mC(()=>{d()},[]),u&&(u.redirectTo=s),null};function dL(){const[,t]=fs(),s=()=>{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(Wt,{"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(ta,{"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(ms,{"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(oe,{"data-loc":"client/src/pages/NotFound.tsx:40",onClick:s,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(Px,{"data-loc":"client/src/pages/NotFound.tsx:44",className:"w-4 h-4 mr-2"}),"Go Home"]})})]})})})}class uL extends f.Component{constructor(s){super(s),this.state={hasError:!1,error:null}}static getDerivedStateFromError(s){return{hasError:!0,error:s}}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(Ki,{"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:Me("flex items-center gap-2 px-4 py-2 rounded-lg","bg-primary text-primary-foreground","hover:opacity-90 cursor-pointer"),children:[e.jsx(rc,{"data-loc":"client/src/components/ErrorBoundary.tsx:50",size:16}),"Reload Page"]})]})}):this.props.children}}const xL=f.createContext(void 0);function pL({children:t,defaultTheme:s="light",switchable:r=!1}){const[l,c]=f.useState(()=>r&&localStorage.getItem("theme")||s);f.useEffect(()=>{const u=document.documentElement;l==="dark"?u.classList.add("dark"):u.classList.remove("dark"),r&&localStorage.setItem("theme",l)},[l,r]);const d=r?()=>{c(u=>u==="light"?"dark":"light")}:void 0;return e.jsx(xL.Provider,{"data-loc":"client/src/contexts/ThemeContext.tsx:52",value:{theme:l,toggleTheme:d,switchable:r},children:t})}const NC=()=>"/login";function ka(t){const{redirectOnUnauthenticated:s=!1,redirectPath:r=NC()}={},l=Y.useUtils(),c=Y.auth.me.useQuery(void 0,{retry:!1,refetchOnWindowFocus:!1}),d=Y.auth.logout.useMutation({onSuccess:()=>{l.auth.me.setData(void 0,null)}}),u=f.useCallback(async()=>{try{await d.mutateAsync()}catch(p){if(p instanceof ec&&p.data?.code==="UNAUTHORIZED")return;throw p}finally{try{sessionStorage.removeItem("manus-cookie")}catch{}
vendor: 4,148 bytes, line 587
587l.auth.me.setData(void 0,null),await l.auth.me.invalidate()}},[d,l]),x=f.useMemo(()=>(localStorage.setItem("crm-user-info",JSON.stringify(c.data)),{user:c.data??null,loading:c.isLoading||d.isPending,error:c.error??d.error??null,isAuthenticated:!!c.data}),[c.data,c.error,c.isLoading,d.error,d.isPending]);return f.useEffect(()=>{s&&(c.isLoading||d.isPending||x.user||typeof window>"u"||window.location.pathname!==r&&(window.location.href=r))},[s,r,d.isPending,c.isLoading,x.user]),{...x,refresh:()=>c.refetch(),logout:u}}function mL(){return pC.useSyncExternalStore(fL,()=>!0,()=>!1)}function fL(){return()=>{}}var Ch="Avatar",[gL]=zs(Ch),[hL,CC]=gL(Ch),wC=f.forwardRef((t,s)=>{const{__scopeAvatar:r,...l}=t,[c,d]=f.useState("idle");return e.jsx(hL,{scope:r,imageLoadingStatus:c,onImageLoadingStatusChange:d,children:e.jsx(Qe.span,{...l,ref:s})})});wC.displayName=Ch;var AC="AvatarImage",SC=f.forwardRef((t,s)=>{const{__scopeAvatar:r,src:l,onLoadingStatusChange:c=()=>{},...d}=t,u=CC(AC,r),x=vL(l,d),p=La(g=>{c(g),u.onImageLoadingStatusChange(g)});return ba(()=>{x!=="idle"&&p(x)},[x,p]),x==="loaded"?e.jsx(Qe.img,{...d,ref:s,src:l}):null});SC.displayName=AC;var EC="AvatarFallback",DC=f.forwardRef((t,s)=>{const{__scopeAvatar:r,delayMs:l,...c}=t,d=CC(EC,r),[u,x]=f.useState(l===void 0);return f.useEffect(()=>{if(l!==void 0){const p=window.setTimeout(()=>x(!0),l);return()=>window.clearTimeout(p)}},[l]),u&&d.imageLoadingStatus!=="loaded"?e.jsx(Qe.span,{...c,ref:s}):null});DC.displayName=EC;function sj(t,s){return t?s?(t.src!==s&&(t.src=s),t.complete&&t.naturalWidth>0?"loaded":"loading"):"error":"idle"}function vL(t,{referrerPolicy:s,crossOrigin:r}){const l=mL(),c=f.useRef(null),d=l?(c.current||(c.current=new window.Image),c.current):null,[u,x]=f.useState(()=>sj(d,t));return ba(()=>{x(sj(d,t))},[d,t]),ba(()=>{const p=v=>()=>{x(v)};if(!d)return;const g=p("loaded"),b=p("error");return d.addEventListener("load",g),d.addEventListener("error",b),s&&(d.referrerPolicy=s),typeof r=="string"&&(d.crossOrigin=r),()=>{d.removeEventListener("load",g),d.removeEventListener("error",b)}},[d,r,s]),u}var bL=wC,yL=SC,jL=DC;function vi({className:t,...s}){return e.jsx(bL,{"data-loc":"client/src/components/ui/avatar.tsx:11","data-slot":"avatar",className:Me("relative flex size-8 shrink-0 overflow-hidden rounded-full",t),...s})}function wh({className:t,...s}){return e.jsx(yL,{"data-loc":"client/src/components/ui/avatar.tsx:27","data-slot":"avatar-image",className:Me("aspect-square size-full",t),...s})}function bi({className:t,...s}){return e.jsx(jL,{"data-loc":"client/src/components/ui/avatar.tsx:40","data-slot":"avatar-fallback",className:Me("bg-muted flex size-full items-center justify-center rounded-full",t),...s})}function Ah(t){const s=t+"CollectionProvider",[r,l]=zs(s),[c,d]=r(s,{collectionRef:{current:null},itemMap:new Map}),u=N=>{const{scope:w,children:D}=N,k=ye.useRef(null),A=ye.useRef(new Map).current;return e.jsx(c,{scope:w,itemMap:A,collectionRef:k,children:D})};u.displayName=s;const x=t+"CollectionSlot",p=tl(x),g=ye.forwardRef((N,w)=>{const{scope:D,children:k}=N,A=d(x,D),_=st(w,A.collectionRef);return e.jsx(p,{ref:_,children:k})});g.displayName=x;const b=t+"CollectionItemSlot",v="data-radix-collection-item",y=tl(b),j=ye.forwardRef((N,w)=>{const{scope:D,children:k,...A}=N,_=ye.useRef(null),E=st(w,_),I=d(b,D);return ye.useEffect(()=>(I.itemMap.set(_,{ref:_,...A}),()=>void I.itemMap.delete(_))),e.jsx(y,{[v]:"",ref:E,children:k})});j.displayName=b;function S(N){const w=d(t+"CollectionConsumer",N);return ye.useCallback(()=>{const k=w.collectionRef.current;if(!k)return[];const A=Array.from(k.querySelectorAll(`[${v}]`));return Array.from(w.itemMap.values()).sort((I,R)=>A.indexOf(I.ref.current)-A.indexOf(R.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:u,Slot:g,ItemSlot:j},S,l]}var NL=f.createContext(void 0);function Xi(t){const s=f.useContext(NL);return t||s||"ltr"}var Mf=0;function zx(){f.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??nj()),document.body.insertAdjacentElement("beforeend",t[1]??nj()),Mf++,
vendor: 4,914 bytes, line 587
587()=>{Mf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(s=>s.remove()),Mf--}},[])}function nj(){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 Lf="focusScope.autoFocusOnMount",kf="focusScope.autoFocusOnUnmount",rj={bubbles:!1,cancelable:!0},CL="FocusScope",Zi=f.forwardRef((t,s)=>{const{loop:r=!1,trapped:l=!1,onMountAutoFocus:c,onUnmountAutoFocus:d,...u}=t,[x,p]=f.useState(null),g=La(c),b=La(d),v=f.useRef(null),y=st(s,N=>p(N)),j=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(l){let N=function(A){if(j.paused||!x)return;const _=A.target;x.contains(_)?v.current=_:$r(v.current,{select:!0})},w=function(A){if(j.paused||!x)return;const _=A.relatedTarget;_!==null&&(x.contains(_)||$r(v.current,{select:!0}))},D=function(A){if(document.activeElement===document.body)for(const E of A)E.removedNodes.length>0&&$r(x)};document.addEventListener("focusin",N),document.addEventListener("focusout",w);const k=new MutationObserver(D);return x&&k.observe(x,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",N),document.removeEventListener("focusout",w),k.disconnect()}}},[l,x,j.paused]),f.useEffect(()=>{if(x){oj.add(j);const N=document.activeElement;if(!x.contains(N)){const D=new CustomEvent(Lf,rj);x.addEventListener(Lf,g),x.dispatchEvent(D),D.defaultPrevented||(wL(ML(MC(x)),{select:!0}),document.activeElement===N&&$r(x))}return()=>{x.removeEventListener(Lf,g),setTimeout(()=>{const D=new CustomEvent(kf,rj);x.addEventListener(kf,b),x.dispatchEvent(D),D.defaultPrevented||$r(N??document.body,{select:!0}),x.removeEventListener(kf,b),oj.remove(j)},0)}}},[x,g,b,j]);const S=f.useCallback(N=>{if(!r&&!l||j.paused)return;const w=N.key==="Tab"&&!N.altKey&&!N.ctrlKey&&!N.metaKey,D=document.activeElement;if(w&&D){const k=N.currentTarget,[A,_]=AL(k);A&&_?!N.shiftKey&&D===_?(N.preventDefault(),r&&$r(A,{select:!0})):N.shiftKey&&D===A&&(N.preventDefault(),r&&$r(_,{select:!0})):D===k&&N.preventDefault()}},[r,l,j.paused]);return e.jsx(Qe.div,{tabIndex:-1,...u,ref:y,onKeyDown:S})});Zi.displayName=CL;function wL(t,{select:s=!1}={}){const r=document.activeElement;for(const l of t)if($r(l,{select:s}),document.activeElement!==r)return}function AL(t){const s=MC(t),r=lj(s,t),l=lj(s.reverse(),t);return[r,l]}function MC(t){const s=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:l=>{const c=l.tagName==="INPUT"&&l.type==="hidden";return l.disabled||l.hidden||c?NodeFilter.FILTER_SKIP:l.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)s.push(r.currentNode);return s}function lj(t,s){for(const r of t)if(!SL(r,{upTo:s}))return r}function SL(t,{upTo:s}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(s!==void 0&&t===s)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function EL(t){return t instanceof HTMLInputElement&&"select"in t}function $r(t,{select:s=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&EL(t)&&s&&t.select()}}var oj=DL();function DL(){let t=[];return{add(s){const r=t[0];s!==r&&r?.pause(),t=cj(t,s),t.unshift(s)},remove(s){t=cj(t,s),t[0]?.resume()}}}function cj(t,s){const r=[...t],l=r.indexOf(s);return l!==-1&&r.splice(l,1),r}function ML(t){return t.filter(s=>s.tagName!=="A")}var Rf="rovingFocusGroup.onEntryFocus",LL={bubbles:!1,cancelable:!0},Ji="RovingFocusGroup",[zg,LC,kL]=Ah(Ji),[RL,Ux]=zs(Ji,[kL]),[TL,_L]=RL(Ji),kC=f.forwardRef((t,s)=>e.jsx(zg.Provider,{scope:t.__scopeRovingFocusGroup,children:e.jsx(zg.Slot,{scope:t.__scopeRovingFocusGroup,children:e.jsx(OL,{...t,ref:s})})}));kC.displayName=Ji;var OL=f.forwardRef((t,s)=>{const{__scopeRovingFocusGroup:r,orientation:l,loop:c=!1,dir:d,currentTabStopId:u,defaultCurrentTabStopId:x,onCurrentTabStopIdChange:p,onEntryFocus:g,preventScrollOnEntryFocus:b=!1,...v}=t,y=f.useRef(null),j=st(s,y),S=Xi(d),[N,w]=nl({prop:u,defaultProp:x??null,onChange:p,caller:Ji}),[D,k]=f.useState(!1),A=La(g),_=LC(r),E=f.useRef(!1),[I,R]=f.useState(0);return f.useEffect(()=>{const z=y.current;if(z)return z.addEventListener(Rf,A),()=>z.removeEventListener(Rf,A)},[A]),e.jsx(TL,{scope:r,orientation:l,dir:S,loop:c,currentTabStopId:N,onItemFocus:f.useCallback(z=>w(z),[w]),onItemShiftTab:f.useCallback(()=>k(!0),[]),onFocusableItemAdd:f.useCallback(()=>R(z=>z+1),[]),onFocusableItemRemove:f.useCallback(()=>R(z=>z-1),[]),children:e.jsx(Qe.div,{tabIndex:D||I===0?-1:0,"data-orientation":l,...v,ref:j,style:{outline:"none",...t.style},onMouseDown:Ae(t.onMouseDown,()=>{E.current=!0}),onFocus:Ae(t.onFocus,z=>{const U=!E.current;if(z.target===z.currentTarget&&U&&!D){const B=new CustomEvent(Rf,LL);if(z.currentTarget.dispatchEvent(B),!B.defaultPrevented){const F=_().filter(M=>
vendor: 9,007 bytes, lines 587-602
587M.focusable),V=F.find(M=>M.active),de=F.find(M=>M.id===N),xe=[V,de,...F].filter(Boolean).map(M=>M.ref.current);_C(xe,b)}}E.current=!1}),onBlur:Ae(t.onBlur,()=>k(!1))})})}),RC="RovingFocusGroupItem",TC=f.forwardRef((t,s)=>{const{__scopeRovingFocusGroup:r,focusable:l=!0,active:c=!1,tabStopId:d,children:u,...x}=t,p=Xs(),g=d||p,b=_L(RC,r),v=b.currentTabStopId===g,y=LC(r),{onFocusableItemAdd:j,onFocusableItemRemove:S,currentTabStopId:N}=b;return f.useEffect(()=>{if(l)return j(),()=>S()},[l,j,S]),e.jsx(zg.ItemSlot,{scope:r,id:g,focusable:l,active:c,children:e.jsx(Qe.span,{tabIndex:v?0:-1,"data-orientation":b.orientation,...x,ref:s,onMouseDown:Ae(t.onMouseDown,w=>{l?b.onItemFocus(g):w.preventDefault()}),onFocus:Ae(t.onFocus,()=>b.onItemFocus(g)),onKeyDown:Ae(t.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){b.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const D=UL(w,b.orientation,b.dir);if(D!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let A=y().filter(_=>_.focusable).map(_=>_.ref.current);if(D==="last")A.reverse();else if(D==="prev"||D==="next"){D==="prev"&&A.reverse();const _=A.indexOf(w.currentTarget);A=b.loop?IL(A,_+1):A.slice(_+1)}setTimeout(()=>_C(A))}}),children:typeof u=="function"?u({isCurrentTabStop:v,hasTabStop:N!=null}):u})})});TC.displayName=RC;var PL={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function zL(t,s){return s!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function UL(t,s,r){const l=zL(t.key,r);if(!(s==="vertical"&&["ArrowLeft","ArrowRight"].includes(l))&&!(s==="horizontal"&&["ArrowUp","ArrowDown"].includes(l)))return PL[l]}function _C(t,s=!1){const r=document.activeElement;for(const l of t)if(l===r||(l.focus({preventScroll:s}),document.activeElement!==r))return}function IL(t,s){return t.map((r,l)=>t[(s+l)%t.length])}var OC=kC,PC=TC,BL=function(t){if(typeof document>"u")return null;var s=Array.isArray(t)?t[0]:t;return s.ownerDocument.body},$o=new WeakMap,Su=new WeakMap,Eu={},Tf=0,zC=function(t){return t&&(t.host||zC(t.parentNode))},FL=function(t,s){return s.map(function(r){if(t.contains(r))return r;var l=zC(r);return l&&t.contains(l)?l:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return!!r})},HL=function(t,s,r,l){var c=FL(s,Array.isArray(t)?t:[t]);Eu[r]||(Eu[r]=new WeakMap);var d=Eu[r],u=[],x=new Set,p=new Set(c),g=function(v){!v||x.has(v)||(x.add(v),g(v.parentNode))};c.forEach(g);var b=function(v){!v||p.has(v)||Array.prototype.forEach.call(v.children,function(y){if(x.has(y))b(y);else try{var j=y.getAttribute(l),S=j!==null&&j!=="false",N=($o.get(y)||0)+1,w=(d.get(y)||0)+1;$o.set(y,N),d.set(y,w),u.push(y),N===1&&S&&Su.set(y,!0),w===1&&y.setAttribute(r,"true"),S||y.setAttribute(l,"true")}catch(D){console.error("aria-hidden: cannot operate on ",y,D)}})};return b(s),x.clear(),Tf++,function(){u.forEach(function(v){var y=$o.get(v)-1,j=d.get(v)-1;$o.set(v,y),d.set(v,j),y||(Su.has(v)||v.removeAttribute(l),Su.delete(v)),j||v.removeAttribute(r)}),Tf--,Tf||($o=new WeakMap,$o=new WeakMap,Su=new WeakMap,Eu={})}},Ix=function(t,s,r){r===void 0&&(r="data-aria-hidden");var l=Array.from(Array.isArray(t)?t:[t]),c=BL(t);return c?(l.push.apply(l,Array.from(c.querySelectorAll("[aria-live], script"))),HL(l,c,r,"aria-hidden")):function(){return null}},Mn=function(){return Mn=Object.assign||function(s){for(var r,l=1,c=arguments.length;l<c;l++){r=arguments[l];for(var d in r)Object.prototype.hasOwnProperty.call(r,d)&&(s[d]=r[d])}return s},Mn.apply(this,arguments)};function UC(t,s){var r={};for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&s.indexOf(l)<0&&(r[l]=t[l]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,l=Object.getOwnPropertySymbols(t);c<l.length;c++)s.indexOf(l[c])<0&&Object.prototype.propertyIsEnumerable.call(t,l[c])&&(r[l[c]]=t[l[c]]);return r}function qL(t,s,r){if(r||arguments.length===2)for(var l=0,c=s.length,d;l<c;l++)(d||!(l in s))&&(d||(d=Array.prototype.slice.call(s,0,l)),d[l]=s[l]);return t.concat(d||Array.prototype.slice.call(s))}var Hu="right-scroll-bar-position",qu="width-before-scroll-bar",$L="with-scroll-bars-hidden",WL="--removed-body-scroll-bar-size";function _f(t,s){return typeof t=="function"?t(s):t&&(t.current=s),t}function QL(t,s){var r=f.useState(function(){return{value:t,callback:s,facade:{get current(){return r.value},set current(l){var c=r.value;c!==l&&(r.value=l,r.callback(l,c))}}}})[0];return r.callback=s,r.facade}var GL=typeof window<"u"?f.useLayoutEffect:f.useEffect,ij=new WeakMap;function VL(t,s){var r=QL(null,function(l){return t.forEach(function(c){return _f(c,l)})});return GL(function(){var l=ij.get(r);if(l){var c=new Set(l),d=new Set(t),u=r.current;c.forEach(function(x){d.has(x)||_f(x,null)}),d.forEach(function(x){c.has(x)||_f(x,u)})}ij.set(r,t)},[t]),r}function KL(t){return t}function YL(t,s){s===void 0&&(s=KL);var r=[],l=!1,c={read:function(){if(l)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=s(d,l);return r.push(u),function(){r=r.filter(function(x){return x!==u})}},assignSyncMedium:function(d){for(l=!0;r.length;){var u=r;r=[],u.forEach(d)}r={push:function(x){return d(x)},filter:function(){return r}}},assignMedium:function(d){l=!0;var u=[];if(r.length){var x=r;r=[],x.forEach(d),u=r}var p=function(){var b=u;u=[],b.forEach(d)},g=function(){return Promise.resolve().then(p)};g(),r={push:function(b){u.push(b),g()},filter:function(b){return u=u.filter(b),r}}}};return c}function XL(t){t===void 0&&(t={});var s=YL(null);return s.options=Mn({async:!0,ssr:!1},t),s}var IC=function(t){var s=t.sideCar,r=UC(t,["sideCar"]);if(!s)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var l=s.read();if(!l)throw new Error("Sidecar medium not found");return f.createElement(l,Mn({},r))};IC.isSideCarExport=!0;function ZL(t,s){return t.useMedium(s),IC}var BC=XL(),Of=function(){},Bx=f.forwardRef(function(t,s){var r=f.useRef(null),l=f.useState({onScrollCapture:Of,onWheelCapture:Of,onTouchMoveCapture:Of}),c=l[0],d=l[1],u=t.forwardProps,x=t.children,p=t.className,g=t.removeScrollBar,b=t.enabled,v=t.shards,y=t.sideCar,j=t.noRelative,S=t.noIsolation,N=t.inert,w=t.allowPinchZoom,D=t.as,k=D===void 0?"div":D,A=t.gapMode,_=UC(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=y,I=VL([r,s]),R=Mn(Mn({},_),c);return f.createElement(f.Fragment,null,b&&f.createElement(E,{sideCar:BC,removeScrollBar:g,shards:v,noRelative:j,noIsolation:S,inert:N,setCallbacks:d,allowPinchZoom:!!w,lockRef:r,gapMode:A}),u?f.cloneElement(f.Children.only(x),Mn(Mn({},R),{ref:I})):f.createElement(k,Mn({},R,{className:p,ref:I}),x))});Bx.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Bx.classNames={fullWidth:qu,zeroRight:Hu};var JL=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ek(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var s=JL();return s&&t.setAttribute("nonce",s),t}function tk(t,s){t.styleSheet?t.styleSheet.cssText=s:t.appendChild(document.createTextNode(s))}function ak(t){var s=document.head||document.getElementsByTagName("head")[0];s.appendChild(t)}var sk=function(){var t=0,s=null;return{add:function(r){t==0&&(s=ek())&&(tk(s,r),ak(s)),t++},remove:function(){t--,!t&&s&&(s.parentNode&&s.parentNode.removeChild(s),s=null)}}},nk=function(){var t=sk();return function(s,r){f.useEffect(function(){return t.add(s),function(){t.remove()}},[s&&r])}},FC=function(){var t=nk(),s=function(r){var l=r.styles,c=r.dynamic;return t(l,c),null};return s},rk={left:0,top:0,right:0,gap:0},Pf=function(t){return parseInt(t||"",10)||0},lk=function(t){var s=window.getComputedStyle(document.body),r=s[t==="padding"?"paddingLeft":"marginLeft"],l=s[t==="padding"?"paddingTop":"marginTop"],c=s[t==="padding"?"paddingRight":"marginRight"];return[Pf(r),Pf(l),Pf(c)]},ok=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return rk;var s=lk(t),r=document.documentElement.clientWidth,l=window.innerWidth;return{left:s[0],top:s[1],right:s[2],gap:Math.max(0,l-r+s[2]-s[0])}},ck=FC(),Xo="data-scroll-locked",ik=function(t,s,r,l){var c=t.left,d=t.top,u=t.right,x=t.gap;return r===void 0&&(r="margin"),` 588 .`.concat($L,` { 589 overflow: hidden `).concat(l,`; 590 padding-right: `).concat(x,"px ").concat(l,`; 591 } 592 body[`).concat(Xo,`] { 593 overflow: hidden `).concat(l,`; 594 overscroll-behavior: contain; 595 `).concat([s&&"position: relative ".concat(l,";"),r==="margin"&&` 596 padding-left: `.concat(c,`px; 597 padding-top: `).concat(d,`px; 598 padding-right: `).concat(u,`px; 599 margin-left:0; 600 margin-top:0; 601 margin-right: `).concat(x,"px ").concat(l,`; 602 `),r==="padding"&&"padding-right: ".concat(x,"px ").concat(l,";
602")].filter(Boolean).join(""),` 603 } 604 605 .`).concat(Hu,` { 606 right: `).concat(x,"px ").concat(l,`; 607 } 608 609 .`).concat(qu,` { 610 margin-right: `).concat(x,"px ").concat(l,`; 611 } 612 613 .`).concat(Hu," .").concat(Hu,` { 614 right: 0 `).concat(l,`; 615 } 616 617 .`).concat(qu," .").concat(qu,` { 618 margin-right: 0 `).concat(l,`; 619 } 620 621 body[`).concat(Xo,`] { 622 `).concat(WL,": ").concat(x,`px; 623 } 624`)},dj=function(){var t=parseInt(document.body.getAttribute(Xo)||"0",10);return isFinite(t)?t:0},dk=function(){f.useEffect(function(){return document.body.setAttribute(Xo,(dj()+1).toString()),function(){var t=dj()-1;t<=0?document.body.removeAttribute(Xo):document.body.setAttribute(Xo,t.toString())}},[])},uk=function(t){var s=t.noRelative,r=t.noImportant,l=t.gapMode,c=l===void 0?"margin":l;dk();var d=f.useMemo(function(){return ok(c)},[c]);return f.createElement(ck,{styles:ik(d,!s,c,r?"":"!important")})},Ug=!1;if(typeof window<"u")try{var Du=Object.defineProperty({},"passive",{get:function(){return Ug=!0,!0}});window.addEventListener("test",Du,Du),window.removeEventListener("test",Du,Du)}catch{Ug=!1}var Wo=Ug?{passive:!1}:!1,xk=function(t){return t.tagName==="TEXTAREA"},HC=function(t,s){if(!(t instanceof Element))return!1;var r=window.getComputedStyle(t);return r[s]!=="hidden"&&!(r.overflowY===r.overflowX&&!xk(t)&&r[s]==="visible")},pk=function(t){return HC(t,"overflowY")},mk=function(t){return HC(t,"overflowX")},uj=function(t,s){var r=s.ownerDocument,l=s;do{typeof ShadowRoot<"u"&&l instanceof ShadowRoot&&(l=l.host);var c=qC(t,l);if(c){var d=$C(t,l),u=d[1],x=d[2];if(u>x)return!0}l=l.parentNode}while(l&&l!==r.body);return!1},fk=function(t){var s=t.scrollTop,r=t.scrollHeight,l=t.clientHeight;return[s,r,l]},gk=function(t){var s=t.scrollLeft,r=t.scrollWidth,l=t.clientWidth;return[s,r,l]},qC=function(t,s){return t==="v"?pk(s):mk(s)},$C=function(t,s){return t==="v"?fk(s):gk(s)},hk=function(t,s){return t==="h"&&s==="rtl"?-1:1},vk=function(t,s,r,l,c){var d=hk(t,window.getComputedStyle(s).direction),u=d*l,x=r.target,p=s.contains(x),g=!1,b=u>0,v=0,y=0;do{if(!x)break;var j=$C(t,x),S=j[0],N=j[1],w=j[2],D=N-w-d*S;(S||D)&&qC(t,x)&&(v+=D,y+=S);var k=x.parentNode;x=k&&k.nodeType===Node.DOCUMENT_FRAGMENT_NODE?k.host:k}while(!p&&x!==document.body||p&&(s.contains(x)||s===x));return(b&&Math.abs(v)<1||!b&&Math.abs(y)<1)&&(g=!0),g},Mu=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},xj=function(t){return[t.deltaX,t.deltaY]},pj=function(t){return t&&"current"in t?t.current:t},bk=function(t,s){return t[0]===s[0]&&t[1]===s[1]},yk=function(t){return` 625 .block-interactivity-`.concat(t,` {pointer-events: none;} 626 .allow-interactivity-`).concat(t,` {pointer-events: all;} 627`)},jk=0,Qo=[];function Nk(t){var s=f.useRef([]),r=f.useRef([0,0]),l=f.useRef(),c=f.useState(jk++)[0],d=f.useState(FC)[0],u=f.useRef(t);f.useEffect(function(){u.current=t},[t]),f.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(c));var N=qL([t.lockRef.current],(t.shards||[]).map(pj),!0).filter(Boolean);return N.forEach(function(w){return w.classList.add("allow-interactivity-".concat(c))}),function(){document.body.classList.remove("block-interactivity-".concat(c)),N.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(c))})}}},[t.inert,t.lockRef.current,t.shards]);var x=f.useCallback(function(N,w){if("touches"in N&&N.touches.length===2||N.type==="wheel"&&N.ctrlKey)return!u.current.allowPinchZoom;var D=Mu(N),k=r.current,A="deltaX"in N?N.deltaX:k[0]-D[0],_="deltaY"in N?N.deltaY:k[1]-D[1],E,I=N.target,R=Math.abs(A)>Math.abs(_)?"h":"v";if("touches"in N&&R==="h"&&I.type==="range")return!1;var z=uj(R,I);if(!z)return!0;if(z?E=R:(E=R==="v"?"h":"v",z=uj(R,I)),!z)return!1;if(!l.current&&"changedTouches"in N&&(A||_)&&(l.current=E),!E)return!0;var U=l.current||E;return vk(U,w,N,U==="h"?A:_)},[]),p=f.useCallback(function(N){var w=N;if(!(!Qo.length||Qo[Qo.length-1]!==d)){var D="deltaY"in w?xj(w):Mu(w),k=s.current.filter(function(E){return E.name===w.type&&(E.target===w.target||w.target===E.shadowParent)&&bk(E.delta,D)})[0];if(k&&k.should){w.cancelable&&w.preventDefault();return}
vendor: 19,073 bytes, line 627
627if(!k){var A=(u.current.shards||[]).map(pj).filter(Boolean).filter(function(E){return E.contains(w.target)}),_=A.length>0?x(w,A[0]):!u.current.noIsolation;_&&w.cancelable&&w.preventDefault()}}},[]),g=f.useCallback(function(N,w,D,k){var A={name:N,delta:w,target:D,should:k,shadowParent:Ck(D)};s.current.push(A),setTimeout(function(){s.current=s.current.filter(function(_){return _!==A})},1)},[]),b=f.useCallback(function(N){r.current=Mu(N),l.current=void 0},[]),v=f.useCallback(function(N){g(N.type,xj(N),N.target,x(N,t.lockRef.current))},[]),y=f.useCallback(function(N){g(N.type,Mu(N),N.target,x(N,t.lockRef.current))},[]);f.useEffect(function(){return Qo.push(d),t.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:y}),document.addEventListener("wheel",p,Wo),document.addEventListener("touchmove",p,Wo),document.addEventListener("touchstart",b,Wo),function(){Qo=Qo.filter(function(N){return N!==d}),document.removeEventListener("wheel",p,Wo),document.removeEventListener("touchmove",p,Wo),document.removeEventListener("touchstart",b,Wo)}},[]);var j=t.removeScrollBar,S=t.inert;return f.createElement(f.Fragment,null,S?f.createElement(d,{styles:yk(c)}):null,j?f.createElement(uk,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function Ck(t){for(var s=null;t!==null;)t instanceof ShadowRoot&&(s=t.host,t=t.host),t=t.parentNode;return s}const wk=ZL(BC,Nk);var ed=f.forwardRef(function(t,s){return f.createElement(Bx,Mn({},t,{ref:s,sideCar:wk}))});ed.classNames=Bx.classNames;var Ig=["Enter"," "],Ak=["ArrowDown","PageUp","Home"],WC=["ArrowUp","PageDown","End"],Sk=[...Ak,...WC],Ek={ltr:[...Ig,"ArrowRight"],rtl:[...Ig,"ArrowLeft"]},Dk={ltr:["ArrowLeft"],rtl:["ArrowRight"]},td="Menu",[Ri,Mk,Lk]=Ah(td),[no,QC]=zs(td,[Lk,ll,Ux]),Fx=ll(),GC=Ux(),[kk,ro]=no(td),[Rk,ad]=no(td),VC=t=>{const{__scopeMenu:s,open:r=!1,children:l,dir:c,onOpenChange:d,modal:u=!0}=t,x=Fx(s),[p,g]=f.useState(null),b=f.useRef(!1),v=La(d),y=Xi(c);return f.useEffect(()=>{const j=()=>{b.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},S=()=>b.current=!1;return document.addEventListener("keydown",j,{capture:!0}),()=>{document.removeEventListener("keydown",j,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),e.jsx(Mx,{...x,children:e.jsx(kk,{scope:s,open:r,onOpenChange:v,content:p,onContentChange:g,children:e.jsx(Rk,{scope:s,onClose:f.useCallback(()=>v(!1),[v]),isUsingKeyboardRef:b,dir:y,modal:u,children:l})})})};VC.displayName=td;var Tk="MenuAnchor",Sh=f.forwardRef((t,s)=>{const{__scopeMenu:r,...l}=t,c=Fx(r);return e.jsx($i,{...c,...l,ref:s})});Sh.displayName=Tk;var Eh="MenuPortal",[_k,KC]=no(Eh,{forceMount:void 0}),YC=t=>{const{__scopeMenu:s,forceMount:r,children:l,container:c}=t,d=ro(Eh,s);return e.jsx(_k,{scope:s,forceMount:r,children:e.jsx(Fa,{present:r||d.open,children:e.jsx(uc,{asChild:!0,container:c,children:l})})})};YC.displayName=Eh;var Zs="MenuContent",[Ok,Dh]=no(Zs),XC=f.forwardRef((t,s)=>{const r=KC(Zs,t.__scopeMenu),{forceMount:l=r.forceMount,...c}=t,d=ro(Zs,t.__scopeMenu),u=ad(Zs,t.__scopeMenu);return e.jsx(Ri.Provider,{scope:t.__scopeMenu,children:e.jsx(Fa,{present:l||d.open,children:e.jsx(Ri.Slot,{scope:t.__scopeMenu,children:u.modal?e.jsx(Pk,{...c,ref:s}):e.jsx(zk,{...c,ref:s})})})})}),Pk=f.forwardRef((t,s)=>{const r=ro(Zs,t.__scopeMenu),l=f.useRef(null),c=st(s,l);return f.useEffect(()=>{const d=l.current;if(d)return Ix(d)},[]),e.jsx(Mh,{...t,ref:c,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:Ae(t.onFocusOutside,d=>d.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),zk=f.forwardRef((t,s)=>{const r=ro(Zs,t.__scopeMenu);return e.jsx(Mh,{...t,ref:s,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),Uk=tl("MenuContent.ScrollLock"),Mh=f.forwardRef((t,s)=>{const{__scopeMenu:r,loop:l=!1,trapFocus:c,onOpenAutoFocus:d,onCloseAutoFocus:u,disableOutsidePointerEvents:x,onEntryFocus:p,onEscapeKeyDown:g,onPointerDownOutside:b,onFocusOutside:v,onInteractOutside:y,onDismiss:j,disableOutsideScroll:S,...N}=t,w=ro(Zs,r),D=ad(Zs,r),k=Fx(r),A=GC(r),_=Mk(r),[E,I]=f.useState(null),R=f.useRef(null),z=st(s,R,w.onContentChange),U=f.useRef(0),B=f.useRef(""),F=f.useRef(0),V=f.useRef(null),de=f.useRef("right"),le=f.useRef(0),xe=S?ed:f.Fragment,M=S?{as:Uk,allowPinchZoom:!0}:void 0,O=K=>{const ve=B.current+K,P=_().filter(ae=>!ae.disabled),J=document.activeElement,W=P.find(ae=>ae.ref.current===J)?.textValue,H=P.map(ae=>ae.textValue),te=Yk(H,ve,W),pe=P.find(ae=>ae.textValue===te)?.ref.current;(function ae(Ne){B.current=Ne,window.clearTimeout(U.current),Ne!==""&&(U.current=window.setTimeout(()=>ae(""),1e3))})(ve),pe&&setTimeout(()=>pe.focus())};f.useEffect(()=>()=>window.clearTimeout(U.current),[]),zx();const T=f.useCallback(K=>de.current===V.current?.side&&Zk(K,V.current?.area),[]);return e.jsx(Ok,{scope:r,searchRef:B,onItemEnter:f.useCallback(K=>{T(K)&&K.preventDefault()},[T]),onItemLeave:f.useCallback(K=>{T(K)||(R.current?.focus(),I(null))},[T]),onTriggerLeave:f.useCallback(K=>{T(K)&&K.preventDefault()},[T]),pointerGraceTimerRef:F,onPointerGraceIntentChange:f.useCallback(K=>{V.current=K},[]),children:e.jsx(xe,{...M,children:e.jsx(Zi,{asChild:!0,trapped:c,onMountAutoFocus:Ae(d,K=>{K.preventDefault(),R.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:u,children:e.jsx(cc,{asChild:!0,disableOutsidePointerEvents:x,onEscapeKeyDown:g,onPointerDownOutside:b,onFocusOutside:v,onInteractOutside:y,onDismiss:j,children:e.jsx(OC,{asChild:!0,...A,dir:D.dir,orientation:"vertical",loop:l,currentTabStopId:E,onCurrentTabStopIdChange:I,onEntryFocus:Ae(p,K=>{D.isUsingKeyboardRef.current||K.preventDefault()}),preventScrollOnEntryFocus:!0,children:e.jsx(Lx,{role:"menu","aria-orientation":"vertical","data-state":pw(w.open),"data-radix-menu-content":"",dir:D.dir,...k,...N,ref:z,style:{outline:"none",...N.style},onKeyDown:Ae(N.onKeyDown,K=>{const P=K.target.closest("[data-radix-menu-content]")===K.currentTarget,J=K.ctrlKey||K.altKey||K.metaKey,W=K.key.length===1;P&&(K.key==="Tab"&&K.preventDefault(),!J&&W&&O(K.key));const H=R.current;if(K.target!==H||!Sk.includes(K.key))return;K.preventDefault();const pe=_().filter(ae=>!ae.disabled).map(ae=>ae.ref.current);WC.includes(K.key)&&pe.reverse(),Vk(pe)}),onBlur:Ae(t.onBlur,K=>{K.currentTarget.contains(K.target)||(window.clearTimeout(U.current),B.current="")}),onPointerMove:Ae(t.onPointerMove,Ti(K=>{const ve=K.target,P=le.current!==K.clientX;if(K.currentTarget.contains(ve)&&P){const J=K.clientX>le.current?"right":"left";de.current=J,le.current=K.clientX}}))})})})})})})});XC.displayName=Zs;var Ik="MenuGroup",Lh=f.forwardRef((t,s)=>{const{__scopeMenu:r,...l}=t;return e.jsx(Qe.div,{role:"group",...l,ref:s})});Lh.displayName=Ik;var Bk="MenuLabel",ZC=f.forwardRef((t,s)=>{const{__scopeMenu:r,...l}=t;return e.jsx(Qe.div,{...l,ref:s})});ZC.displayName=Bk;var ax="MenuItem",mj="menu.itemSelect",Hx=f.forwardRef((t,s)=>{const{disabled:r=!1,onSelect:l,...c}=t,d=f.useRef(null),u=ad(ax,t.__scopeMenu),x=Dh(ax,t.__scopeMenu),p=st(s,d),g=f.useRef(!1),b=()=>{const v=d.current;if(!r&&v){const y=new CustomEvent(mj,{bubbles:!0,cancelable:!0});v.addEventListener(mj,j=>l?.(j),{once:!0}),iN(v,y),y.defaultPrevented?g.current=!1:u.onClose()}};return e.jsx(JC,{...c,ref:p,disabled:r,onClick:Ae(t.onClick,b),onPointerDown:v=>{t.onPointerDown?.(v),g.current=!0},onPointerUp:Ae(t.onPointerUp,v=>{g.current||v.currentTarget?.click()}),onKeyDown:Ae(t.onKeyDown,v=>{const y=x.searchRef.current!=="";r||y&&v.key===" "||Ig.includes(v.key)&&(v.currentTarget.click(),v.preventDefault())})})});Hx.displayName=ax;var JC=f.forwardRef((t,s)=>{const{__scopeMenu:r,disabled:l=!1,textValue:c,...d}=t,u=Dh(ax,r),x=GC(r),p=f.useRef(null),g=st(s,p),[b,v]=f.useState(!1),[y,j]=f.useState("");return f.useEffect(()=>{const S=p.current;S&&j((S.textContent??"").trim())},[d.children]),e.jsx(Ri.ItemSlot,{scope:r,disabled:l,textValue:c??y,children:e.jsx(PC,{asChild:!0,...x,focusable:!l,children:e.jsx(Qe.div,{role:"menuitem","data-highlighted":b?"":void 0,"aria-disabled":l||void 0,"data-disabled":l?"":void 0,...d,ref:g,onPointerMove:Ae(t.onPointerMove,Ti(S=>{l?u.onItemLeave(S):(u.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Ae(t.onPointerLeave,Ti(S=>u.onItemLeave(S))),onFocus:Ae(t.onFocus,()=>v(!0)),onBlur:Ae(t.onBlur,()=>v(!1))})})})}),Fk="MenuCheckboxItem",ew=f.forwardRef((t,s)=>{const{checked:r=!1,onCheckedChange:l,...c}=t;return e.jsx(rw,{scope:t.__scopeMenu,checked:r,children:e.jsx(Hx,{role:"menuitemcheckbox","aria-checked":sx(r)?"mixed":r,...c,ref:s,"data-state":Rh(r),onSelect:Ae(c.onSelect,()=>l?.(sx(r)?!0:!r),{checkForDefaultPrevented:!1})})})});ew.displayName=Fk;var tw="MenuRadioGroup",[Hk,qk]=no(tw,{value:void 0,onValueChange:()=>{}}),aw=f.forwardRef((t,s)=>{const{value:r,onValueChange:l,...c}=t,d=La(l);return e.jsx(Hk,{scope:t.__scopeMenu,value:r,onValueChange:d,children:e.jsx(Lh,{...c,ref:s})})});aw.displayName=tw;var sw="MenuRadioItem",nw=f.forwardRef((t,s)=>{const{value:r,...l}=t,c=qk(sw,t.__scopeMenu),d=r===c.value;return e.jsx(rw,{scope:t.__scopeMenu,checked:d,children:e.jsx(Hx,{role:"menuitemradio","aria-checked":d,...l,ref:s,"data-state":Rh(d),onSelect:Ae(l.onSelect,()=>c.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});nw.displayName=sw;var kh="MenuItemIndicator",[rw,$k]=no(kh,{checked:!1}),lw=f.forwardRef((t,s)=>{const{__scopeMenu:r,forceMount:l,...c}=t,d=$k(kh,r);return e.jsx(Fa,{present:l||sx(d.checked)||d.checked===!0,children:e.jsx(Qe.span,{...c,ref:s,"data-state":Rh(d.checked)})})});lw.displayName=kh;var Wk="MenuSeparator",ow=f.forwardRef((t,s)=>{const{__scopeMenu:r,...l}=t;return e.jsx(Qe.div,{role:"separator","aria-orientation":"horizontal",...l,ref:s})});ow.displayName=Wk;var Qk="MenuArrow",cw=f.forwardRef((t,s)=>{const{__scopeMenu:r,...l}=t,c=Fx(r);return e.jsx(kx,{...c,...l,ref:s})});cw.displayName=Qk;var Gk="MenuSub",[Wz,iw]=no(Gk),pi="MenuSubTrigger",dw=f.forwardRef((t,s)=>{const r=ro(pi,t.__scopeMenu),l=ad(pi,t.__scopeMenu),c=iw(pi,t.__scopeMenu),d=Dh(pi,t.__scopeMenu),u=f.useRef(null),{pointerGraceTimerRef:x,onPointerGraceIntentChange:p}=d,g={__scopeMenu:t.__scopeMenu},b=f.useCallback(()=>{u.current&&window.clearTimeout(u.current),u.current=null},[]);return f.useEffect(()=>b,[b]),f.useEffect(()=>{const v=x.current;return()=>{window.clearTimeout(v),p(null)}},[x,p]),e.jsx(Sh,{asChild:!0,...g,children:e.jsx(JC,{id:c.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":c.contentId,"data-state":pw(r.open),...t,ref:wx(s,c.onTriggerChange),onClick:v=>{t.onClick?.(v),!(t.disabled||v.defaultPrevented)&&(v.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:Ae(t.onPointerMove,Ti(v=>{d.onItemEnter(v),!v.defaultPrevented&&!t.disabled&&!r.open&&!u.current&&(d.onPointerGraceIntentChange(null),u.current=window.setTimeout(()=>{r.onOpenChange(!0),b()},100))})),onPointerLeave:Ae(t.onPointerLeave,Ti(v=>{b();const y=r.content?.getBoundingClientRect();if(y){const j=r.content?.dataset.side,S=j==="right",N=S?-5:5,w=y[S?"left":"right"],D=y[S?"right":"left"];d.onPointerGraceIntentChange({area:[{x:v.clientX+N,y:v.clientY},{x:w,y:y.top},{x:D,y:y.top},{x:D,y:y.bottom},{x:w,y:y.bottom}],side:j}),window.clearTimeout(x.current),x.current=window.setTimeout(()=>d.onPointerGraceIntentChange(null),300)}else{if(d.onTriggerLeave(v),v.defaultPrevented)return;d.onPointerGraceIntentChange(null)}})),onKeyDown:Ae(t.onKeyDown,v=>{const y=d.searchRef.current!=="";t.disabled||y&&v.key===" "||Ek[l.dir].includes(v.key)&&(r.onOpenChange(!0),r.content?.focus(),v.preventDefault())})})})});dw.displayName=pi;var uw="MenuSubContent",xw=f.forwardRef((t,s)=>{const r=KC(Zs,t.__scopeMenu),{forceMount:l=r.forceMount,...c}=t,d=ro(Zs,t.__scopeMenu),u=ad(Zs,t.__scopeMenu),x=iw(uw,t.__scopeMenu),p=f.useRef(null),g=st(s,p);return e.jsx(Ri.Provider,{scope:t.__scopeMenu,children:e.jsx(Fa,{present:l||d.open,children:e.jsx(Ri.Slot,{scope:t.__scopeMenu,children:e.jsx(Mh,{id:x.contentId,"aria-labelledby":x.triggerId,...c,ref:g,align:"start",side:u.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:b=>{u.isUsingKeyboardRef.current&&p.current?.focus(),b.preventDefault()},onCloseAutoFocus:b=>b.preventDefault(),onFocusOutside:Ae(t.onFocusOutside,b=>{b.target!==x.trigger&&d.onOpenChange(!1)}),onEscapeKeyDown:Ae(t.onEscapeKeyDown,b=>{u.onClose(),b.preventDefault()}),onKeyDown:Ae(t.onKeyDown,b=>{const v=b.currentTarget.contains(b.target),y=Dk[u.dir].includes(b.key);v&&y&&(d.onOpenChange(!1),x.trigger?.focus(),b.preventDefault())})})})})})});xw.displayName=uw;function pw(t){return t?"open":"closed"}function sx(t){return t==="indeterminate"}function Rh(t){return sx(t)?"indeterminate":t?"checked":"unchecked"}function Vk(t){const s=document.activeElement;for(const r of t)if(r===s||(r.focus(),document.activeElement!==s))return}function Kk(t,s){return t.map((r,l)=>t[(s+l)%t.length])}function Yk(t,s,r){const c=s.length>1&&Array.from(s).every(g=>g===s[0])?s[0]:s,d=r?t.indexOf(r):-1;let u=Kk(t,Math.max(d,0));c.length===1&&(u=u.filter(g=>g!==r));const p=u.find(g=>g.toLowerCase().startsWith(c.toLowerCase()));return p!==r?p:void 0}function Xk(t,s){const{x:r,y:l}=t;let c=!1;for(let d=0,u=s.length-1;d<s.length;u=d++){const x=s[d],p=s[u],g=x.x,b=x.y,v=p.x,y=p.y;b>l!=y>l&&r<(v-g)*(l-b)/(y-b)+g&&(c=!c)}return c}function Zk(t,s){if(!s)return!1;const r={x:t.clientX,y:t.clientY};return Xk(r,s)}function Ti(t){return s=>s.pointerType==="mouse"?t(s):void 0}var Jk=VC,e9=Sh,t9=YC,a9=XC,s9=Lh,n9=ZC,r9=Hx,l9=ew,o9=aw,c9=nw,i9=lw,d9=ow,u9=cw,x9=dw,p9=xw,qx="DropdownMenu",[m9]=zs(qx,[QC]),Ja=QC(),[f9,mw]=m9(qx),fw=t=>{const{__scopeDropdownMenu:s,children:r,dir:l,open:c,defaultOpen:d,onOpenChange:u,modal:x=!0}=t,p=Ja(s),g=f.useRef(null),[b,v]=nl({prop:c,defaultProp:d??!1,onChange:u,caller:qx});return e.jsx(f9,{scope:s,triggerId:Xs(),triggerRef:g,contentId:Xs(),open:b,onOpenChange:v,onOpenToggle:f.useCallback(()=>v(y=>!y),[v]),modal:x,children:e.jsx(Jk,{...p,open:b,onOpenChange:v,dir:l,modal:x,children:r})})};fw.displayName=qx;var gw="DropdownMenuTrigger",hw=f.forwardRef((t,s)=>{const{__scopeDropdownMenu:r,disabled:l=!1,...c}=t,d=mw(gw,r),u=Ja(r);return e.jsx(e9,{asChild:!0,...u,children:e.jsx(Qe.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":l?"":void 0,disabled:l,...c,ref:wx(s,d.triggerRef),onPointerDown:Ae(t.onPointerDown,x=>{!l&&x.button===0&&x.ctrlKey===!1&&(d.onOpenToggle(),d.open||x.preventDefault())}),onKeyDown:Ae(t.onKeyDown,x=>{l||(["Enter"," "].includes(x.key)&&d.onOpenToggle(),x.key==="ArrowDown"&&d.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(x.key)&&x.preventDefault())})})})});hw.displayName=gw;var g9="DropdownMenuPortal",vw=t=>{const{__scopeDropdownMenu:s,...r}=t,l=Ja(s);return e.jsx(t9,{...l,...r})};vw.displayName=g9;var bw="DropdownMenuContent",yw=f.forwardRef((t,s)=>{const{__scopeDropdownMenu:r,...l}=t,c=mw(bw,r),d=Ja(r),u=f.useRef(!1);return e.jsx(a9,{id:c.contentId,"aria-labelledby":c.triggerId,...d,...l,ref:s,onCloseAutoFocus:Ae(t.onCloseAutoFocus,x=>{u.current||c.triggerRef.current?.focus(),u.current=!1,x.preventDefault()}),onInteractOutside:Ae(t.onInteractOutside,x=>{const p=x.detail.originalEvent,g=p.button===0&&p.ctrlKey===!0,b=p.button===2||g;(!c.modal||b)&&(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)"}})});yw.displayName=bw;var h9="DropdownMenuGroup",v9=f.forwardRef((t,s)=>{const{__scopeDropdownMenu:r,...l}=t,c=Ja(r);return e.jsx(s9,{...c,...l,ref:s})});v9.displayName=h9;var b9="DropdownMenuLabel",y9=f.forwardRef((t,s)=>{const{__scopeDropdownMenu:r,...l}=t,c=Ja(r);return e.jsx(n9,{...c,...l,ref:s})});y9.displayName=b9;var j9="DropdownMenuItem",jw=f.forwardRef((t,s)=>{const{__scopeDropdownMenu:r,...l}=t,c=Ja(r);return e.jsx(r9,{...c,...l,ref:s})});jw.displayName=j9;var N9="DropdownMenuCheckboxItem",C9=f.forwardRef((t,s)=>{const{__scopeDropdownMenu:r,...l}=t,c=Ja(r);return e.jsx(l9,{...c,...l,ref:s})});C9.displayName=N9;var w9="DropdownMenuRadioGroup",A9=f.forwardRef((t,s)=>{const{__scopeDropdownMenu:r,...l}=t,c=Ja(r);return e.jsx(o9,{...c,...l,ref:s})});A9.displayName=w9;var S9="DropdownMenuRadioItem",E9=f.forwardRef((t,s)=>{const{__scopeDropdownMenu:r,...l}=t,c=Ja(r);return e.jsx(c9,{...c,...l,ref:s})});E9.displayName=S9;var D9="DropdownMenuItemIndicator",M9=f.forwardRef((t,s)=>{const{__scopeDropdownMenu:r,...l}=t,c=Ja(r);return e.jsx(i9,{...c,...l,ref:s})});M9.displayName=D9;var L9="DropdownMenuSeparator",Nw=f.forwardRef((t,s)=>{const{__scopeDropdownMenu:r,...l}=t,c=Ja(r);return e.jsx(d9,{...c,...l,ref:s})});Nw.displayName=L9;var k9="DropdownMenuArrow",R9=f.forwardRef((t,s)=>{const{__scopeDropdownMenu:r,...l}=t,c=Ja(r);return e.jsx(u9,{...c,...l,ref:s})});R9.displayName=k9;var T9="DropdownMenuSubTrigger",_9=f.forwardRef((t,s)=>{const{__scopeDropdownMenu:r,...l}=t,c=Ja(r);return e.jsx(x9,{...c,...l,ref:s})});_9.displayName=T9;var O9="DropdownMenuSubContent",P9=f.forwardRef((t,s)=>{const{__scopeDropdownMenu:r,...l}=t,c=Ja(r);return e.jsx(p9,{...c,...l,ref:s,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)"}})});P9.displayName=O9;var z9=fw,U9=hw,I9=vw,B9=yw,F9=jw,H9=Nw;function _i({...t}){return e.jsx(z9,{"data-loc":"client/src/components/ui/dropdown-menu.tsx:10","data-slot":"dropdown-menu",...t})}function Oi({...t}){return e.jsx(U9,{"data-loc":"client/src/components/ui/dropdown-menu.tsx:25","data-slot":"dropdown-menu-trigger",...t})}function Pi({className:t,sideOffset:s=4,...r}){return e.jsx(I9,{"data-loc":"client/src/components/ui/dropdown-menu.tsx:38",children:e.jsx(B9,{"data-loc":"client/src/components/ui/dropdown-menu.tsx:39","data-slot":"dropdown-menu-content",sideOffset:s,className:Me("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
627de-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 ps({className:t,inset:s,variant:r="default",...l}){return e.jsx(F9,{"data-loc":"client/src/components/ui/dropdown-menu.tsx:70","data-slot":"dropdown-menu-item","data-inset":s,"data-variant":r,className:Me("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),...l})}function Th({className:t,...s}){return e.jsx(H9,{"data-loc":"client/src/components/ui/dropdown-menu.tsx:169","data-slot":"dropdown-menu-separator",className:Me("bg-border -mx-1 my-1 h-px",t),...s})}const zf=768;function q9(){const[t,s]=f.useState(void 0);return f.useEffect(()=>{const r=window.matchMedia(`(max-width: ${zf-1}px)`),l=()=>{s(window.innerWidth<zf)};return r.addEventListener("change",l),s(window.innerWidth<zf),()=>r.removeEventListener("change",l)},[]),!!t}const fj=7200*1e3,$9=60*1e3;function W9(t,s){const r=f.useRef(null),l=f.useRef(null),[c,d]=f.useState(!1),[u,x]=f.useState(60),p=f.useRef(null),g=f.useRef(t);g.current=t;const b=f.useCallback(()=>{r.current&&clearTimeout(r.current),l.current&&clearTimeout(l.current),p.current&&clearInterval(p.current),r.current=null,l.current=null,p.current=null},[]),v=f.useCallback(()=>{d(!0),x(60),p.current=setInterval(()=>{x(j=>j<=1?(p.current&&clearInterval(p.current),0):j-1)},1e3)},[]),y=f.useCallback(()=>{s&&(b(),d(!1),l.current=setTimeout(()=>{v()},fj-$9),r.current=setTimeout(()=>{b(),d(!1),g.current()},fj))},[s,b,v]);return f.useEffect(()=>{if(!s){b(),d(!1);return}const j=["mousemove","mousedown","keydown","scroll","touchstart","click"],S=()=>y();return j.forEach(N=>window.addEventListener(N,S,{passive:!0})),y(),()=>{j.forEach(N=>window.removeEventListener(N,S)),b()}},[s,y,b]),{showWarning:c,remainingSeconds:u,resetTimer:y}}function As({className:t,...s}){return e.jsx("div",{"data-loc":"client/src/components/ui/skeleton.tsx:5","data-slot":"skeleton",className:Me("bg-accent animate-pulse rounded-md",t),...s})}function gj(){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(As,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:10",className:"h-8 w-8 rounded-md"}),e.jsx(As,{"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(As,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:16",className:"h-10 w-full rounded-lg"}),e.jsx(As,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:17",className:"h-10 w-full rounded-lg"}),e.jsx(As,{"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(As,{"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(As,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:26",className:"h-3 w-20"}),e.jsx(As,{"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(As,{"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(As,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:38",className:"h-32 rounded-xl"}),e.jsx(As,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:39",className:"h-32 rounded-xl"}),e.jsx(As,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:40",className:"h-32 rounded-xl"})]}),e.jsx(As,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:42",className:"h-64 roun
627ded-xl"})]})]})}const Q9={lead_novo:e.jsx(bh,{"data-loc":"client/src/components/NotificationBell.tsx:10",className:"w-3.5 h-3.5 text-[#C9A96E]"}),tarefa_vencida:e.jsx(Ki,{"data-loc":"client/src/components/NotificationBell.tsx:11",className:"w-3.5 h-3.5 text-red-400"}),tarefa_hoje:e.jsx(Za,{"data-loc":"client/src/components/NotificationBell.tsx:12",className:"w-3.5 h-3.5 text-yellow-400"}),fila_roleta:e.jsx(Ka,{"data-loc":"client/src/components/NotificationBell.tsx:13",className:"w-3.5 h-3.5 text-emerald-400"}),atendimento_vencido:e.jsx(Tg,{"data-loc":"client/src/components/NotificationBell.tsx:14",className:"w-3.5 h-3.5 text-orange-400"})},G9={lead_novo:"bg-[#C9A96E]/15 border-[#C9A96E]/30",tarefa_vencida:"bg-red-500/10 border-red-500/20",tarefa_hoje:"bg-yellow-500/10 border-yellow-500/20",fila_roleta:"bg-emerald-500/10 border-emerald-500/20",atendimento_vencido:"bg-orange-500/10 border-orange-500/20"},V9={lead_novo:"Lead",tarefa_vencida:"Vencida",tarefa_hoje:"Hoje",fila_roleta:"Fila",atendimento_vencido:"Sem atualização"};function K9(t){const s=Date.now()-t,r=Math.floor(s/6e4);if(r<1)return"agora";if(r<60)return`${r}min`;const l=Math.floor(r/60);if(l<24)return`${l}h`;const c=Math.floor(l/24);return c<30?`${c}d`:`${Math.floor(c/30)}m`}function hj(){const[t,s]=f.useState(!1),r=f.useRef(null),l=Y.useUtils(),{data:c,refetch:d}=Y.notifications.getNotifications.useQuery(void 0,{refetchInterval:3e4,staleTime:15e3}),u=Y.notifications.markStaleRead.useMutation({onSuccess:()=>{l.notifications.getNotifications.invalidate()}}),x=c?.items??[],p=x.filter(y=>y.type!=="atendimento_vencido"),g=x.filter(y=>y.type==="atendimento_vencido"),b=c?.unread??0;f.useEffect(()=>{const y=new EventSource("/api/sse/notifications",{withCredentials:!0}),j=()=>l.notifications.getNotifications.invalidate();return y.addEventListener("new_lead",j),y.addEventListener("stale_lead",j),y.onerror=()=>{},()=>y.close()},[l]),f.useEffect(()=>{function y(j){r.current&&!r.current.contains(j.target)&&s(!1)}return t&&document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[t]);const v=(y,j)=>{y.preventDefault(),y.stopPropagation(),u.mutate({leadId:j})};return e.jsxs("div",{"data-loc":"client/src/components/NotificationBell.tsx:99",className:"relative",ref:r,children:[e.jsxs("button",{"data-loc":"client/src/components/NotificationBell.tsx:101",onClick:()=>{s(!t),t||d()},className:Me("relative flex items-center justify-center w-8 h-8 rounded-lg transition-colors","text-[#6B6B7A] hover:text-[#F2F2F3] hover:bg-[#1E1E22]",t&&"text-[#F2F2F3] bg-[#1E1E22]"),"aria-label":"Notificações",children:[e.jsx(Yo,{"data-loc":"client/src/components/NotificationBell.tsx:110",className:"w-4 h-4"}),b>0&&e.jsx("span",{"data-loc":"client/src/components/NotificationBell.tsx:112",className:"absolute -top-0.5 -right-0.5 min-w-[16px] h-4 px-0.5 flex items-center justify-center rounded-full bg-[#C9A96E] text-[#0A0A0B] text-[9px] font-bold leading-none",children:b>99?"99+":b})]}),t&&e.jsxs("div",{"data-loc":"client/src/components/NotificationBell.tsx:120",className:"absolute right-0 top-10 w-80 z-50 rounded-xl border border-[#1E1E22] bg-[#111113] shadow-2xl shadow-black/60 overflow-hidden",children:[e.jsxs("div",{"data-loc":"client/src/components/NotificationBell.tsx:122",className:"flex items-center justify-between px-4 py-3 border-b border-[#1E1E22]",children:[e.jsxs("div",{"data-loc":"client/src/components/NotificationBell.tsx:123",className:"flex items-center gap-2",children:[e.jsx(Yo,{"data-loc":"client/src/components/NotificationBell.tsx:124",className:"w-3.5 h-3.5 text-[#C9A96E]"}),e.jsx("span",{"data-loc":"client/src/components/NotificationBell.tsx:125",className:"text-xs font-semibold text-[#F2F2F3] uppercase tracking-wider",children:"Notificações"}),b>0&&e.jsx("span",{"data-loc":"client/src/components/NotificationBell.tsx:127",className:"px-1.5 py-0.5 rounded-full bg-[#C9A96E]/15 text-[#C9A96E] text-[10px] font-bold",children:b})]}),e.jsx("button",{"data-loc":"client/src/components/NotificationBell.tsx:132",onClick:()=>s(!1),className:"text-[#6B6B7A] hover:text-[#F2F2F3] transition-colors",children:e.jsx(va,{"data-loc":"client/src/components/NotificationBell.tsx:136",className:"w-3.5 h-3.5"})})]}),e.jsxs("div",{"data-loc":"client/src/components/NotificationBell.tsx:140",className:"max-h-[480px] overflow-y-auto",children:[g.length>0&&e.jsxs("div",{"data-loc":"client/src/components/NotificationBell.tsx:143",children:[e.jsxs("div",{"data-loc":"client/src/components/NotificationBell.tsx:144",className:"px-4 py-2 bg-orange-500/5 border-b border-[#1E1E22]",children:[e.jsxs("div",{"data-loc":"client/src/components/NotificationBell.tsx:145",className:"flex items-center gap-1.5",children:[e.jsx(Tg,{"data-loc":"client/src/components/NotificationBell.tsx:146",className:"w-3 h-3 text-orange-400"}),e.jsxs("span",{"data-loc":"client/src/components/NotificationBell.tsx:147",className:"text-[10px] font-semibold text-orange-400 uppercase tracking-wider",children:["Atendimentos para atualizar (",g.length,")"]})]}),e.jsx("p",{"data-loc":"client/src/components/NotificationBell.tsx:151",className:"text-[10px] text-[#6B6B7A] mt-0.5",children:"Abra o atendimento e registre uma interação para remover da fila"})]}),e.jsx("div",{"data-loc":"client/src/components/NotificationBell.tsx:153",className:"divide-y divide-[#1E1E22]",children:g.map(y=>{const j=parseInt(y.id.replace("stale_",""),10);return e.jsxs("div",{"data-loc":"client/src/components/NotificationBell.tsx:158",className:"flex items-start gap-3 px-4 py-3 hover:bg-[#1A1A1E] transition-colors group",children:[e.jsx("div",{"data-loc":"client/src/components/NotificationBell.tsx:160",className:"mt-0.5 flex-shrink-0 w-6 h-6 rounded-md border bg-orange-500/10 border-orange-500/20 flex items-center justify-center",children:e.jsx(Tg,{"data-loc":"client/src/components/NotificationBell.tsx:161",className:"w-3.5 h-3.5 text-orange-400"})}),e.jsxs(xs,{"data-loc":"client/src/components/NotificationBell.tsx:165",href:y.href,onClick:()=>s(!1),className:"flex-1 min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/components/NotificationBell.tsx:170",className:"flex items-center gap-1.5 mb-0.5",children:[e.jsx("span",{"data-loc":"client/src/components/NotificationBell.tsx:171",className:"text-[10px] font-semibold text-orange-400 uppercase tracking-wider",children:"Sem atualização"}),e.jsx("span",{"data-loc":"client/src/components/NotificationBell.tsx:174",className:"text-[10px] text-[#3A3A42]",children:"·"}),e.jsx("span",{"data-loc":"client/src/components/NotificationBell.tsx:175",className:"text-[10px] text-[#6B6B7A]",children:y.title.replace(" dias sem atualização","d")})]}),e.jsx("p",{"data-loc":"client/src/components/NotificationBell.tsx:177",className:"text-xs font-medium text-[#F2F2F3] truncate",children:y.body})]}),e.jsx("button",{"data-loc":"client/src/components/NotificationBell.tsx:181",onClick:S=>v(S,j),disabled:u.isPending,title:"Remover da fila",className:Me("flex-shrink-0 w-6 h-6 rounded-md border border-[#2A2A2E] flex items-center justify-center","text-[#6B6B7A] hover:text-emerald-400 hover:border-emerald-500/30 hover:bg-emerald-500/10","transition-colors opacity-0 group-hover:opacity-100"),children:e.jsx(Ya,{"data-loc":"client/src/components/NotificationBell.tsx:191",className:"w-3 h-3"})})]},y.id)})})]}),p.length===0&&g.length===0?e.jsxs("div",{"data-loc":"client/src/components/NotificationBell.tsx:202",className:"flex flex-col items-center justify-center py-10 gap-2",children:[e.jsx(Yo,{"data-loc":"client/src/components/NotificationBell.tsx:203",className:"w-8 h-8 text-[#2A2A2E]"}),e.jsx("p",{"data-loc":"client/src/components/NotificationBell.tsx:204",className:"text-xs text-[#6B6B7A]",children:"Nenhuma notificação"})]}):p.length>0?e.jsxs("div",{"data-loc":"client/src/components/NotificationBell.tsx:207",children:[g.length>0&&e.jsx("div",{"data-loc":"client/src/components/NotificationBell.tsx:209",className:"px-4 py-2 border-b border-[#1E1E22]",children:e.jsx("span",{"data-loc":"client/src/components/NotificationBell.tsx:210",className:"text-[10px] font-semibold text-[#6B6B7A] uppercase tracking-wider",children:"Outras notificações"})}),e.jsx("div",{"data-loc":"client/src/components/NotificationBell.tsx:213",className:"divide-y divide-[#1E1E22]",children:p.map(y=>e.jsxs(xs,{"data-loc":"client/src/components/NotificationBell.tsx:215",href:y.href,onClick:()=>s(!1),className:"flex items-start gap-3 px-4 py-3 hover:bg-[#1A1A1E] transition-colors",children:[e.jsx("div",{"data-loc":"client/src/components/NotificationBell.tsx:221",className:Me("mt-0.5 flex-shrink-0 w-6 h-6 rounded-md border flex items-center justify-center",G9[y.type]),children:Q9[y.type]}),e.jsxs("div",{"data-loc":"client/src/components/NotificationBell.tsx:227",className:"flex-1 min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/components/NotificationBell.tsx:228",className:"flex items-center gap-1.5 mb-0.5",children:[e.jsx("span",{"data-loc":"client/src/components/NotificationBell.tsx:229",className:"text-[10px] font-semibold text-[#6B6B7A] uppercase tracking-wider",children:V9[y.type]}),e.jsx("span",{"data-loc":"client/src/components/NotificationBell.tsx:232",className:"text-[10px] text-[#3A3A42]",children:"·"}),e.jsx("span",{"data-loc":"client/src/components/NotificationBell.tsx:233",className:"text-[10px] text-[#6B6B7A]",children:K9(y.createdAt)})]}),e.jsx("p",{"data-loc":"client/src/components/NotificationBell.tsx:235",className:"text-xs font-medium text-[#F2F2F3] truncate",children:y.title}),e.jsx("p",{"data-loc":"client/src/components/NotificationBell.tsx:236",className:"text-xs text-[#A0A0AB] truncate",children:y.body})]})]},y.id))})]}):null]}),(p.length>0||g.length>0)&&e.jsx("div",{"data-loc":"client/src/components/NotificationBell.tsx:247",className:"px-4 py-2.5 border-t border-[#1E1E22]",children:e.jsx("p",{"data-loc":"client/src/components/NotificationBell.tsx:248",className:"text-[10px] text-[#6B6B7A] text-center",children:"Atualiza automaticamente a cada 30s"})})]})]})}function Y9(t,s){const[r,l]=f.useState(t);return f.useEffect(()=>{const c=setTimeout(()=>l(t),s);return()=>clearTimeout(c)},[t,s]),r}const X9={cliente:e.jsx(Ua,{"data-loc":"client/src/components/GlobalSearch.tsx:19",className:"w-3.5 h-3.5 text-blue-400"}),imovel:e.jsx(Px,{"data-loc":"client/src/components/GlobalSearch.tsx:20",className:"w-3.5 h-3.5 text-emerald-400"}),atendimento:e.jsx(un,{"data-loc":"client/src/components/GlobalSearch.tsx:21",className:"w-3.5 h-3.5 text-primary"}),kanban:e.jsx(jM,{"data-loc":"client/src/components/GlobalSearch.tsx:22",className:"w-3.5 h-3.5 text-purple-400"})},Z9={cliente:"Cliente",imovel:"Imóvel",atendimento:"Atendimento",kanban:"Kanban"},vj={cliente:"bg-blue-500/10 border-blue-500/20",imovel:"bg-emerald-500/10 border-emerald-500/20",atendimento:"bg-primary/10 border-primary/20",kanban:"bg-purple-500/10 border-purple-500/20"};function bj(){const[t,s]=f.useState(!1),[r,l]=f.useState(""),[c,d]=f.useState(0),u=f.useRef(null),x=f.useRef(null),[,p]=fs(),g=Y9(r,300),{data:b,isFetching:v}=Y.search.globalSearch.useQuery({q:g},{enabled:g.trim().length>=2,staleTime:1e4}),y=b?.results??[];f.useEffect(()=>{function N(w){(w.metaKey||w.ctrlKey)&&w.key==="k"&&(w.preventDefault(),s(!0),setTimeout(()=>u.current?.focus(),50)),w.key==="Escape"&&(s(!1),l(""))}return document.addEventListener("keydown",N),()=>document.removeEventListener("keydown",N)},[]),f.useEffect(()=>{function N(w){x.current&&!x.current.contains(w.target)&&(s(!1),l(""))}return t&&document.addEventListener("mousedown",N),()=>document.removeEventListener("mousedown",N)},[t]);function j(N){N.key==="ArrowDown"?(N.preventDefault(),d(w=>Math.min(w+1,y.length-1))):N.key==="ArrowUp"?(N.preventDefault(),d(w=>Math.max(w-1,0))):N.key==="Enter"&&y[c]&&(p(y[c].href),s(!1),l(""))}f.useEffect(()=>d(0),[y.length]);function S(){s(!0),setTimeout(()=>u.current?.focus(),50)}return e.jsxs("div",{"data-loc":"client/src/components/GlobalSearch.tsx:112",className:"relative",ref:x,children:[!t&&e.jsxs("button",{"data-loc":"client/src/components/GlobalSearch.tsx:115",onClick:S,className:"flex items-center gap-2 h-8 px-3 rounded-lg border border-border bg-card text-muted-foreground hover:text-foreground hover:border-border/80 transition-colors text-xs","aria-label":"Busca global",children:[e.jsx(or,{"data-loc":"client/src/components/GlobalSearch.tsx:120",className:"w-3.5 h-3.5 shrink-0"}),e.jsx("span",{"data-loc":"client/src/components/GlobalSearch.tsx:121",className:"hidden lg:inline",children:"Buscar..."}),e.jsx("kbd",{"data-loc":"client/src/components/GlobalSearch.tsx:122",className:"hidden lg:inline-flex items-center gap-0.5 px-1 py-0.5 rounded bg-muted text-[10px] text-muted-foreground font-mono",children:"âK"})]}),t&&e.jsxs("div",{"data-loc":"client/src/components/GlobalSearch.tsx:130",className:"flex items-center gap-2 h-8 px-3 rounded-lg border border-primary/40 bg-card w-64",children:[e.jsx(or,{"data-loc":"client/src/components/GlobalSearch.tsx:131",className:"w-3.5 h-3.5 text-primary shrink-0"}),e.jsx("input",{"data-loc":"client/src/components/GlobalSearch.tsx:132",ref:u,type:"text",value:r,onChange:N=>l(N.target.value),onKeyDown:j,placeholder:"Buscar clientes, imóveis...",className:"flex-1 bg-transparent text-xs text-foreground placeholder:text-muted-foreground outline-none",autoComplete:"off"}),v&&e.jsx(hi,{"data-loc":"client/src/components/GlobalSearch.tsx:142",className:"w-3 h-3 text-muted-foreground animate-spin shrink-0"}),!v&&r&&e.jsx("button",{"data-loc":"client/src/components/GlobalSearch.tsx:144",onClick:()=>{l(""),u.current?.focus()},className:"text-muted-foreground hover:text-foreground transition-colors",children:e.jsx(va,{"data-loc":"client/src/components/GlobalSearch.tsx:148",className:"w-3 h-3"})})]}),t&&g.trim().length>=2&&e.jsxs("div",{"data-loc":"client/src/components/GlobalSearch.tsx:156",className:"absolute right-0 top-10 w-80 z-50 rounded-xl border border-border bg-card shadow-2xl shadow-black/30 overflow-hidden",children:[y.length===0&&!v&&e.jsxs("div",{"data-loc":"client/src/components/GlobalSearch.tsx:158",className:"flex flex-col items-center justify-center py-8 gap-2",children:[e.jsx(or,{"data-loc":"client/src/components/GlobalSearch.tsx:159",className:"w-6 h-6 text-muted-foreground
627/30"}),e.jsxs("p",{"data-loc":"client/src/components/GlobalSearch.tsx:160",className:"text-xs text-muted-foreground",children:['Nenhum resultado para "',g,'"']})]}),v&&y.length===0&&e.jsxs("div",{"data-loc":"client/src/components/GlobalSearch.tsx:165",className:"flex items-center justify-center py-8 gap-2",children:[e.jsx(hi,{"data-loc":"client/src/components/GlobalSearch.tsx:166",className:"w-4 h-4 text-muted-foreground animate-spin"}),e.jsx("p",{"data-loc":"client/src/components/GlobalSearch.tsx:167",className:"text-xs text-muted-foreground",children:"Buscando..."})]}),y.length>0&&e.jsx("div",{"data-loc":"client/src/components/GlobalSearch.tsx:172",className:"divide-y divide-border max-h-[360px] overflow-y-auto",children:y.map((N,w)=>e.jsxs("button",{"data-loc":"client/src/components/GlobalSearch.tsx:174",onClick:()=>{p(N.href),s(!1),l("")},className:Me("w-full flex items-center gap-3 px-4 py-3 text-left transition-colors",w===c?"bg-muted/60":"hover:bg-muted/40"),children:[e.jsx("div",{"data-loc":"client/src/components/GlobalSearch.tsx:186",className:Me("flex-shrink-0 w-6 h-6 rounded-md border flex items-center justify-center",vj[N.type]),children:X9[N.type]}),e.jsxs("div",{"data-loc":"client/src/components/GlobalSearch.tsx:192",className:"flex-1 min-w-0",children:[e.jsx("p",{"data-loc":"client/src/components/GlobalSearch.tsx:193",className:"text-xs font-medium text-foreground truncate",children:N.title}),e.jsx("p",{"data-loc":"client/src/components/GlobalSearch.tsx:194",className:"text-[10px] text-muted-foreground truncate",children:N.subtitle})]}),e.jsx("span",{"data-loc":"client/src/components/GlobalSearch.tsx:196",className:Me("flex-shrink-0 text-[9px] font-semibold uppercase tracking-wider px-1.5 py-0.5 rounded border",vj[N.type],N.type==="cliente"?"text-blue-400":N.type==="imovel"?"text-emerald-400":N.type==="kanban"?"text-purple-400":"text-primary"),children:Z9[N.type]})]},`${N.type}_${N.id}`))}),y.length>0&&e.jsxs("div",{"data-loc":"client/src/components/GlobalSearch.tsx:211",className:"px-4 py-2 border-t border-border flex items-center gap-3",children:[e.jsx("span",{"data-loc":"client/src/components/GlobalSearch.tsx:212",className:"text-[10px] text-muted-foreground",children:"ââ navegar"}),e.jsx("span",{"data-loc":"client/src/components/GlobalSearch.tsx:213",className:"text-[10px] text-muted-foreground",children:"âµ abrir"}),e.jsx("span",{"data-loc":"client/src/components/GlobalSearch.tsx:214",className:"text-[10px] text-muted-foreground",children:"Esc fechar"})]})]})]})}const Uf="/logo-h2o.png",J9=[{icon:AM,label:"Dashboard",path:"/",implemented:!0},{icon:Ys,label:"Usuários",path:"/usuarios",roles:["admin"],implemented:!0},{icon:CM,label:"Clientes",path:"/clientes",implemented:!0},{icon:hn,label:"Atendimentos",path:"/atendimentos",implemented:!0},{icon:hM,label:"Visitas",path:"/visitas",implemented:!1},{icon:fM,label:"Painel Atividades",path:"/atividades",implemented:!1},{icon:NM,label:"Negócios",path:"/leads",implemented:!0},{icon:cC,label:"Campanhas",path:"/campanhas",implemented:!0},{icon:Xr,label:"WhatsApp",path:"/whatsapp",implemented:!0},{icon:Hl,iconImg:"https://d2xsxph8kpxj0f.cloudfront.net/310419663028988702/FZ4vaYNxtMPhhn5RD6DdZo/meta-logo_bb84b400.png",label:"Meta Lead Ads",path:"/meta-lead-ads",implemented:!0},{icon:lC,label:"Minha Fila",path:"/minha-fila",implemented:!0},{icon:rc,label:"Roleta de Leads",path:"/roleta",implemented:!0},{icon:gh,label:"Importações",path:"/importacoes",implemented:!1},{icon:LM,label:"Integrações",path:"/integracoes",implemented:!0},{icon:_g,label:"Webhooks & Leads",path:"/webhooks",implemented:!0},{icon:Pl,label:"Meta CAPI",path:"/meta-capi",implemented:!0}],If=[{icon:ki,label:"Configurações",path:"/configuracoes",roles:["admin","gerente"],implemented:!1}];function Cw({children:t}){const{loading:s,user:r}=ka();return s?e.jsx(gj,{"data-loc":"client/src/components/DashboardLayout.tsx:95"}):r?e.jsx(eR,{"data-loc":"client/src/components/DashboardLayout.tsx:107",children:t}):((typeof window<"u"?window.location.pathname:"/")!=="/login"&&(window.location.href="/login"),e.jsx(gj,{"data-loc":"client/src/components/DashboardLayout.t
627sx:104"}))}function eR({children:t}){const{user:s,logout:r}=ka(),[l,c]=fs(),d=q9(),[u,x]=f.useState(!1),p=f.useCallback(async()=>{await r(),ce.warning("Sessão encerrada por inatividade. Faça login novamente.")},[r]),{showWarning:g,remainingSeconds:b,resetTimer:v}=W9(p,!!s),[y,j]=f.useState(()=>{const F=localStorage.getItem("crm-theme");return F==="light"||F==="dark"?F:"dark"});f.useEffect(()=>{const F=document.documentElement;F.classList.remove("dark","light"),F.classList.add(y),localStorage.setItem("crm-theme",y)},[y]);const S=()=>j(F=>F==="dark"?"light":"dark"),N=Y.users.myMenuPermissions.useQuery(void 0,{staleTime:300*1e3}),w=N.data,D=F=>{const V=w?.permissions?.[F];if(V==null)return{enabled:!0,mode:"editar"};if(typeof V=="boolean")return{enabled:V,mode:"editar"};if(typeof V=="object"&&"enabled"in V){const de=V;return{enabled:de.enabled!==!1,mode:de.mode==="visualizar"?"visualizar":"editar"}}return{enabled:!0,mode:"editar"}},k=new Set(["/","/clientes","/atendimentos","/minha-fila"]),A=J9.filter(F=>F.roles&&!F.roles.includes(s?.role??"")?!1:s?.role==="admin"||w?.isAdmin||N.isLoading?!0:w?.permissions&&Object.keys(w.permissions).length>0?D(F.path).enabled:k.has(F.path)),_=[...A,...If].find(F=>F.path==="/"?l==="/":l.startsWith(F.path)),E=F=>{if(!F.implemented){ce.info(`${F.label} â Em breve`,{description:"Este módulo está em desenvolvimento.",duration:2500});return}c(F.path),d&&x(!1)},I=F=>{const V={admin:"bg-primary/20 text-primary",gerente:"bg-blue-500/20 text-blue-400",corretor:"bg-emerald-500/20 text-emerald-400",secretaria:"bg-purple-500/20 text-purple-400"},de={admin:"Admin",gerente:"Gerente",corretor:"Atendente",secretaria:"Secretária"};return e.jsx("span",{"data-loc":"client/src/components/DashboardLayout.tsx:209",className:`text-[10px] font-medium px-1.5 py-0.5 rounded ${V[F]||V.corretor}`,children:de[F]||F})},R=({item:F})=>{const V=F.path==="/"?l==="/":l.startsWith(F.path),de=!F.implemented;return e.jsxs(Gr,{"data-loc":"client/src/components/DashboardLayout.tsx:220",delayDuration:200,children:[e.jsx(Vr,{"data-loc":"client/src/components/DashboardLayout.tsx:221",asChild:!0,children:e.jsxs("button",{"data-loc":"client/src/components/DashboardLayout.tsx:222",onClick:()=>E(F),className:` 628 relative flex items-center justify-center w-10 h-10 rounded-lg transition-all duration-150 629 ${V?"bg-primary/15 text-primary":de?"text-muted-foreground/40 hover:text-muted-foreground/60 hover:bg-muted/30 cursor-default":"text-muted-foreground hover:text-foreground hover:bg-muted/50"} 630 `,"aria-label":F.label,children:[F.iconImg?e.jsx("img",{"data-loc":"client/src/components/DashboardLayout.tsx:236",src:F.iconImg,alt:F.label,className:`h-[22px] w-[22px] rounded object-cover transition-opacity ${de?"opacity-30":V?"opacity-100":"opacity-60 group-hover:opacity-90"}`}):e.jsx(F.icon,{"data-loc":"client/src/components/DashboardLayout.tsx:242",className:"h-[18px] w-[18px]",strokeWidth:V?2:1.75}),V&&e.jsx("span",{"data-loc":"client/src/components/DashboardLayout.tsx:245",className:"absolute left-0 top-1/2 -translate-y-1/2 w-0.5 h-5 bg-primary rounded-r-full"})]})}),e.jsxs(Kr,{"data-loc":"client/src/components/DashboardLayout.tsx:249",side:"right",className:"bg-card border-border text-foreground text-xs font-medium px-2.5 py-1.5",children:[F.label,de&&e.jsx("span",{"data-loc":"client/src/components/DashboardLayout.tsx:251",className:"ml-1.5 text-muted-foreground font-normal",children:"â Em breve"})]})]})},z=e.jsxs("aside",{"data-loc":"client/src/components/DashboardLayout.tsx:259",className:"hidden md:flex flex-col w-[60px] shrink-0 bg-card border-r border-border h-screen sticky top-0 z-30",children:[e.jsx("div",{"data-loc":"client/src/components/DashboardLayout.tsx:261",className:"flex items-center justify-center h-14 border-b border-border shrink-0",children:e.jsxs(Gr,{"data-loc":"client/src/components/DashboardLayout.tsx:262",delayDuration:200,children:[e.jsx(Vr,{"data-loc":"client/src/components/DashboardLayout.tsx:263",asChild:!0,children:e.jsx("button",{"data-loc":"client/src/components/DashboardLayout.t
630sx:264",onClick:()=>c("/"),className:"flex items-center justify-center w-9 h-9 rounded-lg hover:bg-muted/50 transition-colors",children:e.jsx("img",{"data-loc":"client/src/components/DashboardLayout.tsx:268",src:Uf,alt:"H2O Saúde",className:"h-7 w-auto object-contain"})})}),e.jsx(Kr,{"data-loc":"client/src/components/DashboardLayout.tsx:271",side:"right",className:"bg-card border-border text-foreground text-xs font-medium px-2.5 py-1.5",children:"CRM H2O"})]})}),e.jsx("nav",{"data-loc":"client/src/components/DashboardLayout.tsx:278",className:"flex flex-col items-center gap-1 py-3 px-2.5 flex-1 overflow-y-auto scrollbar-none",children:A.map(F=>e.jsx(R,{"data-loc":"client/src/components/DashboardLayout.tsx:280",item:F},F.path))}),e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:285",className:"flex flex-col items-center gap-1 py-3 px-2.5 border-t border-border shrink-0",children:[If.map(F=>e.jsx(R,{"data-loc":"client/src/components/DashboardLayout.tsx:287",item:F},F.path)),e.jsxs(Gr,{"data-loc":"client/src/components/DashboardLayout.tsx:291",delayDuration:200,children:[e.jsx(Vr,{"data-loc":"client/src/components/DashboardLayout.tsx:292",asChild:!0,children:e.jsx("button",{"data-loc":"client/src/components/DashboardLayout.tsx:293",onClick:S,className:"flex items-center justify-center w-10 h-10 rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors","aria-label":y==="dark"?"Mudar para tema claro":"Mudar para tema escuro",children:y==="dark"?e.jsx(Qy,{"data-loc":"client/src/components/DashboardLayout.tsx:298",className:"h-[18px] w-[18px]",strokeWidth:1.75}):e.jsx($y,{"data-loc":"client/src/components/DashboardLayout.tsx:298",className:"h-[18px] w-[18px]",strokeWidth:1.75})})}),e.jsx(Kr,{"data-loc":"client/src/components/DashboardLayout.tsx:301",side:"right",className:"bg-card border-border text-foreground text-xs font-medium px-2.5 py-1.5",children:y==="dark"?"Tema claro":"Tema escuro"})]}),e.jsxs(_i,{"data-loc":"client/src/components/DashboardLayout.tsx:307",children:[e.jsxs(Gr,{"data-loc":"client/src/components/DashboardLayout.tsx:308",delayDuration:200,children:[e.jsx(Vr,{"data-loc":"client/src/components/DashboardLayout.tsx:309",asChild:!0,children:e.jsx(Oi,{"data-loc":"client/src/components/DashboardLayout.tsx:310",asChild:!0,children:e.jsx("button",{"data-loc":"client/src/components/DashboardLayout.tsx:311",className:"flex items-center justify-center w-10 h-10 rounded-lg hover:bg-muted/50 transition-colors mt-1 focus:outline-none",children:e.jsx(vi,{"data-loc":"client/src/components/DashboardLayout.tsx:312",className:"h-7 w-7 bg-primary/20",children:e.jsx(bi,{"data-loc":"client/src/components/DashboardLayout.tsx:313",className:"text-[11px] font-semibold text-primary bg-primary/20",children:s?.name?.charAt(0).toUpperCase()||"U"})})})})}),e.jsx(Kr,{"data-loc":"client/src/components/DashboardLayout.tsx:320",side:"right",className:"bg-card border-border text-foreground text-xs font-medium px-2.5 py-1.5",children:e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:321",className:"flex flex-col gap-0.5",children:[e.jsx("span",{"data-loc":"client/src/components/DashboardLayout.tsx:322",children:s?.name||"Usuário"}),s?.role&&e.jsx("span",{"data-loc":"client/src/components/DashboardLayout.tsx:323",className:"text-muted-foreground font-normal capitalize",children:s.role})]})})]}),e.jsxs(Pi,{"data-loc":"client/src/components/DashboardLayout.tsx:327",side:"right",align:"end",className:"w-52 bg-card border-border",children:[e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:328",className:"px-2 py-1.5 border-b border-border mb-1",children:[e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:329",className:"flex items-center gap-2",children:[e.jsx("p",{"data-loc":"client/src/components/DashboardLayout.tsx:330",className:"text-sm font-medium truncate text-foreground",children:s?.name||"Usuário"}),s?.role&&I(s.role)]}),e.jsx("p",{"data-loc":"client/src/components/DashboardLayout.tsx:335",className:"text-[11px] text-muted-foreground truncate mt-0.5",children:s?.email||""})]}),e.jsxs(ps,{"data-loc":"client/src/components/DashboardLayout.t
630sx:339",onClick:()=>c("/perfil"),className:"cursor-pointer",children:[e.jsx(bM,{"data-loc":"client/src/components/DashboardLayout.tsx:340",className:"mr-2 h-4 w-4"}),e.jsx("span",{"data-loc":"client/src/components/DashboardLayout.tsx:341",children:"Meu Perfil"})]}),e.jsx(Th,{"data-loc":"client/src/components/DashboardLayout.tsx:343"}),e.jsxs(ps,{"data-loc":"client/src/components/DashboardLayout.tsx:344",onClick:r,className:"cursor-pointer text-destructive focus:text-destructive",children:[e.jsx(kg,{"data-loc":"client/src/components/DashboardLayout.tsx:348",className:"mr-2 h-4 w-4"}),e.jsx("span",{"data-loc":"client/src/components/DashboardLayout.tsx:349",children:"Sair"})]})]})]})]})]}),U=e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:359",className:"md:hidden flex items-center justify-between h-12 px-4 bg-card border-b border-border sticky top-0 z-40",children:[e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:360",className:"flex items-center gap-2.5",children:[e.jsx("img",{"data-loc":"client/src/components/DashboardLayout.tsx:361",src:Uf,alt:"H2O Saúde",className:"h-6 w-auto object-contain"}),e.jsx("span",{"data-loc":"client/src/components/DashboardLayout.tsx:362",className:"text-sm font-semibold text-foreground",children:_?.label??"CRM H2O"})]}),e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:366",className:"flex items-center gap-1",children:[e.jsx(bj,{"data-loc":"client/src/components/DashboardLayout.tsx:367"}),e.jsx(hj,{"data-loc":"client/src/components/DashboardLayout.tsx:368"}),e.jsx("button",{"data-loc":"client/src/components/DashboardLayout.tsx:369",onClick:()=>x(!u),className:"flex items-center justify-center w-8 h-8 rounded-md text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors",children:u?e.jsx(va,{"data-loc":"client/src/components/DashboardLayout.tsx:373",className:"h-4 w-4"}):e.jsx(DM,{"data-loc":"client/src/components/DashboardLayout.tsx:373",className:"h-4 w-4"})})]})]}),B=u&&e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:381",className:"md:hidden fixed inset-0 z-50 flex",children:[e.jsx("div",{"data-loc":"client/src/components/DashboardLayout.tsx:382",className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:()=>x(!1)}),e.jsxs("aside",{"data-loc":"client/src/components/DashboardLayout.tsx:386",className:"relative w-64 bg-card border-r border-border h-full flex flex-col z-10",children:[e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:387",className:"flex items-center gap-3 h-14 px-4 border-b border-border",children:[e.jsx("img",{"data-loc":"client/src/components/DashboardLayout.tsx:388",src:Uf,alt:"H2O Saúde",className:"h-7 w-auto object-contain"}),e.jsx("span",{"data-loc":"client/src/components/DashboardLayout.tsx:389",className:"font-semibold text-sm text-foreground",children:"CRM H2O"})]}),e.jsx("nav",{"data-loc":"client/src/components/DashboardLayout.tsx:391",className:"flex-1 overflow-y-auto py-3 px-2",children:A.map(F=>{const V=F.path==="/"?l==="/":l.startsWith(F.path),de=!F.implemented;return e.jsxs("button",{"data-loc":"client/src/components/DashboardLayout.tsx:396",onClick:()=>E(F),className:` 631 flex items-center gap-3 w-full px-3 py-2.5 rounded-lg text-sm transition-colors mb-0.5 632 ${V?"bg-primary/10 text-primary font-medium":de?"text-muted-foreground/40 cursor-default":"text-muted-foreground hover:text-foreground hover:bg-muted/50"} 633 `,children:[F.iconImg?e.jsx("img",{"data-loc":"client/src/components/DashboardLayout.tsx:410",src:F.iconImg,alt:F.label,className:"h-4 w-4 shrink-0 rounded object-cover"}):e.jsx(F.icon,{"data-loc":"client/src/components/DashboardLayout.tsx:412",className:"h-4 w-4 shrink-0",strokeWidth:V?2:1.75}),e.jsx("span",{"data-loc":"client/src/components/DashboardLayout.tsx:414",children:F.label}),de&&e.jsx("span",{"data-loc":"client/src/components/DashboardLayout.tsx:416",className:"ml-auto text-[10px] text-muted-foreground/50 font-normal",children:"Em breve"})]},F.path)})}),e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.t
633sx:422",className:"border-t border-border p-3",children:[If.map(F=>{const V=!F.implemented;return e.jsxs("button",{"data-loc":"client/src/components/DashboardLayout.tsx:426",onClick:()=>E(F),className:` 634 flex items-center gap-3 w-full px-3 py-2.5 rounded-lg text-sm transition-colors mb-0.5 635 ${V?"text-muted-foreground/40 cursor-default":"text-muted-foreground hover:text-foreground hover:bg-muted/50"} 636 `,children:[e.jsx(F.icon,{"data-loc":"client/src/components/DashboardLayout.tsx:437",className:"h-4 w-4 shrink-0",strokeWidth:1.75}),e.jsx("span",{"data-loc":"client/src/components/DashboardLayout.tsx:438",children:F.label}),V&&e.jsx("span",{"data-loc":"client/src/components/DashboardLayout.tsx:440",className:"ml-auto text-[10px] text-muted-foreground/50 font-normal",children:"Em breve"})]},F.path)}),e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:445",className:"flex items-center gap-2.5 px-3 py-2 mt-1",children:[e.jsx(vi,{"data-loc":"client/src/components/DashboardLayout.tsx:446",className:"h-7 w-7 bg-primary/20 shrink-0",children:e.jsx(bi,{"data-loc":"client/src/components/DashboardLayout.tsx:447",className:"text-[11px] font-semibold text-primary bg-primary/20",children:s?.name?.charAt(0).toUpperCase()||"U"})}),e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:451",className:"flex-1 min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:452",className:"flex items-center gap-1.5",children:[e.jsx("p",{"data-loc":"client/src/components/DashboardLayout.tsx:453",className:"text-xs font-medium truncate text-foreground",children:s?.name||"Usuário"}),s?.role&&I(s.role)]}),e.jsx("p",{"data-loc":"client/src/components/DashboardLayout.tsx:456",className:"text-[10px] text-muted-foreground truncate",children:s?.email||""})]})]}),e.jsxs("button",{"data-loc":"client/src/components/DashboardLayout.tsx:460",onClick:S,className:"flex items-center gap-3 w-full px-3 py-2.5 rounded-lg text-sm text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors mt-1",children:[y==="dark"?e.jsx(Qy,{"data-loc":"client/src/components/DashboardLayout.tsx:464",className:"h-4 w-4 shrink-0"}):e.jsx($y,{"data-loc":"client/src/components/DashboardLayout.tsx:464",className:"h-4 w-4 shrink-0"}),e.jsx("span",{"data-loc":"client/src/components/DashboardLayout.tsx:465",children:y==="dark"?"Tema claro":"Tema escuro"})]}),e.jsxs("button",{"data-loc":"client/src/components/DashboardLayout.tsx:467",onClick:r,className:"flex items-center gap-3 w-full px-3 py-2.5 rounded-lg text-sm text-destructive hover:bg-destructive/10 transition-colors mt-1",children:[e.jsx(kg,{"data-loc":"client/src/components/DashboardLayout.tsx:471",className:"h-4 w-4 shrink-0"}),e.jsx("span",{"data-loc":"client/src/components/DashboardLayout.tsx:472",children:"Sair"})]})]})]})]});return e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:480",className:"flex h-screen overflow-hidden bg-background",children:[z,e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:482",className:"flex flex-col flex-1 min-w-0 overflow-hidden",children:[U,B,e.jsx("div",{"data-loc":"client/src/components/DashboardLayout.tsx:486",className:"hidden md:flex items-center justify-end px-5 py-2.5 border-b border-border shrink-0 bg-background/80 backdrop-blur-sm",children:e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:487",className:"flex items-center gap-3",children:[e.jsx(bj,{"data-loc":"client/src/components/DashboardLayout.tsx:488"}),e.jsx(hj,{"data-loc":"client/src/components/DashboardLayout.tsx:489"}),e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:490",className:"text-right",children:[e.jsx("p",{"data-loc":"client/src/components/DashboardLayout.tsx:491",className:"text-xs font-medium text-foreground leading-tight",children:s?.name??""}),e.jsx("p",{"data-loc":"client/src/components/DashboardLayout.tsx:492",className:"text-[10px] text-muted-foreground leading-tight capitalize",children:s?.role??""})]}),e.jsxs(vi,{"data-loc":"client/src/components/DashboardLayout.t
636sx:494",className:"h-8 w-8 ring-2 ring-primary/30 shrink-0",children:[e.jsx(wh,{"data-loc":"client/src/components/DashboardLayout.tsx:495",src:s?.avatarUrl??void 0,className:"object-cover"}),e.jsx(bi,{"data-loc":"client/src/components/DashboardLayout.tsx:496",className:"text-xs font-semibold bg-primary/20 text-primary",children:(s?.name??"?").split(" ").map(F=>F[0]).slice(0,2).join("").toUpperCase()})]})]})}),e.jsx("main",{"data-loc":"client/src/components/DashboardLayout.tsx:502",className:"flex-1 overflow-y-auto overflow-x-hidden p-0",children:t})]}),g&&e.jsx("div",{"data-loc":"client/src/components/DashboardLayout.tsx:509",className:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 backdrop-blur-sm",children:e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:510",className:"bg-card border border-border rounded-xl shadow-2xl p-6 max-w-sm w-full mx-4 flex flex-col gap-4",children:[e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:511",className:"flex items-center gap-3",children:[e.jsx("span",{"data-loc":"client/src/components/DashboardLayout.tsx:512",className:"text-2xl",children:"â°"}),e.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:513",children:[e.jsx("h2",{"data-loc":"client/src/components/DashboardLayout.tsx:514",className:"text-foreground font-semibold text-base",children:"Sessão prestes a expirar"}),e.jsxs("p",{"data-loc":"client/src/components/DashboardLayout.tsx:515",className:"text-muted-foreground text-sm mt-0.5",children:["Sua sessão será encerrada por inatividade em"," ",e.jsxs("span",{"data-loc":"client/src/components/DashboardLayout.tsx:517",className:"text-primary font-bold",children:[b,"s"]}),"."]})]})]}),e.jsx(oe,{"data-loc":"client/src/components/DashboardLayout.tsx:521",className:"w-full",onClick:v,children:"Continuar conectado"})]})})]})}const tR=aC("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 Qt({className:t,variant:s,asChild:r=!1,...l}){const c=r?lN:"span";return e.jsx(c,{"data-loc":"client/src/components/ui/badge.tsx:38","data-slot":"badge",className:Me(tR({variant:s}),t),...l})}function Bg(t,[s,r]){return Math.min(r,Math.max(s,t))}function aR(t){const s=f.useRef({value:t,previous:t});return f.useMemo(()=>(s.current.value!==t&&(s.current.previous=s.current.value,s.current.value=t),s.current.previous),[t])}var sR=[" ","Enter","ArrowUp","ArrowDown"],nR=[" ","Enter"],ql="Select",[$x,Wx,rR]=Ah(ql),[fc]=zs(ql,[rR,ll]),Qx=ll(),[lR,ol]=fc(ql),[oR,cR]=fc(ql),ww=t=>{const{__scopeSelect:s,children:r,open:l,defaultOpen:c,onOpenChange:d,value:u,defaultValue:x,onValueChange:p,dir:g,name:b,autoComplete:v,disabled:y,required:j,form:S}=t,N=Qx(s),[w,D]=f.useState(null),[k,A]=f.useState(null),[_,E]=f.useState(!1),I=Xi(g),[R,z]=nl({prop:l,defaultProp:c??!1,onChange:d,caller:ql}),[U,B]=nl({prop:u,defaultProp:x,onChange:p,caller:ql}),F=f.useRef(null),V=w?S||!!w.closest("form"):!0,[de,le]=f.useState(new Set),xe=Array.from(de).map(M=>M.props.value).join(";");return e.jsx(Mx,{...N,children:e.jsxs(lR,{required:j,scope:s,trigger:w,onTriggerChange:D,valueNode:k,onValueNodeChange:A,valueNodeHasChildren:_,onValueNodeHasChildrenChange:E,contentId:Xs(),value:U,onValueChange:B,open:R,onOpenChange:z,dir:I,triggerPointerDownPosRef:F,disabled:y,children:[e.jsx($x.Provider,{scope:s,children:e.jsx(oR,{scope:t.__scopeSelect,onNativeOptionAdd:f.useCallback(M=>{le(O=>new Set(O).add(M))},[]),onNativeOptionRemove:f.useCallback(M=>{le(O=>{const T=new Set(O);return T.delete(M),T})},[]),children:r})}),V?e.jsxs(Qw,{"aria-hidden":!0,required:j,tabIndex:-1,name:b,autoComplete:v,value:U,onChange:M=>B(M.target.value),disabled:y,form:S,children:[U===void 0?e.jsx("option",{value:""}):null,Array.from(de)]},xe):null]})})};ww.displayName=ql;var Aw="SelectTrigger",Sw=f.forwardRef((t,s)=>{const{__scopeSelect:r,disabled:l=!1,...c}=t,d=Qx(r),u=ol(Aw,r),x=u.disabled||l,p=st(s,u.onTriggerChange),g=Wx(r),b=f.useRef("touch"),[v,y,j]=Vw(N=>{const w=g().filter(A=>!A.disabled),D=w.find(A=>A.value===u.value),k=Kw(w,N,D);k!==void 0&&u.onValueChange(k.value)}),S=N=>{x||(u.onOpenChange(!0),j()),N&&(u.triggerPointerDownPosRef.current={x:Math.round(N.pageX),y:Math.round(N.pageY)})};return e.jsx($i,{asChild:!0,...d,children:e.jsx(Qe.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:x,"data-disabled":x?"":void 0,"data-placeholder":Gw(u.value)?"":void 0,...c,ref:p,onClick:Ae(c.onClick,N=>
vendor: 12,298 bytes, line 636
636{N.currentTarget.focus(),b.current!=="mouse"&&S(N)}),onPointerDown:Ae(c.onPointerDown,N=>{b.current=N.pointerType;const w=N.target;w.hasPointerCapture(N.pointerId)&&w.releasePointerCapture(N.pointerId),N.button===0&&N.ctrlKey===!1&&N.pointerType==="mouse"&&(S(N),N.preventDefault())}),onKeyDown:Ae(c.onKeyDown,N=>{const w=v.current!=="";!(N.ctrlKey||N.altKey||N.metaKey)&&N.key.length===1&&y(N.key),!(w&&N.key===" ")&&sR.includes(N.key)&&(S(),N.preventDefault())})})})});Sw.displayName=Aw;var Ew="SelectValue",Dw=f.forwardRef((t,s)=>{const{__scopeSelect:r,className:l,style:c,children:d,placeholder:u="",...x}=t,p=ol(Ew,r),{onValueNodeHasChildrenChange:g}=p,b=d!==void 0,v=st(s,p.onValueNodeChange);return ba(()=>{g(b)},[g,b]),e.jsx(Qe.span,{...x,ref:v,style:{pointerEvents:"none"},children:Gw(p.value)?e.jsx(e.Fragment,{children:u}):d})});Dw.displayName=Ew;var iR="SelectIcon",Mw=f.forwardRef((t,s)=>{const{__scopeSelect:r,children:l,...c}=t;return e.jsx(Qe.span,{"aria-hidden":!0,...c,ref:s,children:l||"â¼"})});Mw.displayName=iR;var dR="SelectPortal",Lw=t=>e.jsx(uc,{asChild:!0,...t});Lw.displayName=dR;var $l="SelectContent",kw=f.forwardRef((t,s)=>{const r=ol($l,t.__scopeSelect),[l,c]=f.useState();if(ba(()=>{c(new DocumentFragment)},[]),!r.open){const d=l;return d?dn.createPortal(e.jsx(Rw,{scope:t.__scopeSelect,children:e.jsx($x.Slot,{scope:t.__scopeSelect,children:e.jsx("div",{children:t.children})})}),d):null}return e.jsx(Tw,{...t,ref:s})});kw.displayName=$l;var cn=10,[Rw,cl]=fc($l),uR="SelectContentImpl",xR=tl("SelectContent.RemoveScroll"),Tw=f.forwardRef((t,s)=>{const{__scopeSelect:r,position:l="item-aligned",onCloseAutoFocus:c,onEscapeKeyDown:d,onPointerDownOutside:u,side:x,sideOffset:p,align:g,alignOffset:b,arrowPadding:v,collisionBoundary:y,collisionPadding:j,sticky:S,hideWhenDetached:N,avoidCollisions:w,...D}=t,k=ol($l,r),[A,_]=f.useState(null),[E,I]=f.useState(null),R=st(s,ae=>_(ae)),[z,U]=f.useState(null),[B,F]=f.useState(null),V=Wx(r),[de,le]=f.useState(!1),xe=f.useRef(!1);f.useEffect(()=>{if(A)return Ix(A)},[A]),zx();const M=f.useCallback(ae=>{const[Ne,...Se]=V().map(Z=>Z.ref.current),[Ce]=Se.slice(-1),ke=document.activeElement;for(const Z of ae)if(Z===ke||(Z?.scrollIntoView({block:"nearest"}),Z===Ne&&E&&(E.scrollTop=0),Z===Ce&&E&&(E.scrollTop=E.scrollHeight),Z?.focus(),document.activeElement!==ke))return},[V,E]),O=f.useCallback(()=>M([z,A]),[M,z,A]);f.useEffect(()=>{de&&O()},[de,O]);const{onOpenChange:T,triggerPointerDownPosRef:K}=k;f.useEffect(()=>{if(A){let ae={x:0,y:0};const Ne=Ce=>{ae={x:Math.abs(Math.round(Ce.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(Ce.pageY)-(K.current?.y??0))}},Se=Ce=>{ae.x<=10&&ae.y<=10?Ce.preventDefault():A.contains(Ce.target)||T(!1),document.removeEventListener("pointermove",Ne),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",Ne),document.addEventListener("pointerup",Se,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Ne),document.removeEventListener("pointerup",Se,{capture:!0})}}},[A,T,K]),f.useEffect(()=>{const ae=()=>T(!1);return window.addEventListener("blur",ae),window.addEventListener("resize",ae),()=>{window.removeEventListener("blur",ae),window.removeEventListener("resize",ae)}},[T]);const[ve,P]=Vw(ae=>{const Ne=V().filter(ke=>!ke.disabled),Se=Ne.find(ke=>ke.ref.current===document.activeElement),Ce=Kw(Ne,ae,Se);Ce&&setTimeout(()=>Ce.ref.current.focus())}),J=f.useCallback((ae,Ne,Se)=>{const Ce=!xe.current&&!Se;(k.value!==void 0&&k.value===Ne||Ce)&&(U(ae),Ce&&(xe.current=!0))},[k.value]),W=f.useCallback(()=>A?.focus(),[A]),H=f.useCallback((ae,Ne,Se)=>{const Ce=!xe.current&&!Se;(k.value!==void 0&&k.value===Ne||Ce)&&F(ae)},[k.value]),te=l==="popper"?Fg:_w,pe=te===Fg?{side:x,sideOffset:p,align:g,alignOffset:b,arrowPadding:v,collisionBoundary:y,collisionPadding:j,sticky:S,hideWhenDetached:N,avoidCollisions:w}:{};return e.jsx(Rw,{scope:r,content:A,viewport:E,onViewportChange:I,itemRefCallback:J,selectedItem:z,onItemLeave:W,itemTextRefCallback:H,focusSelectedItem:O,selectedItemText:B,position:l,isPositioned:de,searchRef:ve,children:e.jsx(ed,{as:xR,allowPinchZoom:!0,children:e.jsx(Zi,{asChild:!0,trapped:k.open,onMountAutoFocus:ae=>{ae.preventDefault()},onUnmountAutoFocus:Ae(c,ae=>{k.trigger?.focus({preventScroll:!0}),ae.preventDefault()}),children:e.jsx(cc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:d,onPointerDownOutside:u,onFocusOutside:ae=>ae.preventDefault(),onDismiss:()=>k.onOpenChange(!1),children:e.jsx(te,{role:"listbox",id:k.contentId,"data-state":k.open?"open":"closed",dir:k.dir,onContextMenu:ae=>ae.preventDefault(),...D,...pe,onPlaced:()=>le(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...D.style},onKeyDown:Ae(D.onKeyDown,ae=>{const Ne=ae.ctrlKey||ae.altKey||ae.metaKey;if(ae.key==="Tab"&&ae.preventDefault(),!Ne&&ae.key.length===1&&P(ae.key),["ArrowUp","ArrowDown","Home","End"].includes(ae.key)){let Ce=V().filter(ke=>!ke.disabled).map(ke=>ke.ref.current);if(["ArrowUp","End"].includes(ae.key)&&(Ce=Ce.slice().reverse()),["ArrowUp","ArrowDown"].includes(ae.key)){const ke=ae.target,Z=Ce.indexOf(ke);Ce=Ce.slice(Z+1)}setTimeout(()=>M(Ce)),ae.preventDefault()}})})})})})})});Tw.displayName=uR;var pR="SelectItemAlignedPosition",_w=f.forwardRef((t,s)=>{const{__scopeSelect:r,onPlaced:l,...c}=t,d=ol($l,r),u=cl($l,r),[x,p]=f.useState(null),[g,b]=f.useState(null),v=st(s,R=>b(R)),y=Wx(r),j=f.useRef(!1),S=f.useRef(!0),{viewport:N,selectedItem:w,selectedItemText:D,focusSelectedItem:k}=u,A=f.useCallback(()=>{if(d.trigger&&d.valueNode&&x&&g&&N&&w&&D){const R=d.trigger.getBoundingClientRect(),z=g.getBoundingClientRect(),U=d.valueNode.getBoundingClientRect(),B=D.getBoundingClientRect();if(d.dir!=="rtl"){const ke=B.left-z.left,Z=U.left-ke,fe=R.left-Z,Ee=R.width+fe,Ie=Math.max(Ee,z.width),qe=window.innerWidth-cn,Ve=Bg(Z,[cn,Math.max(cn,qe-Ie)]);x.style.minWidth=Ee+"px",x.style.left=Ve+"px"}else{const ke=z.right-B.right,Z=window.innerWidth-U.right-ke,fe=window.innerWidth-R.right-Z,Ee=R.width+fe,Ie=Math.max(Ee,z.width),qe=window.innerWidth-cn,Ve=Bg(Z,[cn,Math.max(cn,qe-Ie)]);x.style.minWidth=Ee+"px",x.style.right=Ve+"px"}const F=y(),V=window.innerHeight-cn*2,de=N.scrollHeight,le=window.getComputedStyle(g),xe=parseInt(le.borderTopWidth,10),M=parseInt(le.paddingTop,10),O=parseInt(le.borderBottomWidth,10),T=parseInt(le.paddingBottom,10),K=xe+M+de+T+O,ve=Math.min(w.offsetHeight*5,K),P=window.getComputedStyle(N),J=parseInt(P.paddingTop,10),W=parseInt(P.paddingBottom,10),H=R.top+R.height/2-cn,te=V-H,pe=w.offsetHeight/2,ae=w.offsetTop+pe,Ne=xe+M+ae,Se=K-Ne;if(Ne<=H){const ke=F.length>0&&w===F[F.length-1].ref.current;x.style.bottom="0px";const Z=g.clientHeight-N.offsetTop-N.offsetHeight,fe=Math.max(te,pe+(ke?W:0)+Z+O),Ee=Ne+fe;x.style.height=Ee+"px"}else{const ke=F.length>0&&w===F[0].ref.current;x.style.top="0px";const fe=Math.max(H,xe+N.offsetTop+(ke?J:0)+pe)+Se;x.style.height=fe+"px",N.scrollTop=Ne-H+N.offsetTop}x.style.margin=`${cn}px 0`,x.style.minHeight=ve+"px",x.style.maxHeight=V+"px",l?.(),requestAnimationFrame(()=>j.current=!0)}},[y,d.trigger,d.valueNode,x,g,N,w,D,d.dir,l]);ba(()=>A(),[A]);const[_,E]=f.useState();ba(()=>{g&&E(window.getComputedStyle(g).zIndex)},[g]);const I=f.useCallback(R=>{R&&S.current===!0&&(A(),k?.(),S.current=!1)},[A,k]);return e.jsx(fR,{scope:r,contentWrapper:x,shouldExpandOnScrollRef:j,onScrollButtonChange:I,children:e.jsx("div",{ref:p,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:e.jsx(Qe.div,{...c,ref:v,style:{boxSizing:"border-box",maxHeight:"100%",...c.style}})})})});_w.displayName=pR;var mR="SelectPopperPosition",Fg=f.forwardRef((t,s)=>{const{__scopeSelect:r,align:l="start",collisionPadding:c=cn,...d}=t,u=Qx(r);return e.jsx(Lx,{...u,...d,ref:s,align:l,collisionPadding:c,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)"}})});Fg.displayName=mR;var[fR,_h]=fc($l,{}),Hg="SelectViewport",Ow=f.forwardRef((t,s)=>{const{__scopeSelect:r,nonce:l,...c}=t,d=cl(Hg,r),u=_h(Hg,r),x=st(s,d.onViewportChange),p=f.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:l}),e.jsx($x.Slot,{scope:r,children:e.jsx(Qe.div,{"data-radix-select-viewport":"",role:"presentation",...c,ref:x,style:{position:"relative",flex:1,overflow:"hidden auto",...c.style},onScroll:Ae(c.onScroll,g=>{const b=g.currentTarget,{contentWrapper:v,shouldExpandOnScrollRef:y}=u;if(y?.current&&v){const j=Math.abs(p.current-b.scrollTop);if(j>0){const S=window.innerHeight-cn*2,N=parseFloat(v.style.minHeight),w=parseFloat(v.style.height),D=Math.max(N,w);if(D<S){const k=D+j,A=Math.min(S,k),_=k-A;v.style.height=A+"px",v.style.bottom==="0px"&&(b.scrollTop=_>0?_:0,v.style.justifyContent="flex-end")}}}p.current=b.scrollTop})})})]})});Ow.displayName=Hg;var Pw="SelectGroup",[gR,hR]=fc(Pw),vR=f.forwardRef((t,s)=>{const{__scopeSelect:r,...l}=t,c=Xs();return e.jsx(gR,{scope:r,id:c,children:e.jsx(Qe.div,{role:"group","aria-labelledby":c,...l,ref:s})})});vR.displayName=Pw;var zw="SelectLabel",bR=f.forwardRef((t,s)=>{const{__scopeSelect:r,...l}=t,c=hR(zw,r);return e.jsx(Qe.div,{id:c.id,...l,ref:s})});bR.displayName=zw;var nx="SelectItem",[yR,Uw]=fc(nx),Iw=f.forwardRef((t,s)=>{const{__scopeSelect:r,value:l,disabled:c=!1,textValue:d,...u}=t,x=ol(nx,r),p=cl(nx,r),g=x.value===l,[b,v]=f.useState(d??""),[y,j]=f.useState(!1),S=st(s,k=>p.itemRefCallback?.(k,l,c)),N=Xs(),w=f.useRef("touch"),D=()=>{c||(x.onValueChange(l),x.onOpenChange(!1))};if(l==="")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(yR,{scope:r,value:l,disabled:c,textId:N,isSelected:g,onItemTextChange:f.useCallback(k=>{v(A=>A||(k?.textContent??"").trim())},[]),children:e.jsx($x.ItemSlot,{scope:r,value:l,disabled:c,textValue:b,children:e.jsx(Qe.div,{role:"option","aria-labelledby":N,"data-highlighted":y?"":void 0,"aria-selected":g&&y,"data-state":g?"checked":"unchecked","aria-disabled":c||void 0,"data-disabled":c?"":void 0,tabIndex:c?void 0:-1,...u,ref:S,onFocus:Ae(u.onFocus,()=>j(!0)),onBlur:Ae(u.onBlur,()=>j(!1)),onClick:Ae(u.onClick,()=>{w.current!=="mouse"&&D()}),onPointerUp:Ae(u.onPointerUp,()=>{w.current==="mouse"&&D()}),onPointerDown:Ae(u.onPointerDown,k=>{w.current=k.pointerType}),onPointerMove:Ae(u.onPointerMove,k=>{w.current=k.pointerType,c?p.onItemLeave?.():w.current==="mouse"&&k.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ae(u.onPointerLeave,k=>{k.currentTarget===document.activeElement&&p.onItemLeave?.()}),onKeyDown:Ae(u.onKeyDown,k=>{p.searchRef?.current!==""&&k.key===" "||(nR.includes(k.key)&&D(),k.key===" "&&k.preventDefault())})})})})});Iw.displayName=nx;var mi="SelectItemText",Bw=f.forwardRef((t,s)=>{const{__scopeSelect:r,className:l,style:c,...d}=t,u=ol(mi,r),x=cl(mi,r),p=Uw(mi,r),g=cR(mi,r),[b,v]=f.useState(null),y=st(s,D=>v(D),p.onItemTextChange,D=>x.itemTextRefCallback?.(D,p.value,p.disabled)),j=b?.textContent,S=f.useMemo(()=>e.jsx("option",{value:p.value,disabled:p.disabled,children:j},p.value),[p.disabled,p.value,j]),{onNativeOptionAdd:N,onNativeOptionRemove:w}=g;return ba(()=>(N(S),()=>w(S)),[N,w,S]),e.jsxs(e.Fragment,{children:[e.jsx(Qe.span,{id:p.textId,...d,ref:y}),p.isSelected&&u.valueNode&&!u.valueNodeHasChildren?dn.createPortal(d.children,u.valueNode):null]})});Bw.displayName=mi;var Fw="SelectItemIndicator",Hw=f.forwardRef((t,s)=>{const{__scopeSelect:r,...l}=t;return Uw(Fw,r).isSelected?e.jsx(Qe.span,{"aria-hidden":!0,...l,ref:s}):null});Hw.displayName=Fw;var qg="SelectScrollUpButton",qw=f.forwardRef((t,s)=>{const r=cl(qg,t.__scopeSelect),l=_h(qg,t.__scopeSelect),[c,d]=f.useState(!1),u=st(s,l.onScrollButtonChange);return ba(()=>
vendor: 5,248 bytes, line 636
636{if(r.viewport&&r.isPositioned){let x=function(){const g=p.scrollTop>0;d(g)};const p=r.viewport;return x(),p.addEventListener("scroll",x),()=>p.removeEventListener("scroll",x)}},[r.viewport,r.isPositioned]),c?e.jsx(Ww,{...t,ref:u,onAutoScroll:()=>{const{viewport:x,selectedItem:p}=r;x&&p&&(x.scrollTop=x.scrollTop-p.offsetHeight)}}):null});qw.displayName=qg;var $g="SelectScrollDownButton",$w=f.forwardRef((t,s)=>{const r=cl($g,t.__scopeSelect),l=_h($g,t.__scopeSelect),[c,d]=f.useState(!1),u=st(s,l.onScrollButtonChange);return ba(()=>{if(r.viewport&&r.isPositioned){let x=function(){const g=p.scrollHeight-p.clientHeight,b=Math.ceil(p.scrollTop)<g;d(b)};const p=r.viewport;return x(),p.addEventListener("scroll",x),()=>p.removeEventListener("scroll",x)}},[r.viewport,r.isPositioned]),c?e.jsx(Ww,{...t,ref:u,onAutoScroll:()=>{const{viewport:x,selectedItem:p}=r;x&&p&&(x.scrollTop=x.scrollTop+p.offsetHeight)}}):null});$w.displayName=$g;var Ww=f.forwardRef((t,s)=>{const{__scopeSelect:r,onAutoScroll:l,...c}=t,d=cl("SelectScrollButton",r),u=f.useRef(null),x=Wx(r),p=f.useCallback(()=>{u.current!==null&&(window.clearInterval(u.current),u.current=null)},[]);return f.useEffect(()=>()=>p(),[p]),ba(()=>{x().find(b=>b.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[x]),e.jsx(Qe.div,{"aria-hidden":!0,...c,ref:s,style:{flexShrink:0,...c.style},onPointerDown:Ae(c.onPointerDown,()=>{u.current===null&&(u.current=window.setInterval(l,50))}),onPointerMove:Ae(c.onPointerMove,()=>{d.onItemLeave?.(),u.current===null&&(u.current=window.setInterval(l,50))}),onPointerLeave:Ae(c.onPointerLeave,()=>{p()})})}),jR="SelectSeparator",NR=f.forwardRef((t,s)=>{const{__scopeSelect:r,...l}=t;return e.jsx(Qe.div,{"aria-hidden":!0,...l,ref:s})});NR.displayName=jR;var Wg="SelectArrow",CR=f.forwardRef((t,s)=>{const{__scopeSelect:r,...l}=t,c=Qx(r),d=ol(Wg,r),u=cl(Wg,r);return d.open&&u.position==="popper"?e.jsx(kx,{...c,...l,ref:s}):null});CR.displayName=Wg;var wR="SelectBubbleInput",Qw=f.forwardRef(({__scopeSelect:t,value:s,...r},l)=>{const c=f.useRef(null),d=st(l,c),u=aR(s);return f.useEffect(()=>{const x=c.current;if(!x)return;const p=window.HTMLSelectElement.prototype,b=Object.getOwnPropertyDescriptor(p,"value").set;if(u!==s&&b){const v=new Event("change",{bubbles:!0});b.call(x,s),x.dispatchEvent(v)}},[u,s]),e.jsx(Qe.select,{...r,style:{...TN,...r.style},ref:d,defaultValue:s})});Qw.displayName=wR;function Gw(t){return t===""||t===void 0}function Vw(t){const s=La(t),r=f.useRef(""),l=f.useRef(0),c=f.useCallback(u=>{const x=r.current+u;s(x),(function p(g){r.current=g,window.clearTimeout(l.current),g!==""&&(l.current=window.setTimeout(()=>p(""),1e3))})(x)},[s]),d=f.useCallback(()=>{r.current="",window.clearTimeout(l.current)},[]);return f.useEffect(()=>()=>window.clearTimeout(l.current),[]),[r,c,d]}function Kw(t,s,r){const c=s.length>1&&Array.from(s).every(g=>g===s[0])?s[0]:s,d=r?t.indexOf(r):-1;let u=AR(t,Math.max(d,0));c.length===1&&(u=u.filter(g=>g!==r));const p=u.find(g=>g.textValue.toLowerCase().startsWith(c.toLowerCase()));return p!==r?p:void 0}function AR(t,s){return t.map((r,l)=>t[(s+l)%t.length])}var SR=ww,ER=Sw,DR=Dw,MR=Mw,LR=Lw,kR=kw,RR=Ow,TR=Iw,_R=Bw,OR=Hw,PR=qw,zR=$w;function Dt({...t}){return e.jsx(SR,{"data-loc":"client/src/components/ui/select.tsx:10","data-slot":"select",...t})}function Mt({...t}){return e.jsx(DR,{"data-loc":"client/src/components/ui/select.tsx:22","data-slot":"select-value",...t})}function Lt({className:t,size:s="default",children:r,...l}){return e.jsxs(ER,{"data-loc":"client/src/components/ui/select.tsx:34","data-slot":"select-trigger","data-size":s,className:Me("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),...l,children:[r,e.jsx(MR,{"data-loc":"client/src/components/ui/select.tsx:44",asChild:!0,children:e.jsx(Xa,{"data-loc":"client/src/components/ui/select.tsx:45",className:"size-4 opacity-50"})})]})}function kt({className:t,children:s,position:r="popper",align:l="center",...c}){return e.jsx(LR,{"data-loc":"client/src/components/ui/select.tsx:59",children:e.jsxs(kR,{"data-loc":"client/src/components/ui/select.tsx:60","data-slot":"select-content",className:Me("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
636de-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:l,...c,children:[e.jsx(UR,{"data-loc":"client/src/components/ui/select.tsx:72"}),e.jsx(RR,{"data-loc":"client/src/components/ui/select.tsx:73",className:Me("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:s}),e.jsx(IR,{"data-loc":"client/src/components/ui/select.tsx:82"})]})})}function He({className:t,children:s,...r}){return e.jsxs(TR,{"data-loc":"client/src/components/ui/select.tsx:107","data-slot":"select-item",className:Me("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(OR,{"data-loc":"client/src/components/ui/select.tsx:116",children:e.jsx(Ya,{"data-loc":"client/src/components/ui/select.tsx:117",className:"size-4"})})}),e.jsx(_R,{"data-loc":"client/src/components/ui/select.tsx:120",children:s})]})}function UR({className:t,...s}){return e.jsx(PR,{"data-loc":"client/src/components/ui/select.tsx:143","data-slot":"select-scroll-up-button",className:Me("flex cursor-default items-center justify-center py-1",t),...s,children:e.jsx(Qi,{"data-loc":"client/src/components/ui/select.tsx:151",className:"size-4"})})}function IR({className:t,...s}){return e.jsx(zR,{"data-loc":"client/src/components/ui/select.tsx:161","data-slot":"select-scroll-down-button",className:Me("flex cursor-default items-center justify-center py-1",t),...s,children:e.jsx(Xa,{"data-loc":"client/src/components/ui/select.tsx:169",className:"size-4"})})}const BR={site:"Site",facebook:"Facebook",instagram:"Instagram",indicacao:"Indicação",telefone:"Telefone",whatsapp:"WhatsApp",outro:"Outro","Site imobiliária":"Site imobiliária"},FR={property_contact:"Contato Imóvel",whatsapp_chat:"WhatsApp",general_contact:"Contato Geral",newsletter:"Newsletter",schedule_visit:"Agendar Visita",financing_simulation:"Simulação",enterprise_contact:"Empreendimento"},HR={mobile:"Mobile",desktop:"Desktop",tablet:"Tablet","(desconhecido)":"Desconhecido"},qR={novo:"Novo",em_atendimento:"Em Atendimento",qualificado:"Qualificado",lead_ouro:"Lead Ouro",ganho:"Ganho",perdido:"Perdido"},$R={frio:"Frio",morno:"Morno",quente:"Quente",urgente:"Urgente",indefinido:"Indefinido"},WR={frio:"#6b7280",morno:"#f59e0b",quente:"#ef4444",urgente:"#dc2626",indefinido:"#374151"},yj=["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"];function kl({label:t,count:s,total:r,color:l="bg-primary"}){const c=r>0?s/r*100:0;return e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:111",className:"flex items-center gap-2 group",children:[e.jsx("span",{"data-loc":"client/src/pages/Home.tsx:112",className:"text-xs text-muted-foreground w-36 shrink-0 truncate",title:t,children:t}),e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:113",className:"flex-1 h-1.5 bg-muted rounded-full overflow-hidden",children:e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:114",className:`h-full ${l} rounded-full transition-all duration-500`,style:{width:`${c}%`}})}),e.jsx("span",{"data-loc":"client/src/pages/Home.tsx:116",className:"text-xs font-medium text-foreground w-7 text-right tabular-nums",children:s})]})}function jj({data:t,size:s=120}){const r=t.reduce((p,g)=>p+g.count,0);if(r===0)return e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:124",className:"text-xs text-muted-foreground text-center py-4",children:"Sem dados"});const l=s/2-8,c=s/2,d=s/2;let u=-Math.PI/2;const x=t.map(p=>{const g=p.count/r*2*Math.PI,b=c+l*Math.cos(u),v=d+l*Math.sin(u);u+=g;const y=c+l*Math.cos(u),j=d+l*Math.sin(u),S=g>Math.PI?1:0,N=`M ${c} ${d} L ${b} ${v} A ${l} ${l} 0 ${S} 1 ${y} ${j} Z`;return{...p,path:N,pct:Math.round(p.count/r*100)}});return e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:144",className:"flex items-center gap-4",children:[e.jsx("svg",{"data-loc":"client/src/pages/Home.tsx:145",width:s,height:s,className:"shrink-0",children:x.map((p,g)=>e.jsx("path",{"data-loc":"client/src/pages/Home.tsx:147",d:p.path,fill:p.color,stroke:"#111113",strokeWidth:1.5,children:e.jsxs("title",{"data-loc":"client/src/pages/Home.tsx:148",children:[p.label,": ",p.count," (",p.pct,"%)"]})},g))}),e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:152",className:"space-y-1.5 flex-1 min-w-0",children:x.map(p=>e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:154",className:"flex items-center gap-1.5",children:[e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:155",className:"w-2 h-2 rounded-full shrink-0",style:{backgroundColor:p.color}}),e.jsx("span",{"data-loc":"client/src/pages/Home.tsx:156",className:"text-[10px] text-muted-foreground truncate flex-1",children:$R[p.label]||p.label}),e.jsx("span",{"data-loc":"client/src/pages/Home.tsx:157",className:"text-[10px] font-medium text-foreground tabular-nums",children:p.count}),e.jsxs("span",{"data-loc":"client/src/pages/Home.tsx:158",className:"text-[10px] text-muted-foreground",children:["(",p.pct,"%)"]})]},p.label))})]})}function QR({atendimentos:t,visitas:s,propostas:r,negocios:l,growthPct:c,growthAbs:d}){const g=["#20c997","#a855f7","#f59e0b","#374151"],b=["Atendimentos","Visitas","Propostas","Negócios"],v=[t,s,r,l],y=[1,.72,.44,.2],j=[.72,.44,.2,.04],S=[100,t>0?Math.round(s/t*100):0,t>0?Math.round(r/t*100):0,t>0?Math.round(l/t*100):0],N=b.map((w,D)=>{const k=y[D]*260,A=j[D]*260,_=(260-k)/2,E=(260-A)/2,I=D*50,R=(D+1)*50;
636return{label:w,value:v[D],color:g[D],pct:S[D],points:`${_},${I} ${_+k},${I} ${E+A},${R} ${E},${R}`,midY:I+50/2,badgeX:_+k,badgeY:I+4}});return e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:211",className:"flex flex-col items-center gap-2",children:[e.jsx("svg",{"data-loc":"client/src/pages/Home.tsx:212",viewBox:"0 0 260 200",className:"w-full",style:{maxHeight:180},children:N.map((w,D)=>e.jsxs("g",{"data-loc":"client/src/pages/Home.tsx:214",children:[e.jsx("polygon",{"data-loc":"client/src/pages/Home.tsx:215",points:w.points,fill:w.color}),e.jsxs("text",{"data-loc":"client/src/pages/Home.tsx:217",x:260/2,y:w.midY+4,textAnchor:"middle",fill:"white",fontSize:"11",fontWeight:"600",children:[w.label,": ",w.value]}),D>0&&e.jsxs("g",{"data-loc":"client/src/pages/Home.tsx:226",transform:`translate(${w.badgeX-2}, ${w.badgeY})`,children:[e.jsx("circle",{"data-loc":"client/src/pages/Home.tsx:227",cx:"14",cy:"10",r:"13",fill:"white",stroke:"#e5e7eb",strokeWidth:"1"}),e.jsxs("text",{"data-loc":"client/src/pages/Home.tsx:228",x:"14",y:"14",textAnchor:"middle",fill:"#374151",fontSize:"8.5",fontWeight:"700",children:[w.pct,"%"]})]})]},w.label))}),e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:237",className:"flex items-center gap-2",children:[e.jsxs("span",{"data-loc":"client/src/pages/Home.tsx:238",className:`text-xs font-bold px-3 py-1 rounded ${(c??0)>=0,"bg-blue-500 text-white"}`,children:[(c??0)>=0?"+":"",c??0,"%"]}),e.jsxs("span",{"data-loc":"client/src/pages/Home.tsx:243",className:`text-xs font-bold px-3 py-1 rounded ${(d??0)<0?"bg-red-500 text-white":"bg-emerald-500 text-white"}`,children:[(d??0)>=0?"+":"",d??0]})]})]})}function GR(){const{user:t}=ka(),[,s]=fs(),[r,l]=f.useState(30),[c,d]=f.useState(!0),u=new Date,[x,p]=f.useState(u.getMonth()+1),[g,b]=f.useState(u.getFullYear()),[v,y]=f.useState("todas"),j=f.useMemo(()=>({month:x,year:g,unidade:v==="todas"?void 0:v}),[x,g,v]),{data:S,isLoading:N}=Y.dashboard.stats.useQuery(),{data:w,isLoading:D}=Y.siteLeads.analytics.useQuery({days:r}),{data:k,isLoading:A}=Y.dashboard.salesIndicators.useQuery(j),_=[{label:"Leads Ativos",value:S?.activeLeads??0,icon:Gy,color:"text-primary",bg:"bg-primary/10",path:"/leads"},{label:"Conversões do Mês",value:S?.monthConversions??0,icon:Pl,color:"text-emerald-400",bg:"bg-emerald-400/10",path:"/kanban"},{label:"Agentes Ativos",value:S?.activeAgents??0,icon:un,color:"text-blue-400",bg:"bg-blue-400/10",path:"/usuarios"}],E=w?.bySource?.reduce((M,O)=>M+O.count,0)??0,I=w?.byMedium?.reduce((M,O)=>M+O.count,0)??0,R=w?.byFormType?.reduce((M,O)=>M+O.count,0)??0,z=w?.byDevice?.reduce((M,O)=>M+O.count,0)??0,U=w?.byStatus?.reduce((M,O)=>M+O.count,0)??0,B=w?.byCampaign?.reduce((M,O)=>M+O.count,0)??0,F=w&&w.total>0?Math.round(w.convertedSent/w.total*100):0,V=w&&w.total>0?Math.round(w.withFbp/w.total*100):0,de=f.useMemo(()=>{if(!k?.termometro)return[];const M=["indefinido","frio","morno","quente","urgente"];return[...k.termometro].sort((O,T)=>M.indexOf(O.label)-M.indexOf(T.label)).map(O=>({label:O.label,count:O.count,color:WR[O.label]??"#6b7280"}))},[k?.termometro]),le=f.useMemo(()=>k?.ultimaInteracao?[{label:"até 15 dias",count:k.ultimaInteracao.ate15,color:"#20c997"},{label:"16 a 30 dias",count:k.ultimaInteracao.de16a30,color:"#f59e0b"},{label:"acima de 31 dias",count:k.ultimaInteracao.acima31,color:"#ef4444"}].filter(M=>M.count>0):[],[k?.ultimaInteracao]),xe=Array.from({length:6},(M,O)=>u.getFullYear()-O);return e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:314",className:"space-y-4 md:space-y-6 p-3 md:p-4 lg:p-6 min-h-full",children:[e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:316",children:[e.jsxs("h1",{"data-loc":"client/src/pages/Home.tsx:317",className:"text-xl font-semibold text-foreground",children:["Olá, ",t?.name?.split(" ")[0]??"Usuário"]}),e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:320",className:"text-sm text-muted-foreground mt-1",children:"Visão geral do CRM H2O"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:326",className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:[_.map(M=>e.jsx(Wt,{"data-loc":"client/src/pages/Home.tsx:328",className:"bg-card border-border hover:border-primary/30 transition-colors cursor-pointer",onClick:()=>M.path!=="#"&&s(M.path),children:e.jsxs(ta,{"data-loc":"client/src/pages/Home.tsx:333",className:"p-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:334",className:"flex items-center justify-between",children:[e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:335",className:`p-2 rounded-lg ${M.bg}`,children:e.jsx(M.icon,{"data-loc":"client/src/pages/Home.tsx:336",className:`h-4 w-4 ${M.color}`})}),N?e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:339",className:"h-7 w-12 bg-muted animate-pulse rounded"}):e.jsx("span",{"data-loc":"client/src/pages/Home.tsx:341",className:"text-2xl font-bold text-foreground tracking-tight",children:M.value})]}),e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:344",className:"text-xs text-muted-foreground mt-3",children:M.label})]})},M.label)),e.jsx(Wt,{"data-loc":"client/src/pages/Home.tsx:350",className:"bg-card border-border hover:border-primary/30 transition-colors cursor-pointer col-span-2 lg:col-span-1",onClick:()=>s("/usuarios"),children:e.jsxs(ta,{"data-loc":"client/src/pages/Home.tsx:354",className:"p-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:355",className:"flex items-center justify-between mb-3",children:[e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:356",className:"p-2 rounded-lg bg-blue-400/10",children:e.jsx(un,{"data-loc":"client/src/pages/Home.tsx:357",className:"h-4 w-4 text-blue-400"})}),N?e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:360",className:"h-5 w-10 bg-muted animate-pulse rounded"}):e.jsxs("span",{"data-loc":"client/src/pages/Home.tsx:362",className:"text-xs text-muted-foreground",children:[S?.activeAgents??0," total"]})]}),e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:365",className:"text-xs text-muted-foreground mb-2",children:"Agentes Ativos"}),N?e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:367",className:"space-y-1",children:[1,2,3].map(M=>e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:368",className:"h-4 bg-muted animate-pulse rounded"},M))}):e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:371",className:"flex items-center gap-2 mt-2",children:[e.jsx("span",{"data-loc":"client/src/pages/Home.tsx:372",className:"text-2xl font-bold text-foreground",children:S?.activeAgents??0}),e.jsx("span",{"data-loc":"client/src/pages/Home.tsx:373",className:"text-xs text-muted-foreground",children:"agentes disponÃveis"})]})]})})]}),e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:381",className:"border border-border rounded-xl overflow-hidden",children:[e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:383",className:"flex flex-wrap items-center justify-between gap-3 px-4 py-3 bg-card border-b border-border",children:[e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:384",className:"flex items-center gap-2",children:[e.jsx(Ox,{"data-loc":"client/src/pages/Home.tsx:385",className:"h-4 w-4 text-primary"}),e.jsx("span",{"data-loc":"client/src/pages/Home.tsx:386",className:"text-sm font-semibold text-foreground",children:"Indicadores de Venda"}),e.jsxs(Qt,{"data-loc":"client/src/pages/Home.tsx:387",className:"bg-primary/10 text-primary border-0 text-[10px]",children:[yj[x-1]," ",g]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:391",className:"flex items-center gap-2 flex-wrap",children:[e.jsxs(Dt,{"data-loc":"client/src/pages/Home.tsx:393",value:String(x),onValueChange:M=>p(Number(M)),children:[e.jsx(Lt,{"data-loc":"client/src/pages/Home.tsx:394",className:"h-7 text-xs bg-muted border-border text-foreground w-28",children:e.jsx(Mt,{"data-loc":"client/src/pages/Home.tsx:395"})}),e.jsx(kt,{"data-loc":"client/src/pages/Home.tsx:397",className:"bg-card border-border",children:yj.map((M,O)=>e.jsx(He,{"data-loc":"client/src/pages/Home.tsx:399",value:String(O+1),className:"text-xs",children:M},O+1))})]}),e.jsxs(Dt,{"data-loc":"client/src/pages/Home.tsx:404",value:String(g),onValueChange:M=>b(Number(M)),children:[e.jsx(Lt,{"data-loc":"client/src/pages/Home.tsx:405",className:"h-7 text-xs bg-muted border-border text-foreground w-20",children:e.jsx(Mt,{"data-loc":"client/src/pages/Home.tsx:406"})}),e.jsx(kt,{"data-loc":"client/src/pages/Home.tsx:408",className:"bg-card border-border",children:xe.map(M=>e.jsx(He,{"data-loc":"client/src/pages/Home.tsx:410",value:String(M),className:"text-xs",children:M},M))})]}),e.jsxs(Dt,{"data-loc":"client/src/pages/Home.tsx:415",value:v,onValueChange:y,children:[e.jsx(Lt,{"data-loc":"client/src/pages/Home.tsx:416",className:"h-7 text-xs bg-muted border-border text-foreground w-36",children:e.jsx(Mt,{"data-loc":"client/src/pages/Home.tsx:417"})}),e.jsxs(kt,{"data-loc":"client/src/pages/Home.tsx:419",className:"bg-card border-border",children:[e.jsx(He,{"data-loc":"client/src/pages/Home.tsx:420",value:"todas",className:"text-xs",children:"Todas as unidades"}),e.jsx(He,{"data-loc":"client/src/pages/Home.tsx:421",value:"Pelotas",className:"text-xs",children:"Pelotas"})]})]}),e.jsx(oe,{"data-loc":"client/src/pages/Home.tsx:424",variant:"ghost",size:"sm",className:"h-7 w-7 p-0 text-muted-foreground",onClick:()=>d(M=>!M),children:c?e.jsx(Qi,{"data-loc":"client/src/pages/Home.tsx:430",className:"h-4 w-4"}):e.jsx(Xa,{"data-loc":"client/src/pages/Home.tsx:430",className:"h-4 w-4"})})]})]}),c&&e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:436",className:"p-4 bg-muted/30 space-y-4",children:A?e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:438",className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:Array.from({length:4}).map((M,O)=>e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:440",className:"h-28 bg-muted animate-pulse rounded-lg"},O))}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:446",className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-4",children:[e.jsxs(Wt,{"data-loc":"client/src/pages/Home.tsx:449",className:"bg-card border-border md:col-span-1",children:[e.jsx(Es,{"data-loc":"client/src/pages/Home.tsx:450",className:"pb-2",children:e.jsxs(Ds,{"data-loc":"client/src/pages/Home.tsx:451",className:"text-xs font-medium text-foreground flex items-center gap-2",children:[e.jsx(Pl,{"data-loc":"client/src/pages/Home.tsx:452",className:"w-3.5 h-3.5 text-emerald-400"})," Funil de Vendas",e.jsx("span",{"data-loc":"client/src/pages/Home.tsx:453",className:"ml-auto text-[10px] text-muted-foreground",children:k?.funil?.growthAbs!==void 0&&e.jsxs("span",{"data-loc":"client/src/pages/Home.tsx:455",className:k.funil.growthAbs>=0?"text-emerald-400":"text-red-400",children:[k.funil.growthAbs>=0?"+":"",k.funil.growthAbs," ","(",k.funil.growthPct>=0?"+":"",k.funil.growthPct,"%)"]})})]})}),e.jsx(ta,{"data-loc":"client/src/pages/Home.tsx:463",children:k?.funil?e.jsx(QR,{"data-loc":"client/src/pages/Home.tsx:465",atendimentos:k.funil.atendimentos,visitas:k.funil.visitas,propostas:k.funil.propostas,negocios:k.funil.negocios,growthPct:k.funil.growthPct,growthAbs:k.funil.growthAbs}):e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:474",className:"text-xs text-muted-foreground text-center py-4",children:"Sem dados"})})]}),e.jsxs(Wt,{"data-loc":"client/src/pages/Home.tsx:480",className:"bg-card border-border",children:[e.jsx(Es,{"data-loc":"client/src/pages/Home.tsx:481",className:"pb-2",children:e.jsxs(Ds,{"data-loc":"client/src/pages/Home.tsx:482",className:"text-xs font-medium text-foreground flex items-center gap-2",children:[e.jsx(Za,{"data-loc":"client/src/pages/Home.tsx:483",className:"w-3.5 h-3.5 text-amber-400"})," Ãltima Interação",e.jsxs("span",{"data-loc":"client/src/pages/Home.tsx:484",className:"ml-auto text-[10px] text-muted-foreground",children:[k?.ultimaInteracao?.total??0," ativos"]})]})}),e.jsx(ta,{"data-loc":"client/src/pages/Home.tsx:489",children:e.jsx(jj,{"data-loc":"client/src/pages/Home.tsx:490",data:le,size:100})})]}),e.jsxs(Wt,{"data-loc":"client/src/pages/Home.tsx:495",className:"bg-card border-border",children:[e.jsx(Es,{"data-loc":"client/src/pages/Home.tsx:496",className:"pb-2",children:e.jsxs(Ds,{"data-loc":"client/src/pages/Home.tsx:497",className:"text-xs font-medium text-foreground flex items-center gap-2",children:[e.jsx(xC,{"data-loc":"client/src/pages/Home.tsx:498",className:"w-3.5 h-3.5 text-red-400"})," Termômetro"]})}),e.jsx(ta,{"data-loc":"client/src/pages/Home.tsx:501",children:e.jsx(jj,{"data-loc":"client/src/pages/Home.tsx:502",data:de,size:100})})]})]}),e.jsxs(Wt,{"data-loc":"client/src/pages/Home.tsx:510",className:"bg-card border-border",children:[e.jsx(Es,{"data-loc":"client/src/pages/Home.tsx:511",className:"pb-2",children:e.jsxs(Ds,{"data-loc":"client/src/pages/Home.tsx:512",className:"text-xs font-medium text-foreground flex items-center gap-2",children:[e.jsx(lr,{"data-loc":"client/src/pages/Home.tsx:513",className:"w-3.5 h-3.5 text-blue-400"})," MÃdia de Origem (atendimentos ativos)"]})}),e.jsx(ta,{"data-loc":"client/src/pages/Home.tsx:516",children:k?.midiaOrigem&&k.midiaOrigem.length>0?e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:518",className:"space-y-2",children:(()=>{const M=k.midiaOrigem.reduce((O,T)=>O+T.count,0);return k.midiaOrigem.map(O=>e.jsx(kl,{"data-loc":"client/src/pages/Home.tsx:522",label:BR[O.label]||O.label,count:O.count,total:M,color:"bg-blue-500"},O.label))})()}):e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:533",className:"text-xs text-muted-foreground text-center py-3",children:"Sem atendimentos ativos"})})]})]})})]}),e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:544",className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:545",children:[e.jsx("h2",{"data-loc":"client/src/pages/Home.tsx:546",className:"text-base font-semibold text-foreground",children:"Analytics â Leads do Site"}),e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:547",className:"text-xs text-muted-foreground mt-0.5",children:"Rastreamento de origem, dispositivo e Meta CAPI"})]}),e.jsxs(Dt,{"data-loc":"client/src/pages/Home.tsx:549",value:String(r),onValueChange:M=>l(Number(M)),children:[e.jsx(Lt,{"data-loc":"client/src/pages/Home.tsx:550",className:"w-full sm:w-32 h-8 text-xs bg-card border-border text-foreground",children:e.jsx(Mt,{"data-loc":"client/src/pages/Home.tsx:551"})}),e.jsxs(kt,{"data-loc":"client/src/pages/Home.tsx:553",className:"bg-card border-border",children:[e.jsx(He,{"data-loc":"client/src/pages/Home.tsx:554",value:"7",children:"Ãltimos 7 dias"}),e.jsx(He,{"data-loc":"client/src/pages/Home.tsx:555",value:"14",children:"Ãltimos 14 dias"}),e.jsx(He,{"data-loc":"client/src/pages/Home.tsx:556",value:"30",children:"Ãltimos 30 dias"}),e.jsx(He,{"data-loc":"client/src/pages/Home.tsx:557",value:"60",children:"Ãltimos 60 dias"}),e.jsx(He,{"data-loc":"client/src/pages/Home.tsx:558",value:"90",children:"Ãltimos 90 dias"})]})]})]}),e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:564",className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-3",children:[{label:"Total Leads Site",value:w?.total??0,icon:lr,color:"text-blue-400",bg:"bg-blue-400/10"},{label:"Com fbp (Meta)",value:w?.withFbp??0,icon:bh,color:"text-violet-400",bg:"bg-violet-400/10",sub:`${V}%`},{label:"Com fbc (Click)",value:w?.withFbc??0,icon:Wy,color:"text-amber-400",bg:"bg-amber-400/10"},{label:"CONVERTED Enviados",value:w?.convertedSent??0,icon:Ju,color:"text-emerald-400",bg:"bg-emerald-400/10",sub:`${F}%`},{label:"Lead Ouro",value:w?.byStatus?.find(M=>M.label==="lead_ouro")?.count??0,icon:Pl,color:"text-primary",bg:"bg-primary/10"},{label:"Perdidos",value:w?.byStatus?.find(M=>M.label==="perdido")?.count??0,icon:ms,color:"text-red-400",bg:"bg-red-400/10"}].map(M=>e.jsx(Wt,{"data-loc":"client/src/pages/Home.tsx:573",className:"bg-card border-border",children:e.jsxs(ta,{"data-loc":"client/src/pages/Home.tsx:574",className:"p-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:575",className:"flex items-center justify-between mb-2",children:[e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:576",className:`p-1.5 rounded-md ${M.bg}`,children:e.jsx(M.icon,{"data-loc":"client/src/pages/Home.tsx:577",className:`h-3.5 w-3.5 ${M.color}`})}),D?e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:580",
636className:"h-6 w-10 bg-muted animate-pulse rounded"}):e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:582",className:"text-right",children:[e.jsx("span",{"data-loc":"client/src/pages/Home.tsx:583",className:"text-xl font-bold text-foreground tabular-nums",children:M.value}),"sub"in M&&M.sub&&e.jsx("span",{"data-loc":"client/src/pages/Home.tsx:584",className:"text-[10px] text-muted-foreground ml-1",children:M.sub})]})]}),e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:588",className:"text-[10px] text-muted-foreground leading-tight",children:M.label})]})},M.label))}),e.jsxs("div",{"data-loc":"client/src/pages/Home.tsx:595",className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4",children:[e.jsxs(Wt,{"data-loc":"client/src/pages/Home.tsx:596",className:"bg-card border-border",children:[e.jsx(Es,{"data-loc":"client/src/pages/Home.tsx:597",className:"pb-2",children:e.jsxs(Ds,{"data-loc":"client/src/pages/Home.tsx:598",className:"text-xs font-medium text-foreground flex items-center gap-2",children:[e.jsx(lr,{"data-loc":"client/src/pages/Home.tsx:599",className:"w-3.5 h-3.5 text-blue-400"})," Origem (utm_source)"]})}),e.jsx(ta,{"data-loc":"client/src/pages/Home.tsx:602",className:"space-y-2",children:D?Array.from({length:4}).map((M,O)=>e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:603",className:"h-5 bg-muted animate-pulse rounded"},O)):w?.bySource?.length?w.bySource.slice(0,8).map(M=>e.jsx(kl,{"data-loc":"client/src/pages/Home.tsx:605",label:M.label,count:M.count,total:E,color:"bg-blue-500"},M.label)):e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:606",className:"text-xs text-muted-foreground py-3 text-center",children:"Sem dados"})})]}),e.jsxs(Wt,{"data-loc":"client/src/pages/Home.tsx:610",className:"bg-card border-border",children:[e.jsx(Es,{"data-loc":"client/src/pages/Home.tsx:611",className:"pb-2",children:e.jsxs(Ds,{"data-loc":"client/src/pages/Home.tsx:612",className:"text-xs font-medium text-foreground flex items-center gap-2",children:[e.jsx(Pl,{"data-loc":"client/src/pages/Home.tsx:613",className:"w-3.5 h-3.5 text-violet-400"})," MÃdia (utm_medium)"]})}),e.jsx(ta,{"data-loc":"client/src/pages/Home.tsx:616",className:"space-y-2",children:D?Array.from({length:4}).map((M,O)=>e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:617",className:"h-5 bg-muted animate-pulse rounded"},O)):w?.byMedium?.length?w.byMedium.slice(0,8).map(M=>e.jsx(kl,{"data-loc":"client/src/pages/Home.tsx:619",label:M.label,count:M.count,total:I,color:"bg-violet-500"},M.label)):e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:620",className:"text-xs text-muted-foreground py-3 text-center",children:"Sem dados"})})]}),e.jsxs(Wt,{"data-loc":"client/src/pages/Home.tsx:624",className:"bg-card border-border",children:[e.jsx(Es,{"data-loc":"client/src/pages/Home.tsx:625",className:"pb-2",children:e.jsxs(Ds,{"data-loc":"client/src/pages/Home.tsx:626",className:"text-xs font-medium text-foreground flex items-center gap-2",children:[e.jsx(Gy,{"data-loc":"client/src/pages/Home.tsx:627",className:"w-3.5 h-3.5 text-primary"})," Campanha (utm_campaign)"]})}),e.jsx(ta,{"data-loc":"client/src/pages/Home.tsx:630",className:"space-y-2",children:D?Array.from({length:4}).map((M,O)=>e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:631",className:"h-5 bg-muted animate-pulse rounded"},O)):w?.byCampaign?.filter(M=>M.label!=="(none)").length?w.byCampaign.filter(M=>M.label!=="(none)").slice(0,8).map(M=>e.jsx(kl,{"data-loc":"client/src/pages/Home.tsx:633",label:M.label,count:M.count,total:B,color:"bg-primary"},M.label)):e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:634",className:"text-xs text-muted-foreground py-3 text-center",children:"Sem campanhas rastreadas"})})]}),e.jsxs(Wt,{"data-loc":"client/src/pages/Home.tsx:638",className:"bg-card border-border",children:[e.jsx(Es,{"data-loc":"client/src/pages/Home.tsx:639",className:"pb-2",children:e.jsxs(Ds,{"data-loc":"client/src/pages/Home.tsx:640",className:"text-xs font-medium text-foreground flex items-center gap-2",children:[e.jsx(Wy,{"data-loc":"client/src/pages/Home.tsx:641",className:"w-3.5 h-3.5 text-amber-400"})," Tipo de Formulário"]})}),e.jsx(ta,{"data-loc":"client/src/pages/Home.tsx:644",className:"space-y-2",children:D?Array.from({length:4}).map((M,O)=>e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:645",className:"h-5 bg-muted animate-pulse rounded"},O)):w?.byFormType?.length?w.byFormType.slice(0,8).map(M=>e.jsx(kl,{"data-loc":"client/src/pages/Home.tsx:647",label:FR[M.label]||M.label,count:M.count,total:R,color:"bg-
636amber-500"},M.label)):e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:648",className:"text-xs text-muted-foreground py-3 text-center",children:"Sem dados"})})]}),e.jsxs(Wt,{"data-loc":"client/src/pages/Home.tsx:652",className:"bg-card border-border",children:[e.jsx(Es,{"data-loc":"client/src/pages/Home.tsx:653",className:"pb-2",children:e.jsxs(Ds,{"data-loc":"client/src/pages/Home.tsx:654",className:"text-xs font-medium text-foreground flex items-center gap-2",children:[e.jsx(RM,{"data-loc":"client/src/pages/Home.tsx:655",className:"w-3.5 h-3.5 text-emerald-400"})," Dispositivo"]})}),e.jsx(ta,{"data-loc":"client/src/pages/Home.tsx:658",className:"space-y-2",children:D?Array.from({length:3}).map((M,O)=>e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:659",className:"h-5 bg-muted animate-pulse rounded"},O)):w?.byDevice?.length?w.byDevice.slice(0,6).map(M=>e.jsx(kl,{"data-loc":"client/src/pages/Home.tsx:661",label:HR[M.label]||M.label,count:M.count,total:z,color:"bg-emerald-500"},M.label)):e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:662",className:"text-xs text-muted-foreground py-3 text-center",children:"Sem dados"})})]}),e.jsxs(Wt,{"data-loc":"client/src/pages/Home.tsx:666",className:"bg-card border-border",children:[e.jsx(Es,{"data-loc":"client/src/pages/Home.tsx:667",className:"pb-2",children:e.jsxs(Ds,{"data-loc":"client/src/pages/Home.tsx:668",className:"text-xs font-medium text-foreground flex items-center gap-2",children:[e.jsx(Ju,{"data-loc":"client/src/pages/Home.tsx:669",className:"w-3.5 h-3.5 text-emerald-400"})," Status do Lead"]})}),e.jsx(ta,{"data-loc":"client/src/pages/Home.tsx:672",className:"space-y-2",children:D?Array.from({length:4}).map((M,O)=>e.jsx("div",{"data-loc":"client/src/pages/Home.tsx:673",className:"h-5 bg-muted animate-pulse rounded"},O)):w?.byStatus?.length?w.byStatus.slice(0,8).map(M=>e.jsx(kl,{"data-loc":"client/src/pages/Home.tsx:675",label:qR[M.label]||M.label,count:M.count,total:U,color:M.label==="lead_ouro"?"bg-primary":M.label==="ganho"?"bg-emerald-500":M.label==="perdido"?"bg-red-500":M.label==="qualificado"?"bg-blue-500":"bg-muted-foreground"},M.label)):e.jsx("p",{"data-loc":"client/src/pages/Home.tsx:682",className:"text-xs text-muted-foreground py-3 text-center",children:"Sem dados"})})]})]})]})}var Gx="Dialog",[Yw,Xw]=zs(Gx),[VR,vn]=Yw(Gx),Zw=t=>{const{__scopeDialog:s,children:r,open:l,defaultOpen:c,onOpenChange:d,modal:u=!0}=t,x=f.useRef(null),p=f.useRef(null),[g,b]=nl({prop:l,defaultProp:c??!1,onChange:d,caller:Gx});return e.jsx(VR,{scope:s,triggerRef:x,contentRef:p,contentId:Xs(),titleId:Xs(),descriptionId:Xs(),open:g,onOpenChange:b,onOpenToggle:f.useCallback(()=>b(v=>!v),[b]),modal:u,children:r})};Zw.displayName=Gx;var Jw="DialogTrigger",e3=f.forwardRef((t,s)=>{const{__scopeDialog:r,...l}=t,c=vn(Jw,r),d=st(s,c.triggerRef);return e.jsx(Qe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":c.open,"aria-controls":c.contentId,"data-state":zh(c.open),...l,ref:d,onClick:Ae(t.onClick,c.onOpenToggle)})});e3.displayName=Jw;var Oh="DialogPortal",[KR,t3]=Yw(Oh,{forceMount:void 0}),a3=t=>{const{__scopeDialog:s,forceMount:r,children:l,container:c}=t,d=vn(Oh,s);return e.jsx(KR,{scope:s,forceMount:r,children:f.Children.map(l,u=>e.jsx(Fa,{present:r||d.open,children:e.jsx(uc,{asChild:!0,container:c,children:u})}))})};a3.displayName=Oh;var rx="DialogOverlay",s3=f.forwardRef((t,s)=>{const r=t3(rx,t.__scopeDialog),{forceMount:l=r.forceMount,...c}=t,d=vn(rx,t.__scopeDialog);return d.modal?e.jsx(Fa,{present:l||d.open,children:e.jsx(XR,{...c,ref:s})}):null});s3.displayName=rx;var YR=tl("DialogOverlay.RemoveScroll"),XR=f.forwardRef((t,s)=>{const{__scopeDialog:r,...l}=t,c=vn(rx,r);return e.jsx(ed,{as:YR,allowPinchZoom:!0,shards:[c.contentRef],children:e.jsx(Qe.div,{"data-state":zh(c.open),...l,ref:s,style:{pointerEvents:"auto",...l.style}})})}),Wl="DialogContent",n3=f.forwardRef((t,s)=>{const r=t3(Wl,t.__scopeDialog),{forceMount:l=r.forceMount,...c}=t,d=vn(Wl,t.__scopeDialog);return e.jsx(Fa,{present:l||d.open,children:d.modal?e.jsx(ZR,{...c,ref:s}):e.jsx(JR,{...c,ref:s})})});
636n3.displayName=Wl;var ZR=f.forwardRef((t,s)=>{const r=vn(Wl,t.__scopeDialog),l=f.useRef(null),c=st(s,r.contentRef,l);return f.useEffect(()=>{const d=l.current;if(d)return Ix(d)},[]),e.jsx(r3,{...t,ref:c,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ae(t.onCloseAutoFocus,d=>{d.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:Ae(t.onPointerDownOutside,d=>{const u=d.detail.originalEvent,x=u.button===0&&u.ctrlKey===!0;(u.button===2||x)&&d.preventDefault()}),onFocusOutside:Ae(t.onFocusOutside,d=>d.preventDefault())})}),JR=f.forwardRef((t,s)=>{const r=vn(Wl,t.__scopeDialog),l=f.useRef(!1),c=f.useRef(!1);return e.jsx(r3,{...t,ref:s,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:d=>{t.onCloseAutoFocus?.(d),d.defaultPrevented||(l.current||r.triggerRef.current?.focus(),d.preventDefault()),l.current=!1,c.current=!1},onInteractOutside:d=>{t.onInteractOutside?.(d),d.defaultPrevented||(l.current=!0,d.detail.originalEvent.type==="pointerdown"&&(c.current=!0));const u=d.target;r.triggerRef.current?.contains(u)&&d.preventDefault(),d.detail.originalEvent.type==="focusin"&&c.current&&d.preventDefault()}})}),r3=f.forwardRef((t,s)=>{const{__scopeDialog:r,trapFocus:l,onOpenAutoFocus:c,onCloseAutoFocus:d,...u}=t,x=vn(Wl,r),p=f.useRef(null),g=st(s,p);return zx(),e.jsxs(e.Fragment,{children:[e.jsx(Zi,{asChild:!0,loop:!0,trapped:l,onMountAutoFocus:c,onUnmountAutoFocus:d,children:e.jsx(cc,{role:"dialog",id:x.contentId,"aria-describedby":x.descriptionId,"aria-labelledby":x.titleId,"data-state":zh(x.open),...u,ref:g,onDismiss:()=>x.onOpenChange(!1)})}),e.jsxs(e.Fragment,{children:[e.jsx(tT,{titleId:x.titleId}),e.jsx(sT,{contentRef:p,descriptionId:x.descriptionId})]})]})}),Ph="DialogTitle",l3=f.forwardRef((t,s)=>{const{__scopeDialog:r,...l}=t,c=vn(Ph,r);return e.jsx(Qe.h2,{id:c.titleId,...l,ref:s})});l3.displayName=Ph;var o3="DialogDescription",c3=f.forwardRef((t,s)=>{const{__scopeDialog:r,...l}=t,c=vn(o3,r);return e.jsx(Qe.p,{id:c.descriptionId,...l,ref:s})});c3.displayName=o3;var i3="DialogClose",d3=f.forwardRef((t,s)=>{const{__scopeDialog:r,...l}=t,c=vn(i3,r);return e.jsx(Qe.button,{type:"button",...l,ref:s,onClick:Ae(t.onClick,()=>c.onOpenChange(!1))})});d3.displayName=i3;function zh(t){return t?"open":"closed"}var u3="DialogTitleWarning",[eT,x3]=gD(u3,{contentName:Wl,titleName:Ph,docsSlug:"dialog"}),tT=({titleId:t})=>{const s=x3(u3),r=`\`${s.contentName}\` requires a \`${s.titleName}\` for the component to be accessible for screen reader users. 637 638If you want to hide the \`${s.titleName}\`, you can wrap it with our VisuallyHidden component. 639 640For more information, see https://radix-ui.com/primitives/docs/components/${s.docsSlug}`;return f.useEffect(()=>{t&&(document.getElementById(t)||console.error(r))},[r,t]),null},aT="DialogDescriptionWarning",sT=({contentRef:t,descriptionId:s})=>{const l=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${x3(aT).contentName}}.`;return f.useEffect(()=>{const c=t.current?.getAttribute("aria-describedby");s&&c&&(document.getElementById(s)||console.warn(l))},[l,t,s]),null},Uh=Zw,p3=e3,Ih=a3,Bh=s3,Fh=n3,Hh=l3,nT=c3,Vx=d3;const m3=f.createContext({isComposing:()=>!1,setComposing:()=>{},justEndedComposing:()=>!1,markCompositionEnd:()=>{}}),qh=()=>f.useContext(m3);function Rs({...t}){const s=f.useRef(!1),r=f.useRef(!1),l=f.useRef(null),c=f.useMemo(()=>({isComposing:()=>s.current,setComposing:d=>{s.current=d},justEndedComposing:()=>r.current,markCompositionEnd:()=>{r.current=!0,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{r.current=!1},150)}}),[]);return e.jsx(m3.Provider,{"data-loc":"client/src/components/ui/dialog.tsx:50",value:c,children:e.jsx(Uh,{"data-loc":"client/src/components/ui/dialog.tsx:51","data-slot":"dialog",...t})})}function rT({...t}){return e.jsx(p3,{"data-loc":"client/src/components/ui/dialog.tsx:59","data-slot":"dialog-trigger",...t})}function lT({...t}){return e.jsx(Ih,{"data-loc":"client/src/components/ui/dialog.tsx:65","data-slot":"dialog-portal",...t})}function f3({className:t,...s}){return e.jsx(Bh,{"data-loc":"client/src/components/ui/dialog.tsx:79","data-slot":"dialog-overlay",className:Me("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),...s})}f3.displayName="DialogOverlay";function Ts({className:t,children:s,showCloseButton:r=!0,onEscapeKeyDown:l,...c}){const{isComposing:d}=qh(),u=f.useCallback(x=>{if(x.isComposing||d()){x.preventDefault();return}l?.(x)},[d,l]);return e.jsxs(lT,{"data-loc":"client/src/components/ui/dialog.tsx:122","data-slot":"dialog-portal",children:[e.jsx(f3,{"data-loc":"client/src/components/ui/dialog.tsx:123"}),e.jsxs(Fh,{"data-loc":"client/src/components/ui/dialog.tsx:124","data-slot":"dialog-content",className:Me("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
640ded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),onEscapeKeyDown:u,...c,children:[s,r&&e.jsxs(Vx,{"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(va,{"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 _s({className:t,...s}){return e.jsx("div",{"data-loc":"client/src/components/ui/dialog.tsx:150","data-slot":"dialog-header",className:Me("flex flex-col gap-2 text-center sm:text-left",t),...s})}function Os({className:t,...s}){return e.jsx("div",{"data-loc":"client/src/components/ui/dialog.tsx:160","data-slot":"dialog-footer",className:Me("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...s})}function Ps({className:t,...s}){return e.jsx(Hh,{"data-loc":"client/src/components/ui/dialog.tsx:176","data-slot":"dialog-title",className:Me("text-lg leading-none font-semibold",t),...s})}function Lu(t){const s=f.useRef(t);s.current=t;const r=f.useRef(null);return r.current||(r.current=function(...l){return s.current.apply(this,l)}),r.current}function g3(t={}){const{onKeyDown:s,onCompositionStart:r,onCompositionEnd:l}=t,c=f.useRef(!1),d=f.useRef(null),u=f.useRef(null),x=Lu(v=>{d.current&&(clearTimeout(d.current),d.current=null),u.current&&(clearTimeout(u.current),u.current=null),c.current=!0,r?.(v)}),p=Lu(v=>{d.current=setTimeout(()=>{u.current=setTimeout(()=>{c.current=!1})}),l?.(v)}),g=Lu(v=>{if(c.current&&(v.key==="Escape"||v.key==="Enter"&&!v.shiftKey)){v.stopPropagation();return}s?.(v)}),b=Lu(()=>c.current);return{onCompositionStart:x,onCompositionEnd:p,onKeyDown:g,isComposing:b}}function ge({className:t,type:s,onKeyDown:r,onCompositionStart:l,onCompositionEnd:c,...d}){const u=qh(),{onCompositionStart:x,onCompositionEnd:p,onKeyDown:g}=g3({onKeyDown:b=>{const v=b.nativeEvent.isComposing||u.justEndedComposing();b.key==="Enter"&&v||r?.(b)},onCompositionStart:b=>{u.setComposing(!0),l?.(b)},onCompositionEnd:b=>{u.markCompositionEnd(),setTimeout(()=>{u.setComposing(!1)},100),c?.(b)}});return e.jsx("input",{"data-loc":"client/src/components/ui/input.tsx:53",type:s,"data-slot":"input",className:Me("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:x,onCompositionEnd:p,onKeyDown:g,...d})}var oT="Label",h3=f.forwardRef((t,s)=>e.jsx(Qe.label,{...t,ref:s,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(t.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));h3.displayName=oT;var cT=h3;function We({className:t,...s}){return e.jsx(cT,{"data-loc":"client/src/components/ui/label.tsx:11","data-slot":"label",className:Me("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),...s})}function rr({className:t,onKeyDown:s,onCompositionStart:r,onCompositionEnd:l,...c}){const d=qh(),{onCompositionStart:u,onCompositionEnd:x,onKeyDown:p}=g3({onKeyDown:g=>{const b=g.nativeEvent.isComposing||d.justEndedComposing();g.key==="Enter"&&!g.shiftKey&&b||s?.(g)},onCompositionStart:g=>{d.setComposing(!0),r?.(g)}
640,onCompositionEnd:g=>{d.markCompositionEnd(),setTimeout(()=>{d.setComposing(!1)},100),l?.(g)}});return e.jsx("textarea",{"data-loc":"client/src/components/ui/textarea.tsx:53","data-slot":"textarea",className:Me("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:x,onKeyDown:p,...c})}const Nj={novo:"Novo",contato:"Contato",qualificado:"Qualificado",negociacao:"Negociação",ganho:"Ganho",perdido:"Perdido"},Bf={site:"Site",facebook:"Facebook",instagram:"Instagram",indicacao:"Indicação",telefone:"Telefone",whatsapp:"WhatsApp",outro:"Outro"},Cj={baixa:"Baixa",media:"Média",alta:"Alta",urgente:"Urgente"},iT={novo:"bg-blue-500/20 text-blue-400",contato:"bg-yellow-500/20 text-yellow-400",qualificado:"bg-emerald-500/20 text-emerald-400",negociacao:"bg-primary/20 text-primary",ganho:"bg-green-500/20 text-green-400",perdido:"bg-red-500/20 text-red-400"},dT={baixa:"bg-slate-500/20 text-slate-400",media:"bg-blue-500/20 text-blue-400",alta:"bg-orange-500/20 text-orange-400",urgente:"bg-red-500/20 text-red-400"},Ff=20;function uT(){const[,t]=fs(),[s,r]=f.useState(""),[l,c]=f.useState("all"),[d,u]=f.useState("all"),[x,p]=f.useState(0),[g,b]=f.useState(!1),v=Y.useUtils(),y=f.useMemo(()=>({search:s||void 0,status:l!=="all"?l:void 0,source:d!=="all"?d:void 0,limit:Ff,offset:x*Ff}),[s,l,d,x]),{data:j,isLoading:S}=Y.leads.list.useQuery(y),{data:N}=Y.users.list.useQuery(),w=Y.leads.create.useMutation({onSuccess:()=>{v.leads.list.invalidate(),v.dashboard.stats.invalidate(),b(!1),ce.success("Lead criado com sucesso")},onError:E=>ce.error(E.message)}),[D,k]=f.useState({name:"",email:"",phone:"",source:"outro",priority:"media",notes:"",assignedTo:""}),A=()=>{if(!D.name.trim()){ce.error("Nome é obrigatório");return}w.mutate({name:D.name,email:D.email||void 0,phone:D.phone||void 0,source:D.source,priority:D.priority,notes:D.notes||void 0,assignedTo:D.assignedTo?Number(D.assignedTo):void 0})},_=Math.ceil((j?.total??0)/Ff);return e.jsxs("div",{"data-loc":"client/src/pages/Leads.tsx:84",className:"space-y-4 p-3 md:p-4 lg:p-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/Leads.tsx:85",className:"flex items-center justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/Leads.tsx:86",children:[e.jsx("h1",{"data-loc":"client/src/pages/Leads.tsx:87",className:"text-xl font-semibold text-foreground",children:"Leads"}),e.jsxs("p",{"data-loc":"client/src/pages/Leads.tsx:88",className:"text-sm text-muted-foreground",children:[j?.total??0," leads encontrados"]})]}),e.jsxs(Rs,{"data-loc":"client/src/pages/Leads.tsx:90",open:g,onOpenChange:b,children:[e.jsx(rT,{"data-loc":"client/src/pages/Leads.tsx:91",asChild:!0,children:e.jsxs(oe,{"data-loc":"client/src/pages/Leads.tsx:92",size:"sm",className:"bg-primary text-primary-foreground hover:bg-primary/90",children:[e.jsx(Jt,{"data-loc":"client/src/pages/Leads.tsx:93",className:"h-4 w-4 mr-1"})," Novo Lead"]})}),e.jsxs(Ts,{"data-loc":"client/src/pages/Leads.tsx:96",className:"bg-card border-border max-w-lg",children:[e.jsx(_s,{"data-loc":"client/src/pages/Leads.tsx:97",children:e.jsx(Ps,{"data-loc":"client/src/pages/Leads.tsx:98",className:"text-foreground",children:"Novo Lead"})}),e.jsxs("div",{"data-loc":"client/src/pages/Leads.tsx:100",className:"space-y-3 mt-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/Leads.tsx:101",children:[e.jsx(We,{"data-loc":"client/src/pages/Leads.tsx:102",className:"text-xs text-muted-foreground",children:"Nome *"}),e.jsx(ge,{"data-loc":"client/src/pages/Leads.tsx:103",value:D.name,onChange:E=>k({...D,name:E.target.value}),placeholder:"Nome do lead",className:"bg-background border-border mt-1"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Leads.tsx:105",className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Leads.tsx:106",children:[e.jsx(We,{"data-loc":"client/src/pages/Leads.tsx:107",className:"text-xs text-muted-foreground",children:"Email"}),e.jsx(ge,{"data-loc":"client/src/pages/Leads.tsx:108",value:D.email,onChange:E=>k({...D,email:E.target.value}),placeholder:"[email protected]",className:"bg-background border-border mt-1"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Leads.tsx:110",children:[e.jsx(We,{"data-loc":"client/src/pages/Leads.tsx:111",className:"text-xs text-muted-foreground",children:"Telefone"}),e.jsx(ge,{"data-loc":"client/src/pages/Leads.tsx:112",value:D.phone,onChange:E=>k({...D,phone:E.target.value}),placeholder:"(47) 99999-9999",className:"bg-background border-border mt-1"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Leads.tsx:115",className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Leads.tsx:116",children:[e.jsx(We,{"data-loc":"client/src/pages/Leads.tsx:117",className:"text-xs text-muted-foreground",children:"Origem"}),e.jsxs(Dt,{"data-loc":"client/src/pages/Leads.tsx:118",value:D.source,onValueChange:E=>k({...D,source:E}),children:[e.jsx(Lt,{"data-loc":"client/src/pages/Leads.tsx:119",className:"bg-background border-border mt-1",children:e.jsx(Mt,{"data-loc":"client/src/pages/Leads.tsx:119"})}),e.jsx(kt,{"data-loc":"client/src/pages/Leads.tsx:120",children:Object.entries(Bf).map(([E,I])=>e.jsx(He,{"data-loc":"client/src/pages/Leads.tsx:121",value:E,children:I},E))})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Leads.tsx:125",children:[e.jsx(We,{"data-loc":"client/src/pages/Leads.tsx:126",className:"text-xs text-muted-foreground",children:"Prioridade"}),e.jsxs(Dt,{"data-loc":"client/src/pages/Leads.tsx:127",value:D.priority,onValueChange:E=>k({...D,priority:E}),children:[e.jsx(Lt,{"data-loc":"client/src/pages/Leads.tsx:128",className:"bg-background border-border mt-1",children:e.jsx(Mt,{"data-loc":"client/src/pages/Leads.tsx:128"})}),e.jsx(kt,{"data-loc":"client/src/pages/Leads.tsx:129",children:Object.entries(Cj).map(([E,I])=>e.jsx(He,{"data-loc":"client/src/pages/Leads.tsx:130",value:E,children:I},E))})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Leads.tsx:135",children:[e.jsx(We,{"data-loc":"client/src/pages/Leads.tsx:136",className:"text-xs text-muted-foreground",children:"Atendente Responsável"}),e.jsxs(Dt,{"data-loc":"client/src/pages/Leads.tsx:137",value:D.assignedTo,onValueChange:E=>k({...D,assignedTo:E}),children:[e.jsx(Lt,{"data-loc":"client/src/pages/Leads.tsx:138",className:"bg-background border-border mt-1",children:e.jsx(Mt,{"data-loc":"client/src/pages/Leads.tsx:138",placeholder:"Selecionar..."})}),e.jsx(kt,{"data-loc":"client/src/pages/Leads.tsx:139",children:N?.filter(E=>E.role==="corretor"||E.role==="gerente").map(E=>e.jsx(He,{"data-loc":"client/src/pages/Leads.tsx:141",value:String(E.id),children:E.name},E.id))})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Leads.tsx:146",children:[e.jsx(We,{"data-loc":"client/src/pages/Leads.tsx:147",className:"text-xs text-muted-foreground",children:"Observações"}),e.jsx(rr,{"data-loc":"client/src/pages/Leads.tsx:148",value:D.notes,onChange:E=>k({...D,notes:E.target.value}),placeholder:"Notas sobre o lead...",className:"bg-background border-border mt-1",rows:3})]}),e.jsx(oe,{"data-loc":"client/src/pages/Leads.tsx:150",onClick:A,disabled:w.isPending,className:"w-full bg-primary text-primary-foreground hover:bg-primary/90",children:w.isPending?"Criando...":"Criar Lead"})]})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Leads.tsx:159",className:"flex flex-col sm:flex-row flex-wrap gap-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/Leads.tsx:160",className:"relative flex-1 min-w-0",children:[e.jsx(or,{"data-loc":"client/src/pages/Leads.tsx:161",className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(ge,{"data-loc":"client/src/pages/Leads.tsx:162",value:s,onChange:E=>{r(E.target.value),p(0)},placeholder:"Buscar por nome, email ou telefone...",className:"pl-9 bg-card border-border"})]}),e.jsxs(Dt,{"data-loc":"client/src/pages/Leads.tsx:169",value:l,onValueChange:E=>{c(E),p(0)},children:[e.jsx(Lt,{"data-loc":"client/src/pages/Leads.tsx:170",className:"w-[140px] bg-card border-border",children:e.jsx(Mt,{"data-loc":"client/src/pages/Leads.tsx:170",placeholder:"Status"})}),e.jsxs(kt,{"data-loc":"client/src/pages/Leads.tsx:171",children:[e.jsx(He,{"data-loc":"client/src/pages/Leads.tsx:172",value:"all",children:"Todos Status"}),Object.entries(Nj).map(([E,I])=>e.jsx(He,{"data-loc":"client/src/pages/Leads.tsx:173",value:E,children:I},E))]})]}),e.jsxs(Dt,{"data-loc":"client/src/pages/Leads.tsx:176",value:d,onValueChange:E=>{u(E),p(0)},children:[e.jsx(Lt,{"data-loc":"client/src/pages/Leads.tsx:177",className:"w-[140px] bg-card border-border",children:e.jsx(Mt,{"data-loc":"client/src/pages/Leads.tsx:177",placeholder:"Origem"})}),e.jsxs(kt,{"data-loc":"client/src/pages/Leads.tsx:178",children:[e.jsx(He,{"data-loc":"client/src/pages/Leads.tsx:179",value:"all",children:"Todas Origens"}),Object.entries(Bf).map(([E,I])=>e.jsx(He,{"data-loc":"client/src/pages/Leads.tsx:180",value:E,children:I},E))]})]})]}),e.jsx(Wt,{"data-loc":"client/src/pages/Leads.tsx:186",className:"bg-card border-border overflow-hidden",children:e.jsx("div",{"data-loc":"client/src/pages/Leads.tsx:187",className:"overflow-x-auto",children:e.jsxs("table",{"data-loc":"client/src/pages/Leads.tsx:188",className:"w-full text-sm",children:[e.jsx("thead",{"data-loc":"client/src/pages/Leads.tsx:189",children:e.jsxs("tr",{"data-loc":"client/src/pages/Leads.tsx:190",className:"border-b border-border",children:[e.jsx("th",{"data-loc":"client/src/pages/Leads.tsx:191",className:"text-left py-2.5 px-3 text-xs font-medium text-muted-foreground",children:"Nome"}),e.jsx("th",{"data-loc":"client/src/pages/Leads.tsx:192",className:"text-left py-2.5 px-3 text-xs font-medium text-muted-foreground hidden md:table-cell",children:"Contato"}),e.jsx("th",{"data-loc":"client/src/pages/Leads.tsx:193",className:"text-left py-2.5 px-3 text-xs font-medium text-muted-foreground",children:"Status"}),e.jsx("th",{"data-loc":"client/src/pages/Leads.tsx:194",className:"text-left py-2.5 px-3 text-xs font-medium text-muted-foreground hidden sm:table-cell",children:"Origem"}),e.jsx("th",{"data-loc":"client/src/pages/Leads.tsx:195",className:"text-left py-2.5 px-3 text-xs font-medium text-muted-foreground hidden lg:table-cell",children:"Prioridade"}),e.jsx("th",{"data-loc":"client/src/pages/Leads.tsx:196",className:"text-left py-2.5 px-3 text-xs font-medium text-muted-foreground hidden lg:table-cell",children:"Data"})]})}),e.jsx("tbody",{"data-loc":"client/src/pages/Leads.tsx:199",children:S?Array.from({length:5}).map((E,I)=>e.jsx("tr",{"data-loc":"client/src/pages/Leads.tsx:202",className:"border-b border-border/50",children:e.jsx("td",{"data-loc":"client/src/pages/Leads.tsx:203",colSpan:6,className:"py-3 px-3",children:e.jsx("div",{"data-loc":"client/src/pages/Leads.tsx:203",className:"h-5 bg-muted animate-pulse rounded"})})},I)):j?.data&&j.data.length>0?j.data.map(E=>e.jsxs("tr",{"data-loc":"client/src/pages/Leads.tsx:208",className:"border-b border-border/50 hover:bg-muted/30 transition-colors cursor-pointer",onClick:()=>t(`/leads/${E.id}`),children:[e.jsx("td",{"data-loc":"client/src/pages/Leads.tsx:213",className:"py-2.5 px-3",children:e.jsxs("div",{"data-loc":"client/src/pages/Leads.tsx:214",className:"flex items-center gap-2",children:[e.jsx("div",{"data-loc":"client/src/pages/Leads.tsx:215",className:"h-7 w-7 rounded-full bg-primary/10 flex items-center justify-center shrink-0",children:e.jsx("span",{"data-loc":"client/src/pages/Leads.tsx:216",className:"text-[10px] font-semibold text-primary",children:E.name?.charAt(0).toUpperCase()})}),e.jsx("span",{"data-loc":"client/src/pages/Leads.tsx:218",className:"font-medium text-foreground truncate max-w-[150px]",children:E.name})]})}),e.jsx("td",{"data-loc":"client/src/pages/Leads.tsx:221",className:"py-2.5 px-3 hidden md:table-cell",children:e.jsxs("div",{"data-loc":"client/src/pages/Leads.tsx:222",className:"flex items-center gap-2 text-xs text-muted-foreground",children:[E.phone&&e.jsxs("span",{"data-loc":"client/src/pages/Leads.tsx:223",className:"flex items-center gap-1",children:[e.jsx(hn,{"data-loc":"client/src/pages/Leads.tsx:223",className:"h-3 w-3"}),E.phone]}),E.email&&e.jsxs("span",{"data-loc":"client/src/pages/Leads.tsx:224",className:"flex items-center gap-1",children:[e.jsx(mr,{"data-loc":"client/src/pages/Leads.tsx:224",className:"h-3 w-3"}),E.email]})]})}),e.jsx("td",{"data-loc":"client/src/pages/Leads.tsx:227",className:"py-2.5 px-3",children:e.jsx("span",{"data-loc":"client/src/pages/Leads.tsx:228",className:`text-[10px] font-medium px-2 py-0.5 rounded-full ${iT[E.status]||"bg-muted text-muted-foreground"}`,children:Nj[E.status]||E.status})}),e.jsx("td",{"data-loc":"client/src/pages/Leads.tsx:232",className:"py-2.5 px-3 hidden sm:table-cell",children:e.jsx("span",{"data-loc":"client/src/pages/Leads.tsx:233",className:"text-xs text-muted-foreground",children:Bf[E.source]||E.source})}),e.jsx("td",{"data-loc":"client/src/pages/Leads.tsx:235",className:"py-2.5 px-3 hidden lg:table-cell",children:e.jsx("span",{"data-loc":"client/src/pages/Leads.tsx:236",className:`text-[10px] font-medium px-2 py-0.5 rounded-full ${dT[E.priority]||"bg-muted text-muted-foreground"}`,children:Cj[E.priority]||E.priority})}),e.jsx("td",{"data-loc":"client/src/pages/Leads.tsx:240",className:"py-2.5 px-3 hidden lg:table-cell",children:e.jsx("span",{"data-loc":"client/src/pages/Leads.tsx:241",className:"text-xs text-muted-foreground",children:new Date(E.createdAt).toLocaleDateString("pt-BR")})})]},E.id)):e.jsx("tr",{"data-loc":"client/src/pages/Leads.tsx:248",children:e.jsx("td",{"data-loc":"client/src/pages/Leads.tsx:249",colSpan:6,className:"py-12 text-center text-sm text-muted-foreground",children:"Nenhum lead encontrado"})})})]})})}),_>1&&e.jsxs("div",{"data-loc":"client/src/pages/Leads.tsx:261",className:"flex items-center justify-between",children:[e.jsxs("span",{"data-loc":"client/src/pages/Leads.tsx:262",className:"text-xs text-muted-foreground",children:["Página ",x+1," de ",_]}),e.jsxs("div",{"data-loc":"client/src/pages/Leads.tsx:265",className:"flex gap-1",children:[e.jsx(oe,{"data-loc":"client/src/pages/Leads.tsx:266",variant:"outline",size:"sm",disabled:x===0,onClick:()=>p(x-1),className:"h-8",children:e.jsx(nc,{"data-loc":"client/src/pages/Leads.tsx:267",className:"h-4 w-4"})}),e.jsx(oe,{"data-loc":"client/src/pages/Leads.tsx:269",variant:"outline",size:"sm",disabled:x>=_-1,onClick:()=>p(x+1),className:"h-8",children:e.jsx(Ia,{"data-loc":"client/src/pages/Leads.tsx:270",className:"h-4 w-4"})})]})]})]})}const wj={novo:"Novo",contato:"Contato",qualificado:"Qualificado",negociacao:"Negociação",ganho:"Ganho",perdido:"Perdido"},Aj={site:"Site",facebook:"Facebook",instagram:"Instagram",indicacao:"Indicação",telefone:"Telefone",whatsapp:"WhatsApp",outro:"Outro"},Sj={baixa:"Baixa",media:"Média",alta:"Alta",urgente:"Urgente"},Ej={nota:"Nota",ligacao:"Ligação",email:"Email",whatsapp:"WhatsApp",visita:"Visita",reuniao:"Reunião",proposta:"Proposta",outro:"Outro"};function xT(){const t=mc(),s=Number(t.id),[,r]=fs(),l=Y.useUtils(),{data:c,isLoading:d}=Y.leads.getById.useQuery({id:s}),{data:u}=Y.leadInteractions.list.useQuery({leadId:s}),{data:x}=Y.users.list.useQuery(),p=Y.leads.update.useMutation({onSuccess:()=>{l.leads.getById.invalidate({id:s}),ce.success("Lead atualizado")},onError:A=>ce.error(A.message)}),g=Y.leadInteractions.create.useMutation({onSuccess:()=>
640{l.leadInteractions.list.invalidate({leadId:s}),N({type:"nota",content:""}),ce.success("Interação registrada")},onError:A=>ce.error(A.message)}),[b,v]=f.useState(!1),[y,j]=f.useState({}),[S,N]=f.useState({type:"nota",content:""}),w=()=>{c&&(j({name:c.name,email:c.email||"",phone:c.phone||"",status:c.status,source:c.source,priority:c.priority,assignedTo:c.assignedTo?String(c.assignedTo):"",notes:c.notes||"",lostReason:c.lostReason||""}),v(!0))},D=()=>{p.mutate({id:s,name:y.name,email:y.email||void 0,phone:y.phone||void 0,status:y.status,source:y.source,priority:y.priority,assignedTo:y.assignedTo?Number(y.assignedTo):null,notes:y.notes||void 0,lostReason:y.lostReason||void 0}),v(!1)};if(d)return e.jsx("div",{"data-loc":"client/src/pages/LeadDetail.tsx:71",className:"space-y-4",children:Array.from({length:3}).map((A,_)=>e.jsx("div",{"data-loc":"client/src/pages/LeadDetail.tsx:71",className:"h-32 bg-card border border-border rounded-lg animate-pulse"},_))});if(!c)return e.jsxs("div",{"data-loc":"client/src/pages/LeadDetail.tsx:76",className:"text-center py-12",children:[e.jsx("p",{"data-loc":"client/src/pages/LeadDetail.tsx:77",className:"text-muted-foreground",children:"Lead não encontrado"}),e.jsx(oe,{"data-loc":"client/src/pages/LeadDetail.tsx:78",variant:"outline",onClick:()=>r("/leads"),className:"mt-4",children:"Voltar"})]});const k=x?.find(A=>A.id===c.assignedTo);return e.jsxs("div",{"data-loc":"client/src/pages/LeadDetail.tsx:86",className:"space-y-4 max-w-4xl p-3 md:p-4 lg:p-6",children:[e.jsxs("button",{"data-loc":"client/src/pages/LeadDetail.tsx:87",onClick:()=>r("/leads"),className:"flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[e.jsx(Fl,{"data-loc":"client/src/pages/LeadDetail.tsx:88",className:"h-4 w-4"})," Voltar aos Leads"]}),e.jsxs("div",{"data-loc":"client/src/pages/LeadDetail.tsx:91",className:"flex items-center justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/LeadDetail.tsx:92",children:[e.jsx("h1",{"data-loc":"client/src/pages/LeadDetail.tsx:93",className:"text-xl font-semibold text-foreground",children:c.name}),e.jsxs("div",{"data-loc":"client/src/pages/LeadDetail.tsx:94",className:"flex items-center gap-2 mt-1",children:[e.jsx("span",{"data-loc":"client/src/pages/LeadDetail.tsx:95",className:`text-[10px] font-medium px-2 py-0.5 rounded-full ${c.status==="novo"?"bg-blue-500/20 text-blue-400":c.status==="contato"?"bg-yellow-500/20 text-yellow-400":c.status==="qualificado"?"bg-emerald-500/20 text-emerald-400":c.status==="negociacao"?"bg-primary/20 text-primary":c.status==="ganho"?"bg-green-500/20 text-green-400":"bg-red-500/20 text-red-400"}`,children:wj[c.status]}),e.jsx("span",{"data-loc":"client/src/pages/LeadDetail.tsx:105",className:"text-xs text-muted-foreground",children:Aj[c.source]})]})]}),b?e.jsxs("div",{"data-loc":"client/src/pages/LeadDetail.tsx:111",className:"flex gap-2",children:[e.jsx(oe,{"data-loc":"client/src/pages/LeadDetail.tsx:112",size:"sm",variant:"outline",onClick:()=>v(!1),children:"Cancelar"}),e.jsxs(oe,{"data-loc":"client/src/pages/LeadDetail.tsx:113",size:"sm",onClick:D,disabled:p.isPending,className:"bg-primary text-primary-foreground",children:[e.jsx(ex,{"data-loc":"client/src/pages/LeadDetail.tsx:114",className:"h-3 w-3 mr-1"})," Salvar"]})]}):e.jsx(oe,{"data-loc":"client/src/pages/LeadDetail.tsx:109",size:"sm",variant:"outline",onClick:w,children:"Editar"})]}),e.jsx(Wt,{"data-loc":"client/src/pages/LeadDetail.tsx:121",className:"bg-card border-border",children:e.jsx(ta,{"data-loc":"client/src/pages/LeadDetail.tsx:122",className:"p-4",children:b?e.jsxs("div",{"data-loc":"client/src/pages/LeadDetail.tsx:124",className:"space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/LeadDetail.tsx:125",className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/LeadDetail.tsx:126",children:[e.jsx(We,{"data-loc":"client/src/pages/LeadDetail.tsx:127",className:"text-xs text-muted-foreground",children:"Nome"}),e.jsx(ge,{"data-loc":"client/src/pages/LeadDetail.tsx:128",value:y.name,onChange:A=>j({...y,name:A.target.value}),className:"bg-background border-border mt-1"})]}),e.jsxs("div",{"data-loc":"client/src/pages/LeadDetail.tsx:130",children:[e.jsx(We,{"data-loc":"client/src/pages/LeadDetail.tsx:131",className:"text-xs text-muted-foreground",children:"Email"}),e.jsx(ge,{"data-loc":"client/src/pages/LeadDetail.tsx:132",value:y.email,onChange:A=>j({...y,email:A.target.value}),className:"bg-background border-border mt-1"})]}),e.jsxs("div",{"data-loc":"client/src/pages/LeadDetail.tsx:134",children:[e.jsx(We,{"data-loc":"client/src/pages/LeadDetail.tsx:135",className:"text-xs text-muted-foreground",children:"Telefone"}),e.jsx(ge,{"data-loc":"client/src/pages/LeadDetail.tsx:136",value:y.phone,onChange:A=>j({...y,phone:A.target.value}),className:"bg-background border-border mt-1"})]}),e.jsxs("div",{"data-loc":"client/src/pages/LeadDetail.tsx:138",children:[e.jsx(We,{"data-loc":"client/src/pages/LeadDetail.tsx:139",className:"text-xs text-muted-foreground",children:"Status"}),e.jsxs(Dt,{"data-loc":"client/src/pages/LeadDetail.tsx:140",value:y.status,onValueChange:A=>j({...y,status:A}),children:[e.jsx(Lt,{"data-loc":"client/src/pages/LeadDetail.tsx:141",className:"bg-background border-border mt-1",children:e.jsx(Mt,{"data-loc":"client/src/pages/LeadDetail.tsx:141"})}),e.jsx(kt,{"data-loc":"client/src/pages/LeadDetail.tsx:142",children:Object.entries(wj).map(([A,_])=>e.jsx(He,{"data-loc":"client/src/pages/LeadDetail.tsx:142",value:A,children:_},A))})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/LeadDetail.tsx:145",children:[e.jsx(We,{"data-loc":"client/src/pages/LeadDetail.tsx:14
6406",className:"text-xs text-muted-foreground",children:"Origem"}),e.jsxs(Dt,{"data-loc":"client/src/pages/LeadDetail.tsx:147",value:y.source,onValueChange:A=>j({...y,source:A}),children:[e.jsx(Lt,{"data-loc":"client/src/pages/LeadDetail.tsx:148",className:"bg-background border-border mt-1",children:e.jsx(Mt,{"data-loc":"client/src/pages/LeadDetail.tsx:148"})}),e.jsx(kt,{"data-loc":"client/src/pages/LeadDetail.tsx:149",children:Object.entries(Aj).map(([A,_])=>e.jsx(He,{"data-loc":"client/src/pages/LeadDetail.tsx:149",value:A,children:_},A))})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/LeadDetail.tsx:152",children:[e.jsx(We,{"data-loc":"client/src/pages/LeadDetail.tsx:153",className:"text-xs text-muted-foreground",children:"Prioridade"}),e.jsxs(Dt,{"data-loc":"client/src/pages/LeadDetail.tsx:154",value:y.priority,onValueChange:A=>j({...y,priority:A}),children:[e.jsx(Lt,{"data-loc":"client/src/pages/LeadDetail.tsx:155",className:"bg-background border-border mt-1",children:e.jsx(Mt,{"data-loc":"client/src/pages/LeadDetail.tsx:155"})}),e.jsx(kt,{"data-loc":"client/src/pages/LeadDetail.tsx:156",children:Object.entries(Sj).map(([A,_])=>e.jsx(He,{"data-loc":"client/src/pages/LeadDetail.tsx:156",value:A,children:_},A))})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/LeadDetail.tsx:159",children:[e.jsx(We,{"data-loc":"client/src/pages/LeadDetail.tsx:160",className:"text-xs text-muted-foreground",children:"Atendente"}),e.jsxs(Dt,{"data-loc":"client/src/pages/LeadDetail.tsx:161",value:y.assignedTo,onValueChange:A=>j({...y,assignedTo:A}),children:[e.jsx(Lt,{"data-loc":"client/src/pages/LeadDetail.tsx:162",className:"bg-background border-border mt-1",children:e.jsx(Mt,{"data-loc":"client/src/pages/LeadDetail.tsx:162",placeholder:"Selecionar..."})}),e.jsx(kt,{"data-loc":"client/src/pages/LeadDetail.tsx:163",children:x?.filter(A=>A.role==="corretor"||A.role==="gerente").map(A=>e.jsx(He,{"data-loc":"client/src/pages/LeadDetail.tsx:165",value:String(A.id),children:A.name},A.id))})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/LeadDetail.tsx:171",children:[e.jsx(We,{"data-loc":"client/src/pages/LeadDetail.tsx:172",className:"text-xs text-muted-foreground",children:"Observações"}),e.jsx(rr,{"data-loc":"client/src/pages/LeadDetail.tsx:173",value:y.notes,onChange:A=>j({...y,notes:A.target.value}),className:"bg-background border-border mt-1",rows:3})]})]}):e.jsxs("div",{"data-loc":"client/src/pages/LeadDetail.tsx:177",className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/LeadDetail.tsx:178",children:[e.jsx("p",{"data-loc":"client/src/pages/LeadDetail.tsx:179",className:"text-xs text-muted-foreground",children:"Contato"}),e.jsxs("div",{"data-loc":"client/src/pages/LeadDetail.tsx:180",className:"mt-1 space-y-1",children:[c.phone&&e.jsxs("p",{"data-loc":"client/src/pages/LeadDetail.tsx:181",className:"text-sm text-foreground flex items-center gap-1",children:[e.jsx(hn,{"data-loc":"client/src/pages/LeadDetail.tsx:181",className:"h-3 w-3 text-muted-foreground"}),c.phone]}),c.email&&e.jsxs("p",{"data-loc":"client/src/pages/LeadDetail.tsx:182",className:"text-sm text-foreground flex items-center gap-1",children:[e.jsx(mr,{"data-loc":"client/src/pages/LeadDetail.tsx:182",className:"h-3 w-3 text-muted-foreground"}),c.email]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/LeadDetail.tsx:185",children:[e.jsx("p",{"data-loc":"client/src/pages/LeadDetail.tsx:186",className:"text-xs text-muted-foreground",children:"Prioridade"}),e.jsx("p",{"data-loc":"client/src/pages/LeadDetail.tsx:187",className:"text-sm text-foreground mt-1",children:Sj[c.priority]})]}),e.jsxs("div",{"data-loc":"client/src/pages/LeadDetail.tsx:189",children:[e.jsx("p",{"data-loc":"client/src/pages/LeadDetail.tsx:190",className:"text-xs text-muted-foreground",children:"Atendente Responsável"}),e.jsx("p",{"data-loc":"client/src/pages/LeadDetail.tsx:191",className:"text-sm text-foreground mt-1",children:k?.name||"Não atribuÃdo"})]}),e.jsxs("div",{"data-loc":"client/src/pages/LeadDetail.tsx:193",children:[e.jsx("p",{"data-loc":"client/src/pages/LeadDetail.tsx:194",className:"text-xs text-muted-foreground",children:"Criado em"}),e.jsx("p",{"data-loc":"client/src/pages/LeadDetail.tsx:195",className:"text-sm text-foreground mt-1",children:new Date(c.createdAt).toLocaleDateString("pt-BR",{day:"2-digit",month:"long",year:"numeric"})})]}),c.notes&&e.jsxs("div",{"data-loc":"client/src/pages/LeadDetail.tsx:198",className:"col-span-full",children:[e.jsx("p",{"data-loc":"client/src/pages/LeadDetail.tsx:199",className:"text-xs text-muted-foreground",children:"Observações"}),e.jsx("p",{"data-loc":"client/src/pages/LeadDetail.tsx:200",className:"text-sm text-foreground mt-1 whitespace-pre-wrap",children:c.notes})]})]})})}),e.jsxs(Wt,{"data-loc":"client/src/pages/LeadDetail.tsx:209",className:"bg-card border-border",children:[e.jsx(Es,{"data-loc":"client/src/pages/LeadDetail.tsx:210",className:"pb-3",children:e.jsxs(Ds,{"data-loc":"client/src/pages/LeadDetail.tsx:211",className:"text-sm font-medium text-foreground flex items-center gap-2",children:[e.jsx(Rn,{"data-loc":"client/src/pages/LeadDetail.tsx:212",className:"h-4 w-4"})," Nova Interação"]})}),e.jsx(ta,{"data-loc":"client/src/pages/LeadDetail.tsx:215",children:e.jsxs("div",{"data-loc":"client/src/pages/LeadDetail.tsx:216",className:"flex flex-col sm:flex-row gap-2",children:[e.jsxs(Dt,{"data-loc":"client/src/pages/LeadDetail.tsx:217",value:S.type,onValueChange:A=>N({...S,type:A}),children:[e.jsx(Lt,{"data-loc":"client/src/pages/LeadDetail.tsx:218",className:"w-full sm:w-[140px] bg-background border-border",children:e.jsx(Mt,{"data-loc":"client/src/pages/LeadDetail.tsx:218"})}),e.jsx(kt,{"data-loc":"client/src/pages/LeadDetail.tsx:219",children:Object.entries(Ej).map(([A,_])=>e.jsx(He,{"data-loc":"client/src/pages/LeadDetail.tsx:219",value:A,children:_},A))})]}),e.jsx(ge,{"data-loc":"client/src/pages/LeadDetail.tsx:221",value:S.content,onChange:A=>N({...S,content:A.target.value}),placeholder:"Descreva a interação...",className:"flex-1 bg-background border-border",onKeyDown:A=>{A.key==="Enter"&&S.content.trim()&&g.mutate({leadId:s,type:S.type,content:S.content})}}),e.jsx(oe,{"data-loc":"client/src/pages/LeadDetail.tsx:232",size:"sm",onClick:()=>{S.content.trim()&&g.mutate({leadId:s,type:S.type,content:S.content})},disabled:g.isPending||!S.content.trim(),className:"bg-primary text-primary-foreground",children:"Registrar"})]})})]}),e.jsxs(Wt,{"data-loc":"client/src/pages/LeadDetail.tsx:248",className:"bg-card border-border",children:[e.jsx(Es,{"data-loc":"client/src/pages/LeadDetail.tsx:249",className:"pb-3",children:e.jsx(Ds,{"data-loc":"client/src/pages/LeadDetail.tsx:250",className:"text-sm font-medium text-foreground",children:"Histórico de Interações"})}),e.jsx(ta,{"data-loc":"client/src/pages/LeadDetail.tsx:252",children:u&&u.length>0?e.jsx("div",{"data-loc":"client/src/pages/LeadDetail.tsx:254",className:"space-y-3",children:u.map(A=>{const _=x?.find(E=>E.id===A.userId);return e.jsxs("div",{"data-loc":"client/src/pages/LeadDetail.tsx:258",className:"flex gap-3 py-2 border-b border-border/50 last:border-0",children:[e.jsx("div",{"data-loc":"client/src/pages/LeadDetail.tsx:259",className:"h-7 w-7 rounded-full bg-muted flex items-center justify-center shrink-0 mt-0.5",children:e.jsx("span",{"data-loc":"client/src/pages/LeadDetail.tsx:260",className:"text-[10px] font-medium text-muted-foreground",children:_?.name?.charAt(0)||"?"})}),e.jsxs("div",{"data-loc":"client/src/pages/LeadDetail.tsx:262",className:"flex-1 min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/pages/LeadDetail.tsx:263",className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{"data-loc":"client/src/pages/LeadDetail.tsx:264",className:"text-xs font-medium text-foreground",children:_?.name||"Usuário"}),e.jsx("span",{"data-loc":"client/src/pages/LeadDetail.tsx:265",className:"text-[10px] px-1.5 py-0.5 rounded bg-muted text-muted-foreground",children:Ej[A.type]||A.type}),e.jsx("span",{"data-loc":"client/src/pages/LeadDetail.tsx:266",className:"text-[10px] text-muted-foreground",children:new Date(A.createdAt).toLocaleDateString("pt-BR",{day:"2-digit",month:"short",hour:"2-digit",minute:"2-digit"})})]}),e.jsx("p",{"data-loc":"client/src/pages/LeadDetail.tsx:268",className:"text-sm text-foreground
640/80 mt-1",children:A.content})]})]},A.id)})}):e.jsx("p",{"data-loc":"client/src/pages/LeadDetail.tsx:275",className:"text-sm text-muted-foreground text-center py-6",children:"Nenhuma interação registrada"})})]})]})}const Dj=[{id:"novo",label:"Novo",color:"bg-blue-500"},{id:"contato",label:"Contato",color:"bg-yellow-500"},{id:"qualificado",label:"Qualificado",color:"bg-emerald-500"},{id:"negociacao",label:"Negociação",color:"bg-primary"}],pT={site:"Site",facebook:"Facebook",instagram:"Instagram",indicacao:"Indicação",telefone:"Telefone",whatsapp:"WhatsApp",outro:"Outro"};function mT(){const{user:t}=ka(),[,s]=fs(),[r,l]=f.useState("all"),c=Y.useUtils(),d=f.useMemo(()=>({assignedTo:r!=="all"?Number(r):void 0}),[r]),{data:u,isLoading:x}=Y.leads.kanban.useQuery(d),{data:p}=Y.users.list.useQuery(),g=Y.leads.updateStatus.useMutation({onSuccess:()=>{c.leads.kanban.invalidate(),c.dashboard.stats.invalidate()},onError:N=>ce.error(N.message)}),[b,v]=f.useState(null),y=N=>{v(N)},j=N=>{N.preventDefault(),N.dataTransfer.dropEffect="move"},S=(N,w)=>{if(N.preventDefault(),b===null)return;const D=u?.find(k=>k.id===b);D&&D.status!==w&&(g.mutate({id:b,status:w}),ce.success(`Lead movido para ${Dj.find(k=>k.id===w)?.label}`)),v(null)};return e.jsxs("div",{"data-loc":"client/src/pages/KanbanBoard.tsx:63",className:"space-y-4 p-3 md:p-4 lg:p-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/KanbanBoard.tsx:64",className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/KanbanBoard.tsx:65",children:[e.jsx("h1",{"data-loc":"client/src/pages/KanbanBoard.tsx:66",className:"text-xl font-semibold text-foreground",children:"Funil de Leads"}),e.jsxs("p",{"data-loc":"client/src/pages/KanbanBoard.tsx:67",className:"text-sm text-muted-foreground",children:[u?.length??0," leads ativos"]})]}),(t?.role==="admin"||t?.role==="gerente")&&e.jsxs(Dt,{"data-loc":"client/src/pages/KanbanBoard.tsx:70",value:r,onValueChange:l,children:[e.jsx(Lt,{"data-loc":"client/src/pages/KanbanBoard.tsx:71",className:"w-full sm:w-[180px] bg-card border-border",children:e.jsx(Mt,{"data-loc":"client/src/pages/KanbanBoard.tsx:72",placeholder:"Filtrar atendente"})}),e.jsxs(kt,{"data-loc":"client/src/pages/KanbanBoard.tsx:74",children:[e.jsx(He,{"data-loc":"client/src/pages/KanbanBoard.tsx:75",value:"all",children:"Todos os atendentes"}),p?.filter(N=>N.role==="corretor"||N.role==="gerente").map(N=>e.jsx(He,{"data-loc":"client/src/pages/KanbanBoard.tsx:77",value:String(N.id),children:N.name},N.id))]})]})]}),e.jsx("div",{"data-loc":"client/src/pages/KanbanBoard.tsx:85",className:"flex gap-3 overflow-x-auto pb-4 -mx-3 px-3 md:mx-0 md:px-0",children:Dj.map(N=>{const w=u?.filter(D=>D.status===N.id)??[];return e.jsxs("div",{"data-loc":"client/src/pages/KanbanBoard.tsx:89",className:"flex-shrink-0 w-[280px] md:flex-1 md:min-w-[240px]",onDragOver:j,onDrop:D=>S(D,N.id),children:[e.jsxs("div",{"data-loc":"client/src/pages/KanbanBoard.tsx:95",className:"flex items-center gap-2 mb-3 px-1",children:[e.jsx("div",{"data-loc":"client/src/pages/KanbanBoard.tsx:96",className:`h-2 w-2 rounded-full ${N.color}`}),e.jsx("span",{"data-loc":"client/src/pages/KanbanBoard.tsx:97",className:"text-xs font-medium text-foreground",children:N.label}),e.jsx("span",{"data-loc":"client/src/pages/KanbanBoard.tsx:98",className:"text-[10px] text-muted-foreground bg-muted px-1.5 py-0.5 rounded-full ml-auto",children:w.length})]}),e.jsx("div",{"data-loc":"client/src/pages/KanbanBoard.tsx:103",className:"space-y-2 min-h-[200px] p-1 rounded-lg bg-muted/20 border border-border/50",children:x?Array.from({length:2}).map((D,k)=>e.jsx("div",{"data-loc":"client/src/pages/KanbanBoard.tsx:106",className:"h-24 bg-card animate-pulse rounded-lg"},k)):w.length>0?w.map(D=>{const k=p?.find(A=>A.id===D.assignedTo);return e.jsxs("div",{"data-loc":"client/src/pages/KanbanBoard.tsx:112",draggable:!0,onDragStart:()=>y(D.id),onClick:()=>s(`/leads/${D.id}`),className:`bg-card border border-border rounded-lg p-3 cursor-grab active:cursor-grabbing hover:border-primary/30 transition-all ${b===D.id?"opacity-50":""}`,children:[e.jsxs("div",{"data-loc":"client/src/pages/KanbanBoard.tsx:121",className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/KanbanBoard.tsx:122",className:"min-w-0 flex-1",children:[e.jsx("p",{"data-loc":"client/src/pages/KanbanBoard.tsx:123",className:"text-sm font-medium text-foreground truncate",children:D.name}),e.jsx("p",{"data-loc":"client/src/pages/KanbanBoard.tsx:124",className:"text-[10px] text-muted-foreground mt-0.5",children:pT[D.source]||D.source})]}),e.jsx(Vi,{"data-loc":"client/src/pages/KanbanBoard.tsx:126",className:"h-4 w-4 text-muted-foreground
640/50 shrink-0"})]}),e.jsx("div",{"data-loc":"client/src/pages/KanbanBoard.tsx:128",className:"flex items-center gap-2 mt-2 flex-wrap",children:D.phone&&e.jsxs("span",{"data-loc":"client/src/pages/KanbanBoard.tsx:130",className:"text-[10px] text-muted-foreground flex items-center gap-0.5",children:[e.jsx(hn,{"data-loc":"client/src/pages/KanbanBoard.tsx:131",className:"h-2.5 w-2.5"}),D.phone]})}),e.jsxs("div",{"data-loc":"client/src/pages/KanbanBoard.tsx:135",className:"flex items-center justify-between mt-2 pt-2 border-t border-border/50",children:[k?e.jsxs("div",{"data-loc":"client/src/pages/KanbanBoard.tsx:137",className:"flex items-center gap-1",children:[e.jsx("div",{"data-loc":"client/src/pages/KanbanBoard.tsx:138",className:"h-4 w-4 rounded-full bg-primary/20 flex items-center justify-center",children:e.jsx("span",{"data-loc":"client/src/pages/KanbanBoard.tsx:139",className:"text-[8px] font-semibold text-primary",children:k.name?.charAt(0)})}),e.jsx("span",{"data-loc":"client/src/pages/KanbanBoard.tsx:141",className:"text-[10px] text-muted-foreground",children:k.name?.split(" ")[0]})]}):e.jsx("span",{"data-loc":"client/src/pages/KanbanBoard.tsx:144",className:"text-[10px] text-muted-foreground/50",children:"Sem atendente"}),e.jsxs("span",{"data-loc":"client/src/pages/KanbanBoard.tsx:146",className:"text-[10px] text-muted-foreground flex items-center gap-0.5",children:[e.jsx(Za,{"data-loc":"client/src/pages/KanbanBoard.tsx:147",className:"h-2.5 w-2.5"}),new Date(D.updatedAt).toLocaleDateString("pt-BR",{day:"2-digit",month:"short"})]})]})]},D.id)}):e.jsx("div",{"data-loc":"client/src/pages/KanbanBoard.tsx:155",className:"flex items-center justify-center h-24 text-xs text-muted-foreground/50",children:"Arraste leads aqui"})})]},N.id)})})]})}var v3="AlertDialog",[fT]=zs(v3,[Xw]),fr=Xw(),b3=t=>{const{__scopeAlertDialog:s,...r}=t,l=fr(s);return e.jsx(Uh,{...l,...r,modal:!0})};b3.displayName=v3;var gT="AlertDialogTrigger",hT=f.forwardRef((t,s)=>{const{__scopeAlertDialog:r,...l}=t,c=fr(r);return e.jsx(p3,{...c,...l,ref:s})});hT.displayName=gT;var vT="AlertDialogPortal",y3=t=>{const{__scopeAlertDialog:s,...r}=t,l=fr(s);return e.jsx(Ih,{...l,...r})};y3.displayName=vT;var bT="AlertDialogOverlay",j3=f.forwardRef((t,s)=>{const{__scopeAlertDialog:r,...l}=t,c=fr(r);return e.jsx(Bh,{...c,...l,ref:s})});j3.displayName=bT;var Zo="AlertDialogContent",[yT,jT]=fT(Zo),NT=cN("AlertDialogContent"),N3=f.forwardRef((t,s)=>{const{__scopeAlertDialog:r,children:l,...c}=t,d=fr(r),u=f.useRef(null),x=st(s,u),p=f.useRef(null);return e.jsx(eT,{contentName:Zo,titleName:C3,docsSlug:"alert-dialog",children:e.jsx(yT,{scope:r,cancelRef:p,children:e.jsxs(Fh,{role:"alertdialog",...d,...c,ref:x,onOpenAutoFocus:Ae(c.onOpenAutoFocus,g=>{g.preventDefault(),p.current?.focus({preventScroll:!0})}),onPointerDownOutside:g=>g.preventDefault(),onInteractOutside:g=>g.preventDefault(),children:[e.jsx(NT,{children:l}),e.jsx(wT,{contentRef:u})]})})})});N3.displayName=Zo;var C3="AlertDialogTitle",w3=f.forwardRef((t,s)=>{const{__scopeAlertDialog:r,...l}=t,c=fr(r);return e.jsx(Hh,{...c,...l,ref:s})});w3.displayName=C3;var A3="AlertDialogDescription",S3=f.forwardRef((t,s)=>{const{__scopeAlertDialog:r,...l}=t,c=fr(r);return e.jsx(nT,{...c,...l,ref:s})});S3.displayName=A3;var CT="AlertDialogAction",E3=f.forwardRef((t,s)=>{const{__scopeAlertDialog:r,...l}=t,c=fr(r);return e.jsx(Vx,{...c,...l,ref:s})});E3.displayName=CT;var D3="AlertDialogCancel",M3=f.forwardRef((t,s)=>{const{__scopeAlertDialog:r,...l}=t,{cancelRef:c}=jT(D3,r),d=fr(r),u=st(s,c);return e.jsx(Vx,{...d,...l,ref:u})});M3.displayName=D3;var wT=({contentRef:t})=>{const s=`\`${Zo}\` requires a description for the component to be accessible for screen reader users. 641 642You can add a description to the \`${Zo}\` by passing a \`${A3}\` component as a child, which also benefits sighted users by adding visible context to the dialog. 643 644Alternatively, 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 \`${Zo}\`. 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. 645 646For more information, see https://radix-ui.com/primitives/docs/components/
646alert-dialog`;return f.useEffect(()=>{document.getElementById(t.current?.getAttribute("aria-describedby"))||console.warn(s)},[s,t]),null},AT=b3,ST=y3,ET=j3,DT=N3,MT=E3,LT=M3,kT=w3,RT=S3;function Ql({...t}){return e.jsx(AT,{"data-loc":"client/src/components/ui/alert-dialog.tsx:10","data-slot":"alert-dialog",...t})}function TT({...t}){return e.jsx(ST,{"data-loc":"client/src/components/ui/alert-dialog.tsx:25","data-slot":"alert-dialog-portal",...t})}function _T({className:t,...s}){return e.jsx(ET,{"data-loc":"client/src/components/ui/alert-dialog.tsx:34","data-slot":"alert-dialog-overlay",className:Me("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),...s})}function Gl({className:t,...s}){return e.jsxs(TT,{"data-loc":"client/src/components/ui/alert-dialog.tsx:50",children:[e.jsx(_T,{"data-loc":"client/src/components/ui/alert-dialog.tsx:51"}),e.jsx(DT,{"data-loc":"client/src/components/ui/alert-dialog.tsx:52","data-slot":"alert-dialog-content",className:Me("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),...s})]})}function Vl({className:t,...s}){return e.jsx("div",{"data-loc":"client/src/components/ui/alert-dialog.tsx:69","data-slot":"alert-dialog-header",className:Me("flex flex-col gap-2 text-center sm:text-left",t),...s})}function Kl({className:t,...s}){return e.jsx("div",{"data-loc":"client/src/components/ui/alert-dialog.tsx:82","data-slot":"alert-dialog-footer",className:Me("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...s})}function Yl({className:t,...s}){return e.jsx(kT,{"data-loc":"client/src/components/ui/alert-dialog.tsx:98","data-slot":"alert-dialog-title",className:Me("text-lg font-semibold",t),...s})}function Xl({className:t,...s}){return e.jsx(RT,{"data-loc":"client/src/components/ui/alert-dialog.tsx:111","data-slot":"alert-dialog-description",className:Me("text-muted-foreground text-sm",t),...s})}function Zl({className:t,...s}){return e.jsx(MT,{"data-loc":"client/src/components/ui/alert-dialog.tsx:124",className:Me(fh(),t),...s})}function Jl({className:t,...s}){return e.jsx(LT,{"data-loc":"client/src/components/ui/alert-dialog.tsx:136",className:Me(fh({variant:"outline"}),t),...s})}const Mj={admin:{imoveis_view:!0,imoveis_create:!0,imoveis_edit:!0,imoveis_delete:!0,imoveis_manage_photos:!0,imoveis_manage_attachments:!0,imoveis_sync_dwv:!0,clientes_view:!0,clientes_create:!0,clientes_edit:!0,clientes_delete:!0,leads_view:!0,leads_create:!0,leads_edit:!0,leads_delete:!0,leads_transfer:!0,leads_view_all:!0,usuarios_view:!0,usuarios_create:!0,usuarios_edit:!0,usuarios_deactivate:!0,usuarios_change_role:!0,integracoes_view:!0,integracoes_manage:!0,dashboard_view_all:!0},corretor:{imoveis_view:!0,imoveis_create:!0,imoveis_edit:!0,imoveis_delete:!1,imoveis_manage_photos:!0,imoveis_manage_attachments:!0,imoveis_sync_dwv:!1,clientes_view:!0,clientes_create:!0,clientes_edit:!0,clientes_delete:!1,leads_view:!0,leads_create:!0,leads_edit:!0,leads_delete:!1,leads_transfer:!1,leads_view_all:!1,usuarios_view:!1,usuarios_create:!1,usuarios_edit:!1,usuarios_deactivate:!1,usuarios_change_role:!1,integracoes_view:!1,integracoes_manage:!1,dashboard_view_all:!1},secretaria:{imoveis_view:!0,imoveis_create:!1,imoveis_edit:!1,imoveis_delete:!1,imoveis_manage_photos:!1,imoveis_manage_attachments:!1,imoveis_sync_dwv:!1,clientes_view:!0,clientes_create:!1,clientes_edit:!1,clientes_delete:!1,leads_view:!0,leads_create:!1,leads_edit:!1,leads_delete:!1,leads_transfer:!1,leads_view_all:!0,usuarios_view:!1,usuarios_create:!1,usuarios_edit:!1,usuarios_deactivate:!1,usuarios_change_role:!1,integracoes_view:!1,integracoes_manage:!1,dashboard_view_all:!1},gerente:{imoveis_view:!0,imoveis_create:!0,imoveis_edit:!0,imoveis_delete:!1,imoveis_manage_p
646hotos:!0,imoveis_manage_attachments:!0,imoveis_sync_dwv:!0,clientes_view:!0,clientes_create:!0,clientes_edit:!0,clientes_delete:!1,leads_view:!0,leads_create:!0,leads_edit:!0,leads_delete:!1,leads_transfer:!0,leads_view_all:!0,usuarios_view:!0,usuarios_create:!1,usuarios_edit:!1,usuarios_deactivate:!1,usuarios_change_role:!1,integracoes_view:!0,integracoes_manage:!1,dashboard_view_all:!0}};function OT(t){return Mj[t]??Mj.secretaria}function Kx(){const{user:t}=ka(),s=t?.role??"secretaria",r=OT(s),l=Y.users.myMenuPermissions.useQuery(void 0,{staleTime:300*1e3,enabled:s!=="admin"});return{can:r,role:s,isAdmin:s==="admin",isCorretor:s==="corretor",isSecretaria:s==="secretaria",canEditPage:d=>{if(s==="admin")return!0;const u=l.data?.permissions?.[d];return!u||typeof u=="boolean"?!0:typeof u=="object"&&"mode"in u?u.mode!=="visualizar":!0}}}const ui=25,PT=[{value:"",label:"Todos"},{value:"lead",label:"Lead"},{value:"proprietario",label:"Proprietário"},{value:"comprador",label:"Comprador"},{value:"locatario",label:"Locatário"}];function zT({client:t}){const s=[];return t.isLead&&s.push("Lead"),t.isProprietario&&s.push("Proprietário"),t.isLocador&&s.push("Locador"),t.isLocatario&&s.push("Locatário"),t.isComprador&&s.push("Comprador"),t.isFiador&&s.push("Fiador"),t.isSindico&&s.push("SÃndico"),t.isOutros&&s.push("Outros"),s.length===0?e.jsx("span",{"data-loc":"client/src/pages/Clients.tsx:52",className:"text-[#6B6B7A] text-xs",children:"â"}):e.jsx("div",{"data-loc":"client/src/pages/Clients.tsx:54",className:"flex flex-wrap gap-1",children:s.map(r=>e.jsx("span",{"data-loc":"client/src/pages/Clients.tsx:56",className:"inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium bg-primary/10 text-primary border border-primary/20",children:r},r))})}function UT({etiquetas:t}){if(!t)return e.jsx("span",{"data-loc":"client/src/pages/Clients.tsx:65",className:"text-[#6B6B7A] text-xs",children:"â"});let s=[];try{s=JSON.parse(t)}catch{s=t.split(",").map(r=>r.trim()).filter(Boolean)}return s.length?e.jsxs("div",{"data-loc":"client/src/pages/Clients.tsx:70",className:"flex flex-wrap gap-1",children:[s.slice(0,3).map(r=>e.jsx("span",{"data-loc":"client/src/pages/Clients.tsx:72",className:"inline-flex items-center px-1.5 py-0.5 rounded text-[10px] bg-border text-[#A0A0AB] border border-[#2A2A2E]",children:r},r)),s.length>3&&e.jsxs("span",{"data-loc":"client/src/pages/Clients.tsx:76",className:"text-[#6B6B7A] text-xs",children:["+",s.length-3]})]}):e.jsx("span",{"data-loc":"client/src/pages/Clients.tsx:68",className:"text-[#6B6B7A] text-xs",children:"â"})}function IT(){const[,t]=fs();ka();const{can:s,canEditPage:r}=Kx(),l=r("/clientes"),[c,d]=f.useState(""),[u,x]=f.useState(""),[p,g]=f.useState(0),[b,v]=f.useState(""),[y,j]=f.useState(""),[S,N]=f.useState(!1),[w,D]=f.useState(null),[k,A]=f.useState(new Set),_=Y.useUtils(),E=f.useMemo(()=>({search:c||void 0,relacionamento:b||void 0,tipo:y||void 0,limit:ui,offset:p*ui}),[c,b,y,p]),{data:I,isLoading:R}=Y.clients.list.useQuery(E),z=Y.clients.delete.useMutation({onSuccess:()=>{_.clients.list.invalidate(),ce.success("Cliente excluÃdo"),D(null)},onError:T=>ce.error(T.message)}),U=()=>{d(u),g(0)},B=T=>{T.key==="Enter"&&U()},F=()=>{d(""),x(""),v(""),j(""),g(0)},V=T=>{A(K=>{const ve=new Set(K);return ve.has(T)?ve.delete(T):ve.add(T),ve})},de=()=>{I?.data&&(k.size===I.data.length?A(new Set):A(new Set(I.data.map(T=>T.id))))},le=I?.data??[],xe=I?.total??0,M=Math.ceil(xe/ui),O=c||b||y;return e.jsxs("div",{"data-loc":"client/src/pages/Clients.tsx:139",className:"flex flex-col min-h-full",children:[e.jsxs("div",{"data-loc":"client/src/pages/Clients.tsx:141",className:"flex items-center justify-between px-3 md:px-6 py-3 md:py-4 border-b border-border",children:[e.jsxs("div",{"data-loc":"client/src/pages/Clients.tsx:142",children:[e.jsx("h1",{"data-loc":"client/src/pages/Clients.tsx:143",className:"text-lg font-semibold text-foreground",children:"Clientes"}),e.jsx("p",{"data-loc":"client/src/pages/Clients.tsx:144",className:"text-xs text-[#6B6B7A] mt-0.5",children:xe>0?`${xe} registros`:"Nenhum cliente cadastrado"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Clients.tsx:146",className:"flex items-center gap-2",children:[e.jsxs(oe,{"data-loc":"client/src/pages/Clients.tsx:147",variant:"outline",size:"sm",className:"border-border text-[#A0A0AB] hover:text-foreground hover:border-primary/50 h-8 text-xs",onClick:()=>ce.info("Exportação em breve"),children:[e.jsx(gh,{"data-loc":"client/src/pages/Clients.tsx:150",className:"w-3.5 h-3.5 mr-1.5"}),"Exportar"]}),s.clientes_create&&l&&e.jsxs(_i,{"data-loc":"client/src/pages/Clients.tsx:153",children:[e.jsx(Oi,{"data-loc":"client/src/pages/Clients.tsx:154",asChild:!0,children:e.jsxs(oe,{"data-loc":"client/src/pages/Clients.tsx:155",size:"sm",className:"bg-primary hover:bg-[#B8935A] text-[#0A0A0B] font-semibold h-8 text-xs",children:[e.jsx(Jt,{"data-loc":"client/src/pages/Clients.tsx:156",className:"w-3.5 h-3.5 mr-1.5"}),"Incluir cliente",e.jsx(Xa,{"data-loc":"client/src/pages/Clients.tsx:158",className:"w-3 h-3 ml-1"})]})}),e.jsxs(Pi,{"data-loc":"client/src/pages/Clients.tsx:161",align:"end",className:"bg-card border-border text-foreground w-44",children:[e.jsxs(ps,{"data-loc":"client/src/pages/Clients.tsx:162",className:"hover:bg-border
646cursor-pointer text-sm",onClick:()=>t("/clientes/novo?tipo=pessoa_fisica"),children:[e.jsx(vh,{"data-loc":"client/src/pages/Clients.tsx:164",className:"w-3.5 h-3.5 mr-2 text-primary"}),"Nova pessoa"]}),e.jsxs(ps,{"data-loc":"client/src/pages/Clients.tsx:166",className:"hover:bg-border cursor-pointer text-sm",onClick:()=>t("/clientes/novo?tipo=pessoa_juridica"),children:[e.jsx(mM,{"data-loc":"client/src/pages/Clients.tsx:168",className:"w-3.5 h-3.5 mr-2 text-primary"}),"Nova empresa"]})]})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Clients.tsx:177",className:"px-3 md:px-6 py-3 border-b border-border space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Clients.tsx:178",className:"flex flex-wrap items-center gap-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/Clients.tsx:179",className:"relative flex-1 max-w-md",children:[e.jsx(or,{"data-loc":"client/src/pages/Clients.tsx:180",className:"absolute left-3 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-[#6B6B7A]"}),e.jsx(ge,{"data-loc":"client/src/pages/Clients.tsx:181",placeholder:"Buscar por nome, CPF/CNPJ, e-mail...",value:u,onChange:T=>x(T.target.value),onKeyDown:B,className:"pl-9 h-8 text-sm bg-card border-border text-foreground placeholder:text-[#6B6B7A] focus-visible:ring-primary/30"})]}),e.jsx(oe,{"data-loc":"client/src/pages/Clients.tsx:185",size:"sm",onClick:U,className:"bg-primary hover:bg-[#B8935A] text-[#0A0A0B] font-medium h-8 text-xs",children:"Pesquisar"}),e.jsxs(oe,{"data-loc":"client/src/pages/Clients.tsx:186",variant:"outline",size:"sm",onClick:()=>N(!S),className:`h-8 text-xs border-border ${S?"text-primary border-primary/40":"text-[#A0A0AB]"} hover:text-foreground`,children:[e.jsx(Ox,{"data-loc":"client/src/pages/Clients.tsx:188",className:"w-3.5 h-3.5 mr-1.5"}),"Filtros avançados",e.jsx(Xa,{"data-loc":"client/src/pages/Clients.tsx:189",className:`w-3 h-3 ml-1 transition-transform ${S?"rotate-180":""}`})]}),O&&e.jsxs(oe,{"data-loc":"client/src/pages/Clients.tsx:192",variant:"ghost",size:"sm",onClick:F,className:"h-8 text-xs text-[#6B6B7A] hover:text-foreground",children:[e.jsx(va,{"data-loc":"client/src/pages/Clients.tsx:193",className:"w-3.5 h-3.5 mr-1"}),"Limpar"]})]}),S&&e.jsxs("div",{"data-loc":"client/src/pages/Clients.tsx:198",className:"flex items-center gap-3 pt-1",children:[e.jsxs("div",{"data-loc":"client/src/pages/Clients.tsx:199",className:"flex items-center gap-2",children:[e.jsx("label",{"data-loc":"client/src/pages/Clients.tsx:200",className:"text-xs text-[#6B6B7A] whitespace-nowrap",children:"Tipo:"}),e.jsxs("select",{"data-loc":"client/src/pages/Clients.tsx:201",value:y,onChange:T=>{j(T.target.value),g(0)},className:"h-7 text-xs bg-card border border-border text-foreground rounded px-2 focus:outline-none focus:border-primary/50",children:[e.jsx("option",{"data-loc":"client/src/pages/Clients.tsx:203",value:"",children:"Todos"}),e.jsx("option",{"data-loc":"client/src/pages/Clients.tsx:204",value:"pessoa_fisica",children:"Pessoa FÃsica"}),e.jsx("option",{"data-loc":"client/src/pages/Clients.tsx:205",value:"pessoa_juridica",children:"Pessoa JurÃdica"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Clients.tsx:208",className:"flex items-center gap-2",children:[e.jsx("label",{"data-loc":"client/src/pages/Clients.tsx:209",className:"text-xs text-[#6B6B7A] whitespace-nowrap",children:"Relacionamento:"}),e.jsx("select",{"data-loc":"client/src/pages/Clients.tsx:210",value:b,onChange:T=>{v(T.target.value),g(0)},className:"h-7 text-xs bg-card border border-border text-foreground rounded px-2 focus:outline-none focus:border-primary/50",children:PT.map(T=>e.jsx("option",{"data-loc":"client/src/pages/Clients.tsx:212",value:T.value,children:T.label},T.value))})]})]})]}),k.size>0&&e.jsxs("div",{"data-loc":"client/src/pages/Clients.tsx:221",className:"px-3 md:px-6 py-2 bg-primary/10 border-b border-primary/20 flex items-center gap-3",children:[e.jsxs("span",{"data-loc":"client/src/pages/Clients.tsx:222",className:"text-xs text-primary font-medium",children:[k.size," selecionado(s)"]}),e.jsxs(oe,{"data-loc":"client/src/pages/Clients.tsx:223",size:"sm",variant:"ghost",className:"h-7 text-xs text-[#6B6B7A]",onClick:()=>A(new Set),children:[e.jsx(va,{"data-loc":"client/src/pages/Clients.tsx:224",className:"w-3 h-3 mr-1"})," Cancelar"]})]}),e.jsx("div",{"data-loc":"client/src/pages/Clients.tsx:230",className:"flex-1 overflow-auto",children:e.jsxs("table",{"data-loc":"client/src/pages/Clients.tsx:231",className:"w-full text-sm",children:[e.jsx("thead",{"data-loc":"client/src/pages/Clients.tsx:232",className:"sticky top-0 z-10",children:e.jsxs("tr",{"data-loc":"client/src/pages/Clients.tsx:233",className:"bg-muted border-b border-border",children:[e.jsx("th",{"data-loc":"client/src/pages/Clients.tsx:234",className:"w-10 px-4 py-2.5",children:e.jsx("input",{"data-loc":"client/src/pages/Clients.tsx:235",type:"checkbox",className:"rounded border-[#2A2A2E] bg-card accent-[#C9A96E]",checked:le.length>0&&k.size===le.length,onChange:de})}),e.jsx("th",{"data-loc":"client/src/pages/Clients.tsx:238",className:"px-3 py-2.5 text-left text-[10px] font-semibold text-[#6B6B7A] uppercase tracking-wider w-10",children:"Tipo"}),e.jsx("th",{"data-loc":"client/src/pages/Clients.tsx:239",className:"px-3 py-2.5 text-left text-[10px] font-semibold text-[#6B6B7A] uppercase tracking-wider w-16",children:"Cód."}),e.jsx("th",{"data-loc":"client/src/pages/Clients.tsx:240",className:"px-3 py-2.5 text-left text-[10px] font-semibold text-[#6B6B7A] uppercase tracking-wider",children:"Nome / Razão Social"}),e.jsx("th",{"data-loc":"client/src/pages/Clients.tsx:241",className:"px-3 py-2.5 text-left text-[10px] font-semibold text-[#6B6B7A] uppercase tracking-wider",children:"CPF / CNPJ"}),e.jsx("th",{"data-loc":"client/src/pages/Clients.tsx:242",className:"px-3 py-2.5 text-left text-[10px] font-semibold text-[#6B6B7A] uppercase tracking-wider",children:"Telefone"}),e.jsx("th",{"data-loc":"client/src/pages/Clients.tsx:243",className:"px-3 py-2.5 text-left text-[10px] font-semibold text-[#6B6B7A] uppercase tracking-wider",children:"Relacionamentos"}),e.jsx("th",{"data-loc":"client/src/pages/Clients.tsx:244",className:"px-3 py-2.5 text-left text-[10px] font-semibold text-[#6B6B7A] uppercase tracking-wider",children:"Etiquetas"}),e.jsx("th",{"data-loc":"client/src/pages/Clients.tsx:245",className:"px-3 py-2.5 text-right text-[10px] font-semibold text-[#6B6B7A] uppercase tracking-wider w-20",children:"Ações"})]})}),e.jsx("tbody",{"data-loc":"client/src/pages/Clients.tsx:248",children:R?Array.from({length:8}).map((T,K)=>e.jsx("tr",{"data-loc":"client/src/pages/Clients.tsx:251",className:"border-b border-border",children:Array.from({length:9}).map((ve,P)=>e.jsx("td",{"data-loc":"client/src/pages/Clients.tsx:253",className:"px-3 py-3",children:e.jsx("div",{"data-loc":"client/src/pages/Clients.tsx:254",className:"h-3 bg-border rounded animate-pulse",style:{width:P===3?"140px":"60px"}})},P))},K)):le.length===0?e.jsx("tr",{"data-loc":"client/src/pages/Clients.tsx:260",children:e.jsx("td",{"data-loc":"client/src/pages/Clients.tsx:261",colSpan:9,className:"px-6 py-16 text-center",children:e.jsxs("div",{"data-loc":"client/src/pages/Clients.tsx:262",className:"flex flex-col items-center gap-3",children:[e.jsx("div",{"data-loc":"client/src/pages/Clients.tsx:263",className:"w-12 h-12 rounded-full bg-border flex items-center justify-center",children:e.jsx(Ua,{"data-loc":"client/src/pages/Clients.tsx:264",className:"w-6 h-6 text-[#6B6B7A]"})}),e.jsx("p",{"data-loc":"client/src/pages/Clients.tsx:266",className:"text-[#6B6B7A] text-sm",children:"Nenhum cliente encontrado"}),O&&e.jsx(oe,{"data-loc":"client/src/pages/Clients.tsx:268",variant:"ghost",size:"sm",onClick:F,className:"text-primary text-xs",children:"Limpar filtros"})]})})}):le.map(T=>e.jsxs("tr",{"data-loc":"client/src/pages/Clients.tsx:275",className:"border-b border-border hover:bg-card transition-colors group",children:[e.jsx("td",{"data-loc":"client/src/pages/Clients.tsx:276",className:"px-4 py-2.5",children:e.jsx("input",{"data-loc":"client/src/pages/Clients.tsx:277",type:"checkbox",className:"rounded border-[#2A2A2E] bg-background accent-[#C9A96E]",checked:k.has(T.id),onChange:()=>V(T.id),onClick:K=>K.stopPropagation()})}),e.jsx("td",{"data-loc":"client/src/pages/Clients.tsx:280",className:"px-3 py-2.5",children:e.jsx("div",{"data-loc":"client/src/pages/Clients.tsx:281",className:"w-6 h-6 rounded flex items-center justify-center bg-border",children:T.tipo==="pessoa_juridica"?e.jsx(un,{"data-loc":"client/src/pages/Clients.tsx:283",className:"w-3.5 h-3.5 text-primary"}):e.jsx(Ua,{"data-loc":"client/src/pages/Clients.tsx:284",className:"w-3.5 h-3.5 text-primary"})})}),e.jsx("td",{"data-loc":"client/src/pages/Clients.tsx:287",className:"px-3 py-2.5",children:e.jsx("button",{"data-loc":"client/src/pages/Clients.tsx:288",onClick:()=>t(`/clientes/${T.id}`),className:"text-primary hover:text-[#E0B87A] font-medium text-xs tabular-nums",children:T.id})}),e.jsx("td",{"data-loc":"client/src/pages/Clients.tsx:293",className:"px-3 py-2.5",children:e.jsx("button",{"data-loc":"client/src/pages/Clients.tsx:294",onClick:()=>t(`/clientes/${T.id}`),className:"text-foreground hover:text-primary font-medium text-sm text-left max-w-[220px] truncate block",children:T.name})}),e.jsx("td",{"data-loc":"client/src/pages/Clients.tsx:299",className:"px-3 py-2.5 text-[#A0A0AB] text-xs tabular-nums",children:T.tipo==="pessoa_juridica"?T.cnpj||e.jsx("span",{"data-loc":"client/src/pages/Clients.tsx:301",className:"text-[#6B6B7A]",children:"â"}):T.cpf||e.jsx("span",{"data-loc":"client/src/pages/Clients.tsx:302",className:"text-[#6B6B7A]",children:"â"})}),e.jsx("td",{"data-loc":"client/src/pages/Clients.tsx:304",className:"px-3 py-2.5 text-[#A0A0AB] text-xs tabular-nums",children:e.jsx("span",{"data-loc":"client/src/pages/Clients.tsx:305",className:"text-[#6B6B7A]",children:"â"})}),e.jsx("td",{"data-loc":"client/src/pages/Clients.tsx:307",className:"px-3 py-2.5",children:e.jsx(zT,{"data-loc":"client/src/pages/Clients.tsx:307",client:T})}),e.jsx("td",{"data-loc":"client/src/pages/Clients.tsx:308",className:"px-3 py-2.5",children:e.jsx(UT,{"data-loc":"client/src/pages/Clients.tsx:308",etiquetas:T.etiquetas})}),e.jsx("td",{"data-loc":"client/src/pages/Clients.tsx:309",className:"px-3 py-2.5 text-right",children:e.jsxs(_i,{"data-loc":"client/src/pages/Clients.tsx:310",children:[e.jsx(Oi,{"data-loc":"client/src/pages/Clients.tsx:311",asChild:!0,children:e.jsxs(oe,{"data-loc":"client/src/pages/Clients.tsx:312",variant:"ghost",size:"sm",className:"h-7 px-2 text-xs text-[#A0A0AB] hover:text-foreground hover:bg-border opacity-0 group-hover:opacity-100 transition-opacity",children:["Ações ",e.jsx(Xa,{"data-loc":"client/src/pages/Clients.tsx:314",className:"w-3 h-3 ml-1"})]})}),e.jsxs(Pi,{"data-loc":"client/src/pages/Clients.tsx:317",align:"end",className:"bg-card border-border text-foreground w-44",children:[e.jsxs(ps,{"data-loc":"client/src/pages/Clients.tsx:318",className:"hover:bg-border
646cursor-pointer text-sm",onClick:()=>t(`/clientes/${T.id}`),children:[e.jsx(_x,{"data-loc":"client/src/pages/Clients.tsx:320",className:"w-3.5 h-3.5 mr-2 text-[#6B6B7A]"}),"Detalhes"]}),s.clientes_edit&&l&&e.jsxs(ps,{"data-loc":"client/src/pages/Clients.tsx:323",className:"hover:bg-border cursor-pointer text-sm",onClick:()=>t(`/clientes/${T.id}/editar`),children:[e.jsx(dr,{"data-loc":"client/src/pages/Clients.tsx:325",className:"w-3.5 h-3.5 mr-2 text-[#6B6B7A]"}),"Alterar"]}),s.clientes_delete&&l&&e.jsxs(e.Fragment,{children:[e.jsx(Th,{"data-loc":"client/src/pages/Clients.tsx:330",className:"bg-border"}),e.jsxs(ps,{"data-loc":"client/src/pages/Clients.tsx:331",className:"hover:bg-border cursor-pointer text-sm text-red-400 hover:text-red-300",onClick:()=>D(T.id),children:[e.jsx(Ba,{"data-loc":"client/src/pages/Clients.tsx:333",className:"w-3.5 h-3.5 mr-2"}),"Excluir pessoa"]})]})]})]})})]},T.id))})]})}),M>1&&e.jsxs("div",{"data-loc":"client/src/pages/Clients.tsx:349",className:"flex items-center justify-between px-6 py-3 border-t border-border",children:[e.jsxs("span",{"data-loc":"client/src/pages/Clients.tsx:350",className:"text-xs text-[#6B6B7A]",children:[p*ui+1,"â",Math.min((p+1)*ui,xe)," de ",xe]}),e.jsxs("div",{"data-loc":"client/src/pages/Clients.tsx:351",className:"flex items-center gap-1",children:[e.jsx(oe,{"data-loc":"client/src/pages/Clients.tsx:352",variant:"ghost",size:"sm",disabled:p===0,onClick:()=>g(T=>T-1),className:"h-7 w-7 p-0 text-[#A0A0AB] hover:text-foreground disabled:opacity-30",children:e.jsx(nc,{"data-loc":"client/src/pages/Clients.tsx:354",className:"w-4 h-4"})}),e.jsxs("span",{"data-loc":"client/src/pages/Clients.tsx:356",className:"text-xs text-[#6B6B7A] px-2",children:[p+1," / ",M]}),e.jsx(oe,{"data-loc":"client/src/pages/Clients.tsx:357",variant:"ghost",size:"sm",disabled:p>=M-1,onClick:()=>g(T=>T+1),className:"h-7 w-7 p-0 text-[#A0A0AB] hover:text-foreground disabled:opacity-30",children:e.jsx(Ia,{"data-loc":"client/src/pages/Clients.tsx:359",className:"w-4 h-4"})})]})]}),e.jsx(Ql,{"data-loc":"client/src/pages/Clients.tsx:366",open:w!==null,onOpenChange:()=>D(null),children:e.jsxs(Gl,{"data-loc":"client/src/pages/Clients.tsx:367",className:"bg-card border-border text-foreground",children:[e.jsxs(Vl,{"data-loc":"client/src/pages/Clients.tsx:368",children:[e.jsx(Yl,{"data-loc":"client/src/pages/Clients.tsx:369",children:"Excluir cliente"}),e.jsx(Xl,{"data-loc":"client/src/pages/Clients.tsx:370",className:"text-[#6B6B7A]",children:"Esta ação é irreversÃvel. Todos os dados deste cliente serão removidos permanentemente."})]}),e.jsxs(Kl,{"data-loc":"client/src/pages/Clients.tsx:374",children:[e.jsx(Jl,{"data-loc":"client/src/pages/Clients.tsx:375",className:"bg-transparent border-border text-[#A0A0AB] hover:bg-border",children:"Cancelar"}),e.jsx(Zl,{"data-loc":"client/src/pages/Clients.tsx:376",onClick:()=>w&&z.mutate({id:w}),className:"bg-red-600 hover:bg-red-700 text-white",children:"Excluir"})]})]})})]})}const BT={celular:"Celular",residencial:"Residencial",comercial:"Comercial",whatsapp:"WhatsApp",outro:"Outro"},FT={pessoal:"Pessoal",comercial:"Comercial",outro:"Outro"},HT={residencial:"Residencial",comercial:"Comercial",outro:"Outro"};function qT({value:t}){return e.jsx("div",{"data-loc":"client/src/pages/ClientDetail.tsx:31",className:"flex gap-0.5",children:[1,2,3,4,5].map(s=>e.jsx(hh,{"data-loc":"client/src/pages/ClientDetail.tsx:33",className:`w-4 h-4 ${s<=t?"fill-[#C9A96E] text-primary":"text-[#2A2A2E]"}`},s))})}function qr({title:t,icon:s,children:r}){return e.jsxs("div",{"data-loc":"client/src/pages/ClientDetail.tsx:41",className:"bg-card border border-border rounded-lg overflow-hidden",children:[e.jsxs("div",{"data-loc":"client/src/pages/ClientDetail.tsx:42",className:"flex items-center gap-2 px-4 py-3 border-b border-border",children:[e.jsx("span",{"data-loc":"client/src/pages/ClientDetail.tsx:43",className:"text-primary",children:s}),e.jsx("h3",{"data-loc":"client/src/pages/ClientDetail.tsx:44",className:"text-sm font-semibold text-foreground",children:t})]}),e.jsx("div",{"data-loc":"client/src/pages/ClientDetail.tsx:46",className:"p-4",children:r})]})}function wa({label:t,value:s}){return e.jsxs("div",{"data-loc":"client/src/pages/ClientDetail.tsx:53",children:[e.jsx("p",{"data-loc":"client/src/pages/ClientDetail.tsx:54",className:"text-[10px] text-[#6B6B7A] uppercase tracking-wider mb-0.5",children:t}),e.jsx("p",{"data-loc":"client/src/pages/ClientDetail.tsx:55",className:"text-sm text-foreground",children:s||e.jsx("span",{"data-loc":"client/src/pages/ClientDetail.tsx:55",className:"text-[#3A3A3E]",children:"â"})})]})}function $T(){const t=mc(),s=Number(t.id),[,r]=fs(),[l,c]=f.useState("detalhes"),{data:d,isLoading:u}=Y.clients.getById.useQuery({id:s}),{data:x}=Y.clientInteractions.list.useQuery({clientId:s}),{data:p}=Y.atendimentos.byClient.useQuery({clientId:s}),{data:g}=Y.users.list.useQuery(),b=g?.find(j=>j.id===d?.assignedTo);if(u)return e.jsx("div",{"data-loc":"client/src/pages/ClientDetail.tsx:75",className:"flex items-center justify-center h-64",children:e.jsx("div",{"data-loc":"client/src/pages/ClientDetail.tsx:76",className:"w-6 h-6 border-2 border-primary border-t-transparent roun
646ded-full animate-spin"})});if(!d)return e.jsxs("div",{"data-loc":"client/src/pages/ClientDetail.tsx:83",className:"flex flex-col items-center justify-center h-64 gap-3",children:[e.jsx("p",{"data-loc":"client/src/pages/ClientDetail.tsx:84",className:"text-[#6B6B7A]",children:"Cliente não encontrado"}),e.jsxs(oe,{"data-loc":"client/src/pages/ClientDetail.tsx:85",variant:"ghost",onClick:()=>r("/clientes"),className:"text-primary",children:[e.jsx(Fl,{"data-loc":"client/src/pages/ClientDetail.tsx:86",className:"w-4 h-4 mr-2"}),"Voltar"]})]});const v=d.phones?.[0],y=d.emails?.[0];return d.addresses?.[0],d.isLead,d.isProprietario,d.isLocador,d.isLocatario,d.isComprador,d.isFiador,d.isSindico,d.isOutros,e.jsxs("div",{"data-loc":"client/src/pages/ClientDetail.tsx:107",className:"flex flex-col min-h-full",children:[e.jsxs("div",{"data-loc":"client/src/pages/ClientDetail.tsx:109",className:"flex flex-wrap items-center justify-between gap-2 px-3 md:px-6 py-3 md:py-4 border-b border-border",children:[e.jsxs("div",{"data-loc":"client/src/pages/ClientDetail.tsx:110",className:"flex items-center gap-3",children:[e.jsx(oe,{"data-loc":"client/src/pages/ClientDetail.tsx:111",variant:"ghost",size:"sm",onClick:()=>r("/clientes"),className:"h-7 w-7 p-0 text-[#6B6B7A] hover:text-foreground",children:e.jsx(Fl,{"data-loc":"client/src/pages/ClientDetail.tsx:113",className:"w-4 h-4"})}),e.jsxs("div",{"data-loc":"client/src/pages/ClientDetail.tsx:115",children:[e.jsxs("div",{"data-loc":"client/src/pages/ClientDetail.tsx:116",className:"flex items-center gap-2",children:[e.jsx("span",{"data-loc":"client/src/pages/ClientDetail.tsx:117",className:"text-xs text-[#6B6B7A]",children:"Clientes"}),e.jsx(Ia,{"data-loc":"client/src/pages/ClientDetail.tsx:118",className:"w-3 h-3 text-[#3A3A3E]"}),e.jsx("span",{"data-loc":"client/src/pages/ClientDetail.tsx:119",className:"text-xs text-[#6B6B7A]",children:d.name}),e.jsx(Ia,{"data-loc":"client/src/pages/ClientDetail.tsx:120",className:"w-3 h-3 text-[#3A3A3E]"}),e.jsx("span",{"data-loc":"client/src/pages/ClientDetail.tsx:121",className:"text-xs text-[#A0A0AB]",children:"Detalhes"})]}),e.jsx("h1",{"data-loc":"client/src/pages/ClientDetail.tsx:123",className:"text-base font-semibold text-foreground mt-0.5",children:d.name})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientDetail.tsx:126",className:"flex items-center gap-2",children:[e.jsx("div",{"data-loc":"client/src/pages/ClientDetail.tsx:128",className:"flex items-center bg-muted border border-border rounded-md p-0.5 mr-2",children:["detalhes","atendimentos","auditoria"].map(j=>e.jsxs("button",{"data-loc":"client/src/pages/ClientDetail.tsx:130",onClick:()=>c(j),className:`px-3 py-1 text-xs rounded transition-colors capitalize ${l===j?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,children:[j,j==="atendimentos"&&x&&x.length>0&&e.jsx("span",{"data-loc":"client/src/pages/ClientDetail.tsx:134",className:"ml-1 bg-primary/20 text-primary text-[10px] px-1 rounded",children:x.length})]},j))}),e.jsxs(_i,{"data-loc":"client/src/pages/ClientDetail.tsx:139",children:[e.jsx(Oi,{"data-loc":"client/src/pages/ClientDetail.tsx:140",asChild:!0,children:e.jsx(oe,{"data-loc":"client/src/pages/ClientDetail.tsx:141",variant:"outline",size:"sm",className:"h-8 text-xs border-border text-muted-foreground hover:text-foreground",children:"Ações"})}
646),e.jsxs(Pi,{"data-loc":"client/src/pages/ClientDetail.tsx:146",align:"end",className:"bg-card border-border text-foreground w-48",children:[e.jsxs(ps,{"data-loc":"client/src/pages/ClientDetail.tsx:147",className:"hover:bg-border cursor-pointer text-sm",onClick:()=>r(`/clientes/${s}/editar`),children:[e.jsx(dr,{"data-loc":"client/src/pages/ClientDetail.tsx:149",className:"w-3.5 h-3.5 mr-2 text-[#6B6B7A]"}),"Alterar pessoa"]}),e.jsxs(ps,{"data-loc":"client/src/pages/ClientDetail.tsx:151",className:"hover:bg-border cursor-pointer text-sm",onClick:()=>ce.info("Em breve"),children:[e.jsx(Rg,{"data-loc":"client/src/pages/ClientDetail.tsx:153",className:"w-3.5 h-3.5 mr-2 text-[#6B6B7A]"}),"Gerenciar anexos"]}),e.jsxs(ps,{"data-loc":"client/src/pages/ClientDetail.tsx:155",className:"hover:bg-border cursor-pointer text-sm",onClick:()=>ce.info("Em breve"),children:[e.jsx(Yo,{"data-loc":"client/src/pages/ClientDetail.tsx:157",className:"w-3.5 h-3.5 mr-2 text-[#6B6B7A]"}),"Habilitar aviso via pop-up"]})]})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientDetail.tsx:165",className:"flex-1 p-3 md:p-6",children:[l==="detalhes"&&e.jsxs("div",{"data-loc":"client/src/pages/ClientDetail.tsx:167",className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/ClientDetail.tsx:169",className:"lg:col-span-2 space-y-4",children:[e.jsx(qr,{"data-loc":"client/src/pages/ClientDetail.tsx:171",title:"Dados pessoais",icon:e.jsx(Ua,{"data-loc":"client/src/pages/ClientDetail.tsx:171",className:"w-4 h-4"}),children:e.jsxs("div",{"data-loc":"client/src/pages/ClientDetail.tsx:172",className:"grid grid-cols-2 sm:grid-cols-3 gap-4",children:[e.jsx(wa,{"data-loc":"client/src/pages/ClientDetail.tsx:173",label:"Código",value:String(d.id)}),d.codigoAuxiliar&&e.jsx(wa,{"data-loc":"client/src/pages/ClientDetail.tsx:174",label:"Código auxiliar",value:d.codigoAuxiliar}),e.jsx(wa,{"data-loc":"client/src/pages/ClientDetail.tsx:175",label:"Tipo",value:d.tipo==="pessoa_juridica"?"Pessoa JurÃdica":"Pessoa FÃsica"}),e.jsx(wa,{"data-loc":"client/src/pages/ClientDetail.tsx:176",label:"Nome",value:d.name}),d.tipo==="pessoa_fisica"?e.jsxs(e.Fragment,{children:[e.jsx(wa,{"data-loc":"client/src/pages/ClientDetail.tsx:179",label:"CPF",value:d.cpf}),e.jsx(wa,{"data-loc":"client/src/pages/ClientDetail.tsx:180",label:"Data de nascimento",value:d.dataNascimento}),e.jsx(wa,{"data-loc":"client/src/pages/ClientDetail.tsx:181",label:"Sexo",value:d.sexo}),e.jsx(wa,{"data-loc":"client/src/pages/ClientDetail.tsx:182",label:"Estado civil",value:d.estadoCivil}),e.jsx(wa,{"data-loc":"client/src/pages/ClientDetail.tsx:183",label:"Naturalidade",value:d.naturalidade}),e.jsx(wa,{"data-loc":"client/src/pages/ClientDetail.tsx:184",label:"Nacionalidade",value:d.nacionalidade})]}):e.jsx(e.Fragment,{children:e.jsx(wa,{"data-loc":"client/src/pages/ClientDetail.tsx:188",label:"CNPJ",value:d.cnpj})}),d.urlPublica&&e.jsx(wa,{"data-loc":"client/src/pages/ClientDetail.tsx:191",label:"URL pública",value:d.urlPublica}),d.etiquetas&&e.jsxs("div",{"data-loc":"client/src/pages/ClientDetail.tsx:193",className:"col-span-full",children:[e.jsx("p",{"data-loc":"client/src/pages/ClientDetail.tsx:194",className:"text-[10px] text-[#6B6B7A] uppercase tracking-wider mb-1",children:"Etiquetas"}),e.jsx("div",{"data-loc":"client/src/pages/ClientDetail.tsx:195",className:"flex flex-wrap gap-1",children:(()=>{let j=[];try{j=JSON.parse(d.etiquetas)}catch{j=(d.etiquetas||"").split(",").map(S=>S.trim())}return j.map(S=>e.jsx("span",{"data-loc":"client/src/pages/ClientDetail.tsx:200",className:"px-2 py-0.5 rounded text-xs bg-border text-[#A0A0AB] border border-[#2A2A2E]",children:S},S))})()})]})]})}),d.phones&&d.phones.length>0&&e.jsx(qr,{"data-loc":"client/src/pages/ClientDetail.tsx:211",title:"Telefones",icon:e.jsx(hn,{"data-loc":"client/src/pages/ClientDetail.tsx:211",className:"w-4 h-4"}),children:e.jsx("div",{"data-loc":"client/src/pages/ClientDetail.tsx:212",className:"space-y-2",children:d.phones.map((j,S)=>e.jsxs("div",{"data-loc":"client/src/pages/ClientDetail.tsx:214",className:"flex items-center gap-3 py-1.5 border-b border-border last:border-0",children:[e.jsx("span",{"data-loc":"client/src/pages/ClientDetail.tsx:215",className:"text-[10px] text-[#6B6B7A] w-20",children:BT[j.tipo]||j.tipo}),j.operadora&&e.jsx("span",{"data-loc":"client/src/pages/ClientDetail.tsx:216",className:"text-[10px] text-[#6B6B7A]",children:j.operadora}),e.jsx("span",{"data-loc":"client/src/pages/ClientDetail.tsx:217",className:"text-sm text-foreground font-medium",children:j.numero})]},S))})}),d.emails&&d.emails.length>0&&e.jsx(qr,{"data-loc":"client/src/pages/ClientDetail.tsx:226",title:"E-mails",icon:e.jsx(mr,{"data-loc":"client/src/pages/ClientDetail.tsx:226",className:"w-4 h-4"}),children:e.jsx("div",{"data-loc":"client/src/pages/ClientDetail.tsx:227",className:"space-y-2",children:d.emails.map((j,S)=>e.jsxs("div",{"data-loc":"client/src/pages/ClientDetail.tsx:229",className:"flex items-center gap-3 py-1.5 border-b border-border last:border-0",children:[e.jsx("span",{"data-loc":"client/src/pages/ClientDetail.tsx:230",className:"text-[10px] text-[#6B6B7A] w-20",children:FT[j.tipo]||j.tipo}),e.jsx("span",{"data-loc":"client/src/pages/ClientDetail.tsx:231",className:"text-sm text-foreground",children:j.email})]},S))})}),d.addresses&&d.addresses.length>0&&e.jsx(qr,{"data-loc":"client/src/pages/ClientDetail.tsx:240",title:"Endereços",icon:e.jsx(oC,{"data-loc":"client/src/pages/ClientDetail.tsx:240",className:"w-4 h-4"}),children:e.jsx("div",{"data-loc":"client/src/pages/ClientDetail.tsx:241",className:"space-y-3",children:d.addresses.map((j,S)=>e.jsxs("div",{"data-loc":"client/src/pages/ClientDetail.tsx:243",className:"py-2 border-b border-border last:border-0",children:[e.jsx("span",{"data-loc":"client/src/pages/ClientDetail.tsx:244",className:"text-[10px] text-[#6B6B7A] uppercase",children:HT[j.tipo]||j.tipo}),e.jsxs("p",{"data-loc":"client/src/pages/ClientDetail.tsx:245",className:"text-sm text-foreground mt-0.5",children:[[j.endereco,j.numero,j.complemento].filter(
646Boolean).join(", "),j.bairro&&` â ${j.bairro}`,j.cidade&&` â ${j.cidade}/${j.estado}`,j.cep&&` â CEP ${j.cep}`]})]},S))})}),d.documents&&d.documents.length>0&&e.jsx(qr,{"data-loc":"client/src/pages/ClientDetail.tsx:259",title:"Documentos",icon:e.jsx(Hl,{"data-loc":"client/src/pages/ClientDetail.tsx:259",className:"w-4 h-4"}),children:e.jsx("div",{"data-loc":"client/src/pages/ClientDetail.tsx:260",className:"space-y-2",children:d.documents.map((j,S)=>e.jsxs("div",{"data-loc":"client/src/pages/ClientDetail.tsx:262",className:"flex items-center gap-3 py-1.5 border-b border-border last:border-0",children:[e.jsx("span",{"data-loc":"client/src/pages/ClientDetail.tsx:263",className:"text-[10px] text-[#6B6B7A] w-24",children:j.tipo}),e.jsx("span",{"data-loc":"client/src/pages/ClientDetail.tsx:264",className:"text-sm text-foreground",children:j.numero}),j.dataEmissao&&e.jsx("span",{"data-loc":"client/src/pages/ClientDetail.tsx:265",className:"text-xs text-[#6B6B7A]",children:j.dataEmissao})]},S))})}),(d.profissao||d.cargo||d.rendaMensal)&&e.jsx(qr,{"data-loc":"client/src/pages/ClientDetail.tsx:274",title:"Dados financeiros",icon:e.jsx(Hl,{"data-loc":"client/src/pages/ClientDetail.tsx:274",className:"w-4 h-4"}),children:e.jsxs("div",{"data-loc":"client/src/pages/ClientDetail.tsx:275",className:"grid grid-cols-2 sm:grid-cols-3 gap-4",children:[e.jsx(wa,{"data-loc":"client/src/pages/ClientDetail.tsx:276",label:"Profissão",value:d.profissao}),e.jsx(wa,{"data-loc":"client/src/pages/ClientDetail.tsx:277",label:"Cargo",value:d.cargo}),e.jsx(wa,{"data-loc":"client/src/pages/ClientDetail.tsx:278",label:"Renda mensal",value:d.rendaMensal}),e.jsx(wa,{"data-loc":"client/src/pages/ClientDetail.tsx:279",label:"Renda familiar",value:d.rendaMensalFamiliar}),e.jsx(wa,{"data-loc":"client/src/pages/ClientDetail.tsx:280",label:"Local de trabalho",value:d.localTrabalho}),e.jsx(wa,{"data-loc":"client/src/pages/ClientDetail.tsx:281",label:"Valor de entrada",value:d.valorEntrada}),e.jsx(wa,{"data-loc":"client/src/pages/ClientDetail.tsx:282",label:"FGTS",value:d.fgts})]})}),d.notes&&e.jsx(qr,{"data-loc":"client/src/pages/ClientDetail.tsx:289",title:"Anotações",icon:e.jsx(Rn,{"data-loc":"client/src/pages/ClientDetail.tsx:289",className:"w-4 h-4"}),children:e.jsx("p",{"data-loc":"client/src/pages/ClientDetail.tsx:290",className:"text-sm text-[#A0A0AB] whitespace-pre-wrap",children:d.notes})})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientDetail.tsx:296",className:"space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/ClientDetail.tsx:298",className:"bg-card border border-border rounded-lg p-4 flex flex-col items-center gap-3",children:[e.jsx("div",{"data-loc":"client/src/pages/ClientDetail.tsx:299",className:"w-20 h-20 rounded-full bg-border flex items-center justify-center overflow-hidden",children:d.fotoUrl?e.jsx("img",{"data-loc":"client/src/pages/ClientDetail.tsx:301",src:d.fotoUrl,alt:d.name,className:"w-full h-full object-cover"}):d.tipo==="pessoa_juridica"?e.jsx(un,{"data-loc":"client/src/pages/ClientDetail.tsx:304",className:"w-8 h-8 text-primary"}):e.jsx(Ua,{"data-loc":"client/src/pages/ClientDetail.tsx:305",className:"w-8 h-8 text-primary"})}),e.jsxs("div",{"data-loc":"client/src/pages/ClientDetail.tsx:308",className:"text-center",children:[e.jsx("p",{"data-loc":"client/src/pages/ClientDetail.tsx:309",className:"font-semibold text-foreground",children:d.name}),v&&e.jsx("p",{"data-loc":"client/src/pages/ClientDetail.tsx:310",className:"text-xs text-[#6B6B7A] mt-0.5",children:v.numero}),y&&e.jsx("p",{"data-loc":"client/src/pages/ClientDetail.tsx:311",className:"text-xs text-[#6B6B7A]",children:y.email})]}),d.classificacaoMarketing!=null&&d.classificacaoMarketing>0&&e.jsx(qT,{"data-loc":"client/src/pages/ClientDetail.tsx:314",value:d.classificacaoMarketing}),e.jsxs(oe,{"data-loc":"client/src/pages/ClientDetail.tsx:316",size:"sm",onClick:()=>r(`/clientes/${s}/editar`),className:"w-full bg-primary hover:bg-[#B8935A] text-[#0A0A0B] font-medium h-8 text-xs",children:[e.jsx(dr,{"data-loc":"client/src/pages/ClientDetail.tsx:318",className:"w-3.5 h-3.5 mr-1.5"}),"Alterar pessoa"]})]}),e.jsx(qr,{"data-loc":"client/src/pages/ClientDetail.tsx:323",title:"Relacionamentos",icon:e.jsx(Ua,{"data-loc":"client/src/pages/ClientDetail.tsx:323",className:"w-4 h-4"}),children:e.jsx("div",{"data-loc":"client/src/pages/ClientDetail.tsx:324",className:"grid grid-cols-2 gap-2",children:[{key:"isLead",label:"Lead"},{key:"isProprietario",label:"Proprietário"},{key:"isLocador",label:"Locador"},{key:"isLocatario",label:"Locatário"},{key:"isComprador",label:"Comprador"},{key:"isFiador",label:"Fiador"},{key:"isSindico",label:"SÃndico"},{key:"isOutros",label:"Outros"}].map(({key:j,label:S})=>e.jsx("div",{"data-loc":"client/src/pages/ClientDetail.tsx:335",className:`px-2 py-1.5 rounded border text-xs font-medium text-center transition-colors ${d[j]?"bg-primary/10 border-primary/30 text-primary":"bg-background border-border text-[#3A3A3E]"}`,children:S},j))})}),e.jsxs("div",{"data-loc":"client/src/pages/ClientDetail.tsx:343",className:"bg-card border border-border rounded-lg p-4",children:[e.jsx("p",{"data-loc":"client/src/pages/ClientDetail.tsx:344",className:"text-[10px] text-[#6B6B7A] uppercase tracking-wider mb-2",children:"Atendente responsável"}),e.jsx("p",{"data-loc":"client/src/pages/ClientDetail.tsx:345",className:"text-sm text-foreground",children:b?.name||e.jsx("span",{"data-loc":"client/src/pages/ClientDetail.tsx:345",className:"text-[#3A3A3E]",children:"Não atribuÃdo"})})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientDetail.tsx:349",className:"bg-card border border-border rounded-lg p-4 space-y-2",children:[e.jsx("p",{"data-loc":"client/src/pages/ClientDetail.tsx:350",className:"text-[10px] text-[#6B6B7A] uppercase tracking-wider mb-2",children:"Preferências de contato"}),e.jsxs("div",{"data-loc":"client/src/pages/ClientDetail.tsx:351",className:"flex items-center gap-2",children:[e.jsx("div",{"data-loc":"client/src/pages/ClientDetail.tsx:352",className:`w-3 h-3 rounded-full ${d.desejaReceberEmail?"bg-primary":"bg-[#2A2A2E]"}`}),e.jsx("span",{"data-loc":"client/src/pages/ClientDetail.tsx:353",className:"text-xs text-[#A0A0AB]",children:"Deseja receber e-mail"})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientDetail.tsx:355",className:"flex items-center gap-2",children:[e.jsx("div",{"data-loc":"client/src/pages/ClientDetail.tsx:356",className:`w-3 h-3 rounded-full ${d.desejaReceberSms?"bg-primary":"bg-[#2A2A2E]"}`}),e.jsx("span",{"data-loc":"client/src/pages/ClientDetail.tsx:357",className:"text-xs text-[#A0A0AB]",children:"Deseja receber SMS/WhatsApp"})]})]})]})]}),l==="atendimentos"&&e.jsxs("div",{"data-loc":"client/src/pages/ClientDetail.tsx:365",className:"max-w-2xl space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/ClientDetail.tsx:366",className:"flex items-center justify-between mb-4",children:[e.jsxs("h2",{"data-loc":"client/src/pages/ClientDetail.tsx:367",className:"text-sm font-semibold text-foreground",children:["Atendimentos",p&&p.total>0&&e.jsxs("span",{"data-loc":"client/src/pages/ClientDetail.tsx:370",className:"ml-2 text-xs font-normal text-muted-foreground",children:["(",p.total,")"]})]}),e.jsxs("a",{"data-loc":"client/src/pages/ClientDetail.tsx:373",href:"/atendimentos",className:"text-xs text-primary hover:underline flex items-center gap-1",children:["Ver todos ",e.jsx(Gi,{"data-loc":"client/src/pages/ClientDetail.tsx:374",className:"w-3 h-3"})]})]}),p&&p.data.length>0?e.jsx("div",{"data-loc":"client/src/pages/ClientDetail.tsx:379",className:"space-y-2",children:p.data.map(j=>e.jsxs("a",{"data-loc":"client/src/pages/ClientDetail.tsx:381",href:`/atendimentos/${j.id}`,className:"flex items-center justify-between bg-card border border-border rounded-lg px-4 py-3 hover:border-primary/30 transition-colors group",children:[e.jsxs("div",{"data-loc":"client/src/pages/ClientDetail.tsx:386",className:"flex items-center gap-3 min-w-0",children:[e.jsx("div",{"data-loc":"client/src/pages/ClientDetail.tsx:387",className:"w-8 h-8 rounded-full bg-primary/10 flex items-center justify-center shrink-0",children:e.jsx(Ua,{"data-loc":"client/src/pages/ClientDetail.tsx:388",className:"w-4 h-4 text-primary"})}),e.jsxs("div",{"data-loc":"client/src/pages/ClientDetail.tsx:390",className:"min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/pages/ClientDetail.tsx:391",className:"flex items-center gap-2",children:[e.jsxs("span",{"data-loc":"client/src/pages/ClientDetail.tsx:392",className:"text-xs font-semibold text-foreground",children:["Atendimento #",j.id]}),j.siteLeadId&&e.jsxs("span",{"data-loc":"client/src/pages/ClientDetail.tsx:394",className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-medium bg-blue-500/15 text-blue-400 border border-blue-500/20",children:[e.jsx(lr,{"data-loc":"client/src/pages/ClientDetail.tsx:395",className:"w-2.5 h-2.5"}
646),"Site"]}),e.jsx("span",{"data-loc":"client/src/pages/ClientDetail.tsx:399",className:`inline-flex px-1.5 py-0.5 rounded text-[10px] font-medium ${j.status==="ganho"?"bg-green-500/15 text-green-400":j.status==="perdido"?"bg-red-500/15 text-red-400":j.status==="negociacao"?"bg-yellow-500/15 text-yellow-400":"bg-primary/15 text-primary"}`,children:j.status==="novo"?"Novo":j.status==="contato"?"Em atendimento":j.status==="qualificado"?"Qualificado":j.status==="negociacao"?"Negociação":j.status==="ganho"?"Ganho":j.status==="perdido"?"Descartado":j.status})]}),e.jsxs("p",{"data-loc":"client/src/pages/ClientDetail.tsx:410",className:"text-[10px] text-muted-foreground",children:[new Date(j.createdAt).toLocaleDateString("pt-BR")," ⢠",j.source||"Origem desconhecida"]})]})]}),e.jsx(Ia,{"data-loc":"client/src/pages/ClientDetail.tsx:415",className:"w-4 h-4 text-muted-foreground group-hover:text-primary transition-colors shrink-0"})]},j.id))}):e.jsxs("div",{"data-loc":"client/src/pages/ClientDetail.tsx:420",className:"flex flex-col items-center justify-center py-12 gap-3",children:[e.jsx("div",{"data-loc":"client/src/pages/ClientDetail.tsx:421",className:"w-10 h-10 rounded-full bg-border flex items-center justify-center",children:e.jsx(Rn,{"data-loc":"client/src/pages/ClientDetail.tsx:422",className:"w-5 h-5 text-[#6B6B7A]"})}),e.jsx("p",{"data-loc":"client/src/pages/ClientDetail.tsx:424",className:"text-[#6B6B7A] text-sm",children:"Nenhum atendimento registrado"})]}),x&&x.length>0&&e.jsxs("div",{"data-loc":"client/src/pages/ClientDetail.tsx:429",className:"mt-4",children:[e.jsx("h3",{"data-loc":"client/src/pages/ClientDetail.tsx:430",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider mb-2",children:"Histórico de interações"}),x.map(j=>e.jsxs("div",{"data-loc":"client/src/pages/ClientDetail.tsx:432",className:"bg-card border border-border rounded-lg p-3 mb-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/ClientDetail.tsx:433",className:"flex items-center justify-between mb-1",children:[e.jsx("span",{"data-loc":"client/src/pages/ClientDetail.tsx:434",className:"text-xs font-medium text-primary capitalize",children:j.type}),e.jsx("span",{"data-loc":"client/src/pages/ClientDetail.tsx:435",className:"text-xs text-[#6B6B7A]",children:new Date(j.createdAt).toLocaleDateString("pt-BR")})]}),e.jsx("p",{"data-loc":"client/src/pages/ClientDetail.tsx:437",className:"text-sm text-[#A0A0AB] whitespace-pre-wrap",children:j.content})]},j.id))]})]}),l==="auditoria"&&e.jsx("div",{"data-loc":"client/src/pages/ClientDetail.tsx:446",className:"max-w-2xl",children:e.jsxs("div",{"data-loc":"client/src/pages/ClientDetail.tsx:447",className:"flex flex-col items-center justify-center py-12 gap-3",children:[e.jsx("div",{"data-loc":"client/src/pages/ClientDetail.tsx:448",className:"w-10 h-10 rounded-full bg-border flex items-center justify-center",children:e.jsx(Za,{"data-loc":"client/src/pages/ClientDetail.tsx:449",className:"w-5 h-5 text-[#6B6B7A]"})}),e.jsx("p",{"data-loc":"client/src/pages/ClientDetail.tsx:451",className:"text-[#6B6B7A] text-sm",children:"Auditoria disponÃvel em breve"})]})})]})]})}const ku={tipo:"celular",operadora:"",numero:""},Hf={tipo:"pessoal",email:""},Lj={tipo:"residencial",cep:"",endereco:"",numero:"",complemento:"",bairro:"",cidade:"",estado:""},kj={tipo:"RG / SSP",numero:"",dataEmissao:""},Rj={situacao:"ativo",tipoConta:"cc",banco:"",agencia:"",conta:"",tipo:"proprio"};function is({title:t,icon:s,children:r}){return e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:28",className:"bg-card border border-border rounded-lg overflow-hidden",children:[e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:29",className:"flex items-center gap-2 px-4 py-3 border-b border-border",children:[e.jsx("span",{"data-loc":"client/src/pages/ClientEdit.tsx:30",className:"text-primary",children:s}),e.jsx("h3",{"data-loc":"client/src/pages/ClientEdit.tsx:31",className:"text-sm font-semibold text-foreground",children:t})]}),e.jsx("div",{"data-loc":"client/src/pages/ClientEdit.tsx:33",className:"p-4",children:r})]})}function Ge({children:t,required:s}){return e.jsxs("label",{"data-loc":"client/src/pages/ClientEdit.tsx:40",className:"block text-[10px] text-[#6B6B7A] uppercase tracking-wider mb-1",children:[t,s&&e.jsx("span",{"data-loc":"client/src/pages/ClientEdit.tsx:41",className:"text-red-400 ml-0.5",children:"*"})]})}function ds({value:t,onChange:s,children:r,className:l=""}){return e.jsx("select",{"data-loc":"client/src/pages/ClientEdit.tsx:48",value:t,onChange:c=>s(c.target.value),className:`w-full h-9 bg-background border border-border text-foreground rounded-md px-3 text-sm focus:outline-none focus:border-primary/50 focus:ring-1 focus:ring-primary/20 ${l}`,children:r})}function WT({value:t,onChange:s}){return e.jsx("div",{"data-loc":"client/src/pages/ClientEdit.tsx:57",className:"flex gap-1",children:[1,2,3,4,5].map(r=>e.jsx("button",{"data-loc":"client/src/pages/ClientEdit.tsx:59",type:"button",onClick:()=>s(r===t?0:r),className:"focus:outline-none",children:e.jsx(hh,{"data-loc":"client/src/pages/ClientEdit.tsx:61",className:`w-6 h-6 transition-colors ${r<=t?"fill-[#C9A96E] text-primary":"text-[#2A2A2E] hover:text-primary/40"}`})},r))})}
646function Tj(){const t=mc(),s=lL(),r=new URLSearchParams(s),l=!t.id||t.id==="novo",c=l?null:Number(t.id),d=r.get("tipo")||"pessoa_fisica",[,u]=fs(),x=Y.useUtils(),[p,g]=f.useState(d),[b,v]=f.useState(""),[y,j]=f.useState(""),[S,N]=f.useState(""),[w,D]=f.useState(""),[k,A]=f.useState(""),[_,E]=f.useState(""),[I,R]=f.useState(""),[z,U]=f.useState(""),[B,F]=f.useState(""),[V,de]=f.useState(""),[le,xe]=f.useState(""),[M,O]=f.useState(""),[T,K]=f.useState(!0),[ve,P]=f.useState(!1),[J,W]=f.useState(!1),[H,te]=f.useState(!1),[pe,ae]=f.useState(!1),[Ne,Se]=f.useState(!1),[Ce,ke]=f.useState(!1),[Z,fe]=f.useState(!1),[Ee,Ie]=f.useState([{...ku}]),[qe,Ve]=f.useState({...ku}),[Ht,ht]=f.useState([]),[Je,q]=f.useState({...Hf}),[Le,Be]=f.useState([]),[Pe,mt]=f.useState({...Lj}),[dt,qt]=f.useState([]),[X,vt]=f.useState({...kj}),[et,Ke]=f.useState([]),[nt,Gt]=f.useState({...Rj}),[Vt,sa]=f.useState(""),[Kt,en]=f.useState(""),[ts,Ra]=f.useState(""),[as,$a]=f.useState(""),[Nt,Et]=f.useState(""),[Re,tt]=f.useState(""),[ut,ft]=f.useState(""),[Yt,rt]=f.useState("Automático (TED)"),[ot,na]=f.useState(!1),[Ct,Rt]=f.useState(""),[Sa,It]=f.useState(""),[ra,gs]=f.useState(""),[Ea,aa]=f.useState(0),[ya,Us]=f.useState(""),[gr,lo]=f.useState(""),[dl,bn]=f.useState(""),[tn,yn]=f.useState(0),[Wa,hs]=f.useState(!1),[Qa,Is]=f.useState(!1),[Tt,hr]=f.useState(""),[vr,ja]=f.useState(""),{data:Ta}=Y.clients.getById.useQuery({id:c},{enabled:!l&&c!==null});f.useEffect(()=>{if(!Ta)return;const Q=Ta;g(Q.tipo||"pessoa_fisica"),v(Q.name||""),j(Q.codigoAuxiliar||""),N(Q.cpf||""),D(Q.cnpj||""),A(Q.dataNascimento||""),E(Q.sexo||""),R(Q.estadoCivil||""),U(Q.naturalidade||""),F(Q.nacionalidade||""),de(Q.urlPublica||""),xe(Q.etiquetas||""),K(!!Q.isLead),P(!!Q.isProprietario),W(!!Q.isLocador),te(!!Q.isLocatario),ae(!!Q.isComprador),Se(!!Q.isFiador),ke(!!Q.isSindico),fe(!!Q.isOutros),Ie(Q.phones?.length?Q.phones.map(we=>({tipo:we.tipo,operadora:we.operadora||"",numero:we.numero})):[]),ht(Q.emails?.length?Q.emails.map(we=>({tipo:we.tipo,email:we.email})):[]),Be(Q.addresses?.length?Q.addresses.map(we=>({tipo:we.tipo,cep:we.cep||"",endereco:we.endereco||"",numero:we.numero||"",complemento:we.complemento||"",bairro:we.bairro||"",cidade:we.cidade||"",estado:we.estado||""})):[]),qt(Q.documents?.length?Q.documents.map(we=>({tipo:we.tipo,numero:we.numero||"",dataEmissao:we.dataEmissao||""})):[]),Ke(Q.bankAccounts?.length?Q.bankAccounts.map(we=>({situacao:we.situacao,tipoConta:we.tipoConta,banco:we.banco||"",agencia:we.agencia||"",conta:we.conta||"",tipo:we.tipo})):[]),sa(Q.profissao||""),en(Q.cargo||""),Ra(Q.rendaMensal||""),$a(Q.rendaMensalFamiliar||""),Et(Q.localTrabalho||""),tt(Q.valorEntrada||""),ft(Q.fgts||""),rt(Q.formaTransferencia||"Automático (TED)"),na(!!Q.usarDescontoSimplificadoIrrf),Rt(Q.filiacaoMae||""),It(Q.filiacaoPai||""),gs(Q.conjuge||""),aa(Q.numeroFilhos||0),Us(Q.facebook||""),lo(Q.linkedin||""),bn(Q.instagram||""),yn(Q.classificacaoMarketing||0),hs(!!Q.desejaReceberEmail),Is(!!Q.desejaReceberSms),hr(Q.notes||""),ja(Q.bensMoveisImoveis||"")},[Ta]);const zn=Y.clients.create.useMutation({onSuccess:Q=>{ce.success("Cliente criado com sucesso"),u(`/clientes/${Q.id}`)},onError:Q=>ce.error(Q.message)}),ul=Y.clients.update.useMutation({onSuccess:()=>{x.clients.getById.invalidate({id:c}),ce.success("Cliente atualizado"),u(`/clientes/${c}`)},onError:Q=>ce.error(Q.message)}),xl=zn.isPending||ul.isPending,Un=()=>{if(!le)return[];try{return JSON.parse(le)}catch{return le.split(",").map(Q=>Q.trim()).filter(Boolean)}},jn=()=>{const Q=M.trim();if(!Q)return;const we=Un();if(!we.includes(Q)){const la=[...we,Q];xe(JSON.stringify(la))}O("")},ue=Q=>{const we=Un().filter(la=>la!==Q);xe(we.length?JSON.stringify(we):"")},lt=()=>{if(!b.trim()){ce.error("Nome é obrigatório");return}const Q={tipo:p,name:b.trim(),codigoAuxiliar:y||void 0,cpf:S||void 0,cnpj:w||void 0,dataNascimento:k||void 0,sexo:_||void 0,estadoCivil:I||void 0,naturalidade:z||void 0,nacionalidade:B||void 0,urlPublica:V||void 0,etiquetas:le||void 0,isLead:T?1:0,isProprietario:ve?1:0,isLocador:J?1:0,isLocatario:H?1:0,isComprador:pe?1:0,isFiador:Ne?1:0,isSindico:Ce?1:0,isOutros:Z?1:0,profissao:Vt||void 0,cargo:Kt||void 0,rendaMensal:ts||void 0,rendaMensalFamiliar:as||void 0,localTrabalho:Nt||void 0,valorEntrada:Re||void 0,fgts:ut||void 0,formaTransferencia:Yt||void 0,usarDescontoSimplificadoIrrf:ot?1:0,filiacaoMae:Ct||void 0,filiacaoPai:Sa||void 0,conjuge:ra||void 0,numeroFilhos:Ea||void 0,facebook:ya||void 0,linkedin:gr||void 0,instagram:dl||void 0,classificacaoMarketing:tn||void 0,desejaReceberEmail:Wa?1:0,desejaReceberSms:Qa?1:0,notes:Tt||void 0,bensMoveisImoveis:vr||void 0,phones:Ee.filter(we=>we.numero.trim()),emails:Ht.filter(we=>we.email.trim()),addresses:Le.filter(we=>we.endereco.trim()||we.cep.trim()),documents:dt.filter(we=>we.numero.trim()),bankAccounts:et.filter(we=>we.conta.trim()||we.agencia.trim())};l?zn.mutate(Q):ul.mutate({id:c,...Q})},ze="h-9 bg-background border-border text-foreground placeholder:text-[#3A3A3E] focus-visible:ring-primary/20 focus-visible:border-primary/50 text-sm",bc="bg-background border-border text-foreground placeholder:text-[#3A3A3E] focus-visible:ring-primary/20 focus-visible:border-primary/50 text-sm resize-none";return e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:303",className:"flex flex-col min-h-full",children:[e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:305",className:"flex items-center justify-between px-3 md:px-6 py-3 md:py-4 border-b border-border sticky top-0 z-20 bg-background",children:[e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:306",className:"flex items-center gap-3",children:[e.jsx(oe,{"data-loc":"client/src/pages/ClientEdit.tsx:307",variant:"ghost",size:"sm",onClick:()=>u(l?"/clientes":`/clientes/${c}`),className:"h-7 w-7 p-0 text-[#6B6B7A] hover:text-foreground",children:e.jsx(Fl,{"data-loc":"client/src/pages/ClientEdit.tsx:309",className:"w-4 h-4"})}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:311",children:[e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:312",className:"flex items-center gap-2",children:[e.jsx("span",{"data-loc":"client/src/pages/ClientEdit.tsx:313",className:"text-xs text-[#6B6B7A]",children:"Clientes"}),e.jsx(Ia,{"data-loc":"client/src/pages/ClientEdit.tsx:314",className:"w-3 h-3 text-[#3A3A3E]"}),!l&&e.jsxs(e.Fragment,{children:[e.jsx("span",{"data-loc":"client/src/pages/ClientEdit.tsx:315",className:"text-xs text-[#6B6B7A]",children:Ta?.name||`#${c}`}),e.jsx(Ia,{"data-loc":"client/src/pages/ClientEdit.tsx:315",className:"w-3 h-3 text-[#3A3A3E]"})]}),e.jsx("span",{"data-loc":"client/src/pages/ClientEdit.tsx:316",className:"text-xs text-[#A0A0AB]",children:l?"Novo cliente":"Alteração"})]}),e.jsx("h1",{"data-loc":"client/src/pages/ClientEdit.tsx:318",className:"text-base font-semibold text-foreground mt-0.5",children:l?p==="pessoa_juridica"?"Nova empresa":"Nova pessoa":`Alterar: ${Ta?.name||""}`})]})]}),e.jsx(oe,{"data-loc":"client/src/pages/ClientEdit.tsx:323",onClick:lt,disabled:xl,className:"bg-primary hover:bg-[#B8935A] text-[#0A0A0B] font-semibold h-8 text-xs",children:xl?"Salvando...":"â Salvar alterações"})]}),e.jsx("div",{"data-loc":"client/src/pages/ClientEdit.tsx:330",className:"flex-1 p-3 md:p-6",children:e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:331",className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:333",className:"lg:col-span-2 space-y-4",children:[e.jsxs(is,{"data-loc":"client/src/pages/ClientEdit.tsx:335",title:"Dados pessoais",icon:e.jsx(Ua,{"data-loc":"client/src/pages/ClientEdit.tsx:335",className:"w-4 h-4"}),children:[e.jsx("p",{"data-loc":"client/src/pages/ClientEdit.tsx:336",className:"text-[10px] text-red-400 mb-3",children:"â¡ Campos obrigatórios."}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:337",className:"grid grid-cols-2 sm:grid-cols-3 gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:338",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:339",children:"Código"}),e.jsx(ge,{"data-loc":"client/src/pages/ClientEdit.tsx:340",value:l?"(automático)":String(c),disabled:!0,className:`${ze} opacity-50`})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:342",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:343",children:"Código auxiliar"}),e.jsx(ge,{"data-loc":"client/src/pages/ClientEdit.tsx:344",value:y,onChange:Q=>j(Q.target.value),className:ze})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:346",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:347",children:"Tipo"}),e.jsxs(ds,{"data-loc":"client/src/pages/ClientEdit.tsx:348",value:p,onChange:Q=>g(Q),children:[e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:349",value:"pessoa_fisica",children:"Pessoa FÃsica"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:350",value:"pessoa_juridica",children:"Pessoa JurÃdica"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:353",className:"col-span-2",children:[e.jsxs(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:354",required:!0,children:["Nome ",p==="pe
646ssoa_juridica"?"/ Razão social":"da pessoa"]}),e.jsx(ge,{"data-loc":"client/src/pages/ClientEdit.tsx:355",value:b,onChange:Q=>v(Q.target.value),placeholder:"Nome completo",className:ze})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:357",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:358",children:"Sexo"}),e.jsxs(ds,{"data-loc":"client/src/pages/ClientEdit.tsx:359",value:_,onChange:E,children:[e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:360",value:"",children:"Selecione"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:361",value:"masculino",children:"Masculino"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:362",value:"feminino",children:"Feminino"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:363",value:"outro",children:"Outro"})]})]}),p==="pessoa_fisica"?e.jsxs(e.Fragment,{children:[e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:368",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:369",children:"CPF"}),e.jsx(ge,{"data-loc":"client/src/pages/ClientEdit.tsx:370",value:S,onChange:Q=>N(Q.target.value),placeholder:"000.000.000-00",className:ze})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:372",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:373",children:"Data de nascimento"}),e.jsx(ge,{"data-loc":"client/src/pages/ClientEdit.tsx:374",value:k,onChange:Q=>A(Q.target.value),placeholder:"DD/MM/AAAA",className:ze})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:376",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:377",children:"Estado civil"}),e.jsxs(ds,{"data-loc":"client/src/pages/ClientEdit.tsx:378",value:I,onChange:R,children:[e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:379",value:"",children:"Selecione"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:380",value:"solteiro",children:"Solteiro(a)"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:381",value:"casado",children:"Casado(a)"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:382",value:"divorciado",children:"Divorciado(a)"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:383",value:"viuvo",children:"Viúvo(a)"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:384",value:"uniao_estavel",children:"União estável"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:387",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:388",children:"Naturalidade"}),e.jsx(ge,{"data-loc":"client/src/pages/ClientEdit.tsx:389",value:z,onChange:Q=>U(Q.target.value),className:ze})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:391",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:392",children:"Nacionalidade"}),e.jsxs(ds,{"data-loc":"client/src/pages/ClientEdit.tsx:393",value:B,onChange:F,children:[e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:394",value:"",children:"Selecione"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:395",value:"brasileiro",children:"Brasileiro(a)"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:396",value:"estrangeiro",children:"Estrangeiro(a)"})]})]})]}):e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:401",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:402",children:"CNPJ"}),e.jsx(ge,{"data-loc":"client/src/pages/ClientEdit.tsx:403",value:w,onChange:Q=>D(Q.target.value),placeholder:"00.000.000/0000-00",className:ze})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:406",className:"col-span-full",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:407",children:"URL pública"}),e.jsx(ge,{"data-loc":"client/src/pages/ClientEdit.tsx:408",value:V,onChange:Q=>de(Q.target.value),placeholder:"https://",className:ze})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:411",className:"col-span-full",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:412",children:"Etiquetas"}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:413",className:"flex gap-2 mb-2",children:[e.jsx(ge,{"data-loc":"client/src/pages/ClientEdit.tsx:414",value:M,onChange:Q=>O(Q.target.value),onKeyDown:Q=>{Q.key==="Enter"&&(Q.preventDefault(),jn())},placeholder:"Digite e pressione Enter para adicionar",className:`${ze} flex-1`}),e.jsx(oe,{"data-loc":"client/src/pages/ClientEdit.tsx:417",type:"button",size:"sm",onClick:jn,className:"h-9 bg-primary/10 hover:bg-primary/20 text-primary border border-primary/20 text-xs",children:"Adicionar"})]}),Un().length>0&&e.jsx("div",{"data-loc":"client/src/pages/ClientEdit.tsx:423",className:"flex flex-wrap gap-1.5",children:Un().map(Q=>e.jsxs("span",{"data-loc":"client/src/pages/ClientEdit.tsx:425",className:"inline-flex items-center gap-1 px-2 py-0.5 rounded bg-border text-[#A0A0AB] border border-[#2A2A2E] text-xs",children:[Q,e.jsx("button",{"data-loc":"client/src/pages/ClientEdit.tsx:427",onClick:()=>ue(Q),className:"text-[#6B6B7A] hover:text-red-400",children:e.jsx(va,{"data-loc":"client/src/pages/ClientEdit.tsx:428",className:"w-3 h-3"})})]},Q))}),e.jsx("p",{"data-loc":"client/src/pages/ClientEdit.tsx:434",className:"text-[10px] text-primary mt-1",children:"Se a etiqueta informada não for encontrada, será permitida a sua inclusão imediata."})]})]})]}),e.jsxs(is,{"data-loc":"client/src/pages/ClientEdit.tsx:440",title:"Telefones",icon:e.jsx(hn,{"data-loc":"client/src/pages/ClientEdit.tsx:440",className:"w-4 h-4"}),children:[e.jsx("p",{"data-loc":"client/src/pages/ClientEdit.tsx:441",className:"text-[10px] text-[#6B6B7A] mb-3 italic",children:"Para inserir um novo número selecione o tipo, informe a operadora (opcional), depois digite o número e clique no botão +. Para excluir clique no à na frente do número."}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:442",className:"bg-[#0D0D0F] rounded border border-border p-3 mb-3",children:[e.jsx("p",{"data-loc":"client/src/pages/ClientEdit.tsx:443",className:"text-[10px] text-[#6B6B7A] uppercase mb-2",children:"Dados para inclusão de telefone"}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:444",className:"flex items-end gap-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:445",className:"w-32",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:446",children:"Tipo"}),e.jsxs(ds,{"data-loc":"client/src/pages/ClientEdit.tsx:447",value:qe.tipo,onChange:Q=>Ve({...qe,tipo:Q}),children:[e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:448",value:"celular",children:"Celular"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:449",value:"residencial",children:"Residencial"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:450",value:"comercial",children:"Comercial"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:451",value:"whatsapp",children:"WhatsApp"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:452",value:"outro",children:"Outro"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:455",className:"w-28",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:456",children:"Operadora"}),e.jsxs(ds,{"data-loc":"client/src/pages/ClientEdit.tsx:457",value:qe.operadora,onChange:Q=>Ve({...qe,operadora:Q}),children:[e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:458",value:"",children:"â"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:459",value:"Claro",children:"Claro"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:460",value:"Vivo",children:"Vivo"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:461",value:"Tim",children:"Tim"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:462",value:"Oi",children:"Oi"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:465",className:"flex-1",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:466",children:"Número"}),e.jsx(ge,{"data-loc":"client/src/pages/ClientEdit.tsx:467",value:qe.numero,onChange:Q=>Ve({...qe,numero:Q.target.value}),onKeyDown:Q=>{Q.key==="Enter"&&(Q.preventDefault(),qe.numero.trim()&&(Ie([...Ee,{...qe}]),Ve({...ku})))},placeholder:"(47) 99999-9999",className:ze})]}),e.jsx(oe,{"data-loc":"client/src/pages/ClientEdit.tsx:471",type:"button",size:"sm",onClick:()=>{qe.numero.trim()&&(Ie([...Ee,{...qe}]),Ve({...ku}))},className:"h-9 w-9 p-0 bg-primary hover:bg-[#B8935A] text-[#0A0A0B] shrink-0",children:e.jsx(Jt,{"data-loc":"client/src/pages/ClientEdit.tsx:473",className:"w-4 h-4"})})]})]}),Ee.length>0&&e.jsx("div",{"data-loc":"client/src/pages/ClientEdit.tsx:478",className:"space-y-2",children:Ee.map((Q,we)=>e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:480",className:"flex items-center gap-2",children:[e.jsx("span",{"data-loc":"client/src/pages/ClientEdit.tsx:481",className:"text-[10px] text-[#6B6B7A] w-20 capitalize",children:Q.tipo}),e.jsx(ge,{"data-loc":"client/src/pages/ClientEdit.tsx:482",value:Q.numero,onChange:la=>{const wt=[...Ee];
646wt[we]={...wt[we],numero:la.target.value},Ie(wt)},className:`${ze} flex-1`}),e.jsx("button",{"data-loc":"client/src/pages/ClientEdit.tsx:484",onClick:()=>Ie(Ee.filter((la,wt)=>wt!==we)),className:"h-9 w-9 flex items-center justify-center bg-red-600 hover:bg-red-700 rounded text-white shrink-0",children:e.jsx(va,{"data-loc":"client/src/pages/ClientEdit.tsx:486",className:"w-4 h-4"})})]},we))})]}),e.jsxs(is,{"data-loc":"client/src/pages/ClientEdit.tsx:495",title:"E-mails",icon:e.jsx(mr,{"data-loc":"client/src/pages/ClientEdit.tsx:495",className:"w-4 h-4"}),children:[e.jsx("p",{"data-loc":"client/src/pages/ClientEdit.tsx:496",className:"text-[10px] text-[#6B6B7A] mb-3 italic",children:"Para inserir um novo e-mail selecione o tipo, informe o valor e clique no botão +."}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:497",className:"bg-[#0D0D0F] rounded border border-border p-3 mb-3",children:[e.jsx("p",{"data-loc":"client/src/pages/ClientEdit.tsx:498",className:"text-[10px] text-[#6B6B7A] uppercase mb-2",children:"Dados para inclusão de e-mail"}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:499",className:"flex items-end gap-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:500",className:"w-32",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:501",children:"Tipo"}),e.jsxs(ds,{"data-loc":"client/src/pages/ClientEdit.tsx:502",value:Je.tipo,onChange:Q=>q({...Je,tipo:Q}),children:[e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:503",value:"pessoal",children:"Pessoal"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:504",value:"comercial",children:"Comercial"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:505",value:"outro",children:"Outro"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:508",className:"flex-1",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:509",children:"E-mail"}),e.jsx(ge,{"data-loc":"client/src/pages/ClientEdit.tsx:510",value:Je.email,onChange:Q=>q({...Je,email:Q.target.value}),onKeyDown:Q=>{Q.key==="Enter"&&(Q.preventDefault(),Je.email.trim()&&(ht([...Ht,{...Je}]),q({...Hf})))},placeholder:"[email protected]",className:ze})]}),e.jsx(oe,{"data-loc":"client/src/pages/ClientEdit.tsx:514",type:"button",size:"sm",onClick:()=>{Je.email.trim()&&(ht([...Ht,{...Je}]),q({...Hf}))},className:"h-9 w-9 p-0 bg-primary hover:bg-[#B8935A] text-[#0A0A0B] shrink-0",children:e.jsx(Jt,{"data-loc":"client/src/pages/ClientEdit.tsx:516",className:"w-4 h-4"})})]})]}),Ht.length>0&&e.jsx("div",{"data-loc":"client/src/pages/ClientEdit.tsx:521",className:"space-y-2",children:Ht.map((Q,we)=>e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:523",className:"flex items-center gap-2",children:[e.jsx("span",{"data-loc":"client/src/pages/ClientEdit.tsx:524",className:"text-[10px] text-[#6B6B7A] w-20 capitalize",children:Q.tipo}),e.jsx(ge,{"data-loc":"client/src/pages/ClientEdit.tsx:525",value:Q.email,onChange:la=>{const wt=[...Ht];wt[we]={...wt[we],email:la.target.value},ht(wt)},className:`${ze} flex-1`}),e.jsx("button",{"data-loc":"client/src/pages/ClientEdit.tsx:527",onClick:()=>ht(Ht.filter((la,wt)=>wt!==we)),className:"h-9 w-9 flex items-center justify-center bg-red-600 hover:bg-red-700 rounded text-white shrink-0",children:e.jsx(va,{"data-loc":"client/src/pages/ClientEdit.tsx:529",className:"w-4 h-4"})})]},we))})]}),e.jsxs(is,{"data-loc":"client/src/pages/ClientEdit.tsx:538",title:"Endereços",icon:e.jsx(oC,{"data-loc":"client/src/pages/ClientEdit.tsx:538",className:"w-4 h-4"}),children:[e.jsx("p",{"data-loc":"client/src/pages/ClientEdit.tsx:539",className:"text-[10px] text-[#6B6B7A] mb-3 italic",children:"Para inserir um novo endereço selecione o tipo, preencha os campos e clique no botão +. Digite o CEP e aguarde o preenchimento automático."}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:540",className:"bg-[#0D0D0F] rounded border border-border p-3 mb-3",children:[e.jsx("p",{"data-loc":"client/src/pages/ClientEdit.tsx:541",className:"text-[10px] text-[#6B6B7A] uppercase mb-2",children:"Dados para inclusão de endereço"}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:542",className:"grid grid-cols-2 sm:grid-cols-4 gap-2 mb-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:543",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:544",children:"Tipo"}),e.jsxs(ds,{"data-loc":"client/src/pages/ClientEdit.tsx:545",value:Pe.tipo,onChange:Q=>mt({...Pe,tipo:Q}),children:[e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:546",value:"residencial",children:"Residencial"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:547",value:"comercial",children:"Comercial"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:548",value:"outro",children:"Outro"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:551",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:552",children:"CEP"}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:553",className:"relative",children:[e.jsx(ge,{"data-loc":"client/src/pages/ClientEdit.tsx:554",value:Pe.cep,onChange:async Q=>{const we=Q.target.value.replace(/\D/g,""),la=we.length>5?`${we.slice(0,5)}-${we.slice(5,8)}`:we;if(mt(wt=>({...wt,cep:la})),we.length===8){mt(wt=>({...wt,cep:la,_cepLoading:!0}));try{const pl=await(await fetch(`https://viacep.com.br/ws/${we}/json/`)).json();pl.erro?(ce.error("CEP não encontrado"),mt(pa=>({...pa,_cepLoading:!1}))):(mt(pa=>({...pa,cep:la,endereco:pl.logradouro||pa.endereco,bairro:pl.bairro||pa.bairro,cidade:pl.localidade||pa.cidade,estado:pl.uf||pa.estado,_cepLoading:!1})),ce.success("CEP encontrado"))}catch{ce.error("Erro ao buscar CEP"),mt(wt=>({...wt,_cepLoading:!1}))}}},placeholder:"00000-000",maxLength:9,className:ze}),Pe._cepLoading&&e.jsx("span",{"data-loc":"client/src/pages/ClientEdit.tsx:592",className:"absolute right-2 top-1/2 -translate-y-1/2",children:e.jsxs("svg",{"data-loc":"client/src/pages/ClientEdit.tsx:593",className:"w-3.5 h-3.5 text-primary animate-spin",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{"data-loc":"client/src/pages/ClientEdit.tsx:594",className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{"data-loc":"client/src/pages/ClientEdit.tsx:595",className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8H4z"})]})})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:601",className:"col-span-2",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:602",children:"Endereço"}),e.jsx(ge,{"data-loc":"client/src/pages/ClientEdit.tsx:603",value:Pe.endereco,onChange:Q=>mt({...Pe,endereco:Q.target.value}),className:ze})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:605",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:606",children:"Nº"}),e.jsx(ge,{"data-loc":"client/src/pages/ClientEdit.tsx:607",value:Pe.numero,onChange:Q=>mt({...Pe,numero:Q.target.value}),className:ze})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:609",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:610",children:"Complemento"}),e.jsx(ge,{"data-loc":"client/src/pages/ClientEdit.tsx:611",value:Pe.complemento,onChange:Q=>mt({...Pe,complemento:Q.target.value}),className:ze})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:613",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:614",children:"Bairro"}),e.jsx(ge,{"data-loc":"client/src/pages/ClientEdit.tsx:615",value:Pe.bairro,onChange:Q=>mt({...Pe,bairro:Q.target.value}),className:ze})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:617",className:"flex items-end gap-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:618",className:"flex-1",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:619",children:"Cidade - Estado"}),e.jsx(ge,{"data-loc":"client/src/pages/ClientEdit.tsx:620",value:`${Pe.cidade}${Pe.estado?` - ${Pe.estado}`:""}`,onChange:Q=>{const we=Q.target.value.split(" - ");mt({...Pe,cidade:we[0]||"",estado:we[1]||""})},placeholder:"Cidade - UF",className:ze})]}),e.jsx(oe,{"data-loc":"client/src/pages/ClientEdit.tsx:624",type:"button",size:"sm",onClick:()=>{(Pe.endereco.trim()||Pe.cep.trim())&&(Be([...Le,{...Pe}]),mt({...Lj}))},className:"h-9 w-9 p-0 bg-primary hover:bg-[#B8935A] text-[#0A0A0B] shrink-0 mb-0",children:e.jsx(Jt,{"data-loc":"client/src/pages/ClientEdit.tsx:626",className:"w-4 h-4"})})]})]})]}),Le.length>0&&e.jsx("div",{"data-loc":"client/src/pages/ClientEdit.tsx:632",className:"space-y-2",children:Le.map((Q,we)=>e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:634",className:"flex items-center gap-2 bg-[#0D0D0F] rounded border border-border px-3 py-2",children:[e.jsx("span",{"data-loc":"client/src/pages/ClientEdit.tsx:635",className:"text-[10px] text-[#6B6B7A] w-20 capitalize",children:Q.tipo}),e.jsx("span",{"data-loc":"client/src/pages/ClientEdit.tsx:636",className:"text-sm text-foreground flex-1 truncate",children:[Q.endereco,Q.numero,Q.bairro,`${Q.cidade}${Q.estado?`/${Q.estado}`:""}
646`,Q.cep].filter(Boolean).join(", ")}),e.jsx("button",{"data-loc":"client/src/pages/ClientEdit.tsx:639",onClick:()=>Be(Le.filter((la,wt)=>wt!==we)),className:"h-7 w-7 flex items-center justify-center bg-red-600 hover:bg-red-700 rounded text-white shrink-0",children:e.jsx(va,{"data-loc":"client/src/pages/ClientEdit.tsx:641",className:"w-3.5 h-3.5"})})]},we))})]}),e.jsxs(is,{"data-loc":"client/src/pages/ClientEdit.tsx:650",title:"Documentos",icon:e.jsx(Hl,{"data-loc":"client/src/pages/ClientEdit.tsx:650",className:"w-4 h-4"}),children:[e.jsx("p",{"data-loc":"client/src/pages/ClientEdit.tsx:651",className:"text-[10px] text-[#6B6B7A] mb-3 italic",children:"Para inserir um novo documento selecione o tipo, preencha os campos e clique no botão +."}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:652",className:"bg-[#0D0D0F] rounded border border-border p-3 mb-3",children:[e.jsx("p",{"data-loc":"client/src/pages/ClientEdit.tsx:653",className:"text-[10px] text-[#6B6B7A] uppercase mb-2",children:"Dados para inclusão de documento"}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:654",className:"flex items-end gap-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:655",className:"w-36",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:656",children:"Tipo"}),e.jsxs(ds,{"data-loc":"client/src/pages/ClientEdit.tsx:657",value:X.tipo,onChange:Q=>vt({...X,tipo:Q}),children:[e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:658",value:"RG / SSP",children:"RG / SSP"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:659",value:"CPF",children:"CPF"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:660",value:"CNH",children:"CNH"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:661",value:"Passaporte",children:"Passaporte"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:662",value:"CTPS",children:"CTPS"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:663",value:"Outro",children:"Outro"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:666",className:"flex-1",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:667",children:"Número"}),e.jsx(ge,{"data-loc":"client/src/pages/ClientEdit.tsx:668",value:X.numero,onChange:Q=>vt({...X,numero:Q.target.value}),className:ze})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:670",className:"w-32",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:671",children:"Data emissão"}),e.jsx(ge,{"data-loc":"client/src/pages/ClientEdit.tsx:672",value:X.dataEmissao,onChange:Q=>vt({...X,dataEmissao:Q.target.value}),placeholder:"DD/MM/AAAA",className:ze})]}),e.jsx(oe,{"data-loc":"client/src/pages/ClientEdit.tsx:674",type:"button",size:"sm",onClick:()=>{X.numero.trim()&&(qt([...dt,{...X}]),vt({...kj}))},className:"h-9 w-9 p-0 bg-primary hover:bg-[#B8935A] text-[#0A0A0B] shrink-0",children:e.jsx(Jt,{"data-loc":"client/src/pages/ClientEdit.tsx:676",className:"w-4 h-4"})})]})]}),dt.length>0&&e.jsx("div",{"data-loc":"client/src/pages/ClientEdit.tsx:681",className:"space-y-2",children:dt.map((Q,we)=>e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:683",className:"flex items-center gap-2 bg-[#0D0D0F] rounded border border-border px-3 py-2",children:[e.jsx("span",{"data-loc":"client/src/pages/ClientEdit.tsx:684",className:"text-[10px] text-[#6B6B7A] w-24",children:Q.tipo}),e.jsx("span",{"data-loc":"client/src/pages/ClientEdit.tsx:685",className:"text-sm text-foreground flex-1",children:Q.numero}),Q.dataEmissao&&e.jsx("span",{"data-loc":"client/src/pages/ClientEdit.tsx:686",className:"text-xs text-[#6B6B7A]",children:Q.dataEmissao}),e.jsx("button",{"data-loc":"client/src/pages/ClientEdit.tsx:687",onClick:()=>qt(dt.filter((la,wt)=>wt!==we)),className:"h-7 w-7 flex items-center justify-center bg-red-600 hover:bg-red-700 rounded text-white shrink-0",children:e.jsx(va,{"data-loc":"client/src/pages/ClientEdit.tsx:689",className:"w-3.5 h-3.5"})})]},we))})]}),e.jsxs(is,{"data-loc":"client/src/pages/ClientEdit.tsx:698",title:"Dados financeiros",icon:e.jsx(By,{"data-loc":"client/src/pages/ClientEdit.tsx:698",className:"w-4 h-4"}),children:[e.jsx("p",{"data-loc":"client/src/pages/ClientEdit.tsx:699",className:"text-[10px] text-[#6B6B7A] mb-3 italic",children:"Preencha as informações financeiras da pessoa."}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:700",className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:701",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:701",children:"Profissão"}),e.jsx(ge,{"data-loc":"client/src/pages/ClientEdit.tsx:701",value:Vt,onChange:Q=>sa(Q.target.value),className:ze})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:702",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:702",children:"Cargo"}),e.jsx(ge,{"data-loc":"client/src/pages/ClientEdit.tsx:702",value:Kt,onChange:Q=>en(Q.target.value),className:ze})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:703",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:703",children:"Renda mensal"}),e.jsx(ge,{"data-loc":"client/src/pages/ClientEdit.tsx:703",value:ts,onChange:Q=>Ra(Q.target.value),placeholder:"R$ 0,00",className:ze})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:704",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:704",children:"Renda mensal familiar"}),e.jsx(ge,{"data-loc":"client/src/pages/ClientEdit.tsx:704",value:as,onChange:Q=>$a(Q.target.value),placeholder:"R$ 0,00",className:ze})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:705",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:705",children:"Local de trabalho"}),e.jsx(ge,{"data-loc":"client/src/pages/ClientEdit.tsx:705",value:Nt,onChange:Q=>Et(Q.target.value),className:ze})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:706",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:706",children:"Valor da entrada"}),e.jsx(ge,{"data-loc":"client/src/pages/ClientEdit.tsx:706",value:Re,onChange:Q=>tt(Q.target.value),placeholder:"R$ 0,00",className:ze})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:707",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:707",children:"FGTS"}),e.jsx(ge,{"data-loc":"client/src/pages/ClientEdit.tsx:707",value:ut,onChange:Q=>ft(Q.target.value),placeholder:"R$ 0,00",className:ze})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:708",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:709",children:"Forma transferência"}),e.jsxs(ds,{"data-loc":"client/src/pages/ClientEdit.tsx:710",value:Yt,onChange:rt,children:[e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:711",value:"Automático (TED)",children:"Automático (DOC descontinuado, assumir TED)"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:712",value:"TED",children:"TED"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:713",value:"PIX",children:"PIX"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:714",value:"Boleto",children:"Boleto"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:717",className:"col-span-2 flex items-center gap-2",children:[e.jsx("input",{"data-loc":"client/src/pages/ClientEdit.tsx:718",type:"checkbox",id:"irrf",checked:ot,onChange:Q=>na(Q.target.checked),className:"rounded border-[#2A2A2E] bg-background accent-[#C9A96E]"}),e.jsx("label",{"data-loc":"client/src/pages/ClientEdit.tsx:720",htmlFor:"irrf",className:"text-sm text-[#A0A0AB]",children:"Usar desconto simplificado IRRF"})]})]})]}),e.jsxs(is,{"data-loc":"client/src/pages/ClientEdit.tsx:726",title:"Dados bancários",icon:e.jsx(By,{"data-loc":"client/src/pages/ClientEdit.tsx:726",className:"w-4 h-4"}),children:[e.jsx("p",{"data-loc":"client/src/pages/ClientEdit.tsx:727",className:"text-[10px] text-[#6B6B7A] mb-3 italic",children:"Para inserir um novo dado bancário informe os dados e clique no botão +."}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:728",className:"bg-[#0D0D0F] rounded border border-border p-3 mb-3",children:[e.jsx("p",{"data-loc":"client/src/pages/ClientEdit.tsx:729",className:"text-[10px] text-[#6B6B7A] uppercase mb-2",children:"Dados para inclusão de conta bancária"}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:730",className:"grid grid-cols-2 sm:grid-cols-4 gap-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:731",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:732",children:"Situação"}),e.jsxs(ds,{"data-loc":"client/src/pages/ClientEdit.tsx:733",value:nt.situacao,onChange:Q=>Gt({...nt,situacao:Q}),children:[e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:734",value:"ativo",children:"Ativo"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:735",value:"inativo",children:"Inativo"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:738",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:739",children:"Tipo conta"}),e.jsxs(ds,{"data-loc":"client/src/pages/ClientEdit.tsx:740",value:nt.tipoConta,onChange:Q=>Gt({...nt,tipoConta:Q}),children:[e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:741",value:"cc",children:"C/C"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:742",value:"cp",children:"C/P"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:743",value:"poupanca",children:"Poupança"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:746",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:747",children:"Banco"}),e.jsxs(ds,{"data-loc":"client/src/pages/ClientEdit.tsx:748",value:nt.banco,onChange:Q=>Gt({...nt,banco:Q}),children:[e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:749",value:"",children:"Selecione"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:750",value:"
646001 - BB",children:"001 - BB"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:751",value:"033 - Santander",children:"033 - Santander"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:752",value:"104 - Caixa",children:"104 - Caixa"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:753",value:"237 - Bradesco",children:"237 - Bradesco"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:754",value:"341 - Itaú",children:"341 - Itaú"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:755",value:"260 - Nubank",children:"260 - Nubank"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:756",value:"077 - Inter",children:"077 - Inter"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:759",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:760",children:"Agência"}),e.jsx(ge,{"data-loc":"client/src/pages/ClientEdit.tsx:761",value:nt.agencia,onChange:Q=>Gt({...nt,agencia:Q.target.value}),className:ze})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:763",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:764",children:"Conta"}),e.jsx(ge,{"data-loc":"client/src/pages/ClientEdit.tsx:765",value:nt.conta,onChange:Q=>Gt({...nt,conta:Q.target.value}),className:ze})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:767",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:768",children:"Tipo"}),e.jsxs(ds,{"data-loc":"client/src/pages/ClientEdit.tsx:769",value:nt.tipo,onChange:Q=>Gt({...nt,tipo:Q}),children:[e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:770",value:"proprio",children:"Próprio"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:771",value:"conjunto",children:"Conjunto"}),e.jsx("option",{"data-loc":"client/src/pages/ClientEdit.tsx:772",value:"terceiro",children:"Terceiro"})]})]}),e.jsx("div",{"data-loc":"client/src/pages/ClientEdit.tsx:775",className:"col-span-2 flex items-end",children:e.jsx(oe,{"data-loc":"client/src/pages/ClientEdit.tsx:776",type:"button",size:"sm",onClick:()=>{(nt.conta.trim()||nt.agencia.trim())&&(Ke([...et,{...nt}]),Gt({...Rj}))},className:"h-9 w-9 p-0 bg-primary hover:bg-[#B8935A] text-[#0A0A0B]",children:e.jsx(Jt,{"data-loc":"client/src/pages/ClientEdit.tsx:778",className:"w-4 h-4"})})})]})]}),et.length>0&&e.jsx("div",{"data-loc":"client/src/pages/ClientEdit.tsx:784",className:"space-y-2",children:et.map((Q,we)=>e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:786",className:"flex items-center gap-2 bg-[#0D0D0F] rounded border border-border px-3 py-2",children:[e.jsxs("span",{"data-loc":"client/src/pages/ClientEdit.tsx:787",className:"text-xs text-foreground flex-1",children:[Q.banco," â Ag. ",Q.agencia," â Conta ",Q.conta," (",Q.tipoConta.toUpperCase(),")"]}),e.jsx("button",{"data-loc":"client/src/pages/ClientEdit.tsx:788",onClick:()=>Ke(et.filter((la,wt)=>wt!==we)),className:"h-7 w-7 flex items-center justify-center bg-red-600 hover:bg-red-700 rounded text-white shrink-0",children:e.jsx(va,{"data-loc":"client/src/pages/ClientEdit.tsx:790",className:"w-3.5 h-3.5"})})]},we))})]}),e.jsxs(is,{"data-loc":"client/src/pages/ClientEdit.tsx:799",title:"FamÃlia",icon:e.jsx(Ys,{"data-loc":"client/src/pages/ClientEdit.tsx:799",className:"w-4 h-4"}),children:[e.jsx("p",{"data-loc":"client/src/pages/ClientEdit.tsx:800",className:"text-[10px] text-[#6B6B7A] mb-3 italic",children:"Para inserir cônjuge, digite o nome da pessoa."}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:801",className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:802",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:802",children:"Filiação mãe"}),e.jsx(ge,{"data-loc":"client/src/pages/ClientEdit.tsx:802",value:Ct,onChange:Q=>Rt(Q.target.value),className:ze})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:803",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:803",children:"Filiação pai"}),e.jsx(ge,{"data-loc":"client/src/pages/ClientEdit.tsx:803",value:Sa,onChange:Q=>It(Q.target.value),className:ze})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:804",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:804",children:"Cônjuge"}),e.jsx(ge,{"data-loc":"client/src/pages/ClientEdit.tsx:804",value:ra,onChange:Q=>gs(Q.target.value),placeholder:"Nome do cônjuge",className:ze})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:805",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:806",children:"Nº filhos"}),e.jsx(ge,{"data-loc":"client/src/pages/ClientEdit.tsx:807",type:"number",min:0,value:Ea,onChange:Q=>aa(Number(Q.target.value)),className:ze})]})]})]}),e.jsxs(is,{"data-loc":"client/src/pages/ClientEdit.tsx:813",title:"Redes sociais",icon:e.jsx(lr,{"data-loc":"client/src/pages/ClientEdit.tsx:813",className:"w-4 h-4"}),children:[e.jsx("p",{"data-loc":"client/src/pages/ClientEdit.tsx:814",className:"text-[10px] text-[#6B6B7A] mb-3 italic",children:"Copie o endereço (URL) das redes sociais de
646sejadas e cole nos respectivos campos."}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:815",className:"space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:816",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:816",children:"Facebook"}),e.jsx(ge,{"data-loc":"client/src/pages/ClientEdit.tsx:816",value:ya,onChange:Q=>Us(Q.target.value),placeholder:"https://facebook.com/...",className:ze})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:817",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:817",children:"LinkedIn"}),e.jsx(ge,{"data-loc":"client/src/pages/ClientEdit.tsx:817",value:gr,onChange:Q=>lo(Q.target.value),placeholder:"https://linkedin.com/in/...",className:ze})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:818",children:[e.jsx(Ge,{"data-loc":"client/src/pages/ClientEdit.tsx:818",children:"Instagram"}),e.jsx(ge,{"data-loc":"client/src/pages/ClientEdit.tsx:818",value:dl,onChange:Q=>bn(Q.target.value),placeholder:"https://instagram.com/...",className:ze})]})]})]}),e.jsxs(is,{"data-loc":"client/src/pages/ClientEdit.tsx:823",title:"Anotações",icon:e.jsx(Rn,{"data-loc":"client/src/pages/ClientEdit.tsx:823",className:"w-4 h-4"}),children:[e.jsx("p",{"data-loc":"client/src/pages/ClientEdit.tsx:824",className:"text-[10px] text-[#6B6B7A] mb-3 italic",children:"Insira informações relevantes sobre a pessoa."}),e.jsx("textarea",{"data-loc":"client/src/pages/ClientEdit.tsx:825",value:Tt,onChange:Q=>hr(Q.target.value),rows:5,className:`${bc} w-full rounded-md border px-3 py-2 focus:outline-none focus:ring-1`,placeholder:"Anotações sobre o cliente..."})]}),e.jsxs(is,{"data-loc":"client/src/pages/ClientEdit.tsx:831",title:"Observações adicionais",icon:e.jsx(un,{"data-loc":"client/src/pages/ClientEdit.tsx:831",className:"w-4 h-4"}),children:[e.jsx("p",{"data-loc":"client/src/pages/ClientEdit.tsx:832",className:"text-[10px] text-[#6B6B7A] mb-3 italic",children:"Informações complementares do cliente."}),e.jsx("textarea",{"data-loc":"client/src/pages/ClientEdit.tsx:833",value:vr,onChange:Q=>ja(Q.target.value),rows:4,className:`${bc} w-full rounded-md border px-3 py-2 focus:outline-none focus:ring-1`,placeholder:"Descreva os bens..."})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:840",className:"space-y-4",children:[e.jsx(is,{"data-loc":"client/src/pages/ClientEdit.tsx:842",title:"Foto",icon:e.jsx(Ua,{"data-loc":"client/src/pages/ClientEdit.tsx:842",className:"w-4 h-4"}),children:e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:843",className:"flex flex-col items-center gap-3",children:[e.jsx("div",{"data-loc":"client/src/pages/ClientEdit.tsx:844",className:"w-24 h-24 rounded-full bg-border flex items-center justify-center overflow-hidden",children:Ta?.fotoUrl?e.jsx("img",{"data-loc":"client/src/pages/ClientEdit.tsx:846",src:Ta.fotoUrl,alt:"foto",className:"w-full h-full object-cover"}):p==="pessoa_juridica"?e.jsx(un,{"data-loc":"client/src/pages/ClientEdit.tsx:848",className:"w-10 h-10 text-primary"}):e.jsx(Ua,{"data-loc":"client/src/pages/ClientEdit.tsx:848",className:"w-10 h-10 text-primary"})}),e.jsxs(oe,{"data-loc":"client/src/pages/ClientEdit.tsx:851",type:"button",size:"sm",variant:"outline",onClick:()=>ce.info("Upload de foto em breve"),className:"border-border text-[#A0A0AB] hover:text-foreground text-xs h-8",children:[e.jsx(Ua,{"data-loc":"client/src/pages/ClientEdit.tsx:853",className:"w-3.5 h-3.5 mr-1.5"}),"Alterar foto"]})]})}),e.jsx(is,{"data-loc":"client/src/pages/ClientEdit.tsx:859",title:"Relacionamentos",icon:e.jsx(Ua,{"data-loc":"client/src/pages/ClientEdit.tsx:859",className:"w-4 h-4"}),children:e.jsx("div",{"data-loc":"client/src/pages/ClientEdit.tsx:860",className:"grid grid-cols-2 gap-2",children:[{key:"isLead",label:"Lead",val:T,set:K},{key:"isProprietario",label:"Fornecedor",val:ve,set:P},{key:"isLocador",label:"Parceiro",val:J,set:W},{key:"isLocatario",label:"Distribuidor",val:H,set:te},{key:"isComprador",label:"Comprador",val:pe,set:ae},{key:"isFiador",label:"Representante",val:Ne,set:Se},{key:"isSindico",label:"Revendedor",val:Ce,set:ke},{key:"isOutros",label:"Outros",val:Z,set:fe}].map(({key:Q,label:we,val:la,set:wt})=>e.jsx("button",{"data-loc":"client/src/pages/ClientEdit.tsx:871",type:"button",onClick:()=>wt(!la),className:`px-2 py-2 rounded border text-xs font-medium text-center transition-colors ${la?"bg-primary/10 border-primary/40 text-primary":"bg-background border-border text-[#6B6B7A] hover:border-primary/20 hover:text-[#A0A0AB]"}`,children:we},Q))})}),e.jsx(is,{"data-loc":"client/src/pages/ClientEdit.tsx:880",title:"Classificação marketing",icon:e.jsx(Pl,{"data-loc":"client/src/pages/ClientEdit.tsx:880",className:"w-4 h-4"}),children:e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:881",className:"space-y-3",children:[e.jsx(WT,{"data-loc":"client/src/pages/ClientEdit.tsx:882",value:tn,onChange:yn}),e.jsxs("div",{"data-loc":"client/src/pages/ClientEdit.tsx:883",className:"space-y-2 pt-1",children:[e.jsxs("label",{"data-loc":"client/src/pages/ClientEdit.tsx:884",className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("div",{"data-loc":"client/src/pages/ClientEdit.tsx:885",onClick:()=>hs(!Wa),className:`w-9 h-5 rounded-full transition-colors relative ${Wa?"bg-primary":"bg-[#2A2A2E]"}`,children:e.jsx("div",{"data-loc":"client/src/pages/ClientEdit.tsx:887",className:`absolute top-0.5 w-4 h-4 bg-white rounded-full shadow transition-transform ${Wa?"translate-x-4":"translate-x-0.5"}`})}),e.jsx("span",{"data-loc":"client/src/pages/ClientEdit.tsx:889",className:"text-sm text-[#A0A0AB]",children:"Deseja receber e-mail"})]}),e.jsxs("label",{"data-loc":"client/src/pages/ClientEdit.tsx:891",className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("div",{"data-loc":"client/src/pages/ClientEdit.tsx:892",onClick:()=>Is(!Qa),className:`w-9 h-5 rounded-full transition-colors relative ${Qa?"bg-primary":"bg-[#2A2A2E]"}`,children:e.jsx("div",{"data-loc":"client/src/pages/ClientEdit.tsx:894",className:`absolute top-0.5 w-4 h-4 bg-white rounded-full shadow transition-transform ${Qa?"translate-x-4":"translate-x-0.5"}`})}),e.jsx("span",{"data-loc":"client/src/pages/ClientEdit.tsx:896",className:"text-sm text-[#A0A0AB]",children:"Deseja receber SMS/WhatsApp"})]})]})]})})]})]})})]})}const L3={novo:"Novo",contato:"Em atendimento",qualificado:"Qualificado",negociacao:"Negociação",ganho:"Ganho",perdido:"Descartado"}
646,QT={site:"Site",facebook:"Facebook",instagram:"Instagram",indicacao:"Indicação",telefone:"Telefone",whatsapp:"WhatsApp",outro:"Outro"},k3=[{value:"selecao_perfil",label:"Seleção do perfil"},{value:"selecao_imoveis",label:"Apresentação de produtos"},{value:"visita",label:"Visita agendada"},{value:"proposta",label:"Proposta"},{value:"negociacao",label:"Negociação"},{value:"documentacao",label:"Documentação"}];function _j(t){if(!t)return null;const s=Number(t);return isNaN(s)||s===0?null:s.toLocaleString("pt-BR",{minimumFractionDigits:2,maximumFractionDigits:2})}function GT({lead:t,onDiscard:s,onTransfer:r,onChangeCorretor:l}){const[c,d]=f.useState(!1),u=f.useRef(null),x=f.useRef(null),[p,g]=f.useState({top:0,right:0}),b=f.useCallback(()=>{if(!u.current)return;const j=u.current.getBoundingClientRect();g({top:j.bottom+window.scrollY+4,right:window.innerWidth-j.right})},[]),v=()=>{b(),d(j=>!j)};f.useEffect(()=>{if(!c)return;function j(N){x.current&&!x.current.contains(N.target)&&u.current&&!u.current.contains(N.target)&&d(!1)}function S(){b()}return document.addEventListener("mousedown",j),window.addEventListener("scroll",S,!0),()=>{document.removeEventListener("mousedown",j),window.removeEventListener("scroll",S,!0)}},[c,b]);const y=c?e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:101",ref:x,style:{position:"fixed",top:p.top,right:p.right,zIndex:9999},className:"w-64 bg-card border border-border rounded-lg shadow-2xl",children:[e.jsxs(xs,{"data-loc":"client/src/pages/Attendances.tsx:106",href:`/atendimentos/${t.id}`,className:"flex items-center gap-2.5 px-3 py-2.5 text-xs text-foreground hover:bg-muted transition-colors",onClick:()=>d(!1),children:[e.jsx(_x,{"data-loc":"client/src/pages/Attendances.tsx:111",className:"w-3.5 h-3.5 flex-shrink-0 text-primary"}),e.jsx("span",{"data-loc":"client/src/pages/Attendances.tsx:112",className:"whitespace-nowrap",children:"Detalhes"})]}),e.jsxs("button",{"data-loc":"client/src/pages/Attendances.tsx:114",onClick:()=>{d(!1),r(t.id)},className:"w-full flex items-center gap-2.5 px-3 py-2.5 text-xs text-foreground hover:bg-muted transition-colors",children:[e.jsx(nC,{"data-loc":"client/src/pages/Attendances.tsx:118",className:"w-3.5 h-3.5 flex-shrink-0 text-blue-400"}),e.jsx("span",{"data-loc":"client/src/pages/Attendances.tsx:119",className:"whitespace-nowrap",children:"Transferência de atendimento"})]}),e.jsxs("button",{"data-loc":"client/src/pages/Attendances.tsx:121",onClick:()=>{d(!1),l(t.id)},className:"w-full flex items-center gap-2.5 px-3 py-2.5 text-xs text-foreground hover:bg-muted transition-colors",children:[e.jsx(tx,{"data-loc":"client/src/pages/Attendances.tsx:125",className:"w-3.5 h-3.5 flex-shrink-0 text-primary"}),e.jsx("span",{"data-loc":"client/src/pages/Attendances.tsx:126",className:"whitespace-nowrap",children:"Alterar atendente do atendimento"})]}),e.jsx("div",{"data-loc":"client/src/pages/Attendances.tsx:128",className:"border-t border-border"}),e.jsxs("button",{"data-loc":"client/src/pages/Attendances.tsx:129",onClick:()=>{d(!1),s(t.id)},className:"w-full flex items-center gap-2.5 px-3 py-2.5 text-xs text-red-400 hover:bg-red-500/10 transition-colors",children:[e.jsx(Ba,{"data-loc":"client/src/pages/Attendances.tsx:133",className:"w-3.5 h-3.5 flex-shrink-0"}),e.jsx("span",{"data-loc":"client/src/pages/Attendances.tsx:134",className:"whitespace-nowrap",children:"Descartar atendimento"})]})]}):null;return e.jsxs(e.Fragment,{children:[e.jsxs("button",{"data-loc":"client/src/pages/Attendances.tsx:141",ref:u,onClick:v,className:"flex items-center gap-1 px-3 py-1.5 text-xs font-medium rounded border border-border bg-background text-foreground hover:bg-muted hover:border-primary/40 transition-colors",children:["Ações",e.jsx(Xa,{"data-loc":"client/src/pages/Attendances.tsx:147",className:"w-3 h-3"})]}),dn.createPortal(y,document.body)]})}function VT({priority:t}){const s={baixa:{color:"#94a3b8",bg:"#94a3b822"},media:{color:"#facc15",bg:"#facc1522"},alta:{color:"#f97316",bg:"#f9731622"},urgente:{color:"#ef4444",bg:"#ef444422"}},{color:r,bg:l}=s[t]||s.media;return e.jsx("div",{"data-loc":"client/src/pages/Attendances.tsx:165",className:"w-8 h-8 rounded-full flex items-center justify-center border-2",style:{borderColor:r,backgroundColor:l},title:`Termômetro: ${t}`,children:e.jsx(xC,{"data-loc":"client/src/pages/Attendances.tsx:170",className:"w-4 h-4",style:{color:r}})})}function KT({status:t}){const r=["contato","qualificado","negociacao"].includes(t)?"#10b981":"#6b7280";return e.jsx("div",{"data-loc":"client/src/pages/Attendances.tsx:179",className:"w-8 h-8 rounded-full flex items-center justify-center border-2",style:{borderColor:r,backgroundColor:r+"22"},title:L3[t]||t,children:e.jsx(Za,{"data-loc":"client/src/pages/Attendances.tsx:184",className:"w-4 h-4",style:{color:r}})})}function YT({lead:t,onDiscard:s,onTransfer:r,onChangeCorretor:l}){const c=(()=>{try{return JSON.parse(t.metadata||"{}")}catch{return{}}})(),d=[];if(t.propertyType&&d.push(t.propertyType.toUpperCase().replace("_"," ")),t.propertyCity){const U=t.propertyNeighborhood?`${t.propertyCity.toUpperCase()}/${t.propertyState||"SC"} | ${t.propertyNeighborhood.toUpperCase()} - ${t.propertyCity.toUpperCase()}/${t.propertyState||"SC"}`:`${t.propertyCity.toUpperCase()}/${t.propertyState||"SC"}`;d.push(U)}const u=_j(c.precoMin||t.propertyPrice),x=_j(c.precoMax);u&&x?d.push(`R$ ${u} ATà R$ ${x}`):u&&d.push(`R$ ${u}`);const p=c.quartosMin||t.propertyBedrooms,g=c.vagasMin||t.propertyParkingSpaces;p&&d.push(`A PARTIR ${p} QUARTO(S)`),g&&d.push(`A PARTIR ${g} VAGA(S)`);const b=d.join(" | "),v=c.fase?k3.find(U=>U.value===c.fase)?.label||c.fase:null,y=t.propertyBedrooms??c.quartosMin??0,j=t.propertyParkingSpaces??c.vagasMin??0,S=c.carrinho??0,N=c.visitas??0,w=c.proposta??0,D=t.clientName||t.name,k=t.clientPhone||t.phone,A=t.clientEmail||t.email,_=!!t.siteLeadId,E=t.propertyCodigo||c.codigoImovel,I=t.propertyTitle,R=t.dataEntradaLead?new Date(Number(t.dataEntradaLead)):t.createdAt?new Date(t.createdAt):null,z=R?R.toLocaleDateString("pt-BR",{day:"2-digit",month:"2-digit",year:"numeric"})+" "+R.toLocaleTimeString("pt-BR",{hour:"2-digit",minute:"2-digit"}):null;return e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:259",className:"bg-card border border-border rounded-lg overflow-hidden hover:border-primary/20 transition-colors",children:[e.jsx("div",{"data-loc":"client/src/pages/Attendances.tsx:262",className:"px-4 py-2.5 border-b border-border bg-muted",children:b&&e.jsx("p",{"data-loc":"client/src/pages/Attendances.tsx:263",className:"text-[11px] font-bold text-foreground tracking-wide leading-snug",children:b})}),e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:267",className:"grid grid-cols-1 md:grid-cols-[minmax(200px,1fr)_minmax(220px,1.2fr)_minmax(220px,1fr)] divide-y md:divide-y-0 md:divide-x divide-border",children:[e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:270",className:"px-4 py-3 flex flex-col gap-1",children:[e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:271",className:"flex items-center gap-2 flex-wrap",children:[e.jsxs(xs,{"data-loc":"client/src/pages/Attendances.tsx:272",href:`/atendimentos/${t.id}`,className:"text-xs font-semibold text-primary hover:underline",children:["Atendimento #",t.id]}),_&&e.jsxs("span",{"data-loc":"client/src/pages/Attendances.tsx:276",className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-medium bg-blue-500/15 text-blue-400 border border-blue-500/20",children:[e.jsx(lr,{"data-loc":"client/src/pages/Attendances.tsx:277",className:"w-2.5 h-2.5"}
646),"Site #",t.siteLeadId]}),z&&e.jsxs("span",{"data-loc":"client/src/pages/Attendances.tsx:282",className:"inline-flex items-center gap-1 text-[10px] text-muted-foreground",children:[e.jsx(Za,{"data-loc":"client/src/pages/Attendances.tsx:283",className:"w-2.5 h-2.5"}),z]})]}),t.clientId?e.jsxs(xs,{"data-loc":"client/src/pages/Attendances.tsx:290",href:`/clientes/${t.clientId}`,className:"flex items-center gap-1 text-sm font-semibold text-foreground hover:text-primary transition-colors",children:[e.jsx(Ua,{"data-loc":"client/src/pages/Attendances.tsx:291",className:"w-3.5 h-3.5 text-primary/60 shrink-0"}),D,e.jsx(Gi,{"data-loc":"client/src/pages/Attendances.tsx:293",className:"w-2.5 h-2.5 text-muted-foreground"})]}):e.jsx("p",{"data-loc":"client/src/pages/Attendances.tsx:296",className:"text-sm font-semibold text-foreground",children:t.name}),k&&e.jsxs("a",{"data-loc":"client/src/pages/Attendances.tsx:299",href:`tel:${k}`,className:"flex items-center gap-1 text-xs text-primary hover:underline mt-0.5",children:[e.jsx(hn,{"data-loc":"client/src/pages/Attendances.tsx:300",className:"w-3 h-3"}),k]}),A&&e.jsx("p",{"data-loc":"client/src/pages/Attendances.tsx:305",className:"text-xs text-muted-foreground truncate",children:A}),(I||E)&&e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:309",className:"mt-1 flex items-start gap-1",children:[e.jsx(Px,{"data-loc":"client/src/pages/Attendances.tsx:310",className:"w-3 h-3 text-primary/60 shrink-0 mt-0.5"}),e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:311",className:"min-w-0",children:[I&&e.jsx("p",{"data-loc":"client/src/pages/Attendances.tsx:312",className:"text-xs text-foreground truncate",children:I}),E&&e.jsx("p",{"data-loc":"client/src/pages/Attendances.tsx:313",className:"text-[10px] text-muted-foreground",children:E})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:320",className:"px-4 py-3 flex flex-col gap-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:322",className:"flex flex-col gap-1 text-xs",children:[e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:323",className:"flex gap-1",children:[e.jsx("span",{"data-loc":"client/src/pages/Attendances.tsx:324",className:"text-muted-foreground w-32 shrink-0",children:"Situação:"}),e.jsx("span",{"data-loc":"client/src/pages/Attendances.tsx:325",className:"text-foreground",children:L3[t.status]||t.status})]}),e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:327",className:"flex gap-1",children:[e.jsx("span",{"data-loc":"client/src/pages/Attendances.tsx:328",className:"text-muted-foreground w-32 shrink-0",children:"Fase atendimento:"}),e.jsx("span",{"data-loc":"client/src/pages/Attendances.tsx:329",className:"text-foreground",children:v||"â"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:331",className:"flex gap-1",children:[e.jsx("span",{"data-loc":"client/src/pages/Attendances.tsx:332",className:"text-muted-foreground w-32 shrink-0",children:"MÃdia de origem:"}),e.jsx("span",{"data-loc":"client/src/pages/Attendances.tsx:333",className:"text-foreground",children:QT[t.source]||t.source})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:338",className:"mt-1",children:[e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:339",className:"flex gap-5 text-xs text-muted-foreground mb-1",children:[e.jsx("span",{"data-loc":"client/src/pages/Attendances.tsx:340",className:"w-10 text-center",children:"Quartos"}),e.jsx("span",{"data-loc":"client/src/pages/Attendances.tsx:341",className:"w-10 text-center",children:"Vagas"}),e.jsx("span",{"data-loc":"client/src/pages/Attendances.tsx:342",className:"w-12 text-center",children:"Carrinho"}),e.jsx("span",{"data-loc":"client/src/pages/Attendances.tsx:343",className:"w-10 text-center",children:"Visitas"}),e.jsx("span",{"data-loc":"client/src/pages/Attendances.tsx:344",className:"w-12 text-center",children:"Proposta"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:346",className:"flex gap-5 text-sm font-bold text-foreground",children:[e.jsx("span",{"data-loc":"client/src/pages/Attendances.tsx:347",className:"w-10 text-center",children:y}),e.jsx("span",{"data-loc":"client/src/pages/Attendances.tsx:348",className:"w-10 text-center",children:j}),e.jsx("span",{"data-loc":"client/src/pages/Attendances.tsx:349",className:"w-12 text-center",children:S}),e.jsx("span",{"data-loc":"client/src/pages/Attendances.tsx:350",className:"w-10 text-center",children:N}),e.jsx("span",{"data-loc":"client/src/pages/Attendances.tsx:351",className:"w-12 text-center",children:w})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:357",className:"px-4 py-3 flex flex-col gap-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:359",className:"flex flex-col gap-1 text-xs",children:[e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:360",className:"flex gap-1",children:[e.jsx("span",{"data-loc":"client/src/pages/Attendances.tsx:361",className:"text-muted-foreground w-16 shrink-0",children:"Atendente:"}),e.jsx("span",{"data-loc":"client/src/pages/Attendances.tsx:362",className:"text-foreground truncate",children:t.corretorName||"â"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:364",className:"flex gap-1",children:[e.jsx("span",{"data-loc":"client/src/pages/Attendances.tsx:365",className:"text-muted-foreground w-16 shrink-0",children:"Gerente:"}),e.jsx("span",{"data-loc":"client/src/pages/Attendances.tsx:366",className:"text-muted-foreground",children:"â"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:368",className:"flex gap-1",children:[e.jsx("span",{"data-loc":"client/src/pages/Attendances.tsx:369",className:"text-muted-foreground w-16 shrink-0",children:"Unidade:"}),e.jsx("span",{"data-loc":"client/src/pages/Attendances.tsx:370",className:"text-foreground",children:"Equipe:"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:375",className:"mt-1",children:[e.jsx("p",{"data-loc":"client/src/pages/Attendances.tsx:376",className:"text-xs font-semibold text-foreground mb-2",children:"Indicadores"}),e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:377",className:"flex items-center gap-2",children:[e.jsx(VT,{"data-loc":"client/src/pages/Attendances.tsx:378",priority:t.priority}),e.jsx(KT,{"data-loc":"client/src/pages/Attendances.tsx:379",status:t.status}),e.jsx(GT,{"data-loc":"client/src/pages/Attendances.tsx:380",lead:t,onDiscard:s,onTransfer:r,onChangeCorretor:l})]})]})]})]})]})}
646function XT({leadId:t,onClose:s,onConfirm:r}){const[l,c]=f.useState("");return e.jsx("div",{"data-loc":"client/src/pages/Attendances.tsx:399",className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60",children:e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:400",className:"bg-card border border-border rounded-xl p-6 w-full max-w-md shadow-2xl",children:[e.jsxs("h3",{"data-loc":"client/src/pages/Attendances.tsx:401",className:"text-sm font-semibold text-foreground mb-1",children:["Descartar atendimento #",t]}),e.jsx("p",{"data-loc":"client/src/pages/Attendances.tsx:402",className:"text-xs text-muted-foreground mb-4",children:"Informe o motivo do descarte (opcional)."}),e.jsx("textarea",{"data-loc":"client/src/pages/Attendances.tsx:403",value:l,onChange:d=>c(d.target.value),placeholder:"Ex: Cliente não tem perfil, comprou com outro corretor...",rows:3,className:"w-full bg-background border border-border text-foreground rounded-md px-3 py-2 text-sm focus:outline-none focus:border-primary/50 resize-none mb-4"}),e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:410",className:"flex gap-2 justify-end",children:[e.jsx("button",{"data-loc":"client/src/pages/Attendances.tsx:411",onClick:s,className:"px-4 py-2 text-xs rounded border border-border text-muted-foreground hover:bg-muted transition-colors",children:"Cancelar"}),e.jsx("button",{"data-loc":"client/src/pages/Attendances.tsx:412",onClick:()=>r(l),className:"px-4 py-2 text-xs rounded bg-red-600 hover:bg-red-700 text-white font-medium transition-colors",children:"Confirmar descarte"})]})]})})}function Oj({leadId:t,title:s,onClose:r,onConfirm:l,users:c}){const[d,u]=f.useState(null),[x,p]=f.useState("");return e.jsx("div",{"data-loc":"client/src/pages/Attendances.tsx:430",className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60",children:e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:431",className:"bg-card border border-border rounded-xl p-6 w-full max-w-md
646shadow-2xl",children:[e.jsxs("h3",{"data-loc":"client/src/pages/Attendances.tsx:432",className:"text-sm font-semibold text-foreground mb-1",children:[s," #",t]}),e.jsx("p",{"data-loc":"client/src/pages/Attendances.tsx:433",className:"text-xs text-muted-foreground mb-4",children:"Selecione o corretor de destino."}),e.jsxs("select",{"data-loc":"client/src/pages/Attendances.tsx:434",value:d??"",onChange:g=>u(Number(g.target.value)),className:"w-full h-9 bg-background border border-border text-foreground rounded-md px-3 text-sm focus:outline-none focus:border-primary/50 mb-3",children:[e.jsx("option",{"data-loc":"client/src/pages/Attendances.tsx:439",value:"",children:"Selecione um corretor..."}),c.map(g=>e.jsx("option",{"data-loc":"client/src/pages/Attendances.tsx:440",value:g.id,children:g.name},g.id))]}),e.jsx("textarea",{"data-loc":"client/src/pages/Attendances.tsx:442",value:x,onChange:g=>p(g.target.value),placeholder:"Motivo (opcional)",rows:2,className:"w-full bg-background border border-border text-foreground rounded-md px-3 py-2 text-sm focus:outline-none focus:border-primary/50 resize-none mb-4"}),e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:449",className:"flex gap-2 justify-end",children:[e.jsx("button",{"data-loc":"client/src/pages/Attendances.tsx:450",onClick:r,className:"px-4 py-2 text-xs rounded border border-border text-muted-foreground hover:bg-muted transition-colors",children:"Cancelar"}),e.jsx("button",{"data-loc":"client/src/pages/Attendances.tsx:451",disabled:!d,onClick:()=>d&&l(d,x),className:"px-4 py-2 text-xs rounded bg-primary hover:bg-primary/90 disabled:opacity-40 text-primary-foreground font-semibold transition-colors",children:"Confirmar"})]})]})})}const Pj={search:"",status:"",source:"",assignedTo:"",priority:"",fase:"",codigoAtendimento:"",dateFrom:"",dateTo:""};function ZT(){const t=Y.useUtils(),[s,r]=f.useState({...Pj}),[l,c]=f.useState(null),[d,u]=f.useState(!0),[x,p]=f.useState(0),g=20,[b,v]=f.useState(null),[y,j]=f.useState(null),[S,N]=f.useState(null),{canEditPage:w}=Kx(),D=w("/atendimentos"),{data:k}=Y.users.list.useQuery(),A=(k??[]).filter(K=>["corretor","gerente","admin"].includes(K.role)),_=l?{search:l.search||void 0,status:l.status||void 0,source:l.source||void 0,assignedTo:l.assignedTo?Number(l.assignedTo):void 0,priority:l.priority||void 0,fase:l.fase||void 0,codigoAtendimento:l.codigoAtendimento||void 0,dateFrom:l.dateFrom||void 0,dateTo:l.dateTo||void 0,limit:g,offset:x*g}:null,{data:E,isLoading:I,isFetching:R}=Y.atendimentos.list.useQuery(_??void 0,{enabled:l!==null}),z=Y.atendimentos.discard.useMutation({onSuccess:()=>{ce.success("Atendimento descartado"),t.atendimentos.list.invalidate(),v(null)},onError:()=>ce.error("Erro ao descartar")}),U=Y.atendimentos.transfer.useMutation({onSuccess:()=>{ce.success("Atendimento transferido"),t.atendimentos.list.invalidate(),j(null)},onError:()=>ce.error("Erro ao transferir")}),B=Y.atendimentos.changeCorretor.useMutation({onSuccess:()=>{ce.success("Atendente alterado"),t.atendimentos.list.invalidate(),N(null)},onError:()=>ce.error("Erro ao alterar corretor")}),F=K=>ve=>r(P=>({...P,[K]:ve.target.value}));function V(){p(0),c({...s})}function de(){r({...Pj}),c(null),p(0)}const le="w-full h-9 bg-background border border-border text-foreground rounded-md px-3 text-xs focus:outline-none focus:border-primary/50 focus:ring-1 focus:ring-primary/20 placeholder-[#3A3A42]",xe=`${le} appearance-none`,M=E?.data??[],O=E?.total??0,T=Math.ceil(O/g);return e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:546",className:"flex flex-col min-h-full",children:[e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:548",className:"flex items-center justify-between px-3 md:px-6 py-3 md:py-4 border-b border-border shrink-0",children:[e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:549",children:[e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:550",className:"flex items-center gap-1 text-xs text-muted-foreground mb-1",children:[e.jsx("span",{"data-loc":"client/src/pages/Attendances.tsx:551",children:"InÃcio"}),e.jsx("span",{"data-loc":"client/src/pages/Attendances.tsx:552",className:"mx-1",children:"âº"}),e.jsx("span",{"data-loc":"client/src/pages/Attendances.tsx:553",className:"text-foreground",children:"Atendimentos"})]}),e.jsx("h1",{"data-loc":"client/src/pages/Attendances.tsx:555",className:"text-base font-semibold text-foreground",children:"Listagem de atendimentos"})]}),D&&e.jsxs(xs,{"data-loc":"client/src/pages/Attendances.tsx:558",href:"/leads/novo",className:"flex items-center gap-1.5 px-3 py-1.5 text-xs font-semibold rounded bg-primary/15 text-primary border border-primary/30 hover:bg-primary/25 transition-colors",children:[e.jsx(Jt,{"data-loc":"client/src/pages/Attendances.tsx:562",className:"w-3.5 h-3.5"}),"Incluir atendimento"]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:568",className:"flex-1 px-3 md:px-6 py-3 md:py-4 space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:570",className:"border border-border rounded-lg bg-card overflow-hidden",children:[e.jsxs("button",{"data-loc":"client/src/pages/Attendances.tsx:571",onClick:()=>u(K=>!K),className:"w-full flex items-center justify-between px-4 py-3 hover:bg-muted transition-colors",children:[e.jsxs("span",{"data-loc":"client/src/pages/Attendances.tsx:575",className:"flex items-center gap-2 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:[e.jsx(Ox,{"data-loc":"client/src/pages/Attendances.tsx:576",className:"w-3.5 h-3.5 text-primary"}),"Filtros"]}),d?e.jsx(Qi,{"data-loc":"client/src/pages/Attendances.tsx:579",className:"w-4 h-4 text-muted-foreground"}):e.jsx(Xa,{"data-loc":"client/src/pages/Attendances.tsx:579",className:"w-4 h-4 text-muted-foreground"})]}),d&&e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:583",className:"px-4 pb-4 border-t border-border",children:[e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:584",className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3 mt-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:585",children:[e.jsx("label",{"data-loc":"client/src/pages/Attendances.tsx:586",className:"block text-[10px] text-muted-foreground uppercase tracking-wider mb-1",children:"Unidade"}),e.jsx("select",{"data-loc":"client/src/pages/Attendances.tsx:587",className:xe,value:"pelotas",disabled:!0,children:e.jsx("option",{"data-loc":"client/src/pages/Attendances.tsx:588",value:"pelotas",children:"Pelotas"})})]}),e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:592",children:[e.jsx("label",{"data-loc":"client/src/pages/Attendances.tsx:593",className:"block text-[10px] text-muted-foreground uppercase tracking-wider mb-1",children:"Código atendimento"}),e.jsx("input",{"data-loc":"client/src/pages/Attendances.tsx:594",className:le,placeholder:"Digite os códigos...",value:s.codigoAtendimento,onChange:F("codigoAtendimento")})]}),e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:596",children:[e.jsx("label",{"data-loc":"client/src/pages/Attendances.tsx:597",className:"block text-[10px] text-muted-foreground uppercase tracking-wider mb-1",children:"Lead / Cliente"}),e.jsx("input",{"data-loc":"client/src/pages/Attendances.tsx:598",className:le,placeholder:"Nome, e-mail ou telefone...",value:s.search,onChange:F("search")})]}),e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:600",children:[e.jsx("label",{"data-loc":"client/src/pages/Attendances.tsx:601",className:"block text-[10px] text-muted-foreground uppercase tracking-wider mb-1",children:"Situação"}),e.jsxs("select",{"data-loc":"client/src/pages/Attendances.tsx:602",className:xe,value:s.status,onChange:F("status"),children:[e.jsx("option",{"data-loc":"client/src/pages/Attendances.tsx:603",value:"",children:"Todas"}),e.jsx("option",{"data-loc":"client/src/pages/Attendances.tsx:604",value:"novo",children:"Novo"}),e.jsx("option",{"data-loc":"client/src/pages/Attendances.tsx:605",value:"contato",children:"Em atendimento"}),e.jsx("option",{"data-loc":"client/src/pages/Attendances.tsx:606",value:"qual
646ificado",children:"Qualificado"}),e.jsx("option",{"data-loc":"client/src/pages/Attendances.tsx:607",value:"negociacao",children:"Negociação"}),e.jsx("option",{"data-loc":"client/src/pages/Attendances.tsx:608",value:"ganho",children:"Ganho"}),e.jsx("option",{"data-loc":"client/src/pages/Attendances.tsx:609",value:"perdido",children:"Descartado"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:612",children:[e.jsx("label",{"data-loc":"client/src/pages/Attendances.tsx:613",className:"block text-[10px] text-muted-foreground uppercase tracking-wider mb-1",children:"Termômetro"}),e.jsxs("select",{"data-loc":"client/src/pages/Attendances.tsx:614",className:xe,value:s.priority,onChange:F("priority"),children:[e.jsx("option",{"data-loc":"client/src/pages/Attendances.tsx:615",value:"",children:"Todos"}),e.jsx("option",{"data-loc":"client/src/pages/Attendances.tsx:616",value:"baixa",children:"Frio"}),e.jsx("option",{"data-loc":"client/src/pages/Attendances.tsx:617",value:"media",children:"Morno"}),e.jsx("option",{"data-loc":"client/src/pages/Attendances.tsx:618",value:"alta",children:"Quente"}),e.jsx("option",{"data-loc":"client/src/pages/Attendances.tsx:619",value:"urgente",children:"Urgente"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:622",children:[e.jsx("label",{"data-loc":"client/src/pages/Attendances.tsx:623",className:"block text-[10px] text-muted-foreground uppercase tracking-wider mb-1",children:"MÃdia de origem"}),e.jsxs("select",{"data-loc":"client/src/pages/Attendances.tsx:624",className:xe,value:s.source,onChange:F("source"),children:[e.jsx("option",{"data-loc":"client/src/pages/Attendances.tsx:625",value:"",children:"Todas"}),e.jsx("option",{"data-loc":"client/src/pages/Attendances.tsx:626",value:"site",children:"Site"}),e.jsx("option",{"data-loc":"client/src/pages/Attendances.tsx:627",value:"facebook",children:"Facebook"}),e.jsx("option",{"data-loc":"client/src/pages/Attendances.tsx:628",value:"instagram",children:"Instagram"}),e.jsx("option",{"data-loc":"client/src/pages/Attendances.tsx:629",value:"indicacao",children:"Indicação"}),e.jsx("option",{"data-loc":"client/src/pages/Attendances.tsx:630",value:"telefone",children:"Telefone"}),e.jsx("option",{"data-loc":"client/src/pages/Attendances.tsx:631",value:"whatsapp",children:"WhatsApp"}),e.jsx("option",{"data-loc":"client/src/pages/Attendances.tsx:632",value:"outro",children:"Outro"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:635",children:[e.jsx("label",{"data-loc":"client/src/pages/Attendances.tsx:636",className:"block text-[10px] text-muted-foreground uppercase tracking-wider mb-1",children:"Fase atendimento"}),e.jsxs("select",{"data-loc":"client/src/pages/Attendances.tsx:637",className:xe,value:s.fase,onChange:F("fase"),children:[e.jsx("option",{"data-loc":"client/src/pages/Attendances.tsx:638",value:"",children:"Todas"}),k3.map(K=>e.jsx("option",{"data-loc":"client/src/pages/Attendances.tsx:639",value:K.value,children:K.label},K.value))]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:642",children:[e.jsx("label",{"data-loc":"client/src/pages/Attendances.tsx:643",className:"block text-[10px] text-muted-foreground uppercase tracking-wider mb-1",children:"Atendente"}),e.jsxs("select",{"data-loc":"client/src/pages/Attendances.tsx:644",className:xe,value:s.assignedTo,onChange:F("assignedTo"),children:[e.jsx("option",{"data-loc":"client/src/pages/Attendances.tsx:645",value:"",children:"Todos"}),A.map(K=>e.jsx("option",{"data-loc":"client/src/pages/Attendances.tsx:646",value:K.id,children:K.name},K.id))]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:649",children:[e.jsx("label",{"data-loc":"client/src/pages/Attendances.tsx:650",className:"block text-[10px] text-muted-foreground uppercase tracking-wider mb-1",children:"Data â de"}),e.jsx("input",{"data-loc":"client/src/pages/Attendances.tsx:651",type:"date",className:le,value:s.dateFrom,onChange:F("dateFrom")})]}),e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:653",children:[e.jsx("label",{"data-loc":"client/src/pages/Attendances.tsx:654",className:"block text-[10px] text-muted-foreground uppercase tracking-wider mb-1",children:"Data â até"}),e.jsx("input",{"data-loc":"client/src/pages/Attendances.tsx:655",type:"date",className:le,value:s.dateTo,onChange:F("dateTo")})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:660",className:"flex items-center gap-2 mt-4",children:[e.jsxs("button",{"data-loc":"client/src/pages/Attendances.tsx:661",onClick:de,className:"flex items-center gap-1.5 px-3 py-1.5 text-xs rounded border border-border text-muted-foreground hover:bg-muted transition-colors",children:[e.jsx(va,{"data-loc":"client/src/pages/Attendances.tsx:665",className:"w-3 h-3"}),"Limpar"]}),e.jsxs("button",{"data-loc":"client/src/pages/Attendances.tsx:668",onClick:V,disabled:I||R,className:"flex items-center gap-1.5 px-4 py-1.5 text-xs font-semibold rounded bg-primary hover:bg-primary/90 disabled:opacity-60 text-[#0A0A0B] transition-colors",children:[I||R?e.jsx(hi,{"data-loc":"client/src/pages/Attendances.tsx:673",className:"w-3 h-3 animate-spin"}):e.jsx(or,{"data-loc":"client/src/pages/Attendances.tsx:673",className:"w-3 h-3"}),"Pesquisar"]})]})]})]}),l===null&&e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:683",className:"flex flex-col items-center justify-center py-16 text-center",children:[e.jsx("div",{"data-loc":"client/src/pages/Attendances.tsx:684",className:"w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center mb-3",children:e.jsx(or,{"data-loc":"client/src/pages/Attendances.tsx:685",className:"w-5 h-5 text-primary"})}),e.jsxs("p",{"data-loc":"client/src/pages/Attendances.tsx:687",className:"text-sm text-muted-foreground",children:["Clique em ",e.jsx("strong",{"data-loc":"client/src/pages/Attendances.tsx:687",className:"text-foreground",children:"Pesquisar"})," para exibir os resultados"]})]}),l!==null&&I&&e.jsx("div",{"data-loc":"client/src/pages/Attendances.tsx:693",className:"flex items-center justify-center py-12",children:e.jsx(hi,{"data-loc":"client/src/pages/Attendances.tsx:694",className:"w-6 h-6 text-primary animate-spin"})}),l!==null&&!I&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:701",className:"flex items-center justify-between",children:[e.jsxs("p",{"data-loc":"client/src/pages/Attendances.tsx:702",className:"text-xs text-muted-foreground",children:[O===0?"Nenhum atendimento encontrado":`${O} atendimento${O!==1?"s":""} encontrado${O!==1?"s":""}`,R&&e.jsx(hi,{"data-loc":"client/src/pages/Attendances.tsx:704",className:"w-3 h-3 animate-spin inline ml-2 text-primary"})]}),O>0&&e.jsxs("p",{"data-loc":"client/src/pages/Attendances.tsx:707",className:"text-xs text-muted-foreground",children:["Exibindo ",x*g+1,"â",Math.min((x+1)*g,O)," de ",O]})]}),M.length===0?e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:714",className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsx(ms,{"data-loc":"client/src/pages/Attendances.tsx:715",className:"w-8 h-8 text-[#3A3A42] mb-2"}),e.jsx("p",{"data-loc":"client/src/pages/Attendances.tsx:716",className:"text-sm text-muted-foreground",children:"Nenhum atendimento encontrado com os filtros selecionados."})]}):e.jsx("div",{"data-loc":"client/src/pages/Attendances.tsx:719",className:"space-y-3",children:M.map(K=>e.jsx(YT,{"data-loc":"client/src/pages/Attendances.tsx:721",lead:K,onDiscard:D?v:()=>{},onTransfer:D?j:()=>{},onChangeCorretor:D?N:()=>{}},K.id))}),T>1&&e.jsxs("div",{"data-loc":"client/src/pages/Attendances.tsx:733",className:"flex items-center justify-center gap-2 py-4",children:[e.jsx("button",{"data-loc":"client/src/pages/Attendances.tsx:734",disabled:x===0,onClick:()=>p(K=>K-1),className:"px-3 py-1.5 text-xs rounded border border-border text-muted-foreground hover:bg-muted disabled:opacity-40 transition-colors",children:"â Anterior"}),e.jsxs("span",{"data-loc":"client/src/pages/Attendances.tsx:741",className:"text-xs text-muted-foreground",children:["Página ",x+1," de ",T]}),e.jsx("button",{"data-loc":"client/src/pages/Attendances.tsx:742",disabled:x>=T-1,onClick:()=>p(K=>K+1),className:"px-3 py-1.5 text-xs rounded border border-border text-muted-foreground hover:bg-muted disabled:opacity-40 transition-colors",children:"Próxima â"})]})]})]}),b!==null&&e.jsx(XT,{"data-loc":"client/src/pages/Attendances.tsx:757",leadI
646d:b,onClose:()=>v(null),onConfirm:K=>z.mutate({id:b,reason:K})}),y!==null&&e.jsx(Oj,{"data-loc":"client/src/pages/Attendances.tsx:764",leadId:y,title:"Transferência de atendimento",users:A,onClose:()=>j(null),onConfirm:(K,ve)=>U.mutate({id:y,newAssignedTo:K,reason:ve})}),S!==null&&e.jsx(Oj,{"data-loc":"client/src/pages/Attendances.tsx:773",leadId:S,title:"Alterar atendente do atendimento",users:A,onClose:()=>N(null),onConfirm:K=>B.mutate({id:S,newAssignedTo:K})})]})}const JT={site:"Site",facebook:"Facebook",instagram:"Instagram",indicacao:"Indicação",telefone:"Telefone",whatsapp:"WhatsApp",outro:"Outro"},zj={frio:"bg-blue-500",morno:"bg-yellow-500",quente:"bg-orange-500",urgente:"bg-red-500"},qf={ligacao:"Ligação",email:"Email",whatsapp:"WhatsApp",visita:"Visita",reuniao:"Reunião",tarefa:"Tarefa",outro:"Outro"};function $f({title:t,icon:s,children:r,defaultOpen:l=!0}){const[c,d]=f.useState(l);return e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:40",className:"border border-border rounded-lg bg-card overflow-hidden",children:[e.jsxs("button",{"data-loc":"client/src/pages/AttendanceDetail.tsx:41",onClick:()=>d(!c),className:"w-full flex items-center justify-between px-4 py-3 text-sm font-medium text-foreground hover:bg-muted/30 transition-colors",children:[e.jsxs("span",{"data-loc":"client/src/pages/AttendanceDetail.tsx:45",className:"flex items-center gap-2",children:[s,t]}),c?e.jsx(Qi,{"data-loc":"client/src/pages/AttendanceDetail.tsx:46",className:"h-4 w-4 text-muted-foreground"}):e.jsx(Xa,{"data-loc":"client/src/pages/AttendanceDetail.tsx:46",className:"h-4 w-4 text-muted-foreground"})]}),c&&e.jsx("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:48",className:"border-t border-border",children:r})]})}function Ft({label:t,value:s,highlight:r}){return e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:56",children:[e.jsx("p",{"data-loc":"client/src/pages/AttendanceDetail.tsx:57",className:"text-[11px] text-muted-foreground",children:t}),r&&s?e.jsx("span",{"data-loc":"client/src/pages/AttendanceDetail.tsx:59",className:"inline-block mt-0.5 px-2 py-0.5 rounded text-xs font-medium bg-primary/20 text-primary",children:s}):e.jsx("p",{"data-loc":"client/src/pages/AttendanceDetail.tsx:61",className:"text-sm text-foreground mt-0.5",children:s||"-"})]})}function e_(){const t=mc(),s=Number(t.id),[,r]=fs(),{user:l}=ka(),c=Y.useUtils(),{canEditPage:d}=Kx(),u=d("/atendimentos"),{data:x,isLoading:p}=Y.leads.getWithDetails.useQuery({id:s}),{data:g}=Y.leadInteractions.list.useQuery({leadId:s}),{data:b}=Y.whatsapp.getMessagesByLead.useQuery({leadId:s}),{data:v}=Y.leadActivities.list.useQuery({leadId:s}),{data:y}=Y.audit.list.useQuery({entity:"lead",entityId:s,limit:50}),{data:j}=Y.users.list.useQuery(),S=Y.leads.update.useMutation({onMutate:async X=>{await c.leads.getWithDetails.cancel({id:s});const vt=c.leads.getWithDetails.getData({id:s});return c.leads.getWithDetails.setData({id:s},et=>et&&{...et,...X}),{previousLead:vt}},onError:(X,vt,et)=>{et?.previousLead&&c.leads.getWithDetails.setData({id:s},et.previousLead),ce.error(X.message)},onSuccess:()=>{c.leads.getWithDetails.invalidate({id:s}),ce.success("Atendimento atualizado")}}),N=Y.leadInteractions.create.useMutation({onSuccess:()=>{c.leadInteractions.list.invalidate({leadId:s}),F(""),ce.success("Interação registrada")},onError:X=>ce.error(X.message)}),w=Y.leadActivities.create.useMutation({onSuccess:()=>{c.leadActivities.list.invalidate({leadId:s}),T(M()),ce.success("Atividade criada")},onError:X=>ce.error(X.message)}),D=Y.leadActivities.markDone.useMutation({onSuccess:()=>c.leadActivities.list.invalidate({leadId:s})}),k=Y.leadActivities.delete.useMutation({onSuccess:()=>c.leadActivities.list.invalidate({leadId:s})}),A=Y.atendimentos.discard.useMutation({onSuccess:()=>{c.leads.getWithDetails.invalidate({id:s}),H(!1),ce.success("Atendimento descartado")},onError:X=>ce.error(X.message)}),_=Y.atendimentos.transfer.useMutation({onSuccess:()=>{c.leads.getWithDetails.invalidate({id:s}),ke(!1),ce.success("Atendimento transferido")},onError:X=>ce.error(X.message)}),E=Y.atendimentos.changeCorretor.useMutation({onSuccess:()=>{c.leads.getWithDetails.invalidate({id:s}),Ve(!1),ce.success("Atendente alterado")},onError:X=>ce.error(X.message)}),[I,R]=f.useState("detalhes"),[z,U]=f.useState("passadas"),[B,F]=f.useState(""),[V,de]=f.useState("nota"),[le,xe]=f.useState(""),M=()=>({type:"ligacao",title:"Ligação",notes:"",startDate:new Date().toISOString().slice(0,16),endDate:new Date(Date.now()+36e5).toISOString().slice(0,16),allDay:!1,assignedTo:l?.id??0,notifySystem:!0,notifyEmail:!1,done:!1}),[O,T]=f.useState(M()),[K,ve]=f.useState(null),[P,J]=f.useState({}
646),[W,H]=f.useState(!1),[te,pe]=f.useState(""),[ae,Ne]=f.useState(""),{data:Se=[]}=Y.settings.discardReasons.list.useQuery(void 0,{enabled:W}),[Ce,ke]=f.useState(!1),[Z,fe]=f.useState(""),[Ee,Ie]=f.useState(""),[qe,Ve]=f.useState(!1),[Ht,ht]=f.useState(""),[Je,q]=f.useState(!1),[Le,Be]=f.useState(""),Pe=X=>{x&&(J({...x}),ve(X))},mt=()=>ve(null),dt=X=>{const{id:vt,assignedToName:et,createdAt:Ke,updatedAt:nt,...Gt}=P;S.mutate({id:s,...Gt}),ve(null)};if(p)return e.jsx("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:203",className:"space-y-4",children:Array.from({length:3}).map((X,vt)=>e.jsx("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:205",className:"h-24 bg-card border border-border rounded-lg animate-pulse"},vt))});if(!x)return e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:212",className:"text-center py-12",children:[e.jsx("p",{"data-loc":"client/src/pages/AttendanceDetail.tsx:213",className:"text-muted-foreground",children:"Atendimento não encontrado"}),e.jsx(oe,{"data-loc":"client/src/pages/AttendanceDetail.tsx:214",variant:"outline",onClick:()=>r("/atendimentos"),className:"mt-4",children:"Voltar"})]});const qt=[{key:"detalhes",label:"Detalhes"},{key:"visitas",label:"Visitas",count:0},{key:"propostas",label:"Propostas",count:0},{key:"negocios",label:"Negócios",count:0},{key:"auditoria",label:"Auditoria",count:y?.total??0}];return e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:228",className:"space-y-4 p-3 md:p-4 lg:p-6",children:[e.jsxs("button",{"data-loc":"client/src/pages/AttendanceDetail.tsx:230",onClick:()=>r("/atendimentos"),className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[e.jsx(Fl,{"data-loc":"client/src/pages/AttendanceDetail.tsx:231",className:"h-3.5 w-3.5"})," Atendimentos"]}),e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:235",children:[e.jsxs("h1",{"data-loc":"client/src/pages/AttendanceDetail.tsx:236",className:"text-base md:text-lg font-semibold text-foreground leading-snug",children:["Atendimento #",s," â ",x.name]}),e.jsxs("p",{"data-loc":"client/src/pages/AttendanceDetail.tsx:239",className:"text-xs text-muted-foreground mt-0.5",children:["Dashboard > Atendimento > ",s]})]}),e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:245",className:"flex flex-col sm:flex-row sm:items-center gap-2",children:[e.jsx("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:247",className:"flex gap-1",children:["frio","morno","quente","urgente"].map(X=>e.jsx("button",{"data-loc":"client/src/pages/AttendanceDetail.tsx:249",title:X,onClick:()=>{xe(X),S.mutate({id:s,termometro:X})},className:`w-7 h-7 rounded-full border-2 transition-all ${(x.termometro??le)===X?`${zj[X]} border-transparent`:"border-border bg-muted/30 hover:border-muted-foreground"}`},X))}),e.jsx("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:263",className:"flex items-center gap-0 border border-border rounded-lg overflow-hidden flex-1 overflow-x-auto",children:qt.map(X=>e.jsxs("button",{"data-loc":"client/src/pages/AttendanceDetail.tsx:265",onClick:()=>R(X.key),className:`flex items-center gap-1 px-3 py-2 text-xs font-medium whitespace-nowrap transition-colors border-r border-border last:border-r-0 ${I===X.key?"bg-primary/10 text-primary":"text-muted-foreground hover:text-foreground hover:bg-muted/30"}`,children:[X.icon,X.label,X.count!==void 0&&X.count>0&&e.jsx("span",{"data-loc":"client/src/pages/AttendanceDetail.tsx:277",className:"ml-0.5 bg-primary/20 text-primary text-[10px] px-1.5 py-0.5 rounded-full font-semibold",children:X.count})]},X.key))}),e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:284",className:"relative",children:[u&&e.jsxs(oe,{"data-loc":"client/src/pages/AttendanceDetail.tsx:286",size:"sm",variant:"outline",onClick:()=>q(!Je),className:"gap-1 text-xs",children:["Ações ",e.jsx(Xa,{"data-loc":"client/src/pages/AttendanceDetail.tsx:292",className:"h-3 w-3"})]}),Je&&e.jsx("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:296",className:"absolute right-0 top-full mt-1 z-50 bg-card border border-border rounded-lg shadow-xl py-1 min-w-[220px]",children:[{icon:e.jsx(Ki,{"data-loc":"client/src/pages/AttendanceDetail.tsx:298",className:"h-3.5 w-3.5"}),label:"Descartar atendimento",action:()=>{H(!0),q(!1)}},{icon:e.jsx(nC,{"data-loc":"client/src/pages/AttendanceDetail.tsx:299",className:"h-3.5 w-3.5"}),label:"Transferência de atendimento",action:()=>{ke(!0),q(!1)}},{icon:e.jsx(Ys,{"data-loc":"client/src/pages/AttendanceDetail.tsx:300",className:"h-3.5 w-3.5"}),label:"Alterar Lead",action:()=>{q(!1),ce.info("Em breve")}}
646,...x.qualificado?[]:[{icon:e.jsx(PM,{"data-loc":"client/src/pages/AttendanceDetail.tsx:301",className:"h-3.5 w-3.5"}),label:"Qualificar lead",action:()=>{S.mutate({id:s,qualificado:1}),q(!1),ce.success("Lead qualificado!")}}],{icon:e.jsx(Yo,{"data-loc":"client/src/pages/AttendanceDetail.tsx:306",className:"h-3.5 w-3.5"}),label:"Habilitar aviso via pop-up",action:()=>{S.mutate({id:s,avisoPopup:1}),q(!1),ce.success("Aviso habilitado")}},{icon:e.jsx(tx,{"data-loc":"client/src/pages/AttendanceDetail.tsx:307",className:"h-3.5 w-3.5"}),label:"Alterar atendente do atendimento",action:()=>{Ve(!0),q(!1)}}].map(X=>e.jsxs("button",{"data-loc":"client/src/pages/AttendanceDetail.tsx:309",onClick:X.action,className:"w-full flex items-center gap-2 px-4 py-2 text-sm text-foreground hover:bg-muted/40 transition-colors",children:[X.icon," ",X.label]},X.label))})]}),e.jsx(oe,{"data-loc":"client/src/pages/AttendanceDetail.tsx:320",size:"sm",variant:"outline",className:"text-xs px-2",children:"-"}),e.jsx(oe,{"data-loc":"client/src/pages/AttendanceDetail.tsx:321",size:"sm",variant:"outline",className:"text-xs px-2",children:"â¡"})]}),I==="detalhes"&&e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:326",className:"space-y-3",children:[e.jsx($f,{"data-loc":"client/src/pages/AttendanceDetail.tsx:328",title:"Dados principais",icon:e.jsx(Ys,{"data-loc":"client/src/pages/AttendanceDetail.tsx:328",className:"h-4 w-4"}),children:e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:329",className:"p-4 space-y-4 relative",children:[e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:331",children:[e.jsx("h4",{"data-loc":"client/src/pages/AttendanceDetail.tsx:332",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide mb-3",children:"Lead"}),e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:333",className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[e.jsx(Ft,{"data-loc":"client/src/pages/AttendanceDetail.tsx:334",label:"Nome do Lead",value:x.name,highlight:!0}),e.jsx(Ft,{"data-loc":"client/src/pages/AttendanceDetail.tsx:335",label:"E-mail",value:x.email}),e.jsx(Ft,{"data-loc":"client/src/pages/AttendanceDetail.tsx:336",label:"Sexo",value:"-"}),e.jsx(Ft,{"data-loc":"client/src/pages/AttendanceDetail.tsx:337",label:"Data nascimento",value:"-"}),e.jsx(Ft,{"data-loc":"client/src/pages/AttendanceDetail.tsx:338",label:"Cônjuge",value:"-"}),e.jsx(Ft,{"data-loc":"client/src/pages/AttendanceDetail.tsx:339",label:"Celular",value:x.phone}),e.jsx(Ft,{"data-loc":"client/src/pages/AttendanceDetail.tsx:340",label:"Profissão",value:"-"}),e.jsx(Ft,{"data-loc":"client/src/pages/AttendanceDetail.tsx:341",label:"Renda famÃlia",value:"-"}),e.jsx(Ft,{"data-loc":"client/src/pages/AttendanceDetail.tsx:342",label:"FGTS",value:"-"}),e.jsx(Ft,{"data-loc":"client/src/pages/AttendanceDetail.tsx:343",label:"Renda mensal",value:"-"}),e.jsx(Ft,{"data-loc":"client/src/pages/AttendanceDetail.tsx:344",label:"Endereço",value:"-"}),e.jsx(Ft,{"data-loc":"client/src/pages/AttendanceDetail.tsx:345",label:"Etiquetas",value:"-"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:348",className:"border-t border-border pt-3",children:[e.jsx("h4",{"data-loc":"client/src/pages/AttendanceDetail.tsx:349",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide mb-3",children:"Atendimento"}),e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:350",className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[e.jsx(Ft,{"data-loc":"client/src/pages/AttendanceDetail.tsx:351",label:"Código",value:String(s)}),e.jsx(Ft,{"data-loc":"client/src/pages/AttendanceDetail.tsx:352",label:"Data/hora entrada lead",value:x.dataEntradaLead?new Date(x.dataEntradaLead).toLocaleString("pt-BR"):x.createdAt?new Date(x.createdAt).toLocaleString("pt-BR"):"-"}),e.jsx(Ft,{"data-loc":"client/src/pages/AttendanceDetail.tsx:353",label:"Data/hora inclusão",value:x.createdAt?new Date(x.createdAt).toLocaleString("pt-BR"):"-"}),e.jsx(Ft,{"data-loc":"client/src/pages/AttendanceDetail.tsx:354",label:"Data/hora última alteração",value:x.updatedAt?new Date(x.updatedAt).toLocaleStr
646ing("pt-BR"):"-"}),e.jsx(Ft,{"data-loc":"client/src/pages/AttendanceDetail.tsx:355",label:"Data/hora repique",value:x.dataRepique?new Date(x.dataRepique).toLocaleString("pt-BR"):"-"}),e.jsx(Ft,{"data-loc":"client/src/pages/AttendanceDetail.tsx:356",label:"1ª resposta",value:x.dataPrimeiraResposta?new Date(x.dataPrimeiraResposta).toLocaleString("pt-BR"):"-"}),e.jsx(Ft,{"data-loc":"client/src/pages/AttendanceDetail.tsx:357",label:"Finalidade",value:"-"}),e.jsx(Ft,{"data-loc":"client/src/pages/AttendanceDetail.tsx:358",label:"Funil de origem",value:x.funil?x.funil==="inbound"?"Inbound (passivo)":x.funil==="outbound"?"Outbound (ativo)":"Indicação":"-"}),e.jsx(Ft,{"data-loc":"client/src/pages/AttendanceDetail.tsx:359",label:"MÃdia de origem",value:x.source?JT[x.source]:"-"}),e.jsx(Ft,{"data-loc":"client/src/pages/AttendanceDetail.tsx:360",label:"Campanha / UTM",value:`${x.campanha||"-"} / ${x.utm||"-"}`}),e.jsx(Ft,{"data-loc":"client/src/pages/AttendanceDetail.tsx:361",label:"Tipo atendimento",value:x.tipoAtendimento?x.tipoAtendimento==="online"?"On-line":x.tipoAtendimento==="presencial"?"Presencial":"Telefone":"-"}),e.jsx(Ft,{"data-loc":"client/src/pages/AttendanceDetail.tsx:362",label:"Unidade",value:"-"}),e.jsx(Ft,{"data-loc":"client/src/pages/AttendanceDetail.tsx:363",label:"Valor da entrada",value:"-"}),e.jsx(Ft,{"data-loc":"client/src/pages/AttendanceDetail.tsx:364",label:"Data previsão fechamento",value:x.dataPrevisaoFechamento?new Date(x.dataPrevisaoFechamento).toLocaleDateString("pt-BR"):"-"}),e.jsx(Ft,{"data-loc":"client/src/pages/AttendanceDetail.tsx:365",label:"Atendente",value:x.assignedToName||"-",highlight:!!x.assignedToName})]})]}),K!=="dados"?e.jsx("button",{"data-loc":"client/src/pages/AttendanceDetail.tsx:370",onClick:()=>Pe("dados"),className:"absolute bottom-3 right-3 p-1.5 rounded hover:bg-muted/40 text-muted-foreground hover:text-foreground transition-colors",children:e.jsx(dr,{"data-loc":"client/src/pages/AttendanceDetail.tsx:371",className:"h-4 w-4"})}):e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:374",className:"mt-3 flex gap-2 justify-end",children:[e.jsx(oe,{"data-loc":"client/src/pages/AttendanceDetail.tsx:375",size:"sm",variant:"outline",onClick:mt,children:"Cancelar"}),e.jsxs(oe,{"data-loc":"client/src/pages/AttendanceDetail.tsx:376",size:"sm",onClick:()=>dt(),disabled:S.isPending,className:"bg-primary text-primary-foreground",children:[e.jsx(Ya,{"data-loc":"client/src/pages/AttendanceDetail.tsx:377",className:"h-3 w-3 mr-1"})," Salvar"]})]})]})}),e.jsx($f,{"data-loc":"client/src/pages/AttendanceDetail.tsx:387",title:"Interações",icon:e.jsx(Rn,{"data-loc":"client/src/pages/AttendanceDetail.tsx:387",className:"h-4 w-4"}),children:e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:388",children:[e.jsx("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:390",className:"flex border-b border-border overflow-x-auto",children:[{key:"passadas",label:"Interações passadas",icon:e.jsx(Rn,{"data-loc":"client/src/pages/AttendanceDetail.tsx:392",className:"h-3 w-3"})},{key:"agendadas",label:"Atividades agendadas",icon:e.jsx(gM,{"data-loc":"client/src/pages/AttendanceDetail.tsx:393",className:"h-3 w-3"}),count:v?.filter(X=>!X.done).length??0},{key:"nova",label:"Nova atividade",icon:e.jsx(Jt,{"data-loc":"client/src/pages/AttendanceDetail.tsx:394",className:"h-3 w-3"})},{key:"outros",label:"Outros atendimentos",icon:e.jsx(Ys,{"data-loc":"client/src/pages/AttendanceDetail.tsx:395",className:"h-3 w-3"}),count:0}].map(X=>e.jsxs("button",{"data-loc":"client/src/pages/AttendanceDetail.tsx:397",onClick:()=>U(X.key),className:`flex items-center gap-1 px-3 py-2.5 text-xs font-medium border-r border-border last:border-r-0 transition-colors whitespace-nowrap shrink-0 ${z===X.key?"bg-muted/30 text-foreground border-b-2 border-b-primary":"text-muted-foreground hover:text-foreground hover:bg-muted/20"}`,children:[X.icon," ",X.label,X.count!==void 0&&X.count>0&&e.jsx("span",{"data-loc":"client/src/pages/AttendanceDetail.tsx:408",className:"ml-1 bg-primary/20 text-primary text-[10px] px-1.5 py-0.5 rounded-full",children:X.count})]},X.key))}),z==="passadas"&&e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:416",className:"p-4 space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:418",children:[e.jsx("p",{"data-loc":"client/src/pages/AttendanceDetail.tsx:419",className:"text-xs text-muted-foreground mb-1",children:"Nova interação"}),e.jsx("p",{"data-loc":"client/src/pages/AttendanceDetail.tsx:420",className:"text-xs text-primary mb-2",children:"â Para a inserção de link, clique no primeiro botão e preencha os campos."}),e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:421",className:"border border-border rounded bg-background",children:[e.jsx("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:422",className:"flex gap-1 p-2 border-b border-border",children:["ð","B","U","S","â","</>","?"].map(X=>e.jsx("button",{"data-loc":"client/src/pages/AttendanceDetail.tsx:424",className:"px-2 py-0.5 text-xs rounded hover:bg-muted/40 text-muted-foreground",children:X},X))}),e.jsx(rr,{"data-loc":"client/src/pages/AttendanceDetail.tsx:427",value:
646B,onChange:X=>F(X.target.value),placeholder:"Digite a interação...",className:"border-0 bg-transparent resize-none text-sm min-h-[80px]"})]}),e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:435",className:"flex items-center gap-2 mt-2",children:[e.jsx("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:436",className:"flex gap-1",children:["frio","morno","quente","urgente"].map(X=>e.jsx("button",{"data-loc":"client/src/pages/AttendanceDetail.tsx:438",onClick:()=>xe(X),className:`w-6 h-6 rounded-full border-2 transition-all ${le===X?`${zj[X]} border-transparent`:"border-border bg-muted/30"}`},X))}),e.jsx("span",{"data-loc":"client/src/pages/AttendanceDetail.tsx:447",className:"text-xs text-primary cursor-pointer",children:"â Clique para atualizar o termômetro"})]}),e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:449",className:"flex gap-2 mt-2",children:[e.jsxs(oe,{"data-loc":"client/src/pages/AttendanceDetail.tsx:450",size:"sm",className:"bg-primary text-primary-foreground text-xs h-7 gap-1",onClick:()=>{B.trim()&&(N.mutate({leadId:s,type:V,content:B}),le&&S.mutate({id:s,termometro:le}))},disabled:N.isPending,children:[e.jsx(Jt,{"data-loc":"client/src/pages/AttendanceDetail.tsx:455",className:"h-3 w-3"})," Nova interação"]}),e.jsx(oe,{"data-loc":"client/src/pages/AttendanceDetail.tsx:457",size:"sm",variant:"outline",className:"text-xs h-7",children:"ð Adicionar anexos"}),e.jsx(oe,{"data-loc":"client/src/pages/AttendanceDetail.tsx:458",size:"sm",variant:"outline",className:"text-xs h-7",children:"â» Atualizar interações"})]})]}),e.jsx("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:463",className:"space-y-2 mt-4",children:(()=>{const X=(g??[]).map(Ke=>({...Ke,_type:"interaction"})),vt=(b?.messages??[]).map(Ke=>({...Ke,_type:"whatsapp"})),et=[...X,...vt].sort((Ke,nt)=>new Date(Ke.createdAt).getTime()-new Date(nt.createdAt).getTime()).reverse();return et.length===0?e.jsx("p",{"data-loc":"client/src/pages/AttendanceDetail.tsx:472",className:"text-xs text-muted-foreground text-center py-4",children:"Nenhuma interação registrada"}):et.map(Ke=>{if(Ke._type==="whatsapp"){const nt=Ke.direction==="outbound",Gt=Ke.metaTimestamp||Ke.createdAt;return e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:479",className:"flex gap-3 py-2 border-b border-border last:border-b-0",children:[e.jsx("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:480",className:`w-7 h-7 rounded-full flex items-center justify-center flex-shrink-0 text-xs font-bold ${nt?"bg-[#25D366]/20 text-[#25D366]":"bg-blue-500/20 text-blue-400"}`,children:"WA"}),e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:485",className:"flex-1",children:[e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:486",className:"flex items-center gap-2",children:[e.jsx("span",{"data-loc":"client/src/pages/AttendanceDetail.tsx:487",className:"text-xs font-medium text-foreground",children:nt?Ke.senderName||"Atendente":Ke.contactName||"Cliente"}),e.jsx("span",{"data-loc":"client/src/pages/AttendanceDetail.tsx:490",className:`text-xs px-1.5 py-0.5 rounded-full ${nt?"bg-[#25D366]/10 text-[#25D366]":"bg-blue-500/10 text-blue-400"}`,children:nt?"enviou via WhatsApp":"respondeu via WhatsApp"})]}),e.jsxs("p",{"data-loc":"client/src/pages/AttendanceDetail.tsx:496",className:"text-xs text-muted-foreground mt-0.5",children:[new Date(Gt).toLocaleDateString("pt-BR")," ",new Date(Gt).toLocaleTimeString("pt-BR",{hour:"2-digit",minute:"2-digit"})]}),e.jsx("p",{"data-loc":"client/src/pages/AttendanceDetail.tsx:499",className:"text-sm text-foreground mt-1",children:Ke.body||Ke.mediaCaption||(Ke.templateName?`[Template: ${Ke.templateName}]`:"[MÃdia]")})]})]},`wa-${Ke.id}`)}return e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:508",className:"flex gap-3 py-2 border-b border-border last:border-b-0",children:[e.jsx("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:509",className:"w-7 h-7 rounded-full bg-muted flex items-center justify-center flex-shrink-0",children:e.jsx(Rn,{"data-loc":"client/src/pages/AttendanceDetail.tsx:510",className:"h-3.5 w-3.5 text-muted-foreground"})}),e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:512",className:"flex-1",children:[e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:513",className:"flex items-center gap-2",children:[e.jsx("span",{"data-loc":"client/src/pages/AttendanceDetail.tsx:514",className:"text-xs font-medium text-foreground",children:"Sistema"}),e.jsx("span",{"data-loc":"client/src/pages/AttendanceDetail.tsx:515",className:"text-xs text-muted-foreground",children:"criou interação:"})]}),e.jsxs("p",{"data-loc":"client/src/pages/AttendanceDetail.tsx:517",className:"text-xs text-muted-foreground mt-0.5",children:[new Date(Ke.createdAt).toLocaleDateString("pt-BR")," ",new Date(Ke.createdAt).toLocaleTimeString("pt-BR",{hour:"2-digit",minute:"2-digit"})]}),e.jsx("p",{"data-loc":"client/src/pages/AttendanceDetail.tsx:520",className:"text-sm text-foreground mt-1",children:Ke.content})]})]},`int-${Ke.id}`)})})()})]}),z==="agendadas"&&e.jsx("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:532",className:"p-4",children:(v??[]).filter(X=>!X.done).length===0?e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:534",className:"bg-muted/20 rounded p-3 text-sm text-foreground",children:["Nenhuma ",e.jsx("strong",{"data-loc":"client/src/pages/AttendanceDetail.tsx:535",children:"atividade agendada"}),"."]}):e.jsx("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:538",className:"space-y-2",children:(v??[]).filter(X=>!X.done).map(X=>e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:540",className:"flex items-start gap-3 p-3 border border-border rounded-lg",children:[e.jsx("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:541",className:`w-2 h-2 rounded-full mt-1.5 flex-shrink-0 ${X.type==="ligacao"?"bg-blue-400":X.type==="visita"?"bg-emerald-400":X.type==="reuniao"?"bg-purple-400":"bg-yellow-400"}`}),e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:546",className:"flex-1",children:[e.jsx("p",{"data-loc":"client/src/pages/AttendanceDetail.tsx:547",className:"text-sm font-medium text-foreground",children:X.title}),e.jsxs("p",{"data-loc":"client/src/pages/AttendanceDetail.tsx:548",className:"text-xs text-muted-foreground",children:[qf[X.type]," · ",new Date(X.startDate).toLocaleStr
646ing("pt-BR")]}),X.notes&&e.jsx("p",{"data-loc":"client/src/pages/AttendanceDetail.tsx:549",className:"text-xs text-muted-foreground mt-1",children:X.notes})]}),e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:551",className:"flex gap-1",children:[e.jsx(oe,{"data-loc":"client/src/pages/AttendanceDetail.tsx:552",size:"sm",variant:"outline",className:"h-6 text-xs",onClick:()=>D.mutate({id:X.id,done:!0}),children:e.jsx(Ya,{"data-loc":"client/src/pages/AttendanceDetail.tsx:553",className:"h-3 w-3"})}),e.jsx(oe,{"data-loc":"client/src/pages/AttendanceDetail.tsx:555",size:"sm",variant:"outline",className:"h-6 text-xs text-red-400 hover:text-red-300",onClick:()=>k.mutate({id:X.id}),children:e.jsx(Ba,{"data-loc":"client/src/pages/AttendanceDetail.tsx:556",className:"h-3 w-3"})})]})]},X.id))})}),z==="nova"&&e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:568",className:"p-4 space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:569",className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:570",children:[e.jsx(We,{"data-loc":"client/src/pages/AttendanceDetail.tsx:571",className:"text-xs text-muted-foreground",children:"Tipo da atividade"}),e.jsxs(Dt,{"data-loc":"client/src/pages/AttendanceDetail.tsx:572",value:O.type,onValueChange:X=>T({...O,type:X,title:qf[X]??X}),children:[e.jsx(Lt,{"data-loc":"client/src/pages/AttendanceDetail.tsx:573",className:"bg-background border-border mt-1 text-xs h-8",children:e.jsx(Mt,{"data-loc":"client/src/pages/AttendanceDetail.tsx:573"})}),e.jsx(kt,{"data-loc":"client/src/pages/AttendanceDetail.tsx:574",children:Object.entries(qf).map(([X,vt])=>e.jsx(He,{"data-loc":"client/src/pages/AttendanceDetail.tsx:575",value:X,children:vt},X))})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:579",children:[e.jsx(We,{"data-loc":"client/src/pages/AttendanceDetail.tsx:580",className:"text-xs text-muted-foreground",children:"TÃtulo da atividade"}),e.jsx(ge,{"data-loc":"client/src/pages/AttendanceDetail.tsx:581",value:O.title,onChange:X=>T({...O,title:X.target.value}),className:"bg-background border-border mt-1 h-8 text-xs"})]}),e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:583",children:[e.jsx(We,{"data-loc":"client/src/pages/AttendanceDetail.tsx:584",className:"text-xs text-muted-foreground",children:"Data/hora inÃcio"}),e.jsx(ge,{"data-loc":"client/src/pages/AttendanceDetail.tsx:585",type:"datetime-local",value:O.startDate,onChange:X=>T({...O,startDate:X.target.value}),className:"bg-background border-border mt-1 h-8 text-xs"})]}),e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:587",children:[e.jsx(We,{"data-loc":"client/src/pages/AttendanceDetail.tsx:588",className:"text-xs text-muted-foreground",children:"Hora/data fim"}),e.jsx(ge,{"data-loc":"client/src/pages/AttendanceDetail.tsx:589",type:"datetime-local",value:O.endDate,onChange:X=>T({...O,endDate:X.target.value}),className:"bg-background border-border mt-1 h-8 text-xs"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:592",className:"flex items-center gap-2",children:[e.jsx("input",{"data-loc":"client/src/pages/AttendanceDetail.tsx:593",type:"checkbox",id:"allDay",checked:O.allDay,onChange:X=>T({...O,allDay:X.target.checked}),className:"accent-primary"}),e.jsx("label",{"data-loc":"client/src/pages/AttendanceDetail.tsx:594",htmlFor:"allDay",className:"text-xs text-muted-foreground",children:"Dia inteiro"})]}),e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:596",children:[e.jsx(We,{"data-loc":"client/src/pages/AttendanceDetail.tsx:597",className:"text-xs text-muted-foreground",children:"Notas"}),e.jsx(rr,{"data-loc":"client/src/pages/AttendanceDetail.tsx:598",value:O.notes,onChange:X=>T({...O,notes:X.target.value}),className:"bg-yellow-500/5 border-yellow-500/20 mt-1 text-sm min-h-[80px]"})]}),e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:600",className:"border border-border rounded-lg p-3 space-y-2",children:[e.jsxs("p",{"data-loc":"client/src/pages/AttendanceDetail.tsx:601",className:"text-xs font-medium text-muted-foreground flex items-center gap-1",children:[e.jsx(Ys,{"data-loc":"client/src/pages/AttendanceDetail.tsx:601",className:"h-3.5 w-3.5"})," Relacionamentos"]}),e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:602",className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:603",children:[e.jsx(We,{"data-loc":"client/src/pages/AttendanceDetail.tsx:604",className:"text-xs text-muted-foreground",children:"AtribuÃdo a"}),e.jsxs(Dt,{"data-loc":"client/src/pages/AttendanceDetail.tsx:605",value:String(O.assignedTo),onValueChange:X=>T({...O,assignedTo:Number(X)}),children:[e.jsx(Lt,{"data-loc":"client/src/pages/AttendanceDetail.tsx:606",className:"bg-background border-border mt-1 text-xs h-8",children:e.jsx(Mt,{"data-loc":"client/src/pages/AttendanceDetail.tsx:606"})}),e.jsx(kt,{"data-loc":"client/src/pages/AttendanceDetail.tsx:607",children:(j??[]).map(X=>e.jsx(He,{"data-loc":"client/src/pages/AttendanceDetail.tsx:608",value:String(X.id),children:X.name},X.id))})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:612",children:[e.jsx(We,{"data-loc":"client/src/pages/AttendanceDetail.tsx:613",className:"text-xs text-muted-foreground",children:"Atendimento"}),e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:614",className:"flex gap-1 mt-1",children:[e.jsx(ge,{"data-loc":"client/src/pages/AttendanceDetail.tsx:615",value:`${s} - ${x.status==="novo"?"Em atendimento":x.status} - ${x.name}`,readOnly:!0,className:"bg-background border-border h-8 text-xs flex-1"}),e.jsx(oe,{"data-loc":"client/src/pages/AttendanceDetail.tsx:616",size:"sm",variant:"outline",className:"h-8 text-xs px-2",children:"ver"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:619",children:[e.jsx(We,{"data-loc":"client/src/pages/AttendanceDetail.tsx:620",className:"text-xs text-muted-foreground",children:"Cliente/Pessoa"}),e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:621",className:"flex gap-1 mt-1",children:[e.jsx(ge,{"data-loc":"client/src/pages/AttendanceDetail.tsx:622",value:x.name,readOnly:!0,className:"bg-background border-border h-8 text-xs flex-1"}),e.jsx(oe,{"data-loc":"client/src/pages/AttendanceDetail.tsx:623",size:"sm",variant:"outline",className:"h-8 text-xs px-2",children:"ver"})]})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:628",className:"flex items-center gap-4 flex-wrap",children:[e.jsxs("p",{"data-loc":"client/src/pages/AttendanceDetail.tsx:629",className:"text-xs font-medium text-muted-foreground flex items-center gap-1",children:[e.jsx(Yo,{"data-loc":"client/src/pages/AttendanceDetail.tsx:629",className:"h-3.5 w-3.5"})," Notificações"]}),e.jsxs("label",{"data-loc":"client/src/pages/AttendanceDetail.tsx:630",className:"flex items-center gap-1.5 text-xs text-muted-foreground cursor-pointer",children:[e.jsx("input",{"data-loc":"client/src/pages/AttendanceDetail.tsx:631",type:"checkbox",checked:O.notifySystem,onChange:X=>T({...O,notifySystem:X.target.checked}),className:"accent-primary"}),"Notificar no sistema"]}),e.jsxs("label",{"data-loc":"client/src/pages/AttendanceDetail.tsx:634",className:"flex items-center gap-1.5 text-xs text-muted-foreground cursor-pointer",children:[e.jsx("input",{"data-loc":"client/src/pages/AttendanceDetail.tsx:635",type:"checkbox",checked:O.notifyEmail,onChange:X=>T({...O,notifyEmail:X.target.checked}),className:"accent-primary"}),"Notificar por e-mail"]}),e.jsxs("label",{"data-loc":"client/src/pages/AttendanceDetail.tsx:638",className:"flex items-center gap-1.5 text-xs text-muted-foreground cursor-pointer",children:[e.jsx("input",{"data-loc":"client/src/pages/AttendanceDetail.tsx:639",type:"checkbox",className:"accent-primary"}),"Atividade realizada"]})]}),e.jsxs(oe,{"data-loc":"client/src/pages/AttendanceDetail.tsx:643",size:"sm",className:"bg-primary text-primary-foreground text-xs h-7 gap-1",onClick:()=>w.mutate({...O,leadId:s,type:O.type}),disabled:w.isPending,children:[e.jsx(Jt,{"data-loc":"client/src/pages/AttendanceDetail.tsx:649",className:"h-3 w-3"})," Nova atividade"]}
646)]}),z==="outros"&&e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:656",className:"p-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:657",className:"flex items-center justify-between mb-3",children:[e.jsxs("p",{"data-loc":"client/src/pages/AttendanceDetail.tsx:658",className:"text-xs font-medium text-foreground flex items-center gap-1",children:[e.jsx(Ys,{"data-loc":"client/src/pages/AttendanceDetail.tsx:658",className:"h-3.5 w-3.5"})," Atendimentos"]}),e.jsx("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:659",className:"flex items-center gap-2",children:e.jsx(ge,{"data-loc":"client/src/pages/AttendanceDetail.tsx:660",placeholder:"Pesquisar",className:"h-7 text-xs w-40 bg-background border-border"})})]}),e.jsxs("table",{"data-loc":"client/src/pages/AttendanceDetail.tsx:663",className:"w-full text-xs",children:[e.jsx("thead",{"data-loc":"client/src/pages/AttendanceDetail.tsx:664",children:e.jsx("tr",{"data-loc":"client/src/pages/AttendanceDetail.tsx:665",className:"border-b border-border",children:["Código","Termômetro","Atualização","Perfil","Fase atendimento","Atendente","MÃdia de origem","Situação","Ações"].map(X=>e.jsx("th",{"data-loc":"client/src/pages/AttendanceDetail.tsx:667",className:"text-left py-2 px-2 text-muted-foreground font-medium",children:X},X))})}),e.jsx("tbody",{"data-loc":"client/src/pages/AttendanceDetail.tsx:671",children:e.jsx("tr",{"data-loc":"client/src/pages/AttendanceDetail.tsx:672",children:e.jsx("td",{"data-loc":"client/src/pages/AttendanceDetail.tsx:673",colSpan:9,className:"text-center py-6 text-muted-foreground",children:"Nenhum registro encontrado"})})})]})]})]})}),e.jsx($f,{"data-loc":"client/src/pages/AttendanceDetail.tsx:683",title:"Envelopes digitais (0)",icon:e.jsx(Hl,{"data-loc":"client/src/pages/AttendanceDetail.tsx:683",className:"h-4 w-4"}),defaultOpen:!1,children:e.jsx("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:684",className:"p-4",children:e.jsxs("table",{"data-loc":"client/src/pages/AttendanceDetail.tsx:685",className:"w-full text-xs",children:[e.jsx("thead",{"data-loc":"client/src/pages/AttendanceDetail.tsx:686",children:e.jsx("tr",{"data-loc":"client/src/pages/AttendanceDetail.tsx:687",className:"border-b border-border",children:["Código","Situação","Nome","Destinatários"].map(X=>e.jsx("th",{"data-loc":"client/src/pages/AttendanceDetail.tsx:689",className:"text-left py-2 px-2 text-muted-foreground font-medium",children:X},X))})}),e.jsx("tbody",{"data-loc":"client/src/pages/AttendanceDetail.tsx:693",children:e.jsx("tr",{"data-loc":"client/src/pages/AttendanceDetail.tsx:694",children:e.jsx("td",{"data-loc":"client/src/pages/AttendanceDetail.tsx:695",colSpan:4,className:"text-center py-6 text-muted-foreground",children:"Nenhum registro encontrado"})})})]})})})]}),I==="auditoria"&&e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:709",className:"border border-border rounded-lg bg-card overflow-hidden",children:[e.jsx("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:710",className:"px-4 py-3 border-b border-border",children:e.jsx("span",{"data-loc":"client/src/pages/AttendanceDetail.tsx:711",className:"text-sm font-medium text-foreground",children:"Auditoria"})}),e.jsx("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:713",className:"divide-y divide-border",children:(y?.data??[]).length===0?e.jsx("p",{"data-loc":"client/src/pages/AttendanceDetail.tsx:715",className:"text-center py-6 text-sm text-muted-foreground",children:"Nenhum registro de auditoria"}):(y?.data??[]).map(X=>e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:718",className:"px-4 py-3 flex items-start gap-3",children:[e.jsx("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:719",className:"w-7 h-7 rounded-full bg-muted flex items-center justify-center flex-shrink-0",children:e.jsx(yM,{"data-loc":"client/src/pages/AttendanceDetail.tsx:720",className:"h-3.5 w-3.5 text-muted-foreground"})}),e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:722",children:[e.jsx("p",{"data-loc":"client/src/pages/AttendanceDetail.tsx:723",className:"text-xs font-medium text-foreground",children:X.userName}),e.jsx("p",{"data-loc":"client/src/pages/AttendanceDetail.tsx:724",className:"text-xs text-muted-foreground",children:X.action}),e.jsx("p",{"data-loc":"client/src/pages/AttendanceDetail.tsx:725",className:"text-[11px] text-muted-foreground
646/60 mt-0.5",children:new Date(X.createdAt).toLocaleString("pt-BR")})]})]},X.id))})]}),(I==="visitas"||I==="propostas"||I==="negocios")&&e.jsx("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:736",className:"border border-border rounded-lg bg-card p-8 text-center",children:e.jsxs("p",{"data-loc":"client/src/pages/AttendanceDetail.tsx:737",className:"text-sm text-muted-foreground",children:[I==="visitas"?"Módulo de Visitas":I==="propostas"?"Módulo de Propostas":"Módulo de Negócios"," em desenvolvimento."]})}),e.jsx(Rs,{"data-loc":"client/src/pages/AttendanceDetail.tsx:745",open:W,onOpenChange:X=>{H(X),X||(Ne(""),pe(""))},children:e.jsxs(Ts,{"data-loc":"client/src/pages/AttendanceDetail.tsx:746",className:"bg-card border-border",children:[e.jsx(_s,{"data-loc":"client/src/pages/AttendanceDetail.tsx:747",children:e.jsx(Ps,{"data-loc":"client/src/pages/AttendanceDetail.tsx:747",children:"Descartar atendimento"})}),e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:748",className:"space-y-3",children:[e.jsxs("p",{"data-loc":"client/src/pages/AttendanceDetail.tsx:749",className:"text-sm text-muted-foreground",children:["Selecione o motivo do descarte do atendimento #",s," de ",e.jsx("strong",{"data-loc":"client/src/pages/AttendanceDetail.tsx:749",children:x.name}),"."]}),e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:750",children:[e.jsx(We,{"data-loc":"client/src/pages/AttendanceDetail.tsx:751",className:"text-xs text-muted-foreground",children:"Motivo de descarte *"}),e.jsxs(Dt,{"data-loc":"client/src/pages/AttendanceDetail.tsx:752",value:ae,onValueChange:Ne,children:[e.jsx(Lt,{"data-loc":"client/src/pages/AttendanceDetail.tsx:753",className:"bg-background border-border mt-1",children:e.jsx(Mt,{"data-loc":"client/src/pages/AttendanceDetail.tsx:754",placeholder:"Selecione um motivo..."})}),e.jsx(kt,{"data-loc":"client/src/pages/AttendanceDetail.tsx:756",className:"bg-card border-border",children:Se.filter(X=>X.ativo&&(X.opcaoAtendimento==="Ambos"||X.opcaoAtendimento==="Atendimento")).map(X=>e.jsx(He,{"data-loc":"client/src/pages/AttendanceDetail.tsx:758",value:String(X.id),children:X.nome},X.id))})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:763",children:[e.jsx(We,{"data-loc":"client/src/pages/AttendanceDetail.tsx:764",className:"text-xs text-muted-foreground",children:"Observação adicional (opcional)"}),e.jsx(rr,{"data-loc":"client/src/pages/AttendanceDetail.tsx:765",value:te,onChange:X=>pe(X.target.value),className:"bg-background border-border mt-1",rows:2,placeholder:"Detalhes adicionais..."})]})]}),e.jsxs(Os,{"data-loc":"client/src/pages/AttendanceDetail.tsx:768",children:[e.jsx(oe,{"data-loc":"client/src/pages/AttendanceDetail.tsx:769",variant:"outline",onClick:()=>H(!1),children:"Cancelar"}),e.jsx(oe,{"data-loc":"client/src/pages/AttendanceDetail.tsx:770",variant:"destructive",onClick:()=>A.mutate({id:s,reason:te||void 0,discardReasonId:ae?parseInt(ae):void 0}),disabled:A.isPending||!ae,children:"Descartar"})]})]})}),e.jsx(Rs,{"data-loc":"client/src/pages/AttendanceDetail.tsx:778",open:Ce,onOpenChange:ke,children:e.jsxs(Ts,{"data-loc":"client/src/pages/AttendanceDetail.tsx:779",className:"bg-card border-border",children:[e.jsx(_s,{"data-loc":"client/src/pages/AttendanceDetail.tsx:780",children:e.jsx(Ps,{"data-loc":"client/src/pages/AttendanceDetail.tsx:780",children:"Transferência de atendimento"})}),e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:781",className:"space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:782",children:[e.jsx(We,{"data-loc":"client/src/pages/AttendanceDetail.tsx:783",className:"text-xs text-muted-foreground",children:"Transferir para"}),e.jsxs(Dt,{"data-loc":"client/src/pages/AttendanceDetail.tsx:784",value:Z,onValueChange:fe,children:[e.jsx(Lt,{"data-loc":"client/src/pages/AttendanceDetail.tsx:785",className:"bg-background border-border mt-1",children:e.jsx(Mt,{"data-loc":"client/src/pages/AttendanceDetail.tsx:785",placeholder:"Selecionar atendente..."})}),e.jsx(kt,{"data-loc":"client/src/pages/AttendanceDetail.tsx:786",children:(j??[]).filter(X=>X.id!==x.assignedTo).map(X=>e.jsx(He,{"data-loc":"client/src/pages/AttendanceDetail.tsx:788",value:String(X.id),children:X.name},X.id))})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:793",children:[e.jsx(We,{"data-loc":"client/src/pages/AttendanceDetail.tsx:794",className:"text-xs text-muted-foreground",children:"Motivo (opcional)"}),e.jsx(rr,{"data-loc":"client/src/pages/AttendanceDetail.tsx:795",value:Ee,onChange:X=>Ie(X.target.value),className:"bg-background border-border mt-1",rows:2})]})]}),e.jsxs(Os,{"data-loc":"client/src/pages/AttendanceDetail.tsx:798",children:[e.jsx(oe,{"data-loc":"client/src/pages/AttendanceDetail.tsx:799",variant:"outline",onClick:()=>ke(!1),children:"Cancelar"}),e.jsx(oe,{"data-loc":"client/src/pages/AttendanceDetail.tsx:800",className:"bg-primary text-primary-foreground",onClick:()=>
646{if(!Z){ce.error("Selecione um atendente");return}_.mutate({id:s,newAssignedTo:Number(Z),reason:Ee||void 0})},disabled:_.isPending,children:"Transferir"})]})]})}),e.jsx(Rs,{"data-loc":"client/src/pages/AttendanceDetail.tsx:811",open:qe,onOpenChange:Ve,children:e.jsxs(Ts,{"data-loc":"client/src/pages/AttendanceDetail.tsx:812",className:"bg-card border-border",children:[e.jsx(_s,{"data-loc":"client/src/pages/AttendanceDetail.tsx:813",children:e.jsx(Ps,{"data-loc":"client/src/pages/AttendanceDetail.tsx:813",children:"Alterar atendente do atendimento"})}),e.jsxs("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:814",children:[e.jsx(We,{"data-loc":"client/src/pages/AttendanceDetail.tsx:815",className:"text-xs text-muted-foreground",children:"Novo corretor"}),e.jsxs(Dt,{"data-loc":"client/src/pages/AttendanceDetail.tsx:816",value:Ht,onValueChange:ht,children:[e.jsx(Lt,{"data-loc":"client/src/pages/AttendanceDetail.tsx:817",className:"bg-background border-border mt-1",children:e.jsx(Mt,{"data-loc":"client/src/pages/AttendanceDetail.tsx:817",placeholder:"Selecionar atendente..."})}),e.jsx(kt,{"data-loc":"client/src/pages/AttendanceDetail.tsx:818",children:(j??[]).map(X=>e.jsx(He,{"data-loc":"client/src/pages/AttendanceDetail.tsx:820",value:String(X.id),children:X.name},X.id))})]})]}),e.jsxs(Os,{"data-loc":"client/src/pages/AttendanceDetail.tsx:825",children:[e.jsx(oe,{"data-loc":"client/src/pages/AttendanceDetail.tsx:826",variant:"outline",onClick:()=>Ve(!1),children:"Cancelar"}),e.jsx(oe,{"data-loc":"client/src/pages/AttendanceDetail.tsx:827",className:"bg-primary text-primary-foreground",onClick:()=>{if(!Ht){ce.error("Selecione um atendente");return}E.mutate({id:s,newAssignedTo:Number(Ht)})},disabled:E.isPending,children:"Alterar"})]})]})}),Je&&e.jsx("div",{"data-loc":"client/src/pages/AttendanceDetail.tsx:838",className:"fixed inset-0 z-40",onClick:()=>q(!1)})]})}const Uj={lead:"Lead",client:"Cliente",property:"Imóvel",user:"Usuário"},t_={"lead.create":"Lead criado","lead.update":"Lead atualizado","lead.status_change":"Status alterado","lead.delete":"Lead removido","lead.interaction":"Interação registrada","lead.webhook":"Lead via webhook","client.create":"Cliente criado","client.update":"Cliente atualizado","client.delete":"Cliente removido","client.interaction":"Interação registrada","property.create":"Imóvel criado","property.update":"Imóvel atualizado","property.delete":"Imóvel removido","property.photo_upload":"Foto enviada","user.update_profile":"Perfil atualizado","user.role_change":"Role alterada"},Wf=30;function a_(){const[t,s]=f.useState("all"),[r,l]=f.useState(0),c=f.useMemo(()=>({entity:t!=="all"?t:void 0,limit:Wf,offset:r*Wf}),[t,r]),{data:d,isLoading:u}=Y.audit.list.useQuery(c),x=Math.ceil((d?.total??0)/Wf);return e.jsxs("div",{"data-loc":"client/src/pages/AuditLog.tsx:35",className:"space-y-4 p-3 md:p-4 lg:p-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/AuditLog.tsx:36",className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/AuditLog.tsx:37",children:[e.jsxs("h1",{"data-loc":"client/src/pages/AuditLog.tsx:38",className:"text-xl font-semibold text-foreground flex items-center gap-2",children:[e.jsx(Vo,{"data-loc":"client/src/pages/AuditLog.tsx:39",className:"h-5 w-5 text-primary"})," Audit Log"]}),e.jsx("p",{"data-loc":"client/src/pages/AuditLog.tsx:41",className:"text-sm text-muted-foreground",children:"Rastreamento de todas as ações do sistema"})]}),e.jsxs(Dt,{"data-loc":"client/src/pages/AuditLog.tsx:43",value:t,onValueChange:p=>{s(p),l(0)},children:[e.jsx(Lt,{"data-loc":"client/src/pages/AuditLog.tsx:44",className:"w-[140px] bg-card border-border",children:e.jsx(Mt,{"data-loc":"client/src/pages/AuditLog.tsx:44",placeholder:"Entidade"})}),e.jsxs(kt,{"data-loc":"client/src/pages/AuditLog.tsx:45",children:[e.jsx(He,{"data-loc":"client/src/pages/AuditLog.tsx:46",value:"all",children:"Todas"}),Object.entries(Uj).map(([p,g])=>e.jsx(He,{"data-loc":"client/src/pages/AuditLog.tsx:47",value:p,children:g},p))]})]})]}),e.jsx(Wt,{"data-loc":"client/src/pages/AuditLog.tsx:52",className:"bg-card border-border overflow-hidden",children:e.jsx("div",{"data-loc":"client/src/pages/AuditLog.tsx:53",className:"overflow-x-auto",children:e.jsxs("table",{"data-loc":"client/src/pages/AuditLog.tsx:54",className:"w-full text-sm",children:[e.jsx("thead",{"data-loc":"client/src/pages/AuditLog.tsx:55",children:e.jsxs("tr",{"data-loc":"client/src/pages/AuditLog.tsx:56",className:"border-b border-border",children:[e.jsx("th",{"data-loc":"client/src/pages/AuditLog.tsx:57",className:"text-left py-2.5 px-3 text-xs font-medium text-muted-foreground",children:"Data/Hora"}),e.jsx("th",{"data-loc":"client/src/pages/AuditLog.tsx:58",className:"text-left py-2.5 px-3 text-xs font-medium text-muted-foreground",children:"Usuário"}),e.jsx("th",{"data-loc":"client/src/pages/AuditLog.tsx:59",className:"text-left py-2.5 px-3 text-xs font-medium text-muted-foreground",children:"Ação"}),e.jsx("th",{"data-loc":"client/src/pages/AuditLog.tsx:60",className:"text-left py-2.5 px-3 text-xs font-medium text-muted-foreground hidden sm:table-cell",children:"Entidade"}),e.jsx("th",{"data-loc":"client/src/pages/AuditLog.tsx:61",className:"text-left py-2.5 px-3 text-xs font-medium text-muted-foreground hidden md:table-cell",children:"Detalhes"})]})}),e.jsx("tbody",{"data-loc":"client/src/pages/AuditLog.tsx:64",children:u?Array.from({length:10}).map((p,g)=>e.jsx("tr",{"data-loc":"client/src/pages/AuditLog.tsx:67",className:"border-b border-border/50",children:e.jsx("td",{"data-loc":"client/src/pages/AuditLog.tsx:67",colSpan:5,className:"py-3 px-3",children:e.jsx("div",{"data-loc":"client/src/pages/AuditLog.tsx:67",className:"h-5 bg-muted animate-pulse rounded"})})},g)):d?.data&&d.data.length>0?d.data.map(p=>e.jsxs("tr",{"data-loc":"client/src/pages/AuditLog.tsx:71",className:"border-b border-border/50 hover:bg-muted/20",children:[e.jsx("td",{"data-loc":"client/src/pages/AuditLog.tsx:72",className:"py-2.5 px-3",children:e.jsx("span",{"data-loc":"client/src/pages/AuditLog.tsx:73",className:"text-xs text-muted-foreground",children:new Date(p.createdAt).toLocaleDateString("pt-BR",{day:"2-digit",month:"short",hour:"2-digit",minute:"2-digit",second:"2-digit"})})}),e.jsx("td",{"data-loc":"client/src/pages/AuditLog.tsx:77",className:"py-2.5 px-3",children:e.jsx("span",{"data-loc":"client/src/pages/AuditLog.tsx:78",className:"text-xs font-medium text-foreground",children:p.userName||"Sistema"})}),e.jsx("td",{"data-loc":"client/src/pages/AuditLog.tsx:80",className:"py-2.5 px-3",children:e.jsx("span",{"data-loc":"client/src/pages/AuditLog.tsx:81",className:"text-xs text-foreground",children:t_[p.action]||p.action})}),e.jsx("td",{"data-loc":"client/src/pages/AuditLog.tsx:83",className:"py-2.5 px-3 hidden sm:table-cell",children:e.jsxs("div",{"data-loc":"client/src/pages/AuditLog.tsx:84",className:"flex items-center gap-1",children:[e.jsx("span",{"data-loc":"client/src/pages/AuditLog.tsx:85",className:"text-[10px] px-1.5 py-0.5 rounded bg-muted text-muted-foreground",children:Uj[p.entity]||p.entity}
646),p.entityId&&e.jsxs("span",{"data-loc":"client/src/pages/AuditLog.tsx:88",className:"text-[10px] text-muted-foreground",children:["#",p.entityId]})]})}),e.jsx("td",{"data-loc":"client/src/pages/AuditLog.tsx:91",className:"py-2.5 px-3 hidden md:table-cell",children:p.details?e.jsx("span",{"data-loc":"client/src/pages/AuditLog.tsx:93",className:"text-[10px] text-muted-foreground font-mono truncate block max-w-[200px]",children:typeof p.details=="string"?p.details:JSON.stringify(p.details)}):e.jsx("span",{"data-loc":"client/src/pages/AuditLog.tsx:97",className:"text-[10px] text-muted-foreground/50",children:"â"})})]},p.id)):e.jsx("tr",{"data-loc":"client/src/pages/AuditLog.tsx:103",children:e.jsx("td",{"data-loc":"client/src/pages/AuditLog.tsx:103",colSpan:5,className:"py-12 text-center text-sm text-muted-foreground",children:"Nenhum registro encontrado"})})})]})})}),x>1&&e.jsxs("div",{"data-loc":"client/src/pages/AuditLog.tsx:111",className:"flex items-center justify-between",children:[e.jsxs("span",{"data-loc":"client/src/pages/AuditLog.tsx:112",className:"text-xs text-muted-foreground",children:["Página ",r+1," de ",x]}),e.jsxs("div",{"data-loc":"client/src/pages/AuditLog.tsx:113",className:"flex gap-1",children:[e.jsx(oe,{"data-loc":"client/src/pages/AuditLog.tsx:114",variant:"outline",size:"sm",disabled:r===0,onClick:()=>l(r-1),className:"h-8",children:e.jsx(nc,{"data-loc":"client/src/pages/AuditLog.tsx:114",className:"h-4 w-4"})}),e.jsx(oe,{"data-loc":"client/src/pages/AuditLog.tsx:115",variant:"outline",size:"sm",disabled:r>=x-1,onClick:()=>l(r+1),className:"h-8",children:e.jsx(Ia,{"data-loc":"client/src/pages/AuditLog.tsx:115",className:"h-4 w-4"})})]})]})]})}const s_={admin:"Administrador",gerente:"Gerente",corretor:"Atendente"};function n_(){const{user:t}=ka(),s=Y.useUtils(),{data:r}=Y.users.getById.useQuery({id:t?.id??0},{enabled:!!t?.id}),l=Y.users.updateProfile.useMutation({onSuccess:()=>{s.users.getById.invalidate({id:t?.id??0}),ce.success("Perfil atualizado com sucesso"),d(!1)},onError:b=>ce.error(b.message)}),[c,d]=f.useState(!1),[u,x]=f.useState({phone:"",creci:"",specialties:"",regions:""}),p=()=>{x({phone:r?.phone||"",creci:r?.creci||"",specialties:r?.specialties||"",regions:r?.regions||""}),d(!0)},g=()=>{l.mutate({phone:u.phone||void 0,creci:u.creci||void 0,specialties:u.specialties||void 0,regions:u.regions||void 0})};return e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:55",className:"space-y-4 max-w-2xl p-3 md:p-4 lg:p-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:56",className:"flex items-center justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:57",children:[e.jsx("h1",{"data-loc":"client/src/pages/Profile.tsx:58",className:"text-xl font-semibold text-foreground",children:"Meu Perfil"}),e.jsx("p",{"data-loc":"client/src/pages/Profile.tsx:59",className:"text-sm text-muted-foreground",children:"Gerencie suas informações pessoais"})]}),c?e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:64",className:"flex gap-2",children:[e.jsx(oe,{"data-loc":"client/src/pages/Profile.tsx:65",size:"sm",variant:"outline",onClick:()=>d(!1),children:"Cancelar"}),e.jsxs(oe,{"data-loc":"client/src/pages/Profile.tsx:66",size:"sm",onClick:g,disabled:l.isPending,className:"bg-primary text-primary-foreground",children:[e.jsx(ex,{"data-loc":"client/src/pages/Profile.tsx:67",className:"h-3 w-3 mr-1"})," Salvar"]})]}):e.jsx(oe,{"data-loc":"client/src/pages/Profile.tsx:62",size:"sm",variant:"outline",onClick:p,children:"Editar"})]}),e.jsx(Wt,{"data-loc":"client/src/pages/Profile.tsx:74",className:"bg-card border-border",children:e.jsxs(ta,{"data-loc":"client/src/pages/Profile.tsx:75",className:"p-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:76",className:"flex items-center gap-4 mb-6",children:[e.jsx("div",{"data-loc":"client/src/pages/Profile.tsx:77",className:"h-16 w-16 rounded-full bg-primary/10 flex items-center justify-center",children:e.jsx("span",{"data-loc":"client/src/pages/Profile.tsx:78",className:"text-xl font-bold text-primary",children:t?.name?.charAt(0).toUpperCase()||"U"})}),e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:80",children:[e.jsx("h2",{"data-loc":"client/src/pages/Profile.tsx:81",className:"text-lg font-semibold text-foreground",children:t?.name||"Usuário"}),e.jsx("div",{"data-loc":"client/src/pages/Profile.tsx:82",className:"flex items-center gap-2 mt-1",children:e.jsx("span",{"data-loc":"client/src/pages/Profile.tsx:83",className:`text-[10px] font-medium px-2 py-0.5 rounded-full ${t?.role==="admin"?"bg-red-500/20 text-red-400":t?.role==="gerente"?"bg-primary/20 text-primary":"bg-blue-500/20 text-blue-400"}`,children:s_[t?.role||"corretor"]})})]})]}),c?e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:95",className:"space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:96",className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:97",children:[e.jsx(We,{"data-loc":"client/src/pages/Profile.tsx:98",className:"text-xs text-muted-foreground",children:"Telefone"}),e.jsx(ge,{"data-loc":"client/src/pages/Profile.tsx:99",value:u.phone,onChange:b=>x({...u,phone:b.target.value}),placeholder:"(47) 99999-9999",className:"bg-background border-border mt-1"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:101",children:[e.jsx(We,{"data-loc":"client/src/pages/Profile.tsx:102",className:"text-xs text-muted-foreground",children:"CRECI"}),e.jsx(ge,{"data-loc":"client/src/pages/Profile.tsx:103",value:u.creci,onChange:b=>x({...u,creci:b.target.value}),placeholder:"CRECI/SC 00000",className:"bg-background border-border mt-1"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:106",children:[e.jsx(We,{"data-loc":"client/src/pages/Profile.tsx:107",className:"text-xs text-muted-foreground",children:"Especialidades"}),e.jsx(rr,{"data-loc":"client/src/pages/Profile.tsx:108",value:u.specialties,onChange:b=>x({...u,specialties:b.target.value}),placeholder:"Alto padrão, Lançamentos, Comercial...",className:"bg-background border-border mt-1",rows:2})]}),e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:110",children:[e.jsx(We,{"data-loc":"client/src/pages/Profile.tsx:111",className:"text-xs text-muted-foreground",children:"Regiões de Atuação"}),e.jsx(rr,{"data-loc":"client/src/pages/Profile.tsx:112",value:u.regions,onChange:b=>
646x({...u,regions:b.target.value}),placeholder:"Barra Sul, Centro, Praia Brava...",className:"bg-background border-border mt-1",rows:2})]})]}):e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:116",className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:117",children:[e.jsxs("p",{"data-loc":"client/src/pages/Profile.tsx:118",className:"text-xs text-muted-foreground flex items-center gap-1",children:[e.jsx(mr,{"data-loc":"client/src/pages/Profile.tsx:118",className:"h-3 w-3"})," Email"]}),e.jsx("p",{"data-loc":"client/src/pages/Profile.tsx:119",className:"text-sm text-foreground mt-1",children:t?.email||"Não informado"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:121",children:[e.jsxs("p",{"data-loc":"client/src/pages/Profile.tsx:122",className:"text-xs text-muted-foreground flex items-center gap-1",children:[e.jsx(hn,{"data-loc":"client/src/pages/Profile.tsx:122",className:"h-3 w-3"})," Telefone"]}),e.jsx("p",{"data-loc":"client/src/pages/Profile.tsx:123",className:"text-sm text-foreground mt-1",children:r?.phone||"Não informado"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:125",children:[e.jsxs("p",{"data-loc":"client/src/pages/Profile.tsx:126",className:"text-xs text-muted-foreground flex items-center gap-1",children:[e.jsx(Vo,{"data-loc":"client/src/pages/Profile.tsx:126",className:"h-3 w-3"})," CRECI"]}),e.jsx("p",{"data-loc":"client/src/pages/Profile.tsx:127",className:"text-sm text-foreground mt-1",children:r?.creci||"Não informado"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:129",children:[e.jsxs("p",{"data-loc":"client/src/pages/Profile.tsx:130",className:"text-xs text-muted-foreground flex items-center gap-1",children:[e.jsx(Za,{"data-loc":"client/src/pages/Profile.tsx:130",className:"h-3 w-3"})," Membro desde"]}),e.jsx("p",{"data-loc":"client/src/pages/Profile.tsx:131",className:"text-sm text-foreground mt-1",children:t?.createdAt?new Date(t.createdAt).toLocaleDateString("pt-BR",{day:"2-digit",month:"long",year:"numeric"}):"â"})]}),r?.specialties&&e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:134",className:"col-span-full",children:[e.jsx("p",{"data-loc":"client/src/pages/Profile.tsx:135",className:"text-xs text-muted-foreground",children:"Especialidades"}),e.jsx("div",{"data-loc":"client/src/pages/Profile.tsx:136",className:"flex flex-wrap gap-1.5 mt-1",children:r.specialties.split(",").map((b,v)=>e.jsx("span",{"data-loc":"client/src/pages/Profile.tsx:138",className:"text-[10px] px-2 py-0.5 rounded-full bg-primary/10 text-primary",children:b.trim()},v))})]}),r?.regions&&e.jsxs("div",{"data-loc":"client/src/pages/Profile.tsx:144",className:"col-span-full",children:[e.jsx("p",{"data-loc":"client/src/pages/Profile.tsx:145",className:"text-xs text-muted-foreground",children:"Regiões de Atuação"}),e.jsx("div",{"data-loc":"client/src/pages/Profile.tsx:146",className:"flex flex-wrap gap-1.5 mt-1",children:r.regions.split(",").map((b,v)=>e.jsx("span",{"data-loc":"client/src/pages/Profile.tsx:148",className:"text-[10px] px-2 py-0.5 rounded-full bg-muted text-muted-foreground",children:b.trim()},v))})]})]})]})})]})}const r_=["Todos","Diretor","Aux. administrativo","Atendente comercial","Consultor de vendas","Financeiro","Gerente comercial","Gerente de vendas","Representante comercial","Recepcionista","Secretária","Supervisor de vendas","T.I.","Técnico comercial"],l_=["Todos","Diretores","Atendentes","Administrativo/Financeiro","Gerentes"],o_=["Todos","Vendas","Pós-venda","Ambos","Administrativo"],c_=["Todos","Ativo","Inativo"],xi=10;function i_(t){return t?t.split(" ").slice(0,2).map(s=>s[0]).join("").toUpperCase():"?"}function d_(){const{user:t}=ka(),s=t?.role==="admin",[r,l]=f.useState(!0),[c,d]=f.useState(""),[u,x]=f.useState(""),[p,g]=f.useState(""),[b,v]=f.useState(""),[y,j]=f.useState("Todos"),[S,N]=f.useState("Todos"),[w,D]=f.useState("Todos"),[k,A]=f.useState("Todos"),[_,E]=f.useState(0),[I,R]=f.useState("usuarios"),[z,U]=f.useState(""),[B,F]=f.useState("all"),[V,de]=f.useState(""),[le,xe]=f.useState(""),[M,O]=f.useState(0),T=30,K=f.useMemo(()=>({search:z||void 0,action:B!=="all"?B:void 0,dateFrom:V||void 0,dateTo:le||void 0,limit:T,offset:M*T}),[z,B,V,le,M]),{data:ve,isLoading:P}=Y.audit.list.useQuery(K,{enabled:I==="auditoria"}),J=Math.ceil((ve?.total??0)/T),[W,H]=f.useState(null),[te,pe]=f.useState(""),[ae,
646Ne]=f.useState(""),{data:Se=[],isLoading:Ce,refetch:ke}=Y.users.listAll.useQuery(void 0,{enabled:s}),{data:Z=[]}=Y.users.list.useQuery(void 0,{enabled:!s}),Ee=(s?Se:Z).filter(q=>{if(c&&!q.name?.toLowerCase().includes(c.toLowerCase())||u&&!q.email?.toLowerCase().includes(u.toLowerCase())||p&&!q.phone?.includes(p)||b&&!q.cpf?.includes(b)||y!=="Todos"&&q.cargo!==y||S!=="Todos"&&q.perfil!==S)return!1;if(w!=="Todos"){const Le={Vendas:"vendas","Pós-venda":"pos_venda",Ambos:"ambos",Administrativo:"administrativo"};if(q.setor!==Le[w])return!1}return!(k==="Ativo"&&q.active!==1||k==="Inativo"&&q.active!==0)}),Ie=Math.ceil(Ee.length/xi),qe=Ee.slice(_*xi,(_+1)*xi),Ve=Y.users.setPassword.useMutation({onSuccess:()=>{ce.success("Senha definida com sucesso"),H(null),pe(""),Ne(""),ke()},onError:q=>ce.error(q.message)}),Ht=Y.users.deactivate.useMutation({onSuccess:()=>{ce.success("Usuário desativado"),ke()},onError:q=>ce.error(`Erro ao desativar usuário: ${q.message}`)}),ht=Y.users.activate.useMutation({onSuccess:()=>{ce.success("Usuário ativado"),ke()},onError:q=>ce.error(`Erro ao ativar usuário: ${q.message}`)}),Je=()=>{d(""),x(""),g(""),v(""),j("Todos"),N("Todos"),D("Todos"),A("Todos"),E(0)};return s?e.jsxs("div",{"data-loc":"client/src/pages/Users.tsx:204",className:"flex flex-col gap-4 p-4 md:p-6",children:[e.jsx(Rs,{"data-loc":"client/src/pages/Users.tsx:206",open:!!W,onOpenChange:q=>{q||(H(null),pe(""),Ne(""))},children:e.jsxs(Ts,{"data-loc":"client/src/pages/Users.tsx:207",className:"bg-card border-border text-foreground max-w-sm",children:[e.jsx(_s,{"data-loc":"client/src/pages/Users.tsx:208",children:e.jsxs(Ps,{"data-loc":"client/src/pages/Users.tsx:209",className:"text-foreground flex items-center gap-2",children:[e.jsx(qy,{"data-loc":"client/src/pages/Users.tsx:210",className:"w-4 h-4 text-primary"}),W?.hasPassword?"Redefinir senha":"Definir senha"," â ",W?.userName]})}),e.jsxs("div",{"data-loc":"client/src/pages/Users.tsx:214",className:"flex flex-col gap-3 py-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/Users.tsx:215",children:[e.jsxs("label",{"data-loc":"client/src/pages/Users.tsx:216",className:"text-xs text-foreground/60 mb-1 block",children:["Nova senha ",e.jsx("span",{"data-loc":"client/src/pages/Users.tsx:217",className:"text-red-400",children:"*"})]}),e.jsx(ge,{"data-loc":"client/src/pages/Users.tsx:219",type:"password",placeholder:"MÃnimo 8 caracteres",value:te,onChange:q=>pe(q.target.value),className:"bg-background border-border text-foreground placeholder:text-foreground/30"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Users.tsx:227",children:[e.jsxs("label",{"data-loc":"client/src/pages/Users.tsx:228",className:"text-xs text-foreground/60 mb-1 block",children:["Confirmar senha ",e.jsx("span",{"data-loc":"client/src/pages/Users.tsx:229",className:"text-red-400",children:"*"})]}),e.jsx(ge,{"data-loc":"client/src/pages/Users.tsx:231",type:"password",placeholder:"Repita a senha",value:ae,onChange:q=>Ne(q.target.value),className:"bg-background border-border text-foreground placeholder:text-foreground/30"})]}),te&&ae&&te!==ae&&e.jsx("p",{"data-loc":"client/src/pages/Users.tsx:240",className:"text-xs text-red-400",children:"As senhas não coincidem"}),te.length>0&&te.length<8&&e.jsx("p",{"data-loc":"client/src/pages/Users.tsx:243",className:"text-xs text-amber-400",children:"Senha deve ter no mÃnimo 8 caracteres"})]}),e.jsxs(Os,{"data-loc":"client/src/pages/Users.tsx:246",className:"gap-2",children:[e.jsx(oe,{"data-loc":"client/src/pages/Users.tsx:247",variant:"outline",size:"sm",className:"border-border bg-transparent text-foreground/70",onClick:()=>{H(null),pe(""),Ne("")},children:"Cancelar"}),e.jsx(oe,{"data-loc":"client/src/pages/Users.tsx:255",size:"sm",className:"bg-primary text-[#0A0A0B] hover:bg-primary/90",disabled:!te||te.length<8||te!==ae||Ve.isPending,onClick:()=>{W&&Ve.mutate({userId:W.userId,password:te})},children:Ve.isPending?"Salvando...":"Salvar senha"})]})]})}),e.jsxs("div",{"data-loc":"client/src/pages/Users.tsx:277",className:"flex items-center justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/Users.tsx:278",children:[e.jsx("h1",{"data-loc":"client/src/pages/Users.tsx:279",className:"text-xl font-semibold text-foreground",children:"Listagem de usuários"}),e.jsxs("nav",{"data-loc":"client/src/pages/Users.tsx:280",className:"flex items-center gap-1 text-xs text-foreground
646/40 mt-0.5",children:[e.jsx(xs,{"data-loc":"client/src/pages/Users.tsx:281",href:"/",className:"hover:text-primary",children:"Dashboard"}),e.jsx("span",{"data-loc":"client/src/pages/Users.tsx:282",children:"/"}),e.jsx("span",{"data-loc":"client/src/pages/Users.tsx:283",className:"text-foreground/60",children:"Usuários"})]})]}),e.jsx(xs,{"data-loc":"client/src/pages/Users.tsx:286",href:"/usuarios/novo",children:e.jsxs(oe,{"data-loc":"client/src/pages/Users.tsx:287",className:"bg-primary hover:bg-[#B8955A] text-[#0A0A0B] font-medium gap-2 h-8 text-sm",children:[e.jsx(vh,{"data-loc":"client/src/pages/Users.tsx:288",className:"w-3.5 h-3.5"}),"Novo usuário"]})})]}),e.jsxs("div",{"data-loc":"client/src/pages/Users.tsx:295",className:"flex gap-1 border-b border-border",children:[e.jsx("button",{"data-loc":"client/src/pages/Users.tsx:296",className:`px-4 py-2 text-sm font-medium transition-colors -mb-px ${I==="usuarios"?"text-foreground border-b-2 border-primary":"text-foreground/50 hover:text-foreground"}`,onClick:()=>R("usuarios"),children:"Usuários"}),e.jsxs("button",{"data-loc":"client/src/pages/Users.tsx:306",className:`px-4 py-2 text-sm font-medium transition-colors -mb-px flex items-center gap-1.5 ${I==="auditoria"?"text-foreground border-b-2 border-primary":"text-foreground/50 hover:text-foreground"}`,onClick:()=>R("auditoria"),children:[e.jsx(Vo,{"data-loc":"client/src/pages/Users.tsx:314",className:"w-3.5 h-3.5"}),"Auditoria"]})]}),I==="usuarios"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{"data-loc":"client/src/pages/Users.tsx:323",className:"bg-card border border-border rounded-lg overflow-hidden",children:[e.jsxs("button",{"data-loc":"client/src/pages/Users.tsx:324",className:"w-full flex items-center justify-between px-4 py-3 text-sm font-medium text-foreground",onClick:()=>l(q=>!q),children:[e.jsxs("span",{"data-loc":"client/src/pages/Users.tsx:328",className:"flex items-center gap-2",children:[e.jsx(Ox,{"data-loc":"client/src/pages/Users.tsx:329",className:"w-3.5 h-3.5 text-primary"}),"Filtros"]}),r?e.jsx(Qi,{"data-loc":"client/src/pages/Users.tsx:332",className:"w-4 h-4 text-foreground/40"}):e.jsx(Xa,{"data-loc":"client/src/pages/Users.tsx:332",className:"w-4 h-4 text-foreground/40"})]}),r&&e.jsxs("div",{"data-loc":"client/src/pages/Users.tsx:336",className:"px-4 pb-4 border-t border-border",children:[e.jsxs("div",{"data-loc":"client/src/pages/Users.tsx:337",className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3 mt-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Users.tsx:338",className:"flex flex-col gap-1",children:[e.jsx("label",{"data-loc":"client/src/pages/Users.tsx:339",className:"text-xs text-foreground/50",children:"Nome"}),e.jsx(ge,{"data-loc":"client/src/pages/Users.tsx:340",placeholder:"Nome do usuário",value:c,onChange:q=>{d(q.target.value),E(0)},className:"h-8 text-sm bg-background border-border text-foreground placeholder:text-foreground/30"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Users.tsx:347",className:"flex flex-col gap-1",children:[e.jsx("label",{"data-loc":"client/src/pages/Users.tsx:348",className:"text-xs text-foreground/50",children:"E-mail"}),e.jsx(ge,{"data-loc":"client/src/pages/Users.tsx:349",placeholder:"Email usuário",value:u,onChange:q=>{x(q.target.value),E(0)},className:"h-8 text-sm bg-background border-border text-foreground placeholder:text-foreground/30"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Users.tsx:356",className:"flex flex-col gap-1",children:[e.jsx("label",{"data-loc":"client/src/pages/Users.tsx:357",className:"text-xs text-foreground/50",children:"Telefone"}),e.jsx(ge,{"data-loc":"client/src/pages/Users.tsx:358",placeholder:"Telefone do usuário",value:p,onChange:q=>{g(q.target.value),E(0)},className:"h-8 text-sm bg-background border-border text-foreground placeholder:text-foreground/30"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Users.tsx:365",className:"flex flex-col gap-1",children:[e.jsx("label",{"data-loc":"client/src/pages/Users.tsx:366",className:"text-xs text-foreground/50",children:"CPF"}),e.jsx(ge,{"data-loc":"client/src/pages/Users.tsx:367",placeholder:"CPF do usuário",value:b,onChange:q=>{v(q.target.value),E(0)},className:"h-8 text-sm bg-background border-border text-foreground placeholder:text-foreground
646/30"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Users.tsx:374",className:"flex flex-col gap-1",children:[e.jsx("label",{"data-loc":"client/src/pages/Users.tsx:375",className:"text-xs text-foreground/50",children:"Situação"}),e.jsxs(Dt,{"data-loc":"client/src/pages/Users.tsx:376",value:k,onValueChange:q=>{A(q),E(0)},children:[e.jsx(Lt,{"data-loc":"client/src/pages/Users.tsx:377",className:"h-8 text-sm bg-background border-border text-foreground",children:e.jsx(Mt,{"data-loc":"client/src/pages/Users.tsx:378"})}),e.jsx(kt,{"data-loc":"client/src/pages/Users.tsx:380",className:"bg-card border-border text-foreground",children:c_.map(q=>e.jsx(He,{"data-loc":"client/src/pages/Users.tsx:381",value:q,children:q},q))})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Users.tsx:385",className:"flex flex-col gap-1",children:[e.jsx("label",{"data-loc":"client/src/pages/Users.tsx:386",className:"text-xs text-foreground/50",children:"Cargo"}),e.jsxs(Dt,{"data-loc":"client/src/pages/Users.tsx:387",value:y,onValueChange:q=>{j(q),E(0)},children:[e.jsx(Lt,{"data-loc":"client/src/pages/Users.tsx:388",className:"h-8 text-sm bg-background border-border text-foreground",children:e.jsx(Mt,{"data-loc":"client/src/pages/Users.tsx:389"})}),e.jsx(kt,{"data-loc":"client/src/pages/Users.tsx:391",className:"bg-card border-border text-foreground",children:r_.map(q=>e.jsx(He,{"data-loc":"client/src/pages/Users.tsx:392",value:q,children:q},q))})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Users.tsx:396",className:"flex flex-col gap-1",children:[e.jsx("label",{"data-loc":"client/src/pages/Users.tsx:397",className:"text-xs text-foreground/50",children:"Perfil"}),e.jsxs(Dt,{"data-loc":"client/src/pages/Users.tsx:398",value:S,onValueChange:q=>{N(q),E(0)},children:[e.jsx(Lt,{"data-loc":"client/src/pages/Users.tsx:399",className:"h-8 text-sm bg-background border-border text-foreground",children:e.jsx(Mt,{"data-loc":"client/src/pages/Users.tsx:400"})}),e.jsx(kt,{"data-loc":"client/src/pages/Users.tsx:402",className:"bg-card border-border text-foreground",children:l_.map(q=>e.jsx(He,{"data-loc":"client/src/pages/Users.tsx:403",value:q,children:q},q))})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Users.tsx:407",className:"flex flex-col gap-1",children:[e.jsx("label",{"data-loc":"client/src/pages/Users.tsx:408",className:"text-xs text-foreground/50",children:"Setor"}),e.jsxs(Dt,{"data-loc":"client/src/pages/Users.tsx:409",value:w,onValueChange:q=>{D(q),E(0)},children:[e.jsx(Lt,{"data-loc":"client/src/pages/Users.tsx:410",className:"h-8 text-sm bg-background border-border text-foreground",children:e.jsx(Mt,{"data-loc":"client/src/pages/Users.tsx:411"})}),e.jsx(kt,{"data-loc":"client/src/pages/Users.tsx:413",className:"bg-card border-border text-foreground",children:o_.map(q=>e.jsx(He,{"data-loc":"client/src/pages/Users.tsx:414",value:q,children:q},q))})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Users.tsx:420",className:"flex justify-end gap-2 mt-4",children:[e.jsx(oe,{"data-loc":"client/src/pages/Users.tsx:421",variant:"outline",size:"sm",onClick:Je,className:"h-8 text-sm border-border text-foreground/70 hover:text-foreground bg-transparent",children:"Limpar"}),e.jsxs(oe,{"data-loc":"client/src/pages/Users.tsx:429",size:"sm",className:"h-8 text-sm bg-primary hover:bg-[#B8955A] text-[#0A0A0B] font-medium gap-1.5",onClick:()=>E(0),children:[e.jsx(or,{"data-loc":"client/src/pages/Users.tsx:434",className:"w-3.5 h-3.5"}),"Pesquisar"]})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Users.tsx:443",className:"bg-card border border-border rounded-lg overflow-hidden",children:[e.jsx("div",{"data-loc":"client/src/pages/Users.tsx:444",className:"overflow-x-auto",children:e.jsxs("table",{"data-loc":"client/src/pages/Users.tsx:445",className:"w-full text-sm",children:[e.jsx("thead",{"data-loc":"client/src/pages/Users.tsx:446",children:e.jsxs("tr",{"data-loc":"client/src/pages/Users.tsx:447",className:"border-b border-border",children:[e.jsx("th",{"data-loc":"client/src/pages/Users.tsx:448",className:"text-left px-3 py-2.5 text-xs font-medium text-foreground
646/50 whitespace-nowrap",children:"Cód."}),e.jsx("th",{"data-loc":"client/src/pages/Users.tsx:449",className:"text-left px-3 py-2.5 text-xs font-medium text-foreground/50 whitespace-nowrap",children:"Foto"}),e.jsx("th",{"data-loc":"client/src/pages/Users.tsx:450",className:"text-left px-3 py-2.5 text-xs font-medium text-foreground/50 whitespace-nowrap",children:"Nome"}),e.jsx("th",{"data-loc":"client/src/pages/Users.tsx:451",className:"text-left px-3 py-2.5 text-xs font-medium text-foreground/50 whitespace-nowrap hidden md:table-cell",children:"Cargo"}),e.jsx("th",{"data-loc":"client/src/pages/Users.tsx:452",className:"text-left px-3 py-2.5 text-xs font-medium text-foreground/50 whitespace-nowrap hidden lg:table-cell",children:"Perfil"}),e.jsx("th",{"data-loc":"client/src/pages/Users.tsx:453",className:"text-left px-3 py-2.5 text-xs font-medium text-foreground/50 whitespace-nowrap hidden lg:table-cell",children:"Setor"}),e.jsx("th",{"data-loc":"client/src/pages/Users.tsx:454",className:"text-left px-3 py-2.5 text-xs font-medium text-foreground/50 whitespace-nowrap hidden xl:table-cell",children:"E-mail"}),e.jsx("th",{"data-loc":"client/src/pages/Users.tsx:455",className:"text-left px-3 py-2.5 text-xs font-medium text-foreground/50 whitespace-nowrap hidden xl:table-cell",children:"Telefone"}),e.jsx("th",{"data-loc":"client/src/pages/Users.tsx:456",className:"text-left px-3 py-2.5 text-xs font-medium text-foreground/50 whitespace-nowrap hidden xl:table-cell",children:"CRECI"}),e.jsx("th",{"data-loc":"client/src/pages/Users.tsx:457",className:"text-left px-3 py-2.5 text-xs font-medium text-foreground/50 whitespace-nowrap",children:"Senha"}),e.jsx("th",{"data-loc":"client/src/pages/Users.tsx:458",className:"text-left px-3 py-2.5 text-xs font-medium text-foreground/50 whitespace-nowrap",children:"Situação"}),e.jsx("th",{"data-loc":"client/src/pages/Users.tsx:459",className:"text-left px-3 py-2.5 text-xs font-medium text-foreground/50 whitespace-nowrap",children:"Ações"})]})}),e.jsx("tbody",{"data-loc":"client/src/pages/Users.tsx:462",children:Ce?e.jsx("tr",{"data-loc":"client/src/pages/Users.tsx:464",children:e.jsx("td",{"data-loc":"client/src/pages/Users.tsx:465",colSpan:12,className:"text-center py-10 text-foreground/40 text-sm",children:"Carregando..."})}):qe.length===0?e.jsx("tr",{"data-loc":"client/src/pages/Users.tsx:470",children:e.jsx("td",{"data-loc":"client/src/pages/Users.tsx:471",colSpan:12,className:"text-center py-10 text-foreground/40 text-sm",children:"Nenhum usuário encontrado"})}):qe.map(q=>e.jsxs("tr",{"data-loc":"client/src/pages/Users.tsx:477",className:"border-b border-border hover:bg-border/30 transition-colors",children:[e.jsx("td",{"data-loc":"client/src/pages/Users.tsx:479",className:"px-3 py-2.5",children:e.jsx(xs,{"data-loc":"client/src/pages/Users.tsx:480",href:`/usuarios/${q.id}`,className:"text-primary hover:underline font-medium text-xs",children:q.codigoSequencial??q.id})}),e.jsx("td",{"data-loc":"client/src/pages/Users.tsx:484",className:"px-3 py-2.5",children:e.jsxs(vi,{"data-loc":"client/src/pages/Users.tsx:485",className:"w-7 h-7",children:[e.jsx(wh,{"data-loc":"client/src/pages/Users.tsx:486",src:q.avatarUrl??void 0}),e.jsx(bi,{"data-loc":"client/src/pages/Users.tsx:487",className:"bg-primary/20 text-primary text-xs font-medium",children:i_(q.name)})]})}),e.jsx("td",{"data-loc":"client/src/pages/Users.tsx:492",className:"px-3 py-2.5",children:e.jsx(xs,{"data-loc":"client/src/pages/Users.tsx:493",href:`/usuarios/${q.id}`,className:"text-foreground hover:text-primary font-medium text-sm transition-colors",children:q.name??"â"})}),e.jsx("td",{"data-loc":"client/src/pages/Users.tsx:497",className:"px-3 py-2.5 hidden md:table-cell text-foreground/70 text-xs",children:q.cargo??"â"}),e.jsx("td",{"data-loc":"client/src/pages/Users.tsx:498",className:"px-3 py-2.5 hidden lg:table-cell text-foreground/70 text-xs",children:q.perfil??"â"}),e.jsx("td",{"data-loc":"client/src/pages/Users.tsx:499",className:"px-3 py-2.5 hidden lg:table-cell text-foreground/70 text-xs capitalize",children:q.setor??"â"}),e.jsx("td",{"data-loc":"client/src/pages/Users.tsx:500",className:"px-3 py-2.5 hidden xl:table-cell",children:q.email?e.jsxs("a",{"data-loc":"client/src/pages/Users.tsx:502",href:`mailto:${q.email}`,className:"text-primary hover:underline text-xs flex items-center gap-1",children:[e.jsx(mr,{"data-loc":"client/src/pages/Users.tsx:503",className:"w-3 h-3"}),q.email]}):e.jsx("span",{"data-loc":"client/src/pages/Users.tsx:506",className:"text-foreground
646/30 text-xs",children:"â"})}),e.jsx("td",{"data-loc":"client/src/pages/Users.tsx:508",className:"px-3 py-2.5 hidden xl:table-cell",children:q.phone?e.jsxs("span",{"data-loc":"client/src/pages/Users.tsx:510",className:"text-foreground/70 text-xs flex items-center gap-1",children:[e.jsx(hn,{"data-loc":"client/src/pages/Users.tsx:511",className:"w-3 h-3 text-[#25D366]"}),q.phone]}):e.jsx("span",{"data-loc":"client/src/pages/Users.tsx:514",className:"text-foreground/30 text-xs",children:"â"})}),e.jsx("td",{"data-loc":"client/src/pages/Users.tsx:516",className:"px-3 py-2.5 hidden xl:table-cell text-foreground/50 text-xs",children:q.creci??"â"}),e.jsx("td",{"data-loc":"client/src/pages/Users.tsx:519",className:"px-3 py-2.5",children:q.hasPassword?e.jsxs("span",{"data-loc":"client/src/pages/Users.tsx:521",className:"flex items-center gap-1 text-emerald-400 text-xs",children:[e.jsx(Fu,{"data-loc":"client/src/pages/Users.tsx:522",className:"w-3.5 h-3.5"}),e.jsx("span",{"data-loc":"client/src/pages/Users.tsx:523",className:"hidden sm:inline",children:"Definida"})]}):e.jsxs("span",{"data-loc":"client/src/pages/Users.tsx:526",className:"flex items-center gap-1 text-foreground/30 text-xs",children:[e.jsx(uC,{"data-loc":"client/src/pages/Users.tsx:527",className:"w-3.5 h-3.5"}),e.jsx("span",{"data-loc":"client/src/pages/Users.tsx:528",className:"hidden sm:inline",children:"Sem senha"})]})}),e.jsx("td",{"data-loc":"client/src/pages/Users.tsx:532",className:"px-3 py-2.5",children:e.jsx(Qt,{"data-loc":"client/src/pages/Users.tsx:533",className:`text-xs font-medium px-2 py-0.5 ${q.active===1?"bg-emerald-500/15 text-emerald-400 border-emerald-500/20":"bg-red-500/15 text-red-400 border-red-500/20"}`,variant:"outline",children:q.active===1?"Ativo":"Inativo"})}),e.jsx("td",{"data-loc":"client/src/pages/Users.tsx:544",className:"px-3 py-2.5",children:e.jsxs(_i,{"data-loc":"client/src/pages/Users.tsx:545",children:[e.jsx(Oi,{"data-loc":"client/src/pages/Users.tsx:546",asChild:!0,children:e.jsxs(oe,{"data-loc":"client/src/pages/Users.tsx:547",variant:"outline",size:"sm",className:"h-6 px-2 text-xs border-border bg-transparent text-foreground/70 hover:text-foreground gap-1",children:["Ações",e.jsx(Mg,{"data-loc":"client/src/pages/Users.tsx:553",className:"w-3 h-3"})]})}),e.jsxs(Pi,{"data-loc":"client/src/pages/Users.tsx:556",className:"bg-card border-border text-foreground text-sm min-w-[160px]",children:[e.jsx(ps,{"data-loc":"client/src/pages/Users.tsx:557",asChild:!0,children:e.jsx(xs,{"data-loc":"client/src/pages/Users.tsx:558",href:`/usuarios/${q.id}`,className:"cursor-pointer",children:"Editar"})}),e.jsxs(ps,{"data-loc":"client/src/pages/Users.tsx:562",className:"cursor-pointer flex items-center gap-2",onClick:()=>{H({userId:q.id,userName:q.name??"Usuário",hasPassword:q.hasPassword}),pe(""),Ne("")},children:[e.jsx(qy,{"data-loc":"client/src/pages/Users.tsx:574",className:"w-3.5 h-3.5 text-primary"}),q.hasPassword?"Redefinir senha":"Definir senha"]}),e.jsx(Th,{"data-loc":"client/src/pages/Users.tsx:577",className:"bg-border"}),q.active===1?e.jsx(ps,{"data-loc":"client/src/pages/Users.tsx:579",className:"text-red-400 focus:text-red-300 cursor-pointer",onClick:()=>Ht.mutate({id:q.id}),children:"Desativar"}):e.jsx(ps,{"data-loc":"client/src/pages/Users.tsx:586",className:"text-emerald-400 focus:text-emerald-300 cursor-pointer",onClick:()=>ht.mutate({id:q.id}),children:"Ativar"})]})]})})]},q.id))})]})}),e.jsxs("div",{"data-loc":"client/src/pages/Users.tsx:604",className:"flex items-center justify-between px-4 py-3 border-t border-border",children:[e.jsx("span",{"data-loc":"client/src/pages/Users.tsx:605",className:"text-xs text-foreground/40",children:Ee.length===0?"Nenhum resultado":`Exibindo ${_*xi+1} até ${Math.min((_+1)*xi,Ee.length)} de ${Ee.length} linha${Ee.length!==1?"s":""}`}),e.jsxs("div",{"data-loc":"client/src/pages/Users.tsx:610",className:"flex items-center gap-1",children:[e.jsx(oe,{"data-loc":"client/src/pages/Users.tsx:611",variant:"outline",size:"sm",className:"w-7 h-7 p-0 border-border bg-transparent text-foreground/50 hover:text-foreground disabled:opacity-30",disabled:_===0,onClick:()=>E(0),children:"«"}),e.jsx(oe,{"data-loc":"client/src/pages/Users.tsx:620",variant:"outline",size:"sm",className:"w-7 h-7 p-0 border-border bg-transparent text-foreground
646/50 hover:text-foreground disabled:opacity-30",disabled:_===0,onClick:()=>E(q=>q-1),children:e.jsx(nc,{"data-loc":"client/src/pages/Users.tsx:627",className:"w-3.5 h-3.5"})}),Array.from({length:Math.min(Ie,5)},(q,Le)=>{const Be=Math.max(0,Math.min(_-2,Ie-5))+Le;return e.jsx(oe,{"data-loc":"client/src/pages/Users.tsx:632",variant:"outline",size:"sm",className:`w-7 h-7 p-0 text-xs border-border ${Be===_?"bg-primary text-[#0A0A0B] border-primary font-bold":"bg-transparent text-foreground/50 hover:text-foreground"}`,onClick:()=>E(Be),children:Be+1},Be)}),e.jsx(oe,{"data-loc":"client/src/pages/Users.tsx:647",variant:"outline",size:"sm",className:"w-7 h-7 p-0 border-border bg-transparent text-foreground/50 hover:text-foreground disabled:opacity-30",disabled:_>=Ie-1,onClick:()=>E(q=>q+1),children:e.jsx(Ia,{"data-loc":"client/src/pages/Users.tsx:654",className:"w-3.5 h-3.5"})}),e.jsx(oe,{"data-loc":"client/src/pages/Users.tsx:656",variant:"outline",size:"sm",className:"w-7 h-7 p-0 border-border bg-transparent text-foreground/50 hover:text-foreground disabled:opacity-30",disabled:_>=Ie-1,onClick:()=>E(Ie-1),children:"»"})]})]})]})]}),I==="auditoria"&&e.jsxs("div",{"data-loc":"client/src/pages/Users.tsx:673",className:"flex flex-col gap-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Users.tsx:676",className:"bg-card border border-border rounded-lg p-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Users.tsx:677",className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Users.tsx:678",className:"flex flex-col gap-1",children:[e.jsx("label",{"data-loc":"client/src/pages/Users.tsx:679",className:"text-xs text-foreground/50",children:"Buscar usuário"}),e.jsx(ge,{"data-loc":"client/src/pages/Users.tsx:680",placeholder:"Nome do usuário",value:z,onChange:q=>{U(q.target.value),O(0)},className:"h-8 text-sm bg-background border-border text-foreground placeholder:text-foreground/30"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Users.tsx:687",className:"flex flex-col gap-1",children:[e.jsx("label",{"data-loc":"client/src/pages/Users.tsx:688",className:"text-xs text-foreground/50",children:"Ação"}),e.jsxs(Dt,{"data-loc":"client/src/pages/Users.tsx:689",value:B,onValueChange:q=>{F(q),O(0)},children:[e.jsx(Lt,{"data-loc":"client/src/pages/Users.tsx:690",className:"h-8 text-sm bg-background border-border text-foreground",children:e.jsx(Mt,{"data-loc":"client/src/pages/Users.tsx:691",placeholder:"Todas as ações"})}),e.jsxs(kt,{"data-loc":"client/src/pages/Users.tsx:693",children:[e.jsx(He,{"data-loc":"client/src/pages/Users.tsx:694",value:"all",children:"Todas as ações"}),e.jsx(He,{"data-loc":"client/src/pages/Users.tsx:695",value:"user.login",children:"Login"}),e.jsx(He,{"data-loc":"client/src/pages/Users.tsx:696",value:"user.logout",children:"Logout"}),e.jsx(He,{"data-loc":"client/src/pages/Users.tsx:697",value:"user.create",children:"Usuário criado"}),e.jsx(He,{"data-loc":"client/src/pages/Users.tsx:698",value:"user.update",children:"Perfil atualizado"}),e.jsx(He,{"data-loc":"client/src/pages/Users.tsx:699",value:"user.role_change",children:"Role alterada"}),e.jsx(He,{"data-loc":"client/src/pages/Users.tsx:700",value:"user.activate",children:"Usuário ativado"}),e.jsx(He,{"data-loc":"client/src/pages/Users.tsx:701",value:"user.deactivate",children:"Usuário desativado"}),e.jsx(He,{"data-loc":"client/src/pages/Users.tsx:702",value:"lead",children:"Ações em leads"}),e.jsx(He,{"data-loc":"client/src/pages/Users.tsx:703",value:"client",children:"Ações em clientes"})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Users.tsx:707",className:"flex flex-col gap-1",children:[e.jsx("label",{"data-loc":"client/src/pages/Users.tsx:708",className:"text-xs text-foreground/50",children:"Data inicial"}),e.jsx(ge,{"data-loc":"client/src/pages/Users.tsx:709",type:"date",value:V,onChange:q=>{de(q.target.value),O(0)},className:"h-8 text-sm bg-background border-border text-foreground"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Users.tsx:716",className:"flex flex-col gap-1",children:[e.jsx("label",{"data-loc":"client/src/pages/Users.tsx:717",className:"text-xs text-foreground
646/50",children:"Data final"}),e.jsx(ge,{"data-loc":"client/src/pages/Users.tsx:718",type:"date",value:le,onChange:q=>{xe(q.target.value),O(0)},className:"h-8 text-sm bg-background border-border text-foreground"})]})]}),(z||B!=="all"||V||le)&&e.jsxs("div",{"data-loc":"client/src/pages/Users.tsx:727",className:"mt-3 flex items-center gap-2",children:[e.jsxs("span",{"data-loc":"client/src/pages/Users.tsx:728",className:"text-xs text-foreground/50",children:[ve?.total??0," registro",(ve?.total??0)!==1?"s":""," encontrado",(ve?.total??0)!==1?"s":""]}),e.jsx(oe,{"data-loc":"client/src/pages/Users.tsx:731",variant:"outline",size:"sm",className:"h-6 text-xs border-border text-foreground/50 hover:text-foreground",onClick:()=>{U(""),F("all"),de(""),xe(""),O(0)},children:"Limpar filtros"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Users.tsx:744",className:"bg-card border border-border rounded-lg overflow-hidden",children:[e.jsx("div",{"data-loc":"client/src/pages/Users.tsx:745",className:"overflow-x-auto",children:e.jsxs("table",{"data-loc":"client/src/pages/Users.tsx:746",className:"w-full text-sm",children:[e.jsx("thead",{"data-loc":"client/src/pages/Users.tsx:747",children:e.jsxs("tr",{"data-loc":"client/src/pages/Users.tsx:748",className:"border-b border-border",children:[e.jsx("th",{"data-loc":"client/src/pages/Users.tsx:749",className:"text-left py-2.5 px-3 text-xs font-medium text-muted-foreground",children:"Data/Hora"}),e.jsx("th",{"data-loc":"client/src/pages/Users.tsx:750",className:"text-left py-2.5 px-3 text-xs font-medium text-muted-foreground",children:"Usuário"}),e.jsx("th",{"data-loc":"client/src/pages/Users.tsx:751",className:"text-left py-2.5 px-3 text-xs font-medium text-muted-foreground",children:"Ação"}),e.jsx("th",{"data-loc":"client/src/pages/Users.tsx:752",className:"text-left py-2.5 px-3 text-xs font-medium text-muted-foreground hidden sm:table-cell",children:"Entidade"}),e.jsx("th",{"data-loc":"client/src/pages/Users.tsx:753",className:"text-left py-2.5 px-3 text-xs font-medium text-muted-foreground hidden md:table-cell",children:"IP"}),e.jsx("th",{"data-loc":"client/src/pages/Users.tsx:754",className:"text-left py-2.5 px-3 text-xs font-medium text-muted-foreground hidden lg:table-cell",children:"Detalhes"})]})}),e.jsx("tbody",{"data-loc":"client/src/pages/Users.tsx:757",children:P?Array.from({length:10}).map((q,Le)=>e.jsx("tr",{"data-loc":"client/src/pages/Users.tsx:760",className:"border-b border-border/50",children:e.jsx("td",{"data-loc":"client/src/pages/Users.tsx:761",colSpan:6,className:"py-3 px-3",children:e.jsx("div",{"data-loc":"client/src/pages/Users.tsx:762",className:"h-4 bg-muted animate-pulse rounded"})})},Le)):ve?.data&&ve.data.length>0?ve.data.map(q=>{const Be={"user.login":{label:"Login",icon:e.jsx(EM,{"data-loc":"client/src/pages/Users.tsx:769",className:"w-3 h-3"}),color:"text-green-400 bg-green-400/10"},"user.logout":{label:"Logout",icon:e.jsx(kg,{"data-loc":"client/src/pages/Users.tsx:770",className:"w-3 h-3"}),color:"text-blue-400 bg-blue-400/10"},"user.create":{label:"Usuário criado",icon:e.jsx(Vy,{"data-loc":"client/src/pages/Users.tsx:771",className:"w-3 h-3"}),color:"text-primary bg-primary/10"},"user.update_profile":{label:"Perfil atualizado",icon:e.jsx(tx,{"data-loc":"client/src/pages/Users.tsx:772",className:"w-3 h-3"}),color:"text-yellow-400 bg-yellow-400/10"},"user.admin_update":{label:"Admin atualizou",icon:e.jsx(tx,{"data-loc":"client/src/pages/Users.tsx:773",className:"w-3 h-3"}),color:"text-yellow-400 bg-yellow-400/10"},"user.role_change":{label:"Role alterada",icon:e.jsx(Vo,{"data-loc":"client/src/pages/Users.tsx:774",className:"w-3 h-3"}),color:"text-purple-400 bg-purple-400/10"},"user.activate":{label:"Ativado",icon:e.jsx(Vy,{"data-loc":"client/src/pages/Users.tsx:775",className:"w-3 h-3"}),color:"text-green-400 bg-green-400/10"},"user.deactivate":{label:"Desativado",icon:e.jsx(IM,{"data-loc":"client/src/pages/Users.tsx:776",className:"w-3 h-3"}),color:"text-red-400 bg-red-400/10"},"user.menu_permissions":{label:"Permissões alteradas",icon:e.jsx(Vo,{"data-loc":"client/src/pages/Users.tsx:777",className:"w-3 h-3"}),color:"text-orange-400 bg-orange-400/10"},"lead.create":{label:"Lead criado",icon:null,color:"text-foreground
646/70 bg-muted"},"lead.update":{label:"Lead atualizado",icon:null,color:"text-foreground/70 bg-muted"},"lead.status_change":{label:"Status de lead",icon:null,color:"text-foreground/70 bg-muted"},"client.create":{label:"Cliente criado",icon:null,color:"text-foreground/70 bg-muted"},"property.create":{label:"Imóvel criado",icon:null,color:"text-foreground/70 bg-muted"},"property.update":{label:"Imóvel atualizado",icon:null,color:"text-foreground/70 bg-muted"}}[q.action]??{label:q.action,icon:null,color:"text-foreground/60 bg-muted"},Pe={lead:"Lead",client:"Cliente",property:"Imóvel",user:"Usuário"};return e.jsxs("tr",{"data-loc":"client/src/pages/Users.tsx:788",className:"border-b border-border/50 hover:bg-muted/20 transition-colors",children:[e.jsx("td",{"data-loc":"client/src/pages/Users.tsx:789",className:"py-2.5 px-3 whitespace-nowrap",children:e.jsx("span",{"data-loc":"client/src/pages/Users.tsx:790",className:"text-xs text-muted-foreground",children:new Date(q.createdAt).toLocaleDateString("pt-BR",{day:"2-digit",month:"2-digit",year:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})})}),e.jsx("td",{"data-loc":"client/src/pages/Users.tsx:797",className:"py-2.5 px-3",children:e.jsx("span",{"data-loc":"client/src/pages/Users.tsx:798",className:"text-xs font-medium text-foreground",children:q.userName||"Sistema"})}),e.jsx("td",{"data-loc":"client/src/pages/Users.tsx:800",className:"py-2.5 px-3",children:e.jsxs("span",{"data-loc":"client/src/pages/Users.tsx:801",className:`inline-flex items-center gap-1 text-[10px] font-medium px-2 py-0.5 rounded-full ${Be.color}`,children:[Be.icon,Be.label]})}),e.jsx("td",{"data-loc":"client/src/pages/Users.tsx:806",className:"py-2.5 px-3 hidden sm:table-cell",children:e.jsxs("div",{"data-loc":"client/src/pages/Users.tsx:807",className:"flex items-center gap-1",children:[e.jsx("span",{"data-loc":"client/src/pages/Users.tsx:808",className:"text-[10px] px-1.5 py-0.5 rounded bg-muted text-muted-foreground",children:Pe[q.entity]||q.entity}),q.entityId&&e.jsxs("span",{"data-loc":"client/src/pages/Users.tsx:811",className:"text-[10px] text-muted-foreground",children:["#",q.entityId]})]})}),e.jsx("td",{"data-loc":"client/src/pages/Users.tsx:814",className:"py-2.5 px-3 hidden md:table-cell",children:e.jsx("span",{"data-loc":"client/src/pages/Users.tsx:815",className:"text-[10px] text-muted-foreground font-mono",children:q.ipAddress||"â"})}),e.jsx("td",{"data-loc":"client/src/pages/Users.tsx:819",className:"py-2.5 px-3 hidden lg:table-cell max-w-[220px]",children:q.details?e.jsx("span",{"data-loc":"client/src/pages/Users.tsx:821",className:"text-[10px] text-muted-foreground font-mono truncate block",children:typeof q.details=="string"?(()=>{try{const mt=JSON.parse(q.details);return JSON.stringify(mt)}catch{return q.details}})():JSON.stringify(q.details)}):e.jsx("span",{"data-loc":"client/src/pages/Users.tsx:827",className:"text-[10px] text-muted-foreground/40",children:"â"})})]},q.id)}):e.jsx("tr",{"data-loc":"client/src/pages/Users.tsx:834",children:e.jsx("td",{"data-loc":"client/src/pages/Users.tsx:835",colSpan:6,className:"py-12 text-center",children:e.jsxs("div",{"data-loc":"client/src/pages/Users.tsx:836",className:"flex flex-col items-center gap-2 text-muted-foreground",children:[e.jsx(Vo,{"data-loc":"client/src/pages/Users.tsx:837",className:"w-8 h-8 opacity-20"}),e.jsx("p",{"data-loc":"client/src/pages/Users.tsx:838",className:"text-sm",children:"Nenhum registro de auditoria encontrado"}),(z||B!=="all"||V||le)&&e.jsx("p",{"data-loc":"client/src/pages/Users.tsx:840",className:"text-xs opacity-60",children:"Tente ajustar os filtros"})]})})})})]})}),e.jsxs("div",{"data-loc":"client/src/pages/Users.tsx:851",className:"flex items-center justify-between px-4 py-3 border-t border-border",children:[e.jsx("span",{"data-loc":"client/src/pages/Users.tsx:852",className:"text-xs text-foreground/40",children:ve?.total?`Exibindo ${M*T+1}â${Math.min((M+1)*T,ve.total)} de ${ve.total} registros`:"Nenhum registro"}),e.jsxs("div",{"data-loc":"client/src/pages/Users.tsx:857",className:"flex items-center gap-1",children:[e.jsx(oe,{"data-loc":"client/src/pages/Users.tsx:858",variant:"outline",size:"sm",className:"w-7 h-7 p-0 border-border bg-transparent text-foreground
646/50 hover:text-foreground disabled:opacity-30",disabled:M===0,onClick:()=>O(0),children:"«"}),e.jsx(oe,{"data-loc":"client/src/pages/Users.tsx:864",variant:"outline",size:"sm",className:"w-7 h-7 p-0 border-border bg-transparent text-foreground/50 hover:text-foreground disabled:opacity-30",disabled:M===0,onClick:()=>O(q=>q-1),children:e.jsx(nc,{"data-loc":"client/src/pages/Users.tsx:869",className:"w-3.5 h-3.5"})}),e.jsxs("span",{"data-loc":"client/src/pages/Users.tsx:870",className:"text-xs text-foreground/50 px-2",children:[M+1," / ",Math.max(1,J)]}),e.jsx(oe,{"data-loc":"client/src/pages/Users.tsx:871",variant:"outline",size:"sm",className:"w-7 h-7 p-0 border-border bg-transparent text-foreground/50 hover:text-foreground disabled:opacity-30",disabled:M>=J-1,onClick:()=>O(q=>q+1),children:e.jsx(Ia,{"data-loc":"client/src/pages/Users.tsx:876",className:"w-3.5 h-3.5"})}),e.jsx(oe,{"data-loc":"client/src/pages/Users.tsx:877",variant:"outline",size:"sm",className:"w-7 h-7 p-0 border-border bg-transparent text-foreground/50 hover:text-foreground disabled:opacity-30",disabled:M>=J-1,onClick:()=>O(J-1),children:"»"})]})]})]})]})]}):e.jsx("div",{"data-loc":"client/src/pages/Users.tsx:197",className:"p-6 text-center text-foreground/60",children:e.jsx("p",{"data-loc":"client/src/pages/Users.tsx:198",children:"Acesso restrito a administradores."})})}const u_=["Diretor","Aux. administrativo","Atendente comercial","Consultor de vendas","Financeiro","Gerente comercial","Gerente de vendas","Representante comercial","Recepcionista","Secretária","Supervisor de vendas","T.I.","Técnico comercial"],x_=["Diretores","Atendentes","Administrativo/Financeiro","Gerentes"],Ru=[{path:"/",label:"Dashboard"},{path:"/clientes",label:"Clientes"},{path:"/atendimentos",label:"Atendimentos"},{path:"/visitas",label:"Visitas"},{path:"/atividades",label:"Painel Atividades"},{path:"/leads",label:"Negócios"},{path:"/campanhas",label:"Campanhas"},{path:"/whatsapp",label:"WhatsApp"},{path:"/meta-lead-ads",label:"Meta Lead Ads"},{path:"/minha-fila",label:"Minha Fila"},{path:"/roleta",label:"Roleta de Leads"},{path:"/importacoes",label:"Importações"},{path:"/integracoes",label:"Integrações"},{path:"/webhooks",label:"Webhooks & Leads"},{path:"/meta-capi",label:"Meta CAPI"},{path:"/configuracoes",label:"Configurações"}];function p_(t){return t?t.split(" ").slice(0,2).map(s=>s[0]).join("").toUpperCase():"?"}function Rl({value:t,onChange:s,placeholder:r,children:l}){return e.jsxs("select",{"data-loc":"client/src/pages/UserEdit.tsx:87",value:t,onChange:c=>s(c.target.value),className:"h-8 text-sm bg-background border border-border text-foreground rounded-md px-2 w-full outline-none focus:ring-1 focus:ring-primary/50 focus:border-primary/50 appearance-none cursor-pointer",style:{backgroundImage:`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")`,backgroundRepeat:"no-repeat",backgroundPosition:"right 8px center",paddingRight:"28px"},children:[r&&e.jsx("option",{"data-loc":"client/src/pages/UserEdit.tsx:98",value:"",children:r}),l]})}function Qf({checked:t,onChange:s,disabled:r}){return e.jsx("button",{"data-loc":"client/src/pages/UserEdit.tsx:115",type:"button",role:"switch","aria-checked":t,disabled:r,onClick:()=>s(!t),className:`relative inline-flex h-5 w-9 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50 disabled:cursor-not-allowed disabled:opacity-50 ${t?"bg-primary":"bg-border"}`,children:e.jsx("span",{"data-loc":"client/src/pages/UserEdit.tsx:125",className:`pointer-events-none block h-4 w-4 rounded-full bg-white shadow-lg ring-0 transition-transform ${t?"translate-x-4":"translate-x-0"}`})})}function m_(){const{id:t}=mc(),[,s]=fs(),{user:r}=ka(),l=r?.role==="admin",c=t==="novo",[d,u]=f.useState("detalhes"),[x,p]=f.useState(!1),[g,b]=f.useState({name:"",email:"",ph
646one:"",cpf:"",cargo:"",setor:"ambos",perfil:"",creci:"",role:"corretor",dataNascimento:"",dataAdmissao:"",sexo:"",estadoCivil:"",regimeContratacao:"",cep:"",endereco:"",numero:"",complemento:"",bairro:"",cidade:"",estado:"",habilitarFila:0,modoFerias:0,receberEmailPropostas:1,filaMqlHabilitada:0,filaCaptacaoHabilitada:0,active:1,avatarUrl:""}),[v,y]=f.useState(""),[j,S]=f.useState(""),[N,w]=f.useState(!1),[D,k]=f.useState([]),[A,_]=f.useState(""),[E,I]=f.useState(""),R=f.useRef(null),z=Y.users.uploadPhoto.useMutation({onSuccess:Z=>{b(fe=>({...fe,avatarUrl:Z.url})),ce.success("Foto atualizada")},onError:()=>ce.error("Erro ao fazer upload da foto")}),U=Y.useUtils(),{data:B,isLoading:F}=Y.users.getById.useQuery({id:parseInt(t)},{enabled:!c&&!!t&&l}),{data:V}=Y.users.getCourses.useQuery({userId:parseInt(t)},{enabled:!c&&!!t&&l});f.useEffect(()=>{B&&b({name:B.name??"",email:B.email??"",phone:B.phone??"",cpf:B.cpf??"",cargo:B.cargo??"",setor:B.setor??"ambos",perfil:B.perfil??"",creci:B.creci??"",role:B.role,dataNascimento:B.dataNascimento??"",dataAdmissao:B.dataAdmissao??"",sexo:B.sexo??"",estadoCivil:B.estadoCivil??"",regimeContratacao:B.regimeContratacao??"",cep:B.cep??"",endereco:B.endereco??"",numero:B.numero??"",complemento:B.complemento??"",bairro:B.bairro??"",cidade:B.cidade??"",estado:B.estado??"",habilitarFila:B.habilitarFila??0,modoFerias:B.modoFerias??0,receberEmailPropostas:B.receberEmailPropostas??1,filaMqlHabilitada:B.filaMqlHabilitada??0,filaCaptacaoHabilitada:B.filaCaptacaoHabilitada??0,active:B.active??1,avatarUrl:B.avatarUrl??""})},[B]),f.useEffect(()=>{V&&k(V.map(Z=>({id:Z.id,dataCurso:Z.dataCurso,descricao:Z.descricao})))},[V]);const de=Y.users.create.useMutation({onSuccess:Z=>{ce.success("Usuário criado com sucesso"),s(`/usuarios/${Z.id}`),U.users.listAll.invalidate()},onError:Z=>ce.error(`Erro: ${Z.message}`)}),le=Y.users.setPassword.useMutation({onSuccess:()=>{ce.success("Senha definida com sucesso"),y(""),S("")},onError:Z=>ce.error(`Erro: ${Z.message}`)}),xe=Y.users.adminUpdate.useMutation({onSuccess:()=>{ce.success("Alterações salvas"),U.users.listAll.invalidate(),U.users.getById.invalidate({id:parseInt(t)})},onError:Z=>ce.error(`Erro: ${Z.message}`)}),M=Y.users.addCourse.useMutation({onSuccess:()=>{ce.success("Curso adicionado"),_(""),I(""),U.users.getCourses.invalidate({userId:parseInt(t)})},onError:Z=>ce.error(`Erro: ${Z.message}`)}),O=Y.users.deleteCourse.useMutation({onSuccess:()=>{ce.success("Curso removido"),U.users.getCourses.invalidate({userId:parseInt(t)})}}),T=()=>{const Z={name:g.name,email:g.email||void 0,phone:g.phone||void 0,cpf:g.cpf||void 0,cargo:g.cargo||void 0,setor:g.setor||void 0,perfil:g.perfil||void 0,creci:g.creci||void 0,role:g.role,dataNascimento:g.dataNascimento||void 0,dataAdmissao:g.dataAdmissao||void 0,sexo:g.sexo||void 0,estadoCivil:g.estadoCivil||void 0,regimeContratacao:g.regimeContratacao||void 0,cep:g.cep||void 0,endereco:g.endereco||void 0,numero:g.numero||void 0,complemento:g.complemento||void 0,bairro:g.bairro||void 0,cidade:g.cidade||void 0,estado:g.estado||void 0,habilitarFila:g.habilitarFila,modoFerias:g.modoFerias,receberEmailPropostas:g.receberEmailPropostas,filaMqlHabilitada:g.filaMqlHabilitada,filaCaptacaoHabilitada:g.filaCaptacaoHabilitada,active:g.active,avatarUrl:g.avatarUrl||void 0};if(c){if(!g.name.trim()){ce.error("Nome é obrigatório");return}if(v&&v!==j){ce.error("As senhas não coincidem");return}if(v&&v.length<8){ce.error("Senha deve ter no mÃnimo 8 caracteres");return}de.mutate({...Z,password:v||void 0})}else xe.mutate({id:parseInt(t),...Z}),!Ce&&Ne&&Object.keys(pe).length>0&&te.mutate({userId:parseInt(t),permissions:pe})},K=()=>{if(!A||!E.trim()){ce.error("Preencha a data e a descrição do curso");return}M.mutate({userId:parseInt(t),dataCurso:A,descricao:E})},ve=async Z=>{const fe=Z.target.files?.[0];if(!fe)return;if(fe.size>5*1024*1024){ce.error("Foto deve ter menos de 5MB");return}const Ee=new FileReader;Ee.onload=()=>{const Ie=Ee.result.split(",")[1];z.mutate({userId:parseInt(t),filename:fe.name,contentType:fe.type,base64:Ie})}
646,Ee.readAsDataURL(fe)};if(!l)return e.jsx("div",{"data-loc":"client/src/pages/UserEdit.tsx:371",className:"p-6 text-center text-foreground/60",children:e.jsx("p",{"data-loc":"client/src/pages/UserEdit.tsx:372",children:"Acesso restrito a administradores."})});const P=de.isPending||xe.isPending,J=c?"Novo Usuário":`Alterar: Usuário ${B?.name??""}`,W=c?null:parseInt(t),H=Y.users.getMenuPermissions.useQuery({userId:W},{enabled:!!W&&!c}),te=Y.users.saveMenuPermissions.useMutation({onSuccess:()=>{ce.success("Permissões salvas com sucesso!"),H.refetch()},onError:()=>ce.error("Erro ao salvar permissões")}),[pe,ae]=f.useState({}),[Ne,Se]=f.useState(!1);f.useEffect(()=>{Se(!1),ae({})},[t]),f.useEffect(()=>{if(H.data&&!Ne){const Z=H.data.permissions,fe={};Ru.forEach(Ee=>{const Ie=Z[Ee.path];if(Ie&&typeof Ie=="object"&&"enabled"in Ie){const qe=Ie;fe[Ee.path]={enabled:qe.enabled!==!1,mode:qe.mode??"editar"}}else typeof Ie=="boolean"?fe[Ee.path]={enabled:Ie,mode:"editar"}:fe[Ee.path]={enabled:!0,mode:"editar"}}),ae(fe),Se(!0)}},[H.data,Ne]);const Ce=H.data?.role==="admin",ke=[{key:"detalhes",label:"Detalhes",icon:e.jsx(Ua,{"data-loc":"client/src/pages/UserEdit.tsx:428",className:"w-3.5 h-3.5"})},{key:"cursos",label:"Cursos e treinamentos",icon:e.jsx(Hy,{"data-loc":"client/src/pages/UserEdit.tsx:429",className:"w-3.5 h-3.5"}),count:D.length},{key:"unidades",label:"Unidades",icon:e.jsx(un,{"data-loc":"client/src/pages/UserEdit.tsx:430",className:"w-3.5 h-3.5"}),count:1},...c?[]:[{key:"permissoes",label:"Permissões",icon:e.jsx(Fu,{"data-loc":"client/src/pages/UserEdit.tsx:431",className:"w-3.5 h-3.5"})}]];return e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:435",className:"flex flex-col gap-4 p-4 md:p-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:437",children:[e.jsx("h1",{"data-loc":"client/src/pages/UserEdit.tsx:438",className:"text-xl font-semibold text-foreground",children:J}),e.jsxs("nav",{"data-loc":"client/src/pages/UserEdit.tsx:439",className:"flex items-center gap-1 text-xs text-foreground/40 mt-0.5",children:[e.jsx(xs,{"data-loc":"client/src/pages/UserEdit.tsx:440",href:"/",className:"hover:text-primary",children:"Dashboard"}),e.jsx(Ia,{"data-loc":"client/src/pages/UserEdit.tsx:441",className:"w-3 h-3"}),e.jsx(xs,{"data-loc":"client/src/pages/UserEdit.tsx:442",href:"/usuarios",className:"hover:text-primary",children:"Usuários"}),!c&&B&&e.jsxs(e.Fragment,{children:[e.jsx(Ia,{"data-loc":"client/src/pages/UserEdit.tsx:445",className:"w-3 h-3"}),e.jsx(xs,{"data-loc":"client/src/pages/UserEdit.tsx:446",href:`/usuarios/${t}`,className:"hover:text-primary",children:B.name})]}),e.jsx(Ia,{"data-loc":"client/src/pages/UserEdit.tsx:449",className:"w-3 h-3"}),e.jsx("span",{"data-loc":"client/src/pages/UserEdit.tsx:450",className:"text-foreground/60",children:c?"Novo":"Alteração"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:455",className:"flex items-center justify-between flex-wrap gap-2",children:[e.jsx("div",{"data-loc":"client/src/pages/UserEdit.tsx:456",className:"flex items-center gap-1",children:ke.map(Z=>e.jsxs("button",{"data-loc":"client/src/pages/UserEdit.tsx:458",onClick:()=>u(Z.key),className:`flex items-center gap-1.5 px-3 py-1.5 rounded-md text-sm font-medium transition-colors ${d===Z.key?"bg-primary/15 text-primary border border-primary/30":"text-foreground/60 hover:text-foreground hover:bg-border"}`,children:[Z.icon,Z.label,Z.count!==void 0&&e.jsx("span",{"data-loc":"client/src/pages/UserEdit.tsx:470",className:`text-xs rounded-full px-1.5 py-0.5 min-w-[18px] text-center ${d===Z.key?"bg-primary/20 text-primary":"bg-border text-foreground/50"}`,children:Z.count})]},Z.key))}),e.jsxs(oe,{"data-loc":"client/src/pages/UserEdit.tsx:479",onClick:T,disabled:P,className:"bg-primary hover:bg-[#B8955A] text-[#0A0A0B] font-medium gap-2 h-8 text-sm",children:[e.jsx(ex,{"data-loc":"client/src/pages/UserEdit.tsx:484",className:"w-3.5 h-3.5"}),P?"Salvando...":"Salvar alterações"]})]}),F&&!c?e.jsx("div",{"data-loc":"client/src/pages/UserEdit.tsx:490",className:"text-center py-20 text-foreground
646/40",children:"Carregando..."}):e.jsxs(e.Fragment,{children:[d==="detalhes"&&e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:495",className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:497",className:"bg-card border border-border rounded-lg p-4 flex flex-col gap-4",children:[e.jsxs("h2",{"data-loc":"client/src/pages/UserEdit.tsx:498",className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[e.jsx(Ua,{"data-loc":"client/src/pages/UserEdit.tsx:499",className:"w-4 h-4 text-primary"}),"Dados pessoais"]}),e.jsxs("p",{"data-loc":"client/src/pages/UserEdit.tsx:502",className:"text-xs text-red-400 flex items-center gap-1",children:[e.jsx(ms,{"data-loc":"client/src/pages/UserEdit.tsx:503",className:"w-3 h-3"}),"Campos obrigatórios."]}),e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:507",className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:508",className:"sm:col-span-2 flex flex-col gap-1",children:[e.jsx("label",{"data-loc":"client/src/pages/UserEdit.tsx:509",className:"text-xs text-foreground/50",children:"Nome do usuário *"}),e.jsx(ge,{"data-loc":"client/src/pages/UserEdit.tsx:510",value:g.name,onChange:Z=>b(fe=>({...fe,name:Z.target.value})),className:"h-8 text-sm bg-background border-border text-foreground"})]}),e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:517",className:"flex flex-col gap-1",children:[e.jsx("label",{"data-loc":"client/src/pages/UserEdit.tsx:518",className:"text-xs text-foreground/50",children:"CPF"}),e.jsx(ge,{"data-loc":"client/src/pages/UserEdit.tsx:519",value:g.cpf,onChange:Z=>b(fe=>({...fe,cpf:Z.target.value})),placeholder:"000.000.000-00",className:"h-8 text-sm bg-background border-border text-foreground"})]}),e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:527",className:"flex flex-col gap-1",children:[e.jsx("label",{"data-loc":"client/src/pages/UserEdit.tsx:528",className:"text-xs text-foreground/50",children:"Cód. auxiliar"}),e.jsx(ge,{"data-loc":"client/src/pages/UserEdit.tsx:529",disabled:!0,placeholder:"â",className:"h-8 text-sm bg-background border-border text-foreground/30"})]}),e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:536",className:"flex flex-col gap-1",children:[e.jsx("label",{"data-loc":"client/src/pages/UserEdit.tsx:537",className:"text-xs text-foreground/50",children:"Cargo"}),e.jsx(Rl,{"data-loc":"client/src/pages/UserEdit.tsx:538",value:g.cargo,onChange:Z=>b(fe=>({...fe,cargo:Z})),placeholder:"Selecione...",children:u_.map(Z=>e.jsx("option",{"data-loc":"client/src/pages/UserEdit.tsx:539",value:Z,children:Z},Z))})]}),e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:543",className:"flex flex-col gap-1",children:[e.jsx("label",{"data-loc":"client/src/pages/UserEdit.tsx:544",className:"text-xs text-foreground/50",children:"Setor"}),e.jsxs(Rl,{"data-loc":"client/src/pages/UserEdit.tsx:545",value:g.setor,onChange:Z=>b(fe=>({...fe,setor:Z})),children:[e.jsx("option",{"data-loc":"client/src/pages/UserEdit.tsx:546",value:"vendas",children:"Vendas"}),e.jsx("option",{"data-loc":"client/src/pages/UserEdit.tsx:547",value:"pos_venda",children:"Pós-venda"}),e.jsx("option",{"data-loc":"client/src/pages/UserEdit.tsx:548",value:"ambos",children:"Ambos"}),e.jsx("option",{"data-loc":"client/src/pages/UserEdit.tsx:549",value:"administrativo",children:"Administrativo"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:553",className:"flex flex-col gap-1",children:[e.jsx("label",{"data-loc":"client/src/pages/UserEdit.tsx:554",className:"text-xs text-foreground/50",children:"Perfil"}),e.jsx(Rl,{"data-loc":"client/src/pages/UserEdit.tsx:555",value:g.perfil,onChange:Z=>b(fe=>({...fe,perfil:Z})),placeholder:"Selecione...",children:x_.map(Z=>e.jsx("option",{"data-loc":"client/src/pages/UserEdit.tsx:556",value:Z,children:Z},Z))})]}),e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:560",className:"flex flex-col gap-1",children:[e.jsx("label",{"data-loc":"client/src/pages/UserEdit.tsx:561",className:"text-xs text-foreground
646/50",children:"Regime de contratação"}),e.jsxs(Rl,{"data-loc":"client/src/pages/UserEdit.tsx:562",value:g.regimeContratacao,onChange:Z=>b(fe=>({...fe,regimeContratacao:Z})),placeholder:"Selecione...",children:[e.jsx("option",{"data-loc":"client/src/pages/UserEdit.tsx:563",value:"clt",children:"CLT"}),e.jsx("option",{"data-loc":"client/src/pages/UserEdit.tsx:564",value:"pj",children:"PJ"}),e.jsx("option",{"data-loc":"client/src/pages/UserEdit.tsx:565",value:"socio",children:"Sócio"}),e.jsx("option",{"data-loc":"client/src/pages/UserEdit.tsx:566",value:"autonomo",children:"Autônomo"}),e.jsx("option",{"data-loc":"client/src/pages/UserEdit.tsx:567",value:"estagio",children:"Estágio"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:571",className:"flex flex-col gap-1",children:[e.jsx("label",{"data-loc":"client/src/pages/UserEdit.tsx:572",className:"text-xs text-foreground/50",children:"Nº CRECI"}),e.jsx(ge,{"data-loc":"client/src/pages/UserEdit.tsx:573",value:g.creci,onChange:Z=>b(fe=>({...fe,creci:Z.target.value})),className:"h-8 text-sm bg-background border-border text-foreground"})]}),e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:580",className:"flex flex-col gap-1",children:[e.jsx("label",{"data-loc":"client/src/pages/UserEdit.tsx:581",className:"text-xs text-foreground/50",children:"Role no sistema"}),e.jsxs(Rl,{"data-loc":"client/src/pages/UserEdit.tsx:582",value:g.role,onChange:Z=>b(fe=>({...fe,role:Z})),children:[e.jsx("option",{"data-loc":"client/src/pages/UserEdit.tsx:583",value:"admin",children:"Admin"}),e.jsx("option",{"data-loc":"client/src/pages/UserEdit.tsx:584",value:"gerente",children:"Gerente"}),e.jsx("option",{"data-loc":"client/src/pages/UserEdit.tsx:585",value:"corretor",children:"Atendente"})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:591",className:"border-t border-border pt-3 grid grid-cols-1 sm:grid-cols-2 gap-3",children:[[{label:"Habilitar fila",key:"habilitarFila"},{label:"Modo férias",key:"modoFerias"},{label:"Receber e-mail propostas",key:"receberEmailPropostas"},{label:"Fila MQL habilitada",key:"filaMqlHabilitada"},{label:"Fila de leads habilitada",key:"filaCaptacaoHabilitada"}].map(({label:Z,key:fe})=>e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:599",className:"flex items-center justify-between gap-2",children:[e.jsx("span",{"data-loc":"client/src/pages/UserEdit.tsx:600",className:"text-xs text-foreground/70",children:Z}),e.jsx(Qf,{"data-loc":"client/src/pages/UserEdit.tsx:601",checked:g[fe]===1,onChange:Ee=>b(Ie=>({...Ie,[fe]:Ee?1:0}))})]},fe)),e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:607",className:"flex items-center justify-between gap-2",children:[e.jsx("span",{"data-loc":"client/src/pages/UserEdit.tsx:608",className:"text-xs text-foreground/70",children:"Situação"}),e.jsx(Qt,{"data-loc":"client/src/pages/UserEdit.tsx:609",className:`text-xs cursor-pointer ${g.active===1?"bg-emerald-500/15 text-emerald-400 border-emerald-500/20":"bg-red-500/15 text-red-400 border-red-500/20"}`,variant:"outline",onClick:()=>b(Z=>({...Z,active:Z.active===1?0:1})),children:g.active===1?"Ativo":"Inativo"})]})]}),!c&&e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:625",className:"border-t border-border pt-3",children:[e.jsx("label",{"data-loc":"client/src/pages/UserEdit.tsx:626",className:"text-xs text-foreground/50 mb-2 block",children:"Foto"}),e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:627",className:"flex flex-col items-center gap-3",children:[e.jsxs(vi,{"data-loc":"client/src/pages/UserEdit.tsx:628",className:"w-32 h-32 rounded-lg",children:[e.jsx(wh,{"data-loc":"client/src/pages/UserEdit.tsx:629",src:g.avatarUrl||void 0,className:"object-cover"}),e.jsx(bi,{"data-loc":"client/src/pages/UserEdit.tsx:630",className:"bg-primary/20 text-primary text-2xl font-bold rounded-lg",children:p_(g.name)})]}),e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:634",className:"flex gap-2",children:[e.jsxs(oe,{"data-loc":"client/src/pages/UserEdit.tsx:635",size:"sm",variant:"outline",className:"h-7 text-xs border-border bg-transparent text-foreground
646/70 gap-1.5",onClick:()=>R.current?.click(),disabled:z.isPending,children:[e.jsx(vM,{"data-loc":"client/src/pages/UserEdit.tsx:642",className:"w-3 h-3"}),z.isPending?"Enviando...":"Alterar foto"]}),g.avatarUrl&&e.jsxs(oe,{"data-loc":"client/src/pages/UserEdit.tsx:646",size:"sm",variant:"outline",className:"h-7 text-xs border-red-500/30 bg-transparent text-red-400 gap-1.5",onClick:()=>b(Z=>({...Z,avatarUrl:""})),children:[e.jsx(Ba,{"data-loc":"client/src/pages/UserEdit.tsx:652",className:"w-3 h-3"}),"Excluir foto"]})]}),e.jsx("input",{"data-loc":"client/src/pages/UserEdit.tsx:657",ref:R,type:"file",accept:"image/*",className:"hidden",onChange:ve})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:670",className:"flex flex-col gap-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:671",className:"bg-card border border-border rounded-lg p-4 flex flex-col gap-3",children:[e.jsxs("h2",{"data-loc":"client/src/pages/UserEdit.tsx:672",className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[e.jsx(Ua,{"data-loc":"client/src/pages/UserEdit.tsx:673",className:"w-4 h-4 text-primary"}),"Dados pessoais"]}),e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:676",className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:677",className:"flex flex-col gap-1",children:[e.jsx("label",{"data-loc":"client/src/pages/UserEdit.tsx:678",className:"text-xs text-foreground/50",children:"Telefone"}),e.jsx(ge,{"data-loc":"client/src/pages/UserEdit.tsx:679",value:g.phone,onChange:Z=>b(fe=>({...fe,phone:Z.target.value})),placeholder:"(47) 99999-9999",className:"h-8 text-sm bg-background border-border text-foreground"})]}),e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:687",className:"flex flex-col gap-1",children:[e.jsx("label",{"data-loc":"client/src/pages/UserEdit.tsx:688",className:"text-xs text-foreground/50",children:"E-mail"}),e.jsx(ge,{"data-loc":"client/src/pages/UserEdit.tsx:689",value:g.email,onChange:Z=>b(fe=>({...fe,email:Z.target.value})),placeholder:"[email protected]",className:"h-8 text-sm bg-background border-border text-foreground"})]}),e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:698",className:"sm:col-span-2 flex flex-col gap-2 border border-border rounded-lg p-3 bg-background/40",children:[e.jsxs("label",{"data-loc":"client/src/pages/UserEdit.tsx:699",className:"text-xs font-medium text-foreground/70",children:[c?"Senha de acesso":"Redefinir senha",!c&&e.jsx("span",{"data-loc":"client/src/pages/UserEdit.tsx:701",className:"text-foreground/40 font-normal ml-1",children:"(deixe em branco para não alterar)"})]}),e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:703",className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:704",className:"flex flex-col gap-1",children:[e.jsx("label",{"data-loc":"client/src/pages/UserEdit.tsx:705",className:"text-xs text-foreground/50",children:c?"Senha":"Nova senha"}),e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:706",className:"relative",children:[e.jsx(ge,{"data-loc":"client/src/pages/UserEdit.tsx:707",type:N?"text":"password",value:v,onChange:Z=>y(Z.target.value),placeholder:"MÃnimo 6 caracteres",className:"h-8 text-sm bg-background border-border text-foreground pr-14"}),e.jsx("button",{"data-loc":"client/src/pages/UserEdit.tsx:714",type:"button",onClick:()=>w(Z=>!Z),className:"absolute right-2 top-1/2 -translate-y-1/2 text-foreground/40 hover:text-foreground/70 text-xs",tabIndex:-1,children:N?"ocultar":"ver"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:724",className:"flex flex-col gap-1",children:[e.jsx("label",{"data-loc":"client/src/pages/UserEdit.tsx:725",className:"text-xs text-foreground/50",children:"Confirmar senha"}),e.jsx(ge,{"data-loc":"client/src/pages/UserEdit.tsx:726",type:N?"text":"password",value:j,onChange:Z=>S(Z.target.value),placeholder:"Repita a senha",className:"h-8 text-sm bg-background border-border text-foreground"})]})]}),v&&j&&v!==j&&e.jsx("p",{"data-loc":"client/src/pages/UserEdit.tsx:736",className:"text-xs text-red-400",children:"As senhas não coincidem"}),v&&v.length>=6&&j===v&&e.jsx("p",{"data-loc":"client/src/pages/UserEdit.tsx:739",className:"text-xs text-green-400",children:"Senhas conferem â"}),!c&&v&&v.length>=6&&j===v&&e.jsx(oe,{"data-loc":"client/src/pages/UserEdit.tsx:742",size:"sm",variant:"outline",className:"w-fit text-xs h-7",disabled:le.isPending,onClick:()=>{t&&le.mutate({userId:parseInt(t),password:v})},children:le.isPending?"Salvando...":"Salvar nova senha"})]}),e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:757",className:"flex flex-col gap-1",children:[e.jsx("label",{"data-loc":"client/src/pages/UserEdit.tsx:758",className:"text-xs text-foreground
646/50",children:"Data nascimento"}),e.jsx(ge,{"data-loc":"client/src/pages/UserEdit.tsx:759",value:g.dataNascimento,onChange:Z=>b(fe=>({...fe,dataNascimento:Z.target.value})),placeholder:"DD/MM/AAAA",className:"h-8 text-sm bg-background border-border text-foreground"})]}),e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:767",className:"flex flex-col gap-1",children:[e.jsx("label",{"data-loc":"client/src/pages/UserEdit.tsx:768",className:"text-xs text-foreground/50",children:"Data admissão"}),e.jsx(ge,{"data-loc":"client/src/pages/UserEdit.tsx:769",value:g.dataAdmissao,onChange:Z=>b(fe=>({...fe,dataAdmissao:Z.target.value})),placeholder:"DD/MM/AAAA",className:"h-8 text-sm bg-background border-border text-foreground"})]}),e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:777",className:"flex flex-col gap-1",children:[e.jsx("label",{"data-loc":"client/src/pages/UserEdit.tsx:778",className:"text-xs text-foreground/50",children:"Sexo"}),e.jsxs(Rl,{"data-loc":"client/src/pages/UserEdit.tsx:779",value:g.sexo,onChange:Z=>b(fe=>({...fe,sexo:Z})),placeholder:"Selecione...",children:[e.jsx("option",{"data-loc":"client/src/pages/UserEdit.tsx:780",value:"masculino",children:"Masculino"}),e.jsx("option",{"data-loc":"client/src/pages/UserEdit.tsx:781",value:"feminino",children:"Feminino"}),e.jsx("option",{"data-loc":"client/src/pages/UserEdit.tsx:782",value:"outro",children:"Outro"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:786",className:"flex flex-col gap-1",children:[e.jsx("label",{"data-loc":"client/src/pages/UserEdit.tsx:787",className:"text-xs text-foreground/50",children:"Estado civil"}),e.jsxs(Rl,{"data-loc":"client/src/pages/UserEdit.tsx:788",value:g.estadoCivil,onChange:Z=>b(fe=>({...fe,estadoCivil:Z})),placeholder:"Selecione...",children:[e.jsx("option",{"data-loc":"client/src/pages/UserEdit.tsx:789",value:"solteiro",children:"Solteiro(a)"}),e.jsx("option",{"data-loc":"client/src/pages/UserEdit.tsx:790",value:"casado",children:"Casado(a)"}),e.jsx("option",{"data-loc":"client/src/pages/UserEdit.tsx:791",value:"divorciado",children:"Divorciado(a)"}),e.jsx("option",{"data-loc":"client/src/pages/UserEdit.tsx:792",value:"viuvo",children:"Viúvo(a)"}),e.jsx("option",{"data-loc":"client/src/pages/UserEdit.tsx:793",value:"uniao_estavel",children:"União estável"})]})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:800",className:"bg-card border border-border rounded-lg p-4 flex flex-col gap-3",children:[e.jsxs("h2",{"data-loc":"client/src/pages/UserEdit.tsx:801",className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[e.jsx(un,{"data-loc":"client/src/pages/UserEdit.tsx:802",className:"w-4 h-4 text-primary"}),"Endereço"]}),e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:805",className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:806",className:"flex flex-col gap-1",children:[e.jsx("label",{"data-loc":"client/src/pages/UserEdit.tsx:807",className:"text-xs text-foreground/50",children:"CEP"}),e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:808",className:"relative",children:[e.jsx(ge,{"data-loc":"client/src/pages/UserEdit.tsx:809",value:g.cep,onChange:async Z=>{const fe=Z.target.value.replace(/\D/g,""),Ee=fe.length>5?`${fe.slice(0,5)}-${fe.slice(5,8)}`:fe;if(b(Ie=>({...Ie,cep:Ee})),fe.length===8){p(!0);try{const qe=await(await fetch(`https://viacep.com.br/ws/${fe}/json/`)).json();qe.erro?ce.error("CEP não encontrado"):(b(Ve=>({...Ve,cep:Ee,endereco:qe.logradouro||Ve.endereco,bairro:qe.bairro||Ve.bairro,cidade:qe.localidade||Ve.cidade,estado:qe.uf||Ve.estado})),ce.success("CEP encontrado"))}catch{ce.error("Erro ao buscar CEP")}finally{p(!1)}}},placeholder:"00000-000",maxLength:9,className:"h-8 text-sm bg-background border-border text-foreground"}),x&&e.jsx("span",{"data-loc":"client/src/pages/UserEdit.tsx:845",className:"absolute right-2 top-1/2 -translate-y-1/2",children:e.jsxs("svg",{"data-loc":"client/src/pages/UserEdit.tsx:846",className:"w-3.5 h-3.5 text-primary animate-spin",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{"data-loc":"client/src/pages/UserEdit.tsx:847",className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{"data-loc":"client/src/pages/UserEdit.tsx:848",className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8H4z"})]})})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:855",className:"sm:col-span-2 flex flex-col gap-1",children:[e.jsx("label",{"data-loc":"client/src/pages/UserEdit.tsx:856",className:"text-xs text-foreground
646/50",children:"Endereço"}),e.jsx(ge,{"data-loc":"client/src/pages/UserEdit.tsx:857",value:g.endereco,onChange:Z=>b(fe=>({...fe,endereco:Z.target.value})),className:"h-8 text-sm bg-background border-border text-foreground"})]}),e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:864",className:"flex flex-col gap-1",children:[e.jsx("label",{"data-loc":"client/src/pages/UserEdit.tsx:865",className:"text-xs text-foreground/50",children:"Nº"}),e.jsx(ge,{"data-loc":"client/src/pages/UserEdit.tsx:866",value:g.numero,onChange:Z=>b(fe=>({...fe,numero:Z.target.value})),className:"h-8 text-sm bg-background border-border text-foreground"})]}),e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:873",className:"flex flex-col gap-1",children:[e.jsx("label",{"data-loc":"client/src/pages/UserEdit.tsx:874",className:"text-xs text-foreground/50",children:"Complemento"}),e.jsx(ge,{"data-loc":"client/src/pages/UserEdit.tsx:875",value:g.complemento,onChange:Z=>b(fe=>({...fe,complemento:Z.target.value})),className:"h-8 text-sm bg-background border-border text-foreground"})]}),e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:882",className:"flex flex-col gap-1",children:[e.jsx("label",{"data-loc":"client/src/pages/UserEdit.tsx:883",className:"text-xs text-foreground/50",children:"Bairro"}),e.jsx(ge,{"data-loc":"client/src/pages/UserEdit.tsx:884",value:g.bairro,onChange:Z=>b(fe=>({...fe,bairro:Z.target.value})),className:"h-8 text-sm bg-background border-border text-foreground"})]}),e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:891",className:"flex flex-col gap-1",children:[e.jsx("label",{"data-loc":"client/src/pages/UserEdit.tsx:892",className:"text-xs text-foreground/50",children:"Cidade - Estado"}),e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:893",className:"flex gap-1",children:[e.jsx(ge,{"data-loc":"client/src/pages/UserEdit.tsx:894",value:g.cidade,onChange:Z=>b(fe=>({...fe,cidade:Z.target.value})),placeholder:"Cidade",className:"h-8 text-sm bg-background border-border text-foreground flex-1"}),e.jsx(ge,{"data-loc":"client/src/pages/UserEdit.tsx:900",value:g.estado,onChange:Z=>b(fe=>({...fe,estado:Z.target.value.toUpperCase().slice(0,2)})),placeholder:"UF",maxLength:2,className:"h-8 text-sm bg-background border-border text-foreground w-14"})]})]})]})]})]})]}),d==="cursos"&&e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:917",className:"bg-card border border-border rounded-lg p-4 flex flex-col gap-4",children:[e.jsxs("h2",{"data-loc":"client/src/pages/UserEdit.tsx:918",className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[e.jsx(Hy,{"data-loc":"client/src/pages/UserEdit.tsx:919",className:"w-4 h-4 text-primary"}),"Cursos e treinamentos"]}),e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:923",className:"bg-primary/10 border border-primary/20 rounded-md px-3 py-2 text-xs text-primary flex items-center gap-2",children:[e.jsx(ms,{"data-loc":"client/src/pages/UserEdit.tsx:924",className:"w-3.5 h-3.5 shrink-0"}),"Para inserir um novo curso informe a data de realização e uma descrição e clique no botão +."]}),!c&&e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:930",className:"border border-border rounded-md p-3 flex flex-col gap-2",children:[e.jsx("p",{"data-loc":"client/src/pages/UserEdit.tsx:931",className:"text-xs text-foreground/50",children:"Dados para inclusão de curso"}),e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:932",className:"flex flex-col sm:flex-row gap-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:933",className:"flex flex-col gap-1 sm:w-48",children:[e.jsx("label",{"data-loc":"client/src/pages/UserEdit.tsx:934",className:"text-xs text-foreground/50",children:"Data curso"}),e.jsx(ge,{"data-loc":"client/src/pages/UserEdit.tsx:935",value:A,onChange:Z=>_(Z.target.value),placeholder:"DD/MM/AAAA",className:"h-8 text-sm bg-background border-red-500/40 focus:border-primary text-foreground"})]}),e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:942",className:"flex flex-col gap-1 flex-1",children:[e.jsx("label",{"data-loc":"client/src/pages/UserEdit.tsx:943",className:"text-xs text-foreground
646/50",children:"Descrição"}),e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:944",className:"flex gap-2",children:[e.jsx("textarea",{"data-loc":"client/src/pages/UserEdit.tsx:945",value:E,onChange:Z=>I(Z.target.value),rows:2,className:"flex-1 text-sm bg-background border border-red-500/40 focus:border-primary text-foreground rounded-md px-3 py-1.5 resize-none outline-none focus:ring-1 focus:ring-primary/30"}),e.jsx(oe,{"data-loc":"client/src/pages/UserEdit.tsx:951",size:"sm",onClick:K,disabled:M.isPending,className:"bg-primary hover:bg-[#B8955A] text-[#0A0A0B] h-8 w-8 p-0 self-end",children:e.jsx(Jt,{"data-loc":"client/src/pages/UserEdit.tsx:957",className:"w-4 h-4"})})]})]})]})]}),e.jsx("div",{"data-loc":"client/src/pages/UserEdit.tsx:966",className:"border border-border rounded-md overflow-hidden",children:e.jsxs("table",{"data-loc":"client/src/pages/UserEdit.tsx:967",className:"w-full text-sm",children:[e.jsx("thead",{"data-loc":"client/src/pages/UserEdit.tsx:968",children:e.jsxs("tr",{"data-loc":"client/src/pages/UserEdit.tsx:969",className:"border-b border-border bg-background",children:[e.jsx("th",{"data-loc":"client/src/pages/UserEdit.tsx:970",className:"text-left px-3 py-2 text-xs font-medium text-foreground/50 w-32",children:"Data"}),e.jsx("th",{"data-loc":"client/src/pages/UserEdit.tsx:971",className:"text-left px-3 py-2 text-xs font-medium text-foreground/50",children:"Descrição"}),e.jsx("th",{"data-loc":"client/src/pages/UserEdit.tsx:972",className:"w-10"})]})}),e.jsx("tbody",{"data-loc":"client/src/pages/UserEdit.tsx:975",children:D.length===0?e.jsx("tr",{"data-loc":"client/src/pages/UserEdit.tsx:977",children:e.jsx("td",{"data-loc":"client/src/pages/UserEdit.tsx:978",colSpan:3,className:"text-center py-6 text-foreground/30 text-xs",children:"Nenhum curso cadastrado"})}):D.map(Z=>e.jsxs("tr",{"data-loc":"client/src/pages/UserEdit.tsx:984",className:"border-b border-border hover:bg-border/30",children:[e.jsx("td",{"data-loc":"client/src/pages/UserEdit.tsx:985",className:"px-3 py-2 text-xs text-foreground/70",children:Z.dataCurso}),e.jsx("td",{"data-loc":"client/src/pages/UserEdit.tsx:986",className:"px-3 py-2 text-xs text-foreground",children:Z.descricao}),e.jsx("td",{"data-loc":"client/src/pages/UserEdit.tsx:987",className:"px-2 py-2",children:e.jsx(oe,{"data-loc":"client/src/pages/UserEdit.tsx:988",size:"sm",variant:"ghost",className:"w-6 h-6 p-0 text-red-400 hover:text-red-300 hover:bg-red-500/10",onClick:()=>O.mutate({id:Z.id,userId:parseInt(t)}),children:e.jsx(Ba,{"data-loc":"client/src/pages/UserEdit.tsx:994",className:"w-3 h-3"})})})]},Z.id))})]})})]}),d==="permissoes"&&e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:1008",className:"bg-card border border-border rounded-lg p-4 flex flex-col gap-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:1009",className:"flex items-center justify-between",children:[e.jsxs("h2",{"data-loc":"client/src/pages/UserEdit.tsx:1010",className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[e.jsx(Fu,{"data-loc":"client/src/pages/UserEdit.tsx:1011",className:"w-4 h-4 text-primary"}),"Permissões de acesso ao menu"]}),!Ce&&e.jsx("p",{"data-loc":"client/src/pages/UserEdit.tsx:1015",className:"text-xs text-foreground/40",children:"Use o botão âSalvar alteraçõesâ para gravar."})]}),Ce?e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:1019",className:"flex items-center gap-2 p-3 bg-primary/10 border border-primary/20 rounded-md",children:[e.jsx(Fu,{"data-loc":"client/src/pages/UserEdit.tsx:1020",className:"w-4 h-4 text-primary flex-shrink-0"}),e.jsxs("p",{"data-loc":"client/src/pages/UserEdit.tsx:1021",className:"text-sm text-foreground/70",children:["Usuários com role ",e.jsx("strong",{"data-loc":"client/src/pages/UserEdit.tsx:1022",className:"text-primary",children:"Admin"})," têm acesso irrestrito a todos os módulos. As permissões de menu não se aplicam a eles."]})]}):e.jsxs(e.Fragment,{children:[e.jsx("p",{"data-loc":"client/src/pages/UserEdit.tsx:1027",className:"text-xs text-foreground/40",children:"Ative ou desative os módulos que este usuário poderá visualizar na barra lateral. O que estiver desativado fica oculto para ele."}),e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:1030",className:"flex gap-2 mb-1",children:[e.jsx(oe,{"data-loc":"client/src/pages/UserEdit.tsx:1031",size:"sm",variant:"outline",className:"h-6 text-xs px-2 bg-transparent",onClick:()=>{const Z={};Ru.forEach(fe=>{Z[fe.path]={enabled:!0,mode:pe[fe.path]?.mode??"editar"}}),ae(Z)},children:"Ativar todos"}),e.jsx(oe,{"data-loc":"client/src/pages/UserEdit.tsx:1040",size:"sm",variant:"outline",className:"h-6 text-xs px-2 bg-transparent",onClick:()=>{const Z={};Ru.forEach(fe=>{Z[fe.path]={enabled:!1,mode:pe[fe.path]?.mode??"editar"}}),ae(Z)},children:"Desativar todos"})]}),e.jsx("div",{"data-loc":"client/src/pages/UserEdit.tsx:1050",className:"border border-border rounded-md divide-y divide-border",children:Ru.map(Z=>{const fe=pe[Z.path]??{enabled:!0,mode:"editar"};return e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:1054",className:"flex items-center justify-between px-4 py-2.5 hover:bg-border/20 gap-3",children:[e.jsx("span",{"data-loc":"client/src/pages/UserEdit.tsx:1055",className:"text-sm text-foreground flex-1",children:Z.label}),fe.enabled&&e.jsxs("select",{"data-loc":"client/src/pages/UserEdit.tsx:1058",value:fe.mode,onCh
646ange:Ee=>ae(Ie=>({...Ie,[Z.path]:{...Ie[Z.path],mode:Ee.target.value}})),className:"h-6 text-xs bg-background border border-border text-foreground rounded px-1.5 outline-none focus:ring-1 focus:ring-primary/50 cursor-pointer",children:[e.jsx("option",{"data-loc":"client/src/pages/UserEdit.tsx:1066",value:"editar",children:"Visualizar e editar"}),e.jsx("option",{"data-loc":"client/src/pages/UserEdit.tsx:1067",value:"visualizar",children:"Somente visualizar"})]}),e.jsx(Qf,{"data-loc":"client/src/pages/UserEdit.tsx:1070",checked:fe.enabled,onChange:Ee=>ae(Ie=>({...Ie,[Z.path]:{...Ie[Z.path]??{mode:"editar"},enabled:Ee}}))})]},Z.path)})})]})]}),d==="unidades"&&e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:1085",className:"bg-card border border-border rounded-lg p-4 flex flex-col gap-4",children:[e.jsxs("h2",{"data-loc":"client/src/pages/UserEdit.tsx:1086",className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[e.jsx(un,{"data-loc":"client/src/pages/UserEdit.tsx:1087",className:"w-4 h-4 text-primary"}),"Unidades"]}),e.jsx("div",{"data-loc":"client/src/pages/UserEdit.tsx:1090",className:"border border-border rounded-md divide-y divide-border",children:e.jsxs("div",{"data-loc":"client/src/pages/UserEdit.tsx:1091",className:"flex items-center justify-between px-4 py-3",children:[e.jsx("span",{"data-loc":"client/src/pages/UserEdit.tsx:1092",className:"text-sm text-foreground font-medium",children:"Pelotas"}),e.jsx(Qf,{"data-loc":"client/src/pages/UserEdit.tsx:1093",checked:!0,onChange:()=>{}})]})}),e.jsx("p",{"data-loc":"client/src/pages/UserEdit.tsx:1099",className:"text-xs text-foreground/40",children:"Selecione as unidades à s quais este usuário tem acesso."})]})]}),e.jsx("div",{"data-loc":"client/src/pages/UserEdit.tsx:1108",className:"flex justify-end",children:e.jsxs(oe,{"data-loc":"client/src/pages/UserEdit.tsx:1109",onClick:T,disabled:P,className:"bg-primary hover:bg-[#B8955A] text-[#0A0A0B] font-medium gap-2 h-8 text-sm",children:[e.jsx(ex,{"data-loc":"client/src/pages/UserEdit.tsx:1114",className:"w-3.5 h-3.5"}),P?"Salvando...":"Salvar alterações"]})})]})}function $h({connected:t}){return e.jsxs("span",{"data-loc":"client/src/pages/Integrations.tsx:15",className:`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium ${t?"bg-emerald-500/15 text-emerald-400 border border-emerald-500/30":"bg-zinc-800 text-zinc-400 border border-zinc-700"}`,children:[e.jsx("span",{"data-loc":"client/src/pages/Integrations.tsx:22",className:`w-1.5 h-1.5 rounded-full ${t?"bg-emerald-400":"bg-zinc-500"}`}),t?"Conectado":"Desconectado"]})}function Wh(){return e.jsx("div",{"data-loc":"client/src/pages/Integrations.tsx:29",className:"w-24 h-6 bg-border rounded-full animate-pulse"})}function f_({data:t}){return e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:34",className:"bg-card border border-border rounded-xl p-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:35",className:"flex items-start justify-between mb-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:36",className:"flex items-center gap-3",children:[e.jsx("div",{"data-loc":"client/src/pages/Integrations.tsx:37",className:"w-10 h-10 rounded-lg bg-border flex items-center justify-center",children:e.jsx("svg",{"data-loc":"client/src/pages/Integrations.tsx:38",width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",children:e.jsx("path",{"data-loc":"client/src/pages/Integrations.tsx:39",d:"M20.01 15.38c-1.23 0-2.42-.2-3.53-.56a.977.977 0 0 0-1.01.24l-1.57 1.97c-2.83-1.35-5.48-3.9-6.89-6.83l1.95-1.66c.27-.28.35-.67.24-1.02-.37-1.11-.56-2.3-.56-3.53 0-.54-.45-.99-.99-.99H4.19C3.65 3 3 3.24 3 3.99 3 13.28 10.73 21 20.01 21c.71 0 .99-.63.99-1.18v-3.45c0-.54-.45-.99-.99-.99z",fill:"#25D366"})})}),e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:42",children:[e.jsx("h3",{"data-loc":"client/src/pages/Integrations.tsx:43",className:"text-foreground font-semibold text-sm",children:"WhatsApp (Evolution API)"}),e.jsx("p",{"data-loc":"client/src/pages/Integrations.tsx:44",className:"text-[#71717A] text-xs mt-0.5",children:"Notificações automáticas via WhatsApp"})]})]}),t?e.jsx($h,{"data-loc":"client/src/pages/Integrations.tsx:47",connected:t.connected}):e.jsx(Wh,{"data-loc":"client/src/pages/Integrations.tsx:47"})]}),t&&e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:51",className:"bg-background border border-border rounded-lg p-3 mb-4 space-y-1.5",children:[t.instance&&e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:53",className:"flex items-center justify-between text-xs",children:[e.jsx("span",{"data-loc":"client/src/pages/Integrations.tsx:54",className:"text-[#71717A]",children:"Instância"}),e.jsx("span",{"data-loc":"client/src/pages/Integrations.tsx:55",className:"text-foreground font-mono text-[11px]",children:t.instance})]}),e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:58",className:"flex items-center justify-between text-xs",children:[e.jsx("span",{"data-loc":"client/src/pages/Integrations.tsx:59",className:"text-[#71717A]",children:"Status"}),e.jsx("span",{"data-loc":"client/src/pages/Integrations.tsx:60",className:`font-medium ${t.connected?"text-emerald-400":t.configured?"text-amber-400":"text-zinc-400"}`,children:t.connected?"open":t.configured?t.state:"Não configurado"})]})]}),e.jsx("p",{"data-loc":"client/src/pages/Integrations.tsx:67",className:"text-[#71717A] text-xs leading-relaxed",children:t?.configured?"Envia notificações automáticas para atendentes ao receber novos leads, mudanças de fase e lembretes de visita.":"Configure EVOLUTION_API_URL e EVOLUTION_API_KEY nas variáveis de ambiente para ativar."})]})}function g_({data:t}){return e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:79",className:"bg-card border border-border rounded-xl p-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:80",className:"flex items-start justify-between mb-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:81",className:"flex items-center gap-3",children:[e.jsx("div",{"data-loc":"client/src/pages/Integrations.tsx:82",className:"w-10 h-10 rounded-lg bg-border flex items-center justify-center",children:e.jsx("svg",{"data-loc":"client/src/pages/Integrations.tsx:83",width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",children:e.jsx("path",{"data-loc":"client/src/pages/Integrations.tsx:84",d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z",fill:"#1877F2"})})}),e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:87",children:[e.jsx("h3",{"data-loc":"client/src/pages/Integrations.tsx:88",className:"text-foreground font-semibold text-sm",children:"Meta Conversions API"}),e.jsx("p",{"data-loc":"client/src/pages/Integrations.tsx:89",className:"text-[#71717A] text-xs mt-0.5",children:"Eventos via Site API â Stape GTM SS"})]})]}),t?e.jsx($h,{"data-loc":"client/src/pages/Integrations.tsx:92",connected:t.connected}):e.jsx(Wh,{"data-loc":"client/src/pages/Integrations.tsx:92"})]}),t&&e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:96",className:"bg-background border border-border rounded-lg p-3 mb-4 space-y-1.5",children:[e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:97",className:"flex items-center justify-between text-xs",children:[e.jsx("span",{"data-loc":"client/src/pages/Integrations.tsx:98",className:"text-[#71717A]",children:"Roteamento"}),e.jsx("span",{"data-loc":"client/src/pages/Integrations.tsx:99",className:"text-foreground font-mono text-[11px]",children:t.pixelId||"Via Stape GTM SS"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:103",className:"flex items-center justify-between text-xs",children:[e.jsx("span",{"data-loc":"client/src/pages/Integrations.tsx:104",className:"text-[#71717A]",children:"API Key (CRM â Site)"}),e.jsx("span",{"data-loc":"client/src/pages/Integrations.tsx:105",className:`text-[11px] font-medium ${t.hasToken?"text-emerald-400":"text-amber-400"}`,children:t.hasToken?"Configurada":"Pendente"})]})]}),e.jsx("p",{"data-loc":"client/src/pages/Integrations.tsx:112",className:"text-[#71717A] text-xs leading-relaxed",children:t?.connected?"Eventos de conversão (Lead Qualificado / Lead Ouro) enviados via Site API â Stape GTM SS â Meta CAPI.":"Configure INTERNAL_API_KEY nas variáveis de ambiente para ativar a integração com o Site API."})]})}function h_({data:t}){return e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:124",className:"bg-card border border-border rounded-xl p-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:125",className:"flex items-start justify-between mb-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:126",className:"flex items-center gap-3",children:[e.jsx("div",{"data-loc":"client/src/pages/Integrations.tsx:127",className:"w-10 h-10 rounded-lg bg-border flex items-center justify-center",children:e.jsx("svg",{"data-loc":"client/src/pages/Integrations.tsx:128",width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",children:e.jsx("path",{"data-loc":"client/src/pages/Integrations.tsx:129",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z",fill:"#C9A96E"})})}),e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:132",children:[e.jsx("h3",{"data-loc":"client/src/pages/Integrations.tsx:133",className:"text-foreground font-semibold text-sm",children:"Site"}),e.jsx("p",{"data-loc":"client/src/pages/Integrations.tsx:134",className:"text-[#71717A] text-xs mt-0.5",children:"Recebimento de leads via API Key"})]})]}),t?e.jsx($h,{"data-loc":"client/src/pages/Integrations.tsx:137",connected:t.connected}):e.jsx(Wh,{"data-loc":"client/src/pages/Integrations.tsx:137"})]}),t&&e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:141",className:"bg-background border border-border rounded-lg p-3 mb-4 space-y-1.5",children:[e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:142",className:"flex items-center justify-between text-xs",children:[e.jsx("span",{"data-loc":"client/src/pages/Integrations.tsx:143",className:"text-[#71717A]",children:"Endpoint"}),e.jsx("span",{"data-loc":"client/src/pages/Integrations.tsx:144",className:"text-foreground font-mono text-[11px]",children:"POST /api/webhooks/leads"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:146",className:"flex items-center justify-between text-xs",children:[e.jsx("span",{"data-loc":"client/src/pages/Integrations.tsx:147",className:"text-[#71717A]",children:"Chaves ativas"}),e.jsx("span",{"data-loc":"client/src/pages/Integrations.tsx:148",className:`font-medium text-[11px] ${t.apiKeyCount>0?"text-emerald-400":"text-amber-400"}`,children:t.apiKeyCount>0?`${t.apiKeyCount} chave${t.apiKeyCount>1?"s":""}`:"Nenhuma"})]})]}),e.jsx("p",{"data-loc":"client/src/pages/Integrations.tsx:155",className:"text-[#71717A] text-xs leading-relaxed",children:t?.connected?"Recebendo leads do site automaticamente via API Key.":"Crie uma API Key em Configurações para ativar o recebimento de leads do site."})]})}function Gf({children:t}){return e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:168",className:"relative group",children:[e.jsx("pre",{"data-loc":"client/src/pages/Integrations.tsx:169",className:"bg-muted border border-border rounded-lg p-4 text-xs text-muted-foreground overflow-x-auto font-mono leading-relaxed whitespace-pre-wrap break-all",children:t}),e.jsx("button",{"data-loc":"client/src/pages/Integrations.tsx:172",onClick:()=>{navigator.clipboard.writeText(t).then(()=>ce.success("Copiado!"))},className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity p-1.5 rounded bg-background hover:bg-muted text-muted-foreground hover:text-foreground",title:"Copiar",children:e.jsx(zl,{"data-loc":"client/src/pages/Integrations.tsx:177",className:"w-3.5 h-3.5"})})]})}function v_(){const[t,s]=f.useState(!1),[r,l]=f.useState(""),[c,d]=f.useState(null),[u,x]=f.useState(null),[p,g]=f.useState(null),{data:b=[],refetch:v}=Y.apiKeys.list.useQuery(),y=Y.apiKeys.create.useMutation({onSuccess:w=>{d(w),l(""),v()},onError:w=>ce.error(w.message)}),j=Y.apiKeys.revoke.useMutation({onSuccess:()=>{ce.success("API Key revogada."),x(null),v()},onError:w=>ce.error(w.message)}),S=Y.apiKeys.delete.useMutation({onSuccess:()=>{ce.success("API Key removida."),g(null),v()},onError:w=>ce.error(w.message)}),N=window.location.origin;return e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:208",className:"space-y-6 mt-8",children:[e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:210",className:"bg-card border border-border rounded-xl p-6 space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:211",className:"flex items-center justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:212",className:"flex items-center gap-2",children:[e.jsx(Lg,{"data-loc":"client/src/pages/Integrations.tsx:213",className:"w-4 h-4 text-[#C9A96E]"}),e.jsx("h2",{"data-loc":"client/src/pages/Integrations.tsx:214",className:"text-sm font-semibold text-foreground",children:"API Keys â Site"}),e.jsxs(Qt,{"data-loc":"client/src/pages/Integrations.tsx:215",variant:"outline",className:"text-[10px] border-border text-[#71717A]",children:[b.filter(w=>w.active===1).length," ativas"]})]}),e.jsxs(oe,{"data-loc":"client/src/pages/Integrations.tsx:219",size:"sm",onClick:()=>s(!0),className:"bg-[#C9A96E] hover:bg-[#B8955A] text-[#0A0A0B] font-medium h-8 text-xs gap-1.5",children:[e.jsx(Jt,{"data-loc":"client/src/pages/Integrations.tsx:224",className:"w-3.5 h-3.5"}),"Nova chave"]})]}),b.length===0?e.jsx("div",{"data-loc":"client/src/pages/Integrations.tsx:230",className:"text-center py-6 text-[#71717A] text-sm",children:"Nenhuma API Key criada. Crie uma para integrar o site ao CRM."}):e.jsx("div",{"data-loc":"client/src/pages/Integrations.tsx:234",className:"space-y-2",children:b.map(w=>e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:236",className:`flex items-center gap-3 p-3 rounded-lg border ${w.active===1?"border-border bg-background":"border-border/50 bg-background/50 opacity-60"}`,children:[e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:242",className:"flex-1 min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:243",className:"flex items-center gap-2",children:[e.jsx("span",{"data-loc":"client/src/pages/Integrations.tsx:244",className:"text-sm text-foreground font-medium truncate",children:w.name}),w.active===1?e.jsx(Qt,{"data-loc":"client/src/pages/Integrations.tsx:246",className:"bg-emerald-500/10 text-emerald-400 border-emerald-500/20 text-[10px] border",children:"Ativa"}):e.jsx(Qt,{"data-loc":"client/src/pages/Integrations.tsx:248",className:"bg-red-500/10 text-red-400 border-red-500/20 text-[10px] border",children:"Revogada"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:251",className:"flex items-center gap-3 mt-0.5",children:[e.jsxs("span",{"data-loc":"client/src/pages/Integrations.tsx:252",className:"text-[11px] text-[#71717A] flex items-center gap-1",children:[e.jsx(Za,{"data-loc":"client/src/pages/Integrations.tsx:253",className:"w-3 h-3"}),"Criada em ",new Date(w.createdAt).toLocaleDateString("pt-BR")]}),w.lastUsedAt&&e.jsxs("span",{"data-loc":"client/src/pages/Integrations.tsx:257",className:"text-[11px] text-[#71717A] flex items-center gap-1",children:[e.jsx(Ka,{"data-loc":"client/src/pages/Integrations.tsx:258",className:"w-3 h-3 text-emerald-500"}),"Usado em ",new Date(w.lastUsedAt).toLocaleDateString("pt-BR")]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:264",className:"flex items-center gap-1.5 shrink-0",children:[w.active===1&&e.jsxs(oe,{"data-loc":"client/src/pages/Integrations.tsx:266",size:"sm",variant:"ghost",onClick:()=>x({id:w.id,name:w.name}),className:"
646h-7 px-2 text-[#71717A] hover:text-amber-400 hover:bg-amber-500/10 text-xs gap-1",children:[e.jsx(xM,{"data-loc":"client/src/pages/Integrations.tsx:272",className:"w-3.5 h-3.5"}),"Revogar"]}),e.jsx(oe,{"data-loc":"client/src/pages/Integrations.tsx:276",size:"sm",variant:"ghost",onClick:()=>g({id:w.id,name:w.name}),className:"h-7 px-2 text-[#71717A] hover:text-red-400 hover:bg-red-500/10",children:e.jsx(Ba,{"data-loc":"client/src/pages/Integrations.tsx:282",className:"w-3.5 h-3.5"})})]})]},w.id))})]}),e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:292",className:"bg-card border border-border rounded-xl p-6 space-y-5",children:[e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:293",className:"flex items-center gap-2",children:[e.jsx(pM,{"data-loc":"client/src/pages/Integrations.tsx:294",className:"w-4 h-4 text-[#C9A96E]"}),e.jsx("h2",{"data-loc":"client/src/pages/Integrations.tsx:295",className:"text-sm font-semibold text-foreground",children:"Documentação da API"}),e.jsx(Qt,{"data-loc":"client/src/pages/Integrations.tsx:296",variant:"outline",className:"text-[10px] border-border text-[#71717A]",children:"v1"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:299",className:"space-y-2",children:[e.jsx("p",{"data-loc":"client/src/pages/Integrations.tsx:300",className:"text-xs font-semibold text-[#71717A] uppercase tracking-wider",children:"URL Base"}),e.jsx(Gf,{"data-loc":"client/src/pages/Integrations.tsx:301",children:`${N}/api/v1`})]}),e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:304",className:"space-y-2",children:[e.jsx("p",{"data-loc":"client/src/pages/Integrations.tsx:305",className:"text-xs font-semibold text-[#71717A] uppercase tracking-wider",children:"Autenticação"}),e.jsxs("p",{"data-loc":"client/src/pages/Integrations.tsx:306",className:"text-xs text-[#71717A]",children:["Envie o header ",e.jsx("code",{"data-loc":"client/src/pages/Integrations.tsx:306",className:"text-[#C9A96E] bg-background px-1 py-0.5 rounded text-[11px]",children:"Authorization"})," em todas as requisições:"]}),e.jsx(Gf,{"data-loc":"client/src/pages/Integrations.tsx:307",children:"Authorization: Bearer h2o_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:310",className:"space-y-2",children:[e.jsx("p",{"data-loc":"client/src/pages/Integrations.tsx:311",className:"text-xs font-semibold text-[#71717A] uppercase tracking-wider",children:"Endpoints DisponÃveis"}),e.jsx("div",{"data-loc":"client/src/pages/Integrations.tsx:312",className:"bg-background border border-border rounded-lg divide-y divide-border",children:[{method:"GET",path:"/api/v1/health",desc:"Status da API"},{method:"POST",path:"/api/v1/leads/capture",desc:"Capturar lead do site (dedup + Meta CAPI)"},{method:"GET",path:"/api/v1/leads",desc:"Listar leads (paginado, filtros)"},{method:"GET",path:"/api/v1/leads/:id",desc:"Detalhes de um lead com atividades"},{method:"PATCH",path:"/api/v1/leads/:id/stage",desc:"Mover lead de etapa (dispara CONVERTED)"},{method:"POST",path:"/api/v1/leads/:id/enrich",desc:"Enriquecer lead com dados comportamentais"},{method:"POST",path:"/api/v1/events/track",desc:"Registrar evento comportamental do visitante"},{method:"GET",path:"/api/v1/pipelines",desc:"Listar pipelines e etapas"},{method:"GET",path:"/api/v1/config/pipelines",desc:"Configuração de pipelines por form_type"},{method:"GET",path:"/api/v1/contacts/lookup",desc:"Verificar se contato já existe (dedup)"},{method:"GET",path:"/api/v1/analytics/leads",desc:"Métricas de leads por perÃodo"},{method:"GET",path:"/api/v1/feed/meta-xml",desc:"Feed XML Meta Home Listings (Advantage+)"}].map(({method:w,path:D,desc:k})=>e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:327",className:"flex items-center gap-3 px-4 py-2.5",children:[e.jsx("span",{"data-loc":"client/src/pages/Integrations.tsx:328",className:`shrink-0 text-[10px] font-bold px-2 py-0.5 rounded border font-mono ${w==="GET"?"bg-emerald-500/10 text-emerald-400 border-emerald-500/20":w==="POST"?"bg-blue-500/10 text-blue-400 border-blue-500/20":w==="PATCH"?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-red-500/10 text-red-400 border-red-500/20"}`,children:w}),e.jsx("code",{"data-loc":"client/src/pages/Integrations.tsx:334",className:"text-[#C9A96E] text-xs font-mono flex-1",children:D}),e.jsx("span",{"data-loc":"client/src/pages/Integrations.tsx:335",className:"text-[#71717A] text-xs text-right",children:k})]},D))})]}),e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:341",className:"space-y-2",children:[e.jsx("p",{"data-loc":"client/src/pages/Integrations.tsx:342",className:"text-xs font-semibold text-[#71717A] uppercase tracking-wider",children:"Exemplo â Capturar Lead"}),e.jsx(Gf,{"data-loc":"client/src/pages/Integrations.tsx:343",children:`// POST /api/v1/leads/capture 647// Authorization: Bearer h2o_xxxxxxxx 648 649{ 650 "nome": "João Silva", 651 "telefone": "(47) 98448-3590", 652 "email": "[email protected]", 653 "form_type": "property_contact", 654 "codigo_imovel": "AP-001", 655 "url_pagina": "https://seusite.com.br/produto/001", 656 "utm_source": "google", 657 "utm_medium": "cpc", 658 "utm_campaign": "bc-apartamentos", 659 "fbp": "fb.1.1234567890.1234567890", 660 "fbc": "fb.1.1234567890.AbCdEfGhIjKlMnOp", 661 "meta_event_id": "evt_abc123" 662} 663 664// Resposta 201: 665{ 666 "success": true, 667 "lead_id": 42, 668 "merged": false, 669 "client_id": 17, 670 "pipeline_id": 1, 671 "stage_id": 1 672}`})]}),e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:372",className:"space-y-2",children:[e.jsx("p",{"data-loc":"client/src/pages/Integrations.tsx:373",className:"text-xs font-semibold text-[#71717A] uppercase tracking-wider",children:"Webhooks de SaÃda"}),e.jsxs("p",{"data-loc":"client/src/pages/Integrations.tsx:374",className:"text-xs text-[#71717A] leading-relaxed",children:["Configure webhooks na página ",e.jsx("strong",{"data-loc":"client/src/pages/Integrations.tsx:375",className:"text-foreground",children:"Webhooks & Leads"})," para receber notificações em tempo real quando eventos ocorrem no CRM. Cada dis
672paro inclui assinatura HMAC-SHA256 no header ",e.jsx("code",{"data-loc":"client/src/pages/Integrations.tsx:376",className:"text-[#C9A96E] bg-background px-1 py-0.5 rounded text-[11px]",children:"X-Webhook-Signature"})," para validação."]}),e.jsx("div",{"data-loc":"client/src/pages/Integrations.tsx:378",className:"bg-background border border-border rounded-lg divide-y divide-border",children:[{event:"lead.created",desc:"Novo lead capturado pelo site"},{event:"lead.stage_changed",desc:"Lead movido de etapa no funil"},{event:"property.created",desc:"Imóvel publicado no site"},{event:"property.updated",desc:"Imóvel atualizado (preço, fotos, dados)"},{event:"property.deleted",desc:"Imóvel removido/desativado"},{event:"enterprise.updated",desc:"Empreendimento criado/atualizado/removido"},{event:"feed.refresh_needed",desc:"Sync em lote concluÃdo â recarregar cache"}].map(({event:w,desc:D})=>e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:388",className:"flex items-center gap-3 px-4 py-2.5",children:[e.jsx("code",{"data-loc":"client/src/pages/Integrations.tsx:389",className:"text-[#C9A96E] text-xs font-mono flex-1",children:w}),e.jsx("span",{"data-loc":"client/src/pages/Integrations.tsx:390",className:"text-[#71717A] text-xs text-right",children:D})]},w))})]})]}),e.jsx(Rs,{"data-loc":"client/src/pages/Integrations.tsx:398",open:t,onOpenChange:w=>{s(w),w||d(null)},children:e.jsxs(Ts,{"data-loc":"client/src/pages/Integrations.tsx:399",className:"bg-card border-border text-foreground max-w-md",children:[e.jsx(_s,{"data-loc":"client/src/pages/Integrations.tsx:400",children:e.jsx(Ps,{"data-loc":"client/src/pages/Integrations.tsx:401",className:"text-foreground",children:c?"Chave criada com sucesso":"Nova API Key"})}),c?e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:406",className:"space-y-4",children:[e.jsx("p",{"data-loc":"client/src/pages/Integrations.tsx:407",className:"text-sm text-amber-400 bg-amber-500/10 border border-amber-500/20 rounded-lg p-3",children:"Copie esta chave agora. Ela não será exibida novamente por segurança."}),e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:410",className:"flex gap-2",children:[e.jsx(ge,{"data-loc":"client/src/pages/Integrations.tsx:411",value:c.key,readOnly:!0,className:"bg-background border-border text-[#C9A96E] font-mono text-xs"}),e.jsx(oe,{"data-loc":"client/src/pages/Integrations.tsx:412",size:"sm",variant:"outline",onClick:()=>{navigator.clipboard.writeText(c.key).then(()=>ce.success("Chave copiada!"))},className:"border-border hover:bg-border shrink-0",children:e.jsx(zl,{"data-loc":"client/src/pages/Integrations.tsx:413",className:"w-4 h-4"})})]}),e.jsx(Os,{"data-loc":"client/src/pages/Integrations.tsx:416",children:e.jsx(oe,{"data-loc":"client/src/pages/Integrations.tsx:417",onClick:()=>{s(!1),d(null)},className:"bg-[#C9A96E] hover:bg-[#B8955A] text-[#0A0A0B] font-medium",children:"Fechar"})})]}):e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:421",className:"space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:422",className:"space-y-1.5",children:[e.jsx("label",{"data-loc":"client/src/pages/Integrations.tsx:423",className:"text-xs text-[#71717A]",children:"Nome da chave"}),e.jsx(ge,{"data-loc":"client/src/pages/Integrations.tsx:424",placeholder:"Ex: Site",value:r,onChange:w=>l(w.target.value),onKeyDown:w=>w.key==="Enter"&&r.trim()&&y.mutate({name:r.trim()}),className:"bg-background border-border text-foreground placeholder:text-[#3A3A42]",autoFocus:!0})]}),e.jsxs(Os,{"data-loc":"client/src/pages/Integrations.tsx:433",children:[e.jsx(oe,{"data-loc":"client/src/pages/Integrations.tsx:434",variant:"ghost",onClick:()=>s(!1),className:"text-[#71717A] hover:text-foreground",children:"Cancelar"}),e.jsx(oe,{"data-loc":"client/src/pages/Integrations.tsx:435",onClick:()=>r.trim()&&y.mutate({name:r.trim()}),disabled:!r.trim()||y.isPending,className:"bg-[#C9A96E] hover:bg-[#B8955A] text-[#0A0A0B] font-medium",children:y.isPending?"Criando...":"Criar chave"})]})]})]})}),e.jsx(Ql,{"data-loc":"client/src/pages/Integrations.tsx:445",open:!!u,onOpenChange:w=>!w&&x(null),children:e.jsxs(Gl,{"data-loc":"client/src/pages/Integrations.tsx:446",className:"bg-card border-border text-foreground",children:[e.jsxs(Vl,{"data-loc":"client/src/pages/Integrations.tsx:447",children:[e.jsx(Yl,{"data-loc":"client/src/pages/Integrations.tsx:448",children:"Revogar API Key"}),e.jsxs(Xl,{"data-loc":"client/src/pages/Integrations.tsx:449",className:"text-[#71717A]",children:["A chave ",e.jsxs("strong",{"data-loc":"client/src/pages/Integrations.tsx:450",className:"text-foreground",children:['"',u?.name,'"']})," será desativada imediatamente."]})]}),e.jsxs(Kl,{"data-loc":"client/src/pages/Integrations.tsx:453",children:[e.jsx(Jl,{"data-loc":"client/src/pages/Integrations.tsx:454",className:"border-border text-[#71717A] hover:text-foreground hover:bg-border",children:"Cancelar"}),e.jsx(Zl,{"data-loc":"client/src/pages/Integrations.tsx:455",onClick:()=>u&&j.mutate({id:u.id}),className:"bg-amber-600 hover:bg-amber-700 text-white",children:"Revogar"})]})]})}),e.jsx(Ql,{"data-loc":"client/src/pages/Integrations.tsx:461",open:!!p,onOpenChange:w=>!w&&g(null),children:e.jsxs(Gl,{"data-loc":"client/src/pages/Integrations.tsx:462",className:"bg-card border-border text-foreground",children:[e.jsxs(Vl,{"data-loc":"client/src/pages/Integrations.tsx:463",children:[e.jsx(Yl,{"data-loc":"client/src/pages/Integrations.tsx:464",children:"Remover API Key"}),e.jsxs(Xl,{"data-loc":"client/src/pages/Integrations.tsx:465",className:"text-[#71717A]",children:["A chave ",e.jsxs("strong",{"data-loc":"client/src/pages/Integrations.tsx:466",className:"text-foreground",children:['"',p?.name,'"']})," será removida permanentemente."]})]}),e.jsxs(Kl,{"data-loc":"client/src/pages/Integrations.tsx:469",children:[e.jsx(Jl,{"data-loc":"client/src/pages/Integrations.tsx:470",className:"border-border text-[#71717A] hover:text-foreground hover:bg-border",children:"Cancelar"}),e.jsx(Zl,{"data-loc":"client/src/pages/Integrations.tsx:471",onClick:()=>p&&S.mutate({id:p.id}),className:"bg-red-600 hover:bg-red-700 text-white",children:"Remover"})]})]})})]})}function b_(){const{user:t}=ka(),s=t?.role==="admin"||t?.role==="gerente",{data:r,isLoading:l}=Y.integrations.status.useQuery(void 0,{enabled:s});return s?e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:500",className:"p-6 max-w-5xl mx-auto",children:[e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:501",className:"mb-8",children:[e.jsx("h1",{"data-loc":"client/src/pages/Integrations.tsx:502",className:"text-xl font-semibold text-foreground",children:"Integrações"}),e.jsx("p",{"data-loc":"client/src/pages/Integrations.tsx:503",className:"text-[#71717A] text-sm mt-1",children:"Gerencie as conexões do CRM com serviços externos."})]}),e.jsxs("div",{"data-loc":"client/src/pages/Integrations.tsx:508",className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsx(f_,{"data-loc":"client/src/pages/Integrations.tsx:509",data:l?void 0:r?.evolution}),e.jsx(g_,{"data-loc":"client/src/pages/Integrations.tsx:510",data:l?void 0:r?.meta}),e.jsx(h_,{"data-loc":"client/src/pages/Integrations.tsx:511",data:l?void 0:r?.site})]}),e.jsx(v_,{"data-loc":"client/src/pages/Integrations.tsx:514"})]}):e.jsx("div",{"data-loc":"client/src/pages/Integrations.tsx:493",className:"p-8 text-center",children:e.jsx("p",{"data-loc":"client/src/pages/Integrations.tsx:494",className:"text-[#71717A]",children:"Acesso restrito a administradores e gerentes."})})}function y_(){for(var t=arguments.length,s=new Array(t),r=0;r<t;r++)s[r]=arguments[r];return f.useMemo(()=>l=>
672{s.forEach(c=>c(l))},s)}const Yx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function gc(t){const s=Object.prototype.toString.call(t);return s==="[object Window]"||s==="[object global]"}function Qh(t){return"nodeType"in t}function es(t){var s,r;return t?gc(t)?t:Qh(t)&&(s=(r=t.ownerDocument)==null?void 0:r.defaultView)!=null?s:window:window}function Gh(t){const{Document:s}=es(t);return t instanceof s}function sd(t){return gc(t)?!1:t instanceof es(t).HTMLElement}function R3(t){return t instanceof es(t).SVGElement}function hc(t){return t?gc(t)?t.document:Qh(t)?Gh(t)?t:sd(t)||R3(t)?t.ownerDocument:document:document:document}const mn=Yx?f.useLayoutEffect:f.useEffect;function Xx(t){const s=f.useRef(t);return mn(()=>{s.current=t}),f.useCallback(function(){for(var r=arguments.length,l=new Array(r),c=0;c<r;c++)l[c]=arguments[c];return s.current==null?void 0:s.current(...l)},[])}function j_(){const t=f.useRef(null),s=f.useCallback((l,c)=>{t.current=setInterval(l,c)},[]),r=f.useCallback(()=>{t.current!==null&&(clearInterval(t.current),t.current=null)},[]);return[s,r]}function zi(t,s){s===void 0&&(s=[t]);const r=f.useRef(t);return mn(()=>{r.current!==t&&(r.current=t)},s),r}function nd(t,s){const r=f.useRef();return f.useMemo(()=>{const l=t(r.current);return r.current=l,l},[...s])}function lx(t){const s=Xx(t),r=f.useRef(null),l=f.useCallback(c=>{c!==r.current&&s?.(c,r.current),r.current=c},[]);return[r,l]}function ox(t){const s=f.useRef();return f.useEffect(()=>{s.current=t},[t]),s.current}let Vf={};function rd(t,s){return f.useMemo(()=>{if(s)return s;const r=Vf[t]==null?0:Vf[t]+1;return Vf[t]=r,t+"-"+r},[t,s])}function T3(t){return function(s){for(var r=arguments.length,l=new Array(r>1?r-1:0),c=1;c<r;c++)l[c-1]=arguments[c];return l.reduce((d,u)=>{const x=Object.entries(u);for(const[p,g]of x){const b=d[p];b!=null&&(d[p]=b+t*g)}return d},{...s})}}const Jo=T3(1),cx=T3(-1);function N_(t){return"clientX"in t&&"clientY"in t}function Zx(t){if(!t)return!1;const{KeyboardEvent:s}=es(t.target);return s&&t instanceof s}function C_(t){if(!t)return!1;const{TouchEvent:s}=es(t.target);return s&&t instanceof s}function ix(t){if(C_(t)){if(t.touches&&t.touches.length){const{clientX:s,clientY:r}=t.touches[0];return{x:s,y:r}}else if(t.changedTouches&&t.changedTouches.length){const{clientX:s,clientY:r}=t.changedTouches[0];return{x:s,y:r}}}return N_(t)?{x:t.clientX,y:t.clientY}:null}const xr=Object.freeze({Translate:{toString(t){if(!t)return;const{x:s,y:r}=t;return"translate3d("+(s?Math.round(s):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;const{scaleX:s,scaleY:r}=t;return"scaleX("+s+") scaleY("+r+")"}},Transform:{toString(t){if(t)return[xr.Translate.toString(t),xr.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:s,duration:r,easing:l}=t;return s+" "+r+"ms "+l}}}),Ij="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function w_(t){return t.matches(Ij)?t:t.querySelector(Ij)}const A_={display:"none"};function S_(t){let{id:s,value:r}=t;return ye.createElement("div",{id:s,style:A_},r)}function E_(t){let{id:s,announcement:r,ariaLiveType:l="assertive"}=t;const c={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return ye.createElement("div",{id:s,style:c,role:"status","aria-live":l,"aria-atomic":!0},r)}function D_(){const[t,s]=f.useState("");return{announce:f.useCallback(l=>{l!=null&&s(l)},[]),announcement:t}}const _3=f.createContext(null);function M_(t){const s=f.useContext(_3);f.useEffect(()=>{if(!s)throw new Error("useDndMonitor must be used within a children of <DndContext>");return s(t)},[t,s])}function L_(){const[t]=f.useState(()=>new Set),s=f.useCallback(l=>(t.add(l),()=>t.delete(l)),[t]);return[f.useCallback(l=>{let{type:c,event:d}=l;t.forEach(u=>{var x;return(x=u[c])==null?void 0:x.call(u,d)})},[t]),s]}const k_={draggable:` 673 To pick up a draggable item, press the space bar. 674 While dragging, use the arrow keys to move the item. 675 Press space again to drop the item in its new position, or press escape to cancel. 676 `},R_={onDragStart(t){let{active:s}=t;return"Picked up draggable item "+s.id+"."},onDragOver(t){let{active:s,over:r}=t;return r?"Draggable item "+s.id+" was moved over droppable area "+r.id+".":"Draggable item "+s.id+" is no longer over a droppable area."},onDragEnd(t){let{active:s,over:r}=t;return r?"Draggable item "+s.id+" was dropped over droppable area "+r.id:"Draggable item "+s.id+" was dropped."},onDragCancel(t){let{active:s}=t;return"Dragging was cancelled. Draggable item "+s.id+" was dropped."}};function T_(t){let{announcements:s=R_,container:r,hiddenTextDescribedById:l,screenReaderInstructions:c=k_}=t;const{announce:d,announcement:u}=D_(),x=rd("DndLiveRegion"),[p,g]=f.useState(!1);if(f.useEffect(()=>{g(!0)},[]),M_(f.useMemo(()=>({onDragStart(v){let{active:y}=v;d(s.onDragStart({active:y}))},onDragMove(v){let{active:y,over:j}
676=v;s.onDragMove&&d(s.onDragMove({active:y,over:j}))},onDragOver(v){let{active:y,over:j}=v;d(s.onDragOver({active:y,over:j}))},onDragEnd(v){let{active:y,over:j}=v;d(s.onDragEnd({active:y,over:j}))},onDragCancel(v){let{active:y,over:j}=v;d(s.onDragCancel({active:y,over:j}))}}),[d,s])),!p)return null;const b=ye.createElement(ye.Fragment,null,ye.createElement(S_,{id:l,value:c.draggable}),ye.createElement(E_,{id:x,announcement:u}));return r?dn.createPortal(b,r):b}var Aa;(function(t){t.DragStart="dragStart",t.DragMove="dragMove",t.DragEnd="dragEnd",t.DragCancel="dragCancel",t.DragOver="dragOver",t.RegisterDroppable="registerDroppable",t.SetDroppableDisabled="setDroppableDisabled",t.UnregisterDroppable="unregisterDroppable"})(Aa||(Aa={}));function dx(){}function __(t,s){return f.useMemo(()=>({sensor:t,options:s??{}}),[t,s])}function O_(){for(var t=arguments.length,s=new Array(t),r=0;r<t;r++)s[r]=arguments[r];return f.useMemo(()=>[...s].filter(l=>l!=null),[...s])}const fn=Object.freeze({x:0,y:0});function P_(t,s){return Math.sqrt(Math.pow(t.x-s.x,2)+Math.pow(t.y-s.y,2))}function z_(t,s){const r=ix(t);if(!r)return"0 0";const l={x:(r.x-s.left)/s.width*100,y:(r.y-s.top)/s.height*100};return l.x+"% "+l.y+"%"}function U_(t,s){let{data:{value:r}}=t,{data:{value:l}}=s;return r-l}function I_(t,s){let{data:{value:r}}=t,{data:{value:l}}=s;return l-r}function Bj(t){let{left:s,top:r,height:l,width:c}=t;return[{x:s,y:r},{x:s+c,y:r},{x:s,y:r+l},{x:s+c,y:r+l}]}function B_(t,s){if(!t||t.length===0)return null;const[r]=t;return r[s]}const F_=t=>{let{collisionRect:s,droppableRects:r,droppableContainers:l}=t;const c=Bj(s),d=[];for(const u of l){const{id:x}=u,p=r.get(x);if(p){const g=Bj(p),b=c.reduce((y,j,S)=>y+P_(g[S],j),0),v=Number((b/4).toFixed(4));d.push({id:x,data:{droppableContainer:u,value:v}})}}return d.sort(U_)};function H_(t,s){const r=Math.max(s.top,t.top),l=Math.max(s.left,t.left),c=Math.min(s.left+s.width,t.left+t.width),d=Math.min(s.top+s.height,t.top+t.height),u=c-l,x=d-r;if(l<c&&r<d){const p=s.width*s.height,g=t.width*t.height,b=u*x,v=b/(p+g-b);return Number(v.toFixed(4))}return 0}const q_=t=>{let{collisionRect:s,droppableRects:r,droppableContainers:l}=t;const c=[];for(const d of l){const{id:u}=d,x=r.get(u);if(x){const p=H_(x,s);p>0&&c.push({id:u,data:{droppableContainer:d,value:p}})}}return c.sort(I_)};function $_(t,s,r){return{...t,scaleX:s&&r?s.width/r.width:1,scaleY:s&&r?s.height/r.height:1}}function O3(t,s){return t&&s?{x:t.left-s.left,y:t.top-s.top}:fn}function W_(t){return function(r){for(var l=arguments.length,c=new Array(l>1?l-1:0),d=1;d<l;d++)c[d-1]=arguments[d];return c.reduce((u,x)=>({...u,top:u.top+t*x.y,bottom:u.bottom+t*x.y,left:u.left+t*x.x,right:u.right+t*x.x}),{...r})}}const Q_=W_(1);function P3(t){if(t.startsWith("matrix3d(")){const s=t.slice(9,-1).split(/, /);return{x:+s[12],y:+s[13],scaleX:+s[0],scaleY:+s[5]}}else if(t.startsWith("matrix(")){const s=t.slice(7,-1).split(/, /);return{x:+s[4],y:+s[5],scaleX:+s[0],scaleY:+s[3]}}return null}function G_(t,s,r){const l=P3(s);if(!l)return t;const{scaleX:c,scaleY:d,x:u,y:x}=l,p=t.left-u-(1-c)*parseFloat(r),g=t.top-x-(1-d)*parseFloat(r.slice(r.indexOf(" ")+1)),b=c?t.width/c:t.width,v=d?t.height/d:t.height;return{width:b,height:v,top:g,right:p+b,bottom:g+v,left:p}}const V_={ignoreTransform:!1};function vc(t,s){s===void 0&&(s=V_);let r=t.getBoundingClientRect();if(s.ignoreTransform){const{transform:g,transformOrigin:b}=es(t).getComputedStyle(t);g&&(r=G_(r,g,b))}const{top:l,left:c,width:d,height:u,bottom:x,right:p}=r;return{top:l,left:c,width:d,height:u,bottom:x,right:p}}function Fj(t){return vc(t,{ignoreTransform:!0})}function K_(t){const s=t.innerWidth,r=t.innerHeight;return{top:0,left:0,right:s,bottom:r,width:s,height:r}}function Y_(t,s){return s===void 0&&(s=es(t).getComputedStyle(t)),s.position==="fixed"}function X_(t,s){s===void 0&&(s=es(t).getComputedStyle(t));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(c=>{const d=s[c];return typeof d=="string"?r.test(d):!1})}function Vh(t,s){const r=[];function l(c){if(s!=null&&r.length>=s||!c)return r;if(Gh(c)&&c.scrollingElement!=null&&!r.includes(c.scrollingElement))return r.push(c.scrollingElement),r;if(!sd(c)||R3(c)||r.includes(c))return r;const d=es(t).getComputedStyle(c);return c!==t&&X_(c,d)&&r.push(c),Y_(c,d)?r:l(c.parentNode)}return t?l(t):r}function z3(t){const[s]=Vh(t,1);return s??null}function Kf(t){return!Yx||!t?null:gc(t)?t:Qh(t)?Gh(t)||t===hc(t).scrollingElement?window:sd(t)?t:null:null}function U3(t){return gc(t)?t.scrollX:t.scrollLeft}function I3(t){return gc(t)?t.scrollY:t.scrollTop}function Qg(t){return{x:U3(t),y:I3(t)}}var Ma;(function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"})(Ma||(Ma={}));function B3(t){return!Yx||!t?!1:t===document.scrollingElement}function F3(t){const s={x:0,y:0},r=B3(t)?{height:window.innerHeight,width:window.innerWidth}:{height:t.clientHeight,width:t.clientWidth},l={x:t.scrollWidth-r.width,y:t.scrollHeight-r.height},c=t.scrollTop<=s.y,d=t.scrollLeft<=s.x,u=t.scrollTop>=l.y,x=t.scrollLeft>=l.x;return{isTop:c,isLeft:d,isBottom:u,isRight:x,maxScroll:l,minScroll:s}}const Z_={x:.2,y:.2};function J_(t,s,r,l,c){let{top:d,left:u,right:x,bottom:p}=r;l===void 0&&(l=10),c===void 0&&(c=Z_);const{isTop:g,isBottom:b,isLeft:v,isRight:y}=F3(t),j={x:0,y:0},S={x:0,y:0},N={height:s.height*c.y,width:s.width*c.x};return!g&&d<=s.top+N.height?(j.y=Ma.Backward,S.y=l*Math.abs((s.top+N.height-d)/N.height)):!b&&p>=s.bottom-N.height&&(j.y=Ma.Forward,S.y=l*Math.abs((s.bottom-N.height-p)/N.height)),!y&&x>=s.right-N.width?(j.x=Ma.Forward,S.x=l*Math.abs((s.right-N.width-x)/N.width)):!v&&u<=s.left+N.width&&(j.x=Ma.Backward,S.x=l*Math.abs((s.left+N.width-u)/N.width)),{direction:j,speed:S}}function eO(t){if(t===document.scrollingElement){const{innerWidth:d,innerHeight:u}=window;return{top:0,left:0,right:d,bottom:u,width:d,height:u}}const{top:s,left:r,right:l,bottom:c}=t.getBoundingClientRect();return{top:s,left:r,right:l,bottom:c,width:t.clientWidth,height:t.clientHeight}}function H3(t){return t.reduce((s,r)=>Jo(s,Qg(r)),fn)}function tO(t){return t.reduce((s,r)=>s+U3(r),0)}function aO(t){return t.reduce((s,r)=>s+I3(r),0)}function q3(t,s){if(s===void 0&&(s=vc),!t)return;const{top:r,left:l,bottom:c,right:d}=s(t);z3(t)&&(c<=0||d<=0||r>=window.innerHeight||l>=window.innerWidth)&&t.scrollIntoView({block:"center",inline:"center"})}const sO=[["x",["left","right"],tO],["y",["top","bottom"],aO]];class Kh{constructor(s,r){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const l=Vh(r),c=H3(l);this.rect={...s},this.width=s.width,this.height=s.height;for(const[d,u,x]of sO)for(const p of u)Object.defineProperty(this,p,{get:()=>{const g=x(l),b=c[d]-g;return this.rect[p]+b},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class yi{constructor(s){this.target=void 0,this.listeners=[],this.removeAll=()=>
676{this.listeners.forEach(r=>{var l;return(l=this.target)==null?void 0:l.removeEventListener(...r)})},this.target=s}add(s,r,l){var c;(c=this.target)==null||c.addEventListener(s,r,l),this.listeners.push([s,r,l])}}function nO(t){const{EventTarget:s}=es(t);return t instanceof s?t:hc(t)}function Yf(t,s){const r=Math.abs(t.x),l=Math.abs(t.y);return typeof s=="number"?Math.sqrt(r**2+l**2)>s:"x"in s&&"y"in s?r>s.x&&l>s.y:"x"in s?r>s.x:"y"in s?l>s.y:!1}var Ks;(function(t){t.Click="click",t.DragStart="dragstart",t.Keydown="keydown",t.ContextMenu="contextmenu",t.Resize="resize",t.SelectionChange="selectionchange",t.VisibilityChange="visibilitychange"})(Ks||(Ks={}));function Hj(t){t.preventDefault()}function rO(t){t.stopPropagation()}var St;(function(t){t.Space="Space",t.Down="ArrowDown",t.Right="ArrowRight",t.Left="ArrowLeft",t.Up="ArrowUp",t.Esc="Escape",t.Enter="Enter",t.Tab="Tab"})(St||(St={}));const $3={start:[St.Space,St.Enter],cancel:[St.Esc],end:[St.Space,St.Enter,St.Tab]},lO=(t,s)=>{let{currentCoordinates:r}=s;switch(t.code){case St.Right:return{...r,x:r.x+25};case St.Left:return{...r,x:r.x-25};case St.Down:return{...r,y:r.y+25};case St.Up:return{...r,y:r.y-25}}};class W3{constructor(s){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=s;const{event:{target:r}}=s;this.props=s,this.listeners=new yi(hc(r)),this.windowListeners=new yi(es(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Ks.Resize,this.handleCancel),this.windowListeners.add(Ks.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Ks.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:s,onStart:r}=this.props,l=s.node.current;l&&q3(l),r(fn)}handleKeyDown(s){if(Zx(s)){const{active:r,context:l,options:c}=this.props,{keyboardCodes:d=$3,coordinateGetter:u=lO,scrollBehavior:x="smooth"}=c,{code:p}=s;if(d.end.includes(p)){this.handleEnd(s);return}if(d.cancel.includes(p)){this.handleCancel(s);return}const{collisionRect:g}=l.current,b=g?{x:g.left,y:g.top}:fn;this.referenceCoordinates||(this.referenceCoordinates=b);const v=u(s,{active:r,context:l.current,currentCoordinates:b});if(v){const y=cx(v,b),j={x:0,y:0},{scrollableAncestors:S}=l.current;for(const N of S){const w=s.code,{isTop:D,isRight:k,isLeft:A,isBottom:_,maxScroll:E,minScroll:I}=F3(N),R=eO(N),z={x:Math.min(w===St.Right?R.right-R.width/2:R.right,Math.max(w===St.Right?R.left:R.left+R.width/2,v.x)),y:Math.min(w===St.Down?R.bottom-R.height/2:R.bottom,Math.max(w===St.Down?R.top:R.top+R.height/2,v.y))},U=w===St.Right&&!k||w===St.Left&&!A,B=w===St.Down&&!_||w===St.Up&&!D;if(U&&z.x!==v.x){const F=N.scrollLeft+y.x,V=w===St.Right&&F<=E.x||w===St.Left&&F>=I.x;if(V&&!y.y){N.scrollTo({left:F,behavior:x});return}V?j.x=N.scrollLeft-F:j.x=w===St.Right?N.scrollLeft-E.x:N.scrollLeft-I.x,j.x&&N.scrollBy({left:-j.x,behavior:x});break}else if(B&&z.y!==v.y){const F=N.scrollTop+y.y,V=w===St.Down&&F<=E.y||w===St.Up&&F>=I.y;if(V&&!y.x){N.scrollTo({top:F,behavior:x});return}V?j.y=N.scrollTop-F:j.y=w===St.Down?N.scrollTop-E.y:N.scrollTop-I.y,j.y&&N.scrollBy({top:-j.y,behavior:x});break}}this.handleMove(s,Jo(cx(v,this.referenceCoordinates),j))}}}handleMove(s,r){const{onMove:l}=this.props;s.preventDefault(),l(r)}handleEnd(s){const{onEnd:r}=this.props;s.preventDefault(),this.detach(),r()}handleCancel(s){const{onCancel:r}=this.props;s.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}W3.activators=[{eventName:"onKeyDown",handler:(t,s,r)=>{let{keyboardCodes:l=$3,onActivation:c}=s,{active:d}=r;const{code:u}=t.nativeEvent;if(l.start.includes(u)){const x=d.activatorNode.current;return x&&t.target!==x?!1:(t.preventDefault(),c?.({event:t.nativeEvent}),!0)}return!1}}];function qj(t){return!!(t&&"distance"in t)}function $j(t){return!!(t&&"delay"in t)}class Yh{constructor(s,r,l){var c;l===void 0&&(l=nO(s.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=s,this.events=r;const{event:d}=s,{target:u}=d;this.props=s,this.events=r,this.document=hc(u),this.documentListeners=new yi(this.document),this.listeners=new yi(l),this.windowListeners=new yi(es(u)),this.initialCoordinates=(c=ix(d))!=null?c:fn,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:s,props:{options:{activationConstraint:r,bypassActivationConstraint:l}}}=this;if(this.listeners.add(s.move.name,this.handleMove,{passive:!1}),this.listeners.add(s.end.name,this.handleEnd),s.cancel&&this.listeners.add(s.cancel.name,this.handleCancel),this.windowListeners.add(Ks.Resize,this.handleCancel),this.windowListeners.add(Ks.DragStart,Hj),this.windowListeners.add(Ks.VisibilityChange,this.handleCancel),this.windowListeners.add(Ks.ContextMenu,Hj),this.documentListeners.add(Ks.Keydown,this.handleKeydown),r){if(l!=null&&l({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if($j(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(qj(r)){this.handlePending(r);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(s,r){const{active:l,onPending:c}=this.props;c(l,s,this.initialCoordinates,r)}handleStart(){const{initialCoordinates:s}=this,{onStart:r}=this.props;s&&(this.activated=!0,this.documentListeners.add(Ks.Click,rO,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Ks.SelectionChange,this.removeTextSelection),r(s))}handleMove(s){var r;const{activated:l,initialCoordinates:c,props:d}=this,{onMove:u,options:{activationConstraint:x}}=d;if(!c)return;const p=(r=ix(s))!=null?r:fn,g=cx(c,p);if(!l&&x){if(qj(x)){if(x.tolerance!=null&&Yf(g,x.tolerance))return this.handleCancel();if(Yf(g,x.distance))return this.handleStart()}if($j(x)&&Yf(g,x.tolerance))return this.handleCancel();this.handlePending(x,g);return}s.cancelable&&s.preventDefault(),u(p)}handleEnd(){const{onAbort:s,onEnd:r}=this.props;this.detach(),this.activated||s(this.props.active),r()}handleCancel(){const{onAbort:s,onCancel:r}=this.props;this.detach(),this.activated||s(this.props.active),r()}handleKeydown(s){s.code===St.Esc&&this.handleCancel()}removeTextSelection(){var s;(s=this.document.getSelection())==null||s.removeAllRanges()}}const oO={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Xh extends Yh{constructor(s){const{event:r}=s,l=hc(r.target);super(s,oO,l)}}
676Xh.activators=[{eventName:"onPointerDown",handler:(t,s)=>{let{nativeEvent:r}=t,{onActivation:l}=s;return!r.isPrimary||r.button!==0?!1:(l?.({event:r}),!0)}}];const cO={move:{name:"mousemove"},end:{name:"mouseup"}};var Gg;(function(t){t[t.RightClick=2]="RightClick"})(Gg||(Gg={}));class iO extends Yh{constructor(s){super(s,cO,hc(s.event.target))}}iO.activators=[{eventName:"onMouseDown",handler:(t,s)=>{let{nativeEvent:r}=t,{onActivation:l}=s;return r.button===Gg.RightClick?!1:(l?.({event:r}),!0)}}];const Xf={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class dO extends Yh{constructor(s){super(s,Xf)}static setup(){return window.addEventListener(Xf.move.name,s,{capture:!1,passive:!1}),function(){window.removeEventListener(Xf.move.name,s)};function s(){}}}dO.activators=[{eventName:"onTouchStart",handler:(t,s)=>{let{nativeEvent:r}=t,{onActivation:l}=s;const{touches:c}=r;return c.length>1?!1:(l?.({event:r}),!0)}}];var ji;(function(t){t[t.Pointer=0]="Pointer",t[t.DraggableRect=1]="DraggableRect"})(ji||(ji={}));var ux;(function(t){t[t.TreeOrder=0]="TreeOrder",t[t.ReversedTreeOrder=1]="ReversedTreeOrder"})(ux||(ux={}));function uO(t){let{acceleration:s,activator:r=ji.Pointer,canScroll:l,draggingRect:c,enabled:d,interval:u=5,order:x=ux.TreeOrder,pointerCoordinates:p,scrollableAncestors:g,scrollableAncestorRects:b,delta:v,threshold:y}=t;const j=pO({delta:v,disabled:!d}),[S,N]=j_(),w=f.useRef({x:0,y:0}),D=f.useRef({x:0,y:0}),k=f.useMemo(()=>{switch(r){case ji.Pointer:return p?{top:p.y,bottom:p.y,left:p.x,right:p.x}:null;case ji.DraggableRect:return c}},[r,c,p]),A=f.useRef(null),_=f.useCallback(()=>{const I=A.current;if(!I)return;const R=w.current.x*D.current.x,z=w.current.y*D.current.y;I.scrollBy(R,z)},[]),E=f.useMemo(()=>x===ux.TreeOrder?[...g].reverse():g,[x,g]);f.useEffect(()=>{if(!d||!g.length||!k){N();return}for(const I of E){if(l?.(I)===!1)continue;const R=g.indexOf(I),z=b[R];if(!z)continue;const{direction:U,speed:B}=J_(I,z,k,s,y);for(const F of["x","y"])j[F][U[F]]||(B[F]=0,U[F]=0);if(B.x>0||B.y>0){N(),A.current=I,S(_,u),w.current=B,D.current=U;return}}w.current={x:0,y:0},D.current={x:0,y:0},N()},[s,_,l,N,d,u,JSON.stringify(k),JSON.stringify(j),S,g,E,b,JSON.stringify(y)])}const xO={x:{[Ma.Backward]:!1,[Ma.Forward]:!1},y:{[Ma.Backward]:!1,[Ma.Forward]:!1}};function pO(t){let{delta:s,disabled:r}=t;const l=ox(s);return nd(c=>{if(r||!l||!c)return xO;const d={x:Math.sign(s.x-l.x),y:Math.sign(s.y-l.y)};return{x:{[Ma.Backward]:c.x[Ma.Backward]||d.x===-1,[Ma.Forward]:c.x[Ma.Forward]||d.x===1},y:{[Ma.Backward]:c.y[Ma.Backward]||d.y===-1,[Ma.Forward]:c.y[Ma.Forward]||d.y===1}}},[r,s,l])}function mO(t,s){const r=s!=null?t.get(s):void 0,l=r?r.node.current:null;return nd(c=>{var d;return s==null?null:(d=l??c)!=null?d:null},[l,s])}function fO(t,s){return f.useMemo(()=>t.reduce((r,l)=>{const{sensor:c}=l,d=c.activators.map(u=>({eventName:u.eventName,handler:s(u.handler,l)}));return[...r,...d]},[]),[t,s])}var Ui;(function(t){t[t.Always=0]="Always",t[t.BeforeDragging=1]="BeforeDragging",t[t.WhileDragging=2]="WhileDragging"})(Ui||(Ui={}));var Vg;(function(t){t.Optimized="optimized"})(Vg||(Vg={}));const Wj=new Map;function gO(t,s){let{dragging:r,dependencies:l,config:c}=s;const[d,u]=f.useState(null),{frequency:x,measure:p,strategy:g}=c,b=f.useRef(t),v=w(),y=zi(v),j=f.useCallback(function(D){D===void 0&&(D=[]),!y.current&&u(k=>k===null?D:k.concat(D.filter(A=>!k.includes(A))))},[y]),S=f.useRef(null),N=nd(D=>{if(v&&!r)return Wj;if(!D||D===Wj||b.current!==t||d!=null){const k=new Map;for(let A of t){if(!A)continue;if(d&&d.length>0&&!d.includes(A.id)&&A.rect.current){k.set(A.id,A.rect.current);continue}const _=A.node.current,E=_?new Kh(p(_),_):null;A.rect.current=E,E&&k.set(A.id,E)}return k}return D},[t,d,r,v,p]);return f.useEffect(()=>{b.current=t},[t]),f.useEffect(()=>{v||j()},[r,v]),f.useEffect(()=>{d&&d.length>0&&u(null)},[JSON.stringify(d)]),f.useEffect(()=>{v||typeof x!="number"||S.current!==null||(S.current=setTimeout(()=>{j(),S.current=null},x))},[x,v,j,...l]),{droppableRects:N,measureDroppableContainers:j,measuringScheduled:d!=null};function w(){switch(g){case Ui.Always:return!1;case Ui.BeforeDragging:return r;default:return!r}}}function Zh(t,s){return nd(r=>t?r||(typeof s=="function"?s(t):t):null,[s,t])}function hO(t,s){return Zh(t,s)}function vO(t){let{callback:s,disabled:r}=t;const l=Xx(s),c=f.useMemo(()=>
676{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:d}=window;return new d(l)},[l,r]);return f.useEffect(()=>()=>c?.disconnect(),[c]),c}function Jx(t){let{callback:s,disabled:r}=t;const l=Xx(s),c=f.useMemo(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:d}=window;return new d(l)},[r]);return f.useEffect(()=>()=>c?.disconnect(),[c]),c}function bO(t){return new Kh(vc(t),t)}function Qj(t,s,r){s===void 0&&(s=bO);const[l,c]=f.useState(null);function d(){c(p=>{if(!t)return null;if(t.isConnected===!1){var g;return(g=p??r)!=null?g:null}const b=s(t);return JSON.stringify(p)===JSON.stringify(b)?p:b})}const u=vO({callback(p){if(t)for(const g of p){const{type:b,target:v}=g;if(b==="childList"&&v instanceof HTMLElement&&v.contains(t)){d();break}}}}),x=Jx({callback:d});return mn(()=>{d(),t?(x?.observe(t),u?.observe(document.body,{childList:!0,subtree:!0})):(x?.disconnect(),u?.disconnect())},[t]),l}function yO(t){const s=Zh(t);return O3(t,s)}const Gj=[];function jO(t){const s=f.useRef(t),r=nd(l=>t?l&&l!==Gj&&t&&s.current&&t.parentNode===s.current.parentNode?l:Vh(t):Gj,[t]);return f.useEffect(()=>{s.current=t},[t]),r}function NO(t){const[s,r]=f.useState(null),l=f.useRef(t),c=f.useCallback(d=>{const u=Kf(d.target);u&&r(x=>x?(x.set(u,Qg(u)),new Map(x)):null)},[]);return f.useEffect(()=>{const d=l.current;if(t!==d){u(d);const x=t.map(p=>{const g=Kf(p);return g?(g.addEventListener("scroll",c,{passive:!0}),[g,Qg(g)]):null}).filter(p=>p!=null);r(x.length?new Map(x):null),l.current=t}return()=>{u(t),u(d)};function u(x){x.forEach(p=>{const g=Kf(p);g?.removeEventListener("scroll",c)})}},[c,t]),f.useMemo(()=>t.length?s?Array.from(s.values()).reduce((d,u)=>Jo(d,u),fn):H3(t):fn,[t,s])}function Vj(t,s){s===void 0&&(s=[]);const r=f.useRef(null);return f.useEffect(()=>{r.current=null},s),f.useEffect(()=>{const l=t!==fn;l&&!r.current&&(r.current=t),!l&&r.current&&(r.current=null)},[t]),r.current?cx(t,r.current):fn}function CO(t){f.useEffect(()=>{if(!Yx)return;const s=t.map(r=>{let{sensor:l}=r;return l.setup==null?void 0:l.setup()});return()=>{for(const r of s)r?.()}},t.map(s=>{let{sensor:r}=s;return r}))}function wO(t,s){return f.useMemo(()=>t.reduce((r,l)=>{let{eventName:c,handler:d}=l;return r[c]=u=>{d(u,s)},r},{}),[t,s])}function Q3(t){return f.useMemo(()=>t?K_(t):null,[t])}const Kj=[];function AO(t,s){s===void 0&&(s=vc);const[r]=t,l=Q3(r?es(r):null),[c,d]=f.useState(Kj);function u(){d(()=>t.length?t.map(p=>B3(p)?l:new Kh(s(p),p)):Kj)}const x=Jx({callback:u});return mn(()=>{x?.disconnect(),u(),t.forEach(p=>x?.observe(p))},[t]),c}function G3(t){if(!t)return null;if(t.children.length>1)return t;const s=t.children[0];return sd(s)?s:t}function SO(t){let{measure:s}=t;const[r,l]=f.useState(null),c=f.useCallback(g=>{for(const{target:b}of g)if(sd(b)){l(v=>{const y=s(b);return v?{...v,width:y.width,height:y.height}:y});break}},[s]),d=Jx({callback:c}),u=f.useCallback(g=>{const b=G3(g);d?.disconnect(),b&&d?.observe(b),l(b?s(b):null)},[s,d]),[x,p]=lx(u);return f.useMemo(()=>({nodeRef:x,rect:r,setRef:p}),[r,x,p])}const EO=[{sensor:Xh,options:{}},{sensor:W3,options:{}}],DO={current:{}},$u={draggable:{measure:Fj},droppable:{measure:Fj,strategy:Ui.WhileDragging,frequency:Vg.Optimized},dragOverlay:{measure:vc}};class Ni extends Map{get(s){var r;return s!=null&&(r=super.get(s))!=null?r:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(s=>{let{disabled:r}=s;return!r})}getNodeFor(s){var r,l;return(r=(l=this.get(s))==null?void 0:l.node.current)!=null?r:void 0}}const MO={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Ni,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:dx},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:$u,measureDroppableContainers:dx,windowRect:null,measuringScheduled:!1},V3={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:dx,draggableNodes:new Map,over:null,measureDroppableContainers:dx},ld=f.createContext(V3),K3=f.createContext(MO);function LO(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Ni}}}function kO(t,s){switch(s.type){case Aa.DragStart:return{...t,draggable:{...t.draggable,initialCoordinates:s.initialCoordinates,active:s.active}};case Aa.DragMove:return t.draggable.active==null?t:{...t,draggable:{...t.draggable,translate:{x:s.coordinates.x-t.draggable.initialCoordinates.x,y:s.coordinates.y-t.draggable.initialCoordinates.y}}};case Aa.DragEnd:case Aa.DragCancel:return{...t,draggable:{...t.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Aa.RegisterDroppable:{const{element:r}=s,{id:l}
676=r,c=new Ni(t.droppable.containers);return c.set(l,r),{...t,droppable:{...t.droppable,containers:c}}}case Aa.SetDroppableDisabled:{const{id:r,key:l,disabled:c}=s,d=t.droppable.containers.get(r);if(!d||l!==d.key)return t;const u=new Ni(t.droppable.containers);return u.set(r,{...d,disabled:c}),{...t,droppable:{...t.droppable,containers:u}}}case Aa.UnregisterDroppable:{const{id:r,key:l}=s,c=t.droppable.containers.get(r);if(!c||l!==c.key)return t;const d=new Ni(t.droppable.containers);return d.delete(r),{...t,droppable:{...t.droppable,containers:d}}}default:return t}}function RO(t){let{disabled:s}=t;const{active:r,activatorEvent:l,draggableNodes:c}=f.useContext(ld),d=ox(l),u=ox(r?.id);return f.useEffect(()=>{if(!s&&!l&&d&&u!=null){if(!Zx(d)||document.activeElement===d.target)return;const x=c.get(u);if(!x)return;const{activatorNode:p,node:g}=x;if(!p.current&&!g.current)return;requestAnimationFrame(()=>{for(const b of[p.current,g.current]){if(!b)continue;const v=w_(b);if(v){v.focus();break}}})}},[l,s,c,u,d]),null}function Y3(t,s){let{transform:r,...l}=s;return t!=null&&t.length?t.reduce((c,d)=>d({transform:c,...l}),r):r}function TO(t){return f.useMemo(()=>({draggable:{...$u.draggable,...t?.draggable},droppable:{...$u.droppable,...t?.droppable},dragOverlay:{...$u.dragOverlay,...t?.dragOverlay}}),[t?.draggable,t?.droppable,t?.dragOverlay])}function _O(t){let{activeNode:s,measure:r,initialRect:l,config:c=!0}=t;const d=f.useRef(!1),{x:u,y:x}=typeof c=="boolean"?{x:c,y:c}:c;mn(()=>{if(!u&&!x||!s){d.current=!1;return}if(d.current||!l)return;const g=s?.node.current;if(!g||g.isConnected===!1)return;const b=r(g),v=O3(b,l);if(u||(v.x=0),x||(v.y=0),d.current=!0,Math.abs(v.x)>0||Math.abs(v.y)>0){const y=z3(g);y&&y.scrollBy({top:v.y,left:v.x})}},[s,u,x,l,r])}const ep=f.createContext({...fn,scaleX:1,scaleY:1});var Wr;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Initializing=1]="Initializing",t[t.Initialized=2]="Initialized"})(Wr||(Wr={}));const OO=f.memo(function(s){var r,l,c,d;let{id:u,accessibility:x,autoScroll:p=!0,children:g,sensors:b=EO,collisionDetection:v=q_,measuring:y,modifiers:j,...S}=s;const N=f.useReducer(kO,void 0,LO),[w,D]=N,[k,A]=L_(),[_,E]=f.useState(Wr.Uninitialized),I=_===Wr.Initialized,{draggable:{active:R,nodes:z,translate:U},droppable:{containers:B}}=w,F=R!=null?z.get(R):null,V=f.useRef({initial:null,translated:null}),de=f.useMemo(()=>{var Nt;return R!=null?{id:R,data:(Nt=F?.data)!=null?Nt:DO,rect:V}:null},[R,F]),le=f.useRef(null),[xe,M]=f.useState(null),[O,T]=f.useState(null),K=zi(S,Object.values(S)),ve=rd("DndDescribedBy",u),P=f.useMemo(()=>B.getEnabled(),[B]),J=TO(y),{droppableRects:W,measureDroppableContainers:H,measuringScheduled:te}=gO(P,{dragging:I,dependencies:[U.x,U.y],config:J.droppable}),pe=mO(z,R),ae=f.useMemo(()=>O?ix(O):null,[O]),Ne=$a(),Se=hO(pe,J.draggable.measure);_O({activeNode:R!=null?z.get(R):null,config:Ne.layoutShiftCompensation,initialRect:Se,measure:J.draggable.measure});const Ce=Qj(pe,J.draggable.measure,Se),ke=Qj(pe?pe.parentElement:null),Z=f.useRef({activatorEvent:null,active:null,activeNode:pe,collisionRect:null,collisions:null,droppableRects:W,draggableNodes:z,draggingNode:null,draggingNodeRect:null,droppableContainers:B,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),fe=B.getNodeFor((r=Z.current.over)==null?void 0:r.id),Ee=SO({measure:J.dragOverlay.measure}),Ie=(l=Ee.nodeRef.current)!=null?l:pe,qe=I?(c=Ee.rect)!=null?c:Ce:null,Ve=!!(Ee.nodeRef.current&&Ee.rect),Ht=yO(Ve?null:Ce),ht=Q3(Ie?es(Ie):null),Je=jO(I?fe??pe:null),q=AO(Je),Le=Y3(j,{transform:{x:U.x-Ht.x,y:U.y-Ht.y,scaleX:1,scaleY:1},activatorEvent:O,active:de,activeNodeRect:Ce,containerNodeRect:ke,draggingNodeRect:qe,over:Z.current.over,overlayNodeRect:Ee.rect,scrollableAncestors:Je,scrollableAncestorRects:q,windowRect:ht}),Be=ae?Jo(ae,U):null,Pe=NO(Je),mt=Vj(Pe),dt=Vj(Pe,[Ce]),qt=Jo(Le,mt),X=qe?Q_(qe,Le):null,vt=de&&X?v({active:de,collisionRect:X,droppableRects:W,droppableContainers:P,pointerCoordinates:Be}):null,et=B_(vt,"id"),[Ke,nt]=f.useState(null),Gt=Ve?Le:Jo(Le,dt),Vt=$_(Gt,(d=Ke?.rect)!=null?d:null,Ce),sa=f.useRef(null),Kt=f.useCallback((Nt,Et)=>{let{sensor:Re,options:tt}=Et;if(le.current==null)return;const ut=z.get(le.current);if(!ut)return;
676const ft=Nt.nativeEvent,Yt=new Re({active:le.current,activeNode:ut,event:ft,options:tt,context:Z,onAbort(ot){if(!z.get(ot))return;const{onDragAbort:Ct}=K.current,Rt={id:ot};Ct?.(Rt),k({type:"onDragAbort",event:Rt})},onPending(ot,na,Ct,Rt){if(!z.get(ot))return;const{onDragPending:It}=K.current,ra={id:ot,constraint:na,initialCoordinates:Ct,offset:Rt};It?.(ra),k({type:"onDragPending",event:ra})},onStart(ot){const na=le.current;if(na==null)return;const Ct=z.get(na);if(!Ct)return;const{onDragStart:Rt}=K.current,Sa={activatorEvent:ft,active:{id:na,data:Ct.data,rect:V}};dn.unstable_batchedUpdates(()=>{Rt?.(Sa),E(Wr.Initializing),D({type:Aa.DragStart,initialCoordinates:ot,active:na}),k({type:"onDragStart",event:Sa}),M(sa.current),T(ft)})},onMove(ot){D({type:Aa.DragMove,coordinates:ot})},onEnd:rt(Aa.DragEnd),onCancel:rt(Aa.DragCancel)});sa.current=Yt;function rt(ot){return async function(){const{active:Ct,collisions:Rt,over:Sa,scrollAdjustedTranslate:It}=Z.current;let ra=null;if(Ct&&It){const{cancelDrop:gs}=K.current;ra={activatorEvent:ft,active:Ct,collisions:Rt,delta:It,over:Sa},ot===Aa.DragEnd&&typeof gs=="function"&&await Promise.resolve(gs(ra))&&(ot=Aa.DragCancel)}le.current=null,dn.unstable_batchedUpdates(()=>{D({type:ot}),E(Wr.Uninitialized),nt(null),M(null),T(null),sa.current=null;const gs=ot===Aa.DragEnd?"onDragEnd":"onDragCancel";if(ra){const Ea=K.current[gs];Ea?.(ra),k({type:gs,event:ra})}})}}},[z]),en=f.useCallback((Nt,Et)=>(Re,tt)=>{const ut=Re.nativeEvent,ft=z.get(tt);if(le.current!==null||!ft||ut.dndKit||ut.defaultPrevented)return;const Yt={active:ft};Nt(Re,Et.options,Yt)===!0&&(ut.dndKit={capturedBy:Et.sensor},le.current=tt,Kt(Re,Et))},[z,Kt]),ts=fO(b,en);CO(b),mn(()=>{Ce&&_===Wr.Initializing&&E(Wr.Initialized)},[Ce,_]),f.useEffect(()=>{const{onDragMove:Nt}=K.current,{active:Et,activatorEvent:Re,collisions:tt,over:ut}=Z.current;if(!Et||!Re)return;const ft={active:Et,activatorEvent:Re,collisions:tt,delta:{x:qt.x,y:qt.y},over:ut};dn.unstable_batchedUpdates(()=>{Nt?.(ft),k({type:"onDragMove",event:ft})})},[qt.x,qt.y]),f.useEffect(()=>{const{active:Nt,activatorEvent:Et,collisions:Re,droppableContainers:tt,scrollAdjustedTranslate:ut}=Z.current;if(!Nt||le.current==null||!Et||!ut)return;const{onDragOver:ft}=K.current,Yt=tt.get(et),rt=Yt&&Yt.rect.current?{id:Yt.id,rect:Yt.rect.current,data:Yt.data,disabled:Yt.disabled}:null,ot={active:Nt,activatorEvent:Et,collisions:Re,delta:{x:ut.x,y:ut.y},over:rt};dn.unstable_batchedUpdates(()=>{nt(rt),ft?.(ot),k({type:"onDragOver",event:ot})})},[et]),mn(()=>{Z.current={activatorEvent:O,active:de,activeNode:pe,collisionRect:X,collisions:vt,droppableRects:W,draggableNodes:z,draggingNode:Ie,draggingNodeRect:qe,droppableContainers:B,over:Ke,scrollableAncestors:Je,scrollAdjustedTranslate:qt},V.current={initial:qe,translated:X}},[de,pe,vt,X,z,Ie,qe,W,B,Ke,Je,qt]),uO({...Ne,delta:U,draggingRect:X,pointerCoordinates:Be,scrollableAncestors:Je,scrollableAncestorRects:q});const Ra=f.useMemo(()=>({active:de,activeNode:pe,activeNodeRect:Ce,activatorEvent:O,collisions:vt,containerNodeRect:ke,dragOverlay:Ee,draggableNodes:z,droppableContainers:B,droppableRects:W,over:Ke,measureDroppableContainers:H,scrollableAncestors:Je,scrollableAncestorRects:q,measuringConfiguration:J,measuringScheduled:te,windowRect:ht}),[de,pe,Ce,O,vt,ke,Ee,z,B,W,Ke,H,Je,q,J,te,ht]),as=f.useMemo(()=>({activatorEvent:O,activators:ts,active:de,activeNodeRect:Ce,ariaDescribedById:{draggable:ve},dispatch:D,draggableNodes:z,over:Ke,measureDroppableContainers:H}),[O,ts,de,Ce,D,ve,z,Ke,H]);return ye.createElement(_3.Provider,{value:A},ye.createElement(ld.Provider,{value:as},ye.createElement(K3.Provider,{value:Ra},ye.createElement(ep.Provider,{value:Vt},g)),ye.createElement(RO,{disabled:x?.restoreFocus===!1})),ye.createElement(T_,{...x,hiddenTextDescribedById:ve}));function $a(){const Nt=xe?.autoScrollEnabled===!1,Et=typeof p=="object"?p.enabled===!1:p===!1,Re=I&&!Nt&&!Et;return typeof p=="object"?{...p,enabled:Re}:{enabled:Re}}}),PO=f.createContext(null),Yj="button",zO="Draggable";function UO(t){let{id:s,data:r,disabled:l=!1,attributes:c}=t;const d=rd(zO),{activators:u,activatorEvent:x,active:p,activeNodeRect:g,ariaDescribedById:b,draggableNodes:v,over:y}=f.useContext(ld),{role:j=Yj,roleDescription:S="draggable",tabIndex:N=0}=c??{},w=p?.id===s,D=f.useContext(w?ep:PO),[k,A]=lx(),[_,E]=lx(),I=wO(u,s),R=zi(r);mn(()=>(v.set(s,{id:s,key:d,node:k,activatorNode:_,data:R}),()=>{const U=v.get(s);U&&U.key===d&&v.delete(s)}),[v,s]);const z=f.useMemo(()=>({role:j,tabIndex:N,"aria-disabled":l,"aria-pressed":w&&j===Yj?!0:void 0,"aria-roledescription":S,"aria-describedby":b.draggable}),[l,j,N,w,S,b.draggable]);return{active:p,activatorEvent:x,activeNodeRect:g,attributes:z,isDragging:w,listeners:l?void 0:I,node:k,over:y,setNodeRef:A,setActivatorNodeRef:E,transform:D}}function X3(){return f.useContext(K3)}const IO="Droppable",BO={timeout:25};function Z3(t){let{data:s,disabled:r=!1,id:l,resizeObserverConfig:c}=t;const d=rd(IO),{active:u,dispatch:x,over:p,measureDroppableContainers:g}=f.useContext(ld),b=f.useRef({disabled:r}),v=f.useRef(!1),y=f.useRef(null),j=f.useRef(null),{disabled:S,updateMeasurementsFor:N,timeout:w}={...BO,...c},D=zi(N??l),k=f.useCallback(()=>
676{if(!v.current){v.current=!0;return}j.current!=null&&clearTimeout(j.current),j.current=setTimeout(()=>{g(Array.isArray(D.current)?D.current:[D.current]),j.current=null},w)},[w]),A=Jx({callback:k,disabled:S||!u}),_=f.useCallback((z,U)=>{A&&(U&&(A.unobserve(U),v.current=!1),z&&A.observe(z))},[A]),[E,I]=lx(_),R=zi(s);return f.useEffect(()=>{!A||!E.current||(A.disconnect(),v.current=!1,A.observe(E.current))},[E,A]),f.useEffect(()=>(x({type:Aa.RegisterDroppable,element:{id:l,key:d,disabled:r,node:E,rect:y,data:R}}),()=>x({type:Aa.UnregisterDroppable,key:d,id:l})),[l]),f.useEffect(()=>{r!==b.current.disabled&&(x({type:Aa.SetDroppableDisabled,id:l,key:d,disabled:r}),b.current.disabled=r)},[l,d,r,x]),{active:u,rect:y,isOver:p?.id===l,node:E,over:p,setNodeRef:I}}function FO(t){let{animation:s,children:r}=t;const[l,c]=f.useState(null),[d,u]=f.useState(null),x=ox(r);return!r&&!l&&x&&c(x),mn(()=>{if(!d)return;const p=l?.key,g=l?.props.id;if(p==null||g==null){c(null);return}Promise.resolve(s(g,d)).then(()=>{c(null)})},[s,l,d]),ye.createElement(ye.Fragment,null,r,l?f.cloneElement(l,{ref:u}):null)}const HO={x:0,y:0,scaleX:1,scaleY:1};function qO(t){let{children:s}=t;return ye.createElement(ld.Provider,{value:V3},ye.createElement(ep.Provider,{value:HO},s))}const $O={position:"fixed",touchAction:"none"},WO=t=>Zx(t)?"transform 250ms ease":void 0,QO=f.forwardRef((t,s)=>{let{as:r,activatorEvent:l,adjustScale:c,children:d,className:u,rect:x,style:p,transform:g,transition:b=WO}=t;if(!x)return null;const v=c?g:{...g,scaleX:1,scaleY:1},y={...$O,width:x.width,height:x.height,top:x.top,left:x.left,transform:xr.Transform.toString(v),transformOrigin:c&&l?z_(l,x):void 0,transition:typeof b=="function"?b(l):b,...p};return ye.createElement(r,{className:u,style:y,ref:s},d)}),GO=t=>s=>{let{active:r,dragOverlay:l}=s;const c={},{styles:d,className:u}=t;if(d!=null&&d.active)for(const[x,p]of Object.entries(d.active))p!==void 0&&(c[x]=r.node.style.getPropertyValue(x),r.node.style.setProperty(x,p));if(d!=null&&d.dragOverlay)for(const[x,p]of Object.entries(d.dragOverlay))p!==void 0&&l.node.style.setProperty(x,p);return u!=null&&u.active&&r.node.classList.add(u.active),u!=null&&u.dragOverlay&&l.node.classList.add(u.dragOverlay),function(){for(const[p,g]of Object.entries(c))r.node.style.setProperty(p,g);u!=null&&u.active&&r.node.classList.remove(u.active)}},VO=t=>{let{transform:{initial:s,final:r}}=t;return[{transform:xr.Transform.toString(s)},{transform:xr.Transform.toString(r)}]},KO={duration:250,easing:"ease",keyframes:VO,sideEffects:GO({styles:{active:{opacity:"0"}}})};function YO(t){let{config:s,draggableNodes:r,droppableContainers:l,measuringConfiguration:c}=t;return Xx((d,u)=>{if(s===null)return;const x=r.get(d);if(!x)return;const p=x.node.current;if(!p)return;const g=G3(u);if(!g)return;const{transform:b}=es(u).getComputedStyle(u),v=P3(b);if(!v)return;const y=typeof s=="function"?s:XO(s);return q3(p,c.draggable.measure),y({active:{id:d,data:x.data,node:p,rect:c.draggable.measure(p)},draggableNodes:r,dragOverlay:{node:u,rect:c.dragOverlay.measure(g)},droppableContainers:l,measuringConfiguration:c,transform:v})})}function XO(t){const{duration:s,easing:r,sideEffects:l,keyframes:c}={...KO,...t};return d=>{let{active:u,dragOverlay:x,transform:p,...g}=d;if(!s)return;const b={x:x.rect.left-u.rect.left,y:x.rect.top-u.rect.top},v={scaleX:p.scaleX!==1?u.rect.width*p.scaleX/x.rect.width:1,scaleY:p.scaleY!==1?u.rect.height*p.scaleY/x.rect.height:1},y={x:p.x-b.x,y:p.y-b.y,...v},j=c({...g,active:u,dragOverlay:x,transform:{initial:p,final:y}}),[S]=j,N=j[j.length-1];if(JSON.stringify(S)===JSON.stringify(N))return;const w=l?.({active:u,dragOverlay:x,...g}),D=x.node.animate(j,{duration:s,easing:r,fill:"forwards"});return new Promise(k=>{D.onfinish=()=>{w?.(),k()}})}}let Xj=0;function ZO(t){return f.useMemo(()=>{if(t!=null)return Xj++,Xj},[t])}const JO=ye.memo(t=>{let{adjustScale:s=!1,children:r,dropAnimation:l,style:c,transition:d,modifiers:u,wrapperElement:x="div",className:p,zIndex:g=999}=t;const{activatorEvent:b,active:v,activeNodeRect:y,containerNodeRect:j,draggableNodes:S,droppableContainers:N,dragOverlay:w,over:D,measuringConfiguration:k,scrollableAncestors:A,scrollableAncestorRects:_,windowRect:E}=X3(),I=f.useContext(ep),R=ZO(v?.id),z=Y3(u,{activatorEvent:b,active:v,activeNodeRect:y,containerNodeRect:j,draggingNodeRect:w.rect,over:D,overlayNodeRect:w.rect,scrollableAncestors:A,scrollableAncestorRects:_,transform:I,windowRect:E}),U=Zh(y),B=YO({config:l,draggableNodes:S,droppableContainers:N,measuringConfiguration:k}),F=U?w.setRef:void 0;return ye.createElement(qO,null,ye.createElement(FO,{animation:B},v&&R?ye.createElement(QO,{key:R,id:v.id,ref:F,as:x,activatorEvent:b,adjustScale:s,className:p,transition:d,rect:U,style:{zIndex:g,...c},transform:z},r):null))});function Jh(t,s,r){const l=t.slice();return l.splice(r<0?l.length+r:r,0,l.splice(s,1)[0]),l}function eP(t,s){return t.reduce((r,l,c)=>{const d=s.get(l);return d&&(r[c]=d),r},Array(t.length))}function Tu(t){return t!==null&&t>=0}function tP(t,s){if(t===s)return!0;
676if(t.length!==s.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!==s[r])return!1;return!0}function aP(t){return typeof t=="boolean"?{draggable:t,droppable:t}:t}const _u={scaleX:1,scaleY:1},sP=t=>{var s;let{rects:r,activeNodeRect:l,activeIndex:c,overIndex:d,index:u}=t;const x=(s=r[c])!=null?s:l;if(!x)return null;const p=nP(r,u,c);if(u===c){const g=r[d];return g?{x:c<d?g.left+g.width-(x.left+x.width):g.left-x.left,y:0,..._u}:null}return u>c&&u<=d?{x:-x.width-p,y:0,..._u}:u<c&&u>=d?{x:x.width+p,y:0,..._u}:{x:0,y:0,..._u}};function nP(t,s,r){const l=t[s],c=t[s-1],d=t[s+1];return!l||!c&&!d?0:r<s?c?l.left-(c.left+c.width):d.left-(l.left+l.width):d?d.left-(l.left+l.width):l.left-(c.left+c.width)}const J3=t=>{let{rects:s,activeIndex:r,overIndex:l,index:c}=t;const d=Jh(s,l,r),u=s[c],x=d[c];return!x||!u?null:{x:x.left-u.left,y:x.top-u.top,scaleX:x.width/u.width,scaleY:x.height/u.height}},Ou={scaleX:1,scaleY:1},rP=t=>{var s;let{activeIndex:r,activeNodeRect:l,index:c,rects:d,overIndex:u}=t;const x=(s=d[r])!=null?s:l;if(!x)return null;if(c===r){const g=d[u];return g?{x:0,y:r<u?g.top+g.height-(x.top+x.height):g.top-x.top,...Ou}:null}const p=lP(d,c,r);return c>r&&c<=u?{x:0,y:-x.height-p,...Ou}:c<r&&c>=u?{x:0,y:x.height+p,...Ou}:{x:0,y:0,...Ou}};function lP(t,s,r){const l=t[s],c=t[s-1],d=t[s+1];return l?r<s?c?l.top-(c.top+c.height):d?d.top-(l.top+l.height):0:d?d.top-(l.top+l.height):c?l.top-(c.top+c.height):0:0}const e4="Sortable",t4=ye.createContext({activeIndex:-1,containerId:e4,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:J3,disabled:{draggable:!1,droppable:!1}});function a4(t){let{children:s,id:r,items:l,strategy:c=J3,disabled:d=!1}=t;const{active:u,dragOverlay:x,droppableRects:p,over:g,measureDroppableContainers:b}=X3(),v=rd(e4,r),y=x.rect!==null,j=f.useMemo(()=>l.map(I=>typeof I=="object"&&"id"in I?I.id:I),[l]),S=u!=null,N=u?j.indexOf(u.id):-1,w=g?j.indexOf(g.id):-1,D=f.useRef(j),k=!tP(j,D.current),A=w!==-1&&N===-1||k,_=aP(d);mn(()=>{k&&S&&b(j)},[k,j,S,b]),f.useEffect(()=>{D.current=j},[j]);const E=f.useMemo(()=>({activeIndex:N,containerId:v,disabled:_,disableTransforms:A,items:j,overIndex:w,useDragOverlay:y,sortedRects:eP(j,p),strategy:c}),[N,v,_.draggable,_.droppable,A,j,w,p,y,c]);return ye.createElement(t4.Provider,{value:E},s)}const oP=t=>{let{id:s,items:r,activeIndex:l,overIndex:c}=t;return Jh(r,l,c).indexOf(s)},cP=t=>{let{containerId:s,isSorting:r,wasDragging:l,index:c,items:d,newIndex:u,previousItems:x,previousContainerId:p,transition:g}=t;return!g||!l||x!==d&&c===u?!1:r?!0:u!==c&&s===p},iP={duration:200,easing:"ease"},s4="transform",dP=xr.Transition.toString({property:s4,duration:0,easing:"linear"}),uP={roleDescription:"sortable"};function xP(t){let{disabled:s,index:r,node:l,rect:c}=t;const[d,u]=f.useState(null),x=f.useRef(r);return mn(()=>{if(!s&&r!==x.current&&l.current){const p=c.current;if(p){const g=vc(l.current,{ignoreTransform:!0}),b={x:p.left-g.left,y:p.top-g.top,scaleX:p.width/g.width,scaleY:p.height/g.height};(b.x||b.y)&&u(b)}}r!==x.current&&(x.current=r)},[s,r,l,c]),f.useEffect(()=>{d&&u(null)},[d]),d}function n4(t){let{animateLayoutChanges:s=cP,attributes:r,disabled:l,data:c,getNewIndex:d=oP,id:u,strategy:x,resizeObserverConfig:p,transition:g=iP}=t;const{items:b,containerId:v,activeIndex:y,disabled:j,disableTransforms:S,sortedRects:N,overIndex:w,useDragOverlay:D,strategy:k}=f.useContext(t4),A=pP(l,j),_=b.indexOf(u),E=f.useMemo(()=>({sortable:{containerId:v,index:_,items:b},...c}),[v,c,_,b]),I=f.useMemo(()=>b.slice(b.indexOf(u)),[b,u]),{rect:R,node:z,isOver:U,setNodeRef:B}=Z3({id:u,data:E,disabled:A.droppable,resizeObserverConfig:{updateMeasurementsFor:I,...p}}),{active:F,activatorEvent:V,activeNodeRect:de,attributes:le,setNodeRef:xe,listeners:M,isDragging:O,over:T,setActivatorNodeRef:K,transform:ve}=UO({id:u,data:E,attributes:{...uP,...r},disabled:A.draggable}),P=y_(B,xe),J=!!F,W=J&&!S&&Tu(y)&&Tu(w),H=!D&&O,te=H&&W?ve:null,ae=W?te??(x??k)({rects:N,activeNodeRect:de,activeIndex:y,overIndex:w,index:_}):null,Ne=Tu(y)&&Tu(w)?d({id:u,items:b,activeIndex:y,overIndex:w}):_,Se=F?.id,Ce=f.useRef({activeId:Se,items:b,newIndex:Ne,containerId:v}),ke=b!==Ce.current.items,Z=s({active:F,containerId:v,isDragging:O,isSorting:J,id:u,index:_,items:b,newIndex:Ce.current.newIndex,previousItems:Ce.current.items,previousContainerId:Ce.current.containerId,transition:g,wasDragging:Ce.current.activeId!=null}),fe=xP({disabled:!Z,index:_,node:z,rect:R});return f.useEffect(()=>{J&&Ce.current.newIndex!==Ne&&(Ce.current.newIndex=Ne),v!==Ce.current.containerId&&(Ce.current.containerId=v),b!==Ce.current.items&&(Ce.current.items=b)},[J,Ne,v,b]),f.useEffect(()=>{if(Se===Ce.current.activeId)return;
676if(Se!=null&&Ce.current.activeId==null){Ce.current.activeId=Se;return}const Ie=setTimeout(()=>{Ce.current.activeId=Se},50);return()=>clearTimeout(Ie)},[Se]),{active:F,activeIndex:y,attributes:le,data:E,rect:R,index:_,newIndex:Ne,items:b,isOver:U,isSorting:J,isDragging:O,listeners:M,node:z,overIndex:w,over:T,setNodeRef:P,setActivatorNodeRef:K,setDroppableNodeRef:B,setDraggableNodeRef:xe,transform:fe??ae,transition:Ee()};function Ee(){if(fe||ke&&Ce.current.newIndex===_)return dP;if(!(H&&!Zx(V)||!g)&&(J||Z))return xr.Transition.toString({...g,property:s4})}}function pP(t,s){var r,l;return typeof t=="boolean"?{draggable:t,droppable:!1}:{draggable:(r=t?.draggable)!=null?r:s.draggable,droppable:(l=t?.droppable)!=null?l:s.droppable}}St.Down,St.Right,St.Up,St.Left;const xx=[{id:"lead_entrando",label:"LEAD ENTRANDO",color:"#4A9EFF"},{id:"lead_qualificado",label:"LEAD QUALIFICADO",color:"#22C55E"},{id:"lead_nao_qualificou",label:"LEAD NÃO QUALIFICOU",color:"#EF4444"},{id:"lead_ouro",label:"LEAD OURO",color:"#C9A96E"},{id:"corretor",label:"ATENDENTE",color:"#A855F7"},{id:"negociacao",label:"NEGOCIAÃÃO",color:"#F97316"}];Object.fromEntries(xx.map(t=>[t.id,t.label]));Object.fromEntries(xx.map(t=>[t.id,t.color]));function mP({card:t,campaignName:s,onClose:r,onCardUpdated:l}){const{user:c}=ka(),[d,u]=f.useState(t.stage),[x,p]=f.useState(t.assignedTo??null),[g,b]=f.useState(t.name),[v,y]=f.useState(t.phone??null),[j,S]=f.useState(t.email??null),[N,w]=f.useState(t.dealValue??null),[D,k]=f.useState(t.notes??null),[A,_]=f.useState(null),[E,I]=f.useState(""),[R,z]=f.useState(!1),[U,B]=f.useState(!1),[F,V]=f.useState(""),[de,le]=f.useState(!1),[xe,M]=f.useState(!1),[O,T]=f.useState(t.name),[K,ve]=f.useState(t.phone??""),[P,J]=f.useState(t.email??""),[W,H]=f.useState("chat"),[te,pe]=f.useState(""),[ae,Ne]=f.useState(!1),[Se,Ce]=f.useState(""),[ke,Z]=f.useState(""),[fe,Ee]=f.useState(null),[Ie,qe]=f.useState(null),Ve=f.useRef(null),Ht=10*1024*1024,[ht,Je]=f.useState(!1),q=f.useRef(null),Le=f.useRef(null),Be=f.useRef(null),Pe=f.useRef(null),mt=Y.useUtils(),{data:dt,refetch:qt}=Y.leadPanel.getLinks.useQuery({cardId:t.id}),X=t.externalId&&!isNaN(Number(t.externalId))?Number(t.externalId):null,{data:vt}=Y.siteLeads.get.useQuery({id:X},{enabled:X!==null,staleTime:0,retry:!1}),et=vt?.lead,Ke=fP(t.notes),{data:nt,refetch:Gt}=Y.leadPanel.getNotes.useQuery({cardId:t.id}),{data:Vt,refetch:sa}=Y.leadPanel.getTasks.useQuery({cardId:t.id}),{data:Kt,refetch:en}=Y.leadPanel.getAttachments.useQuery({cardId:t.id}),{data:ts,refetch:Ra}=Y.leadPanel.getChat.useQuery({cardId:t.id}),{data:as}=Y.users.list.useQuery(),{data:$a}=Y.clients.list.useQuery({search:F,limit:8},{enabled:F.length>=2}),Nt=Y.leadCampaigns.updateCard.useMutation({onSuccess:()=>l?.()}),Et=Y.leadPanel.addNote.useMutation({onSuccess:()=>{pe(""),Gt()}}),Re=Y.leadPanel.deleteNote.useMutation({onSuccess:()=>Gt()}),tt=Y.leadPanel.addTask.useMutation({onSuccess:()=>{pe(""),Ce(""),Z(""),sa()}}),ut=Y.leadPanel.completeTask.useMutation({onSuccess:()=>sa()}),ft=Y.leadPanel.deleteTask.useMutation({onSuccess:()=>sa()}),Yt=Y.leadPanel.sendMessage.useMutation({onSuccess:()=>{pe(""),Ra()}}),rt=Y.leadPanel.addAttachment.useMutation({onSuccess:()=>{Ee(null),qe(null),Ve.current&&(Ve.current.value=""),en()},onError:ue=>qe(ue.message||"Erro ao enviar o arquivo.")}),ot=Y.leadPanel.deleteAttachment.useMutation({onSuccess:()=>en()}),na=Y.leadPanel.setClientLink.useMutation({onSuccess:()=>{qt(),le(!1)}}),Ct=Y.leadPanel.createClientFromLead.useMutation({onSuccess:()=>{qt(),M(!1),l?.()}}),Rt=Y.leadCampaigns.deleteCard.useMutation({onSuccess:()=>{l?.(),r()}}),Sa=gP(ts,nt,Vt);f.useEffect(()=>{setTimeout(()=>q.current?.scrollIntoView({behavior:"smooth"}),100)},[ts,nt,Vt]),f.useEffect(()=>{function ue(lt){Le.current&&!Le.current.contains(lt.target)&&z(!1),Be.current&&!Be.current.contains(lt.target)&&B(!1),Pe.current&&!Pe.current.contains(lt.target)&&Je(!1)}return document.addEventListener("mousedown",ue),()=>document.removeEventListener("mousedown",ue)},[]);function It(ue,lt){_(ue),I(lt??"")}function ra(ue){const lt={id:t.id};
676if(ue==="name"&&(lt.name=E,b(E)),ue==="phone"&&(lt.phone=E||null,y(E||null)),ue==="email"&&(lt.email=E||null,S(E||null)),ue==="source"&&(lt.source=E||null),ue==="externalId"&&(lt.externalId=E||null),ue==="adAccountId"&&(lt.adAccountId=E||null),ue==="dealValue"){const ze=E?parseFloat(E):null;lt.dealValue=ze,w(ze)}ue==="notes"&&(lt.notes=E||null,k(E||null)),Nt.mutate(lt),_(null)}function gs(ue){u(ue),z(!1),Nt.mutate({id:t.id,stage:ue})}function Ea(ue){p(ue),B(!1),Nt.mutate({id:t.id,assignedTo:ue})}function aa(){if(te.trim())if(W==="chat")Yt.mutate({cardId:t.id,content:te.trim()});else if(W==="nota")Et.mutate({cardId:t.id,content:te.trim()});else if(W==="tarefa"){if(!Se)return;const ue=`${Se}T${ke||"09:00"}`;tt.mutate({cardId:t.id,title:te.trim(),dueAt:new Date(ue).getTime()})}else W==="whatsapp"&&xl()}function ya(){confirm(`Excluir o lead "${t.name}"? Esta ação não pode ser desfeita.`)&&Rt.mutate({id:t.id})}function Us(ue){return ue==null?"":ue<1024?`${ue} B`:ue<1024*1024?`${(ue/1024).toFixed(0)} KB`:`${(ue/(1024*1024)).toFixed(1)} MB`}function gr(ue){qe(null);const lt=ue.target.files?.[0]??null;if(lt&<.size>Ht){qe("Arquivo muito grande. O limite é 10 MB."),Ee(null),Ve.current&&(Ve.current.value="");return}Ee(lt)}function lo(){if(!fe||rt.isPending)return;qe(null);const ue=new FileReader;ue.onload=()=>{const lt=String(ue.result||""),ze=lt.includes(",")?lt.slice(lt.indexOf(",")+1):lt;if(!ze){qe("Não foi possÃvel ler o arquivo.");return}rt.mutate({cardId:t.id,fileName:fe.name,mimeType:fe.type||"application/octet-stream",fileBase64:ze})},ue.onerror=()=>qe("Falha ao ler o arquivo."),ue.readAsDataURL(fe)}const dl=(Vt??[]).filter(ue=>!ue.completedAt),bn=dl.filter(ue=>new Date(ue.dueAt)<new Date),tn={chat:"Bate-papo",nota:"Nota",tarefa:"Tarefa",whatsapp:"WhatsApp",anexo:"Anexo"},[yn,Wa]=f.useState(null),[hs,Qa]=f.useState(!1),[Is,Tt]=f.useState(null),hr=Y.whatsapp.getOrCreateConversationByCard.useMutation(),vr=Y.whatsapp.sendMessage.useMutation({onSuccess:()=>{pe(""),Ta(),mt.whatsapp.listConversations.invalidate()},onError:ue=>Tt(ue.message)}),{data:ja,refetch:Ta}=Y.whatsapp.getMessagesByCard.useQuery({cardId:t.id},{enabled:W==="whatsapp",refetchInterval:W==="whatsapp"?5e3:!1}),zn=yn??(ja?.conversation?Number(ja.conversation.id):null);f.useEffect(()=>{if(W==="whatsapp"&&!hs){if(!t.phone){Tt("Este lead não tem telefone cadastrado.");return}if(ja?.conversation){Wa(Number(ja.conversation.id));return}if(ja===void 0)return;yn||(Qa(!0),Tt(null),hr.mutateAsync({cardId:t.id,phone:t.phone,contactName:t.name}).then(ue=>{Wa(ue.conversationId),Ta()}).catch(ue=>{Tt(ue.message||"Erro ao abrir conversa WhatsApp")}).finally(()=>{Qa(!1)}))}},[W,ja]);async function ul(){if(!t.phone){Tt("Este lead não tem telefone cadastrado.");return}Qa(!0),Tt(null);try{const ue=await hr.mutateAsync({cardId:t.id,phone:t.phone,contactName:t.name});Wa(ue.conversationId)}catch(ue){Tt(ue.message||"Erro ao abrir conversa WhatsApp")}finally{Qa(!1)}}function xl(){!te.trim()||!zn||vr.mutate({conversationId:zn,text:te.trim()})}const Un=xx.find(ue=>ue.id===d),jn=(as??[]).find(ue=>ue.id===x);return e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:360",className:"fixed inset-0 z-[60] flex",onClick:r,children:[e.jsx("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:362",className:"absolute inset-0 bg-black/60 backdrop-blur-sm"}),e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:365",className:"relative z-10 flex flex-col w-full h-full bg-background",onClick:ue=>ue.stopPropagation(),children:[e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:370",className:"flex items-center justify-between px-4 py-3 border-b border-border bg-card",children:[e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:371",className:"flex items-center gap-3 min-w-0",children:[e.jsx("button",{"data-loc":"client/src/components/LeadCardDrawer.tsx:372",onClick:r,className:"text-zinc-400 hover:text-white transition-colors p-1 rounded hover:bg-white/5",children:e.jsx(Fl,{"data-loc":"client/src/components/LeadCardDrawer.tsx:373",size:18})}),e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:375",className:"min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:377",className:"flex items-center gap-2 flex-wrap",children:[t.source&&e.jsxs("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:379",className:"text-xs text-zinc-400",children:[t.source," Nº",t.externalId??"â"]}
676),t.adAccountId&&e.jsx("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:382",className:"text-[10px] px-1.5 py-0.5 rounded bg-zinc-700/50 text-zinc-400",children:t.adAccountId})]}),e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:386",className:"flex items-center gap-2 mt-0.5 flex-wrap",children:[s&&e.jsx("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:388",className:"text-xs text-zinc-500 uppercase font-medium",children:s}),e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:391",className:"relative",ref:Le,children:[e.jsxs("button",{"data-loc":"client/src/components/LeadCardDrawer.tsx:392",onClick:()=>z(!R),className:"flex items-center gap-1 text-xs font-semibold uppercase px-2 py-0.5 rounded hover:bg-white/5 transition-colors",style:{color:Un?.color??"#4A9EFF"},children:[Un?.label??d,e.jsx(Xa,{"data-loc":"client/src/components/LeadCardDrawer.tsx:398",size:12})]}),R&&e.jsx("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:401",className:"absolute left-0 top-full mt-1 w-56 bg-card border border-border rounded-lg shadow-2xl z-30 py-1",children:xx.map(ue=>e.jsxs("button",{"data-loc":"client/src/components/LeadCardDrawer.tsx:403",onClick:()=>gs(ue.id),className:`w-full text-left px-3 py-2 text-xs flex items-center gap-2 transition-colors ${ue.id===d?"bg-white/5":"hover:bg-white/5"}`,children:[e.jsx("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:410",className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:ue.color}}),e.jsx("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:411",style:{color:ue.color},children:ue.label}),ue.id===d&&e.jsx(Ya,{"data-loc":"client/src/components/LeadCardDrawer.tsx:412",size:12,className:"ml-auto text-primary"})]},ue.id))})]}),t.createdAt&&e.jsxs("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:419",className:"text-[10px] text-zinc-500",children:["(",new Date((typeof t.createdAt=="string",t.createdAt)).toLocaleDateString("pt-BR"),")"]})]})]})]}),e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:427",className:"relative",ref:Pe,children:[e.jsx("button",{"data-loc":"client/src/components/LeadCardDrawer.tsx:428",onClick:()=>Je(!ht),className:"p-1.5 rounded hover:bg-white/10 text-zinc-400 hover:text-white transition-colors",children:e.jsx(Mg,{"data-loc":"client/src/components/LeadCardDrawer.tsx:429",size:18})}),ht&&e.jsx("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:432",className:"absolute right-0 top-full mt-1 w-44 bg-card border border-border rounded-lg shadow-xl z-20 py-1",children:e.jsxs("button",{"data-loc":"client/src/components/LeadCardDrawer.tsx:433",onClick:()=>{Je(!1),ya()},className:"w-full text-left px-3 py-2 text-sm text-red-400 hover:bg-red-500/10 flex items-center gap-2 transition-colors",children:[e.jsx(Ba,{"data-loc":"client/src/components/LeadCardDrawer.tsx:437",size:14})," Excluir lead"]})})]})]}),e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:445",className:"flex flex-1 overflow-hidden flex-col md:flex-row",children:[e.jsx("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:448",className:"w-full md:w-[380px] flex-shrink-0 border-b md:border-b-0 md:border-r border-border overflow-y-auto bg-background max-h-[40vh] md:max-h-none",children:e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:449",className:"p-4 space-y-4",children:[e.jsxs("section",{"data-loc":"client/src/components/LeadCardDrawer.tsx:452",className:"space-y-0.5",children:[e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:454",className:"relative",ref:Be,children:[e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:455",className:"flex items-center py-1.5 px-2 rounded hover:bg-card transition-colors cursor-pointer group",onClick:()=>B(!U),children:[e.jsx("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:459",className:"text-xs text-zinc-500 w-[140px] flex-shrink-0",children:"Usuário responsável"}),e.jsx("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:460",className:`text-xs flex-1 truncate ${jn?"text-foreground":"text-zinc-600"}`,children:jn?.name??dt?.assignedName??"â"}),e.jsx(Xa,{"data-loc":"client/src/components/LeadCardDrawer.tsx:4
67663",size:10,className:"text-zinc-600 opacity-0 group-hover:opacity-100 transition-opacity ml-1"})]}),U&&e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:466",className:"absolute left-0 top-full mt-1 w-full bg-card border border-border rounded-lg shadow-2xl z-30 py-1 max-h-48 overflow-y-auto",children:[e.jsx("button",{"data-loc":"client/src/components/LeadCardDrawer.tsx:467",onClick:()=>Ea(null),className:"w-full text-left px-3 py-2 text-xs text-zinc-400 hover:bg-white/5 transition-colors",children:"â Nenhum"}),(as??[]).map(ue=>e.jsxs("button",{"data-loc":"client/src/components/LeadCardDrawer.tsx:474",onClick:()=>Ea(ue.id),className:`w-full text-left px-3 py-2 text-xs transition-colors flex items-center gap-2 ${ue.id===x?"text-primary bg-white/5":"text-foreground hover:bg-white/5"}`,children:[ue.name,ue.id===x&&e.jsx(Ya,{"data-loc":"client/src/components/LeadCardDrawer.tsx:482",size:12,className:"ml-auto text-primary"})]},ue.id))]})]}),e.jsx(rn,{"data-loc":"client/src/components/LeadCardDrawer.tsx:489",label:"Venda",value:t.dealValue?`R$${Number(t.dealValue).toLocaleString("pt-BR")}`:"R$0",icon:e.jsx(OM,{"data-loc":"client/src/components/LeadCardDrawer.tsx:489",size:13}),editing:A==="dealValue",editValue:E,onStartEdit:()=>It("dealValue",t.dealValue?.toString()),onChangeEdit:I,onSaveEdit:()=>ra("dealValue"),onCancelEdit:()=>_(null)}),e.jsx(rn,{"data-loc":"client/src/components/LeadCardDrawer.tsx:494",label:"Mensagem",value:t.notes??"â",icon:e.jsx(Rn,{"data-loc":"client/src/components/LeadCardDrawer.tsx:494",size:13}),multiline:!0,editing:A==="notes",editValue:E,onStartEdit:()=>It("notes",t.notes),onChangeEdit:I,onSaveEdit:()=>ra("notes"),onCancelEdit:()=>_(null)}),e.jsx(rn,{"data-loc":"client/src/components/LeadCardDrawer.tsx:499",label:"Cód. Imóvel",value:dt?.propertyCodigo??"â",icon:e.jsx(un,{"data-loc":"client/src/components/LeadCardDrawer.tsx:499",size:13})}),et?.urlPagina?e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:501",className:"flex items-start gap-2 py-1.5",children:[e.jsx(lr,{"data-loc":"client/src/components/LeadCardDrawer.tsx:502",size:13,className:"text-zinc-500 mt-0.5 shrink-0"}),e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:503",className:"flex-1 min-w-0",children:[e.jsx("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:504",className:"text-xs text-zinc-500 block",children:"URL de página"}),e.jsx("a",{"data-loc":"client/src/components/LeadCardDrawer.tsx:505",href:et.urlPagina,target:"_blank",rel:"noreferrer",className:"text-xs text-[#C9A96E] hover:underline break-all line-clamp-2",children:et.urlPagina})]})]}):e.jsx(rn,{"data-loc":"client/src/components/LeadCardDrawer.tsx:512",label:"URL de página",value:"â",icon:e.jsx(lr,{"data-loc":"client/src/components/LeadCardDrawer.tsx:512",size:13})}),e.jsx(rn,{"data-loc":"client/src/components/LeadCardDrawer.tsx:514",label:"Grupo de anúncios",value:t.adGroup??Ke.grupo??"â",icon:e.jsx(qo,{"data-loc":"client/src/components/LeadCardDrawer.tsx:514",size:13})}),e.jsx(rn,{"data-loc":"client/src/components/LeadCardDrawer.tsx:515",label:"UTM Source",value:et?.utmSource??t.utmSource??Ke.utmSource??t.source??"â",icon:e.jsx(qo,{"data-loc":"client/src/components/LeadCardDrawer.tsx:515",size:13}),editing:A==="source",editValue:E,onStartEdit:()=>It("source",et?.utmSource??t.source),onChangeEdit:I,onSaveEdit:()=>ra("source"),onCancelEdit:()=>_(null)}),e.jsx(rn,{"data-loc":"client/src/components/LeadCardDrawer.tsx:520",label:"UTM Medium",value:et?.utmMedium??t.utmMedium??Ke.utmMedium??"â",icon:e.jsx(qo,{"data-loc":"client/src/components/LeadCardDrawer.tsx:520",size:13})}),e.jsx(rn,{"data-loc":"client/src/components/LeadCardDrawer.tsx:521",label:"UTM Campaign",value:et?.utmCampaign??t.utmCampaign??Ke.utmCampaign??"â",icon:e.jsx(qo,{"data-loc":"client/src/components/LeadCardDrawer.tsx:521",size:13})}),e.jsx(rn,{"data-loc":"client/src/components/LeadCardDrawer.tsx:522",label:"UTM Term",value:et?.utmTerm??t.utmTerm??Ke.palavraChave??"â",icon:e.jsx(qo,{"data-loc":"client/src/components/LeadCardDrawer.tsx:522",size:13})}),e.jsx(rn,{"data-loc":"client/src/components/LeadCardDrawer.tsx:523",label:"Device",value:et?.device??"â",icon:e.jsx(qo,{"data-loc":"client/src/components/LeadCardDrawer.tsx:523",size:13})}),e.jsx(rn,{"data-loc":"client/src/components/LeadCardDrawer.tsx:524",label:"Identificação do lead",value:t.externalId??"â",icon:e.jsx(wM,{"data-loc":"client/src/components/LeadCardDrawer.tsx:524",size:13}),editing:A==="externalId",editValue:E,onStartEdit:()=>It("externalId",t.externalId),onChangeEdit:I,onSaveEdit:()=>ra("externalId"),onCancelEdit:()=>_(null)})]}),e.jsx("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:532",className:"border-t border-border"}),e.jsxs("section",{"data-loc":"client/src/components/LeadCardDrawer.tsx:535",children:[e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:536",className:"flex items-center gap-2 mb-3",children:[e.jsx("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:537",className:"w-8 h-8 rounded-full bg-border flex items-center justify-center",children:e.jsx(Ua,{"data-loc":"client/src/components/LeadCardDrawer.tsx:538",size:14,className:"text-zinc-400"})}),e.jsx("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:540",className:"flex-1 min-w-0",children:dt?.clientId?e.jsx("p",{"data-loc":"client/src/components/LeadCardDrawer.tsx:542",className:"text-sm font-medium text-foreground",children:dt.clientName}):e.jsx("p",{"data-loc":"client/src/components/LeadCardDrawer.tsx:544",className:"text-sm font-medium text-foreground",children:t.name})}),e.jsx("button",{"data-loc":"client/src/components/LeadCardDrawer.tsx:547",className:"text-zinc-500 hover:text-zinc-300 transition-colors",children:e.jsx(Mg,{"data-loc":"client/src/components/LeadCardDrawer.tsx:548",size:14})})]}),e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:552",className:"space-y-0.5 ml-10",children:[e.jsx(Zf,{"data-loc":"client/src/components/LeadCardDrawer.tsx:553",label:"Empresa",value:"â"}),e.jsx(Zf,{"data-loc":"client/src/components/LeadCardDrawer.tsx:554",label:"Tel. comercial",value:v?v.startsWith("+")?v:`+${v}`:"â",isLink:!!v,editing:A==="phone",editValue:E,onStartEdit:()=>It("phone",v),onChangeEdit:I,onSaveEdit:()=>ra("phone"),onCancelEdit:()=>_(null)}),e.jsx(Zf,{"data-loc":"client/src/components/LeadCardDrawer.tsx:561",label:"E-mail comercial",value:j??"â",isLink:!!j,editing:A==="email",editValue:E,onStartEdit:()=>It("email",j),onChangeEdit:I,onSaveEdit:()=>ra("email"),onCancelEdit:()=>_(null)})]}),!dt?.clientId&&e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:572",className:"mt-3 ml-10 space-y-2",children:[e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:573",className:"flex gap-3",children:[e.jsxs("button",{"data-loc":"client/src/components/LeadCardDrawer.tsx:574",onClick:()=>{le(!de),M(!1)},className:"flex items-center gap-1 text-xs text-zinc-400 hover:text-zinc-200 transition-colors",children:[e.jsx(Jt,{"data-loc":"client/src/components/LeadCardDrawer.tsx:575",size:12})," Adicionar contato"]}),e.jsxs("button",{"data-loc":"client/src/components/LeadCardDrawer.tsx:577",onClick:()=>{M(!xe),le(!1)},className:"flex items-center gap-1 text-xs text-zinc-400 hover:text-zinc-200 transition-colors",children:[e.jsx(vh,{"data-loc":"client/src/components/LeadCardDrawer.tsx:578",size:12})," Criar contato"]})]}),de&&e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:583",className:"space-y-2",children:[e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:584",className:"relative",children:[e.jsx(or,{"data-loc":"client/src/components/LeadCardDrawer.tsx:585",size:13,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-zinc-500"}),e.jsx(ge,{"data-loc":"client/src/components/LeadCardDrawer.tsx:586",value:F,onChange:ue=>V(ue.target.value),placeholder:"Buscar cliente...",className:"pl-7 bg-card border-border text-xs h-7",autoF
676ocus:!0})]}),$a?.data&&$a.data.length>0&&e.jsx("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:589",className:"border border-border rounded overflow-hidden max-h-40 overflow-y-auto",children:$a.data.map(ue=>e.jsx("button",{"data-loc":"client/src/components/LeadCardDrawer.tsx:591",onClick:()=>na.mutate({cardId:t.id,clientId:ue.id}),className:"w-full text-left px-2.5 py-1.5 text-xs hover:bg-white/5 text-foreground border-b border-border last:border-0 transition-colors",children:ue.name},ue.id))})]}),xe&&e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:601",className:"p-2.5 rounded bg-card border border-border space-y-1.5",children:[e.jsx(ge,{"data-loc":"client/src/components/LeadCardDrawer.tsx:602",value:O,onChange:ue=>T(ue.target.value),placeholder:"Nome*",className:"bg-background border-border text-xs h-7"}),e.jsx(ge,{"data-loc":"client/src/components/LeadCardDrawer.tsx:603",value:K,onChange:ue=>ve(ue.target.value),placeholder:"Telefone",className:"bg-background border-border text-xs h-7"}),e.jsx(ge,{"data-loc":"client/src/components/LeadCardDrawer.tsx:604",value:P,onChange:ue=>J(ue.target.value),placeholder:"E-mail",className:"bg-background border-border text-xs h-7"}),e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:605",className:"flex gap-2",children:[e.jsx(oe,{"data-loc":"client/src/components/LeadCardDrawer.tsx:606",size:"sm",className:"h-6 text-[10px] bg-primary hover:bg-[#d4b87a] text-black",onClick:()=>Ct.mutate({cardId:t.id,name:O,phone:K||void 0,email:P||void 0}),disabled:!O||Ct.isPending,children:"Criar"}),e.jsx(oe,{"data-loc":"client/src/components/LeadCardDrawer.tsx:609",size:"sm",variant:"ghost",className:"h-6 text-[10px]",onClick:()=>M(!1),children:"Cancelar"})]})]})]}),dt?.clientId&&e.jsx("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:617",className:"mt-2 ml-10",children:e.jsx("button",{"data-loc":"client/src/components/LeadCardDrawer.tsx:618",onClick:()=>na.mutate({cardId:t.id,clientId:null}),className:"text-[10px] text-zinc-600 hover:text-red-400 transition-colors",children:"Desvincular contato"})})]})]})}),e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:630",className:"flex-1 flex flex-col bg-background overflow-hidden",children:[e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:633",className:"flex-1 overflow-y-auto p-4 space-y-3",children:[Sa.length===0&&e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:635",className:"flex flex-col items-center justify-center h-full text-zinc-500 text-sm",children:[e.jsx(Rn,{"data-loc":"client/src/components/LeadCardDrawer.tsx:636",size:36,className:"mb-3 opacity-20"}),e.jsx("p",{"data-loc":"client/src/components/LeadCardDrawer.tsx:637",children:"Nenhuma interação ainda"}),e.jsx("p",{"data-loc":"client/src/components/LeadCardDrawer.tsx:638",className:"text-xs text-zinc-600 mt-1",children:"Use o campo abaixo para adicionar bate-papo, notas ou tarefas"})]}),Sa.map((ue,lt)=>e.jsx(hP,{"data-loc":"client/src/components/LeadCardDrawer.tsx:643",item:ue,user:c,onDeleteNote:ze=>Re.mutate({id:ze}),onCompleteTask:ze=>ut.mutate({id:ze}),onDeleteTask:ze=>ft.mutate({id:ze})},`${ue.type}-${ue.id}-${lt}`)),e.jsx("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:649",ref:q})]}),bn.length>0&&e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:654",className:"px-4 py-2 bg-amber-500/10 border-t border-amber-500/20 flex items-center gap-2",children:[e.jsx(ms,{"data-loc":"client/src/components/LeadCardDrawer.tsx:655",size:14,className:"text-amber-400"}),e.jsxs("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:656",className:"text-xs text-amber-300",children:[bn.length," tarefa",bn.length>1?"s":""," vencida",bn.length>1?"s":""]})]}),dl.length===0&&(Vt??[]).length===0&&e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:663",className:"px-4 py-2 bg-amber-500/5 border-t border-border flex items-center gap-2",children:[e.jsx("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:664",className:"text-xs text-amber-300/60",children:"â³"}),e.jsxs("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:665",className:"text-xs text-zinc-500",children:["Nenhuma tarefa planejada, comece"," ",e.jsx("button",{"data-loc":"client/src/components/LeadCardDrawer.tsx:667",onClick:()=>{H("tarefa")},className:"text-[#4A9EFF] hover:underline",children:"adicionando uma"})]})]}),e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:673",className:"border-t border-border bg-card",children:[W==="tarefa"&&e.jsx("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:676",className:"px-4 pt-3 pb-1",children:e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:677",className:"flex items-center gap-2 p-2.5 rounded bg-background border border-border flex-wrap",children:[e.jsx("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:678",className:"text-xs text-[#4A9EFF] font-medium",children:"Tarefa"}),e.jsx("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:679",className:"text-xs text-zinc-400",children:"vencimento"}),e.jsx("input",{"data-loc":"client/src/components/LeadCardDrawer.tsx:680",type:"date",value:Se,onChange:ue=>Ce(ue.target.value),className:"bg-transparent text-xs text-foreground border-b border-zinc-600 focus:border-[#4A9EFF] outline-none px-1"}),e.jsx("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:681",className:"text-xs text-zinc-400",children:"à s"}),e.jsx("input",{"data-loc":"client/src/components/LeadCardDrawer.tsx:682",type:"time",value:ke,onChange:ue=>Z(ue.target.value),className:"bg-transparent text-xs text-foreground border-b border-zinc-600 focus:border-[#4A9EFF] outline-none px-1"})]})}),W==="whatsapp"&&e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:689",className:"px-4 pt-3 pb-1",children:[Is&&e.jsx("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:691",className:"text-xs text-red-400 bg-red-400/10 rounded p-2 mb-2",children:Is}),zn?e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:711",className:"rounded bg-background border border-[#25D366]/20 overflow-hidden",children:[e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:712",className:"flex items-center gap-2 px-3 py-1.5 border-b border-[#25D366]/10 bg-[#25D366]/5",children:[e.jsx(Xr,{"data-loc":"client/src/components/LeadCardDrawer.tsx:713",size:12,className:"text-[#25D366]"}),e.jsxs("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:714",className:"text-[10px] text-[#25D366] font-medium",children:["WhatsApp ⢠",t.phone]}),e.jsx("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:715",className:"ml-auto text-[9px] text-zinc-500",children:"via +55 47 3170-4710"})]}),e.jsx("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:717",className:"max-h-48 overflow-y-auto p-2 space-y-1",children:(ja?.messages??[]).length===0?e.jsx("p",{"data-loc":"client/src/components/LeadCardDrawer.tsx:719",className:"text-[10px] text-zinc-500 text-center py-3",children:"Nenhuma mensagem ainda"}):(ja?.messages??[]).map(ue=>e.jsx("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:722",className:`flex ${ue.direction==="outbound"?"justify-end":"justify-start"}`,children:e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:723",className:`max-w-[80%] rounded-lg px-2.5 py-1.5 text-xs ${ue.direction==="outbound"?"bg-[#25D366]/20 text-zinc-200":"bg-zinc-800 text-zinc-200"}`,children:[e.jsx("p",{"data-loc":"client/src/components/LeadCardDrawer.tsx:728",children:ue.body}),e.jsxs("p",{"data-loc":"client/src/components/LeadCardDrawer.tsx:729",className:"text-[9px] text-zinc-500 mt-0.5 text-right",children:[new Date(ue.metaTimestamp).toLocaleTimeString("pt-BR",{hour:"2-digit",minute:"2-digit"}),ue.direction==="outbound"&&e.jsx("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:732",className:"ml-1",children:ue.status==="read"||ue.status==="delivered"?"ââ":"â"})]})]})}
676,ue.id))})]}):e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:694",className:"flex items-center gap-2 p-2.5 rounded bg-background border border-[#25D366]/30",children:[e.jsx(Xr,{"data-loc":"client/src/components/LeadCardDrawer.tsx:695",size:14,className:"text-[#25D366]"}),e.jsx("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:696",className:"text-xs text-zinc-400 flex-1",children:t.phone?`Abrir conversa com ${t.phone}`:"Sem telefone cadastrado"}),t.phone&&e.jsx(oe,{"data-loc":"client/src/components/LeadCardDrawer.tsx:700",size:"sm",className:"h-6 text-[10px] bg-[#25D366] hover:bg-[#1da851] text-white",onClick:ul,disabled:hs,children:hs?"Abrindo...":"Abrir"})]})]}),W==="nota"&&e.jsx("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:747",className:"px-4 pt-3 pb-1",children:e.jsx("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:748",className:"flex items-center gap-2 p-2.5 rounded bg-background border border-border",children:e.jsx("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:749",className:"text-xs text-[#4A9EFF] font-medium",children:"Nota:"})})}),W==="anexo"&&e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:756",className:"px-4 pt-3 pb-1",children:[e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:757",className:"rounded bg-background border border-border overflow-hidden",children:[e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:758",className:"flex items-center gap-2 px-3 py-1.5 border-b border-border",children:[e.jsx(Rg,{"data-loc":"client/src/components/LeadCardDrawer.tsx:759",size:12,className:"text-[#4A9EFF]"}),e.jsx("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:760",className:"text-[10px] text-[#4A9EFF] font-medium",children:"Anexos do lead"}),e.jsx("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:761",className:"ml-auto text-[9px] text-zinc-500",children:"até 10 MB ⢠PDF, Word, Excel, imagens"})]}),e.jsx("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:763",className:"max-h-48 overflow-y-auto p-2 space-y-1",children:(Kt??[]).length===0?e.jsx("p",{"data-loc":"client/src/components/LeadCardDrawer.tsx:765",className:"text-[10px] text-zinc-500 text-center py-3",children:"Nenhum anexo ainda"}):(Kt??[]).map(ue=>e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:768",className:"flex items-center gap-2 rounded px-2 py-1.5 bg-zinc-800/40 hover:bg-zinc-800/70",children:[e.jsx(Hl,{"data-loc":"client/src/components/LeadCardDrawer.tsx:769",size:14,className:"text-zinc-400 shrink-0"}),e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:770",className:"min-w-0 flex-1",children:[e.jsx("a",{"data-loc":"client/src/components/LeadCardDrawer.tsx:771",href:`/api/attachments/${ue.id}/download`,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-zinc-200 hover:text-[#4A9EFF] truncate block",title:ue.fileName,children:ue.fileName}),e.jsxs("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:772",className:"text-[9px] text-zinc-500",children:[Us(ue.fileSize),ue.uploaderName?` ⢠${ue.uploaderName}`:""," ⢠",new Date(ue.createdAt).toLocaleDateString("pt-BR")]})]}),e.jsx("a",{"data-loc":"client/src/components/LeadCardDrawer.tsx:776",href:`/api/attachments/${ue.id}/download`,target:"_blank",rel:"noopener noreferrer",download:!0,className:"text-zinc-400 hover:text-[#4A9EFF] p-1",title:"Baixar",children:e.jsx(gh,{"data-loc":"client/src/components/LeadCardDrawer.tsx:776",size:13})}),e.jsx("button",{"data-loc":"client/src/components/LeadCardDrawer.tsx:777",onClick:()=>{confirm(`Remover o anexo "${ue.fileName}"?`)&&ot.mutate({id:ue.id})},className:"text-zinc-500 hover:text-red-400 p-1",title:"Remover",children:e.jsx(Ba,{"data-loc":"client/src/components/LeadCardDrawer.tsx:781",size:13})})]},ue.id))})]}),Ie&&e.jsx("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:787",className:"text-xs text-red-400 bg-red-400/10 rounded p-2 mt-2",children:Ie})]}),e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:792",className:"p-4",children:[W==="anexo"?e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:794",className:"flex items-center gap-2 mb-2 p-2.5 rounded bg-background border border-border",children:[e.jsx("input",{"data-loc":"client/src/components/LeadCardDrawer.tsx:795",ref:Ve,type:"file",onChange:gr,className:"hidden",accept:".pdf,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png,.webp,.gif,.heic,.heif,
676image/*,application/pdf"}),e.jsxs(oe,{"data-loc":"client/src/components/LeadCardDrawer.tsx:802",size:"sm",variant:"ghost",className:"h-7 text-xs text-[#4A9EFF] shrink-0",onClick:()=>Ve.current?.click(),children:[e.jsx(Rg,{"data-loc":"client/src/components/LeadCardDrawer.tsx:803",size:13,className:"mr-1"})," Escolher arquivo"]}),e.jsx("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:805",className:"text-xs text-zinc-400 truncate flex-1",title:fe?.name||"",children:fe?`${fe.name} (${Us(fe.size)})`:"Nenhum arquivo escolhido"})]}):e.jsx(rr,{"data-loc":"client/src/components/LeadCardDrawer.tsx:810",value:te,onChange:ue=>pe(ue.target.value),onKeyDown:ue=>{ue.key==="Enter"&&!ue.shiftKey&&te.trim()&&(ue.preventDefault(),aa())},placeholder:W==="chat"?"Escreva uma mensagem...":W==="nota"?"Escreva uma nota interna...":W==="whatsapp"?"Digite uma mensagem WhatsApp...":"Descreva a tarefa...",className:"bg-background border-border text-sm min-h-[60px] resize-none mb-2 focus:border-primary/40"}),e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:828",className:"flex items-center justify-between",children:[e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:829",className:"flex items-center gap-2",children:[e.jsx(oe,{"data-loc":"client/src/components/LeadCardDrawer.tsx:830",size:"sm",className:"h-7 text-xs bg-primary hover:bg-[#b8935a] text-black font-medium",onClick:W==="anexo"?lo:aa,disabled:W==="anexo"?!fe||rt.isPending:!te.trim()||W==="tarefa"&&!Se||Et.isPending||tt.isPending||Yt.isPending||vr.isPending||W==="whatsapp"&&!zn,children:W==="anexo"?rt.isPending?"Enviando...":"Enviar":W==="tarefa"?"Definir":"Adicionar"}),e.jsx(oe,{"data-loc":"client/src/components/LeadCardDrawer.tsx:842",size:"sm",variant:"ghost",className:"h-7 text-xs text-zinc-400",onClick:()=>{pe(""),Ce(""),Z(""),Ee(null),qe(null),Ve.current&&(Ve.current.value="")},children:"Cancelar"})]}),e.jsx("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:846",className:"flex items-center gap-2",children:e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:848",className:"relative",children:[e.jsxs("button",{"data-loc":"client/src/components/LeadCardDrawer.tsx:849",onClick:()=>Ne(!ae),className:"flex items-center gap-1 text-xs text-[#4A9EFF] hover:text-[#6AB4FF] transition-colors",children:[tn[W]," ",e.jsx(Xa,{"data-loc":"client/src/components/LeadCardDrawer.tsx:853",size:12})]}),ae&&e.jsx("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:856",className:"absolute bottom-full right-0 mb-1 w-32 bg-card border border-border rounded-lg shadow-xl z-20 py-1",children:["chat","nota","tarefa","whatsapp","anexo"].map(ue=>e.jsx("button",{"data-loc":"client/src/components/LeadCardDrawer.tsx:858",onClick:()=>{H(ue),Ne(!1)},className:`w-full text-left px-3 py-1.5 text-xs transition-colors ${W===ue?"text-[#4A9EFF] bg-[#4A9EFF]/10":"text-zinc-300 hover:bg-white/5"}`,children:tn[ue]},ue))})]})})]})]}),W==="chat"&&e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:875",className:"px-4 pb-3 flex items-center gap-1 text-[10px] text-zinc-500",children:[e.jsx("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:876",className:"text-[#4A9EFF]",children:"Bate-papo"})," com ",e.jsx("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:876",className:"text-[#4A9EFF]",children:t.name}),":",e.jsx("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:877",className:"ml-1",children:"Escreva uma mensagem"})]}),W==="whatsapp"&&e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:883",className:"px-4 pb-3 flex items-center gap-1 text-[10px] text-zinc-500",children:[e.jsx(Xr,{"data-loc":"client/src/components/LeadCardDrawer.tsx:884",size:10,className:"text-[#25D366]"}),e.jsx("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:885",className:"text-[#25D366]",children:"WhatsApp"})," para ",e.jsx("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:885",className:"text-[#25D366]",children:t.phone||"sem telefone"}),yn&&e.jsx("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:886",className:"ml-1 text-zinc-500",children:"via +55 47 3170-4710"})]})]})]})]})]})]})}function fP(t){const s={};if(!t)return s;for(const r of t.split(` 677`)){const l=r.indexOf(":");if(l===-1)continue;const c=r.slice(0,l).trim().toLowerCase(),d=r.slice(l+1).trim();if(d)switch(c){case"mensagem":s.mensagem=d;break;case"grupo de anúncios":case"grupo de anuncios":s.grupo=d;break;case"palavra-chave":s.palavraChave=d;break;case"utm source":s.utmSource=d;break;case"utm medium":s.utmMedium=d;break;case"utm campaign":s.utmCampaign=d;break}}return s}function rn({label:t,value:s,icon:r,editing:l,editValue:c,onStartEdit:d,onChangeEdit:u,onSaveEdit:x,onCancelEdit:p,multiline:g}){return l&&u&&x&&p?g?e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:942",className:"flex items-start py-1.5 px-2 rounded bg-card",children:[e.jsx("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:943",className:"text-xs text-zinc-500 w-[140px] flex-shrink-0 pt-0.5",children:t}),e.jsx("textarea",{"data-loc":"client/src/components/LeadCardDrawer.tsx:944",value:c??"",onChange:b=>u(b.target.value),onKeyDown:b=>{b.key==="Escape"&&p()},onBlur:x,rows:6,className:"flex-1 bg-transparent text-xs text-foreground border border-primary rounded outline-none p-1.5 resize-y min-h-[90px] leading-relaxed",autoFocus:!0})]}):e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:957",className:"flex items-center py-1.5 px-2 rounded bg-card",children:[e.jsx("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:958",className:"text-xs text-zinc-500 w-[140px] flex-shrink-0",children:t}),e.jsx("input",{"data-loc":"client/src/components/LeadCardDrawer.tsx:959",value:c??"",onChange:b=>u(b.target.value),onKeyDown:b=>{b.key==="Enter"&&x(),b.key==="Escape"&&p()},className:"flex-1 bg-transparent text-xs text-foreground border-b border-primary outline-none",autoFocus:!0})]}):e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:970",className:`flex py-1.5 px-2 rounded hover:bg-card transition-colors group ${g?"items-start":"items-center"} ${d?"cursor-pointer":""}`,onClick:d,children:[e.jsx("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:974",className:`text-xs text-zinc-500 w-[140px] flex-shrink-0 ${g?"pt-0.5":""}`,children:t}),e.jsx("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:975",className:`text-xs flex-1 ${g?"whitespace-pre-wrap break-words leading-relaxed":"truncate"} ${s==="â"?"text-zinc-600":"text-foreground"}`,children:s}),d&&e.jsx(dr,{"data-loc":"client/src/components/LeadCardDrawer.tsx:977",size:10,
677className:`text-zinc-600 opacity-0 group-hover:opacity-100 transition-opacity ml-1 flex-shrink-0 ${g?"mt-0.5":""}`})]})}function Zf({label:t,value:s,isLink:r,editing:l,editValue:c,onStartEdit:d,onChangeEdit:u,onSaveEdit:x,onCancelEdit:p}){return l&&u&&x&&p?e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:990",className:"flex items-start py-1 gap-1",children:[e.jsx("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:991",className:"text-[11px] text-zinc-500 w-[100px] flex-shrink-0 pt-0.5",children:t}),e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:992",className:"flex-1 flex flex-col gap-1",children:[e.jsx("input",{"data-loc":"client/src/components/LeadCardDrawer.tsx:993",value:c??"",onChange:g=>u(g.target.value),onKeyDown:g=>{g.key==="Enter"&&x(),g.key==="Escape"&&p()},className:"w-full bg-transparent text-xs text-foreground border-b border-primary outline-none pb-0.5",autoFocus:!0}),e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:1000",className:"flex gap-2",children:[e.jsx("button",{"data-loc":"client/src/components/LeadCardDrawer.tsx:1001",onClick:x,className:"text-[10px] px-2 py-0.5 rounded bg-primary text-primary-foreground hover:opacity-90 transition-opacity",children:"Salvar"}),e.jsx("button",{"data-loc":"client/src/components/LeadCardDrawer.tsx:1002",onClick:p,className:"text-[10px] px-2 py-0.5 rounded bg-zinc-700 text-zinc-200 hover:opacity-90 transition-opacity",children:"Cancelar"})]})]})]}):e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:1009",className:`flex items-center py-1 group ${d?"cursor-pointer":""}`,onClick:d,children:[e.jsx("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:1010",className:"text-[11px] text-zinc-500 w-[100px] flex-shrink-0",children:t}),e.jsx("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:1011",className:`text-xs flex-1 truncate ${r?"text-[#4A9EFF]":s==="â"?"text-zinc-600":"text-foreground"}`,children:s}),d&&e.jsx(dr,{"data-loc":"client/src/components/LeadCardDrawer.tsx:1015",size:10,className:"text-zinc-600 opacity-0 group-hover:opacity-100 transition-opacity ml-1"})]})}function gP(t,s,r){const l=[];return(t??[]).forEach(c=>l.push({type:"chat",id:c.id,content:c.content,author:c.senderName,createdAt:new Date(c.createdAt),raw:c})),(s??[]).forEach(c=>l.push({type:"nota",id:c.id,content:c.content,author:c.authorName,createdAt:new Date(c.createdAt),raw:c})),(r??[]).forEach(c=>l.push({type:"tarefa",id:c.id,content:c.title,author:c.assignedToName??c.createdByName,createdAt:new Date(c.createdAt),raw:c})),l.sort((c,d)=>c.createdAt.getTime()-d.createdAt.getTime()),l}function hP({item:t,user:s,onDeleteNote:r,onCompleteTask:l,onDeleteTask:c}){const d=t.createdAt.toLocaleString("pt-BR",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit"});if(t.type==="chat"){const g=t.raw.senderUserId===s?.id;return e.jsx("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:1063",className:`flex ${g?"justify-end":"justify-start"}`,children:e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:1064",className:`max-w-[80%] md:max-w-[70%] rounded-2xl px-4 py-2.5 ${g?"bg-[#1a2a3a] border border-border":"bg-card border border-border"}`,children:[!g&&e.jsx("p",{"data-loc":"client/src/components/LeadCardDrawer.tsx:1065",className:"text-[10px] text-[#4A9EFF] font-medium mb-1",children:t.author}),e.jsx("p",{"data-loc":"client/src/components/LeadCardDrawer.tsx:1066",className:"text-sm text-foreground whitespace-pre-wrap",children:t.content}),e.jsx("p",{"data-loc":"client/src/components/LeadCardDrawer.tsx:1067",className:"text-[10px] text-zinc-500 mt-1 text-right",children:d})]})})}if(t.type==="nota")return e.jsx("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:1075",className:"flex justify-start group",children:e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:1076",className:"max-w-[90%] md:max-w-[80%] rounded-lg px-4 py-2.5 bg-amber-500/5 border border-amber-500/15",children:[e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:1077",className:"flex items-center gap-2 mb-1 flex-wrap",children:[e.jsx(_M,{"data-loc":"client/src/components/LeadCardDrawer.tsx:1078",size:11,className:"text-amber-400"}),e.jsx("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:1079",className:"text-[10px] text-amber-400 font-medium",children:"Nota"}),e.jsxs("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:1080",className:"text-[10px] text-zinc-500",children:[t.author," · ",d]}),e.jsx("button",{"data-loc":"client/src/components/LeadCardDrawer.tsx:1081",onClick:()=>r(t.id),className:"opacity-0 group-hover:opacity-100 ml-auto p-0.5 rounded hover:bg-red-500/20 text-zinc-600 hover:text-red-400 transition-all",children:e.jsx(Ba,{"data-loc":"client/src/components/LeadCardDrawer.tsx:1082",size:11})})]}),e.jsx("p",{"data-loc":"client/src/components/LeadCardDrawer.tsx:1085",className:"text-sm text-foreground whitespace-pre-wrap",children:t.content})]})});const u=!t.raw.completedAt&&new Date(t.raw.dueAt)<new Date,x=!!t.raw.completedAt,p=new Date(t.raw.dueAt).toLocaleStr
677ing("pt-BR",{day:"2-digit",month:"2-digit",year:"2-digit",hour:"2-digit",minute:"2-digit"});return e.jsx("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:1097",className:"flex justify-start group",children:e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:1098",className:`max-w-[90%] md:max-w-[80%] rounded-lg px-4 py-2.5 border ${x?"bg-green-500/5 border-green-500/15":u?"bg-red-500/5 border-red-500/15":"bg-[#4A9EFF]/5 border-[#4A9EFF]/15"}`,children:[e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:1099",className:"flex items-center gap-2 mb-1 flex-wrap",children:[e.jsx(TM,{"data-loc":"client/src/components/LeadCardDrawer.tsx:1100",size:11,className:x?"text-green-400":u?"text-red-400":"text-[#4A9EFF]"}),e.jsx("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:1101",className:`text-[10px] font-medium ${x?"text-green-400":u?"text-red-400":"text-[#4A9EFF]"}`,children:"Tarefa"}),e.jsxs("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:1102",className:"text-[10px] text-zinc-500",children:["vencimento ",p]}),u&&!x&&e.jsx("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:1103",className:"text-[10px] text-red-400 font-bold",children:"VENCIDA"}),x&&e.jsx("span",{"data-loc":"client/src/components/LeadCardDrawer.tsx:1104",className:"text-[10px] text-green-400",children:"â ConcluÃda"})]}),e.jsxs("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:1106",className:"flex items-start gap-2",children:[!x&&e.jsx("button",{"data-loc":"client/src/components/LeadCardDrawer.tsx:1108",onClick:()=>l(t.id),className:"mt-0.5 w-4 h-4 rounded border border-zinc-600 hover:border-green-400 flex items-center justify-center flex-shrink-0 transition-colors"}),e.jsx("p",{"data-loc":"client/src/components/LeadCardDrawer.tsx:1111",className:`text-sm ${x?"line-through text-zinc-500":"text-foreground"}`,children:t.content})]}),t.raw.description&&e.jsx("p",{"data-loc":"client/src/components/LeadCardDrawer.tsx:1113",className:"text-xs text-zinc-500 mt-1 ml-6",children:t.raw.description}),e.jsx("div",{"data-loc":"client/src/components/LeadCardDrawer.tsx:1114",className:"flex items-center justify-end mt-1",children:e.jsx("button",{"data-loc":"client/src/components/LeadCardDrawer.tsx:1115",onClick:()=>c(t.id),className:"opacity-0 group-hover:opacity-100 p-0.5 rounded hover:bg-red-500/20 text-zinc-600 hover:text-red-400 transition-all",children:e.jsx(Ba,{"data-loc":"client/src/components/LeadCardDrawer.tsx:1116",size:11})})})]})})}var tp="Popover",[r4]=zs(tp,[ll]),od=ll(),[vP,il]=r4(tp),l4=t=>{const{__scopePopover:s,children:r,open:l,defaultOpen:c,onOpenChange:d,modal:u=!1}=t,x=od(s),p=f.useRef(null),[g,b]=f.useState(!1),[v,y]=nl({prop:l,defaultProp:c??!1,onChange:d,caller:tp}
vendor: 4,995 bytes, line 677
677);return e.jsx(Mx,{...x,children:e.jsx(vP,{scope:s,contentId:Xs(),triggerRef:p,open:v,onOpenChange:y,onOpenToggle:f.useCallback(()=>y(j=>!j),[y]),hasCustomAnchor:g,onCustomAnchorAdd:f.useCallback(()=>b(!0),[]),onCustomAnchorRemove:f.useCallback(()=>b(!1),[]),modal:u,children:r})})};l4.displayName=tp;var o4="PopoverAnchor",bP=f.forwardRef((t,s)=>{const{__scopePopover:r,...l}=t,c=il(o4,r),d=od(r),{onCustomAnchorAdd:u,onCustomAnchorRemove:x}=c;return f.useEffect(()=>(u(),()=>x()),[u,x]),e.jsx($i,{...d,...l,ref:s})});bP.displayName=o4;var c4="PopoverTrigger",i4=f.forwardRef((t,s)=>{const{__scopePopover:r,...l}=t,c=il(c4,r),d=od(r),u=st(s,c.triggerRef),x=e.jsx(Qe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":c.open,"aria-controls":c.contentId,"data-state":m4(c.open),...l,ref:u,onClick:Ae(t.onClick,c.onOpenToggle)});return c.hasCustomAnchor?x:e.jsx($i,{asChild:!0,...d,children:x})});i4.displayName=c4;var ev="PopoverPortal",[yP,jP]=r4(ev,{forceMount:void 0}),d4=t=>{const{__scopePopover:s,forceMount:r,children:l,container:c}=t,d=il(ev,s);return e.jsx(yP,{scope:s,forceMount:r,children:e.jsx(Fa,{present:r||d.open,children:e.jsx(uc,{asChild:!0,container:c,children:l})})})};d4.displayName=ev;var lc="PopoverContent",u4=f.forwardRef((t,s)=>{const r=jP(lc,t.__scopePopover),{forceMount:l=r.forceMount,...c}=t,d=il(lc,t.__scopePopover);return e.jsx(Fa,{present:l||d.open,children:d.modal?e.jsx(CP,{...c,ref:s}):e.jsx(wP,{...c,ref:s})})});u4.displayName=lc;var NP=tl("PopoverContent.RemoveScroll"),CP=f.forwardRef((t,s)=>{const r=il(lc,t.__scopePopover),l=f.useRef(null),c=st(s,l),d=f.useRef(!1);return f.useEffect(()=>{const u=l.current;if(u)return Ix(u)},[]),e.jsx(ed,{as:NP,allowPinchZoom:!0,children:e.jsx(x4,{...t,ref:c,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ae(t.onCloseAutoFocus,u=>{u.preventDefault(),d.current||r.triggerRef.current?.focus()}),onPointerDownOutside:Ae(t.onPointerDownOutside,u=>{const x=u.detail.originalEvent,p=x.button===0&&x.ctrlKey===!0,g=x.button===2||p;d.current=g},{checkForDefaultPrevented:!1}),onFocusOutside:Ae(t.onFocusOutside,u=>u.preventDefault(),{checkForDefaultPrevented:!1})})})}),wP=f.forwardRef((t,s)=>{const r=il(lc,t.__scopePopover),l=f.useRef(!1),c=f.useRef(!1);return e.jsx(x4,{...t,ref:s,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:d=>{t.onCloseAutoFocus?.(d),d.defaultPrevented||(l.current||r.triggerRef.current?.focus(),d.preventDefault()),l.current=!1,c.current=!1},onInteractOutside:d=>{t.onInteractOutside?.(d),d.defaultPrevented||(l.current=!0,d.detail.originalEvent.type==="pointerdown"&&(c.current=!0));const u=d.target;r.triggerRef.current?.contains(u)&&d.preventDefault(),d.detail.originalEvent.type==="focusin"&&c.current&&d.preventDefault()}})}),x4=f.forwardRef((t,s)=>{const{__scopePopover:r,trapFocus:l,onOpenAutoFocus:c,onCloseAutoFocus:d,disableOutsidePointerEvents:u,onEscapeKeyDown:x,onPointerDownOutside:p,onFocusOutside:g,onInteractOutside:b,...v}=t,y=il(lc,r),j=od(r);return zx(),e.jsx(Zi,{asChild:!0,loop:!0,trapped:l,onMountAutoFocus:c,onUnmountAutoFocus:d,children:e.jsx(cc,{asChild:!0,disableOutsidePointerEvents:u,onInteractOutside:b,onEscapeKeyDown:x,onPointerDownOutside:p,onFocusOutside:g,onDismiss:()=>y.onOpenChange(!1),children:e.jsx(Lx,{"data-state":m4(y.open),role:"dialog",id:y.contentId,...j,...v,ref:s,style:{...v.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)"}})})})}),p4="PopoverClose",AP=f.forwardRef((t,s)=>{const{__scopePopover:r,...l}=t,c=il(p4,r);return e.jsx(Qe.button,{type:"button",...l,ref:s,onClick:Ae(t.onClick,()=>c.onOpenChange(!1))})});AP.displayName=p4;var SP="PopoverArrow",EP=f.forwardRef((t,s)=>{const{__scopePopover:r,...l}=t,c=od(r);return e.jsx(kx,{...c,...l,ref:s})});EP.displayName=SP;function m4(t){return t?"open":"closed"}var DP=l4,MP=i4,LP=d4,kP=u4;function RP({...t}){return e.jsx(DP,{"data-loc":"client/src/components/ui/popover.tsx:9","data-slot":"popover",...t})}function TP({...t}){return e.jsx(MP,{"data-loc":"client/src/components/ui/popover.tsx:15","data-slot":"popover-trigger",...t})}function _P({className:t,align:s="center",sideOffset:r=4,...l}){return e.jsx(LP,{"data-loc":"client/src/components/ui/popover.tsx:25",children:e.jsx(kP,{"data-loc":"client/src/components/ui/popover.tsx:26","data-slot":"popover-content",align:s,sideOffset:r,className:Me("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
677de-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),...l})})}const OP=[{id:"lead_entrando",label:"LEAD ENTRANDO",color:"#4A9EFF"},{id:"lead_qualificado",label:"LEAD QUALIFICADO",color:"#22C55E"},{id:"lead_nao_qualificou",label:"LEAD NÃO QUALIFICOU",color:"#EF4444"},{id:"lead_ouro",label:"LEAD OURO",color:"#C9A96E"},{id:"corretor",label:"ATENDENTE",color:"#A855F7"},{id:"negociacao",label:"NEGOCIAÃÃO",color:"#F97316"}];function PP(t){if(!t)return"";const s=new Date(t),l=new Date().getTime()-s.getTime(),c=Math.floor(l/864e5);return c===0?"Hoje "+s.toLocaleTimeString("pt-BR",{hour:"2-digit",minute:"2-digit"}):c===1?"Ontem "+s.toLocaleTimeString("pt-BR",{hour:"2-digit",minute:"2-digit"}):s.toLocaleDateString("pt-BR",{day:"2-digit",month:"2-digit",year:"2-digit"})}function zP(t){return!t||t==="0"||t==="0.00"?"R$0":new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL",maximumFractionDigits:0}).format(Number(t))}function UP({card:t,onDelete:s,onEdit:r,onOpenDrawer:l}){const{attributes:c,listeners:d,setNodeRef:u,transform:x,transition:p,isDragging:g}=n4({id:t.id}),b={transform:xr.Transform.toString(x),transition:p,opacity:g?.4:1},v=t.stage==="lead_ouro"&&t.capiLeadSent===1;return e.jsx("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:68",ref:u,style:b,...c,...d,onClick:()=>!g&&l(t),className:"bg-card border border-border rounded-lg p-3 mb-2 cursor-grab active:cursor-grabbing group hover:border-primary/50 hover:bg-card/80 transition-all select-none",children:e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:76",className:"flex items-start gap-2",children:[e.jsx(Vi,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:77",size:14,className:"mt-0.5 text-[#333] group-hover:text-[#555] flex-shrink-0"}),e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:78",className:"flex-1 min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:79",className:"flex items-start justify-between gap-1",children:[e.jsx("span",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:80",className:"text-foreground text-sm font-medium leading-tight truncate",children:t.name}),e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:81",className:"flex items-center gap-1 flex-shrink-0 ml-1",children:[v&&e.jsxs("span",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:83",title:"Evento Lead enviado à Meta com sucesso",className:"inline-flex items-center gap-0.5 bg-[#C9A96E]/15 border border-[#C9A96E]/40 text-[#C9A96E] text-[9px] font-bold px-1.5 py-0.5 rounded-full",children:[e.jsx("svg",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:87",width:"8",height:"8",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:87",d:"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"})}),"META"]}),e.jsx("span",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:91",className:"text-[#888] text-xs",children:PP(t.createdAt)})]})]}),t.externalId&&e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:95",className:"text-[#4A9EFF] text-xs mt-0.5 truncate",children:[t.source||"Facebook"," Nº",t.externalId]}),!t.externalId&&t.source&&e.jsx("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:100",className:"text-[#888] text-xs mt-0.5",children:t.source}),t.adAccountId&&e.jsx("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:103",className:"text-[#555] text-xs truncate",children:t.adAccountId}),(t.phone||t.email)&&e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:106",className:"flex gap-2 mt-1.5",children:[t.phone&&e.jsxs("span",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:107",className:"flex items-center gap-1 text-[#888] text-xs",children:[e.jsx(hn,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:107",size:10}),t.phone]}),t.email&&e.jsxs("span",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:108",className:"flex items-center gap-1 text-[#888] text-xs truncate",children:[e.jsx(mr,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:108",size:10}),t.email]})]}),t.notes&&e.jsx("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:112",className:"mt-1.5 text-[#888] text-xs italic line-clamp-2",children:t.notes})]})]})})}function IP({stageId:t,children:s}){const{attributes:r,listeners:l,setNodeRef:c,transform:d,transition:u,isDragging:x}=n4({id:t}),p={transform:xr.Transform.toString(d),transition:u,opacity:x?.4:1,zIndex:x?50:void 0};return e.jsx("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:130",ref:c,style:p,children:s({...r,...l})})}function BP({stage:t,cards:s,onAddCard:r,onDeleteCard:l,onEditCard:c,onOpenDrawer:d,onRemoveStage:u,onEditStage:x,dragHandleProps:p}){const[g,b]=f.useState(!1),[v,y]=f.useState(""),j=f.useRef(null),S=s.reduce((U,B)=>U+Number(B.dealValue||0),0),[N,w]=f.useState(!1),[D,k]=f.useState(t.label),[A,_]=f.useState(t.color),E=f.useRef(null);f.useEffect(()=>{g&&j.current?.focus()},[g]),f.useEffect(()=>{N&&(k(t.label),_(t.color),setTimeout(()=>E.current?.focus(),50))},[N]);function I(){v.trim()&&(r(t.id,v.trim()),y(""),b(!1))}function R(){!D.trim()||!t.stageId||(x?.(t.stageId,D.trim(),A),w(!1))}const z=["#4A9EFF","#22C55E","#EF4444","#C9A96E","#A855F7","#F97316","#06B6D4","#EC4899","#84CC16","#F59E0B","#6366F1","#14B8A6"];return e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:185",className:"flex-shrink-0 w-64 flex flex-col",children:[e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:187",className:"mb-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:188",className:"flex items-center justify-between mb-0.5",children:[e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:189",className:"flex items-center gap-1.5 min-w-0",children:[p&&e.jsx("span",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:191",...p,className:"cursor-grab active:cursor-grabbing text-[#333] hover:text-[#666] transition-colors flex-shrink-0",title:"Arrastar coluna",children:e.jsx(Vi,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:196",size:12})}),e.jsx("span",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:199",className:"text-xs font-bold tracking-wider truncate",style:{color:t.color},children:t.label})]}),e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:201",className:"flex items-center gap-1 flex-shrink-0",children:[t.stageId&&x&&e.jsxs(RP,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:204",open:N,onOpenChange:w,children:[e.jsx(TP,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:205",asChild:!0,children:e.jsx("button",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:206",title:"Editar coluna",className:"text-[#444] hover:text-primary transition-colors",onClick:U=>{U.stopPropagation(),w(B=>!B)},children:e.jsx(dr,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:211",size:12})})}),e.jsxs(_P,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:214",className:"w-64 p-3 bg-card border border-border shadow-xl",side:"bottom",align:"start",children:[e.jsx("p",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:215",className:"text-xs font-semibold text-foreground mb-2",children:"Editar coluna"}),e.jsx(ge,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:216",ref:E,value:D,onChange:U=>k(U.target.value),onKeyDown:U=>{U.key==="Enter"&&R(),U.key==="Escape"&&w(!1)},placeholder:"Nome da coluna",className:"mb-3 h-8 text-sm bg-background border-border"}),e.jsx("p",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:224",className:"text-[10px] text-muted-foreground mb-1.5",children:"Cor"}),e.jsx("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:225",className:"grid grid-cols-6 gap-1.5 mb-3",children:z.map(U=>e.jsx("button",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:227",onClick:()=>_(U),className:`h-5 w-5 rounded-full border-2 transition-transform hover:scale-110 ${A===U?"border-white scale-110":"border-transparent"}`,style:{backgroundColor:U}},U))}),e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:237",className:"flex items-center gap-1.5 mb-3",children:[e.jsx("input",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:238",type:"color",value:A,onChange:U=>_(U.target.value),className:"h-7 w-7 rounded cursor-pointer border border-border bg-transparent",title:"Cor personalizada"}),e.jsx("span",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:245",className:"text-[10px] text-muted-foreground",children:"Cor personalizada"})]}),e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:247",className:"flex gap-2",children:[e.jsxs("button",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:248",onClick:R,className:"flex-1 flex items-center justify-center gap-1 text-xs bg-primary text-black px-2 py-1.5 rounded hover:opacity-90 transition-opacity font-medium",children:[e.jsx(Ya,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:252",size:11})," Salvar"]}),e.jsx("button",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:254",onClick:()=>w(!1),className:"text-[#888] hover:text-foreground px-2 py-1.5 rounded border border-border text-xs transition-colors",children:"Cancelar"})]})]})]}),u&&t.stageId&&e.jsx("button",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:266",onClick:()=>u(t.stageId),title:"Remover coluna",className:"text-[#444] hover:text-red-400 transition-colors",children:e.jsx(Ba,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:271",size:12})}),e.jsx("button",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:274",onClick:()=>b(!0),className:"text-[#555] hover:text-primary transition-colors",children:e.jsx(Jt,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:275",size:14})})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:279",className:"text-[#888] text-xs",children:[s.length," lead",s.length!==1?"s":"",": ",zP(S)]}),e.jsx("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:280",className:"h-0.5 mt-2 rounded-full",style:{backgroundColor:t.color}})]}),e.jsx("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:284",className:"flex-1 overflow-y-auto pr-1",style:{maxHeight:"calc(100vh - 220p
677x)"},children:e.jsxs(a4,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:285",items:s.map(U=>U.id),strategy:rP,children:[g&&e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:288",className:"bg-card border border-primary/40 rounded-lg p-2 mb-2",children:[e.jsx(ge,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:289",ref:j,value:v,onChange:U=>y(U.target.value),onKeyDown:U=>{U.key==="Enter"&&I(),U.key==="Escape"&&(b(!1),y(""))},placeholder:"Nome do lead...",className:"bg-transparent border-none text-sm p-0 h-7 focus-visible:ring-0 text-foreground placeholder:text-[#555]"}),e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:297",className:"flex gap-1 mt-2",children:[e.jsxs("button",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:298",onClick:I,className:"flex items-center gap-1 text-xs bg-primary text-black px-2 py-1 rounded hover:bg-[#b8935a] transition-colors",children:[e.jsx(Ya,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:299",size:11})," Adicionar"]}),e.jsx("button",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:301",onClick:()=>{b(!1),y("")},className:"text-[#888] hover:text-foreground p-1 rounded transition-colors",children:e.jsx(va,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:302",size:14})})]})]}),s.map(U=>e.jsx(UP,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:308",card:U,onDelete:l,onEdit:c,onOpenDrawer:d},U.id)),!g&&e.jsx("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:311",className:"border border-dashed border-border rounded-lg p-2 text-center text-[#555] text-xs cursor-pointer hover:border-[#444] hover:text-[#888] transition-colors",onClick:()=>b(!0),children:"+ Adicionar lead"})]})})]})}function FP({campaigns:t,selected:s,onSelect:r,onCreate:l,onRename:c,onDelete:d}){const[u,x]=f.useState(!1),[p,g]=f.useState(!1),[b,v]=f.useState(""),[y,j]=f.useState(null),[S,N]=f.useState(""),w=f.useRef(null);f.useEffect(()=>{function A(_){w.current&&!w.current.contains(_.target)&&x(!1)}return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[]);function D(){b.trim()&&(l(b.trim()),v(""),g(!1))}function k(A){S.trim()&&(c(A,S.trim()),j(null))}return e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:364",className:"relative",ref:w,children:[e.jsxs("button",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:365",onClick:()=>x(A=>!A),className:"flex items-center gap-2 bg-card border border-border rounded-lg px-4 py-2 text-foreground hover:border-primary/40 transition-colors",children:[e.jsx("span",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:369",className:"font-semibold text-sm uppercase tracking-wider",children:s?s.name:"Selecionar campanha"}),e.jsx(Xa,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:372",size:14,className:`text-[#888] transition-transform ${u?"rotate-180":""}`})]}),u&&e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:376",className:"absolute top-full left-0 mt-1 w-72 bg-card border border-border rounded-xl shadow-2xl z-50 overflow-hidden",children:[e.jsx("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:377",className:"p-3 border-b border-border",children:e.jsx("span",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:378",className:"text-xs font-bold text-[#888] uppercase tracking-wider",children:"LEADS"})}),e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:380",className:"max-h-80 overflow-y-auto",children:[t.map(A=>e.jsx("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:382",className:`group flex items-center gap-2 px-3 py-2.5 hover:bg-muted cursor-pointer transition-colors ${s?.id===A.id?"bg-muted":""}`,children:y===A.id?e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:384",className:"flex-1 flex gap-1",children:[e.jsx(ge,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:385",value:S,onChange:_=>N(_.target.value),onKeyDown:_=>{_.key==="Enter"&&k(A.id),_.key==="Escape"&&j(null)},className:"h-7 text-sm bg-background border-border text-foreground",autoFocus:!0}),e.jsx("button",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:392",onClick:()=>k(A.id),className:"text-primary hover:text-[#b8935a] p-1",children:e.jsx(Ya,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:392",size:14})}),e.jsx("button",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:393",onClick:()=>j(null),className:"text-[#888] hover:text-foreground p-1",children:e.jsx(va,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:393",size:14})})]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:397",className:"flex-1 text-sm text-foreground truncate",onClick:()=>{r(A),x(!1)},children:A.name}),e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:403",className:"flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[e.jsx("button",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:404",onClick:_=>{_.stopPropagation(),j(A.id),N(A.name)},className:"p-1 text-[#888] hover:text-primary transition-colors",children:e.jsx(dr,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:408",size:12})}),e.jsx("button",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:410",onClick:_=>{_.stopPropagation(),d(A.id)},className:"p-1 text-[#888] hover:text-red-400 transition-colors",children:e.jsx(Ba,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:414",size:12})})]})]})},A.id)),t.length===0&&e.jsx("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:422",className:"px-3 py-4 text-center text-[#555] text-sm",children:"Nenhuma campanha ainda"})]}),e.jsx("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:425",className:"border-t border-border p-2",children:p?e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:427",className:"flex gap-1",children:[e.jsx(ge,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:428",value:b,onChange:A=>v(A.target.value),onKeyDown:A=>{A.key==="Enter"&&D(),A.key==="Escape"&&(g(!1),v(""))},placeholder:"Nome da campanha...",className:"h-8 text-sm bg-background border-border text-foreground placeholder:text-muted-foreground",autoF
677ocus:!0}),e.jsx("button",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:436",onClick:D,className:"text-primary hover:text-[#b8935a] p-1.5",children:e.jsx(Ya,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:436",size:14})}),e.jsx("button",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:437",onClick:()=>{g(!1),v("")},className:"text-[#888] p-1.5",children:e.jsx(va,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:437",size:14})})]}):e.jsxs("button",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:440",onClick:()=>g(!0),className:"w-full flex items-center gap-2 text-[#888] hover:text-foreground text-sm py-1 px-2 rounded transition-colors",children:[e.jsx(Jt,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:444",size:14}),e.jsx("span",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:445",children:"Adicionar funil de vendas"})]})})]})]})}function HP({card:t,onClose:s,onSave:r}){const[l,c]=f.useState({name:t.name||"",phone:t.phone||"",email:t.email||"",source:t.source||"",externalId:t.externalId||"",adAccountId:t.adAccountId||"",notes:t.notes||""});function d(u,x){c(p=>({...p,[u]:x}))}return e.jsx(Rs,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:468",open:!0,onOpenChange:s,children:e.jsxs(Ts,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:469",className:"bg-card border-border text-foreground max-w-md",children:[e.jsx(_s,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:470",children:e.jsx(Ps,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:471",className:"text-foreground",children:"Editar Lead"})}),e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:473",className:"space-y-3 py-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:474",children:[e.jsx("label",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:475",className:"text-xs text-[#888] mb-1 block",children:"Nome *"}),e.jsx(ge,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:476",value:l.name,onChange:u=>d("name",u.target.value),className:"bg-background border-border text-foreground"})]}),e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:478",className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:479",children:[e.jsx("label",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:480",className:"text-xs text-[#888] mb-1 block",children:"Telefone"}),e.jsx(ge,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:481",value:l.phone,onChange:u=>d("phone",u.target.value),className:"bg-background border-border text-foreground"})]}),e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:483",children:[e.jsx("label",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:484",className:"text-xs text-[#888] mb-1 block",children:"E-mail"}),e.jsx(ge,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:485",value:l.email,onChange:u=>d("email",u.target.value),className:"bg-background border-border text-foreground"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:488",className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:489",children:[e.jsx("label",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:490",className:"text-xs text-[#888] mb-1 block",children:"Origem"}),e.jsx(ge,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:491",value:l.source,onChange:u=>d("source",u.target.value),placeholder:"Facebook, Site...",className:"bg-background border-border text-foreground placeholder:text-[#555]"})]}),e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:493",children:[e.jsx("label",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:494",className:"text-xs text-[#888] mb-1 block",children:"ID Externo"}),e.jsx(ge,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:495",value:l.externalId,onChange:u=>d("externalId",u.target.value),className:"bg-background border-border text-foreground"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:498",children:[e.jsx("label",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:499",className:"text-xs text-[#888] mb-1 block",children:"Conta de Anúncio"}),e.jsx(ge,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:500",value:l.adAccountId,onChange:u=>d("adAccountId",u.target.value),placeholder:"fb1480698410325493",className:"bg-background border-border text-foreground placeholder:text-[#555]"})]}),e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:502",children:[e.jsx("label",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:503",className:"text-xs text-[#888] mb-1 block",children:"Notas"}),e.jsx("textarea",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:504",value:l.notes,onChange:u=>d("notes",u.target.value),rows:3,className:"w-full bg-background border border-border rounded-md px-3 py-2 text-sm text-foreground resize-none focus:outline-none focus:ring-1 focus:ring-primary"})]})]}),e.jsxs(Os,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:512",children:[e.jsx(oe,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:513",variant:"ghost",onClick:s,className:"text-[#888] hover:text-foreground",children:"Cancelar"}),e.jsx(oe,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:514",onClick:()=>r(l),className:"bg-primary hover:bg-[#b8935a] text-black font-medium",children:"Salvar"})]})]})})}function qP(){const{user:t}=ka(),s=Y.useUtils(),r=typeof window<"u"&&Number(new URLSearchParams(window.location.search).get("card")??"0")||null,{data:l=[]}=Y.leadCampaigns.listCampaigns.useQuery(),[c,d]=f.useState(null),u="crm_selected_campaign_id";function x(q){d(q),q?.id?localStorage.setItem(u,String(q.id)):localStorage.removeItem(u)}f.useEffect(()=>{if(l.length===0||c)return;const q=localStorage.getItem(u);if(q){const Le=l.find(Be=>String(Be.id)===q);if(Le){d(Le);return}}d(l[0])},[l]);const{data:p=[]}=Y.leadCampaigns.getStages.useQuery({campaignId:c?.id??0},{enabled:!!c}),g=p.length>0?p.map(q=>({id:q.slug,label:q.label,color:q.color,stageId:q.id,isDefault:q.isDefault})):OP.map(q=>
677({...q,stageId:void 0,isDefault:1})),b=Y.leadCampaigns.addStage.useMutation({onSuccess:()=>s.leadCampaigns.getStages.invalidate({campaignId:c?.id})}),v=Y.leadCampaigns.removeStage.useMutation({onSuccess:()=>{s.leadCampaigns.getStages.invalidate({campaignId:c?.id}),s.leadCampaigns.getCards.invalidate({campaignId:c?.id})},onError:q=>ce.error(q.message)}),y=Y.leadCampaigns.updateStage.useMutation({onSuccess:()=>{s.leadCampaigns.getStages.invalidate({campaignId:c?.id}),ce.success("Coluna atualizada")},onError:q=>ce.error(q.message)});function j(q,Le,Be){c&&y.mutate({stageId:q,campaignId:c.id,label:Le,color:Be})}const[S,N]=f.useState(void 0),{data:w=[]}=Y.users.list.useQuery(),D=w.filter(q=>q.active!==0),{data:k=[]}=Y.leadCampaigns.getCards.useQuery({campaignId:c?.id??0,assignedTo:S},{enabled:!!c}),[A,_]=f.useState([]);f.useEffect(()=>{_(k)},[k]),f.useEffect(()=>{if(!r||A.length===0)return;const q=A.find(Le=>Le.id===r);q&&Ne(q)},[r,A]);const E=Y.leadCampaigns.createCampaign.useMutation({onSuccess:()=>s.leadCampaigns.listCampaigns.invalidate()}),I=Y.leadCampaigns.updateCampaign.useMutation({onSuccess:()=>s.leadCampaigns.listCampaigns.invalidate()}),R=Y.leadCampaigns.deleteCampaign.useMutation({onSuccess:()=>{s.leadCampaigns.listCampaigns.invalidate(),d(null)}}),z=Y.leadCampaigns.createCard.useMutation({onSuccess:()=>s.leadCampaigns.getCards.invalidate({campaignId:c?.id})}),U=Y.leadCampaigns.updateCard.useMutation({onSuccess:()=>s.leadCampaigns.getCards.invalidate({campaignId:c?.id})}),B=Y.leadCampaigns.moveCard.useMutation(),F=Y.leadCampaigns.deleteCard.useMutation({onSuccess:()=>s.leadCampaigns.getCards.invalidate({campaignId:c?.id})}),[V,de]=f.useState(null),[le,xe]=f.useState(null),[M,O]=f.useState([]);f.useEffect(()=>{O(g)},[JSON.stringify(g)]);const[T,K]=f.useState(null),ve=O_(__(Xh,{activationConstraint:{distance:8}})),P=Y.leadCampaigns.reorderStages.useMutation({onError:()=>{O(g),ce.error("Erro ao reordenar colunas")}});function J(q){const Le=q.active.id;if(typeof Le=="string"){const Be=M.find(Pe=>Pe.id===Le);K(Be??null),de(null)}else{const Be=A.find(Pe=>Pe.id===Le);de(Be??null),K(null)}}function W(q){if(T)return;const{over:Le}=q;if(!Le)return;const Be=Le.id,Pe=M.find(mt=>mt.id===Be)?.id;if(Pe)xe(Pe);else{const mt=A.find(dt=>dt.id===Be);mt&&xe(mt.stage)}}function H(q){const{active:Le,over:Be}=q;if(!Be){de(null),K(null),xe(null);return}if(typeof Le.id=="string"){if(K(null),Le.id===Be.id)return;const Pe=M.findIndex(X=>X.id===Le.id),mt=M.findIndex(X=>X.id===Be.id);if(Pe===-1||mt===-1)return;const dt=Jh(M,Pe,mt);if(O(dt),!c)return;const qt=dt.filter(X=>X.stageId).map(X=>X.stageId);qt.length>0&&P.mutate({campaignId:c.id,orderedIds:qt})}else{de(null),xe(null);const Pe=A.find(X=>X.id===Le.id);if(!Pe)return;const mt=Be.id,dt=M.find(X=>X.id===mt)?.id??A.find(X=>X.id===mt)?.stage;if(!dt||dt===Pe.stage)return;const qt=Date.now();if(Je.current&&Je.current.id===Pe.id&&Je.current.stage===dt&&qt-Je.current.ts<2e3||(Je.current={id:Pe.id,stage:dt,ts:qt},B.isPending))return;_(X=>X.map(vt=>vt.id===Pe.id?{...vt,stage:dt}:vt)),B.mutate({id:Pe.id,stage:dt},{onError:()=>{_(k),ce.error("Erro ao mover lead")}})}}const[te,pe]=f.useState(null),[ae,Ne]=f.useState(null),[Se,Ce]=f.useState(!1),[ke,Z]=f.useState(""),[fe,Ee]=f.useState("#888888"),Ie=["#4A9EFF","#22C55E","#EF4444","#C9A96E","#A855F7","#F97316","#06B6D4","#EC4899","#84CC16","#F59E0B","#6366F1","#14B8A6"];function qe(){!ke.trim()||!c||b.mutate({campaignId:c.id,label:ke.trim(),color:fe},{onSuccess:()=>{Ce(!1),Z(""),Ee("#888888"),ce.success("Coluna criada")}})}function Ve(q,Le){c&&z.mutate({campaignId:c.id,name:Le,stage:q})}function Ht(q){confirm("Excluir este lead?")&&(_(Le=>Le.filter(Be=>Be.id!==q)),F.mutate({id:q}))}function ht(q){te&&(_(Le=>Le.map(Be=>Be.id===te.id?{...Be,...q}:Be)),U.mutate({id:te.id,...q},{onSuccess:()=>{s.leadCampaigns.getCards.invalidate({campaignId:c?.id}),ce.success("Lead atualizado")}}),pe(null))}const Je=f.useRef(null);return e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:779",className:"flex flex-col min-h-full bg-background",children:[e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:781",className:"flex flex-wrap items-center gap-3 px-3 md:px-6 py-3 md:py-4 border-b border-border flex-shrink-0",children:[e.jsx(FP,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:782",campaigns:l,selected:c,onSelect:x,onCreate:q=>E.mutate({name:q}),onRename:(q,Le)=>I.mutate({id:q,name:Le}),onDelete:q=>{confirm("Excluir esta campanha e todos os seus leads?")&&R.mutate({id:q})}}),c&&e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:794",className:"flex items-center gap-3 ml-auto",children:[t&&(t.role==="admin"||t.role==="gerente")&&e.jsxs("select",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:797",value:S??"",onChange:q=>N(q.target.value?Number(q.target.value):void 0),className:"text-sm bg-card border border-border rounded-lg px-3 py-1.5 text-foreground focus:outline-none focus:border-primary/60 cursor-pointer",children:[e.jsx("option",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:802",value:"",children:"Todos os atendentes"}),D.map(q=>e.jsx("option",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:804",value:q.id,children:q.name},q.id))]}),e.jsxs("span",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:808",className:"text-[#888] text-sm",children:[A.length," leads no total"]})]})]}),c?e.jsxs(OO,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:832",sensors:ve,collisionDetection:F_,onDragStart:J,onDragOver:W,onDragEnd:H,children:[e.jsx(a4,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:839",items:M.map(q=>q.id),strategy:sP,children:e.jsx("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:840",className:"flex-1 overflow-x-auto overflow-y-auto",children:e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:841",className:"flex gap-4 px-3 md:px-6 py-4",style:{minWidth:"max-content",minHeight:"400px"},children:[M.map(q=>e.jsx(IP,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:843",stageId:q.id,children:Le=>e.jsx($P,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:845",stageId:q.id,children:e.jsx(BP,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:846",stage:q,cards:A.filter(Be=>Be.stage===q.id),onAddCard:Ve,onDeleteCard:Ht,onEditCard:pe,onOpenDrawer:Ne,onEditStage:q.stageId?j:void 0,dragHandleProps:Le,onRemoveStage:q.isDefault===0&&q.stageId?Be=>{confirm(`Remover coluna "${q.label}"? Os leads serão movidos para LEAD ENTRANDO.`)&&v.mutate({stageId:Be,campaignId:c.id})}:void 0})})},q.id)),c&&e.jsx("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:869",className:"flex-shrink-0 w-64 flex flex-col",children:e.jsxs("button",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:870",onClick:()=>Ce(!0),className:"mt-1 flex items-center gap-2 text-[#555] hover:text-primary text-sm transition-colors px-2 py-1 rounded border border-dashed border-border hover:border-primary",children:[e.jsx(Jt,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:874",size:14})," Nova coluna"]})})]})})}),e.jsxs(JO,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:882",children:[V&&e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:884",className:"bg-card border border-primary/60 rounded-lg p-3 w-64 shadow-2xl opacity-95",children:[e.jsx("span",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:885",className:"text-foreground text-sm font-medium",children:V.name}),V.source&&e.jsx("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:886",className:"text-[#888] text-xs mt-1",children:V.source})]}),T&&e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:890",className:"flex-shrink-0 w-64 bg-card/80 border border-border rounded-lg p-3 opacity-90 rotate-1 shadow-2xl",children:[e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:891",className:"flex items-center gap-1.5 mb-1",children:[e.jsx(Vi,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:892",size:12,className:"text-[#666]"}),e.jsx("span",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:893",className:"text-xs font-bold tracking-wider",style:{color:T.color},children:T.label})]}),e.jsx("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:895",className:"h-0.5 rounded-full",style:{backgroundColor:T.color}})]})]})]}):e.jsx("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:815",className:"flex-1 flex items-center justify-center",children:e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:816",className:"text-center",children:[e.jsx("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:817",className:"text-[#555] text-4xl mb-4",children:"ð"}),e.jsx("p",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:818",className:"text-[#888] text-sm mb-4",children:"Selecione ou crie uma campanha para começar"}),e.jsxs(oe,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:819",onClick:()=>{const q=prompt("Nome da campanha:");q?.trim()&&E.mutate({name:q.trim()})},className:"bg-primary hover:bg-[#b8935a] text-black font-medium",children:[e.jsx(Jt,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:826",size:14,className:"mr-2"})," Nova campanha"]})]})}),te&&e.jsx(HP,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:904",card:te,onClose:()=>pe(null),onSave:ht}),e.jsx(Rs,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:911",open:Se,onOpenChange:q=>{Ce(q),q||(Z(""),Ee("#888888"))},children:e.jsxs(Ts,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:912",className:"max-w-sm bg-card border-border",children:[e.jsx(_s,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:913",children:e.jsx(Ps,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:914",className:"text-foreground",children:"Nova coluna"})}),e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:916",className:"space-y-4 py-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:917",children:[e.jsx("label",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:918",className:"text-xs text-muted-foreground mb-1.5 block",children:"Nome da coluna"}),e.jsx(ge,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:919",value:ke,onChange:q=>Z(q.target.value),onKeyDown:q=>{q.key==="Enter"&&qe()},placeholder:"Ex: Em negociação",className:"bg-background border-border",autoFocus:!0})]}),e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:928",children:[e.jsx("label",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:929",className:"text-xs text-muted-foreground mb-1.5 block",children:"Cor da coluna"}),e.jsx("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:930",className:"grid grid-cols-6 gap-2 mb-3",children:Ie.map(q=>e.jsx("button",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:932",onClick:()=>Ee(q),className:`h-6 w-6 rounded-full border-2 transition-transform hover:scale-110 ${fe===q?"border-white scale-110":"border-transparent"}`,style:{backgroundColor:q}},q))}),e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:942",className:"flex items-center gap-2",children:[e.jsx("input",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:943",type:"color",value:fe,onChange:q=>Ee(q.target.value),className:"h-8 w-8 rounded cursor-pointer border border-border bg-transparent"}),e.jsx("span",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:949",className:"text-xs text-muted-foreground",children:"Cor personalizada"}),e.jsxs("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:950",className:"ml-auto flex items-center gap-2",children:[e.jsx("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:951",className:"h-3 w-3 rounded-full",style:{backgroundColor:fe}}),e.jsx("span",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:952",className:"text-xs font-mono text-muted-foreground",children:fe})]})]})]})]}),e.jsxs(Os,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:957",children:[e.jsx(oe,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:958",variant:"outline",onClick:()=>Ce(!1),children:"Cancelar"}),e.jsx(oe,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:959",onClick:qe,disabled:!ke.trim()||b.isPending,children:b.isPending?"Criando...":"Criar coluna"})]})]})}),ae&&e.jsx(mP,{"data-loc":"client/src/pages/LeadsCampaigns.tsx:967",card:ae,campaignName:c?.name,onClose:()=>Ne(null),onCardUpdated:()=>s.leadCampaigns.getCards.invalidate({campaignId:c?.id})})]})}function $P({stageId:t,children:s}){const{setNodeRef:r,isOver:l}=Z3({id:t});return e.jsx("div",{"data-loc":"client/src/pages/LeadsCampaigns.tsx:982",ref:r,className:`transition-colors rounded-lg ${l?"bg-primary/5":""}`,children:s})}function WP({...t}){return e.jsx(Uh,{"data-loc":"client/src/components/ui/sheet.tsx:10","data-slot":"sheet",...t})}function QP({...t}){return e.jsx(Ih,{"data-loc":"client/src/components/ui/sheet.tsx:28","data-slot":"sheet-portal",...t})}function GP({className:t,...s}){return e.jsx(Bh,{"data-loc":"client/src/components/ui/sheet.tsx:36","data-slot":"sheet-overlay",className:Me("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),...s})}function VP({className:t,children:s,side:r="right",...l}){return e.jsxs(QP,{"data-loc":"client/src/components/ui/sheet.tsx:56",children:[e.jsx(GP,{"data-loc":"client/src/components/ui/sheet.tsx:57"}),e.jsxs(Fh,{"data-loc":"client/src/components/ui/sheet.tsx:58","data-slot":"sheet-content",className:Me("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),...l,children:[s,e.jsxs(Vx,{"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(va,{"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 KP({className:t,...s}){return e.jsx("div",{"data-loc":"client/src/components/ui/sheet.tsx:86","data-slot":"sheet-header",className:Me("flex flex-col gap-1.5 p-4",t),...s})}function YP({className:t,...s}){return e.jsx(Hh,{"data-loc":"client/src/components/ui/sheet.tsx:109","data-slot":"sheet-title",className:Me("text-foreground font-semibold",t),...s})}var ap="Tabs",[XP]=zs(ap,[Ux]),f4=Ux(),[ZP,tv]=XP(ap),g4=f.forwardRef((t,s)=>{const{__scopeTabs:r,value:l,onValueChange:c,defaultValue:d,orientation:u="horizontal",dir:x,activationMode:p="automatic",...g}=t,b=Xi(x),[v,y]=nl({prop:l,onChange:c,defaultProp:d??"",caller:ap});return e.jsx(ZP,{scope:r,baseId:Xs(),value:v,onValueChange:y,orientation:u,dir:b,activationMode:p,children:e.jsx(Qe.div,{dir:b,"data-orientation":u,...g,ref:s})})});g4.displayName=ap;var h4="TabsList",v4=f.forwardRef((t,s)=>{const{__scopeTabs:r,loop:l=!0,...c}=t,d=tv(h4,r),u=f4(r);return e.jsx(OC,{asChild:!0,...u,orientation:d.orientation,dir:d.dir,loop:l,children:e.jsx(Qe.div,{role:"tablist","aria-orientation":d.orientation,...c,ref:s})})});v4.displayName=h4;var b4="TabsTrigger",y4=f.forwardRef((t,s)=>{const{__scopeTabs:r,value:l,disabled:c=!1,...d}=t,u=tv(b4,r),x=f4(r),p=C4(u.baseId,l),g=w4(u.baseId,l),b=l===u.value;return e.jsx(PC,{asChild:!0,...x,focusable:!c,active:b,children:e.jsx(Qe.button,{type:"button",role:"tab","aria-selected":b,"aria-controls":g,"data-state":b?"active":"inactive","data-disabled":c?"":void 0,disabled:c,id:p,...d,ref:s,onMouseDown:Ae(t.onMouseDown,v=>{!c&&v.button===0&&v.ctrlKey===!1?u.onValueChange(l):v.preventDefault()}),onKeyDown:Ae(t.onKeyDown,v=>{[" ","Enter"].includes(v.key)&&u.onValueChange(l)}),onFocus:Ae(t.onFocus,()=>{const v=u.activationMode!=="manual";!b&&!c&&v&&u.onValueChange(l)})})})});y4.displayName=b4;var j4="TabsContent",N4=f.forwardRef((t,s)=>{const{__sc
677opeTabs:r,value:l,forceMount:c,children:d,...u}=t,x=tv(j4,r),p=C4(x.baseId,l),g=w4(x.baseId,l),b=l===x.value,v=f.useRef(b);return f.useEffect(()=>{const y=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(y)},[]),e.jsx(Fa,{present:c||b,children:({present:y})=>e.jsx(Qe.div,{"data-state":b?"active":"inactive","data-orientation":x.orientation,role:"tabpanel","aria-labelledby":p,hidden:!y,id:g,tabIndex:0,...u,ref:s,style:{...t.style,animationDuration:v.current?"0s":void 0},children:y&&d})})});N4.displayName=j4;function C4(t,s){return`${t}-trigger-${s}`}function w4(t,s){return`${t}-content-${s}`}var JP=g4,ez=v4,tz=y4,az=N4;function sz({className:t,...s}){return e.jsx(JP,{"data-loc":"client/src/components/ui/tabs.tsx:11","data-slot":"tabs",className:Me("flex flex-col gap-2",t),...s})}function nz({className:t,...s}){return e.jsx(ez,{"data-loc":"client/src/components/ui/tabs.tsx:24","data-slot":"tabs-list",className:Me("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",t),...s})}function Jf({className:t,...s}){return e.jsx(tz,{"data-loc":"client/src/components/ui/tabs.tsx:40","data-slot":"tabs-trigger",className:Me("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),...s})}function eg({className:t,...s}){return e.jsx(az,{"data-loc":"client/src/components/ui/tabs.tsx:56","data-slot":"tabs-content",className:Me("flex-1 outline-none",t),...s})}const Zj=[{value:"lead.created",label:"Lead criado"},{value:"lead.stage_changed",label:"Etapa alterada"},{value:"lead.converted",label:"Lead convertido (Lead Ouro)"},{value:"lead.won",label:"Lead ganho"},{value:"lead.lost",label:"Lead perdido"}],Jj={novo:"bg-blue-500/20 text-blue-400 border-blue-500/30",em_atendimento:"bg-yellow-500/20 text-yellow-400 border-yellow-500/30",lead_ouro:"bg-amber-500/20 text-amber-400 border-amber-500/30",ganho:"bg-green-500/20 text-green-400 border-green-500/30",perdido:"bg-red-500/20 text-red-400 border-red-500/30"},tg={general_contact:"Contato Geral",property_inquiry:"Consulta Imóvel",visit_request:"Visita",financing_inquiry:"Financiamento",whatsapp_click:"WhatsApp",newsletter:"Newsletter"};function rz(){const[t,s]=f.useState("leads"),[r,l]=f.useState(!1),[c,d]=f.useState({name:"",url:"",secret:"",events:[]}),[u,x]=f.useState({status:"",formType:"",page:1}),[p,g]=f.useState(null),b=Y.siteLeads.get.useQuery({id:p},{enabled:p!==null}),v=Y.webhooks.list.useQuery(),y=Y.webhooks.logs.useQuery({limit:100}),j=Y.siteLeads.list.useQuery({page:u.page,limit:50,status:u.status||void 0,formType:u.formType||void 0}),S=Y.useUtils(),N=Y.webhooks.create.useMutation({onSuccess:()=>{S.webhooks.list.invalidate(),l(!1),d({name:"",url:"",secret:"",events:[]}),ce.success("Webhook criado com sucesso")},onError:A=>ce.error(A.message)}),w=Y.webhooks.toggle.useMutation({onSuccess:()=>S.webhooks.list.invalidate()}),D=Y.webhooks.delete.useMutation({onSuccess:()=>{S.webhooks.list.invalidate(),ce.success("Webhook removido")}}),k=A=>{d(_=>({..._,events:_.events.includes(A)?_.events.filter(E=>E!==A):[..._.events,A]}))};return e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:111",className:"p-3 md:p-6 max-w-6xl mx-auto space-y-6",children:[e.jsx("div",{"data-loc":"client/src/pages/Webhooks.tsx:113",className:"flex items-center justify-between",children:e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:114",children:[e.jsx("h1",{"data-loc":"client/src/pages/Webhooks.tsx:115",className:"text-xl font-semibold text-[#F2F2F3]",children:"Webhooks & Leads do Site"}),e.jsx("p",{"data-loc":"client/src/pages/Webhooks.tsx:116",className:"text-sm text-[#8B8B8F] mt-0.5",children:"Gerencie webhooks de saÃda e visualize leads recebidos do site"})]})}),e.jsxs(sz,{"data-loc":"client/src/pages/Webhooks.tsx:122",value:t,onValueChange:s,children:[e.jsxs(nz,{"data-loc":"client/src/pages/Webhooks.tsx:123",className:"bg-muted border border-border",children:[e.jsxs(Jf,{"data-loc":"client/src/pages/Webhooks.tsx:124",value:"leads",className:"data-[state=active]:bg-background",children:[e.jsx(Ys,{"data-loc":"client/src/pages/Webhooks.tsx:125",className:"w-4 h-4 mr-2"}),"Leads do Site"]}),e.jsxs(Jf,{"data-loc":"client/src/pages/Webhooks.tsx:128",value:"webhooks",className:"data-[state=active]:bg-background",children:[e.jsx(_g,{"data-loc":"client/src/pages/Webhooks.tsx:129",className:"w-4 h-4 mr-2"}),"Webhooks"]}),e.jsxs(Jf,{"data-loc":"client/src/pages/Webhooks.tsx:132",value:"logs",className:"data-[state=active]:bg-background",children:[e.jsx(uM,{"data-loc":"client/src/pages/Webhooks.tsx:133",className:"w-4 h-4 mr-2"}),"Logs de Entrega"]})]}),e.jsxs(eg,{"data-loc":"client/src/pages/Webhooks.tsx:139",value:"leads",className:"mt-4 space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:141",className:"flex gap-3 flex-wrap",children:[e.jsxs("select",{"data-loc":"client/src/pages/Webhooks.tsx:142",value:u.status,onChange:A=>x(_=>({..._,status:A.target.value,page:1})),className:"bg-card border border-border text-foreground text-sm rounded-md px-3 py-1.5 focus:outline-none focus:border-primary",children:[e.jsx("option",{"data-loc":"client/src/pages/Webhooks.tsx:147",value:"",children:"Todos os status"}),e.jsx("option",{"data-loc":"client/src/pages/Webhooks.tsx:148",value:"novo",children:"Novo"}),e.jsx("option",{"data-loc":"client/src/pages/Webhooks.tsx:149",value:"em_atendimento",children:"Em atendimento"}),e.jsx("option",{"data-loc":"client/src/pages/Webhooks.tsx:150",value:"lead_ouro",children:"Lead Ouro"}),e.jsx("option",{"data-loc":"client/src/pages/Webhooks.tsx:151",value:"ganho",children:"Ganho"}),e.jsx("option",{"data-loc":"client/src/pages/Webhooks.tsx:152",value:"perdido",children:"Perdido"})]}),e.jsxs("select",{"data-loc":"client/src/pages/Webhooks.tsx:154",value:u.formType,onCh
677ange:A=>x(_=>({..._,formType:A.target.value,page:1})),className:"bg-card border border-border text-foreground text-sm rounded-md px-3 py-1.5 focus:outline-none focus:border-primary",children:[e.jsx("option",{"data-loc":"client/src/pages/Webhooks.tsx:159",value:"",children:"Todos os formulários"}),Object.entries(tg).map(([A,_])=>e.jsx("option",{"data-loc":"client/src/pages/Webhooks.tsx:161",value:A,children:_},A))]}),e.jsxs("span",{"data-loc":"client/src/pages/Webhooks.tsx:164",className:"text-sm text-[#8B8B8F] self-center ml-auto",children:[j.data?.total??0," leads"]})]}),e.jsx("div",{"data-loc":"client/src/pages/Webhooks.tsx:170",className:"bg-card border border-border rounded-lg overflow-hidden",children:e.jsxs("table",{"data-loc":"client/src/pages/Webhooks.tsx:171",className:"w-full text-sm",children:[e.jsx("thead",{"data-loc":"client/src/pages/Webhooks.tsx:172",children:e.jsxs("tr",{"data-loc":"client/src/pages/Webhooks.tsx:173",className:"bg-muted border-b border-border",children:[e.jsx("th",{"data-loc":"client/src/pages/Webhooks.tsx:174",className:"text-left px-4 py-3 text-muted-foreground font-medium",children:"Nome"}),e.jsx("th",{"data-loc":"client/src/pages/Webhooks.tsx:175",className:"text-left px-4 py-3 text-muted-foreground font-medium",children:"Contato"}),e.jsx("th",{"data-loc":"client/src/pages/Webhooks.tsx:176",className:"text-left px-4 py-3 text-muted-foreground font-medium",children:"Formulário"}),e.jsx("th",{"data-loc":"client/src/pages/Webhooks.tsx:177",className:"text-left px-4 py-3 text-muted-foreground font-medium",children:"Imóvel"}),e.jsx("th",{"data-loc":"client/src/pages/Webhooks.tsx:178",className:"text-left px-4 py-3 text-muted-foreground font-medium",children:"UTM"}),e.jsx("th",{"data-loc":"client/src/pages/Webhooks.tsx:179",className:"text-left px-4 py-3 text-muted-foreground font-medium",children:"Meta CAPI"}),e.jsx("th",{"data-loc":"client/src/pages/Webhooks.tsx:180",className:"text-left px-4 py-3 text-muted-foreground font-medium",children:"Status"}),e.jsx("th",{"data-loc":"client/src/pages/Webhooks.tsx:181",className:"text-left px-4 py-3 text-muted-foreground font-medium",children:"Data"})]})}),e.jsxs("tbody",{"data-loc":"client/src/pages/Webhooks.tsx:184",children:[j.isLoading&&e.jsx("tr",{"data-loc":"client/src/pages/Webhooks.tsx:186",children:e.jsx("td",{"data-loc":"client/src/pages/Webhooks.tsx:186",colSpan:8,className:"text-center py-8 text-muted-foreground",children:"Carregando..."})}),j.data?.data.length===0&&e.jsx("tr",{"data-loc":"client/src/pages/Webhooks.tsx:189",children:e.jsx("td",{"data-loc":"client/src/pages/Webhooks.tsx:189",colSpan:8,className:"text-center py-8 text-muted-foreground",children:"Nenhum lead recebido ainda"})}),j.data?.data.map(A=>e.jsxs("tr",{"data-loc":"client/src/pages/Webhooks.tsx:192",className:"border-t border-border hover:bg-muted/30 cursor-pointer",onClick:()=>g(A.id),children:[e.jsxs("td",{"data-loc":"client/src/pages/Webhooks.tsx:193",className:"px-4 py-3 text-foreground font-medium",children:[A.nome,A.merged===1&&e.jsx("span",{"data-loc":"client/src/pages/Webhooks.tsx:196",className:"ml-1 text-xs text-[#C9A96E]",title:"Contato já existia",children:"â©"})]}),e.jsxs("td",{"data-loc":"client/src/pages/Webhooks.tsx:199",className:"px-4 py-3 text-muted-foreground",children:[e.jsx("div",{"data-loc":"client/src/pages/Webhooks.tsx:200",children:A.telefone||"â"}),e.jsx("div",{"data-loc":"client/src/pages/Webhooks.tsx:201",className:"text-xs text-muted-foreground",children:A.email||""})]}),e.jsx("td",{"data-loc":"client/src/pages/Webhooks.tsx:203",className:"px-4 py-3 text-muted-foreground",children:tg[A.formType??""]||A.formType}),e.jsx("td",{"data-loc":"client/src/pages/Webhooks.tsx:206",className:"px-4 py-3 text-muted-foreground text-xs",children:A.codigoImovel?e.jsx("span",{"data-loc":"client/src/pages/Webhooks.tsx:208",className:"font-mono",children:A.codigoImovel}):"â"}),e.jsx("td",{"data-loc":"client/src/pages/Webhooks.tsx:211",className:"px-4 py-3 text-muted-foreground text-xs",children:A.utmSource?e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:213",children:[e.jsx("div",{"data-loc":"client/src/pages/Webhooks.tsx:214",children:A.utmSource}),A.utmMedium&&e.jsx("div",{"data-loc":"client/src/pages/Webhooks.tsx:215",className:"text-muted-foreground
677/60",children:A.utmMedium})]}):"â"}),e.jsx("td",{"data-loc":"client/src/pages/Webhooks.tsx:219",className:"px-4 py-3",children:e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:220",className:"flex gap-1",children:[e.jsx("span",{"data-loc":"client/src/pages/Webhooks.tsx:221",title:"Lead enviado",children:A.metaLeadSent===1?e.jsx(Ka,{"data-loc":"client/src/pages/Webhooks.tsx:223",className:"w-4 h-4 text-green-400"}):e.jsx(Yr,{"data-loc":"client/src/pages/Webhooks.tsx:224",className:"w-4 h-4 text-muted-foreground"})}),e.jsx("span",{"data-loc":"client/src/pages/Webhooks.tsx:226",title:"Converted enviado",children:A.metaConvertedSent===1?e.jsx(Ka,{"data-loc":"client/src/pages/Webhooks.tsx:228",className:"w-4 h-4 text-amber-400"}):e.jsx(Za,{"data-loc":"client/src/pages/Webhooks.tsx:229",className:"w-4 h-4 text-muted-foreground"})})]})}),e.jsx("td",{"data-loc":"client/src/pages/Webhooks.tsx:233",className:"px-4 py-3",children:e.jsx("span",{"data-loc":"client/src/pages/Webhooks.tsx:234",className:`text-xs px-2 py-0.5 rounded-full border ${Jj[A.status??"novo"]||"bg-muted text-muted-foreground border-border"}`,children:A.status??"novo"})}),e.jsx("td",{"data-loc":"client/src/pages/Webhooks.tsx:238",className:"px-4 py-3 text-muted-foreground text-xs whitespace-nowrap",children:A.createdAt?new Date(A.createdAt).toLocaleString("pt-BR"):"â"})]},A.id))]})]})}),(j.data?.total??0)>50&&e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:249",className:"flex justify-center gap-2",children:[e.jsx(oe,{"data-loc":"client/src/pages/Webhooks.tsx:250",variant:"outline",size:"sm",disabled:u.page<=1,onClick:()=>x(A=>({...A,page:A.page-1})),children:"Anterior"}),e.jsxs("span",{"data-loc":"client/src/pages/Webhooks.tsx:258",className:"text-sm text-[#8B8B8F] self-center",children:["Página ",u.page," de ",Math.ceil((j.data?.total??0)/50)]}),e.jsx(oe,{"data-loc":"client/src/pages/Webhooks.tsx:261",variant:"outline",size:"sm",disabled:u.page>=Math.ceil((j.data?.total??0)/50),onClick:()=>x(A=>({...A,page:A.page+1})),children:"Próxima"})]})]}),e.jsxs(eg,{"data-loc":"client/src/pages/Webhooks.tsx:274",value:"webhooks",className:"mt-4 space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:275",className:"flex justify-between items-center",children:[e.jsx("p",{"data-loc":"client/src/pages/Webhooks.tsx:276",className:"text-sm text-muted-foreground",children:"Configure destinos para receber notificações automáticas quando leads chegam ou avançam no funil."}),e.jsxs(oe,{"data-loc":"client/src/pages/Webhooks.tsx:279",size:"sm",className:"bg-[#C9A96E] hover:bg-[#B8935A] text-black",onClick:()=>l(!0),children:[e.jsx(Jt,{"data-loc":"client/src/pages/Webhooks.tsx:284",className:"w-4 h-4 mr-1.5"}),"Novo Webhook"]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:290",className:"space-y-3",children:[v.isLoading&&e.jsx("div",{"data-loc":"client/src/pages/Webhooks.tsx:292",className:"text-center py-8 text-muted-foreground",children:"Carregando..."}),v.data?.length===0&&e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:295",className:"bg-card border border-border rounded-lg p-8 text-center text-muted-foreground",children:[e.jsx(_g,{"data-loc":"client/src/pages/Webhooks.tsx:296",className:"w-8 h-8 mx-auto mb-2 opacity-40"}),e.jsx("p",{"data-loc":"client/src/pages/Webhooks.tsx:297",children:"Nenhum webhook configurado"}),e.jsx("p",{"data-loc":"client/src/pages/Webhooks.tsx:298",className:"text-xs mt-1",children:"Crie um webhook para integrar com n8n, Make, Zapier ou qualquer endpoint HTTP"})]}),v.data?.map(A=>e.jsx("div",{"data-loc":"client/src/pages/Webhooks.tsx:302",className:"bg-card border border-border rounded-lg p-4",children:e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:303",className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:304",className:"flex-1 min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:305",className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{"data-loc":"client/src/pages/Webhooks.tsx:306",className:"font-medium text-foreground",children:A.name}),e.jsx("span",{"data-loc":"client/src/pages/Webhooks.tsx:307",className:`text-xs px-2 py-0.5 rounded-full border ${A.active===1?"bg-green-500/20 text-green-400 border-green-500/30":"bg-muted text-muted-foreground border-border"}`,children:A.active===1?"Ativo":"Inativo"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:311",className:"flex items-center gap-1.5 text-sm text-muted-foreground mb-2",children:[e.jsx(lr,{"data-loc":"client/src/pages/Webhooks.tsx:312",className:"w-3.5 h-3.5 flex-shrink-0"}),e.jsx("span",{"data-loc":"client/src/pages/Webhooks.tsx:313",className:"font-mono text-xs truncate",children:A.url})]}),e.jsx("div",{"data-loc":"client/src/pages/Webhooks.tsx:315",className:"flex flex-wrap gap-1",children:JSON.parse(A.events||"[]").map(_=>e.jsx("span",{"data-loc":"client/src/pages/Webhooks.tsx:317",className:"text-xs px-2 py-0.5 bg-muted text-muted-foreground rounded-full border border-border",children:Zj.find(E=>E.value===_)?.label||_},_))})]}),e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:323",className:"flex items-center gap-2 flex-shrink-0",children:[e.jsx("button",{"data-loc":"client/src/pages/Webhooks.tsx:324",onClick:()=>w.mutate({id:A.id,active:A.active!==1}),className:"text-muted-foreground hover:text-primary transition-colors",title:A.active===1?"Desativar":"Ativar",children:A.active===1?e.jsx(UM,{"data-loc":"client/src/pages/Webhooks.tsx:330",className:"w-5 h-5 text-green-400"}):e.jsx(zM,{"data-loc":"client/src/pages/Webhooks.tsx:331",className:"w-5 h-5"})}),e.jsx("button",{"data-loc":"client/src/pages/Webhooks.tsx:333",onClick:()=>{confirm("Remover este webhook?")&&D.mutate({id:A.id})},className:"text-muted-foreground hover:text-red-400 transition-colors",children:e.jsx(Ba,{"data-loc":"client/src/pages/Webhooks.tsx:339",className:"w-4 h-4"})})]})]})},A.id))]}),e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:348",className:"bg-card border border-border rounded-lg p-4",children:[e.jsx("h3",{"data-loc":"client/src/pages/Webhooks.tsx:349",className:"text-sm font-medium text-foreground mb-3",children:"Exemplo de payload (lead.created)"}),e.jsx("pre",{"data-loc":"client/src/pages/Webhooks.tsx:350",className:"text-xs text-muted-foreground bg-muted rounded p-3 overflow-x-auto",children:`{ 678 "event": "lead.created", 679 "timestamp": "2025-01-15T10:30:00Z", 680 "data": { 681 "id": 42, 682 "nome": "João Silva", 683 "telefone": "+5547999999999", 684 "email": "[email protected]", 685 "form_type": "property_inquiry", 686 "pipeline_id": 1, 687 "stage_id": 3, 688 "codigo_imovel": "FS-12345", 689 "utm_source": "google", 690 "utm_medium": "cpc", 691 "utm_campaign": "bc-lancamentos", 692 "merged": false, 693 "created_at": "2025-01-15T10:30:00Z" 694 } 695}`})]})]}),e.jsx(eg,{"data-loc":"client/src/pages/Webhooks.tsx:373",value:"logs",className:"mt-4",children:e.jsx("div",{"data-loc":"client/src/pages/Webhooks.tsx:374",className:"bg-card border border-border rounded-lg overflow-hidden",children:e.jsxs("table",{"data-loc":"client/src/pages/Webhooks.tsx:375",className:"w-full text-sm",children:[e.jsx("thead",{"data-loc":"client/src/pages/Webhooks.tsx:376",children:e.jsxs("tr",{"data-loc":"client/src/pages/Webhooks.tsx:377",className:"bg-muted border-b border-border",children:[e.jsx("th",{"data-loc":"client/src/pages/Webhooks.tsx:378",className:"text-left px-4 py-3 text-muted-foreground font-medium",children:"Webhook"}),e.jsx("th",{"data-loc":"client/src/pages/Webhooks.tsx:379",className:"text-left px-4 py-3 text-muted-foreground font-medium",children:"Evento"}),e.jsx("th",{"data-loc":"client/src/pages/Webhooks.tsx:380",className:"text-left px-4 py-3 text-muted-foreground font-medium",children:"Status HTTP"}),e.jsx("th",{"data-loc":"client/src/pages/Webhooks.tsx:381",className:"text-left px-4 py-3 text-muted-foreground font-medium",children:"Tentativas"}),e.jsx("th",{"data-loc":"client/src/pages/Webhooks.tsx:382",className:"text-left px-4 py-3 text-muted-foreground font-medium",children:"Data"})]})}),e.jsxs("tbody",{"data-loc":"client/src/pages/Webhooks.tsx:385",children:[y.isLoading&&e.jsx("tr",{"data-loc":"client/src/pages/Webhooks.tsx:387",children:e.jsx("td",{"data-loc":"client/src/pages/Webhooks.tsx:387",colSpan:5,className:"text-center py-8 text-muted-foreground",children:"Carregando..."})}),y.data?.length===0&&e.jsx("tr",{"data-loc":"client/src/pages/Webhooks.tsx:390",children:e.jsx("td",{"data-loc":"client/src/pages/Webhooks.tsx:390",colSpan:5,className:"text-center py-8 text-muted-foreground",children:"Nenhum log de entrega ainda"})}),y.data?.map(A=>e.jsxs("tr",{"data-loc":"client/src/pages/Webhooks.tsx:393",className:"border-t border-[#1E1E22] hover:bg-[#0A0A0B]/50",children:[e.jsxs("td",{"data-loc":"client/src/pages/Webhooks.tsx:394",className:"px-4 py-3 text-muted-foreground text-xs font-mono",children:["#",A.webhookId]}),e.jsx("td",{"data-loc":"client/src/pages/Webhooks.tsx:395",className:"px-4 py-3 text-muted-foreground text-xs",children:A.event}),e.jsx("td",{"data-loc":"client/src/pages/Webhooks.tsx:396",className:"px-4 py-3",children:A.responseStatus?e.jsx("span",{"data-loc":"client/src/pages/Webhooks.tsx:398",className:`text-xs px-2 py-0.5 rounded-full border ${A.responseStatus>=200&&A.responseStatus<300?"bg-green-500/20 text-green-400 border-green-500/30":"bg-red-500/20 text-red-400 border-red-500/30"}`,children:A.responseStatus}):e.jsx("span",{"data-loc":"client/src/pages/Webhooks.tsx:406",className:"text-xs text-red-400",children:"Falhou"})}),e.jsx("td",{"data-loc":"client/src/pages/Webhooks.tsx:409",className:"px-4 py-3 text-muted-foreground text-xs",children:A.attempt}),e.jsx("td",{"data-loc":"client/src/pages/Webhooks.tsx:410",className:"px-4 py-3 text-muted-foreground text-xs whitespace-nowrap",children:A.createdAt?new Date(A.createdAt).toLocaleStr
695ing("pt-BR"):"â"})]},A.id))]})]})})})]}),e.jsx(Rs,{"data-loc":"client/src/pages/Webhooks.tsx:422",open:r,onOpenChange:l,children:e.jsxs(Ts,{"data-loc":"client/src/pages/Webhooks.tsx:423",className:"bg-card border-border text-foreground max-w-md",children:[e.jsx(_s,{"data-loc":"client/src/pages/Webhooks.tsx:424",children:e.jsx(Ps,{"data-loc":"client/src/pages/Webhooks.tsx:425",children:"Novo Webhook"})}),e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:427",className:"space-y-4 py-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:428",children:[e.jsx(We,{"data-loc":"client/src/pages/Webhooks.tsx:429",className:"text-muted-foreground text-xs mb-1.5 block",children:"Nome"}),e.jsx(ge,{"data-loc":"client/src/pages/Webhooks.tsx:430",value:c.name,onChange:A=>d(_=>({..._,name:A.target.value})),placeholder:"Ex: n8n - Leads",className:"bg-background border-border text-foreground"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:437",children:[e.jsx(We,{"data-loc":"client/src/pages/Webhooks.tsx:438",className:"text-muted-foreground text-xs mb-1.5 block",children:"URL de destino"}),e.jsx(ge,{"data-loc":"client/src/pages/Webhooks.tsx:439",value:c.url,onChange:A=>d(_=>({..._,url:A.target.value})),placeholder:"https://n8n.seudominio.com/webhook/...",className:"bg-background border-border text-foreground"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:446",children:[e.jsx(We,{"data-loc":"client/src/pages/Webhooks.tsx:447",className:"text-muted-foreground text-xs mb-1.5 block",children:"Secret (opcional)"}),e.jsx(ge,{"data-loc":"client/src/pages/Webhooks.tsx:448",value:c.secret,onChange:A=>d(_=>({..._,secret:A.target.value})),placeholder:"Chave para assinar o payload",className:"bg-background border-border text-foreground"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:455",children:[e.jsx(We,{"data-loc":"client/src/pages/Webhooks.tsx:456",className:"text-muted-foreground text-xs mb-1.5 block",children:"Eventos"}),e.jsx("div",{"data-loc":"client/src/pages/Webhooks.tsx:457",className:"space-y-2",children:Zj.map(A=>e.jsxs("label",{"data-loc":"client/src/pages/Webhooks.tsx:459",className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{"data-loc":"client/src/pages/Webhooks.tsx:460",type:"checkbox",checked:c.events.includes(A.value),onChange:()=>k(A.value),className:"accent-[#C9A96E]"}),e.jsx("span",{"data-loc":"client/src/pages/Webhooks.tsx:466",className:"text-sm text-[#F2F2F3]",children:A.label}),e.jsx("span",{"data-loc":"client/src/pages/Webhooks.tsx:467",className:"text-xs text-[#5B5B5F] font-mono",children:A.value})]},A.value))})]})]}),e.jsxs(Os,{"data-loc":"client/src/pages/Webhooks.tsx:473",children:[e.jsx(oe,{"data-loc":"client/src/pages/Webhooks.tsx:474",variant:"outline",onClick:()=>l(!1),children:"Cancelar"}),e.jsx(oe,{"data-loc":"client/src/pages/Webhooks.tsx:475",className:"bg-[#C9A96E] hover:bg-[#B8935A] text-black",disabled:!c.name||!c.url||c.events.length===0||N.isPending,onClick:()=>N.mutate({name:c.name,url:c.url,secret:c.secret||void 0,events:c.events}),children:N.isPending?"Criando...":"Criar Webhook"})]})]})}),e.jsx(WP,{"data-loc":"client/src/pages/Webhooks.tsx:492",open:p!==null,onOpenChange:A=>{A||g(null)},children:e.jsxs(VP,{"data-loc":"client/src/pages/Webhooks.tsx:493",className:"w-full sm:max-w-lg bg-card border-border text-foreground overflow-y-auto",children:[e.jsx(KP,{"data-loc":"client/src/pages/Webhooks.tsx:494",className:"mb-4",children:e.jsx(YP,{"data-loc":"client/src/pages/Webhooks.tsx:495",className:"text-foreground",children:b.data?.lead.nome??"Lead"})}),b.isLoading&&e.jsx("div",{"data-loc":"client/src/pages/Webhooks.tsx:500",className:"text-center py-8 text-muted-foreground",children:"Carregando..."}),b.data&&(()=>{const A=b.data.lead;return e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:505",className:"space-y-4 text-sm",children:[e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:507",className:"bg-muted/40 rounded-lg p-4 space-y-2",children:[e.jsx("p",{"data-loc":"client/src/pages/Webhooks.tsx:508",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider mb-2",children:"Contato"}),e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:509",className:"grid grid-cols-2 gap-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:510",children:[e.jsx("span",{"data-loc":"client/src/pages/Webhooks.tsx:510",className:"text-muted-foreground",children:"Nome"}),e.jsx("p",{"data-loc":"client/src/pages/Webhooks.tsx:510",className:"text-foreground font-medium",children:A.nome||"â"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:511",children:[e.jsx("span",{"data-loc":"client/src/pages/Webhooks.tsx:511",className:"text-muted-foreground",children:"Telefone"}),e.jsx("p",{"data-loc":"client/src/pages/Webhooks.tsx:511",className:"text-foreground",children:A.telefone||"â"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:512",className:"col-span-2",children:[e.jsx("span",{"data-loc":"client/src/pages/Webhooks.tsx:512",className:"text-muted-foreground",children:"E-mail"}),e.jsx("p",{"data-loc":"client/src/pages/Webhooks.tsx:512",className:"text-foreground",children:A.email||"â"})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:517",className:"bg-muted/40 rounded-lg p-4 space-y-2",children:[e.jsxs("p",{"data-loc":"client/src/pages/Webhooks.tsx:518",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider mb-2 flex items-center gap-1",children:[e.jsx(Px,{"data-loc":"client/src/pages/Webhooks.tsx:518",className:"w-3 h-3"})," Imóvel"]}),e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:519",className:"grid grid-cols-2 gap-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:520",children:[e.jsx("span",{"data-loc":"client/src/pages/Webhooks.tsx:520",className:"text-muted-foreground",children:"Cód. Imóvel"}),e.jsx("p",{"data-loc":"client/src/pages/Webhooks.tsx:520",className:"text-foreground font-mono",children:A.codigoImovel||"â"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:521",children:[e.jsx("span",{"data-loc":"client/src/pages/Webhooks.tsx:521",className:"text-muted-foreground",children:"Nome do Imóvel"}),e.jsx("p",{"data-loc":"client/src/pages/Webhooks.tsx:521",className:"text-foreground",children:A.nomeImovel||"â"})]})]}),A.urlPagina&&e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:524",children:[e.jsx("span",{"data-loc":"client/src/pages/Webhooks.tsx:525",className:"text-muted-foreground",children:"URL da Página"}),e.jsxs("a",{"data-loc":"client/src/pages/Webhooks.tsx:526",href:A.urlPagina,target:"_blank",rel:"noreferrer",className:"flex items-center gap-1 text-[#C9A96E] hover:underline text-xs mt-0.5 break-all",children:[e.jsx(Gi,{"data-loc":"client/src/pages/Webhooks.tsx:527",className:"w-3 h-3 shrink-0"}),A.urlPagina]})]})]}),A.mensagem&&e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:536",className:"bg-muted/40 rounded-lg p-4",children:[e.jsxs("p",{"data-loc":"client/src/pages/Webhooks.tsx:537",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider mb-2 flex items-center gap-1",children:[e.jsx(Rn,{"data-loc":"client/src/pages/Webhooks.tsx:537",className:"w-3 h-3"})," Mensagem"]}),e.jsx("p",{"data-loc":"client/src/pages/Webhooks.tsx:538",className:"text-foreground whitespace-pre-wrap",children:A.mensagem})]}),(A.utmSource||A.utmMedium||A.utmCampaign)&&e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:544",className:"bg-muted/40 rounded-lg p-4 space-y-2",children:[e.jsx("p",{"data-loc":"client/src/pages/Webhooks.tsx:545",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider mb-2",children:"UTM"}),e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:546",className:"grid grid-cols-2 gap-2",children:[A.utmSource&&e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:547",children:[e.jsx("span",{"data-loc":"client/src/pages/Webhooks.tsx:547",className:"text-muted-foreground",children:"Source"}),e.jsx("p",{"data-loc":"client/src/pages/Webhooks.tsx:547",className:"text-foreground",children:A.utmSource})]}),A.utmMedium&&e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:548",children:[e.jsx("span",{"data-loc":"client/src/pages/Webhooks.tsx:548",className:"text-muted-foreground",children:"Medium"}),e.jsx("p",{"data-loc":"client/src/pages/Webhooks.tsx:548",className:"text-foreground",children:A.utmMedium})]}),A.utmCampaign&&e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:549",className:"col-span-2",children:[e.jsx("span",{"data-loc":"client/src/pages/Webhooks.tsx:549",className:"text-muted-foreground",children:"Campaign"}),e.jsx("p",{"data-loc":"client/src/pages/Webhooks.tsx:549",className:"text-foreground",children:A.utmCampaign})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:555",className:"bg-muted/40 rounded-lg p-4 space-y-2",children:[e.jsx("p",{"data-loc":"client/src/pages/Webhooks.tsx:556",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider mb-2",children:"Meta CAPI"}),e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:557",className:"grid grid-cols-2 gap-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:558",className:"flex items-center gap-2",children:[A.metaLeadSent===1?e.jsx(Ka,{"data-loc":"client/src/pages/Webhooks.tsx:559",className:"w-4 h-4 text-green-400"}):e.jsx(Yr,{"data-loc":"client/src/pages/Webhooks.tsx:559",className:"w-4 h-4 text-muted-foreground"}),e.jsx("span",{"data-loc":"client/src/pages/Webhooks.tsx:560",className:"text-foreground",children:"Lead enviado"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:562",className:"flex items-center gap-2",children:[A.metaConvertedSent===1?e.jsx(Ka,{"data-loc":"client/src/pages/Webhooks.tsx:563",className:"w-4 h-4 text-amber-400"}):e.jsx(Za,{"data-loc":"client/src/pages/Webhooks.tsx:563",className:"w-4 h-4 text-muted-foreground"}),e.jsx("span",{"data-loc":"client/src/pages/Webhooks.tsx:564",className:"text-foreground",children:"Converted enviado"})]}),A.fbp&&e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:566",children:[e.jsx("span",{"data-loc":"client/src/pages/Webhooks.tsx:566",className:"text-muted-foreground",children:"fbp"}),e.jsx("p",{"data-loc":"client/src/pages/Webhooks.tsx:566",className:"text-foreground font-mono text-xs truncate",children:A.fbp})]}),A.fbc&&e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:567",children:[e.jsx("span",{"data-loc":"client/src/pages/Webhooks.tsx:567",className:"text-muted-foreground",children:"fbc"}),e.jsx("p",{"data-loc":"client/src/pages/Webhooks.tsx:567",className:"text-foreground font-mono text-xs truncate",children:A.fbc})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:572",className:"bg-muted/40 rounded-lg p-4 space-y-2",children:[e.jsx("p",{"data-loc":"client/src/pages/Webhooks.tsx:573",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider mb-2",children:"Informações"}),e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:574",className:"grid grid-cols-2 gap-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:575",children:[e.jsx("span",{"data-loc":"client/src/pages/Webhooks.tsx:575",className:"text-muted-foreground",children:"Status"}),e.jsx("p",{"data-loc":"client/src/pages/Webhooks.tsx:576",children:e.jsx("span",{"data-loc":"client/src/pages/Webhooks.tsx:576",className:`text-xs px-2 py-0.5 rounded-full border ${Jj[A.status??"novo"]||"bg-muted text-muted-foreground border-border"}`,children:A.status??"novo"})})]}),e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:578",children:[e.jsx("span",{"data-loc":"client/src/pages/Webhooks.tsx:578",className:"text-muted-foreground",children:"Formulário"}),e.jsx("p",{"data-loc":"client/src/pages/Webhooks.tsx:578",className:"text-foreground",children:tg[A.formType??""]||A.formType||"â"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:579",children:[e.jsx("span",{"data-loc":"client/src/pages/Webhooks.tsx:579",className:"text-muted-foreground",children:"Origem"}),e.jsx("p",{"data-loc":"client/src/pages/Webhooks.tsx:579",className:"text-foreground",children:A.utmSource||"â"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Webhooks.tsx:580",children:[e.jsx("span",{"data-loc":"client/src/pages/Webhooks.tsx:580",className:"text-muted-foreground",children:"Recebido em"}),e.jsx("p",{"data-loc":"client/src/pages/Webhooks.tsx:580",className:"text-foreground",children:A.createdAt?new Date(A.createdAt).toLocaleStr
695ing("pt-BR"):"â"})]})]})]})]})})()]})})]})}function lz({className:t,...s}){return e.jsx("div",{"data-loc":"client/src/components/ui/table.tsx:7","data-slot":"table-container",className:"relative w-full overflow-x-auto",children:e.jsx("table",{"data-loc":"client/src/components/ui/table.tsx:11","data-slot":"table",className:Me("w-full caption-bottom text-sm",t),...s})})}function oz({className:t,...s}){return e.jsx("thead",{"data-loc":"client/src/components/ui/table.tsx:22","data-slot":"table-header",className:Me("[&_tr]:border-b",t),...s})}function cz({className:t,...s}){return e.jsx("tbody",{"data-loc":"client/src/components/ui/table.tsx:32","data-slot":"table-body",className:Me("[&_tr:last-child]:border-0",t),...s})}function Pu({className:t,...s}){return e.jsx("tr",{"data-loc":"client/src/components/ui/table.tsx:55","data-slot":"table-row",className:Me("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",t),...s})}function sr({className:t,...s}){return e.jsx("th",{"data-loc":"client/src/components/ui/table.tsx:68","data-slot":"table-head",className:Me("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),...s})}function ln({className:t,...s}){return e.jsx("td",{"data-loc":"client/src/components/ui/table.tsx:81","data-slot":"table-cell",className:Me("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),...s})}function iz(){const{user:t}=ka(),[s,r]=f.useState(1),[l,c]=f.useState("all"),d=Y.useUtils();if(t&&t.role!=="admin"&&t.role!=="gerente")return e.jsx("div",{"data-loc":"client/src/pages/MetaCapi.tsx:53",className:"flex items-center justify-center h-64 text-[#F2F2F3]/50",children:"Acesso restrito a administradores."});const{data:u}=Y.metaCapi.stats.useQuery(),{data:x,isLoading:p}=Y.metaCapi.list.useQuery({page:s,limit:50,status:l}),g=Y.metaCapi.resend.useMutation({onSuccess:j=>{j.success?ce.success(`Evento CONVERTED reenviado. events_received: ${j.eventsReceived}`):ce.error(`Falha ao reenviar: ${j.error}`),d.metaCapi.list.invalidate(),d.metaCapi.stats.invalidate()},onError:j=>{ce.error(`Erro: ${j.message}`)}}),b=x?Math.ceil(x.total/50):1;function v(j){return j.metaConvertedSent===1?e.jsxs(Qt,{"data-loc":"client/src/pages/MetaCapi.tsx:90",className:"bg-emerald-500/20 text-emerald-400 border-emerald-500/30 gap-1",children:[e.jsx(Ju,{"data-loc":"client/src/pages/MetaCapi.tsx:91",className:"w-3 h-3"})," Enviado"]}):j.metaConvertedError?e.jsx(Zu,{"data-loc":"client/src/pages/MetaCapi.tsx:97",children:e.jsxs(Gr,{"data-loc":"client/src/pages/MetaCapi.tsx:98",children:[e.jsx(Vr,{"data-loc":"client/src/pages/MetaCapi.tsx:99",asChild:!0,children:e.jsxs(Qt,{"data-loc":"client/src/pages/MetaCapi.tsx:100",className:"bg-red-500/20 text-red-400 border-red-500/30 gap-1 cursor-help",children:[e.jsx(Yr,{"data-loc":"client/src/pages/MetaCapi.tsx:101",className:"w-3 h-3"})," Erro"]})}),e.jsx(Kr,{"data-loc":"client/src/pages/MetaCapi.tsx:104",className:"max-w-xs text-xs",children:j.metaConvertedError})]})}):j.status==="lead_ouro"||j.status==="ganho"?e.jsxs(Qt,{"data-loc":"client/src/pages/MetaCapi.tsx:113",className:"bg-amber-500/20 text-amber-400 border-amber-500/30 gap-1",children:[e.jsx(Za,{"data-loc":"client/src/pages/MetaCapi.tsx:114",className:"w-3 h-3"})," Pendente"]}):e.jsxs(Qt,{"data-loc":"client/src/pages/MetaCapi.tsx:119",className:"bg-muted text-muted-foreground border-border gap-1",children:[e.jsx(Za,{"data-loc":"client/src/pages/MetaCapi.tsx:120",className:"w-3 h-3"})," Aguardando"]})}function y(j){return{property_contact:"Contato Imóvel",whatsapp_chat:"WhatsApp",general_contact:"Contato Geral",newsletter:"Newsletter",schedule_visit:"Agendar Visita",financing_simulation:"Simulação"}[j]||j}return e.jsxs("div",{"data-loc":"client/src/pages/MetaCapi.tsx:138",className:"p-3 md:p-6 max-w-7xl mx-auto space-y-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/MetaCapi.tsx:140",children:[e.jsx("h1",{"data-loc":"client/src/pages/MetaCapi.tsx:141",className:"text-2xl font-semibold text-foreground",children:"Meta CAPI â Monitoramento"}),e.jsx("p",{"data-loc":"client/src/pages/MetaCapi.tsx:142",className:"text-sm text-muted-foreground mt-1",children:"Acompanhe o envio de eventos CONVERTED para a Meta Conversions API"})]}),e.jsxs("div",{"data-loc":"client/src/pages/MetaCapi.tsx:148",className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[e.jsx(Wt,{"data-loc":"client/src/pages/MetaCapi.tsx:149",className:"bg-card border-border",children:e.jsx(ta,{"data-loc":"client/src/pages/MetaCapi.tsx:150",className:"p-4",children:e.jsxs("div",{"data-loc":"client/src/pages/MetaCapi.tsx:151",className:"flex items-center gap-3",children:[e.jsx("div",{"data-loc":"client/src/pages/MetaCapi.tsx:152",className:"p-2 bg-primary/10 rounded-lg",children:e.jsx(Ys,{"data-loc":"client/src/pages/MetaCapi.tsx:153",className:"w-4 h-4 text-primary"})}),e.jsxs("div",{"data-loc":"client/src/pages/MetaCapi.tsx:155",children:[e.jsx("p",{"data-loc":"client/src/pages/MetaCapi.tsx:156",className:"text-xs text-muted-foreground",children:"Total Leads"}),e.jsx("p",{"data-loc":"client/src/pages/MetaCapi.tsx:157",className:"text-xl font-bold text-foreground",children:u?.totalLeads??"â"})]})]})})}),e.jsx(Wt,{"data-loc":"client/src/pages/MetaCapi.tsx:163",className:"bg-card border-border",children:e.jsx(ta,{"data-loc":"client/src/pages/MetaCapi.tsx:164",className:"p-4",children:e.jsxs("div",{"data-loc":"client/src/pages/MetaCapi.tsx:165",className:"flex items-center gap-3",children:[e.jsx("div",{"data-loc":"client/src/pages/MetaCapi.tsx:166",className:"p-2 bg-emerald-500/10 rounded-lg",children:e.jsx(Ju,{"data-loc":"client/src/pages/MetaCapi.tsx:167",className:"w-4 h-4 text-emerald-400"})}),e.jsxs("div",{"data-loc":"client/src/pages/MetaCapi.tsx:169",children:[e.jsx("p",{"data-loc":"client/src/pages/MetaCapi.tsx:170",className:"text-xs text-muted-foreground",children:"CONVERTED Enviados"}),e.jsx("p",{"data-loc":"client/src/pages/MetaCapi.tsx:171",className:"text-xl font-bold text-foreground",children:u?.convertedSent??"â"})]})]})})}),e.jsx(Wt,{"data-loc":"client/src/pages/MetaCapi.tsx:177",className:"bg-card border-border",children:e.jsx(ta,{"data-loc":"client/src/pages/MetaCapi.tsx:178",className:"p-4",children:e.jsxs("div",{"data-loc":"client/src/pages/MetaCapi.tsx:179",className:"flex items-center gap-3",children:[e.jsx("div",{"data-loc":"client/src/pages/MetaCapi.tsx:180",className:"p-2 bg-amber-500/10 rounded-lg",children:e.jsx(hh,{"data-loc":"client/src/pages/MetaCapi.tsx:181",className:"w-4 h-4 text-amber-400"})}),e.jsxs("div",{"data-loc":"client/src/pages/MetaCapi.tsx:183",children:[e.jsx("p",{"data-loc":"client/src/pages/MetaCapi.tsx:184",className:"text-xs text-muted-foreground",children:"Lead Ouro"}),e.jsx("p",{"data-loc":"client/src/pages/MetaCapi.tsx:185",className:"text-xl font-bold text-foreground",children:u?.leadOuro??"â"})]})]})})}),e.jsx(Wt,{"data-loc":"client/src/pages/MetaCapi.tsx:191",className:"bg-card border-border",children:e.jsx(ta,{"data-loc":"client/src/pages/MetaCapi.tsx:192",className:"p-4",children:e.jsxs("div",{"data-loc":"client/src/pages/MetaCapi.tsx:193",className:"flex items-center gap-3",children:[e.jsx("div",{"data-loc":"client/src/pages/MetaCapi.tsx:194",className:"p-2 bg-red-500/10 rounded-lg",children:e.jsx(Ki,{"data-loc":"client/src/pages/MetaCapi.tsx:195",className:"w-4 h-4 text-red-400"})}),e.jsxs("div",{"data-loc":"client/src/pages/MetaCapi.tsx:197",children:[e.jsx("p",{"data-loc":"client/src/pages/MetaCapi.tsx:198",className:"text-xs text-muted-foreground",children:"Erros"}),e.jsx("p",{"data-loc":"client/src/pages/MetaCapi.tsx:199",className:"text-xl font-bold text-foreground",children:u?.errors??"â"})]})]})})})]}),e.jsxs(Wt,{"data-loc":"client/src/pages/MetaCapi.tsx:207",className:"bg-card border-border",children:[e.jsx(Es,{"data-loc":"client/src/pages/MetaCapi.tsx:208",className:"pb-3",children:e.jsxs("div",{"data-loc":"client/src/pages/MetaCapi.tsx:209",className:"flex items-center justify-between",children:[e.jsx(Ds,{"data-loc":"client/src/pages/MetaCapi.tsx:210",className:"text-base font-medium text-foreground",children:"Leads do Site"}),e.jsx("div",{"data-loc":"client/src/pages/MetaCapi.tsx:213",className:"flex items-center gap-2",children:e.jsxs(Dt,{"data-loc":"client/src/pages/MetaCapi.tsx:214",value:l,onValueChange:j=>{c(j),r(1)},children:[e.jsx(Lt,{"data-loc":"client/src/pages/MetaCapi.tsx:218",className:"w-36 h-8 text-xs bg-background border-border text-foreground",children:e.jsx(Mt,{"data-loc":"client/src/pages/MetaCapi.tsx:219"})}),e.jsxs(kt,{"data-loc":"client/src/pages/MetaCapi.tsx:221",className:"bg-card border-border",children:[e.jsx(He,{"data-loc":"client/src/pages/MetaCapi.tsx:222",value:"all",children:"Todos"}),e.jsx(He,{"data-loc":"client/src/pages/MetaCapi.tsx:223",value:"sent",children:"Enviados"}),e.jsx(He,{"data-loc":"client/src/pages/MetaCapi.tsx:224",value:"pending",children:"Pendentes"}),e.jsx(He,{"data-loc":"client/src/pages/MetaCapi.tsx:225",value:"error",children:"Com Erro"})]})]})})]})}),e.jsxs(ta,{"data-loc":"client/src/pages/MetaCapi.tsx:231",className:"p-0",children:[e.jsx("div",{"data-loc":"client/src/pages/MetaCapi.tsx:232",className:"overflow-x-auto",children:e.jsxs(lz,{"data-loc":"client/src/pages/MetaCapi.tsx:233",children:[e.jsx(oz,{"data-loc":"client/src/pages/MetaCapi.tsx:234",children:e.jsxs(Pu,{"data-loc":"client/src/pages/MetaCapi.tsx:235",className:"border-border hover:bg-transparent",children:[e.jsx(sr,{"data-loc":"client/src/pages/MetaCapi.tsx:236",className:"text-muted-foreground text-xs font-medium",children:"Lead"}),e.jsx(sr,{"data-loc":"client/src/pages/MetaCapi.tsx:237",className:"text-muted-foreground text-xs font-medium",children:"Formulário"}),e.jsx(sr,{"data-loc":"client/src/pages/MetaCapi.tsx:238",className:"text-muted-foreground text-xs font-medium",children:"Imóvel"}),e.jsx(sr,{"data-loc":"client/src/pages/MetaCapi.tsx:239",className:"text-muted-foreground text-xs font-medium",children:"UTM Source"}),e.jsx(sr,{"data-loc":"client/src/pages/MetaCapi.tsx:240",className:"text-muted-foreground text-xs font-medium",children:"fbp/fbc"}),e.jsx(sr,{"data-loc":"client/src/pages/MetaCapi.tsx:241",className:"text-muted-foreground text-xs font-medium",children:"Status CAPI"}),e.jsx(sr,{"data-loc":"client/src/pages/MetaCapi.tsx:242",className:"text-muted-foreground text-xs font-medium",children:"events_received"}),e.jsx(sr,{"data-loc":"client/src/pages/MetaCapi.tsx:243",className:"text-muted-foreground text-xs font-medium",children:"Data"}),e.jsx(sr,{"data-loc":"client/src/pages/MetaCapi.tsx:244",className:"text-muted-foreground text-xs font-medium w-10"})]})}),e.jsx(cz,{"data-loc":"client/src/pages/MetaCapi.tsx:247",children:p?e.jsx(Pu,{"data-loc":"client/src/pages/MetaCapi.tsx:249",children:e.jsx(ln,{"data-loc":"client/src/pages/MetaCapi.tsx:250",colSpan:9,className:"text-center py-8 text-muted-foreground text-sm",children:"Carregando..."})}):x?.data?.length?x.data.map(j=>e.jsxs(Pu,{"data-loc":"client/src/pages/MetaCapi.tsx:262",className:"border-border hover:bg-muted/30",children:[e.jsx(ln,{"data-loc":"client/src/pages/MetaCapi.tsx:263",className:"py-2",children:e.jsxs("div",{"data-loc":"client/src/pages/MetaCapi.tsx:264",children:[e.jsx("p",{"data-loc":"client/src/pages/MetaCapi.tsx:265",className:"text-xs font-medium text-foreground",children:j.nome||"â"}),e.jsx("p",{"data-loc":"client/src/pages/MetaCapi.tsx:266",className:"text-xs text-muted-foreground",children:j.email||j.telefone||"â"})]})}),e.jsx(ln,{"data-loc":"client/src/pages/MetaCapi.tsx:269",className:"py-2",children:e.jsx("span",{"data-loc":"client/src/pages/MetaCapi.tsx:270",className:"text-xs text-foreground
695/70",children:y(j.formType)})}),e.jsx(ln,{"data-loc":"client/src/pages/MetaCapi.tsx:272",className:"py-2",children:e.jsx("span",{"data-loc":"client/src/pages/MetaCapi.tsx:273",className:"text-xs text-foreground/70",children:j.codigoImovel||"â"})}),e.jsx(ln,{"data-loc":"client/src/pages/MetaCapi.tsx:275",className:"py-2",children:e.jsx("span",{"data-loc":"client/src/pages/MetaCapi.tsx:276",className:"text-xs text-foreground/70",children:j.utmSource||"â"})}),e.jsx(ln,{"data-loc":"client/src/pages/MetaCapi.tsx:278",className:"py-2",children:e.jsxs("div",{"data-loc":"client/src/pages/MetaCapi.tsx:279",className:"flex gap-1",children:[j.fbp?e.jsx(Qt,{"data-loc":"client/src/pages/MetaCapi.tsx:281",className:"bg-blue-500/20 text-blue-400 border-blue-500/30 text-[10px] px-1 py-0",children:"fbp"}):null,j.fbc?e.jsx(Qt,{"data-loc":"client/src/pages/MetaCapi.tsx:284",className:"bg-purple-500/20 text-purple-400 border-purple-500/30 text-[10px] px-1 py-0",children:"fbc"}):null,!j.fbp&&!j.fbc&&e.jsx("span",{"data-loc":"client/src/pages/MetaCapi.tsx:287",className:"text-xs text-muted-foreground/50",children:"â"})]})}),e.jsx(ln,{"data-loc":"client/src/pages/MetaCapi.tsx:291",className:"py-2",children:v(j)}),e.jsx(ln,{"data-loc":"client/src/pages/MetaCapi.tsx:292",className:"py-2",children:e.jsx("span",{"data-loc":"client/src/pages/MetaCapi.tsx:293",className:"text-xs text-[#F2F2F3]/70",children:j.metaEventsReceived!=null?j.metaEventsReceived:e.jsx("span",{"data-loc":"client/src/pages/MetaCapi.tsx:294",className:"text-muted-foreground",children:"â"})})}),e.jsx(ln,{"data-loc":"client/src/pages/MetaCapi.tsx:297",className:"py-2",children:e.jsx("span",{"data-loc":"client/src/pages/MetaCapi.tsx:298",className:"text-xs text-[#F2F2F3]/50",children:new Date(j.createdAt).toLocaleDateString("pt-BR")})}),e.jsx(ln,{"data-loc":"client/src/pages/MetaCapi.tsx:302",className:"py-2",children:(j.status==="lead_ouro"||j.status==="ganho")&&e.jsx(Zu,{"data-loc":"client/src/pages/MetaCapi.tsx:304",children:e.jsxs(Gr,{"data-loc":"client/src/pages/MetaCapi.tsx:305",children:[e.jsx(Vr,{"data-loc":"client/src/pages/MetaCapi.tsx:306",asChild:!0,children:e.jsx(oe,{"data-loc":"client/src/pages/MetaCapi.tsx:307",variant:"ghost",size:"icon",className:"h-7 w-7 text-[#F2F2F3]/40 hover:text-[#C9A96E] hover:bg-[#C9A96E]/10",onClick:()=>g.mutate({leadId:j.id}),disabled:g.isPending,children:e.jsx(ur,{"data-loc":"client/src/pages/MetaCapi.tsx:314",className:"w-3.5 h-3.5"})})}),e.jsx(Kr,{"data-loc":"client/src/pages/MetaCapi.tsx:317",children:"Reenviar CONVERTED"})]})})})]},j.id)):e.jsx(Pu,{"data-loc":"client/src/pages/MetaCapi.tsx:255",children:e.jsx(ln,{"data-loc":"client/src/pages/MetaCapi.tsx:256",colSpan:9,className:"text-center py-8 text-muted-foreground text-sm",children:"Nenhum lead encontrado."})})})]})}),b>1&&e.jsxs("div",{"data-loc":"client/src/pages/MetaCapi.tsx:331",className:"flex items-center justify-between px-4 py-3 border-t border-border",children:[e.jsxs("span",{"data-loc":"client/src/pages/MetaCapi.tsx:332",className:"text-xs text-muted-foreground",children:[x?.total??0," leads · Página ",s," de ",b]}),e.jsxs("div",{"data-loc":"client/src/pages/MetaCapi.tsx:335",className:"flex gap-1",children:[e.jsx(oe,{"data-loc":"client/src/pages/MetaCapi.tsx:336",variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:()=>r(j=>Math.max(1,j-1)),disabled:s===1,children:e.jsx(nc,{"data-loc":"client/src/pages/MetaCapi.tsx:343",className:"w-4 h-4"})}),e.jsx(oe,{"data-loc":"client/src/pages/MetaCapi.tsx:345",variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:()=>r(j=>Math.min(b,j+1)),disabled:s===b,children:e.jsx(Ia,{"data-loc":"client/src/pages/MetaCapi.tsx:352",className:"w-4 h-4"})})]})]})]})]}),e.jsx(Wt,{"data-loc":"client/src/pages/MetaCapi.tsx:361",className:"bg-card border-border",children:e.jsx(ta,{"data-loc":"client/src/pages/MetaCapi.tsx:362",className:"p-4",children:e.jsxs("div",{"data-loc":"client/src/pages/MetaCapi.tsx:363",className:"flex items-start gap-3",children:[e.jsx(Pl,{"data-loc":"client/src/pages/MetaCapi.tsx:364",className:"w-4 h-4 text-primary mt-0.5 flex-shrink-0"}),e.jsxs("div",{"data-loc":"client/src/pages/MetaCapi.tsx:365",className:"space-y-1",children:[e.jsx("p",{"data-loc":"client/src/pages/MetaCapi.tsx:366",className:"text-xs font-medium text-foreground",children:"Como funciona o evento CONVERTED"}),e.jsxs("p",{"data-loc":"client/src/pages/MetaCapi.tsx:367",className:"text-xs text-muted-foreground",children:["O evento ",e.jsx("code",{"data-loc":"client/src/pages/MetaCapi.tsx:368",className:"bg-muted px-1 rounded text-primary",children:"CONVERTED"})," é enviado automaticamente para a Meta quando um lead atinge a etapa ",e.jsx("strong",{"data-loc":"client/src/pages/MetaCapi.tsx:368",children:"Lead Ouro"})," no pipeline. Os dados enviados incluem: email, telefone e nome (hasheados com SHA-256), fbp, fbc, IP e User-Agent do visitante, além do código e preço do produto quando disponÃveis. Use o botão ",e.jsx(ur,{"data-loc":"client/src/pages/MetaCapi.tsx:370",className:"inline w-3 h-3 mx-0.5"})," para reenviar manualmente em caso de falha."]})]})]})})})]})}function Kg({size:t=20}){return e.jsxs("svg",{"data-loc":"client/src/pages/MetaLeadAds.tsx:40",width:t,height:t,viewBox:"0 0 24 24",fill:"none",children:[e.jsx("path",{"data-loc":"client/src/pages/MetaLeadAds.tsx:41",d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2z",fill:"#1877F2"}),e.jsx("path",{"data-loc":"client/src/pages/MetaLeadAds.tsx:45",d:"M8.5 9.5C8.5 8.119 9.619 7 11 7h2c1.381 0 2.5 1.119 2.5 2.5v.5h1V9.5C16.5 7.567 14.933 6 13 6h-2C9.067 6 7.5 7.567 7.5 9.5V10h1v-.5z",fill:"white"}),e.jsx("path",{"data-loc":"client/src/pages/MetaLeadAds.tsx:49",d:"M7 10.5v3C7 15.433 8.567 17 10.5 17h3c1.933 0 3.5-1.567 3.5-3.5v-3h-1v3c0 1.381-1.119 2.5-2.5 2.5h-3C9.119 16 8 14.881 8 13.5v-3H7z",fill:"white"}),e.jsx("circle",{"data-loc":"client/src/pages/MetaLeadAds.tsx:53",cx:"9.5",cy:"12",r:"1",fill:"white"}),e.jsx("circle",{"data-loc":"client/src/pages/MetaLeadAds.tsx:54",cx:"14.5",cy:"12",r:"1",fill:"white"})]})}function dz(){const{data:t,isLoading:s,refetch:r,isFetching:l}=Y.metaLeadAds.webhookHealth.useQuery(void 0,{refetchInterval:3e4}),c=Y.metaLeadAds.reprocessLead.useMutation({onSuccess:()=>{ce.success("Lead enviado para reprocessamento"),r()},onError:b=>ce.error(`Erro: ${b.message}`)});if(s)return e.jsx("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:78",className:"flex items-center justify-center h-32 text-muted-foreground text-sm",children:"Carregando..."});const{failedLeads:d=[],stuckLeads:u=[],stats:x}=t??{},p=d.length+u.length;function g({lead:b,badge:v}){return e.jsxs("tr",{"data-loc":"client/src/pages/MetaLeadAds.tsx:86",className:"border-b border-border hover:bg-muted/30 transition-colors",children:[e.jsx("td",{"data-loc":"client/src/pages/MetaLeadAds.tsx:87",className:"px-4 py-3",children:e.jsxs("span",{"data-loc":"client/src/pages/MetaLeadAds.tsx:88",className:`inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-medium ${v==="falha"?"bg-red-500/15 text-red-400":"bg-amber-500/15 text-amber-400"}`,children:[v==="falha"?e.jsx(Yr,{"data-loc":"client/src/pages/MetaLeadAds.tsx:93",size:10}):e.jsx(Za,{"data-loc":"client/src/pages/MetaLeadAds.tsx:93",size:10}),v==="falha"?`${b.tentativasRetry??0}x falhou`:"Travado"]})}),e.jsx("td",{"data-loc":"client/src/pages/MetaLeadAds.tsx:97",className:"px-4 py-3 font-medium text-foreground text-xs",children:b.nome||e.jsx("span",{"data-loc":"client/src/pages/MetaLeadAds.tsx:97",className:"text-muted-foreground italic",children:"sem nome"})}),e.jsxs("td",{"data-loc":"client/src/pages/MetaLeadAds.tsx:98",className:"px-4 py-3 text-xs text-muted-foreground",children:[e.jsx("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:99",children:b.email||""}),e.jsx("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:100",children:b.telefone||""})]}),e.jsx("td",{"data-loc":"client/src/pages/MetaLeadAds.tsx:102",className:"px-4 py-3 font-mono text-[10px] text-muted-foreground",children:b.formId}),e.jsx("td",{"data-loc":"client/src/pages/MetaLeadAds.tsx:103",className:"px-4 py-3 text-xs text-muted-foreground",children:new Date(b.createdAt).toLocaleStr
695ing("pt-BR",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"})}),e.jsx("td",{"data-loc":"client/src/pages/MetaLeadAds.tsx:109",className:"px-4 py-3",children:b.erroProcessamento&&e.jsx("span",{"data-loc":"client/src/pages/MetaLeadAds.tsx:111",className:"block max-w-[200px] truncate text-[10px] text-red-400 font-mono",title:b.erroProcessamento,children:b.erroProcessamento})}),e.jsx("td",{"data-loc":"client/src/pages/MetaLeadAds.tsx:119",className:"px-4 py-3 text-right",children:e.jsxs("button",{"data-loc":"client/src/pages/MetaLeadAds.tsx:120",onClick:()=>c.mutate({id:b.id}),disabled:c.isPending,className:"flex items-center gap-1 px-2 py-1 rounded text-[10px] bg-[#1877F2]/10 text-[#1877F2] hover:bg-[#1877F2]/20 transition-colors disabled:opacity-50",title:"Reprocessar agora",children:[e.jsx(rc,{"data-loc":"client/src/pages/MetaLeadAds.tsx:126",size:11}),"Reprocessar"]})})]})}return e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:135",className:"space-y-5",children:[e.jsx("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:137",className:"grid grid-cols-4 gap-3",children:[{label:"Total recebidos",value:x?.total??0,color:"text-foreground"},{label:"Processados",value:x?.processados??0,color:"text-emerald-500"},{label:"Pendentes",value:x?.pendentes??0,color:"text-amber-400"},{label:"Com falha",value:x?.comFalha??0,color:x?.comFalha?"text-red-400":"text-muted-foreground"}].map(b=>e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:144",className:"bg-card border border-border rounded-lg p-3",children:[e.jsx("p",{"data-loc":"client/src/pages/MetaLeadAds.tsx:145",className:"text-[10px] text-muted-foreground mb-1",children:b.label}),e.jsx("p",{"data-loc":"client/src/pages/MetaLeadAds.tsx:146",className:`text-2xl font-bold font-mono ${b.color}`,children:b.value})]},b.label))}),e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:152",className:"flex items-center justify-between",children:[e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:153",className:"flex items-center gap-2",children:[e.jsx(dC,{"data-loc":"client/src/pages/MetaLeadAds.tsx:154",size:14,className:p>0?"text-red-400":"text-emerald-500"}),e.jsx("h3",{"data-loc":"client/src/pages/MetaLeadAds.tsx:155",className:"text-sm font-medium text-foreground",children:p===0?"Webhook saudável â nenhum lead com problema":`${p} lead(s) precisam de atenção`})]}),e.jsxs("button",{"data-loc":"client/src/pages/MetaLeadAds.tsx:161",onClick:()=>r(),disabled:l,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[e.jsx(ur,{"data-loc":"client/src/pages/MetaLeadAds.tsx:166",size:12,className:l?"animate-spin":""}),"Atualizar"]})]}),p===0?e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:172",className:"flex flex-col items-center justify-center h-40 gap-3 text-center border border-border rounded-lg bg-card",children:[e.jsx(Ka,{"data-loc":"client/src/pages/MetaLeadAds.tsx:173",size:32,className:"text-emerald-500"}),e.jsx("p",{"data-loc":"client/src/pages/MetaLeadAds.tsx:174",className:"text-sm text-foreground font-medium",children:"Todos os leads foram processados com sucesso"}),e.jsx("p",{"data-loc":"client/src/pages/MetaLeadAds.tsx:175",className:"text-xs text-muted-foreground",children:"O retry automático roda a cada 5 minutos. Não há nada pendente no momento."})]}):e.jsx("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:178",className:"border border-border rounded-lg overflow-hidden",children:e.jsxs("table",{"data-loc":"client/src/pages/MetaLeadAds.tsx:179",className:"w-full text-xs",children:[e.jsx("thead",{"data-loc":"client/src/pages/MetaLeadAds.tsx:180",children:e.jsxs("tr",{"data-loc":"client/src/pages/MetaLeadAds.tsx:181",className:"border-b border-border bg-muted/50",children:[e.jsx("th",{"data-loc":"client/src/pages/MetaLeadAds.tsx:182",className:"text-left px-4 py-2.5 text-muted-foreground font-medium",children:"Status"}),e.jsx("th",{"data-loc":"client/src/pages/MetaLeadAds.tsx:183",className:"text-left px-4 py-2.5 text-muted-foreground font-medium",children:"Nome"}),e.jsx("th",{"data-loc":"client/src/pages/MetaLeadAds.tsx:184",className:"text-left px-4 py-2.5 text-muted-foreground font-medium",children:"Contato"}),e.jsx("th",{"data-loc":"client/src/pages/MetaLeadAds.tsx:185",className:"text-left px-4 py-2.5 text-muted-foreground font-medium",children:"Formulário"}),e.jsx("th",{"data-loc":"client/src/pages/MetaLeadAds.tsx:186",className:"text-left px-4 py-2.5 text-muted-foreground font-medium",children:"Recebido em"}),e.jsx("th",{"data-loc":"client/src/pages/MetaLeadAds.tsx:187",className:"text-left px-4 py-2.5 text-muted-foreground font-medium",children:"Erro"}),e.jsx("th",{"data-loc":"client/src/pages/MetaLeadAds.tsx:188",className:"text-right px-4 py-2.5 text-muted-foreground font-medium",children:"Ação"})]})}),e.jsxs("tbody",{"data-loc":"client/src/pages/MetaLeadAds.tsx:191",children:[d.map(b=>e.jsx(g,{"data-loc":"client/src/pages/MetaLeadAds.tsx:193",lead:b,badge:"falha"},b.id)),u.map(b=>e.jsx(g,{"data-loc":"client/src/pages/MetaLeadAds.tsx:196",lead:b,badge:"travado"},b.id))]})]})}),e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:204",className:"flex items-start gap-2 p-3 rounded-lg bg-muted/30 border border-border",children:[e.jsx(rc,{"data-loc":"client/src/pages/MetaLeadAds.tsx:205",size:13,className:"text-muted-foreground mt-0.5 flex-shrink-0"}),e.jsxs("p",{"data-loc":"client/src/pages/MetaLeadAds.tsx:206",className:"text-xs text-muted-foreground",children:["O sistema tenta reprocessar automaticamente leads pendentes ",e.jsx("strong",{"data-loc":"client/src/pages/MetaLeadAds.tsx:207",className:"text-foreground",children:"a cada 5 minutos"}),". Após 3 tentativas falhas, o gestor recebe uma notificação. Você também pode reprocessar manualmente clicando no botão acima."]})]})]})}function uz({open:t,onClose:s,editData:r,campaigns:l,onSaved:c}){const d=!!r,[u,x]=f.useState(r?.nome||""),[p,g]=f.useState(r?.formId||""),[b,v]=f.useState(r?.pageId||""),[y,j]=f.useState(r?.
695imovelCodigo||""),[S,N]=f.useState(r?.campanhaId?String(r.campanhaId):""),[w,D]=f.useState(r?.campoNome||"full_name"),[k,A]=f.useState(r?.campoEmail||"email"),[_,E]=f.useState(r?.campoTelefone||"phone_number"),[I,R]=f.useState(r?.campoMensagem||""),z=Y.metaLeadAds.createForm.useMutation({onSuccess:()=>{ce.success("Formulário cadastrado com sucesso"),c(),s()},onError:V=>ce.error(`Erro ao cadastrar: ${V.message}`)}),U=Y.metaLeadAds.updateForm.useMutation({onSuccess:()=>{ce.success("Formulário atualizado"),c(),s()},onError:V=>ce.error(`Erro ao atualizar: ${V.message}`)}),B=()=>{if(!u.trim()||!d&&!p.trim()){ce.error("Preencha os campos obrigatórios");return}d?U.mutate({id:r.id,nome:u.trim(),pageId:b.trim()||void 0,imovelCodigo:y.trim()||void 0,campanhaId:S?Number(S):null,campoNome:w.trim(),campoEmail:k.trim(),campoTelefone:_.trim(),campoMensagem:I.trim()||null}):z.mutate({nome:u.trim(),formId:p.trim(),pageId:b.trim()||void 0,imovelCodigo:y.trim()||void 0,campanhaId:S?Number(S):void 0,campoNome:w.trim(),campoEmail:k.trim(),campoTelefone:_.trim(),campoMensagem:I.trim()||void 0})},F=z.isPending||U.isPending;return e.jsx(Rs,{"data-loc":"client/src/pages/MetaLeadAds.tsx:290",open:t,onOpenChange:V=>!V&&s(),children:e.jsxs(Ts,{"data-loc":"client/src/pages/MetaLeadAds.tsx:291",className:"max-w-lg bg-card border-border text-foreground",children:[e.jsx(_s,{"data-loc":"client/src/pages/MetaLeadAds.tsx:292",children:e.jsxs(Ps,{"data-loc":"client/src/pages/MetaLeadAds.tsx:293",className:"flex items-center gap-2",children:[e.jsx(Kg,{"data-loc":"client/src/pages/MetaLeadAds.tsx:294",size:18}),d?"Editar Formulário":"Adicionar Formulário"]})}),e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:299",className:"space-y-4 py-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:301",className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:302",className:"col-span-2",children:[e.jsx(We,{"data-loc":"client/src/pages/MetaLeadAds.tsx:303",className:"text-xs text-muted-foreground mb-1 block",children:"Nome da campanha / formulário *"}),e.jsx(ge,{"data-loc":"client/src/pages/MetaLeadAds.tsx:304",value:u,onChange:V=>x(V.target.value),placeholder:"Ex: VILLA CORA - Formulário Site",className:"h-8 text-sm"})]}),e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:311",children:[e.jsx(We,{"data-loc":"client/src/pages/MetaLeadAds.tsx:312",className:"text-xs text-muted-foreground mb-1 block",children:"ID do formulário (Meta) *"}),e.jsx(ge,{"data-loc":"client/src/pages/MetaLeadAds.tsx:313",value:p,onChange:V=>g(V.target.value),placeholder:"Ex: 1290700501977035",disabled:d,className:"h-8 text-sm disabled:opacity-50"})]}),e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:321",children:[e.jsx(We,{"data-loc":"client/src/pages/MetaLeadAds.tsx:322",className:"text-xs text-muted-foreground mb-1 block",children:"ID da página (Facebook)"}),e.jsx(ge,{"data-loc":"client/src/pages/MetaLeadAds.tsx:323",value:b,onChange:V=>v(V.target.value),placeholder:"Ex: 617537784784894",className:"h-8 text-sm"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:333",className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:334",children:[e.jsx(We,{"data-loc":"client/src/pages/MetaLeadAds.tsx:335",className:"text-xs text-muted-foreground mb-1 block",children:"Código do produto"}),e.jsx(ge,{"data-loc":"client/src/pages/MetaLeadAds.tsx:336",value:y,onChange:V=>j(V.target.value),placeholder:"Ex: 1148",className:"h-8 text-sm"})]}),e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:343",children:[e.jsx(We,{"data-loc":"client/src/pages/MetaLeadAds.tsx:344",className:"text-xs text-muted-foreground mb-1 block",children:"Campanha Kanban"}),e.jsxs(Dt,{"data-loc":"client/src/pages/MetaLeadAds.tsx:345",value:S,onValueChange:N,children:[e.jsx(Lt,{"data-loc":"client/src/pages/MetaLeadAds.tsx:346",className:"h-8 text-sm",children:e.jsx(Mt,{"data-loc":"client/src/pages/MetaLeadAds.tsx:347",placeholder:"Selecione..."})}),e.jsxs(kt,{"data-loc":"client/src/pages/MetaLeadAds.tsx:349",children:[e.jsx(He,{"data-loc":"client/src/pages/MetaLeadAds.tsx:350",value:"none",children:"Nenhuma"}),l.map(V=>e.jsx(He,{"data-loc":"client/src/pages/MetaLeadAds.tsx:352",value:String(V.id),children:V.name},V.id))]})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:360",className:"border border-border rounded-md p-3 space-y-3",children:[e.jsx("p",{"data-loc":"client/src/pages/MetaLeadAds.tsx:361",className:"text-xs font-medium text-primary",children:"Mapeamento de campos do formulário Meta"}),e.jsx("p",{"data-loc":"client/src/pages/MetaLeadAds.tsx:362",className:"text-xs text-muted-foreground",children:'Insira o "name" exato do campo retornado pela API da Meta'}),e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:363",className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:364",children:[e.jsx(We,{"data-loc":"client/src/pages/MetaLeadAds.tsx:365",className:"text-xs text-muted-foreground mb-1 block",children:"Campo Nome"}),e.jsx(ge,{"data-loc":"client/src/pages/MetaLeadAds.tsx:366",value:w,onChange:V=>D(V.target.value),placeholder:"full_name",className:"h-8 text-sm"})]}),e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:373",children:[e.jsx(We,{"data-loc":"client/src/pages/MetaLeadAds.tsx:374",className:"text-xs text-muted-foreground mb-1 block",children:"Campo E-mail"}),e.jsx(ge,{"data-loc":"client/src/pages/MetaLeadAds.tsx:375",value:k,onChange:V=>A(V.target.value),placeholder:"email",className:"h-8 text-sm"})]}),e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:382",children:[e.jsx(We,{"data-loc":"client/src/pages/MetaLeadAds.tsx:383",className:"text-xs text-muted-foreground mb-1 block",children:"Campo Telefone"}),e.jsx(ge,{"data-loc":"client/src/pages/MetaLeadAds.tsx:384",value:_,onCh
695ange:V=>E(V.target.value),placeholder:"phone_number",className:"h-8 text-sm"})]}),e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:391",children:[e.jsx(We,{"data-loc":"client/src/pages/MetaLeadAds.tsx:392",className:"text-xs text-muted-foreground mb-1 block",children:"Campo Mensagem (opcional)"}),e.jsx(ge,{"data-loc":"client/src/pages/MetaLeadAds.tsx:393",value:I,onChange:V=>R(V.target.value),placeholder:"message",className:"h-8 text-sm"})]})]})]})]}),e.jsxs(Os,{"data-loc":"client/src/pages/MetaLeadAds.tsx:404",children:[e.jsx(oe,{"data-loc":"client/src/pages/MetaLeadAds.tsx:405",variant:"ghost",onClick:s,children:"Cancelar"}),e.jsx(oe,{"data-loc":"client/src/pages/MetaLeadAds.tsx:406",onClick:B,disabled:F,className:"bg-[#1877F2] hover:bg-[#1464D8] text-white",children:F?"Salvando...":d?"Salvar":"Cadastrar"})]})]})})}function xz(){const[t,s]=f.useState("forms"),[r,l]=f.useState(!1),[c,d]=f.useState(null),[u,x]=f.useState(null),[p,g]=f.useState(""),[b,v]=f.useState(""),[y,j]=f.useState(""),[S,N]=f.useState(!1),{data:w,isLoading:D}=Y.metaLeadAds.getWebhookConfig.useQuery(),{data:k,refetch:A}=Y.metaLeadAds.getMetaConfig.useQuery(),{data:_,isLoading:E,refetch:I}=Y.metaLeadAds.listForms.useQuery(),{data:R,isLoading:z,refetch:U}=Y.metaLeadAds.listLeads.useQuery(),{data:B}=Y.metaLeadAds.listCampaigns.useQuery(),F=Y.metaLeadAds.saveMetaConfig.useMutation({onSuccess:T=>{ce.success(`Credenciais salvas com sucesso (${T.saved} campo(s) atualizado(s))`),g(""),v(""),N(!0),A()},onError:T=>ce.error(`Erro ao salvar: ${T.message}`)}),V=Y.metaLeadAds.deleteForm.useMutation({onSuccess:()=>{ce.success("Formulário removido"),x(null),I()},onError:T=>ce.error(`Erro ao remover: ${T.message}`)}),de=Y.metaLeadAds.reprocessLead.useMutation({onSuccess:()=>{ce.success("Lead enviado para reprocessamento"),U()},onError:T=>ce.error(`Erro: ${T.message}`)}),le=T=>{navigator.clipboard.writeText(T).then(()=>ce.success("Copiado!"))},{data:xe}=Y.metaLeadAds.webhookHealth.useQuery(void 0,{refetchInterval:6e4}),M=(xe?.stats?.comFalha??0)+(xe?.stuckLeads?.length??0),O=[{id:"forms",label:"Formulários",icon:e.jsx(Hl,{"data-loc":"client/src/pages/MetaLeadAds.tsx:477",size:14}),count:_?.length},{id:"leads",label:"Leads recebidos",icon:e.jsx(Ys,{"data-loc":"client/src/pages/MetaLeadAds.tsx:478",size:14}),count:R?.length},{id:"health",label:"Saúde do Webhook",icon:e.jsx(dC,{"data-loc":"client/src/pages/MetaLeadAds.tsx:479",size:14}),alert:M},{id:"config",label:"Configuração",icon:e.jsx(ki,{"data-loc":"client/src/pages/MetaLeadAds.tsx:480",size:14})}];return e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:484",className:"flex flex-col h-full bg-background text-foreground",children:[e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:486",className:"flex items-center justify-between px-6 py-4 border-b border-border",children:[e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:487",className:"flex items-center gap-3",children:[e.jsx("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:488",className:"w-8 h-8 rounded-lg bg-[#1877F2]/10 flex items-center justify-center",children:e.jsx(Kg,{"data-loc":"client/src/pages/MetaLeadAds.tsx:489",size:20})}),e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:491",children:[e.jsx("h1",{"data-loc":"client/src/pages/MetaLeadAds.tsx:492",className:"text-sm font-semibold text-foreground",children:"Meta Lead Ads"}),e.jsx("p",{"data-loc":"client/src/pages/MetaLeadAds.tsx:493",className:"text-xs text-muted-foreground",children:"Formulários de anúncios Facebook & Instagram"})]})]}),t==="forms"&&e.jsxs(oe,{"data-loc":"client/src/pages/MetaLeadAds.tsx:497",size:"sm",onClick:()=>{d(null),l(!0)},className:"bg-[#1877F2] hover:bg-[#1464D8] text-white h-7 text-xs gap-1.5",children:[e.jsx(Jt,{"data-loc":"client/src/pages/MetaLeadAds.tsx:502",size:13}),"Adicionar formulário"]}),t==="leads"&&e.jsxs(oe,{"data-loc":"client/src/pages/MetaLeadAds.tsx:507",size:"sm",variant:"ghost",onClick:()=>U(),className:"h-7 text-xs gap-1.5",children:[e.jsx(ur,{"data-loc":"client/src/pages/MetaLeadAds.tsx:513",size:13}),"Atualizar"]})]}),e.jsx("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:520",className:"flex gap-1 px-6 pt-3 border-b border-border",children:O.map(T=>e.jsxs("button",{"data-loc":"client/src/pages/MetaLeadAds.tsx:522",onClick:()=>s(T.id),className:`flex items-center gap-1.5 px-3 py-2 text-xs font-medium border-b-2 transition-colors ${t===T.id?"border-[#1877F2] text-foreground":"border-transparent text-muted-foreground hover:text-foreground"}`,children:[T.icon,T.label,T.count!==void 0&&e.jsx("span",{"data-loc":"client/src/pages/MetaLeadAds.tsx:534",className:`ml-1 px-1.5 py-0.5 rounded text-[10px] font-mono ${t===T.id?"bg-[#1877F2]/20 text-[#1877F2]":"bg-muted text-muted-foreground"}`,children:T.count}),T.alert!==void 0&&T.alert>0&&e.jsx("span",{"data-loc":"client/src/pages/MetaLeadAds.tsx:541",className:"ml-1 px-1.5 py-0.5 rounded text-[10px] font-mono bg-red-500/20 text-red-400",children:T.alert})]},T.id))}),e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:550",className:"flex-1 overflow-auto p-6",children:[t==="forms"&&e.jsx("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:554",children:E?e.
695jsx("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:556",className:"flex items-center justify-center h-32 text-muted-foreground text-sm",children:"Carregando..."}):_?.length?e.jsx("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:576",className:"border border-border rounded-lg overflow-hidden",children:e.jsxs("table",{"data-loc":"client/src/pages/MetaLeadAds.tsx:577",className:"w-full text-xs",children:[e.jsx("thead",{"data-loc":"client/src/pages/MetaLeadAds.tsx:578",children:e.jsxs("tr",{"data-loc":"client/src/pages/MetaLeadAds.tsx:579",className:"border-b border-border bg-muted/50",children:[e.jsx("th",{"data-loc":"client/src/pages/MetaLeadAds.tsx:580",className:"text-left px-4 py-2.5 text-muted-foreground font-medium",children:"Nome do formulário"}),e.jsx("th",{"data-loc":"client/src/pages/MetaLeadAds.tsx:581",className:"text-left px-4 py-2.5 text-muted-foreground font-medium",children:"ID do formulário"}),e.jsx("th",{"data-loc":"client/src/pages/MetaLeadAds.tsx:582",className:"text-left px-4 py-2.5 text-muted-foreground font-medium",children:"Situação"}),e.jsx("th",{"data-loc":"client/src/pages/MetaLeadAds.tsx:583",className:"text-left px-4 py-2.5 text-muted-foreground font-medium",children:"Ãltima atualização"}),e.jsx("th",{"data-loc":"client/src/pages/MetaLeadAds.tsx:584",className:"text-left px-4 py-2.5 text-muted-foreground font-medium",children:"Código Imóvel"}),e.jsx("th",{"data-loc":"client/src/pages/MetaLeadAds.tsx:585",className:"text-left px-4 py-2.5 text-muted-foreground font-medium",children:"Leads"}),e.jsx("th",{"data-loc":"client/src/pages/MetaLeadAds.tsx:586",className:"text-right px-4 py-2.5 text-muted-foreground font-medium",children:"Ações"})]})}),e.jsx("tbody",{"data-loc":"client/src/pages/MetaLeadAds.tsx:589",children:_.map((T,K)=>e.jsxs("tr",{"data-loc":"client/src/pages/MetaLeadAds.tsx:591",className:`border-b border-border hover:bg-muted/30 transition-colors ${K%2===0?"":"bg-muted/10"}`,children:[e.jsx("td",{"data-loc":"client/src/pages/MetaLeadAds.tsx:595",className:"px-4 py-3 font-medium text-foreground",children:T.nome}),e.jsx("td",{"data-loc":"client/src/pages/MetaLeadAds.tsx:596",className:"px-4 py-3 font-mono text-muted-foreground",children:T.formId}),e.jsx("td",{"data-loc":"client/src/pages/MetaLeadAds.tsx:597",className:"px-4 py-3",children:T.ativo?e.jsxs("span",{"data-loc":"client/src/pages/MetaLeadAds.tsx:599",className:"flex items-center gap-1 text-emerald-500",children:[e.jsx(Ka,{"data-loc":"client/src/pages/MetaLeadAds.tsx:600",size:12}),"Integrado"]}):e.jsxs("span",{"data-loc":"client/src/pages/MetaLeadAds.tsx:604",className:"flex items-center gap-1 text-muted-foreground",children:[e.jsx(Yr,{"data-loc":"client/src/pages/MetaLeadAds.tsx:605",size:12}),"Inativo"]})}),e.jsx("td",{"data-loc":"client/src/pages/MetaLeadAds.tsx:610",className:"px-4 py-3 text-muted-foreground",children:new Date(T.updatedAt).toLocaleString("pt-BR",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"})}),e.jsx("td",{"data-loc":"client/src/pages/MetaLeadAds.tsx:616",className:"px-4 py-3 text-muted-foreground",children:T.imovelCodigo||"â"}),e.jsx("td",{"data-loc":"client/src/pages/MetaLeadAds.tsx:617",className:"px-4 py-3",children:e.jsx("span",{"data-loc":"client/src/pages/MetaLeadAds.tsx:618",className:"px-2 py-0.5 rounded bg-[#1877F2]/10 text-[#1877F2] font-mono text-[10px]",children:T.totalLeads||0})}),e.jsx("td",{"data-loc":"client/src/pages/MetaLeadAds.tsx:622",className:"px-4 py-3 text-right",children:e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:623",className:"flex items-center justify-end gap-1",children:[e.jsx("button",{"data-loc":"client/src/pages/MetaLeadAds.tsx:624",onClick:()=>{d(T),l(!0)},className:"p-1.5 rounded hover:bg-muted text-muted-foreground hover:text-foreground transition-colors",title:"Editar",children:e.jsx(iC,{"data-loc":"client/src/pages/MetaLeadAds.tsx:629",size:13})}),e.jsx("button",{"data-loc":"client/src/pages/MetaLeadAds.tsx:631",onClick:()=>x(T.id),className:"p-1.5 rounded hover:bg-red-500/10 text-muted-foreground hover:text-red-400 transition-colors",title:"Remover",children:e.jsx(Ba,{"data-loc":"client/src/pages/MetaLeadAds.tsx:636",size:13})})]})})]},T.id))})]})}):e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:558",className:"flex flex-col items-center justify-center h-48 gap-3 text-center",children:[e.jsx("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:559",className:"w-12 h-12 rounded-full bg-[#1877F2]/10 flex items-center justify-center",children:e.jsx(Kg,{"data-loc":"client/src/pages/MetaLeadAds.tsx:560",size:24})}),e.jsx("p",{"data-loc":"client/src/pages/MetaLeadAds.tsx:562",className:"text-sm text-muted-foreground",children:"Nenhum formulário cadastrado"}),e.jsx("p",{"data-loc":"client/src/pages/MetaLeadAds.tsx:563",className:"text-xs text-muted-foreground max-w-xs",children:"Adicione os formulários do Meta Lead Ads para começar a receber leads automaticamente."}),e.jsxs(oe,{"data-loc":"client/src/pages/MetaLeadAds.tsx:566",size:"sm",onClick:()=>{d(null),l(!0)},className:"bg-[#1877F2] hover:bg-[#1464D8] text-white h-7 text-xs gap-1.5 mt-1",children:[e.jsx(Jt,{"data-loc":"client/src/pages/MetaLeadAds.tsx:571",size:13}),"Adicionar primeiro formulário"]})]})}),t==="leads"&&e.jsx("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:651",children:z?e.jsx("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:653",className:"flex items-center justify-center h-32 text-muted-foreground text-sm",children:"Carregando..."}):R?.length?e.jsx("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:665",className:"border border-border rounded-lg overflow-hidden",children:e.jsxs("table",{"data-loc":"client/src/pages/MetaLeadAds.tsx:666",className:"w-full text-xs",children:[e.jsx("thead",{"data-loc":"client/src/pages/MetaLeadAds.tsx:667",children:e.jsxs("tr",{"data-loc":"client/src/pages/MetaLeadAds.tsx:668",className:"border-b border-border bg-muted/50",children:[e.jsx("th",{"data-loc":"client/src/pages/MetaLeadAds.tsx:669",className:"text-left px-4 py-2.5 text-muted-foreground font-medium",children:"Nome"}),e.jsx("th",{"data-loc":"client/src/pages/MetaLeadAds.tsx:670",className:"text-left px-4 py-2.5 text-muted-foreground font-medium",children:"Contato"}),e.jsx("th",{"data-loc":"client/src/pages/MetaLeadAds.tsx:671",className:"text-left px-4 py-2.5 text-muted-foreground font-medium",children:"Formulário"}),e.jsx("th",{"data-loc":"client/src/pages/MetaLeadAds.tsx:672",className:"text-left px-4 py-2.5 text-muted-foreground font-medium",children:"Status"}),e.jsx("th",{"data-loc":"client/src/pages/MetaLeadAds.tsx:673",className:"text-left px-4 py-2.5 text-muted-foreground font-medium",children:"Recebido em"}),e.jsx("th",{"data-loc":"client/src/pages/MetaLeadAds.tsx:674",className:"text-right px-4 py-2.5 text-muted-foreground font-medium",children:"Ações"})]})}),e.jsx("tbody",{"data-loc":"client/src/pages/MetaLeadAds.tsx:677",children:R.map((T,K)=>e.jsxs("tr",{"data-loc":"client/src/pages/MetaLeadAds.tsx:679",className:`border-b border-border hover:bg-muted/30 transition-colors ${K%2===0?"":"bg-muted/10"}`,children:[e.jsx("td",{"data-loc":"client/src/pages/MetaLeadAds.tsx:683",className:"px-4 py-3 font-medium text-foreground",children:T.nome||"â"}),e.jsxs("td",{"data-loc":"client/src/pages/MetaLeadAds.tsx:684",className:"px-4 py-3 text-muted-foreground",children:[e.jsx("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:685",children:T.email||""}),e.jsx("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:686",children:T.telefone||""})]}),e.jsx("td",{"data-loc":"client/src/pages/MetaLeadAds.tsx:688",className:"px-4 py-3 font-mono text-muted-foreground text-[10px]",children:T.formId}),e.jsx("td",{"data-loc":"client/src/pages/MetaLeadAds.tsx:689",className:"px-4 py-3",children:T.processado?e.jsxs("span",{"data-loc":"client/src/pages/MetaLeadAds.tsx:691",className:"flex items-center gap-1 text-emerald-500",children:[e.jsx(Ka,{"data-loc":"client/src/pages/MetaLeadAds.tsx:692",size:12}),"Processado"]}):T.erroProcessamento?e.jsxs("span",{"data-loc":"client/src/pages/MetaLeadAds.tsx:696",className:"flex items-center gap-1 text-red-400",title:T.erroProcessamento,children:[e.jsx(Yr,{"data-loc":"client/src/pages/MetaLeadAds.tsx:697",size:12}),"Erro"]}):e.jsxs("span",{"data-loc":"client/src/pages/MetaLeadAds.tsx:701",className:"flex items-center gap-1 text-amber-400",children:[e.jsx(ms,{"data-loc":"client/src/pages/MetaLeadAds.tsx:702",size:12}),"Pendente"]})}),e.jsx("td",{"data-loc":"client/src/pages/MetaLeadAds.tsx:707",className:"px-4 py-3 text-muted-foreground",children:new Date(T.createdAt).toLocaleStr
695ing("pt-BR",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"})}),e.jsx("td",{"data-loc":"client/src/pages/MetaLeadAds.tsx:713",className:"px-4 py-3 text-right",children:!T.processado&&e.jsx("button",{"data-loc":"client/src/pages/MetaLeadAds.tsx:715",onClick:()=>de.mutate({id:T.id}),disabled:de.isPending,className:"p-1.5 rounded hover:bg-muted text-muted-foreground hover:text-foreground transition-colors",title:"Reprocessar",children:e.jsx(ur,{"data-loc":"client/src/pages/MetaLeadAds.tsx:721",size:13})})})]},T.id))})]})}):e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:655",className:"flex flex-col items-center justify-center h-48 gap-3 text-center",children:[e.jsx("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:656",className:"w-12 h-12 rounded-full bg-[#1877F2]/10 flex items-center justify-center",children:e.jsx(Ys,{"data-loc":"client/src/pages/MetaLeadAds.tsx:657",size:20,className:"text-[#1877F2]"})}),e.jsx("p",{"data-loc":"client/src/pages/MetaLeadAds.tsx:659",className:"text-sm text-muted-foreground",children:"Nenhum lead recebido ainda"}),e.jsx("p",{"data-loc":"client/src/pages/MetaLeadAds.tsx:660",className:"text-xs text-muted-foreground max-w-xs",children:"Os leads dos formulários Meta aparecerão aqui assim que o webhook receber o primeiro evento."})]})}),t==="health"&&e.jsx(dz,{"data-loc":"client/src/pages/MetaLeadAds.tsx:735"}),t==="config"&&e.jsx("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:739",className:"max-w-2xl space-y-6",children:D?e.jsx("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:741",className:"text-muted-foreground text-sm",children:"Carregando..."}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:745",className:"bg-card border border-border rounded-lg p-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:746",className:"flex items-center gap-2 mb-3",children:[e.jsx(bh,{"data-loc":"client/src/pages/MetaLeadAds.tsx:747",size:14,className:"text-primary"}),e.jsx("h3",{"data-loc":"client/src/pages/MetaLeadAds.tsx:748",className:"text-sm font-medium text-foreground",children:"Status da integração"})]}),e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:750",className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:751",className:"flex items-center gap-2",children:[w?.hasAppSecret?e.jsx(Ka,{"data-loc":"client/src/pages/MetaLeadAds.tsx:753",size:14,className:"text-emerald-500"}):e.jsx(Yr,{"data-loc":"client/src/pages/MetaLeadAds.tsx:755",size:14,className:"text-red-400"}),e.jsx("span",{"data-loc":"client/src/pages/MetaLeadAds.tsx:757",className:"text-xs text-muted-foreground",children:"App Secret configurado"})]}),e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:759",className:"flex items-center gap-2",children:[w?.hasPageToken?e.jsx(Ka,{"data-loc":"client/src/pages/MetaLeadAds.tsx:761",size:14,className:"text-emerald-500"}):e.jsx(Yr,{"data-loc":"client/src/pages/MetaLeadAds.tsx:763",size:14,className:"text-red-400"}),e.jsx("span",{"data-loc":"client/src/pages/MetaLeadAds.tsx:765",className:"text-xs text-muted-foreground",children:"Page Access Token configurado"})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:771",className:"bg-card border border-border rounded-lg p-4 space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:772",className:"flex items-center gap-2 mb-1",children:[e.jsx(ki,{"data-loc":"client/src/pages/MetaLeadAds.tsx:773",size:14,className:"text-primary"}),e.jsx("h3",{"data-loc":"client/src/pages/MetaLeadAds.tsx:774",className:"text-sm font-medium text-foreground",children:"Configurar no Meta Developers"})]}),e.jsx("p",{"data-loc":"client/src/pages/MetaLeadAds.tsx:776",className:"text-xs text-muted-foreground",children:"Acesse o painel do seu App Meta â Produtos â Webhooks â Adicionar webhook de página. Use os dados abaixo:"}),e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:781",className:"space-y-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:782",children:[e.jsx(We,{"data-loc":"client/src/pages/MetaLeadAds.tsx:783",className:"text-xs text-muted-foreground mb-1 block",children:"URL do Callback"}),e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:784",className:"flex items-center gap-2",children:[e.jsx("code",{"data-loc":"client/src/pages/MetaLeadAds.tsx:785",className:"flex-1 bg-muted border border-border rounded px-3 py-2 text-xs text-primary font-mono break-all",children:`${window.location.origin}/api/v1/webhooks/meta-leads`}),e.jsx("button",{"data-loc":"client/src/pages/MetaLeadAds.tsx:788",onClick:()=>le(`${window.location.origin}/api/v1/webhooks/meta-leads`),className:"p-2 rounded hover:bg-muted text-muted-foreground hover:text-foreground transition-colors flex-shrink-0",children:e.jsx(zl,{"data-loc":"client/src/pages/MetaLeadAds.tsx:792",size:13})})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:797",children:[e.jsx(We,{"data-loc":"client/src/pages/MetaLeadAds.tsx:798",className:"text-xs text-muted-foreground mb-1 block",children:"Token de verificação"}),e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:799",className:"flex items-center gap-2",children:[e.jsx("code",{"data-loc":"client/src/pages/MetaLeadAds.tsx:800",className:"flex-1 bg-muted border border-border rounded px-3 py-2 text-xs text-primary font-mono",children:w?.verifyToken||"h2o_meta_webhook_2026"}),e.jsx("button",{"data-loc":"client/src/pages/MetaLeadAds.tsx:803",onClick:()=>le(w?.verifyToken||"h2o_meta_webhook_2026"),className:"p-2 rounded hover:bg-muted text-muted-foreground hover:text-foreground transition-colors flex-shrink-0",children:e.jsx(zl,{"data-loc":"client/src/pages/MetaLeadAds.tsx:807",size:13})})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:812",children:[e.jsx(We,{"data-loc":"client/src/pages/MetaLeadAds.tsx:813",className:"text-xs text-muted-foreground mb-1 block",children:"Campo a assinar (subscribe)"}),e.jsx("code",{"data-loc":"client/src/pages/MetaLeadAds.tsx:814",className:"block bg-muted border border-border rounded px-3 py-2 text-xs text-primary font-mono",children:"leadgen"})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:822",className:"bg-card border border-border rounded-lg p-4 space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:823",className:"flex items-center gap-2 mb-1",children:[e.jsx(ms,{"data-loc":"client/src/pages/MetaLeadAds.tsx:824",size:14,className:"text-amber-400"}),e.jsx("h3",{"data-loc":"client/src/pages/MetaLeadAds.tsx:825",className:"text-sm font-medium text-foreground",children:"Credenciais da integração"})]}),e.jsx("p",{"data-loc":"client/src/pages/MetaLeadAds.tsx:827",className:"text-xs text-muted-foreground",children:"Insira as credenciais do seu App Meta abaixo. Elas são armazenadas com segurança no banco de dados."}),e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:831",className:"space-y-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:833",className:"space-y-1.5",children:[e.jsxs(We,{"data-loc":"client/src/pages/MetaLeadAds.tsx:834",className:"text-xs font-medium text-foreground flex items-center gap-2",children:["App Secret",k?.hasAppSecret&&e.jsxs("span",{"data-loc":"client/src/pages/MetaLeadAds.tsx:837",className:"flex items-center gap-1 text-emerald-500 font-normal",children:[e.jsx(Ka,{"data-loc":"client/src/pages/MetaLeadAds.tsx:838",size:11})," configurado"]})]}),e.jsx("p",{"data-loc":"client/src/pages/MetaLeadAds.tsx:842",className:"text-xs text-muted-foreground",children:"Chave Secreta do App (Meta Developers â Configurações Básicas)"}),e.jsx(ge,{"data-loc":"client/src/pages/MetaLeadAds.tsx:843",type:"password",placeholder:k?.hasAppSecret?"â¢â¢â¢â¢â¢â¢â¢â¢ (já configurado)":"Cole o App Secret aqui...",value:p,onChange:T=>g(T.target.value),className:"h-8 text-sm font-mono",autoComplete:"off"})]}),e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:854",className:"space-y-1.5",children:[e.jsxs(We,{"data-loc":"client/src/pages/MetaLeadAds.tsx:855",className:"text-xs font-medium text-foreground flex items-center gap-2",children:["Page Access Token",k?.hasPageToken&&e.jsxs("span",{"data-loc":"client/src/pages/MetaLeadAds.tsx:858",className:"flex items-center gap-1 text-emerald-500 font-normal",children:[e.jsx(Ka,{"data-loc":"client/src/pages/MetaLeadAds.tsx:859",size:11})," configurado"]})]}),e.jsx("p",{"data-loc":"client/src/pages/MetaLeadAds.tsx:863",className:"text-xs text-muted-foreground",children:"Token de acesso da página Facebook (longa duração)"}),e.jsx(ge,{"data-loc":"client/src/pages/MetaLeadAds.tsx:864",type:"password",placeholder:k?.hasPageToken?"â¢â¢â¢â¢â¢â¢â¢â¢ (já configurado)":"Cole o Page Access Token aqui...",value:b,onChange:T=>v(T.target.value),className:"h-8 text-sm font-mono",autoComplete:"off"})]}),e.jsxs("div",{"data-loc":"client/src/pages/MetaLeadAds.tsx:875",className:"space-y-1.5",children:[e.jsx(We,{"data-loc":"client/src/pages/MetaLeadAds.tsx:876",className:"text-xs font-medium text-foreground",children:"Token de verificação do webhook"}),e.jsx("p",{"data-loc":"client/src/pages/MetaLeadAds.tsx:877",className:"text-xs text-muted-foreground",children:"Usado para validar o webhook no Meta Developers (pode ser qualquer string)"}),e.jsx(ge,{"data-loc":"client/src/pages/MetaLeadAds.tsx:878",type:"text",placeholder:k?.webhookVerifyToken||"h2o_meta_webhook_2026",value:y,onChange:T=>j(T.target.value),className:"h-8 text-sm font-mono"})]}),e.jsx(oe,{"data-loc":"client/src/pages/MetaLeadAds.tsx:887",onClick:()=>F.mutate({appSecret:p||void 0,pageAccessToken:b||void 0,webhookVerifyToken:y||void 0}),disabled:F.isPending||!p&&!b&&!y,className:"w-full bg-[#1877F2] hover:bg-[#1464D8] text-white h-8 text-xs",children:F.isPending?"Salvando...":"Salvar credenciais"}),S&&e.jsxs("p",{"data-loc":"client/src/pages/MetaLeadAds.tsx:900",className:"text-xs text-emerald-500 flex items-center gap-1",children:[e.jsx(Ka,{"data-loc":"client/src/pages/MetaLeadAds.tsx:901",size:11})," Credenciais salvas. O webhook já está ativo."]})]})]}),e.jsxs("a",{"data-loc":"client/src/pages/MetaLeadAds.tsx:908",href:"https://developers.facebook.com/apps/10
69553586346962571/webhooks/",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-xs text-[#1877F2] hover:underline",children:[e.jsx(Gi,{"data-loc":"client/src/pages/MetaLeadAds.tsx:914",size:12}),"Abrir painel de Webhooks do APP no Meta Developers"]})]})})]}),r&&e.jsx(uz,{"data-loc":"client/src/pages/MetaLeadAds.tsx:925",open:r,onClose:()=>{l(!1),d(null)},editData:c,campaigns:B||[],onSaved:()=>I()}),e.jsx(Ql,{"data-loc":"client/src/pages/MetaLeadAds.tsx:935",open:u!==null,onOpenChange:T=>!T&&x(null),children:e.jsxs(Gl,{"data-loc":"client/src/pages/MetaLeadAds.tsx:936",className:"bg-card border-border text-foreground",children:[e.jsxs(Vl,{"data-loc":"client/src/pages/MetaLeadAds.tsx:937",children:[e.jsx(Yl,{"data-loc":"client/src/pages/MetaLeadAds.tsx:938",children:"Remover formulário?"}),e.jsx(Xl,{"data-loc":"client/src/pages/MetaLeadAds.tsx:939",className:"text-muted-foreground",children:"O formulário será removido da lista de integração. Os leads já recebidos não serão afetados."})]}),e.jsxs(Kl,{"data-loc":"client/src/pages/MetaLeadAds.tsx:943",children:[e.jsx(Jl,{"data-loc":"client/src/pages/MetaLeadAds.tsx:944",children:"Cancelar"}),e.jsx(Zl,{"data-loc":"client/src/pages/MetaLeadAds.tsx:945",onClick:()=>u&&V.mutate({id:u}),className:"bg-red-600 hover:bg-red-700 text-white",children:"Remover"})]})]})})]})}function pz(){const[t,s]=f.useState("discard-reasons"),{user:r}=ka(),l=r?.role==="admin"||r?.role==="gerente";return e.jsx(Cw,{"data-loc":"client/src/pages/Settings.tsx:43",children:e.jsxs("div",{"data-loc":"client/src/pages/Settings.tsx:44",className:"flex flex-col md:flex-row min-h-full",children:[e.jsxs("aside",{"data-loc":"client/src/pages/Settings.tsx:46",className:"w-full md:w-64 border-b md:border-b-0 md:border-r border-[#1E1E22] flex-shrink-0 p-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/Settings.tsx:47",className:"flex items-center gap-2 mb-4 md:mb-6",children:[e.jsx(ki,{"data-loc":"client/src/pages/Settings.tsx:48",className:"w-4 h-4 text-[#C9A96E]"}),e.jsx("h1",{"data-loc":"client/src/pages/Settings.tsx:49",className:"text-sm font-semibold text-[#F2F2F3]",children:"Configurações"})]}),e.jsxs("nav",{"data-loc":"client/src/pages/Settings.tsx:51",className:"flex md:flex-col gap-1 overflow-x-auto",children:[e.jsxs("button",{"data-loc":"client/src/pages/Settings.tsx:52",onClick:()=>s("discard-reasons"),className:`flex items-center justify-between px-3 py-2 rounded-md text-sm transition-colors whitespace-nowrap ${t==="discard-reasons"?"bg-[#1E1E22] text-[#F2F2F3]":"text-[#8B8B8F] hover:text-[#F2F2F3] hover:bg-[#111113]"}`,children:[e.jsx("span",{"data-loc":"client/src/pages/Settings.tsx:60",children:"Motivos de Descarte"}),e.jsx(Ia,{"data-loc":"client/src/pages/Settings.tsx:61",className:"w-3 h-3 hidden md:block"})]}),e.jsxs("button",{"data-loc":"client/src/pages/Settings.tsx:63",onClick:()=>s("api-keys"),className:`flex items-center justify-between px-3 py-2 rounded-md text-sm transition-colors whitespace-nowrap ${t==="api-keys"?"bg-[#1E1E22] text-[#F2F2F3]":"text-[#8B8B8F] hover:text-[#F2F2F3] hover:bg-[#111113]"}`,children:[e.jsx("span",{"data-loc":"client/src/pages/Settings.tsx:71",children:"API Keys"}),e.jsx(Ia,{"data-loc":"client/src/pages/Settings.tsx:72",className:"w-3 h-3 hidden md:block"})]})]})]}),e.jsxs("main",{"data-loc":"client/src/pages/Settings.tsx:78",className:"flex-1 p-3 md:p-6",children:[t==="discard-reasons"&&e.jsx(mz,{"data-loc":"client/src/pages/Settings.tsx:80",isAdmin:l}),t==="api-keys"&&e.jsx(fz,{"data-loc":"client/src/pages/Settings.tsx:83",isAdmin:l})]})]})})}function mz({isAdmin:t}){const s=Y.useUtils(),{data:r=[],isLoading:l}=Y.settings.discardReasons.list.useQuery(),[c,d]=f.useState(!1),[u,x]=f.useState(null),[p,g]=f.useState(null),[b,v]=f.useState(""),[y,j]=f.useState("Ambos"),[S,N]=f.useState("1"),[w,D]=f.useState("0"),k=Y.settings.discardReasons.create.useMutation({onSuccess:()=>{s.settings.discardReasons.list.invalidate(),ce.success("Motivo criado com sucesso"),R()},onError:B=>ce.error("Erro ao criar: "+B.message)}),A=Y.settings.discardReasons.update.useMutation({onSuccess:()=>
695{s.settings.discardReasons.list.invalidate(),ce.success("Motivo atualizado"),R()},onError:B=>ce.error("Erro ao atualizar: "+B.message)}),_=Y.settings.discardReasons.delete.useMutation({onSuccess:()=>{s.settings.discardReasons.list.invalidate(),ce.success("Motivo excluÃdo"),g(null)},onError:B=>ce.error("Erro ao excluir: "+B.message)});function E(){x(null),v(""),j("Ambos"),N("1"),D(String(r.length)),d(!0)}function I(B){x(B.id),v(B.nome),j(B.opcaoAtendimento),N(B.ativo?"1":"0"),D(String(B.ordem)),d(!0)}function R(){d(!1),x(null)}function z(){if(!b.trim())return;const B={nome:b.trim(),opcaoAtendimento:y,ativo:parseInt(S),ordem:parseInt(w)||0};u?A.mutate({id:u,...B}):k.mutate(B)}const U=B=>B==="Atendimento"?e.jsx(Qt,{"data-loc":"client/src/pages/Settings.tsx:172",className:"bg-blue-500/20 text-blue-400 border-blue-500/30 text-xs",children:"Atendimento"}):B==="Captacao"?e.jsx(Qt,{"data-loc":"client/src/pages/Settings.tsx:173",className:"bg-purple-500/20 text-purple-400 border-purple-500/30 text-xs",children:"Pós-venda"}):e.jsx(Qt,{"data-loc":"client/src/pages/Settings.tsx:174",className:"bg-[#C9A96E]/20 text-[#C9A96E] border-[#C9A96E]/30 text-xs",children:"Ambos"});return e.jsxs("div",{"data-loc":"client/src/pages/Settings.tsx:178",className:"max-w-3xl",children:[e.jsxs("div",{"data-loc":"client/src/pages/Settings.tsx:180",className:"flex items-center justify-between mb-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/Settings.tsx:181",children:[e.jsx("h2",{"data-loc":"client/src/pages/Settings.tsx:182",className:"text-base font-semibold text-[#F2F2F3]",children:"Motivos de Descarte"}),e.jsxs("p",{"data-loc":"client/src/pages/Settings.tsx:183",className:"text-xs text-[#8B8B8F] mt-0.5",children:["Motivos exibidos ao descartar um lead ou atendimento. ",r.length," motivo",r.length!==1?"s":""," cadastrado",r.length!==1?"s":"","."]})]}),t&&e.jsxs(oe,{"data-loc":"client/src/pages/Settings.tsx:188",size:"sm",onClick:E,className:"bg-[#C9A96E] hover:bg-[#b8955a] text-black font-medium h-8 px-3 text-xs",children:[e.jsx(Jt,{"data-loc":"client/src/pages/Settings.tsx:193",className:"w-3.5 h-3.5 mr-1.5"}),"Novo Motivo"]})]}),l?e.jsx("div",{"data-loc":"client/src/pages/Settings.tsx:201",className:"space-y-2",children:[...Array(5)].map((B,F)=>e.jsx("div",{"data-loc":"client/src/pages/Settings.tsx:203",className:"h-12 bg-[#111113] rounded-lg animate-pulse"},F))}):r.length===0?e.jsxs("div",{"data-loc":"client/src/pages/Settings.tsx:207",className:"text-center py-16 text-[#8B8B8F]",children:[e.jsx(Ki,{"data-loc":"client/src/pages/Settings.tsx:208",className:"w-8 h-8 mx-auto mb-3 opacity-40"}),e.jsx("p",{"data-loc":"client/src/pages/Settings.tsx:209",className:"text-sm",children:"Nenhum motivo cadastrado."}),t&&e.jsx(oe,{"data-loc":"client/src/pages/Settings.tsx:211",size:"sm",variant:"outline",onClick:E,className:"mt-4 text-xs",children:"Cadastrar primeiro motivo"})]}):e.jsx("div",{"data-loc":"client/src/pages/Settings.tsx:217",className:"border border-[#1E1E22] rounded-lg overflow-hidden",children:e.jsxs("table",{"data-loc":"client/src/pages/Settings.tsx:218",className:"w-full text-sm",children:[e.jsx("thead",{"data-loc":"client/src/pages/Settings.tsx:219",children:e.jsxs("tr",{"data-loc":"client/src/pages/Settings.tsx:220",className:"border-b border-[#1E1E22] bg-[#111113]",children:[e.jsx("th",{"data-loc":"client/src/pages/Settings.tsx:221",className:"text-left px-4 py-2.5 text-xs font-medium text-[#8B8B8F] w-10",children:"#"}),e.jsx("th",{"data-loc":"client/src/pages/Settings.tsx:222",className:"text-left px-4 py-2.5 text-xs font-medium text-[#8B8B8F]",children:"Nome"}),e.jsx("th",{"data-loc":"client/src/pages/Settings.tsx:223",className:"text-left px-4 py-2.5 text-xs font-medium text-[#8B8B8F]",children:"Tipo"}),e.jsx("th",{"data-loc":"client/src/pages/Settings.tsx:224",className:"text-left px-4 py-2.5 text-xs font-medium text-[#8B8B8F]",children:"Status"}),t&&e.jsx("th",{"data-loc":"client/src/pages/Settings.tsx:225",className:"px-4 py-2.5 w-20"})]})}),e.jsx("tbody",{"data-loc":"client/src/pages/Settings.tsx:228",children:r.map((B,F)=>e.jsxs("tr",{"data-loc":"client/src/pages/Settings.tsx:230",className:"border-b border-[#1E1E22] last:border-0 hover:bg-[#111113]/50 transition-colors",children:[e.jsx("td",{"data-loc":"client/src/pages/Settings.tsx:234",className:"px-4 py-3 text-xs text-[#8B8B8F]",children:F+1}),e.jsx("td",{"data-loc":"client/src/pages/Settings.tsx:235",className:"px-4 py-3 text-[#F2F2F3] font-medium",children:B.nome}),e.jsx("td",{"data-loc":"client/src/pages/Settings.tsx:236",className:"px-4 py-3",children:U(B.opcaoAtendimento)}),e.jsx("td",{"data-loc":"client/src/pages/Settings.tsx:237",className:"px-4 py-3",children:B.ativo?e.jsx(Qt,{"data-loc":"client/src/pages/Settings.tsx:239",className:"bg-emerald-500/20 text-emerald-400 border-emerald-500/30 text-xs",children:"Ativo"}):e.jsx(Qt,{"data-loc":"client/src/pages/Settings.tsx:241",className:"bg-red-500/20 text-red-400 border-red-500/30 text-xs",children:"Inativo"})}),t&&e.jsx("td",{"data-loc":"client/src/pages/Settings.tsx:245",className:"px-4 py-3",children:e.jsxs("div",{"data-loc":"client/src/pages/Settings.tsx:246",className:"flex items-center gap-1 justify-end",children:[e.jsx(oe,{"data-loc":"client/src/pages/Settings.tsx:247",size:"icon",variant:"ghost",className:"h-7 w-7 text-[#8B8B8F] hover:text-[#F2F2F3]",onClick:()=>I(B),children:e.jsx(dr,{"data-loc":"client/src/pages/Settings.tsx:253",className:"w-3.5 h-3.5"})}),e.jsx(oe,{"data-loc":"client/src/pages/Settings.tsx:255",size:"icon",variant:"ghost",className:"h-7 w-7 text-[#8B8B8F] hover:text-red-400",onClick:()=>g(B.id),children:e.jsx(Ba,{"data-loc":"client/src/pages/Settings.tsx:261",className:"w-3.5 h-3.5"})})]})})]},B.id))})]})}),e.jsx(Rs,{"data-loc":"client/src/pages/Settings.tsx:274",open:c,onOpenChange:B=>!B&&R(),children:e.jsxs(Ts,{"data-loc":"client/src/pages/Settings.tsx:275",className:"bg-[#111113] border-[#1E1E22] text-[#F2F2F3] max-w-md",children:[e.jsx(_s,{"data-loc":"client/src/pages/Settings.tsx:276",children:e.jsx(Ps,{"data-loc":"client/src/pages/Settings.tsx:277",className:"text-base font-semibold",children:u?"Editar Motivo":"Novo Motivo de Descarte"})}),e.jsxs("div",{"data-loc":"client/src/pages/Settings.tsx:281",className:"space-y-4 py-2",children:[e.jsxs("div",{"data-loc":"client/src/pages/Settings.tsx:282",children:[e.jsx("label",{"data-loc":"client/src/pages/Settings.tsx:283",className:"text-xs text-[#8B8B8F] mb-1.5 block",children:"Nome do motivo *"}),e.jsx(ge,{"data-loc":"client/src/pages/Settings.tsx:284",value:b,onChange:B=>v(B.target.value),placeholder:"Ex: Cliente sem perfil",className:"bg-[#0A0A0B] border-[#1E1E22] text-[#F2F2F3] text-sm h-9",autoFocus:!0})]}),e.jsxs("div",{"data-loc":"client/src/pages/Settings.tsx:292",className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/Settings.tsx:293",children:[e.jsx("label",{"data-loc":"client/src/pages/Settings.tsx:294",className:"text-xs text-[#8B8B8F] mb-1.5 block",children:"Tipo de atendimento"}),e.jsxs(Dt,{"data-loc":"client/src/pages/Settings.tsx:295",value:y,onValueChange:B=>j(B),children:[e.jsx(Lt,{"data-loc":"client/src/pages/Settings.tsx:296",className:"bg-[#0A0A0B] border-[#1E1E22] text-[#F2F2F3] h-9 text-sm",children:e.jsx(Mt,{"data-loc":"client/src/pages/Settings.tsx:297"})}),e.jsxs(kt,{"data-loc":"client/src/pages/Settings.tsx:299",className:"bg-[#111113] border-[#1E1E22] text-[#F2F2F3]",children:[e.jsx(He,{"data-loc":"client/src/pages/Settings.tsx:300",value:"Ambos",children:"Ambos"}),e.jsx(He,{"data-loc":"client/src/pages/Settings.tsx:301",value:"Atendimento",children:"Atendimento"}),e.jsx(He,{"data-loc":"client/src/pages/Settings.tsx:302",value:"Captacao",children:"Pós-venda"})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Settings.tsx:306",children:[e.jsx("label",{"data-loc":"client/src/pages/Settings.tsx:307",className:"text-xs text-[#8B8B8F] mb-1.5 block",children:"Status"}),e.jsxs(Dt,{"data-loc":"client/src/pages/Settings.tsx:308",value:S,onValueChange:B=>N(B),children:[e.jsx(Lt,{"data-loc":"client/src/pages/Settings.tsx:309",className:"bg-[#0A0A0B] border-[#1E1E22] text-[#F2F2F3] h-9 text-sm",children:e.jsx(Mt,{"data-loc":"client/src/pages/Settings.tsx:310"})}),e.jsxs(kt,{"data-loc":"client/src/pages/Settings.tsx:312",className:"bg-[#111113] border-[#1E1E22] text-[#F2F2F3]",children:[e.jsx(He,{"data-loc":"client/src/pages/Settings.tsx:313",value:"1",children:"Ativo"}),e.jsx(He,{"data-loc":"client/src/pages/Settings.tsx:314",value:"
6950",children:"Inativo"})]})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Settings.tsx:319",children:[e.jsx("label",{"data-loc":"client/src/pages/Settings.tsx:320",className:"text-xs text-[#8B8B8F] mb-1.5 block",children:"Ordem de exibição"}),e.jsx(ge,{"data-loc":"client/src/pages/Settings.tsx:321",type:"number",value:w,onChange:B=>D(B.target.value),className:"bg-[#0A0A0B] border-[#1E1E22] text-[#F2F2F3] text-sm h-9 w-24",min:"0"})]})]}),e.jsxs(Os,{"data-loc":"client/src/pages/Settings.tsx:330",children:[e.jsx(oe,{"data-loc":"client/src/pages/Settings.tsx:331",variant:"ghost",size:"sm",onClick:R,className:"text-[#8B8B8F] hover:text-[#F2F2F3]",children:"Cancelar"}),e.jsx(oe,{"data-loc":"client/src/pages/Settings.tsx:334",size:"sm",onClick:z,disabled:!b.trim()||k.isPending||A.isPending,className:"bg-[#C9A96E] hover:bg-[#b8955a] text-black font-medium",children:u?"Salvar alterações":"Criar motivo"})]})]})}),e.jsx(Ql,{"data-loc":"client/src/pages/Settings.tsx:347",open:p!==null,onOpenChange:B=>!B&&g(null),children:e.jsxs(Gl,{"data-loc":"client/src/pages/Settings.tsx:348",className:"bg-[#111113] border-[#1E1E22] text-[#F2F2F3]",children:[e.jsxs(Vl,{"data-loc":"client/src/pages/Settings.tsx:349",children:[e.jsx(Yl,{"data-loc":"client/src/pages/Settings.tsx:350",children:"Excluir motivo de descarte?"}),e.jsx(Xl,{"data-loc":"client/src/pages/Settings.tsx:351",className:"text-[#8B8B8F]",children:"Esta ação não pode ser desfeita. Leads que já usaram este motivo manterão o registro."})]}),e.jsxs(Kl,{"data-loc":"client/src/pages/Settings.tsx:355",children:[e.jsx(Jl,{"data-loc":"client/src/pages/Settings.tsx:356",className:"bg-transparent border-[#1E1E22] text-[#8B8B8F] hover:text-[#F2F2F3]",children:"Cancelar"}),e.jsx(Zl,{"data-loc":"client/src/pages/Settings.tsx:359",onClick:()=>p&&_.mutate({id:p}),className:"bg-red-600 hover:bg-red-700 text-white",children:"Excluir"})]})]})})]})}function fz({isAdmin:t}){const s=Y.useUtils(),{data:r=[],isLoading:l}=Y.apiKeys.list.useQuery(),[c,d]=f.useState(!1),[u,x]=f.useState(""),[p,g]=f.useState(null),[b,v]=f.useState(null),[y,j]=f.useState(null),[S,N]=f.useState(null),w=Y.apiKeys.create.useMutation({onSuccess:E=>{s.apiKeys.list.invalidate(),g(E.key),d(!1),x("")},onError:E=>ce.error("Erro ao criar chave: "+E.message)}),D=Y.apiKeys.revoke.useMutation({onSuccess:()=>{s.apiKeys.list.invalidate(),ce.success("Chave revogada"),v(null)},onError:E=>ce.error("Erro ao revogar: "+E.message)}),k=Y.apiKeys.delete.useMutation({onSuccess:()=>{s.apiKeys.list.invalidate(),ce.success("Chave excluÃda"),j(null)},onError:E=>ce.error("Erro ao excluir: "+E.message)});function A(E){navigator.clipboard.writeText(E),ce.success("Chave copiada para a área de transferência")}function _(E){return E.slice(0,12)+"â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢"+E.slice(-4)}return e.jsxs("div",{"data-loc":"client/src/pages/Settings.tsx:422",className:"max-w-3xl",children:[e.jsxs("div",{"data-loc":"client/src/pages/Settings.tsx:424",className:"flex items-center justify-between mb-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/Settings.tsx:425",children:[e.jsx("h2",{"data-loc":"client/src/pages/Settings.tsx:426",className:"text-base font-semibold text-[#F2F2F3]",children:"API Keys"}),e.jsxs("p",{"data-loc":"client/src/pages/Settings.tsx:427",className:"text-xs text-[#8B8B8F] mt-0.5",children:["Chaves de API para integração com sistemas externos.",r.length>0&&` ${r.filter(E=>E.active).length} chave${r.filter(E=>E.active).length!==1?"s":""} ativa${r.filter(E=>E.active).length!==1?"s":""}.`]})]}),t&&e.jsxs(oe,{"data-loc":"client/src/pages/Settings.tsx:433",size:"sm",onClick:()=>d(!0),className:"bg-[#C9A96E] hover:bg-[#b8955a] text-black font-medium h-8 px-3 text-xs",children:[e.jsx(Jt,{"data-loc":"client/src/pages/Settings.tsx:438",className:"w-3.5 h-3.5 mr-1.5"}),"Nova Chave"]})]}),e.jsxs("div",{"data-loc":"client/src/pages/Settings.tsx:445",className:"bg-[#111113] border border-[#1E1E22] rounded-lg p-4 mb-5 text-xs text-[#8B8B8F] space-y-1",children:[e.jsxs("p",{"data-loc":"client/src/pages/Settings.tsx:446",className:"font-medium text-[#F2F2F3] mb-1.5 flex items-center gap-1.5",children:[e.jsx(Lg,{"data-loc":"client/src/pages/Settings.tsx:447",className:"w-3.5 h-3.5 text-[#C9A96E]"}),"Como usar"]}),e.jsxs("p",{"data-loc":"client/src/pages/Settings.tsx:450",children:["Envie a chave no header ",e.jsx("code",{"data-loc":"client/src/pages/Settings.tsx:450",className:"bg-[#0A0A0B] px-1.5 py-0.5 rounded text-[#C9A96E]",children:"X-API-Key"}
695)," de cada requisição ao endpoint:"]}),e.jsxs("code",{"data-loc":"client/src/pages/Settings.tsx:451",className:"block bg-[#0A0A0B] px-3 py-2 rounded mt-1.5 text-[#C9A96E] font-mono",children:["POST ",window.location.origin,"/api/webhooks/leads"]})]}),l?e.jsx("div",{"data-loc":"client/src/pages/Settings.tsx:458",className:"space-y-2",children:[...Array(3)].map((E,I)=>e.jsx("div",{"data-loc":"client/src/pages/Settings.tsx:460",className:"h-14 bg-[#111113] rounded-lg animate-pulse"},I))}):r.length===0?e.jsxs("div",{"data-loc":"client/src/pages/Settings.tsx:464",className:"text-center py-16 text-[#8B8B8F]",children:[e.jsx(Lg,{"data-loc":"client/src/pages/Settings.tsx:465",className:"w-8 h-8 mx-auto mb-3 opacity-40"}),e.jsx("p",{"data-loc":"client/src/pages/Settings.tsx:466",className:"text-sm",children:"Nenhuma chave criada."}),t&&e.jsx(oe,{"data-loc":"client/src/pages/Settings.tsx:468",size:"sm",variant:"outline",onClick:()=>d(!0),className:"mt-4 text-xs",children:"Criar primeira chave"})]}):e.jsx("div",{"data-loc":"client/src/pages/Settings.tsx:474",className:"border border-[#1E1E22] rounded-lg overflow-hidden",children:r.map((E,I)=>e.jsxs("div",{"data-loc":"client/src/pages/Settings.tsx:476",className:`flex items-center gap-3 px-4 py-3 ${I<r.length-1?"border-b border-[#1E1E22]":""} ${E.active?"":"opacity-50"}`,children:[e.jsxs("div",{"data-loc":"client/src/pages/Settings.tsx:480",className:"flex-1 min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/pages/Settings.tsx:481",className:"flex items-center gap-2 mb-0.5",children:[e.jsx("span",{"data-loc":"client/src/pages/Settings.tsx:482",className:"text-sm font-medium text-[#F2F2F3]",children:E.name}),E.active?e.jsx(Qt,{"data-loc":"client/src/pages/Settings.tsx:484",className:"bg-emerald-500/20 text-emerald-400 border-emerald-500/30 text-xs",children:"Ativa"}):e.jsx(Qt,{"data-loc":"client/src/pages/Settings.tsx:486",className:"bg-red-500/20 text-red-400 border-red-500/30 text-xs",children:"Revogada"})]}),e.jsxs("div",{"data-loc":"client/src/pages/Settings.tsx:489",className:"flex items-center gap-1.5",children:[e.jsx("code",{"data-loc":"client/src/pages/Settings.tsx:490",className:"text-xs text-[#8B8B8F] font-mono",children:S===E.id?E.key:_(E.key)}),e.jsx("button",{"data-loc":"client/src/pages/Settings.tsx:493",onClick:()=>N(S===E.id?null:E.id),className:"text-[#8B8B8F] hover:text-[#F2F2F3] transition-colors",children:S===E.id?e.jsx(rC,{"data-loc":"client/src/pages/Settings.tsx:497",className:"w-3 h-3"}):e.jsx(_x,{"data-loc":"client/src/pages/Settings.tsx:497",className:"w-3 h-3"})}),e.jsx("button",{"data-loc":"client/src/pages/Settings.tsx:499",onClick:()=>A(E.key),className:"text-[#8B8B8F] hover:text-[#C9A96E] transition-colors",children:e.jsx(zl,{"data-loc":"client/src/pages/Settings.tsx:503",className:"w-3 h-3"})})]}),e.jsxs("p",{"data-loc":"client/src/pages/Settings.tsx:506",className:"text-xs text-[#8B8B8F] mt-0.5",children:["Criada em ",new Date(E.createdAt).toLocaleDateString("pt-BR"),E.lastUsedAt&&` · Ãltimo uso: ${new Date(E.lastUsedAt).toLocaleDateString("pt-BR")}`]})]}),t&&e.jsxs("div",{"data-loc":"client/src/pages/Settings.tsx:512",className:"flex items-center gap-1 flex-shrink-0",children:[E.active&&e.jsxs(oe,{"data-loc":"client/src/pages/Settings.tsx:514",size:"sm",variant:"ghost",className:"h-7 px-2 text-xs text-[#8B8B8F] hover:text-amber-400",onClick:()=>v(E.id),children:[e.jsx(uC,{"data-loc":"client/src/pages/Settings.tsx:520",className:"w-3.5 h-3.5 mr-1"}),"Revogar"]}),e.jsx(oe,{"data-loc":"client/src/pages/Settings.tsx:524",size:"icon",variant:"ghost",className:"h-7 w-7 text-[#8B8B8F] hover:text-red-400",onClick:()=>j(E.id),children:e.jsx(Ba,{"data-loc":"client/src/pages/Settings.tsx:530",className:"w-3.5 h-3.5"})})]})]},E.id))}),e.jsx(Rs,{"data-loc":"client/src/pages/Settings.tsx:540",open:c,onOpenChange:E=>{E||(d(!1),x(""))},children:e.jsxs(Ts,{"data-loc":"client/src/pages/Settings.tsx:541",className:"bg-[#111113] border-[#1E1E22] text-[#F2F2F3] max-w-md",children:[e.jsx(_s,{"data-loc":"client/src/pages/Settings.tsx:542",children:e.jsx(Ps,{"data-loc":"client/src/pages/Settings.tsx:543",className:"text-base font-semibold",children:"Nova API Key"})}),e.jsxs("div",{"data-loc":"client/src/pages/Settings.tsx:545",className:"py-2",children:[e.jsx("label",{"data-loc":"client/src/pages/Settings.tsx:546",className:"text-xs text-[#8B8B8F] mb-1.5 block",children:"Nome da chave *"}),e.jsx(ge,{"data-loc":"client/src/pages/Settings.tsx:547",value:u,onChange:E=>x(E.target.value),placeholder:"Ex: Site",className:"bg-[#0A0A0B] border-[#1E1E22] text-[#F2F2F3] text-sm h-9",autoFocus:!0,onKeyDown:E=>
695E.key==="Enter"&&u.trim()&&w.mutate({name:u.trim()})})]}),e.jsxs(Os,{"data-loc":"client/src/pages/Settings.tsx:556",children:[e.jsx(oe,{"data-loc":"client/src/pages/Settings.tsx:557",variant:"ghost",size:"sm",onClick:()=>{d(!1),x("")},className:"text-[#8B8B8F]",children:"Cancelar"}),e.jsx(oe,{"data-loc":"client/src/pages/Settings.tsx:560",size:"sm",disabled:!u.trim()||w.isPending,onClick:()=>w.mutate({name:u.trim()}),className:"bg-[#C9A96E] hover:bg-[#b8955a] text-black font-medium",children:w.isPending?"Criando...":"Criar Chave"})]})]})}),e.jsx(Rs,{"data-loc":"client/src/pages/Settings.tsx:573",open:!!p,onOpenChange:E=>{E||g(null)},children:e.jsxs(Ts,{"data-loc":"client/src/pages/Settings.tsx:574",className:"bg-[#111113] border-[#1E1E22] text-[#F2F2F3] max-w-lg",children:[e.jsx(_s,{"data-loc":"client/src/pages/Settings.tsx:575",children:e.jsx(Ps,{"data-loc":"client/src/pages/Settings.tsx:576",className:"text-base font-semibold text-emerald-400",children:"â Chave criada com sucesso"})}),e.jsxs("div",{"data-loc":"client/src/pages/Settings.tsx:578",className:"py-2 space-y-3",children:[e.jsx("p",{"data-loc":"client/src/pages/Settings.tsx:579",className:"text-xs text-amber-400 bg-amber-500/10 border border-amber-500/20 rounded-lg px-3 py-2",children:"â ï¸ Copie a chave agora. Ela não será exibida novamente por segurança."}),e.jsxs("div",{"data-loc":"client/src/pages/Settings.tsx:582",className:"bg-[#0A0A0B] border border-[#1E1E22] rounded-lg px-3 py-2.5 flex items-center gap-2",children:[e.jsx("code",{"data-loc":"client/src/pages/Settings.tsx:583",className:"flex-1 text-xs text-[#C9A96E] font-mono break-all",children:p}),e.jsx("button",{"data-loc":"client/src/pages/Settings.tsx:584",onClick:()=>p&&A(p),className:"text-[#8B8B8F] hover:text-[#C9A96E] transition-colors flex-shrink-0",children:e.jsx(zl,{"data-loc":"client/src/pages/Settings.tsx:588",className:"w-4 h-4"})})]})]}),e.jsx(Os,{"data-loc":"client/src/pages/Settings.tsx:592",children:e.jsxs(oe,{"data-loc":"client/src/pages/Settings.tsx:593",size:"sm",onClick:()=>{p&&A(p),g(null)},className:"bg-[#C9A96E] hover:bg-[#b8955a] text-black font-medium",children:[e.jsx(zl,{"data-loc":"client/src/pages/Settings.tsx:598",className:"w-3.5 h-3.5 mr-1.5"}),"Copiar e Fechar"]})})]})}),e.jsx(Ql,{"data-loc":"client/src/pages/Settings.tsx:606",open:!!b,onOpenChange:E=>{E||v(null)},children:e.jsxs(Gl,{"data-loc":"client/src/pages/Settings.tsx:607",className:"bg-[#111113] border-[#1E1E22] text-[#F2F2F3]",children:[e.jsxs(Vl,{"data-loc":"client/src/pages/Settings.tsx:608",children:[e.jsx(Yl,{"data-loc":"client/src/pages/Settings.tsx:609",children:"Revogar chave?"}),e.jsx(Xl,{"data-loc":"client/src/pages/Settings.tsx:610",className:"text-[#8B8B8F]",children:"A chave será desativada imediatamente. Requisições usando esta chave serão rejeitadas."})]}),e.jsxs(Kl,{"data-loc":"client/src/pages/Settings.tsx:614",children:[e.jsx(Jl,{"data-loc":"client/src/pages/Settings.tsx:615",className:"bg-transparent border-[#1E1E22] text-[#8B8B8F] hover:text-[#F2F2F3]",children:"Cancelar"}),e.jsx(Zl,{"data-loc":"client/src/pages/Settings.tsx:618",onClick:()=>b&&D.mutate({id:b}),className:"bg-amber-600 hover:bg-amber-700 text-white",children:"Revogar"})]})]})}),e.jsx(Ql,{"data-loc":"client/src/pages/Settings.tsx:629",open:!!y,onOpenChange:E=>{E||j(null)},children:e.jsxs(Gl,{"data-loc":"client/src/pages/Settings.tsx:630",className:"bg-[#111113] border-[#1E1E22] text-[#F2F2F3]",children:[e.jsxs(Vl,{"data-loc":"client/src/pages/Settings.tsx:631",children:[e.jsx(Yl,{"data-loc":"client/src/pages/Settings.tsx:632",children:"Excluir chave?"}),e.jsx(Xl,{"data-loc":"client/src/pages/Settings.tsx:633",className:"text-[#8B8B8F]",children:"Esta ação não pode ser desfeita. A chave será permanentemente removida."})]}),e.jsxs(Kl,{"data-loc":"client/src/pages/Settings.tsx:637",children:[e.jsx(Jl,{"data-loc":"client/src/pages/Settings.tsx:638",className:"bg-transparent border-[#1E1E22] text-[#8B8B8F] hover:text-[#F2F2F3]",children:"Cancelar"}),e.jsx(Zl,{"data-loc":"client/src/pages/Settings.tsx:641",onClick:()=>y&&k.mutate({id:y}),className:"bg-red-600 hover:bg-red-700 text-white",children:"Excluir"})]})]})})]})}function gz(t,s){return f.useReducer((r,l)=>s[r][l]??r,t)}var av="ScrollArea",[A4]=zs(av),[hz,Js]=A4(av),S4=f.forwardRef((t,s)=>{const{__scopeScrollArea:r,type:l="hover",dir:c,scrollHideDelay:d=600,...u}=t,[x,p]=f.useState(null),[g,b]=f.useState(null),[v,y]=f.useState(null),[j,S]=f.useState(null),[N,w]=f.useState(null),[D,k]=f.useState(0),[A,_]=f.useState(0),[E,I]=f.useState(!1),[R,z]=f.useState(!1),U=st(s,F=>p(F)),B=Xi(c);return e.jsx(hz,{scope:r,type:l,dir:B,scrollHideDelay:d,scrollArea:x,viewport:g,onViewportChange:b,content:v,onContentChange:y,scrollbarX:j,onScrollbarXChange:S,scrollbarXEnabled:E,onScrollbarXEnabledChange:I,scrollbarY:N,onScrollbarYChange:w,scrollbarYEnabled:R,onScrollbarYEnabledChange:z,onCornerWidthChange:k,onCornerHeight
vendor: 8,206 bytes, line 695
695Change:_,children:e.jsx(Qe.div,{dir:B,...u,ref:U,style:{position:"relative","--radix-scroll-area-corner-width":D+"px","--radix-scroll-area-corner-height":A+"px",...t.style}})})});S4.displayName=av;var E4="ScrollAreaViewport",D4=f.forwardRef((t,s)=>{const{__scopeScrollArea:r,children:l,nonce:c,...d}=t,u=Js(E4,r),x=f.useRef(null),p=st(s,x,u.onViewportChange);return e.jsxs(e.Fragment,{children:[e.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:c}),e.jsx(Qe.div,{"data-radix-scroll-area-viewport":"",...d,ref:p,style:{overflowX:u.scrollbarXEnabled?"scroll":"hidden",overflowY:u.scrollbarYEnabled?"scroll":"hidden",...t.style},children:e.jsx("div",{ref:u.onContentChange,style:{minWidth:"100%",display:"table"},children:l})})]})});D4.displayName=E4;var Pn="ScrollAreaScrollbar",M4=f.forwardRef((t,s)=>{const{forceMount:r,...l}=t,c=Js(Pn,t.__scopeScrollArea),{onScrollbarXEnabledChange:d,onScrollbarYEnabledChange:u}=c,x=t.orientation==="horizontal";return f.useEffect(()=>(x?d(!0):u(!0),()=>{x?d(!1):u(!1)}),[x,d,u]),c.type==="hover"?e.jsx(vz,{...l,ref:s,forceMount:r}):c.type==="scroll"?e.jsx(bz,{...l,ref:s,forceMount:r}):c.type==="auto"?e.jsx(L4,{...l,ref:s,forceMount:r}):c.type==="always"?e.jsx(sv,{...l,ref:s}):null});M4.displayName=Pn;var vz=f.forwardRef((t,s)=>{const{forceMount:r,...l}=t,c=Js(Pn,t.__scopeScrollArea),[d,u]=f.useState(!1);return f.useEffect(()=>{const x=c.scrollArea;let p=0;if(x){const g=()=>{window.clearTimeout(p),u(!0)},b=()=>{p=window.setTimeout(()=>u(!1),c.scrollHideDelay)};return x.addEventListener("pointerenter",g),x.addEventListener("pointerleave",b),()=>{window.clearTimeout(p),x.removeEventListener("pointerenter",g),x.removeEventListener("pointerleave",b)}}},[c.scrollArea,c.scrollHideDelay]),e.jsx(Fa,{present:r||d,children:e.jsx(L4,{"data-state":d?"visible":"hidden",...l,ref:s})})}),bz=f.forwardRef((t,s)=>{const{forceMount:r,...l}=t,c=Js(Pn,t.__scopeScrollArea),d=t.orientation==="horizontal",u=np(()=>p("SCROLL_END"),100),[x,p]=gz("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return f.useEffect(()=>{if(x==="idle"){const g=window.setTimeout(()=>p("HIDE"),c.scrollHideDelay);return()=>window.clearTimeout(g)}},[x,c.scrollHideDelay,p]),f.useEffect(()=>{const g=c.viewport,b=d?"scrollLeft":"scrollTop";if(g){let v=g[b];const y=()=>{const j=g[b];v!==j&&(p("SCROLL"),u()),v=j};return g.addEventListener("scroll",y),()=>g.removeEventListener("scroll",y)}},[c.viewport,d,p,u]),e.jsx(Fa,{present:r||x!=="hidden",children:e.jsx(sv,{"data-state":x==="hidden"?"hidden":"visible",...l,ref:s,onPointerEnter:Ae(t.onPointerEnter,()=>p("POINTER_ENTER")),onPointerLeave:Ae(t.onPointerLeave,()=>p("POINTER_LEAVE"))})})}),L4=f.forwardRef((t,s)=>{const r=Js(Pn,t.__scopeScrollArea),{forceMount:l,...c}=t,[d,u]=f.useState(!1),x=t.orientation==="horizontal",p=np(()=>{if(r.viewport){const g=r.viewport.offsetWidth<r.viewport.scrollWidth,b=r.viewport.offsetHeight<r.viewport.scrollHeight;u(x?g:b)}},10);return oc(r.viewport,p),oc(r.content,p),e.jsx(Fa,{present:l||d,children:e.jsx(sv,{"data-state":d?"visible":"hidden",...c,ref:s})})}),sv=f.forwardRef((t,s)=>{const{orientation:r="vertical",...l}=t,c=Js(Pn,t.__scopeScrollArea),d=f.useRef(null),u=f.useRef(0),[x,p]=f.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),g=O4(x.viewport,x.content),b={...l,sizes:x,onSizesChange:p,hasThumb:g>0&&g<1,onThumbChange:y=>d.current=y,onThumbPointerUp:()=>u.current=0,onThumbPointerDown:y=>u.current=y};function v(y,j){return Az(y,u.current,x,j)}return r==="horizontal"?e.jsx(yz,{...b,ref:s,onThumbPositionChange:()=>{if(c.viewport&&d.current){const y=c.viewport.scrollLeft,j=e2(y,x,c.dir);d.current.style.transform=`translate3d(${j}px, 0, 0)`}},onWheelScroll:y=>{c.viewport&&(c.viewport.scrollLeft=y)},onDragScroll:y=>{c.viewport&&(c.viewport.scrollLeft=v(y,c.dir))}}):r==="vertical"?e.jsx(jz,{...b,ref:s,onThumbPositionChange:()=>{if(c.viewport&&d.current){const y=c.viewport.scrollTop,j=e2(y,x);d.current.style.transform=`translate3d(0, ${j}px, 0)`}},onWheelScroll:y=>{c.viewport&&(c.viewport.scrollTop=y)},onDragScroll:y=>{c.viewport&&(c.viewport.scrollTop=v(y))}}):null}),yz=f.forwardRef((t,s)=>{const{sizes:r,onSizesChange:l,...c}=t,d=Js(Pn,t.__scopeScrollArea),[u,x]=f.useState(),p=f.useRef(null),g=st(s,p,d.onScrollbarXChange);return f.useEffect(()=>{p.current&&x(getComputedStyle(p.current))},[p]),e.jsx(R4,{"data-orientation":"horizontal",...c,ref:g,sizes:r,style:{bottom:0,left:d.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:d.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":sp(r)+"px",...t.style},onThumbPointerDown:b=>t.onThumbPointerDown(b.x),onDragScroll:b=>t.onDragScroll(b.x),onWheelScroll:(b,v)=>{if(d.viewport){const y=d.viewport.scrollLeft+b.deltaX;t.onWheelScroll(y),z4(y,v)&&b.preventDefault()}},onResize:()=>{p.current&&d.viewport&&u&&l({content:d.viewport.scrollWidth,viewport:d.viewport.offsetWidth,scrollbar:{size:p.current.clientWidth,paddingStart:mx(u.paddingLeft),paddingEnd:mx(u.paddingRight)}})}})}),jz=f.forwardRef((t,s)=>{const{sizes:r,onSizesChange:l,...c}=t,d=Js(Pn,t.__scopeScrollArea),[u,x]=f.useState(),p=f.useRef(null),g=st(s,p,d.onScrollbarYChange);return f.useEffect(()=>{p.current&&x(getComputedStyle(p.current))},[p]),e.jsx(R4,{"data-orientation":"vertical",...c,ref:g,sizes:r,style:{top:0,right:d.dir==="ltr"?0:void 0,left:d.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":sp(r)+"px",...t.style},onThumbPointerDown:b=>t.onThumbPointerDown(b.y),onDragScroll:b=>t.onDragScroll(b.y),onWheelScroll:(b,v)=>{if(d.viewport){const y=d.viewport.scrollTop+b.deltaY;t.onWheelScroll(y),z4(y,v)&&b.preventDefault()}},onResize:()=>{p.current&&d.viewport&&u&&l({content:d.viewport.scrollHeight,viewport:d.viewport.offsetHeight,scrollbar:{size:p.current.clientHeight,paddingStart:mx(u.paddingTop),paddingEnd:mx(u.paddingBottom)}})}})}),[Nz,k4]=A4(Pn),R4=f.forwardRef((t,s)=>{const{__scopeScrollArea:r,sizes:l,hasThumb:c,onThumbChange:d,onThumbPointerUp:u,onThumbPointerDown:x,onThumbPositionChange:p,onDragScroll:g,onWheelScroll:b,onResize:v,...y}=t,j=Js(Pn,r),[S,N]=f.useState(null),w=st(s,U=>N(U)),D=f.useRef(null),k=f.useRef(""),A=j.viewport,_=l.content-l.viewport,E=La(b),I=La(p),R=np(v,10);function z(U){if(D.current){const B=U.clientX-D.current.left,F=U.clientY-D.current.top;g({x:B,y:F})}}return f.useEffect(()=>{const U=B=>{const F=B.target;S?.contains(F)&&E(B,_)};return document.addEventListener("wheel",U,{passive:!1}),()=>document.removeEventListener("wheel",U,{passive:!1})},[A,S,_,E]),f.useEffect(I,[l,I]),oc(S,R),oc(j.content,R),e.jsx(Nz,{scope:r,scrollbar:S,hasThumb:c,onThumbChange:La(d),onThumbPointerUp:La(u),onThumbPositionChange:I,onThumbPointerDown:La(x),children:e.jsx(Qe.div,{...y,ref:w,style:{position:"absolute",...y.style},onPointerDown:Ae(t.onPointerDown,U=>{U.button===0&&(U.target.setPointerCapture(U.pointerId),D.current=S.getBoundingClientRect(),k.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",j.viewport&&(j.viewport.style.scrollBehavior="auto"),z(U))}),onPointerMove:Ae(t.onPointerMove,z),onPointerUp:Ae(t.onPointerUp,U=>{const B=U.target;B.hasPointerCapture(U.pointerId)&&B.releasePointerCapture(U.pointerId),document.body.style.webkitUserSelect=k.current,j.viewport&&(j.viewport.style.scrollBehavior=""),D.current=null})})})}),px="ScrollAreaThumb",T4=f.forwardRef((t,s)=>{const{forceMount:r,...l}=t,c=k4(px,t.__scopeScrollArea);return e.jsx(Fa,{present:r||c.hasThumb,children:e.jsx(Cz,{ref:s,...l})})}),Cz=f.forwardRef((t,s)=>{const{__scopeScrollArea:r,style:l,...c}=t,d=Js(px,r),u=k4(px,r),{onThumbPositionChange:x}=u,p=st(s,v=>u.onThumbChange(v)),g=f.useRef(void 0),b=np(()=>{g.current&&(g.current(),g.current=void 0)},100);return f.useEffect(()=>{const v=d.viewport;if(v){const y=()=>
695{if(b(),!g.current){const j=Sz(v,x);g.current=j,x()}};return x(),v.addEventListener("scroll",y),()=>v.removeEventListener("scroll",y)}},[d.viewport,b,x]),e.jsx(Qe.div,{"data-state":u.hasThumb?"visible":"hidden",...c,ref:p,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...l},onPointerDownCapture:Ae(t.onPointerDownCapture,v=>{const j=v.target.getBoundingClientRect(),S=v.clientX-j.left,N=v.clientY-j.top;u.onThumbPointerDown({x:S,y:N})}),onPointerUp:Ae(t.onPointerUp,u.onThumbPointerUp)})});T4.displayName=px;var nv="ScrollAreaCorner",_4=f.forwardRef((t,s)=>{const r=Js(nv,t.__scopeScrollArea),l=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&l?e.jsx(wz,{...t,ref:s}):null});_4.displayName=nv;var wz=f.forwardRef((t,s)=>{const{__scopeScrollArea:r,...l}=t,c=Js(nv,r),[d,u]=f.useState(0),[x,p]=f.useState(0),g=!!(d&&x);return oc(c.scrollbarX,()=>{const b=c.scrollbarX?.offsetHeight||0;c.onCornerHeightChange(b),p(b)}),oc(c.scrollbarY,()=>{const b=c.scrollbarY?.offsetWidth||0;c.onCornerWidthChange(b),u(b)}),g?e.jsx(Qe.div,{...l,ref:s,style:{width:d,height:x,position:"absolute",right:c.dir==="ltr"?0:void 0,left:c.dir==="rtl"?0:void 0,bottom:0,...t.style}}):null});function mx(t){return t?parseInt(t,10):0}function O4(t,s){const r=t/s;return isNaN(r)?0:r}function sp(t){const s=O4(t.viewport,t.content),r=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,l=(t.scrollbar.size-r)*s;return Math.max(l,18)}function Az(t,s,r,l="ltr"){const c=sp(r),d=c/2,u=s||d,x=c-u,p=r.scrollbar.paddingStart+u,g=r.scrollbar.size-r.scrollbar.paddingEnd-x,b=r.content-r.viewport,v=l==="ltr"?[0,b]:[b*-1,0];return P4([p,g],v)(t)}function e2(t,s,r="ltr"){const l=sp(s),c=s.scrollbar.paddingStart+s.scrollbar.paddingEnd,d=s.scrollbar.size-c,u=s.content-s.viewport,x=d-l,p=r==="ltr"?[0,u]:[u*-1,0],g=Bg(t,p);return P4([0,u],[0,x])(g)}function P4(t,s){return r=>{if(t[0]===t[1]||s[0]===s[1])return s[0];const l=(s[1]-s[0])/(t[1]-t[0]);return s[0]+l*(r-t[0])}}function z4(t,s){return t>0&&t<s}var Sz=(t,s=()=>{})=>{let r={left:t.scrollLeft,top:t.scrollTop},l=0;return(function c(){const d={left:t.scrollLeft,top:t.scrollTop},u=r.left!==d.left,x=r.top!==d.top;(u||x)&&s(),r=d,l=window.requestAnimationFrame(c)})(),()=>window.cancelAnimationFrame(l)};function np(t,s){const r=La(t),l=f.useRef(0);return f.useEffect(()=>()=>window.clearTimeout(l.current),[]),f.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(r,s)},[r,s])}function oc(t,s){const r=La(s);ba(()=>{let l=0;if(t){const c=new ResizeObserver(()=>{cancelAnimationFrame(l),l=window.requestAnimationFrame(r)});return c.observe(t),()=>{window.cancelAnimationFrame(l),c.unobserve(t)}}},[t,r])}var Ez=S4,Dz=D4,Mz=_4;function t2({className:t,children:s,...r}){return e.jsxs(Ez,{"data-loc":"client/src/components/ui/scroll-area.tsx:12","data-slot":"scroll-area",className:Me("relative",t),...r,children:[e.jsx(Dz,{"data-loc":"client/src/components/ui/scroll-area.tsx:17","data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:s}),e.jsx(Lz,{"data-loc":"client/src/components/ui/scroll-area.tsx:23"}),e.jsx(Mz,{"data-loc":"client/src/components/ui/scroll-area.tsx:24"})]})}function Lz({className:t,orientation:s="vertical",...r}){return e.jsx(M4,{"data-loc":"client/src/components/ui/scroll-area.tsx:35","data-slot":"scroll-area-scrollbar",orientation:s,className:Me("flex touch-none p-px transition-colors select-none",s==="vertical"&&"h-full w-2.5 border-l border-l-transparent",s==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",t),...r,children:e.jsx(T4,{"data-loc":"client/src/components/ui/scroll-area.tsx:48","data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}function kz(t){if(!t)return"";const s=new Date(t),l=new Date().getTime()-s.getTime();return l<6e4?"agora":l<36e5?`${Math.floor(l/6e4)}min`:l<864e5?s.toLocaleTimeString("pt-BR",{hour:"2-digit",minute:"2-digit"}):s.toLocaleDateString("pt-BR",{day:"2-digit",month:"2-digit"})}function Rz(t){return t?new Date(t).toLocaleTimeString("pt-BR",{hour:"2-digit",minute:"2-digit"}):""}function Tz(t){return t?Date.now()>t:!0}function a2(t,s){return t?t.split(" ").slice(0,2).map(r=>r[0]).join("").toUpperCase():s?s.slice(-2):"?"}function _z({status:t}){return t==="read"?e.jsx(Fy,{"data-loc":"client/src/pages/WhatsApp.tsx:98",className:"h-3.5 w-3.5 text-blue-400"}):t==="delivered"?e.jsx(Fy,{"data-loc":"client/src/pages/WhatsApp.tsx:99",className:"h-3.5 w-3.5 text-muted-foreground"}):t==="sent"?e.jsx(Ya,{"data-loc":"client/src/pages/WhatsApp.tsx:100",className:"h-3.5 w-3.5 text-muted-foreground"}):t==="failed"?e.jsx(ms,{"data-loc":"client/src/pages/WhatsApp.tsx:101",className:"h-3.5 w-3.5 text-destructive"}):e.jsx(Za,{"data-loc":"client/src/pages/WhatsApp.tsx:102",className:"h-3.5 w-3.5 text-muted-foreground
695/50"})}function Oz(){ka();const[t,s]=f.useState(null),[r,l]=f.useState(""),[c,d]=f.useState("open"),u=f.useRef(null),x=f.useRef(null),{data:p}=Y.whatsapp.status.useQuery(void 0,{refetchInterval:6e4}),{data:g,refetch:b,isLoading:v}=Y.whatsapp.listConversations.useQuery({status:c,limit:50,offset:0},{refetchInterval:8e3}),{data:y,refetch:j}=Y.whatsapp.getMessages.useQuery({conversationId:t,limit:100},{enabled:t!==null,refetchInterval:5e3}),S=Y.useUtils(),N=Y.whatsapp.sendMessage.useMutation({onSuccess:()=>{l(""),j(),b()},onError:U=>{ce.error(`Falha ao enviar: ${U.message}`)}}),w=Y.whatsapp.markRead.useMutation({onSuccess:()=>S.whatsapp.listConversations.invalidate()}),D=Y.whatsapp.closeConversation.useMutation({onSuccess:()=>{ce.success("Conversa encerrada"),b()}});f.useEffect(()=>{u.current?.scrollIntoView({behavior:"smooth"})},[y?.messages]),f.useEffect(()=>{t&&(w.mutate({conversationId:t}),x.current?.focus())},[t]);const k=f.useCallback(U=>{s(U.id)},[]),A=()=>{!t||!r.trim()||N.mutate({conversationId:t,text:r.trim()})},_=U=>{U.key==="Enter"&&!U.shiftKey&&(U.preventDefault(),A())},E=g?.conversations||[],I=y?.messages||[],R=E.find(U=>U.id===t)||null,z=R?Tz(R.windowExpiresAt):!1;return e.jsxs("div",{"data-loc":"client/src/pages/WhatsApp.tsx:201",className:"flex h-[calc(100vh-0px)] overflow-hidden bg-background",children:[e.jsxs("div",{"data-loc":"client/src/pages/WhatsApp.tsx:203",className:"flex flex-col w-[320px] shrink-0 border-r border-border bg-card",children:[e.jsxs("div",{"data-loc":"client/src/pages/WhatsApp.tsx:205",className:"flex items-center justify-between px-4 py-3 border-b border-border",children:[e.jsxs("div",{"data-loc":"client/src/pages/WhatsApp.tsx:206",className:"flex items-center gap-2",children:[e.jsx(Xr,{"data-loc":"client/src/pages/WhatsApp.tsx:207",className:"h-5 w-5 text-primary"}),e.jsx("span",{"data-loc":"client/src/pages/WhatsApp.tsx:208",className:"font-semibold text-sm text-foreground",children:"WhatsApp"}),p?.connected?e.jsxs(Gr,{"data-loc":"client/src/pages/WhatsApp.tsx:210",children:[e.jsx(Vr,{"data-loc":"client/src/pages/WhatsApp.tsx:211",children:e.jsx(BM,{"data-loc":"client/src/pages/WhatsApp.tsx:212",className:"h-3.5 w-3.5 text-emerald-500"})}),e.jsx(Kr,{"data-loc":"client/src/pages/WhatsApp.tsx:214",children:e.jsxs("p",{"data-loc":"client/src/pages/WhatsApp.tsx:215",className:"text-xs",children:[p.phoneNumber," · ",p.verifiedName]})})]}):e.jsxs(Gr,{"data-loc":"client/src/pages/WhatsApp.tsx:219",children:[e.jsx(Vr,{"data-loc":"client/src/pages/WhatsApp.tsx:220",children:e.jsx(Ky,{"data-loc":"client/src/pages/WhatsApp.tsx:221",className:"h-3.5 w-3.5 text-destructive"})}),e.jsx(Kr,{"data-loc":"client/src/pages/WhatsApp.tsx:223",children:e.jsx("p",{"data-loc":"client/src/pages/WhatsApp.tsx:224",className:"text-xs",children:"WhatsApp desconectado"})})]})]}),e.jsx(oe,{"data-loc":"client/src/pages/WhatsApp.tsx:229",variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>b(),children:e.jsx(ur,{"data-loc":"client/src/pages/WhatsApp.tsx:235",className:"h-3.5 w-3.5"})})]}),e.jsxs("div",{"data-loc":"client/src/pages/WhatsApp.tsx:240",className:"flex gap-1 px-3 py-2 border-b border-border",children:[["open","closed","all"].map(U=>e.jsx("button",{"data-loc":"client/src/pages/WhatsApp.tsx:242",onClick:()=>d(U==="all"?"all":U),className:`text-[11px] px-2.5 py-1 rounded-md font-medium transition-colors ${c===U?"bg-primary/15 text-primary":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:U==="open"?"Abertas":U==="closed"?"Encerradas":"Todas"},U)),e.jsx("span",{"data-loc":"client/src/pages/WhatsApp.tsx:254",className:"ml-auto text-[11px] text-muted-foreground self-center",children:E.length})]}),e.jsx(t2,{"data-loc":"client/src/pages/WhatsApp.tsx:260",className:"flex-1",children:v?e.jsx("div",{"data-loc":"client/src/pages/WhatsApp.tsx:262",className:"flex items-center justify-center py-12 text-muted-foreground text-sm",children:"Carregando..."}):E.length===0?e.jsxs("div",{"data-loc":"client/src/pages/WhatsApp.tsx:266",className:"flex flex-col items-center justify-center py-16 text-muted-foreground gap-2",children:[e.jsx(Xr,{"data-loc":"client/src/pages/WhatsApp.tsx:267",className:"h-8 w-8 op
695acity-30"}),e.jsx("p",{"data-loc":"client/src/pages/WhatsApp.tsx:268",className:"text-sm",children:"Nenhuma conversa"}),e.jsx("p",{"data-loc":"client/src/pages/WhatsApp.tsx:269",className:"text-xs opacity-60",children:"As mensagens recebidas aparecerão aqui"})]}):e.jsx("div",{"data-loc":"client/src/pages/WhatsApp.tsx:272",className:"divide-y divide-border/50",children:E.map(U=>{const B=U.id===t,F=a2(U.contactName,U.contactPhone);return e.jsxs("button",{"data-loc":"client/src/pages/WhatsApp.tsx:277",onClick:()=>k(U),className:`w-full flex items-start gap-3 px-3 py-3 text-left transition-colors ${B?"bg-primary/10 border-l-2 border-l-primary":"hover:bg-muted/30 border-l-2 border-l-transparent"}`,children:[e.jsxs("div",{"data-loc":"client/src/pages/WhatsApp.tsx:287",className:"relative shrink-0",children:[e.jsx("div",{"data-loc":"client/src/pages/WhatsApp.tsx:288",className:"h-10 w-10 rounded-full bg-muted flex items-center justify-center text-sm font-semibold text-foreground",children:F}),U.unreadCount>0&&e.jsx("span",{"data-loc":"client/src/pages/WhatsApp.tsx:292",className:"absolute -top-1 -right-1 h-4 min-w-4 px-1 bg-primary text-primary-foreground text-[10px] font-bold rounded-full flex items-center justify-center",children:U.unreadCount>9?"9+":U.unreadCount})]}),e.jsxs("div",{"data-loc":"client/src/pages/WhatsApp.tsx:298",className:"flex-1 min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/pages/WhatsApp.tsx:299",className:"flex items-center justify-between gap-1",children:[e.jsx("span",{"data-loc":"client/src/pages/WhatsApp.tsx:300",className:`text-sm font-medium truncate ${U.unreadCount>0?"text-foreground":"text-foreground/80"}`,children:U.contactName||U.contactPhone||U.waId}),e.jsx("span",{"data-loc":"client/src/pages/WhatsApp.tsx:303",className:"text-[10px] text-muted-foreground shrink-0",children:kz(U.lastMessageAt)})]}),e.jsx("p",{"data-loc":"client/src/pages/WhatsApp.tsx:307",className:`text-xs truncate mt-0.5 ${U.unreadCount>0?"text-foreground/70 font-medium":"text-muted-foreground"}`,children:U.lastMessagePreview||"Sem mensagens"}),U.cardName&&e.jsx("span",{"data-loc":"client/src/pages/WhatsApp.tsx:311",className:"text-[10px] text-primary/70 truncate block mt-0.5",children:U.cardName})]})]},U.id)})})})]}),R?e.jsxs("div",{"data-loc":"client/src/pages/WhatsApp.tsx:326",className:"flex flex-col flex-1 min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/pages/WhatsApp.tsx:328",className:"flex items-center justify-between px-5 py-3 border-b border-border bg-card shrink-0",children:[e.jsxs("div",{"data-loc":"client/src/pages/WhatsApp.tsx:329",className:"flex items-center gap-3",children:[e.jsx("div",{"data-loc":"client/src/pages/WhatsApp.tsx:330",className:"h-9 w-9 rounded-full bg-muted flex items-center justify-center text-sm font-semibold",children:a2(R.contactName,R.contactPhone)}),e.jsxs("div",{"data-loc":"client/src/pages/WhatsApp.tsx:333",children:[e.jsx("p",{"data-loc":"client/src/pages/WhatsApp.tsx:334",className:"text-sm font-semibold text-foreground",children:R.contactName||R.contactPhone||R.waId}),e.jsxs("div",{"data-loc":"client/src/pages/WhatsApp.tsx:337",className:"flex items-center gap-2",children:[e.jsxs("p",{"data-loc":"client/src/pages/WhatsApp.tsx:338",className:"text-xs text-muted-foreground",children:["+",R.waId]}),R.cardName&&e.jsx("span",{"data-loc":"client/src/pages/WhatsApp.tsx:340",className:"text-[10px] text-primary/80 bg-primary/10 px-1.5 py-0.5 rounded",children:R.cardName}),z&&e.jsx("span",{"data-loc":"client/src/pages/WhatsApp.tsx:345",className:"text-[10px] text-amber-500 bg-amber-500/10 px-1.5 py-0.5 rounded",children:"Janela 24h expirada"})]})]})]}),e.jsx("div",{"data-loc":"client/src/pages/WhatsApp.tsx:352",className:"flex items-center gap-2",children:R.status==="open"&&e.jsxs(oe,{"data-loc":"client/src/pages/WhatsApp.tsx:354",variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>D.mutate({conversationId:R.id}),children:[e.jsx(va,{"data-loc":"client/src/pages/WhatsApp.tsx:360",className:"h-3 w-3 mr-1"}),"Encerrar"]})})]}),e.jsx(t2,{"data-loc":"client/src/pages/WhatsApp.tsx:368",className:"flex-1 px-5 py-4",children:e.jsxs("div",{"data-loc":"client/src/pages/WhatsApp.tsx:369",className:"flex flex-col gap-2 max-w-3xl mx-auto",children:[I.length===0?e.jsxs("div",{"data-loc":"client/src/pages/WhatsApp.tsx:371",className:"flex flex-col items-center justify-center py-16 text-muted-foreground gap-2",children:[e.jsx(Xr,{"data-loc":"client/src/pages/WhatsApp.tsx:372",className:"h-8 w-8 op
695acity-30"}),e.jsx("p",{"data-loc":"client/src/pages/WhatsApp.tsx:373",className:"text-sm",children:"Nenhuma mensagem ainda"})]}):I.map(U=>{const B=U.direction==="outbound";return e.jsx("div",{"data-loc":"client/src/pages/WhatsApp.tsx:379",className:`flex ${B?"justify-end":"justify-start"}`,children:e.jsxs("div",{"data-loc":"client/src/pages/WhatsApp.tsx:383",className:`max-w-[70%] rounded-2xl px-3.5 py-2.5 text-sm ${B?"bg-primary text-primary-foreground rounded-br-sm":"bg-card border border-border text-foreground rounded-bl-sm"}`,children:[B&&U.senderName&&e.jsx("p",{"data-loc":"client/src/pages/WhatsApp.tsx:392",className:"text-[10px] font-medium opacity-70 mb-1",children:U.senderName}),e.jsx("p",{"data-loc":"client/src/pages/WhatsApp.tsx:397",className:"whitespace-pre-wrap leading-relaxed",children:U.body||`[${U.type}]`}),e.jsxs("div",{"data-loc":"client/src/pages/WhatsApp.tsx:401",className:`flex items-center gap-1 mt-1 ${B?"justify-end":"justify-start"}`,children:[e.jsx("span",{"data-loc":"client/src/pages/WhatsApp.tsx:402",className:"text-[10px] opacity-60",children:Rz(U.metaTimestamp||U.createdAt)}),B&&e.jsx(_z,{"data-loc":"client/src/pages/WhatsApp.tsx:405",status:U.status})]})]})},U.id)}),e.jsx("div",{"data-loc":"client/src/pages/WhatsApp.tsx:412",ref:u})]})}),e.jsxs("div",{"data-loc":"client/src/pages/WhatsApp.tsx:417",className:"px-5 py-3 border-t border-border bg-card shrink-0",children:[z?e.jsxs("div",{"data-loc":"client/src/pages/WhatsApp.tsx:419",className:"flex items-center gap-2 p-3 bg-amber-500/10 border border-amber-500/20 rounded-lg text-sm text-amber-500",children:[e.jsx(ms,{"data-loc":"client/src/pages/WhatsApp.tsx:420",className:"h-4 w-4 shrink-0"}),e.jsx("span",{"data-loc":"client/src/pages/WhatsApp.tsx:421",children:"A janela de 24h expirou. Você só pode enviar mensagens usando um template aprovado pela Meta."})]}):e.jsxs("div",{"data-loc":"client/src/pages/WhatsApp.tsx:426",className:"flex items-center gap-2",children:[e.jsx(ge,{"data-loc":"client/src/pages/WhatsApp.tsx:427",ref:x,value:r,onChange:U=>l(U.target.value),onKeyDown:_,placeholder:"Digite uma mensagem...",className:"flex-1 bg-background border-border text-sm h-10",disabled:N.isPending||R.status==="closed",maxLength:4096}),e.jsx(oe,{"data-loc":"client/src/pages/WhatsApp.tsx:437",size:"icon",className:"h-10 w-10 shrink-0",onClick:A,disabled:!r.trim()||N.isPending||R.status==="closed",children:N.isPending?e.jsx(ur,{"data-loc":"client/src/pages/WhatsApp.tsx:444",className:"h-4 w-4 animate-spin"}):e.jsx(kM,{"data-loc":"client/src/pages/WhatsApp.tsx:446",className:"h-4 w-4"})})]}),R.status==="closed"&&e.jsx("p",{"data-loc":"client/src/pages/WhatsApp.tsx:452",className:"text-xs text-muted-foreground mt-1.5 text-center",children:"Conversa encerrada"})]})]}):e.jsxs("div",{"data-loc":"client/src/pages/WhatsApp.tsx:460",className:"flex-1 flex flex-col items-center justify-center text-muted-foreground gap-4",children:[e.jsx("div",{"data-loc":"client/src/pages/WhatsApp.tsx:461",className:"h-16 w-16 rounded-full bg-muted/50 flex items-center justify-center",children:e.jsx(Xr,{"data-loc":"client/src/pages/WhatsApp.tsx:462",className:"h-8 w-8 opacity-40"})}),e.jsxs("div",{"data-loc":"client/src/pages/WhatsApp.tsx:464",className:"text-center",children:[e.jsx("p",{"data-loc":"client/src/pages/WhatsApp.tsx:465",className:"text-sm font-medium text-foreground/60",children:"Selecione uma conversa"}),e.jsx("p",{"data-loc":"client/src/pages/WhatsApp.tsx:466",className:"text-xs mt-1 opacity-60",children:"Mensagens recebidas no número +55 47 3170-4710"})]}),p?.configured&&!p?.connected&&e.jsxs("div",{"data-loc":"client/src/pages/WhatsApp.tsx:471",className:"flex items-center gap-2 text-xs text-destructive bg-destructive/10 px-3 py-2 rounded-lg",children:[e.jsx(Ky,{"data-loc":"client/src/pages/WhatsApp.tsx:472",className:"h-3.5 w-3.5"}),"WhatsApp desconectado â verifique o token de acesso"]}),!p?.configured&&e.jsxs("div",{"data-loc":"client/src/pages/WhatsApp.tsx:477",className:"flex items-center gap-2 text-xs text-amber-500 bg-amber-500/10 px-3 py-2 rounded-lg",children:[e.jsx(ms,{"data-loc":"client/src/pages/WhatsApp.tsx:478",className:"h-3.5 w-3.5"}),"Configure o webhook no painel Meta Developers"]})]})]})}function Pz({items:t,onReorder:s,onRemove:r}){const[l,c]=f.useState(null),[d,u]=f.useState(null),x=b=>c(b),p=(b,v)=>{b.preventDefault(),u(v)},g=b=>{if(l===null||l===b){c(null),u(null);return}const v=[...t],[y]=v.splice(l,1);v.splice(b,0,y),s(v.map((j,S)=>({...j,position:S}
695))),c(null),u(null)};return e.jsxs("div",{"data-loc":"client/src/pages/RoletaAdmin.tsx:45",className:"space-y-1",children:[t.map((b,v)=>e.jsxs("div",{"data-loc":"client/src/pages/RoletaAdmin.tsx:47",draggable:!0,onDragStart:()=>x(v),onDragOver:y=>p(y,v),onDrop:()=>g(v),onDragEnd:()=>{c(null),u(null)},className:Me("flex items-center gap-3 px-3 py-2 rounded-lg border cursor-grab active:cursor-grabbing transition-all","bg-card border-border",l===v&&"opacity-40",d===v&&l!==v&&"border-primary bg-primary/5"),children:[e.jsx("span",{"data-loc":"client/src/pages/RoletaAdmin.tsx:61",className:"text-muted-foreground cursor-grab",children:e.jsx(Vi,{"data-loc":"client/src/pages/RoletaAdmin.tsx:61",size:14})}),e.jsx("span",{"data-loc":"client/src/pages/RoletaAdmin.tsx:62",className:"w-6 h-6 rounded-full bg-muted flex items-center justify-center text-xs font-bold text-primary",children:v+1}),e.jsx("div",{"data-loc":"client/src/pages/RoletaAdmin.tsx:65",className:"flex-1 min-w-0",children:e.jsx("p",{"data-loc":"client/src/pages/RoletaAdmin.tsx:66",className:"text-sm font-medium text-foreground truncate",children:b.name??`Usuário ${b.userId}`})}),e.jsx("button",{"data-loc":"client/src/pages/RoletaAdmin.tsx:68",onClick:()=>r(b.userId),className:"text-muted-foreground hover:text-red-400 transition-colors p-1",children:e.jsx(va,{"data-loc":"client/src/pages/RoletaAdmin.tsx:72",size:14})})]},b.userId)),t.length===0&&e.jsx("div",{"data-loc":"client/src/pages/RoletaAdmin.tsx:77",className:"text-center py-8 text-muted-foreground text-sm border border-dashed border-border rounded-lg",children:"Arraste atendentes do painel esquerdo para a roleta"})]})}function zz(){const{user:t}=ka(),[,s]=fs(),{canEditPage:r}=Kx(),l=r("/roleta");if(t?.role!=="admin"&&t?.role!=="gerente")return e.jsxs("div",{"data-loc":"client/src/pages/RoletaAdmin.tsx:94",className:"flex items-center justify-center h-64 text-muted-foreground",children:[e.jsx(ms,{"data-loc":"client/src/pages/RoletaAdmin.tsx:95",className:"mr-2",size:20}),"Acesso restrito a administradores"]});const[c,d]=f.useState(null),[u,x]=f.useState(null),[p,g]=f.useState(""),[b,v]=f.useState(!1),y=Y.useUtils(),{data:j=[],isLoading:S}=Y.roleta.listGroups.useQuery(),{data:N,isLoading:w}=Y.roleta.getGroupDetails.useQuery({groupId:c},{enabled:!!c}),{data:D=[]}=Y.users.list.useQuery(),{data:k=[]}=Y.leadCampaigns.listCampaigns.useQuery(),A=Y.roleta.createGroup.useMutation({onSuccess:()=>{y.roleta.listGroups.invalidate(),g(""),v(!1),ce.success("Grupo criado!")},onError:()=>ce.error("Erro ao criar grupo")}),_=Y.roleta.updateGroup.useMutation({onSuccess:()=>{y.roleta.listGroups.invalidate(),x(null),ce.success("Grupo atualizado!")},onError:()=>ce.error("Erro ao atualizar grupo")}),E=Y.roleta.deleteGroup.useMutation({onSuccess:()=>{y.roleta.listGroups.invalidate(),d(null),ce.success("Grupo excluÃdo!")},onError:()=>ce.error("Erro ao excluir grupo")}),I=Y.roleta.setGroupMembers.useMutation({onSuccess:()=>{y.roleta.getGroupDetails.invalidate(),ce.success("Membros atualizados!")},onError:()=>ce.error("Erro ao atualizar membros")}),R=Y.roleta.setGroupSlots.useMutation({onSuccess:()=>{y.roleta.getGroupDetails.invalidate(),ce.success("Roleta salva!")},onError:()=>ce.error("Erro ao salvar roleta")}),z=Y.roleta.setGroupCampaigns.useMutation({onSuccess:()=>{y.roleta.getGroupDetails.invalidate(),ce.success("Campanhas vinculadas!")},onError:()=>ce.error("Erro ao vincular campanhas")}),U=Y.roleta.processQueue.useMutation({onSuccess:()=>ce.success("Fila processada!"),onError:()=>ce.error("Erro ao processar fila")}),[B,F]=f.useState([]),V=B.length>0?B:N?.slots??[],de=N?.members??[],le=N?.campaigns??[],xe=de.map(H=>H.userId),M=V.map(H=>H.userId),O=D.filter(H=>(H.role==="corretor"||H.role==="gerente")&&H.active!==0),T=de.filter(H=>!M.includes(H.userId));function K(H){const te=[...V,{...H,position:V.length}];F(te)}function ve(H){const te=V.filter(pe=>pe.userId!==H).map((pe,ae)=>({...pe,position:ae}));F(te)}function P(){c&&(R.mutate({groupId:c,slots:V.map(H=>({userId:H.userId,position:H.position}))}),F([]))}function J(H){if(!c)return;const te=xe.includes(H)?xe.filter(pe=>pe!==H):[...xe,H];I.mutate({groupId:c,userIds:te})}function W(H){if(!c)return;const te=le.map(ae=>ae.campaignId),pe=te.includes(H)?te.filter(ae=>ae!==H):[...te,H];z.mutate({groupId:c,campaignIds:pe})}return e.jsxs("div",{"data-loc":"client/src/pages/RoletaAdmin.tsx:204",className:"flex h-full min-h-screen bg-background",children:[e.jsxs("div",{"data-loc":"client/src/pages/RoletaAdmin.tsx:206",className:"w-72 border-r border-border flex flex-col",children:[e.jsxs("div",{"data-loc":"client/src/pages/RoletaAdmin.tsx:207",className:"p-4 border-b border-border",children:[e.jsxs("div",{"data-loc":"client/src/pages/RoletaAdmin.tsx:208",className:"flex items-center gap-2 mb-3",children:[e.jsx("button",{"data-loc":"client/src/pages/RoletaAdmin.tsx:209",onClick:()=>s("/"),className:"text-muted-foreground hover:text-foreground transition-colors",children:e.jsx(Fl,{"data-loc":"client/src/pages/RoletaAdmin.tsx:210",size:16})}),e.jsx("h2",{"data-loc":"client/src/pages/RoletaAdmin.tsx:212",className:"text-base font-semibold text-foreground",children:"Roleta de Leads"})]}),e.jsx("p",{"data-loc":"client/src/pages/RoletaAdmin.tsx:214",className:"text-xs text-muted-foreground mb-3",children:"Configure grupos de distribuição automática de leads"}),l&&e.jsxs(oe,{"data-loc":"client/src/pages/RoletaAdmin.tsx:216",size:"sm",className:"w-full bg-primary hover:bg-primary/90 text-primary-foreground font-medium",onClick:()=>v(!0),children:[e.jsx(Jt,{"data-loc":"client/src/pages/RoletaAdmin.tsx:221",size:14,className:"mr-1"})," Novo Grupo"]})]}),b&&e.jsxs("div",{"data-loc":"client/src/pages/RoletaAdmin.tsx:228",className:"p-3 border-b border-border bg-card",children:[e.jsx(ge,{"data-loc":"client/src/pages/RoletaAdmin.tsx:229",value:p,onChange:H=>g(H.target.value),placeholder:"Nome do grupo...",className:"mb-2 text-sm h-8",autoFocus:!0,onKeyDown:H=>{H.key==="Enter"&&p.trim()&&A.mutate({name:p.trim()}),H.key==="Escape"&&(v(!1),g(""))}}),e.jsxs("div",{"data-loc":"client/src/pages/RoletaAdmin.tsx:240",className:"flex gap-2",children:[e.jsxs(oe,{"data-loc":"client/src/pages/RoletaAdmin.tsx:241",size:"sm",className:"flex-1 h-7 bg-primary hover:bg-primary/90 text-primary-foreground text-xs",onClick:()=>p.trim()&&A.mutate({name:p.trim()}),disabled:!p.trim()||A.isPending,children:[e.jsx(Ya,{"data-loc":"client/src/pages/RoletaAdmin.tsx:245",size:12,className:"mr-1"})," Criar"]}),e.jsx(oe,{"data-loc":"client/src/pages/RoletaAdmin.tsx:247",size:"sm",variant:"ghost",className:"h-7 text-xs text-muted-foreground",onClick:()=>{v(!1),g("")},children:e.jsx(va,{"data-loc":"client/src/pages/RoletaAdmin.tsx:250",size:12})})]})]}),e.jsx("div",{"data-loc":"client/src/pages/RoletaAdmin.tsx:257",className:"flex-1 overflow-y-auto p-2 space-y-1",children:S?e.jsx("div",{"data-loc":"client/src/pages/RoletaAdmin.tsx:259",className:"text-center py-8 text-muted-foreground text-sm",children:"Carregando..."}):j.length===0?e.jsx("div",{"data-loc":"client/src/pages/RoletaAdmin.tsx:261",className:"text-center py-8 text-muted-foreground text-sm",children:"Nenhum grupo criado"}):j.map(H=>e.jsxs("div",{"data-loc":"client/src/pages/RoletaAdmin.tsx:264",className:Me("flex items-center gap-2 px-3 py-2 rounded-lg cursor-pointer transition-all group",c===H.id?"bg-primary/10 border border-primary/30":"hover:bg-muted/50 border border-transparent"),onClick:()=>{d(H.id),F([])},children:[u?.id===H.id?e.jsx(ge,{"data-loc":"client/src/pages/RoletaAdmin.tsx:275",value:u?.name??"",onChange:te=>x(u?{...u,name:te.target.value}:null),className:"h-6 text-xs border-primary flex-1",autoFocus:!0,onClick:te=>te.stopPropagation(),onKeyDown:te=>{te.key==="Enter"&&u&&_.mutate({id:H.id,name:u.name}),te.key==="Escape"&&x(null)}}):e.jsx("span",{"data-loc":"client/src/pages/RoletaAdmin.tsx:287",className:"flex-1 text-sm font-medium text-foreground truncate",children:H.name}),H.active===0&&e.jsx(Qt,{"data-loc":"client/src/pages/RoletaAdmin.tsx:289",variant:"outline",className:"text-[10px] text-muted-foreground",children:"Inativo"}),e.jsxs("div",{"data-loc":"client/src/pages/RoletaAdmin.tsx:290",className:"flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[e.jsx("button",{"data-loc":"client/src/pages/RoletaAdmin.tsx:291",className:"text-muted-foreground hover:text-primary p-0.5",onClick:te=>{te.stopPropagation(),x({id:H.id,name:H.name})},children:e.jsx(iC,{"data-loc":"client/src/pages/RoletaAdmin.tsx:295",size:12})}),e.jsx("button",{"data-loc":"client/src/pages/RoletaAdmin.tsx:297",className:"text-muted-foreground hover:text-red-400 p-0.5",onClick:te=>{te.stopPropagation(),confirm(`Excluir o grupo "${H.name}"?`)&&E.mutate({id:H.id})},children:e.jsx(Ba,{"data-loc":"client/src/pages/RoletaAdmin.tsx:304",size:12})})]}),e.jsx(Ia,{"data-loc":"client/src/pages/RoletaAdmin.tsx:307",size:12,className:Me("text-muted-foreground transition-transform",c===H.id&&"rotate-90 text-primary")})]},H.id))}),e.jsx("div",{"data-loc":"client/src/pages/RoletaAdmin.tsx:314",className:"p-3 border-t border-border",children:e.jsxs(oe,{"data-loc":"client/src/pages/RoletaAdmin.tsx:315",size:"sm",variant:"outline",className:"w-full text-xs",onClick:()=>U.mutate(),disabled:U.isPending,children:[e.jsx(MM,{"data-loc":"client/src/pages/RoletaAdmin.tsx:322",size:12,className:"mr-1"}),U.isPending?"Processando...":"Processar Fila Agora"]})})]}),c&&N?e.jsx("div",{"data-loc":"client/src/pages/RoletaAdmin.tsx:330",className:"flex-1 overflow-y-auto p-6",children:e.jsxs("div",{"data-loc":"client/src/pages/RoletaAdmin.tsx:331",className:"max-w-5xl mx-auto",children:[e.jsxs("div",{"data-loc":"client/src/pages/RoletaAdmin.tsx:332",className:"flex items-center gap-3 mb-6",children:[e.jsx(ki,{"data-loc":"client/src/pages/RoletaAdmin.tsx:333",size:20,className:"text-primary"}),e.jsx("h1",{"data-loc":"client/src/pages/RoletaAdmin.tsx:334",className:"text-xl font-semibold text-foreground",children:N.group?.name}),e.jsxs(Qt,{"data-loc":"client/src/pages/RoletaAdmin.tsx:335",className:"bg-primary/10 text-primary border-primary/30 text-xs",children:["Posição atual: ",(N.currentPosition??0)+1]})]}),e.jsxs("div",{"data-loc":"client/src/pages/RoletaAdmin.tsx:340",className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/RoletaAdmin.tsx:342",className:"bg-card border border-border rounded-xl p-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/RoletaAdmin.tsx:343",className:"flex items-center gap-2 mb-4",children:[e.jsx(Ys,{"data-loc":"client/src/pages/RoletaAdmin.tsx:344",size:16,className:"text-primary"}),e.jsx("h3",{"data-loc":"client/src/pages/RoletaAdmin.tsx:345",className:"text-sm font-semibold text-foreground",children:"Membros do Grupo"}),e.jsx(Qt,{"data-loc":"client/src/pages/RoletaAdmin.tsx:346",className:"ml-auto bg-muted text-muted-foreground text-xs",children:de.length})]}),e.jsx("p",{"data-loc":"client/src/pages/RoletaAdmin.tsx:348",className:"text-xs text-muted-foreground mb-3",children:"Selecione os atendentes elegÃveis para este grupo:"}),e.jsx("div",{"data-loc":"client/src/pages/RoletaAdmin.tsx:349",className:"space-y-1 max-h-80 overflow-y-auto",children:O.map(H=>{const te=xe.includes(H.id);return e.jsxs("button",{"data-loc":"client/src/pages/RoletaAdmin.tsx:353",onClick:()=>J(H.id),className:Me("w-full flex items-center gap-2 px-3 py-2 rounded-lg text-left transition-all text-sm",te?"bg-primary/10 border border-primary/30 text-foreground":"border border-transparent hover:bg-muted/50 text-muted-foreground"),children:[e.jsx("div",{"data-loc":"client/src/pages/RoletaAdmin.tsx:363",className:Me("w-4 h-4 rounded border flex items-center justify-center flex-shrink-0",te?"bg-primary border-primary":"border-border"),children:te&&e.jsx(Ya,{"data-loc":"client/src/pages/RoletaAdmin.tsx:366",size:10,
695className:"text-primary-foreground"})}),e.jsx("span",{"data-loc":"client/src/pages/RoletaAdmin.tsx:368",className:"truncate",children:H.name})]},H.id)})})]}),e.jsxs("div",{"data-loc":"client/src/pages/RoletaAdmin.tsx:376",className:"bg-card border border-border rounded-xl p-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/RoletaAdmin.tsx:377",className:"flex items-center gap-2 mb-4",children:[e.jsx(rc,{"data-loc":"client/src/pages/RoletaAdmin.tsx:378",size:16,className:"text-primary"}),e.jsx("h3",{"data-loc":"client/src/pages/RoletaAdmin.tsx:379",className:"text-sm font-semibold text-foreground",children:"Roleta de Distribuição"}),e.jsx(Qt,{"data-loc":"client/src/pages/RoletaAdmin.tsx:380",className:"ml-auto bg-muted text-muted-foreground text-xs",children:V.length})]}),e.jsx("p",{"data-loc":"client/src/pages/RoletaAdmin.tsx:382",className:"text-xs text-muted-foreground mb-3",children:"Arraste para reordenar. Clique em + para adicionar da lista de membros:"}),T.length>0&&e.jsx("div",{"data-loc":"client/src/pages/RoletaAdmin.tsx:386",className:"mb-3 flex flex-wrap gap-1",children:T.map(H=>e.jsxs("button",{"data-loc":"client/src/pages/RoletaAdmin.tsx:388",onClick:()=>K(H),className:"flex items-center gap-1 px-2 py-1 rounded-md bg-muted hover:bg-primary/10 hover:border-primary/30 border border-border text-xs text-muted-foreground hover:text-primary transition-all",children:[e.jsx(Jt,{"data-loc":"client/src/pages/RoletaAdmin.tsx:393",size:10})," ",H.name??`Usuário ${H.userId}`]},H.userId))}),e.jsx(Pz,{"data-loc":"client/src/pages/RoletaAdmin.tsx:399",items:V,onReorder:F,onRemove:ve}),e.jsxs(oe,{"data-loc":"client/src/pages/RoletaAdmin.tsx:405",size:"sm",className:"w-full mt-3 bg-primary hover:bg-primary/90 text-primary-foreground text-xs font-medium",onClick:P,disabled:R.isPending,children:[e.jsx(Ya,{"data-loc":"client/src/pages/RoletaAdmin.tsx:411",size:12,className:"mr-1"}),R.isPending?"Salvando...":"Salvar Roleta"]})]}),e.jsxs("div",{"data-loc":"client/src/pages/RoletaAdmin.tsx:417",className:"bg-card border border-border rounded-xl p-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/RoletaAdmin.tsx:418",className:"flex items-center gap-2 mb-4",children:[e.jsx(cC,{"data-loc":"client/src/pages/RoletaAdmin.tsx:419",size:16,className:"text-primary"}),e.jsx("h3",{"data-loc":"client/src/pages/RoletaAdmin.tsx:420",className:"text-sm font-semibold text-foreground",children:"Campanhas Vinculadas"}),e.jsx(Qt,{"data-loc":"client/src/pages/RoletaAdmin.tsx:421",className:"ml-auto bg-muted text-muted-foreground text-xs",children:le.length})]}),e.jsx("p",{"data-loc":"client/src/pages/RoletaAdmin.tsx:423",className:"text-xs text-muted-foreground mb-3",children:"Leads dessas campanhas serão distribuÃdos por este grupo:"}),e.jsxs("div",{"data-loc":"client/src/pages/RoletaAdmin.tsx:424",className:"space-y-1 max-h-80 overflow-y-auto",children:[k.filter(H=>!H.archived).map(H=>{const te=le.some(pe=>pe.campaignId===H.id);return e.jsxs("button",{"data-loc":"client/src/pages/RoletaAdmin.tsx:428",onClick:()=>W(H.id),className:Me("w-full flex items-center gap-2 px-3 py-2 rounded-lg text-left transition-all text-sm",te?"bg-primary/10 border border-primary/30 text-foreground":"border border-transparent hover:bg-muted/50 text-muted-foreground"),children:[e.jsx("div",{"data-loc":"client/src/pages/RoletaAdmin.tsx:438",className:Me("w-4 h-4 rounded border flex items-center justify-center flex-shrink-0",te?"bg-primary border-primary":"border-border"),children:te&&e.jsx(Ya,{"data-loc":"client/src/pages/RoletaAdmin.tsx:441",size:10,className:"text-primary-foreground"})}),e.jsx("span",{"data-loc":"client/src/pages/RoletaAdmin.tsx:443",className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:H.color??"#C9A96E"}}),e.jsx("span",{"data-loc":"client/src/pages/RoletaAdmin.tsx:447",className:"truncate",children:H.name})]},H.id)}),k.filter(H=>!H.archived).length===0&&e.jsx("p",{"data-loc":"client/src/pages/RoletaAdmin.tsx:452",className:"text-xs text-muted-foreground text-center py-4",children:"Nenhuma campanha cadastrada"})]})]})]})]})}):e.jsx("div",{"data-loc":"client/src/pages/RoletaAdmin.tsx:460",className:"flex-1 flex items-center justify-center",children:e.jsxs("div",{"data-loc":"client/src/pages/RoletaAdmin.tsx:461",className:"text-center text-muted-foreground",children:[e.jsx(rc,{"data-loc":"client/src/pages/RoletaAdmin.tsx:462",size:40,className:"mx-auto mb-3 opacity-30"}),e.jsx("p",{"data-loc":"client/src/pages/RoletaAdmin.tsx:463",className:"text-sm",children:"Selecione um grupo para configurar"})]})})]})}function Uz(t){if(!t)return{text:"â",urgent:!1};const s=t-Date.now();if(s<=0)return{text:"Expirado",urgent:!0};const r=Math.floor(s/6e4),l=Math.floor(s%6e4/1e3);return{text:`${r}:${l.toString().padStart(2,"0")}`,urgent:s<6e4}}function Iz(){const[,t]=fs(),s=Y.useUtils(),{data:r=[],isLoading:l,refetch:c}=Y.roleta.getMyQueue.useQuery(void 0,{refetchInterval:15e3}),d=Y.roleta.captureQueueItem.useMutation({onSuccess:u=>{ce.success("Lead capturado! Redirecionando para a campanha..."),s.roleta.getMyQueue.invali
695date(),setTimeout(()=>{t(`/campanhas?campaignId=${u.campaignId}&cardId=${u.cardId}`)},1500)},onError:u=>{ce.error(u.message??"Erro ao capturar lead"),s.roleta.getMyQueue.invalidate()}});return e.jsx("div",{"data-loc":"client/src/pages/MinhaFila.tsx:49",className:"min-h-screen bg-background p-6",children:e.jsxs("div",{"data-loc":"client/src/pages/MinhaFila.tsx:50",className:"max-w-2xl mx-auto",children:[e.jsxs("div",{"data-loc":"client/src/pages/MinhaFila.tsx:52",className:"flex items-center justify-between mb-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/MinhaFila.tsx:53",children:[e.jsxs("h1",{"data-loc":"client/src/pages/MinhaFila.tsx:54",className:"text-xl font-semibold text-foreground flex items-center gap-2",children:[e.jsx(lC,{"data-loc":"client/src/pages/MinhaFila.tsx:55",size:20,className:"text-primary"}),"Minha Fila de Leads"]}),e.jsx("p",{"data-loc":"client/src/pages/MinhaFila.tsx:58",className:"text-sm text-muted-foreground mt-1",children:"Leads distribuÃdos para você. Capture dentro do tempo limite."})]}),e.jsxs(oe,{"data-loc":"client/src/pages/MinhaFila.tsx:62",size:"sm",variant:"outline",onClick:()=>c(),children:[e.jsx(ur,{"data-loc":"client/src/pages/MinhaFila.tsx:67",size:14,className:"mr-1"}),"Atualizar"]})]}),l?e.jsxs("div",{"data-loc":"client/src/pages/MinhaFila.tsx:74",className:"text-center py-16 text-muted-foreground",children:[e.jsx(ur,{"data-loc":"client/src/pages/MinhaFila.tsx:75",size:24,className:"mx-auto mb-3 animate-spin opacity-50"}),e.jsx("p",{"data-loc":"client/src/pages/MinhaFila.tsx:76",className:"text-sm",children:"Carregando sua fila..."})]}):r.length===0?e.jsxs("div",{"data-loc":"client/src/pages/MinhaFila.tsx:79",className:"text-center py-16 text-muted-foreground",children:[e.jsx(Ka,{"data-loc":"client/src/pages/MinhaFila.tsx:80",size:40,className:"mx-auto mb-3 opacity-30 text-green-500"}),e.jsx("p",{"data-loc":"client/src/pages/MinhaFila.tsx:81",className:"text-base font-medium text-foreground",children:"Fila vazia!"}),e.jsx("p",{"data-loc":"client/src/pages/MinhaFila.tsx:82",className:"text-sm mt-1",children:"Nenhum lead aguardando sua captura no momento."})]}):e.jsx("div",{"data-loc":"client/src/pages/MinhaFila.tsx:85",className:"space-y-3",children:r.map(u=>{const x=Uz(u.expiresAt);return e.jsxs("div",{"data-loc":"client/src/pages/MinhaFila.tsx:89",className:Me("bg-card border rounded-xl p-4 transition-all",x.urgent?"border-red-500/40 shadow-[0_0_12px_rgba(239,68,68,0.1)]":"border-border"),children:[e.jsxs("div",{"data-loc":"client/src/pages/MinhaFila.tsx:96",className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/MinhaFila.tsx:97",className:"flex-1 min-w-0",children:[e.jsxs("div",{"data-loc":"client/src/pages/MinhaFila.tsx:99",className:"flex items-center gap-2 mb-1",children:[e.jsx("h3",{"data-loc":"client/src/pages/MinhaFila.tsx:100",className:"text-base font-semibold text-foreground truncate",children:u.cardName??"Lead sem nome"}),u.campaignName&&e.jsx(Qt,{"data-loc":"client/src/pages/MinhaFila.tsx:104",className:"text-[10px] flex-shrink-0",style:{backgroundColor:`${u.campaignColor??"#C9A96E"}20`,color:u.campaignColor??"#C9A96E",borderColor:`${u.campaignColor??"#C9A96E"}40`},children:u.campaignName})]}),e.jsxs("div",{"data-loc":"client/src/pages/MinhaFila.tsx:118",className:"flex items-center gap-4 text-xs text-muted-foreground mb-3",children:[u.cardPhone&&e.jsxs("span",{"data-loc":"client/src/pages/MinhaFila.tsx:120",className:"flex items-center gap-1",children:[e.jsx(hn,{"data-loc":"client/src/pages/MinhaFila.tsx:121",size:11})," ",u.cardPhone]}),u.cardEmail&&e.jsxs("span",{"data-loc":"client/src/pages/MinhaFila.tsx:125",className:"flex items-center gap-1",children:[e.jsx(mr,{"data-loc":"client/src/pages/MinhaFila.tsx:126",size:11})," ",u.cardEmail]}),u.cardSource&&e.jsx("span",{"data-loc":"client/src/pages/MinhaFila.tsx:130",className:"text-primary",children:u.cardSource})]}),e.jsxs("div",{"data-loc":"client/src/pages/MinhaFila.tsx:135",className:Me("flex items-center gap-1.5 text-xs font-medium",x.urgent?"text-red-400":"text-primary"),children:[e.jsx(Za,{"data-loc":"client/src/pages/MinhaFila.tsx:139",size:12}),x.urgent&&x.text!=="Expirado"?e.jsxs("span",{"data-loc":"client/src/pages/MinhaFila.tsx:141",className:"animate-pulse",children:["Urgente: ",x.text]}):e.jsxs("span",{"data-loc":"client/src/pages/MinhaFila.tsx:143",children:["Tempo restante: ",x.text]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/MinhaFila.tsx:149",className:"flex flex-col gap-2 flex-shrink-0",children:[e.jsx(oe,{"data-loc":"client/src/pages/MinhaFila.tsx:150",size:"sm",className:"bg-primary hover:bg-primary/90 text-primary-foreground font-semibold text-xs px-4",onClick:()=>d.mutate({queueId:u.id}),disabled:d.isPending||x.text==="Expirado",children:d.isPending?"Capturando...":"â Capturar Lead"}),e.jsxs(oe,{"data-loc":"client/src/pages/MinhaFila.tsx:158",size:"sm",variant:"ghost",className:"text-xs text-muted-foreground hover:text-foreground h-7",onClick:()=>t(`/campanhas?campaignId=${u.campaignId}&cardId=${u.cardId}`),children:[e.jsx(Gi,{"data-loc":"client/src/pages/MinhaFila.tsx:164",size:11,className:"mr-1"}),"Ver no Kanban"]})]})]}),x.text==="Expirado"&&e.jsxs("div",{"data-loc":"client/src/pages/MinhaFila.tsx:171",className:"mt-2 flex items-center gap-1.5 text-xs text-red-400 bg-red-500/10 rounded-lg px-3 py-1.5",children:[e.jsx(ms,{"data-loc":"client/src/pages/MinhaFila.tsx:172",size:12}),"Tempo expirado. Este lead será passado para o próximo atendente."]})]},u.id)})}),e.jsxs("div",{"data-loc":"client/src/pages/MinhaFila.tsx:183",className:"mt-6 p-4 bg-card border border-border rounded-xl",children:[e.jsx("h4",{"data-loc":"client/src/pages/MinhaFila.tsx:184",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide mb-2",children:"Como funciona"}),e.jsxs("ul",{"data-loc":"client/src/pages/MinhaFila.tsx:185",className:"text-xs text-muted-foreground space-y-1",children:[e.jsx("li",{"data-loc":"client/src/pages/MinhaFila.tsx:186",children:"⢠Quando um lead chega, ele é atribuÃdo ao próximo corretor da roleta"}),e.jsxs("li",{"data-loc":"client/src/pages/MinhaFila.tsx:187",children:["⢠Você tem ",e.jsx("strong",{"data-loc":"client/src/pages/MinhaFila.tsx:187",className:"text-primary",children:"5 minutos"})," para capturar o lead"]}),e.jsx("li",{"data-loc":"client/src/pages/MinhaFila.tsx:188",children:"⢠Se não capturar, o lead passa automaticamente para o próximo atendente"}),e.jsx("li",{"data-loc":"client/src/pages/MinhaFila.tsx:189",children:"⢠Ao capturar, o lead fica vinculado a você no Kanban da campanha"})]})]})]})})}function Bz(){const[t,s]=f.useState(""),[r,l]=f.useState(""),[c,d]=f.useState(!1),[u,x]=f.useState(""),p=Y.useUtils(),g=Y.auth.loginWithPassword.useMutation({onSuccess:async()=>
695{await p.auth.me.invalidate(),window.location.href="/"},onError:S=>{x(S.message||"E-mail ou senha incorretos")}}),b=t.includes("@")&&t.includes("."),v=r.length>=6,y=b&&v&&!g.isPending;function j(S){S.preventDefault(),y&&(x(""),g.mutate({email:t,password:r}))}return e.jsxs("div",{"data-loc":"client/src/pages/LoginPage.tsx:38",className:"min-h-screen flex items-center justify-center bg-background relative overflow-hidden",children:[e.jsx("div",{"data-loc":"client/src/pages/LoginPage.tsx:42",className:"absolute inset-0 opacity-[0.03]",style:{backgroundImage:"radial-gradient(circle at 25% 25%, #C9A96E 0%, transparent 50%), radial-gradient(circle at 75% 75%, #C9A96E 0%, transparent 50%)"}}),e.jsx("div",{"data-loc":"client/src/pages/LoginPage.tsx:51",className:"relative z-10 w-full max-w-sm mx-4",children:e.jsxs("div",{"data-loc":"client/src/pages/LoginPage.tsx:52",className:"rounded-2xl border border-border bg-card shadow-2xl overflow-hidden",style:{boxShadow:"0 0 60px rgba(201,169,110,0.06), 0 25px 50px rgba(0,0,0,0.6)"},children:[e.jsx("div",{"data-loc":"client/src/pages/LoginPage.tsx:57",className:"h-px w-full bg-gradient-to-r from-transparent via-[#C9A96E]/60 to-transparent"}),e.jsxs("div",{"data-loc":"client/src/pages/LoginPage.tsx:59",className:"px-8 pt-10 pb-10 flex flex-col items-center gap-8",children:[e.jsxs("div",{"data-loc":"client/src/pages/LoginPage.tsx:61",className:"flex flex-col items-center gap-4",children:[e.jsx("img",{"data-loc":"client/src/pages/LoginPage.tsx:62",src:"/logo-h2o.png",alt:"H2O Saúde",className:"w-44 h-auto object-contain",style:{filter:"drop-shadow(0 4px 20px rgba(180,180,200,0.30))"}}),e.jsxs("div",{"data-loc":"client/src/pages/LoginPage.tsx:68",className:"text-center",children:[e.jsx("h1",{"data-loc":"client/src/pages/LoginPage.tsx:69",className:"text-xl font-semibold tracking-tight text-foreground",children:"CRM H2O"}),e.jsx("p",{"data-loc":"client/src/pages/LoginPage.tsx:72",className:"text-xs text-foreground/40 mt-1 tracking-widest uppercase",children:"Sistema interno de gestão"})]})]}),e.jsx("div",{"data-loc":"client/src/pages/LoginPage.tsx:79",className:"w-full h-px bg-border"}),e.jsxs("form",{"data-loc":"client/src/pages/LoginPage.tsx:82",onSubmit:j,className:"w-full flex flex-col gap-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/LoginPage.tsx:84",className:"flex flex-col gap-1.5",children:[e.jsx("label",{"data-loc":"client/src/pages/LoginPage.tsx:85",className:"text-xs font-medium text-foreground/60 tracking-wide uppercase",children:"E-mail"}),e.jsxs("div",{"data-loc":"client/src/pages/LoginPage.tsx:88",className:"relative",children:[e.jsx(mr,{"data-loc":"client/src/pages/LoginPage.tsx:89",className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-foreground/30"}),e.jsx(ge,{"data-loc":"client/src/pages/LoginPage.tsx:90",type:"text",inputMode:"email",value:t,onChange:S=>{s(S.target.value),x("")},placeholder:"[email protected]",autoComplete:"email",autoFocus:!0,className:"pl-9 bg-background border-border text-foreground placeholder:text-foreground/20 focus:border-primary/60 focus:ring-0 h-10 rounded-lg transition-colors"})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/LoginPage.tsx:104",className:"flex flex-col gap-1.5",children:[e.jsx("label",{"data-loc":"client/src/pages/LoginPage.tsx:105",className:"text-xs font-medium text-foreground/60 tracking-wide uppercase",children:"Senha"}),e.jsxs("div",{"data-loc":"client/src/pages/LoginPage.tsx:108",className:"relative",children:[e.jsx(SM,{"data-loc":"client/src/pages/LoginPage.tsx:109",className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-foreground/30"}),e.jsx(ge,{"data-loc":"client/src/pages/LoginPage.tsx:110",type:c?"text":"password",value:r,onChange:S=>{l(S.target.value),x("")},placeholder:"MÃnimo 6 caracteres",autoComplete:"current-password",className:"pl-9 pr-10 bg-background border-border text-foreground placeholder:text-foreground/20 focus:border-primary/60 focus:ring-0 h-10 rounded-lg transition-colors"}),e.jsx("button",{"data-loc":"client/src/pages/LoginPage.tsx:118",type:"button",onClick:()=>d(S=>!S),className:"absolute right-3 top-1/2 -translate-y-1/2 text-foreground
695/30 hover:text-foreground/60 transition-colors",tabIndex:-1,children:c?e.jsx(rC,{"data-loc":"client/src/pages/LoginPage.tsx:124",className:"w-4 h-4"}):e.jsx(_x,{"data-loc":"client/src/pages/LoginPage.tsx:124",className:"w-4 h-4"})})]})]}),u&&e.jsxs("div",{"data-loc":"client/src/pages/LoginPage.tsx:131",className:"flex items-start gap-2 rounded-lg bg-red-500/10 border border-red-500/20 px-3 py-2.5",children:[e.jsx(ms,{"data-loc":"client/src/pages/LoginPage.tsx:132",className:"w-4 h-4 text-red-400 mt-0.5 shrink-0"}),e.jsx("p",{"data-loc":"client/src/pages/LoginPage.tsx:133",className:"text-xs text-red-400 leading-relaxed",children:u})]}),e.jsx(oe,{"data-loc":"client/src/pages/LoginPage.tsx:138",type:"submit",disabled:!y,className:"w-full h-10 mt-1 rounded-lg font-medium text-sm tracking-wide transition-all disabled:opacity-40",style:{background:y?"linear-gradient(135deg, #C9A96E 0%, #b8935a 100%)":void 0,color:y?"#0A0A0B":void 0},children:g.isPending?e.jsxs("span",{"data-loc":"client/src/pages/LoginPage.tsx:150",className:"flex items-center gap-2",children:[e.jsxs("svg",{"data-loc":"client/src/pages/LoginPage.tsx:151",className:"animate-spin w-4 h-4",viewBox:"0 0 24 24",fill:"none",children:[e.jsx("circle",{"data-loc":"client/src/pages/LoginPage.tsx:152",className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{"data-loc":"client/src/pages/LoginPage.tsx:153",className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8z"})]}),"Entrando..."]}):"Entrar"})]}),e.jsxs("p",{"data-loc":"client/src/pages/LoginPage.tsx:164",className:"text-[10px] text-foreground/20 text-center leading-relaxed",children:["Acesso restrito a colaboradores.",e.jsx("br",{"data-loc":"client/src/pages/LoginPage.tsx:165"}),"Em caso de problemas, contate o administrador."]})]}),e.jsx("div",{"data-loc":"client/src/pages/LoginPage.tsx:171",className:"h-px w-full bg-gradient-to-r from-transparent via-[#C9A96E]/20 to-transparent"})]})})]})}function Ss({children:t,allowedRoles:s}){const{user:r,loading:l}=ka();return l||!r?null:s&&!s.includes(r.role)?e.jsx(iL,{"data-loc":"client/src/App.tsx:36",to:"/clientes"}):e.jsx(e.Fragment,{children:t})}const on=["admin","gerente"];function Fz(){return e.jsxs(aj,{"data-loc":"client/src/App.tsx:44",children:[e.jsx($t,{"data-loc":"client/src/App.tsx:46",path:"/login",component:Bz}),e.jsx($t,{"data-loc":"client/src/App.tsx:48",children:e.jsx(Cw,{"data-loc":"client/src/App.tsx:49",children:e.jsxs(aj,{"data-loc":"client/src/App.tsx:50",children:[e.jsx($t,{"data-loc":"client/src/App.tsx:51",path:"/",component:GR}),e.jsx($t,{"data-loc":"client/src/App.tsx:52",path:"/leads",children:()=>e.jsx(Ss,{"data-loc":"client/src/App.tsx:52",allowedRoles:on,children:e.jsx(uT,{"data-loc":"client/src/App.tsx:52"})})}),e.jsx($t,{"data-loc":"client/src/App.tsx:53",path:"/leads/:id",children:()=>e.jsx(Ss,{"data-loc":"client/src/App.tsx:53",allowedRoles:on,children:e.jsx(xT,{"data-loc":"client/src/App.tsx:53"})})}),e.jsx($t,{"data-loc":"client/src/App.tsx:54",path:"/kanban",children:()=>e.jsx(Ss,{"data-loc":"client/src/App.tsx:54",allowedRoles:on,children:e.jsx(mT,{"data-loc":"client/src/App.tsx:54"})})}),e.jsx($t,{"data-loc":"client/src/App.tsx:55",path:"/clientes",component:IT}),e.jsx($t,{"data-loc":"client/src/App.tsx:56",path:"/clientes/novo",component:Tj}),e.jsx($t,{"data-loc":"client/src/App.tsx:57",path:"/clientes/:id/editar",component:Tj}),e.jsx($t,{"data-loc":"client/src/App.tsx:58",path:"/clientes/:id",component:$T}),e.jsx($t,{"data-loc":"client/src/App.tsx:59",path:"/atendimentos",component:ZT}),e.jsx($t,{"data-loc":"client/src/App.tsx:60",path:"/atendimentos/:id",component:e_}),e.jsx($t,{"data-loc":"client/src/App.tsx:61",path:"/audit",children:()=>e.jsx(Ss,{"data-loc":"client/src/App.tsx:61",allowedRoles:on,children:e.jsx(a_,{"data-loc":"client/src/App.tsx:61"})})}),e.jsx($t,{"data-loc":"client/src/App.tsx:62",path:"/perfil",component:n_}),e.jsx($t,{"data-loc":"client/src/App.tsx:65",path:"/usuarios",children:()=>e.jsx(Ss,{"data-loc":"client/src/App.tsx:65",allowedRoles:["admin"],children:e.jsx(d_,{"data-loc":"client/src/App.tsx:65"})})}),e.jsx($t,{"data-loc":"client/src/App.tsx:66",path:"/usuarios/:id",children:()=>e.jsx(Ss,{"data-loc":"client/src/App.tsx:66",allowedRoles:["admin"],children:e.jsx(m_,{"data-loc":"client/src/App.tsx:66"})})}),e.jsx($t,{"data-loc":"client/src/App.tsx:67",path:"/integracoes",children:()=>e.jsx(Ss,{"data-loc":"client/src/App.tsx:67",allowedRoles:on,children:e.jsx(b_,{"data-loc":"client/src/App.tsx:67"})})}),e.jsx($t,{"data-loc":"client/src/App.tsx:68",path:"/campanhas",component:qP}),e.jsx($t,{"data-loc":"client/src/App.tsx:69",path:"/webhooks",children:()=>e.jsx(Ss,{"data-loc":"client/src/App.tsx:69",allowedRoles:on,children:e.jsx(rz,{"data-loc":"client/src/App.tsx:69"})})}),e.jsx($t,{"data-loc":"client/src/App.tsx:70",path:"/meta-capi",children:()=>e.jsx(Ss,{"data-loc":"client/src/App.tsx:70",allowedRoles:on,children:e.jsx(iz,{"data-loc":"client/src/App.tsx:70"})})}),e.jsx($t,{"data-loc":"client/src/App.tsx:71",path:"/meta-lead-ads",children:()=>e.jsx(Ss,{"data-loc":"client/src/App.tsx:71",allowedRoles:on,children:e.jsx(xz,{"data-loc":"client/src/App.tsx:71"})})}),e.jsx($t,{"data-loc":"client/src/App.tsx:72",path:"/configuracoes",children:()=>e.jsx(Ss,{"data-loc":"client/src/App.tsx:72",allowedRoles:on,children:e.jsx(pz,{"data-loc":"client/src/App.tsx:72"})})}),e.jsx($t,{"data-loc":"client/src/App.tsx:73",path:"/whatsapp",children:()=>e.jsx(Ss,{"data-loc":"client/src/App.tsx:73",allowedRoles:on,children:e.jsx(Oz,{"data-loc":"client/src/App.tsx:73"})})}),e.jsx($t,{"data-loc":"client/src/App.tsx:74",path:"/roleta",children:()=>e.jsx(Ss,{"data-loc":"client/src/App.tsx:74",allowedRoles:on,children:e.jsx(zz,{"data-loc":"client/src/App.tsx:74"})})}),e.jsx($t,{"data-loc":"client/src/App.tsx:75",path:"/minha-fila",component:Iz}),e.jsx($t,{"data-loc":"client/src/App.tsx:76",component:dL})]})})})]})}function Hz(){return e.jsx(uL,{"data-loc":"client/src/App.tsx:86",children:e.jsx(pL,{"data-loc":"client/src/App.tsx:87",defaultTheme:"dark",children:e.jsxs(Zu,{"data-loc":"client/src/App.tsx:88",children:[e.jsx(fD,{"data-loc":"client/src/App.tsx:89",theme:"dark",toastOptions:{style:{background:"#111113",border:"1px solid #1E1E22",color:"#F2F2F3"}}}),e.jsx(Fz,{"data-loc":"client/src/App.tsx:99"})]})})})}const fx=new hS,U4=t=>{if(!(t instanceof ec)||typeof window>"u"||!(t.message===ZE))return;const r=NC();window.location.pathname!==r&&(window.location.href=r)};fx.getQueryCache().subscribe(t=>
695{if(t.type==="updated"&&t.action.type==="error"){const s=t.query.state.error;U4(s),console.error("[API Query Error]",s)}});fx.getMutationCache().subscribe(t=>{if(t.type==="updated"&&t.action.type==="error"){const s=t.mutation.state.error;U4(s),console.error("[API Mutation Error]",s)}});const qz=Y.createClient({links:[AE({url:"/api/trpc",transformer:pr,fetch(t,s){return globalThis.fetch(t,{...s??{},credentials:"include"})}})]});n6.createRoot(document.getElementById("root")).render(e.jsx(Y.Provider,{"data-loc":"client/src/main.tsx:60",client:qz,queryClient:fx,children:e.jsx(bS,{"data-loc":"client/src/main.tsx:61",client:fx,children:e.jsx(Hz,{"data-loc":"client/src/main.tsx:62"})})}));
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.