Presupuestador_web/dist/client/assets/index-DP3f1470.js

255 lines
282 KiB
JavaScript
Raw Normal View History

2026-10-04 16:41:30 +00:00
var P_=Object.defineProperty;var k_=(n,a,r)=>a in n?P_(n,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[a]=r;var Se=(n,a,r)=>k_(n,typeof a!="symbol"?a+"":a,r);import{u as Ic,a as Jt,b as en,c as Mn,d as Ne,j as i,P as q_,e as $_,f as he,g as z_,N as Wi,R as Pe,J as Nt,h as ke,i as Jn,D as er,l as Aa,M as Tt,V as B_,r as M,k as Fc,m as Mc,n as rr,o as Dc,B as G,C as V_,p as ir,q as sr,s as ar,S as no,t as or,v as Vi,w,x as ro,y as Yi,z as Qi,A as Xi,E as Lr,F as io,G as so,H as ao,I as oo,K as lo,L as U_,O as Or,Q as G_,T as H_,U as K_,W as Le,X as pt,Y as Ge,Z as Ze,_ as Oe,$ as mn,a0 as uo,a1 as W_,a2 as co,a3 as hn,a4 as fo,a5 as go,a6 as qr,a7 as Dt,a8 as Tc,a9 as Y_,aa as Ui,ab as lr,ac as mo,ad as ho,ae as po,af as xo,ag as Lc,ah as vo,ai as _o,aj as bo,ak as Zi,al as Q_,am as X_,an as Z_,ao as gc,ap as J_,aq as e0,ar as mc,as as hc,at as Ia,au as t0,av as n0,aw as An,ax as pc,ay as r0,az as i0,aA as s0,aB as wo,aC as zt,aD as vn,aE as Ji,aF as Oc,aG as In,aH as a0,aI as Pc,aJ as o0,aK as le,aL as es,aM as xc,aN as kc,aO as qc,aP as $c,aQ as Dn,aR as zc,aS as ts,aT as zr,aU as Br,aV as Vr,aW as $r,aX as l0,aY as Bc,aZ as He,a_ as Ke,a$ as Ua,b0 as We,b1 as tr,b2 as ur,b3 as nr,b4 as u0,b5 as c0,b6 as d0,b7 as Ga,b8 as f0,b9 as g0,ba as Xn,bb as Vc,bc as Ha,bd as Uc,be as qt,bf as m0,bg as h0,bh as ns,bi as cr,bj as Gc,bk as p0,bl as So,bm as x0,bn as Hc,bo as Kc,bp as Wc,bq as Yc,br as Qc,bs as Xc,bt as Zc,bu as Jc,bv as ed,bw as v0,bx as Pi,by as _0,bz as b0,bA as w0,bB as S0,bC as j0,bD as C0,bE as y0,bF as N0,bG as R0,bH as E0,bI as A0,bJ as vc,bK as td,bL as nd,bM as rd,bN as id,bO as sd,bP as ad,bQ as od,bR as I0,bS as Fa,bT as F0,bU as M0,bV as D0,bW as ld,bX as ud,bY as Ka,bZ as Wa,b_ as T0,b$ as Ma,c0 as L0,c1 as O0,c2 as P0}from"./index-D_mpiX-a.js";const k0=n=>{const{onSuccess:a,...r}=n||{},o=Mn(),{login:l}=Ic(),c=Jt();return en({mutationKey:o().auth().action("login").get(),mutationFn:l,onSuccess:async(d,h,p)=>{d.success&&c.removeQueries({queryKey:o().auth().get()}),await(a==null?void 0:a(d,h,p))},...r})};/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const cd=Ne("Archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const q0=Ne("ArrowDownUp",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"m21 8-4-4-4 4",key:"1c9v7m"}],["path",{d:"M17 4v16",key:"7dpous"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _c=Ne("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const bc=Ne("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const $0=Ne("ChevronsLeft",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const z0=Ne("ChevronsRight",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const dd=Ne("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"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const B0=Ne("CirclePlus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const V0=Ne("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"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const U0=Ne("CopyPlus",[["line",{x1:"15",x2:"15",y1:"12",y2:"18",key:"1p7wdc"}],["line",{x1:"12",x2:"18",y1:"15",y2:"15",key:"1nscbv"}],["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"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const jo=Ne("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"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const fd=Ne("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"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const G0=Ne("EllipsisVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const gd=Ne("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"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const H0=Ne("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"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const K0=Ne("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"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const md=Ne("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"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const W0=Ne("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Co=Ne("PackagePlus",[["path",{d:"M16 16h6",key:"100bgy"}],["path",{d:"M19 13v6",key:"85cyf1"}],["path",{d:"M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14",key:"e7tb2h"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yo=Ne("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Y0=Ne("Scan",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Q0=Ne("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const X0=Ne("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const hd=Ne("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
* @license lucide-react v0.427.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const pd=Ne("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),Z0=({className:n,...a})=>i.jsx($_,{className:he("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",n),...a}),wc=q_,J0=({withHandle:n,className:a,...r})=>i.jsx(z_,{className:he("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",a),...r,children:n&&i.jsx("div",{className:"z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border",children:i.jsx(md,{className:"h-2.5 w-2.5"})})});function ut({className:n,...a}){return i.jsx("div",{className:he("animate-pulse rounded-md bg-muted",n),...a})}const eb=n=>typeof n=="object"&&n!==null&&n.hasOwnProperty("total_items");let ki;const tb=new Uint8Array(16);function nb(){if(!ki&&(ki=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ki))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ki(tb)}const Ue=[];for(let n=0;n<256;++n)Ue.push((n+256).toString(16).slice(1));function rb(n,a=0){return Ue[n[a+0]]+Ue[n[a+1]]+Ue[n[a+2]]+Ue[n[a+3]]+"-"+Ue[n[a+4]]+Ue[n[a+5]]+"-"+Ue[n[a+6]]+Ue[n[a+7]]+"-"+Ue[n[a+8]]+Ue[n[a+9]]+"-"+Ue[n[a+10]]+Ue[n[a+11]]+Ue[n[a+12]]+Ue[n[a+13]]+Ue[n[a+14]]+Ue[n[a+15]]}const ib=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Sc={randomUUID:ib};function sb(n,a,r){if(Sc.randomUUID&&!n)return Sc.randomUUID();n=n||{};const o=n.random||(n.rng||nb)();return o[6]=o[6]&15|64,o[8]=o[8]&63|128,rb(o)}class dn extends Wi{static validate(a,r){const o=Pe.RULE_ALLOW_EMPTY.default(""),l=Nt.string().guid({version:["uuidv4"]}).label(r.label?r.label:"id"),c=Nt.alternatives(o,l);return Pe.validate(c,a)}static sanitize(a){return a.trim()}static create(a,r={}){const o={label:"id",generateOnEmpty:!1,...r};if(!a&&!o.generateOnEmpty)return ke.fail(Jn(er.INVALID_INPUT_DATA,"ID is null or empty"));if(a){const l=dn.validate(a,o);return l.isFailure?ke.fail(Jn(er.INVALID_INPUT_DATA,l.error.message,o)):ke.ok(new dn(dn.sanitize(l.object)))}return o.generateOnEmpty?dn.generateNewID():ke.ok(new dn(null))}static generateNewID(){return ke.ok(new dn(sb()))}get value(){return String(this.props)}toString(){return String(this.props)}toPrimitive(){return this.toString()}}const Da={aa:{name:"Afar",nativeName:"Afaraf"},ab:{name:"Abkhaz",nativeName:"аҧсуа бызшәа"},ae:{name:"Avestan",nativeName:"avesta"},af:{name:"Afrikaans",nativeName:"Afrikaans"},ak:{name:"Akan",nativeName:"Akan"},am:{name:"Amharic",nativeName:"አማርኛ"},an:{name:"Aragonese",nativeName:"aragonés"},ar:{name:"Arabic",nativeName:"اَلْعَرَبِيَّةُ"},as:{name:"Assamese",nativeName:"অসমীয়া"},av:{name:"Avaric",nativeName:"авар мацӀ"},ay:{name:"Aymara",nativeName:"aymar aru"},az:{name:"Azerbaijani",nativeName:"azərbaycan dili"},ba:{name:"Bashkir",nativeName:"башҡорт теле"},be:{name:"Belarusian",nativeName:"беларуская мова"},bg:{name:"Bulgarian",nativeName:"български език"},bi:{name:"Bislama",nativeName:"Bislama"},bm:{name:"Bambara",nativeName:"bamanankan"},bn:{name:"Bengali",nativeName:"বাংলা"},bo:{name:"Tibetan",nativeName:"བོད་ཡིག"},br:{name:"Breton",nativeName:"brezhoneg"},bs:{name:"Bosnian"
* table-core
*
* Copyright (c) TanStack
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function db(){return{accessor:(n,a)=>typeof n=="function"?{...a,accessorFn:n}:{...a,accessorKey:n},display:n=>n,group:n=>n}}function gn(n,a){return typeof n=="function"?n(a):n}function xt(n,a){return r=>{a.setState(o=>({...o,[n]:gn(r,o[n])}))}}function rs(n){return n instanceof Function}function fb(n){return Array.isArray(n)&&n.every(a=>typeof a=="number")}function gb(n,a){const r=[],o=l=>{l.forEach(c=>{r.push(c);const d=a(c);d!=null&&d.length&&o(d)})};return o(n),r}function Z(n,a,r){let o=[],l;return c=>{let d;r.key&&r.debug&&(d=Date.now());const h=n(c);if(!(h.length!==o.length||h.some((v,R)=>o[R]!==v)))return l;o=h;let x;if(r.key&&r.debug&&(x=Date.now()),l=a(...h),r==null||r.onChange==null||r.onChange(l),r.key&&r.debug&&r!=null&&r.debug()){const v=Math.round((Date.now()-d)*100)/100,R=Math.round((Date.now()-x)*100)/100,y=R/16,b=(E,j)=>{for(E=String(E);E.length<j;)E=" "+E;return E};console.info(`%c⏱ ${b(R,5)} /${b(v,5)} ms`,`
font-size: .6rem;
font-weight: bold;
color: hsl(${Math.max(0,Math.min(120-120*y,120))}deg 100% 31%);`,r==null?void 0:r.key)}return l}}function J(n,a,r,o){return{debug:()=>{var l;return(l=n==null?void 0:n.debugAll)!=null?l:n[a]},key:!1,onChange:o}}function mb(n,a,r,o){const l=()=>{var d;return(d=c.getValue())!=null?d:n.options.renderFallbackValue},c={id:`${a.id}_${r.id}`,row:a,column:r,getValue:()=>a.getValue(o),renderValue:l,getContext:Z(()=>[n,r,a,c],(d,h,p,x)=>({table:d,column:h,row:p,cell:x,getValue:x.getValue,renderValue:x.renderValue}),J(n.options,"debugCells"))};return n._features.forEach(d=>{d.createCell==null||d.createCell(c,r,a,n)},{}),c}function hb(n,a,r,o){var l,c;const h={...n._getDefaultColumnDef(),...a},p=h.accessorKey;let x=(l=(c=h.id)!=null?c:p?typeof String.prototype.replaceAll=="function"?p.replaceAll(".","_"):p.replace(/\./g,"_"):void 0)!=null?l:typeof h.header=="string"?h.header:void 0,v;if(h.accessorFn?v=h.accessorFn:p&&(p.includes(".")?v=y=>{let b=y;for(const j of p.split(".")){var E;b=(E=b)==null?void 0:E[j]}return b}:v=y=>y[h.accessorKey]),!x)throw new Error;let R={id:`${String(x)}`,accessorFn:v,parent:o,depth:r,columnDef:h,columns:[],getFlatColumns:Z(()=>[!0],()=>{var y;return[R,...(y=R.columns)==null?void 0:y.flatMap(b=>b.getFlatColumns())]},J(n.options,"debugColumns")),getLeafColumns:Z(()=>[n._getOrderColumnsFn()],y=>{var b;if((b=R.columns)!=null&&b.length){let E=R.columns.flatMap(j=>j.getLeafColumns());return y(E)}return[R]},J(n.options,"debugColumns"))};for(const y of n._features)y.createColumn==null||y.createColumn(R,n);return R}const Xe="debugHeaders";function Cc(n,a,r){var o;let c={id:(o=r.id)!=null?o:a.id,column:a,index:r.index,isPlaceholder:!!r.isPlaceholder,placeholderId:r.placeholderId,depth:r.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const d=[],h=p=>{p.subHeaders&&p.subHeaders.length&&p.subHeaders.map(h),d.push(p)};return h(c),d},getContext:()=>({table:n,header:c,column:a})};return n._features.forEach(d=>{d.createHeader==null||d.createHeader(c,n)}),c}const pb={createTable:n=>{n.getHeaderGroups=Z(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right],(a,r,o,l)=>{var c,d;const h=(c=o==null?void 0:o.map(R=>r.find(y=>y.id===R)).filter(Boolean))!=null?c:[],p=(d=l==null?void 0:l.map(R=>r.find(y=>y.id===R)).filter(Boolean))!=null?d:[],x=r.filter(R=>!(o!=null&&o.includes(R.id))&&!(l!=null&&l.includes(R.id)));return qi(a,[...h,...x,...p],n)},J(n.options,Xe)),n.getCenterHeaderGroups=Z(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right],(a,r,o,l)=>(r=r.filter(c=>!(o!=null&&o.includes(c.id))&&!(l!=null&&l.includes(c.id))),qi(a,r,n,"center")),J(n.options,Xe)),n.getLeftHeaderGroups=Z(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left],(a,r,o)=>{var l;const c=(l=o==null?void 0:o.map(d=>r.find(h=>h.id===d)).filter(Boolean))!=null?l:[];return qi(a,c,n,"left")},J(n.options,Xe)),n.getRightHeaderGroups=Z(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.right],(a,r,o)=>{var l;const c=(l=o==null?void 0:o.map(d=>r.find(h=>h.id===d)).filter(Boolean))!=null?l:[];return qi(a,c,n,"right")},J(n.options,Xe)),n.getFooterGroups=Z(()=>[n.getHeaderGroups()],a=>[...a].reverse(),J(n.options,Xe)),n.getLeftFooterGroups=Z(()=>[n.getLeftHeaderGroups()],a=>[...a].reverse(),J(n.options,Xe)),n.getCenterFooterGroups=Z(()=>[n.getCenterHeaderGroups()],a=>[...a].reverse(),J(n.options,Xe)),n.getRightFooterGroups=Z(()=>[n.getRightHeaderGroups()],a=>[...a].reverse(),J(n.options,Xe)),n.getFlatHeaders=Z(()=>[n.getHeaderGroups()],a=>a.map(r=>r.headers).flat(),J(n.options,Xe)),n.getLeftFlatHeaders=Z(()=>[n.getLeftHeaderGroups()],a=>a.map(r=>r.headers).flat(),J(n.options,Xe)),n.getCenterFlatHeaders=Z(()=>[n.getCenterHeaderGroups()],a=>a.map(r=>r.headers).flat(),J(n.options,Xe)),n.getRightFlatHeaders=Z(()=>[n.getRightHeaderGroups()],a=>a.map(r=>r.headers).flat(),J(n.options,Xe)),n.getCenterLeafHeaders=Z(()=>[n.getCenterFlatHeaders()],a=>a.filter(r=>{v
* react-table
*
* Copyright (c) TanStack
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function Gi(n,a){return n?nw(n)?M.createElement(n,a):n:null}function nw(n){return rw(n)||typeof n=="function"||iw(n)}function rw(n){return typeof n=="function"&&(()=>{const a=Object.getPrototypeOf(n);return a.prototype&&a.prototype.isReactComponent})()}function iw(n){return typeof n=="object"&&typeof n.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(n.$$typeof.description)}function Md(n){const a={state:{},onStateChange:()=>{},renderFallbackValue:null,...n},[r]=M.useState(()=>({current:Yb(a)})),[o,l]=M.useState(()=>r.current.initialState);return r.current.setOptions(c=>({...c,...n,state:{...o,...n.state},onStateChange:d=>{l(d),n.onStateChange==null||n.onStateChange(d)}})),r.current}const sw=({buttonText:n,title:a="",content:r,className:o=""})=>i.jsx("div",{className:`flex items-baseline justify-center mr-4 font-medium ${o}`,children:i.jsxs(rr,{children:[i.jsx(Dc,{asChild:!0,children:i.jsxs(G,{variant:"link",className:"inline-flex items-center font-medium group",children:[i.jsx("span",{className:"underline-offset-4 group-hover:underline",children:n}),i.jsx(V_,{className:"w-4 h-4 ml-1 text-muted-foreground"})]})}),i.jsxs(ir,{className:"sm:max-w-[425px]",children:[i.jsx(sr,{children:i.jsx(ar,{children:a})}),i.jsxs(no,{className:"grid gap-4 py-2",children:[r,i.jsx(or,{children:i.jsx(Vi,{asChild:!0,children:i.jsx(G,{type:"button",children:w("common.close")})})})]})]})]})});function aw(n){let o=0;for(let v=0;v<n.length;v++)o=n.charCodeAt(v)+((o<<5)-o);let l="#";for(let v=0;v<3;v++){const R=o>>v*8&255;l+=("00"+R.toString(16)).substr(-2)}const c=parseInt(l.substr(1,2),16),d=parseInt(l.substr(3,2),16),h=parseInt(l.substr(5,2),16),p=`#${(c*.7|0).toString(16).padStart(2,"0")}${(d*.7|0).toString(16).padStart(2,"0")}${(h*.7|0).toString(16).padStart(2,"0")}`,x=`#${Math.min(255,Math.floor(c+(255-c)*.7)).toString(16).padStart(2,"0")}${Math.min(255,Math.floor(d+(255-d)*.7)).toString(16).padStart(2,"0")}${Math.min(255,Math.floor(h+(255-h)*.7)).toString(16).padStart(2,"0")}`;return[p,x]}const Dd=({label:n,className:a})=>{const[r,o]=aw(n);return i.jsx(ro,{className:a,style:a?{}:{backgroundColor:o,color:r},children:n})};function Td({table:n,header:a,className:r}){return a.column.getCanSort()?i.jsx("div",{className:he("flex items-center space-x-2",r),children:i.jsxs(Yi,{children:[i.jsx(Qi,{asChild:!0,children:i.jsxs(G,{"aria-label":a.column.getIsSorted()==="desc"?w("common.sort_desc_description"):a.column.getIsSorted()==="asc"?w("common.sort_asc_description"):w("sort_none_description"),size:"sm",variant:"ghost",className:"-ml-3 h-8 data-[state=open]:bg-accent font-bold text-muted-foreground",children:[Gi(a.column.columnDef.header,a.getContext()),a.column.getIsSorted()==="desc"?i.jsx(_c,{className:"w-4 h-4 ml-2","aria-hidden":"true"}):a.column.getIsSorted()==="asc"?i.jsx(bc,{className:"w-4 h-4 ml-2","aria-hidden":"true"}):i.jsx(q0,{className:"w-4 h-4 ml-2 text-muted-foreground/30","aria-hidden":"true"})]})}),i.jsxs(Xi,{align:"start",children:[a.column.getCanSort()&&i.jsxs(i.Fragment,{children:[i.jsxs(Lr,{onClick:()=>a.column.toggleSorting(!1),"aria-label":w("common.sort_asc"),children:[i.jsx(bc,{className:"mr-2 h-3.5 w-3.5 text-muted-foreground/70","aria-hidden":"true"}),w("common.sort_asc")]}),i.jsxs(Lr,{onClick:()=>a.column.toggleSorting(!0),"aria-label":w("common.sort_desc"),children:[i.jsx(_c,{className:"mr-2 h-3.5 w-3.5 text-muted-foreground/70","aria-hidden":"true"}),w("common.sort_desc")]})]}),a.column.getCanSort()&&a.column.getCanHide()&&i.jsx(io,{}),a.column.getCanHide()&&i.jsxs(Lr,{onClick:()=>a.column.toggleVisibility(!1),"aria-label":w("Hide"),children:[i.jsx(gd,{className:"mr-2 h-3.5 w-3.5 text-muted-foreground/70","aria-hidden":"true"}),w("Hide")]})]})]})}):i.jsxs(i.Fragment,{children:[i.jsx("div",{className:he("data-[state=open]:bg-accent tracking-wide text-ellipsis",r),children:a.isPlaceholder?null:Gi(a.column.columnDef.header,a.getContext())}),!1]})}function ow({table:n,className:a,enablePageSizeSelector:r=!0,visible:o="auto"}){const l=M.useMemo(()=>o===!0,[o]),c=M.useMemo(()=>o==="auto",[o]);return!l||c&&
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/Ki.exports;(function(n,a){(function(){var r,o="4.17.21",l=200,c="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",d="Expected a function",h="Invalid `variable` option passed into `_.template`",p="__lodash_hash_undefined__",x=500,v="__lodash_placeholder__",R=1,y=2,b=4,E=1,j=2,D=1,F=2,q=4,$=8,Q=16,O=32,k=64,H=128,W=256,B=512,se=30,ce="...",Y=800,Re=16,rt=1,ee=2,je=3,Me=1/0,U=9007199254740991,be=17976931348623157e292,Je=NaN,it=4294967295,_n=it-1,Yd=it>>>1,Qd=[["ary",H],["bind",D],["bindKey",F],["curry",$],["curryRight",Q],["flip",B],["partial",O],["partialRight",k],["rearg",W]],Ln="[object Arguments]",Gr="[object Array]",Xd="[object AsyncFunction]",dr="[object Boolean]",fr="[object Date]",Zd="[object DOMException]",Hr="[object Error]",Kr="[object Function]",Oo="[object GeneratorFunction]",Rt="[object Map]",gr="[object Number]",Jd="[object Null]",Bt="[object Object]",Po="[object Promise]",ef="[object Proxy]",mr="[object RegExp]",Et="[object Set]",hr="[object String]",Wr="[object Symbol]",tf="[object Undefined]",pr="[object WeakMap]",nf="[object WeakSet]",xr="[object ArrayBuffer]",On="[object DataView]",ls="[object Float32Array]",us="[object Float64Array]",cs="[object Int8Array]",ds="[object Int16Array]",fs="[object Int32Array]",gs="[object Uint8Array]",ms="[object Uint8ClampedArray]",hs="[object Uint16Array]",ps="[object Uint32Array]",rf=/\b__p \+= '';/g,sf=/\b(__p \+=) '' \+/g,af=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ko=/&(?:amp|lt|gt|quot|#39);/g,qo=/[&<>"']/g,of=RegExp(ko.source),lf=RegExp(qo.source),uf=/<%-([\s\S]+?)%>/g,cf=/<%([\s\S]+?)%>/g,$o=/<%=([\s\S]+?)%>/g,df=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ff=/^\w*$/,gf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xs=/[\\^$.*+?()[\]{}|]/g,mf=RegExp(xs.source),vs=/^\s+/,hf=/\s/,pf=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,xf=/\{\n\/\* \[wrapped with (.+)\] \*/,vf=/,? & /,_f=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,bf=/[()=,{}\[\]\/\s]/,wf=/\\(\\)?/g,Sf=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,zo=/\w*$/,jf=/^[-+]0x[0-9a-f]+$/i,Cf=/^0b[01]+$/i,yf=/^\[object .+?Constructor\]$/,Nf=/^0o[0-7]+$/i,Rf=/^(?:0|[1-9]\d*)$/,Ef=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Yr=/($^)/,Af=/['\n\r\u2028\u2029\\]/g,Qr="\\ud800-\\udfff",If="\\u0300-\\u036f",Ff="\\ufe20-\\ufe2f",Mf="\\u20d0-\\u20ff",Bo=If+Ff+Mf,Vo="\\u2700-\\u27bf",Uo="a-z\\xdf-\\xf6\\xf8-\\xff",Df="\\xac\\xb1\\xd7\\xf7",Tf="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Lf="\\u2000-\\u206f",Of=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Go="A-Z\\xc0-\\xd6\\xd8-\\xde",Ho="\\ufe0e\\ufe0f",Ko=Df+Tf+Lf+Of,_s="['’]",Pf="["+Qr+"]",Wo="["+Ko+"]",Xr="["+Bo+"]",Yo="\\d+",kf="["+Vo+"]",Qo="["+Uo+"]",Xo="[^"+Qr+Ko+Yo+Vo+Uo+Go+"]",bs="\\ud83c[\\udffb-\\udfff]",qf="(?:"+Xr+"|"+bs+")",Zo="[^"+Qr+"]",ws="(?:\\ud83c[\\udde6-\\uddff]){2}",Ss="[\\ud800-\\udbff][\\udc00-\\udfff]",Pn="["+Go+"]",Jo="\\u200d",el="(?:"+Qo+"|"+Xo+")",$f="(?:"+Pn+"|"+Xo+")",tl="(?:"+_s+"(?:d|ll|m|re|s|t|ve))?",nl="(?:"+_s+"(?:D|LL|M|RE|S|T|VE))?",rl=qf+"?",il="["+Ho+"]?",zf="(?:"+Jo+"(?:"+[Zo,ws,Ss].join("|")+")"+il+rl+")*",Bf="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Vf="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",sl=il+rl+zf,Uf="(?:"+[kf,ws,Ss].join("|")+")"+sl,Gf="(?:"+[Zo+Xr+"?",Xr,ws,Ss,Pf].join("|")+")",Hf=RegExp(_s,"g"),Kf=RegExp(Xr,"g"),js=RegExp(bs+"(?="+bs+")|"+Gf+sl,"g"),Wf=RegExp([Pn+"?"+Qo+"+"+tl+"(?="+[Wo,Pn,"$"].join("|")+")",$f+"+"+nl+"(?="+[Wo,Pn+el,"$"].join("|")+")",Pn+"?"+el+"+"+tl,Pn+"+"+nl,Vf,Bf,Yo,Uf].join("|"),"g"),Yf=RegExp("["+Jo+Qr+Bo+Ho+"]"),Qf=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Xf=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"]
/* [wrapped with `+t+`] */
`)}function hh(e){return ie(e)||En(e)||!!(El&&e&&e[El])}function Wt(e,t){var s=typeof e;return t=t??U,!!t&&(s=="number"||s!="symbol"&&Rf.test(e))&&e>-1&&e%1==0&&e<t}function tt(e,t,s){if(!Ae(s))return!1;var u=typeof t;return(u=="number"?at(s)&&Wt(t,s.length):u=="string"&&t in s)?Ft(s[t],e):!1}function ca(e,t){if(ie(e))return!1;var s=typeof e;return s=="number"||s=="symbol"||s=="boolean"||e==null||gt(e)?!0:ff.test(e)||!df.test(e)||t!=null&&e in we(t)}function ph(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function da(e){var t=Ni(e),s=g[t];if(typeof s!="function"||!(t in fe.prototype))return!1;if(e===s)return!0;var u=oa(s);return!!u&&e===u[0]}function xh(e){return!!Cl&&Cl in e}var vh=ni?Yt:Ea;function Ir(e){var t=e&&e.constructor,s=typeof t=="function"&&t.prototype||Bn;return e===s}function Cu(e){return e===e&&!Ae(e)}function yu(e,t){return function(s){return s==null?!1:s[e]===t&&(t!==r||e in we(s))}}function _h(e){var t=Mi(e,function(u){return s.size===x&&s.clear(),u}),s=t.cache;return t}function bh(e,t){var s=e[1],u=t[1],f=s|u,m=f<(D|F|H),_=u==H&&s==$||u==H&&s==W&&e[7].length<=t[8]||u==(H|W)&&t[7].length<=t[8]&&s==$;if(!(m||_))return e;u&D&&(e[2]=t[2],f|=s&D?0:q);var S=t[3];if(S){var N=e[3];e[3]=N?ou(N,S,t[4]):S,e[4]=N?rn(e[3],v):t[4]}return S=t[5],S&&(N=e[5],e[5]=N?lu(N,S,t[6]):S,e[6]=N?rn(e[5],v):t[6]),S=t[7],S&&(e[7]=S),u&H&&(e[8]=e[8]==null?t[8]:Ye(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=f,e}function wh(e){var t=[];if(e!=null)for(var s in we(e))t.push(s);return t}function Sh(e){return ii.call(e)}function Nu(e,t,s){return t=$e(t===r?e.length-1:t,0),function(){for(var u=arguments,f=-1,m=$e(u.length-t,0),_=A(m);++f<m;)_[f]=u[t+f];f=-1;for(var S=A(t+1);++f<t;)S[f]=u[f];return S[t]=s(_),ct(e,this,S)}}function Ru(e,t){return t.length<2?e:yn(e,jt(t,0,-1))}function jh(e,t){for(var s=e.length,u=Ye(t.length,s),f=st(e);u--;){var m=t[u];e[u]=Wt(m,s)?f[m]:r}return e}function fa(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Eu=Iu(Xl),Fr=kg||function(e,t){return Be.setTimeout(e,t)},ga=Iu(Hm);function Au(e,t,s){var u=t+"";return ga(e,mh(u,Ch(dh(u),s)))}function Iu(e){var t=0,s=0;return function(){var u=Bg(),f=Re-(u-s);if(s=u,f>0){if(++t>=Y)return arguments[0]}else t=0;return e.apply(r,arguments)}}function Ei(e,t){var s=-1,u=e.length,f=u-1;for(t=t===r?u:t;++s<t;){var m=Ys(s,f),_=e[m];e[m]=e[s],e[s]=_}return e.length=t,e}var Fu=_h(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(gf,function(s,u,f,m){t.push(f?m.replace(wf,"$1"):u||s)}),t});function kt(e){if(typeof e=="string"||gt(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Rn(e){if(e!=null){try{return ri.call(e)}catch{}try{return e+""}catch{}}return""}function Ch(e,t){return _t(Qd,function(s){var u="_."+s[0];t&s[1]&&!Zr(e,u)&&e.push(u)}),e.sort()}function Mu(e){if(e instanceof fe)return e.clone();var t=new wt(e.__wrapped__,e.__chain__);return t.__actions__=st(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function yh(e,t,s){(s?tt(e,t,s):t===r)?t=1:t=$e(ae(t),0);var u=e==null?0:e.length;if(!u||t<1)return[];for(var f=0,m=0,_=A(ci(u/t));f<u;)_[m++]=jt(e,f,f+=t);return _}function Nh(e){for(var t=-1,s=e==null?0:e.length,u=0,f=[];++t<s;){var m=e[t];m&&(f[u++]=m)}return f}function Rh(){var e=arguments.length;if(!e)return[];for(var t=A(e-1),s=arguments[0],u=e;u--;)t[u-1]=arguments[u];return nn(ie(s)?st(s):[s],Ve(t,1))}var Eh=ue(function(e,t){return De(e)?yr(e,Ve(t,1,De,!0)):[]}),Ah=ue(function(e,t){var s=Ct(t);return De(s)&&(s=r),De(e)?yr(e,Ve(t,1,De,!0),X(s,2)):[]}),Ih=ue(function(e,t){var s=Ct(t);return De(s)&&(s=r),De(e)?yr(e,Ve(t,1,De,!0),r,s):[]});function Fh(e,t,s){var u=e==null?0:e.length;return u?(t=s||t===r?1:ae(t),jt(e,t<0?0:t,u)):[]}function Mh(e,t,s){var u=e==null?0:e.length;return u?(t=s||t===r?1:ae(t),t=u-t,jt(e,0,t<0?0:t)):[]}function Dh(e,t){return e&&e.length?bi(e,X(t,3),!0,!0):[]}function Th(e,t){return e&&e.length?bi(e,X(t,3),!0):[]}function Lh(e,t,s,u){var f=e==null?0:e.length;return f?(s&&typeof s!="numb
`;e.replace(z,function(ne,de,ge,mt,nt,ht){return ge||(ge=mt),P+=e.slice(T,ht).replace(Af,vg),de&&(S=!0,P+=`' +
__e(`+de+`) +
'`),nt&&(N=!0,P+=`';
`+nt+`;
__p += '`),ge&&(P+=`' +
((__t = (`+ge+`)) == null ? '' : __t) +
'`),T=ht+ne.length,ne}),P+=`';
`;var te=xe.call(t,"variable")&&t.variable;if(!te)P=`with (obj) {
`+P+`
}
`;else if(bf.test(te))throw new re(h);P=(N?P.replace(rf,""):P).replace(sf,"$1").replace(af,"$1;"),P="function("+(te||"obj")+`) {
`+(te?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(S?", __e = _.escape":"")+(N?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+P+`return __p
}`;var oe=cc(function(){return me(m,K+"return "+P).apply(r,_)});if(oe.source=P,va(oe))throw oe;return oe}function Uv(e){return pe(e).toLowerCase()}function Gv(e){return pe(e).toUpperCase()}function Hv(e,t,s){if(e=pe(e),e&&(s||t===r))return _l(e);if(!e||!(t=ft(t)))return e;var u=At(e),f=At(t),m=bl(u,f),_=wl(u,f)+1;return un(u,m,_).join("")}function Kv(e,t,s){if(e=pe(e),e&&(s||t===r))return e.slice(0,jl(e)+1);if(!e||!(t=ft(t)))return e;var u=At(e),f=wl(u,At(t))+1;return un(u,0,f).join("")}function Wv(e,t,s){if(e=pe(e),e&&(s||t===r))return e.replace(vs,"");if(!e||!(t=ft(t)))return e;var u=At(e),f=bl(u,At(t));return un(u,f).join("")}function Yv(e,t){var s=se,u=ce;if(Ae(t)){var f="separator"in t?t.separator:f;s="length"in t?ae(t.length):s,u="omission"in t?ft(t.omission):u}e=pe(e);var m=e.length;if(qn(e)){var _=At(e);m=_.length}if(s>=m)return e;var S=s-$n(u);if(S<1)return u;var N=_?un(_,0,S).join(""):e.slice(0,S);if(f===r)return N+u;if(_&&(S+=N.length-S),_a(f)){if(e.slice(S).search(f)){var T,L=N;for(f.global||(f=Ls(f.source,pe(zo.exec(f))+"g")),f.lastIndex=0;T=f.exec(L);)var P=T.index;N=N.slice(0,P===r?S:P)}}else if(e.indexOf(ft(f),S)!=S){var z=N.lastIndexOf(f);z>-1&&(N=N.slice(0,z))}return N+u}function Qv(e){return e=pe(e),e&&of.test(e)?e.replace(ko,yg):e}var Xv=Kn(function(e,t,s){return e+(s?" ":"")+t.toUpperCase()}),Sa=du("toUpperCase");function uc(e,t,s){return e=pe(e),t=s?r:t,t===r?bg(e)?Eg(e):dg(e):e.match(t)||[]}var cc=ue(function(e,t){try{return ct(e,r,t)}catch(s){return va(s)?s:new re(s)}}),Zv=Kt(function(e,t){return _t(t,function(s){s=kt(s),Gt(e,s,pa(e[s],e))}),e});function Jv(e){var t=e==null?0:e.length,s=X();return e=t?Ee(e,function(u){if(typeof u[1]!="function")throw new bt(d);return[s(u[0]),u[1]]}):[],ue(function(u){for(var f=-1;++f<t;){var m=e[f];if(ct(m[0],this,u))return ct(m[1],this,u)}})}function e_(e){return ym(St(e,R))}function ja(e){return function(){return e}}function t_(e,t){return e==null||e!==e?t:e}var n_=gu(),r_=gu(!0);function lt(e){return e}function Ca(e){return Vl(typeof e=="function"?e:St(e,R))}function i_(e){return Gl(St(e,R))}function s_(e,t){return Hl(e,St(t,R))}var a_=ue(function(e,t){return function(s){return Nr(s,e,t)}}),o_=ue(function(e,t){return function(s){return Nr(e,s,t)}});function ya(e,t,s){var u=ze(t),f=xi(t,u);s==null&&!(Ae(t)&&(f.length||!u.length))&&(s=t,t=e,e=this,f=xi(t,ze(t)));var m=!(Ae(s)&&"chain"in s)||!!s.chain,_=Yt(e);return _t(f,function(S){var N=t[S];e[S]=N,_&&(e.prototype[S]=function(){var T=this.__chain__;if(m||T){var L=e(this.__wrapped__),P=L.__actions__=st(this.__actions__);return P.push({func:N,args:arguments,thisArg:e}),L.__chain__=T,L}return N.apply(e,nn([this.value()],arguments))})}),e}function l_(){return Be._===this&&(Be._=Tg),this}function Na(){}function u_(e){return e=ae(e),ue(function(t){return Kl(t,e)})}var c_=ra(Ee),d_=ra(ml),f_=ra(Es);function dc(e){return ca(e)?As(kt(e)):Bm(e)}function g_(e){return function(t){return e==null?r:yn(e,t)}}var m_=hu(),h_=hu(!0);function Ra(){return[]}function Ea(){return!1}function p_(){return{}}function x_(){return""}function v_(){return!0}function __(e,t){if(e=ae(e),e<1||e>U)return[];var s=it,u=Ye(e,it);t=X(t),e-=it;for(var f=Ms(u,t);++s<e;)t(s);return f}function b_(e){return ie(e)?Ee(e,kt):gt(e)?[e]:st(Fu(pe(e)))}function w_(e){var t=++Mg;return pe(e)+t}var S_=ji(function(e,t){return e+t},0),j_=ia("ceil"),C_=ji(function(e,t){return e/t},1),y_=ia("floor");function N_(e){return e&&e.length?pi(e,lt,Vs):r}function R_(e,t){return e&&e.length?pi(e,X(t,2),Vs):r}function E_(e){return xl(e,lt)}function A_(e,t){return xl(e,X(t,2))}function I_(e){return e&&e.length?pi(e,lt,Ks):r}function F_(e,t){return e&&e.length?pi(e,X(t,2),Ks):r}var M_=ji(function(e,t){return e*t},1),D_=ia("round"),T_=ji(function(e,t){return e-t},0);function L_(e){return e&&e.length?Fs(e,lt):0}function O_(e,t){return e&&e.length?Fs(e,X(t,2)):0}return g.after=ix,g.ary=Bu,g.assign=Gx,g.assignIn=nc,g.assignInWith=Oi,g.assignWith=Hx,g.at=Kx,g.before=Vu,g.bind=pa,g.bindAll=Zv,g.bindKey=Uu,g.castArray=px,g.chain=qu,g.chunk=yh,g.compact=Nh,g.concat=Rh,g.cond=Jv,g.confo
Hanging rods: CHROME/ BLACK\r
Glass drawer fronts: STRAIGHT / "U" - FLOAT BRONZE C-424 \r
Drawer handle: xxxxx / Drawers: 4 DE 180 MM.\r
Shoe rack door: YES/NO / Profile finish: BLACK LACQUER / SILVER MATTE\r
Shoe cabinet door glass finish: FLOAT BRONZE C-424\r
Composed of:`},{id:2000000084,code:"CAP_FRE_ARM_ABATIBLE_EN",title:"CHARACTERISTICS OF THE FRONT OF THE HINGED WARDROBE",body:`Size of opening: 2275x1390 mm.\r
Model: ARGO / Finish: LACQUER / Colour: TO BE DETERMINED\r
Door thickness: 22 or 19 mm\r
Door finish: SMOOTH \r
Handle: KNOB TO BE DETERMINED\r
Hardware finish: CHROME OR ANTHRACITE\r
Perimetral doorposts: VISIBLE, REMETED OR COMBI TO BE DETERMINED.\r
Number of doors: 2 \r
Composed of:`},{id:2000000089,code:"CAP_FRE_ARM_CORREDERA_EN",title:"Size of opening: 2440x5180mm. ",body:`Model: PANORAMIC P.O. / Finish: LACQUER / Colour: WHITE\r
No. of listers: NO LISTELS / Panels finish: LACQUERED PANEL \r
Handle: \r
Perimeter frame: \r
Nº of doors: \r
INCORPORATED HYDRAULIC BRAKE (not available in lower doors of 650 mm.) OR INCORPORATED MAGNETIC BRAKE. \r
Composed of:`},{id:2000000092,code:"CAP_INT_ARM_FORRADO_EN",title:"Finish: MELAMINE / colour: TO BE DETERMINED",body:`Thickness block: 19 mm / Thickness complements: 19 mm.\r
Hanging rods: CHROME/ BLACK\r
Glass drawer fronts: STRAIGHT / "U" - FLOAT BRONZE C-424 \r
Drawer handle: xxxxx / Drawers: 4 DE 180 MM.\r
Composed of:`},{id:2000000109,code:"CAP_INT_EST_CRISTAL_EN",title:"Frames finish: BLACK ANODIZED",body:`Side frame panel finish: BRONZE FLOAT BRONZE GLASS C-424\r
Rear panel finish: BRONZE FLOAT GLASS C-424\r
Complements finish: MELAMIN / Colour: DENBER OAK M-242\r
Thickness of accessories: 25 mm.\r
Hanging bars: BLACK\r
Glass drawer fronts: STRAIGHT / "U" - FLOAT BRONZE C-424 \r
Drawer handle: xxxxx / Drawers: 4 DE 180 MM.\r
Composed of:`},{id:2000000095,code:"CAP_SEP_AMBIENTES_EN",title:"CHARACTERISTICS SEPARATION OF ROOMS",body:`Size of opening: 2450x3000 mm.\r
Model: LYN / Finish: ANODISED / Colour: BLACK\r
No. of crosspieces: 2 HORIZONTAL CROSSBARS\r
Panel finish: TRANSPARENT TEMPLARED \r
Handle: DOUBLE PER DOOR\r
Brake: DOUBLE PER DOOR (OPENING AND CLOSING)\r
Guide: VISTA (DOUBLE EMBELLECEDOR)\r
Number of panels: 2 SLIDING + 2 FIXED`}],es:[{id:54,code:"CAP_CLA_SEMI_SUSPENDIDO_ES",title:"Acabado vestidor: MELAMINA / color: A DETERMINAR",body:`Espesor bloque: 25 mm. / Espesor complementos: 25 mm.\r
Barras de colgar: CROMO/ NEGRA/ BRONCE\r
Frentes cristal cajones: RECTO / “U” – FLOAT BRONCE C-424\r
Tirador cajones: FRENTE BAJO / Cajones: 4 DE 180 MM. A DETERMINAR\r
Baldas deslizantes: X DE 145 MM. A DETERMINAR\r
Compuesto por:`},{id:52,code:"CAP_FRE_ARM_ABATIBLE_ES",title:"CARACTERISTICAS FRENTE DE ARMARIO",body:`Medida de hueco: 2275x1390 mm.\r
Modelo: ARGO / Acabado: LACADO / Color: A DETERMINAR\r
Grosor hoja: 22 o 19 mm\r
Acabado de hojas: LISAS\r
Tirador: UÑERO A DETERMINAR\r
Acabado herrajes: CROMADO O ANTRACITA\r
Jambas perimetrales: VISTAS, REMETIDAS O COMBI A DETERMINAR.\r
Nº de hojas: 2\r
Compuesto por:`},{id:51,code:"CAP_FRE_ARM_CORREDERA_ES",title:"CARACTERISTICAS FRENTE DE ARMARIO CORREDERA",body:`Medida de Hueco:2440x5180mm.\r
Modelo: PANORAMIC P.O. / Acabado: LACADO / Color: BLANCO\r
Nº de lístelos: SIN LISTELOS / Acabado paneles: PANEL LACADO\r
Tirador:\r
Cerco perimetral: \r
Nº de hojas:\r
FRENO HIDRAULICO INCORPORADO O FRENO MAGNETICO INCORPORADO\r
Compuesto por:`},{id:53,code:"CAP_INT_ARM_FORRADO_ES",title:"CARACTERISTICAS INTERIOR DE ARMARIO",body:`Acabado: MELAMINA / color: A DETERMINAR\r
Espesor bloque: 19 mm. / Espesor complementos: 19 mm.\r
Barras de colgar: CROMO/ NEGRA/ BRONCE\r
Frentes cristal cajones: RECTO / “U” – FLOAT BRONCE C-424\r
Tirador cajones: FRENTE BAJO / Cajones: 4 DE 180 MM. A DETERMINAR\r
Baldas deslizantes: X DE 145 MM. A DETERMINAR\r
Compuesto por:`},{id:2000000108,code:"CAP_INT_EST_CRISTAL_ES",title:"Acabado bastidores: ANODIZADO NEGRO",body:`Acabado panel bastidores laterales: CRISTAL TEMPLADO FLOAT BRONCE C-424\r
Acabado trasera: CRISTAL TEMPLADO FLOAT BRONCE C-424\r
Acabado complementos: MELAMINA / Color: ROBLE DENBER M-242\r
Espesor complementos: 25 mm.\r
Barras de colgar: NEGRA\r
Frentes cristal cajones: RECTO / “U” – FLOAT BRONCE C-424 \r
Tirador cajones: xxxxx / Cajones: 4 DE 180 MM.\r
Compuesto por:`},{id:50,code:"CAP_SEP_AMBIENTES_ES",title:"CARACTERISTICAS SEPARACIÓN DE AMBIENTES",body:`Medida de Hueco: 2450x3000 mm.\r
Modelo: LYN / Acabado: ANODIZADO / Color: NEGRO\r
Nº de travesaños: 2 TRAVESAÑOS HORIZONTALES\r
Acabado paneles: TRANSPARENTE TEMPLADO \r
Tirador: DOBLE POR PUERTA\r
Freno: DOBLE POR PUERTA (APERTURA Y CIERRE)\r
Guía: VISTA (DOBLE EMBELLECEDOR)\r
Nº de hojas: 2 CORREDERAS + 2 FIJOS`}]},Ac=({onSelect:n})=>{const{i18n:a}=Fo(),[r]=M.useState(a.resolvedLanguage||"es"),[o]=M.useState(Uw[r.toLowerCase()]);return console.log(r),i.jsx(no,{className:"h-96",children:i.jsx("div",{className:"flex flex-col gap-2 p-4 pt-0",children:o&&o.sort((l,c)=>l.title.localeCompare(c.title)).map((l,c)=>i.jsx("button",{className:"flex flex-col items-start gap-2 p-3 text-sm text-left transition-all border rounded-lg hover:bg-accent",onClick:()=>n&&n(l,1),children:i.jsxs("div",{className:"flex flex-col w-full gap-1",children:[i.jsx("div",{className:"flex items-center",children:i.jsx("div",{className:"flex items-center gap-2",children:i.jsx("div",{className:"font-semibold",children:l.title})})}),i.jsx("div",{className:"text-xs line-clamp-2 text-muted-foreground",children:i.jsx("p",{dangerouslySetInnerHTML:{__html:l.body.substring(0,300).replace(`\r
`,"<br>")}})})]})},l.id))})})},Gw=({isOpen:n,onOpenChange:a,onSelect:r})=>Pd("(min-width: 768px)")?i.jsx(rr,{modal:!0,open:n,onOpenChange:a,children:i.jsxs(ir,{className:"w-full max-w-full md:w-9/12 lg:w-10/12",children:[i.jsxs(sr,{children:[i.jsx(ar,{children:w("quotes.blocks_picker_dialog.title")}),i.jsx(ns,{children:w("quotes.blocks_picker_dialog.description")})]}),i.jsx(Ac,{onSelect:r}),i.jsx(or,{children:i.jsx(G,{type:"submit",onClick:()=>a(!1),children:w("common.close")})})]})}):i.jsx(td,{open:n,onOpenChange:a,children:i.jsxs(nd,{children:[i.jsxs(rd,{className:"text-left",children:[i.jsx(id,{children:w("quotes.blocks_picker_dialog.title")}),i.jsx(sd,{children:w("quotes.blocks_picker_dialog.description")})]}),i.jsx(Ac,{onSelect:r}),i.jsx(ad,{className:"pt-2",children:i.jsx(od,{asChild:!0,children:i.jsx(G,{variant:"outline",children:w("common.close")})})})]})}),Hw=({isOpen:n,onOpenChange:a,onSelect:r})=>Pd("(min-width: 768px)")?i.jsx(rr,{modal:!0,open:n,onOpenChange:a,children:i.jsxs(ir,{className:"w-full max-w-full md:w-9/12 lg:w-10/12",children:[i.jsxs(sr,{children:[i.jsx(ar,{children:w("quotes.catalog_picker_dialog.title")}),i.jsx(ns,{children:w("quotes.catalog_picker_dialog.description")})]}),i.jsx(nr,{syncWithLocation:!1,initialPageSize:5,children:i.jsx(to,{onSelect:r})}),i.jsx(or,{children:i.jsx(G,{type:"submit",onClick:()=>a(!1),children:w("common.close")})})]})}):i.jsx(td,{open:n,onOpenChange:a,children:i.jsxs(nd,{children:[i.jsxs(rd,{className:"text-left",children:[i.jsx(id,{children:w("quotes.catalog_picker_dialog.title")}),i.jsx(sd,{children:w("quotes.catalog_picker_dialog.description")})]}),i.jsx(nr,{syncWithLocation:!1,initialPageSize:5,children:i.jsx(to,{onSelect:r})}),i.jsx(ad,{className:"pt-2",children:i.jsx(od,{asChild:!0,children:i.jsx(G,{variant:"outline",children:w("common.close")})})})]})}),Kw=({currency:n,language:a,defaultValues:r})=>{var W;const{toast:o}=vn(),{control:l,getValues:c,setValue:d,watch:h}=lr(),p=h("show_line_discount_column")??!0,x=!!((W=c("items"))!=null&&W.some(B=>{var se;return Number((se=B.discount)==null?void 0:se.amount)>0})),[v]=M.useState("dialog"),[R,y]=M.useState(!1),[b,E]=M.useState(!1),{fields:j,...D}=I0({control:l,name:"items"}),F=Iw([{id:"description",accessorKey:"description",header:w("quotes.form_fields.items.description.label"),cell:({row:{index:B,original:se}})=>i.jsx(qt,{readOnly:se==null?void 0:se.id_article,autoSize:!0,name:`items.${B}.description`}),minSize:200,size:400},{id:"quantity",accessorKey:"quantity",header:()=>i.jsx("div",{className:"text-right",children:w("quotes.form_fields.items.quantity.label")}),cell:({row:{index:B}})=>i.jsx(fw,{scale:0,className:"text-right",name:`items.${B}.quantity`}),size:75},{id:"unit_price",accessorKey:"unit_price",header:()=>i.jsx("div",{className:"text-right",children:w("quotes.form_fields.items.unit_price.label")}),cell:({row:{index:B}})=>i.jsx(Fa,{currency:n,language:a,scale:2,className:"text-right",name:`items.${B}.unit_price`}),size:125},{id:"subtotal_price",accessorKey:"subtotal_price",header:()=>i.jsx("div",{className:"text-right",children:w("quotes.form_fields.items.subtotal_price.label")}),cell:({row:{index:B}})=>i.jsx(Fa,{variant:"ghost",currency:n,language:a,scale:2,readOnly:!0,className:"text-right",name:`items.${B}.subtotal_price`}),size:150},{id:"discount",accessorKey:"discount",header:()=>i.jsx("div",{className:"text-right",children:w("quotes.form_fields.items.discount.label")}),cell:({row:{index:B}})=>i.jsx(Hi,{scale:2,className:"text-right",name:`items.${B}.discount`}),size:100},{id:"total_price",accessorKey:"total_price",header:()=>i.jsx("div",{className:"text-right",children:w("quotes.form_fields.items.total_price.label")}),cell:({row:{index:B}})=>i.jsx(Fa,{variant:"ghost",currency:n,language:a,scale:2,readOnly:!0,className:"font-semibold text-right",name:`items.${B}.total_price`}),size:150}],{enableDragHandleColumn:!0,enableSelectionColumn:!0}),q=M.useCallback((B,se=1)=>{D.append({...B,quantity:{amount:100*se,scale:pn.DEFAULT_SCALE},unit_price:B.retail_price,discount:{amount:null,scale:2}}),o({title:w
${B.body}`,quantity:{amount:null,scale:pn.DEFAULT_SCALE},unit_price:{amount:null,scale:ab.DEFAULT_SCALE},discount:{amount:null,scale:2}}),o({title:w("quotes.blocks_picker_dialog.toast_article_added"),description:B.title})},[D]),[Q,O]=M.useState(!1),k=[265,440,655],H=4;return v==="dialog"?i.jsxs("div",{className:"relative",children:[i.jsx(Ec,{actions:{...D,getItem:B=>c(`items.${B}`),pickCatalogArticle:()=>y(!0),pickBlock:()=>E(!0)},columns:F,data:j,defaultValues:r,showLineDiscountColumn:p,hasLineDiscounts:x,onShowLineDiscountColumnChange:B=>d("show_line_discount_column",B,{shouldDirty:!0})}),i.jsx(Hw,{onSelect:q,isOpen:R,onOpenChange:y}),i.jsx(Gw,{onSelect:$,isOpen:b,onOpenChange:E})]}):i.jsxs(Z0,{direction:"horizontal",autoSaveId:"uecko.quotes.details_layout",className:"items-stretch h-full",children:[i.jsx(wc,{defaultSize:k[0],collapsedSize:H,collapsible:!0,minSize:50,maxSize:90,onCollapse:()=>{O(!0)},onExpand:()=>{O(!1)},className:he(Q&&"min-w-[50px] transition-all duration-300 ease-in-out"),children:i.jsx(Ec,{actions:{...D,getItem:B=>c(`items.${B}`)},columns:F,data:j,defaultValues:r,showLineDiscountColumn:p,hasLineDiscounts:x,onShowLineDiscountColumnChange:B=>d("show_line_discount_column",B,{shouldDirty:!0})})}),i.jsx(J0,{withHandle:!0,className:"mx-3"}),i.jsx(wc,{defaultSize:k[1],minSize:10,children:i.jsx(nr,{syncWithLocation:!1,children:i.jsx(to,{onSelect:q})})})]})},Ww=()=>{const{formState:n}=lr();return i.jsxs("div",{className:"grid gap-6 md:grid-cols-6",children:[i.jsxs(Ha,{className:"md:col-span-6",title:w("quotes.create.form_groups.general.title"),description:w("quotes.create.form_groups.general.desc"),children:[i.jsxs("div",{className:"grid grid-cols-6 gap-6",children:[i.jsx(Fn,{required:!0,className:"col-span-2",label:w("quotes.form_fields.customer_reference.label"),description:w("quotes.form_fields.customer_reference.desc"),disabled:n.disabled,placeholder:w("quotes.form_fields.customer_reference.placeholder"),name:"customer_reference"}),i.jsx(Uc,{required:!0,label:w("quotes.form_fields.date.label"),description:w("quotes.form_fields.date.desc"),disabled:n.disabled,placeholder:w("quotes.form_fields.date.placeholder"),name:"date"}),i.jsx(Fn,{label:w("quotes.form_fields.validity.label"),description:w("quotes.form_fields.validity.desc"),disabled:n.disabled,placeholder:w("quotes.form_fields.validity.placeholder"),name:"validity"}),i.jsx(qt,{className:"col-span-2",label:w("quotes.form_fields.payment_method.label"),description:w("quotes.form_fields.payment_method.desc"),disabled:n.disabled,placeholder:w("quotes.form_fields.payment_method.placeholder"),name:"payment_method"})]}),i.jsxs("div",{className:"grid grid-cols-6 gap-6",children:[i.jsx(qt,{className:"col-span-3",required:!0,label:w("quotes.form_fields.customer_information.label"),description:w("quotes.form_fields.customer_information.desc"),disabled:n.disabled,placeholder:w("quotes.form_fields.customer_information.placeholder"),name:"customer_information",errors:n.errors}),i.jsx(qt,{className:"col-span-3",label:w("quotes.form_fields.notes.label"),description:w("quotes.form_fields.notes.desc"),disabled:n.disabled,placeholder:w("quotes.form_fields.notes.placeholder"),name:"notes"})]})]}),i.jsx(Ha,{className:"hidden md:col-span-2",title:w("quotes.create.form_groups.status.title"),description:w("quotes.create.form_groups.status.desc"),children:i.jsxs("div",{className:"grid gap-6",children:[i.jsxs("div",{className:"grid gap-3",children:[i.jsx(cr,{htmlFor:"status",children:"Status"}),i.jsxs(so,{children:[i.jsx(ao,{id:"status","aria-label":"Select status",children:i.jsx(oo,{placeholder:"Select status"})}),i.jsxs(lo,{children:[i.jsx(Or,{value:"draft",children:"Draft"}),i.jsx(Or,{value:"published",children:"Active"}),i.jsx(Or,{value:"archived",children:"Archived"})]})]})]}),i.jsx(Fn,{required:!0,label:w("quotes.form_fields.lang_code.label"),description:w("quotes.form_fields.lang_code.desc"),placeholder:w("quotes.form_fields.lang_code.placeholder"),name:"lang_code"}),i.jsx(Fn,{required:!0,label:w("quotes.form_fields.currency_code.label"),description:w("quotes.form_fiel
`).map((be,Je)=>i.jsxs("span",{className:Je===0?"font-medium":"hidden text-sm text-muted-foreground md:inline",children:[be,i.jsx("br",{})]},Je))}),size:500}],Me=[{id:"row-actions",header:()=>null,cell:({row:{original:U}})=>{const be=(U==null?void 0:U.status)==="accepted"&&!(U!=null&&U.date_sent),Je=(U==null?void 0:U.status)==="accepted"&&!!(U!=null&&U.date_sent),it=(U==null?void 0:U.status)==="archived";return i.jsxs("div",{className:"flex gap-1",children:[i.jsxs(tr,{className:"gap-0",children:[i.jsxs(He,{children:[i.jsx(Ke,{asChild:!0,children:i.jsxs(G,{variant:"ghost",size:"icon",disabled:Je,onClick:_n=>{_n.preventDefault(),se(U)},children:[i.jsx(hd,{className:"w-4 h-4"}),i.jsx("span",{className:"sr-only",children:"Editar"})]})}),i.jsx(We,{children:i.jsx("p",{children:"Editar"})})]}),i.jsxs(He,{children:[i.jsx(Ke,{asChild:!0,children:i.jsxs(G,{variant:"ghost",size:"icon",onClick:_n=>{_n.preventDefault(),ce(U.id)},children:[i.jsx(jo,{className:"w-4 h-4"}),i.jsx("span",{className:"sr-only",children:"Duplicar"})]})}),i.jsx(We,{children:i.jsx("p",{children:"Duplicar"})})]}),i.jsxs(He,{children:[i.jsx(Ke,{asChild:!0,children:i.jsxs(G,{variant:"ghost",size:"icon",onClick:()=>{k(U.id,j(U))},children:[i.jsx(fd,{className:"w-4 h-4"}),i.jsx("span",{className:"sr-only",children:"Descargar"})]})}),i.jsx(We,{children:i.jsx("p",{children:"Descargar"})})]}),i.jsxs(He,{children:[i.jsx(Ke,{asChild:!0,children:i.jsxs(G,{variant:"ghost",size:"icon",disabled:it||Je,onClick:_n=>{_n.preventDefault(),Y(U.id)},children:[i.jsx(cd,{className:"w-4 h-4"}),i.jsx("span",{className:"sr-only",children:"Archivar"})]})}),i.jsx(We,{children:i.jsx("p",{children:"Archivar"})})]})]}),i.jsx(tr,{children:i.jsx(Kd,{id:U.id,onSentTo:()=>null,disabled:Je||!be})})]})}}];return a?je:[...je,...Me]},[a]),{table:ee}=os({data:(q==null?void 0:q.items)??[],columns:rt,pageCount:(q==null?void 0:q.total_pages)??-1});return M.useEffect(()=>{ee&&q&&(q==null?void 0:q.total_pages)>0&&v(ee.getRowModel().rows[0])},[q,ee]),Q?i.jsx(ur,{subtitle:O.message}):$?i.jsxs("div",{className:"grid items-start flex-1 gap-4 sm:py-0 md:gap-8 lg:grid-cols-3 xl:grid-cols-3",children:[i.jsx(Le,{className:"grid items-start gap-4 auto-rows-max md:gap-8 lg:col-span-2",children:i.jsx(Oe,{children:i.jsx(ss,{columnCount:6,searchableColumnCount:1,filterableColumnCount:2,shrinkZero:!0})})}),i.jsx("div",{})]}):(q==null?void 0:q.total_items)===0&&!p?i.jsx(Le,{children:i.jsx(Oe,{children:i.jsx(as,{subtitle:"Empieza creando alguna cotización",buttonText:w("quotes.create.title"),onButtonClick:()=>r("add",{relative:"path"})})})}):i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex flex-col items-stretch flex-1 gap-4 xl:flex-row",children:[i.jsx("div",{id:l,className:"flex items-stretch flex-1",children:i.jsx(is,{table:ee,paginationOptions:{visible:!0},className:"grid items-start flex-1 gap-4 auto-rows-max md:gap-8 lg:col-span-2",onRowClick:W,activeRowIndex:x==null?void 0:x.index,children:i.jsx(Bd,{table:ee})})}),a&&i.jsx("div",{id:c,className:"flex items-stretch ",children:i.jsx(Xw,{quoteId:x==null?void 0:x.original.id})})]}),i.jsx(Gd,{...H,onFinishDownload:B})]})},pS=()=>{const n=zt(),a=Tw(),{toast:r}=vn(),[o,l]=M.useState(Ma.createDefaultCode().object),[c,d]=M.useState(Pr.createDefaultCode().object),h=M.useMemo(()=>({date:"",reference:"",customer_reference:"",customer_information:"",lang_code:"",currency_code:"",payment_method:"",notes:"",validity:"",show_line_discount_column:!0,subtotal_price:{amount:void 0,scale:2,currency_code:""},discount:{amount:0,scale:0},discount_price:{amount:0,scale:0,currency_code:""},before_tax_price:{amount:void 0,scale:2,currency_code:""},tax:{amount:void 0,scale:0},tax_price:{amount:void 0,scale:2,currency_code:""},total_price:{amount:void 0,scale:2,currency_code:""},items:[{id_article:"",description:"",quantity:{amount:null,scale:2},unit_price:{amount:null,scale:2,currency_code:o.code},subtotal_price:{amount:null,scale:2,currency_code:o.code},discount:{amount:null,scale:2},total_price:{amount:null,scale:2,currency_code:o.code}}]}),[o.code]),{useOne:p,useUpdate:x}=Ur