@pi-outpost/embed 0.47.0 → 0.49.0
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/README.md +4 -0
- package/dist/CodeEditor-CIWnYOMo.cjs +9 -0
- package/dist/{CodeEditor-CNBsvq8Z.js → CodeEditor-Dei7wUOV.js} +834 -750
- package/dist/{conversationExport-C-PQsHzJ.js → conversationExport-BZ08h6Er.js} +1 -1
- package/dist/{conversationExport-750vH7SP.cjs → conversationExport-CXmq8l0b.cjs} +1 -1
- package/dist/{conversationHistory-Dh1AOfU9.js → conversationHistory-D4iAdrF9.js} +91 -91
- package/dist/{conversationHistory-CKYAWF0H.cjs → conversationHistory-iHvZAmNN.cjs} +1 -1
- package/dist/{dist-CEPd6ecF.cjs → dist-0gxsdPHi.cjs} +1 -1
- package/dist/{dist-CELe3Rxj.cjs → dist-BAXGE-5E.cjs} +1 -1
- package/dist/{dist-BF9tfVH8.cjs → dist-BB8DIy0-.cjs} +1 -1
- package/dist/{dist-CPxwFKs7.cjs → dist-BXKM-sMu.cjs} +1 -1
- package/dist/{dist-BjQ1Exnz.js → dist-BhRuhsmx.js} +1 -1
- package/dist/{dist-iZeihidk.js → dist-Bt2YslBF.js} +2 -2
- package/dist/{dist-C2UMsquH.js → dist-CDuDYc3h.js} +1 -1
- package/dist/{dist-Ca51SM3i.js → dist-CUml8Wzk.js} +1 -1
- package/dist/{dist-BZ1m84Kh.js → dist-CV2qXUTt.js} +1 -1
- package/dist/{dist-BnXHuZGz.js → dist-Ccs3Mpvk.js} +1 -1
- package/dist/{dist-W-WjEDJm.cjs → dist-CqvTKR3J.cjs} +1 -1
- package/dist/{dist-SqwJhRs0.js → dist-CuX47mx0.js} +1 -1
- package/dist/{dist-CGPxOMk5.cjs → dist-DNzYo4it.cjs} +1 -1
- package/dist/{dist-BLS46S7g.cjs → dist-DU0BjKn0.cjs} +1 -1
- package/dist/pi-outpost-embed.cjs +625 -29
- package/dist/pi-outpost-embed.js +4222 -3966
- package/package.json +1 -1
- package/dist/CodeEditor-84sk1WGW.cjs +0 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as e, S as t, _ as n, b as r, d as i, f as a, h as o, m as s, n as c, o as l, p as u, v as d, x as f, y as p } from "./conversationHistory-
|
|
1
|
+
import { C as e, S as t, _ as n, b as r, d as i, f as a, h as o, m as s, n as c, o as l, p as u, v as d, x as f, y as p } from "./conversationHistory-D4iAdrF9.js";
|
|
2
2
|
import { g as m, i as h, n as ee, r as g, t as te, u as ne } from "./lib-CSMo4o20.js";
|
|
3
3
|
import { t as re } from "./download-DVJ5QY85.js";
|
|
4
4
|
import { a as ie, l as ae, n as oe, o as se, s as ce, u as le } from "./mermaidToImage-knc9XzLd.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require("./conversationHistory-
|
|
1
|
+
const e=require("./conversationHistory-iHvZAmNN.cjs"),t=require("./lib-CRTt_FoR.cjs"),n=require("./download-U7JEZ6c9.cjs"),r=require("./mermaidToImage-Ckx06W6z.cjs"),i=require("./loadReferencedImage-RUfxAG0o.cjs");var a=/["&'<>`]/g,o=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,s=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,c=/[|\\{}()[\]^$+*?.]/g,l=new WeakMap;function u(e,t){return e=e.replace(t.subset?d(t.subset):a,r),t.subset||t.escapeOnly?e:e.replace(o,n).replace(s,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function d(e){let t=l.get(e);return t||(t=ee(e),l.set(e,t)),t}function ee(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(c,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var f=/[\dA-Fa-f]/;function p(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!f.test(String.fromCharCode(t))?r:r+`;`}var m=/\d/;function te(e,t,n){let r=`&#`+String(e);return n&&t&&!m.test(String.fromCharCode(t))?r:r+`;`}var ne=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),h={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:``,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:``,zwj:``,lrm:``,rlm:``,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},re=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],g={}.hasOwnProperty,_={},v;for(v in h)g.call(h,v)&&(_[h[v]]=v);var y=/[^\dA-Za-z]/;function b(e,t,n,r){let i=String.fromCharCode(e);if(g.call(_,i)){let e=_[i],a=`&`+e;return n&&ne.includes(e)&&!re.includes(e)&&(!r||t&&t!==61&&y.test(String.fromCharCode(t)))?a:a+`;`}return``}function ie(e,t,n){let r=p(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=b(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=te(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function x(e,t){return u(e,Object.assign({format:ie},t))}var ae=/^>|^->|<!--|-->|--!>|<!-$/g,oe=[`>`],se=[`<`,`>`];function ce(e,t,n,r){return r.settings.bogusComments?`<?`+x(e.value,Object.assign({},r.settings.characterReferences,{subset:oe}))+`>`:`<!--`+e.value.replace(ae,i)+`-->`;function i(e){return x(e,Object.assign({},r.settings.characterReferences,{subset:se}))}}function le(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}var S=w(1),C=w(-1),ue=[];function w(t){return n;function n(n,r,i){let a=n?n.children:ue,o=(r||0)+t,s=a[o];if(!i)for(;s&&e.S(s);)o+=t,s=a[o];return s}}var T={}.hasOwnProperty;function E(e){return t;function t(t,n,r){return T.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var D=E({body:A,caption:O,colgroup:O,dd:P,dt:N,head:O,html:k,li:M,optgroup:I,option:L,p:j,rp:F,rt:F,tbody:z,td:H,tfoot:B,th:H,thead:R,tr:V});function O(t,n,r){let i=S(r,n,!0);return!i||i.type!==`comment`&&!(i.type===`text`&&e.S(i.value.charAt(0)))}function k(e,t,n){let r=S(n,t);return!r||r.type!==`comment`}function A(e,t,n){let r=S(n,t);return!r||r.type!==`comment`}function j(e,t,n){let r=S(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||n.type!==`element`||n.tagName!==`a`&&n.tagName!==`audio`&&n.tagName!==`del`&&n.tagName!==`ins`&&n.tagName!==`map`&&n.tagName!==`noscript`&&n.tagName!==`video`}function M(e,t,n){let r=S(n,t);return!r||r.type===`element`&&r.tagName===`li`}function N(e,t,n){let r=S(n,t);return!(!r||r.type!==`element`||r.tagName!==`dt`&&r.tagName!==`dd`)}function P(e,t,n){let r=S(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function F(e,t,n){let r=S(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function I(e,t,n){let r=S(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function L(e,t,n){let r=S(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function R(e,t,n){let r=S(n,t);return!(!r||r.type!==`element`||r.tagName!==`tbody`&&r.tagName!==`tfoot`)}function z(e,t,n){let r=S(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function B(e,t,n){return!S(n,t)}function V(e,t,n){let r=S(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function H(e,t,n){let r=S(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var U=E({body:pe,colgroup:me,head:fe,html:de,tbody:he});function de(e){let t=S(e,-1);return!t||t.type!==`comment`}function fe(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function pe(t){let n=S(t,-1,!0);return!n||n.type!==`comment`&&!(n.type===`text`&&e.S(n.value.charAt(0)))&&(n.type!==`element`||n.tagName!==`meta`&&n.tagName!==`link`&&n.tagName!==`script`&&n.tagName!==`style`&&n.tagName!==`template`)}function me(e,t,n){let r=C(n,t),i=S(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&D(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function he(e,t,n){let r=C(n,t),i=S(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&D(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var W={name:[[`
|
|
2
2
|
\f\r &/=>`.split(``),`
|
|
3
3
|
\f\r "&'/=>\``.split(``)],[`\0
|
|
4
4
|
\f\r "&'/<=>`.split(``),`\0
|
|
@@ -3,11 +3,11 @@ import { a as r, c as i, d as a, f as o, g as s, h as c, i as l, l as u, n as d,
|
|
|
3
3
|
import { c as g, n as _, o as v, r as y } from "./workspacePath-j4IUi8yY.js";
|
|
4
4
|
import { t as b } from "./download-DVJ5QY85.js";
|
|
5
5
|
import { t as ee } from "./katex-BOYcAQ2I.js";
|
|
6
|
-
import { Component as x, Fragment as S, createContext as
|
|
6
|
+
import { Component as x, Fragment as S, createContext as C, forwardRef as te, useCallback as ne, useContext as re, useEffect as w, useId as ie, useImperativeHandle as ae, useLayoutEffect as oe, useMemo as se, useRef as T, useState as E } from "react";
|
|
7
7
|
import { Fragment as D, jsx as O, jsxs as k } from "react/jsx-runtime";
|
|
8
8
|
import { createPortal as ce } from "react-dom";
|
|
9
9
|
//#region ../ui/src/theme/ThemeContext.ts
|
|
10
|
-
var le =
|
|
10
|
+
var le = C("dark"), ue = () => re(le);
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region ../ui/src/components/CopyButton.tsx
|
|
13
13
|
function de({ text: e, className: t, iconOnly: n = !1 }) {
|
|
@@ -207,11 +207,11 @@ function Ae(e) {
|
|
|
207
207
|
});
|
|
208
208
|
}
|
|
209
209
|
function je({ code: e }) {
|
|
210
|
-
let t = ie().replace(/[^a-zA-Z0-9]/g, ""), n = ue() === "light" ? "default" : "dark", [r, i] = E(null), [a, o] = E(null), [s, l] = E(!1), [u, d] = E(!1), [f, p] = E(!1), [m, h] = E(null), g = T(!1), _ = T(0), v = se(() => xe(e), [e]),
|
|
211
|
-
|
|
210
|
+
let t = ie().replace(/[^a-zA-Z0-9]/g, ""), n = ue() === "light" ? "default" : "dark", [r, i] = E(null), [a, o] = E(null), [s, l] = E(!1), [u, d] = E(!1), [f, p] = E(!1), [m, h] = E(null), g = T(!1), _ = T(0), v = T(0), y = () => `mermaid-${t}-${++v.current}`, b = se(() => xe(e), [e]), ee = b === void 0 ? "landscape" : _e(b.direction), [x, S] = E(void 0), C = r?.svg ?? null, te = r !== null && r.orientation !== ee, ne = T(null), re = T(e);
|
|
211
|
+
re.current = e, w(() => (_.current += 1, i(null), S(void 0), d(!1), o(null), h(null), () => {
|
|
212
212
|
_.current += 1;
|
|
213
213
|
}), [e]);
|
|
214
|
-
async function
|
|
214
|
+
async function ae() {
|
|
215
215
|
if (!r || g.current) return;
|
|
216
216
|
g.current = !0, p(!0), h(null);
|
|
217
217
|
let e = _.current;
|
|
@@ -232,49 +232,49 @@ function je({ code: e }) {
|
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
234
|
return w(() => {
|
|
235
|
-
let e = !1,
|
|
235
|
+
let e = !1, t = setTimeout(() => void c(async () => {
|
|
236
236
|
try {
|
|
237
|
-
let
|
|
238
|
-
if (
|
|
239
|
-
let n =
|
|
237
|
+
let t = (await Ee(n)).default, r = re.current, a = xe(r), s = a === void 0 ? "landscape" : _e(a.direction);
|
|
238
|
+
if (x !== void 0 && a !== void 0) {
|
|
239
|
+
let n = x === s ? r : a.turned, { svg: c } = await t.render(y(), n);
|
|
240
240
|
e || (i({
|
|
241
|
-
svg:
|
|
242
|
-
orientation:
|
|
241
|
+
svg: c,
|
|
242
|
+
orientation: x,
|
|
243
243
|
source: n
|
|
244
244
|
}), o(null));
|
|
245
245
|
return;
|
|
246
246
|
}
|
|
247
|
-
let
|
|
248
|
-
svg:
|
|
249
|
-
orientation:
|
|
250
|
-
source:
|
|
251
|
-
},
|
|
252
|
-
if (
|
|
253
|
-
let e = await
|
|
247
|
+
let c = await t.render(y(), r), l = {
|
|
248
|
+
svg: c.svg,
|
|
249
|
+
orientation: s,
|
|
250
|
+
source: r
|
|
251
|
+
}, u = De(c.svg);
|
|
252
|
+
if (a !== void 0 && u !== void 0 && u > 710) {
|
|
253
|
+
let e = await t.render(y(), a.turned), n = De(e.svg);
|
|
254
254
|
if (n !== void 0) {
|
|
255
|
-
let t =
|
|
256
|
-
t !==
|
|
255
|
+
let t = s === "landscape" ? ge(u, n) : ge(n, u);
|
|
256
|
+
t !== s && (l = {
|
|
257
257
|
svg: e.svg,
|
|
258
258
|
orientation: t,
|
|
259
|
-
source:
|
|
259
|
+
source: a.turned
|
|
260
260
|
});
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
|
-
e || (i(
|
|
263
|
+
e || (i(l), o(null));
|
|
264
264
|
} catch (t) {
|
|
265
265
|
e || (i(null), o(t instanceof Error ? t.message : String(t)));
|
|
266
266
|
}
|
|
267
267
|
}), 300);
|
|
268
268
|
return () => {
|
|
269
|
-
e = !0, clearTimeout(
|
|
269
|
+
e = !0, clearTimeout(t);
|
|
270
270
|
};
|
|
271
271
|
}, [
|
|
272
272
|
e,
|
|
273
273
|
t,
|
|
274
274
|
n,
|
|
275
|
-
|
|
276
|
-
]),
|
|
277
|
-
ref:
|
|
275
|
+
x
|
|
276
|
+
]), C ? /* @__PURE__ */ k("div", {
|
|
277
|
+
ref: ne,
|
|
278
278
|
className: "my-2 flex flex-col gap-2 rounded-lg border border-zinc-200 bg-zinc-50 p-3 dark:border-zinc-800 dark:bg-zinc-900",
|
|
279
279
|
children: [
|
|
280
280
|
/* @__PURE__ */ k("div", {
|
|
@@ -287,10 +287,10 @@ function je({ code: e }) {
|
|
|
287
287
|
className: Ce,
|
|
288
288
|
children: s ? "⚏ diagram" : "⌗ code"
|
|
289
289
|
}),
|
|
290
|
-
!s &&
|
|
290
|
+
!s && b !== void 0 && r !== null && /* @__PURE__ */ O("button", {
|
|
291
291
|
type: "button",
|
|
292
292
|
"data-testid": "mermaid-orientation",
|
|
293
|
-
onClick: () =>
|
|
293
|
+
onClick: () => S((e) => he(e ?? r.orientation)),
|
|
294
294
|
title: r.orientation === "portrait" ? "Turn it across the page — it is drawn down" : "Turn it down the page — it is drawn across",
|
|
295
295
|
"aria-label": `Turn the diagram ${he(r.orientation)}`,
|
|
296
296
|
className: "text-xs text-zinc-500 underline hover:text-zinc-800 dark:hover:text-zinc-200 disabled:opacity-50",
|
|
@@ -307,7 +307,7 @@ function je({ code: e }) {
|
|
|
307
307
|
type: "button",
|
|
308
308
|
className: Ce,
|
|
309
309
|
disabled: f,
|
|
310
|
-
onClick: () => void
|
|
310
|
+
onClick: () => void ae(),
|
|
311
311
|
title: "Save as .svg — insert it as a picture in a document",
|
|
312
312
|
children: f ? "preparing SVG…" : "⤓ download SVG"
|
|
313
313
|
}),
|
|
@@ -327,16 +327,16 @@ function je({ code: e }) {
|
|
|
327
327
|
children: e
|
|
328
328
|
}) : /* @__PURE__ */ O("div", {
|
|
329
329
|
className: "flex justify-center overflow-x-auto [&_svg]:max-w-full",
|
|
330
|
-
dangerouslySetInnerHTML: { __html:
|
|
330
|
+
dangerouslySetInnerHTML: { __html: C }
|
|
331
331
|
}),
|
|
332
|
-
|
|
332
|
+
te && !s && /* @__PURE__ */ k("div", {
|
|
333
333
|
className: "mt-1 text-center text-xs text-zinc-400 dark:text-zinc-600",
|
|
334
334
|
"data-testid": "mermaid-turned",
|
|
335
335
|
children: [
|
|
336
336
|
"drawn ",
|
|
337
337
|
r?.orientation,
|
|
338
338
|
" to fit — the source asks for ",
|
|
339
|
-
|
|
339
|
+
ee
|
|
340
340
|
]
|
|
341
341
|
}),
|
|
342
342
|
/* @__PURE__ */ O(pe, {
|
|
@@ -344,12 +344,12 @@ function je({ code: e }) {
|
|
|
344
344
|
testId: "mermaid-enlarged",
|
|
345
345
|
open: u,
|
|
346
346
|
onClose: () => d(!1),
|
|
347
|
-
anchorRef:
|
|
347
|
+
anchorRef: ne,
|
|
348
348
|
actions: /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O("button", {
|
|
349
349
|
type: "button",
|
|
350
350
|
className: Ce,
|
|
351
351
|
disabled: f,
|
|
352
|
-
onClick: () => void
|
|
352
|
+
onClick: () => void ae(),
|
|
353
353
|
children: f ? "preparing SVG…" : "⤓ download SVG"
|
|
354
354
|
}), m && /* @__PURE__ */ k("span", {
|
|
355
355
|
role: "alert",
|
|
@@ -357,9 +357,9 @@ function je({ code: e }) {
|
|
|
357
357
|
children: ["Could not download SVG: ", m]
|
|
358
358
|
})] }),
|
|
359
359
|
children: /* @__PURE__ */ O("div", {
|
|
360
|
-
style: { width: De(
|
|
360
|
+
style: { width: De(C) },
|
|
361
361
|
className: "[&_svg]:!h-auto [&_svg]:!max-w-none [&_svg]:!w-full",
|
|
362
|
-
dangerouslySetInnerHTML: { __html:
|
|
362
|
+
dangerouslySetInnerHTML: { __html: C }
|
|
363
363
|
})
|
|
364
364
|
})
|
|
365
365
|
]
|
|
@@ -812,9 +812,9 @@ function Ut(e, t, n = {}) {
|
|
|
812
812
|
}, S = (e, t, n) => {
|
|
813
813
|
let r = x(e, t);
|
|
814
814
|
return r === void 0 ? n : n === void 0 ? r : `${n} ${r}`;
|
|
815
|
-
},
|
|
815
|
+
}, C = (e, t) => {
|
|
816
816
|
if (ee) return e.role === "removed" || t.role === "removed" ? "removed" : e.role === "added" || t.role === "added" ? "added" : Et(e) === "" ? void 0 : "moved";
|
|
817
|
-
},
|
|
817
|
+
}, te = (e, t) => {
|
|
818
818
|
let n = [], r = [], i = [], c = e.map((e) => ({
|
|
819
819
|
...e,
|
|
820
820
|
days: _t(e.item)
|
|
@@ -932,15 +932,15 @@ function Ut(e, t, n = {}) {
|
|
|
932
932
|
}
|
|
933
933
|
});
|
|
934
934
|
}), Math.max(1, n.length);
|
|
935
|
-
},
|
|
936
|
-
let n =
|
|
935
|
+
}, ne = (e) => e * 24 + 8, re = (e, t) => {
|
|
936
|
+
let n = te(e.items.map((n, r) => ({
|
|
937
937
|
row: t,
|
|
938
938
|
index: r,
|
|
939
939
|
item: n,
|
|
940
940
|
text: S(n, e, It(n)),
|
|
941
941
|
note: x(n, e),
|
|
942
|
-
change:
|
|
943
|
-
})), b), r =
|
|
942
|
+
change: C(n, e)
|
|
943
|
+
})), b), r = ne(n);
|
|
944
944
|
v.push({
|
|
945
945
|
type: "task",
|
|
946
946
|
row: t,
|
|
@@ -962,14 +962,14 @@ function Ut(e, t, n = {}) {
|
|
|
962
962
|
...w.label ? { label: w.label } : {}
|
|
963
963
|
}), b += e;
|
|
964
964
|
} else {
|
|
965
|
-
let e =
|
|
965
|
+
let e = te(w.tasks.flatMap(({ task: e, row: t }) => e.items.map((n, r) => ({
|
|
966
966
|
row: t,
|
|
967
967
|
index: r,
|
|
968
968
|
item: n,
|
|
969
969
|
text: S(n, e, It(n) ?? (n.type === "activity" ? e.label : void 0)),
|
|
970
970
|
note: x(n, e),
|
|
971
|
-
change:
|
|
972
|
-
}))), b), t =
|
|
971
|
+
change: C(n, e)
|
|
972
|
+
}))), b), t = ne(e);
|
|
973
973
|
v.push({
|
|
974
974
|
type: "section",
|
|
975
975
|
row: w.row,
|
|
@@ -5597,15 +5597,15 @@ function Vu(e, t) {
|
|
|
5597
5597
|
from: r.get(e.from) ?? ee,
|
|
5598
5598
|
to: r.get(e.to) ?? ee
|
|
5599
5599
|
} : void 0);
|
|
5600
|
-
}), S = o.nodes.map((e) => l(e.id)),
|
|
5600
|
+
}), S = o.nodes.map((e) => l(e.id)), C = x.flatMap((e) => {
|
|
5601
5601
|
let t = e === void 0 ? void 0 : Kl(e.d);
|
|
5602
5602
|
return t === void 0 ? [] : [t];
|
|
5603
|
-
}),
|
|
5603
|
+
}), te = r.size > 0 && S.length > 0, ne = u.map((e) => ({
|
|
5604
5604
|
x: e.x,
|
|
5605
5605
|
y: e.y,
|
|
5606
5606
|
w: e.width,
|
|
5607
5607
|
h: e.height
|
|
5608
|
-
})), re = (e) =>
|
|
5608
|
+
})), re = (e) => te ? [] : [e], w = Math.min(...re(0), ...S.map((e) => e.x - 12), ...ne.map((e) => e.x - 12), ...C.map((e) => e.minX - 12)), ie = Math.min(...re(0), ...S.map((e) => e.y - 12), ...ne.map((e) => e.y - 14), ...C.map((e) => e.minY - 14)), ae = Math.max(...re(o.width), ...S.map((e) => e.x + e.w + 12), ...ne.map((e) => e.x + e.w + 12), ...C.map((e) => e.maxX + 12)), oe = Math.max(...re(o.height), ...S.map((e) => e.y + e.h + 12), ...ne.map((e) => e.y + e.h + 12), ...C.map((e) => e.maxY + 12)), se = (e) => {
|
|
5609
5609
|
let t = sl(e, i), n = e.kind === void 0 ? void 0 : f.get(e.kind);
|
|
5610
5610
|
return {
|
|
5611
5611
|
role: t,
|
|
@@ -6562,13 +6562,13 @@ function bd(e, t) {
|
|
|
6562
6562
|
};
|
|
6563
6563
|
e[t.type] = !0, b.set(t.kind, e);
|
|
6564
6564
|
}
|
|
6565
|
-
let ee = uu(c.kinds, l), x = [], S = 0,
|
|
6565
|
+
let ee = uu(c.kinds, l), x = [], S = 0, C = 0, te = r + c.width;
|
|
6566
6566
|
for (let e of c.kinds) {
|
|
6567
6567
|
let t = u(e), n = b.get(e);
|
|
6568
6568
|
if (n === void 0) continue;
|
|
6569
6569
|
let r = ee.has(e) ? `${e} (same colour as ${ee.get(e).join(", ")})` : e, i = (n.activity ? 22 : 0) + (n.milestone ? 16 : 0) + r.length * et + 18;
|
|
6570
|
-
S > 0 && S + i >
|
|
6571
|
-
let a =
|
|
6570
|
+
S > 0 && S + i > te && (S = 0, C += 1);
|
|
6571
|
+
let a = C * pd, o = [], s = S;
|
|
6572
6572
|
n.activity && (o.push({
|
|
6573
6573
|
shape: "rect",
|
|
6574
6574
|
x: s,
|
|
@@ -6603,7 +6603,7 @@ function bd(e, t) {
|
|
|
6603
6603
|
primitives: o
|
|
6604
6604
|
}), S += i;
|
|
6605
6605
|
}
|
|
6606
|
-
let
|
|
6606
|
+
let ne = [...c.periods.map((e) => ({
|
|
6607
6607
|
kind: e.kind,
|
|
6608
6608
|
line: !1,
|
|
6609
6609
|
text: n.periods[e.index].label ?? "Period"
|
|
@@ -6612,10 +6612,10 @@ function bd(e, t) {
|
|
|
6612
6612
|
line: !0,
|
|
6613
6613
|
text: e.label
|
|
6614
6614
|
}))];
|
|
6615
|
-
if (
|
|
6615
|
+
if (ne.length > 0 && (S > 0 && (S = 0, C += 1), ne.forEach((e, t) => {
|
|
6616
6616
|
let n = 22 + e.text.length * et + 18;
|
|
6617
|
-
S > 0 && S + n >
|
|
6618
|
-
let r =
|
|
6617
|
+
S > 0 && S + n > te && (S = 0, C += 1);
|
|
6618
|
+
let r = C * pd, i = e.kind === void 0 ? e.line ? "#3f3f46" : "#a1a1aa" : u(e.kind).stroke;
|
|
6619
6619
|
x.push({
|
|
6620
6620
|
id: `legend-calendar-${t}`,
|
|
6621
6621
|
testId: "timeline-calendar-legend",
|
|
@@ -6647,8 +6647,8 @@ function bd(e, t) {
|
|
|
6647
6647
|
}]
|
|
6648
6648
|
}), S += n;
|
|
6649
6649
|
})), n.comparedTo !== void 0) {
|
|
6650
|
-
S > 0 && (S = 0,
|
|
6651
|
-
let e =
|
|
6650
|
+
S > 0 && (S = 0, C += 1);
|
|
6651
|
+
let e = C * pd, t = [{
|
|
6652
6652
|
shape: "rect",
|
|
6653
6653
|
x: 0,
|
|
6654
6654
|
y: e + 4,
|
|
@@ -6707,7 +6707,7 @@ function bd(e, t) {
|
|
|
6707
6707
|
primitives: t
|
|
6708
6708
|
});
|
|
6709
6709
|
}
|
|
6710
|
-
let re = x.length === 0 ? 0 : (
|
|
6710
|
+
let re = x.length === 0 ? 0 : (C + 1) * pd + 6;
|
|
6711
6711
|
return {
|
|
6712
6712
|
layout: c,
|
|
6713
6713
|
pxPerDay: a,
|
|
@@ -7034,7 +7034,7 @@ function Kd({ data: e, today: t, appearance: n, display: r, onDisplayChange: i,
|
|
|
7034
7034
|
e,
|
|
7035
7035
|
m,
|
|
7036
7036
|
h
|
|
7037
|
-
]), S = m && h === "compare" && g,
|
|
7037
|
+
]), S = m && h === "compare" && g, C = p("compact"), te = p("showDependencies"), [ne, re] = E(void 0), ie = p("scale"), ce = T(null), [le, ue] = E(0);
|
|
7038
7038
|
w(() => {
|
|
7039
7039
|
let e = ce.current;
|
|
7040
7040
|
if (e === null || (ue(e.clientWidth), typeof ResizeObserver > "u")) return;
|
|
@@ -7056,17 +7056,17 @@ function Kd({ data: e, today: t, appearance: n, display: r, onDisplayChange: i,
|
|
|
7056
7056
|
referenceLine: "today",
|
|
7057
7057
|
onlyChanged: S,
|
|
7058
7058
|
...pe,
|
|
7059
|
-
...
|
|
7060
|
-
row:
|
|
7061
|
-
item:
|
|
7062
|
-
} : { row:
|
|
7059
|
+
...ne === void 0 ? {} : { selection: ne.type === "item" ? {
|
|
7060
|
+
row: ne.row,
|
|
7061
|
+
item: ne.item
|
|
7062
|
+
} : { row: ne.row } }
|
|
7063
7063
|
}), [
|
|
7064
7064
|
x,
|
|
7065
7065
|
c,
|
|
7066
7066
|
_,
|
|
7067
7067
|
v,
|
|
7068
7068
|
n,
|
|
7069
|
-
|
|
7069
|
+
ne,
|
|
7070
7070
|
S,
|
|
7071
7071
|
y,
|
|
7072
7072
|
le
|
|
@@ -7087,7 +7087,7 @@ function Kd({ data: e, today: t, appearance: n, display: r, onDisplayChange: i,
|
|
|
7087
7087
|
}
|
|
7088
7088
|
return e;
|
|
7089
7089
|
}, [x]), Se = (e) => e === void 0 ? Vd : _e.get(e) ?? Vd, Ce = (e, t) => e !== void 0 && e.type === t.type && e.row === t.row && (e.type === "task" || t.type === "item" && e.item === t.item), we = (e) => {
|
|
7090
|
-
let t = Ce(
|
|
7090
|
+
let t = Ce(ne, e);
|
|
7091
7091
|
if (re((t) => Ce(t, e) ? void 0 : e), !a) return;
|
|
7092
7092
|
let n = x.rows[e.row];
|
|
7093
7093
|
if (t || n?.type !== "task") return a(void 0);
|
|
@@ -7230,8 +7230,8 @@ function Kd({ data: e, today: t, appearance: n, display: r, onDisplayChange: i,
|
|
|
7230
7230
|
}, e.row) : /* @__PURE__ */ O("button", {
|
|
7231
7231
|
type: "button",
|
|
7232
7232
|
"data-testid": "timeline-task-label",
|
|
7233
|
-
"aria-pressed":
|
|
7234
|
-
className: "block w-full truncate border-t border-zinc-100 px-2 text-left hover:bg-zinc-50 dark:border-zinc-800 dark:hover:bg-zinc-800 " + (
|
|
7233
|
+
"aria-pressed": ne?.type === "task" && ne.row === e.row,
|
|
7234
|
+
className: "block w-full truncate border-t border-zinc-100 px-2 text-left hover:bg-zinc-50 dark:border-zinc-800 dark:hover:bg-zinc-800 " + (ne?.type === "task" && ne.row === e.row ? "bg-blue-50 font-medium dark:bg-blue-950/50" : ""),
|
|
7235
7235
|
style: { height: e.height },
|
|
7236
7236
|
title: `${e.label} (${e.id})`,
|
|
7237
7237
|
onClick: () => we({
|
|
@@ -7327,7 +7327,7 @@ function Kd({ data: e, today: t, appearance: n, display: r, onDisplayChange: i,
|
|
|
7327
7327
|
"aria-pressed": _,
|
|
7328
7328
|
className: "text-zinc-600 underline dark:text-zinc-300",
|
|
7329
7329
|
onClick: () => {
|
|
7330
|
-
re((e) => e?.type === "task" ? void 0 : e),
|
|
7330
|
+
re((e) => e?.type === "task" ? void 0 : e), C((e) => !e);
|
|
7331
7331
|
},
|
|
7332
7332
|
children: _ ? "one row per task" : "one row per section"
|
|
7333
7333
|
}),
|
|
@@ -7336,7 +7336,7 @@ function Kd({ data: e, today: t, appearance: n, display: r, onDisplayChange: i,
|
|
|
7336
7336
|
"data-testid": "timeline-dependencies-toggle",
|
|
7337
7337
|
"aria-pressed": !v,
|
|
7338
7338
|
className: "text-zinc-600 underline dark:text-zinc-300",
|
|
7339
|
-
onClick: () =>
|
|
7339
|
+
onClick: () => te((e) => !e),
|
|
7340
7340
|
children: v ? "hide dependencies" : "show dependencies"
|
|
7341
7341
|
}),
|
|
7342
7342
|
!v && /* @__PURE__ */ k("span", {
|
|
@@ -7504,9 +7504,9 @@ function Kd({ data: e, today: t, appearance: n, display: r, onDisplayChange: i,
|
|
|
7504
7504
|
}, e);
|
|
7505
7505
|
})
|
|
7506
7506
|
}),
|
|
7507
|
-
|
|
7507
|
+
ne !== void 0 && /* @__PURE__ */ O(qd, {
|
|
7508
7508
|
data: x,
|
|
7509
|
-
selection:
|
|
7509
|
+
selection: ne,
|
|
7510
7510
|
dependencies: A.dependencies
|
|
7511
7511
|
})
|
|
7512
7512
|
]
|
|
@@ -7601,7 +7601,7 @@ function qd({ data: e, selection: t, dependencies: n }) {
|
|
|
7601
7601
|
}
|
|
7602
7602
|
//#endregion
|
|
7603
7603
|
//#region ../ui/src/presentations/structuredAppearance.ts
|
|
7604
|
-
var Jd =
|
|
7604
|
+
var Jd = C(null);
|
|
7605
7605
|
//#endregion
|
|
7606
7606
|
//#region ../shared/src/resourceTarget.ts
|
|
7607
7607
|
function Yd(e) {
|
|
@@ -7971,7 +7971,7 @@ function sf({ item: e, traces: t, dispatch: n }) {
|
|
|
7971
7971
|
});
|
|
7972
7972
|
}
|
|
7973
7973
|
function cf({ data: e, hidden: t, setHidden: n, rows: r, traces: i = [], dispatch: a }) {
|
|
7974
|
-
let [o, s] = E(null), c = T(null), l =
|
|
7974
|
+
let [o, s] = E(null), c = T(null), l = ne(() => [...c.current?.querySelectorAll("th") ?? []].map((e) => Math.max(nf, Math.round(e.getBoundingClientRect().width))), []), u = ne((e, t) => s((n) => {
|
|
7975
7975
|
let r = n ?? l(), i = [...r];
|
|
7976
7976
|
return i[e] = Math.max(nf, Math.round(t(r[e] ?? nf))), i;
|
|
7977
7977
|
}), [l]);
|
|
@@ -8215,18 +8215,18 @@ function gf(e) {
|
|
|
8215
8215
|
if (typeof t == "object" && t && typeof t.ref == "string") return t.ref;
|
|
8216
8216
|
}
|
|
8217
8217
|
function _f({ envelope: e, source: t, rawOutput: n, dispatch: r, conformance: i, exportRef: a }) {
|
|
8218
|
-
let o = re(Jd), [s, c] = E(!1), [l, u] = E(!1), [d, f] = E(!1), [p, m] = E(!1), [h, g] = E(!1), [_, v] = E(null), y = T(null), b = T(null), [ee, x] = E(/* @__PURE__ */ new Map()), [S,
|
|
8218
|
+
let o = re(Jd), [s, c] = E(!1), [l, u] = E(!1), [d, f] = E(!1), [p, m] = E(!1), [h, g] = E(!1), [_, v] = E(null), y = T(null), b = T(null), [ee, x] = E(/* @__PURE__ */ new Map()), [S, C] = E(Pl), [te, ne] = E(void 0), [w, ie] = E(void 0), [oe, ce] = E(void 0), le = T(null), ue = se(() => kl(e), [e]), de = e.target !== void 0, fe = e.removals ?? [], me = se(() => Dl(e, de), [e, de]), ge = se(() => e.kind === "graph" ? Bu(e.data, S) : "landscape", [e, S]), A = te ?? ge, _e = se(() => e.kind === "graph" ? Il(e) : [], [e]), ve = _e.find((e) => e.id === w), ye = ve !== void 0 && !Rl(S, Ll(e.data, ve)), be = (t) => {
|
|
8219
8219
|
let n = _e.find((e) => e.id === t);
|
|
8220
|
-
ie(n?.id),
|
|
8220
|
+
ie(n?.id), C(n === void 0 ? Pl : Ll(e.data, n));
|
|
8221
8221
|
}, xe = () => {
|
|
8222
|
-
|
|
8222
|
+
ne((e) => he(e ?? ge)), x(/* @__PURE__ */ new Map());
|
|
8223
8223
|
}, Se = e.kind === "graph" ? /* @__PURE__ */ O(Qd, {
|
|
8224
8224
|
data: e.data,
|
|
8225
8225
|
isProposal: de,
|
|
8226
8226
|
nudges: ee,
|
|
8227
8227
|
setNudges: x,
|
|
8228
8228
|
hidden: S,
|
|
8229
|
-
setHidden:
|
|
8229
|
+
setHidden: C,
|
|
8230
8230
|
orientation: A,
|
|
8231
8231
|
viewpoint: ve
|
|
8232
8232
|
}) : e.kind === "sequence" ? /* @__PURE__ */ O($d, {
|
|
@@ -8241,7 +8241,7 @@ function _f({ envelope: e, source: t, rawOutput: n, dispatch: r, conformance: i,
|
|
|
8241
8241
|
}) : /* @__PURE__ */ O(cf, {
|
|
8242
8242
|
data: e.data,
|
|
8243
8243
|
hidden: S,
|
|
8244
|
-
setHidden:
|
|
8244
|
+
setHidden: C,
|
|
8245
8245
|
rows: me.rows,
|
|
8246
8246
|
traces: me.traces,
|
|
8247
8247
|
dispatch: r
|
|
@@ -8591,7 +8591,7 @@ var yf = {
|
|
|
8591
8591
|
})
|
|
8592
8592
|
}) : this.props.children;
|
|
8593
8593
|
}
|
|
8594
|
-
}, xf =
|
|
8594
|
+
}, xf = C({});
|
|
8595
8595
|
function Sf(e) {
|
|
8596
8596
|
let t = Oe(e.children, "json");
|
|
8597
8597
|
return t === null ? /* @__PURE__ */ O(Ae, { ...e }) : /* @__PURE__ */ O(Cf, {
|
|
@@ -21960,7 +21960,7 @@ div.mxRubberband { position: absolute; overflow: hidden; border: 1px solid #29b6
|
|
|
21960
21960
|
}
|
|
21961
21961
|
//#endregion
|
|
21962
21962
|
//#region ../ui/src/components/DrawioFrame.tsx
|
|
21963
|
-
var WT = "allow-scripts", GT = 1e4, KT =
|
|
21963
|
+
var WT = "allow-scripts", GT = 1e4, KT = te(function({ xml: e, serverUrl: t, title: n, fallback: r, editing: i = !1, onTouchUpChange: a, onPageLocked: o, onEscape: s, onRendered: c, className: l = "flex h-full min-h-[24rem] flex-col" }, u) {
|
|
21964
21964
|
let d = T(null), f = ue() === "dark", p = se(() => UT(BT(t)), [t]), [m, h] = E(0), [g, _] = E(null), v = T(/* @__PURE__ */ new Map()), y = T({
|
|
21965
21965
|
onTouchUpChange: a,
|
|
21966
21966
|
onPageLocked: o,
|
|
@@ -22085,7 +22085,7 @@ var WT = "allow-scripts", GT = 1e4, KT = ne(function({ xml: e, serverUrl: t, tit
|
|
|
22085
22085
|
})
|
|
22086
22086
|
]
|
|
22087
22087
|
});
|
|
22088
|
-
}), qT =
|
|
22088
|
+
}), qT = C({ serverUrl: "" });
|
|
22089
22089
|
function JT() {
|
|
22090
22090
|
return re(qT);
|
|
22091
22091
|
}
|
|
@@ -22166,7 +22166,7 @@ function aE(e, t) {
|
|
|
22166
22166
|
return `${rE(e)}${n ? `-${n}` : ""}.svg`;
|
|
22167
22167
|
}
|
|
22168
22168
|
function oE(e, t, n) {
|
|
22169
|
-
let { fileIo: r } = JT(), [i, a] = E({ status: "loading" }), o = T(0), s =
|
|
22169
|
+
let { fileIo: r } = JT(), [i, a] = E({ status: "loading" }), o = T(0), s = ne(() => {
|
|
22170
22170
|
if (!t) return;
|
|
22171
22171
|
if (r === void 0) {
|
|
22172
22172
|
a({
|
|
@@ -22215,7 +22215,7 @@ function sE(e, t) {
|
|
|
22215
22215
|
}, [n, e]), n;
|
|
22216
22216
|
}
|
|
22217
22217
|
function cE({ path: e, xml: t, variant: n, fallback: r, onTouchUpDirtyChange: i }) {
|
|
22218
|
-
let { serverUrl: a, fileIo: o, onOpenFile: s } = JT(), c = T(null), l = sE(c, n === "reply"), u = oE(e, t === void 0, l), d = t ?? (u.status === "loaded" ? u.content : null), f = T(null), p = T(null), [m, h] = E(!1), [g, _] = E(null), [v, y] = E(null), [b, ee] = E(null), x = T(null), [S,
|
|
22218
|
+
let { serverUrl: a, fileIo: o, onOpenFile: s } = JT(), c = T(null), l = sE(c, n === "reply"), u = oE(e, t === void 0, l), d = t ?? (u.status === "loaded" ? u.content : null), f = T(null), p = T(null), [m, h] = E(!1), [g, _] = E(null), [v, y] = E(null), [b, ee] = E(null), x = T(null), [S, C] = E(tE), [te, re] = E(!1), ie = T(!1), [ae, oe] = E(null), [se, ce] = E(null), le = (e) => e === "inline" ? f : p, ue = (e) => b === e && x.current !== null ? x.current.content : d, de = o !== void 0, fe = b !== null && S.dirty;
|
|
22219
22219
|
w(() => {
|
|
22220
22220
|
i?.(fe);
|
|
22221
22221
|
}, [fe, i]), w(() => () => i?.(!1), [i]);
|
|
@@ -22223,7 +22223,7 @@ function cE({ path: e, xml: t, variant: n, fallback: r, onTouchUpDirtyChange: i
|
|
|
22223
22223
|
if (o !== void 0 && b === null) {
|
|
22224
22224
|
oe(null), ce(null);
|
|
22225
22225
|
try {
|
|
22226
|
-
x.current = await o.read(e),
|
|
22226
|
+
x.current = await o.read(e), C(tE), ee(t);
|
|
22227
22227
|
} catch (e) {
|
|
22228
22228
|
oe({
|
|
22229
22229
|
message: e instanceof Error ? e.message : String(e),
|
|
@@ -22233,7 +22233,7 @@ function cE({ path: e, xml: t, variant: n, fallback: r, onTouchUpDirtyChange: i
|
|
|
22233
22233
|
}
|
|
22234
22234
|
}
|
|
22235
22235
|
function he() {
|
|
22236
|
-
return fe && !window.confirm(nE) ? !1 : (ee(null),
|
|
22236
|
+
return fe && !window.confirm(nE) ? !1 : (ee(null), C(tE), oe(null), ce(null), x.current = null, !0);
|
|
22237
22237
|
}
|
|
22238
22238
|
async function ge() {
|
|
22239
22239
|
let t = b, n = x.current;
|
|
@@ -22268,7 +22268,7 @@ function cE({ path: e, xml: t, variant: n, fallback: r, onTouchUpDirtyChange: i
|
|
|
22268
22268
|
function _e() {
|
|
22269
22269
|
(b !== "enlarged" || he()) && h(!1);
|
|
22270
22270
|
}
|
|
22271
|
-
let ve =
|
|
22271
|
+
let ve = ne(() => ce("Save or undo the touch-ups on this page before turning to another."), []), ye = T(he);
|
|
22272
22272
|
ye.current = he;
|
|
22273
22273
|
let be = T(_e);
|
|
22274
22274
|
be.current = _e;
|
|
@@ -22276,7 +22276,7 @@ function cE({ path: e, xml: t, variant: n, fallback: r, onTouchUpDirtyChange: i
|
|
|
22276
22276
|
xe.current = b;
|
|
22277
22277
|
let Se = T(m);
|
|
22278
22278
|
Se.current = m;
|
|
22279
|
-
let Te =
|
|
22279
|
+
let Te = ne(() => {
|
|
22280
22280
|
xe.current === null ? Se.current && be.current() : ye.current();
|
|
22281
22281
|
}, []);
|
|
22282
22282
|
w(() => {
|
|
@@ -22308,9 +22308,9 @@ function cE({ path: e, xml: t, variant: n, fallback: r, onTouchUpDirtyChange: i
|
|
|
22308
22308
|
/* @__PURE__ */ O("button", {
|
|
22309
22309
|
type: "button",
|
|
22310
22310
|
className: Ce,
|
|
22311
|
-
disabled: !S.dirty ||
|
|
22311
|
+
disabled: !S.dirty || te,
|
|
22312
22312
|
onClick: () => void ge(),
|
|
22313
|
-
children:
|
|
22313
|
+
children: te ? "saving…" : "✓ save"
|
|
22314
22314
|
}),
|
|
22315
22315
|
/* @__PURE__ */ O("button", {
|
|
22316
22316
|
type: "button",
|
|
@@ -22433,7 +22433,7 @@ function cE({ path: e, xml: t, variant: n, fallback: r, onTouchUpDirtyChange: i
|
|
|
22433
22433
|
title: e,
|
|
22434
22434
|
fallback: ke,
|
|
22435
22435
|
editing: b === "inline",
|
|
22436
|
-
onTouchUpChange:
|
|
22436
|
+
onTouchUpChange: C,
|
|
22437
22437
|
onPageLocked: ve,
|
|
22438
22438
|
onEscape: Te,
|
|
22439
22439
|
onRendered: _,
|
|
@@ -22463,7 +22463,7 @@ function cE({ path: e, xml: t, variant: n, fallback: r, onTouchUpDirtyChange: i
|
|
|
22463
22463
|
title: `${e}, full size`,
|
|
22464
22464
|
fallback: ke,
|
|
22465
22465
|
editing: b === "enlarged",
|
|
22466
|
-
onTouchUpChange:
|
|
22466
|
+
onTouchUpChange: C,
|
|
22467
22467
|
onPageLocked: ve,
|
|
22468
22468
|
onEscape: Te,
|
|
22469
22469
|
className: "flex h-full flex-col"
|