255 lines
278 KiB
JavaScript
255 lines
278 KiB
JavaScript
|
|
var R_=Object.defineProperty;var E_=(n,a,r)=>a in n?R_(n,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[a]=r;var we=(n,a,r)=>E_(n,typeof a!="symbol"?a+"":a,r);import{u as Ac,a as Jt,b as en,c as Mn,d as Ne,j as i,P as A_,e as F_,f as me,g as I_,N as Wi,R as Le,J as Nt,h as Oe,i as Jn,D as er,l as Ea,M as Tt,V as M_,r as L,k as Fc,m as Ic,n as Dr,o as Mc,B as H,C as T_,p as Lr,q as Or,s as Pr,S as to,t as kr,v as Bi,w as S,x as no,y as Yi,z as Qi,A as Xi,E as Ar,F as ro,G as io,H as so,I as ao,K as oo,L as D_,O as Fr,Q as L_,T as O_,U as P_,W as qe,X as yt,Y as Xe,Z as nt,_ as $e,$ as mn,a0 as lo,a1 as k_,a2 as uo,a3 as In,a4 as co,a5 as fo,a6 as Vi,a7 as kt,a8 as Tc,a9 as q_,aa as Ui,ab as rr,ac as go,ad as mo,ae as ho,af as po,ag as Dc,ah as xo,ai as vo,aj as _o,ak as Zi,al as $_,am as z_,an as B_,ao as fc,ap as V_,aq as U_,ar as gc,as as mc,at as Aa,au as G_,av as H_,aw as En,ax as hc,ay as K_,az as W_,aA as Y_,aB as bo,aC as zt,aD as xn,aE as Ji,aF as Lc,aG as An,aH as Q_,aI as Oc,aJ as X_,aK as le,aL as es,aM as pc,aN as Pc,aO as kc,aP as qc,aQ as Tn,aR as $c,aS as ts,aT as qr,aU as $r,aV as zr,aW as Tr,aX as Z_,aY as zc,aZ as Ge,a_ as He,a$ as Va,b0 as Ke,b1 as tr,b2 as ir,b3 as nr,b4 as J_,b5 as e0,b6 as t0,b7 as Ua,b8 as n0,b9 as r0,ba as Xn,bb as Bc,bc as Ga,bd as Vc,be as qt,bf as i0,bg as s0,bh as wo,bi as Br,bj as Uc,bk as a0,bl as o0,bm as Oi,bn as l0,bo as u0,bp as c0,bq as d0,br as f0,bs as g0,bt as m0,bu as h0,bv as p0,bw as x0,bx as v0,by as xc,bz as Gc,bA as Hc,bB as Kc,bC as Wc,bD as Yc,bE as Qc,bF as Xc,bG as _0,bH as Fa,bI as b0,bJ as w0,bK as S0,bL as C0,bM as j0,bN as y0,bO as N0,bP as R0,bQ as E0,bR as A0,bS as F0,bT as I0,bU as M0,bV as T0,bW as Zc,bX as Jc,bY as Ha,bZ as Ka,b_ as D0,b$ as Ia,c0 as L0,c1 as O0}from"./index-B09LVASt.js";const P0=n=>{const{onSuccess:a,...r}=n||{},o=Mn(),{login:l}=Ac(),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 ed=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 k0=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 vc=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 _c=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 q0=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 $0=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 td=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 z0=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 B0=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 V0=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 So=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 nd=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 U0=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 rd=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 G0=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 H0=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 id=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 K0=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 jo=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 W0=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 Y0=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 Q0=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 sd=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 ad=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"}]]),X0=({className:n,...a})=>i.jsx(F_,{className:me("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",n),...a}),bc=A_,Z0=({withHandle:n,className:a,...r})=>i.jsx(I_,{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),...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(id,{className:"h-2.5 w-2.5"})})});function ut({className:n,...a}){return i.jsx("div",{className:me("animate-pulse rounded-md bg-muted",n),...a})}const J0=n=>typeof n=="object"&&n!==null&&n.hasOwnProperty("total_items");let Pi;const eb=new Uint8Array(16);function tb(){if(!Pi&&(Pi=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Pi))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Pi(eb)}const Ue=[];for(let n=0;n<256;++n)Ue.push((n+256).toString(16).slice(1));function nb(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 rb=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),wc={randomUUID:rb};function ib(n,a,r){if(wc.randomUUID&&!n)return wc.randomUUID();n=n||{};const o=n.random||(n.rng||tb)();return o[6]=o[6]&15|64,o[8]=o[8]&63|128,nb(o)}class dn extends Wi{static validate(a,r){const o=Le.RULE_ALLOW_EMPTY.default(""),l=Nt.string().guid({version:["uuidv4"]}).label(r.label?r.label:"id"),c=Nt.alternatives(o,l);return Le.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 Oe.fail(Jn(er.INVALID_INPUT_DATA,"ID is null or empty"));if(a){const l=dn.validate(a,o);return l.isFailure?Oe.fail(Jn(er.INVALID_INPUT_DATA,l.error.message,o)):Oe.ok(new dn(dn.sanitize(l.object)))}return o.generateOnEmpty?dn.generateNewID():Oe.ok(new dn(null))}static generateNewID(){return Oe.ok(new dn(ib()))}get value(){return String(this.props)}toString(){return String(this.props)}toPrimitive(){return this.toString()}}const Ma={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 cb(){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 pt(n,a){return r=>{a.setState(o=>({...o,[n]:gn(r,o[n])}))}}function ns(n){return n instanceof Function}function db(n){return Array.isArray(n)&&n.every(a=>typeof a=="number")}function fb(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 W(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((x,y)=>o[y]!==x)))return l;o=h;let v;if(r.key&&r.debug&&(v=Date.now()),l=a(...h),r==null||r.onChange==null||r.onChange(l),r.key&&r.debug&&r!=null&&r.debug()){const x=Math.round((Date.now()-d)*100)/100,y=Math.round((Date.now()-v)*100)/100,C=y/16,b=(E,R)=>{for(E=String(E);E.length<R;)E=" "+E;return E};console.info(`%c⏱ ${b(y,5)} /${b(x,5)} ms`,`
|
|||
|
|
font-size: .6rem;
|
|||
|
|
font-weight: bold;
|
|||
|
|
color: hsl(${Math.max(0,Math.min(120-120*C,120))}deg 100% 31%);`,r==null?void 0:r.key)}return l}}function Y(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 gb(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:W(()=>[n,r,a,c],(d,h,p,v)=>({table:d,column:h,row:p,cell:v,getValue:v.getValue,renderValue:v.renderValue}),Y(n.options,"debugCells"))};return n._features.forEach(d=>{d.createCell==null||d.createCell(c,r,a,n)},{}),c}function mb(n,a,r,o){var l,c;const h={...n._getDefaultColumnDef(),...a},p=h.accessorKey;let v=(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,x;if(h.accessorFn?x=h.accessorFn:p&&(p.includes(".")?x=C=>{let b=C;for(const R of p.split(".")){var E;b=(E=b)==null?void 0:E[R]}return b}:x=C=>C[h.accessorKey]),!v)throw new Error;let y={id:`${String(v)}`,accessorFn:x,parent:o,depth:r,columnDef:h,columns:[],getFlatColumns:W(()=>[!0],()=>{var C;return[y,...(C=y.columns)==null?void 0:C.flatMap(b=>b.getFlatColumns())]},Y(n.options,"debugColumns")),getLeafColumns:W(()=>[n._getOrderColumnsFn()],C=>{var b;if((b=y.columns)!=null&&b.length){let E=y.columns.flatMap(R=>R.getLeafColumns());return C(E)}return[y]},Y(n.options,"debugColumns"))};for(const C of n._features)C.createColumn==null||C.createColumn(y,n);return y}const Qe="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 hb={createTable:n=>{n.getHeaderGroups=W(()=>[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(y=>r.find(C=>C.id===y)).filter(Boolean))!=null?c:[],p=(d=l==null?void 0:l.map(y=>r.find(C=>C.id===y)).filter(Boolean))!=null?d:[],v=r.filter(y=>!(o!=null&&o.includes(y.id))&&!(l!=null&&l.includes(y.id)));return ki(a,[...h,...v,...p],n)},Y(n.options,Qe)),n.getCenterHeaderGroups=W(()=>[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))),ki(a,r,n,"center")),Y(n.options,Qe)),n.getLeftHeaderGroups=W(()=>[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 ki(a,c,n,"left")},Y(n.options,Qe)),n.getRightHeaderGroups=W(()=>[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 ki(a,c,n,"right")},Y(n.options,Qe)),n.getFooterGroups=W(()=>[n.getHeaderGroups()],a=>[...a].reverse(),Y(n.options,Qe)),n.getLeftFooterGroups=W(()=>[n.getLeftHeaderGroups()],a=>[...a].reverse(),Y(n.options,Qe)),n.getCenterFooterGroups=W(()=>[n.getCenterHeaderGroups()],a=>[...a].reverse(),Y(n.options,Qe)),n.getRightFooterGroups=W(()=>[n.getRightHeaderGroups()],a=>[...a].reverse(),Y(n.options,Qe)),n.getFlatHeaders=W(()=>[n.getHeaderGroups()],a=>a.map(r=>r.headers).flat(),Y(n.options,Qe)),n.getLeftFlatHeaders=W(()=>[n.getLeftHeaderGroups()],a=>a.map(r=>r.headers).flat(),Y(n.options,Qe)),n.getCenterFlatHeaders=W(()=>[n.getCenterHeaderGroups()],a=>a.map(r=>r.headers).flat(),Y(n.options,Qe)),n.getRightFlatHeaders=W(()=>[n.getRightHeaderGroups()],a=>a.map(r=>r.headers).flat(),Y(n.options,Qe)),n.getCenterLeafHeaders=W(()=>[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?tw(n)?L.createElement(n,a):n:null}function tw(n){return nw(n)||typeof n=="function"||rw(n)}function nw(n){return typeof n=="function"&&(()=>{const a=Object.getPrototypeOf(n);return a.prototype&&a.prototype.isReactComponent})()}function rw(n){return typeof n=="object"&&typeof n.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(n.$$typeof.description)}function Sd(n){const a={state:{},onStateChange:()=>{},renderFallbackValue:null,...n},[r]=L.useState(()=>({current:Wb(a)})),[o,l]=L.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 iw=({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(Dr,{children:[i.jsx(Mc,{asChild:!0,children:i.jsxs(H,{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(T_,{className:"w-4 h-4 ml-1 text-muted-foreground"})]})}),i.jsxs(Lr,{className:"sm:max-w-[425px]",children:[i.jsx(Or,{children:i.jsx(Pr,{children:a})}),i.jsxs(to,{className:"grid gap-4 py-2",children:[r,i.jsx(kr,{children:i.jsx(Bi,{asChild:!0,children:i.jsx(H,{type:"button",children:S("common.close")})})})]})]})]})});function sw(n){let o=0;for(let x=0;x<n.length;x++)o=n.charCodeAt(x)+((o<<5)-o);let l="#";for(let x=0;x<3;x++){const y=o>>x*8&255;l+=("00"+y.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")}`,v=`#${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,v]}const Cd=({label:n,className:a})=>{const[r,o]=sw(n);return i.jsx(no,{className:a,style:a?{}:{backgroundColor:o,color:r},children:n})};function jd({table:n,header:a,className:r}){return a.column.getCanSort()?i.jsx("div",{className:me("flex items-center space-x-2",r),children:i.jsxs(Yi,{children:[i.jsx(Qi,{asChild:!0,children:i.jsxs(H,{"aria-label":a.column.getIsSorted()==="desc"?S("common.sort_desc_description"):a.column.getIsSorted()==="asc"?S("common.sort_asc_description"):S("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(vc,{className:"w-4 h-4 ml-2","aria-hidden":"true"}):a.column.getIsSorted()==="asc"?i.jsx(_c,{className:"w-4 h-4 ml-2","aria-hidden":"true"}):i.jsx(k0,{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(Ar,{onClick:()=>a.column.toggleSorting(!1),"aria-label":S("common.sort_asc"),children:[i.jsx(_c,{className:"mr-2 h-3.5 w-3.5 text-muted-foreground/70","aria-hidden":"true"}),S("common.sort_asc")]}),i.jsxs(Ar,{onClick:()=>a.column.toggleSorting(!0),"aria-label":S("common.sort_desc"),children:[i.jsx(vc,{className:"mr-2 h-3.5 w-3.5 text-muted-foreground/70","aria-hidden":"true"}),S("common.sort_desc")]})]}),a.column.getCanSort()&&a.column.getCanHide()&&i.jsx(ro,{}),a.column.getCanHide()&&i.jsxs(Ar,{onClick:()=>a.column.toggleVisibility(!1),"aria-label":S("Hide"),children:[i.jsx(rd,{className:"mr-2 h-3.5 w-3.5 text-muted-foreground/70","aria-hidden":"true"}),S("Hide")]})]})]})}):i.jsxs(i.Fragment,{children:[i.jsx("div",{className:me("data-[state=open]:bg-accent tracking-wide text-ellipsis",r),children:a.isPlaceholder?null:Gi(a.column.columnDef.header,a.getContext())}),!1]})}function aw({table:n,className:a,enablePageSizeSelector:r=!0,visible:o="auto"}){const l=L.useMemo(()=>o===!0,[o]),c=L.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__",v=500,x="__lodash_placeholder__",y=1,C=2,b=4,E=1,R=2,P=1,T=2,I=4,F=8,$=16,B=32,q=64,re=128,te=256,fe=512,Se=30,ue="...",J=800,Re=16,rt=1,Q=2,Ce=3,Me=1/0,U=9007199254740991,_e=17976931348623157e292,Ze=NaN,it=4294967295,vn=it-1,qd=it>>>1,$d=[["ary",re],["bind",P],["bindKey",T],["curry",F],["curryRight",$],["flip",fe],["partial",B],["partialRight",q],["rearg",te]],Ln="[object Arguments]",Ur="[object Array]",zd="[object AsyncFunction]",sr="[object Boolean]",ar="[object Date]",Bd="[object DOMException]",Gr="[object Error]",Hr="[object Function]",Lo="[object GeneratorFunction]",Rt="[object Map]",or="[object Number]",Vd="[object Null]",Bt="[object Object]",Oo="[object Promise]",Ud="[object Proxy]",lr="[object RegExp]",Et="[object Set]",ur="[object String]",Kr="[object Symbol]",Gd="[object Undefined]",cr="[object WeakMap]",Hd="[object WeakSet]",dr="[object ArrayBuffer]",On="[object DataView]",os="[object Float32Array]",ls="[object Float64Array]",us="[object Int8Array]",cs="[object Int16Array]",ds="[object Int32Array]",fs="[object Uint8Array]",gs="[object Uint8ClampedArray]",ms="[object Uint16Array]",hs="[object Uint32Array]",Kd=/\b__p \+= '';/g,Wd=/\b(__p \+=) '' \+/g,Yd=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Po=/&(?:amp|lt|gt|quot|#39);/g,ko=/[&<>"']/g,Qd=RegExp(Po.source),Xd=RegExp(ko.source),Zd=/<%-([\s\S]+?)%>/g,Jd=/<%([\s\S]+?)%>/g,qo=/<%=([\s\S]+?)%>/g,ef=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,tf=/^\w*$/,nf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ps=/[\\^$.*+?()[\]{}|]/g,rf=RegExp(ps.source),xs=/^\s+/,sf=/\s/,af=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,of=/\{\n\/\* \[wrapped with (.+)\] \*/,lf=/,? & /,uf=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,cf=/[()=,{}\[\]\/\s]/,df=/\\(\\)?/g,ff=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,$o=/\w*$/,gf=/^[-+]0x[0-9a-f]+$/i,mf=/^0b[01]+$/i,hf=/^\[object .+?Constructor\]$/,pf=/^0o[0-7]+$/i,xf=/^(?:0|[1-9]\d*)$/,vf=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Wr=/($^)/,_f=/['\n\r\u2028\u2029\\]/g,Yr="\\ud800-\\udfff",bf="\\u0300-\\u036f",wf="\\ufe20-\\ufe2f",Sf="\\u20d0-\\u20ff",zo=bf+wf+Sf,Bo="\\u2700-\\u27bf",Vo="a-z\\xdf-\\xf6\\xf8-\\xff",Cf="\\xac\\xb1\\xd7\\xf7",jf="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",yf="\\u2000-\\u206f",Nf=" \\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",Uo="A-Z\\xc0-\\xd6\\xd8-\\xde",Go="\\ufe0e\\ufe0f",Ho=Cf+jf+yf+Nf,vs="['’]",Rf="["+Yr+"]",Ko="["+Ho+"]",Qr="["+zo+"]",Wo="\\d+",Ef="["+Bo+"]",Yo="["+Vo+"]",Qo="[^"+Yr+Ho+Wo+Bo+Vo+Uo+"]",_s="\\ud83c[\\udffb-\\udfff]",Af="(?:"+Qr+"|"+_s+")",Xo="[^"+Yr+"]",bs="(?:\\ud83c[\\udde6-\\uddff]){2}",ws="[\\ud800-\\udbff][\\udc00-\\udfff]",Pn="["+Uo+"]",Zo="\\u200d",Jo="(?:"+Yo+"|"+Qo+")",Ff="(?:"+Pn+"|"+Qo+")",el="(?:"+vs+"(?:d|ll|m|re|s|t|ve))?",tl="(?:"+vs+"(?:D|LL|M|RE|S|T|VE))?",nl=Af+"?",rl="["+Go+"]?",If="(?:"+Zo+"(?:"+[Xo,bs,ws].join("|")+")"+rl+nl+")*",Mf="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Tf="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",il=rl+nl+If,Df="(?:"+[Ef,bs,ws].join("|")+")"+il,Lf="(?:"+[Xo+Qr+"?",Qr,bs,ws,Rf].join("|")+")",Of=RegExp(vs,"g"),Pf=RegExp(Qr,"g"),Ss=RegExp(_s+"(?="+_s+")|"+Lf+il,"g"),kf=RegExp([Pn+"?"+Yo+"+"+el+"(?="+[Ko,Pn,"$"].join("|")+")",Ff+"+"+tl+"(?="+[Ko,Pn+Jo,"$"].join("|")+")",Pn+"?"+Jo+"+"+el,Pn+"+"+tl,Tf,Mf,Wo,Df].join("|"),"g"),qf=RegExp("["+Zo+Yr+zo+Go+"]"),$f=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,zf=["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","setTime
|
|||
|
|
/* [wrapped with `+t+`] */
|
|||
|
|
`)}function sh(e){return ne(e)||Rn(e)||!!(Rl&&e&&e[Rl])}function Wt(e,t){var s=typeof e;return t=t??U,!!t&&(s=="number"||s!="symbol"&&xf.test(e))&&e>-1&&e%1==0&&e<t}function et(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)?It(s[t],e):!1}function ua(e,t){if(ne(e))return!1;var s=typeof e;return s=="number"||s=="symbol"||s=="boolean"||e==null||gt(e)?!0:tf.test(e)||!ef.test(e)||t!=null&&e in be(t)}function ah(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function ca(e){var t=yi(e),s=g[t];if(typeof s!="function"||!(t in ce.prototype))return!1;if(e===s)return!0;var u=aa(s);return!!u&&e===u[0]}function oh(e){return!!Cl&&Cl in e}var lh=ti?Yt:Ra;function jr(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 ju(e,t){return function(s){return s==null?!1:s[e]===t&&(t!==r||e in be(s))}}function uh(e){var t=Ii(e,function(u){return s.size===v&&s.clear(),u}),s=t.cache;return t}function ch(e,t){var s=e[1],u=t[1],f=s|u,m=f<(P|T|re),_=u==re&&s==F||u==re&&s==te&&e[7].length<=t[8]||u==(re|te)&&t[7].length<=t[8]&&s==F;if(!(m||_))return e;u&P&&(e[2]=t[2],f|=s&P?0:I);var w=t[3];if(w){var N=e[3];e[3]=N?au(N,w,t[4]):w,e[4]=N?rn(e[3],x):t[4]}return w=t[5],w&&(N=e[5],e[5]=N?ou(N,w,t[6]):w,e[6]=N?rn(e[5],x):t[6]),w=t[7],w&&(e[7]=w),u&re&&(e[8]=e[8]==null?t[8]:We(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=f,e}function dh(e){var t=[];if(e!=null)for(var s in be(e))t.push(s);return t}function fh(e){return ri.call(e)}function yu(e,t,s){return t=ke(t===r?e.length-1:t,0),function(){for(var u=arguments,f=-1,m=ke(u.length-t,0),_=A(m);++f<m;)_[f]=u[t+f];f=-1;for(var w=A(t+1);++f<t;)w[f]=u[f];return w[t]=s(_),ct(e,this,w)}}function Nu(e,t){return t.length<2?e:jn(e,St(t,0,-1))}function gh(e,t){for(var s=e.length,u=We(t.length,s),f=st(e);u--;){var m=t[u];e[u]=Wt(m,s)?f[m]:r}return e}function da(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Ru=Au(Ql),yr=Eg||function(e,t){return Be.setTimeout(e,t)},fa=Au(Om);function Eu(e,t,s){var u=t+"";return fa(e,ih(u,mh(th(u),s)))}function Au(e){var t=0,s=0;return function(){var u=Mg(),f=Re-(u-s);if(s=u,f>0){if(++t>=J)return arguments[0]}else t=0;return e.apply(r,arguments)}}function Ri(e,t){var s=-1,u=e.length,f=u-1;for(t=t===r?u:t;++s<t;){var m=Ws(s,f),_=e[m];e[m]=e[s],e[s]=_}return e.length=t,e}var Fu=uh(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(nf,function(s,u,f,m){t.push(f?m.replace(df,"$1"):u||s)}),t});function Pt(e){if(typeof e=="string"||gt(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Nn(e){if(e!=null){try{return ni.call(e)}catch{}try{return e+""}catch{}}return""}function mh(e,t){return vt($d,function(s){var u="_."+s[0];t&s[1]&&!Xr(e,u)&&e.push(u)}),e.sort()}function Iu(e){if(e instanceof ce)return e.clone();var t=new bt(e.__wrapped__,e.__chain__);return t.__actions__=st(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function hh(e,t,s){(s?et(e,t,s):t===r)?t=1:t=ke(ie(t),0);var u=e==null?0:e.length;if(!u||t<1)return[];for(var f=0,m=0,_=A(ui(u/t));f<u;)_[m++]=St(e,f,f+=t);return _}function ph(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 xh(){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(ne(s)?st(s):[s],Ve(t,1))}var vh=ae(function(e,t){return Te(e)?_r(e,Ve(t,1,Te,!0)):[]}),_h=ae(function(e,t){var s=Ct(t);return Te(s)&&(s=r),Te(e)?_r(e,Ve(t,1,Te,!0),K(s,2)):[]}),bh=ae(function(e,t){var s=Ct(t);return Te(s)&&(s=r),Te(e)?_r(e,Ve(t,1,Te,!0),r,s):[]});function wh(e,t,s){var u=e==null?0:e.length;return u?(t=s||t===r?1:ie(t),St(e,t<0?0:t,u)):[]}function Sh(e,t,s){var u=e==null?0:e.length;return u?(t=s||t===r?1:ie(t),t=u-t,St(e,0,t<0?0:t)):[]}function Ch(e,t){return e&&e.length?_i(e,K(t,3),!0,!0):[]}function jh(e,t){return e&&e.length?_i(e,K(t,3),!0):[]}function yh(e,t,s,u){var f=e==null?0:e.length;return f?(s&&typeof s
|
|||
|
|
`;e.replace(z,function(Z,oe,de,mt,tt,ht){return de||(de=mt),k+=e.slice(D,ht).replace(_f,lg),oe&&(w=!0,k+=`' +
|
|||
|
|
__e(`+oe+`) +
|
|||
|
|
'`),tt&&(N=!0,k+=`';
|
|||
|
|
`+tt+`;
|
|||
|
|
__p += '`),de&&(k+=`' +
|
|||
|
|
((__t = (`+de+`)) == null ? '' : __t) +
|
|||
|
|
'`),D=ht+Z.length,Z}),k+=`';
|
|||
|
|
`;var X=pe.call(t,"variable")&&t.variable;if(!X)k=`with (obj) {
|
|||
|
|
`+k+`
|
|||
|
|
}
|
|||
|
|
`;else if(cf.test(X))throw new ee(h);k=(N?k.replace(Kd,""):k).replace(Wd,"$1").replace(Yd,"$1;"),k="function("+(X||"obj")+`) {
|
|||
|
|
`+(X?"":`obj || (obj = {});
|
|||
|
|
`)+"var __t, __p = ''"+(w?", __e = _.escape":"")+(N?`, __j = Array.prototype.join;
|
|||
|
|
function print() { __p += __j.call(arguments, '') }
|
|||
|
|
`:`;
|
|||
|
|
`)+k+`return __p
|
|||
|
|
}`;var se=uc(function(){return ge(m,G+"return "+k).apply(r,_)});if(se.source=k,xa(se))throw se;return se}function Dv(e){return he(e).toLowerCase()}function Lv(e){return he(e).toUpperCase()}function Ov(e,t,s){if(e=he(e),e&&(s||t===r))return vl(e);if(!e||!(t=ft(t)))return e;var u=At(e),f=At(t),m=_l(u,f),_=bl(u,f)+1;return un(u,m,_).join("")}function Pv(e,t,s){if(e=he(e),e&&(s||t===r))return e.slice(0,Sl(e)+1);if(!e||!(t=ft(t)))return e;var u=At(e),f=bl(u,At(t))+1;return un(u,0,f).join("")}function kv(e,t,s){if(e=he(e),e&&(s||t===r))return e.replace(xs,"");if(!e||!(t=ft(t)))return e;var u=At(e),f=_l(u,At(t));return un(u,f).join("")}function qv(e,t){var s=Se,u=ue;if(Ae(t)){var f="separator"in t?t.separator:f;s="length"in t?ie(t.length):s,u="omission"in t?ft(t.omission):u}e=he(e);var m=e.length;if(qn(e)){var _=At(e);m=_.length}if(s>=m)return e;var w=s-$n(u);if(w<1)return u;var N=_?un(_,0,w).join(""):e.slice(0,w);if(f===r)return N+u;if(_&&(w+=N.length-w),va(f)){if(e.slice(w).search(f)){var D,O=N;for(f.global||(f=Ds(f.source,he($o.exec(f))+"g")),f.lastIndex=0;D=f.exec(O);)var k=D.index;N=N.slice(0,k===r?w:k)}}else if(e.indexOf(ft(f),w)!=w){var z=N.lastIndexOf(f);z>-1&&(N=N.slice(0,z))}return N+u}function $v(e){return e=he(e),e&&Qd.test(e)?e.replace(Po,hg):e}var zv=Kn(function(e,t,s){return e+(s?" ":"")+t.toUpperCase()}),wa=cu("toUpperCase");function lc(e,t,s){return e=he(e),t=s?r:t,t===r?cg(e)?vg(e):tg(e):e.match(t)||[]}var uc=ae(function(e,t){try{return ct(e,r,t)}catch(s){return xa(s)?s:new ee(s)}}),Bv=Kt(function(e,t){return vt(t,function(s){s=Pt(s),Gt(e,s,ha(e[s],e))}),e});function Vv(e){var t=e==null?0:e.length,s=K();return e=t?Ee(e,function(u){if(typeof u[1]!="function")throw new _t(d);return[s(u[0]),u[1]]}):[],ae(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 Uv(e){return hm(wt(e,y))}function Sa(e){return function(){return e}}function Gv(e,t){return e==null||e!==e?t:e}var Hv=fu(),Kv=fu(!0);function lt(e){return e}function Ca(e){return Bl(typeof e=="function"?e:wt(e,y))}function Wv(e){return Ul(wt(e,y))}function Yv(e,t){return Gl(e,wt(t,y))}var Qv=ae(function(e,t){return function(s){return br(s,e,t)}}),Xv=ae(function(e,t){return function(s){return br(e,s,t)}});function ja(e,t,s){var u=ze(t),f=pi(t,u);s==null&&!(Ae(t)&&(f.length||!u.length))&&(s=t,t=e,e=this,f=pi(t,ze(t)));var m=!(Ae(s)&&"chain"in s)||!!s.chain,_=Yt(e);return vt(f,function(w){var N=t[w];e[w]=N,_&&(e.prototype[w]=function(){var D=this.__chain__;if(m||D){var O=e(this.__wrapped__),k=O.__actions__=st(this.__actions__);return k.push({func:N,args:arguments,thisArg:e}),O.__chain__=D,O}return N.apply(e,nn([this.value()],arguments))})}),e}function Zv(){return Be._===this&&(Be._=jg),this}function ya(){}function Jv(e){return e=ie(e),ae(function(t){return Hl(t,e)})}var e_=na(Ee),t_=na(gl),n_=na(Rs);function cc(e){return ua(e)?Es(Pt(e)):Mm(e)}function r_(e){return function(t){return e==null?r:jn(e,t)}}var i_=mu(),s_=mu(!0);function Na(){return[]}function Ra(){return!1}function a_(){return{}}function o_(){return""}function l_(){return!0}function u_(e,t){if(e=ie(e),e<1||e>U)return[];var s=it,u=We(e,it);t=K(t),e-=it;for(var f=Is(u,t);++s<e;)t(s);return f}function c_(e){return ne(e)?Ee(e,Pt):gt(e)?[e]:st(Fu(he(e)))}function d_(e){var t=++Sg;return he(e)+t}var f_=Si(function(e,t){return e+t},0),g_=ra("ceil"),m_=Si(function(e,t){return e/t},1),h_=ra("floor");function p_(e){return e&&e.length?hi(e,lt,Bs):r}function x_(e,t){return e&&e.length?hi(e,K(t,2),Bs):r}function v_(e){return pl(e,lt)}function __(e,t){return pl(e,K(t,2))}function b_(e){return e&&e.length?hi(e,lt,Hs):r}function w_(e,t){return e&&e.length?hi(e,K(t,2),Hs):r}var S_=Si(function(e,t){return e*t},1),C_=ra("round"),j_=Si(function(e,t){return e-t},0);function y_(e){return e&&e.length?Fs(e,lt):0}function N_(e,t){return e&&e.length?Fs(e,K(t,2)):0}return g.after=Wp,g.ary=zu,g.assign=Lx,g.assignIn=tc,g.assignInWith=Li,g.assignWith=Ox,g.at=Px,g.before=Bu,g.bind=ha,g.bindAll=Bv,g.bindKey=Vu,g.castArray=ax,g.chain=ku,g.chunk=hh,g.compact=ph,g.concat=xh,g.cond=Vv,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`}]},Ec=({onSelect:n})=>{const{i18n:a}=Fo(),[r]=L.useState(a.resolvedLanguage||"es"),[o]=L.useState(Bw[r.toLowerCase()]);return console.log(r),i.jsx(to,{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))})})},Vw=({isOpen:n,onOpenChange:a,onSelect:r})=>Rd("(min-width: 768px)")?i.jsx(Dr,{modal:!0,open:n,onOpenChange:a,children:i.jsxs(Lr,{className:"w-full max-w-full md:w-9/12 lg:w-10/12",children:[i.jsxs(Or,{children:[i.jsx(Pr,{children:S("quotes.blocks_picker_dialog.title")}),i.jsx(wo,{children:S("quotes.blocks_picker_dialog.description")})]}),i.jsx(Ec,{onSelect:r}),i.jsx(kr,{children:i.jsx(H,{type:"submit",onClick:()=>a(!1),children:S("common.close")})})]})}):i.jsx(Gc,{open:n,onOpenChange:a,children:i.jsxs(Hc,{children:[i.jsxs(Kc,{className:"text-left",children:[i.jsx(Wc,{children:S("quotes.blocks_picker_dialog.title")}),i.jsx(Yc,{children:S("quotes.blocks_picker_dialog.description")})]}),i.jsx(Ec,{onSelect:r}),i.jsx(Qc,{className:"pt-2",children:i.jsx(Xc,{asChild:!0,children:i.jsx(H,{variant:"outline",children:S("common.close")})})})]})}),Uw=({isOpen:n,onOpenChange:a,onSelect:r})=>Rd("(min-width: 768px)")?i.jsx(Dr,{modal:!0,open:n,onOpenChange:a,children:i.jsxs(Lr,{className:"w-full max-w-full md:w-9/12 lg:w-10/12",children:[i.jsxs(Or,{children:[i.jsx(Pr,{children:S("quotes.catalog_picker_dialog.title")}),i.jsx(wo,{children:S("quotes.catalog_picker_dialog.description")})]}),i.jsx(nr,{syncWithLocation:!1,initialPageSize:5,children:i.jsx(eo,{onSelect:r})}),i.jsx(kr,{children:i.jsx(H,{type:"submit",onClick:()=>a(!1),children:S("common.close")})})]})}):i.jsx(Gc,{open:n,onOpenChange:a,children:i.jsxs(Hc,{children:[i.jsxs(Kc,{className:"text-left",children:[i.jsx(Wc,{children:S("quotes.catalog_picker_dialog.title")}),i.jsx(Yc,{children:S("quotes.catalog_picker_dialog.description")})]}),i.jsx(nr,{syncWithLocation:!1,initialPageSize:5,children:i.jsx(eo,{onSelect:r})}),i.jsx(Qc,{className:"pt-2",children:i.jsx(Xc,{asChild:!0,children:i.jsx(H,{variant:"outline",children:S("common.close")})})})]})}),Gw=({currency:n,language:a,defaultValues:r})=>{const{toast:o}=xn(),{control:l}=rr(),[c]=L.useState("dialog"),[d,h]=L.useState(!1),[p,v]=L.useState(!1),{fields:x,...y}=_0({control:l,name:"items"}),C=Aw([{id:"description",accessorKey:"description",header:S("quotes.form_fields.items.description.label"),cell:({row:{index:F,original:$}})=>i.jsx(qt,{readOnly:$==null?void 0:$.id_article,autoSize:!0,name:`items.${F}.description`}),minSize:200,size:400},{id:"quantity",accessorKey:"quantity",header:()=>i.jsx("div",{className:"text-right",children:S("quotes.form_fields.items.quantity.label")}),cell:({row:{index:F}})=>i.jsx(dw,{scale:0,className:"text-right",name:`items.${F}.quantity`}),size:75},{id:"unit_price",accessorKey:"unit_price",header:()=>i.jsx("div",{className:"text-right",children:S("quotes.form_fields.items.unit_price.label")}),cell:({row:{index:F}})=>i.jsx(Fa,{currency:n,language:a,scale:2,className:"text-right",name:`items.${F}.unit_price`}),size:125},{id:"subtotal_price",accessorKey:"subtotal_price",header:()=>i.jsx("div",{className:"text-right",children:S("quotes.form_fields.items.subtotal_price.label")}),cell:({row:{index:F}})=>i.jsx(Fa,{variant:"ghost",currency:n,language:a,scale:2,readOnly:!0,className:"text-right",name:`items.${F}.subtotal_price`}),size:150},{id:"discount",accessorKey:"discount",header:()=>i.jsx("div",{className:"text-right",children:S("quotes.form_fields.items.discount.label")}),cell:({row:{index:F}})=>i.jsx(Hi,{scale:2,className:"text-right",name:`items.${F}.discount`}),size:100},{id:"total_price",accessorKey:"total_price",header:()=>i.jsx("div",{className:"text-right",children:S("quotes.form_fields.items.total_price.label")}),cell:({row:{index:F}})=>i.jsx(Fa,{variant:"ghost",currency:n,language:a,scale:2,readOnly:!0,className:"font-semibold text-right",name:`items.${F}.total_price`}),size:150}],{enableDragHandleColumn:!0,enableSelectionColumn:!0,enableActionsColumn:!0,rowActionFn:F=>{const{table:$,row:B}=F;return[{label:S("common.duplicate_row"),icon:i.jsx(So,{className:"w-4 h-4 mr-2"}),onClick:()=>{var q;return(q=$.options.meta)==null?void 0:q.duplicateItems(B.index)}},{label:S("common.insert_row_above"),icon:i.jsx(b0,{className:"w-4 h-4 mr-2"}),onClick:()=>{var q;return(q=$.optio
|
|||
|
|
${F.body}`,quantity:{amount:null,scale:hn.DEFAULT_SCALE},unit_price:{amount:null,scale:sb.DEFAULT_SCALE},discount:{amount:null,scale:2}}),o({title:S("quotes.blocks_picker_dialog.toast_article_added"),description:F.title})},[y]),[R,P]=L.useState(!1),T=[265,440,655],I=4;return c==="dialog"?i.jsxs("div",{className:"relative",children:[i.jsx(Rc,{actions:{...y,pickCatalogArticle:()=>h(!0),pickBlock:()=>v(!0)},columns:C,data:x,defaultValues:r}),i.jsx(Uw,{onSelect:b,isOpen:d,onOpenChange:h}),i.jsx(Vw,{onSelect:E,isOpen:p,onOpenChange:v})]}):i.jsxs(X0,{direction:"horizontal",autoSaveId:"uecko.quotes.details_layout",className:"items-stretch h-full",children:[i.jsx(bc,{defaultSize:T[0],collapsedSize:I,collapsible:!0,minSize:50,maxSize:90,onCollapse:()=>{P(!0)},onExpand:()=>{P(!1)},className:me(R&&"min-w-[50px] transition-all duration-300 ease-in-out"),children:i.jsx(Rc,{actions:y,columns:C,data:x,defaultValues:r})}),i.jsx(Z0,{withHandle:!0,className:"mx-3"}),i.jsx(bc,{defaultSize:T[1],minSize:10,children:i.jsx(nr,{syncWithLocation:!1,children:i.jsx(eo,{onSelect:b})})})]})},Hw=()=>{const{formState:n}=rr();return i.jsxs("div",{className:"grid gap-6 md:grid-cols-6",children:[i.jsxs(Ga,{className:"md:col-span-6",title:S("quotes.create.form_groups.general.title"),description:S("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:S("quotes.form_fields.customer_reference.label"),description:S("quotes.form_fields.customer_reference.desc"),disabled:n.disabled,placeholder:S("quotes.form_fields.customer_reference.placeholder"),name:"customer_reference"}),i.jsx(Vc,{required:!0,label:S("quotes.form_fields.date.label"),description:S("quotes.form_fields.date.desc"),disabled:n.disabled,placeholder:S("quotes.form_fields.date.placeholder"),name:"date"}),i.jsx(Fn,{label:S("quotes.form_fields.validity.label"),description:S("quotes.form_fields.validity.desc"),disabled:n.disabled,placeholder:S("quotes.form_fields.validity.placeholder"),name:"validity"}),i.jsx(qt,{className:"col-span-2",label:S("quotes.form_fields.payment_method.label"),description:S("quotes.form_fields.payment_method.desc"),disabled:n.disabled,placeholder:S("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:S("quotes.form_fields.customer_information.label"),description:S("quotes.form_fields.customer_information.desc"),disabled:n.disabled,placeholder:S("quotes.form_fields.customer_information.placeholder"),name:"customer_information",errors:n.errors}),i.jsx(qt,{className:"col-span-3",label:S("quotes.form_fields.notes.label"),description:S("quotes.form_fields.notes.desc"),disabled:n.disabled,placeholder:S("quotes.form_fields.notes.placeholder"),name:"notes"})]})]}),i.jsx(Ga,{className:"hidden md:col-span-2",title:S("quotes.create.form_groups.status.title"),description:S("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(Br,{htmlFor:"status",children:"Status"}),i.jsxs(io,{children:[i.jsx(so,{id:"status","aria-label":"Select status",children:i.jsx(ao,{placeholder:"Select status"})}),i.jsxs(oo,{children:[i.jsx(Fr,{value:"draft",children:"Draft"}),i.jsx(Fr,{value:"published",children:"Active"}),i.jsx(Fr,{value:"archived",children:"Archived"})]})]})]}),i.jsx(Fn,{required:!0,label:S("quotes.form_fields.lang_code.label"),description:S("quotes.form_fields.lang_code.desc"),placeholder:S("quotes.form_fields.lang_code.placeholder"),name:"lang_code"}),i.jsx(Fn,{required:!0,label:S("quotes.form_fields.currency_code.label"),description:S("quotes.form_fields.currency_code.desc"),placeholder:S("quotes.form_fields.currency_code.placeholder"),name:"currency_code"})]})})]})},Pd=({id:n,onSentTo:a,disabled:r})=>{const o=()=>{a(n)};return i.jsxs(w0,{children:[i.jsx(S0,{asChild:!0,disabled:r,children:i.jsxs(H,{variant:"ghost",className:"h-10 gap-1 text-primary disabled:tex
|
|||
|
|
`).map((_e,Ze)=>i.jsxs("span",{className:Ze===0?"font-medium":"hidden text-sm text-muted-foreground md:inline",children:[_e,i.jsx("br",{})]},Ze))}),size:500}],Me=[{id:"row-actions",header:()=>null,cell:({row:{original:U}})=>{const _e=(U==null?void 0:U.status)==="accepted"&&!(U!=null&&U.date_sent),Ze=(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(Ge,{children:[i.jsx(He,{asChild:!0,children:i.jsxs(H,{variant:"ghost",size:"icon",disabled:Ze,onClick:vn=>{vn.preventDefault(),Se(U)},children:[i.jsx(sd,{className:"w-4 h-4"}),i.jsx("span",{className:"sr-only",children:"Editar"})]})}),i.jsx(Ke,{children:i.jsx("p",{children:"Editar"})})]}),i.jsxs(Ge,{children:[i.jsx(He,{asChild:!0,children:i.jsxs(H,{variant:"ghost",size:"icon",onClick:vn=>{vn.preventDefault(),ue(U.id)},children:[i.jsx(So,{className:"w-4 h-4"}),i.jsx("span",{className:"sr-only",children:"Duplicar"})]})}),i.jsx(Ke,{children:i.jsx("p",{children:"Duplicar"})})]}),i.jsxs(Ge,{children:[i.jsx(He,{asChild:!0,children:i.jsxs(H,{variant:"ghost",size:"icon",onClick:()=>{q(U.id,R(U))},children:[i.jsx(nd,{className:"w-4 h-4"}),i.jsx("span",{className:"sr-only",children:"Descargar"})]})}),i.jsx(Ke,{children:i.jsx("p",{children:"Descargar"})})]}),i.jsxs(Ge,{children:[i.jsx(He,{asChild:!0,children:i.jsxs(H,{variant:"ghost",size:"icon",disabled:it||Ze,onClick:vn=>{vn.preventDefault(),J(U.id)},children:[i.jsx(ed,{className:"w-4 h-4"}),i.jsx("span",{className:"sr-only",children:"Archivar"})]})}),i.jsx(Ke,{children:i.jsx("p",{children:"Archivar"})})]})]}),i.jsx(tr,{children:i.jsx(Pd,{id:U.id,onSentTo:()=>null,disabled:Ze||!_e})})]})}}];return a?Ce:[...Ce,...Me]},[a]),{table:Q}=as({data:(I==null?void 0:I.items)??[],columns:rt,pageCount:(I==null?void 0:I.total_pages)??-1});return L.useEffect(()=>{Q&&I&&(I==null?void 0:I.total_pages)>0&&x(Q.getRowModel().rows[0])},[I,Q]),$?i.jsx(ir,{subtitle:B.message}):F?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(qe,{className:"grid items-start gap-4 auto-rows-max md:gap-8 lg:col-span-2",children:i.jsx($e,{children:i.jsx(is,{columnCount:6,searchableColumnCount:1,filterableColumnCount:2,shrinkZero:!0})})}),i.jsx("div",{})]}):(I==null?void 0:I.total_items)===0&&!p?i.jsx(qe,{children:i.jsx($e,{children:i.jsx(ss,{subtitle:"Empieza creando alguna cotización",buttonText:S("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(rs,{table:Q,paginationOptions:{visible:!0},className:"grid items-start flex-1 gap-4 auto-rows-max md:gap-8 lg:col-span-2",onRowClick:te,activeRowIndex:v==null?void 0:v.index,children:i.jsx(Md,{table:Q})})}),a&&i.jsx("div",{id:c,className:"flex items-stretch ",children:i.jsx(Yw,{quoteId:v==null?void 0:v.original.id})})]}),i.jsx(Ld,{...re,onFinishDownload:fe})]})},mS=()=>{const n=zt(),a=Tw(),{toast:r}=xn(),[o,l]=L.useState(Ia.createDefaultCode().object),[c,d]=L.useState(Ir.createDefaultCode().object),h=L.useMemo(()=>({date:"",reference:"",customer_reference:"",customer_information:"",lang_code:"",currency_code:"",payment_method:"",notes:"",validity:"",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:v}=Vr(),{data:x,status:y,error:C}=p(a
|