duckfn-docs-kit 0.3.0 → 0.4.1
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/AGENTS.md +326 -234
- package/README.md +10 -6
- package/dist/IconButton.d.ts +22 -0
- package/dist/codemirror.d.ts +29 -0
- package/dist/download.d.ts +51 -0
- package/dist/index.d.ts +28 -7
- package/dist/index.js +2 -2
- package/dist/mermaid/DfkMermaid.d.ts +25 -0
- package/dist/mermaid/config.d.ts +48 -0
- package/dist/mermaid/remark.d.ts +40 -0
- package/dist/mermaid/remark.js +32 -0
- package/dist/mermaid/render.d.ts +92 -0
- package/dist/mermaid/styles.d.ts +6 -0
- package/dist/panzoom-view.d.ts +17 -0
- package/dist/{register-CALCwFBv.js → register-wdwf0LC4.js} +1365 -738
- package/dist/remark.d.ts +1 -1
- package/dist/source-dialog.d.ts +35 -0
- package/dist/sql/PreviewTabs.d.ts +39 -23
- package/dist/sql/SvgViewer.d.ts +53 -0
- package/dist/sql/client.js +1 -1
- package/dist/sql/harness.js +1 -1
- package/dist/sql/remark.d.ts +6 -1
- package/dist/sql/renderers.d.ts +9 -0
- package/package.json +6 -2
- package/src/IconButton.ts +50 -0
- package/src/codemirror.ts +97 -0
- package/src/download.ts +169 -0
- package/src/index.ts +31 -7
- package/src/mermaid/DfkMermaid.css +326 -0
- package/src/mermaid/DfkMermaid.ts +411 -0
- package/src/mermaid/config.ts +74 -0
- package/src/mermaid/remark.ts +98 -0
- package/src/mermaid/render.ts +172 -0
- package/src/mermaid/styles.ts +24 -0
- package/src/panzoom-view.ts +235 -0
- package/src/register.ts +3 -0
- package/src/remark.ts +1 -1
- package/src/source-dialog.ts +126 -0
- package/src/sql/DfkSql.css +13 -10
- package/src/sql/DfkSql.ts +60 -51
- package/src/sql/PreviewTabs.ts +98 -52
- package/src/sql/SvgViewer.ts +155 -0
- package/src/sql/remark.ts +6 -1
- package/src/sql/renderers.ts +433 -159
- package/src/sql/sql.css +189 -19
- package/dist/sql/editor.d.ts +0 -16
- package/src/sql/editor.ts +0 -75
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "./runtimeConfig-Bokbb8VH.js";
|
|
2
|
+
import c from "filenamify";
|
|
2
3
|
//#region src/dom.ts
|
|
3
|
-
var
|
|
4
|
-
function
|
|
4
|
+
var l = typeof HTMLElement < "u" ? HTMLElement : class {};
|
|
5
|
+
function u(e, t, n) {
|
|
5
6
|
let r = document.createElement(e), i = typeof t == "function" ? t : n;
|
|
6
7
|
if (typeof t != "function" && t) {
|
|
7
8
|
let { class: e, text: n, attrs: i, ...a } = t;
|
|
@@ -13,22 +14,22 @@ function l(e, t, n) {
|
|
|
13
14
|
}
|
|
14
15
|
//#endregion
|
|
15
16
|
//#region src/home/home.css?inline
|
|
16
|
-
var
|
|
17
|
-
function
|
|
18
|
-
return
|
|
17
|
+
var d = ":host{display:block}*,:before,:after{box-sizing:border-box}.dfk-hero{isolation:isolate;text-align:center;padding:4.5rem 1.5rem 4rem;position:relative;overflow-x:clip}.dfk-hero:before,.dfk-hero:after{content:\"\";z-index:-1;pointer-events:none;border-radius:50%;position:absolute}.dfk-hero:before{background:radial-gradient(circle, var(--duckfn-glow), transparent 70%);width:52rem;height:52rem;top:-18rem;left:50%;transform:translate(-50%)}.dfk-hero:after{background:radial-gradient(circle, var(--duckfn-glow-warm), transparent 70%);width:34rem;height:34rem;bottom:-14rem;right:-10rem}.dfk-hero-inner{max-width:46rem;margin:0 auto}.dfk-logo-stage{line-height:0;display:inline-block}.dfk-logo{width:clamp(7rem,16vw,10rem);height:auto;filter:drop-shadow(0 14px 28px var(--duckfn-glow));display:block}.dfk-title{letter-spacing:-.02em;color:var(--duckfn-blue);margin:1.5rem 0 0;font-size:clamp(2.25rem,5vw,3.25rem);font-weight:700;line-height:1.1}@supports ((-webkit-background-clip:text) or (background-clip:text)){.dfk-title{background-image:linear-gradient(120deg, var(--duckfn-blue-deep), var(--duckfn-blue-bright));color:#0000;-webkit-background-clip:text;background-clip:text;padding-bottom:.06em}}.dfk-title:after{content:\"\";background-color:var(--duckfn-yellow);border-radius:999px;width:3rem;height:.25rem;margin:1rem auto 0;display:block}.dfk-tagline{max-width:34rem;color:var(--ifm-color-emphasis-700);margin:1.25rem auto 0;font-size:clamp(1.05rem,2.2vw,1.25rem);line-height:1.65}.dfk-actions{flex-wrap:wrap;justify-content:center;gap:.75rem 1rem;margin-top:2.25rem;display:flex}.dfk-button-primary,.dfk-button-secondary{transition:background-color .2s var(--ifm-transition-timing-default), border-color .2s var(--ifm-transition-timing-default), color .2s var(--ifm-transition-timing-default), box-shadow .2s var(--ifm-transition-timing-default);border:1px solid #0000;border-radius:999px;justify-content:center;align-items:center;gap:.5rem;padding:.7rem 1.6rem;font-size:1rem;font-weight:600;line-height:1.4;text-decoration:none;display:inline-flex}.dfk-button-primary{background-color:var(--duckfn-btn-bg);border-color:var(--duckfn-btn-bg);color:var(--duckfn-btn-fg)}.dfk-button-primary:hover,.dfk-button-primary:focus-visible{background-color:var(--duckfn-btn-bg-hover);border-color:var(--duckfn-btn-bg-hover);color:var(--duckfn-btn-fg);box-shadow:var(--duckfn-shadow);text-decoration:none}.dfk-button-secondary{border-color:var(--duckfn-outline-border);color:var(--duckfn-blue);background-color:#0000}.dfk-button-secondary:hover,.dfk-button-secondary:focus-visible{background-color:var(--duckfn-blue-soft);border-color:var(--duckfn-blue);color:var(--duckfn-blue);text-decoration:none}.dfk-button-icon{font-size:1.125rem}.dfk-badges{flex-wrap:wrap;justify-content:center;align-items:center;gap:.5rem;margin-top:2rem;display:flex}.dfk-badge{display:inline-flex}.dfk-badge-image{width:auto;height:20px;display:block}.dfk-section{padding:4.5rem 0}.dfk-section-inner{max-width:72rem;margin:0 auto;padding:0 1.5rem}.dfk-section-title{text-align:center;letter-spacing:-.01em;margin-bottom:0;font-size:clamp(1.5rem,3vw,2rem)}.dfk-feature-grid{grid-template-columns:repeat(auto-fit,minmax(min(17rem,100%),1fr));gap:1.25rem;margin-top:2.75rem;display:grid}.dfk-feature-card{border:1px solid var(--duckfn-card-border);background-color:var(--duckfn-card-bg);transition:border-color .2s var(--ifm-transition-timing-default), box-shadow .2s var(--ifm-transition-timing-default);border-radius:1rem;flex-direction:column;padding:1.5rem;display:flex}.dfk-feature-card:hover{border-color:var(--duckfn-blue);box-shadow:var(--duckfn-shadow)}.dfk-feature-icon-chip{background-color:var(--duckfn-blue-soft);width:2.5rem;height:2.5rem;color:var(--duckfn-blue);border-radius:.75rem;justify-content:center;align-items:center;margin-bottom:1rem;display:inline-flex}.dfk-feature-icon{font-size:1.375rem}.dfk-feature-title{margin-bottom:.5rem;font-size:1.0625rem;font-weight:600}.dfk-feature-details{color:var(--ifm-color-emphasis-700);margin-bottom:0;font-size:.9375rem;line-height:1.7}.dfk-next-grid{grid-template-columns:repeat(auto-fit,minmax(min(20rem,100%),1fr));gap:1rem;max-width:54rem;margin:2.75rem auto 0;display:grid}.dfk-next-card{border:1px solid var(--duckfn-card-border);background-color:var(--duckfn-card-bg);color:inherit;transition:border-color .2s var(--ifm-transition-timing-default), box-shadow .2s var(--ifm-transition-timing-default);border-radius:.875rem;align-items:center;gap:1rem;padding:1.25rem 1.375rem;text-decoration:none;display:flex}.dfk-next-card:hover,.dfk-next-card:focus-visible{border-color:var(--duckfn-blue);box-shadow:var(--duckfn-shadow);color:inherit;text-decoration:none}.dfk-next-card-body{flex-direction:column;flex:1;gap:.25rem;min-width:0;display:flex}.dfk-next-card-title{color:var(--duckfn-blue);font-size:1rem;font-weight:600}.dfk-next-card-details{color:var(--ifm-color-emphasis-700);font-size:.9rem;line-height:1.6}.dfk-next-card-arrow{color:var(--ifm-color-emphasis-500);transition:color .2s var(--ifm-transition-timing-default);flex-shrink:0;font-size:1.25rem}.dfk-next-card:hover .dfk-next-card-arrow,.dfk-next-card:focus-visible .dfk-next-card-arrow{color:var(--duckfn-blue)}@media (prefers-reduced-motion:no-preference){.dfk-logo-stage,.dfk-title,.dfk-tagline,.dfk-actions,.dfk-badges{animation:dfk-rise .6s var(--ifm-transition-timing-default) backwards}.dfk-title{animation-delay:60ms}.dfk-tagline{animation-delay:.12s}.dfk-actions{animation-delay:.18s}.dfk-badges{animation-delay:.24s}.dfk-logo{will-change:transform;animation:7s ease-in-out infinite dfk-float}.dfk-feature-card,.dfk-next-card{animation:dfk-rise .5s var(--ifm-transition-timing-default) backwards}.dfk-feature-card:nth-child(2),.dfk-next-card:nth-child(2){animation-delay:60ms}.dfk-feature-card:nth-child(3),.dfk-next-card:nth-child(3){animation-delay:.12s}.dfk-feature-card:nth-child(4),.dfk-next-card:nth-child(4){animation-delay:.18s}.dfk-feature-card:nth-child(5){animation-delay:.24s}.dfk-feature-card:nth-child(6){animation-delay:.3s}.dfk-feature-card,.dfk-next-card,.dfk-next-card-arrow{transition:transform .2s var(--ifm-transition-timing-default), border-color .2s var(--ifm-transition-timing-default), box-shadow .2s var(--ifm-transition-timing-default), color .2s var(--ifm-transition-timing-default)}.dfk-feature-card:hover{transform:translateY(-4px)}.dfk-next-card:hover{transform:translateY(-2px)}.dfk-next-card:hover .dfk-next-card-arrow{transform:translate(4px)}}@keyframes dfk-rise{0%{opacity:0;transform:translateY(14px)}to{opacity:1;transform:translateY(0)}}@keyframes dfk-float{0%,to{transform:translateY(-4px)}50%{transform:translateY(4px)}}@media screen and (max-width:996px){.dfk-hero{padding:3rem 1.5rem}.dfk-section{padding:3.5rem 0}}@media screen and (max-width:576px){.dfk-section-inner{padding:0 1rem}.dfk-actions{flex-direction:column;align-items:stretch}}", f = null;
|
|
18
|
+
function p() {
|
|
19
|
+
return f || (f = new CSSStyleSheet(), f.replaceSync(d)), f;
|
|
19
20
|
}
|
|
20
21
|
//#endregion
|
|
21
22
|
//#region src/home/DfkFeatures.ts
|
|
22
|
-
var
|
|
23
|
-
#e =
|
|
24
|
-
#t =
|
|
25
|
-
#n =
|
|
26
|
-
#r =
|
|
23
|
+
var m = class extends l {
|
|
24
|
+
#e = u("section", { class: "dfk-section" });
|
|
25
|
+
#t = u("div", { class: "dfk-section-inner" });
|
|
26
|
+
#n = u("h2", { class: "dfk-section-title" });
|
|
27
|
+
#r = u("div", { class: "dfk-feature-grid" });
|
|
27
28
|
#i = [];
|
|
28
29
|
constructor() {
|
|
29
30
|
super(), this.#t.append(this.#n, this.#r), this.#e.appendChild(this.#t);
|
|
30
31
|
let e = this.attachShadow({ mode: "open" });
|
|
31
|
-
e.adoptedStyleSheets = [
|
|
32
|
+
e.adoptedStyleSheets = [p()], e.appendChild(this.#e);
|
|
32
33
|
}
|
|
33
34
|
setSectionTitle(e) {
|
|
34
35
|
this.#n.textContent = e;
|
|
@@ -36,52 +37,52 @@ var p = class extends c {
|
|
|
36
37
|
setFeatures(e) {
|
|
37
38
|
for (; this.#i.length > e.length;) this.#i.pop()?.root.remove();
|
|
38
39
|
for (; this.#i.length < e.length;) {
|
|
39
|
-
let e = new
|
|
40
|
+
let e = new ee();
|
|
40
41
|
this.#i.push(e), this.#r.appendChild(e.root);
|
|
41
42
|
}
|
|
42
43
|
e.forEach((e, t) => this.#i[t].setFeature(e));
|
|
43
44
|
}
|
|
44
|
-
},
|
|
45
|
-
root =
|
|
46
|
-
#e =
|
|
45
|
+
}, ee = class {
|
|
46
|
+
root = u("article", { class: "dfk-feature-card" });
|
|
47
|
+
#e = u("iconify-icon", {
|
|
47
48
|
class: "dfk-feature-icon",
|
|
48
49
|
attrs: { "aria-hidden": "true" }
|
|
49
50
|
});
|
|
50
|
-
#t =
|
|
51
|
-
#n =
|
|
51
|
+
#t = u("h3", { class: "dfk-feature-title" });
|
|
52
|
+
#n = u("p", { class: "dfk-feature-details" });
|
|
52
53
|
constructor() {
|
|
53
|
-
this.root.append(
|
|
54
|
+
this.root.append(u("span", { class: "dfk-feature-icon-chip" }, (e) => e.appendChild(this.#e)), this.#t, this.#n);
|
|
54
55
|
}
|
|
55
56
|
setFeature(e) {
|
|
56
57
|
this.#e.setAttribute("icon", e.icon), this.#t.textContent = e.title, this.#n.textContent = e.details;
|
|
57
58
|
}
|
|
58
|
-
},
|
|
59
|
-
#e =
|
|
60
|
-
#t =
|
|
61
|
-
#n =
|
|
62
|
-
#r =
|
|
59
|
+
}, te = class extends l {
|
|
60
|
+
#e = u("section", { class: "dfk-hero" });
|
|
61
|
+
#t = u("div", { class: "dfk-hero-inner" });
|
|
62
|
+
#n = u("span", { class: "dfk-logo-stage" });
|
|
63
|
+
#r = u("img", {
|
|
63
64
|
class: "dfk-logo",
|
|
64
65
|
alt: "",
|
|
65
66
|
width: 480,
|
|
66
67
|
height: 480
|
|
67
68
|
});
|
|
68
|
-
#i =
|
|
69
|
-
#a =
|
|
70
|
-
#o =
|
|
71
|
-
#s =
|
|
72
|
-
#c =
|
|
73
|
-
#l =
|
|
74
|
-
#u =
|
|
69
|
+
#i = u("h1", { class: "dfk-title" });
|
|
70
|
+
#a = u("p", { class: "dfk-tagline" });
|
|
71
|
+
#o = u("div", { class: "dfk-actions" });
|
|
72
|
+
#s = u("a", { class: "dfk-button-primary" });
|
|
73
|
+
#c = u("span");
|
|
74
|
+
#l = u("a", { class: "dfk-button-secondary" });
|
|
75
|
+
#u = u("iconify-icon", {
|
|
75
76
|
class: "dfk-button-icon",
|
|
76
77
|
attrs: { "aria-hidden": "true" }
|
|
77
78
|
});
|
|
78
|
-
#d =
|
|
79
|
-
#f =
|
|
79
|
+
#d = u("span");
|
|
80
|
+
#f = u("div", { class: "dfk-badges" });
|
|
80
81
|
#p = [];
|
|
81
82
|
constructor() {
|
|
82
83
|
super(), this.#n.appendChild(this.#r), this.#s.appendChild(this.#c), this.#l.append(this.#u, this.#d), this.#o.append(this.#s, this.#l), this.#t.append(this.#n, this.#i, this.#a, this.#o, this.#f), this.#e.appendChild(this.#t);
|
|
83
84
|
let e = this.attachShadow({ mode: "open" });
|
|
84
|
-
e.adoptedStyleSheets = [
|
|
85
|
+
e.adoptedStyleSheets = [p()], e.appendChild(this.#e);
|
|
85
86
|
}
|
|
86
87
|
setLogo(e) {
|
|
87
88
|
this.#r.src = e;
|
|
@@ -101,12 +102,12 @@ var p = class extends c {
|
|
|
101
102
|
setBadges(e) {
|
|
102
103
|
for (; this.#p.length > e.length;) this.#p.pop()?.remove();
|
|
103
104
|
for (; this.#p.length < e.length;) {
|
|
104
|
-
let e =
|
|
105
|
+
let e = u("a", {
|
|
105
106
|
class: "dfk-badge",
|
|
106
107
|
target: "_blank",
|
|
107
108
|
rel: "noopener noreferrer"
|
|
108
109
|
});
|
|
109
|
-
e.appendChild(
|
|
110
|
+
e.appendChild(u("img", { class: "dfk-badge-image" })), this.#p.push(e), this.#f.appendChild(e);
|
|
110
111
|
}
|
|
111
112
|
e.forEach((e, t) => {
|
|
112
113
|
let n = this.#p[t];
|
|
@@ -118,16 +119,492 @@ var p = class extends c {
|
|
|
118
119
|
#m(e, t, n, r) {
|
|
119
120
|
e.href = n.href, t.textContent = n.label, r ? (e.target = "_blank", e.rel = "noopener noreferrer") : (e.removeAttribute("target"), e.removeAttribute("rel"));
|
|
120
121
|
}
|
|
121
|
-
},
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
122
|
+
}, h = class {
|
|
123
|
+
root = u("button", {
|
|
124
|
+
class: "dfk-icon-button",
|
|
125
|
+
type: "button"
|
|
126
|
+
});
|
|
127
|
+
#e = u("iconify-icon", {
|
|
128
|
+
class: "dfk-icon",
|
|
129
|
+
attrs: { "aria-hidden": "true" }
|
|
130
|
+
});
|
|
131
|
+
constructor(e, t) {
|
|
132
|
+
this.root.appendChild(this.#e), this.root.addEventListener("click", t), this.setIcon(e);
|
|
133
|
+
}
|
|
134
|
+
setIcon(e) {
|
|
135
|
+
this.#e.setAttribute("icon", e);
|
|
136
|
+
}
|
|
137
|
+
setLabel(e) {
|
|
138
|
+
this.root.setAttribute("data-tip", e), this.root.setAttribute("aria-label", e);
|
|
139
|
+
}
|
|
140
|
+
setOn(e) {
|
|
141
|
+
this.root.classList.toggle("dfk-icon-on", e);
|
|
142
|
+
}
|
|
143
|
+
setDisabled(e) {
|
|
144
|
+
e ? this.root.setAttribute("disabled", "") : this.root.removeAttribute("disabled");
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
//#endregion
|
|
148
|
+
//#region src/download.ts
|
|
149
|
+
function g(e) {
|
|
150
|
+
let t = new Blob([e.text], { type: e.mime }), n = URL.createObjectURL(t), r = u("a", {
|
|
151
|
+
href: n,
|
|
152
|
+
download: e.name
|
|
153
|
+
});
|
|
154
|
+
document.body.appendChild(r), r.click(), r.remove(), window.setTimeout(() => URL.revokeObjectURL(n), 0);
|
|
155
|
+
}
|
|
156
|
+
var _ = "diagram", ne = 80, v = "-", re = /^[\s\p{Cf}]+|[\s\p{Cf}]+$/gu;
|
|
157
|
+
function ie(e) {
|
|
158
|
+
return e === void 0 ? "" : e.replace(re, "");
|
|
159
|
+
}
|
|
160
|
+
function y(e, t, n = {}) {
|
|
161
|
+
let r = [
|
|
162
|
+
n.source === void 0 ? void 0 : ae(n.source),
|
|
163
|
+
se(e),
|
|
164
|
+
e.ownerDocument.title
|
|
165
|
+
].map(ie).find((e) => e !== "");
|
|
166
|
+
return r === void 0 ? `${n.fallback ?? _}.${t}` : `${c(r, {
|
|
167
|
+
replacement: v,
|
|
168
|
+
maxLength: ne
|
|
169
|
+
})}.${t}`;
|
|
170
|
+
}
|
|
171
|
+
function ae(e) {
|
|
172
|
+
let t = /^---\r?\n([\s\S]*?)\r?\n---/.exec(e.trimStart())?.[1];
|
|
173
|
+
if (t === void 0) return;
|
|
174
|
+
let n = /^title\s*:\s*(.+)$/m.exec(t)?.[1];
|
|
175
|
+
return n === void 0 ? void 0 : oe(n.trim());
|
|
176
|
+
}
|
|
177
|
+
function oe(e) {
|
|
178
|
+
let t = e[0];
|
|
179
|
+
return (t === "\"" || t === "'") && e.endsWith(t) ? e.slice(1, -1) : e;
|
|
180
|
+
}
|
|
181
|
+
function se(e) {
|
|
182
|
+
let t = e.closest("article") ?? e.ownerDocument, n;
|
|
183
|
+
for (let r of t.querySelectorAll("h1, h2, h3, h4, h5, h6")) {
|
|
184
|
+
if (!(r.compareDocumentPosition(e) & Node.DOCUMENT_POSITION_FOLLOWING)) break;
|
|
185
|
+
let t = r.textContent?.trim();
|
|
186
|
+
t && (n = t);
|
|
187
|
+
}
|
|
188
|
+
return n;
|
|
189
|
+
}
|
|
190
|
+
//#endregion
|
|
191
|
+
//#region src/panzoom-view.ts
|
|
192
|
+
var ce = 1, le = 8, ue = .25, de = null;
|
|
193
|
+
function fe() {
|
|
194
|
+
return de ??= import("@panzoom/panzoom").then((e) => e.default), de;
|
|
195
|
+
}
|
|
196
|
+
var pe = class {
|
|
197
|
+
#e;
|
|
198
|
+
#t;
|
|
199
|
+
#n = null;
|
|
200
|
+
#r = !1;
|
|
201
|
+
#i = !1;
|
|
202
|
+
#a = !1;
|
|
203
|
+
#o = (e) => {
|
|
204
|
+
this.#n?.zoomWithWheel(e);
|
|
205
|
+
};
|
|
206
|
+
#s = () => {
|
|
207
|
+
this.#e.classList.toggle("dfk-panzoom-zoomed", this.zoomed);
|
|
208
|
+
};
|
|
209
|
+
#c = () => {
|
|
210
|
+
this.#e.classList.toggle("dfk-panzoom-grabbing", this.zoomed);
|
|
211
|
+
};
|
|
212
|
+
#l = () => {
|
|
213
|
+
this.#e.classList.remove("dfk-panzoom-grabbing");
|
|
214
|
+
};
|
|
215
|
+
constructor(e, t) {
|
|
216
|
+
this.#e = e, this.#t = t, t.addEventListener("panzoomchange", this.#s), t.addEventListener("panzoomstart", this.#c), t.addEventListener("panzoomend", this.#l);
|
|
217
|
+
}
|
|
218
|
+
get zoomed() {
|
|
219
|
+
return (this.#n?.getScale() ?? ce) > ce;
|
|
220
|
+
}
|
|
221
|
+
setContent(e) {
|
|
222
|
+
this.#t.replaceChildren(...e ? [e] : []), this.reset();
|
|
223
|
+
}
|
|
224
|
+
setActive(e) {
|
|
225
|
+
e !== this.#i && (this.#i = e, e ? this.#u() : (this.reset(), this.#d(!1), this.#m()));
|
|
226
|
+
}
|
|
227
|
+
reset() {
|
|
228
|
+
this.#n?.reset({ animate: !me() });
|
|
229
|
+
}
|
|
230
|
+
destroy() {
|
|
231
|
+
this.#i = !1, this.#m(), this.#n?.destroy(), this.#n = null, this.#e.classList.remove("dfk-panzoom-zoomed", "dfk-panzoom-grabbing");
|
|
232
|
+
}
|
|
233
|
+
async #u() {
|
|
234
|
+
if (this.#n !== null) {
|
|
235
|
+
this.#d(!0), this.#p();
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
if (!this.#r) {
|
|
239
|
+
this.#r = !0;
|
|
240
|
+
try {
|
|
241
|
+
let e = await fe();
|
|
242
|
+
if (!this.#i || this.#n !== null) return;
|
|
243
|
+
this.#n = e(this.#t, {
|
|
244
|
+
maxScale: le,
|
|
245
|
+
minScale: ce,
|
|
246
|
+
step: ue,
|
|
247
|
+
panOnlyWhenZoomed: !0,
|
|
248
|
+
touchAction: "pan-y",
|
|
249
|
+
cursor: "",
|
|
250
|
+
disablePan: !1,
|
|
251
|
+
disableZoom: !1,
|
|
252
|
+
handleStartEvent: (e) => {
|
|
253
|
+
this.zoomed && (e.preventDefault(), e.stopPropagation());
|
|
254
|
+
}
|
|
255
|
+
}), this.#f(), this.#p();
|
|
256
|
+
} catch {} finally {
|
|
257
|
+
this.#r = !1;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
#d(e) {
|
|
262
|
+
this.#n !== null && (this.#n.setOptions({
|
|
263
|
+
disablePan: !e,
|
|
264
|
+
disableZoom: !e
|
|
265
|
+
}), this.#f());
|
|
266
|
+
}
|
|
267
|
+
#f() {
|
|
268
|
+
this.#t.style.userSelect = "", this.#e.style.userSelect = "";
|
|
269
|
+
}
|
|
270
|
+
#p() {
|
|
271
|
+
this.#a || (this.#a = !0, this.#e.addEventListener("wheel", this.#o, { passive: !1 }));
|
|
272
|
+
}
|
|
273
|
+
#m() {
|
|
274
|
+
this.#a && (this.#a = !1, this.#e.removeEventListener("wheel", this.#o));
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
function me() {
|
|
278
|
+
return window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
279
|
+
}
|
|
280
|
+
//#endregion
|
|
281
|
+
//#region src/codemirror.ts
|
|
282
|
+
async function he(e, t, n, r = {}) {
|
|
283
|
+
let [{ basicSetup: i }, { EditorView: a, keymap: o }, { defaultKeymap: s, historyKeymap: c }, { Compartment: l }] = await Promise.all([
|
|
284
|
+
import("codemirror"),
|
|
285
|
+
import("@codemirror/view"),
|
|
286
|
+
import("@codemirror/commands"),
|
|
287
|
+
import("@codemirror/state")
|
|
288
|
+
]), u = r.language === "sql" ? [(await import("@codemirror/lang-sql")).sql()] : [], d = new l(), f = new a({
|
|
289
|
+
doc: t,
|
|
290
|
+
extensions: [
|
|
291
|
+
i,
|
|
292
|
+
...u,
|
|
293
|
+
o.of([...s, ...c]),
|
|
294
|
+
d.of([]),
|
|
295
|
+
a.updateListener.of((e) => {
|
|
296
|
+
e.docChanged && n(e.state.doc.toString());
|
|
297
|
+
})
|
|
298
|
+
],
|
|
299
|
+
parent: e,
|
|
300
|
+
root: e.getRootNode()
|
|
301
|
+
});
|
|
302
|
+
return {
|
|
303
|
+
getValue: () => f.state.doc.toString(),
|
|
304
|
+
setValue: (e) => f.dispatch({ changes: {
|
|
305
|
+
from: 0,
|
|
306
|
+
to: f.state.doc.length,
|
|
307
|
+
insert: e
|
|
308
|
+
} }),
|
|
309
|
+
setWrap: (e) => f.dispatch({ effects: d.reconfigure(e ? a.lineWrapping : []) }),
|
|
310
|
+
destroy: () => f.destroy()
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
//#endregion
|
|
314
|
+
//#region src/source-dialog.ts
|
|
315
|
+
var ge = class {
|
|
316
|
+
root = u("dialog", { class: "dfk-source-dialog" });
|
|
317
|
+
#e = u("h2", { class: "dfk-source-dialog-title" });
|
|
318
|
+
#t = u("div", { class: "dfk-source-dialog-editor" });
|
|
319
|
+
#n = u("button", {
|
|
320
|
+
class: "dfk-source-dialog-button dfk-source-dialog-apply",
|
|
321
|
+
type: "button"
|
|
322
|
+
});
|
|
323
|
+
#r = u("button", {
|
|
324
|
+
class: "dfk-source-dialog-button",
|
|
325
|
+
type: "button"
|
|
326
|
+
});
|
|
327
|
+
#i = "";
|
|
328
|
+
#a = null;
|
|
329
|
+
#o = null;
|
|
330
|
+
#s = !1;
|
|
331
|
+
constructor(e) {
|
|
332
|
+
this.#n.addEventListener("click", () => this.#l()), this.#r.addEventListener("click", () => this.root.close()), this.root.append(u("div", { class: "dfk-source-dialog-body" }, (e) => e.append(this.#e, this.#t, u("div", { class: "dfk-source-dialog-footer" }, (e) => e.append(this.#r, this.#n))))), this.setLabels(e);
|
|
333
|
+
}
|
|
334
|
+
setLabels(e) {
|
|
335
|
+
this.#e.textContent = e.title, this.#r.textContent = e.cancel, this.#n.textContent = e.apply;
|
|
336
|
+
}
|
|
337
|
+
open(e, t) {
|
|
338
|
+
if (this.#i = e, this.#a = t, this.root.showModal(), this.#o) {
|
|
339
|
+
this.#o.setValue(e);
|
|
340
|
+
return;
|
|
341
|
+
}
|
|
342
|
+
this.#c();
|
|
343
|
+
}
|
|
344
|
+
destroy() {
|
|
345
|
+
this.#o?.destroy(), this.#o = null, this.root.open && this.root.close();
|
|
346
|
+
}
|
|
347
|
+
async #c() {
|
|
348
|
+
if (!this.#s) {
|
|
349
|
+
this.#s = !0;
|
|
350
|
+
try {
|
|
351
|
+
let e = await he(this.#t, this.#i, () => void 0);
|
|
352
|
+
if (!this.root.isConnected || !this.root.open) {
|
|
353
|
+
e.destroy();
|
|
354
|
+
return;
|
|
355
|
+
}
|
|
356
|
+
e.setWrap(!0), this.#o = e;
|
|
357
|
+
} catch {} finally {
|
|
358
|
+
this.#s = !1;
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
#l() {
|
|
363
|
+
let e = this.#o?.getValue();
|
|
364
|
+
this.root.close(), e !== void 0 && e !== this.#i && (this.#i = e, this.#a?.(e));
|
|
365
|
+
}
|
|
366
|
+
}, b = {
|
|
367
|
+
theme: {
|
|
368
|
+
light: "redux-color",
|
|
369
|
+
dark: "redux-dark-color"
|
|
370
|
+
},
|
|
371
|
+
options: { look: "neo" }
|
|
372
|
+
};
|
|
373
|
+
function x(e) {
|
|
374
|
+
return {
|
|
375
|
+
theme: {
|
|
376
|
+
light: e?.theme?.light ?? b.theme.light,
|
|
377
|
+
dark: e?.theme?.dark ?? b.theme.dark
|
|
378
|
+
},
|
|
379
|
+
options: {
|
|
380
|
+
...b.options,
|
|
381
|
+
...e?.options
|
|
382
|
+
}
|
|
383
|
+
};
|
|
384
|
+
}
|
|
385
|
+
function _e(e) {
|
|
386
|
+
if (!e) return x();
|
|
387
|
+
try {
|
|
388
|
+
return x(JSON.parse(e));
|
|
389
|
+
} catch {
|
|
390
|
+
return x();
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
//#endregion
|
|
394
|
+
//#region src/mermaid/render.ts
|
|
395
|
+
var ve = Promise.resolve();
|
|
396
|
+
function ye(e) {
|
|
397
|
+
let t = ve.then(e, e);
|
|
398
|
+
return ve = t.catch(() => void 0), t;
|
|
399
|
+
}
|
|
400
|
+
var be = null;
|
|
401
|
+
function xe() {
|
|
402
|
+
return be ??= import("mermaid").then((e) => e.default), be;
|
|
403
|
+
}
|
|
404
|
+
var Se = 0;
|
|
405
|
+
function Ce({ source: e, config: t, colorMode: n }) {
|
|
406
|
+
let r = `dfk-mermaid-svg-${Se += 1}`;
|
|
407
|
+
return ye(async () => {
|
|
408
|
+
let i = await xe(), a = {
|
|
409
|
+
startOnLoad: !1,
|
|
410
|
+
...t.options,
|
|
411
|
+
theme: t.theme[n]
|
|
412
|
+
};
|
|
413
|
+
i.initialize(a);
|
|
414
|
+
try {
|
|
415
|
+
let t = await i.render(r, e);
|
|
416
|
+
return {
|
|
417
|
+
svg: t.svg,
|
|
418
|
+
bind: t.bindFunctions
|
|
419
|
+
};
|
|
420
|
+
} catch (e) {
|
|
421
|
+
throw document.querySelector(`#d${r}`)?.remove(), e;
|
|
422
|
+
}
|
|
423
|
+
});
|
|
424
|
+
}
|
|
425
|
+
function we() {
|
|
426
|
+
return document.documentElement.getAttribute("data-theme") === "dark" ? "dark" : "light";
|
|
427
|
+
}
|
|
428
|
+
function Te(e) {
|
|
429
|
+
let t = new MutationObserver(e);
|
|
430
|
+
return t.observe(document.documentElement, { attributeFilter: ["data-theme"] }), () => t.disconnect();
|
|
431
|
+
}
|
|
432
|
+
function Ee(e, t) {
|
|
433
|
+
let n = new DOMParser().parseFromString(t, "text/html").body.querySelector("svg");
|
|
434
|
+
return n ? e.importNode(n, !0) : null;
|
|
435
|
+
}
|
|
436
|
+
function De(e) {
|
|
437
|
+
return new XMLSerializer().serializeToString(e);
|
|
438
|
+
}
|
|
439
|
+
//#endregion
|
|
440
|
+
//#region src/mermaid/DfkMermaid.css?inline
|
|
441
|
+
var Oe = "*,:before,:after{box-sizing:border-box}:host{margin:1rem 0;display:block}:host([embedded]){margin:0}.dfk-mermaid-canvas{position:relative}.dfk-mermaid-viewport{border:1px solid var(--ifm-global-border-color,#e0e0e0);border-radius:var(--ifm-global-radius,.4rem);background:var(--ifm-background-surface-color,#fff);padding:.75rem;overflow:hidden}:host([embedded]) .dfk-mermaid-viewport{border:none;border-radius:0;padding:0}:host(.dfk-mermaid-fullscreen),:host(.dfk-mermaid-fullscreen) .dfk-mermaid-canvas,:host(.dfk-mermaid-fullscreen) .dfk-mermaid-viewport{height:100%}.dfk-mermaid-content>svg{max-width:100%;height:auto;margin:0 auto;display:block}.dfk-mermaid-viewport.dfk-panzoom-zoomed{cursor:grab}.dfk-mermaid-viewport.dfk-panzoom-zoomed.dfk-panzoom-grabbing{cursor:grabbing}.dfk-mermaid-message{color:var(--ifm-color-emphasis-700,#666);margin:.5rem 0 0;font-size:.8rem}.dfk-mermaid-message:empty{display:none}.dfk-mermaid-message-error{border-radius:var(--ifm-global-radius,.25rem);color:var(--ifm-color-danger-contrast,#fff);background:var(--ifm-color-danger,#d32f2f);font-family:var(--ifm-font-family-monospace,ui-monospace, SFMono-Regular, Menlo, monospace);font-size:var(--ifm-code-font-size,95%);white-space:pre-wrap;word-break:break-word;padding:.5rem .75rem}.dfk-mermaid-canvas[hidden],.dfk-mermaid-message[hidden]{display:none}.dfk-mermaid-actions{z-index:2;border-radius:var(--ifm-global-radius,.3rem);background:var(--ifm-color-emphasis-100,#f5f5f5);opacity:0;pointer-events:none;align-items:center;gap:.15rem;padding:.1rem .2rem;transition:opacity .12s;display:flex;position:absolute;top:.25rem;right:.25rem}.dfk-mermaid-canvas:hover .dfk-mermaid-actions,.dfk-mermaid-canvas:focus-within .dfk-mermaid-actions{opacity:1;pointer-events:auto}.dfk-icon-button{border-radius:var(--ifm-global-radius,.25rem);width:1.6rem;height:1.6rem;color:var(--ifm-color-emphasis-700,#666);cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;padding:0;transition:background .12s,color .12s;display:inline-flex;position:relative}.dfk-icon-button:hover:not(:disabled),.dfk-icon-button:focus-visible{background:var(--ifm-color-emphasis-200,#e6e6e6);color:var(--ifm-color-primary,#14459b)}.dfk-icon-button:disabled{opacity:.45;cursor:progress}.dfk-icon-button[hidden]{display:none}.dfk-icon{font-size:1rem}[data-tip]:after{content:attr(data-tip);z-index:2;border-radius:var(--ifm-global-radius,.25rem);background:var(--ifm-color-emphasis-800,#333);color:var(--ifm-color-emphasis-0,#fff);white-space:nowrap;opacity:0;pointer-events:none;padding:.15rem .4rem;font-size:.7rem;line-height:1.4;transition:opacity .12s;position:absolute;top:calc(100% + .3rem);right:0}[data-tip]:hover:after,[data-tip]:focus-visible:after{opacity:1}.dfk-mermaid-expanded{z-index:2147483000;background:var(--ifm-background-surface-color,#fff);flex-direction:column;display:flex;position:fixed;inset:0}.dfk-mermaid-expanded .dfk-mermaid-viewport{border:none;border-radius:0;flex:1}.dfk-source-dialog{border:1px solid var(--ifm-global-border-color,#e0e0e0);border-radius:var(--ifm-global-radius,.4rem);background:var(--ifm-background-surface-color,#fff);width:min(56rem,92vw);max-width:none;color:var(--ifm-font-color-base,#181818);padding:0}.dfk-source-dialog::backdrop{background:#00000073}.dfk-source-dialog-body{flex-direction:column;gap:.5rem;padding:.75rem;display:flex}.dfk-source-dialog-title{margin:0;font-size:.95rem;font-weight:600}.dfk-source-dialog-editor{border:1px solid var(--ifm-global-border-color,#e0e0e0);border-radius:var(--ifm-global-radius,.4rem);background:var(--ifm-background-surface-color,#fff);font-size:var(--ifm-code-font-size,95%);overflow:hidden}.dfk-source-dialog-editor .cm-editor{outline:none}.dfk-source-dialog-editor .cm-scroller{max-height:55vh;font-family:var(--ifm-font-family-monospace,ui-monospace, SFMono-Regular, Menlo, monospace);line-height:1.6}.dfk-source-dialog-footer{justify-content:flex-end;gap:.5rem;display:flex}.dfk-source-dialog-button{border:1px solid var(--ifm-global-border-color,#e0e0e0);border-radius:var(--ifm-global-radius,.25rem);background:var(--ifm-background-surface-color,#fff);color:var(--ifm-font-color-base,#181818);cursor:pointer;padding:.3rem .9rem;font-family:inherit;font-size:.85rem}.dfk-source-dialog-button:hover{border-color:var(--ifm-color-primary,#14459b);color:var(--ifm-color-primary,#14459b)}.dfk-source-dialog-apply{border-color:var(--ifm-color-primary,#14459b);background:var(--ifm-color-primary,#14459b);color:var(--ifm-button-color,#fff)}.dfk-source-dialog-apply:hover{color:var(--ifm-button-color,#fff);filter:brightness(1.1)}", S = null;
|
|
442
|
+
function ke() {
|
|
443
|
+
return S || (S = new CSSStyleSheet(), S.replaceSync(Oe)), S;
|
|
444
|
+
}
|
|
445
|
+
//#endregion
|
|
446
|
+
//#region src/mermaid/DfkMermaid.ts
|
|
447
|
+
var C = {
|
|
448
|
+
en: {
|
|
449
|
+
reset: "Reset zoom",
|
|
450
|
+
fullscreen: "Fullscreen",
|
|
451
|
+
exitFullscreen: "Exit fullscreen",
|
|
452
|
+
edit: "Edit diagram source",
|
|
453
|
+
download: "Download SVG",
|
|
454
|
+
apply: "Apply",
|
|
455
|
+
cancel: "Cancel",
|
|
456
|
+
editTitle: "Mermaid source",
|
|
457
|
+
rendering: "Rendering diagram…",
|
|
458
|
+
renderFailed: "Could not render the diagram"
|
|
459
|
+
},
|
|
460
|
+
"zh-hans": {
|
|
461
|
+
reset: "还原缩放",
|
|
462
|
+
fullscreen: "全屏",
|
|
463
|
+
exitFullscreen: "退出全屏",
|
|
464
|
+
edit: "编辑图表源码",
|
|
465
|
+
download: "下载 SVG",
|
|
466
|
+
apply: "应用",
|
|
467
|
+
cancel: "取消",
|
|
468
|
+
editTitle: "Mermaid 源码",
|
|
469
|
+
rendering: "正在渲染图表…",
|
|
470
|
+
renderFailed: "图表渲染失败"
|
|
471
|
+
}
|
|
472
|
+
}, Ae = "mermaid-diagram", je = class extends l {
|
|
473
|
+
#e = u("div", {
|
|
474
|
+
class: "dfk-mermaid-canvas",
|
|
475
|
+
hidden: !0
|
|
476
|
+
});
|
|
477
|
+
#t = u("div", { class: "dfk-mermaid-viewport" });
|
|
478
|
+
#n = u("div", { class: "dfk-mermaid-content" });
|
|
479
|
+
#r = new pe(this.#t, this.#n);
|
|
480
|
+
#i = u("div");
|
|
481
|
+
#a = u("p", {
|
|
482
|
+
class: "dfk-mermaid-message",
|
|
483
|
+
attrs: { "aria-live": "polite" },
|
|
484
|
+
hidden: !0
|
|
485
|
+
});
|
|
486
|
+
#o = new h("lucide:rotate-ccw", () => this.#r.reset());
|
|
487
|
+
#s = new h("lucide:pencil", () => this.#N());
|
|
488
|
+
#c = null;
|
|
489
|
+
#l = null;
|
|
490
|
+
#u = new ge({
|
|
491
|
+
title: C.en.editTitle,
|
|
492
|
+
apply: C.en.apply,
|
|
493
|
+
cancel: C.en.cancel
|
|
494
|
+
});
|
|
495
|
+
#d = C.en;
|
|
496
|
+
#f = _e(null);
|
|
497
|
+
#p = "";
|
|
498
|
+
#m = !1;
|
|
499
|
+
#h = null;
|
|
500
|
+
#g = null;
|
|
501
|
+
#_ = !1;
|
|
502
|
+
#v = !1;
|
|
503
|
+
#y = !1;
|
|
504
|
+
#b = !1;
|
|
505
|
+
#x = 0;
|
|
506
|
+
#S = null;
|
|
507
|
+
#C = (e) => {
|
|
508
|
+
e.key === "Escape" && this.#v && !this.#u.root.open && this.#j(!1);
|
|
509
|
+
};
|
|
510
|
+
#w = () => {
|
|
511
|
+
we() !== this.#g && this.#O();
|
|
512
|
+
};
|
|
513
|
+
constructor() {
|
|
514
|
+
super(), this.#t.appendChild(this.#n), this.#e.appendChild(this.#t);
|
|
515
|
+
let e = this.attachShadow({ mode: "open" });
|
|
516
|
+
e.adoptedStyleSheets = [ke()], e.append(this.#e, this.#a, this.#u.root), this.#D();
|
|
517
|
+
}
|
|
518
|
+
get actions() {
|
|
519
|
+
return this.#T(), this.#i;
|
|
520
|
+
}
|
|
521
|
+
connectedCallback() {
|
|
522
|
+
this.#T(), this.#S ??= Te(this.#w), this.#p && !this.#n.hasChildNodes() && this.#O();
|
|
523
|
+
}
|
|
524
|
+
disconnectedCallback() {
|
|
525
|
+
this.#j(!1), this.#S?.(), this.#S = null, this.#r.destroy(), this.#x += 1, this.#u.destroy();
|
|
526
|
+
}
|
|
527
|
+
setFullscreen(e) {
|
|
528
|
+
this.#T(), this.#y = e, this.classList.toggle("dfk-mermaid-fullscreen", e), this.#r.setActive(e);
|
|
529
|
+
}
|
|
530
|
+
downloadPayload() {
|
|
531
|
+
return this.#h === null ? null : {
|
|
532
|
+
name: y(this, "svg", {
|
|
533
|
+
source: this.#p,
|
|
534
|
+
fallback: Ae
|
|
535
|
+
}),
|
|
536
|
+
mime: "image/svg+xml;charset=utf-8",
|
|
537
|
+
text: De(this.#h)
|
|
538
|
+
};
|
|
539
|
+
}
|
|
540
|
+
#T() {
|
|
541
|
+
this.#_ || (this.#_ = !0, this.#E());
|
|
542
|
+
}
|
|
543
|
+
#E() {
|
|
544
|
+
this.#d = C[(document.documentElement.getAttribute("lang") ?? "en").toLowerCase()] ?? C.en;
|
|
545
|
+
let e = this.getAttribute("source");
|
|
546
|
+
e !== null && (this.#p = e), this.#f = _e(this.getAttribute("config")), this.#m = this.hasAttribute("embedded"), this.#m ? (this.#i.className = "dfk-sql-tab-actions", this.#i.append(this.#o.root, this.#s.root)) : (this.#c = new h("lucide:download", () => this.#M()), this.#l = new h("lucide:maximize", () => this.#j(!this.#v)), this.#i.className = "dfk-mermaid-actions", this.#i.append(this.#o.root, this.#s.root, this.#c.root, this.#l.root), this.#e.appendChild(this.#i)), this.#D(), this.#A(!1);
|
|
547
|
+
}
|
|
548
|
+
#D() {
|
|
549
|
+
this.#o.setLabel(this.#d.reset), this.#s.setLabel(this.#d.edit), this.#c?.setLabel(this.#d.download), this.#l?.setLabel(this.#v ? this.#d.exitFullscreen : this.#d.fullscreen), this.#u.setLabels({
|
|
550
|
+
title: this.#d.editTitle,
|
|
551
|
+
apply: this.#d.apply,
|
|
552
|
+
cancel: this.#d.cancel
|
|
553
|
+
});
|
|
554
|
+
}
|
|
555
|
+
async #O() {
|
|
556
|
+
if (!this.#p) return;
|
|
557
|
+
let e = this.#x += 1, t = we();
|
|
558
|
+
this.#g = t, this.#h === null && this.#k(this.#d.rendering, !1);
|
|
559
|
+
try {
|
|
560
|
+
let n = await Ce({
|
|
561
|
+
source: this.#p,
|
|
562
|
+
config: this.#f,
|
|
563
|
+
colorMode: t
|
|
564
|
+
});
|
|
565
|
+
if (e !== this.#x || !this.isConnected) return;
|
|
566
|
+
let r = Ee(this.ownerDocument, n.svg);
|
|
567
|
+
if (!r) throw Error(this.#d.renderFailed);
|
|
568
|
+
this.#h = r, this.#r.setContent(r), n.bind?.(this.#n), this.#e.hidden = !1, this.#k("", !1), this.#A(!0);
|
|
569
|
+
} catch (t) {
|
|
570
|
+
if (e !== this.#x || !this.isConnected) return;
|
|
571
|
+
this.#h = null, this.#r.setContent(null), this.#e.hidden = !0, this.#A(!1), this.#k(`${this.#d.renderFailed}: ${Me(t)}`, !0);
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
#k(e, t) {
|
|
575
|
+
this.#a.textContent = e, this.#a.hidden = e === "", this.#a.classList.toggle("dfk-mermaid-message-error", t);
|
|
576
|
+
}
|
|
577
|
+
#A(e) {
|
|
578
|
+
this.#o.root.hidden = !e, this.#s.root.hidden = !e, this.#c && (this.#c.root.hidden = !e);
|
|
579
|
+
}
|
|
580
|
+
#j(e) {
|
|
581
|
+
this.#v = e, this.#e.classList.toggle("dfk-mermaid-expanded", e), this.#r.setActive(e), this.#l?.setIcon(e ? "lucide:minimize" : "lucide:maximize"), this.#D(), e !== this.#b && (e ? document.addEventListener("keydown", this.#C) : document.removeEventListener("keydown", this.#C), this.#b = e);
|
|
582
|
+
}
|
|
583
|
+
#M() {
|
|
584
|
+
let e = this.downloadPayload();
|
|
585
|
+
e && g(e);
|
|
586
|
+
}
|
|
587
|
+
#N() {
|
|
588
|
+
this.#u.open(this.#p, (e) => {
|
|
589
|
+
this.#p = e, this.#O();
|
|
590
|
+
});
|
|
591
|
+
}
|
|
592
|
+
};
|
|
593
|
+
function Me(e) {
|
|
594
|
+
return e instanceof Error ? e.message : String(e);
|
|
595
|
+
}
|
|
596
|
+
//#endregion
|
|
597
|
+
//#region src/home/DfkNextSteps.ts
|
|
598
|
+
var Ne = class extends l {
|
|
599
|
+
#e = u("section", { class: "dfk-section" });
|
|
600
|
+
#t = u("div", { class: "dfk-section-inner" });
|
|
601
|
+
#n = u("h2", { class: "dfk-section-title" });
|
|
602
|
+
#r = u("div", { class: "dfk-next-grid" });
|
|
126
603
|
#i = [];
|
|
127
604
|
constructor() {
|
|
128
605
|
super(), this.#t.append(this.#n, this.#r), this.#e.appendChild(this.#t);
|
|
129
606
|
let e = this.attachShadow({ mode: "open" });
|
|
130
|
-
e.adoptedStyleSheets = [
|
|
607
|
+
e.adoptedStyleSheets = [p()], e.appendChild(this.#e);
|
|
131
608
|
}
|
|
132
609
|
setSectionTitle(e) {
|
|
133
610
|
this.#n.textContent = e;
|
|
@@ -135,16 +612,16 @@ var p = class extends c {
|
|
|
135
612
|
setSteps(e) {
|
|
136
613
|
for (; this.#i.length > e.length;) this.#i.pop()?.root.remove();
|
|
137
614
|
for (; this.#i.length < e.length;) {
|
|
138
|
-
let e = new
|
|
615
|
+
let e = new Pe();
|
|
139
616
|
this.#i.push(e), this.#r.appendChild(e.root);
|
|
140
617
|
}
|
|
141
618
|
e.forEach((e, t) => this.#i[t].setStep(e));
|
|
142
619
|
}
|
|
143
|
-
},
|
|
144
|
-
root =
|
|
145
|
-
#e =
|
|
146
|
-
#t =
|
|
147
|
-
#n =
|
|
620
|
+
}, Pe = class {
|
|
621
|
+
root = u("a", { class: "dfk-next-card" });
|
|
622
|
+
#e = u("span", { class: "dfk-next-card-title" });
|
|
623
|
+
#t = u("span", { class: "dfk-next-card-details" });
|
|
624
|
+
#n = u("iconify-icon", {
|
|
148
625
|
class: "dfk-next-card-arrow",
|
|
149
626
|
attrs: {
|
|
150
627
|
icon: "lucide:arrow-right",
|
|
@@ -152,14 +629,14 @@ var p = class extends c {
|
|
|
152
629
|
}
|
|
153
630
|
});
|
|
154
631
|
constructor() {
|
|
155
|
-
this.root.append(
|
|
632
|
+
this.root.append(u("span", { class: "dfk-next-card-body" }, (e) => e.append(this.#e, this.#t)), this.#n);
|
|
156
633
|
}
|
|
157
634
|
setStep(e) {
|
|
158
635
|
this.root.href = e.href, this.#e.textContent = e.title, this.#t.textContent = e.details;
|
|
159
636
|
}
|
|
160
|
-
},
|
|
637
|
+
}, Fe = null, w = class e {
|
|
161
638
|
static getInstance() {
|
|
162
|
-
return
|
|
639
|
+
return Fe ??= new e(), Fe;
|
|
163
640
|
}
|
|
164
641
|
#e = "idle";
|
|
165
642
|
#t = "";
|
|
@@ -181,11 +658,11 @@ var p = class extends c {
|
|
|
181
658
|
if (this.#n) return this.#n;
|
|
182
659
|
let t = this.#l();
|
|
183
660
|
return t.allowUnsignedExtensions && (this.#a = !0), this.#e = "loading", this.#n = this.#u(t.preload).catch((e) => {
|
|
184
|
-
throw this.#e = "error", this.#t =
|
|
661
|
+
throw this.#e = "error", this.#t = T(e), this.#n = null, e;
|
|
185
662
|
}), this.#n;
|
|
186
663
|
}
|
|
187
664
|
#l() {
|
|
188
|
-
return this.#s ??=
|
|
665
|
+
return this.#s ??= Re(), this.#s;
|
|
189
666
|
}
|
|
190
667
|
async #u(e) {
|
|
191
668
|
let t = await import("@duckdb/duckdb-wasm");
|
|
@@ -223,7 +700,7 @@ var p = class extends c {
|
|
|
223
700
|
return {
|
|
224
701
|
columns: [],
|
|
225
702
|
rows: [],
|
|
226
|
-
error:
|
|
703
|
+
error: T(e)
|
|
227
704
|
};
|
|
228
705
|
}
|
|
229
706
|
}
|
|
@@ -254,10 +731,10 @@ var p = class extends c {
|
|
|
254
731
|
async #p(e, t) {
|
|
255
732
|
if (!r.test(e)) throw Error(`Not a valid extension name: ${e}`);
|
|
256
733
|
let n = this.#h();
|
|
257
|
-
t !== void 0 && await n.query(`INSTALL ${e} FROM ${
|
|
734
|
+
t !== void 0 && await n.query(`INSTALL ${e} FROM ${Ie(t)}`), await n.query(`LOAD ${e}`);
|
|
258
735
|
}
|
|
259
736
|
async #m(e) {
|
|
260
|
-
await this.#h().query(`LOAD '${
|
|
737
|
+
await this.#h().query(`LOAD '${Le(e)}'`);
|
|
261
738
|
}
|
|
262
739
|
#h() {
|
|
263
740
|
let e = this.#i;
|
|
@@ -265,145 +742,219 @@ var p = class extends c {
|
|
|
265
742
|
return e;
|
|
266
743
|
}
|
|
267
744
|
};
|
|
268
|
-
function
|
|
745
|
+
function Ie(e) {
|
|
269
746
|
let t = e.toLowerCase();
|
|
270
747
|
if (a.has(t)) return t;
|
|
271
748
|
if (!n.test(e)) throw Error(`Not a valid extension repository: ${e}`);
|
|
272
749
|
return `'${e}'`;
|
|
273
750
|
}
|
|
274
|
-
function
|
|
751
|
+
function Le(t) {
|
|
275
752
|
let n = i(t) ? t : new URL(t, window.location.origin).href;
|
|
276
753
|
if (!r.test(e(n))) throw Error(`An extension file must be named <extension>.duckdb_extension.wasm — the base name before the first dot is the entry symbol: ${n}`);
|
|
277
754
|
return n;
|
|
278
755
|
}
|
|
279
|
-
function
|
|
756
|
+
function Re() {
|
|
280
757
|
if (typeof document > "u") return { preload: [] };
|
|
281
758
|
let e = document.getElementById(s)?.textContent?.trim();
|
|
282
759
|
if (!e) return { preload: [] };
|
|
283
760
|
try {
|
|
284
761
|
return t(JSON.parse(e));
|
|
285
762
|
} catch (e) {
|
|
286
|
-
throw Error(`Invalid <script id="${s}"> config: ${
|
|
763
|
+
throw Error(`Invalid <script id="${s}"> config: ${T(e)}`);
|
|
287
764
|
}
|
|
288
765
|
}
|
|
289
|
-
function
|
|
766
|
+
function T(e) {
|
|
290
767
|
return e instanceof Error ? e.message : String(e);
|
|
291
768
|
}
|
|
292
769
|
//#endregion
|
|
293
770
|
//#region src/sql/PreviewTabs.ts
|
|
294
|
-
var
|
|
771
|
+
var ze = 0, Be = class {
|
|
295
772
|
#e = [];
|
|
296
773
|
#t = [];
|
|
297
774
|
#n = [];
|
|
298
775
|
#r = [];
|
|
299
|
-
#i;
|
|
300
|
-
#a
|
|
301
|
-
#o =
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
776
|
+
#i = [];
|
|
777
|
+
#a;
|
|
778
|
+
#o = 0;
|
|
779
|
+
#s = !1;
|
|
780
|
+
#c = !1;
|
|
781
|
+
constructor(e, t, n, r) {
|
|
782
|
+
let i = `dfk-sql-tabs-${ze += 1}`, a = u("div", { class: "dfk-sql-tabs" }), o = u("div", {
|
|
305
783
|
class: "dfk-sql-tab-list",
|
|
306
784
|
attrs: { role: "tablist" }
|
|
307
|
-
}), c =
|
|
308
|
-
let
|
|
785
|
+
}), s = u("div", { class: "dfk-sql-tab-corner" }), c = u("div", { class: "dfk-sql-panels" }), l = (e) => {
|
|
786
|
+
let t = this.#e.length, n = u("div", {
|
|
309
787
|
class: "dfk-sql-panel",
|
|
310
788
|
hidden: !0,
|
|
311
789
|
attrs: {
|
|
312
790
|
role: "tabpanel",
|
|
313
|
-
id: `${
|
|
314
|
-
"aria-labelledby": `${
|
|
791
|
+
id: `${i}-panel-${t}`,
|
|
792
|
+
"aria-labelledby": `${i}-tab-${t}`
|
|
315
793
|
}
|
|
316
|
-
}),
|
|
794
|
+
}), r = u("button", {
|
|
317
795
|
class: "dfk-sql-tab",
|
|
318
796
|
type: "button",
|
|
319
|
-
text: e,
|
|
320
|
-
tabIndex:
|
|
797
|
+
text: e.label,
|
|
798
|
+
tabIndex: t === 0 ? 0 : -1,
|
|
321
799
|
attrs: {
|
|
322
800
|
role: "tab",
|
|
323
|
-
id: `${
|
|
324
|
-
"aria-controls": `${
|
|
801
|
+
id: `${i}-tab-${t}`,
|
|
802
|
+
"aria-controls": `${i}-panel-${t}`,
|
|
325
803
|
"aria-selected": "false"
|
|
326
804
|
}
|
|
327
805
|
});
|
|
328
|
-
|
|
806
|
+
r.addEventListener("click", () => this.#l(t)), r.addEventListener("keydown", (e) => this.#f(e, t)), this.#e.push(r), this.#t.push(n), this.#n.push(e), this.#r.push(!1), o.appendChild(r), c.appendChild(n), e.actions && (e.actions.hidden = !0, s.appendChild(e.actions));
|
|
329
807
|
};
|
|
330
|
-
for (let e of t)
|
|
331
|
-
|
|
808
|
+
for (let e of t) l(e);
|
|
809
|
+
this.#a = new h("lucide:download", () => this.#d()), this.#a.setLabel(n), this.#a.root.hidden = !0, s.appendChild(this.#a.root), r && s.appendChild(r), a.append(o, s), e.replaceChildren(a, c), this.#l(0);
|
|
332
810
|
}
|
|
333
811
|
dispose() {
|
|
334
|
-
this.#
|
|
812
|
+
this.#c = !0;
|
|
813
|
+
for (let e of this.#i) e();
|
|
814
|
+
this.#i.length = 0;
|
|
335
815
|
for (let e of this.#t) e.replaceChildren();
|
|
336
816
|
}
|
|
337
|
-
|
|
817
|
+
setFullscreen(e) {
|
|
818
|
+
this.#s = e, this.#n[this.#o]?.setFullscreen?.(e);
|
|
819
|
+
}
|
|
820
|
+
#l(e) {
|
|
821
|
+
this.#o = e;
|
|
338
822
|
for (let t = 0; t < this.#e.length; t += 1) {
|
|
339
823
|
let n = t === e, r = this.#e[t];
|
|
340
824
|
r.classList.toggle("dfk-sql-tab-active", n), r.setAttribute("aria-selected", String(n)), r.tabIndex = n ? 0 : -1, this.#t[t].hidden = !n;
|
|
825
|
+
let i = this.#n[t].actions;
|
|
826
|
+
i && (i.hidden = !n);
|
|
341
827
|
}
|
|
342
|
-
if (this.#r[e]) return;
|
|
343
|
-
this.#r[e] = !0;
|
|
344
828
|
let t = this.#n[e];
|
|
345
|
-
t
|
|
829
|
+
this.#a.root.hidden = t.download === void 0, t.setFullscreen?.(this.#s), !this.#r[e] && (this.#r[e] = !0, this.#u(e));
|
|
346
830
|
}
|
|
347
|
-
async #
|
|
348
|
-
let t = await this.#
|
|
349
|
-
if (
|
|
350
|
-
|
|
351
|
-
|
|
831
|
+
async #u(e) {
|
|
832
|
+
let t = await this.#n[e].mount(this.#t[e]);
|
|
833
|
+
if (typeof t == "function") {
|
|
834
|
+
if (this.#c) {
|
|
835
|
+
t();
|
|
836
|
+
return;
|
|
837
|
+
}
|
|
838
|
+
this.#i.push(t);
|
|
352
839
|
}
|
|
353
|
-
this.#a = t;
|
|
354
840
|
}
|
|
355
|
-
#
|
|
841
|
+
#d() {
|
|
842
|
+
let e = this.#n[this.#o]?.download?.();
|
|
843
|
+
e && g(e);
|
|
844
|
+
}
|
|
845
|
+
#f(e, t) {
|
|
356
846
|
let n = e.key === "ArrowRight" ? 1 : e.key === "ArrowLeft" ? -1 : 0;
|
|
357
847
|
if (n === 0) return;
|
|
358
848
|
e.preventDefault();
|
|
359
849
|
let r = (t + n + this.#e.length) % this.#e.length;
|
|
360
|
-
this.#
|
|
850
|
+
this.#l(r), this.#e[r].focus();
|
|
851
|
+
}
|
|
852
|
+
}, Ve = class {
|
|
853
|
+
root = u("div", { class: "dfk-sql-svg" });
|
|
854
|
+
actions = u("div", { class: "dfk-sql-tab-actions" });
|
|
855
|
+
#e = u("div", { class: "dfk-sql-svg-content" });
|
|
856
|
+
#t = new pe(this.root, this.#e);
|
|
857
|
+
#n = new h("lucide:rotate-ccw", () => this.#t.reset());
|
|
858
|
+
#r;
|
|
859
|
+
#i;
|
|
860
|
+
#a;
|
|
861
|
+
#o = null;
|
|
862
|
+
#s;
|
|
863
|
+
constructor(e, t, n, r) {
|
|
864
|
+
this.#a = t, this.#s = r, this.#o = e, this.#r = new h("lucide:pencil", () => this.#c()), this.#i = new ge({
|
|
865
|
+
title: n.editTitle,
|
|
866
|
+
apply: n.apply,
|
|
867
|
+
cancel: n.cancel
|
|
868
|
+
}), this.#n.setLabel(n.reset), this.#r.setLabel(n.edit), this.actions.append(this.#n.root, this.#r.root), this.#t.setContent(e ?? He(t)), this.root.append(this.#e, this.#i.root);
|
|
869
|
+
}
|
|
870
|
+
setFullscreen(e) {
|
|
871
|
+
this.#t.setActive(e);
|
|
872
|
+
}
|
|
873
|
+
downloadPayload() {
|
|
874
|
+
let e = y(this.root, this.#o === null ? "txt" : "svg", { fallback: this.#s });
|
|
875
|
+
return this.#o === null ? {
|
|
876
|
+
name: e,
|
|
877
|
+
mime: "text/plain;charset=utf-8",
|
|
878
|
+
text: this.#a
|
|
879
|
+
} : {
|
|
880
|
+
name: e,
|
|
881
|
+
mime: "image/svg+xml;charset=utf-8",
|
|
882
|
+
text: new XMLSerializer().serializeToString(this.#o)
|
|
883
|
+
};
|
|
884
|
+
}
|
|
885
|
+
dispose() {
|
|
886
|
+
this.#t.destroy(), this.#i.destroy(), this.#i.root.remove();
|
|
361
887
|
}
|
|
362
|
-
|
|
888
|
+
#c() {
|
|
889
|
+
this.#i.open(this.#a, (e) => {
|
|
890
|
+
this.#a = e, this.#o = We(this.root.ownerDocument, e), this.#t.setContent(this.#o ?? He(e));
|
|
891
|
+
});
|
|
892
|
+
}
|
|
893
|
+
};
|
|
894
|
+
function He(e) {
|
|
895
|
+
return u("pre", {
|
|
896
|
+
class: "dfk-sql-text",
|
|
897
|
+
text: e
|
|
898
|
+
});
|
|
899
|
+
}
|
|
900
|
+
var Ue = "http://www.w3.org/2000/svg";
|
|
901
|
+
function We(e, t) {
|
|
902
|
+
if (!t.trim()) return null;
|
|
903
|
+
let n = new DOMParser().parseFromString(t, "image/svg+xml").documentElement;
|
|
904
|
+
return !n || n.localName === "parsererror" || n.namespaceURI !== Ue ? null : (Ge(n), e.importNode(n, !0));
|
|
905
|
+
}
|
|
906
|
+
function Ge(e) {
|
|
907
|
+
for (let t of e.querySelectorAll("script, foreignObject")) t.remove();
|
|
908
|
+
let t = (e) => {
|
|
909
|
+
for (let t of [...e.attributes]) {
|
|
910
|
+
let n = t.name.toLowerCase(), r = t.value.replace(/\s/g, "").toLowerCase();
|
|
911
|
+
(n.startsWith("on") || (n === "href" || n === "xlink:href") && r.startsWith("javascript:")) && e.removeAttribute(t.name);
|
|
912
|
+
}
|
|
913
|
+
for (let n of e.children) t(n);
|
|
914
|
+
};
|
|
915
|
+
t(e);
|
|
916
|
+
}
|
|
917
|
+
//#endregion
|
|
918
|
+
//#region src/sql/renderers.ts
|
|
919
|
+
var Ke = "allow-scripts", E = 30, qe = 32, D = {
|
|
363
920
|
copyCell: "dfk-copy-cell",
|
|
364
|
-
copyAll: "dfk-copy-all",
|
|
365
921
|
wrap: "dfk-wrap",
|
|
366
922
|
unwrap: "dfk-unwrap",
|
|
367
|
-
freeze: "dfk-freeze"
|
|
368
|
-
|
|
369
|
-
reset: "dfk-reset",
|
|
370
|
-
widthAdaptive: "dfk-width-adaptive",
|
|
371
|
-
widthStandard: "dfk-width-standard",
|
|
372
|
-
widthFill: "dfk-width-fill"
|
|
373
|
-
}, se = [
|
|
923
|
+
freeze: "dfk-freeze"
|
|
924
|
+
}, O = [
|
|
374
925
|
{
|
|
375
|
-
|
|
926
|
+
id: "dfk-width-adaptive",
|
|
376
927
|
label: "widthAdaptive",
|
|
377
928
|
widthMode: "adaptive",
|
|
378
929
|
autoFillWidth: !1,
|
|
379
930
|
fallback: "Fill the width"
|
|
380
931
|
},
|
|
381
932
|
{
|
|
382
|
-
|
|
933
|
+
id: "dfk-width-standard",
|
|
383
934
|
label: "widthStandard",
|
|
384
935
|
widthMode: "standard",
|
|
385
936
|
autoFillWidth: !1,
|
|
386
937
|
fallback: "Content widths, scroll sideways"
|
|
387
938
|
},
|
|
388
939
|
{
|
|
389
|
-
|
|
940
|
+
id: "dfk-width-fill",
|
|
390
941
|
label: "widthFill",
|
|
391
942
|
widthMode: "standard",
|
|
392
943
|
autoFillWidth: !0,
|
|
393
944
|
fallback: "Content first, fill when it fits"
|
|
394
945
|
}
|
|
395
946
|
];
|
|
396
|
-
function
|
|
397
|
-
return
|
|
947
|
+
function Je(e) {
|
|
948
|
+
return O.find((t) => t.id === e) ?? O[0];
|
|
398
949
|
}
|
|
399
|
-
var
|
|
400
|
-
function
|
|
401
|
-
return
|
|
950
|
+
var Ye;
|
|
951
|
+
function Xe(e, t) {
|
|
952
|
+
return Ye ??= new Intl.Collator(void 0, {
|
|
402
953
|
numeric: !0,
|
|
403
954
|
sensitivity: "base"
|
|
404
|
-
}),
|
|
955
|
+
}), Ye.compare(e, t);
|
|
405
956
|
}
|
|
406
|
-
function
|
|
957
|
+
function Ze(e) {
|
|
407
958
|
if (typeof e == "number") return Number.isNaN(e) ? null : e;
|
|
408
959
|
if (typeof e == "bigint") return Number(e);
|
|
409
960
|
if (e instanceof Date) {
|
|
@@ -412,56 +963,144 @@ function de(e) {
|
|
|
412
963
|
}
|
|
413
964
|
return typeof e == "boolean" ? +!!e : null;
|
|
414
965
|
}
|
|
415
|
-
function
|
|
966
|
+
function Qe(e, t, n) {
|
|
416
967
|
let r = e == null, i = t == null;
|
|
417
968
|
if (r || i) return r && i ? 0 : r ? 1 : -1;
|
|
418
|
-
let a =
|
|
419
|
-
s = a !== null && o !== null ? a === o ? 0 : a < o ? -1 : 1 :
|
|
969
|
+
let a = Ze(e), o = Ze(t), s;
|
|
970
|
+
s = a !== null && o !== null ? a === o ? 0 : a < o ? -1 : 1 : Xe(M(e), M(t));
|
|
420
971
|
let c = s === 0 ? 0 : s < 0 ? -1 : 1;
|
|
421
972
|
return c === 0 ? 0 : String(n).toLowerCase() === "desc" ? -c : c;
|
|
422
973
|
}
|
|
423
|
-
|
|
424
|
-
function me(e) {
|
|
974
|
+
function $e(e) {
|
|
425
975
|
return e instanceof Error ? e.message : String(e);
|
|
426
976
|
}
|
|
427
|
-
function
|
|
977
|
+
function et(e, t) {
|
|
428
978
|
let n = e.createElement("pre");
|
|
429
979
|
return n.className = "dfk-sql-error", n.textContent = t, n;
|
|
430
980
|
}
|
|
431
|
-
function
|
|
981
|
+
function k(e, t) {
|
|
432
982
|
return `${e.error ?? "Error"}: ${t}`;
|
|
433
983
|
}
|
|
434
|
-
|
|
984
|
+
function A(e) {
|
|
985
|
+
return /[",\r\n]/.test(e) ? `"${e.replaceAll("\"", "\"\"")}"` : e;
|
|
986
|
+
}
|
|
987
|
+
var tt = class {
|
|
435
988
|
#e;
|
|
436
989
|
#t;
|
|
437
990
|
#n;
|
|
438
991
|
#r;
|
|
439
992
|
#i;
|
|
440
|
-
#a
|
|
441
|
-
#o
|
|
442
|
-
#s
|
|
993
|
+
#a;
|
|
994
|
+
#o;
|
|
995
|
+
#s;
|
|
443
996
|
#c;
|
|
444
|
-
#l
|
|
997
|
+
#l;
|
|
445
998
|
#u;
|
|
446
|
-
#d;
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
999
|
+
#d = /* @__PURE__ */ new Set();
|
|
1000
|
+
#f = 0;
|
|
1001
|
+
#p = 0;
|
|
1002
|
+
#m;
|
|
1003
|
+
#h = O[0].id;
|
|
1004
|
+
#g = null;
|
|
1005
|
+
#_ = !1;
|
|
1006
|
+
#v;
|
|
1007
|
+
#y;
|
|
1008
|
+
constructor(e, t, n, r, i) {
|
|
1009
|
+
this.#t = t, this.#n = n, this.#r = r, this.#i = e.themes, this.#a = i, this.#o = new h("lucide:search", () => this.#S()), this.#s = u("input", {
|
|
1010
|
+
class: "dfk-sql-search-input",
|
|
1011
|
+
type: "search",
|
|
1012
|
+
hidden: !0,
|
|
1013
|
+
attrs: {
|
|
1014
|
+
placeholder: r.search ?? "Search",
|
|
1015
|
+
"aria-label": r.search ?? "Search"
|
|
1016
|
+
}
|
|
1017
|
+
}), this.#c = u("span", {
|
|
1018
|
+
class: "dfk-sql-search-count",
|
|
1019
|
+
hidden: !0
|
|
1020
|
+
}), this.#l = new h("lucide:stretch-horizontal", () => this.#D()), this.#u = new h("lucide:pin-off", () => this.#H(-1)), this.#e = new e.ListTable(this.#L()), this.#m = this.#N(), this.#b(), this.#v = new ResizeObserver(() => {
|
|
1021
|
+
cancelAnimationFrame(this.#p), this.#p = requestAnimationFrame(() => {
|
|
1022
|
+
this.#p = 0, this.#e.resize();
|
|
1023
|
+
});
|
|
1024
|
+
}), this.#v.observe(t), this.#y = new MutationObserver(() => {
|
|
1025
|
+
this.#P();
|
|
1026
|
+
}), this.#y.observe(t.ownerDocument.documentElement, { attributeFilter: ["data-theme", "class"] }), this.#e.on("dropdown_menu_click", (e) => this.#z(e));
|
|
1027
|
+
}
|
|
1028
|
+
#b() {
|
|
1029
|
+
let e = new h("lucide:copy", () => void this.#K(this.#G()));
|
|
1030
|
+
e.setLabel(this.#r.copyAll ?? "Copy table");
|
|
1031
|
+
let t = new h("lucide:rotate-ccw", () => this.#W());
|
|
1032
|
+
t.setLabel(this.#r.resetView ?? "Reset view"), this.#o.setLabel(this.#r.search ?? "Search"), this.#u.setLabel(this.#r.unfreezeColumns ?? "Unfreeze columns"), this.#s.addEventListener("input", () => this.#T()), this.#s.addEventListener("keydown", (e) => this.#w(e)), this.#a.append(this.#o.root, this.#c, this.#s, e.root, this.#l.root, t.root, this.#u.root), this.#O(), this.#k();
|
|
1033
|
+
}
|
|
1034
|
+
async #x() {
|
|
1035
|
+
if (this.#g !== null || this.#_) return this.#g;
|
|
1036
|
+
this.#_ = !0;
|
|
1037
|
+
try {
|
|
1038
|
+
let { SearchComponent: e } = await import("@visactor/vtable-search"), t = this.#N() === "DARK";
|
|
1039
|
+
this.#g = new e({
|
|
1040
|
+
table: this.#e,
|
|
1041
|
+
skipHeader: !0,
|
|
1042
|
+
highlightCellStyle: { bgColor: t ? "rgba(255, 214, 0, 0.25)" : "rgba(255, 214, 0, 0.45)" },
|
|
1043
|
+
focusHighlightCellStyle: { bgColor: t ? "rgba(255, 152, 0, 0.55)" : "rgba(255, 152, 0, 0.7)" }
|
|
451
1044
|
});
|
|
452
|
-
}
|
|
453
|
-
this.#
|
|
454
|
-
}
|
|
1045
|
+
} catch {} finally {
|
|
1046
|
+
this.#_ = !1;
|
|
1047
|
+
}
|
|
1048
|
+
return this.#g;
|
|
1049
|
+
}
|
|
1050
|
+
#S() {
|
|
1051
|
+
if (!this.#s.hidden) {
|
|
1052
|
+
this.#C();
|
|
1053
|
+
return;
|
|
1054
|
+
}
|
|
1055
|
+
this.#s.hidden = !1, this.#o.setOn(!0), this.#s.focus();
|
|
1056
|
+
}
|
|
1057
|
+
#C() {
|
|
1058
|
+
this.#s.value = "", this.#s.hidden = !0, this.#c.hidden = !0, this.#c.textContent = "", this.#o.setOn(!1), this.#g?.clear();
|
|
455
1059
|
}
|
|
456
|
-
#
|
|
1060
|
+
#w(e) {
|
|
1061
|
+
if (e.key === "Escape") {
|
|
1062
|
+
e.preventDefault(), this.#C();
|
|
1063
|
+
return;
|
|
1064
|
+
}
|
|
1065
|
+
e.key === "Enter" && (e.preventDefault(), this.#s.value.trim() && this.#g !== null && this.#E(e.shiftKey ? this.#g.prev() : this.#g.next()));
|
|
1066
|
+
}
|
|
1067
|
+
async #T() {
|
|
1068
|
+
let e = this.#s.value.trim();
|
|
1069
|
+
if (!e) {
|
|
1070
|
+
this.#g?.clear(), this.#E(null);
|
|
1071
|
+
return;
|
|
1072
|
+
}
|
|
1073
|
+
let t = await this.#x();
|
|
1074
|
+
t !== null && this.#E(t.search(e));
|
|
1075
|
+
}
|
|
1076
|
+
#E(e) {
|
|
1077
|
+
let t = e?.results.length ?? 0, n = t === 0 ? 0 : (e?.index ?? 0) + 1;
|
|
1078
|
+
if (this.#s.value.trim() === "") {
|
|
1079
|
+
this.#c.textContent = "", this.#c.hidden = !0;
|
|
1080
|
+
return;
|
|
1081
|
+
}
|
|
1082
|
+
this.#c.textContent = `${n}/${t}`, this.#c.hidden = !1;
|
|
1083
|
+
}
|
|
1084
|
+
#D() {
|
|
1085
|
+
let e = O.findIndex((e) => e.id === this.#h);
|
|
1086
|
+
this.#U(O[(e + 1) % O.length]), this.#O();
|
|
1087
|
+
}
|
|
1088
|
+
#O() {
|
|
1089
|
+
let e = Je(this.#h);
|
|
1090
|
+
this.#l.setLabel(this.#r[e.label] ?? e.fallback);
|
|
1091
|
+
}
|
|
1092
|
+
#k() {
|
|
1093
|
+
this.#u.root.hidden = this.#f === 0;
|
|
1094
|
+
}
|
|
1095
|
+
#A(e) {
|
|
457
1096
|
return e.map((e) => ({
|
|
458
1097
|
field: e,
|
|
459
1098
|
title: e,
|
|
460
|
-
sort:
|
|
461
|
-
style: { autoWrapText: this.#
|
|
1099
|
+
sort: Qe,
|
|
1100
|
+
style: { autoWrapText: this.#d.has(e) }
|
|
462
1101
|
}));
|
|
463
1102
|
}
|
|
464
|
-
#
|
|
1103
|
+
#j() {
|
|
465
1104
|
let e = [];
|
|
466
1105
|
for (let t = 0; t < this.#e.colCount; t += 1) {
|
|
467
1106
|
let n = this.#e.getHeaderField(t, 0);
|
|
@@ -470,35 +1109,35 @@ var _e = class {
|
|
|
470
1109
|
}
|
|
471
1110
|
return e.length === this.#n.columns.length ? e : [...this.#n.columns];
|
|
472
1111
|
}
|
|
473
|
-
#
|
|
474
|
-
return this.#i[this.#
|
|
1112
|
+
#M() {
|
|
1113
|
+
return this.#i[this.#N()];
|
|
475
1114
|
}
|
|
476
|
-
#
|
|
1115
|
+
#N() {
|
|
477
1116
|
return this.#t.ownerDocument.documentElement.getAttribute("data-theme") === "dark" ? "DARK" : "DEFAULT";
|
|
478
1117
|
}
|
|
479
|
-
#
|
|
480
|
-
let e = this.#
|
|
481
|
-
e !== this.#
|
|
1118
|
+
#P() {
|
|
1119
|
+
let e = this.#N();
|
|
1120
|
+
e !== this.#m && (this.#m = e, this.#e.updateTheme(this.#M()));
|
|
482
1121
|
}
|
|
483
|
-
#
|
|
484
|
-
let e = this.#
|
|
1122
|
+
#F() {
|
|
1123
|
+
let e = this.#M(), t = e.bodyStyle?.color ?? e.defaultStyle?.color;
|
|
485
1124
|
return typeof t == "string" ? t : "#000";
|
|
486
1125
|
}
|
|
487
|
-
#
|
|
488
|
-
let e = this.#
|
|
1126
|
+
#I() {
|
|
1127
|
+
let e = this.#M(), t = e.bodyStyle?.fontSize ?? e.defaultStyle?.fontSize;
|
|
489
1128
|
return typeof t == "number" ? t : 12;
|
|
490
1129
|
}
|
|
491
|
-
#
|
|
492
|
-
let e =
|
|
1130
|
+
#L() {
|
|
1131
|
+
let e = Je(this.#h);
|
|
493
1132
|
return {
|
|
494
1133
|
container: this.#t,
|
|
495
1134
|
records: this.#n.rows,
|
|
496
|
-
columns: this.#
|
|
497
|
-
theme: this.#
|
|
1135
|
+
columns: this.#A(this.#n.columns),
|
|
1136
|
+
theme: this.#M(),
|
|
498
1137
|
widthMode: e.widthMode,
|
|
499
1138
|
autoFillWidth: e.autoFillWidth,
|
|
500
|
-
defaultRowHeight: this.#
|
|
501
|
-
defaultHeaderRowHeight:
|
|
1139
|
+
defaultRowHeight: this.#d.size > 0 ? "auto" : E,
|
|
1140
|
+
defaultHeaderRowHeight: qe,
|
|
502
1141
|
columnResizeMode: "all",
|
|
503
1142
|
rowResizeMode: "all",
|
|
504
1143
|
dragHeaderMode: "column",
|
|
@@ -510,26 +1149,20 @@ var _e = class {
|
|
|
510
1149
|
tooltip: { isShowOverflowTextTooltip: !0 },
|
|
511
1150
|
menu: {
|
|
512
1151
|
renderMode: "html",
|
|
513
|
-
contextMenuItems: (e) => this.#
|
|
1152
|
+
contextMenuItems: (e) => this.#R(String(e))
|
|
514
1153
|
},
|
|
515
|
-
frozenColCount: this.#
|
|
1154
|
+
frozenColCount: this.#f,
|
|
516
1155
|
emptyTip: {
|
|
517
1156
|
text: this.#r.noData ?? "No rows",
|
|
518
1157
|
textStyle: {
|
|
519
|
-
fontSize: this.#
|
|
520
|
-
color: this.#
|
|
1158
|
+
fontSize: this.#I(),
|
|
1159
|
+
color: this.#F()
|
|
521
1160
|
}
|
|
522
1161
|
}
|
|
523
1162
|
};
|
|
524
1163
|
}
|
|
525
|
-
#
|
|
526
|
-
let t = this.#r, n = this.#
|
|
527
|
-
text: t.unfreezeColumns ?? "Unfreeze columns",
|
|
528
|
-
menuKey: S.unfreeze
|
|
529
|
-
} : {
|
|
530
|
-
text: t.freezeColumn ?? "Freeze up to here",
|
|
531
|
-
menuKey: S.freeze
|
|
532
|
-
};
|
|
1164
|
+
#R(e) {
|
|
1165
|
+
let t = this.#r, n = this.#d.has(e);
|
|
533
1166
|
return [
|
|
534
1167
|
{
|
|
535
1168
|
text: e,
|
|
@@ -538,269 +1171,265 @@ var _e = class {
|
|
|
538
1171
|
{ type: "split" },
|
|
539
1172
|
{
|
|
540
1173
|
text: t.copy ?? "Copy cell",
|
|
541
|
-
menuKey:
|
|
542
|
-
},
|
|
543
|
-
{
|
|
544
|
-
text: t.copyAll ?? "Copy table",
|
|
545
|
-
menuKey: S.copyAll
|
|
1174
|
+
menuKey: D.copyCell
|
|
546
1175
|
},
|
|
547
1176
|
{
|
|
548
1177
|
text: n ? t.unwrapColumn ?? "Stop wrapping column" : t.wrapColumn ?? "Wrap column",
|
|
549
|
-
menuKey: n ?
|
|
550
|
-
},
|
|
551
|
-
r,
|
|
552
|
-
{ type: "split" },
|
|
553
|
-
{
|
|
554
|
-
text: t.widthMode ?? "Column width",
|
|
555
|
-
children: this.#x()
|
|
1178
|
+
menuKey: n ? D.unwrap : D.wrap
|
|
556
1179
|
},
|
|
557
1180
|
{
|
|
558
|
-
text: t.
|
|
559
|
-
menuKey:
|
|
1181
|
+
text: t.freezeColumn ?? "Freeze up to here",
|
|
1182
|
+
menuKey: D.freeze
|
|
560
1183
|
}
|
|
561
1184
|
];
|
|
562
1185
|
}
|
|
563
|
-
#
|
|
564
|
-
return se.map((e) => ({
|
|
565
|
-
text: `${e.menuKey === this.#l ? "✓ " : ""}${this.#r[e.label] ?? e.fallback}`,
|
|
566
|
-
menuKey: e.menuKey
|
|
567
|
-
}));
|
|
568
|
-
}
|
|
569
|
-
#S(e) {
|
|
1186
|
+
#z(e) {
|
|
570
1187
|
let t = e.col ?? -1, n = e.row ?? -1, r = e.menuKey;
|
|
571
1188
|
if (!r) return;
|
|
572
1189
|
let i = t >= 0 && n >= 0 ? this.#e.getCellInfo(t, n) : void 0, a = i?.field === void 0 ? "" : String(i.field);
|
|
573
1190
|
switch (r) {
|
|
574
|
-
case
|
|
575
|
-
this.#
|
|
576
|
-
break;
|
|
577
|
-
case S.copyAll:
|
|
578
|
-
this.#k(this.#O());
|
|
1191
|
+
case D.copyCell:
|
|
1192
|
+
this.#K(this.#B(t, n));
|
|
579
1193
|
break;
|
|
580
|
-
case
|
|
581
|
-
a && this.#
|
|
1194
|
+
case D.wrap:
|
|
1195
|
+
a && this.#V(a, !0);
|
|
582
1196
|
break;
|
|
583
|
-
case
|
|
584
|
-
a && this.#
|
|
1197
|
+
case D.unwrap:
|
|
1198
|
+
a && this.#V(a, !1);
|
|
585
1199
|
break;
|
|
586
|
-
case
|
|
587
|
-
this.#T(t);
|
|
588
|
-
break;
|
|
589
|
-
case S.unfreeze:
|
|
590
|
-
this.#T(-1);
|
|
591
|
-
break;
|
|
592
|
-
case S.widthAdaptive:
|
|
593
|
-
case S.widthStandard:
|
|
594
|
-
case S.widthFill:
|
|
595
|
-
this.#E(ce(r));
|
|
596
|
-
break;
|
|
597
|
-
case S.reset: this.#D();
|
|
1200
|
+
case D.freeze: this.#H(t);
|
|
598
1201
|
}
|
|
599
1202
|
}
|
|
600
|
-
#
|
|
601
|
-
return e < 0 || t < 0 ? "" :
|
|
1203
|
+
#B(e, t) {
|
|
1204
|
+
return e < 0 || t < 0 ? "" : M(this.#e.getCellRawValue(e, t));
|
|
602
1205
|
}
|
|
603
|
-
#
|
|
604
|
-
t ? this.#
|
|
1206
|
+
#V(e, t) {
|
|
1207
|
+
t ? this.#d.add(e) : this.#d.delete(e), this.#e.defaultRowHeight = this.#d.size > 0 ? "auto" : E, this.#e.updateColumns(this.#A(this.#j()), {
|
|
605
1208
|
clearColWidthCache: !1,
|
|
606
1209
|
clearRowHeightCache: !0
|
|
607
1210
|
});
|
|
608
1211
|
}
|
|
609
|
-
#
|
|
610
|
-
this.#e.setFrozenColCount(e < 0 ? 0 : e + 1), this.#
|
|
1212
|
+
#H(e) {
|
|
1213
|
+
this.#e.setFrozenColCount(e < 0 ? 0 : e + 1), this.#f = this.#e.frozenColCount, this.#k();
|
|
611
1214
|
}
|
|
612
|
-
#
|
|
613
|
-
e.
|
|
1215
|
+
#U(e) {
|
|
1216
|
+
e.id !== this.#h && (this.#h = e.id, this.#e.widthMode = e.widthMode, this.#e.autoFillWidth = e.autoFillWidth, this.#e.updateColumns(this.#A(this.#j()), {
|
|
614
1217
|
clearColWidthCache: !0,
|
|
615
1218
|
clearRowHeightCache: !1
|
|
616
1219
|
}));
|
|
617
1220
|
}
|
|
618
|
-
#
|
|
619
|
-
this.#
|
|
1221
|
+
#W() {
|
|
1222
|
+
this.#d.clear(), this.#f = 0, this.#h = O[0].id, this.#e.updateOption(this.#L(), {
|
|
620
1223
|
clearColWidthCache: !0,
|
|
621
1224
|
clearRowHeightCache: !0
|
|
622
|
-
});
|
|
1225
|
+
}), this.#O(), this.#k();
|
|
623
1226
|
}
|
|
624
|
-
#
|
|
625
|
-
let e = this.#e, t = [this.#
|
|
1227
|
+
#G() {
|
|
1228
|
+
let e = this.#e, t = [this.#j().join(" ")];
|
|
626
1229
|
for (let n = e.columnHeaderLevelCount; n < e.rowCount; n += 1) {
|
|
627
1230
|
let r = [];
|
|
628
|
-
for (let t = 0; t < e.colCount; t += 1) r.push(
|
|
1231
|
+
for (let t = 0; t < e.colCount; t += 1) r.push(M(e.getCellRawValue(t, n)));
|
|
629
1232
|
t.push(r.join(" "));
|
|
630
1233
|
}
|
|
631
1234
|
return t.join("\n");
|
|
632
1235
|
}
|
|
633
|
-
|
|
1236
|
+
csv() {
|
|
1237
|
+
let e = this.#e, t = [this.#j().map(A).join(",")];
|
|
1238
|
+
for (let n = e.columnHeaderLevelCount; n < e.rowCount; n += 1) {
|
|
1239
|
+
let r = [];
|
|
1240
|
+
for (let t = 0; t < e.colCount; t += 1) r.push(A(M(e.getCellRawValue(t, n))));
|
|
1241
|
+
t.push(r.join(","));
|
|
1242
|
+
}
|
|
1243
|
+
return t.join("\n");
|
|
1244
|
+
}
|
|
1245
|
+
async #K(e) {
|
|
634
1246
|
try {
|
|
635
1247
|
await navigator.clipboard.writeText(e);
|
|
636
1248
|
} catch {}
|
|
637
1249
|
}
|
|
638
1250
|
dispose() {
|
|
639
|
-
cancelAnimationFrame(this.#
|
|
640
|
-
}
|
|
641
|
-
},
|
|
642
|
-
function
|
|
643
|
-
let e =
|
|
644
|
-
e.style.setProperty("--dfk-sql-skeleton-row-height", `${
|
|
645
|
-
for (let t = 0; t <
|
|
646
|
-
for (let t = 0; t <
|
|
1251
|
+
cancelAnimationFrame(this.#p), this.#v?.disconnect(), this.#y?.disconnect(), this.#e.release();
|
|
1252
|
+
}
|
|
1253
|
+
}, nt = 2, rt = 4;
|
|
1254
|
+
function it() {
|
|
1255
|
+
let e = u("div", { class: "dfk-sql-table-skeleton" });
|
|
1256
|
+
e.style.setProperty("--dfk-sql-skeleton-row-height", `${E}px`);
|
|
1257
|
+
for (let t = 0; t < nt; t += 1) e.appendChild(u("div", { class: "dfk-sql-table-skeleton-row" }, (e) => {
|
|
1258
|
+
for (let t = 0; t < rt; t += 1) e.appendChild(u("span", { class: "dfk-sql-table-skeleton-cell" }));
|
|
647
1259
|
}));
|
|
648
1260
|
return e;
|
|
649
1261
|
}
|
|
650
|
-
async function
|
|
651
|
-
let
|
|
652
|
-
|
|
653
|
-
let
|
|
654
|
-
|
|
1262
|
+
async function at(e, t, n, r) {
|
|
1263
|
+
let i = e.ownerDocument, a = u("div", { class: "dfk-sql-table" });
|
|
1264
|
+
a.style.setProperty("--dfk-sql-table-height", `${Math.min(360, 36 + t.rows.length * E)}px`);
|
|
1265
|
+
let o = it();
|
|
1266
|
+
a.appendChild(o), e.appendChild(a);
|
|
655
1267
|
try {
|
|
656
|
-
let e = new
|
|
657
|
-
return
|
|
1268
|
+
let e = new tt(await import("@visactor/vtable"), a, t, n, r);
|
|
1269
|
+
return o.remove(), {
|
|
1270
|
+
dispose: () => e.dispose(),
|
|
1271
|
+
csv: () => e.csv()
|
|
1272
|
+
};
|
|
658
1273
|
} catch (e) {
|
|
659
|
-
return
|
|
1274
|
+
return o.remove(), a.appendChild(et(i, k(n, $e(e)))), {
|
|
1275
|
+
dispose: () => {},
|
|
1276
|
+
csv: () => lt(t)
|
|
1277
|
+
};
|
|
660
1278
|
}
|
|
661
1279
|
}
|
|
662
|
-
|
|
663
|
-
let
|
|
1280
|
+
function ot(e, t, n) {
|
|
1281
|
+
let r = u("div", { class: "dfk-sql-tab-actions" }), i = null;
|
|
1282
|
+
return {
|
|
1283
|
+
label: t.table ?? "Table",
|
|
1284
|
+
actions: r,
|
|
1285
|
+
mount: async (n) => (i = await at(n, e, t, r), () => {
|
|
1286
|
+
i?.dispose(), i = null;
|
|
1287
|
+
}),
|
|
1288
|
+
download: () => i === null ? null : {
|
|
1289
|
+
name: y(n, "csv", { fallback: "table" }),
|
|
1290
|
+
mime: "text/csv;charset=utf-8",
|
|
1291
|
+
text: i.csv()
|
|
1292
|
+
}
|
|
1293
|
+
};
|
|
1294
|
+
}
|
|
1295
|
+
var st = async ({ host: e, labels: t, fullscreenButton: n }, r) => {
|
|
1296
|
+
let i = new Be(e, [ot(r, t, e)], t.download ?? "Download", n);
|
|
664
1297
|
return () => i.dispose();
|
|
665
1298
|
};
|
|
666
|
-
function
|
|
667
|
-
let
|
|
668
|
-
n.
|
|
669
|
-
|
|
670
|
-
for (let e of t.rows) r.push(t.columns.map((t) => T(e[t])).join(" "));
|
|
671
|
-
return n.textContent = r.join("\n"), n;
|
|
1299
|
+
function ct(e) {
|
|
1300
|
+
let t = [e.columns.join(" ")];
|
|
1301
|
+
for (let n of e.rows) t.push(e.columns.map((e) => M(n[e])).join(" "));
|
|
1302
|
+
return t.join("\n");
|
|
672
1303
|
}
|
|
673
|
-
|
|
674
|
-
let
|
|
1304
|
+
function lt(e) {
|
|
1305
|
+
let t = [e.columns.map(A).join(",")];
|
|
1306
|
+
for (let n of e.rows) t.push(e.columns.map((e) => A(M(n[e]))).join(","));
|
|
1307
|
+
return t.join("\n");
|
|
1308
|
+
}
|
|
1309
|
+
var ut = async ({ host: e, labels: t, fullscreenButton: n }, r) => {
|
|
1310
|
+
let i = ct(r), a = new Be(e, [{
|
|
675
1311
|
label: t.text ?? "Text",
|
|
676
|
-
mount: (e) =>
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
1312
|
+
mount: (e) => {
|
|
1313
|
+
e.appendChild(u("pre", {
|
|
1314
|
+
class: "dfk-sql-text",
|
|
1315
|
+
text: i
|
|
1316
|
+
}));
|
|
1317
|
+
},
|
|
1318
|
+
download: () => ({
|
|
1319
|
+
name: y(e, "txt", { fallback: "text" }),
|
|
1320
|
+
mime: "text/plain;charset=utf-8",
|
|
1321
|
+
text: i
|
|
1322
|
+
})
|
|
1323
|
+
}, ot(r, t, e)], t.download ?? "Download", n);
|
|
1324
|
+
return () => a.dispose();
|
|
1325
|
+
}, dt = async ({ host: e, labels: t }, n) => {
|
|
1326
|
+
e.replaceChildren(et(e.ownerDocument, k(t, n.error ?? "unknown")));
|
|
681
1327
|
};
|
|
682
|
-
function
|
|
1328
|
+
function ft(e, t) {
|
|
683
1329
|
return e.field ? e.field : t.columns.length === 1 ? t.columns[0] : null;
|
|
684
1330
|
}
|
|
685
|
-
function
|
|
686
|
-
if (!t.trim()) return null;
|
|
687
|
-
let n = new DOMParser().parseFromString(t, "image/svg+xml").documentElement;
|
|
688
|
-
return !n || n.localName === "parsererror" || n.namespaceURI !== pe ? null : (De(n), e.importNode(n, !0));
|
|
689
|
-
}
|
|
690
|
-
function De(e) {
|
|
691
|
-
for (let t of e.querySelectorAll("script, foreignObject")) t.remove();
|
|
692
|
-
let t = (e) => {
|
|
693
|
-
for (let t of [...e.attributes]) {
|
|
694
|
-
let n = t.name.toLowerCase(), r = t.value.replace(/\s/g, "").toLowerCase();
|
|
695
|
-
(n.startsWith("on") || (n === "href" || n === "xlink:href") && r.startsWith("javascript:")) && e.removeAttribute(t.name);
|
|
696
|
-
}
|
|
697
|
-
for (let n of e.children) t(n);
|
|
698
|
-
};
|
|
699
|
-
t(e);
|
|
700
|
-
}
|
|
701
|
-
function Oe(e, t) {
|
|
1331
|
+
function pt(e, t) {
|
|
702
1332
|
let { width: n, height: r } = t.option ?? {};
|
|
703
1333
|
n && e.style.setProperty("--dfk-sql-preview-width", n), r && e.style.setProperty("--dfk-sql-preview-height", r);
|
|
704
1334
|
}
|
|
705
|
-
function
|
|
706
|
-
|
|
1335
|
+
function mt(e) {
|
|
1336
|
+
return e == null ? "" : String(e);
|
|
1337
|
+
}
|
|
1338
|
+
function ht(e, t, n, r, i, a) {
|
|
707
1339
|
if (e === "iframe") {
|
|
708
|
-
let e =
|
|
1340
|
+
let e = u("iframe", {
|
|
709
1341
|
class: "dfk-sql-frame",
|
|
710
|
-
srcdoc:
|
|
1342
|
+
srcdoc: t,
|
|
711
1343
|
attrs: {
|
|
712
|
-
sandbox:
|
|
1344
|
+
sandbox: r.option?.sandbox ?? Ke,
|
|
713
1345
|
loading: "lazy",
|
|
714
1346
|
referrerpolicy: "no-referrer",
|
|
715
|
-
title:
|
|
1347
|
+
title: n
|
|
716
1348
|
}
|
|
717
1349
|
});
|
|
718
|
-
|
|
719
|
-
|
|
1350
|
+
return pt(e, r), {
|
|
1351
|
+
label: n,
|
|
1352
|
+
mount: (t) => {
|
|
1353
|
+
t.appendChild(e);
|
|
1354
|
+
},
|
|
1355
|
+
download: () => ({
|
|
1356
|
+
name: y(i, "html", { fallback: "preview" }),
|
|
1357
|
+
mime: "text/html;charset=utf-8",
|
|
1358
|
+
text: t
|
|
1359
|
+
})
|
|
1360
|
+
};
|
|
720
1361
|
}
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
1362
|
+
if (e === "mermaid") {
|
|
1363
|
+
let e = u("dfk-mermaid", { attrs: {
|
|
1364
|
+
embedded: "",
|
|
1365
|
+
source: t
|
|
1366
|
+
} });
|
|
1367
|
+
return {
|
|
1368
|
+
label: n,
|
|
1369
|
+
actions: e.actions,
|
|
1370
|
+
mount: (t) => {
|
|
1371
|
+
t.appendChild(e);
|
|
1372
|
+
},
|
|
1373
|
+
download: () => e.downloadPayload(),
|
|
1374
|
+
setFullscreen: (t) => e.setFullscreen(t)
|
|
1375
|
+
};
|
|
728
1376
|
}
|
|
729
|
-
let
|
|
730
|
-
|
|
1377
|
+
let o = new Ve(We(i.ownerDocument, t), t, a, "figure");
|
|
1378
|
+
return pt(o.root, r), {
|
|
1379
|
+
label: n,
|
|
1380
|
+
actions: o.actions,
|
|
1381
|
+
mount: (e) => (e.appendChild(o.root), () => o.dispose()),
|
|
1382
|
+
download: () => o.downloadPayload(),
|
|
1383
|
+
setFullscreen: (e) => o.setFullscreen(e)
|
|
1384
|
+
};
|
|
731
1385
|
}
|
|
732
|
-
function
|
|
733
|
-
return async ({ host: t, config: n, labels: r, fullscreenButton: i },
|
|
734
|
-
let
|
|
735
|
-
if (!
|
|
736
|
-
t.replaceChildren(
|
|
1386
|
+
function j(e) {
|
|
1387
|
+
return async ({ host: t, config: n, labels: r, fullscreenButton: i, onFullscreenChange: a }, o) => {
|
|
1388
|
+
let s = ft(n, o);
|
|
1389
|
+
if (!s) {
|
|
1390
|
+
t.replaceChildren(et(t.ownerDocument, k(r, r.noField ?? "this result has no markup column; set `field`")));
|
|
737
1391
|
return;
|
|
738
1392
|
}
|
|
739
|
-
let
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
}
|
|
746
|
-
|
|
1393
|
+
let c = {
|
|
1394
|
+
reset: r.resetZoom ?? "Reset zoom",
|
|
1395
|
+
edit: r.editSource ?? "Edit source",
|
|
1396
|
+
editTitle: r.svgSource ?? "SVG source",
|
|
1397
|
+
apply: r.apply ?? "Apply",
|
|
1398
|
+
cancel: r.cancel ?? "Cancel"
|
|
1399
|
+
}, l = n.tab_name, u = o.rows.map((i, a) => {
|
|
1400
|
+
let o = l ? i[l] : void 0, u = o == null ? `${r.row ?? "Row"} ${a + 1}` : M(o);
|
|
1401
|
+
return ht(e, mt(i[s]), u, n, t, c);
|
|
1402
|
+
});
|
|
1403
|
+
u.push(ot(o, r, t));
|
|
1404
|
+
let d = new Be(t, u, r.download ?? "Download", i), f = e === "iframe" ? null : a((e) => d.setFullscreen(e));
|
|
1405
|
+
return () => {
|
|
1406
|
+
f?.(), d.dispose();
|
|
1407
|
+
};
|
|
747
1408
|
};
|
|
748
1409
|
}
|
|
749
|
-
function
|
|
1410
|
+
function M(e) {
|
|
750
1411
|
return e == null ? "NULL" : e instanceof Date ? e.toLocaleString() : typeof e == "object" ? JSON.stringify(e) : String(e);
|
|
751
1412
|
}
|
|
752
|
-
var
|
|
753
|
-
table:
|
|
754
|
-
text:
|
|
755
|
-
iframe:
|
|
756
|
-
html:
|
|
757
|
-
svg:
|
|
1413
|
+
var gt = {
|
|
1414
|
+
table: st,
|
|
1415
|
+
text: ut,
|
|
1416
|
+
iframe: j("iframe"),
|
|
1417
|
+
html: j("iframe"),
|
|
1418
|
+
svg: j("svg"),
|
|
1419
|
+
mermaid: j("mermaid")
|
|
758
1420
|
};
|
|
759
|
-
function
|
|
760
|
-
return t.error ?
|
|
761
|
-
}
|
|
762
|
-
//#endregion
|
|
763
|
-
//#region src/sql/editor.ts
|
|
764
|
-
async function Me(e, t, n) {
|
|
765
|
-
let [{ basicSetup: r }, { sql: i }, { EditorView: a, keymap: o }, { defaultKeymap: s, historyKeymap: c }, { Compartment: l }] = await Promise.all([
|
|
766
|
-
import("codemirror"),
|
|
767
|
-
import("@codemirror/lang-sql"),
|
|
768
|
-
import("@codemirror/view"),
|
|
769
|
-
import("@codemirror/commands"),
|
|
770
|
-
import("@codemirror/state")
|
|
771
|
-
]), u = new l(), d = new a({
|
|
772
|
-
doc: t,
|
|
773
|
-
extensions: [
|
|
774
|
-
r,
|
|
775
|
-
i(),
|
|
776
|
-
o.of([...s, ...c]),
|
|
777
|
-
u.of([]),
|
|
778
|
-
a.updateListener.of((e) => {
|
|
779
|
-
e.docChanged && n(e.state.doc.toString());
|
|
780
|
-
})
|
|
781
|
-
],
|
|
782
|
-
parent: e
|
|
783
|
-
});
|
|
784
|
-
return {
|
|
785
|
-
getValue: () => d.state.doc.toString(),
|
|
786
|
-
setValue: (e) => d.dispatch({ changes: {
|
|
787
|
-
from: 0,
|
|
788
|
-
to: d.state.doc.length,
|
|
789
|
-
insert: e
|
|
790
|
-
} }),
|
|
791
|
-
setWrap: (e) => d.dispatch({ effects: u.reconfigure(e ? a.lineWrapping : []) }),
|
|
792
|
-
destroy: () => d.destroy()
|
|
793
|
-
};
|
|
1421
|
+
function _t(e, t) {
|
|
1422
|
+
return t.error ? dt : gt[e.show ?? (t.columns.length === 1 && t.rows.length === 1 ? "text" : "table")] ?? st;
|
|
794
1423
|
}
|
|
795
1424
|
//#endregion
|
|
796
1425
|
//#region src/sql/DfkSql.css?inline
|
|
797
|
-
var
|
|
798
|
-
function
|
|
799
|
-
return
|
|
1426
|
+
var vt = "*,:before,:after{box-sizing:border-box}:host{margin:1rem 0;display:block}.dfk-sql-code{position:relative}.dfk-sql-editor{border:1px solid var(--ifm-global-border-color,#e0e0e0);border-radius:var(--ifm-global-radius,.4rem);background:var(--ifm-background-surface-color,#fff);font-size:var(--ifm-code-font-size,95%);overflow:hidden}.dfk-sql-editor .cm-editor{outline:none}.dfk-sql-editor-skeleton{padding:4px .75rem}.dfk-sql-editor-skeleton-line{align-items:center;height:1.6em;display:flex}.dfk-sql-editor-skeleton-line:before{content:\"\";background-color:var(--ifm-color-emphasis-200,#e6e6e6);background-image:linear-gradient(90deg, transparent 0%, var(--ifm-color-emphasis-100,#f5f5f5) 50%, transparent 100%);background-size:200% 100%;border-radius:.25em;flex:1;height:.75em;animation:1.6s linear infinite dfk-sql-shimmer}@keyframes dfk-sql-shimmer{0%{background-position:0 0}to{background-position:100% 0}}@media (prefers-reduced-motion:reduce){.dfk-sql-editor-skeleton-line{animation:none}}.dfk-sql-editor .cm-scroller{font-family:var(--ifm-font-family-monospace,ui-monospace, SFMono-Regular, Menlo, monospace);line-height:1.6}.dfk-sql-actions{z-index:1;border-radius:var(--ifm-global-radius,.3rem);background:var(--ifm-color-emphasis-100,#f5f5f5);opacity:0;pointer-events:none;align-items:center;gap:.15rem;padding:.1rem .2rem;transition:opacity .12s;display:flex;position:absolute;top:.25rem;right:.25rem}.dfk-sql-code:hover .dfk-sql-actions,.dfk-sql-code:focus-within .dfk-sql-actions,.dfk-sql-actions-busy{opacity:1;pointer-events:auto}.dfk-sql-status{color:var(--ifm-color-emphasis-700,#666);white-space:nowrap;padding:0 .25rem;font-size:.72rem}.dfk-sql-status:empty{display:none}.dfk-icon-button{border-radius:var(--ifm-global-radius,.25rem);width:1.6rem;height:1.6rem;color:var(--ifm-color-emphasis-700,#666);cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;padding:0;transition:background .12s,color .12s;display:inline-flex;position:relative}.dfk-icon-button:hover:not(:disabled),.dfk-icon-button:focus-visible{background:var(--ifm-color-emphasis-200,#e6e6e6);color:var(--ifm-color-primary,#14459b)}.dfk-icon-button:disabled{opacity:.45;cursor:progress}.dfk-icon-button[hidden]{display:none}.dfk-icon-on{color:var(--ifm-color-primary,#14459b)}.dfk-icon{font-size:1rem}[data-tip]:after{content:attr(data-tip);z-index:2;border-radius:var(--ifm-global-radius,.25rem);background:var(--ifm-color-emphasis-800,#333);color:var(--ifm-color-emphasis-0,#fff);white-space:nowrap;opacity:0;pointer-events:none;padding:.15rem .4rem;font-size:.7rem;line-height:1.4;transition:opacity .12s;position:absolute;top:calc(100% + .3rem);right:0}[data-tip]:hover:after,[data-tip]:focus-visible:after{opacity:1}", N = null;
|
|
1427
|
+
function yt() {
|
|
1428
|
+
return N || (N = new CSSStyleSheet(), N.replaceSync(vt)), N;
|
|
800
1429
|
}
|
|
801
1430
|
//#endregion
|
|
802
1431
|
//#region src/sql/DfkSql.ts
|
|
803
|
-
var
|
|
1432
|
+
var bt = {
|
|
804
1433
|
en: {
|
|
805
1434
|
run: "Run",
|
|
806
1435
|
format: "Format SQL",
|
|
@@ -816,10 +1445,16 @@ var D = {
|
|
|
816
1445
|
unfreezeColumns: "Unfreeze columns",
|
|
817
1446
|
resetView: "Reset view",
|
|
818
1447
|
noData: "No rows",
|
|
819
|
-
|
|
1448
|
+
search: "Search",
|
|
820
1449
|
widthAdaptive: "Fill the width",
|
|
821
1450
|
widthStandard: "Content widths, scroll sideways",
|
|
822
1451
|
widthFill: "Content first, fill when it fits",
|
|
1452
|
+
download: "Download",
|
|
1453
|
+
resetZoom: "Reset zoom",
|
|
1454
|
+
editSource: "Edit source",
|
|
1455
|
+
svgSource: "SVG source",
|
|
1456
|
+
apply: "Apply",
|
|
1457
|
+
cancel: "Cancel",
|
|
823
1458
|
running: "Running…",
|
|
824
1459
|
initializing: "Initializing DuckDB…",
|
|
825
1460
|
loadingExtensions: "Loading extensions…",
|
|
@@ -848,10 +1483,16 @@ var D = {
|
|
|
848
1483
|
unfreezeColumns: "取消冻结",
|
|
849
1484
|
resetView: "重置视图",
|
|
850
1485
|
noData: "无数据",
|
|
851
|
-
|
|
1486
|
+
search: "搜索",
|
|
852
1487
|
widthAdaptive: "铺满宽度",
|
|
853
1488
|
widthStandard: "按内容列宽(可横向滚动)",
|
|
854
1489
|
widthFill: "内容优先,装得下就铺满",
|
|
1490
|
+
download: "下载",
|
|
1491
|
+
resetZoom: "还原缩放",
|
|
1492
|
+
editSource: "编辑源码",
|
|
1493
|
+
svgSource: "SVG 源码",
|
|
1494
|
+
apply: "应用",
|
|
1495
|
+
cancel: "取消",
|
|
855
1496
|
running: "执行中…",
|
|
856
1497
|
initializing: "正在初始化 DuckDB…",
|
|
857
1498
|
loadingExtensions: "正在加载扩展…",
|
|
@@ -865,17 +1506,17 @@ var D = {
|
|
|
865
1506
|
row: "行",
|
|
866
1507
|
noField: "该结果没有可展示的标记列,请设置 `field`"
|
|
867
1508
|
}
|
|
868
|
-
},
|
|
869
|
-
function
|
|
870
|
-
return
|
|
1509
|
+
}, xt = 1600, St = null;
|
|
1510
|
+
function Ct() {
|
|
1511
|
+
return St ??= import("sql-formatter"), St;
|
|
871
1512
|
}
|
|
872
|
-
var
|
|
873
|
-
#e =
|
|
874
|
-
#t =
|
|
1513
|
+
var wt = class extends l {
|
|
1514
|
+
#e = u("div", { class: "dfk-sql-editor" });
|
|
1515
|
+
#t = u("div", { class: "dfk-sql-editor-skeleton" });
|
|
875
1516
|
#n = [];
|
|
876
|
-
#r =
|
|
877
|
-
#i =
|
|
878
|
-
#a =
|
|
1517
|
+
#r = u("div", { class: "dfk-sql-code" });
|
|
1518
|
+
#i = u("div", { class: "dfk-sql-actions" });
|
|
1519
|
+
#a = u("span", {
|
|
879
1520
|
class: "dfk-sql-status",
|
|
880
1521
|
attrs: { "aria-live": "polite" }
|
|
881
1522
|
});
|
|
@@ -885,7 +1526,7 @@ var Re = class extends c {
|
|
|
885
1526
|
#l;
|
|
886
1527
|
#u;
|
|
887
1528
|
#d;
|
|
888
|
-
#f =
|
|
1529
|
+
#f = bt.en;
|
|
889
1530
|
#p = { type: "duckfn" };
|
|
890
1531
|
#m = "";
|
|
891
1532
|
#h = "";
|
|
@@ -898,87 +1539,88 @@ var Re = class extends c {
|
|
|
898
1539
|
#S = !1;
|
|
899
1540
|
#C = 0;
|
|
900
1541
|
#w = (e) => {
|
|
901
|
-
e.key === "Escape" && this.#
|
|
1542
|
+
e.key === "Escape" && this.#R(!1);
|
|
902
1543
|
};
|
|
903
1544
|
#T = null;
|
|
904
1545
|
#E = null;
|
|
905
1546
|
#D = null;
|
|
1547
|
+
#O = /* @__PURE__ */ new Set();
|
|
906
1548
|
constructor() {
|
|
907
|
-
super(), this.#o = new
|
|
1549
|
+
super(), this.#o = new h("lucide:play", () => void this.#V()), this.#s = new h("lucide:wand-sparkles", () => void this.#F()), this.#c = new h("lucide:rotate-ccw", () => this.#P()), this.#l = new h("lucide:wrap-text", () => this.#I()), this.#u = new h("lucide:copy", () => void this.#L()), this.#d = new h("lucide:maximize", () => this.#R(!this.#x)), this.#i.append(this.#a, this.#o.root, this.#s.root, this.#c.root, this.#l.root, this.#u.root), this.#j(!0), this.#r.append(this.#e, this.#i);
|
|
908
1550
|
let e = this.attachShadow({ mode: "open" });
|
|
909
|
-
e.adoptedStyleSheets = [
|
|
1551
|
+
e.adoptedStyleSheets = [yt()], e.append(this.#r, u("slot", { attrs: { name: "dfk-result" } })), this.#A();
|
|
910
1552
|
}
|
|
911
1553
|
connectedCallback() {
|
|
912
|
-
this.#y ||= (this.#
|
|
1554
|
+
this.#y ||= (this.#k(), !0), this.#B(), this.#N();
|
|
913
1555
|
}
|
|
914
1556
|
disconnectedCallback() {
|
|
915
|
-
this.#
|
|
1557
|
+
this.#R(!1), this.#D?.(), this.#D = null, this.#E?.destroy(), this.#E = null, this.#C !== 0 && (window.clearTimeout(this.#C), this.#C = 0);
|
|
916
1558
|
}
|
|
917
|
-
#
|
|
918
|
-
this.#f =
|
|
1559
|
+
#k() {
|
|
1560
|
+
this.#f = bt[(document.documentElement.getAttribute("lang") ?? "en").toLowerCase()] ?? bt.en;
|
|
919
1561
|
let e = this.getAttribute("config");
|
|
920
1562
|
if (e) try {
|
|
921
1563
|
this.#p = JSON.parse(e);
|
|
922
1564
|
} catch {}
|
|
923
|
-
this.#m = this.getAttribute("sql") ?? "", this.#h = this.#m, this.#
|
|
1565
|
+
this.#m = this.getAttribute("sql") ?? "", this.#h = this.#m, this.#A();
|
|
924
1566
|
}
|
|
925
|
-
#
|
|
1567
|
+
#A() {
|
|
926
1568
|
this.#o.setLabel(this.#f.run), this.#s.setLabel(this.#f.format), this.#c.setLabel(this.#f.reset), this.#l.setLabel(this.#g ? this.#f.wrapOff : this.#f.wrapOn), this.#l.setOn(this.#g), this.#u.setLabel(this.#f.copy), this.#d.setLabel(this.#x ? this.#f.exitFullscreen : this.#f.fullscreen);
|
|
927
1569
|
}
|
|
928
|
-
#
|
|
1570
|
+
#j(e) {
|
|
929
1571
|
if (!e) {
|
|
930
1572
|
this.#t.remove();
|
|
931
1573
|
return;
|
|
932
1574
|
}
|
|
933
|
-
this.#
|
|
1575
|
+
this.#M(), this.#e.appendChild(this.#t);
|
|
934
1576
|
}
|
|
935
|
-
#
|
|
1577
|
+
#M() {
|
|
936
1578
|
let e = Math.max(1, this.#h.split("\n").length);
|
|
937
1579
|
for (; this.#n.length > e;) this.#n.pop()?.remove();
|
|
938
1580
|
for (; this.#n.length < e;) {
|
|
939
|
-
let e =
|
|
1581
|
+
let e = u("span", { class: "dfk-sql-editor-skeleton-line" });
|
|
940
1582
|
this.#n.push(e), this.#t.appendChild(e);
|
|
941
1583
|
}
|
|
942
1584
|
}
|
|
943
|
-
async #
|
|
1585
|
+
async #N() {
|
|
944
1586
|
if (!(this.#E || this.#b)) {
|
|
945
|
-
this.#b = !0, this.#
|
|
1587
|
+
this.#b = !0, this.#j(!0);
|
|
946
1588
|
try {
|
|
947
|
-
let e = await
|
|
1589
|
+
let e = await he(this.#e, this.#h, (e) => {
|
|
948
1590
|
this.#h = e;
|
|
949
|
-
});
|
|
1591
|
+
}, { language: "sql" });
|
|
950
1592
|
if (!this.isConnected) {
|
|
951
1593
|
e.destroy();
|
|
952
1594
|
return;
|
|
953
1595
|
}
|
|
954
|
-
e.setWrap(this.#g), this.#E = e, this.#
|
|
1596
|
+
e.setWrap(this.#g), this.#E = e, this.#j(!1);
|
|
955
1597
|
} catch (e) {
|
|
956
|
-
this.#
|
|
1598
|
+
this.#j(!1), this.#U(Tt(e));
|
|
957
1599
|
} finally {
|
|
958
1600
|
this.#b = !1;
|
|
959
1601
|
}
|
|
960
1602
|
}
|
|
961
1603
|
}
|
|
962
|
-
#
|
|
963
|
-
this.#h = this.#m, this.#E?.setValue(this.#h), this.#
|
|
1604
|
+
#P() {
|
|
1605
|
+
this.#h = this.#m, this.#E?.setValue(this.#h), this.#J();
|
|
964
1606
|
}
|
|
965
|
-
async #
|
|
1607
|
+
async #F() {
|
|
966
1608
|
if (!this.#v) {
|
|
967
1609
|
this.#v = !0, this.#s.setDisabled(!0);
|
|
968
1610
|
try {
|
|
969
|
-
let { format: e } = await
|
|
1611
|
+
let { format: e } = await Ct(), t = e(this.#h, { language: "duckdb" });
|
|
970
1612
|
this.#h = t, this.#E?.setValue(t);
|
|
971
1613
|
} catch {
|
|
972
|
-
this.#
|
|
1614
|
+
this.#U(this.#f.formatFailed);
|
|
973
1615
|
} finally {
|
|
974
1616
|
this.#v = !1, this.#s.setDisabled(!1);
|
|
975
1617
|
}
|
|
976
1618
|
}
|
|
977
1619
|
}
|
|
978
|
-
#
|
|
979
|
-
this.#g = !this.#g, this.#E?.setWrap(this.#g), this.#
|
|
1620
|
+
#I() {
|
|
1621
|
+
this.#g = !this.#g, this.#E?.setWrap(this.#g), this.#A();
|
|
980
1622
|
}
|
|
981
|
-
async #
|
|
1623
|
+
async #L() {
|
|
982
1624
|
try {
|
|
983
1625
|
await navigator.clipboard.writeText(this.#h);
|
|
984
1626
|
} catch {
|
|
@@ -986,133 +1628,116 @@ var Re = class extends c {
|
|
|
986
1628
|
}
|
|
987
1629
|
this.#u.setIcon("lucide:check"), this.#u.setLabel(this.#f.copied), this.#C !== 0 && window.clearTimeout(this.#C), this.#C = window.setTimeout(() => {
|
|
988
1630
|
this.#C = 0, this.#u.setIcon("lucide:copy"), this.#u.setLabel(this.#f.copy);
|
|
989
|
-
},
|
|
1631
|
+
}, xt);
|
|
990
1632
|
}
|
|
991
|
-
#
|
|
992
|
-
this.#x = e, this.#T?.classList.toggle("dfk-sql-result-expanded", e), this.#d.setIcon(e ? "lucide:minimize" : "lucide:maximize"), this.#
|
|
1633
|
+
#R(e) {
|
|
1634
|
+
this.#x = e, this.#T?.classList.toggle("dfk-sql-result-expanded", e), this.#d.setIcon(e ? "lucide:minimize" : "lucide:maximize"), this.#A(), e !== this.#S && (e ? document.addEventListener("keydown", this.#w) : document.removeEventListener("keydown", this.#w), this.#S = e);
|
|
1635
|
+
for (let t of this.#O) t(e);
|
|
993
1636
|
}
|
|
994
|
-
#
|
|
995
|
-
|
|
1637
|
+
#z(e) {
|
|
1638
|
+
return this.#O.add(e), e(this.#x), () => {
|
|
1639
|
+
this.#O.delete(e);
|
|
1640
|
+
};
|
|
1641
|
+
}
|
|
1642
|
+
#B() {
|
|
1643
|
+
w.getInstance().init({ allowUnsignedExtensions: this.#p.allowUnsignedExtensions === !0 }).catch(() => void 0);
|
|
996
1644
|
}
|
|
997
|
-
async #
|
|
1645
|
+
async #V() {
|
|
998
1646
|
if (this.#_) return;
|
|
999
|
-
this.#_ = !0, this.#
|
|
1000
|
-
let e =
|
|
1647
|
+
this.#_ = !0, this.#H(!0);
|
|
1648
|
+
let e = w.getInstance();
|
|
1001
1649
|
try {
|
|
1002
|
-
e.state !== "ready" && this.#
|
|
1650
|
+
e.state !== "ready" && this.#U(this.#f.initializing);
|
|
1003
1651
|
try {
|
|
1004
1652
|
await e.init({ allowUnsignedExtensions: this.#p.allowUnsignedExtensions === !0 });
|
|
1005
1653
|
} catch {
|
|
1006
|
-
this.#
|
|
1654
|
+
this.#W();
|
|
1007
1655
|
return;
|
|
1008
1656
|
}
|
|
1009
1657
|
let t = this.#p.extensions ?? [];
|
|
1010
1658
|
if (t.length > 0) {
|
|
1011
|
-
this.#
|
|
1659
|
+
this.#U(this.#f.loadingExtensions);
|
|
1012
1660
|
try {
|
|
1013
1661
|
for (let n of t) await e.loadExtension(n, { repository: this.#p.repository });
|
|
1014
1662
|
} catch (e) {
|
|
1015
|
-
this.#
|
|
1663
|
+
this.#q(Et(this.#f, Tt(e)));
|
|
1016
1664
|
return;
|
|
1017
1665
|
}
|
|
1018
1666
|
}
|
|
1019
|
-
this.#
|
|
1667
|
+
this.#U(this.#f.running);
|
|
1020
1668
|
let n = await e.execute(this.#h);
|
|
1021
|
-
this.#
|
|
1669
|
+
this.#K(n);
|
|
1022
1670
|
} finally {
|
|
1023
|
-
this.#_ = !1, this.#
|
|
1671
|
+
this.#_ = !1, this.#H(!1), this.#U("");
|
|
1024
1672
|
}
|
|
1025
1673
|
}
|
|
1026
|
-
#
|
|
1674
|
+
#H(e) {
|
|
1027
1675
|
this.#o.setDisabled(e), this.#s.setDisabled(e), this.#c.setDisabled(e), this.#i.classList.toggle("dfk-sql-actions-busy", e);
|
|
1028
1676
|
}
|
|
1029
|
-
#
|
|
1677
|
+
#U(e) {
|
|
1030
1678
|
this.#a.textContent = e;
|
|
1031
1679
|
}
|
|
1032
|
-
#
|
|
1033
|
-
let e =
|
|
1034
|
-
this.#
|
|
1680
|
+
#W() {
|
|
1681
|
+
let e = w.getInstance().message;
|
|
1682
|
+
this.#q(this.#f.initFailed + (e ? `: ${e}` : ""));
|
|
1035
1683
|
}
|
|
1036
|
-
#
|
|
1037
|
-
return this.#T || (this.#T =
|
|
1684
|
+
#G() {
|
|
1685
|
+
return this.#T || (this.#T = u("div", { class: "dfk-sql-result" }), this.#T.slot = "dfk-result", this.appendChild(this.#T)), this.#T.hidden = !1, this.#T;
|
|
1038
1686
|
}
|
|
1039
|
-
#
|
|
1040
|
-
this.#D?.(), this.#D = null, e.error && this.#
|
|
1687
|
+
#K(e) {
|
|
1688
|
+
this.#D?.(), this.#D = null, e.error && this.#R(!1);
|
|
1041
1689
|
let t = {
|
|
1042
|
-
host: this.#
|
|
1690
|
+
host: this.#G(),
|
|
1043
1691
|
config: this.#p,
|
|
1044
1692
|
labels: this.#f,
|
|
1045
|
-
fullscreenButton: this.#d.root
|
|
1693
|
+
fullscreenButton: this.#d.root,
|
|
1694
|
+
onFullscreenChange: (e) => this.#z(e)
|
|
1046
1695
|
};
|
|
1047
|
-
|
|
1696
|
+
_t(this.#p, e)(t, e).then((e) => {
|
|
1048
1697
|
this.#D = e ?? null;
|
|
1049
1698
|
});
|
|
1050
1699
|
}
|
|
1051
|
-
#
|
|
1052
|
-
this.#
|
|
1053
|
-
let t = this.#
|
|
1700
|
+
#q(e) {
|
|
1701
|
+
this.#R(!1);
|
|
1702
|
+
let t = this.#G(), n = t.ownerDocument.createElement("pre");
|
|
1054
1703
|
n.className = "dfk-sql-error", n.textContent = e, t.replaceChildren(n);
|
|
1055
1704
|
}
|
|
1056
|
-
#
|
|
1057
|
-
this.#
|
|
1058
|
-
}
|
|
1059
|
-
}, O = class {
|
|
1060
|
-
root = l("button", {
|
|
1061
|
-
class: "dfk-sql-icon-button",
|
|
1062
|
-
type: "button"
|
|
1063
|
-
});
|
|
1064
|
-
#e = l("iconify-icon", {
|
|
1065
|
-
class: "dfk-sql-icon",
|
|
1066
|
-
attrs: { "aria-hidden": "true" }
|
|
1067
|
-
});
|
|
1068
|
-
constructor(e, t) {
|
|
1069
|
-
this.root.appendChild(this.#e), this.root.addEventListener("click", t), this.setIcon(e);
|
|
1070
|
-
}
|
|
1071
|
-
setIcon(e) {
|
|
1072
|
-
this.#e.setAttribute("icon", e);
|
|
1073
|
-
}
|
|
1074
|
-
setLabel(e) {
|
|
1075
|
-
this.root.setAttribute("data-tip", e), this.root.setAttribute("aria-label", e);
|
|
1076
|
-
}
|
|
1077
|
-
setOn(e) {
|
|
1078
|
-
this.root.classList.toggle("dfk-sql-icon-on", e);
|
|
1079
|
-
}
|
|
1080
|
-
setDisabled(e) {
|
|
1081
|
-
e ? this.root.setAttribute("disabled", "") : this.root.removeAttribute("disabled");
|
|
1705
|
+
#J() {
|
|
1706
|
+
this.#R(!1), this.#D?.(), this.#D = null, this.#T && (this.#T.replaceChildren(), this.#T.hidden = !0);
|
|
1082
1707
|
}
|
|
1083
1708
|
};
|
|
1084
|
-
function
|
|
1709
|
+
function Tt(e) {
|
|
1085
1710
|
return e instanceof Error ? e.message : String(e);
|
|
1086
1711
|
}
|
|
1087
|
-
function
|
|
1712
|
+
function Et(e, t) {
|
|
1088
1713
|
return `${e.error}: ${t}`;
|
|
1089
1714
|
}
|
|
1090
1715
|
//#endregion
|
|
1091
1716
|
//#region ../node_modules/iconify-icon/dist/iconify-icon.mjs
|
|
1092
|
-
var
|
|
1717
|
+
var Dt = Object.freeze({
|
|
1093
1718
|
left: 0,
|
|
1094
1719
|
top: 0,
|
|
1095
1720
|
width: 16,
|
|
1096
1721
|
height: 16
|
|
1097
|
-
}),
|
|
1722
|
+
}), P = Object.freeze({
|
|
1098
1723
|
rotate: 0,
|
|
1099
1724
|
vFlip: !1,
|
|
1100
1725
|
hFlip: !1
|
|
1101
|
-
}),
|
|
1102
|
-
...
|
|
1103
|
-
...
|
|
1104
|
-
}),
|
|
1105
|
-
...
|
|
1726
|
+
}), F = Object.freeze({
|
|
1727
|
+
...Dt,
|
|
1728
|
+
...P
|
|
1729
|
+
}), Ot = Object.freeze({
|
|
1730
|
+
...F,
|
|
1106
1731
|
body: "",
|
|
1107
1732
|
hidden: !1
|
|
1108
|
-
}),
|
|
1733
|
+
}), kt = Object.freeze({
|
|
1109
1734
|
width: null,
|
|
1110
1735
|
height: null
|
|
1111
|
-
}),
|
|
1112
|
-
...
|
|
1113
|
-
...
|
|
1736
|
+
}), At = Object.freeze({
|
|
1737
|
+
...kt,
|
|
1738
|
+
...P
|
|
1114
1739
|
});
|
|
1115
|
-
function
|
|
1740
|
+
function jt(e, t = 0) {
|
|
1116
1741
|
let n = e.replace(/^-?[0-9.]*/, "");
|
|
1117
1742
|
function r(e) {
|
|
1118
1743
|
for (; e < 0;) e += 4;
|
|
@@ -1137,9 +1762,9 @@ function Ge(e, t = 0) {
|
|
|
1137
1762
|
}
|
|
1138
1763
|
return t;
|
|
1139
1764
|
}
|
|
1140
|
-
var
|
|
1141
|
-
function
|
|
1142
|
-
t.split(
|
|
1765
|
+
var Mt = /[\s,]+/;
|
|
1766
|
+
function Nt(e, t) {
|
|
1767
|
+
t.split(Mt).forEach((t) => {
|
|
1143
1768
|
switch (t.trim()) {
|
|
1144
1769
|
case "horizontal":
|
|
1145
1770
|
e.hFlip = !0;
|
|
@@ -1148,19 +1773,19 @@ function qe(e, t) {
|
|
|
1148
1773
|
}
|
|
1149
1774
|
});
|
|
1150
1775
|
}
|
|
1151
|
-
var
|
|
1152
|
-
...
|
|
1776
|
+
var Pt = {
|
|
1777
|
+
...At,
|
|
1153
1778
|
preserveAspectRatio: ""
|
|
1154
1779
|
};
|
|
1155
|
-
function
|
|
1156
|
-
let t = { ...
|
|
1157
|
-
return t.width = n("width", null), t.height = n("height", null), t.rotate =
|
|
1780
|
+
function Ft(e) {
|
|
1781
|
+
let t = { ...Pt }, n = (t, n) => e.getAttribute(t) || n;
|
|
1782
|
+
return t.width = n("width", null), t.height = n("height", null), t.rotate = jt(n("rotate", "")), Nt(t, n("flip", "")), t.preserveAspectRatio = n("preserveAspectRatio", n("preserveaspectratio", "")), t;
|
|
1158
1783
|
}
|
|
1159
|
-
function
|
|
1160
|
-
for (let n in
|
|
1784
|
+
function It(e, t) {
|
|
1785
|
+
for (let n in Pt) if (e[n] !== t[n]) return !0;
|
|
1161
1786
|
return !1;
|
|
1162
1787
|
}
|
|
1163
|
-
var
|
|
1788
|
+
var Lt = /^[a-z0-9]+(-[a-z0-9]+)*$/, I = (e, t, n, r = "") => {
|
|
1164
1789
|
let i = e.split(":");
|
|
1165
1790
|
if (e.slice(0, 1) === "@") {
|
|
1166
1791
|
if (i.length < 2 || i.length > 3) return null;
|
|
@@ -1173,7 +1798,7 @@ var Ze = /^[a-z0-9]+(-[a-z0-9]+)*$/, j = (e, t, n, r = "") => {
|
|
|
1173
1798
|
prefix: n,
|
|
1174
1799
|
name: e
|
|
1175
1800
|
};
|
|
1176
|
-
return t && !
|
|
1801
|
+
return t && !L(a) ? null : a;
|
|
1177
1802
|
}
|
|
1178
1803
|
let a = i[0], o = a.split("-");
|
|
1179
1804
|
if (o.length > 1) {
|
|
@@ -1182,7 +1807,7 @@ var Ze = /^[a-z0-9]+(-[a-z0-9]+)*$/, j = (e, t, n, r = "") => {
|
|
|
1182
1807
|
prefix: o.shift(),
|
|
1183
1808
|
name: o.join("-")
|
|
1184
1809
|
};
|
|
1185
|
-
return t && !
|
|
1810
|
+
return t && !L(e) ? null : e;
|
|
1186
1811
|
}
|
|
1187
1812
|
if (n && r === "") {
|
|
1188
1813
|
let e = {
|
|
@@ -1190,11 +1815,11 @@ var Ze = /^[a-z0-9]+(-[a-z0-9]+)*$/, j = (e, t, n, r = "") => {
|
|
|
1190
1815
|
prefix: "",
|
|
1191
1816
|
name: a
|
|
1192
1817
|
};
|
|
1193
|
-
return t && !
|
|
1818
|
+
return t && !L(e, n) ? null : e;
|
|
1194
1819
|
}
|
|
1195
1820
|
return null;
|
|
1196
|
-
},
|
|
1197
|
-
function
|
|
1821
|
+
}, L = (e, t) => e ? !!((t && e.prefix === "" || e.prefix) && e.name) : !1;
|
|
1822
|
+
function Rt(e, t) {
|
|
1198
1823
|
let n = e.icons, r = e.aliases || Object.create(null), i = Object.create(null);
|
|
1199
1824
|
function a(e) {
|
|
1200
1825
|
if (n[e]) return i[e] = [];
|
|
@@ -1207,65 +1832,65 @@ function Qe(e, t) {
|
|
|
1207
1832
|
}
|
|
1208
1833
|
return Object.keys(n).concat(Object.keys(r)).forEach(a), i;
|
|
1209
1834
|
}
|
|
1210
|
-
function
|
|
1835
|
+
function zt(e, t) {
|
|
1211
1836
|
let n = {};
|
|
1212
1837
|
!e.hFlip != !t.hFlip && (n.hFlip = !0), !e.vFlip != !t.vFlip && (n.vFlip = !0);
|
|
1213
1838
|
let r = ((e.rotate || 0) + (t.rotate || 0)) % 4;
|
|
1214
1839
|
return r && (n.rotate = r), n;
|
|
1215
1840
|
}
|
|
1216
|
-
function
|
|
1217
|
-
let n =
|
|
1218
|
-
for (let r in
|
|
1841
|
+
function Bt(e, t) {
|
|
1842
|
+
let n = zt(e, t);
|
|
1843
|
+
for (let r in Ot) r in P ? r in e && !(r in n) && (n[r] = P[r]) : r in t ? n[r] = t[r] : r in e && (n[r] = e[r]);
|
|
1219
1844
|
return n;
|
|
1220
1845
|
}
|
|
1221
|
-
function
|
|
1846
|
+
function Vt(e, t, n) {
|
|
1222
1847
|
let r = e.icons, i = e.aliases || Object.create(null), a = {};
|
|
1223
1848
|
function o(e) {
|
|
1224
|
-
a =
|
|
1849
|
+
a = Bt(r[e] || i[e], a);
|
|
1225
1850
|
}
|
|
1226
|
-
return o(t), n.forEach(o),
|
|
1851
|
+
return o(t), n.forEach(o), Bt(e, a);
|
|
1227
1852
|
}
|
|
1228
|
-
function
|
|
1853
|
+
function Ht(e, t) {
|
|
1229
1854
|
let n = [];
|
|
1230
1855
|
if (typeof e != "object" || typeof e.icons != "object") return n;
|
|
1231
1856
|
e.not_found instanceof Array && e.not_found.forEach((e) => {
|
|
1232
1857
|
t(e, null), n.push(e);
|
|
1233
1858
|
});
|
|
1234
|
-
let r =
|
|
1859
|
+
let r = Rt(e);
|
|
1235
1860
|
for (let i in r) {
|
|
1236
1861
|
let a = r[i];
|
|
1237
|
-
a && (t(i,
|
|
1862
|
+
a && (t(i, Vt(e, i, a)), n.push(i));
|
|
1238
1863
|
}
|
|
1239
1864
|
return n;
|
|
1240
1865
|
}
|
|
1241
|
-
var
|
|
1866
|
+
var Ut = {
|
|
1242
1867
|
provider: "",
|
|
1243
1868
|
aliases: {},
|
|
1244
1869
|
not_found: {},
|
|
1245
|
-
...
|
|
1870
|
+
...Dt
|
|
1246
1871
|
};
|
|
1247
|
-
function
|
|
1872
|
+
function Wt(e, t) {
|
|
1248
1873
|
for (let n in t) if (n in e && typeof e[n] != typeof t[n]) return !1;
|
|
1249
1874
|
return !0;
|
|
1250
1875
|
}
|
|
1251
|
-
function
|
|
1876
|
+
function Gt(e) {
|
|
1252
1877
|
if (typeof e != "object" || !e) return null;
|
|
1253
1878
|
let t = e;
|
|
1254
|
-
if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !
|
|
1879
|
+
if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !Wt(e, Ut)) return null;
|
|
1255
1880
|
let n = t.icons;
|
|
1256
1881
|
for (let e in n) {
|
|
1257
1882
|
let t = n[e];
|
|
1258
|
-
if (!e || typeof t.body != "string" || !
|
|
1883
|
+
if (!e || typeof t.body != "string" || !Wt(t, Ot)) return null;
|
|
1259
1884
|
}
|
|
1260
1885
|
let r = t.aliases || Object.create(null);
|
|
1261
1886
|
for (let e in r) {
|
|
1262
1887
|
let t = r[e], i = t.parent;
|
|
1263
|
-
if (!e || typeof i != "string" || !n[i] && !r[i] || !
|
|
1888
|
+
if (!e || typeof i != "string" || !n[i] && !r[i] || !Wt(t, Ot)) return null;
|
|
1264
1889
|
}
|
|
1265
1890
|
return t;
|
|
1266
1891
|
}
|
|
1267
|
-
var
|
|
1268
|
-
function
|
|
1892
|
+
var R = Object.create(null);
|
|
1893
|
+
function Kt(e, t) {
|
|
1269
1894
|
return {
|
|
1270
1895
|
provider: e,
|
|
1271
1896
|
prefix: t,
|
|
@@ -1273,78 +1898,78 @@ function at(e, t) {
|
|
|
1273
1898
|
missing: /* @__PURE__ */ new Set()
|
|
1274
1899
|
};
|
|
1275
1900
|
}
|
|
1276
|
-
function
|
|
1277
|
-
let n =
|
|
1278
|
-
return n[t] || (n[t] =
|
|
1901
|
+
function z(e, t) {
|
|
1902
|
+
let n = R[e] || (R[e] = Object.create(null));
|
|
1903
|
+
return n[t] || (n[t] = Kt(e, t));
|
|
1279
1904
|
}
|
|
1280
|
-
function
|
|
1281
|
-
return
|
|
1905
|
+
function qt(e, t) {
|
|
1906
|
+
return Gt(t) ? Ht(t, (t, n) => {
|
|
1282
1907
|
n ? e.icons[t] = n : e.missing.add(t);
|
|
1283
1908
|
}) : [];
|
|
1284
1909
|
}
|
|
1285
|
-
function
|
|
1910
|
+
function Jt(e, t, n) {
|
|
1286
1911
|
try {
|
|
1287
1912
|
if (typeof n.body == "string") return e.icons[t] = { ...n }, !0;
|
|
1288
1913
|
} catch {}
|
|
1289
1914
|
return !1;
|
|
1290
1915
|
}
|
|
1291
|
-
function
|
|
1916
|
+
function Yt(e, t) {
|
|
1292
1917
|
let n = [];
|
|
1293
|
-
return (typeof e == "string" ? [e] : Object.keys(
|
|
1294
|
-
(typeof e == "string" && typeof t == "string" ? [t] : Object.keys(
|
|
1295
|
-
let r =
|
|
1918
|
+
return (typeof e == "string" ? [e] : Object.keys(R)).forEach((e) => {
|
|
1919
|
+
(typeof e == "string" && typeof t == "string" ? [t] : Object.keys(R[e] || {})).forEach((t) => {
|
|
1920
|
+
let r = z(e, t);
|
|
1296
1921
|
n = n.concat(Object.keys(r.icons).map((n) => (e === "" ? "" : "@" + e + ":") + t + ":" + n));
|
|
1297
1922
|
});
|
|
1298
1923
|
}), n;
|
|
1299
1924
|
}
|
|
1300
|
-
var
|
|
1301
|
-
function
|
|
1302
|
-
return typeof e == "boolean" && (
|
|
1925
|
+
var B = !1;
|
|
1926
|
+
function Xt(e) {
|
|
1927
|
+
return typeof e == "boolean" && (B = e), B;
|
|
1303
1928
|
}
|
|
1304
|
-
function
|
|
1305
|
-
let t = typeof e == "string" ?
|
|
1929
|
+
function V(e) {
|
|
1930
|
+
let t = typeof e == "string" ? I(e, !0, B) : e;
|
|
1306
1931
|
if (t) {
|
|
1307
|
-
let e =
|
|
1932
|
+
let e = z(t.provider, t.prefix), n = t.name;
|
|
1308
1933
|
return e.icons[n] || (e.missing.has(n) ? null : void 0);
|
|
1309
1934
|
}
|
|
1310
1935
|
}
|
|
1311
|
-
function
|
|
1312
|
-
let n =
|
|
1936
|
+
function Zt(e, t) {
|
|
1937
|
+
let n = I(e, !0, B);
|
|
1313
1938
|
if (!n) return !1;
|
|
1314
|
-
let r =
|
|
1315
|
-
return t ?
|
|
1939
|
+
let r = z(n.provider, n.prefix);
|
|
1940
|
+
return t ? Jt(r, n.name, t) : (r.missing.add(n.name), !0);
|
|
1316
1941
|
}
|
|
1317
|
-
function
|
|
1942
|
+
function Qt(e, t) {
|
|
1318
1943
|
if (typeof e != "object") return !1;
|
|
1319
|
-
if (typeof t != "string" && (t = e.provider || ""),
|
|
1944
|
+
if (typeof t != "string" && (t = e.provider || ""), B && !t && !e.prefix) {
|
|
1320
1945
|
let t = !1;
|
|
1321
|
-
return
|
|
1322
|
-
|
|
1946
|
+
return Gt(e) && (e.prefix = "", Ht(e, (e, n) => {
|
|
1947
|
+
Zt(e, n) && (t = !0);
|
|
1323
1948
|
})), t;
|
|
1324
1949
|
}
|
|
1325
1950
|
let n = e.prefix;
|
|
1326
|
-
return
|
|
1951
|
+
return L({
|
|
1327
1952
|
prefix: n,
|
|
1328
1953
|
name: "a"
|
|
1329
|
-
}) ? !!
|
|
1954
|
+
}) ? !!qt(z(t, n), e) : !1;
|
|
1330
1955
|
}
|
|
1331
|
-
function
|
|
1332
|
-
return !!
|
|
1956
|
+
function $t(e) {
|
|
1957
|
+
return !!V(e);
|
|
1333
1958
|
}
|
|
1334
|
-
function
|
|
1335
|
-
let t =
|
|
1959
|
+
function en(e) {
|
|
1960
|
+
let t = V(e);
|
|
1336
1961
|
return t && {
|
|
1337
|
-
...
|
|
1962
|
+
...F,
|
|
1338
1963
|
...t
|
|
1339
1964
|
};
|
|
1340
1965
|
}
|
|
1341
|
-
function
|
|
1966
|
+
function tn(e, t) {
|
|
1342
1967
|
e.forEach((e) => {
|
|
1343
1968
|
let n = e.loaderCallbacks;
|
|
1344
1969
|
n && (e.loaderCallbacks = n.filter((e) => e.id !== t));
|
|
1345
1970
|
});
|
|
1346
1971
|
}
|
|
1347
|
-
function
|
|
1972
|
+
function nn(e) {
|
|
1348
1973
|
e.pendingCallbacksFlag || (e.pendingCallbacksFlag = !0, setTimeout(() => {
|
|
1349
1974
|
e.pendingCallbacksFlag = !1;
|
|
1350
1975
|
let t = e.loaderCallbacks ? e.loaderCallbacks.slice(0) : [];
|
|
@@ -1367,13 +1992,13 @@ function ht(e) {
|
|
|
1367
1992
|
});
|
|
1368
1993
|
else return n = !0, !0;
|
|
1369
1994
|
return !1;
|
|
1370
|
-
}), a.pending.length !== o && (n ||
|
|
1995
|
+
}), a.pending.length !== o && (n || tn([e], t.id), t.callback(a.loaded.slice(0), a.missing.slice(0), a.pending.slice(0), t.abort));
|
|
1371
1996
|
});
|
|
1372
1997
|
}));
|
|
1373
1998
|
}
|
|
1374
|
-
var
|
|
1375
|
-
function
|
|
1376
|
-
let r =
|
|
1999
|
+
var rn = 0;
|
|
2000
|
+
function an(e, t, n) {
|
|
2001
|
+
let r = rn++, i = tn.bind(null, n, r);
|
|
1377
2002
|
if (!t.pending.length) return i;
|
|
1378
2003
|
let a = {
|
|
1379
2004
|
id: r,
|
|
@@ -1385,7 +2010,7 @@ function _t(e, t, n) {
|
|
|
1385
2010
|
(e.loaderCallbacks ||= []).push(a);
|
|
1386
2011
|
}), i;
|
|
1387
2012
|
}
|
|
1388
|
-
function
|
|
2013
|
+
function on(e) {
|
|
1389
2014
|
let t = {
|
|
1390
2015
|
loaded: [],
|
|
1391
2016
|
missing: [],
|
|
@@ -1400,7 +2025,7 @@ function vt(e) {
|
|
|
1400
2025
|
return e.forEach((e) => {
|
|
1401
2026
|
if (r.name === e.name && r.prefix === e.prefix && r.provider === e.provider) return;
|
|
1402
2027
|
r = e;
|
|
1403
|
-
let i = e.provider, a = e.prefix, o = e.name, s = n[i] || (n[i] = Object.create(null)), c = s[a] || (s[a] =
|
|
2028
|
+
let i = e.provider, a = e.prefix, o = e.name, s = n[i] || (n[i] = Object.create(null)), c = s[a] || (s[a] = z(i, a)), l;
|
|
1404
2029
|
l = o in c.icons ? t.loaded : a === "" || c.missing.has(o) ? t.missing : t.pending;
|
|
1405
2030
|
let u = {
|
|
1406
2031
|
provider: i,
|
|
@@ -1410,21 +2035,21 @@ function vt(e) {
|
|
|
1410
2035
|
l.push(u);
|
|
1411
2036
|
}), t;
|
|
1412
2037
|
}
|
|
1413
|
-
var
|
|
1414
|
-
function
|
|
1415
|
-
|
|
2038
|
+
var H = Object.create(null);
|
|
2039
|
+
function sn(e, t) {
|
|
2040
|
+
H[e] = t;
|
|
1416
2041
|
}
|
|
1417
|
-
function
|
|
1418
|
-
return
|
|
2042
|
+
function U(e) {
|
|
2043
|
+
return H[e] || H[""];
|
|
1419
2044
|
}
|
|
1420
|
-
function
|
|
2045
|
+
function cn(e, t = !0, n = !1) {
|
|
1421
2046
|
let r = [];
|
|
1422
2047
|
return e.forEach((e) => {
|
|
1423
|
-
let i = typeof e == "string" ?
|
|
2048
|
+
let i = typeof e == "string" ? I(e, t, n) : e;
|
|
1424
2049
|
i && r.push(i);
|
|
1425
2050
|
}), r;
|
|
1426
2051
|
}
|
|
1427
|
-
function
|
|
2052
|
+
function W(e) {
|
|
1428
2053
|
let t;
|
|
1429
2054
|
if (typeof e.resources == "string") t = [e.resources];
|
|
1430
2055
|
else if (t = e.resources, !(t instanceof Array) || !t.length) return null;
|
|
@@ -1439,19 +2064,19 @@ function B(e) {
|
|
|
1439
2064
|
dataAfterTimeout: e.dataAfterTimeout !== !1
|
|
1440
2065
|
};
|
|
1441
2066
|
}
|
|
1442
|
-
for (var
|
|
1443
|
-
|
|
1444
|
-
function
|
|
1445
|
-
let n =
|
|
1446
|
-
return n !== null && (
|
|
2067
|
+
for (var G = Object.create(null), K = ["https://api.simplesvg.com", "https://api.unisvg.com"], ln = []; K.length > 0;) K.length === 1 || Math.random() > .5 ? ln.push(K.shift()) : ln.push(K.pop());
|
|
2068
|
+
G[""] = W({ resources: ["https://api.iconify.design"].concat(ln) });
|
|
2069
|
+
function un(e, t) {
|
|
2070
|
+
let n = W(t);
|
|
2071
|
+
return n !== null && (G[e] = n, !0);
|
|
1447
2072
|
}
|
|
1448
|
-
function
|
|
1449
|
-
return
|
|
2073
|
+
function q(e) {
|
|
2074
|
+
return G[e];
|
|
1450
2075
|
}
|
|
1451
|
-
function
|
|
1452
|
-
return Object.keys(
|
|
2076
|
+
function dn() {
|
|
2077
|
+
return Object.keys(G);
|
|
1453
2078
|
}
|
|
1454
|
-
var
|
|
2079
|
+
var fn = {
|
|
1455
2080
|
resources: [],
|
|
1456
2081
|
index: 0,
|
|
1457
2082
|
timeout: 2e3,
|
|
@@ -1459,7 +2084,7 @@ var Ct = {
|
|
|
1459
2084
|
random: !1,
|
|
1460
2085
|
dataAfterTimeout: !1
|
|
1461
2086
|
};
|
|
1462
|
-
function
|
|
2087
|
+
function pn(e, t, n, r) {
|
|
1463
2088
|
let i = e.resources.length, a = e.random ? Math.floor(Math.random() * i) : e.index, o;
|
|
1464
2089
|
if (e.random) {
|
|
1465
2090
|
let t = e.resources.slice(0);
|
|
@@ -1474,23 +2099,23 @@ function wt(e, t, n, r) {
|
|
|
1474
2099
|
function m() {
|
|
1475
2100
|
d &&= (clearTimeout(d), null);
|
|
1476
2101
|
}
|
|
1477
|
-
function
|
|
2102
|
+
function ee() {
|
|
1478
2103
|
c === "pending" && (c = "aborted"), m(), f.forEach((e) => {
|
|
1479
2104
|
e.status === "pending" && (e.status = "aborted");
|
|
1480
2105
|
}), f = [];
|
|
1481
2106
|
}
|
|
1482
|
-
function
|
|
2107
|
+
function te(e, t) {
|
|
1483
2108
|
t && (p = []), typeof e == "function" && p.push(e);
|
|
1484
2109
|
}
|
|
1485
|
-
function
|
|
2110
|
+
function h() {
|
|
1486
2111
|
return {
|
|
1487
2112
|
startTime: s,
|
|
1488
2113
|
payload: t,
|
|
1489
2114
|
status: c,
|
|
1490
2115
|
queriesSent: l,
|
|
1491
2116
|
queriesPending: f.length,
|
|
1492
|
-
subscribe:
|
|
1493
|
-
abort:
|
|
2117
|
+
subscribe: te,
|
|
2118
|
+
abort: ee
|
|
1494
2119
|
};
|
|
1495
2120
|
}
|
|
1496
2121
|
function g() {
|
|
@@ -1551,18 +2176,18 @@ function wt(e, t, n, r) {
|
|
|
1551
2176
|
};
|
|
1552
2177
|
f.push(i), l++, d = setTimeout(v, e.rotate), n(r, t, i.callback);
|
|
1553
2178
|
}
|
|
1554
|
-
return setTimeout(v),
|
|
2179
|
+
return setTimeout(v), h;
|
|
1555
2180
|
}
|
|
1556
|
-
function
|
|
2181
|
+
function mn(e) {
|
|
1557
2182
|
let t = {
|
|
1558
|
-
...
|
|
2183
|
+
...fn,
|
|
1559
2184
|
...e
|
|
1560
2185
|
}, n = [];
|
|
1561
2186
|
function r() {
|
|
1562
2187
|
n = n.filter((e) => e().status === "pending");
|
|
1563
2188
|
}
|
|
1564
2189
|
function i(e, i, a) {
|
|
1565
|
-
let o =
|
|
2190
|
+
let o = pn(t, e, i, (e, t) => {
|
|
1566
2191
|
r(), a && a(e, t);
|
|
1567
2192
|
});
|
|
1568
2193
|
return n.push(o), o;
|
|
@@ -1580,53 +2205,53 @@ function Tt(e) {
|
|
|
1580
2205
|
cleanup: r
|
|
1581
2206
|
};
|
|
1582
2207
|
}
|
|
1583
|
-
function
|
|
1584
|
-
var
|
|
1585
|
-
function
|
|
1586
|
-
if (!
|
|
1587
|
-
let t =
|
|
2208
|
+
function hn() {}
|
|
2209
|
+
var gn = Object.create(null);
|
|
2210
|
+
function _n(e) {
|
|
2211
|
+
if (!gn[e]) {
|
|
2212
|
+
let t = q(e);
|
|
1588
2213
|
if (!t) return;
|
|
1589
|
-
|
|
2214
|
+
gn[e] = {
|
|
1590
2215
|
config: t,
|
|
1591
|
-
redundancy:
|
|
2216
|
+
redundancy: mn(t)
|
|
1592
2217
|
};
|
|
1593
2218
|
}
|
|
1594
|
-
return
|
|
2219
|
+
return gn[e];
|
|
1595
2220
|
}
|
|
1596
|
-
function
|
|
2221
|
+
function vn(e, t, n) {
|
|
1597
2222
|
let r, i;
|
|
1598
2223
|
if (typeof e == "string") {
|
|
1599
|
-
let t =
|
|
1600
|
-
if (!t) return n(void 0, 424),
|
|
2224
|
+
let t = U(e);
|
|
2225
|
+
if (!t) return n(void 0, 424), hn;
|
|
1601
2226
|
i = t.send;
|
|
1602
|
-
let a =
|
|
2227
|
+
let a = _n(e);
|
|
1603
2228
|
a && (r = a.redundancy);
|
|
1604
2229
|
} else {
|
|
1605
|
-
let t =
|
|
2230
|
+
let t = W(e);
|
|
1606
2231
|
if (t) {
|
|
1607
|
-
r =
|
|
1608
|
-
let n =
|
|
2232
|
+
r = mn(t);
|
|
2233
|
+
let n = U(e.resources ? e.resources[0] : "");
|
|
1609
2234
|
n && (i = n.send);
|
|
1610
2235
|
}
|
|
1611
2236
|
}
|
|
1612
|
-
return !r || !i ? (n(void 0, 424),
|
|
2237
|
+
return !r || !i ? (n(void 0, 424), hn) : r.query(t, i, n)().abort;
|
|
1613
2238
|
}
|
|
1614
|
-
function
|
|
1615
|
-
function
|
|
2239
|
+
function yn() {}
|
|
2240
|
+
function bn(e) {
|
|
1616
2241
|
e.iconsLoaderFlag || (e.iconsLoaderFlag = !0, setTimeout(() => {
|
|
1617
|
-
e.iconsLoaderFlag = !1,
|
|
2242
|
+
e.iconsLoaderFlag = !1, nn(e);
|
|
1618
2243
|
}));
|
|
1619
2244
|
}
|
|
1620
|
-
function
|
|
2245
|
+
function xn(e) {
|
|
1621
2246
|
let t = [], n = [];
|
|
1622
2247
|
return e.forEach((e) => {
|
|
1623
|
-
(e.match(
|
|
2248
|
+
(e.match(Lt) ? t : n).push(e);
|
|
1624
2249
|
}), {
|
|
1625
2250
|
valid: t,
|
|
1626
2251
|
invalid: n
|
|
1627
2252
|
};
|
|
1628
2253
|
}
|
|
1629
|
-
function
|
|
2254
|
+
function J(e, t, n) {
|
|
1630
2255
|
function r() {
|
|
1631
2256
|
let n = e.pendingIcons;
|
|
1632
2257
|
t.forEach((t) => {
|
|
@@ -1634,38 +2259,38 @@ function K(e, t, n) {
|
|
|
1634
2259
|
});
|
|
1635
2260
|
}
|
|
1636
2261
|
if (n && typeof n == "object") try {
|
|
1637
|
-
if (!
|
|
2262
|
+
if (!qt(e, n).length) {
|
|
1638
2263
|
r();
|
|
1639
2264
|
return;
|
|
1640
2265
|
}
|
|
1641
2266
|
} catch (e) {
|
|
1642
2267
|
console.error(e);
|
|
1643
2268
|
}
|
|
1644
|
-
r(),
|
|
2269
|
+
r(), bn(e);
|
|
1645
2270
|
}
|
|
1646
|
-
function
|
|
2271
|
+
function Sn(e, t) {
|
|
1647
2272
|
e instanceof Promise ? e.then((e) => {
|
|
1648
2273
|
t(e);
|
|
1649
2274
|
}).catch(() => {
|
|
1650
2275
|
t(null);
|
|
1651
2276
|
}) : t(e);
|
|
1652
2277
|
}
|
|
1653
|
-
function
|
|
2278
|
+
function Cn(e, t) {
|
|
1654
2279
|
e.iconsToLoad = e.iconsToLoad ? e.iconsToLoad.concat(t).sort() : t, e.iconsQueueFlag || (e.iconsQueueFlag = !0, setTimeout(() => {
|
|
1655
2280
|
e.iconsQueueFlag = !1;
|
|
1656
2281
|
let { provider: t, prefix: n } = e, r = e.iconsToLoad;
|
|
1657
2282
|
if (delete e.iconsToLoad, !r || !r.length) return;
|
|
1658
2283
|
let i = e.loadIcon;
|
|
1659
2284
|
if (e.loadIcons && (r.length > 1 || !i)) {
|
|
1660
|
-
|
|
1661
|
-
|
|
2285
|
+
Sn(e.loadIcons(r, n, t), (t) => {
|
|
2286
|
+
J(e, r, t);
|
|
1662
2287
|
});
|
|
1663
2288
|
return;
|
|
1664
2289
|
}
|
|
1665
2290
|
if (i) {
|
|
1666
2291
|
r.forEach((r) => {
|
|
1667
|
-
|
|
1668
|
-
|
|
2292
|
+
Sn(i(r, n, t), (t) => {
|
|
2293
|
+
J(e, [r], t ? {
|
|
1669
2294
|
prefix: n,
|
|
1670
2295
|
icons: { [r]: t }
|
|
1671
2296
|
} : null);
|
|
@@ -1673,26 +2298,26 @@ function Nt(e, t) {
|
|
|
1673
2298
|
});
|
|
1674
2299
|
return;
|
|
1675
2300
|
}
|
|
1676
|
-
let { valid: a, invalid: o } =
|
|
1677
|
-
if (o.length &&
|
|
1678
|
-
let s = n.match(
|
|
2301
|
+
let { valid: a, invalid: o } = xn(r);
|
|
2302
|
+
if (o.length && J(e, o, null), !a.length) return;
|
|
2303
|
+
let s = n.match(Lt) ? U(t) : null;
|
|
1679
2304
|
if (!s) {
|
|
1680
|
-
|
|
2305
|
+
J(e, a, null);
|
|
1681
2306
|
return;
|
|
1682
2307
|
}
|
|
1683
2308
|
s.prepare(t, n, a).forEach((n) => {
|
|
1684
|
-
|
|
1685
|
-
|
|
2309
|
+
vn(t, n, (t) => {
|
|
2310
|
+
J(e, n.icons, t);
|
|
1686
2311
|
});
|
|
1687
2312
|
});
|
|
1688
2313
|
}));
|
|
1689
2314
|
}
|
|
1690
|
-
var
|
|
1691
|
-
let n =
|
|
2315
|
+
var wn = (e, t) => {
|
|
2316
|
+
let n = on(cn(e, !0, Xt()));
|
|
1692
2317
|
if (!n.pending.length) {
|
|
1693
2318
|
let e = !0;
|
|
1694
2319
|
return t && setTimeout(() => {
|
|
1695
|
-
e && t(n.loaded, n.missing, n.pending,
|
|
2320
|
+
e && t(n.loaded, n.missing, n.pending, yn);
|
|
1696
2321
|
}), () => {
|
|
1697
2322
|
e = !1;
|
|
1698
2323
|
};
|
|
@@ -1701,28 +2326,28 @@ var q = (e, t) => {
|
|
|
1701
2326
|
return n.pending.forEach((e) => {
|
|
1702
2327
|
let { provider: t, prefix: n } = e;
|
|
1703
2328
|
if (n === o && t === a) return;
|
|
1704
|
-
a = t, o = n, i.push(
|
|
2329
|
+
a = t, o = n, i.push(z(t, n));
|
|
1705
2330
|
let s = r[t] || (r[t] = Object.create(null));
|
|
1706
2331
|
s[n] || (s[n] = []);
|
|
1707
2332
|
}), n.pending.forEach((e) => {
|
|
1708
|
-
let { provider: t, prefix: n, name: i } = e, a =
|
|
2333
|
+
let { provider: t, prefix: n, name: i } = e, a = z(t, n), o = a.pendingIcons ||= /* @__PURE__ */ new Set();
|
|
1709
2334
|
o.has(i) || (o.add(i), r[t][n].push(i));
|
|
1710
2335
|
}), i.forEach((e) => {
|
|
1711
2336
|
let t = r[e.provider][e.prefix];
|
|
1712
|
-
t.length &&
|
|
1713
|
-
}), t ?
|
|
1714
|
-
},
|
|
1715
|
-
let r = typeof e == "string" ?
|
|
2337
|
+
t.length && Cn(e, t);
|
|
2338
|
+
}), t ? an(t, n, i) : yn;
|
|
2339
|
+
}, Tn = (e) => new Promise((t, n) => {
|
|
2340
|
+
let r = typeof e == "string" ? I(e, !0) : e;
|
|
1716
2341
|
if (!r) {
|
|
1717
2342
|
n(e);
|
|
1718
2343
|
return;
|
|
1719
2344
|
}
|
|
1720
|
-
|
|
2345
|
+
wn([r || e], (i) => {
|
|
1721
2346
|
if (i.length && r) {
|
|
1722
|
-
let e =
|
|
2347
|
+
let e = V(r);
|
|
1723
2348
|
if (e) {
|
|
1724
2349
|
t({
|
|
1725
|
-
...
|
|
2350
|
+
...F,
|
|
1726
2351
|
...e
|
|
1727
2352
|
});
|
|
1728
2353
|
return;
|
|
@@ -1731,28 +2356,28 @@ var q = (e, t) => {
|
|
|
1731
2356
|
n(e);
|
|
1732
2357
|
});
|
|
1733
2358
|
});
|
|
1734
|
-
function
|
|
2359
|
+
function En(e) {
|
|
1735
2360
|
try {
|
|
1736
2361
|
let t = typeof e == "string" ? JSON.parse(e) : e;
|
|
1737
2362
|
if (typeof t.body == "string") return { ...t };
|
|
1738
2363
|
} catch {}
|
|
1739
2364
|
}
|
|
1740
|
-
function
|
|
2365
|
+
function Dn(e, t) {
|
|
1741
2366
|
if (typeof e == "object") return {
|
|
1742
|
-
data:
|
|
2367
|
+
data: En(e),
|
|
1743
2368
|
value: e
|
|
1744
2369
|
};
|
|
1745
2370
|
if (typeof e != "string") return { value: e };
|
|
1746
2371
|
if (e.includes("{")) {
|
|
1747
|
-
let t =
|
|
2372
|
+
let t = En(e);
|
|
1748
2373
|
if (t) return {
|
|
1749
2374
|
data: t,
|
|
1750
2375
|
value: e
|
|
1751
2376
|
};
|
|
1752
2377
|
}
|
|
1753
|
-
let n =
|
|
2378
|
+
let n = I(e, !0, !0);
|
|
1754
2379
|
if (!n) return { value: e };
|
|
1755
|
-
let r =
|
|
2380
|
+
let r = V(n);
|
|
1756
2381
|
return r !== void 0 || !n.prefix ? {
|
|
1757
2382
|
value: e,
|
|
1758
2383
|
name: n,
|
|
@@ -1760,29 +2385,29 @@ function It(e, t) {
|
|
|
1760
2385
|
} : {
|
|
1761
2386
|
value: e,
|
|
1762
2387
|
name: n,
|
|
1763
|
-
loading:
|
|
2388
|
+
loading: wn([n], () => t(e, n, V(n)))
|
|
1764
2389
|
};
|
|
1765
2390
|
}
|
|
1766
|
-
var
|
|
2391
|
+
var On = !1;
|
|
1767
2392
|
try {
|
|
1768
|
-
|
|
2393
|
+
On = navigator.vendor.indexOf("Apple") === 0;
|
|
1769
2394
|
} catch {}
|
|
1770
|
-
function
|
|
2395
|
+
function kn(e, t) {
|
|
1771
2396
|
switch (t) {
|
|
1772
2397
|
case "svg":
|
|
1773
2398
|
case "bg":
|
|
1774
2399
|
case "mask": return t;
|
|
1775
2400
|
}
|
|
1776
|
-
return t !== "style" && (
|
|
2401
|
+
return t !== "style" && (On || e.indexOf("<a") === -1) ? "svg" : e.indexOf("currentColor") === -1 ? "bg" : "mask";
|
|
1777
2402
|
}
|
|
1778
|
-
var
|
|
1779
|
-
function
|
|
2403
|
+
var An = /(-?[0-9.]*[0-9]+[0-9.]*)/g, jn = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
|
|
2404
|
+
function Mn(e, t, n) {
|
|
1780
2405
|
if (t === 1) return e;
|
|
1781
2406
|
if (n ||= 100, typeof e == "number") return Math.ceil(e * t * n) / n;
|
|
1782
2407
|
if (typeof e != "string") return e;
|
|
1783
|
-
let r = e.split(
|
|
2408
|
+
let r = e.split(An);
|
|
1784
2409
|
if (r === null || !r.length) return e;
|
|
1785
|
-
let i = [], a = r.shift(), o =
|
|
2410
|
+
let i = [], a = r.shift(), o = jn.test(a);
|
|
1786
2411
|
for (;;) {
|
|
1787
2412
|
if (o) {
|
|
1788
2413
|
let e = parseFloat(a);
|
|
@@ -1792,7 +2417,7 @@ function J(e, t, n) {
|
|
|
1792
2417
|
o = !o;
|
|
1793
2418
|
}
|
|
1794
2419
|
}
|
|
1795
|
-
function
|
|
2420
|
+
function Nn(e, t = "defs") {
|
|
1796
2421
|
let n = "", r = e.indexOf("<" + t);
|
|
1797
2422
|
for (; r >= 0;) {
|
|
1798
2423
|
let i = e.indexOf(">", r), a = e.indexOf("</" + t);
|
|
@@ -1806,20 +2431,20 @@ function Vt(e, t = "defs") {
|
|
|
1806
2431
|
content: e
|
|
1807
2432
|
};
|
|
1808
2433
|
}
|
|
1809
|
-
function
|
|
2434
|
+
function Pn(e, t) {
|
|
1810
2435
|
return e ? "<defs>" + e + "</defs>" + t : t;
|
|
1811
2436
|
}
|
|
1812
|
-
function
|
|
1813
|
-
let r =
|
|
1814
|
-
return
|
|
2437
|
+
function Fn(e, t, n) {
|
|
2438
|
+
let r = Nn(e);
|
|
2439
|
+
return Pn(r.defs, t + r.content + n);
|
|
1815
2440
|
}
|
|
1816
|
-
var
|
|
1817
|
-
function
|
|
2441
|
+
var In = (e) => e === "unset" || e === "undefined" || e === "none";
|
|
2442
|
+
function Ln(e, t) {
|
|
1818
2443
|
let n = {
|
|
1819
|
-
...
|
|
2444
|
+
...F,
|
|
1820
2445
|
...e
|
|
1821
2446
|
}, r = {
|
|
1822
|
-
...
|
|
2447
|
+
...At,
|
|
1823
2448
|
...t
|
|
1824
2449
|
}, i = {
|
|
1825
2450
|
left: n.left,
|
|
@@ -1840,12 +2465,12 @@ function Gt(e, t) {
|
|
|
1840
2465
|
break;
|
|
1841
2466
|
case 3: s = i.width / 2 + i.left, t.unshift("rotate(-90 " + s.toString() + " " + s.toString() + ")");
|
|
1842
2467
|
}
|
|
1843
|
-
o % 2 == 1 && (i.left !== i.top && (s = i.left, i.left = i.top, i.top = s), i.width !== i.height && (s = i.width, i.width = i.height, i.height = s)), t.length && (a =
|
|
2468
|
+
o % 2 == 1 && (i.left !== i.top && (s = i.left, i.left = i.top, i.top = s), i.width !== i.height && (s = i.width, i.width = i.height, i.height = s)), t.length && (a = Fn(a, "<g transform=\"" + t.join(" ") + "\">", "</g>"));
|
|
1844
2469
|
});
|
|
1845
2470
|
let o = r.width, s = r.height, c = i.width, l = i.height, u, d;
|
|
1846
|
-
o === null ? (d = s === null ? "1em" : s === "auto" ? l : s, u =
|
|
2471
|
+
o === null ? (d = s === null ? "1em" : s === "auto" ? l : s, u = Mn(d, c / l)) : (u = o === "auto" ? c : o, d = s === null ? Mn(u, l / c) : s === "auto" ? l : s);
|
|
1847
2472
|
let f = {}, p = (e, t) => {
|
|
1848
|
-
|
|
2473
|
+
In(t) || (f[e] = t.toString());
|
|
1849
2474
|
};
|
|
1850
2475
|
p("width", u), p("height", d);
|
|
1851
2476
|
let m = [
|
|
@@ -1860,19 +2485,19 @@ function Gt(e, t) {
|
|
|
1860
2485
|
body: a
|
|
1861
2486
|
};
|
|
1862
2487
|
}
|
|
1863
|
-
function
|
|
2488
|
+
function Rn(e, t) {
|
|
1864
2489
|
let n = e.indexOf("xlink:") === -1 ? "" : " xmlns:xlink=\"http://www.w3.org/1999/xlink\"";
|
|
1865
2490
|
for (let e in t) n += " " + e + "=\"" + t[e] + "\"";
|
|
1866
2491
|
return "<svg xmlns=\"http://www.w3.org/2000/svg\"" + n + ">" + e + "</svg>";
|
|
1867
2492
|
}
|
|
1868
|
-
function
|
|
2493
|
+
function zn(e) {
|
|
1869
2494
|
return e.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ").replace(/:/g, "%3A").replace(/\//g, "%2F");
|
|
1870
2495
|
}
|
|
1871
|
-
function
|
|
1872
|
-
return "data:image/svg+xml," +
|
|
2496
|
+
function Bn(e) {
|
|
2497
|
+
return "data:image/svg+xml," + zn(e);
|
|
1873
2498
|
}
|
|
1874
|
-
function
|
|
1875
|
-
return "url(\"" +
|
|
2499
|
+
function Vn(e) {
|
|
2500
|
+
return "url(\"" + Bn(e) + "\")";
|
|
1876
2501
|
}
|
|
1877
2502
|
var Y = (() => {
|
|
1878
2503
|
let e;
|
|
@@ -1880,14 +2505,14 @@ var Y = (() => {
|
|
|
1880
2505
|
if (e = fetch, typeof e == "function") return e;
|
|
1881
2506
|
} catch {}
|
|
1882
2507
|
})();
|
|
1883
|
-
function
|
|
2508
|
+
function Hn(e) {
|
|
1884
2509
|
Y = e;
|
|
1885
2510
|
}
|
|
1886
|
-
function
|
|
2511
|
+
function Un() {
|
|
1887
2512
|
return Y;
|
|
1888
2513
|
}
|
|
1889
|
-
function
|
|
1890
|
-
let n =
|
|
2514
|
+
function Wn(e, t) {
|
|
2515
|
+
let n = q(e);
|
|
1891
2516
|
if (!n) return 0;
|
|
1892
2517
|
let r;
|
|
1893
2518
|
if (!n.maxURL) r = 0;
|
|
@@ -1901,11 +2526,11 @@ function Qt(e, t) {
|
|
|
1901
2526
|
}
|
|
1902
2527
|
return r;
|
|
1903
2528
|
}
|
|
1904
|
-
function
|
|
2529
|
+
function Gn(e) {
|
|
1905
2530
|
return e === 404;
|
|
1906
2531
|
}
|
|
1907
|
-
var
|
|
1908
|
-
let r = [], i =
|
|
2532
|
+
var Kn = (e, t, n) => {
|
|
2533
|
+
let r = [], i = Wn(e, t), a = "icons", o = {
|
|
1909
2534
|
type: a,
|
|
1910
2535
|
provider: e,
|
|
1911
2536
|
prefix: t,
|
|
@@ -1920,21 +2545,21 @@ var en = (e, t, n) => {
|
|
|
1920
2545
|
}, s = n.length), o.icons.push(n);
|
|
1921
2546
|
}), r.push(o), r;
|
|
1922
2547
|
};
|
|
1923
|
-
function
|
|
2548
|
+
function qn(e) {
|
|
1924
2549
|
if (typeof e == "string") {
|
|
1925
|
-
let t =
|
|
2550
|
+
let t = q(e);
|
|
1926
2551
|
if (t) return t.path;
|
|
1927
2552
|
}
|
|
1928
2553
|
return "/";
|
|
1929
2554
|
}
|
|
1930
|
-
var
|
|
1931
|
-
prepare:
|
|
2555
|
+
var Jn = {
|
|
2556
|
+
prepare: Kn,
|
|
1932
2557
|
send: (e, t, n) => {
|
|
1933
2558
|
if (!Y) {
|
|
1934
2559
|
n("abort", 424);
|
|
1935
2560
|
return;
|
|
1936
2561
|
}
|
|
1937
|
-
let r =
|
|
2562
|
+
let r = qn(t.provider);
|
|
1938
2563
|
switch (t.type) {
|
|
1939
2564
|
case "icons": {
|
|
1940
2565
|
let e = t.prefix, n = t.icons.join(","), i = new URLSearchParams({ icons: n });
|
|
@@ -1955,7 +2580,7 @@ var nn = {
|
|
|
1955
2580
|
let t = e.status;
|
|
1956
2581
|
if (t !== 200) {
|
|
1957
2582
|
setTimeout(() => {
|
|
1958
|
-
n(
|
|
2583
|
+
n(Gn(t) ? "abort" : "next", t);
|
|
1959
2584
|
});
|
|
1960
2585
|
return;
|
|
1961
2586
|
}
|
|
@@ -1975,38 +2600,38 @@ var nn = {
|
|
|
1975
2600
|
});
|
|
1976
2601
|
}
|
|
1977
2602
|
};
|
|
1978
|
-
function
|
|
1979
|
-
|
|
2603
|
+
function Yn(e, t, n) {
|
|
2604
|
+
z(n || "", t).loadIcons = e;
|
|
1980
2605
|
}
|
|
1981
|
-
function
|
|
1982
|
-
|
|
2606
|
+
function Xn(e, t, n) {
|
|
2607
|
+
z(n || "", t).loadIcon = e;
|
|
1983
2608
|
}
|
|
1984
|
-
var
|
|
2609
|
+
var Zn = "data-style", Qn = "", X = {};
|
|
1985
2610
|
function Z(e) {
|
|
1986
|
-
return ":host{display:inline-block;vertical-align:" + (e ? "-0.125em" : "0") + "}span,svg{display:block;margin:auto}" +
|
|
2611
|
+
return ":host{display:inline-block;vertical-align:" + (e ? "-0.125em" : "0") + "}span,svg{display:block;margin:auto}" + Qn;
|
|
1987
2612
|
}
|
|
1988
|
-
function
|
|
2613
|
+
function $n(e) {
|
|
1989
2614
|
return "adoptedStyleSheets" in e && typeof CSSStyleSheet == "function" && typeof CSSStyleSheet.prototype.replaceSync == "function";
|
|
1990
2615
|
}
|
|
1991
|
-
function
|
|
2616
|
+
function er(e) {
|
|
1992
2617
|
let t = e ? "inline" : "block", n = X[t];
|
|
1993
2618
|
return n || (n = X[t] = new CSSStyleSheet(), n.replaceSync(Z(e))), n;
|
|
1994
2619
|
}
|
|
1995
|
-
function
|
|
1996
|
-
|
|
2620
|
+
function tr(e) {
|
|
2621
|
+
Qn = e, X.inline?.replaceSync(Z(!0)), X.block?.replaceSync(Z(!1));
|
|
1997
2622
|
}
|
|
1998
|
-
function
|
|
1999
|
-
if (
|
|
2000
|
-
let n =
|
|
2623
|
+
function nr(e, t) {
|
|
2624
|
+
if ($n(e)) {
|
|
2625
|
+
let n = er(t), r = e.adoptedStyleSheets;
|
|
2001
2626
|
if (r.includes(n)) return;
|
|
2002
2627
|
e.adoptedStyleSheets = r.filter((e) => e !== X.inline && e !== X.block).concat(n);
|
|
2003
2628
|
return;
|
|
2004
2629
|
}
|
|
2005
|
-
let n = Array.from(e.childNodes).find((e) => e.hasAttribute && e.hasAttribute(
|
|
2006
|
-
n || (n = document.createElement("style"), n.setAttribute(
|
|
2630
|
+
let n = Array.from(e.childNodes).find((e) => e.hasAttribute && e.hasAttribute(Zn));
|
|
2631
|
+
n || (n = document.createElement("style"), n.setAttribute(Zn, Zn), e.appendChild(n)), n.textContent = Z(t);
|
|
2007
2632
|
}
|
|
2008
|
-
function
|
|
2009
|
-
|
|
2633
|
+
function rr() {
|
|
2634
|
+
sn("", Jn), Xt(!0);
|
|
2010
2635
|
let e;
|
|
2011
2636
|
try {
|
|
2012
2637
|
e = window;
|
|
@@ -2016,7 +2641,7 @@ function fn() {
|
|
|
2016
2641
|
let t = e.IconifyPreload, n = "Invalid IconifyPreload syntax.";
|
|
2017
2642
|
typeof t == "object" && t && (t instanceof Array ? t : [t]).forEach((e) => {
|
|
2018
2643
|
try {
|
|
2019
|
-
(typeof e != "object" || !e || e instanceof Array || typeof e.icons != "object" || typeof e.prefix != "string" || !
|
|
2644
|
+
(typeof e != "object" || !e || e instanceof Array || typeof e.icons != "object" || typeof e.prefix != "string" || !Qt(e)) && console.error(n);
|
|
2020
2645
|
} catch {
|
|
2021
2646
|
console.error(n);
|
|
2022
2647
|
}
|
|
@@ -2029,7 +2654,7 @@ function fn() {
|
|
|
2029
2654
|
try {
|
|
2030
2655
|
let r = t[e];
|
|
2031
2656
|
if (typeof r != "object" || !r || r.resources === void 0) continue;
|
|
2032
|
-
|
|
2657
|
+
un(e, r) || console.error(n);
|
|
2033
2658
|
} catch {
|
|
2034
2659
|
console.error(n);
|
|
2035
2660
|
}
|
|
@@ -2037,101 +2662,101 @@ function fn() {
|
|
|
2037
2662
|
}
|
|
2038
2663
|
}
|
|
2039
2664
|
return {
|
|
2040
|
-
iconLoaded:
|
|
2041
|
-
getIcon:
|
|
2042
|
-
listIcons:
|
|
2043
|
-
addIcon:
|
|
2044
|
-
addCollection:
|
|
2045
|
-
calculateSize:
|
|
2046
|
-
buildIcon:
|
|
2047
|
-
iconToHTML:
|
|
2048
|
-
svgToURL:
|
|
2049
|
-
loadIcons:
|
|
2050
|
-
loadIcon:
|
|
2051
|
-
addAPIProvider:
|
|
2052
|
-
setCustomIconLoader:
|
|
2053
|
-
setCustomIconsLoader:
|
|
2054
|
-
appendCustomStyle:
|
|
2665
|
+
iconLoaded: $t,
|
|
2666
|
+
getIcon: en,
|
|
2667
|
+
listIcons: Yt,
|
|
2668
|
+
addIcon: Zt,
|
|
2669
|
+
addCollection: Qt,
|
|
2670
|
+
calculateSize: Mn,
|
|
2671
|
+
buildIcon: Ln,
|
|
2672
|
+
iconToHTML: Rn,
|
|
2673
|
+
svgToURL: Vn,
|
|
2674
|
+
loadIcons: wn,
|
|
2675
|
+
loadIcon: Tn,
|
|
2676
|
+
addAPIProvider: un,
|
|
2677
|
+
setCustomIconLoader: Xn,
|
|
2678
|
+
setCustomIconsLoader: Yn,
|
|
2679
|
+
appendCustomStyle: tr,
|
|
2055
2680
|
_api: {
|
|
2056
|
-
getAPIConfig:
|
|
2057
|
-
setAPIModule:
|
|
2058
|
-
sendAPIQuery:
|
|
2059
|
-
setFetch:
|
|
2060
|
-
getFetch:
|
|
2061
|
-
listAPIProviders:
|
|
2681
|
+
getAPIConfig: q,
|
|
2682
|
+
setAPIModule: sn,
|
|
2683
|
+
sendAPIQuery: vn,
|
|
2684
|
+
setFetch: Hn,
|
|
2685
|
+
getFetch: Un,
|
|
2686
|
+
listAPIProviders: dn
|
|
2062
2687
|
}
|
|
2063
2688
|
};
|
|
2064
2689
|
}
|
|
2065
|
-
var
|
|
2690
|
+
var ir = { "background-color": "currentColor" }, ar = { "background-color": "transparent" }, or = {
|
|
2066
2691
|
image: "var(--svg)",
|
|
2067
2692
|
repeat: "no-repeat",
|
|
2068
2693
|
size: "100% 100%"
|
|
2069
|
-
},
|
|
2070
|
-
"-webkit-mask":
|
|
2071
|
-
mask:
|
|
2072
|
-
background:
|
|
2694
|
+
}, sr = {
|
|
2695
|
+
"-webkit-mask": ir,
|
|
2696
|
+
mask: ir,
|
|
2697
|
+
background: ar
|
|
2073
2698
|
};
|
|
2074
|
-
for (let e in
|
|
2075
|
-
let t =
|
|
2076
|
-
for (let n in
|
|
2699
|
+
for (let e in sr) {
|
|
2700
|
+
let t = sr[e];
|
|
2701
|
+
for (let n in or) t[e + "-" + n] = or[n];
|
|
2077
2702
|
}
|
|
2078
|
-
function
|
|
2703
|
+
function cr(e) {
|
|
2079
2704
|
return e ? e + (e.match(/^[-0-9.]+$/) ? "px" : "") : "inherit";
|
|
2080
2705
|
}
|
|
2081
|
-
function
|
|
2706
|
+
function lr(e, t, n) {
|
|
2082
2707
|
let r = document.createElement("span"), i = e.body;
|
|
2083
2708
|
i.indexOf("<a") !== -1 && (i += "<!-- " + Date.now() + " -->");
|
|
2084
|
-
let a = e.attributes, o =
|
|
2709
|
+
let a = e.attributes, o = Vn(Rn(i, {
|
|
2085
2710
|
...a,
|
|
2086
2711
|
width: t.width + "",
|
|
2087
2712
|
height: t.height + ""
|
|
2088
2713
|
})), s = r.style, c = {
|
|
2089
2714
|
"--svg": o,
|
|
2090
|
-
width:
|
|
2091
|
-
height:
|
|
2092
|
-
...n ?
|
|
2715
|
+
width: cr(a.width),
|
|
2716
|
+
height: cr(a.height),
|
|
2717
|
+
...n ? ir : ar
|
|
2093
2718
|
};
|
|
2094
2719
|
for (let e in c) s.setProperty(e, c[e]);
|
|
2095
2720
|
return r;
|
|
2096
2721
|
}
|
|
2097
2722
|
var Q;
|
|
2098
|
-
function
|
|
2723
|
+
function ur() {
|
|
2099
2724
|
try {
|
|
2100
2725
|
Q = window.trustedTypes.createPolicy("iconify", { createHTML: (e) => e });
|
|
2101
2726
|
} catch {
|
|
2102
2727
|
Q = null;
|
|
2103
2728
|
}
|
|
2104
2729
|
}
|
|
2105
|
-
function
|
|
2106
|
-
return Q === void 0 &&
|
|
2730
|
+
function dr(e) {
|
|
2731
|
+
return Q === void 0 && ur(), Q ? Q.createHTML(e) : e;
|
|
2107
2732
|
}
|
|
2108
|
-
function
|
|
2733
|
+
function fr(e) {
|
|
2109
2734
|
let t = document.createElement("span"), n = e.attributes, r = "";
|
|
2110
|
-
return n.width || (r = "width: inherit;"), n.height || (r += "height: inherit;"), r && (n.style = r), t.innerHTML =
|
|
2735
|
+
return n.width || (r = "width: inherit;"), n.height || (r += "height: inherit;"), r && (n.style = r), t.innerHTML = dr(Rn(e.body, n)), t.firstChild;
|
|
2111
2736
|
}
|
|
2112
|
-
function
|
|
2737
|
+
function pr(e) {
|
|
2113
2738
|
return Array.from(e.childNodes).find((e) => {
|
|
2114
2739
|
let t = e.tagName && e.tagName.toUpperCase();
|
|
2115
2740
|
return t === "SPAN" || t === "SVG";
|
|
2116
2741
|
});
|
|
2117
2742
|
}
|
|
2118
|
-
function
|
|
2119
|
-
let n = t.icon.data, r = t.customisations, i =
|
|
2743
|
+
function mr(e, t) {
|
|
2744
|
+
let n = t.icon.data, r = t.customisations, i = Ln(n, r);
|
|
2120
2745
|
r.preserveAspectRatio && (i.attributes.preserveAspectRatio = r.preserveAspectRatio);
|
|
2121
2746
|
let a = t.renderedMode, o;
|
|
2122
2747
|
switch (a) {
|
|
2123
2748
|
case "svg":
|
|
2124
|
-
o =
|
|
2749
|
+
o = fr(i);
|
|
2125
2750
|
break;
|
|
2126
|
-
default: o =
|
|
2127
|
-
...
|
|
2751
|
+
default: o = lr(i, {
|
|
2752
|
+
...F,
|
|
2128
2753
|
...n
|
|
2129
2754
|
}, a === "mask");
|
|
2130
2755
|
}
|
|
2131
|
-
let s =
|
|
2756
|
+
let s = pr(e);
|
|
2132
2757
|
s ? o.tagName === "SPAN" && s.tagName === o.tagName ? s.setAttribute("style", o.getAttribute("style")) : e.replaceChild(o, s) : e.appendChild(o);
|
|
2133
2758
|
}
|
|
2134
|
-
function
|
|
2759
|
+
function hr(e, t, n) {
|
|
2135
2760
|
return {
|
|
2136
2761
|
rendered: !1,
|
|
2137
2762
|
inline: t,
|
|
@@ -2139,7 +2764,7 @@ function wn(e, t, n) {
|
|
|
2139
2764
|
lastRender: n && (n.rendered ? n : n.lastRender)
|
|
2140
2765
|
};
|
|
2141
2766
|
}
|
|
2142
|
-
function
|
|
2767
|
+
function gr(e = "iconify-icon") {
|
|
2143
2768
|
let t, n;
|
|
2144
2769
|
try {
|
|
2145
2770
|
t = window.customElements, n = window.HTMLElement;
|
|
@@ -2169,7 +2794,7 @@ function Tn(e = "iconify-icon") {
|
|
|
2169
2794
|
constructor() {
|
|
2170
2795
|
super();
|
|
2171
2796
|
let e = this._shadowRoot = this.attachShadow({ mode: "open" }), t = this.hasAttribute("inline");
|
|
2172
|
-
|
|
2797
|
+
nr(e, t), this._state = hr({ value: "" }, t), this._queueCheck();
|
|
2173
2798
|
}
|
|
2174
2799
|
connectedCallback() {
|
|
2175
2800
|
this._connected = !0, this.startObserver();
|
|
@@ -2184,7 +2809,7 @@ function Tn(e = "iconify-icon") {
|
|
|
2184
2809
|
switch (e) {
|
|
2185
2810
|
case "inline": {
|
|
2186
2811
|
let e = this.hasAttribute("inline"), t = this._state;
|
|
2187
|
-
e !== t.inline && (t.inline = e,
|
|
2812
|
+
e !== t.inline && (t.inline = e, nr(this._shadowRoot, e));
|
|
2188
2813
|
break;
|
|
2189
2814
|
}
|
|
2190
2815
|
case "noobserver":
|
|
@@ -2223,7 +2848,7 @@ function Tn(e = "iconify-icon") {
|
|
|
2223
2848
|
t.lastChild.setCurrentTime(0);
|
|
2224
2849
|
return;
|
|
2225
2850
|
} catch {}
|
|
2226
|
-
|
|
2851
|
+
mr(t, e);
|
|
2227
2852
|
}
|
|
2228
2853
|
}
|
|
2229
2854
|
get status() {
|
|
@@ -2244,11 +2869,11 @@ function Tn(e = "iconify-icon") {
|
|
|
2244
2869
|
return;
|
|
2245
2870
|
}
|
|
2246
2871
|
if (!e.rendered || !this._visible) return;
|
|
2247
|
-
let n = this.getAttribute("mode"), r =
|
|
2248
|
-
(e.attrMode !== n ||
|
|
2872
|
+
let n = this.getAttribute("mode"), r = Ft(this);
|
|
2873
|
+
(e.attrMode !== n || It(e.customisations, r) || !pr(this._shadowRoot)) && this._renderIcon(e.icon, r, n);
|
|
2249
2874
|
}
|
|
2250
2875
|
_iconChanged(e) {
|
|
2251
|
-
let t =
|
|
2876
|
+
let t = Dn(e, (e, t, n) => {
|
|
2252
2877
|
let r = this._state;
|
|
2253
2878
|
if (r.rendered || this.getAttribute("icon") !== e) return;
|
|
2254
2879
|
let i = {
|
|
@@ -2258,22 +2883,22 @@ function Tn(e = "iconify-icon") {
|
|
|
2258
2883
|
};
|
|
2259
2884
|
i.data ? this._gotIconData(i) : r.icon = i;
|
|
2260
2885
|
});
|
|
2261
|
-
t.data ? this._gotIconData(t) : this._state =
|
|
2886
|
+
t.data ? this._gotIconData(t) : this._state = hr(t, this._state.inline, this._state);
|
|
2262
2887
|
}
|
|
2263
2888
|
_forceRender() {
|
|
2264
2889
|
if (!this._visible) {
|
|
2265
|
-
let e =
|
|
2890
|
+
let e = pr(this._shadowRoot);
|
|
2266
2891
|
e && this._shadowRoot.removeChild(e);
|
|
2267
2892
|
return;
|
|
2268
2893
|
}
|
|
2269
2894
|
this._queueCheck();
|
|
2270
2895
|
}
|
|
2271
2896
|
_gotIconData(e) {
|
|
2272
|
-
this._checkQueued = !1, this._renderIcon(e,
|
|
2897
|
+
this._checkQueued = !1, this._renderIcon(e, Ft(this), this.getAttribute("mode"));
|
|
2273
2898
|
}
|
|
2274
2899
|
_renderIcon(e, t, n) {
|
|
2275
|
-
let r =
|
|
2276
|
-
|
|
2900
|
+
let r = kn(e.data.body, n), i = this._state.inline;
|
|
2901
|
+
mr(this._shadowRoot, this._state = {
|
|
2277
2902
|
rendered: !0,
|
|
2278
2903
|
icon: e,
|
|
2279
2904
|
inline: i,
|
|
@@ -2311,23 +2936,25 @@ function Tn(e = "iconify-icon") {
|
|
|
2311
2936
|
}
|
|
2312
2937
|
});
|
|
2313
2938
|
});
|
|
2314
|
-
let o =
|
|
2939
|
+
let o = rr();
|
|
2315
2940
|
for (let e in o) a[e] = a.prototype[e] = o[e];
|
|
2316
2941
|
return t.define(e, a), a;
|
|
2317
2942
|
}
|
|
2318
|
-
var { iconLoaded:
|
|
2943
|
+
var { iconLoaded: _r, getIcon: vr, listIcons: yr, addIcon: br, addCollection: xr, calculateSize: Sr, buildIcon: Cr, iconToHTML: wr, svgToURL: Tr, loadIcons: Er, loadIcon: Dr, setCustomIconLoader: Or, setCustomIconsLoader: kr, addAPIProvider: Ar, _api: jr } = gr() || rr(), $ = {
|
|
2319
2944
|
hero: "dfk-hero",
|
|
2320
2945
|
features: "dfk-features",
|
|
2321
2946
|
nextSteps: "dfk-next-steps",
|
|
2322
|
-
sql: "dfk-sql"
|
|
2947
|
+
sql: "dfk-sql",
|
|
2948
|
+
mermaid: "dfk-mermaid"
|
|
2323
2949
|
};
|
|
2324
|
-
function
|
|
2950
|
+
function Mr() {
|
|
2325
2951
|
if (typeof customElements < "u") for (let [e, t] of Object.entries({
|
|
2326
|
-
[$.hero]:
|
|
2327
|
-
[$.features]:
|
|
2328
|
-
[$.nextSteps]:
|
|
2329
|
-
[$.sql]:
|
|
2952
|
+
[$.hero]: te,
|
|
2953
|
+
[$.features]: m,
|
|
2954
|
+
[$.nextSteps]: Ne,
|
|
2955
|
+
[$.sql]: wt,
|
|
2956
|
+
[$.mermaid]: je
|
|
2330
2957
|
})) customElements.get(e) || customElements.define(e, t);
|
|
2331
2958
|
}
|
|
2332
2959
|
//#endregion
|
|
2333
|
-
export {
|
|
2960
|
+
export { te as a, je as i, wt as n, m as o, Ne as r, Mr as t };
|