Update dependencies and switch to @sveltejs/adapter-node for SvelteKit project
This commit is contained in:
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
import{h as l,i as x,j as A,k as B,l as N,H as g,m as D,o as H,p as c,q as S,v,B as q,w as L,x as R,y as U,z as k,U as j,A as E,C as z}from"./m2dceAnU.js";import{B as C}from"./DcegSV8N.js";const T=0,_=1;function O(m,b,y,r,n){l&&x();var h=A(),t=j,i=h?k(t):E(t,!1,!1),o=h?k(t):E(t,!1,!1),s=new C(m);B(()=>{var u=b(),p=!1;let d=l&&N(u)===(m.data===g);if(d&&(D(H()),c(!1)),N(u)){var w=z(),I=!1;const a=e=>{if(!p){I=!0,w(!1),q.ensure(),l&&c(!1);try{e()}finally{L(),R||U()}}};u.then(e=>{a(()=>{v(i,e),s.ensure(_,r&&(f=>r(f,i)))})},e=>{a(()=>{if(v(o,e),s.ensure(_,n&&(f=>n(f,o))),!n)throw o.v})}),l?s.ensure(T,y):S(()=>{I||a(()=>{s.ensure(T,y)})})}else v(i,u),s.ensure(_,r&&(a=>r(a,i)));return d&&c(!0),()=>{p=!0}})}export{O as a};
|
||||
@@ -0,0 +1,2 @@
|
||||
Ф њvгЛ{Чљ¦б„°ЁЖ‚@Гжм/Ќї7Q©€NµQшЖX–Йь·Ku1,убq‚с†П•`И+&…У cА5щ“яЏфБ^)ЄVјYP”рМfЁ3w…+…№fmщy€¦ГЩ2ѓ~†‹E(±±ВБwЋРxШаHN4ьђіОMDpҐД›
|
||||
?j8ь`іВЋMRчҐe—¶«w|ь_Чю\R:rl�ЫK}япЖклгл>x6ИѕсFEЊЇr§2ЊчqгDjЛж©цќ0hw‰`ш‰Дю*Ж&<еDћџ™EЎУSй®t»У]&ПfРЫt+w\нg‡Д·ЋђаEбu…Д®‰“ѕ—1jйyщFЄ¦љ>ЕІЊиsmЊоµњйщ/Ё-"®+н{ЧкоМ^«CAф©иѓ°ђ‘M8ЬЋя†Ку3–¤Vі¤ІAbн/"ш алы<ЯЕ¶јХВ=кФw•ц^чTИЫN7КщЄ(ћ‘”¤¦Ј№Bm_И…оMt«ЧПX€‡DMg
|
||||
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
import{e}from"./m2dceAnU.js";e();
|
||||
@@ -0,0 +1,2 @@
|
||||
‹€import{e}from"./m2dceAnU.js";e();
|
||||
|
||||
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
var e;typeof window<"u"&&((e=window.__svelte??(window.__svelte={})).v??(e.v=new Set)).add("5");
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
import{h as E,i as g,k as p,Q as _}from"./m2dceAnU.js";import{B as b}from"./DcegSV8N.js";function R(f,i,a){E&&g();var d=new b(f);p(()=>{var o=i()??null;d.ensure(o,o&&(m=>a(m,o)))},_)}const P="modulepreload",S=function(f,i){return new URL(f,i).href},y={},T=function(i,a,d){let o=Promise.resolve();if(a&&a.length>0){let s=function(e){return Promise.all(e.map(r=>Promise.resolve(r).then(c=>({status:"fulfilled",value:c}),c=>({status:"rejected",reason:c}))))};const t=document.getElementsByTagName("link"),l=document.querySelector("meta[property=csp-nonce]"),v=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));o=s(a.map(e=>{if(e=S(e,d),e in y)return;y[e]=!0;const r=e.endsWith(".css"),c=r?'[rel="stylesheet"]':"";if(d)for(let u=t.length-1;u>=0;u--){const h=t[u];if(h.href===e&&(!r||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${e}"]${c}`))return;const n=document.createElement("link");if(n.rel=r?"stylesheet":P,r||(n.as="script"),n.crossOrigin="",n.href=e,v&&n.setAttribute("nonce",v),document.head.appendChild(n),r)return new Promise((u,h)=>{n.addEventListener("load",u),n.addEventListener("error",()=>h(Error(`Unable to preload CSS for ${e}`)))})}))}function m(s){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=s,window.dispatchEvent(t),!t.defaultPrevented)throw s}return o.then(s=>{for(const t of s||[])t.status==="rejected"&&m(t.reason);return i().catch(m)})},j=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));export{T as _,j as a,R as c};
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
import{$ as T,a0 as B,a1 as R,q as Y,a2 as S,a3 as g,a4 as j,a5 as q,g as h,a6 as K,a7 as M,Z as N,a8 as U,a9 as $,aa as Z,ab as z,ac as C,ad as G,ae as F,af as H,ag as J,ah as x,ai as d}from"./m2dceAnU.js";function y(r,e){return r===e||(r==null?void 0:r[S])===e}function m(r={},e,n,i){return T(()=>{var s,t;return B(()=>{s=t,t=[],R(()=>{r!==n(...t)&&(e(r,...t),s&&y(n(...s),r)&&e(null,...s))})}),()=>{Y(()=>{t&&y(n(...t),r)&&e(null,...t)})}}),r}let _=!1;function Q(r){var e=_;try{return _=!1,[r(),_]}finally{_=e}}const V={get(r,e){if(!r.exclude.includes(e))return r.props[e]},set(r,e){return!1},getOwnPropertyDescriptor(r,e){if(!r.exclude.includes(e)&&e in r.props)return{enumerable:!0,configurable:!0,value:r.props[e]}},has(r,e){return r.exclude.includes(e)?!1:e in r.props},ownKeys(r){return Reflect.ownKeys(r.props).filter(e=>!r.exclude.includes(e))}};function k(r,e,n){return new Proxy({props:r,exclude:e},V)}const W={get(r,e){let n=r.props.length;for(;n--;){let i=r.props[n];if(d(i)&&(i=i()),typeof i=="object"&&i!==null&&e in i)return i[e]}},set(r,e,n){let i=r.props.length;for(;i--;){let s=r.props[i];d(s)&&(s=s());const t=g(s,e);if(t&&t.set)return t.set(n),!0}return!1},getOwnPropertyDescriptor(r,e){let n=r.props.length;for(;n--;){let i=r.props[n];if(d(i)&&(i=i()),typeof i=="object"&&i!==null&&e in i){const s=g(i,e);return s&&!s.configurable&&(s.configurable=!0),s}}},has(r,e){if(e===S||e===x)return!1;for(let n of r.props)if(d(n)&&(n=n()),n!=null&&e in n)return!0;return!1},ownKeys(r){const e=[];for(let n of r.props)if(d(n)&&(n=n()),!!n){for(const i in n)e.includes(i)||e.push(i);for(const i of Object.getOwnPropertySymbols(n))e.includes(i)||e.push(i)}return e}};function rr(...r){return new Proxy({props:r},W)}function er(r,e,n,i){var O;var s=!Z||(n&z)!==0,t=(n&$)!==0,E=(n&H)!==0,f=i,v=!0,b=()=>(v&&(v=!1,f=E?R(i):i),f),l;if(t){var A=S in r||x in r;l=((O=g(r,e))==null?void 0:O.set)??(A&&e in r?a=>r[e]=a:void 0)}var o,w=!1;t?[o,w]=Q(()=>r[e]):o=r[e],o===void 0&&i!==void 0&&(o=b(),l&&(s&&j(),l(o)));var u;if(s?u=()=>{var a=r[e];return a===void 0?b():(v=!0,a)}:u=()=>{var a=r[e];return a!==void 0&&(f=void 0),a===void 0?f:a},s&&(n&q)===0)return u;if(l){var D=r.$$legacy;return(function(a,p){return arguments.length>0?((!s||!p||D||w)&&l(p?u():a),a):u()})}var P=!1,c=((n&C)!==0?G:F)(()=>(P=!1,u()));t&&h(c);var L=N;return(function(a,p){if(arguments.length>0){const I=p?h(c):s&&t?K(a):a;return M(c,I),P=!0,f!==void 0&&(f=I),a}return J&&P||(L.f&U)!==0?c.v:h(c)})}export{m as b,er as p,k as r,rr as s};
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./Bac5Y1lX.js","./Bzak7iHL.js","./m2dceAnU.js","./Db3dOJqt.js","./DKU_2deH.js","./DcegSV8N.js","./CS4xyx6M.js","./Djw4YAFw.js","./BtiMKAzw.js","./CvosxF64.js","./D6EhJnz8.js","./D4Z6sX8n.js"])))=>i.map(i=>d[i]);
|
||||
import{c as P,_ as B}from"./CS4xyx6M.js";import"./Bzak7iHL.js";import{h as t,i as w,N as y,ap as L,k as N,Q as O,aq as S,ar as V,as as R,at as A,L as D,p as h,m as _,Z as q,au as j,av as z,aw as G,ax as k,D as F,b as p,d as b,F as H,a as c,E as I,$ as Q,ay as Z,g as E,u as C,f as J}from"./m2dceAnU.js";import{a as K}from"./BMcrRaS1.js";import{B as U,i as W}from"./DcegSV8N.js";import{t as X,a as Y,c as $,s as ee}from"./BtiMKAzw.js";import{i as ae}from"./DKU_2deH.js";import{p as T,b as re,r as te}from"./CvosxF64.js";function ne(f,r,n,o,u,e){let d=t;t&&w();var a=null;t&&y.nodeType===L&&(a=y,w());var l=t?y:f,i=new U(l,!1);N(()=>{const s=r()||null;var v=n||s==="svg"?V:void 0;if(s===null){i.ensure(null,null);return}return i.ensure(s,m=>{if(s){if(a=t?a:S(s,v),R(a,a),o){t&&ae(s)&&a.append(document.createComment(""));var g=t?A(a):a.appendChild(D());t&&(g===null?h(!1):_(g)),o(a,g)}q.nodes.end=a,m.before(a)}t&&_(m)}),()=>{}},O),j(()=>{}),d&&(h(!0),_(l))}function se(f,r){let n=null,o=t;var u;if(t){n=y;for(var e=A(document.head);e!==null&&(e.nodeType!==G||e.data!==f);)e=k(e);if(e===null)h(!1);else{var d=k(e);e.remove(),_(d)}}t||(u=document.head.appendChild(D()));try{N(()=>r(u),z)}finally{o&&(h(!0),_(n))}}const ie=X({base:"focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] [&>svg]:pointer-events-none [&>svg]:size-3",variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90 border-transparent",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90 border-transparent",destructive:"bg-destructive [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/70 border-transparent text-white",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function _e(f,r){F(r,!0);let n=T(r,"ref",15,null),o=T(r,"variant",3,"default"),u=te(r,["$$slots","$$events","$$legacy","ref","href","class","variant","children"]);var e=p(),d=b(e);ne(d,()=>r.href?"a":"span",!1,(a,l)=>{re(a,v=>n(v),()=>n()),Y(a,v=>({"data-slot":"badge",href:r.href,class:v,...u}),[()=>$(ie({variant:o()}),r.class)]);var i=p(),s=b(i);ee(s,()=>r.children??H),c(l,i)}),c(f,e),I()}var oe=J('<main class="container mx-auto flex flex-col gap-6 py-8"><p class="text-muted-foreground">Loading…</p></main>');function pe(f,r){F(r,!0);var n=p();se("rk8na7",e=>{Q(()=>{Z.title="Items – Stackq"})});var o=b(n);{var u=e=>{var d=p(),a=b(d);K(a,()=>B(()=>import("./Bac5Y1lX.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11]),import.meta.url),l=>{var i=oe();c(l,i)},(l,i)=>{var s=C(()=>{var{default:x}=E(i);return{ItemsCrud:x}}),v=C(()=>E(s).ItemsCrud),m=p(),g=b(m);P(g,()=>E(v),(x,M)=>{M(x,{get data(){return r.data}})}),c(l,m)}),c(e,d)};W(o,e=>{e(u)})}c(f,n),I()}export{_e as B,pe as _,ne as e,se as h};
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
import"./Bzak7iHL.js";import{t as j,a as b,s as f,c as g}from"./BtiMKAzw.js";import{D,b as E,d as F,a as d,E as P,c as h,r as m,f as k,F as x}from"./m2dceAnU.js";import{i as q}from"./DcegSV8N.js";import{p as r,b as p,r as A}from"./CvosxF64.js";const y=j({base:"focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90 shadow-xs",destructive:"bg-destructive hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 text-white shadow-xs",outline:"bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 border shadow-xs",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 shadow-xs",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});var C=k("<a><!></a>"),G=k("<button><!></button>");function M(_,e){D(e,!0);let o=r(e,"variant",3,"default"),l=r(e,"size",3,"default"),s=r(e,"ref",15,null),c=r(e,"href",3,void 0),z=r(e,"type",3,"button"),v=A(e,["$$slots","$$events","$$legacy","class","variant","size","ref","href","type","disabled","children"]);var u=E(),w=F(u);{var B=i=>{var a=C();b(a,t=>({"data-slot":"button",class:t,href:e.disabled?void 0:c(),"aria-disabled":e.disabled,role:e.disabled?"link":void 0,tabindex:e.disabled?-1:void 0,...v}),[()=>g(y({variant:o(),size:l()}),e.class)]);var n=h(a);f(n,()=>e.children??x),m(a),p(a,t=>s(t),()=>s()),d(i,a)},V=i=>{var a=G();b(a,t=>({"data-slot":"button",class:t,type:z(),disabled:e.disabled,...v}),[()=>g(y({variant:o(),size:l()}),e.class)]);var n=h(a);f(n,()=>e.children??x),m(a),p(a,t=>s(t),()=>s()),d(i,a)};q(w,i=>{c()?i(B):i(V,!1)})}d(_,u),P()}export{M as B};
|
||||
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
import{V as S,W as b,X as E,Y as T,Z as m,q as L,_ as V}from"./m2dceAnU.js";function B(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}const A=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function D(t){return A.includes(t)}const x={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function R(t){return t=t.toLowerCase(),x[t]??t}const I=["touchstart","touchmove"];function j(t){return I.includes(t)}const N=["textarea","script","style","title"];function C(t){return N.includes(t)}const i=Symbol("events"),P=new Set,W=new Set;function M(t,e,r,u={}){function o(a){if(u.capture||O.call(e,a),!a.cancelBubble)return V(()=>r==null?void 0:r.call(this,a))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?L(()=>{e.addEventListener(t,o,u)}):e.addEventListener(t,o,u),o}function X(t,e,r,u={}){var o=M(e,t,r,u);return()=>{t.removeEventListener(e,o,u)}}function z(t,e,r){(e[i]??(e[i]={}))[t]=r}function F(t){for(var e=0;e<t.length;e++)P.add(t[e]);for(var r of W)r(t)}let w=null;function O(t){var v,g;var e=this,r=e.ownerDocument,u=t.type,o=((v=t.composedPath)==null?void 0:v.call(t))||[],a=o[0]||t.target;w=t;var f=0,d=w===t&&t[i];if(d){var s=o.indexOf(d);if(s!==-1&&(e===document||e===window)){t[i]=e;return}var p=o.indexOf(e);if(p===-1)return;s<=p&&(f=s)}if(a=o[f]||t.target,a!==e){S(t,"currentTarget",{configurable:!0,get(){return a||r}});var y=T,k=m;b(null),E(null);try{for(var c,_=[];a!==null;){var l=a.assignedSlot||a.parentNode||a.host||null;try{var h=(g=a[i])==null?void 0:g[u];h!=null&&(!a.disabled||t.target===a)&&h.call(a,t)}catch(n){c?_.push(n):c=n}if(t.cancelBubble||l===e||l===null)break;a=l}if(c){for(let n of _)queueMicrotask(()=>{throw n});throw c}}finally{t[i]=e,delete t.currentTarget,b(y),E(k)}}}export{P as a,j as b,B as c,z as d,F as e,M as f,D as g,O as h,C as i,R as n,X as o,W as r};
|
||||
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
var F=Object.defineProperty;var k=a=>{throw TypeError(a)};var I=(a,e,t)=>e in a?F(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var R=(a,e,t)=>I(a,typeof e!="symbol"?e+"":e,t),S=(a,e,t)=>e.has(a)||k("Cannot "+t);var s=(a,e,t)=>(S(a,e,"read from private field"),t?t.call(a):e.get(a)),u=(a,e,t)=>e.has(a)?k("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(a):e.set(a,t),w=(a,e,t,i)=>(S(a,e,"write to private field"),i?i.call(a,t):e.set(a,t),t);import{G as E,I as x,J as T,K as H,L as M,M as N,h as A,N as O,O as B,P as C,k as L,i as P,Q as Y,R as G,S as J,H as K,o as Q,m as j,p as D}from"./m2dceAnU.js";var l,d,h,_,v,m,b;class q{constructor(e,t=!0){R(this,"anchor");u(this,l,new Map);u(this,d,new Map);u(this,h,new Map);u(this,_,new Set);u(this,v,!0);u(this,m,()=>{var e=E;if(s(this,l).has(e)){var t=s(this,l).get(e),i=s(this,d).get(t);if(i)x(i),s(this,_).delete(t);else{var o=s(this,h).get(t);o&&(s(this,d).set(t,o.effect),s(this,h).delete(t),o.fragment.lastChild.remove(),this.anchor.before(o.fragment),i=o.effect)}for(const[f,r]of s(this,l)){if(s(this,l).delete(f),f===e)break;const n=s(this,h).get(r);n&&(T(n.effect),s(this,h).delete(r))}for(const[f,r]of s(this,d)){if(f===t||s(this,_).has(f))continue;const n=()=>{if(Array.from(s(this,l).values()).includes(f)){var p=document.createDocumentFragment();B(r,p),p.append(M()),s(this,h).set(f,{effect:r,fragment:p})}else T(r);s(this,_).delete(f),s(this,d).delete(f)};s(this,v)||!i?(s(this,_).add(f),H(r,n,!1)):n()}}});u(this,b,e=>{s(this,l).delete(e);const t=Array.from(s(this,l).values());for(const[i,o]of s(this,h))t.includes(i)||(T(o.effect),s(this,h).delete(i))});this.anchor=e,w(this,v,t)}ensure(e,t){var i=E,o=C();if(t&&!s(this,d).has(e)&&!s(this,h).has(e))if(o){var f=document.createDocumentFragment(),r=M();f.append(r),s(this,h).set(e,{effect:N(()=>t(r)),fragment:f})}else s(this,d).set(e,N(()=>t(this.anchor)));if(s(this,l).set(i,e),o){for(const[n,c]of s(this,d))n===e?i.unskip_effect(c):i.skip_effect(c);for(const[n,c]of s(this,h))n===e?i.unskip_effect(c.effect):i.skip_effect(c.effect);i.oncommit(s(this,m)),i.ondiscard(s(this,b))}else A&&(this.anchor=O),s(this,m).call(this)}}l=new WeakMap,d=new WeakMap,h=new WeakMap,_=new WeakMap,v=new WeakMap,m=new WeakMap,b=new WeakMap;function U(a,e,t=!1){A&&P();var i=new q(a),o=t?Y:0;function f(r,n){if(A){const g=G(a);var c;if(g===J?c=0:g===K?c=!1:c=parseInt(g.substring(1)),r!==c){var p=Q();j(p),i.anchor=p,D(!1),i.ensure(r,n),D(!0);return}}i.ensure(r,n)}L(()=>{var r=!1;e((n,c=0)=>{r=!0,f(c,n)}),r||f(!1,null)},o)}export{q as B,U as i};
|
||||
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
import"./Bzak7iHL.js";import{D,c as u,F as H,r as f,a as t,E as O,f as g,b as J,d as q,n as m,t as h,s as n,g as K,u as M,T as N}from"./m2dceAnU.js";import{s as Q}from"./Db3dOJqt.js";import{i as R}from"./DcegSV8N.js";import{c as x}from"./CS4xyx6M.js";import{C as U,a as V,b as W,L as j,I as k,c as X,d as Y,e as Z}from"./Djw4YAFw.js";import{a as ee,c as re,s as te}from"./BtiMKAzw.js";import{p as ae,b as se,r as oe}from"./CvosxF64.js";import{B as de}from"./D4Z6sX8n.js";var le=g("<p><!></p>");function ie(y,a){D(a,!0);let p=ae(a,"ref",15,null),P=oe(a,["$$slots","$$events","$$legacy","ref","class","children"]);var o=le();ee(o,v=>({"data-slot":"card-description",class:v,...P}),[()=>re("text-muted-foreground text-sm",a.class)]);var b=u(o);te(b,()=>a.children??H),f(o),se(o,v=>p(v),()=>p()),t(y,o),O()}var ne=g("<!> <!>",1),ce=g('<p class="text-destructive text-sm"> </p>'),me=g('<form method="POST" action="?/login" class="space-y-4"><div class="space-y-2"><!> <!></div> <div class="space-y-2"><div class="flex items-center justify-between"><!> <a href="/forgot-password" class="text-muted-foreground text-sm underline hover:text-foreground">Forgot your password?</a></div> <!></div> <!> <!></form>'),ue=g("<!> <!>",1);function Pe(y,a){D(a,!0);var p=J(),P=q(p);x(P,()=>Y,(o,b)=>{b(o,{class:"w-full max-w-sm",children:(v,fe)=>{var B=ue(),I=q(B);x(I,()=>U,(C,L)=>{L(C,{children:(E,z)=>{var d=ne(),c=q(d);x(c,()=>V,(_,l)=>{l(_,{children:(i,F)=>{m();var $=h("Login");t(i,$)},$$slots:{default:!0}})});var w=n(c,2);x(w,()=>ie,(_,l)=>{l(_,{children:(i,F)=>{m();var $=h("Enter your email and password to sign in.");t(i,$)},$$slots:{default:!0}})}),t(E,d)},$$slots:{default:!0}})});var S=n(I,2);x(S,()=>W,(C,L)=>{L(C,{children:(E,z)=>{var d=me(),c=u(d),w=u(c);j(w,{for:"email",children:(e,r)=>{m();var s=h("Email");t(e,s)},$$slots:{default:!0}});var _=n(w,2);{let e=M(()=>{var r;return((r=a.data)==null?void 0:r.email)??""});k(_,{id:"email",name:"email",type:"email",placeholder:"you@example.com",autocomplete:"email",get value(){return K(e)},required:!0})}f(c);var l=n(c,2),i=u(l),F=u(i);j(F,{for:"password",children:(e,r)=>{m();var s=h("Password");t(e,s)},$$slots:{default:!0}}),m(2),f(i);var $=n(i,2);k($,{id:"password",name:"password",type:"password",autocomplete:"current-password",required:!0}),f(l);var T=n(l,2);{var A=e=>{var r=ce(),s=u(r,!0);f(r),N(()=>Q(s,a.data.error)),t(e,r)};R(T,e=>{var r;(r=a.data)!=null&&r.error&&e(A)})}var G=n(T,2);de(G,{type:"submit",class:"w-full",children:(e,r)=>{m();var s=h("Login");t(e,s)},$$slots:{default:!0}}),f(d),X(d,(e,r)=>{var s;return(s=Z)==null?void 0:s(e,r)},()=>()=>async({update:e})=>{await e()}),t(E,d)},$$slots:{default:!0}})}),t(v,B)},$$slots:{default:!0}})}),t(y,p),O()}export{Pe as default};
|
||||
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.BWGINVoR.js","../chunks/Bzak7iHL.js","../chunks/BrBXfa46.js","../chunks/m2dceAnU.js","../assets/0.C7J2EIJ7.css","../nodes/1.BwpnmtAp.js","../chunks/Db3dOJqt.js","../chunks/DKU_2deH.js","../chunks/D6EhJnz8.js","../nodes/2.W3CLiCpj.js","../chunks/D4Z6sX8n.js","../chunks/BtiMKAzw.js","../chunks/DcegSV8N.js","../chunks/CvosxF64.js","../chunks/CS4xyx6M.js","../nodes/4.DSwQNsv9.js","../chunks/D0oS5fvi.js","../chunks/BMcrRaS1.js","../nodes/5.Y48nEW8J.js"])))=>i.map(i=>d[i]);
|
||||
var M=e=>{throw TypeError(e)};var G=(e,t,r)=>t.has(e)||M("Cannot "+r);var o=(e,t,r)=>(G(e,t,"read from private field"),r?r.call(e):t.get(e)),A=(e,t,r)=>t.has(e)?M("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),D=(e,t,r,n)=>(G(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);import{c as L,_ as y}from"../chunks/CS4xyx6M.js";import{a7 as x,ah as N,g as l,y as Q,V as U,A as X,D as Z,ak as $,al as tt,aW as et,d as R,s as rt,a as E,E as at,b0 as T,b as V,c as st,r as ot,f as W,t as nt,T as it,u as j}from"../chunks/m2dceAnU.js";import{h as ct,m as ut,u as mt,o as lt,s as dt}from"../chunks/Db3dOJqt.js";import"../chunks/Bzak7iHL.js";import{i as k}from"../chunks/DcegSV8N.js";import{p as w,b as I}from"../chunks/CvosxF64.js";function _t(e){return class extends ft{constructor(t){super({component:e,...t})}}}var d,c;class ft{constructor(t){A(this,d);A(this,c);var v;var r=new Map,n=(a,s)=>{var _=X(s,!1,!1);return r.set(a,_),_};const m=new Proxy({...t.props||{},$$events:{}},{get(a,s){return l(r.get(s)??n(s,Reflect.get(a,s)))},has(a,s){return s===N?!0:(l(r.get(s)??n(s,Reflect.get(a,s))),Reflect.has(a,s))},set(a,s,_){return x(r.get(s)??n(s,_),_),Reflect.set(a,s,_)}});D(this,c,(t.hydrate?ct:ut)(t.component,{target:t.target,anchor:t.anchor,props:m,context:t.context,intro:t.intro??!1,recover:t.recover})),(!((v=t==null?void 0:t.props)!=null&&v.$$host)||t.sync===!1)&&Q(),D(this,d,m.$$events);for(const a of Object.keys(o(this,c)))a==="$set"||a==="$destroy"||a==="$on"||U(this,a,{get(){return o(this,c)[a]},set(s){o(this,c)[a]=s},enumerable:!0});o(this,c).$set=a=>{Object.assign(m,a)},o(this,c).$destroy=()=>{mt(o(this,c))}}$set(t){o(this,c).$set(t)}$on(t,r){o(this,d)[t]=o(this,d)[t]||[];const n=(...m)=>r.call(this,...m);return o(this,d)[t].push(n),()=>{o(this,d)[t]=o(this,d)[t].filter(m=>m!==n)}}$destroy(){o(this,c).$destroy()}}d=new WeakMap,c=new WeakMap;const Lt={};var ht=W('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),gt=W("<!> <!>",1);function vt(e,t){Z(t,!0);let r=w(t,"components",23,()=>[]),n=w(t,"data_0",3,null),m=w(t,"data_1",3,null);$(()=>t.stores.page.set(t.page)),tt(()=>{t.stores,t.page,t.constructors,r(),t.form,n(),m(),t.stores.page.notify()});let v=T(!1),a=T(!1),s=T(null);lt(()=>{const i=t.stores.page.subscribe(()=>{l(v)&&(x(a,!0),et().then(()=>{x(s,document.title||"untitled page",!0)}))});return x(v,!0),i});const _=j(()=>t.constructors[1]);var p=gt(),C=R(p);{var q=i=>{const f=j(()=>t.constructors[0]);var h=V(),P=R(h);L(P,()=>l(f),(g,b)=>{I(b(g,{get data(){return n()},get form(){return t.form},get params(){return t.page.params},children:(u,yt)=>{var S=V(),H=R(S);L(H,()=>l(_),(J,K)=>{I(K(J,{get data(){return m()},get form(){return t.form},get params(){return t.page.params}}),O=>r()[1]=O,()=>{var O;return(O=r())==null?void 0:O[1]})}),E(u,S)},$$slots:{default:!0}}),u=>r()[0]=u,()=>{var u;return(u=r())==null?void 0:u[0]})}),E(i,h)},z=i=>{const f=j(()=>t.constructors[0]);var h=V(),P=R(h);L(P,()=>l(f),(g,b)=>{I(b(g,{get data(){return n()},get form(){return t.form},get params(){return t.page.params}}),u=>r()[0]=u,()=>{var u;return(u=r())==null?void 0:u[0]})}),E(i,h)};k(C,i=>{t.constructors[1]?i(q):i(z,!1)})}var B=rt(C,2);{var F=i=>{var f=ht(),h=st(f);{var P=g=>{var b=nt();it(()=>dt(b,l(s))),E(g,b)};k(h,g=>{l(a)&&g(P)})}ot(f),E(i,f)};k(B,i=>{l(v)&&i(F)})}E(e,p),at()}const Tt=_t(vt),Vt=[()=>y(()=>import("../nodes/0.BWGINVoR.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url),()=>y(()=>import("../nodes/1.BwpnmtAp.js"),__vite__mapDeps([5,1,2,3,6,7,8]),import.meta.url),()=>y(()=>import("../nodes/2.W3CLiCpj.js"),__vite__mapDeps([9,1,2,3,10,11,12,7,13]),import.meta.url),()=>y(()=>import("../chunks/CS4xyx6M.js").then(e=>e.a),__vite__mapDeps([14,3,12]),import.meta.url),()=>y(()=>import("../nodes/4.DSwQNsv9.js"),__vite__mapDeps([15,16,14,3,12,1,17,11,7,13]),import.meta.url),()=>y(()=>import("../nodes/5.Y48nEW8J.js"),__vite__mapDeps([18,14,3,12,1,17]),import.meta.url)],jt=[],kt={"/":[2],"/items":[-5],"/login":[-6],"/logout":[-4]},Y={handleError:(({error:e})=>{console.error(e)}),reroute:(()=>{}),transport:{}},bt=Object.fromEntries(Object.entries(Y.transport).map(([e,t])=>[e,t.decode])),wt=Object.fromEntries(Object.entries(Y.transport).map(([e,t])=>[e,t.encode])),It=!1,pt=(e,t)=>bt[e](t);export{pt as decode,bt as decoders,kt as dictionary,wt as encoders,It as hash,Y as hooks,Lt as matchers,Vt as nodes,Tt as root,jt as server_loads};
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
import{l as o,d as r}from"../chunks/D6EhJnz8.js";export{o as load_css,r as start};
|
||||
@@ -0,0 +1,2 @@
|
||||
)€import{l as o,d as r}from"../chunks/D6EhJnz8.js";export{o as load_css,r as start};
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
import"../chunks/Bzak7iHL.js";import"../chunks/BrBXfa46.js";import{h as l,i as f,b as s,d,a as u}from"../chunks/m2dceAnU.js";function c(o,e,t,a,_){var i;l&&f();var n=(i=e.$$slots)==null?void 0:i[t],r=!1;n===!0&&(n=e.children,r=!0),n===void 0||n(o,r?()=>a:a)}const y=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function b(o,e){var t=s(),a=d(t);c(a,e,"default",{}),u(o,t)}export{b as component,y as universal};
|
||||
@@ -0,0 +1,2 @@
|
||||
Ç ,
|
||||
솳3œK|«ú¤ �ư6mÛY¦7 ¹*ņ&¯bÒ>ÞäÓ1i–ŸM‚t¦¦™°ÂÜÞôhàSðëá½XõCx‡bK· ‚Ô×è\ôu„¿ßDÅbIîÒËÑ–&_~lí¥¸�zFòc¢áõfý·¸
Nö¢°ñ¦§Þ•ñ~ì\UR�ŸÉŽÍÉ]I“#NëlT÷½S.g€põK°gºHÂÓÜ"‹ Úð:Ø+¿Ÿ»%=XXé]“^9\˜.FH-~)_�¸ÀõÃ��w9zy½X|X+Â}5Lx~¥Ï•‹ëõÃêþzÝuÁôTßyÒÑ)§E?ˆÍnTt�&<@×eûq¦ÀaO'MŸ/èç‘R¸’C¯ß!óT§�Ê\õ}/
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
import"../chunks/Bzak7iHL.js";import"../chunks/BrBXfa46.js";import{aj as k,ak as b,al as i,a1 as x,am as l,an as $,g as v,ao as y,ad as E,D as j,d as D,T,a as q,E as w,f as z,c as u,r as m,s as A}from"../chunks/m2dceAnU.js";import{s as g}from"../chunks/Db3dOJqt.js";import{s as B,p as d}from"../chunks/D6EhJnz8.js";function C(r=!1){const e=k,t=e.l.u;if(!t)return;let a=()=>y(e.s);if(r){let o=0,s={};const c=E(()=>{let n=!1;const p=e.s;for(const f in p)p[f]!==s[f]&&(s[f]=p[f],n=!0);return n&&o++,o});a=()=>v(c)}t.b.length&&b(()=>{_(e,a),l(t.b)}),i(()=>{const o=x(()=>t.m.map($));return()=>{for(const s of o)typeof s=="function"&&s()}}),t.a.length&&i(()=>{_(e,a),l(t.a)})}function _(r,e){if(r.l.s)for(const t of r.l.s)v(t);e()}const F={get error(){return d.error},get status(){return d.status}};B.updated.check;const h=F;var G=z("<h1> </h1> <p> </p>",1);function M(r,e){j(e,!1),C();var t=G(),a=D(t),o=u(a,!0);m(a);var s=A(a,2),c=u(s,!0);m(s),T(()=>{var n;g(o,h.status),g(c,(n=h.error)==null?void 0:n.message)}),q(r,t),w()}export{M as component};
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
import"../chunks/Bzak7iHL.js";import"../chunks/BrBXfa46.js";import{a as l,f as h,s as m,c as t,n as c,t as p,r as e}from"../chunks/m2dceAnU.js";import{B as d}from"../chunks/D4Z6sX8n.js";var $=h('<main class="flex min-h-screen flex-col items-center justify-center gap-4 p-8"><h1 class="text-2xl font-semibold">Stackq</h1> <p class="text-muted-foreground">Svelte 5 + shadcn-svelte + PocketBase</p> <div class="flex gap-2"><a href="/items"><!></a> <a href="/logout"><!></a></div></main>');function P(f){var a=$(),n=m(t(a),4),s=t(n),v=t(s);d(v,{children:(r,x)=>{c();var o=p("Items table");l(r,o)},$$slots:{default:!0}}),e(s);var i=m(s,2),u=t(i);d(u,{variant:"outline",children:(r,x)=>{c();var o=p("Log out");l(r,o)},$$slots:{default:!0}}),e(i),e(n),e(a),l(f,a)}export{P as component};
|
||||
@@ -0,0 +1,3 @@
|
||||
äZÎþ÷yQ_¦KÍé‰É�!$Nr�Šýý©ú/@¹G•hl¬IÑŽecZkk‚TøS¨‹¶-_1a�A¬å½tôh(êðoŠ�FSú™æÙVDÃàæ¡šâ´}~öãŠÞ`x'ˆ0$F÷
$(Á¢‰2Ì}uáük’Ž#Õ©þ$ÎÖ:�)½¿�ùiÞN}eîCm楨€scµ&I ™Ï¾xøÆ“iLk±h+9 ™º<‘±©ÎGʵx…=a�uL~œ«$Ø…vàÝ
|
||||
ýGßÍYÆÐ•,¬rØæÊôý°T±U¤OêÄøÂ‘š™F³žˆsu&ŒŠó¶á.l¥aoØbV˜{ ¹g<Z‚…-K—ÊyåˆùÄ)((_À…üK‚—�¢æ X{
¿AZ[Ò”¡S–¸K9®)Ÿï$¸�FÊ3(.T °ª)Òi9¦ô€å²IáÇÚá3)´Š
|
||||
wMÀ0Ø¡¸àYh!ÍöhRœgQ:ï·NV²œº®‘`HE Ö8#^”ùŸ¦G
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
import{_ as m}from"../chunks/D0oS5fvi.js";export{m as component};
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../chunks/DvQsdWht.js","../chunks/Bzak7iHL.js","../chunks/m2dceAnU.js","../chunks/Db3dOJqt.js","../chunks/DKU_2deH.js","../chunks/DcegSV8N.js","../chunks/CS4xyx6M.js","../chunks/Djw4YAFw.js","../chunks/BtiMKAzw.js","../chunks/CvosxF64.js","../chunks/D6EhJnz8.js","../chunks/D4Z6sX8n.js"])))=>i.map(i=>d[i]);
|
||||
import{c as F,_ as k}from"../chunks/CS4xyx6M.js";import"../chunks/Bzak7iHL.js";import{a as r,f as v,c as E,r as P,b as _,d,g as i,u as p}from"../chunks/m2dceAnU.js";import{a as $}from"../chunks/BMcrRaS1.js";import{i as j}from"../chunks/DcegSV8N.js";var w=v('<p class="text-muted-foreground">Loading…</p>'),y=v('<main class="flex min-h-screen flex-col items-center justify-center p-4"><!></main>');function T(c,f){var a=y(),l=E(a);{var u=o=>{var n=_(),g=d(n);$(g,()=>k(()=>import("../chunks/DvQsdWht.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11]),import.meta.url),e=>{var t=w();r(e,t)},(e,t)=>{var L=p(()=>{var{default:m}=i(t);return{LoginForm:m}}),h=p(()=>i(L).LoginForm),s=_(),x=d(s);F(x,()=>i(h),(m,b)=>{b(m,{get data(){return f.data}})}),r(e,s)}),r(o,n)};j(l,o=>{o(u)})}P(a),r(c,a)}export{T as component};
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
{"version":"1771359113739"}
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,94 @@
|
||||
import process from 'node:process';
|
||||
|
||||
/* global "" */
|
||||
|
||||
const expected = new Set([
|
||||
'SOCKET_PATH',
|
||||
'HOST',
|
||||
'PORT',
|
||||
'ORIGIN',
|
||||
'XFF_DEPTH',
|
||||
'ADDRESS_HEADER',
|
||||
'PROTOCOL_HEADER',
|
||||
'HOST_HEADER',
|
||||
'PORT_HEADER',
|
||||
'BODY_SIZE_LIMIT',
|
||||
'SHUTDOWN_TIMEOUT',
|
||||
'IDLE_TIMEOUT',
|
||||
'KEEP_ALIVE_TIMEOUT',
|
||||
'HEADERS_TIMEOUT'
|
||||
]);
|
||||
|
||||
const expected_unprefixed = new Set(['LISTEN_PID', 'LISTEN_FDS']);
|
||||
|
||||
if ("") {
|
||||
for (const name in process.env) {
|
||||
if (name.startsWith("")) {
|
||||
const unprefixed = name.slice("".length);
|
||||
if (!expected.has(unprefixed)) {
|
||||
throw new Error(
|
||||
`You should change envPrefix (${""}) to avoid conflicts with existing environment variables — unexpectedly saw ${name}`
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
* @param {any} fallback
|
||||
*/
|
||||
function env(name, fallback) {
|
||||
const prefix = expected_unprefixed.has(name) ? '' : "";
|
||||
const prefixed = prefix + name;
|
||||
return prefixed in process.env ? process.env[prefixed] : fallback;
|
||||
}
|
||||
|
||||
const integer_regexp = /^\d+$/;
|
||||
|
||||
/**
|
||||
* Throw a consistently-structured parsing error for environment variables.
|
||||
* @param {string} name
|
||||
* @param {any} value
|
||||
* @param {string} description
|
||||
* @returns {never}
|
||||
*/
|
||||
function parsing_error(name, value, description) {
|
||||
throw new Error(
|
||||
`Invalid value for environment variable ${name}: ${JSON.stringify(value)} (${description})`
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the environment for a timeout value (non-negative integer) in seconds.
|
||||
* @param {string} name
|
||||
* @param {number} [fallback]
|
||||
* @returns {number | undefined}
|
||||
*/
|
||||
function timeout_env(name, fallback) {
|
||||
const raw = env(name, fallback);
|
||||
if (!raw) {
|
||||
return fallback;
|
||||
}
|
||||
|
||||
if (!integer_regexp.test(raw)) {
|
||||
parsing_error(name, raw, 'should be a non-negative integer');
|
||||
}
|
||||
|
||||
const parsed = Number.parseInt(raw, 10);
|
||||
|
||||
// We don't technically need to check `Number.isNaN` because the value already passed the regexp test.
|
||||
// However, just in case there's some new codepath introduced somewhere down the line, it's probably good
|
||||
// to stick this in here.
|
||||
if (Number.isNaN(parsed)) {
|
||||
parsing_error(name, raw, 'should be a non-negative integer');
|
||||
}
|
||||
|
||||
if (parsed < 0) {
|
||||
parsing_error(name, raw, 'should be a non-negative integer');
|
||||
}
|
||||
|
||||
return parsed;
|
||||
}
|
||||
|
||||
export { env, timeout_env };
|
||||
+1494
File diff suppressed because it is too large
Load Diff
+345
@@ -0,0 +1,345 @@
|
||||
import http from 'node:http';
|
||||
import process from 'node:process';
|
||||
import { handler } from './handler.js';
|
||||
import { env, timeout_env } from './env.js';
|
||||
import { setImmediate } from 'node:timers';
|
||||
import * as qs from 'node:querystring';
|
||||
|
||||
/**
|
||||
* @param {string|RegExp} input The route pattern
|
||||
* @param {boolean} [loose] Allow open-ended matching. Ignored with `RegExp` input.
|
||||
*/
|
||||
function parse$1(input, loose) {
|
||||
if (input instanceof RegExp) return { keys:false, pattern:input };
|
||||
var c, o, tmp, ext, keys=[], pattern='', arr = input.split('/');
|
||||
arr[0] || arr.shift();
|
||||
|
||||
while (tmp = arr.shift()) {
|
||||
c = tmp[0];
|
||||
if (c === '*') {
|
||||
keys.push(c);
|
||||
pattern += tmp[1] === '?' ? '(?:/(.*))?' : '/(.*)';
|
||||
} else if (c === ':') {
|
||||
o = tmp.indexOf('?', 1);
|
||||
ext = tmp.indexOf('.', 1);
|
||||
keys.push( tmp.substring(1, !!~o ? o : !!~ext ? ext : tmp.length) );
|
||||
pattern += !!~o && !~ext ? '(?:/([^/]+?))?' : '/([^/]+?)';
|
||||
if (!!~ext) pattern += (!!~o ? '?' : '') + '\\' + tmp.substring(ext);
|
||||
} else {
|
||||
pattern += '/' + tmp;
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
keys: keys,
|
||||
pattern: new RegExp('^' + pattern + (loose ? '(?=$|\/)' : '\/?$'), 'i')
|
||||
};
|
||||
}
|
||||
|
||||
const MAP = {
|
||||
"": 0,
|
||||
GET: 1,
|
||||
HEAD: 2,
|
||||
PATCH: 3,
|
||||
OPTIONS: 4,
|
||||
CONNECT: 5,
|
||||
DELETE: 6,
|
||||
TRACE: 7,
|
||||
POST: 8,
|
||||
PUT: 9,
|
||||
};
|
||||
|
||||
class Trouter {
|
||||
constructor() {
|
||||
this.routes = [];
|
||||
|
||||
this.all = this.add.bind(this, '');
|
||||
this.get = this.add.bind(this, 'GET');
|
||||
this.head = this.add.bind(this, 'HEAD');
|
||||
this.patch = this.add.bind(this, 'PATCH');
|
||||
this.options = this.add.bind(this, 'OPTIONS');
|
||||
this.connect = this.add.bind(this, 'CONNECT');
|
||||
this.delete = this.add.bind(this, 'DELETE');
|
||||
this.trace = this.add.bind(this, 'TRACE');
|
||||
this.post = this.add.bind(this, 'POST');
|
||||
this.put = this.add.bind(this, 'PUT');
|
||||
}
|
||||
|
||||
use(route, ...fns) {
|
||||
let handlers = [].concat.apply([], fns);
|
||||
let { keys, pattern } = parse$1(route, true);
|
||||
this.routes.push({ keys, pattern, method: '', handlers, midx: MAP[''] });
|
||||
return this;
|
||||
}
|
||||
|
||||
add(method, route, ...fns) {
|
||||
let { keys, pattern } = parse$1(route);
|
||||
let handlers = [].concat.apply([], fns);
|
||||
this.routes.push({ keys, pattern, method, handlers, midx: MAP[method] });
|
||||
return this;
|
||||
}
|
||||
|
||||
find(method, url) {
|
||||
let midx = MAP[method];
|
||||
let isHEAD = (midx === 2);
|
||||
let i=0, j=0, k, tmp, arr=this.routes;
|
||||
let matches=[], params={}, handlers=[];
|
||||
for (; i < arr.length; i++) {
|
||||
tmp = arr[i];
|
||||
if (tmp.midx === midx || tmp.midx === 0 || (isHEAD && tmp.midx===1) ) {
|
||||
if (tmp.keys === false) {
|
||||
matches = tmp.pattern.exec(url);
|
||||
if (matches === null) continue;
|
||||
if (matches.groups !== void 0) for (k in matches.groups) params[k]=matches.groups[k];
|
||||
tmp.handlers.length > 1 ? (handlers=handlers.concat(tmp.handlers)) : handlers.push(tmp.handlers[0]);
|
||||
} else if (tmp.keys.length > 0) {
|
||||
matches = tmp.pattern.exec(url);
|
||||
if (matches === null) continue;
|
||||
for (j=0; j < tmp.keys.length;) params[tmp.keys[j]]=matches[++j];
|
||||
tmp.handlers.length > 1 ? (handlers=handlers.concat(tmp.handlers)) : handlers.push(tmp.handlers[0]);
|
||||
} else if (tmp.pattern.test(url)) {
|
||||
tmp.handlers.length > 1 ? (handlers=handlers.concat(tmp.handlers)) : handlers.push(tmp.handlers[0]);
|
||||
}
|
||||
} // else not a match
|
||||
}
|
||||
|
||||
return { params, handlers };
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef ParsedURL
|
||||
* @type {import('.').ParsedURL}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef Request
|
||||
* @property {string} url
|
||||
* @property {ParsedURL} _parsedUrl
|
||||
*/
|
||||
|
||||
/**
|
||||
* @param {Request} req
|
||||
* @returns {ParsedURL|void}
|
||||
*/
|
||||
function parse(req) {
|
||||
let raw = req.url;
|
||||
if (raw == null) return;
|
||||
|
||||
let prev = req._parsedUrl;
|
||||
if (prev && prev.raw === raw) return prev;
|
||||
|
||||
let pathname=raw, search='', query;
|
||||
|
||||
if (raw.length > 1) {
|
||||
let idx = raw.indexOf('?', 1);
|
||||
|
||||
if (idx !== -1) {
|
||||
search = raw.substring(idx);
|
||||
pathname = raw.substring(0, idx);
|
||||
if (search.length > 1) {
|
||||
query = qs.parse(search.substring(1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return req._parsedUrl = { pathname, search, query, raw };
|
||||
}
|
||||
|
||||
function onError(err, req, res) {
|
||||
let code = typeof err.status === 'number' && err.status;
|
||||
code = res.statusCode = (code && code >= 100 ? code : 500);
|
||||
if (typeof err === 'string' || Buffer.isBuffer(err)) res.end(err);
|
||||
else res.end(err.message || http.STATUS_CODES[code]);
|
||||
}
|
||||
|
||||
const mount = fn => fn instanceof Polka ? fn.attach : fn;
|
||||
|
||||
class Polka extends Trouter {
|
||||
constructor(opts={}) {
|
||||
super();
|
||||
this.parse = parse;
|
||||
this.server = opts.server;
|
||||
this.handler = this.handler.bind(this);
|
||||
this.onError = opts.onError || onError; // catch-all handler
|
||||
this.onNoMatch = opts.onNoMatch || this.onError.bind(null, { status: 404 });
|
||||
this.attach = (req, res) => setImmediate(this.handler, req, res);
|
||||
}
|
||||
|
||||
use(base, ...fns) {
|
||||
if (base === '/') {
|
||||
super.use(base, fns.map(mount));
|
||||
} else if (typeof base === 'function' || base instanceof Polka) {
|
||||
super.use('/', [base, ...fns].map(mount));
|
||||
} else {
|
||||
super.use(base,
|
||||
(req, _, next) => {
|
||||
if (typeof base === 'string') {
|
||||
let len = base.length;
|
||||
base.startsWith('/') || len++;
|
||||
req.url = req.url.substring(len) || '/';
|
||||
req.path = req.path.substring(len) || '/';
|
||||
} else {
|
||||
req.url = req.url.replace(base, '') || '/';
|
||||
req.path = req.path.replace(base, '') || '/';
|
||||
}
|
||||
if (req.url.charAt(0) !== '/') {
|
||||
req.url = '/' + req.url;
|
||||
}
|
||||
next();
|
||||
},
|
||||
fns.map(mount),
|
||||
(req, _, next) => {
|
||||
req.path = req._parsedUrl.pathname;
|
||||
req.url = req.path + req._parsedUrl.search;
|
||||
next();
|
||||
}
|
||||
);
|
||||
}
|
||||
return this; // chainable
|
||||
}
|
||||
|
||||
listen() {
|
||||
(this.server = this.server || http.createServer()).on('request', this.attach);
|
||||
this.server.listen.apply(this.server, arguments);
|
||||
return this;
|
||||
}
|
||||
|
||||
handler(req, res, next) {
|
||||
let info = this.parse(req), path = info.pathname;
|
||||
let obj = this.find(req.method, req.path=path);
|
||||
|
||||
req.url = path + info.search;
|
||||
req.originalUrl = req.originalUrl || req.url;
|
||||
req.query = info.query || {};
|
||||
req.search = info.search;
|
||||
req.params = obj.params;
|
||||
|
||||
if (path.length > 1 && path.indexOf('%', 1) !== -1) {
|
||||
for (let k in req.params) {
|
||||
try { req.params[k] = decodeURIComponent(req.params[k]); }
|
||||
catch (e) { /* malform uri segment */ }
|
||||
}
|
||||
}
|
||||
|
||||
let i=0, arr=obj.handlers.concat(this.onNoMatch), len=arr.length;
|
||||
let loop = async () => res.finished || (i < len) && arr[i++](req, res, next);
|
||||
(next = next || (err => err ? this.onError(err, req, res, next) : loop().catch(next)))(); // init
|
||||
}
|
||||
}
|
||||
|
||||
function polka (opts) {
|
||||
return new Polka(opts);
|
||||
}
|
||||
|
||||
const path = env('SOCKET_PATH', false);
|
||||
const host = env('HOST', '0.0.0.0');
|
||||
const port = env('PORT', !path && '3000');
|
||||
|
||||
const shutdown_timeout = parseInt(env('SHUTDOWN_TIMEOUT', '30'));
|
||||
const idle_timeout = parseInt(env('IDLE_TIMEOUT', '0'));
|
||||
const listen_pid = parseInt(env('LISTEN_PID', '0'));
|
||||
const listen_fds = parseInt(env('LISTEN_FDS', '0'));
|
||||
// https://www.freedesktop.org/software/systemd/man/latest/sd_listen_fds.html
|
||||
const SD_LISTEN_FDS_START = 3;
|
||||
|
||||
if (listen_pid !== 0 && listen_pid !== process.pid) {
|
||||
throw new Error(`received LISTEN_PID ${listen_pid} but current process id is ${process.pid}`);
|
||||
}
|
||||
if (listen_fds > 1) {
|
||||
throw new Error(
|
||||
`only one socket is allowed for socket activation, but LISTEN_FDS was set to ${listen_fds}`
|
||||
);
|
||||
}
|
||||
|
||||
const socket_activation = listen_pid === process.pid && listen_fds === 1;
|
||||
|
||||
let requests = 0;
|
||||
/** @type {NodeJS.Timeout | void} */
|
||||
let shutdown_timeout_id;
|
||||
/** @type {NodeJS.Timeout | void} */
|
||||
let idle_timeout_id;
|
||||
|
||||
// Initialize the HTTP server here so that we can set properties before starting to listen.
|
||||
// Otherwise, polka delays creating the server until listen() is called. Settings these
|
||||
// properties after the server has started listening could lead to race conditions.
|
||||
const httpServer = http.createServer();
|
||||
|
||||
const keep_alive_timeout = timeout_env('KEEP_ALIVE_TIMEOUT');
|
||||
if (keep_alive_timeout !== undefined) {
|
||||
// Convert the keep-alive timeout from seconds to milliseconds (the unit Node.js expects).
|
||||
httpServer.keepAliveTimeout = keep_alive_timeout * 1000;
|
||||
}
|
||||
|
||||
const headers_timeout = timeout_env('HEADERS_TIMEOUT');
|
||||
if (headers_timeout !== undefined) {
|
||||
// Convert the headers timeout from seconds to milliseconds (the unit Node.js expects).
|
||||
httpServer.headersTimeout = headers_timeout * 1000;
|
||||
}
|
||||
|
||||
const server = polka({ server: httpServer }).use(handler);
|
||||
|
||||
if (socket_activation) {
|
||||
server.listen({ fd: SD_LISTEN_FDS_START }, () => {
|
||||
console.log(`Listening on file descriptor ${SD_LISTEN_FDS_START}`);
|
||||
});
|
||||
} else {
|
||||
server.listen({ path, host, port }, () => {
|
||||
console.log(`Listening on ${path || `http://${host}:${port}`}`);
|
||||
});
|
||||
}
|
||||
|
||||
/** @param {'SIGINT' | 'SIGTERM' | 'IDLE'} reason */
|
||||
function graceful_shutdown(reason) {
|
||||
if (shutdown_timeout_id) return;
|
||||
|
||||
// If a connection was opened with a keep-alive header close() will wait for the connection to
|
||||
// time out rather than close it even if it is not handling any requests, so call this first
|
||||
httpServer.closeIdleConnections();
|
||||
|
||||
httpServer.close((error) => {
|
||||
// occurs if the server is already closed
|
||||
if (error) return;
|
||||
|
||||
if (shutdown_timeout_id) {
|
||||
clearTimeout(shutdown_timeout_id);
|
||||
}
|
||||
if (idle_timeout_id) {
|
||||
clearTimeout(idle_timeout_id);
|
||||
}
|
||||
|
||||
// @ts-expect-error custom events cannot be typed
|
||||
process.emit('sveltekit:shutdown', reason);
|
||||
});
|
||||
|
||||
shutdown_timeout_id = setTimeout(() => httpServer.closeAllConnections(), shutdown_timeout * 1000);
|
||||
}
|
||||
|
||||
httpServer.on(
|
||||
'request',
|
||||
/** @param {import('node:http').IncomingMessage} req */
|
||||
(req) => {
|
||||
requests++;
|
||||
|
||||
if (socket_activation && idle_timeout_id) {
|
||||
idle_timeout_id = clearTimeout(idle_timeout_id);
|
||||
}
|
||||
|
||||
req.on('close', () => {
|
||||
requests--;
|
||||
|
||||
if (shutdown_timeout_id) {
|
||||
// close connections as soon as they become idle, so they don't accept new requests
|
||||
httpServer.closeIdleConnections();
|
||||
}
|
||||
if (requests === 0 && socket_activation && idle_timeout) {
|
||||
idle_timeout_id = setTimeout(() => graceful_shutdown('IDLE'), idle_timeout * 1000);
|
||||
}
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
process.on('SIGTERM', graceful_shutdown);
|
||||
process.on('SIGINT', graceful_shutdown);
|
||||
|
||||
export { host, path, port, server };
|
||||
@@ -0,0 +1,14 @@
|
||||
var _layout_ts = /*#__PURE__*/Object.freeze({
|
||||
__proto__: null
|
||||
});
|
||||
|
||||
const index = 0;
|
||||
let component_cache;
|
||||
const component = async () => component_cache ??= (await import('./_layout.svelte-Ectc0goa.js')).default;
|
||||
const universal_id = "src/routes/+layout.ts";
|
||||
const imports = ["_app/immutable/nodes/0.BWGINVoR.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/BrBXfa46.js","_app/immutable/chunks/m2dceAnU.js"];
|
||||
const stylesheets = ["_app/immutable/assets/0.C7J2EIJ7.css"];
|
||||
const fonts = [];
|
||||
|
||||
export { component, fonts, imports, index, stylesheets, _layout_ts as universal, universal_id };
|
||||
//# sourceMappingURL=0-BIaOo9PC.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"0-BIaOo9PC.js","sources":["../../../.svelte-kit/adapter-node/nodes/0.js"],"sourcesContent":["import * as universal from '../entries/pages/_layout.ts.js';\n\nexport const index = 0;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/_layout.svelte.js')).default;\nexport { universal };\nexport const universal_id = \"src/routes/+layout.ts\";\nexport const imports = [\"_app/immutable/nodes/0.BWGINVoR.js\",\"_app/immutable/chunks/Bzak7iHL.js\",\"_app/immutable/chunks/BrBXfa46.js\",\"_app/immutable/chunks/m2dceAnU.js\"];\nexport const stylesheets = [\"_app/immutable/assets/0.C7J2EIJ7.css\"];\nexport const fonts = [];\n"],"names":[],"mappings":";;;;AAEY,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,8BAAoC,CAAC,EAAE;AAElG,MAAC,YAAY,GAAG;AAChB,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AAC5J,MAAC,WAAW,GAAG,CAAC,sCAAsC;AACtD,MAAC,KAAK,GAAG;;;;"}
|
||||
@@ -0,0 +1,9 @@
|
||||
const index = 1;
|
||||
let component_cache;
|
||||
const component = async () => component_cache ??= (await import('./error.svelte-RymJGne7.js')).default;
|
||||
const imports = ["_app/immutable/nodes/1.BwpnmtAp.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/BrBXfa46.js","_app/immutable/chunks/m2dceAnU.js","_app/immutable/chunks/Db3dOJqt.js","_app/immutable/chunks/DKU_2deH.js","_app/immutable/chunks/D6EhJnz8.js"];
|
||||
const stylesheets = [];
|
||||
const fonts = [];
|
||||
|
||||
export { component, fonts, imports, index, stylesheets };
|
||||
//# sourceMappingURL=1-BGPacjVk.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"1-BGPacjVk.js","sources":["../../../.svelte-kit/adapter-node/nodes/1.js"],"sourcesContent":["\n\nexport const index = 1;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/fallbacks/error.svelte.js')).default;\nexport const imports = [\"_app/immutable/nodes/1.BwpnmtAp.js\",\"_app/immutable/chunks/Bzak7iHL.js\",\"_app/immutable/chunks/BrBXfa46.js\",\"_app/immutable/chunks/m2dceAnU.js\",\"_app/immutable/chunks/Db3dOJqt.js\",\"_app/immutable/chunks/DKU_2deH.js\",\"_app/immutable/chunks/D6EhJnz8.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAAsC,CAAC,EAAE;AACpG,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AACxQ,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
||||
@@ -0,0 +1,9 @@
|
||||
const index = 2;
|
||||
let component_cache;
|
||||
const component = async () => component_cache ??= (await import('./_page.svelte-C3pCwICc.js')).default;
|
||||
const imports = ["_app/immutable/nodes/2.W3CLiCpj.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/BrBXfa46.js","_app/immutable/chunks/m2dceAnU.js","_app/immutable/chunks/D4Z6sX8n.js","_app/immutable/chunks/BtiMKAzw.js","_app/immutable/chunks/DcegSV8N.js","_app/immutable/chunks/DKU_2deH.js","_app/immutable/chunks/CvosxF64.js"];
|
||||
const stylesheets = [];
|
||||
const fonts = [];
|
||||
|
||||
export { component, fonts, imports, index, stylesheets };
|
||||
//# sourceMappingURL=2-AuNPQJ-v.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"2-AuNPQJ-v.js","sources":["../../../.svelte-kit/adapter-node/nodes/2.js"],"sourcesContent":["\n\nexport const index = 2;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/_page.svelte.js')).default;\nexport const imports = [\"_app/immutable/nodes/2.W3CLiCpj.js\",\"_app/immutable/chunks/Bzak7iHL.js\",\"_app/immutable/chunks/BrBXfa46.js\",\"_app/immutable/chunks/m2dceAnU.js\",\"_app/immutable/chunks/D4Z6sX8n.js\",\"_app/immutable/chunks/BtiMKAzw.js\",\"_app/immutable/chunks/DcegSV8N.js\",\"_app/immutable/chunks/DKU_2deH.js\",\"_app/immutable/chunks/CvosxF64.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":"AAEY,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAAkC,CAAC,EAAE;AAChG,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AAChV,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
||||
@@ -0,0 +1,20 @@
|
||||
import { r as redirect } from './index-B2LGyy1l.js';
|
||||
|
||||
const load = ({ locals }) => {
|
||||
locals.pb.authStore.clear();
|
||||
throw redirect(303, "/login");
|
||||
};
|
||||
|
||||
var _page_server_ts = /*#__PURE__*/Object.freeze({
|
||||
__proto__: null,
|
||||
load: load
|
||||
});
|
||||
|
||||
const index = 3;
|
||||
const server_id = "src/routes/logout/+page.server.ts";
|
||||
const imports = [];
|
||||
const stylesheets = [];
|
||||
const fonts = [];
|
||||
|
||||
export { fonts, imports, index, _page_server_ts as server, server_id, stylesheets };
|
||||
//# sourceMappingURL=3-DEGBOxIZ.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"3-DEGBOxIZ.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/logout/_page.server.ts.js","../../../.svelte-kit/adapter-node/nodes/3.js"],"sourcesContent":["import { redirect } from \"@sveltejs/kit\";\nconst load = ({ locals }) => {\n locals.pb.authStore.clear();\n throw redirect(303, \"/login\");\n};\nexport {\n load\n};\n","import * as server from '../entries/pages/logout/_page.server.ts.js';\n\nexport const index = 3;\nexport { server };\nexport const server_id = \"src/routes/logout/+page.server.ts\";\nexport const imports = [];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":";;AACA,MAAM,IAAI,GAAG,CAAC,EAAE,MAAM,EAAE,KAAK;AAC7B,EAAE,MAAM,CAAC,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE;AAC7B,EAAE,MAAM,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC;AAC/B,CAAC;;;;;;;ACFW,MAAC,KAAK,GAAG;AAET,MAAC,SAAS,GAAG;AACb,MAAC,OAAO,GAAG;AACX,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
||||
@@ -0,0 +1,123 @@
|
||||
import { f as fail } from './index-B2LGyy1l.js';
|
||||
|
||||
const COLLECTION = "Stackq_Items";
|
||||
function parseNum(val) {
|
||||
if (val === "" || val === null || val === void 0) return void 0;
|
||||
const n = Number(val);
|
||||
return Number.isFinite(n) ? n : void 0;
|
||||
}
|
||||
function parseBool(val) {
|
||||
return val === "on" || val === "true" || val === true;
|
||||
}
|
||||
const load = async ({ locals }) => {
|
||||
const list = await locals.pb.collection(COLLECTION).getFullList({
|
||||
sort: "-created",
|
||||
expand: "Parent"
|
||||
}).catch((err) => {
|
||||
console.error(COLLECTION, err);
|
||||
return [];
|
||||
});
|
||||
const itemsForParent = list.map((i) => ({ id: i.id, Item: i.Item, SKU: i.SKU }));
|
||||
return { items: list, itemsForParent };
|
||||
};
|
||||
const actions = {
|
||||
create: async ({ request, locals }) => {
|
||||
const form = await request.formData();
|
||||
const Item = form.get("Item")?.trim() ?? "";
|
||||
const SKU = form.get("SKU")?.trim() ?? "";
|
||||
const Description = form.get("Description")?.trim() ?? "";
|
||||
const UOM = form.get("UOM")?.trim() ?? "";
|
||||
const Cost = parseNum(form.get("Cost"));
|
||||
const Vendor = form.get("Vendor")?.trim() ?? "";
|
||||
const Catagory = form.get("Catagory")?.trim() ?? "";
|
||||
const Sub_Catagory = form.get("Sub_Catagory")?.trim() ?? "";
|
||||
const Has_Parent = parseBool(form.get("Has_Parent"));
|
||||
const Parent = form.get("Parent")?.trim() ?? "";
|
||||
const Stock = parseBool(form.get("Stock"));
|
||||
if (!Item) return fail(400, { error: "Item name is required", form: "create" });
|
||||
try {
|
||||
await locals.pb.collection(COLLECTION).create({
|
||||
Item,
|
||||
SKU,
|
||||
Description,
|
||||
UOM: UOM || void 0,
|
||||
Cost: Cost ?? 0,
|
||||
Vendor,
|
||||
Catagory: Catagory || void 0,
|
||||
Sub_Catagory: Sub_Catagory || void 0,
|
||||
Has_Parent: !!Has_Parent,
|
||||
Parent: Parent || null,
|
||||
Stock: !!Stock
|
||||
});
|
||||
} catch (e) {
|
||||
const message = e && typeof e === "object" && "message" in e ? String(e.message) : "Create failed";
|
||||
return fail(500, { error: message, form: "create" });
|
||||
}
|
||||
return { success: true };
|
||||
},
|
||||
update: async ({ request, locals }) => {
|
||||
const form = await request.formData();
|
||||
const id = form.get("id")?.trim();
|
||||
if (!id) return fail(400, { error: "Missing id", form: "update" });
|
||||
const Item = form.get("Item")?.trim() ?? "";
|
||||
const SKU = form.get("SKU")?.trim() ?? "";
|
||||
const Description = form.get("Description")?.trim() ?? "";
|
||||
const UOM = form.get("UOM")?.trim() ?? "";
|
||||
const Cost = parseNum(form.get("Cost"));
|
||||
const Vendor = form.get("Vendor")?.trim() ?? "";
|
||||
const Catagory = form.get("Catagory")?.trim() ?? "";
|
||||
const Sub_Catagory = form.get("Sub_Catagory")?.trim() ?? "";
|
||||
const Has_Parent = parseBool(form.get("Has_Parent"));
|
||||
const Parent = form.get("Parent")?.trim() ?? "";
|
||||
const Stock = parseBool(form.get("Stock"));
|
||||
if (!Item) return fail(400, { error: "Item name is required", form: "update" });
|
||||
try {
|
||||
await locals.pb.collection(COLLECTION).update(id, {
|
||||
Item,
|
||||
SKU,
|
||||
Description,
|
||||
UOM: UOM || void 0,
|
||||
Cost: Cost ?? 0,
|
||||
Vendor,
|
||||
Catagory: Catagory || void 0,
|
||||
Sub_Catagory: Sub_Catagory || void 0,
|
||||
Has_Parent: !!Has_Parent,
|
||||
Parent: Parent || null,
|
||||
Stock: !!Stock
|
||||
});
|
||||
} catch (e) {
|
||||
const message = e && typeof e === "object" && "message" in e ? String(e.message) : "Update failed";
|
||||
return fail(500, { error: message, form: "update" });
|
||||
}
|
||||
return { success: true };
|
||||
},
|
||||
delete: async ({ request, locals }) => {
|
||||
const form = await request.formData();
|
||||
const id = form.get("id")?.trim();
|
||||
if (!id) return fail(400, { error: "Missing id", form: "delete" });
|
||||
try {
|
||||
await locals.pb.collection(COLLECTION).delete(id);
|
||||
} catch (e) {
|
||||
const message = e && typeof e === "object" && "message" in e ? String(e.message) : "Delete failed";
|
||||
return fail(500, { error: message, form: "delete" });
|
||||
}
|
||||
return { success: true };
|
||||
}
|
||||
};
|
||||
|
||||
var _page_server_ts = /*#__PURE__*/Object.freeze({
|
||||
__proto__: null,
|
||||
actions: actions,
|
||||
load: load
|
||||
});
|
||||
|
||||
const index = 4;
|
||||
let component_cache;
|
||||
const component = async () => component_cache ??= (await import('./_page.svelte-BSzWqLxF.js')).default;
|
||||
const server_id = "src/routes/items/+page.server.ts";
|
||||
const imports = ["_app/immutable/nodes/4.DSwQNsv9.js","_app/immutable/chunks/D0oS5fvi.js","_app/immutable/chunks/CS4xyx6M.js","_app/immutable/chunks/m2dceAnU.js","_app/immutable/chunks/DcegSV8N.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/BMcrRaS1.js","_app/immutable/chunks/BtiMKAzw.js","_app/immutable/chunks/DKU_2deH.js","_app/immutable/chunks/CvosxF64.js"];
|
||||
const stylesheets = [];
|
||||
const fonts = [];
|
||||
|
||||
export { component, fonts, imports, index, _page_server_ts as server, server_id, stylesheets };
|
||||
//# sourceMappingURL=4-TkpNwhRF.js.map
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,48 @@
|
||||
import { f as fail, r as redirect } from './index-B2LGyy1l.js';
|
||||
|
||||
function safeRedirectTo(searchParams) {
|
||||
const to = searchParams.get("redirectTo");
|
||||
if (!to || typeof to !== "string") return "/";
|
||||
if (!to.startsWith("/") || to.startsWith("//")) return "/";
|
||||
return to;
|
||||
}
|
||||
const load = ({ url, locals }) => {
|
||||
if (locals.user) {
|
||||
throw redirect(303, safeRedirectTo(url.searchParams));
|
||||
}
|
||||
};
|
||||
const actions = {
|
||||
login: async ({ request, locals, url }) => {
|
||||
const data = await request.formData();
|
||||
const email = data.get("email")?.trim() ?? "";
|
||||
const password = data.get("password") ?? "";
|
||||
if (!email || !password) {
|
||||
return fail(400, { error: "Email and password are required.", email });
|
||||
}
|
||||
try {
|
||||
await locals.pb.collection("users").authWithPassword(email, password);
|
||||
} catch (err) {
|
||||
const message = err && typeof err === "object" && "message" in err ? String(err.message) : "Invalid email or password.";
|
||||
return fail(401, { error: message, email });
|
||||
}
|
||||
const redirectTo = safeRedirectTo(url.searchParams);
|
||||
throw redirect(303, redirectTo);
|
||||
}
|
||||
};
|
||||
|
||||
var _page_server_ts = /*#__PURE__*/Object.freeze({
|
||||
__proto__: null,
|
||||
actions: actions,
|
||||
load: load
|
||||
});
|
||||
|
||||
const index = 5;
|
||||
let component_cache;
|
||||
const component = async () => component_cache ??= (await import('./_page.svelte-3rk2vnq3.js')).default;
|
||||
const server_id = "src/routes/login/+page.server.ts";
|
||||
const imports = ["_app/immutable/nodes/5.Y48nEW8J.js","_app/immutable/chunks/CS4xyx6M.js","_app/immutable/chunks/m2dceAnU.js","_app/immutable/chunks/DcegSV8N.js","_app/immutable/chunks/Bzak7iHL.js","_app/immutable/chunks/BMcrRaS1.js"];
|
||||
const stylesheets = [];
|
||||
const fonts = [];
|
||||
|
||||
export { component, fonts, imports, index, _page_server_ts as server, server_id, stylesheets };
|
||||
//# sourceMappingURL=5-B5o-1cPT.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"5-B5o-1cPT.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/login/_page.server.ts.js","../../../.svelte-kit/adapter-node/nodes/5.js"],"sourcesContent":["import { fail, redirect } from \"@sveltejs/kit\";\nfunction safeRedirectTo(searchParams) {\n const to = searchParams.get(\"redirectTo\");\n if (!to || typeof to !== \"string\") return \"/\";\n if (!to.startsWith(\"/\") || to.startsWith(\"//\")) return \"/\";\n return to;\n}\nconst load = ({ url, locals }) => {\n if (locals.user) {\n throw redirect(303, safeRedirectTo(url.searchParams));\n }\n};\nconst actions = {\n login: async ({ request, locals, url }) => {\n const data = await request.formData();\n const email = data.get(\"email\")?.trim() ?? \"\";\n const password = data.get(\"password\") ?? \"\";\n if (!email || !password) {\n return fail(400, { error: \"Email and password are required.\", email });\n }\n try {\n await locals.pb.collection(\"users\").authWithPassword(email, password);\n } catch (err) {\n const message = err && typeof err === \"object\" && \"message\" in err ? String(err.message) : \"Invalid email or password.\";\n return fail(401, { error: message, email });\n }\n const redirectTo = safeRedirectTo(url.searchParams);\n throw redirect(303, redirectTo);\n }\n};\nexport {\n actions,\n load\n};\n","import * as server from '../entries/pages/login/_page.server.ts.js';\n\nexport const index = 5;\nlet component_cache;\nexport const component = async () => component_cache ??= (await import('../entries/pages/login/_page.svelte.js')).default;\nexport { server };\nexport const server_id = \"src/routes/login/+page.server.ts\";\nexport const imports = [\"_app/immutable/nodes/5.Y48nEW8J.js\",\"_app/immutable/chunks/CS4xyx6M.js\",\"_app/immutable/chunks/m2dceAnU.js\",\"_app/immutable/chunks/DcegSV8N.js\",\"_app/immutable/chunks/Bzak7iHL.js\",\"_app/immutable/chunks/BMcrRaS1.js\"];\nexport const stylesheets = [];\nexport const fonts = [];\n"],"names":[],"mappings":";;AACA,SAAS,cAAc,CAAC,YAAY,EAAE;AACtC,EAAE,MAAM,EAAE,GAAG,YAAY,CAAC,GAAG,CAAC,YAAY,CAAC;AAC3C,EAAE,IAAI,CAAC,EAAE,IAAI,OAAO,EAAE,KAAK,QAAQ,EAAE,OAAO,GAAG;AAC/C,EAAE,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,OAAO,GAAG;AAC5D,EAAE,OAAO,EAAE;AACX;AACA,MAAM,IAAI,GAAG,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK;AAClC,EAAE,IAAI,MAAM,CAAC,IAAI,EAAE;AACnB,IAAI,MAAM,QAAQ,CAAC,GAAG,EAAE,cAAc,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;AACzD,EAAE;AACF,CAAC;AACD,MAAM,OAAO,GAAG;AAChB,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK;AAC7C,IAAI,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,QAAQ,EAAE;AACzC,IAAI,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE;AACjD,IAAI,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,EAAE;AAC/C,IAAI,IAAI,CAAC,KAAK,IAAI,CAAC,QAAQ,EAAE;AAC7B,MAAM,OAAO,IAAI,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,kCAAkC,EAAE,KAAK,EAAE,CAAC;AAC5E,IAAI;AACJ,IAAI,IAAI;AACR,MAAM,MAAM,MAAM,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,gBAAgB,CAAC,KAAK,EAAE,QAAQ,CAAC;AAC3E,IAAI,CAAC,CAAC,OAAO,GAAG,EAAE;AAClB,MAAM,MAAM,OAAO,GAAG,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,SAAS,IAAI,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,4BAA4B;AAC7H,MAAM,OAAO,IAAI,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;AACjD,IAAI;AACJ,IAAI,MAAM,UAAU,GAAG,cAAc,CAAC,GAAG,CAAC,YAAY,CAAC;AACvD,IAAI,MAAM,QAAQ,CAAC,GAAG,EAAE,UAAU,CAAC;AACnC,EAAE;AACF,CAAC;;;;;;;;AC3BW,MAAC,KAAK,GAAG;AACrB,IAAI,eAAe;AACP,MAAC,SAAS,GAAG,YAAY,eAAe,KAAK,CAAC,MAAM,OAAO,4BAAwC,CAAC,EAAE;AAEtG,MAAC,SAAS,GAAG;AACb,MAAC,OAAO,GAAG,CAAC,oCAAoC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC,CAAC,mCAAmC;AACpO,MAAC,WAAW,GAAG;AACf,MAAC,KAAK,GAAG;;;;"}
|
||||
@@ -0,0 +1,11 @@
|
||||
import { c as slot } from './index-Cd32JeF5.js';
|
||||
import 'clsx';
|
||||
|
||||
function _layout($$renderer, $$props) {
|
||||
$$renderer.push(`<!--[-->`);
|
||||
slot($$renderer, $$props, "default", {});
|
||||
$$renderer.push(`<!--]-->`);
|
||||
}
|
||||
|
||||
export { _layout as default };
|
||||
//# sourceMappingURL=_layout.svelte-Ectc0goa.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"_layout.svelte-Ectc0goa.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/_layout.svelte.js"],"sourcesContent":["import { s as slot } from \"../../chunks/index.js\";\nfunction _layout($$renderer, $$props) {\n $$renderer.push(`<!--[-->`);\n slot($$renderer, $$props, \"default\", {});\n $$renderer.push(`<!--]-->`);\n}\nexport {\n _layout as default\n};\n"],"names":[],"mappings":";;;AACA,SAAS,OAAO,CAAC,UAAU,EAAE,OAAO,EAAE;AACtC,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC;AAC7B,EAAE,IAAI,CAAC,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,CAAC;AAC1C,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC;AAC7B;;;;"}
|
||||
@@ -0,0 +1,14 @@
|
||||
import 'clsx';
|
||||
|
||||
function _page($$renderer, $$props) {
|
||||
let { data } = $$props;
|
||||
$$renderer.push(`<main class="flex min-h-screen flex-col items-center justify-center p-4">`);
|
||||
{
|
||||
$$renderer.push("<!--[!-->");
|
||||
$$renderer.push(`<div class="w-full max-w-sm space-y-4 rounded-xl border bg-card p-6 shadow-sm"><div class="space-y-1"><h1 class="text-lg font-semibold">Login</h1> <p class="text-muted-foreground text-sm">Enter your email and password to sign in.</p></div> <p class="text-muted-foreground text-sm">Loading form…</p></div>`);
|
||||
}
|
||||
$$renderer.push(`<!--]--></main>`);
|
||||
}
|
||||
|
||||
export { _page as default };
|
||||
//# sourceMappingURL=_page.svelte-3rk2vnq3.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"_page.svelte-3rk2vnq3.js","sources":["../../../.svelte-kit/adapter-node/entries/pages/login/_page.svelte.js"],"sourcesContent":["import \"clsx\";\nfunction _page($$renderer, $$props) {\n let { data } = $$props;\n $$renderer.push(`<main class=\"flex min-h-screen flex-col items-center justify-center p-4\">`);\n {\n $$renderer.push(\"<!--[!-->\");\n $$renderer.push(`<div class=\"w-full max-w-sm space-y-4 rounded-xl border bg-card p-6 shadow-sm\"><div class=\"space-y-1\"><h1 class=\"text-lg font-semibold\">Login</h1> <p class=\"text-muted-foreground text-sm\">Enter your email and password to sign in.</p></div> <p class=\"text-muted-foreground text-sm\">Loading form…</p></div>`);\n }\n $$renderer.push(`<!--]--></main>`);\n}\nexport {\n _page as default\n};\n"],"names":[],"mappings":";;AACA,SAAS,KAAK,CAAC,UAAU,EAAE,OAAO,EAAE;AACpC,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,OAAO;AACxB,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,yEAAyE,CAAC,CAAC;AAC9F,EAAE;AACF,IAAI,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC;AAChC,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,gTAAgT,CAAC,CAAC;AACvU,EAAE;AACF,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,eAAe,CAAC,CAAC;AACpC;;;;"}
|
||||
@@ -0,0 +1,671 @@
|
||||
import { a9 as head, d as escape_html, a6 as attributes, a7 as clsx, a8 as bind_props, aa as ensure_array_like, ab as element } from './index-Cd32JeF5.js';
|
||||
import { c as cn, t as tv } from './index-DWasNFG9.js';
|
||||
import 'clsx';
|
||||
import 'tailwind-merge';
|
||||
|
||||
function Table($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
let {
|
||||
ref = null,
|
||||
class: className,
|
||||
children,
|
||||
$$slots,
|
||||
$$events,
|
||||
...restProps
|
||||
} = $$props;
|
||||
$$renderer2.push(`<div data-slot="table-container" class="relative w-full overflow-x-auto"><table${attributes({
|
||||
"data-slot": "table",
|
||||
class: clsx(cn("w-full caption-bottom text-sm", className)),
|
||||
...restProps
|
||||
})}>`);
|
||||
children?.($$renderer2);
|
||||
$$renderer2.push(`<!----></table></div>`);
|
||||
bind_props($$props, { ref });
|
||||
});
|
||||
}
|
||||
function Table_body($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
let {
|
||||
ref = null,
|
||||
class: className,
|
||||
children,
|
||||
$$slots,
|
||||
$$events,
|
||||
...restProps
|
||||
} = $$props;
|
||||
$$renderer2.push(`<tbody${attributes({
|
||||
"data-slot": "table-body",
|
||||
class: clsx(cn("[&_tr:last-child]:border-0", className)),
|
||||
...restProps
|
||||
})}>`);
|
||||
children?.($$renderer2);
|
||||
$$renderer2.push(`<!----></tbody>`);
|
||||
bind_props($$props, { ref });
|
||||
});
|
||||
}
|
||||
function Table_cell($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
let {
|
||||
ref = null,
|
||||
class: className,
|
||||
children,
|
||||
$$slots,
|
||||
$$events,
|
||||
...restProps
|
||||
} = $$props;
|
||||
$$renderer2.push(`<td${attributes({
|
||||
"data-slot": "table-cell",
|
||||
class: clsx(cn("bg-clip-padding p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pe-0", className)),
|
||||
...restProps
|
||||
})}>`);
|
||||
children?.($$renderer2);
|
||||
$$renderer2.push(`<!----></td>`);
|
||||
bind_props($$props, { ref });
|
||||
});
|
||||
}
|
||||
function Table_head($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
let {
|
||||
ref = null,
|
||||
class: className,
|
||||
children,
|
||||
$$slots,
|
||||
$$events,
|
||||
...restProps
|
||||
} = $$props;
|
||||
$$renderer2.push(`<th${attributes({
|
||||
"data-slot": "table-head",
|
||||
class: clsx(cn("text-foreground h-10 bg-clip-padding px-2 text-start align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pe-0", className)),
|
||||
...restProps
|
||||
})}>`);
|
||||
children?.($$renderer2);
|
||||
$$renderer2.push(`<!----></th>`);
|
||||
bind_props($$props, { ref });
|
||||
});
|
||||
}
|
||||
function Table_header($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
let {
|
||||
ref = null,
|
||||
class: className,
|
||||
children,
|
||||
$$slots,
|
||||
$$events,
|
||||
...restProps
|
||||
} = $$props;
|
||||
$$renderer2.push(`<thead${attributes({
|
||||
"data-slot": "table-header",
|
||||
class: clsx(cn("[&_tr]:border-b", className)),
|
||||
...restProps
|
||||
})}>`);
|
||||
children?.($$renderer2);
|
||||
$$renderer2.push(`<!----></thead>`);
|
||||
bind_props($$props, { ref });
|
||||
});
|
||||
}
|
||||
function Table_row($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
let {
|
||||
ref = null,
|
||||
class: className,
|
||||
children,
|
||||
$$slots,
|
||||
$$events,
|
||||
...restProps
|
||||
} = $$props;
|
||||
$$renderer2.push(`<tr${attributes({
|
||||
"data-slot": "table-row",
|
||||
class: clsx(cn("hover:[&,&>svelte-css-wrapper]:[&>th,td]:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors", className)),
|
||||
...restProps
|
||||
})}>`);
|
||||
children?.($$renderer2);
|
||||
$$renderer2.push(`<!----></tr>`);
|
||||
bind_props($$props, { ref });
|
||||
});
|
||||
}
|
||||
const badgeVariants = tv({
|
||||
base: "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] [&>svg]:pointer-events-none [&>svg]:size-3",
|
||||
variants: {
|
||||
variant: {
|
||||
default: "bg-primary text-primary-foreground [a&]:hover:bg-primary/90 border-transparent",
|
||||
secondary: "bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90 border-transparent",
|
||||
destructive: "bg-destructive [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/70 border-transparent text-white",
|
||||
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
|
||||
}
|
||||
},
|
||||
defaultVariants: { variant: "default" }
|
||||
});
|
||||
function Badge($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
let {
|
||||
ref = null,
|
||||
href,
|
||||
class: className,
|
||||
variant = "default",
|
||||
children,
|
||||
$$slots,
|
||||
$$events,
|
||||
...restProps
|
||||
} = $$props;
|
||||
element(
|
||||
$$renderer2,
|
||||
href ? "a" : "span",
|
||||
() => {
|
||||
$$renderer2.push(`${attributes({
|
||||
"data-slot": "badge",
|
||||
href,
|
||||
class: clsx(cn(badgeVariants({ variant }), className)),
|
||||
...restProps
|
||||
})}`);
|
||||
},
|
||||
() => {
|
||||
children?.($$renderer2);
|
||||
$$renderer2.push(`<!---->`);
|
||||
}
|
||||
);
|
||||
bind_props($$props, { ref });
|
||||
});
|
||||
}
|
||||
function Card($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
let {
|
||||
ref = null,
|
||||
class: className,
|
||||
children,
|
||||
$$slots,
|
||||
$$events,
|
||||
...restProps
|
||||
} = $$props;
|
||||
$$renderer2.push(`<div${attributes({
|
||||
"data-slot": "card",
|
||||
class: clsx(cn("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm", className)),
|
||||
...restProps
|
||||
})}>`);
|
||||
children?.($$renderer2);
|
||||
$$renderer2.push(`<!----></div>`);
|
||||
bind_props($$props, { ref });
|
||||
});
|
||||
}
|
||||
function Card_content($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
let {
|
||||
ref = null,
|
||||
class: className,
|
||||
children,
|
||||
$$slots,
|
||||
$$events,
|
||||
...restProps
|
||||
} = $$props;
|
||||
$$renderer2.push(`<div${attributes({
|
||||
"data-slot": "card-content",
|
||||
class: clsx(cn("px-6", className)),
|
||||
...restProps
|
||||
})}>`);
|
||||
children?.($$renderer2);
|
||||
$$renderer2.push(`<!----></div>`);
|
||||
bind_props($$props, { ref });
|
||||
});
|
||||
}
|
||||
function Card_header($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
let {
|
||||
ref = null,
|
||||
class: className,
|
||||
children,
|
||||
$$slots,
|
||||
$$events,
|
||||
...restProps
|
||||
} = $$props;
|
||||
$$renderer2.push(`<div${attributes({
|
||||
"data-slot": "card-header",
|
||||
class: clsx(cn("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6", className)),
|
||||
...restProps
|
||||
})}>`);
|
||||
children?.($$renderer2);
|
||||
$$renderer2.push(`<!----></div>`);
|
||||
bind_props($$props, { ref });
|
||||
});
|
||||
}
|
||||
function Card_title($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
let {
|
||||
ref = null,
|
||||
class: className,
|
||||
children,
|
||||
$$slots,
|
||||
$$events,
|
||||
...restProps
|
||||
} = $$props;
|
||||
$$renderer2.push(`<div${attributes({
|
||||
"data-slot": "card-title",
|
||||
class: clsx(cn("leading-none font-semibold", className)),
|
||||
...restProps
|
||||
})}>`);
|
||||
children?.($$renderer2);
|
||||
$$renderer2.push(`<!----></div>`);
|
||||
bind_props($$props, { ref });
|
||||
});
|
||||
}
|
||||
function _page($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
let { data } = $$props;
|
||||
function asList(val) {
|
||||
if (val == null) return [];
|
||||
return Array.isArray(val) ? val : [val];
|
||||
}
|
||||
function formatDate(iso) {
|
||||
if (!iso) return "—";
|
||||
try {
|
||||
return new Date(iso).toLocaleDateString(void 0, { dateStyle: "short", timeStyle: "short" });
|
||||
} catch {
|
||||
return iso;
|
||||
}
|
||||
}
|
||||
const items = data?.items ?? [];
|
||||
head("rk8na7", $$renderer2, ($$renderer3) => {
|
||||
$$renderer3.title(($$renderer4) => {
|
||||
$$renderer4.push(`<title>Items – Stackq</title>`);
|
||||
});
|
||||
});
|
||||
{
|
||||
$$renderer2.push("<!--[!-->");
|
||||
$$renderer2.push(`<main class="container mx-auto flex flex-col gap-6 py-8"><div class="flex items-center justify-between"><h1 class="text-2xl font-semibold">Stackq Items</h1> <span class="text-muted-foreground text-sm">${escape_html(items.length)} items</span></div> `);
|
||||
Card($$renderer2, {
|
||||
children: ($$renderer3) => {
|
||||
Card_header($$renderer3, {
|
||||
children: ($$renderer4) => {
|
||||
Card_title($$renderer4, {
|
||||
children: ($$renderer5) => {
|
||||
$$renderer5.push(`<!---->Stackq_Items`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer4.push(`<!----> <p class="text-muted-foreground text-sm">PocketBase collection. Enable JS for create/edit/delete.</p>`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer3.push(`<!----> `);
|
||||
Card_content($$renderer3, {
|
||||
class: "p-0",
|
||||
children: ($$renderer4) => {
|
||||
$$renderer4.push("<!---->");
|
||||
Table?.($$renderer4, {
|
||||
children: ($$renderer5) => {
|
||||
$$renderer5.push("<!---->");
|
||||
Table_header?.($$renderer5, {
|
||||
children: ($$renderer6) => {
|
||||
$$renderer6.push("<!---->");
|
||||
Table_row?.($$renderer6, {
|
||||
children: ($$renderer7) => {
|
||||
$$renderer7.push("<!---->");
|
||||
Table_head?.($$renderer7, {
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->Item`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_head?.($$renderer7, {
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->SKU`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_head?.($$renderer7, {
|
||||
class: "max-w-[200px]",
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->Description`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_head?.($$renderer7, {
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->UOM`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_head?.($$renderer7, {
|
||||
class: "text-right",
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->Cost`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_head?.($$renderer7, {
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->Vendor`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_head?.($$renderer7, {
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->Catagory`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_head?.($$renderer7, {
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->Sub_Catagory`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_head?.($$renderer7, {
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->Has Parent`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_head?.($$renderer7, {
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->Parent`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_head?.($$renderer7, {
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->Stock`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_head?.($$renderer7, {
|
||||
class: "text-muted-foreground",
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->created`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_head?.($$renderer7, {
|
||||
class: "text-muted-foreground",
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->updated`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!---->`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer6.push(`<!---->`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer5.push(`<!----> `);
|
||||
$$renderer5.push("<!---->");
|
||||
Table_body?.($$renderer5, {
|
||||
children: ($$renderer6) => {
|
||||
if (items.length === 0) {
|
||||
$$renderer6.push("<!--[-->");
|
||||
$$renderer6.push("<!---->");
|
||||
Table_row?.($$renderer6, {
|
||||
children: ($$renderer7) => {
|
||||
$$renderer7.push("<!---->");
|
||||
Table_cell?.($$renderer7, {
|
||||
colspan: "13",
|
||||
class: "h-24 text-center text-muted-foreground",
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->No items.`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!---->`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer6.push(`<!---->`);
|
||||
} else {
|
||||
$$renderer6.push("<!--[!-->");
|
||||
$$renderer6.push(`<!--[-->`);
|
||||
const each_array = ensure_array_like(items);
|
||||
for (let $$index_2 = 0, $$length = each_array.length; $$index_2 < $$length; $$index_2++) {
|
||||
let item = each_array[$$index_2];
|
||||
$$renderer6.push("<!---->");
|
||||
Table_row?.($$renderer6, {
|
||||
children: ($$renderer7) => {
|
||||
$$renderer7.push("<!---->");
|
||||
Table_cell?.($$renderer7, {
|
||||
class: "font-medium",
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->${escape_html(item.Item ?? "—")}`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_cell?.($$renderer7, {
|
||||
class: "font-mono text-xs",
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->${escape_html(item.SKU ?? "—")}`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_cell?.($$renderer7, {
|
||||
class: "max-w-[200px] truncate",
|
||||
title: item.Description ?? "",
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->${escape_html(item.Description ?? "—")}`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_cell?.($$renderer7, {
|
||||
children: ($$renderer8) => {
|
||||
Badge($$renderer8, {
|
||||
variant: "outline",
|
||||
children: ($$renderer9) => {
|
||||
$$renderer9.push(`<!---->${escape_html(item.UOM ?? "—")}`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_cell?.($$renderer7, {
|
||||
class: "text-right tabular-nums",
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->${escape_html(item.Cost != null ? Number(item.Cost).toLocaleString() : "—")}`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_cell?.($$renderer7, {
|
||||
class: "text-muted-foreground",
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->${escape_html(item.Vendor ?? "—")}`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_cell?.($$renderer7, {
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!--[-->`);
|
||||
const each_array_1 = ensure_array_like(asList(item.Catagory));
|
||||
for (let $$index = 0, $$length2 = each_array_1.length; $$index < $$length2; $$index++) {
|
||||
let cat = each_array_1[$$index];
|
||||
Badge($$renderer8, {
|
||||
variant: "secondary",
|
||||
class: "mr-1 text-xs",
|
||||
children: ($$renderer9) => {
|
||||
$$renderer9.push(`<!---->${escape_html(cat)}`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
}
|
||||
$$renderer8.push(`<!--]--> `);
|
||||
if (asList(item.Catagory).length === 0) {
|
||||
$$renderer8.push("<!--[-->");
|
||||
$$renderer8.push(`<span class="text-muted-foreground">—</span>`);
|
||||
} else {
|
||||
$$renderer8.push("<!--[!-->");
|
||||
}
|
||||
$$renderer8.push(`<!--]-->`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_cell?.($$renderer7, {
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!--[-->`);
|
||||
const each_array_2 = ensure_array_like(asList(item.Sub_Catagory));
|
||||
for (let $$index_1 = 0, $$length2 = each_array_2.length; $$index_1 < $$length2; $$index_1++) {
|
||||
let sub = each_array_2[$$index_1];
|
||||
Badge($$renderer8, {
|
||||
variant: "outline",
|
||||
class: "mr-1 text-xs",
|
||||
children: ($$renderer9) => {
|
||||
$$renderer9.push(`<!---->${escape_html(sub)}`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
}
|
||||
$$renderer8.push(`<!--]--> `);
|
||||
if (asList(item.Sub_Catagory).length === 0) {
|
||||
$$renderer8.push("<!--[-->");
|
||||
$$renderer8.push(`<span class="text-muted-foreground">—</span>`);
|
||||
} else {
|
||||
$$renderer8.push("<!--[!-->");
|
||||
}
|
||||
$$renderer8.push(`<!--]-->`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_cell?.($$renderer7, {
|
||||
children: ($$renderer8) => {
|
||||
if (item.Has_Parent) {
|
||||
$$renderer8.push("<!--[-->");
|
||||
Badge($$renderer8, {
|
||||
children: ($$renderer9) => {
|
||||
$$renderer9.push(`<!---->Yes`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
} else {
|
||||
$$renderer8.push("<!--[!-->");
|
||||
$$renderer8.push(`<span class="text-muted-foreground">No</span>`);
|
||||
}
|
||||
$$renderer8.push(`<!--]-->`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_cell?.($$renderer7, {
|
||||
class: "text-muted-foreground",
|
||||
children: ($$renderer8) => {
|
||||
if (item.expand?.Parent) {
|
||||
$$renderer8.push("<!--[-->");
|
||||
$$renderer8.push(`${escape_html(item.expand.Parent.Item ?? item.expand.Parent.SKU ?? item.Parent)}`);
|
||||
} else if (item.Parent) {
|
||||
$$renderer8.push("<!--[1-->");
|
||||
$$renderer8.push(`<span class="font-mono text-xs">${escape_html(item.Parent)}</span>`);
|
||||
} else {
|
||||
$$renderer8.push("<!--[!-->");
|
||||
$$renderer8.push(`—`);
|
||||
}
|
||||
$$renderer8.push(`<!--]-->`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_cell?.($$renderer7, {
|
||||
children: ($$renderer8) => {
|
||||
if (item.Stock) {
|
||||
$$renderer8.push("<!--[-->");
|
||||
Badge($$renderer8, {
|
||||
variant: "default",
|
||||
children: ($$renderer9) => {
|
||||
$$renderer9.push(`<!---->Stock`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
} else {
|
||||
$$renderer8.push("<!--[!-->");
|
||||
$$renderer8.push(`<span class="text-muted-foreground">—</span>`);
|
||||
}
|
||||
$$renderer8.push(`<!--]-->`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_cell?.($$renderer7, {
|
||||
class: "text-muted-foreground text-xs",
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->${escape_html(formatDate(item.created))}`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!----> `);
|
||||
$$renderer7.push("<!---->");
|
||||
Table_cell?.($$renderer7, {
|
||||
class: "text-muted-foreground text-xs",
|
||||
children: ($$renderer8) => {
|
||||
$$renderer8.push(`<!---->${escape_html(formatDate(item.updated))}`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer7.push(`<!---->`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer6.push(`<!---->`);
|
||||
}
|
||||
$$renderer6.push(`<!--]-->`);
|
||||
}
|
||||
$$renderer6.push(`<!--]-->`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer5.push(`<!---->`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer4.push(`<!---->`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer3.push(`<!---->`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer2.push(`<!----></main>`);
|
||||
}
|
||||
$$renderer2.push(`<!--]-->`);
|
||||
});
|
||||
}
|
||||
|
||||
export { _page as default };
|
||||
//# sourceMappingURL=_page.svelte-BSzWqLxF.js.map
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,92 @@
|
||||
import 'clsx';
|
||||
import { a6 as attributes, a7 as clsx, a8 as bind_props } from './index-Cd32JeF5.js';
|
||||
import { c as cn, t as tv } from './index-DWasNFG9.js';
|
||||
import 'tailwind-merge';
|
||||
|
||||
const buttonVariants = tv({
|
||||
base: "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
||||
variants: {
|
||||
variant: {
|
||||
default: "bg-primary text-primary-foreground hover:bg-primary/90 shadow-xs",
|
||||
destructive: "bg-destructive hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 text-white shadow-xs",
|
||||
outline: "bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 border shadow-xs",
|
||||
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 shadow-xs",
|
||||
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
||||
link: "text-primary underline-offset-4 hover:underline"
|
||||
},
|
||||
size: {
|
||||
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
||||
sm: "h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",
|
||||
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
||||
icon: "size-9",
|
||||
"icon-sm": "size-8",
|
||||
"icon-lg": "size-10"
|
||||
}
|
||||
},
|
||||
defaultVariants: { variant: "default", size: "default" }
|
||||
});
|
||||
function Button($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
let {
|
||||
class: className,
|
||||
variant = "default",
|
||||
size = "default",
|
||||
ref = null,
|
||||
href = void 0,
|
||||
type = "button",
|
||||
disabled,
|
||||
children,
|
||||
$$slots,
|
||||
$$events,
|
||||
...restProps
|
||||
} = $$props;
|
||||
if (href) {
|
||||
$$renderer2.push("<!--[-->");
|
||||
$$renderer2.push(`<a${attributes({
|
||||
"data-slot": "button",
|
||||
class: clsx(cn(buttonVariants({ variant, size }), className)),
|
||||
href: disabled ? void 0 : href,
|
||||
"aria-disabled": disabled,
|
||||
role: disabled ? "link" : void 0,
|
||||
tabindex: disabled ? -1 : void 0,
|
||||
...restProps
|
||||
})}>`);
|
||||
children?.($$renderer2);
|
||||
$$renderer2.push(`<!----></a>`);
|
||||
} else {
|
||||
$$renderer2.push("<!--[!-->");
|
||||
$$renderer2.push(`<button${attributes({
|
||||
"data-slot": "button",
|
||||
class: clsx(cn(buttonVariants({ variant, size }), className)),
|
||||
type,
|
||||
disabled,
|
||||
...restProps
|
||||
})}>`);
|
||||
children?.($$renderer2);
|
||||
$$renderer2.push(`<!----></button>`);
|
||||
}
|
||||
$$renderer2.push(`<!--]-->`);
|
||||
bind_props($$props, { ref });
|
||||
});
|
||||
}
|
||||
function _page($$renderer) {
|
||||
$$renderer.push(`<main class="flex min-h-screen flex-col items-center justify-center gap-4 p-8"><h1 class="text-2xl font-semibold">Stackq</h1> <p class="text-muted-foreground">Svelte 5 + shadcn-svelte + PocketBase</p> <div class="flex gap-2"><a href="/items">`);
|
||||
Button($$renderer, {
|
||||
children: ($$renderer2) => {
|
||||
$$renderer2.push(`<!---->Items table`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer.push(`<!----></a> <a href="/logout">`);
|
||||
Button($$renderer, {
|
||||
variant: "outline",
|
||||
children: ($$renderer2) => {
|
||||
$$renderer2.push(`<!---->Log out`);
|
||||
},
|
||||
$$slots: { default: true }
|
||||
});
|
||||
$$renderer.push(`<!----></a></div></main>`);
|
||||
}
|
||||
|
||||
export { _page as default };
|
||||
//# sourceMappingURL=_page.svelte-C3pCwICc.js.map
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,46 @@
|
||||
import { d as escape_html, f as getContext, n as noop } from './index-Cd32JeF5.js';
|
||||
import 'clsx';
|
||||
import { l as writable } from './exports-DzT6WcEV.js';
|
||||
|
||||
function create_updated_store() {
|
||||
const { set, subscribe } = writable(false);
|
||||
{
|
||||
return {
|
||||
subscribe,
|
||||
// eslint-disable-next-line @typescript-eslint/require-await
|
||||
check: async () => false
|
||||
};
|
||||
}
|
||||
}
|
||||
const is_legacy = noop.toString().includes("$$") || /function \w+\(\) \{\}/.test(noop.toString());
|
||||
if (is_legacy) {
|
||||
({
|
||||
url: new URL("https://example.com")
|
||||
});
|
||||
}
|
||||
const stores = {
|
||||
updated: /* @__PURE__ */ create_updated_store()
|
||||
};
|
||||
({
|
||||
check: stores.updated.check
|
||||
});
|
||||
function context() {
|
||||
return getContext("__request__");
|
||||
}
|
||||
const page$1 = {
|
||||
get error() {
|
||||
return context().page.error;
|
||||
},
|
||||
get status() {
|
||||
return context().page.status;
|
||||
}
|
||||
};
|
||||
const page = page$1;
|
||||
function Error$1($$renderer, $$props) {
|
||||
$$renderer.component(($$renderer2) => {
|
||||
$$renderer2.push(`<h1>${escape_html(page.status)}</h1> <p>${escape_html(page.error?.message)}</p>`);
|
||||
});
|
||||
}
|
||||
|
||||
export { Error$1 as default };
|
||||
//# sourceMappingURL=error.svelte-RymJGne7.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"error.svelte-RymJGne7.js","sources":["../../../.svelte-kit/adapter-node/entries/fallbacks/error.svelte.js"],"sourcesContent":["import { n as noop, g as getContext, e as escape_html } from \"../../chunks/index.js\";\nimport \"clsx\";\nimport { w as writable } from \"../../chunks/exports.js\";\nimport \"@sveltejs/kit/internal/server\";\nimport \"../../chunks/root.js\";\nimport \"@sveltejs/kit/internal\";\nimport \"../../chunks/utils.js\";\nfunction create_updated_store() {\n const { set, subscribe } = writable(false);\n {\n return {\n subscribe,\n // eslint-disable-next-line @typescript-eslint/require-await\n check: async () => false\n };\n }\n}\nconst is_legacy = noop.toString().includes(\"$$\") || /function \\w+\\(\\) \\{\\}/.test(noop.toString());\nif (is_legacy) {\n ({\n data: {},\n form: null,\n error: null,\n params: {},\n route: { id: null },\n state: {},\n status: -1,\n url: new URL(\"https://example.com\")\n });\n}\nconst stores = {\n updated: /* @__PURE__ */ create_updated_store()\n};\n({\n check: stores.updated.check\n});\nfunction context() {\n return getContext(\"__request__\");\n}\nconst page$1 = {\n get error() {\n return context().page.error;\n },\n get status() {\n return context().page.status;\n }\n};\nconst page = page$1;\nfunction Error$1($$renderer, $$props) {\n $$renderer.component(($$renderer2) => {\n $$renderer2.push(`<h1>${escape_html(page.status)}</h1> <p>${escape_html(page.error?.message)}</p>`);\n });\n}\nexport {\n Error$1 as default\n};\n"],"names":[],"mappings":";;;;AAOA,SAAS,oBAAoB,GAAG;AAChC,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC;AAC5C,EAAE;AACF,IAAI,OAAO;AACX,MAAM,SAAS;AACf;AACA,MAAM,KAAK,EAAE,YAAY;AACzB,KAAK;AACL,EAAE;AACF;AACA,MAAM,SAAS,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,uBAAuB,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;AACjG,IAAI,SAAS,EAAE;AACf,EAAE,CAAC;AACH,IAOI,GAAG,EAAE,IAAI,GAAG,CAAC,qBAAqB;AACtC,GAAG;AACH;AACA,MAAM,MAAM,GAAG;AACf,EAAE,OAAO,kBAAkB,oBAAoB;AAC/C,CAAC;AACD,CAAC;AACD,EAAE,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC;AACxB,CAAC;AACD,SAAS,OAAO,GAAG;AACnB,EAAE,OAAO,UAAU,CAAC,aAAa,CAAC;AAClC;AACA,MAAM,MAAM,GAAG;AACf,EAAE,IAAI,KAAK,GAAG;AACd,IAAI,OAAO,OAAO,EAAE,CAAC,IAAI,CAAC,KAAK;AAC/B,EAAE,CAAC;AACH,EAAE,IAAI,MAAM,GAAG;AACf,IAAI,OAAO,OAAO,EAAE,CAAC,IAAI,CAAC,MAAM;AAChC,EAAE;AACF,CAAC;AACD,MAAM,IAAI,GAAG,MAAM;AACnB,SAAS,OAAO,CAAC,UAAU,EAAE,OAAO,EAAE;AACtC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,WAAW,KAAK;AACxC,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,WAAW,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC;AACvG,EAAE,CAAC,CAAC;AACJ;;;;"}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user