okno 1.0.0-beta.47 → 1.0.0-beta.49
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/astro/index.js +1 -1
- package/dist/check-Dv8k-HKR.js +96 -0
- package/dist/cli/check.d.ts +11 -0
- package/dist/cli/check.d.ts.map +1 -0
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli.js +12 -7
- package/dist/{dispatch-DaiWy5Uk.js → dispatch-dWn8cIFI.js} +89 -89
- package/dist/editor/index.js +20104 -19636
- package/dist/engine/index.js +1 -1
- package/dist/index.js +1 -1
- package/dist/local/dispatch.d.ts.map +1 -1
- package/dist/mcp.js +2 -2
- package/dist/next/index.js +1 -1
- package/dist/{plugin-DNXklUmq.js → plugin-BAurTuo8.js} +2 -2
- package/dist/runtime/preview-sync.d.ts.map +1 -1
- package/dist/runtime/values.d.ts +2 -14
- package/dist/runtime/values.d.ts.map +1 -1
- package/dist/runtime/wrap.js +75 -74
- package/dist/{schema-mutation-BWtb40Qj.js → schema-mutation-DQ7d4rmd.js} +45 -45
- package/dist/{schema-mutation-DVgVbjdl.js → schema-mutation-DXOYPQHt.js} +1 -1
- package/dist/vite/index.js +1 -1
- package/package.json +1 -1
- package/skills/connect-okno/SKILL.md +4 -3
- package/skills/connect-okno/references/content.md +20 -2
- package/src/runtime/preview-sync.ts +2 -0
- package/src/runtime/values.ts +12 -4
package/dist/engine/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as An, S as _n, G as $n, J as Cn, O as vn, H as In, e as kn, t as On, s as Ln, C as Rn, I as Mn, h as Pn, b as Fn, g as jn, d as Vn, f as Bn, l as qn, k as Un, P as Gn, m as Xn, o as Wn, i as Hn, F as zn, n as Yn, r as Zn, p as Qn, a as Jn, j as Kn, c as Dn, L as er, D as tr, z as nr, K as rr, B as ir, M as sr, N as or, A as ar, w as lr, x as cr, u as dr, y as ur, q as hr, v as pr } from "../schema-mutation-
|
|
1
|
+
import { E as An, S as _n, G as $n, J as Cn, O as vn, H as In, e as kn, t as On, s as Ln, C as Rn, I as Mn, h as Pn, b as Fn, g as jn, d as Vn, f as Bn, l as qn, k as Un, P as Gn, m as Xn, o as Wn, i as Hn, F as zn, n as Yn, r as Zn, p as Qn, a as Jn, j as Kn, c as Dn, L as er, D as tr, z as nr, K as rr, B as ir, M as sr, N as or, A as ar, w as lr, x as cr, u as dr, y as ur, q as hr, v as pr } from "../schema-mutation-DQ7d4rmd.js";
|
|
2
2
|
const me = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD", Me = me + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040", Pe = "[" + me + "][" + Me + "]*", Fe = new RegExp("^" + Pe + "$");
|
|
3
3
|
function je(n, e) {
|
|
4
4
|
const t = [];
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dispatch.d.ts","sourceRoot":"","sources":["../../src/local/dispatch.ts"],"names":[],"mappings":"AA+DA,4EAA4E;AAC5E,MAAM,WAAW,QAAQ;IACxB,MAAM,EAAE,MAAM,CAAA;IACd,wEAAwE;IACxE,KAAK,EAAE,MAAM,CAAA;IACb,2DAA2D;IAC3D,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,CAAA;IACpB,+BAA+B;IAC/B,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IACzB,8DAA8D;IAC9D,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;CACxC;AAED;;oEAEoE;AACpE,MAAM,WAAW,YAAY;IAC5B,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,OAAO,EAAE,MAAM,EAAE,CAAA;CACjB;AAED,MAAM,WAAW,WAAW;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,OAAO,CAAA;IACb,YAAY,CAAC,EAAE,YAAY,CAAA;CAC3B;AAED,kFAAkF;AAClF,wBAAsB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"dispatch.d.ts","sourceRoot":"","sources":["../../src/local/dispatch.ts"],"names":[],"mappings":"AA+DA,4EAA4E;AAC5E,MAAM,WAAW,QAAQ;IACxB,MAAM,EAAE,MAAM,CAAA;IACd,wEAAwE;IACxE,KAAK,EAAE,MAAM,CAAA;IACb,2DAA2D;IAC3D,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,CAAA;IACpB,+BAA+B;IAC/B,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IACzB,8DAA8D;IAC9D,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;CACxC;AAED;;oEAEoE;AACpE,MAAM,WAAW,YAAY;IAC5B,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,OAAO,EAAE,MAAM,EAAE,CAAA;CACjB;AAED,MAAM,WAAW,WAAW;IAC3B,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,OAAO,CAAA;IACb,YAAY,CAAC,EAAE,YAAY,CAAA;CAC3B;AAED,kFAAkF;AAClF,wBAAsB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAid1F"}
|
package/dist/mcp.js
CHANGED
|
@@ -2,8 +2,8 @@ import { existsSync as c, readFileSync as f, readdirSync as C, mkdirSync as R, w
|
|
|
2
2
|
import { dirname as b, join as i, relative as I, sep as E, resolve as W } from "node:path";
|
|
3
3
|
import { execFileSync as $ } from "node:child_process";
|
|
4
4
|
import { fileURLToPath as A } from "node:url";
|
|
5
|
-
import { n as x, p as O, i as F, e as L } from "./schema-mutation-
|
|
6
|
-
import { c as M } from "./schema-mutation-
|
|
5
|
+
import { n as x, p as O, i as F, e as L } from "./schema-mutation-DQ7d4rmd.js";
|
|
6
|
+
import { c as M } from "./schema-mutation-DXOYPQHt.js";
|
|
7
7
|
function K() {
|
|
8
8
|
const k = process.env.OKNO_DIR;
|
|
9
9
|
if (k) {
|
package/dist/next/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { join as a, relative as w, sep as k, resolve as g, dirname as T } from "node:path";
|
|
2
2
|
import { readFileSync as S, existsSync as O, readdirSync as J } from "node:fs";
|
|
3
3
|
import { fileURLToPath as M } from "node:url";
|
|
4
|
-
import { j as D, s as y, i as F, b as I, a as L, c as K, f as U, e as B, g as G, h as W, l as V, m as z, n as H, d as Q } from "../dispatch-
|
|
4
|
+
import { j as D, s as y, i as F, b as I, a as L, c as K, f as U, e as B, g as G, h as W, l as V, m as z, n as H, d as Q } from "../dispatch-dWn8cIFI.js";
|
|
5
5
|
import { mkdir as X, readFile as Y, writeFile as Z } from "node:fs/promises";
|
|
6
6
|
const q = /(?:\?|&)okno-asset(?:&|$)/;
|
|
7
7
|
function N(t) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as ct, g as ut, s as C, b as dt, i as B, a as ft, c as pt, e as mt, f as gt, h as ht, j as Z, k as x, l as A, m as yt, n as wt } from "./dispatch-
|
|
1
|
+
import { d as ct, g as ut, s as C, b as dt, i as B, a as ft, c as pt, e as mt, f as gt, h as ht, j as Z, k as x, l as A, m as yt, n as wt } from "./dispatch-dWn8cIFI.js";
|
|
2
2
|
import { extname as St, join as k, dirname as P, relative as H, sep as rt, resolve as h } from "node:path";
|
|
3
3
|
import { existsSync as j, readFileSync as V, mkdirSync as q, writeFileSync as tt, watch as _t, readdirSync as bt } from "node:fs";
|
|
4
4
|
import { fileURLToPath as kt } from "node:url";
|
|
@@ -6,7 +6,7 @@ import { simpleGit as G } from "simple-git";
|
|
|
6
6
|
import "node:child_process";
|
|
7
7
|
import "./acorn-oIjaFBVA.js";
|
|
8
8
|
import "node:crypto";
|
|
9
|
-
import { a as L } from "./schema-mutation-
|
|
9
|
+
import { a as L } from "./schema-mutation-DXOYPQHt.js";
|
|
10
10
|
function et(t, r, s) {
|
|
11
11
|
t.statusCode = r, t.setHeader("Content-Type", "application/json"), t.setHeader("Cache-Control", "no-store"), t.end(JSON.stringify(s));
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preview-sync.d.ts","sourceRoot":"","sources":["../../src/runtime/preview-sync.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAA4B,aAAa,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"preview-sync.d.ts","sourceRoot":"","sources":["../../src/runtime/preview-sync.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAA4B,aAAa,EAAE,MAAM,oBAAoB,CAAA;AA8KlG,kGAAkG;AAClG,wBAAgB,uBAAuB;mBAmBhB,MAAM;kBACP,MAAM;;wBAKA,eAAe,GAAG,OAAO,CAAC,aAAa,CAAC;EAoGnE"}
|
package/dist/runtime/values.d.ts
CHANGED
|
@@ -103,6 +103,8 @@ interface WrapCtx {
|
|
|
103
103
|
icon?: boolean;
|
|
104
104
|
/** Date-only presentation; stored values and subscriptions remain raw. */
|
|
105
105
|
date?: boolean;
|
|
106
|
+
/** An empty string is no value for this field type (`.exists` is false). */
|
|
107
|
+
emptyUnset?: boolean;
|
|
106
108
|
dateFormat?: DateFormatDescriptor;
|
|
107
109
|
dateFormatExplicitLocale?: boolean;
|
|
108
110
|
/** Bound arguments belong to this rendered call, never the source callable. */
|
|
@@ -118,20 +120,6 @@ interface WrapCtx {
|
|
|
118
120
|
* {@link __oknoMakeStrings} lifts `schema.strings[key].slots`. Best-effort:
|
|
119
121
|
* an absent/odd `fields` yields `{}`. */
|
|
120
122
|
export declare function __oknoLiftSlots(fields: unknown): Record<string, SlotDefs>;
|
|
121
|
-
/**
|
|
122
|
-
* Wraps content data in a Proxy that:
|
|
123
|
-
* - Returns `data-okno` attribute when spread ({...value})
|
|
124
|
-
* - Returns string value when used in templates ({value})
|
|
125
|
-
* - Forwards native string/number methods (value.length, value.includes(), etc.)
|
|
126
|
-
* - Returns nested proxies for group access (value.child)
|
|
127
|
-
* - Returns empty proxies for non-existing fields
|
|
128
|
-
* - Supports .onedit(callback) for reactive change subscriptions
|
|
129
|
-
*
|
|
130
|
-
* `ctx` carries slot definitions (see {@link WrapCtx}) so a slotted plain-text
|
|
131
|
-
* field resolves to a `(params) => <wrapped string>` function instead of a value
|
|
132
|
-
* — the §2 rule, shared with the strings store. Omitted when the entry has no
|
|
133
|
-
* slots, keeping the common path untouched.
|
|
134
|
-
*/
|
|
135
123
|
export declare function __oknoWrap(data: unknown, prefix: string, drag?: string, ctx?: WrapCtx): any;
|
|
136
124
|
/**
|
|
137
125
|
* Replace reference fields (id or id[]) on a raw record with `__oknoRef` markers
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"values.d.ts","sourceRoot":"","sources":["../../src/runtime/values.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoD,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAA;AAG/F,OAAO,EAA0D,KAAK,oBAAoB,EAAE,MAAM,eAAe,CAAA;AAWjH;+EAC+E;AAC/E,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAEjE;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAMrD;AAMD;0DAC0D;AAC1D,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAElE;AAWD;oDACoD;AACpD,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= {};
|
|
3325
|
-
function
|
|
3325
|
+
function ai(t) {
|
|
3326
3326
|
Nt = t;
|
|
3327
3327
|
}
|
|
3328
3328
|
function Tt(t) {
|
|
@@ -3334,11 +3334,11 @@ function Tt(t) {
|
|
|
3334
3334
|
function he(t) {
|
|
3335
3335
|
return typeof t == "string" ? Nt[t] ?? t : t;
|
|
3336
3336
|
}
|
|
3337
|
-
function
|
|
3337
|
+
function li(t) {
|
|
3338
3338
|
t && typeof t == "object" && (St = t);
|
|
3339
3339
|
}
|
|
3340
3340
|
let xt = {};
|
|
3341
|
-
function
|
|
3341
|
+
function ci(t) {
|
|
3342
3342
|
const e = t?.collections;
|
|
3343
3343
|
if (!e || typeof e != "object") return;
|
|
3344
3344
|
const n = {};
|
|
@@ -3363,7 +3363,7 @@ function Or(t, e) {
|
|
|
3363
3363
|
}
|
|
3364
3364
|
return "/" + n.join("/");
|
|
3365
3365
|
}
|
|
3366
|
-
function
|
|
3366
|
+
function ui(t, e = Date.now()) {
|
|
3367
3367
|
if (!t || typeof t != "object") return !0;
|
|
3368
3368
|
const n = t, r = typeof n.publishAt == "string" ? Date.parse(n.publishAt) : NaN;
|
|
3369
3369
|
if (!Number.isNaN(r) && r > e) return !1;
|
|
@@ -3420,13 +3420,13 @@ function kt(t, e) {
|
|
|
3420
3420
|
n[r] = kt(t[r], e[r]);
|
|
3421
3421
|
return n;
|
|
3422
3422
|
}
|
|
3423
|
-
function
|
|
3423
|
+
function fi(t, e) {
|
|
3424
3424
|
const n = { ...t };
|
|
3425
3425
|
for (const r of Object.keys(e))
|
|
3426
3426
|
n[r] = kt(t, e[r]);
|
|
3427
3427
|
return n;
|
|
3428
3428
|
}
|
|
3429
|
-
function
|
|
3429
|
+
function di(t, e) {
|
|
3430
3430
|
return Object.fromEntries(Object.entries(t).map(([n, r]) => {
|
|
3431
3431
|
if (!Array.isArray(r)) return [n, r.locale(e)];
|
|
3432
3432
|
const s = r.map((o) => o.locale(e)), i = Object.getOwnPropertyDescriptor(r, "new");
|
|
@@ -3438,7 +3438,7 @@ function fi(t, e) {
|
|
|
3438
3438
|
}), [n, s];
|
|
3439
3439
|
}));
|
|
3440
3440
|
}
|
|
3441
|
-
function
|
|
3441
|
+
function hi(t) {
|
|
3442
3442
|
if (!t || typeof t != "object" || Array.isArray(t)) return {};
|
|
3443
3443
|
const e = {};
|
|
3444
3444
|
for (const [n, r] of Object.entries(t)) {
|
|
@@ -3453,7 +3453,7 @@ function di(t) {
|
|
|
3453
3453
|
return e;
|
|
3454
3454
|
}
|
|
3455
3455
|
const Ae = "string:", Rr = { slots: {} };
|
|
3456
|
-
function
|
|
3456
|
+
function pi(t, e, n, r = []) {
|
|
3457
3457
|
const s = {};
|
|
3458
3458
|
if (e && typeof e == "object" && !Array.isArray(e))
|
|
3459
3459
|
for (const [i, o] of Object.entries(e)) {
|
|
@@ -3550,7 +3550,7 @@ function It(t, e) {
|
|
|
3550
3550
|
const r = e && typeof e == "object" && !Array.isArray(e) ? e.__block : void 0, s = typeof r == "string" ? r : typeof n.block == "string" ? n.block : Array.isArray(n.blocks) && n.blocks.length === 1 ? n.blocks[0] : void 0, i = s ? t.schema?.blocks?.[s]?.fields : void 0;
|
|
3551
3551
|
return { ...t, fields: i ?? {}, valueDef: void 0, html: void 0, multiline: void 0, icon: !1, option: !1, date: !1, dateFormat: void 0 };
|
|
3552
3552
|
}
|
|
3553
|
-
return n.type === "enum" ? { ...t, fields: void 0, html: void 0, multiline: void 0, icon: !1, option: !0, date: !1, dateFormat: void 0 } : { ...t, fields: void 0, valueDef: void 0, html: n.type === "string" && n.html === !0, multiline: n.type === "string" && n.multiline === !0 && n.html !== !0, icon: n.type === "icon", option: !1, date: n.type === "date", dateFormat: void 0 };
|
|
3553
|
+
return n.type === "enum" ? { ...t, fields: void 0, html: void 0, multiline: void 0, icon: !1, option: !0, date: !1, dateFormat: void 0 } : { ...t, fields: void 0, valueDef: void 0, html: n.type === "string" && n.html === !0, multiline: n.type === "string" && n.multiline === !0 && n.html !== !0, icon: n.type === "icon", option: !1, date: n.type === "date", dateFormat: void 0, emptyUnset: Pr.has(n.type) };
|
|
3554
3554
|
}
|
|
3555
3555
|
function Mr(t) {
|
|
3556
3556
|
const e = {};
|
|
@@ -3563,6 +3563,7 @@ function Mr(t) {
|
|
|
3563
3563
|
}
|
|
3564
3564
|
return e;
|
|
3565
3565
|
}
|
|
3566
|
+
const Pr = /* @__PURE__ */ new Set(["media", "date", "link", "reference", "icon", "number", "color", "boolean"]);
|
|
3566
3567
|
function P(t, e, n, r) {
|
|
3567
3568
|
const s = { __raw: t, __path: e, __drag: n }, i = Ct(r), o = r?.valueDef?.type ? r.valueDef.type === "icon" : r?.icon ?? (r?.fields ? !1 : le(t)), a = r?.valueDef?.type ? r.valueDef.type === "enum" : r?.option ?? (r?.fields ? !1 : ce(t)), c = (r?.html === !0 || r?.valueDef?.type === "string" && r.valueDef.html === !0) && (t == null || typeof t == "string"), l = !c && (r?.multiline === !0 || r?.valueDef?.type === "string" && r.valueDef.multiline === !0 && r.valueDef.html !== !0) && (t == null || typeof t == "string"), u = r?.valueDef?.type ? r.valueDef.type === "date" : r?.date === !0, f = u && r?.dateFormat ? Ce(r.dateFormatExplicitLocale ? r.dateFormat.locale : r.locale ?? r.defaultLocale ?? "en", r.dateFormat.options) : void 0, h = f ? JSON.stringify(f) : void 0, p = () => f ? _t(t, f) : a && t == null ? "" : a && ce(t) ? t.value : Ie(t, e);
|
|
3568
3569
|
return new Proxy(s, {
|
|
@@ -3598,7 +3599,7 @@ function P(t, e, n, r) {
|
|
|
3598
3599
|
...i ? { [C]: i } : {}
|
|
3599
3600
|
};
|
|
3600
3601
|
if (d === "data-okno-item") return g.__drag ?? void 0;
|
|
3601
|
-
if (d === "exists") return g.__raw !== null && g.__raw !== void 0;
|
|
3602
|
+
if (d === "exists") return g.__raw !== null && g.__raw !== void 0 && !(g.__raw === "" && r?.emptyUnset);
|
|
3602
3603
|
if (d === "value" && (g.__raw === null || typeof g.__raw != "object"))
|
|
3603
3604
|
return g.__raw;
|
|
3604
3605
|
if (d === "image" && J(g.__raw, !o)) {
|
|
@@ -3646,7 +3647,7 @@ function P(t, e, n, r) {
|
|
|
3646
3647
|
const E = w && r?.locales?.includes(w) ? w : r?.defaultLocale;
|
|
3647
3648
|
return P(b, g.__path, g.__drag, { ...r, locale: E });
|
|
3648
3649
|
};
|
|
3649
|
-
const m = g.__raw, y = g.__path ? `${g.__path}.${String(d)}` : String(d), v = r?.rel ?? "", A = v ? `${v}.${String(d)}` : String(d), _ = typeof d == "string" ? r?.fields?.[d] : void 0, S = m !== null && typeof m == "object" && !Array.isArray(m) ? m[String(d)] : void 0, N = It(r ? { ...r, rel: A, valueDef: _, html: void 0, multiline: void 0, icon: void 0, option: void 0, date: void 0, dateFormat: void 0, dateFormatExplicitLocale: void 0, collection: !1 } : void 0, S), T = r?.slots?.[A] ?? (_?.type === "string" && !_.multiple ? _.slots : void 0);
|
|
3650
|
+
const m = g.__raw, y = g.__path ? `${g.__path}.${String(d)}` : String(d), v = r?.rel ?? "", A = v ? `${v}.${String(d)}` : String(d), _ = typeof d == "string" ? r?.fields?.[d] : void 0, S = m !== null && typeof m == "object" && !Array.isArray(m) ? m[String(d)] : void 0, N = It(r ? { ...r, rel: A, valueDef: _, html: void 0, multiline: void 0, icon: void 0, option: void 0, date: void 0, dateFormat: void 0, dateFormatExplicitLocale: void 0, emptyUnset: void 0, collection: !1 } : void 0, S), T = r?.slots?.[A] ?? (_?.type === "string" && !_.multiple ? _.slots : void 0);
|
|
3650
3651
|
if (T && Object.keys(T).length > 0 && m !== null && typeof m == "object" && !Array.isArray(m)) {
|
|
3651
3652
|
const w = m[String(d)];
|
|
3652
3653
|
return Object.assign((E = {}) => P(pe(w, T, E, r?.locale ?? r?.defaultLocale), y, void 0, { ...N, slotFormat: rt(T, E, r?.locale ?? r?.defaultLocale) }), { ...P("", y, void 0, { ...N, slotFormat: "" }) });
|
|
@@ -3664,7 +3665,7 @@ function P(t, e, n, r) {
|
|
|
3664
3665
|
}
|
|
3665
3666
|
if (m != null && typeof m == "object" && !Array.isArray(m)) {
|
|
3666
3667
|
let w = m[String(d)];
|
|
3667
|
-
return _?.type === "reference" && (w =
|
|
3668
|
+
return _?.type === "reference" && (w = Vr(w, _, r)), w == null || _?.multiple && w === "" ? _?.multiple ? ue([], y, void 0, N) : P(null, y, void 0, N) : ue(w, y, void 0, N);
|
|
3668
3669
|
}
|
|
3669
3670
|
return _?.multiple ? ue([], y, void 0, N) : P(null, y, void 0, N);
|
|
3670
3671
|
},
|
|
@@ -3745,7 +3746,7 @@ function ue(t, e, n, r) {
|
|
|
3745
3746
|
return P(t, e, n, r);
|
|
3746
3747
|
}
|
|
3747
3748
|
const Ye = /* @__PURE__ */ new WeakMap();
|
|
3748
|
-
function
|
|
3749
|
+
function Fr(t, e) {
|
|
3749
3750
|
let n = Ye.get(t);
|
|
3750
3751
|
n || (n = /* @__PURE__ */ new Map(), Ye.set(t, n));
|
|
3751
3752
|
const r = n.get(e);
|
|
@@ -3757,10 +3758,10 @@ function Pr(t, e) {
|
|
|
3757
3758
|
}
|
|
3758
3759
|
return n.set(e, i), i;
|
|
3759
3760
|
}
|
|
3760
|
-
function
|
|
3761
|
+
function Vr(t, e, n) {
|
|
3761
3762
|
const r = typeof e?.collection == "string" ? e.collection : "", s = n?.collections;
|
|
3762
3763
|
if (!r || !s || typeof s != "object") return t;
|
|
3763
|
-
const i =
|
|
3764
|
+
const i = Fr(s, r), o = n?.schema?.collections?.[r]?.fields, a = (c) => {
|
|
3764
3765
|
if (typeof c != "string" || !c) return null;
|
|
3765
3766
|
const l = i.get(c);
|
|
3766
3767
|
if (l === void 0) return null;
|
|
@@ -3776,7 +3777,7 @@ function Ot(t, e) {
|
|
|
3776
3777
|
}
|
|
3777
3778
|
return t;
|
|
3778
3779
|
}
|
|
3779
|
-
function
|
|
3780
|
+
function gi(t, e, n, r = []) {
|
|
3780
3781
|
if (!t || typeof t != "object" || Array.isArray(t) || !e) return t;
|
|
3781
3782
|
const s = Object.keys(e).filter(
|
|
3782
3783
|
(c) => e[c]?.type === "reference" && typeof e[c]?.collection == "string"
|
|
@@ -3845,35 +3846,35 @@ function $t(t, e, n = []) {
|
|
|
3845
3846
|
function jt() {
|
|
3846
3847
|
return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
3847
3848
|
}
|
|
3848
|
-
function
|
|
3849
|
+
function Br(t) {
|
|
3849
3850
|
const e = document;
|
|
3850
3851
|
return typeof e.startViewTransition != "function" || jt() ? (t(), Promise.resolve()) : e.startViewTransition(t).finished.catch(() => {
|
|
3851
3852
|
});
|
|
3852
3853
|
}
|
|
3853
|
-
let
|
|
3854
|
-
function
|
|
3854
|
+
let qr = 0, Z = null;
|
|
3855
|
+
function Ur(t) {
|
|
3855
3856
|
Z !== null && (clearTimeout(Z), Z = null), t.removeAttribute("data-okno-vt-easing"), t.setAttribute("data-okno-vt-opaque", "");
|
|
3856
3857
|
}
|
|
3857
|
-
function
|
|
3858
|
+
function Wr(t) {
|
|
3858
3859
|
t.hasAttribute("data-okno-vt-opaque") && (t.setAttribute("data-okno-vt-easing", ""), t.removeAttribute("data-okno-vt-opaque"), Z !== null && clearTimeout(Z), Z = setTimeout(() => {
|
|
3859
3860
|
t.removeAttribute("data-okno-vt-easing"), Z = null;
|
|
3860
3861
|
}, 320));
|
|
3861
3862
|
}
|
|
3862
|
-
function
|
|
3863
|
+
function Gr(t, e) {
|
|
3863
3864
|
const n = [], r = (u) => {
|
|
3864
|
-
u.style.viewTransitionName = `okno-vt-${++
|
|
3865
|
+
u.style.viewTransitionName = `okno-vt-${++qr}`, n.push(u);
|
|
3865
3866
|
};
|
|
3866
3867
|
for (const u of t) r(u);
|
|
3867
3868
|
const s = document.documentElement;
|
|
3868
3869
|
s.classList.add("okno-vt-active");
|
|
3869
|
-
const i =
|
|
3870
|
-
c &&
|
|
3870
|
+
const i = zr(), a = typeof document.startViewTransition == "function" && !jt() ? document.getElementById(Lt) : null, c = a instanceof HTMLElement ? a : null;
|
|
3871
|
+
c && Ur(c), Br(() => e(r)).finally(() => {
|
|
3871
3872
|
for (const u of n) u.style.viewTransitionName = "";
|
|
3872
|
-
i(), s.classList.remove("okno-vt-active"), c &&
|
|
3873
|
+
i(), s.classList.remove("okno-vt-active"), c && Wr(c);
|
|
3873
3874
|
});
|
|
3874
3875
|
}
|
|
3875
3876
|
const Lt = "okno-shadow-root";
|
|
3876
|
-
function
|
|
3877
|
+
function zr() {
|
|
3877
3878
|
const t = document.getElementById(Lt);
|
|
3878
3879
|
if (!(t instanceof HTMLElement)) return () => {
|
|
3879
3880
|
};
|
|
@@ -3885,11 +3886,11 @@ function Gr() {
|
|
|
3885
3886
|
t.style.cssText = e;
|
|
3886
3887
|
};
|
|
3887
3888
|
}
|
|
3888
|
-
const q = "data-okno-item", M = "data-okno",
|
|
3889
|
+
const q = "data-okno-item", M = "data-okno", Xr = [M, q, "data-okno-list"];
|
|
3889
3890
|
function Rt(t) {
|
|
3890
3891
|
return t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
3891
3892
|
}
|
|
3892
|
-
function Y(t, e, n, r =
|
|
3893
|
+
function Y(t, e, n, r = Xr) {
|
|
3893
3894
|
if (e === n) return;
|
|
3894
3895
|
const s = (i) => {
|
|
3895
3896
|
for (const o of r) {
|
|
@@ -3900,7 +3901,7 @@ function Y(t, e, n, r = zr) {
|
|
|
3900
3901
|
s(t);
|
|
3901
3902
|
for (const i of r) t.querySelectorAll(`[${i}]`).forEach(s);
|
|
3902
3903
|
}
|
|
3903
|
-
function
|
|
3904
|
+
function Hr(t, e, n, r) {
|
|
3904
3905
|
const s = t.hasAttribute(M) ? [t, ...Array.from(t.querySelectorAll(`[${M}]`))] : Array.from(t.querySelectorAll(`[${M}]`));
|
|
3905
3906
|
for (const i of s) {
|
|
3906
3907
|
const o = i.getAttribute(C);
|
|
@@ -3926,7 +3927,7 @@ function Pt(t, e) {
|
|
|
3926
3927
|
for (; r.parentElement && n(r.parentElement) === n(r); ) r = r.parentElement;
|
|
3927
3928
|
return r;
|
|
3928
3929
|
}
|
|
3929
|
-
function
|
|
3930
|
+
function mi(t, e) {
|
|
3930
3931
|
if (!(e instanceof HTMLElement)) return null;
|
|
3931
3932
|
const n = e.getAttribute(C) ?? e.querySelector(`[${C}]`)?.getAttribute(C), r = Mt(t, n ?? void 0), s = r.find((i) => i === e) ?? r.find((i) => i.contains(e) || e.contains(i));
|
|
3932
3933
|
return s ? Pt(r, s) : null;
|
|
@@ -3966,11 +3967,11 @@ function Bt(t) {
|
|
|
3966
3967
|
const e = Array.from(t.querySelectorAll(`[${M}]`));
|
|
3967
3968
|
return t.hasAttribute(M) && e.unshift(t), e;
|
|
3968
3969
|
}
|
|
3969
|
-
function
|
|
3970
|
+
function Zr(t) {
|
|
3970
3971
|
for (const e of Bt(t))
|
|
3971
3972
|
e.children.length > 0 || (e.textContent = "", e.tagName === "A" && (e.setAttribute("href", ""), e.removeAttribute("target"), e.removeAttribute("rel")));
|
|
3972
3973
|
}
|
|
3973
|
-
function
|
|
3974
|
+
function Yr(t, e) {
|
|
3974
3975
|
for (const n of Bt(t)) {
|
|
3975
3976
|
if (n.children.length > 0) continue;
|
|
3976
3977
|
const r = n.getAttribute(M), s = r != null && r in e, i = n.tagName;
|
|
@@ -4001,15 +4002,15 @@ function Re(t, e, n) {
|
|
|
4001
4002
|
c.origin === new URL(document.baseURI).origin && r(c.pathname) === s && o.setAttribute("href", n + c.search + c.hash);
|
|
4002
4003
|
}
|
|
4003
4004
|
}
|
|
4004
|
-
function
|
|
4005
|
+
function Jr(t) {
|
|
4005
4006
|
if (typeof document > "u" || !t?.list || !t.op) return;
|
|
4006
4007
|
const { list: e, op: n } = t, r = Ft(e, t.locale);
|
|
4007
|
-
n === "insert" && r.every((s) => s.wrappers.length === 0) || r.length !== 0 &&
|
|
4008
|
+
n === "insert" && r.every((s) => s.wrappers.length === 0) || r.length !== 0 && Gr(r.flatMap((s) => s.wrappers), (s) => {
|
|
4008
4009
|
for (const i of r)
|
|
4009
|
-
n === "reorder" ?
|
|
4010
|
+
n === "reorder" ? Kr(i, e, t.from, t.to) : n === "remove" ? Qr(i, e, t.index) : n === "insert" && Dr(i, e, t, s);
|
|
4010
4011
|
});
|
|
4011
4012
|
}
|
|
4012
|
-
function
|
|
4013
|
+
function Kr(t, e, n, r) {
|
|
4013
4014
|
const s = t.wrappers, i = s.length;
|
|
4014
4015
|
if (n < 0 || n >= i || r < 0 || r >= i || n === r) return;
|
|
4015
4016
|
const o = s.slice(), [a] = o.splice(n, 1);
|
|
@@ -4019,42 +4020,42 @@ function Jr(t, e, n, r) {
|
|
|
4019
4020
|
const l = s[i - 1].nextSibling;
|
|
4020
4021
|
for (const u of o) t.parent.insertBefore(u, l);
|
|
4021
4022
|
}
|
|
4022
|
-
function
|
|
4023
|
+
function Qr(t, e, n) {
|
|
4023
4024
|
const r = t.wrappers;
|
|
4024
4025
|
if (!(n < 0 || n >= r.length)) {
|
|
4025
4026
|
r[n].remove();
|
|
4026
4027
|
for (let s = n + 1; s < r.length; s++) Y(r[s], `${e}.${s}`, `${e}.${s - 1}`);
|
|
4027
4028
|
}
|
|
4028
4029
|
}
|
|
4029
|
-
function
|
|
4030
|
+
function Dr(t, e, n, r) {
|
|
4030
4031
|
const s = t.wrappers, i = s.length;
|
|
4031
4032
|
if (i === 0) return;
|
|
4032
4033
|
const o = Math.max(0, Math.min(n.index ?? i, i)), a = o < i ? o : i - 1, c = Vt(s[a], e), l = s[a].cloneNode(!0);
|
|
4033
4034
|
for (let f = i - 1; f >= o; f--) Y(s[f], `${e}.${f}`, `${e}.${f + 1}`);
|
|
4034
|
-
Y(l, c, `${e}.${o}`), n.remap && Y(l, n.remap.from, n.remap.to, [M]), n.href && Re(l, n.href.from, n.href.to), n.values ?
|
|
4035
|
+
Y(l, c, `${e}.${o}`), n.remap && Y(l, n.remap.from, n.remap.to, [M]), n.href && Re(l, n.href.from, n.href.to), n.values ? Yr(l, n.values) : Zr(l), l.style.viewTransitionName = "", r(l);
|
|
4035
4036
|
const u = o < i ? s[o] : s[i - 1].nextSibling;
|
|
4036
4037
|
t.parent.insertBefore(l, u);
|
|
4037
4038
|
}
|
|
4038
4039
|
let Je = !1;
|
|
4039
|
-
function
|
|
4040
|
+
function yi() {
|
|
4040
4041
|
const t = globalThis;
|
|
4041
|
-
Je || typeof t.document > "u" || (Je = !0, t.document.addEventListener("okno:structure", (e) =>
|
|
4042
|
+
Je || typeof t.document > "u" || (Je = !0, t.document.addEventListener("okno:structure", (e) => Jr(e.detail)), t.document.addEventListener("okno:remap-entry", (e) => {
|
|
4042
4043
|
const n = e?.detail?.from, r = e?.detail?.to, s = typeof e?.detail?.locale == "string" ? e.detail.locale : void 0;
|
|
4043
4044
|
if (typeof n != "string" || typeof r != "string" || !n || !r) return;
|
|
4044
4045
|
const i = t.document.documentElement;
|
|
4045
|
-
i &&
|
|
4046
|
+
i && Hr(i, n, r, s), i && typeof e?.detail?.hrefFrom == "string" && typeof e?.detail?.hrefTo == "string" && Re(i, e.detail.hrefFrom, e.detail.hrefTo);
|
|
4046
4047
|
}));
|
|
4047
4048
|
}
|
|
4048
|
-
const
|
|
4049
|
+
const ei = /* @__PURE__ */ Symbol.for("okno.preview.renderers.v1");
|
|
4049
4050
|
function qt() {
|
|
4050
4051
|
if (typeof window > "u") return;
|
|
4051
4052
|
const t = window;
|
|
4052
|
-
return t[
|
|
4053
|
+
return t[ei] ??= { renderers: /* @__PURE__ */ new Set(), listeners: /* @__PURE__ */ new Set() };
|
|
4053
4054
|
}
|
|
4054
4055
|
function Ke(t) {
|
|
4055
4056
|
for (const e of [...t.listeners]) e();
|
|
4056
4057
|
}
|
|
4057
|
-
function
|
|
4058
|
+
function bi(t) {
|
|
4058
4059
|
const e = qt();
|
|
4059
4060
|
if (!e) return () => {
|
|
4060
4061
|
};
|
|
@@ -4076,9 +4077,9 @@ function Qe(t, e) {
|
|
|
4076
4077
|
function Ut() {
|
|
4077
4078
|
return [...qt()?.renderers ?? []].filter((t) => t.root.isConnected && !t.signal.aborted);
|
|
4078
4079
|
}
|
|
4079
|
-
let
|
|
4080
|
-
const V = "data-okno", De = "data-okno-list",
|
|
4081
|
-
function
|
|
4080
|
+
let ti = 0;
|
|
4081
|
+
const V = "data-okno", De = "data-okno-list", ni = /* @__PURE__ */ new Set(["localeMatcher", "calendar", "numberingSystem", "hour12", "hourCycle", "timeZone", "weekday", "era", "year", "month", "day", "dayPeriod", "hour", "minute", "second", "fractionalSecondDigits", "timeZoneName", "formatMatcher", "dateStyle", "timeStyle"]), Wt = (t, e) => (t.getAttribute(C) ?? void 0) === e, et = (t) => JSON.stringify([t.variant, t.value]), ri = (t, e) => t.variant === e.variant && (et(t) === et(e) || t.contentPath === e.contentPath && !/\.\d+$/.test(t.contentPath)), Gt = (t, e) => [...t.hasAttribute(e) ? [t] : [], ...Array.from(t.querySelectorAll(`[${e}]`))];
|
|
4082
|
+
function ii(t, e, n, r) {
|
|
4082
4083
|
let s = !1;
|
|
4083
4084
|
for (const i of Array.from(document.querySelectorAll(`[${V}]`))) {
|
|
4084
4085
|
if (!Wt(i, t.locale) || e.some((f) => f === i || f.contains(i))) continue;
|
|
@@ -4108,7 +4109,7 @@ function ri(t, e, n, r) {
|
|
|
4108
4109
|
if (!h || typeof h != "object" || Array.isArray(h)) throw new Error("Invalid date format descriptor");
|
|
4109
4110
|
const { locale: p, options: g } = h;
|
|
4110
4111
|
if (typeof p != "string" || !p.trim() || p.length > 256 || !g || typeof g != "object" || Array.isArray(g)) throw new Error("Invalid date format descriptor");
|
|
4111
|
-
if (Object.keys(h).some((y) => y !== "locale" && y !== "options") || Object.entries(g).some(([y, v]) => !
|
|
4112
|
+
if (Object.keys(h).some((y) => y !== "locale" && y !== "options") || Object.entries(g).some(([y, v]) => !ni.has(y) || !["string", "number", "boolean"].includes(typeof v))) throw new Error("Invalid date format options");
|
|
4112
4113
|
const d = Ce(p, g), m = _t(a, d);
|
|
4113
4114
|
i.tagName === "TIME" && l("datetime", typeof a == "string" ? a : ""), i.children.length || u(m);
|
|
4114
4115
|
} catch (f) {
|
|
@@ -4127,7 +4128,7 @@ function ri(t, e, n, r) {
|
|
|
4127
4128
|
p || (p = { use: f, href: f.getAttribute("href"), viewBox: i.getAttribute("viewBox"), accessibility: Object.fromEntries(["role", "aria-label", "aria-hidden"].map((d) => [d, i.getAttribute(d)])) }, n.icons.set(i, p));
|
|
4128
4129
|
const g = typeof c.alt == "string" ? c.alt : "";
|
|
4129
4130
|
if (l("role", g ? "img" : null), l("aria-label", g || null), l("aria-hidden", g ? null : "true"), h?.ok) {
|
|
4130
|
-
const d = `okno-preview-icon-${++
|
|
4131
|
+
const d = `okno-preview-icon-${++ti}`;
|
|
4131
4132
|
p.defs?.remove();
|
|
4132
4133
|
const m = document.createElementNS("http://www.w3.org/2000/svg", "defs");
|
|
4133
4134
|
m.setAttribute("data-okno-preview-icon", ""), m.innerHTML = `<symbol id="${d}" viewBox="${h.viewBox}">${h.body}</symbol>`, i.prepend(m), p.defs = m, l("viewBox", h.viewBox), f.setAttribute("href", `#${d}`), s = !0;
|
|
@@ -4155,7 +4156,7 @@ function tt(t, e, n, r, s, i = !1) {
|
|
|
4155
4156
|
let u = {};
|
|
4156
4157
|
for (const p of a) {
|
|
4157
4158
|
const g = p.getAttribute(V);
|
|
4158
|
-
if (g !== l && !g.startsWith(l + ".")) continue;
|
|
4159
|
+
if (g !== l && !g.startsWith(l + ".") || p.querySelector(`[${V}]`)) continue;
|
|
4159
4160
|
const d = s?.values[g];
|
|
4160
4161
|
let m = p.textContent ?? "";
|
|
4161
4162
|
if (["IMG", "VIDEO", "AUDIO", "SOURCE"].includes(p.tagName) ? m = { src: p.getAttribute("src") ?? "", ...p.tagName === "IMG" ? { alt: p.getAttribute("alt") ?? "" } : {} } : p.tagName === "A" && d?.type === "link" ? m = { url: p.getAttribute("href") ?? "", text: p.textContent ?? "" } : d?.type === "richtext" || d?.type === "string" && (d.html === !0 || d.html === void 0 && p.hasAttribute("data-okno-html")) ? m = p.innerHTML : d?.type === "number" ? m = Number(m) : d?.type === "boolean" && (m = m === "true"), d?.type === "string" && p.hasAttribute(R))
|
|
@@ -4181,8 +4182,8 @@ function tt(t, e, n, r, s, i = !1) {
|
|
|
4181
4182
|
}
|
|
4182
4183
|
return { value: u, contentPath: l, href: h, variant: t.getAttribute("data-okno-variant") ?? r?.variant };
|
|
4183
4184
|
}
|
|
4184
|
-
function
|
|
4185
|
-
if (
|
|
4185
|
+
function si(t, e) {
|
|
4186
|
+
if (ri(t.item, e)) return !0;
|
|
4186
4187
|
if (!t.observed || t.item.variant !== e.variant) return !1;
|
|
4187
4188
|
const n = (r, s) => {
|
|
4188
4189
|
if (!r || typeof r != "object") return r === s;
|
|
@@ -4195,7 +4196,7 @@ function ii(t, e) {
|
|
|
4195
4196
|
function nt(t) {
|
|
4196
4197
|
return [t.tagName, ...Array.from(t.querySelectorAll("*"), (e) => e.tagName)].join("/");
|
|
4197
4198
|
}
|
|
4198
|
-
function
|
|
4199
|
+
function vi() {
|
|
4199
4200
|
const t = /* @__PURE__ */ new Map(), e = [];
|
|
4200
4201
|
let n = !1;
|
|
4201
4202
|
const r = (o) => {
|
|
@@ -4279,12 +4280,12 @@ function bi() {
|
|
|
4279
4280
|
e.push(Pe), l.locations.push(Pe);
|
|
4280
4281
|
}
|
|
4281
4282
|
for (const b of l.locations.filter((E) => E.path === y.path && E.parent.isConnected && !g(E.parent)))
|
|
4282
|
-
|
|
4283
|
+
oi(b, y, e, _) && (a.changed = !0);
|
|
4283
4284
|
const T = h.some((b) => b.path === y.path || y.path.startsWith(b.path + ".")), w = l.locations.some((b) => b.path === y.path && b.parent.isConnected && b.active.length > 0);
|
|
4284
4285
|
T || w ? l.refresh.delete(y.path) : A && (!N.length || y.reorderOnly) && l.refresh.add(y.path);
|
|
4285
4286
|
}
|
|
4286
4287
|
if (d()) {
|
|
4287
|
-
a.changed =
|
|
4288
|
+
a.changed = ii(o, p, l, m) || a.changed;
|
|
4288
4289
|
const y = new Map(Object.entries(o.values).map(([v, A]) => [v, A.value]));
|
|
4289
4290
|
for (const v of o.lists) v.reorderOnly || y.set(v.path, v.items.map((A) => A.value));
|
|
4290
4291
|
for (const [v, A] of y)
|
|
@@ -4302,7 +4303,7 @@ function bi() {
|
|
|
4302
4303
|
}
|
|
4303
4304
|
};
|
|
4304
4305
|
}
|
|
4305
|
-
function
|
|
4306
|
+
function oi(t, e, n, r) {
|
|
4306
4307
|
if (e.reorderOnly) {
|
|
4307
4308
|
const l = t.active.filter((h) => h.node.parentElement === t.parent).sort((h, p) => h.node.compareDocumentPosition(p.node) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1);
|
|
4308
4309
|
if (l.some((h, p) => ee(e.path, h.node) !== p))
|
|
@@ -4313,7 +4314,7 @@ function si(t, e, n, r) {
|
|
|
4313
4314
|
if (new Set(e.items.map((l) => l.variant)).size === 1 && e.items[0]?.variant && t.records.length && t.records.every((l) => l.observed && l.item.variant === void 0) && new Set(t.records.map((l) => nt(l.node))).size === 1)
|
|
4314
4315
|
for (const l of t.records) l.item.variant = e.items[0].variant;
|
|
4315
4316
|
const i = /* @__PURE__ */ new Set(), o = e.items.map((l) => {
|
|
4316
|
-
const u = t.records.find((f) => !i.has(f) && (e.reorderOnly ? f.item.contentPath === l.contentPath :
|
|
4317
|
+
const u = t.records.find((f) => !i.has(f) && (e.reorderOnly ? f.item.contentPath === l.contentPath : si(f, l)));
|
|
4317
4318
|
return u && i.add(u), u;
|
|
4318
4319
|
}), a = [];
|
|
4319
4320
|
for (let l = 0; l < e.items.length; l++) {
|
|
@@ -4351,30 +4352,30 @@ function si(t, e, n, r) {
|
|
|
4351
4352
|
}
|
|
4352
4353
|
return t.active = a, c;
|
|
4353
4354
|
}
|
|
4354
|
-
function
|
|
4355
|
+
function wi(t, e) {
|
|
4355
4356
|
const n = { ...t }, r = Object.hasOwn(t, "draft");
|
|
4356
4357
|
return !Object.hasOwn(e ?? {}, "status") && (t.status === "draft" || t.status === "live") && (!r || typeof t.draft == "boolean") && (r || (n.draft = t.status === "draft"), delete n.status), n;
|
|
4357
4358
|
}
|
|
4358
4359
|
export {
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4360
|
+
Jr as __oknoApplyStructure,
|
|
4361
|
+
hi as __oknoExpandStrings,
|
|
4362
|
+
yi as __oknoInitStructure,
|
|
4362
4363
|
Mr as __oknoLiftSlots,
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4364
|
+
di as __oknoLocaleNamespace,
|
|
4365
|
+
fi as __oknoLocalize,
|
|
4366
|
+
pi as __oknoMakeStrings,
|
|
4367
|
+
wi as __oknoNormalizeCollectionDraft,
|
|
4367
4368
|
$t as __oknoResolveEnums,
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4369
|
+
gi as __oknoResolveRefs,
|
|
4370
|
+
ai as __oknoSetAssets,
|
|
4371
|
+
li as __oknoSetImages,
|
|
4372
|
+
ci as __oknoSetRoutes,
|
|
4372
4373
|
ee as __oknoUnitIndex,
|
|
4373
|
-
|
|
4374
|
-
|
|
4374
|
+
mi as __oknoUnitOf,
|
|
4375
|
+
ui as __oknoVisible,
|
|
4375
4376
|
P as __oknoWrap,
|
|
4376
4377
|
z as __oknoWrapStrings,
|
|
4377
|
-
|
|
4378
|
+
vi as createPreviewReconciler,
|
|
4378
4379
|
Rt as escapeReg,
|
|
4379
|
-
|
|
4380
|
+
bi as registerPreviewList
|
|
4380
4381
|
};
|