@oneclick.dev/cms-core-modules 0.0.82 → 0.0.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ContentEditor-4e80zFyn.js → ContentEditor-CRFkD4tE.js} +33 -33
- package/dist/{ContentEditor-Dk-iDEjl.mjs → ContentEditor-CxKirDdL.mjs} +2861 -2854
- package/dist/{Create-DtFzwxn_.mjs → Create-CsqVYhPO.mjs} +1 -1
- package/dist/{Create-CRn2sMHp.js → Create-ip0MnS0o.js} +1 -1
- package/dist/{DateFormatter-DfIwyrnF.mjs → DateFormatter-CvOfaUnU.mjs} +137 -134
- package/dist/DateFormatter-ls6HfWpS.js +1 -0
- package/dist/{Detail-BwDnY42G.mjs → Detail-CbLk1v37.mjs} +1 -1
- package/dist/{Detail-Bxi7lG9x.js → Detail-RMXFuSRQ.js} +1 -1
- package/dist/{NewReservationDialog.vue_vue_type_script_setup_true_lang-Ds7z0qeH.mjs → NewReservationDialog.vue_vue_type_script_setup_true_lang-CDc8MIq2.mjs} +1 -1
- package/dist/{NewReservationDialog.vue_vue_type_script_setup_true_lang-C5YczjNb.js → NewReservationDialog.vue_vue_type_script_setup_true_lang-StaNp-3y.js} +1 -1
- package/dist/{Overview-pCO_47Zt.js → Overview-B2bFNGhH.js} +1 -1
- package/dist/{Overview-CuCQgqVp.mjs → Overview-Cczt_dcE.mjs} +1 -1
- package/dist/{SeoHealth-EZzDmPDM.js → SeoHealth-DFZ0LLBH.js} +1 -1
- package/dist/{SeoHealth-CC0rW1AG.mjs → SeoHealth-ZpvB7CS2.mjs} +1 -1
- package/dist/{TableView-DRQvOW85.mjs → TableView-BUPPcHUW.mjs} +28920 -28605
- package/dist/{TableView-Ce8H65pL.js → TableView-CksiPsTL.js} +152 -152
- package/dist/{agenda-XqvbrU72.mjs → agenda-Cl3s_FIE.mjs} +2 -2
- package/dist/{agenda-wNFDKn0G.js → agenda-rlFma_wn.js} +1 -1
- package/dist/{exceptions-wEQEVzIs.js → exceptions-BA3PsW4n.js} +1 -1
- package/dist/{exceptions-CLgeeUSy.mjs → exceptions-DQPSFSj7.mjs} +1 -1
- package/dist/floating-ui.dom-B9WYoHj2.js +1 -0
- package/dist/{floating-ui.dom-BO2Hr6mz.mjs → floating-ui.dom-fpIfhXTZ.mjs} +400 -401
- package/dist/{index-DTzdHh6g.js → index-CBC9dWZ9.js} +1 -1
- package/dist/{index-DYpruS-A-D38FBcI3.mjs → index-DYpruS-A-Cw57iwdY.mjs} +2 -3
- package/dist/{index-DYpruS-A-CA2jEOA3.js → index-DYpruS-A-DwDXo9Tq.js} +5 -5
- package/dist/{index-N0NoDEsI.mjs → index-YOOlBEZB.mjs} +2 -2
- package/dist/index.cjs.js +1 -1
- package/dist/index.mjs +38 -24
- package/dist/orders-DZzdsHOW.mjs +397 -0
- package/dist/orders-tP4WdF5q.js +1 -0
- package/dist/server-handlers.cjs.js +1 -1
- package/dist/server-handlers.mjs +334 -293
- package/dist/src/contentManager/config.d.ts +28 -0
- package/dist/src/contentManager/index.d.ts +28 -0
- package/dist/src/contentManager/server.d.ts +7 -0
- package/dist/src/server-handlers.d.ts +1 -0
- package/package.json +2 -2
- package/dist/DateFormatter-C9qfmQnP.js +0 -1
- package/dist/floating-ui.dom-CAr9LGoC.js +0 -1
- package/dist/orders-Bqa3Z3tH.mjs +0 -356
- package/dist/orders-D5GJOZXN.js +0 -1
|
@@ -41,6 +41,20 @@ export declare const config: {
|
|
|
41
41
|
readonly type: "select";
|
|
42
42
|
readonly predefinedOptions: "languages";
|
|
43
43
|
};
|
|
44
|
+
readonly githubIntegration: {
|
|
45
|
+
readonly label: "GitHub Integration";
|
|
46
|
+
readonly type: "resource";
|
|
47
|
+
readonly accept: ["GITHUB"];
|
|
48
|
+
};
|
|
49
|
+
readonly githubRepo: {
|
|
50
|
+
readonly label: "GitHub Repository";
|
|
51
|
+
readonly type: "input";
|
|
52
|
+
};
|
|
53
|
+
readonly githubOwner: {
|
|
54
|
+
readonly label: "GitHub Owner";
|
|
55
|
+
readonly type: "input";
|
|
56
|
+
readonly required: false;
|
|
57
|
+
};
|
|
44
58
|
} & {
|
|
45
59
|
readonly project: {
|
|
46
60
|
readonly label: "Database";
|
|
@@ -83,5 +97,19 @@ export declare const config: {
|
|
|
83
97
|
readonly type: "select";
|
|
84
98
|
readonly predefinedOptions: "languages";
|
|
85
99
|
};
|
|
100
|
+
readonly githubIntegration: {
|
|
101
|
+
readonly label: "GitHub Integration";
|
|
102
|
+
readonly type: "resource";
|
|
103
|
+
readonly accept: ["GITHUB"];
|
|
104
|
+
};
|
|
105
|
+
readonly githubRepo: {
|
|
106
|
+
readonly label: "GitHub Repository";
|
|
107
|
+
readonly type: "input";
|
|
108
|
+
};
|
|
109
|
+
readonly githubOwner: {
|
|
110
|
+
readonly label: "GitHub Owner";
|
|
111
|
+
readonly type: "input";
|
|
112
|
+
readonly required: false;
|
|
113
|
+
};
|
|
86
114
|
};
|
|
87
115
|
export type ConfigValues = ResolveConfig<typeof config>;
|
|
@@ -43,6 +43,20 @@ declare const _default: {
|
|
|
43
43
|
readonly type: "select";
|
|
44
44
|
readonly predefinedOptions: "languages";
|
|
45
45
|
};
|
|
46
|
+
readonly githubIntegration: {
|
|
47
|
+
readonly label: "GitHub Integration";
|
|
48
|
+
readonly type: "resource";
|
|
49
|
+
readonly accept: ["GITHUB"];
|
|
50
|
+
};
|
|
51
|
+
readonly githubRepo: {
|
|
52
|
+
readonly label: "GitHub Repository";
|
|
53
|
+
readonly type: "input";
|
|
54
|
+
};
|
|
55
|
+
readonly githubOwner: {
|
|
56
|
+
readonly label: "GitHub Owner";
|
|
57
|
+
readonly type: "input";
|
|
58
|
+
readonly required: false;
|
|
59
|
+
};
|
|
46
60
|
} & {
|
|
47
61
|
readonly project: {
|
|
48
62
|
readonly label: "Database";
|
|
@@ -85,6 +99,20 @@ declare const _default: {
|
|
|
85
99
|
readonly type: "select";
|
|
86
100
|
readonly predefinedOptions: "languages";
|
|
87
101
|
};
|
|
102
|
+
readonly githubIntegration: {
|
|
103
|
+
readonly label: "GitHub Integration";
|
|
104
|
+
readonly type: "resource";
|
|
105
|
+
readonly accept: ["GITHUB"];
|
|
106
|
+
};
|
|
107
|
+
readonly githubRepo: {
|
|
108
|
+
readonly label: "GitHub Repository";
|
|
109
|
+
readonly type: "input";
|
|
110
|
+
};
|
|
111
|
+
readonly githubOwner: {
|
|
112
|
+
readonly label: "GitHub Owner";
|
|
113
|
+
readonly type: "input";
|
|
114
|
+
readonly required: false;
|
|
115
|
+
};
|
|
88
116
|
};
|
|
89
117
|
routes: ({
|
|
90
118
|
path: string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dependencies injected by the CMS when creating this handler.
|
|
3
|
+
*/
|
|
4
|
+
export interface ModuleHandlerDeps {
|
|
5
|
+
decrypt: (data: string) => string;
|
|
6
|
+
}
|
|
7
|
+
export declare function createServerHandler(deps: ModuleHandlerDeps): import('h3').EventHandler<import('h3').EventHandlerRequest, any>;
|
|
@@ -7,3 +7,4 @@
|
|
|
7
7
|
export { createServerHandler as products } from './products/server';
|
|
8
8
|
export { createServerHandler as appointments } from './appointments/server';
|
|
9
9
|
export { createServerHandler as googleAnalytics } from './googleAnalytics/server';
|
|
10
|
+
export { createServerHandler as contentManager } from './contentManager/server';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oneclick.dev/cms-core-modules",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.83",
|
|
4
4
|
"main": "dist/index.cjs.js",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"@formkit/drag-and-drop": "^0.5.3",
|
|
30
30
|
"@internationalized/date": "^3.8.0",
|
|
31
|
-
"@oneclick.dev/cms-kit": "0.0.
|
|
31
|
+
"@oneclick.dev/cms-kit": "0.0.93",
|
|
32
32
|
"@tanstack/vue-table": "^8.21.3",
|
|
33
33
|
"@vee-validate/zod": "^4.15.0",
|
|
34
34
|
"@vue-flow/core": "^1.48.1",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";function Y(e,t){return e-t*Math.floor(e/t)}const ne=1721426;function C(e,t,r,n){t=T(e,t);let a=t-1,o=-2;return r<=2?o=0:A(t)&&(o=-1),ne-1+365*a+Math.floor(a/4)-Math.floor(a/100)+Math.floor(a/400)+Math.floor((367*r-362)/12+o+n)}function A(e){return e%4===0&&(e%100!==0||e%400===0)}function T(e,t){return e==="BC"?1-t:t}function ae(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}const we={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class b{fromJulianDay(t){let r=t,n=r-ne,a=Math.floor(n/146097),o=Y(n,146097),c=Math.floor(o/36524),i=Y(o,36524),f=Math.floor(i/1461),d=Y(i,1461),g=Math.floor(d/365),w=a*400+c*100+f*4+g+(c!==4&&g!==4?1:0),[x,m]=ae(w),y=r-C(x,m,1,1),k=2;r<C(x,m,3,1)?k=0:A(m)&&(k=1);let Q=Math.floor(((y+k)*12+373)/367),ge=r-C(x,m,Q,1)+1;return new M(x,m,Q,ge)}toJulianDay(t){return C(t.era,t.year,t.month,t.day)}getDaysInMonth(t){return we[A(t.year)?"leapyear":"standard"][t.month-1]}getMonthsInYear(t){return 12}getDaysInYear(t){return A(t.year)?366:365}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getYearsInEra(t){return 9999}getEras(){return["BC","AD"]}isInverseEra(t){return t.era==="BC"}balanceDate(t){t.year<=0&&(t.era=t.era==="BC"?"AD":"BC",t.year=1-t.year)}constructor(){this.identifier="gregory"}}const xe={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function j(e,t){return t=l(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function oe(e,t){return t=l(t,e.calendar),e=L(e),t=L(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function De(e,t){return q(e.calendar,t.calendar)&&j(e,t)}function ve(e,t){return q(e.calendar,t.calendar)&&oe(e,t)}function q(e,t){var r,n,a,o;return(o=(a=(r=e.isEqual)===null||r===void 0?void 0:r.call(e,t))!==null&&a!==void 0?a:(n=t.isEqual)===null||n===void 0?void 0:n.call(t,e))!==null&&o!==void 0?o:e.identifier===t.identifier}function Ie(e,t){return j(e,ce(t))}const Ee={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function Se(e,t,r){let n=e.calendar.toJulianDay(e),a=r?Ee[r]:Be(t),o=Math.ceil(n+1-a)%7;return o<0&&(o+=7),o}function Ce(e){return u(Date.now(),e)}function ce(e){return ke(Ce(e))}function ie(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function Ae(e,t){return X(e)-X(t)}function X(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}let O=null;function K(){return O==null&&(O=new Intl.DateTimeFormat().resolvedOptions().timeZone),O}function L(e){return e.subtract({days:e.day-1})}function Re(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}const ee=new Map,Z=new Map;function Ye(e){if(Intl.Locale){let r=ee.get(e);return r||(r=new Intl.Locale(e).maximize().region,r&&ee.set(e,r)),r}let t=e.split("-")[1];return t==="u"?void 0:t}function Be(e){let t=Z.get(e);if(!t){if(Intl.Locale){let n=new Intl.Locale(e);if("getWeekInfo"in n&&(t=n.getWeekInfo(),t))return Z.set(e,t),t.firstDay}let r=Ye(e);if(e.includes("-fw-")){let n=e.split("-fw-")[1].split("-")[0];n==="mon"?t={firstDay:1}:n==="tue"?t={firstDay:2}:n==="wed"?t={firstDay:3}:n==="thu"?t={firstDay:4}:n==="fri"?t={firstDay:5}:n==="sat"?t={firstDay:6}:t={firstDay:0}}else e.includes("-ca-iso8601")?t={firstDay:1}:t={firstDay:r&&xe[r]||0};Z.set(e,t)}return t.firstDay}function D(e){e=l(e,new b);let t=T(e.era,e.year);return fe(t,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function fe(e,t,r,n,a,o,c){let i=new Date;return i.setUTCHours(n,a,o,c),i.setUTCFullYear(e,t-1,r),i.getTime()}function N(e,t){if(t==="UTC")return 0;if(e>0&&t===K())return new Date(e).getTimezoneOffset()*-6e4;let{year:r,month:n,day:a,hour:o,minute:c,second:i}=le(e,t);return fe(r,n,a,o,c,i,0)-Math.floor(e/1e3)*1e3}const te=new Map;function le(e,t){let r=te.get(t);r||(r=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),te.set(t,r));let n=r.formatToParts(new Date(e)),a={};for(let o of n)o.type!=="literal"&&(a[o.type]=o.value);return{year:a.era==="BC"||a.era==="B"?-a.year+1:+a.year,month:+a.month,day:+a.day,hour:a.hour==="24"?0:+a.hour,minute:+a.minute,second:+a.second}}const re=864e5;function Te(e,t,r,n){return(r===n?[r]:[r,n]).filter(o=>Ue(e,t,o))}function Ue(e,t,r){let n=le(r,t);return e.year===n.year&&e.month===n.month&&e.day===n.day&&e.hour===n.hour&&e.minute===n.minute&&e.second===n.second}function h(e,t,r="compatible"){let n=v(e);if(t==="UTC")return D(n);if(t===K()&&r==="compatible"){n=l(n,new b);let f=new Date,d=T(n.era,n.year);return f.setFullYear(d,n.month-1,n.day),f.setHours(n.hour,n.minute,n.second,n.millisecond),f.getTime()}let a=D(n),o=N(a-re,t),c=N(a+re,t),i=Te(n,t,a-o,a-c);if(i.length===1)return i[0];if(i.length>1)switch(r){case"compatible":case"earlier":return i[0];case"later":return i[i.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(r){case"earlier":return Math.min(a-o,a-c);case"compatible":case"later":return Math.max(a-o,a-c);case"reject":throw new RangeError("No such absolute time found")}}function se(e,t,r="compatible"){return new Date(h(e,t,r))}function u(e,t){let r=N(e,t),n=new Date(e+r),a=n.getUTCFullYear(),o=n.getUTCMonth()+1,c=n.getUTCDate(),i=n.getUTCHours(),f=n.getUTCMinutes(),d=n.getUTCSeconds(),g=n.getUTCMilliseconds();return new E(a<1?"BC":"AD",a<1?-a+1:a,o,c,t,r,i,f,d,g)}function ke(e){return new M(e.calendar,e.era,e.year,e.month,e.day)}function v(e,t){let r=0,n=0,a=0,o=0;if("timeZone"in e)({hour:r,minute:n,second:a,millisecond:o}=e);else if("hour"in e&&!t)return e;return t&&({hour:r,minute:n,second:a,millisecond:o}=t),new I(e.calendar,e.era,e.year,e.month,e.day,r,n,a,o)}function l(e,t){if(q(e.calendar,t))return e;let r=t.fromJulianDay(e.calendar.toJulianDay(e)),n=e.copy();return n.calendar=t,n.era=r.era,n.year=r.year,n.month=r.month,n.day=r.day,p(n),n}function Oe(e,t,r){if(e instanceof E)return e.timeZone===t?e:Pe(e,t);let n=h(e,t,r);return u(n,t)}function Ze(e){let t=D(e)-e.offset;return new Date(t)}function Pe(e,t){let r=D(e)-e.offset;return l(u(r,t),e.calendar)}const S=36e5;function U(e,t){let r=e.copy(),n="hour"in r?Ne(r,t):0;J(r,t.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,e),r.month+=t.months||0,W(r),de(r),r.day+=(t.weeks||0)*7,r.day+=t.days||0,r.day+=n,He(r),r.calendar.balanceDate&&r.calendar.balanceDate(r),r.year<1&&(r.year=1,r.month=1,r.day=1);let a=r.calendar.getYearsInEra(r);if(r.year>a){var o,c;let f=(o=(c=r.calendar).isInverseEra)===null||o===void 0?void 0:o.call(c,r);r.year=a,r.month=f?1:r.calendar.getMonthsInYear(r),r.day=f?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let i=r.calendar.getMonthsInYear(r);return r.month>i&&(r.month=i,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function J(e,t){var r,n;!((r=(n=e.calendar).isInverseEra)===null||r===void 0)&&r.call(n,e)&&(t=-t),e.year+=t}function W(e){for(;e.month<1;)J(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,J(e,1)}function He(e){for(;e.day<1;)e.month--,W(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,W(e)}function de(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function p(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),de(e)}function he(e){let t={};for(let r in e)typeof e[r]=="number"&&(t[r]=-e[r]);return t}function ue(e,t){return U(e,he(t))}function V(e,t){let r=e.copy();return t.era!=null&&(r.era=t.era),t.year!=null&&(r.year=t.year),t.month!=null&&(r.month=t.month),t.day!=null&&(r.day=t.day),p(r),r}function B(e,t){let r=e.copy();return t.hour!=null&&(r.hour=t.hour),t.minute!=null&&(r.minute=t.minute),t.second!=null&&(r.second=t.second),t.millisecond!=null&&(r.millisecond=t.millisecond),Le(r),r}function Fe(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=R(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=R(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=R(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=R(e.hour,24),t}function Le(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function R(e,t){let r=e%t;return r<0&&(r+=t),r}function Ne(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,Fe(e)}function G(e,t,r,n){let a=e.copy();switch(t){case"era":{let i=e.calendar.getEras(),f=i.indexOf(e.era);if(f<0)throw new Error("Invalid era: "+e.era);f=$(f,r,0,i.length-1,n?.round),a.era=i[f],p(a);break}case"year":var o,c;!((o=(c=a.calendar).isInverseEra)===null||o===void 0)&&o.call(c,a)&&(r=-r),a.year=$(e.year,r,-1/0,9999,n?.round),a.year===-1/0&&(a.year=1),a.calendar.balanceYearMonth&&a.calendar.balanceYearMonth(a,e);break;case"month":a.month=$(e.month,r,1,e.calendar.getMonthsInYear(e),n?.round);break;case"day":a.day=$(e.day,r,1,e.calendar.getDaysInMonth(e),n?.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(a),p(a),a}function $e(e,t,r,n){let a=e.copy();switch(t){case"hour":{let o=e.hour,c=0,i=23;if(n?.hourCycle===12){let f=o>=12;c=f?12:0,i=f?23:11}a.hour=$(o,r,c,i,n?.round);break}case"minute":a.minute=$(e.minute,r,0,59,n?.round);break;case"second":a.second=$(e.second,r,0,59,n?.round);break;case"millisecond":a.millisecond=$(e.millisecond,r,0,999,n?.round);break;default:throw new Error("Unsupported field "+t)}return a}function $(e,t,r,n,a=!1){if(a){e+=Math.sign(t),e<r&&(e=n);let o=Math.abs(t);t>0?e=Math.ceil(e/o)*o:e=Math.floor(e/o)*o,e>n&&(e=r)}else e+=t,e<r?e=n-(r-e-1):e>n&&(e=r+(e-n-1));return e}function ye(e,t){let r;if(t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0){let a=U(v(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});r=h(a,e.timeZone)}else r=D(e)-e.offset;r+=t.milliseconds||0,r+=(t.seconds||0)*1e3,r+=(t.minutes||0)*6e4,r+=(t.hours||0)*36e5;let n=u(r,e.timeZone);return l(n,e.calendar)}function Je(e,t){return ye(e,he(t))}function We(e,t,r,n){switch(t){case"hour":{let a=0,o=23;if(n?.hourCycle===12){let y=e.hour>=12;a=y?12:0,o=y?23:11}let c=v(e),i=l(B(c,{hour:a}),new b),f=[h(i,e.timeZone,"earlier"),h(i,e.timeZone,"later")].filter(y=>u(y,e.timeZone).day===i.day)[0],d=l(B(c,{hour:o}),new b),g=[h(d,e.timeZone,"earlier"),h(d,e.timeZone,"later")].filter(y=>u(y,e.timeZone).day===d.day).pop(),w=D(e)-e.offset,x=Math.floor(w/S),m=w%S;return w=$(x,r,Math.floor(f/S),Math.floor(g/S),n?.round)*S+m,l(u(w,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return $e(e,t,r,n);case"era":case"year":case"month":case"day":{let a=G(v(e),t,r,n),o=h(a,e.timeZone);return l(u(o,e.timeZone),e.calendar)}default:throw new Error("Unsupported field "+t)}}function je(e,t,r){let n=v(e),a=B(V(n,t),t);if(a.compare(n)===0)return e;let o=h(a,e.timeZone,r);return l(u(o,e.timeZone),e.calendar)}const qe=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,Ke=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,me=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;function Ve(e){let t=e.match(qe);if(!t)throw me.test(e)?new Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date string: "+e);let r=new M(s(t[1],0,9999),s(t[2],1,12),1);return r.day=s(t[3],1,r.calendar.getDaysInMonth(r)),r}function Ge(e){let t=e.match(Ke);if(!t)throw me.test(e)?new Error(`Invalid ISO 8601 date time string: ${e}. Use parseAbsolute() instead.`):new Error("Invalid ISO 8601 date time string: "+e);let r=s(t[1],-9999,9999),n=r<1?"BC":"AD",a=new I(n,r<1?-r+1:r,s(t[2],1,12),1,t[4]?s(t[4],0,23):0,t[5]?s(t[5],0,59):0,t[6]?s(t[6],0,59):0,t[7]?s(t[7],0,1/0)*1e3:0);return a.day=s(t[3],0,a.calendar.getDaysInMonth(a)),a}function s(e,t,r){let n=Number(e);if(n<t||n>r)throw new RangeError(`Value out of range: ${t} <= ${n} <= ${r}`);return n}function _e(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function be(e){let t=l(e,new b),r;return t.era==="BC"?r=t.year===1?"0000":"-"+String(Math.abs(1-t.year)).padStart(6,"00"):r=String(t.year).padStart(4,"0"),`${r}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function pe(e){return`${be(e)}T${_e(e)}`}function ze(e){let t=Math.sign(e)<0?"-":"+";e=Math.abs(e);let r=Math.floor(e/36e5),n=Math.floor(e%36e5/6e4),a=Math.floor(e%36e5%6e4/1e3),o=`${t}${String(r).padStart(2,"0")}:${String(n).padStart(2,"0")}`;return a!==0&&(o+=`:${String(a).padStart(2,"0")}`),o}function Qe(e){return`${pe(e)}${ze(e.offset)}[${e.timeZone}]`}function Xe(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _(e,t,r){Xe(e,t),t.set(e,r)}function z(e){let t=typeof e[0]=="object"?e.shift():new b,r;if(typeof e[0]=="string")r=e.shift();else{let c=t.getEras();r=c[c.length-1]}let n=e.shift(),a=e.shift(),o=e.shift();return[t,r,n,a,o]}var et=new WeakMap;class M{copy(){return this.era?new M(this.calendar,this.era,this.year,this.month,this.day):new M(this.calendar,this.year,this.month,this.day)}add(t){return U(this,t)}subtract(t){return ue(this,t)}set(t){return V(this,t)}cycle(t,r,n){return G(this,t,r,n)}toDate(t){return se(this,t)}toString(){return be(this)}compare(t){return ie(this,t)}constructor(...t){_(this,et,{writable:!0,value:void 0});let[r,n,a,o,c]=z(t);this.calendar=r,this.era=n,this.year=a,this.month=o,this.day=c,p(this)}}var tt=new WeakMap;class I{copy(){return this.era?new I(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new I(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return U(this,t)}subtract(t){return ue(this,t)}set(t){return V(B(this,t),t)}cycle(t,r,n){switch(t){case"era":case"year":case"month":case"day":return G(this,t,r,n);default:return $e(this,t,r,n)}}toDate(t,r){return se(this,t,r)}toString(){return pe(this)}compare(t){let r=ie(this,t);return r===0?Ae(this,v(t)):r}constructor(...t){_(this,tt,{writable:!0,value:void 0});let[r,n,a,o,c]=z(t);this.calendar=r,this.era=n,this.year=a,this.month=o,this.day=c,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,p(this)}}var rt=new WeakMap;class E{copy(){return this.era?new E(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new E(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return ye(this,t)}subtract(t){return Je(this,t)}set(t,r){return je(this,t,r)}cycle(t,r,n){return We(this,t,r,n)}toDate(){return Ze(this)}toString(){return Qe(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-Oe(t,this.timeZone).toDate().getTime()}constructor(...t){_(this,rt,{writable:!0,value:void 0});let[r,n,a,o,c]=z(t),i=t.shift(),f=t.shift();this.calendar=r,this.era=n,this.year=a,this.month=o,this.day=c,this.timeZone=i,this.offset=f,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,p(this)}}let P=new Map;class nt{format(t){return this.formatter.format(t)}formatToParts(t){return this.formatter.formatToParts(t)}formatRange(t,r){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(t,r);if(r<t)throw new RangeError("End date must be >= start date");return`${this.formatter.format(t)} – ${this.formatter.format(r)}`}formatRangeToParts(t,r){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(t,r);if(r<t)throw new RangeError("End date must be >= start date");let n=this.formatter.formatToParts(t),a=this.formatter.formatToParts(r);return[...n.map(o=>({...o,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...a.map(o=>({...o,source:"endRange"}))]}resolvedOptions(){let t=this.formatter.resolvedOptions();return ct()&&(this.resolvedHourCycle||(this.resolvedHourCycle=it(t.locale,this.options)),t.hourCycle=this.resolvedHourCycle,t.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),t.calendar==="ethiopic-amete-alem"&&(t.calendar="ethioaa"),t}constructor(t,r={}){this.formatter=Me(t,r),this.options=r}}const at={true:{ja:"h11"},false:{}};function Me(e,t={}){if(typeof t.hour12=="boolean"&&ot()){t={...t};let a=at[String(t.hour12)][e.split("-")[0]],o=t.hour12?"h12":"h23";t.hourCycle=a??o,delete t.hour12}let r=e+(t?Object.entries(t).sort((a,o)=>a[0]<o[0]?-1:1).join():"");if(P.has(r))return P.get(r);let n=new Intl.DateTimeFormat(e,t);return P.set(r,n),n}let H=null;function ot(){return H==null&&(H=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),H}let F=null;function ct(){return F==null&&(F=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),F}function it(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),e+=(e.includes("-u-")?"":"-u")+"-nu-latn";let r=Me(e,{...t,timeZone:void 0}),n=parseInt(r.formatToParts(new Date(2020,2,3,0)).find(o=>o.type==="hour").value,10),a=parseInt(r.formatToParts(new Date(2020,2,3,23)).find(o=>o.type==="hour").value,10);if(n===0&&a===23)return"h23";if(n===24&&a===23)return"h24";if(n===0&&a===11)return"h11";if(n===12&&a===11)return"h12";throw new Error("Unexpected hour cycle result")}exports.$11d87f3f76e88657$export$b4a036af3fc0b032=l;exports.$14e0f24ef4ac5c92$export$2061056d06d7cdf7=Se;exports.$14e0f24ef4ac5c92$export$5a8da0c44a3afdf2=ve;exports.$14e0f24ef4ac5c92$export$629b0a497aa65267=Ie;exports.$14e0f24ef4ac5c92$export$91b62ebf2ba703ee=De;exports.$14e0f24ef4ac5c92$export$a18c89cbd24170ff=oe;exports.$14e0f24ef4ac5c92$export$a2258d9c4118825c=Re;exports.$14e0f24ef4ac5c92$export$a5a3b454ada2268e=L;exports.$14e0f24ef4ac5c92$export$aa8b41735afcabd2=K;exports.$14e0f24ef4ac5c92$export$d0bdf45af03a6ea3=ce;exports.$14e0f24ef4ac5c92$export$ea39ec197993aef0=j;exports.$2b4dce13dd5a17fa$export$842a2cf37af977e1=Y;exports.$35ea8db9cb2ccb90$export$99faa760c7908e4f=M;exports.$35ea8db9cb2ccb90$export$ca871e8dbb80966f=I;exports.$35ea8db9cb2ccb90$export$d3b7288e7994edea=E;exports.$3b62074eb05584b2$export$4475b7e617eb123c=ae;exports.$3b62074eb05584b2$export$553d7fa8e3805fc0=A;exports.$3b62074eb05584b2$export$80ee6245ec4f29ec=b;exports.$3b62074eb05584b2$export$c36e0ecb2d4fa69d=T;exports.$3b62074eb05584b2$export$f297eb839006d339=C;exports.$fae977aafc393c5c$export$588937bcd60ade55=Ge;exports.$fae977aafc393c5c$export$6b862160d295c8e=Ve;exports.$fb18d541ea1ad717$export$ad991b66133851cf=nt;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const Mt=["top","right","bottom","left"],bt=["start","end"],At=Mt.reduce((t,e)=>t.concat(e,e+"-"+bt[0],e+"-"+bt[1]),[]),$=Math.min,L=Math.max,ot=Math.round,nt=Math.floor,X=t=>({x:t,y:t}),Xt={left:"right",right:"left",bottom:"top",top:"bottom"},Yt={start:"end",end:"start"};function ut(t,e,n){return L(t,$(e,n))}function _(t,e){return typeof t=="function"?t(e):t}function k(t){return t.split("-")[0]}function V(t){return t.split("-")[1]}function mt(t){return t==="x"?"y":"x"}function ht(t){return t==="y"?"height":"width"}const jt=new Set(["top","bottom"]);function H(t){return jt.has(k(t))?"y":"x"}function gt(t){return mt(H(t))}function Ft(t,e,n){n===void 0&&(n=!1);const o=V(t),i=gt(t),s=ht(i);let r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=st(r)),[r,st(r)]}function qt(t){const e=st(t);return[it(t),e,it(e)]}function it(t){return t.replace(/start|end/g,e=>Yt[e])}const Ot=["left","right"],Rt=["right","left"],Ut=["top","bottom"],Kt=["bottom","top"];function Gt(t,e,n){switch(t){case"top":case"bottom":return n?e?Rt:Ot:e?Ot:Rt;case"left":case"right":return e?Ut:Kt;default:return[]}}function Jt(t,e,n,o){const i=V(t);let s=Gt(k(t),n==="start",o);return i&&(s=s.map(r=>r+"-"+i),e&&(s=s.concat(s.map(it)))),s}function st(t){return t.replace(/left|right|bottom|top/g,e=>Xt[e])}function Qt(t){return{top:0,right:0,bottom:0,left:0,...t}}function pt(t){return typeof t!="number"?Qt(t):{top:t,right:t,bottom:t,left:t}}function Q(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function St(t,e,n){let{reference:o,floating:i}=t;const s=H(e),r=gt(e),c=ht(r),f=k(e),u=s==="y",d=o.x+o.width/2-i.width/2,l=o.y+o.height/2-i.height/2,m=o[c]/2-i[c]/2;let a;switch(f){case"top":a={x:d,y:o.y-i.height};break;case"bottom":a={x:d,y:o.y+o.height};break;case"right":a={x:o.x+o.width,y:l};break;case"left":a={x:o.x-i.width,y:l};break;default:a={x:o.x,y:o.y}}switch(V(e)){case"start":a[r]-=m*(n&&u?-1:1);break;case"end":a[r]+=m*(n&&u?-1:1);break}return a}async function Zt(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:s,rects:r,elements:c,strategy:f}=t,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:l="floating",altBoundary:m=!1,padding:a=0}=_(e,t),h=pt(a),p=c[m?l==="floating"?"reference":"floating":l],w=Q(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(p)))==null||n?p:p.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:u,rootBoundary:d,strategy:f})),x=l==="floating"?{x:o,y:i,width:r.floating.width,height:r.floating.height}:r.reference,y=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),v=await(s.isElement==null?void 0:s.isElement(y))?await(s.getScale==null?void 0:s.getScale(y))||{x:1,y:1}:{x:1,y:1},A=Q(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:y,strategy:f}):x);return{top:(w.top-A.top+h.top)/v.y,bottom:(A.bottom-w.bottom+h.bottom)/v.y,left:(w.left-A.left+h.left)/v.x,right:(A.right-w.right+h.right)/v.x}}const te=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:r}=n,c=s.filter(Boolean),f=await(r.isRTL==null?void 0:r.isRTL(e));let u=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:l}=St(u,o,f),m=o,a={},h=0;for(let p=0;p<c.length;p++){var g;const{name:w,fn:x}=c[p],{x:y,y:v,data:A,reset:O}=await x({x:d,y:l,initialPlacement:o,placement:m,strategy:i,middlewareData:a,rects:u,platform:{...r,detectOverflow:(g=r.detectOverflow)!=null?g:Zt},elements:{reference:t,floating:e}});d=y??d,l=v??l,a={...a,[w]:{...a[w],...A}},O&&h<=50&&(h++,typeof O=="object"&&(O.placement&&(m=O.placement),O.rects&&(u=O.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):O.rects),{x:d,y:l}=St(u,m,f)),p=-1)}return{x:d,y:l,placement:m,strategy:i,middlewareData:a}},ee=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:i,rects:s,platform:r,elements:c,middlewareData:f}=e,{element:u,padding:d=0}=_(t,e)||{};if(u==null)return{};const l=pt(d),m={x:n,y:o},a=gt(i),h=ht(a),g=await r.getDimensions(u),p=a==="y",w=p?"top":"left",x=p?"bottom":"right",y=p?"clientHeight":"clientWidth",v=s.reference[h]+s.reference[a]-m[a]-s.floating[h],A=m[a]-s.reference[a],O=await(r.getOffsetParent==null?void 0:r.getOffsetParent(u));let R=O?O[y]:0;(!R||!await(r.isElement==null?void 0:r.isElement(O)))&&(R=c.floating[y]||s.floating[h]);const B=v/2-A/2,P=R/2-g[h]/2-1,b=$(l[w],P),S=$(l[x],P),T=b,E=R-g[h]-S,C=R/2-g[h]/2+B,N=ut(T,C,E),W=!f.arrow&&V(i)!=null&&C!==N&&s.reference[h]/2-(C<T?b:S)-g[h]/2<0,D=W?C<T?C-T:C-E:0;return{[a]:m[a]+D,data:{[a]:N,centerOffset:C-N-D,...W&&{alignmentOffset:D}},reset:W}}});function ne(t,e,n){return(t?[...n.filter(i=>V(i)===t),...n.filter(i=>V(i)!==t)]:n.filter(i=>k(i)===i)).filter(i=>t?V(i)===t||(e?it(i)!==i:!1):!0)}const oe=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,o,i;const{rects:s,middlewareData:r,placement:c,platform:f,elements:u}=e,{crossAxis:d=!1,alignment:l,allowedPlacements:m=At,autoAlignment:a=!0,...h}=_(t,e),g=l!==void 0||m===At?ne(l||null,a,m):m,p=await f.detectOverflow(e,h),w=((n=r.autoPlacement)==null?void 0:n.index)||0,x=g[w];if(x==null)return{};const y=Ft(x,s,await(f.isRTL==null?void 0:f.isRTL(u.floating)));if(c!==x)return{reset:{placement:g[0]}};const v=[p[k(x)],p[y[0]],p[y[1]]],A=[...((o=r.autoPlacement)==null?void 0:o.overflows)||[],{placement:x,overflows:v}],O=g[w+1];if(O)return{data:{index:w+1,overflows:A},reset:{placement:O}};const R=A.map(b=>{const S=V(b.placement);return[b.placement,S&&d?b.overflows.slice(0,2).reduce((T,E)=>T+E,0):b.overflows[0],b.overflows]}).sort((b,S)=>b[1]-S[1]),P=((i=R.filter(b=>b[2].slice(0,V(b[0])?2:3).every(S=>S<=0))[0])==null?void 0:i[0])||R[0][0];return P!==c?{data:{index:w+1,overflows:A},reset:{placement:P}}:{}}}},ie=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:s,rects:r,initialPlacement:c,platform:f,elements:u}=e,{mainAxis:d=!0,crossAxis:l=!0,fallbackPlacements:m,fallbackStrategy:a="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...p}=_(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const w=k(i),x=H(c),y=k(c)===c,v=await(f.isRTL==null?void 0:f.isRTL(u.floating)),A=m||(y||!g?[st(c)]:qt(c)),O=h!=="none";!m&&O&&A.push(...Jt(c,g,h,v));const R=[c,...A],B=await f.detectOverflow(e,p),P=[];let b=((o=s.flip)==null?void 0:o.overflows)||[];if(d&&P.push(B[w]),l){const C=Ft(i,r,v);P.push(B[C[0]],B[C[1]])}if(b=[...b,{placement:i,overflows:P}],!P.every(C=>C<=0)){var S,T;const C=(((S=s.flip)==null?void 0:S.index)||0)+1,N=R[C];if(N&&(!(l==="alignment"?x!==H(N):!1)||b.every(M=>H(M.placement)===x?M.overflows[0]>0:!0)))return{data:{index:C,overflows:b},reset:{placement:N}};let W=(T=b.filter(D=>D.overflows[0]<=0).sort((D,M)=>D.overflows[1]-M.overflows[1])[0])==null?void 0:T.placement;if(!W)switch(a){case"bestFit":{var E;const D=(E=b.filter(M=>{if(O){const q=H(M.placement);return q===x||q==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(q=>q>0).reduce((q,It)=>q+It,0)]).sort((M,q)=>M[1]-q[1])[0])==null?void 0:E[0];D&&(W=D);break}case"initialPlacement":W=c;break}if(i!==W)return{reset:{placement:W}}}return{}}}};function Ct(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Lt(t){return Mt.some(e=>t[e]>=0)}const se=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:o}=e,{strategy:i="referenceHidden",...s}=_(t,e);switch(i){case"referenceHidden":{const r=await o.detectOverflow(e,{...s,elementContext:"reference"}),c=Ct(r,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Lt(c)}}}case"escaped":{const r=await o.detectOverflow(e,{...s,altBoundary:!0}),c=Ct(r,n.floating);return{data:{escapedOffsets:c,escaped:Lt(c)}}}default:return{}}}}};function kt(t){const e=$(...t.map(s=>s.left)),n=$(...t.map(s=>s.top)),o=L(...t.map(s=>s.right)),i=L(...t.map(s=>s.bottom));return{x:e,y:n,width:o-e,height:i-n}}function re(t){const e=t.slice().sort((i,s)=>i.y-s.y),n=[];let o=null;for(let i=0;i<e.length;i++){const s=e[i];!o||s.y-o.y>o.height/2?n.push([s]):n[n.length-1].push(s),o=s}return n.map(i=>Q(kt(i)))}const ce=function(t){return t===void 0&&(t={}),{name:"inline",options:t,async fn(e){const{placement:n,elements:o,rects:i,platform:s,strategy:r}=e,{padding:c=2,x:f,y:u}=_(t,e),d=Array.from(await(s.getClientRects==null?void 0:s.getClientRects(o.reference))||[]),l=re(d),m=Q(kt(d)),a=pt(c);function h(){if(l.length===2&&l[0].left>l[1].right&&f!=null&&u!=null)return l.find(p=>f>p.left-a.left&&f<p.right+a.right&&u>p.top-a.top&&u<p.bottom+a.bottom)||m;if(l.length>=2){if(H(n)==="y"){const b=l[0],S=l[l.length-1],T=k(n)==="top",E=b.top,C=S.bottom,N=T?b.left:S.left,W=T?b.right:S.right,D=W-N,M=C-E;return{top:E,bottom:C,left:N,right:W,width:D,height:M,x:N,y:E}}const p=k(n)==="left",w=L(...l.map(b=>b.right)),x=$(...l.map(b=>b.left)),y=l.filter(b=>p?b.left===x:b.right===w),v=y[0].top,A=y[y.length-1].bottom,O=x,R=w,B=R-O,P=A-v;return{top:v,bottom:A,left:O,right:R,width:B,height:P,x:O,y:v}}return m}const g=await s.getElementRects({reference:{getBoundingClientRect:h},floating:o.floating,strategy:r});return i.reference.x!==g.reference.x||i.reference.y!==g.reference.y||i.reference.width!==g.reference.width||i.reference.height!==g.reference.height?{reset:{rects:g}}:{}}}},Bt=new Set(["left","top"]);async function le(t,e){const{placement:n,platform:o,elements:i}=t,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),r=k(n),c=V(n),f=H(n)==="y",u=Bt.has(r)?-1:1,d=s&&f?-1:1,l=_(e,t);let{mainAxis:m,crossAxis:a,alignmentAxis:h}=typeof l=="number"?{mainAxis:l,crossAxis:0,alignmentAxis:null}:{mainAxis:l.mainAxis||0,crossAxis:l.crossAxis||0,alignmentAxis:l.alignmentAxis};return c&&typeof h=="number"&&(a=c==="end"?h*-1:h),f?{x:a*d,y:m*u}:{x:m*u,y:a*d}}const fe=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:s,placement:r,middlewareData:c}=e,f=await le(e,t);return r===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+f.x,y:s+f.y,data:{...f,placement:r}}}}},ae=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i,platform:s}=e,{mainAxis:r=!0,crossAxis:c=!1,limiter:f={fn:w=>{let{x,y}=w;return{x,y}}},...u}=_(t,e),d={x:n,y:o},l=await s.detectOverflow(e,u),m=H(k(i)),a=mt(m);let h=d[a],g=d[m];if(r){const w=a==="y"?"top":"left",x=a==="y"?"bottom":"right",y=h+l[w],v=h-l[x];h=ut(y,h,v)}if(c){const w=m==="y"?"top":"left",x=m==="y"?"bottom":"right",y=g+l[w],v=g-l[x];g=ut(y,g,v)}const p=f.fn({...e,[a]:h,[m]:g});return{...p,data:{x:p.x-n,y:p.y-o,enabled:{[a]:r,[m]:c}}}}}},ue=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:o,placement:i,rects:s,middlewareData:r}=e,{offset:c=0,mainAxis:f=!0,crossAxis:u=!0}=_(t,e),d={x:n,y:o},l=H(i),m=mt(l);let a=d[m],h=d[l];const g=_(c,e),p=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(f){const y=m==="y"?"height":"width",v=s.reference[m]-s.floating[y]+p.mainAxis,A=s.reference[m]+s.reference[y]-p.mainAxis;a<v?a=v:a>A&&(a=A)}if(u){var w,x;const y=m==="y"?"width":"height",v=Bt.has(k(i)),A=s.reference[l]-s.floating[y]+(v&&((w=r.offset)==null?void 0:w[l])||0)+(v?0:p.crossAxis),O=s.reference[l]+s.reference[y]+(v?0:((x=r.offset)==null?void 0:x[l])||0)-(v?p.crossAxis:0);h<A?h=A:h>O&&(h=O)}return{[m]:a,[l]:h}}}},de=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:i,rects:s,platform:r,elements:c}=e,{apply:f=()=>{},...u}=_(t,e),d=await r.detectOverflow(e,u),l=k(i),m=V(i),a=H(i)==="y",{width:h,height:g}=s.floating;let p,w;l==="top"||l==="bottom"?(p=l,w=m===(await(r.isRTL==null?void 0:r.isRTL(c.floating))?"start":"end")?"left":"right"):(w=l,p=m==="end"?"top":"bottom");const x=g-d.top-d.bottom,y=h-d.left-d.right,v=$(g-d[p],x),A=$(h-d[w],y),O=!e.middlewareData.shift;let R=v,B=A;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(B=y),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(R=x),O&&!m){const b=L(d.left,0),S=L(d.right,0),T=L(d.top,0),E=L(d.bottom,0);a?B=h-2*(b!==0||S!==0?b+S:L(d.left,d.right)):R=g-2*(T!==0||E!==0?T+E:L(d.top,d.bottom))}await f({...e,availableWidth:B,availableHeight:R});const P=await r.getDimensions(c.floating);return h!==P.width||g!==P.height?{reset:{rects:!0}}:{}}}};function rt(){return typeof window<"u"}function G(t){return wt(t)?(t.nodeName||"").toLowerCase():"#document"}function F(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function j(t){var e;return(e=(wt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function wt(t){return rt()?t instanceof Node||t instanceof F(t).Node:!1}function z(t){return rt()?t instanceof Element||t instanceof F(t).Element:!1}function Y(t){return rt()?t instanceof HTMLElement||t instanceof F(t).HTMLElement:!1}function Pt(t){return!rt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof F(t).ShadowRoot}const me=new Set(["inline","contents"]);function et(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=I(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!me.has(i)}const he=new Set(["table","td","th"]);function ge(t){return he.has(G(t))}const pe=[":popover-open",":modal"];function ct(t){return pe.some(e=>{try{return t.matches(e)}catch{return!1}})}const we=["transform","translate","scale","rotate","perspective"],xe=["transform","translate","scale","rotate","perspective","filter"],ye=["paint","layout","strict","content"];function xt(t){const e=yt(),n=z(t)?I(t):t;return we.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||xe.some(o=>(n.willChange||"").includes(o))||ye.some(o=>(n.contain||"").includes(o))}function ve(t){let e=U(t);for(;Y(e)&&!Z(e);){if(xt(e))return e;if(ct(e))return null;e=U(e)}return null}function yt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const be=new Set(["html","body","#document"]);function Z(t){return be.has(G(t))}function I(t){return F(t).getComputedStyle(t)}function lt(t){return z(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function U(t){if(G(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Pt(t)&&t.host||j(t);return Pt(e)?e.host:e}function Wt(t){const e=U(t);return Z(e)?t.ownerDocument?t.ownerDocument.body:t.body:Y(e)&&et(e)?e:Wt(e)}function tt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Wt(t),s=i===((o=t.ownerDocument)==null?void 0:o.body),r=F(i);if(s){const c=dt(r);return e.concat(r,r.visualViewport||[],et(i)?i:[],c&&n?tt(c):[])}return e.concat(i,tt(i,[],n))}function dt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Nt(t){const e=I(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=Y(t),s=i?t.offsetWidth:n,r=i?t.offsetHeight:o,c=ot(n)!==s||ot(o)!==r;return c&&(n=s,o=r),{width:n,height:o,$:c}}function vt(t){return z(t)?t:t.contextElement}function J(t){const e=vt(t);if(!Y(e))return X(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:s}=Nt(e);let r=(s?ot(n.width):n.width)/o,c=(s?ot(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!c||!Number.isFinite(c))&&(c=1),{x:r,y:c}}const Ae=X(0);function Ht(t){const e=F(t);return!yt()||!e.visualViewport?Ae:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Oe(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==F(t)?!1:e}function K(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=vt(t);let r=X(1);e&&(o?z(o)&&(r=J(o)):r=J(t));const c=Oe(s,n,o)?Ht(s):X(0);let f=(i.left+c.x)/r.x,u=(i.top+c.y)/r.y,d=i.width/r.x,l=i.height/r.y;if(s){const m=F(s),a=o&&z(o)?F(o):o;let h=m,g=dt(h);for(;g&&o&&a!==h;){const p=J(g),w=g.getBoundingClientRect(),x=I(g),y=w.left+(g.clientLeft+parseFloat(x.paddingLeft))*p.x,v=w.top+(g.clientTop+parseFloat(x.paddingTop))*p.y;f*=p.x,u*=p.y,d*=p.x,l*=p.y,f+=y,u+=v,h=F(g),g=dt(h)}}return Q({width:d,height:l,x:f,y:u})}function ft(t,e){const n=lt(t).scrollLeft;return e?e.left+n:K(j(t)).left+n}function Vt(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-ft(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function Re(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const s=i==="fixed",r=j(o),c=e?ct(e.floating):!1;if(o===r||c&&s)return n;let f={scrollLeft:0,scrollTop:0},u=X(1);const d=X(0),l=Y(o);if((l||!l&&!s)&&((G(o)!=="body"||et(r))&&(f=lt(o)),Y(o))){const a=K(o);u=J(o),d.x=a.x+o.clientLeft,d.y=a.y+o.clientTop}const m=r&&!l&&!s?Vt(r,f):X(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-f.scrollLeft*u.x+d.x+m.x,y:n.y*u.y-f.scrollTop*u.y+d.y+m.y}}function Se(t){return Array.from(t.getClientRects())}function Ce(t){const e=j(t),n=lt(t),o=t.ownerDocument.body,i=L(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),s=L(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let r=-n.scrollLeft+ft(t);const c=-n.scrollTop;return I(o).direction==="rtl"&&(r+=L(e.clientWidth,o.clientWidth)-i),{width:i,height:s,x:r,y:c}}const Tt=25;function Le(t,e){const n=F(t),o=j(t),i=n.visualViewport;let s=o.clientWidth,r=o.clientHeight,c=0,f=0;if(i){s=i.width,r=i.height;const d=yt();(!d||d&&e==="fixed")&&(c=i.offsetLeft,f=i.offsetTop)}const u=ft(o);if(u<=0){const d=o.ownerDocument,l=d.body,m=getComputedStyle(l),a=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,h=Math.abs(o.clientWidth-l.clientWidth-a);h<=Tt&&(s-=h)}else u<=Tt&&(s+=u);return{width:s,height:r,x:c,y:f}}const Pe=new Set(["absolute","fixed"]);function Te(t,e){const n=K(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,s=Y(t)?J(t):X(1),r=t.clientWidth*s.x,c=t.clientHeight*s.y,f=i*s.x,u=o*s.y;return{width:r,height:c,x:f,y:u}}function Et(t,e,n){let o;if(e==="viewport")o=Le(t,n);else if(e==="document")o=Ce(j(t));else if(z(e))o=Te(e,n);else{const i=Ht(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Q(o)}function $t(t,e){const n=U(t);return n===e||!z(n)||Z(n)?!1:I(n).position==="fixed"||$t(n,e)}function Ee(t,e){const n=e.get(t);if(n)return n;let o=tt(t,[],!1).filter(c=>z(c)&&G(c)!=="body"),i=null;const s=I(t).position==="fixed";let r=s?U(t):t;for(;z(r)&&!Z(r);){const c=I(r),f=xt(r);!f&&c.position==="fixed"&&(i=null),(s?!f&&!i:!f&&c.position==="static"&&!!i&&Pe.has(i.position)||et(r)&&!f&&$t(t,r))?o=o.filter(d=>d!==r):i=c,r=U(r)}return e.set(t,o),o}function De(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const r=[...n==="clippingAncestors"?ct(e)?[]:Ee(e,this._c):[].concat(n),o],c=r[0],f=r.reduce((u,d)=>{const l=Et(e,d,i);return u.top=L(l.top,u.top),u.right=$(l.right,u.right),u.bottom=$(l.bottom,u.bottom),u.left=L(l.left,u.left),u},Et(e,c,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function Me(t){const{width:e,height:n}=Nt(t);return{width:e,height:n}}function Fe(t,e,n){const o=Y(e),i=j(e),s=n==="fixed",r=K(t,!0,s,e);let c={scrollLeft:0,scrollTop:0};const f=X(0);function u(){f.x=ft(i)}if(o||!o&&!s)if((G(e)!=="body"||et(i))&&(c=lt(e)),o){const a=K(e,!0,s,e);f.x=a.x+e.clientLeft,f.y=a.y+e.clientTop}else i&&u();s&&!o&&i&&u();const d=i&&!o&&!s?Vt(i,c):X(0),l=r.left+c.scrollLeft-f.x-d.x,m=r.top+c.scrollTop-f.y-d.y;return{x:l,y:m,width:r.width,height:r.height}}function at(t){return I(t).position==="static"}function Dt(t,e){if(!Y(t)||I(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return j(t)===n&&(n=n.ownerDocument.body),n}function _t(t,e){const n=F(t);if(ct(t))return n;if(!Y(t)){let i=U(t);for(;i&&!Z(i);){if(z(i)&&!at(i))return i;i=U(i)}return n}let o=Dt(t,e);for(;o&&ge(o)&&at(o);)o=Dt(o,e);return o&&Z(o)&&at(o)&&!xt(o)?n:o||ve(t)||n}const ke=async function(t){const e=this.getOffsetParent||_t,n=this.getDimensions,o=await n(t.floating);return{reference:Fe(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Be(t){return I(t).direction==="rtl"}const We={convertOffsetParentRelativeRectToViewportRelativeRect:Re,getDocumentElement:j,getClippingRect:De,getOffsetParent:_t,getElementRects:ke,getClientRects:Se,getDimensions:Me,getScale:J,isElement:z,isRTL:Be};function zt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Ne(t,e){let n=null,o;const i=j(t);function s(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function r(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),s();const u=t.getBoundingClientRect(),{left:d,top:l,width:m,height:a}=u;if(c||e(),!m||!a)return;const h=nt(l),g=nt(i.clientWidth-(d+m)),p=nt(i.clientHeight-(l+a)),w=nt(d),y={rootMargin:-h+"px "+-g+"px "+-p+"px "+-w+"px",threshold:L(0,$(1,f))||1};let v=!0;function A(O){const R=O[0].intersectionRatio;if(R!==f){if(!v)return r();R?r(!1,R):o=setTimeout(()=>{r(!1,1e-7)},1e3)}R===1&&!zt(u,t.getBoundingClientRect())&&r(),v=!1}try{n=new IntersectionObserver(A,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(A,y)}n.observe(t)}return r(!0),s}function He(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=o,u=vt(t),d=i||s?[...u?tt(u):[],...tt(e)]:[];d.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),s&&w.addEventListener("resize",n)});const l=u&&c?Ne(u,n):null;let m=-1,a=null;r&&(a=new ResizeObserver(w=>{let[x]=w;x&&x.target===u&&a&&(a.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var y;(y=a)==null||y.observe(e)})),n()}),u&&!f&&a.observe(u),a.observe(e));let h,g=f?K(t):null;f&&p();function p(){const w=K(t);g&&!zt(g,w)&&n(),g=w,h=requestAnimationFrame(p)}return n(),()=>{var w;d.forEach(x=>{i&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),l?.(),(w=a)==null||w.disconnect(),a=null,f&&cancelAnimationFrame(h)}}const Ve=fe,$e=oe,_e=ae,ze=ie,Ie=de,Xe=se,Ye=ee,je=ce,qe=ue,Ue=(t,e,n)=>{const o=new Map,i={platform:We,...n},s={...i.platform,_c:o};return te(t,e,{...i,platform:s})};exports.arrow=Ye;exports.autoPlacement=$e;exports.autoUpdate=He;exports.computePosition=Ue;exports.flip=ze;exports.getNodeName=G;exports.hide=Xe;exports.inline=je;exports.isNode=wt;exports.limitShift=qe;exports.offset=Ve;exports.shift=_e;exports.size=Ie;
|
package/dist/orders-Bqa3Z3tH.mjs
DELETED
|
@@ -1,356 +0,0 @@
|
|
|
1
|
-
import { defineComponent as J, ref as y, computed as D, provide as K, watch as W, resolveComponent as v, openBlock as l, createBlock as A, withCtx as m, createElementVNode as s, createVNode as a, unref as o, createTextVNode as b, toDisplayString as i, createCommentVNode as w, normalizeClass as Z, isRef as ee, createElementBlock as u, Fragment as te, renderList as se, normalizeStyle as oe } from "vue";
|
|
2
|
-
import { useModuleRoute as ne, useModule as ae, useFirebaseIntegration as re } from "@oneclick.dev/cms-kit";
|
|
3
|
-
import { ShoppingBag as j, Users as V, ChevronLeft as le, ChevronRight as ie, RefreshCw as ce, Search as de, X as ue, Calendar as me, Clock as pe } from "lucide-vue-next";
|
|
4
|
-
import { F as fe, _ as ge } from "./ReservationDetailDialog.vue_vue_type_script_setup_true_lang-B7ks5mbf.mjs";
|
|
5
|
-
import { _ as ve } from "./EditLayout.vue_vue_type_script_setup_true_lang-CcysXzmW.mjs";
|
|
6
|
-
const _e = { class: "space-y-6" }, xe = { class: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4" }, he = { class: "text-2xl font-semibold tracking-tight flex items-center gap-2" }, ye = { class: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4" }, ke = { class: "flex items-center gap-1" }, De = { class: "flex items-center gap-1" }, be = { class: "flex items-center gap-2" }, we = { class: "flex items-center gap-1" }, Ce = { class: "text-sm text-muted-foreground mt-2" }, Se = { class: "relative mb-4" }, Ie = {
|
|
7
|
-
key: 0,
|
|
8
|
-
class: "mb-3 text-sm text-muted-foreground"
|
|
9
|
-
}, ze = {
|
|
10
|
-
key: 1,
|
|
11
|
-
class: "flex items-center justify-center py-8"
|
|
12
|
-
}, Ne = {
|
|
13
|
-
key: 2,
|
|
14
|
-
class: "text-center py-8 text-muted-foreground"
|
|
15
|
-
}, Oe = {
|
|
16
|
-
key: 3,
|
|
17
|
-
class: "text-center py-8 text-muted-foreground"
|
|
18
|
-
}, Te = {
|
|
19
|
-
key: 4,
|
|
20
|
-
class: "space-y-2"
|
|
21
|
-
}, Pe = ["onClick"], Ae = { class: "flex items-start justify-between" }, Re = { class: "flex-1" }, Be = { class: "font-medium" }, Fe = { class: "text-sm text-muted-foreground" }, je = { class: "text-sm text-muted-foreground" }, Ve = { class: "flex items-center gap-4 flex-wrap mt-1" }, Ee = { class: "flex items-center gap-2 text-xs text-muted-foreground" }, Le = { class: "flex items-center gap-2 text-xs text-muted-foreground" }, Ue = {
|
|
22
|
-
key: 0,
|
|
23
|
-
class: "flex items-center gap-1 text-xs text-muted-foreground"
|
|
24
|
-
}, $e = { class: "flex items-center gap-2 mt-1 text-xs text-muted-foreground" }, He = { class: "text-right" }, Me = {
|
|
25
|
-
key: 0,
|
|
26
|
-
class: "inline-block px-2 py-1 text-xs rounded-full bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400"
|
|
27
|
-
}, Ye = {
|
|
28
|
-
key: 1,
|
|
29
|
-
class: "inline-block px-2 py-1 text-xs rounded-full bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400"
|
|
30
|
-
}, Qe = {
|
|
31
|
-
key: 2,
|
|
32
|
-
class: "inline-block px-2 py-1 text-xs rounded-full bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400"
|
|
33
|
-
}, Xe = {
|
|
34
|
-
key: 3,
|
|
35
|
-
class: "inline-block px-2 py-1 text-xs rounded-full bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400"
|
|
36
|
-
}, qe = {
|
|
37
|
-
key: 4,
|
|
38
|
-
class: "inline-block px-2 py-1 text-xs rounded-full bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400"
|
|
39
|
-
}, Ge = {
|
|
40
|
-
key: 5,
|
|
41
|
-
class: "text-sm font-medium mt-1"
|
|
42
|
-
}, nt = /* @__PURE__ */ J({
|
|
43
|
-
__name: "orders",
|
|
44
|
-
setup(Je) {
|
|
45
|
-
const { params: R } = ne(), { config: N } = ae(), B = re(N.project), p = y([]), O = y([]), k = y(!0), f = y(""), F = y(null), _ = /* @__PURE__ */ new Date(), d = y(/* @__PURE__ */ new Date()), E = D(() => ({
|
|
46
|
-
date: Y(d.value),
|
|
47
|
-
resource: null
|
|
48
|
-
}));
|
|
49
|
-
K("event", E);
|
|
50
|
-
const L = D(() => {
|
|
51
|
-
const e = new Date(_);
|
|
52
|
-
e.setDate(_.getDate() - 1);
|
|
53
|
-
const t = new Date(_);
|
|
54
|
-
return t.setDate(_.getDate() + 1), d.value.toDateString() === _.toDateString() ? "Today" : d.value.toDateString() === e.toDateString() ? "Yesterday" : d.value.toDateString() === t.toDateString() ? "Tomorrow" : d.value.toLocaleDateString("en-US", {
|
|
55
|
-
weekday: "long",
|
|
56
|
-
month: "long",
|
|
57
|
-
day: "numeric",
|
|
58
|
-
year: "numeric"
|
|
59
|
-
});
|
|
60
|
-
}), U = () => {
|
|
61
|
-
const e = new Date(d.value);
|
|
62
|
-
e.setDate(e.getDate() - 1), d.value = e;
|
|
63
|
-
}, $ = () => {
|
|
64
|
-
const e = new Date(d.value);
|
|
65
|
-
e.setDate(e.getDate() + 1), e <= _ && (d.value = e);
|
|
66
|
-
}, H = D(() => {
|
|
67
|
-
const e = new Date(d.value);
|
|
68
|
-
return e.setDate(e.getDate() + 1), e <= _;
|
|
69
|
-
}), M = () => {
|
|
70
|
-
d.value = /* @__PURE__ */ new Date();
|
|
71
|
-
}, Y = (e) => {
|
|
72
|
-
const t = e.getFullYear(), g = String(e.getMonth() + 1).padStart(2, "0"), h = String(e.getDate()).padStart(2, "0");
|
|
73
|
-
return `${t}-${g}-${h}`;
|
|
74
|
-
}, Q = (e) => e ? new Date(e).toLocaleTimeString("en-US", {
|
|
75
|
-
hour: "2-digit",
|
|
76
|
-
minute: "2-digit",
|
|
77
|
-
hour12: !1
|
|
78
|
-
}) : "", X = (e) => e ? new Date(e).toLocaleDateString("en-US", {
|
|
79
|
-
weekday: "short",
|
|
80
|
-
month: "short",
|
|
81
|
-
day: "numeric"
|
|
82
|
-
}) : "", T = D(() => f.value.trim() ? new fe(p.value, {
|
|
83
|
-
keys: [
|
|
84
|
-
"customerInfo.firstName",
|
|
85
|
-
"customerInfo.lastName",
|
|
86
|
-
"customerInfo.email",
|
|
87
|
-
"customerInfo.phone",
|
|
88
|
-
"resourceName"
|
|
89
|
-
],
|
|
90
|
-
threshold: 0.3,
|
|
91
|
-
ignoreLocation: !0
|
|
92
|
-
}).search(f.value).map((t) => t.item) : p.value), C = D(() => ({
|
|
93
|
-
spots: p.value.reduce((e, t) => e + (t.spots || 0), 0),
|
|
94
|
-
bookings: p.value.length,
|
|
95
|
-
revenue: p.value.reduce((e, t) => e + (t.reservationPrice || 0), 0)
|
|
96
|
-
})), q = () => {
|
|
97
|
-
f.value = "";
|
|
98
|
-
}, G = async () => {
|
|
99
|
-
try {
|
|
100
|
-
const e = R.value.id, t = await B.get(N.agendaCollection, e);
|
|
101
|
-
O.value = t?.resources?.filter((g) => g.isActive) || [];
|
|
102
|
-
} catch (e) {
|
|
103
|
-
console.error("Error loading resources:", e), O.value = [];
|
|
104
|
-
}
|
|
105
|
-
}, x = async () => {
|
|
106
|
-
k.value = !0, p.value = [];
|
|
107
|
-
try {
|
|
108
|
-
const e = R.value.id, t = new Date(d.value);
|
|
109
|
-
t.setHours(0, 0, 0, 0);
|
|
110
|
-
const g = new Date(d.value);
|
|
111
|
-
g.setHours(23, 59, 59, 999);
|
|
112
|
-
const h = await B.find(N.reservationsCollection, {
|
|
113
|
-
filters: [
|
|
114
|
-
{ field: "agendaId", operator: "==", value: e },
|
|
115
|
-
{ field: "createdAt", operator: ">=", value: t.toISOString() },
|
|
116
|
-
{ field: "createdAt", operator: "<=", value: g.toISOString() }
|
|
117
|
-
]
|
|
118
|
-
});
|
|
119
|
-
console.log("allOrders", h);
|
|
120
|
-
let S = [];
|
|
121
|
-
h.forEach((r) => {
|
|
122
|
-
(r.reservations || []).forEach((c) => {
|
|
123
|
-
const z = O.value.find((P) => P.id === c.resourceId);
|
|
124
|
-
S.push({
|
|
125
|
-
customerInfo: r.customerInfo,
|
|
126
|
-
amountDue: r.amountDue,
|
|
127
|
-
amountPaid: r.amountPaid,
|
|
128
|
-
status: r.status,
|
|
129
|
-
reservationStatus: c.status,
|
|
130
|
-
subtotal: r.subtotal,
|
|
131
|
-
total: r.total,
|
|
132
|
-
discount: r.discount,
|
|
133
|
-
id: r.id,
|
|
134
|
-
res_id: c.id,
|
|
135
|
-
resourceId: c.resourceId,
|
|
136
|
-
spots: c.spots,
|
|
137
|
-
date: c.date,
|
|
138
|
-
createdAt: r.createdAt,
|
|
139
|
-
startTime: c.timeslot?.startTime,
|
|
140
|
-
endTime: c.timeslot?.endTime,
|
|
141
|
-
reservationPrice: c.totalPrice,
|
|
142
|
-
reservationBasePrice: c.basePrice,
|
|
143
|
-
reservationAddOnsPrice: c.addOnsPrice,
|
|
144
|
-
pricingOptionId: c.pricingOptionId,
|
|
145
|
-
pricingOption: c.pricingOption,
|
|
146
|
-
resourceName: z?.name || "Unknown",
|
|
147
|
-
resourceColor: z?.color
|
|
148
|
-
});
|
|
149
|
-
});
|
|
150
|
-
}), p.value = S.sort((r, I) => (I.createdAt || "").localeCompare(r.createdAt || ""));
|
|
151
|
-
} catch (e) {
|
|
152
|
-
console.error("Error loading orders:", e), p.value = [];
|
|
153
|
-
} finally {
|
|
154
|
-
k.value = !1;
|
|
155
|
-
}
|
|
156
|
-
};
|
|
157
|
-
return (async () => (await G(), await x()))(), W(d, () => {
|
|
158
|
-
x();
|
|
159
|
-
}), (e, t) => {
|
|
160
|
-
const g = v("Badge"), h = v("CardTitle"), S = v("CardDescription"), r = v("Button"), I = v("CardHeader"), c = v("Input"), z = v("CardContent"), P = v("Card");
|
|
161
|
-
return l(), A(ve, null, {
|
|
162
|
-
default: m(() => [
|
|
163
|
-
s("div", _e, [
|
|
164
|
-
s("div", xe, [
|
|
165
|
-
s("div", null, [
|
|
166
|
-
s("h1", he, [
|
|
167
|
-
a(o(j), { class: "size-6" }),
|
|
168
|
-
t[1] || (t[1] = b(" Orders ", -1))
|
|
169
|
-
]),
|
|
170
|
-
t[2] || (t[2] = s("p", { class: "text-muted-foreground text-sm mt-1" }, " View orders by when they were placed ", -1))
|
|
171
|
-
])
|
|
172
|
-
]),
|
|
173
|
-
a(P, null, {
|
|
174
|
-
default: m(() => [
|
|
175
|
-
a(I, null, {
|
|
176
|
-
default: m(() => [
|
|
177
|
-
s("div", ye, [
|
|
178
|
-
s("div", null, [
|
|
179
|
-
a(h, { class: "flex items-center gap-2" }, {
|
|
180
|
-
default: m(() => [
|
|
181
|
-
t[3] || (t[3] = b(" Orders received ", -1)),
|
|
182
|
-
o(C).bookings > 0 ? (l(), A(g, {
|
|
183
|
-
key: 0,
|
|
184
|
-
variant: "secondary"
|
|
185
|
-
}, {
|
|
186
|
-
default: m(() => [
|
|
187
|
-
b(i(o(C).bookings), 1)
|
|
188
|
-
]),
|
|
189
|
-
_: 1
|
|
190
|
-
})) : w("", !0)
|
|
191
|
-
]),
|
|
192
|
-
_: 1
|
|
193
|
-
}),
|
|
194
|
-
a(S, { class: "flex items-center gap-4 mt-1" }, {
|
|
195
|
-
default: m(() => [
|
|
196
|
-
s("span", ke, [
|
|
197
|
-
a(o(V), { size: 14 }),
|
|
198
|
-
b(" " + i(o(C).spots) + " spots ", 1)
|
|
199
|
-
]),
|
|
200
|
-
s("span", De, " €" + i(o(C).revenue.toFixed(2)) + " revenue ", 1)
|
|
201
|
-
]),
|
|
202
|
-
_: 1
|
|
203
|
-
})
|
|
204
|
-
]),
|
|
205
|
-
s("div", be, [
|
|
206
|
-
s("div", we, [
|
|
207
|
-
a(r, {
|
|
208
|
-
variant: "ghost",
|
|
209
|
-
size: "icon",
|
|
210
|
-
class: "size-8",
|
|
211
|
-
onClick: U
|
|
212
|
-
}, {
|
|
213
|
-
default: m(() => [
|
|
214
|
-
a(o(le), { size: 16 })
|
|
215
|
-
]),
|
|
216
|
-
_: 1
|
|
217
|
-
}),
|
|
218
|
-
a(r, {
|
|
219
|
-
variant: "ghost",
|
|
220
|
-
size: "sm",
|
|
221
|
-
class: "h-8 px-3 text-xs",
|
|
222
|
-
onClick: M
|
|
223
|
-
}, {
|
|
224
|
-
default: m(() => [...t[4] || (t[4] = [
|
|
225
|
-
b(" Today ", -1)
|
|
226
|
-
])]),
|
|
227
|
-
_: 1
|
|
228
|
-
}),
|
|
229
|
-
a(r, {
|
|
230
|
-
variant: "ghost",
|
|
231
|
-
size: "icon",
|
|
232
|
-
class: "size-8",
|
|
233
|
-
onClick: $,
|
|
234
|
-
disabled: !o(H)
|
|
235
|
-
}, {
|
|
236
|
-
default: m(() => [
|
|
237
|
-
a(o(ie), { size: 16 })
|
|
238
|
-
]),
|
|
239
|
-
_: 1
|
|
240
|
-
}, 8, ["disabled"])
|
|
241
|
-
]),
|
|
242
|
-
a(r, {
|
|
243
|
-
variant: "ghost",
|
|
244
|
-
size: "icon",
|
|
245
|
-
onClick: x,
|
|
246
|
-
disabled: o(k)
|
|
247
|
-
}, {
|
|
248
|
-
default: m(() => [
|
|
249
|
-
a(o(ce), {
|
|
250
|
-
size: 16,
|
|
251
|
-
class: Z({ "animate-spin": o(k) })
|
|
252
|
-
}, null, 8, ["class"])
|
|
253
|
-
]),
|
|
254
|
-
_: 1
|
|
255
|
-
}, 8, ["disabled"])
|
|
256
|
-
])
|
|
257
|
-
]),
|
|
258
|
-
s("div", Ce, i(o(L)), 1)
|
|
259
|
-
]),
|
|
260
|
-
_: 1
|
|
261
|
-
}),
|
|
262
|
-
a(z, null, {
|
|
263
|
-
default: m(() => [
|
|
264
|
-
s("div", Se, [
|
|
265
|
-
a(o(de), {
|
|
266
|
-
size: 16,
|
|
267
|
-
class: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"
|
|
268
|
-
}),
|
|
269
|
-
a(c, {
|
|
270
|
-
modelValue: o(f),
|
|
271
|
-
"onUpdate:modelValue": t[0] || (t[0] = (n) => ee(f) ? f.value = n : null),
|
|
272
|
-
placeholder: "Search by name, email, or phone...",
|
|
273
|
-
class: "pl-9 pr-9"
|
|
274
|
-
}, null, 8, ["modelValue"]),
|
|
275
|
-
o(f) ? (l(), A(r, {
|
|
276
|
-
key: 0,
|
|
277
|
-
variant: "ghost",
|
|
278
|
-
size: "icon",
|
|
279
|
-
class: "absolute right-1 top-1/2 -translate-y-1/2 h-7 w-7",
|
|
280
|
-
onClick: q
|
|
281
|
-
}, {
|
|
282
|
-
default: m(() => [
|
|
283
|
-
a(o(ue), { size: 14 })
|
|
284
|
-
]),
|
|
285
|
-
_: 1
|
|
286
|
-
})) : w("", !0)
|
|
287
|
-
]),
|
|
288
|
-
o(f) ? (l(), u("div", Ie, " Showing " + i(o(T).length) + " of " + i(o(p).length) + " orders ", 1)) : w("", !0),
|
|
289
|
-
o(k) ? (l(), u("div", ze, [...t[5] || (t[5] = [
|
|
290
|
-
s("div", { class: "animate-spin rounded-full h-8 w-8 border-b-2 border-primary" }, null, -1)
|
|
291
|
-
])])) : o(p).length === 0 ? (l(), u("div", Ne, [
|
|
292
|
-
a(o(j), { class: "size-12 mx-auto mb-3 opacity-50" }),
|
|
293
|
-
t[6] || (t[6] = s("p", null, "No orders received on this day", -1))
|
|
294
|
-
])) : o(T).length === 0 ? (l(), u("div", Oe, " No orders match your search ")) : (l(), u("div", Te, [
|
|
295
|
-
(l(!0), u(te, null, se(o(T), (n) => (l(), u("div", {
|
|
296
|
-
key: n.res_id || n.id,
|
|
297
|
-
class: "p-3 border rounded-lg hover:bg-muted/50 transition-colors cursor-pointer",
|
|
298
|
-
onClick: (We) => o(F)?.openDialog(n)
|
|
299
|
-
}, [
|
|
300
|
-
s("div", Ae, [
|
|
301
|
-
s("div", Re, [
|
|
302
|
-
s("div", Be, i(n.customerInfo?.firstName) + " " + i(n.customerInfo?.lastName || "Unknown Customer"), 1),
|
|
303
|
-
s("div", Fe, i(n.customerInfo?.email), 1),
|
|
304
|
-
s("div", je, i(n.customerInfo?.phone), 1),
|
|
305
|
-
s("div", Ve, [
|
|
306
|
-
s("div", Ee, [
|
|
307
|
-
a(o(me), { size: 12 }),
|
|
308
|
-
s("span", null, i(X(n.date)) + " · " + i(n.startTime) + " - " + i(n.endTime), 1)
|
|
309
|
-
]),
|
|
310
|
-
s("div", Le, [
|
|
311
|
-
a(o(V), { size: 12 }),
|
|
312
|
-
s("span", null, i(n.spots) + " spots", 1)
|
|
313
|
-
]),
|
|
314
|
-
n.resourceName ? (l(), u("div", Ue, [
|
|
315
|
-
s("div", {
|
|
316
|
-
class: "w-3 h-3 rounded-full",
|
|
317
|
-
style: oe({ backgroundColor: n.resourceColor || "#6b7280" })
|
|
318
|
-
}, null, 4),
|
|
319
|
-
s("span", null, i(n.resourceName), 1)
|
|
320
|
-
])) : w("", !0)
|
|
321
|
-
]),
|
|
322
|
-
s("div", $e, [
|
|
323
|
-
a(o(pe), { size: 12 }),
|
|
324
|
-
s("span", null, "Ordered at " + i(Q(n.createdAt)), 1)
|
|
325
|
-
])
|
|
326
|
-
]),
|
|
327
|
-
s("div", He, [
|
|
328
|
-
n.reservationStatus === "needs_approval" ? (l(), u("span", Me, "Needs Approval")) : n.reservationStatus === "approved" ? (l(), u("span", Ye, "Approved")) : n.reservationStatus === "rejected" ? (l(), u("span", Qe, "Rejected")) : n.reservationStatus === "cancelled" ? (l(), u("span", Xe, "Cancelled")) : (l(), u("span", qe, "Pending")),
|
|
329
|
-
n.reservationPrice || n.reservationPrice === 0 ? (l(), u("div", Ge, " €" + i(n.reservationPrice.toFixed(2)), 1)) : w("", !0)
|
|
330
|
-
])
|
|
331
|
-
])
|
|
332
|
-
], 8, Pe))), 128))
|
|
333
|
-
]))
|
|
334
|
-
]),
|
|
335
|
-
_: 1
|
|
336
|
-
}),
|
|
337
|
-
a(ge, {
|
|
338
|
-
ref_key: "reservationDetailDialog",
|
|
339
|
-
ref: F,
|
|
340
|
-
onCancelled: x,
|
|
341
|
-
onConfirmed: x,
|
|
342
|
-
onRejected: x
|
|
343
|
-
}, null, 512)
|
|
344
|
-
]),
|
|
345
|
-
_: 1
|
|
346
|
-
})
|
|
347
|
-
])
|
|
348
|
-
]),
|
|
349
|
-
_: 1
|
|
350
|
-
});
|
|
351
|
-
};
|
|
352
|
-
}
|
|
353
|
-
});
|
|
354
|
-
export {
|
|
355
|
-
nt as default
|
|
356
|
-
};
|
package/dist/orders-D5GJOZXN.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),D=require("@oneclick.dev/cms-kit"),l=require("lucide-vue-next"),S=require("./ReservationDetailDialog.vue_vue_type_script_setup_true_lang-Vxubki_v.js"),F=require("./EditLayout.vue_vue_type_script_setup_true_lang-Czu6Dcde.js"),L={class:"space-y-6"},U={class:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4"},q={class:"text-2xl font-semibold tracking-tight flex items-center gap-2"},H={class:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4"},M={class:"flex items-center gap-1"},$={class:"flex items-center gap-1"},Y={class:"flex items-center gap-2"},K={class:"flex items-center gap-1"},Q={class:"text-sm text-muted-foreground mt-2"},X={class:"relative mb-4"},G={key:0,class:"mb-3 text-sm text-muted-foreground"},J={key:1,class:"flex items-center justify-center py-8"},W={key:2,class:"text-center py-8 text-muted-foreground"},Z={key:3,class:"text-center py-8 text-muted-foreground"},ee={key:4,class:"space-y-2"},te=["onClick"],oe={class:"flex items-start justify-between"},ne={class:"flex-1"},se={class:"font-medium"},ae={class:"text-sm text-muted-foreground"},re={class:"text-sm text-muted-foreground"},le={class:"flex items-center gap-4 flex-wrap mt-1"},ce={class:"flex items-center gap-2 text-xs text-muted-foreground"},ie={class:"flex items-center gap-2 text-xs text-muted-foreground"},de={key:0,class:"flex items-center gap-1 text-xs text-muted-foreground"},ue={class:"flex items-center gap-2 mt-1 text-xs text-muted-foreground"},me={class:"text-right"},pe={key:0,class:"inline-block px-2 py-1 text-xs rounded-full bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400"},fe={key:1,class:"inline-block px-2 py-1 text-xs rounded-full bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400"},ge={key:2,class:"inline-block px-2 py-1 text-xs rounded-full bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400"},ve={key:3,class:"inline-block px-2 py-1 text-xs rounded-full bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400"},_e={key:4,class:"inline-block px-2 py-1 text-xs rounded-full bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400"},xe={key:5,class:"text-sm font-medium mt-1"},ye=e.defineComponent({__name:"orders",setup(he){const{params:V}=D.useModuleRoute(),{config:y}=D.useModule(),C=D.useFirebaseIntegration(y.project),c=e.ref([]),h=e.ref([]),f=e.ref(!0),i=e.ref(""),w=e.ref(null),u=new Date,r=e.ref(new Date),b=e.computed(()=>({date:O(r.value),resource:null}));e.provide("event",b);const E=e.computed(()=>{const t=new Date(u);t.setDate(u.getDate()-1);const o=new Date(u);return o.setDate(u.getDate()+1),r.value.toDateString()===u.toDateString()?"Today":r.value.toDateString()===t.toDateString()?"Yesterday":r.value.toDateString()===o.toDateString()?"Tomorrow":r.value.toLocaleDateString("en-US",{weekday:"long",month:"long",day:"numeric",year:"numeric"})}),B=()=>{const t=new Date(r.value);t.setDate(t.getDate()-1),r.value=t},I=()=>{const t=new Date(r.value);t.setDate(t.getDate()+1),t<=u&&(r.value=t)},T=e.computed(()=>{const t=new Date(r.value);return t.setDate(t.getDate()+1),t<=u}),z=()=>{r.value=new Date},O=t=>{const o=t.getFullYear(),d=String(t.getMonth()+1).padStart(2,"0"),p=String(t.getDate()).padStart(2,"0");return`${o}-${d}-${p}`},P=t=>t?new Date(t).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1}):"",A=t=>t?new Date(t).toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric"}):"",k=e.computed(()=>i.value.trim()?new S.Fuse(c.value,{keys:["customerInfo.firstName","customerInfo.lastName","customerInfo.email","customerInfo.phone","resourceName"],threshold:.3,ignoreLocation:!0}).search(i.value).map(o=>o.item):c.value),g=e.computed(()=>({spots:c.value.reduce((t,o)=>t+(o.spots||0),0),bookings:c.value.length,revenue:c.value.reduce((t,o)=>t+(o.reservationPrice||0),0)})),R=()=>{i.value=""},j=async()=>{try{const t=V.value.id,o=await C.get(y.agendaCollection,t);h.value=o?.resources?.filter(d=>d.isActive)||[]}catch(t){console.error("Error loading resources:",t),h.value=[]}},m=async()=>{f.value=!0,c.value=[];try{const t=V.value.id,o=new Date(r.value);o.setHours(0,0,0,0);const d=new Date(r.value);d.setHours(23,59,59,999);const p=await C.find(y.reservationsCollection,{filters:[{field:"agendaId",operator:"==",value:t},{field:"createdAt",operator:">=",value:o.toISOString()},{field:"createdAt",operator:"<=",value:d.toISOString()}]});console.log("allOrders",p);let v=[];p.forEach(s=>{(s.reservations||[]).forEach(a=>{const x=h.value.find(N=>N.id===a.resourceId);v.push({customerInfo:s.customerInfo,amountDue:s.amountDue,amountPaid:s.amountPaid,status:s.status,reservationStatus:a.status,subtotal:s.subtotal,total:s.total,discount:s.discount,id:s.id,res_id:a.id,resourceId:a.resourceId,spots:a.spots,date:a.date,createdAt:s.createdAt,startTime:a.timeslot?.startTime,endTime:a.timeslot?.endTime,reservationPrice:a.totalPrice,reservationBasePrice:a.basePrice,reservationAddOnsPrice:a.addOnsPrice,pricingOptionId:a.pricingOptionId,pricingOption:a.pricingOption,resourceName:x?.name||"Unknown",resourceColor:x?.color})})}),c.value=v.sort((s,_)=>(_.createdAt||"").localeCompare(s.createdAt||""))}catch(t){console.error("Error loading orders:",t),c.value=[]}finally{f.value=!1}};return(async()=>(await j(),await m()))(),e.watch(r,()=>{m()}),(t,o)=>{const d=e.resolveComponent("Badge"),p=e.resolveComponent("CardTitle"),v=e.resolveComponent("CardDescription"),s=e.resolveComponent("Button"),_=e.resolveComponent("CardHeader"),a=e.resolveComponent("Input"),x=e.resolveComponent("CardContent"),N=e.resolveComponent("Card");return e.openBlock(),e.createBlock(F._sfc_main,null,{default:e.withCtx(()=>[e.createElementVNode("div",L,[e.createElementVNode("div",U,[e.createElementVNode("div",null,[e.createElementVNode("h1",q,[e.createVNode(e.unref(l.ShoppingBag),{class:"size-6"}),o[1]||(o[1]=e.createTextVNode(" Orders ",-1))]),o[2]||(o[2]=e.createElementVNode("p",{class:"text-muted-foreground text-sm mt-1"}," View orders by when they were placed ",-1))])]),e.createVNode(N,null,{default:e.withCtx(()=>[e.createVNode(_,null,{default:e.withCtx(()=>[e.createElementVNode("div",H,[e.createElementVNode("div",null,[e.createVNode(p,{class:"flex items-center gap-2"},{default:e.withCtx(()=>[o[3]||(o[3]=e.createTextVNode(" Orders received ",-1)),e.unref(g).bookings>0?(e.openBlock(),e.createBlock(d,{key:0,variant:"secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(g).bookings),1)]),_:1})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(v,{class:"flex items-center gap-4 mt-1"},{default:e.withCtx(()=>[e.createElementVNode("span",M,[e.createVNode(e.unref(l.Users),{size:14}),e.createTextVNode(" "+e.toDisplayString(e.unref(g).spots)+" spots ",1)]),e.createElementVNode("span",$," €"+e.toDisplayString(e.unref(g).revenue.toFixed(2))+" revenue ",1)]),_:1})]),e.createElementVNode("div",Y,[e.createElementVNode("div",K,[e.createVNode(s,{variant:"ghost",size:"icon",class:"size-8",onClick:B},{default:e.withCtx(()=>[e.createVNode(e.unref(l.ChevronLeft),{size:16})]),_:1}),e.createVNode(s,{variant:"ghost",size:"sm",class:"h-8 px-3 text-xs",onClick:z},{default:e.withCtx(()=>[...o[4]||(o[4]=[e.createTextVNode(" Today ",-1)])]),_:1}),e.createVNode(s,{variant:"ghost",size:"icon",class:"size-8",onClick:I,disabled:!e.unref(T)},{default:e.withCtx(()=>[e.createVNode(e.unref(l.ChevronRight),{size:16})]),_:1},8,["disabled"])]),e.createVNode(s,{variant:"ghost",size:"icon",onClick:m,disabled:e.unref(f)},{default:e.withCtx(()=>[e.createVNode(e.unref(l.RefreshCw),{size:16,class:e.normalizeClass({"animate-spin":e.unref(f)})},null,8,["class"])]),_:1},8,["disabled"])])]),e.createElementVNode("div",Q,e.toDisplayString(e.unref(E)),1)]),_:1}),e.createVNode(x,null,{default:e.withCtx(()=>[e.createElementVNode("div",X,[e.createVNode(e.unref(l.Search),{size:16,class:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),e.createVNode(a,{modelValue:e.unref(i),"onUpdate:modelValue":o[0]||(o[0]=n=>e.isRef(i)?i.value=n:null),placeholder:"Search by name, email, or phone...",class:"pl-9 pr-9"},null,8,["modelValue"]),e.unref(i)?(e.openBlock(),e.createBlock(s,{key:0,variant:"ghost",size:"icon",class:"absolute right-1 top-1/2 -translate-y-1/2 h-7 w-7",onClick:R},{default:e.withCtx(()=>[e.createVNode(e.unref(l.X),{size:14})]),_:1})):e.createCommentVNode("",!0)]),e.unref(i)?(e.openBlock(),e.createElementBlock("div",G," Showing "+e.toDisplayString(e.unref(k).length)+" of "+e.toDisplayString(e.unref(c).length)+" orders ",1)):e.createCommentVNode("",!0),e.unref(f)?(e.openBlock(),e.createElementBlock("div",J,[...o[5]||(o[5]=[e.createElementVNode("div",{class:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"},null,-1)])])):e.unref(c).length===0?(e.openBlock(),e.createElementBlock("div",W,[e.createVNode(e.unref(l.ShoppingBag),{class:"size-12 mx-auto mb-3 opacity-50"}),o[6]||(o[6]=e.createElementVNode("p",null,"No orders received on this day",-1))])):e.unref(k).length===0?(e.openBlock(),e.createElementBlock("div",Z," No orders match your search ")):(e.openBlock(),e.createElementBlock("div",ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(k),n=>(e.openBlock(),e.createElementBlock("div",{key:n.res_id||n.id,class:"p-3 border rounded-lg hover:bg-muted/50 transition-colors cursor-pointer",onClick:Ne=>e.unref(w)?.openDialog(n)},[e.createElementVNode("div",oe,[e.createElementVNode("div",ne,[e.createElementVNode("div",se,e.toDisplayString(n.customerInfo?.firstName)+" "+e.toDisplayString(n.customerInfo?.lastName||"Unknown Customer"),1),e.createElementVNode("div",ae,e.toDisplayString(n.customerInfo?.email),1),e.createElementVNode("div",re,e.toDisplayString(n.customerInfo?.phone),1),e.createElementVNode("div",le,[e.createElementVNode("div",ce,[e.createVNode(e.unref(l.Calendar),{size:12}),e.createElementVNode("span",null,e.toDisplayString(A(n.date))+" · "+e.toDisplayString(n.startTime)+" - "+e.toDisplayString(n.endTime),1)]),e.createElementVNode("div",ie,[e.createVNode(e.unref(l.Users),{size:12}),e.createElementVNode("span",null,e.toDisplayString(n.spots)+" spots",1)]),n.resourceName?(e.openBlock(),e.createElementBlock("div",de,[e.createElementVNode("div",{class:"w-3 h-3 rounded-full",style:e.normalizeStyle({backgroundColor:n.resourceColor||"#6b7280"})},null,4),e.createElementVNode("span",null,e.toDisplayString(n.resourceName),1)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",ue,[e.createVNode(e.unref(l.Clock),{size:12}),e.createElementVNode("span",null,"Ordered at "+e.toDisplayString(P(n.createdAt)),1)])]),e.createElementVNode("div",me,[n.reservationStatus==="needs_approval"?(e.openBlock(),e.createElementBlock("span",pe,"Needs Approval")):n.reservationStatus==="approved"?(e.openBlock(),e.createElementBlock("span",fe,"Approved")):n.reservationStatus==="rejected"?(e.openBlock(),e.createElementBlock("span",ge,"Rejected")):n.reservationStatus==="cancelled"?(e.openBlock(),e.createElementBlock("span",ve,"Cancelled")):(e.openBlock(),e.createElementBlock("span",_e,"Pending")),n.reservationPrice||n.reservationPrice===0?(e.openBlock(),e.createElementBlock("div",xe," €"+e.toDisplayString(n.reservationPrice.toFixed(2)),1)):e.createCommentVNode("",!0)])])],8,te))),128))]))]),_:1}),e.createVNode(S._sfc_main,{ref_key:"reservationDetailDialog",ref:w,onCancelled:m,onConfirmed:m,onRejected:m},null,512)]),_:1})])]),_:1})}}});exports.default=ye;
|