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

335 lines
320 KiB
JavaScript
Raw Normal View History

var r0=Object.defineProperty;var s0=(t,a,s)=>a in t?r0(t,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[a]=s;var Me=(t,a,s)=>s0(t,typeof a!="symbol"?a+"":a,s);import{u as Vc,a as jn,b as sn,c as cr,d as Re,j as r,e as me,P as i0,f as a0,g as o0,N as bi,R as Qe,J as Vt,h as Ye,i as Lr,D as Or,l as so,M as It,V as l0,r as D,k as Hc,m as Gc,n as Cn,o as Kc,B as U,C as u0,p as Sn,q as Nn,s as Rn,S as Io,t as En,v as mi,w as C,x as wi,y as ji,z as yi,A as Ci,E as us,F as Fo,G as Un,H as zn,I as Vn,K as Hn,L as c0,O as Xt,Q as d0,T as f0,U as m0,W as We,X as Ve,Y as ht,Z as et,_ as it,$ as He,a0 as lr,a1 as Si,a2 as g0,a3 as Do,a4 as jt,a5 as Ni,a6 as Ri,a7 as zt,a8 as Ut,a9 as Wc,aa as h0,ab as ds,ac as ln,ad as To,ae as Mo,af as Tr,ag as Lo,ah as Qc,ai as Oo,aj as Po,ak as qo,al as ms,am as p0,an as ir,ao as Ac,ap as x0,aq as v0,ar as _0,as as ko,at as $n,au as un,av as Qn,aw as Ei,ax as Yc,ay as b0,az as Xc,aA as w0,aB as ae,aC as Ai,aD as vo,aE as Zc,aF as Jc,aG as ed,aH as dr,aI as td,aJ as Ii,aK as gs,aL as hs,aM as ps,aN as fs,aO as j0,aP as nd,aQ as at,aR as ot,aS as _o,aT as lt,aU as Gn,aV as $r,aW as Pr,aX as y0,aY as C0,aZ as rd,a_ as gi,a$ as S0,b0 as N0,b1 as Ir,b2 as rn,b3 as sd,b4 as Fr,b5 as id,b6 as ad,b7 as R0,b8 as E0,b9 as od,ba as A0,bb as ld,bc as hi,bd as ud,be as Jt,bf as qr,bg as an,bh as I0,bi as fr,bj as cd,bk as F0,bl as D0,bm as dd,bn as fd,bo as md,bp as gd,bq as hd,br as pd,bs as xd,bt as vd,bu as _d,bv as xs,bw as bd,bx as bo,by as wo,bz as T0,bA as M0,bB as L0,bC as O0,bD as P0,bE as Ic,bF as wd,bG as jd,bH as yd,bI as Cd,bJ as Sd,bK as Nd,bL as Rd,bM as q0,bN as io,bO as Dr,bP as k0,bQ as Ed,bR as $0,bS as B0,bT as Ad,bU as Id,bV as jo,bW as yo,bX as U0,bY as z0,bZ as V0}from"./index-C3U0yXJT.js";const H0=t=>{const{onSuccess:a,...s}=t||{},o=cr(),{login:l}=Vc(),d=jn();return sn({mutationKey:o().auth().action("login").get(),mutationFn:l,onSuccess:async(c,m,g)=>{c.success&&d.removeQueries({queryKey:o().auth().get()}),await(a==null?void 0:a(c,m,g))},...s})};/**
* @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=Re("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 G0=Re("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 Fc=Re("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 Dc=Re("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 K0=Re("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 W0=Re("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=Re("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 Q0=Re("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 Y0=Re("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 X0=Re("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 Fi=Re("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 Td=Re("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 Z0=Re("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 Md=Re("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 J0=Re("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 eb=Re("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 Ld=Re("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
* @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 Od=Re("FolderPlus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
* @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 tb=Re("FolderX",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"m9.5 10.5 5 5",key:"ra9qjz"}],["path",{d:"m14.5 10.5-5 5",key:"l2rkpq"}]]);/**
* @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 nb=Re("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
* @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=Re("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 rb=Re("ListPlus",[["path",{d:"M11 12H3",key:"51ecnj"}],["path",{d:"M16 6H3",key:"1wxfjs"}],["path",{d:"M16 18H3",key:"12xzn7"}],["path",{d:"M18 9v6",key:"1twb98"}],["path",{d:"M21 12h-6",key:"bt1uis"}]]);/**
* @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 sb=Re("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 $o=Re("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 Bo=Re("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 ib=Re("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 ab=Re("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 ob=Re("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 qd=Re("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 pi=Re("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"}]]);function lb({className:t,...a}){return r.jsx("div",{"data-slot":"empty",className:me("flex min-w-0 flex-col items-center justify-center gap-6 rounded-lg border border-dashed border-transparent p-6 text-center md:p-8",t),...a})}function ub({className:t,...a}){return r.jsx("div",{"data-slot":"empty-header",className:me("flex max-w-sm flex-col items-center gap-2 text-center",t),...a})}function cb({className:t,variant:a="default",...s}){return r.jsx("div",{"data-slot":"empty-media","data-variant":a,className:me("flex shrink-0 items-center justify-center",a==="icon"&&"h-10 w-10 rounded-lg bg-muted text-foreground [&_svg]:h-6 [&_svg]:w-6",t),...s})}function db({className:t,...a}){return r.jsx("div",{"data-slot":"empty-title",className:me("text-lg font-medium tracking-tight",t),...a})}function fb({className:t,...a}){return r.jsx("p",{"data-slot":"empty-description",className:me("text-sm leading-relaxed text-muted-foreground",t),...a})}function mb({className:t,...a}){return r.jsx("div",{"data-slot":"empty-content",className:me("flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm",t),...a})}const gb=({className:t,...a})=>r.jsx(a0,{className:me("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),...a}),Tc=i0,hb=({withHandle:t,className:a,...s})=>r.jsx(o0,{className:me("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),...s,children:t&&r.jsx("div",{className:"z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border",children:r.jsx(Pd,{className:"h-2.5 w-2.5"})})});function wt({className:t,...a}){return r.jsx("div",{className:me("animate-pulse rounded-md bg-muted",t),...a})}const pb=t=>typeof t=="object"&&t!==null&&t.hasOwnProperty("total_items");let oi;const xb=new Uint8Array(16);function vb(){if(!oi&&(oi=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!oi))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return oi(xb)}const st=[];for(let t=0;t<256;++t)st.push((t+256).toString(16).slice(1));function _b(t,a=0){return st[t[a+0]]+st[t[a+1]]+st[t[a+2]]+st[t[a+3]]+"-"+st[t[a+4]]+st[t[a+5]]+"-"+st[t[a+6]]+st[t[a+7]]+"-"+st[t[a+8]]+st[t[a+9]]+"-"+st[t[a+10]]+st[t[a+11]]+st[t[a+12]]+st[t[a+13]]+st[t[a+14]]+st[t[a+15]]}const bb=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Mc={randomUUID:bb};function wb(t,a,s){if(Mc.randomUUID&&!t)return Mc.randomUUID();t=t||{};const o=t.random||(t.rng||vb)();return o[6]=o[6]&15|64,o[8]=o[8]&63|128,_b(o)}class wn extends bi{static validate(a,s){const o=Qe.RULE_ALLOW_EMPTY.default(""),l=Vt.string().guid({version:["uuidv4"]}).label(s.label?s.label:"id"),d=Vt.alternatives(o,l);return Qe.validate(d,a)}static sanitize(a){return a.trim()}static create(a,s={}){const o={label:"id",generateOnEmpty:!1,...s};if(!a&&!o.generateOnEmpty)return Ye.fail(Lr(Or.INVALID_INPUT_DATA,"ID is null or empty"));if(a){const l=wn.validate(a,o);return l.isFailure?Ye.fail(Lr(Or.INVALID_INPUT_DATA,l.error.message,o)):Ye.ok(new wn(wn.sanitize(l.object)))}return o.generateOnEmpty?wn.generateNewID():Ye.ok(new wn(null))}static generateNewID(){return Ye.ok(new wn(wb()))}get value
* 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 Rb(){return{accessor:(t,a)=>typeof t=="function"?{...a,accessorFn:t}:{...a,accessorKey:t},display:t=>t,group:t=>t}}function Bn(t,a){return typeof t=="function"?t(a):t}function Ft(t,a){return s=>{a.setState(o=>({...o,[t]:Bn(s,o[t])}))}}function Di(t){return t instanceof Function}function Eb(t){return Array.isArray(t)&&t.every(a=>typeof a=="number")}function Ab(t,a){const s=[],o=l=>{l.forEach(d=>{s.push(d);const c=a(d);c!=null&&c.length&&o(c)})};return o(t),s}function ee(t,a,s){let o=[],l;return d=>{let c;s.key&&s.debug&&(c=Date.now());const m=t(d);if(!(m.length!==o.length||m.some((v,b)=>o[b]!==v)))return l;o=m;let x;if(s.key&&s.debug&&(x=Date.now()),l=a(...m),s==null||s.onChange==null||s.onChange(l),s.key&&s.debug&&s!=null&&s.debug()){const v=Math.round((Date.now()-c)*100)/100,b=Math.round((Date.now()-x)*100)/100,j=b/16,_=(N,I)=>{for(N=String(N);N.length<I;)N=" "+N;return N};console.info(`%c⏱ ${_(b,5)} /${_(v,5)} ms`,`
font-size: .6rem;
font-weight: bold;
color: hsl(${Math.max(0,Math.min(120-120*j,120))}deg 100% 31%);`,s==null?void 0:s.key)}return l}}function te(t,a,s,o){return{debug:()=>{var l;return(l=t==null?void 0:t.debugAll)!=null?l:t[a]},key:!1,onChange:o}}function Ib(t,a,s,o){const l=()=>{var c;return(c=d.getValue())!=null?c:t.options.renderFallbackValue},d={id:`${a.id}_${s.id}`,row:a,column:s,getValue:()=>a.getValue(o),renderValue:l,getContext:ee(()=>[t,s,a,d],(c,m,g,x)=>({table:c,column:m,row:g,cell:x,getValue:x.getValue,renderValue:x.renderValue}),te(t.options,"debugCells"))};return t._features.forEach(c=>{c.createCell==null||c.createCell(d,s,a,t)},{}),d}function Fb(t,a,s,o){var l,d;const m={...t._getDefaultColumnDef(),...a},g=m.accessorKey;let x=(l=(d=m.id)!=null?d:g?typeof String.prototype.replaceAll=="function"?g.replaceAll(".","_"):g.replace(/\./g,"_"):void 0)!=null?l:typeof m.header=="string"?m.header:void 0,v;if(m.accessorFn?v=m.accessorFn:g&&(g.includes(".")?v=j=>{let _=j;for(const I of g.split(".")){var N;_=(N=_)==null?void 0:N[I]}return _}:v=j=>j[m.accessorKey]),!x)throw new Error;let b={id:`${String(x)}`,accessorFn:v,parent:o,depth:s,columnDef:m,columns:[],getFlatColumns:ee(()=>[!0],()=>{var j;return[b,...(j=b.columns)==null?void 0:j.flatMap(_=>_.getFlatColumns())]},te(t.options,"debugColumns")),getLeafColumns:ee(()=>[t._getOrderColumnsFn()],j=>{var _;if((_=b.columns)!=null&&_.length){let N=b.columns.flatMap(I=>I.getLeafColumns());return j(N)}return[b]},te(t.options,"debugColumns"))};for(const j of t._features)j.createColumn==null||j.createColumn(b,t);return b}const dt="debugHeaders";function Oc(t,a,s){var o;let d={id:(o=s.id)!=null?o:a.id,column:a,index:s.index,isPlaceholder:!!s.isPlaceholder,placeholderId:s.placeholderId,depth:s.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const c=[],m=g=>{g.subHeaders&&g.subHeaders.length&&g.subHeaders.map(m),c.push(g)};return m(d),c},getContext:()=>({table:t,header:d,column:a})};return t._features.forEach(c=>{c.createHeader==null||c.createHeader(d,t)}),d}const Db={createTable:t=>{t.getHeaderGroups=ee(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(a,s,o,l)=>{var d,c;const m=(d=o==null?void 0:o.map(b=>s.find(j=>j.id===b)).filter(Boolean))!=null?d:[],g=(c=l==null?void 0:l.map(b=>s.find(j=>j.id===b)).filter(Boolean))!=null?c:[],x=s.filter(b=>!(o!=null&&o.includes(b.id))&&!(l!=null&&l.includes(b.id)));return li(a,[...m,...x,...g],t)},te(t.options,dt)),t.getCenterHeaderGroups=ee(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(a,s,o,l)=>(s=s.filter(d=>!(o!=null&&o.includes(d.id))&&!(l!=null&&l.includes(d.id))),li(a,s,t,"center")),te(t.options,dt)),t.getLeftHeaderGroups=ee(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left],(a,s,o)=>{var l;const d=(l=o==null?void 0:o.map(c=>s.find(m=>m.id===c)).filter(Boolean))!=null?l:[];return li(a,d,t,"left")},te(t.options,dt)),t.getRightHeaderGroups=ee(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.right],(a,s,o)=>{var l;const d=(l=o==null?void 0:o.map(c=>s.find(m=>m.id===c)).filter(Boolean))!=null?l:[];return li(a,d,t,"right")},te(t.options,dt)),t.getFooterGroups=ee(()=>[t.getHeaderGroups()],a=>[...a].reverse(),te(t.options,dt)),t.getLeftFooterGroups=ee(()=>[t.getLeftHeaderGroups()],a=>[...a].reverse(),te(t.options,dt)),t.getCenterFooterGroups=ee(()=>[t.getCenterHeaderGroups()],a=>[...a].reverse(),te(t.options,dt)),t.getRightFooterGroups=ee(()=>[t.getRightHeaderGroups()],a=>[...a].reverse(),te(t.options,dt)),t.getFlatHeaders=ee(()=>[t.getHeaderGroups()],a=>a.map(s=>s.headers).flat(),te(t.options,dt)),t.getLeftFlatHeaders=ee(()=>[t.getLeftHeaderGroups()],a=>a.map(s=>s.headers).flat(),te(t.options,dt)),t.getCenterFlatHeaders=ee(()=>[t.getCenterHeaderGroups()],a=>a.map(s=>s.headers).flat(),te(t.options,dt)),t.getRightFlatHeaders=ee(()=>[t.getRightHeaderGroups()],a=>a.map(s=>s.headers).flat(),te(t.options,dt)),t.getCenterLeafHeaders=ee(()=>[t.getCenter
* 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 kr(t,a){return t?vw(t)?D.createElement(t,a):t:null}function vw(t){return _w(t)||typeof t=="function"||bw(t)}function _w(t){return typeof t=="function"&&(()=>{const a=Object.getPrototypeOf(t);return a.prototype&&a.prototype.isReactComponent})()}function bw(t){return typeof t=="object"&&typeof t.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(t.$$typeof.description)}function Wo(t){const a={state:{},onStateChange:()=>{},renderFallbackValue:null,...t},[s]=D.useState(()=>({current:dw(a)})),[o,l]=D.useState(()=>s.current.initialState);return s.current.setOptions(d=>({...d,...t,state:{...o,...t.state},onStateChange:c=>{l(c),t.onStateChange==null||t.onStateChange(c)}})),s.current}const ww=({buttonText:t,title:a="",content:s,className:o=""})=>r.jsx("div",{className:`flex items-baseline justify-center mr-4 font-medium ${o}`,children:r.jsxs(Cn,{children:[r.jsx(Kc,{asChild:!0,children:r.jsxs(U,{variant:"link",className:"inline-flex items-center font-medium group",children:[r.jsx("span",{className:"underline-offset-4 group-hover:underline",children:t}),r.jsx(u0,{className:"w-4 h-4 ml-1 text-muted-foreground"})]})}),r.jsxs(Sn,{className:"sm:max-w-[425px]",children:[r.jsx(Nn,{children:r.jsx(Rn,{children:a})}),r.jsxs(Io,{className:"grid gap-4 py-2",children:[s,r.jsx(En,{children:r.jsx(mi,{asChild:!0,children:r.jsx(U,{type:"button",children:C("common.close")})})})]})]})]})});function jw(t){let o=0;for(let v=0;v<t.length;v++)o=t.charCodeAt(v)+((o<<5)-o);let l="#";for(let v=0;v<3;v++){const b=o>>v*8&255;l+=("00"+b.toString(16)).substr(-2)}const d=parseInt(l.substr(1,2),16),c=parseInt(l.substr(3,2),16),m=parseInt(l.substr(5,2),16),g=`#${(d*.7|0).toString(16).padStart(2,"0")}${(c*.7|0).toString(16).padStart(2,"0")}${(m*.7|0).toString(16).padStart(2,"0")}`,x=`#${Math.min(255,Math.floor(d+(255-d)*.7)).toString(16).padStart(2,"0")}${Math.min(255,Math.floor(c+(255-c)*.7)).toString(16).padStart(2,"0")}${Math.min(255,Math.floor(m+(255-m)*.7)).toString(16).padStart(2,"0")}`;return[g,x]}const Jd=({label:t,className:a})=>{const[s,o]=jw(t);return r.jsx(wi,{className:a,style:a?{}:{backgroundColor:o,color:s},children:t})};function ef({table:t,header:a,className:s}){return a.column.getCanSort()?r.jsx("div",{className:me("flex items-center space-x-2",s),children:r.jsxs(ji,{children:[r.jsx(yi,{asChild:!0,children:r.jsxs(U,{"aria-label":a.column.getIsSorted()==="desc"?C("common.sort_desc_description"):a.column.getIsSorted()==="asc"?C("common.sort_asc_description"):C("common.sort_none_description"),size:"sm",variant:"ghost",className:"-ml-3 h-8 data-[state=open]:bg-accent font-bold text-muted-foreground",children:[kr(a.column.columnDef.header,a.getContext()),a.column.getIsSorted()==="desc"?r.jsx(Fc,{className:"w-4 h-4 ml-2","aria-hidden":"true"}):a.column.getIsSorted()==="asc"?r.jsx(Dc,{className:"w-4 h-4 ml-2","aria-hidden":"true"}):r.jsx(G0,{className:"w-4 h-4 ml-2 text-muted-foreground/30","aria-hidden":"true"})]})}),r.jsxs(Ci,{align:"start",children:[a.column.getCanSort()&&r.jsxs(r.Fragment,{children:[r.jsxs(us,{onClick:()=>a.column.toggleSorting(!1),"aria-label":C("common.sort_asc"),children:[r.jsx(Dc,{className:"mr-2 h-3.5 w-3.5 text-muted-foreground/70","aria-hidden":"true"}),C("common.sort_asc")]}),r.jsxs(us,{onClick:()=>a.column.toggleSorting(!0),"aria-label":C("common.sort_desc"),children:[r.jsx(Fc,{className:"mr-2 h-3.5 w-3.5 text-muted-foreground/70","aria-hidden":"true"}),C("common.sort_desc")]})]}),a.column.getCanSort()&&a.column.getCanHide()&&r.jsx(Fo,{}),a.column.getCanHide()&&r.jsxs(us,{onClick:()=>a.column.toggleVisibility(!1),"aria-label":C("common.hide"),children:[r.jsx(Md,{className:"mr-2 h-3.5 w-3.5 text-muted-foreground/70","aria-hidden":"true"}),C("common.hide")]})]})]})}):r.jsxs(r.Fragment,{children:[r.jsx("div",{className:me("data-[state=open]:bg-accent tracking-wide text-ellipsis",s),children:a.isPlaceholder?null:kr(a.column.columnDef.header,a.getContext())}),!1]})}function yw({table:t,className:a,enablePageSizeSelector:s=!0,visible:o="auto"}){const l=D.useMemo(()=>o===!0,[o]),d=D.useMemo(()=>o==="aut
* @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
*/_i.exports;(function(t,a){(function(){var s,o="4.17.21",l=200,d="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",m="Invalid `variable` option passed into `_.template`",g="__lodash_hash_undefined__",x=500,v="__lodash_placeholder__",b=1,j=2,_=4,N=1,I=2,$=1,L=2,A=4,E=8,T=16,q=32,Y=64,H=128,ce=256,pe=512,le=30,fe="...",V=800,Z=16,xe=1,Be=2,X=3,Pe=1/0,_e=9007199254740991,je=17976931348623157e292,W=NaN,K=4294967295,Se=K-1,Dt=K>>>1,yt=[["ary",H],["bind",$],["bindKey",L],["curry",E],["curryRight",T],["flip",pe],["partial",q],["partialRight",Y],["rearg",ce]],Tt="[object Arguments]",B="[object Array]",be="[object AsyncFunction]",Ee="[object Boolean]",De="[object Date]",Le="[object DOMException]",ye="[object Error]",ge="[object Function]",pt="[object GeneratorFunction]",tt="[object Map]",Ht="[object Number]",An="[object Null]",cn="[object Object]",Jo="[object Promise]",wf="[object Proxy]",Ur="[object RegExp]",Gt="[object Set]",zr="[object String]",vs="[object Symbol]",jf="[object Undefined]",Vr="[object WeakMap]",yf="[object WeakSet]",Hr="[object ArrayBuffer]",hr="[object DataView]",Pi="[object Float32Array]",qi="[object Float64Array]",ki="[object Int8Array]",$i="[object Int16Array]",Bi="[object Int32Array]",Ui="[object Uint8Array]",zi="[object Uint8ClampedArray]",Vi="[object Uint16Array]",Hi="[object Uint32Array]",Cf=/\b__p \+= '';/g,Sf=/\b(__p \+=) '' \+/g,Nf=/(__e\(.*?\)|\b__t\)) \+\n'';/g,el=/&(?:amp|lt|gt|quot|#39);/g,tl=/[&<>"']/g,Rf=RegExp(el.source),Ef=RegExp(tl.source),Af=/<%-([\s\S]+?)%>/g,If=/<%([\s\S]+?)%>/g,nl=/<%=([\s\S]+?)%>/g,Ff=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Df=/^\w*$/,Tf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Gi=/[\\^$.*+?()[\]{}|]/g,Mf=RegExp(Gi.source),Ki=/^\s+/,Lf=/\s/,Of=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Pf=/\{\n\/\* \[wrapped with (.+)\] \*/,qf=/,? & /,kf=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,$f=/[()=,{}\[\]\/\s]/,Bf=/\\(\\)?/g,Uf=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,rl=/\w*$/,zf=/^[-+]0x[0-9a-f]+$/i,Vf=/^0b[01]+$/i,Hf=/^\[object .+?Constructor\]$/,Gf=/^0o[0-7]+$/i,Kf=/^(?:0|[1-9]\d*)$/,Wf=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_s=/($^)/,Qf=/['\n\r\u2028\u2029\\]/g,bs="\\ud800-\\udfff",Yf="\\u0300-\\u036f",Xf="\\ufe20-\\ufe2f",Zf="\\u20d0-\\u20ff",sl=Yf+Xf+Zf,il="\\u2700-\\u27bf",al="a-z\\xdf-\\xf6\\xf8-\\xff",Jf="\\xac\\xb1\\xd7\\xf7",em="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",tm="\\u2000-\\u206f",nm=" \\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",ol="A-Z\\xc0-\\xd6\\xd8-\\xde",ll="\\ufe0e\\ufe0f",ul=Jf+em+tm+nm,Wi="['’]",rm="["+bs+"]",cl="["+ul+"]",ws="["+sl+"]",dl="\\d+",sm="["+il+"]",fl="["+al+"]",ml="[^"+bs+ul+dl+il+al+ol+"]",Qi="\\ud83c[\\udffb-\\udfff]",im="(?:"+ws+"|"+Qi+")",gl="[^"+bs+"]",Yi="(?:\\ud83c[\\udde6-\\uddff]){2}",Xi="[\\ud800-\\udbff][\\udc00-\\udfff]",pr="["+ol+"]",hl="\\u200d",pl="(?:"+fl+"|"+ml+")",am="(?:"+pr+"|"+ml+")",xl="(?:"+Wi+"(?:d|ll|m|re|s|t|ve))?",vl="(?:"+Wi+"(?:D|LL|M|RE|S|T|VE))?",_l=im+"?",bl="["+ll+"]?",om="(?:"+hl+"(?:"+[gl,Yi,Xi].join("|")+")"+bl+_l+")*",lm="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",um="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",wl=bl+_l+om,cm="(?:"+[sm,Yi,Xi].join("|")+")"+wl,dm="(?:"+[gl+ws+"?",ws,Yi,Xi,rm].join("|")+")",fm=RegExp(Wi,"g"),mm=RegExp(ws,"g"),Zi=RegExp(Qi+"(?="+Qi+")|"+dm+wl,"g"),gm=RegExp([pr+"?"+fl+"+"+xl+"(?="+[cl,pr,"$"].join("|")+")",am+"+"+vl+"(?="+[cl,pr+pl,"$"].join("|")+")",pr+"?"+pl+"+"+xl,pr+"+"+vl,um,lm,dl,cm].join("|"),"g"),hm=RegExp("["+hl+bs+sl+ll+"]"),pm=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,xm=["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"],v
/* [wrapped with `+n+`] */
`)}function Lh(e){return ie(e)||sr(e)||!!(Vl&&e&&e[Vl])}function pn(e,n){var i=typeof e;return n=n??_e,!!n&&(i=="number"||i!="symbol"&&Kf.test(e))&&e>-1&&e%1==0&&e<n}function mt(e,n,i){if(!$e(i))return!1;var u=typeof n;return(u=="number"?vt(i)&&pn(n,i.length):u=="string"&&n in i)?Qt(i[n],e):!1}function ka(e,n){if(ie(e))return!1;var i=typeof e;return i=="number"||i=="symbol"||i=="boolean"||e==null||Rt(e)?!0:Df.test(e)||!Ff.test(e)||n!=null&&e in Te(n)}function Oh(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}function $a(e){var n=Ys(e),i=h[n];if(typeof i!="function"||!(n in ve.prototype))return!1;if(e===i)return!0;var u=Oa(i);return!!u&&e===u[0]}function Ph(e){return!!$l&&$l in e}var qh=Ns?xn:ro;function ss(e){var n=e&&e.constructor,i=typeof n=="function"&&n.prototype||wr;return e===i}function $u(e){return e===e&&!$e(e)}function Bu(e,n){return function(i){return i==null?!1:i[e]===n&&(n!==s||e in Te(i))}}function kh(e){var n=ni(e,function(u){return i.size===x&&i.clear(),u}),i=n.cache;return n}function $h(e,n){var i=e[1],u=n[1],f=i|u,p=f<($|L|H),w=u==H&&i==E||u==H&&i==ce&&e[7].length<=n[8]||u==(H|ce)&&n[7].length<=n[8]&&i==E;if(!(p||w))return e;u&$&&(e[2]=n[2],f|=i&$?0:A);var y=n[3];if(y){var R=e[3];e[3]=R?yu(R,y,n[4]):y,e[4]=R?Dn(e[3],v):n[4]}return y=n[5],y&&(R=e[5],e[5]=R?Cu(R,y,n[6]):y,e[6]=R?Dn(e[5],v):n[6]),y=n[7],y&&(e[7]=y),u&H&&(e[8]=e[8]==null?n[8]:ut(e[8],n[8])),e[9]==null&&(e[9]=n[9]),e[0]=n[0],e[1]=f,e}function Bh(e){var n=[];if(e!=null)for(var i in Te(e))n.push(i);return n}function Uh(e){return Es.call(e)}function Uu(e,n,i){return n=Ze(n===s?e.length-1:n,0),function(){for(var u=arguments,f=-1,p=Ze(u.length-n,0),w=F(p);++f<p;)w[f]=u[n+f];f=-1;for(var y=F(n+1);++f<n;)y[f]=u[f];return y[n]=i(w),Ct(e,this,y)}}function zu(e,n){return n.length<2?e:tr(e,kt(n,0,-1))}function zh(e,n){for(var i=e.length,u=ut(n.length,i),f=xt(e);u--;){var p=n[u];e[u]=pn(p,i)?f[p]:s}return e}function Ba(e,n){if(!(n==="constructor"&&typeof e[n]=="function")&&n!="__proto__")return e[n]}var Vu=Gu(mu),is=sg||function(e,n){return nt.setTimeout(e,n)},Ua=Gu(fh);function Hu(e,n,i){var u=n+"";return Ua(e,Mh(u,Vh(Fh(u),i)))}function Gu(e){var n=0,i=0;return function(){var u=lg(),f=Z-(u-i);if(i=u,f>0){if(++n>=V)return arguments[0]}else n=0;return e.apply(s,arguments)}}function Zs(e,n){var i=-1,u=e.length,f=u-1;for(n=n===s?u:n;++i<n;){var p=Ca(i,f),w=e[p];e[p]=e[i],e[i]=w}return e.length=n,e}var Ku=kh(function(e){var n=[];return e.charCodeAt(0)===46&&n.push(""),e.replace(Tf,function(i,u,f,p){n.push(f?p.replace(Bf,"$1"):u||i)}),n});function nn(e){if(typeof e=="string"||Rt(e))return e;var n=e+"";return n=="0"&&1/e==-1/0?"-0":n}function rr(e){if(e!=null){try{return Rs.call(e)}catch{}try{return e+""}catch{}}return""}function Vh(e,n){return Lt(yt,function(i){var u="_."+i[0];n&i[1]&&!js(e,u)&&e.push(u)}),e.sort()}function Wu(e){if(e instanceof ve)return e.clone();var n=new Pt(e.__wrapped__,e.__chain__);return n.__actions__=xt(e.__actions__),n.__index__=e.__index__,n.__values__=e.__values__,n}function Hh(e,n,i){(i?mt(e,n,i):n===s)?n=1:n=Ze(oe(n),0);var u=e==null?0:e.length;if(!u||n<1)return[];for(var f=0,p=0,w=F(Ms(u/n));f<u;)w[p++]=kt(e,f,f+=n);return w}function Gh(e){for(var n=-1,i=e==null?0:e.length,u=0,f=[];++n<i;){var p=e[n];p&&(f[u++]=p)}return f}function Kh(){var e=arguments.length;if(!e)return[];for(var n=F(e-1),i=arguments[0],u=e;u--;)n[u-1]=arguments[u];return Fn(ie(i)?xt(i):[i],rt(n,1))}var Wh=de(function(e,n){return Ge(e)?Jr(e,rt(n,1,Ge,!0)):[]}),Qh=de(function(e,n){var i=$t(n);return Ge(i)&&(i=s),Ge(e)?Jr(e,rt(n,1,Ge,!0),J(i,2)):[]}),Yh=de(function(e,n){var i=$t(n);return Ge(i)&&(i=s),Ge(e)?Jr(e,rt(n,1,Ge,!0),s,i):[]});function Xh(e,n,i){var u=e==null?0:e.length;return u?(n=i||n===s?1:oe(n),kt(e,n<0?0:n,u)):[]}function Zh(e,n,i){var u=e==null?0:e.length;return u?(n=i||n===s?1:oe(n),n=u-n,kt(e,0,n<0?0:n)):[]}function Jh(e,n){return e&&e.length?Vs(e,J(n,3),!0,!0):[]}function ep(e,n){return e&&e.length?Vs(e,J(n,3),!0):[]}function tp(e,n,i,u){var f=e==null?0:e.length;return f?(i&&typeof i!="nu
`;e.replace(z,function(re,he,we,Et,gt,At){return we||(we=Et),k+=e.slice(O,At).replace(Qf,qm),he&&(y=!0,k+=`' +
__e(`+he+`) +
'`),gt&&(R=!0,k+=`';
`+gt+`;
__p += '`),we&&(k+=`' +
((__t = (`+we+`)) == null ? '' : __t) +
'`),O=At+re.length,re}),k+=`';
`;var ne=Ae.call(n,"variable")&&n.variable;if(!ne)k=`with (obj) {
`+k+`
}
`;else if($f.test(ne))throw new se(m);k=(R?k.replace(Cf,""):k).replace(Sf,"$1").replace(Nf,"$1;"),k="function("+(ne||"obj")+`) {
`+(ne?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(y?", __e = _.escape":"")+(R?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+k+`return __p
}`;var ue=Nc(function(){return Ce(p,Q+"return "+k).apply(s,w)});if(ue.source=k,Ka(ue))throw ue;return ue}function c_(e){return Ne(e).toLowerCase()}function d_(e){return Ne(e).toUpperCase()}function f_(e,n,i){if(e=Ne(e),e&&(i||n===s))return Ll(e);if(!e||!(n=Nt(n)))return e;var u=Kt(e),f=Kt(n),p=Ol(u,f),w=Pl(u,f)+1;return Pn(u,p,w).join("")}function m_(e,n,i){if(e=Ne(e),e&&(i||n===s))return e.slice(0,kl(e)+1);if(!e||!(n=Nt(n)))return e;var u=Kt(e),f=Pl(u,Kt(n))+1;return Pn(u,0,f).join("")}function g_(e,n,i){if(e=Ne(e),e&&(i||n===s))return e.replace(Ki,"");if(!e||!(n=Nt(n)))return e;var u=Kt(e),f=Ol(u,Kt(n));return Pn(u,f).join("")}function h_(e,n){var i=le,u=fe;if($e(n)){var f="separator"in n?n.separator:f;i="length"in n?oe(n.length):i,u="omission"in n?Nt(n.omission):u}e=Ne(e);var p=e.length;if(vr(e)){var w=Kt(e);p=w.length}if(i>=p)return e;var y=i-_r(u);if(y<1)return u;var R=w?Pn(w,0,y).join(""):e.slice(0,y);if(f===s)return R+u;if(w&&(y+=R.length-y),Wa(f)){if(e.slice(y).search(f)){var O,P=R;for(f.global||(f=ca(f.source,Ne(rl.exec(f))+"g")),f.lastIndex=0;O=f.exec(P);)var k=O.index;R=R.slice(0,k===s?y:k)}}else if(e.indexOf(Nt(f),y)!=y){var z=R.lastIndexOf(f);z>-1&&(R=R.slice(0,z))}return R+u}function p_(e){return e=Ne(e),e&&Rf.test(e)?e.replace(el,Hm):e}var x_=Nr(function(e,n,i){return e+(i?" ":"")+n.toUpperCase()}),Xa=Ru("toUpperCase");function Sc(e,n,i){return e=Ne(e),n=i?s:n,n===s?$m(e)?Wm(e):Fm(e):e.match(n)||[]}var Nc=de(function(e,n){try{return Ct(e,s,n)}catch(i){return Ka(i)?i:new se(i)}}),v_=hn(function(e,n){return Lt(n,function(i){i=nn(i),mn(e,i,Ha(e[i],e))}),e});function __(e){var n=e==null?0:e.length,i=J();return e=n?ke(e,function(u){if(typeof u[1]!="function")throw new Ot(c);return[i(u[0]),u[1]]}):[],de(function(u){for(var f=-1;++f<n;){var p=e[f];if(Ct(p[0],this,u))return Ct(p[1],this,u)}})}function b_(e){return Hg(qt(e,b))}function Za(e){return function(){return e}}function w_(e,n){return e==null||e!==e?n:e}var j_=Au(),y_=Au(!0);function bt(e){return e}function Ja(e){return iu(typeof e=="function"?e:qt(e,b))}function C_(e){return ou(qt(e,b))}function S_(e,n){return lu(e,qt(n,b))}var N_=de(function(e,n){return function(i){return es(i,e,n)}}),R_=de(function(e,n){return function(i){return es(e,i,n)}});function eo(e,n,i){var u=Je(n),f=Bs(n,u);i==null&&!($e(n)&&(f.length||!u.length))&&(i=n,n=e,e=this,f=Bs(n,Je(n)));var p=!($e(i)&&"chain"in i)||!!i.chain,w=xn(e);return Lt(f,function(y){var R=n[y];e[y]=R,w&&(e.prototype[y]=function(){var O=this.__chain__;if(p||O){var P=e(this.__wrapped__),k=P.__actions__=xt(this.__actions__);return k.push({func:R,args:arguments,thisArg:e}),P.__chain__=O,P}return R.apply(e,Fn([this.value()],arguments))})}),e}function E_(){return nt._===this&&(nt._=eg),this}function to(){}function A_(e){return e=oe(e),de(function(n){return uu(n,e)})}var I_=Da(ke),F_=Da(Il),D_=Da(ra);function Rc(e){return ka(e)?sa(nn(e)):lh(e)}function T_(e){return function(n){return e==null?s:tr(e,n)}}var M_=Fu(),L_=Fu(!0);function no(){return[]}function ro(){return!1}function O_(){return{}}function P_(){return""}function q_(){return!0}function k_(e,n){if(e=oe(e),e<1||e>_e)return[];var i=K,u=ut(e,K);n=J(n),e-=K;for(var f=oa(u,n);++i<e;)n(i);return f}function $_(e){return ie(e)?ke(e,nn):Rt(e)?[e]:xt(Ku(Ne(e)))}function B_(e){var n=++Zm;return Ne(e)+n}var U_=Ks(function(e,n){return e+n},0),z_=Ta("ceil"),V_=Ks(function(e,n){return e/n},1),H_=Ta("floor");function G_(e){return e&&e.length?$s(e,bt,va):s}function K_(e,n){return e&&e.length?$s(e,J(n,2),va):s}function W_(e){return Tl(e,bt)}function Q_(e,n){return Tl(e,J(n,2))}function Y_(e){return e&&e.length?$s(e,bt,ja):s}function X_(e,n){return e&&e.length?$s(e,J(n,2),ja):s}var Z_=Ks(function(e,n){return e*n},1),J_=Ta("round"),e0=Ks(function(e,n){return e-n},0);function t0(e){return e&&e.length?aa(e,bt):0}function n0(e,n){return e&&e.length?aa(e,J(n,2)):0}return h.after=Cx,h.ary=sc,h.assign=dv,h.assignIn=vc,h.assignInWith=ai,h.assignWith=fv,h.at=mv,h.before=ic,h.bind=Ha,h.bindAll=v_,h.bindKey=ac,h.castArray=Ox,h.chain=tc,h.chunk=Hh,h.compact=Gh,h.concat=Kh,h.cond=__,h.conform
[&>tr:not([data-chapter-gap]):not([data-active-item])>td]:border-b
[&>tr:not([data-chapter-gap]):not([data-active-item])>td]:border-b-border
[&>tr:not([data-chapter-gap]):not([data-active-item])>:first-child]:border-l
[&>tr:not([data-chapter-gap]):not([data-active-item])>:first-child]:border-l-border
[&>tr:not([data-chapter-gap]):not([data-active-item])>:last-child]:border-r
[&>tr:not([data-chapter-gap]):not([data-active-item])>:last-child]:border-r-border
[&>tr[data-active-item]>td]:border-destructive/30
[&>tr[data-active-item]>td:first-child]:border-l-4
[&>tr[data-active-item]>td:first-child]:border-l-destructive
[&>tr[data-active-item]>td:last-child]:border-r
[&>tr[data-active-item=detail]>td]:border-t
[&>tr[data-active-item=detail]>td]:border-b-0
[&>tr[data-active-item=actions]>td]:border-b`,style:{transform:gi.Translate.toString(A),transition:E,opacity:T?.6:1},children:[a>0&&r.jsx(jt,{"data-chapter-gap":!0,"aria-hidden":"true",className:"border-0 bg-card hover:bg-card",children:r.jsx(zt,{colSpan:s,className:"h-5 p-0"})}),r.jsx(jt,{className:"group/chapter bg-muted hover:bg-muted [&>td]:border-t [&>td]:py-3 [&>td:first-child]:rounded-tl-md [&>td:last-child]:rounded-tr-md","data-chapter-id":t.id,children:r.jsx(zt,{colSpan:s,className:"px-2",children:r.jsxs("div",{className:"flex items-start gap-2",children:[r.jsxs("div",{className:"relative self-center shrink-0 w-8 h-8 ml-1.5 mr-2.5",children:[r.jsx(U,{type:"button",variant:"ghost",size:"icon",ref:L,...N,...I,className:"w-8 h-8 touch-none cursor-grab active:cursor-grabbing text-muted-foreground",title:g("quotes.chapters.folder_help"),"aria-description":g("quotes.chapters.folder_help"),"aria-expanded":!b,"aria-label":g(b?"quotes.chapters.expand":"quotes.chapters.collapse",{number:a+1}),onFocus:l,onKeyDown:q=>{var Y;q.code==="Enter"&&!T||(Y=I==null?void 0:I.onKeyDown)==null||Y.call(I,q)},onClick:()=>{T||(_(),l())},children:b?r.jsx(nb,{className:"w-5 h-5","aria-hidden":"true"}):r.jsx(Ld,{className:"w-5 h-5","aria-hidden":"true"})}),r.jsx(wi,{"aria-hidden":"true",variant:"secondary",className:"pointer-events-none absolute -right-1 -top-1 flex h-4 min-w-4 items-center justify-center border-background bg-zinc-700 px-1 py-0 text-[10px] leading-none text-white hover:bg-zinc-700",children:a+1})]}),r.jsx(qr,{control:x,name:`chapters.${a}.description`,rules:{validate:q=>!!(q!=null&&q.trim())||g("quotes.chapters.title_required")},render:({field:q,fieldState:Y})=>r.jsxs("div",{className:"flex-1 min-w-0 -ml-px",children:[r.jsx(M0,{...q,value:q.value??"",rows:1,onFocus:l,"aria-label":g("quotes.chapters.title",{number:a+1}),"aria-invalid":!!Y.error,className:"px-0 font-semibold bg-transparent border-transparent shadow-none min-h-10 hover:border-input hover:bg-background focus-visible:border-input focus-visible:bg-background"}),Y.error&&r.jsx("p",{role:"alert",className:"text-sm text-destructive",children:Y.error.message})]})},`${t.id}:${a}`),r.jsx(U,{type:"button",variant:"ghost",size:"icon",onClick:d,className:"opacity-0 transition-opacity group-hover/chapter:opacity-100 focus-visible:opacity-100 motion-reduce:transition-none [@media(hover:none)]:opacity-100","aria-label":g("quotes.chapters.duplicate",{number:a+1}),children:r.jsx(Fi,{className:"w-4 h-4"})}),r.jsx(U,{type:"button",variant:"ghost",size:"icon",onClick:c,className:"opacity-0 transition-opacity group-hover/chapter:opacity-100 focus-visible:opacity-100 motion-reduce:transition-none [@media(hover:none)]:opacity-100","aria-label":g("quotes.chapters.remove",{number:a+1}),children:r.jsx(pi,{className:"w-4 h-4"})})]})})}),o(b,j),r.jsxs(jt,{className:"bg-muted/60 font-semibold hover:bg-muted/60 [&>td]:border-t-2 [&>td]:py-3 [&>td:first-child]:rounded-bl-md [&>td:last-child]:rounded-br-md","data-chapter-footer":t.id,children:[r.jsx(zt,{colSpan:s-1,className:"pl-4 text-sm text-muted-foreground",children:g("quotes.chapters.subtotal",{number:a+1,description:t.description})}),r.jsx(zt,{className:"text-base text-right whitespace-nowrap",children:m})]})]})}function xj({controller:t,columns:a,data:s,defaultItem:o,currencyCode:l,showLineDiscountColumn:d,hasLineDiscounts:c,onShowLineDiscountColumnChange:m,onAddChapter:g,pickCatalogArticle:x,pickBlock:v}){const{t:b}=We(),{watch:j,setValue:_}=ln(),[N,I]=D.useState({}),[$,L]=D.useState(null),[A,E]=D.useState(null),[T,q]=D.useState(!1),[Y,H]=D.useState(""),{chapters:ce,items:pe}=t,le=s.flatMap((B,be)=>N[B.id]?[be]:[]),fe=()=>{I({}),L(null)},V=B=>{t.apply(B),fe()},Z=B=>V(Yw(t.read(),B.chapters,B.indexes)),xe=B=>{var De,Le;const be=t.read();if(!be.items.some((ye,ge)=>B.indexes.includes(ge)||B.chapters.includes(ye.chapter_id??""))){const ye=Bc(be,B.chapters,B.indexes);if(B.chapters.includes(t.activeId??"")){const ge=be.chapters.findIndex(pt=>pt.id===t.activeId);t.setActiveId(((De=ye.chapters[Math.max(0,ge-1)])==null?void 0:De.id)??
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`},{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: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: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:54,code:"CAP_CLA_SEMI_SUSPENDIDO_ES",title:"Acabado: MELAMINA / color: A DETERMINAR",body:`Medida de Hueco: 2450x3000 mm.\r
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: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:`}],Cj=[{id:2000000098,code:"CAP_CLA_SEMI_SUSPENDIDO_EN",title:"Finish: MELAMINE / colour: TO BE DETERMINED",body:`Size of opening: 2450x3000 mm.\r
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
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`}],Sj=[{id:2000000121,code:"CAP_CLA_SEMI_SUSPENDIDO_FR",title:"CARACTÉRISTIQUES DRESSING CLASSIQUE / SEMI-SUSPENDU / SUSPENDU",body:`Finition : MÉLAMINE / Couleur : À DÉTERMINER\r
Épaisseur du bloc : 19 mm / Épaisseur des accessoires : 19 mm\r
Barres de penderie : CHROME / NOIR\r
Façades des tiroirs en verre : DROITE / “U” – FLOAT BRONZE C-424\r
Poignée des tiroirs : xxxxx\r
Tiroirs : 4 DE 180 MM\r
Porte de chaussures : OUI / NON\r
Finition du profil : LAQUÉ NOIR / ARGENT MAT\r
Finition du verre de la porte de chaussures : FLOAT BRONZE C-424\r
Composé de :`},{id:2000000123,code:"CAP_FRE_ARM_ABATIBLE_FR",title:"CARACTÉRISTIQUES FAÇADE DE PLACARD BATTANT",body:`Dimension de l’ouverture : 2275x1390 mm\r
Modèle : ARGO / Finition : LAQUÉE / Couleur : À DÉTERMINER\r
Épaisseur des vantaux : 22 ou 19 mm\r
Finition des vantaux : LISSES\r
Poignée : PRISE DE MAIN À DÉTERMINER\r
Finition des ferrures : CHROMÉ OU ANTHRACITE\r
Jambages périmétraux : APPARENTS, ENCASTRÉS OU COMBINÉS À DÉTERMINER\r
Nombre de vantaux : 2\r
Composé de :`},{id:2000000125,code:"CAP_FRE_ARM_CORREDERA_FR",title:"CARACTÉRISTIQUES FAÇADE DE PLACARD COULISSANT",body:`Dimension de l’ouverture : 2440x5180mm\r
Modèle : PANORAMIC P.O. / Finition : LAQUÉE / Couleur : BLANC\r
Nombre de listels : SANS LISTELS\r
Finition des panneaux : PANNEAU LAQUÉ\r
Poignée :\r
Encadrement périmétral :\r
Nombre de vantaux :\r
FREIN HYDRAULIQUE INTÉGRÉ (non disponible pour les portes inférieures à 650 mm) OU FREIN MAGNÉTIQUE INTÉGRÉ\r
Composé de :`},{id:2000000129,code:"CAP_INT_ARM_FORRADO_FR",title:"CARACTÉRISTIQUES INTÉRIEUR DE PLACARD HABILLÉ",body:`Finition : MÉLAMINE / Couleur : À DÉTERMINER\r
Épaisseur du bloc : 19 mm / Épaisseur des accessoires : 19 mm\r
Barres de penderie : CHROME / NOIR\r
Façades des tiroirs en verre : DROITE / “U” – FLOAT BRONZE C-424\r
Poignée des tiroirs : xxxxx\r
Tiroirs : 4 DE 180 MM\r
Composé de :`},{id:2000000131,code:"CAP_INT_EST_CRISTAL_FR",title:"CARACTÉRISTIQUES INTÉRIEUR DE PLACARD STRUCTURE EN VERRE",body:`Finition des cadres : ANODISÉ NOIR\r
Finition des panneaux des cadres latéraux : VERRE TREMPÉ FLOAT BRONZE C-424\r
Finition du dos : VERRE TREMPÉ FLOAT BRONZE C-424\r
Finition des accessoires : MÉLAMINE / Couleur : CHÊNE DENBER M-242\r
Épaisseur des accessoires : 25 mm\r
Barres de penderie : NOIRES\r
Façades des tiroirs en verre : DROITE / “U” – FLOAT BRONZE C-424\r
Poignée des tiroirs : xxxxx\r
Tiroirs : 4 DE 180 MM\r
Composé de :`},{id:2000000127,code:"CAP_INSTALACION_FR",title:"SERVICE D'INSTALLATION - PRIX NET",body:"Armoire d'installation x"},{id:2000000134,code:"CAP_SUMINISTRO_FR",title:"SERVICE DE FOURNITURE - PRIX NET",body:"Livraison du matériel au domicile du client"}],Uc={es:yj,en:Cj,fr:Sj},zc=({onSelect:t,languageCode:a})=>{const s=Uc[a.toLowerCase()]??Uc.es;return r.jsx(Io,{className:"h-96",children:r.jsx("div",{className:"flex flex-col gap-2 p-4 pt-0",children:s&&s.filter(({title:o,body:l})=>o||l).sort((o,l)=>o.title.localeCompare(l.title)).map(o=>r.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:()=>t&&t(o,1),children:r.jsxs("div",{className:"flex flex-col w-full gap-1",children:[r.jsx("div",{className:"flex items-center",children:r.jsx("div",{className:"flex items-center gap-2",children:r.jsx("div",{className:"font-semibold",children:o.title})})}),r.jsx("div",{className:"text-xs line-clamp-2 text-muted-foreground",children:r.jsx("p",{dangerouslySetInnerHTML:{__html:o.body.substring(0,300).replace(`\r
`,"<br>")}})})]})},o.code))})})},Nj=({isOpen:t,onOpenChange:a,onSelect:s,languageCode:o})=>rf("(min-width: 768px)")?r.jsx(Cn,{modal:!0,open:t,onOpenChange:a,children:r.jsxs(Sn,{className:"w-full max-w-full md:w-9/12 lg:w-10/12",children:[r.jsxs(Nn,{children:[r.jsx(Rn,{children:C("quotes.blocks_picker_dialog.title")}),r.jsx(fr,{children:C("quotes.blocks_picker_dialog.description")})]}),r.jsx(zc,{languageCode:o,onSelect:s}),r.jsx(En,{children:r.jsx(U,{type:"submit",onClick:()=>a(!1),children:C("common.close")})})]})}):r.jsx(wd,{open:t,onOpenChange:a,children:r.jsxs(jd,{children:[r.jsxs(yd,{className:"text-left",children:[r.jsx(Cd,{children:C("quotes.blocks_picker_dialog.title")}),r.jsx(Sd,{children:C("quotes.blocks_picker_dialog.description")})]}),r.jsx(zc,{languageCode:o,onSelect:s}),r.jsx(Nd,{className:"pt-2",children:r.jsx(Rd,{asChild:!0,children:r.jsx(U,{variant:"outline",children:C("common.close")})})})]})}),Rj=({isOpen:t,onOpenChange:a,onSelect:s})=>rf("(min-width: 768px)")?r.jsx(Cn,{modal:!0,open:t,onOpenChange:a,children:r.jsxs(Sn,{className:"w-full max-w-full md:w-9/12 lg:w-10/12",children:[r.jsxs(Nn,{children:[r.jsx(Rn,{children:C("quotes.catalog_picker_dialog.title")}),r.jsx(fr,{children:C("quotes.catalog_picker_dialog.description")})]}),r.jsx(Pr,{syncWithLocation:!1,initialPageSize:5,children:r.jsx(Ao,{onSelect:s})}),r.jsx(En,{children:r.jsx(U,{type:"submit",onClick:()=>a(!1),children:C("common.close")})})]})}):r.jsx(wd,{open:t,onOpenChange:a,children:r.jsxs(jd,{children:[r.jsxs(yd,{className:"text-left",children:[r.jsx(Cd,{children:C("quotes.catalog_picker_dialog.title")}),r.jsx(Sd,{children:C("quotes.catalog_picker_dialog.description")})]}),r.jsx(Pr,{syncWithLocation:!1,initialPageSize:5,children:r.jsx(Ao,{onSelect:s})}),r.jsx(Nd,{className:"pt-2",children:r.jsx(Rd,{asChild:!0,children:r.jsx(U,{variant:"outline",children:C("common.close")})})})]})}),Ej=({currency:t,language:a,defaultValues:s})=>{var W;const{toast:o}=Qn(),{t:l}=We(),{control:d,getValues:c,setValue:m,watch:g}=ln(),x=g("lang_code")||or.DEFAULT_LANGUAGE_CODE,v=g("show_line_discount_column")??!0,b=!!((W=c("items"))!=null&&W.some(K=>{var Se;return Number((Se=K.discount)==null?void 0:Se.amount)>0})),[j]=D.useState("dialog"),[_,N]=D.useState(!1),[I,$]=D.useState(!1),{fields:L,...A}=q0({control:d,name:"items"}),E=nj(A.replace),[T,q]=D.useState(!1),Y=D.useCallback(K=>{E.chapters.length?E.appendPickedItem(K):A.append(K)},[E,A]),H=D.useMemo(()=>[{id:"description",accessorKey:"description",header:l("quotes.form_fields.items.description.label"),cell:({row:{index:K,original:Se}})=>Se!=null&&Se.id_article?r.jsx("div",{className:"px-3 py-2 text-sm whitespace-pre-wrap min-h-10",children:Se.localized_description??Se.description}):r.jsx(an,{autoSize:!0,name:`items.${K}.description`}),minSize:200,size:400},{id:"quantity",accessorKey:"quantity",header:()=>r.jsx("div",{className:"text-right",children:l("quotes.form_fields.items.quantity.label")}),cell:({row:{index:K}})=>r.jsx(Ew,{scale:0,className:"text-right",name:`items.${K}.quantity`}),size:75},{id:"unit_price",accessorKey:"unit_price",header:()=>r.jsx("div",{className:"text-right",children:l("quotes.form_fields.items.unit_price.label")}),cell:({row:{index:K}})=>r.jsx(io,{currency:t,language:a,scale:2,className:"text-right",name:`items.${K}.unit_price`}),size:125},{id:"subtotal_price",accessorKey:"subtotal_price",header:()=>r.jsx("div",{className:"text-right",children:l("quotes.form_fields.items.subtotal_price.label")}),cell:({row:{index:K}})=>r.jsx(io,{variant:"ghost",currency:t,language:a,scale:2,readOnly:!0,className:"text-right",name:`items.${K}.subtotal_price`}),size:150},{id:"discount",accessorKey:"discount",header:()=>r.jsx("div",{className:"text-right",children:l("quotes.form_fields.items.discount.label")}),cell:({row:{index:K}})=>r.jsx(xi,{scale:2,className:"text-right",name:`items.${K}.discount`}),size:100},{id:"total_price",accessorKey:"total_price",header:()=>r.jsx("div",{className:"text-right",children:l("quotes.form_fields.items.total_price.label")}),cell:({row:{index:K}})=>r.jsx(io,{variant:"ghos
${K.body}`,quantity:{amount:null,scale:Kn.DEFAULT_SCALE},unit_price:{amount:null,scale:jb.DEFAULT_SCALE},discount:{amount:null,scale:2}}),o({title:l("quotes.blocks_picker_dialog.toast_article_added"),description:K.title})},[Y,o,l]),[fe,V]=D.useState(!1),Z=[265,440,655],xe=4,Be=K=>{E.capturePickerTarget(K),N(!0)},X=K=>{E.capturePickerTarget(K),$(!0)},Pe=K=>m("show_line_discount_column",K,{shouldDirty:!0}),_e=E.chapters.length?r.jsx(xj,{controller:E,columns:ce,data:L,defaultItem:s==null?void 0:s.items[0],currencyCode:t.code,showLineDiscountColumn:v,hasLineDiscounts:b,onShowLineDiscountColumnChange:Pe,onAddChapter:()=>q(!0),pickCatalogArticle:Be,pickBlock:X}):r.jsx(jj,{actions:{...A,getItem:K=>c(`items.${K}`),pickCatalogArticle:Be,pickBlock:X},columns:ce,data:L,defaultValues:s,extraControls:r.jsxs(U,{type:"button",variant:"ghost",size:"sm",onClick:()=>q(!0),children:[r.jsx(Od,{className:"w-4 h-4 sm:mr-2"}),l("quotes.chapters.add")]}),showLineDiscountColumn:v,hasLineDiscounts:b,onShowLineDiscountColumnChange:Pe}),je=r.jsx(dj,{open:T,onOpenChange:q,onCreate:K=>{const Se=E.read(),Dt=Qw(Se,K,E.activeId);E.apply(Dt),E.focusTitle(Dt.chapters.find(yt=>!Se.chapters.some(Tt=>Tt.id===yt.id)).id)}});return j==="dialog"?r.jsxs("div",{className:"relative",children:[je,_e,r.jsx(Rj,{onSelect:pe,isOpen:_,onOpenChange:N}),r.jsx(Nj,{languageCode:x,onSelect:le,isOpen:I,onOpenChange:$})]}):r.jsxs(gb,{direction:"horizontal",autoSaveId:"uecko.quotes.details_layout",className:"items-stretch h-full",children:[je,r.jsx(Tc,{defaultSize:Z[0],collapsedSize:xe,collapsible:!0,minSize:50,maxSize:90,onCollapse:()=>{V(!0)},onExpand:()=>{V(!1)},className:me(fe&&"min-w-[50px] transition-all duration-300 ease-in-out"),children:_e}),r.jsx(hb,{withHandle:!0,className:"mx-3"}),r.jsx(Tc,{defaultSize:Z[1],minSize:10,children:r.jsx(Pr,{syncWithLocation:!1,children:r.jsx(Ao,{onSelect:pe})})})]})},Aj=()=>{const{formState:t,control:a}=ln();return r.jsxs("div",{className:"grid gap-6 md:grid-cols-6",children:[r.jsxs(hi,{className:"md:col-span-6",title:C("quotes.create.form_groups.general.title"),description:C("quotes.create.form_groups.general.desc"),actions:r.jsxs("div",{className:"grid min-w-48 gap-1",children:[r.jsx(Jt,{htmlFor:"lang_code",className:"text-xs text-muted-foreground",children:C("quotes.form_fields.lang_code.label")}),r.jsx(qr,{control:a,name:"lang_code",render:({field:s})=>r.jsxs(Un,{value:s.value||"es",onValueChange:s.onChange,children:[r.jsx(zn,{id:"lang_code","aria-label":C("quotes.form_fields.lang_code.label"),children:r.jsx(Vn,{placeholder:C("quotes.form_fields.lang_code.placeholder")})}),r.jsx(Hn,{children:yn.map(o=>r.jsxs(Xt,{value:o.code,children:[r.jsx("span",{"aria-hidden":"true",className:`mr-2 ${o.flagClassName}`}),o.name]},o.code))})]})})]}),children:[r.jsxs("div",{className:"grid grid-cols-6 gap-6",children:[r.jsx(ur,{required:!0,className:"col-span-2",label:C("quotes.form_fields.customer_reference.label"),description:C("quotes.form_fields.customer_reference.desc"),disabled:t.disabled,placeholder:C("quotes.form_fields.customer_reference.placeholder"),name:"customer_reference"}),r.jsx(ud,{required:!0,label:C("quotes.form_fields.date.label"),description:C("quotes.form_fields.date.desc"),disabled:t.disabled,placeholder:C("quotes.form_fields.date.placeholder"),name:"date"}),r.jsx(ur,{label:C("quotes.form_fields.validity.label"),description:C("quotes.form_fields.validity.desc"),disabled:t.disabled,placeholder:C("quotes.form_fields.validity.placeholder"),name:"validity"}),r.jsx(an,{className:"col-span-2",label:C("quotes.form_fields.payment_method.label"),description:C("quotes.form_fields.payment_method.desc"),disabled:t.disabled,placeholder:C("quotes.form_fields.payment_method.placeholder"),name:"payment_method"})]}),r.jsxs("div",{className:"grid grid-cols-6 gap-6",children:[r.jsx(an,{className:"col-span-3",required:!0,label:C("quotes.form_fields.customer_information.label"),description:C("quotes.form_fields.customer_information.desc"),disabled:t.disabled,placeholder:C("quotes.form_fields.customer_information.placeholder"),name:"customer_inform
`).map((K,Se)=>r.jsxs("span",{className:Se===0?"font-medium":"hidden text-sm text-muted-foreground md:inline",children:[K,r.jsx("br",{})]},Se))}),size:500}],je=[{id:"row-actions",header:()=>null,cell:({row:{original:W}})=>{const K=(W==null?void 0:W.status)==="accepted"&&!(W!=null&&W.date_sent),Se=(W==null?void 0:W.status)==="accepted"&&!!(W!=null&&W.date_sent),Dt=(W==null?void 0:W.status)==="archived";return r.jsxs("div",{className:"flex gap-1",children:[r.jsxs(Gn,{className:"gap-0",children:[r.jsxs(at,{children:[r.jsx(ot,{asChild:!0,children:r.jsxs(U,{variant:"ghost",size:"icon",disabled:Se,onClick:yt=>{yt.preventDefault(),V(W)},children:[r.jsx(qd,{className:"w-4 h-4"}),r.jsx("span",{className:"sr-only",children:l("common.edit")})]})}),r.jsx(lt,{children:r.jsx("p",{children:l("common.edit")})})]}),r.jsxs(at,{children:[r.jsx(ot,{asChild:!0,children:r.jsxs(U,{variant:"ghost",size:"icon",onClick:yt=>{yt.preventDefault(),Z(W.id)},children:[r.jsx(Fi,{className:"w-4 h-4"}),r.jsx("span",{className:"sr-only",children:l("common.duplicate")})]})}),r.jsx(lt,{children:r.jsx("p",{children:l("common.duplicate")})})]}),r.jsxs(at,{children:[r.jsx(ot,{asChild:!0,children:r.jsxs(U,{variant:"ghost",size:"icon",onClick:()=>{ce(W.id,L(W))},children:[r.jsx(Td,{className:"w-4 h-4"}),r.jsx("span",{className:"sr-only",children:l("common.download")})]})}),r.jsx(lt,{children:r.jsx("p",{children:l("common.download")})})]}),r.jsxs(at,{children:[r.jsx(ot,{asChild:!0,children:r.jsxs(U,{variant:"ghost",size:"icon",disabled:Dt||Se,onClick:yt=>{yt.preventDefault(),xe(W.id)},children:[r.jsx(Fd,{className:"w-4 h-4"}),r.jsx("span",{className:"sr-only",children:l("common.archive")})]})}),r.jsx(lt,{children:r.jsx("p",{children:l("common.archive")})})]})]}),r.jsx(Gn,{children:r.jsx(_f,{id:W.id,onSentTo:()=>null,disabled:Se||!K})})]})}}];return a?_e:[..._e,...je]},[a,l,d.resolvedLanguage]),{table:Pe}=Oi({data:(T==null?void 0:T.items)??[],columns:X,pageCount:(T==null?void 0:T.total_pages)??-1});return D.useEffect(()=>{Pe&&T&&(T==null?void 0:T.total_pages)>0&&j(Pe.getRowModel().rows[0])},[T,Pe]),Y?r.jsx($r,{subtitle:H.message}):q?r.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:[r.jsx(Ve,{className:"grid items-start gap-4 auto-rows-max md:gap-8 lg:col-span-2",children:r.jsx(He,{children:r.jsx(Mi,{columnCount:6,searchableColumnCount:1,filterableColumnCount:2,shrinkZero:!0})})}),r.jsx("div",{})]}):(T==null?void 0:T.total_items)===0&&!v?r.jsx(Ve,{children:r.jsx(He,{children:r.jsx(Li,{subtitle:l("quotes.list.empty_state.subtitle"),buttonText:l("quotes.create.title"),onButtonClick:()=>s("add",{relative:"path"})})})}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"flex flex-col items-stretch flex-1 gap-4 xl:flex-row",children:[r.jsx("div",{id:c,className:"flex items-stretch flex-1",children:r.jsx(Ti,{table:Pe,paginationOptions:{visible:!0},className:"grid items-start flex-1 gap-4 auto-rows-max md:gap-8 lg:col-span-2",onRowClick:le,activeRowIndex:b==null?void 0:b.index,children:r.jsx(lf,{table:Pe})})}),a&&r.jsx("div",{id:m,className:"flex items-stretch ",children:r.jsx(Mj,{quoteId:b==null?void 0:b.original.id})})]}),r.jsx(mf,{...pe,onFinishDownload:fe})]})},Jj=()=>{const{t}=We(),a=un(),s=ij(),{toast:o}=Qn(),[l,d]=D.useState(Dr.createDefaultCode().object),[c,m]=D.useState(or.createDefaultCode().object),g=D.useMemo(()=>({date:"",reference:"",customer_reference:"",customer_information:"",lang_code:"",currency_code:"",payment_method:"",notes:"",validity:"",show_line_discount_column:!0,chapters:[],show_chapter_line_amounts:!0,additional_currency_code:null,additional_currency_rate:null,additional_currency_date:null,additional_currency_total:null,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_label:t("settings.form_fields.default_tax_label.placeholder"),tax_price:{amount:void 0,scale:2,currency_code:""},total_price:{amount:void 0,s