diff --git a/CHANGES.md b/CHANGES.md
index c6d2938eeb..603433fca4 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -77,6 +77,7 @@ on-premises instances** that want to keep up to date.
- Fix mixed letter spacing and line height [Taiga #11178](https://tree.taiga.io/project/penpot/issue/11178)
- Fix snap nodes shortcut [Taiga #11054](https://tree.taiga.io/project/penpot/issue/11054)
- Fix changing a text property in a text layer does not unapply the previously applied token in the same property [Taiga #11337}(https://tree.taiga.io/project/penpot/issue/11337)
+- Fix shortcut error pressing G+W from the View Mode [Taiga #11061](https://tree.taiga.io/project/penpot/issue/11061)
## 2.7.2
diff --git a/backend/deps.edn b/backend/deps.edn
index 187358f09e..aaeb256d10 100644
--- a/backend/deps.edn
+++ b/backend/deps.edn
@@ -37,7 +37,6 @@
{:mvn/version "1.3.1002"}
metosin/reitit-core {:mvn/version "0.9.1"}
nrepl/nrepl {:mvn/version "1.3.1"}
- cider/cider-nrepl {:mvn/version "0.56.0"}
org.postgresql/postgresql {:mvn/version "42.7.6"}
org.xerial/sqlite-jdbc {:mvn/version "3.49.1.0"}
diff --git a/backend/resources/app/onboarding.edn b/backend/resources/app/onboarding.edn
index 1e7f7b419c..f8686169e8 100644
--- a/backend/resources/app/onboarding.edn
+++ b/backend/resources/app/onboarding.edn
@@ -1,4 +1,7 @@
-[{:id "wireframing-kit"
+[{:id "tokens-starter-kit"
+ :name "Design tokens starter kit"
+ :file-uri "https://github.com/penpot/penpot-files/raw/refs/heads/main/Tokens%20starter%20kit.penpot"},
+ {:id "wireframing-kit"
:name "Wireframe library"
:file-uri "https://github.com/penpot/penpot-files/raw/refs/heads/main/Wireframing%20kit%20v1.1.penpot"}
{:id "prototype-examples"
diff --git a/backend/src/app/main.clj b/backend/src/app/main.clj
index d8a742dfb5..c51d85f6ad 100644
--- a/backend/src/app/main.clj
+++ b/backend/src/app/main.clj
@@ -40,7 +40,6 @@
[app.svgo :as-alias svgo]
[app.util.time :as dt]
[app.worker :as-alias wrk]
- [cider.nrepl :refer [cider-nrepl-handler]]
[clojure.test :as test]
[clojure.tools.namespace.repl :as repl]
[cuerdas.core :as str]
@@ -605,7 +604,7 @@
(let [p (promise)]
(when (contains? cf/flags :nrepl-server)
(l/inf :hint "start nrepl server" :port 6064)
- (nrepl/start-server :bind "0.0.0.0" :port 6064 :handler cider-nrepl-handler))
+ (nrepl/start-server :bind "0.0.0.0" :port 6064))
(start)
(deref p))
diff --git a/backend/src/app/rpc/commands/files.clj b/backend/src/app/rpc/commands/files.clj
index f492d2520f..cfd9b4a947 100644
--- a/backend/src/app/rpc/commands/files.clj
+++ b/backend/src/app/rpc/commands/files.clj
@@ -595,7 +595,11 @@
(teams/check-read-permissions! conn profile-id team-id)
(->> (db/exec! conn [sql:team-shared-files team-id])
(into #{} (comp
- (map decode-row)
+ ;; NOTE: this decode operation is a workaround for a
+ ;; fast fix, this should be approached with a more
+ ;; efficient implementation, for now it loads all
+ ;; the files in memory.
+ (map (partial bfc/decode-file cfg))
(map (fn [row]
(if-let [media-id (:media-id row)]
(-> row
diff --git a/common/src/app/common/files/migrations.cljc b/common/src/app/common/files/migrations.cljc
index 7fe4351bcb..c49843a787 100644
--- a/common/src/app/common/files/migrations.cljc
+++ b/common/src/app/common/files/migrations.cljc
@@ -95,22 +95,33 @@
(defn migrate-file
[file libs]
(binding [cfeat/*new* (atom #{})]
- (let [version (or (:version file)
- (-> file :data :version))]
- (-> file
- (assoc :version cfd/version)
- (update :migrations
- (fn [migrations]
- (if (nil? migrations)
- (generate-migrations-from-version version)
- migrations)))
- ;; NOTE: in some future we can consider to apply
- ;; a migration to the whole database and remove
- ;; this code from this function that executes on
- ;; each file migration operation
- (update :features cfeat/migrate-legacy-features)
- (migrate libs)
- (update :features (fnil into #{}) (deref cfeat/*new*))))))
+ (let [version
+ (or (:version file) (-> file :data :version))
+
+ migrations
+ (not-empty (get file :migrations))
+
+ file
+ (-> file
+ (assoc :version cfd/version)
+ (assoc :migrations
+ (if migrations
+ migrations
+ (generate-migrations-from-version version)))
+ ;; NOTE: in some future we can consider to apply a
+ ;; migration to the whole database and remove this code
+ ;; from this function that executes on each file
+ ;; migration operation
+ (update :features cfeat/migrate-legacy-features)
+ (migrate libs)
+ (update :features (fnil into #{}) (deref cfeat/*new*)))]
+
+ ;; NOTE: When we have no previous migrations, we report all
+ ;; migrations as migrated in order to correctly persist them all
+ ;; and not only the really applied migrations
+ (if (not migrations)
+ (vary-meta file assoc ::migrated (:migrations file))
+ file))))
(defn migrated?
[file]
@@ -1274,7 +1285,8 @@
;; rollback, we still need to perform an other migration
;; for properly delete the bool-content prop from shapes
;; once the know the migration was OK
- (if (cfh/bool-shape? object)
+ (if (and (cfh/bool-shape? object)
+ (not (contains? object :content)))
(if-let [content (:bool-content object)]
(assoc object :content content)
object)
@@ -1469,14 +1481,22 @@
(update :pages-index d/update-vals update-container)
(d/update-when :components d/update-vals update-container))))
-(defmethod migrate-data "0008-fix-library-colors-opacity"
+(defmethod migrate-data "0008-fix-library-colors-v2"
[data _]
- (letfn [(update-color [color]
+ (letfn [(clear-color-opacity [color]
(if (and (contains? color :opacity)
(nil? (get color :opacity)))
(assoc color :opacity 1)
- color))]
- (d/update-when data :colors d/update-vals update-color)))
+ color))
+
+ (clear-color [color]
+ (-> color
+ (select-keys types.color/library-color-attrs)
+ (d/without-nils)
+ (d/without-qualified)
+ (clear-color-opacity)))]
+
+ (d/update-when data :colors d/update-vals clear-color)))
(defmethod migrate-data "0009-add-partial-text-touched-flags"
[data _]
@@ -1566,5 +1586,5 @@
"0005-deprecate-image-type"
"0006-fix-old-texts-fills"
"0007-clear-invalid-strokes-and-fills-v2"
- "0008-fix-library-colors-opacity"
+ "0008-fix-library-colors-v2"
"0009-add-partial-text-touched-flags"]))
diff --git a/common/src/app/common/types/color.cljc b/common/src/app/common/types/color.cljc
index 89b84ea1e9..6b3893d3ef 100644
--- a/common/src/app/common/types/color.cljc
+++ b/common/src/app/common/types/color.cljc
@@ -150,6 +150,9 @@
(sm/optional-keys schema:image-color)]
[:fn has-valid-color-attrs?]])
+(def library-color-attrs
+ (sm/keys schema:library-color-attrs))
+
(def valid-color?
(sm/lazy-validator schema:color))
diff --git a/docs/img/design-tokens/22-tokens-export-multiple.webp b/docs/img/design-tokens/22-tokens-export-multiple.webp
new file mode 100644
index 0000000000..9daef9166c
Binary files /dev/null and b/docs/img/design-tokens/22-tokens-export-multiple.webp differ
diff --git a/docs/img/design-tokens/23-tokens-export-single.webp b/docs/img/design-tokens/23-tokens-export-single.webp
new file mode 100644
index 0000000000..acefbd41f9
Binary files /dev/null and b/docs/img/design-tokens/23-tokens-export-single.webp differ
diff --git a/docs/user-guide/design-tokens/index.njk b/docs/user-guide/design-tokens/index.njk
index 75b13ffea2..3de6a9dbae 100644
--- a/docs/user-guide/design-tokens/index.njk
+++ b/docs/user-guide/design-tokens/index.njk
@@ -367,12 +367,97 @@ title: 10· Design Tokens
Importing and Exporting Tokens
You can export Tokens from Penpot and import them from your computer to a Penpot file. Tokens can be imported from the Tools option at the bottom of the Tokens tab.
-
The Import functionality allows you to upload and replace the global token set using a single file, while the Export functionality lets you download the current global token set using a single file to your system.
+
The Import functionality allows you to upload and replace the global token set using a single file or a folder with multiple files in it.
These features support JSON files formatted according to specific guidelines and preserve the ability to undo changes if needed.
-
Import: At the Tools option, select Import, then select your tokens.json file.
-
Export: At the Tools option, select Export. This will export all the tokens, including token sets and themes.
+
Import: Click Tools, then select Import to view import options.
+
Export: Click Tools, then select Export to view export options.
+
+
Import Options
+
Single file
+
+
You can import a JSON file comprising all tokens, token sets and token themes.
+
When importing a single file, the first-level keys of the json file will be interpreted as the set name.
+
+
+
+ {
+ "Global": {
+ // first-level key will be interpreted as set name
+ "color": {
+ "300": {
+ "$value": "red",
+ "$type": "color",
+ "$description": "my token description"
+ }
+ }
+ },
+ "Brands/A": {
+ // first-level key will be interpreted as set name
+ "color": {
+ "accent": {
+ "$value": "{red}",
+ "$type": "color",
+ "$description": "my token description"
+ }
+ }
+ },
+ "Brands/B": {
+ // first-level key will be interpreted as set name
+ "color": {
+ "accent": {
+ "$value": "#fabada",
+ "$type": "color",
+ "$description": "my token description"
+ }
+ }
+ }
+ }
+
+
+
+
Multifile
+
Imports a folder containing multiple JSON files (one per Token Set) and additional files like $themes.json or $metadata.json configurations. When importing multiple files, the name and path of the individual json files inside the folder will be interpreted as set names. These files should only contain tokens.
+
Multifile folder structure example:
+
+
+ folder/
+ ├── global/
+ │ ├── colors.json // can only contain tokens
+ │ └── dimension.json // can only contain tokens
+ ├── mode/
+ │ ├── dark.json // can only contain tokens
+ │ └── light.json // can only contain tokens
+ ├── $themes.json // themes config
+ └── $metadata.json // other metadata config
+
+
+The main folder name won’t be used to build token set names, so in this example, folder will be ignored in the set names.
+
+
Export Options
+
Just like with importing, you can export tokens, themes and sets either in a single JSON file or in multiple files. There is no difference in the content being exported; the choice depends on your team's preferences for file organization: a single file with all the tokens, sets and themes, or a folder structure with separated JSON files organized by sets.
+
In both cases you can preview the result of the export options:
+
+
+
+ Exporting tokens as multiple files.
+
+
+
+
+ Exporting tokens as a single file.
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/resources/images/thumbnails/template-tokens-starter-kit.jpg b/frontend/resources/images/thumbnails/template-tokens-starter-kit.jpg
new file mode 100644
index 0000000000..0b06a844ca
Binary files /dev/null and b/frontend/resources/images/thumbnails/template-tokens-starter-kit.jpg differ
diff --git a/frontend/resources/plugins-runtime/index.js b/frontend/resources/plugins-runtime/index.js
index 18b374e80d..22419ffeb9 100644
--- a/frontend/resources/plugins-runtime/index.js
+++ b/frontend/resources/plugins-runtime/index.js
@@ -4,19 +4,19 @@ var qn = (t) => {
var Kn = (t, e, r) => e.has(t) || qn("Cannot " + r);
var at = (t, e, r) => (Kn(t, e, "read from private field"), r ? r.call(t) : e.get(t)), tn = (t, e, r) => e.has(t) ? qn("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), fr = (t, e, r, n) => (Kn(t, e, "write to private field"), n ? n.call(t, r) : e.set(t, r), r);
const S = globalThis, {
- Array: na,
+ Array: oa,
ArrayBuffer: To,
- Date: oa,
+ Date: sa,
FinalizationRegistry: $t,
- Float32Array: sa,
- JSON: aa,
+ Float32Array: aa,
+ JSON: ia,
Map: $e,
- Math: ia,
+ Math: ca,
Number: Io,
Object: Tn,
- Promise: ca,
+ Promise: la,
Proxy: Ur,
- Reflect: la,
+ Reflect: ua,
RegExp: Xe,
Set: Dt,
String: _e,
@@ -29,7 +29,7 @@ const S = globalThis, {
// revealed to post-lockdown code in any compartment including the start
// compartment since in V8 at least it bears stack inspection capabilities.
Error: le,
- RangeError: ua,
+ RangeError: da,
ReferenceError: Wt,
SyntaxError: ir,
TypeError: _,
@@ -45,13 +45,13 @@ const S = globalThis, {
getOwnPropertyNames: Nt,
getPrototypeOf: G,
is: Zr,
- isFrozen: du,
- isSealed: fu,
- isExtensible: pu,
+ isFrozen: fu,
+ isSealed: pu,
+ isExtensible: hu,
keys: Co,
prototype: zr,
- seal: hu,
- preventExtensions: da,
+ seal: mu,
+ preventExtensions: fa,
setPrototypeOf: wr,
values: Ro,
fromEntries: bt
@@ -60,11 +60,11 @@ const S = globalThis, {
toStringTag: Qe,
iterator: De,
matchAll: $o,
- unscopables: fa,
- keyFor: pa,
- for: ha
-} = At, { isInteger: ma } = Io, { stringify: No } = aa, { defineProperty: ga } = Tn, D = (t, e, r) => {
- const n = ga(t, e, r);
+ unscopables: pa,
+ keyFor: ha,
+ for: ma
+} = At, { isInteger: ga } = Io, { stringify: No } = ia, { defineProperty: ya } = Tn, D = (t, e, r) => {
+ const n = ya(t, e, r);
if (n !== t)
throw _(
`Please report that the original defineProperty silently failed to set ${No(
@@ -75,47 +75,47 @@ const S = globalThis, {
}, {
apply: ue,
construct: xr,
- get: ya,
- getOwnPropertyDescriptor: _a,
+ get: _a,
+ getOwnPropertyDescriptor: va,
has: Oo,
- isExtensible: va,
+ isExtensible: ba,
ownKeys: qe,
- preventExtensions: ba,
+ preventExtensions: wa,
set: Mo
-} = la, { isArray: pt, prototype: ve } = na, { prototype: Sr } = To, { prototype: jt } = $e, { prototype: Br } = RegExp, { prototype: cr } = Dt, { prototype: Ge } = _e, { prototype: Gr } = ze, { prototype: Lo } = Ut, { prototype: Vr } = Function, { prototype: Fo } = ca, { prototype: Do } = G(
+} = ua, { isArray: pt, prototype: ve } = oa, { prototype: Sr } = To, { prototype: jt } = $e, { prototype: Br } = RegExp, { prototype: cr } = Dt, { prototype: Ge } = _e, { prototype: Gr } = ze, { prototype: Lo } = Ut, { prototype: Vr } = Function, { prototype: Fo } = la, { prototype: Do } = G(
// eslint-disable-next-line no-empty-function, func-names
function* () {
}
), on = G(
// eslint-disable-next-line @endo/no-polymorphic-call
G(ve.values())
-), Uo = G(mn.prototype), { bind: gn } = Vr, P = gn.bind(gn.call), Q = P(zr.hasOwnProperty), et = P(ve.filter), ht = P(ve.forEach), Hr = P(ve.includes), Zt = P(ve.join), de = (
+), Uo = G(mn.prototype), { bind: gn } = Vr, A = gn.bind(gn.call), Q = A(zr.hasOwnProperty), et = A(ve.filter), ht = A(ve.forEach), Hr = A(ve.includes), Zt = A(ve.join), de = (
/** @type {any} */
- P(ve.map)
+ A(ve.map)
), jo = (
/** @type {any} */
- P(ve.flatMap)
-), Er = P(ve.pop), ne = P(ve.push), wa = P(ve.slice), Zo = P(ve.some), zo = P(ve.sort), xa = P(ve[De]), Sa = P(Sr.slice), Ea = P(
+ A(ve.flatMap)
+), Er = A(ve.pop), ne = A(ve.push), xa = A(ve.slice), Zo = A(ve.some), zo = A(ve.sort), Sa = A(ve[De]), Ea = A(Sr.slice), ka = A(
// @ts-expect-error we know it is there on all conforming platforms
ee(Sr, "byteLength").get
-), ka = P(Uo.set), pe = P(jt.set), Ke = P(jt.get), Wr = P(jt.has), Pa = P(jt.delete), Aa = P(jt.entries), Ta = P(jt[De]), In = P(cr.add);
-P(cr.delete);
-const Yn = P(cr.forEach), Cn = P(cr.has), Ia = P(cr[De]), Rn = P(Br.test), $n = P(Br.exec), Ca = P(Br[$o]), Bo = P(Ge.endsWith), Go = P(Ge.includes), Ra = P(Ge.indexOf);
-P(Ge.match);
-const kr = P(Do.next), Vo = P(Do.throw), Pr = (
+), Pa = A(Uo.set), pe = A(jt.set), Ke = A(jt.get), Wr = A(jt.has), Aa = A(jt.delete), Ta = A(jt.entries), Ia = A(jt[De]), In = A(cr.add);
+A(cr.delete);
+const Yn = A(cr.forEach), Cn = A(cr.has), Ca = A(cr[De]), Rn = A(Br.test), $n = A(Br.exec), Ra = A(Br[$o]), Bo = A(Ge.endsWith), Go = A(Ge.includes), $a = A(Ge.indexOf);
+A(Ge.match);
+const kr = A(Do.next), Vo = A(Do.throw), Pr = (
/** @type {any} */
- P(Ge.replace)
-), $a = P(Ge.search), Nn = P(Ge.slice), On = (
+ A(Ge.replace)
+), Na = A(Ge.search), Nn = A(Ge.slice), On = (
/** @type {(thisArg: string, splitter: string | RegExp | { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number) => string[]} */
- P(Ge.split)
-), Ho = P(Ge.startsWith), Na = P(Ge[De]), Oa = P(Gr.delete), z = P(Gr.get), Tt = P(Gr.has), he = P(Gr.set), qr = P(Lo.add), lr = P(Lo.has), Ma = P(Vr.toString), Wo = P(gn);
-P(Fo.catch);
+ A(Ge.split)
+), Ho = A(Ge.startsWith), Oa = A(Ge[De]), Ma = A(Gr.delete), z = A(Gr.get), Tt = A(Gr.has), he = A(Gr.set), qr = A(Lo.add), lr = A(Lo.has), La = A(Vr.toString), Wo = A(gn);
+A(Fo.catch);
const qo = (
/** @type {any} */
- P(Fo.then)
-), La = $t && P($t.prototype.register);
-$t && P($t.prototype.unregister);
-const Mn = y(H(null)), ke = (t) => Tn(t) === t, Kr = (t) => t instanceof le, Ko = eval, Ee = Function, Fa = () => {
+ A(Fo.then)
+), Fa = $t && A($t.prototype.register);
+$t && A($t.prototype.unregister);
+const Mn = y(H(null)), ke = (t) => Tn(t) === t, Kr = (t) => t instanceof le, Ko = eval, Ee = Function, Da = () => {
throw _('Cannot eval with evalTaming set to "noEval" (SES_NO_EVAL)');
}, Je = ee(Error("er1"), "stack"), sn = ee(_("er2"), "stack");
let Yo, Jo;
@@ -132,13 +132,13 @@ if (Je && sn && Je.get)
throw _(
"Unexpected Error own stack accessor functions (SES_UNEXPECTED_ERROR_OWN_STACK_ACCESSOR)"
);
-const an = Yo, Da = Jo;
-function Ua() {
+const an = Yo, Ua = Jo;
+function ja() {
return this;
}
-if (Ua())
+if (ja())
throw _("SES failed to initialize, sloppy mode (SES_NO_SLOPPY)");
-const { freeze: ut } = Object, { apply: ja } = Reflect, Ln = (t) => (e, ...r) => ja(t, e, r), Za = Ln(Array.prototype.push), Jn = Ln(Array.prototype.includes), za = Ln(String.prototype.split), it = JSON.stringify, pr = (t, ...e) => {
+const { freeze: ut } = Object, { apply: Za } = Reflect, Ln = (t) => (e, ...r) => Za(t, e, r), za = Ln(Array.prototype.push), Jn = Ln(Array.prototype.includes), Ba = Ln(String.prototype.split), it = JSON.stringify, pr = (t, ...e) => {
let r = t[0];
for (let n = 0; n < e.length; n += 1)
r = `${r}${e[n]}${t[n + 1]}`;
@@ -151,7 +151,7 @@ const { freeze: ut } = Object, { apply: ja } = Reflect, Ln = (t) => (e, ...r) =>
let d = l;
const f = t.process || void 0, h = typeof f == "object" && f.env || void 0;
if (typeof h == "object" && c in h) {
- e || Za(r, c);
+ e || za(r, c);
const p = h[c];
typeof p == "string" || pr`Environment option named ${it(
c
@@ -166,7 +166,7 @@ const { freeze: ut } = Object, { apply: ja } = Reflect, Ln = (t) => (e, ...r) =>
ut(n);
const o = (c) => {
const l = n(c, "");
- return ut(l === "" ? [] : za(l, ","));
+ return ut(l === "" ? [] : Ba(l, ","));
};
ut(o);
const s = (c, l) => Jn(o(c), l), i = () => ut([...r]);
@@ -180,8 +180,8 @@ const { freeze: ut } = Object, { apply: ja } = Reflect, Ln = (t) => (e, ...r) =>
ut(Xo);
const {
getEnvironmentOption: ce,
- getEnvironmentOptionsList: mu,
- environmentOptionsListHas: gu
+ getEnvironmentOptionsList: gu,
+ environmentOptionsListHas: yu
} = Xo(globalThis, !0), Ar = (t) => (t = `${t}`, t.length >= 1 && Go("aeiouAEIOU", t[0]) ? `an ${t}` : `a ${t}`);
y(Ar);
const Qo = (t, e = void 0) => {
@@ -235,7 +235,7 @@ const Qo = (t, e = void 0) => {
}
};
y(Qo);
-const { isSafeInteger: Ba } = Number, { freeze: Et } = Object, { toStringTag: Ga } = Symbol, Xn = (t) => {
+const { isSafeInteger: Ga } = Number, { freeze: Et } = Object, { toStringTag: Va } = Symbol, Xn = (t) => {
const r = {
next: void 0,
prev: void 0,
@@ -253,7 +253,7 @@ const { isSafeInteger: Ba } = Number, { freeze: Et } = Object, { toStringTag: Ga
const { prev: e, next: r } = t;
e.next = r, r.prev = e, t.prev = t, t.next = t;
}, es = (t) => {
- if (!Ba(t) || t < 0)
+ if (!Ga(t) || t < 0)
throw TypeError("keysBudget must be a safe non-negative integer number");
const e = /* @__PURE__ */ new WeakMap();
let r = 0;
@@ -293,14 +293,14 @@ const { isSafeInteger: Ba } = Number, { freeze: Et } = Object, { toStringTag: Ga
// eslint-disable-next-line jsdoc/check-types
[
/** @type {typeof Symbol.toStringTag} */
- Ga
+ Va
]: "LRUCacheMap"
});
return u;
};
Et(es);
-const { freeze: vr } = Object, { isSafeInteger: Va } = Number, Ha = 1e3, Wa = 100, ts = (t = Ha, e = Wa) => {
- if (!Va(e) || e < 1)
+const { freeze: vr } = Object, { isSafeInteger: Ha } = Number, Wa = 1e3, qa = 100, ts = (t = Wa, e = qa) => {
+ if (!Ha(e) || e < 1)
throw TypeError(
"argsPerErrorBudget must be a safe positive integer number"
);
@@ -326,8 +326,8 @@ const Ot = new ze(), U = (t, e = void 0) => {
return he(Ot, r, t), r;
};
y(U);
-const qa = y(/^[\w:-]( ?[\w:-])*$/), Tr = (t, e = void 0) => {
- if (typeof t != "string" || !Rn(qa, t))
+const Ka = y(/^[\w:-]( ?[\w:-])*$/), Tr = (t, e = void 0) => {
+ if (typeof t != "string" || !Rn(Ka, t))
return U(t, e);
const r = y({
toString: y(() => t)
@@ -378,7 +378,7 @@ let yn = 0;
const eo = new ze(), as = (t, e = t.name) => {
let r = z(eo, t);
return r !== void 0 || (yn += 1, r = `${e}#${yn}`, he(eo, t, r)), r;
-}, Ka = (t) => {
+}, Ya = (t) => {
const e = Be(t), {
name: r,
message: n,
@@ -425,10 +425,10 @@ const eo = new ze(), as = (t, e = t.name) => {
writable: !0,
enumerable: !1,
configurable: !0
- })), he(br, u, ss(i)), r !== void 0 && as(u, r), s && Ka(u), u;
+ })), he(br, u, ss(i)), r !== void 0 && as(u, r), s && Ya(u), u;
};
y(Ce);
-const { addLogArgs: Ya, takeLogArgsArray: Ja } = ts(), _n = new ze(), Jr = (t, e) => {
+const { addLogArgs: Ja, takeLogArgsArray: Xa } = ts(), _n = new ze(), Jr = (t, e) => {
typeof e == "string" && (e = re([e]));
const r = z(Yr, e);
if (r === void 0)
@@ -438,17 +438,17 @@ const { addLogArgs: Ya, takeLogArgsArray: Ja } = ts(), _n = new ze(), Jr = (t, e
for (const s of o)
s(t, n);
else
- Ya(t, n);
+ Ja(t, n);
};
y(Jr);
-const Xa = (t) => {
+const Qa = (t) => {
if (!("stack" in t))
return "";
- const e = `${t.stack}`, r = Ra(e, `
+ const e = `${t.stack}`, r = $a(e, `
`);
return Ho(e, " ") || r === -1 ? e : Nn(e, r + 1);
}, Ir = {
- getStackString: S.getStackString || Xa,
+ getStackString: S.getStackString || Qa,
tagError: (t) => as(t),
resetErrorTagNum: () => {
yn = 0;
@@ -456,10 +456,10 @@ const Xa = (t) => {
getMessageLogArgs: (t) => z(br, t),
takeMessageLogArgs: (t) => {
const e = z(br, t);
- return Oa(br, t), e;
+ return Ma(br, t), e;
},
takeNoteLogArgsArray: (t, e) => {
- const r = Ja(t);
+ const r = Xa(t);
if (e !== void 0) {
const n = z(_n, t);
n ? ne(n, e) : he(_n, t, [e]);
@@ -478,11 +478,11 @@ const Xr = (t = void 0, e = !1) => {
function i(f, h = void 0, p = void 0, m = void 0) {
f || o(h, p, m);
}
- const c = (f, h, p = void 0, m = void 0, A = void 0) => {
+ const c = (f, h, p = void 0, m = void 0, k = void 0) => {
Zr(f, h) || o(
p || r`Expected ${f} is same as ${h}`,
- m || ua,
- A
+ m || da,
+ k
);
};
y(c);
@@ -519,19 +519,19 @@ const Y = Xr(), to = Y.equal, is = ee(
Y(is);
const cs = is.get;
Y(cs);
-const Qa = (t) => ue(cs, t, []) !== void 0, ei = (t) => {
+const ei = (t) => ue(cs, t, []) !== void 0, ti = (t) => {
const e = +_e(t);
- return ma(e) && _e(e) === t;
-}, ti = (t) => {
- da(t), ht(qe(t), (e) => {
+ return ga(e) && _e(e) === t;
+}, ri = (t) => {
+ fa(t), ht(qe(t), (e) => {
const r = ee(t, e);
- Y(r), ei(e) || D(t, e, {
+ Y(r), ti(e) || D(t, e, {
...r,
writable: !1,
configurable: !1
});
});
-}, ri = () => {
+}, ni = () => {
if (typeof S.harden == "function")
return S.harden;
const t = new Ut(), { harden: e } = {
@@ -551,7 +551,7 @@ const Qa = (t) => ue(cs, t, []) !== void 0, ei = (t) => {
lr(t, d) || Cn(n, d) || In(n, d);
}
const s = (d) => {
- Qa(d) ? ti(d) : y(d);
+ ei(d) ? ri(d) : y(d);
const f = Be(d), h = G(d);
o(h), ht(qe(f), (p) => {
const m = f[
@@ -560,7 +560,7 @@ const Qa = (t) => ue(cs, t, []) !== void 0, ei = (t) => {
];
Q(m, "value") ? o(m.value) : (o(m.get), o(m.set));
});
- }, i = an === void 0 && Da === void 0 ? (
+ }, i = an === void 0 && Ua === void 0 ? (
// On platforms without v8's error own stack accessor problem,
// don't pay for any extra overhead.
s
@@ -719,11 +719,11 @@ const vn = {
// Do not specify "prototype" here, since only Function instances that can
// be used as a constructor have a prototype property. For constructors,
// since prototype properties are instance-specific, we define it there.
-}, ni = {
+}, oi = {
// This property is not mentioned in ECMA 262, but is present in V8 and
// necessary for lockdown to succeed.
"[[Proto]]": "%AsyncFunctionPrototype%"
-}, a = vn, no = ni, M = {
+}, a = vn, no = oi, M = {
get: a,
set: "undefined"
}, Le = {
@@ -1959,8 +1959,8 @@ const so = {
lockdown: a,
harden: { ...a, isFake: "boolean" },
"%InitialGetStackString%": a
-}, oi = (t) => typeof t == "function";
-function si(t, e, r) {
+}, si = (t) => typeof t == "function";
+function ai(t, e, r) {
if (Q(t, e)) {
const n = ee(t, e);
if (!n || !Zr(n.value, r.value) || n.get !== r.get || n.set !== r.set || n.writable !== r.writable || n.enumerable !== r.enumerable || n.configurable !== r.configurable)
@@ -1968,9 +1968,9 @@ function si(t, e, r) {
}
D(t, e, r);
}
-function ai(t, e) {
+function ii(t, e) {
for (const [r, n] of me(e))
- si(t, r, n);
+ ai(t, r, n);
}
function hs(t, e) {
const r = { __proto__: null };
@@ -1982,7 +1982,7 @@ const ms = (t) => {
const e = H(null);
let r;
const n = (l) => {
- ai(e, Be(l));
+ ii(e, Be(l));
};
y(n);
const o = () => {
@@ -2015,7 +2015,7 @@ const ms = (t) => {
}
};
y(o);
- const s = () => (y(e), r = new Ut(et(Ro(e), oi)), e);
+ const s = () => (y(e), r = new Ut(et(Ro(e), si)), e);
y(s);
const i = (l) => {
if (!r)
@@ -2032,11 +2032,11 @@ const ms = (t) => {
isPseudoNative: i
};
return y(c), n(us), n(hs(S, ds)), c;
-}, ii = (t, e) => {
+}, ci = (t, e) => {
const { addIntrinsics: r, finalIntrinsics: n } = ms(e);
return r(hs(t, fs)), n();
};
-function ci(t, e, r) {
+function li(t, e, r) {
const n = ["undefined", "boolean", "number", "string", "symbol"], o = new $e(
At ? de(
et(
@@ -2054,7 +2054,7 @@ function ci(t, e, r) {
if (p)
return p;
{
- const m = pa(h);
+ const m = ha(h);
return m !== void 0 ? `RegisteredSymbol(${m})` : `Unique${_e(h)}`;
}
}
@@ -2098,17 +2098,17 @@ function ci(t, e, r) {
);
}
function l(f, h, p, m) {
- const A = ee(h, p);
- if (!A)
+ const k = ee(h, p);
+ if (!k)
throw _(`Property ${p} not found at ${f}`);
- if (Q(A, "value")) {
+ if (Q(k, "value")) {
if (oo(m))
throw _(`Accessor expected at ${f}`);
- return c(f, A.value, p, m);
+ return c(f, k.value, p, m);
}
if (!oo(m))
throw _(`Accessor not expected at ${f}`);
- return c(`${f}`, A.get, p, m.get) && c(`${f}`, A.set, p, m.set);
+ return c(`${f}`, k.get, p, m.get) && c(`${f}`, k.set, p, m.set);
}
function u(f, h, p) {
const m = p === "__proto__" ? "--proto--" : p;
@@ -2122,14 +2122,14 @@ function ci(t, e, r) {
return;
const m = p["[[Proto]]"];
i(f, h, m), typeof h == "function" && e(h);
- for (const A of qe(h)) {
- const x = s(f, A), w = `${f}.${x}`, R = u(h, p, x);
- (!R || !l(w, h, A, R)) && ls(h, A, R === !1, w, r);
+ for (const k of qe(h)) {
+ const x = s(f, k), w = `${f}.${x}`, R = u(h, p, x);
+ (!R || !l(w, h, k, R)) && ls(h, k, R === !1, w, r);
}
}
d("intrinsics", t, Cr);
}
-function li() {
+function ui() {
try {
Ee.prototype.constructor("return 1");
} catch {
@@ -2176,10 +2176,10 @@ function li() {
"(async function*(){})"
), t;
}
-function ui(t = "safe") {
+function di(t = "safe") {
if (t !== "safe" && t !== "unsafe")
throw _(`unrecognized dateTaming ${t}`);
- const e = oa, r = e.prototype, n = {
+ const e = sa, r = e.prototype, n = {
/**
* `%SharedDate%.now()` throw a `TypeError` starting with "secure mode".
* See https://github.com/endojs/endo/issues/910#issuecomment-1581855420
@@ -2244,10 +2244,10 @@ function ui(t = "safe") {
"%SharedDate%": i
};
}
-function di(t = "safe") {
+function fi(t = "safe") {
if (t !== "safe" && t !== "unsafe")
throw _(`unrecognized mathTaming ${t}`);
- const e = ia, r = e, { random: n, ...o } = Be(e), i = H(zr, {
+ const e = ca, r = e, { random: n, ...o } = Be(e), i = H(zr, {
...o,
random: {
value: {
@@ -2269,7 +2269,7 @@ function di(t = "safe") {
"%SharedMath%": i
};
}
-function fi(t = "safe") {
+function pi(t = "safe") {
if (t !== "safe" && t !== "unsafe")
throw _(`unrecognized regExpTaming ${t}`);
const e = Xe.prototype, r = (s = {}) => {
@@ -2304,7 +2304,7 @@ function fi(t = "safe") {
"%SharedRegExp%": o
};
}
-const pi = {
+const hi = {
"%ObjectPrototype%": {
toString: !0
},
@@ -2421,7 +2421,7 @@ const pi = {
// https://github.com/tc39/proposal-iterator-helpers
[Qe]: !0
}
-}, hi = {
+}, mi = {
...gs,
/**
* Rollup (as used at least by vega) and webpack
@@ -2475,11 +2475,11 @@ const pi = {
*/
"%SetPrototype%": "*"
};
-function mi(t, e, { warn: r }, n = []) {
+function gi(t, e, { warn: r }, n = []) {
const o = new Dt(n);
function s(d, f, h, p) {
if ("value" in p && p.configurable) {
- const { value: m } = p, A = Cn(o, h), { get: x, set: w } = ee(
+ const { value: m } = p, k = Cn(o, h), { get: x, set: w } = ee(
{
get [h]() {
return m;
@@ -2491,7 +2491,7 @@ function mi(t, e, { warn: r }, n = []) {
h
)}' of '${d}'`
);
- Q(this, h) ? this[h] = R : (A && r(_(`Override property ${h}`)), D(this, h, {
+ Q(this, h) ? this[h] = R : (k && r(_(`Override property ${h}`)), D(this, h, {
value: R,
writable: !0,
enumerable: !0,
@@ -2527,21 +2527,21 @@ function mi(t, e, { warn: r }, n = []) {
const m = ee(f, p);
if (!m || m.get || m.set)
continue;
- const A = `${d}.${_e(p)}`, x = h[p];
+ const k = `${d}.${_e(p)}`, x = h[p];
if (x === !0)
- i(A, f, p);
+ i(k, f, p);
else if (x === "*")
- c(A, m.value);
+ c(k, m.value);
else if (ke(x))
- l(A, m.value, x);
+ l(k, m.value, x);
else
- throw _(`Unexpected override enablement plan ${A}`);
+ throw _(`Unexpected override enablement plan ${k}`);
}
}
let u;
switch (e) {
case "min": {
- u = pi;
+ u = hi;
break;
}
case "moderate": {
@@ -2549,7 +2549,7 @@ function mi(t, e, { warn: r }, n = []) {
break;
}
case "severe": {
- u = hi;
+ u = mi;
break;
}
default:
@@ -2557,7 +2557,7 @@ function mi(t, e, { warn: r }, n = []) {
}
l("root", t, u);
}
-const { Fail: bn, quote: Rr } = Y, gi = /^(\w*[a-z])Locale([A-Z]\w*)$/, ys = {
+const { Fail: bn, quote: Rr } = Y, yi = /^(\w*[a-z])Locale([A-Z]\w*)$/, ys = {
// See https://tc39.es/ecma262/#sec-string.prototype.localecompare
localeCompare(t) {
if (this === null || this === void 0)
@@ -2570,19 +2570,19 @@ const { Fail: bn, quote: Rr } = Y, gi = /^(\w*[a-z])Locale([A-Z]\w*)$/, ys = {
toString() {
return `${this}`;
}
-}, yi = ys.localeCompare, _i = ys.toString;
-function vi(t, e = "safe") {
+}, _i = ys.localeCompare, vi = ys.toString;
+function bi(t, e = "safe") {
if (e !== "safe" && e !== "unsafe")
throw _(`unrecognized localeTaming ${e}`);
if (e !== "unsafe") {
D(_e.prototype, "localeCompare", {
- value: yi
+ value: _i
});
for (const r of Nt(t)) {
const n = t[r];
if (ke(n))
for (const o of Nt(n)) {
- const s = $n(gi, o);
+ const s = $n(yi, o);
if (s) {
typeof n[o] == "function" || bn`expected ${Rr(o)} to be a function`;
const i = `${s[1]}${s[2]}`, c = n[i];
@@ -2591,15 +2591,15 @@ function vi(t, e = "safe") {
}
}
D(Io.prototype, "toLocaleString", {
- value: _i
+ value: vi
});
}
}
-const bi = (t) => ({
+const wi = (t) => ({
eval(r) {
return typeof r != "string" ? r : t(r);
}
-}).eval, { Fail: ao } = Y, wi = (t) => {
+}).eval, { Fail: ao } = Y, xi = (t) => {
const e = function(n) {
const o = `${Er(arguments) || ""}`, s = `${Zt(arguments, ",")}`;
new Ee(s, ""), new Ee(o);
@@ -2619,10 +2619,10 @@ ${o}
configurable: !1
}
}), G(Ee) === Ee.prototype || ao`Function prototype is the same accross compartments`, G(e) === Ee.prototype || ao`Function constructor prototype is the same accross compartments`, e;
-}, xi = (t) => {
+}, Si = (t) => {
D(
t,
- fa,
+ pa,
y(
jr(H(null), {
set: y(() => {
@@ -2684,7 +2684,7 @@ ${o}
}), typeof l == "function" && o(l);
}, wn = (t, e, r) => {
{
- const n = y(bi(e));
+ const n = y(wi(e));
r(n), D(t, "eval", {
value: n,
writable: !0,
@@ -2693,7 +2693,7 @@ ${o}
});
}
{
- const n = y(wi(e));
+ const n = y(xi(e));
r(n), D(t, "Function", {
value: n,
writable: !0,
@@ -2701,14 +2701,14 @@ ${o}
configurable: !0
});
}
-}, { Fail: Si, quote: bs } = Y, ws = new Ur(
+}, { Fail: Ei, quote: bs } = Y, ws = new Ur(
Mn,
y({
get(t, e) {
- Si`Please report unexpected scope handler trap: ${bs(_e(e))}`;
+ Ei`Please report unexpected scope handler trap: ${bs(_e(e))}`;
}
})
-), Ei = {
+), ki = {
get(t, e) {
},
set(t, e, r) {
@@ -2739,9 +2739,9 @@ ${o}
}, xs = y(
H(
ws,
- Be(Ei)
+ Be(ki)
)
-), ki = new Ur(
+), Pi = new Ur(
Mn,
xs
), Ss = (t) => {
@@ -2768,7 +2768,7 @@ ${o}
);
};
y(Ss);
-const { Fail: Pi } = Y, Ai = () => {
+const { Fail: Ai } = Y, Ti = () => {
const t = H(null), e = y({
eval: {
get() {
@@ -2781,18 +2781,18 @@ const { Fail: Pi } = Y, Ai = () => {
evalScope: t,
allowNextEvalToBeUnsafe() {
const { revoked: n } = r;
- n !== null && Pi`a handler did not reset allowNextEvalToBeUnsafe ${n.err}`, B(t, e);
+ n !== null && Ai`a handler did not reset allowNextEvalToBeUnsafe ${n.err}`, B(t, e);
},
/** @type {null | { err: any }} */
revoked: null
};
return r;
-}, io = "\\s*[@#]\\s*([a-zA-Z][a-zA-Z0-9]*)\\s*=\\s*([^\\s\\*]*)", Ti = new Xe(
+}, io = "\\s*[@#]\\s*([a-zA-Z][a-zA-Z0-9]*)\\s*=\\s*([^\\s\\*]*)", Ii = new Xe(
`(?:\\s*//${io}|/\\*${io}\\s*\\*/)\\s*$`
), Fn = (t) => {
let e = "";
for (; t.length > 0; ) {
- const r = $n(Ti, t);
+ const r = $n(Ii, t);
if (r === null)
break;
t = Nn(t, 0, t.length - r[0].length), r[3] === "sourceURL" ? e = r[4] : r[1] === "sourceURL" && (e = r[2]);
@@ -2800,7 +2800,7 @@ const { Fail: Pi } = Y, Ai = () => {
return e;
};
function Dn(t, e) {
- const r = $a(t, e);
+ const r = Na(t, e);
if (r < 0)
return -1;
const n = t[r] === `
@@ -2827,11 +2827,11 @@ const Es = new Xe("(?:)", "g"), ks = (t) => {
throw ir(
`Possible import expression rejected at ${r}:${e}. (SES_IMPORT_REJECTED)`
);
-}, Is = (t) => Pr(t, As, (r, n, o) => `${n}__import__${o}`), Ii = new Xe(
+}, Is = (t) => Pr(t, As, (r, n, o) => `${n}__import__${o}`), Ci = new Xe(
"(^|[^.])\\beval(\\s*\\()",
"g"
), Cs = (t) => {
- const e = Dn(t, Ii);
+ const e = Dn(t, Ci);
if (e < 0)
return t;
const r = Fn(t);
@@ -2852,7 +2852,7 @@ y({
mandatoryTransforms: y(Rs),
applyTransforms: y($s)
});
-const Ci = [
+const Ri = [
// 11.6.2.1 Keywords
"await",
"break",
@@ -2907,7 +2907,7 @@ const Ci = [
"false",
"this",
"arguments"
-], Ri = /^[a-zA-Z_$][\w$]*$/, co = (t) => t !== "eval" && !Hr(Ci, t) && Rn(Ri, t);
+], $i = /^[a-zA-Z_$][\w$]*$/, co = (t) => t !== "eval" && !Hr(Ri, t) && Rn($i, t);
function lo(t, e) {
const r = ee(t, e);
return r && //
@@ -2925,7 +2925,7 @@ function lo(t, e) {
// case where Object.prototype has been poisoned.
Q(r, "value");
}
-const $i = (t, e = {}) => {
+const Ni = (t, e = {}) => {
const r = Nt(t), n = Nt(e), o = et(
n,
(i) => co(i) && lo(e, i)
@@ -2945,8 +2945,8 @@ const $i = (t, e = {}) => {
function uo(t, e) {
return t.length === 0 ? "" : `const {${Zt(t, ",")}} = this.${e};`;
}
-const Ni = (t) => {
- const { globalObjectConstants: e, moduleLexicalConstants: r } = $i(
+const Oi = (t) => {
+ const { globalObjectConstants: e, moduleLexicalConstants: r } = Ni(
t.globalObject,
t.moduleLexicals
), n = uo(
@@ -2972,13 +2972,13 @@ const Ni = (t) => {
}
`);
return ue(s, t, []);
-}, { Fail: Oi } = Y, Un = ({
+}, { Fail: Mi } = Y, Un = ({
globalObject: t,
moduleLexicals: e = {},
globalTransforms: r = [],
sloppyGlobalsMode: n = !1
}) => {
- const o = n ? Ss(t) : ki, s = Ai(), { evalScope: i } = s, c = y({
+ const o = n ? Ss(t) : Pi, s = Ti(), { evalScope: i } = s, c = y({
evalScope: i,
moduleLexicals: e,
globalObject: t,
@@ -2986,7 +2986,7 @@ const Ni = (t) => {
});
let l;
const u = () => {
- l || (l = Ni(c));
+ l || (l = Oi(c));
};
return { safeEvaluate: (f, h) => {
const { localTransforms: p = [] } = h || {};
@@ -2998,14 +2998,14 @@ const Ni = (t) => {
let m;
try {
return s.allowNextEvalToBeUnsafe(), ue(l, t, [f]);
- } catch (A) {
- throw m = A, A;
+ } catch (k) {
+ throw m = k, k;
} finally {
- const A = "eval" in i;
- delete i.eval, A && (s.revoked = { err: m }, Oi`handler did not reset allowNextEvalToBeUnsafe ${m}`);
+ const k = "eval" in i;
+ delete i.eval, k && (s.revoked = { err: m }, Mi`handler did not reset allowNextEvalToBeUnsafe ${m}`);
}
} };
-}, Mi = ") { [native code] }";
+}, Li = ") { [native code] }";
let ln;
const Ns = () => {
if (ln === void 0) {
@@ -3013,8 +3013,8 @@ const Ns = () => {
D(Vr, "toString", {
value: {
toString() {
- const r = Ma(this);
- return Bo(r, Mi) || !lr(t, this) ? r : `function ${this.name}() { [native code] }`;
+ const r = La(this);
+ return Bo(r, Li) || !lr(t, this) ? r : `function ${this.name}() { [native code] }`;
}
}.toString
}), ln = y(
@@ -3023,7 +3023,7 @@ const Ns = () => {
}
return ln;
};
-function Li(t = "safe") {
+function Fi(t = "safe") {
if (t !== "safe" && t !== "unsafe")
throw _(`unrecognized domainTaming ${t}`);
if (t === "unsafe")
@@ -3043,7 +3043,7 @@ function Li(t = "safe") {
});
}
}
-const Fi = () => {
+const Di = () => {
const t = {}, e = S.ModuleSource;
if (e !== void 0) {
let n = function() {
@@ -3110,7 +3110,7 @@ const Fi = () => {
]), Os = y([
...jn,
...Zn
-]), Di = (t, { shouldResetForDebugging: e = !1 } = {}) => {
+]), Ui = (t, { shouldResetForDebugging: e = !1 } = {}) => {
e && t.resetErrorTagNum();
let r = [];
const n = bt(
@@ -3131,7 +3131,7 @@ const Fi = () => {
n
), takeLog: o });
};
-y(Di);
+y(Ui);
const dt = {
NOTE: "ERROR_NOTE:",
MESSAGE: "ERROR_MESSAGE:",
@@ -3200,21 +3200,21 @@ const zn = (t, e) => {
t[x](...T);
};
return D(R, "name", { value: x }), [x, y(R)];
- }), A = bt([...h, ...m]);
+ }), k = bt([...h, ...m]);
return (
/** @type {VirtualConsole} */
- y(A)
+ y(k)
);
};
y(zn);
-const Ui = (t, e, r) => {
+const ji = (t, e, r) => {
const [n, ...o] = On(t, e), s = jo(o, (i) => [e, ...r, i]);
return ["", n, ...s];
}, Ms = (t) => y((r) => {
const n = [], o = (...l) => (n.length > 0 && (l = jo(
l,
(u) => typeof u == "string" && Go(u, `
-`) ? Ui(u, `
+`) ? ji(u, `
`, n) : [u]
), l = [...n, ...l]), r(...l)), s = (l, u) => ({ [l]: (...d) => u(...d) })[l], i = bt([
...de(jn, ([l]) => [
@@ -3241,7 +3241,7 @@ const Ui = (t, e, r) => {
);
});
y(Ms);
-const ji = (t, e, r = void 0) => {
+const Zi = (t, e, r = void 0) => {
const n = et(
Os,
([i, c]) => i in t
@@ -3253,13 +3253,13 @@ const ji = (t, e, r = void 0) => {
y(s)
);
};
-y(ji);
+y(Zi);
const fo = (t) => {
if ($t === void 0)
return;
let e = 0;
const r = new $e(), n = (d) => {
- Pa(r, d);
+ Aa(r, d);
}, o = new ze(), s = (d) => {
if (Wr(r, d)) {
const f = Ke(r, d);
@@ -3274,16 +3274,16 @@ const fo = (t) => {
unhandledRejectionHandler: (d, f) => {
e += 1;
const h = e;
- pe(r, h, d), he(o, f, h), La(i, f, h, f);
+ pe(r, h, d), he(o, f, h), Fa(i, f, h, f);
},
processTerminationHandler: () => {
- for (const [d, f] of Aa(r))
+ for (const [d, f] of Ta(r))
n(d), t(f);
}
};
}, un = (t) => {
throw _(t);
-}, po = (t, e) => y((...r) => ue(t, e, r)), Zi = (t = "safe", e = "platform", r = "report", n = void 0) => {
+}, po = (t, e) => y((...r) => ue(t, e, r)), zi = (t = "safe", e = "platform", r = "report", n = void 0) => {
t === "safe" || t === "unsafe" || un(`unrecognized consoleTaming ${t}`);
let o;
n === void 0 ? o = Ir : o = {
@@ -3344,7 +3344,7 @@ const fo = (t) => {
}));
}
return { console: i };
-}, zi = [
+}, Bi = [
// suppress 'getThis' definitely
"getTypeName",
// suppress 'getFunction' definitely
@@ -3367,42 +3367,42 @@ const fo = (t) => {
"getScriptNameOrSourceURL",
"toString"
// TODO replace to use only permitted info
-], Bi = (t) => {
- const r = bt(de(zi, (n) => {
+], Gi = (t) => {
+ const r = bt(de(Bi, (n) => {
const o = t[n];
return [n, () => ue(o, t, [])];
}));
return H(r, {});
-}, Gi = (t) => de(t, Bi), Vi = /\/node_modules\//, Hi = /^(?:node:)?internal\//, Wi = /\/packages\/ses\/src\/error\/assert.js$/, qi = /\/packages\/eventual-send\/src\//, Ki = [
- Vi,
+}, Vi = (t) => de(t, Gi), Hi = /\/node_modules\//, Wi = /^(?:node:)?internal\//, qi = /\/packages\/ses\/src\/error\/assert.js$/, Ki = /\/packages\/eventual-send\/src\//, Yi = [
Hi,
Wi,
- qi
-], Yi = (t) => {
+ qi,
+ Ki
+], Ji = (t) => {
if (!t)
return !0;
- for (const e of Ki)
+ for (const e of Yi)
if (Rn(e, t))
return !1;
return !0;
-}, Ji = /^((?:.*[( ])?)[:/\w_-]*\/\.\.\.\/(.+)$/, Xi = /^((?:.*[( ])?)[:/\w_-]*\/(packages\/.+)$/, Qi = [
- Ji,
- Xi
-], ec = (t) => {
- for (const e of Qi) {
+}, Xi = /^((?:.*[( ])?)[:/\w_-]*\/\.\.\.\/(.+)$/, Qi = /^((?:.*[( ])?)[:/\w_-]*\/(packages\/.+)$/, ec = [
+ Xi,
+ Qi
+], tc = (t) => {
+ for (const e of ec) {
const r = $n(e, t);
if (r)
- return Zt(wa(r, 1), "");
+ return Zt(xa(r, 1), "");
}
return t;
-}, tc = (t, e, r, n) => {
+}, rc = (t, e, r, n) => {
if (r === "unsafe-debug")
throw _(
"internal: v8+unsafe-debug special case should already be done"
);
- const o = t.captureStackTrace, s = (p) => n === "verbose" ? !0 : Yi(p.getFileName()), i = (p) => {
+ const o = t.captureStackTrace, s = (p) => n === "verbose" ? !0 : Ji(p.getFileName()), i = (p) => {
let m = `${p}`;
- return n === "concise" && (m = ec(m)), `
+ return n === "concise" && (m = tc(m)), `
at ${m}`;
}, c = (p, m) => Zt(
de(et(m, s), i),
@@ -3428,13 +3428,13 @@ const fo = (t) => {
let m = z(l, p);
if (m === void 0 && (p.stack, m = z(l, p), m || (m = { stackString: "" }, he(l, p, m))), m.stackString !== void 0)
return m.stackString;
- const A = c(p, m.callSites);
- return he(l, p, { stackString: A }), A;
+ const k = c(p, m.callSites);
+ return he(l, p, { stackString: k }), k;
},
prepareStackTrace(p, m) {
if (r === "unsafe") {
- const A = c(p, m);
- return he(l, p, { stackString: A }), `${p}${A}`;
+ const k = c(p, m);
+ return he(l, p, { stackString: k }), `${p}${k}`;
} else
return he(l, p, { callSites: m }), "";
}
@@ -3444,8 +3444,8 @@ const fo = (t) => {
if (lr(f, p))
return p;
const m = {
- prepareStackTrace(A, x) {
- return he(l, A, { callSites: x }), p(A, Gi(x));
+ prepareStackTrace(k, x) {
+ return he(l, k, { callSites: x }), p(k, Vi(x));
}
};
return qr(f, m.prepareStackTrace), m.prepareStackTrace;
@@ -3472,13 +3472,13 @@ const fo = (t) => {
configurable: !0
}
}), u.getStackString;
-}, ho = ee(le.prototype, "stack"), mo = ho && ho.get, rc = {
+}, ho = ee(le.prototype, "stack"), mo = ho && ho.get, nc = {
getStackString(t) {
return typeof mo == "function" ? ue(mo, t, []) : "stack" in t ? `${t.stack}` : "";
}
};
-let hr = rc.getStackString;
-function nc(t = "safe", e = "concise") {
+let hr = nc.getStackString;
+function oc(t = "safe", e = "concise") {
if (t !== "safe" && t !== "unsafe" && t !== "unsafe-debug")
throw _(`unrecognized errorTaming ${t}`);
if (e !== "concise" && e !== "verbose")
@@ -3578,7 +3578,7 @@ function nc(t = "safe", e = "concise") {
enumerable: !1,
configurable: !0
}
- }), o === "v8" ? hr = tc(
+ }), o === "v8" ? hr = rc(
le,
i,
t,
@@ -3621,8 +3621,8 @@ function nc(t = "safe", e = "concise") {
"%SharedError%": c
};
}
-const oc = () => {
-}, sc = async (t, e, r) => {
+const sc = () => {
+}, ac = async (t, e, r) => {
await null;
const n = t(...e);
let o = kr(n);
@@ -3634,7 +3634,7 @@ const oc = () => {
o = Vo(n, r(s));
}
return o.value;
-}, ac = (t, e) => {
+}, ic = (t, e) => {
const r = t(...e);
let n = kr(r);
for (; !n.done; )
@@ -3644,7 +3644,7 @@ const oc = () => {
n = Vo(r, o);
}
return n.value;
-}, ic = (t, e) => y({ compartment: t, specifier: e }), cc = (t, e, r) => {
+}, cc = (t, e) => y({ compartment: t, specifier: e }), lc = (t, e, r) => {
const n = H(null);
for (const o of t) {
const s = e(o, r);
@@ -3660,7 +3660,7 @@ const oc = () => {
throw Ce(
re`Invalid module source: 'imports' must be an array of strings, got ${f} for module ${U(n)} of compartment ${U(d)}`
);
- const h = cc(f, u, n), p = y({
+ const h = lc(f, u, n), p = y({
compartment: r,
moduleSource: o,
moduleSpecifier: n,
@@ -3679,7 +3679,7 @@ const oc = () => {
]);
return p;
};
-function* lc(t, e, r, n, o, s, i) {
+function* uc(t, e, r, n, o, s, i) {
const {
importHook: c,
importNowHook: l,
@@ -3694,12 +3694,12 @@ function* lc(t, e, r, n, o, s, i) {
if (p === void 0 && d !== void 0 && (p = d(n)), p === void 0) {
const m = s(c, l);
if (m === void 0) {
- const A = s(
+ const k = s(
"importHook",
"importNowHook"
);
throw Ce(
- re`${Tr(A)} needed to load module ${U(
+ re`${Tr(k)} needed to load module ${U(
n
)} in compartment ${U(r.name)}`
);
@@ -3876,8 +3876,8 @@ const It = (t, e, r, n, o, s, i) => {
let l = Ke(i, r);
l === void 0 && (l = new $e(), pe(i, r, l));
let u = Ke(l, n);
- return u !== void 0 || (u = s(sc, ac)(
- lc,
+ return u !== void 0 || (u = s(ac, ic)(
+ uc,
[
t,
e,
@@ -3896,12 +3896,12 @@ const It = (t, e, r, n, o, s, i) => {
), d;
}
), pe(l, n, u)), u;
-}, uc = () => {
+}, dc = () => {
const t = new Dt(), e = [];
return { enqueueJob: (o, s) => {
In(
t,
- qo(o(...s), oc, (i) => {
+ qo(o(...s), sc, (i) => {
ne(e, i);
})
);
@@ -3921,18 +3921,18 @@ const It = (t, e, r, n, o, s, i) => {
)}`
);
}
-}, dc = (t, e) => e, fc = (t, e) => t, go = async (t, e, r, n) => {
+}, fc = (t, e) => e, pc = (t, e) => t, go = async (t, e, r, n) => {
const { name: o } = z(
t,
r
- ), s = new $e(), { enqueueJob: i, drainQueue: c } = uc();
+ ), s = new $e(), { enqueueJob: i, drainQueue: c } = dc();
i(It, [
t,
e,
r,
n,
i,
- fc,
+ pc,
s
]);
const l = await c();
@@ -3942,7 +3942,7 @@ const It = (t, e, r, n, o, s, i) => {
o
)}`
});
-}, pc = (t, e, r, n) => {
+}, hc = (t, e, r, n) => {
const { name: o } = z(
t,
r
@@ -3959,7 +3959,7 @@ const It = (t, e, r, n, o, s, i) => {
r,
n,
c,
- dc,
+ fc,
s
]), Ls({
errors: i,
@@ -3967,7 +3967,7 @@ const It = (t, e, r, n, o, s, i) => {
o
)}`
});
-}, { quote: St } = Y, hc = () => {
+}, { quote: St } = Y, mc = () => {
let t = !1;
const e = H(null, {
// Make this appear like an ESM module namespace object.
@@ -3991,7 +3991,7 @@ const It = (t, e, r, n, o, s, i) => {
n
)} of module exports namespace, the module has not yet begun to execute`
);
- return ya(e, n, o);
+ return _a(e, n, o);
},
set(r, n, o) {
throw _(
@@ -4026,21 +4026,21 @@ const It = (t, e, r, n, o, s, i) => {
n
)}, the module has not yet begun to execute`
);
- return _a(e, n);
+ return va(e, n);
},
preventExtensions(r) {
if (!t)
throw _(
"Cannot prevent extensions of module exports namespace, the module has not yet begun to execute"
);
- return ba(e);
+ return wa(e);
},
isExtensible() {
if (!t)
throw _(
"Cannot check extensibility of module exports namespace, the module has not yet begun to execute"
);
- return va(e);
+ return ba(e);
},
getPrototypeOf(r) {
return null;
@@ -4068,15 +4068,15 @@ const It = (t, e, r, n, o, s, i) => {
}, Bn = (t, e, r, n) => {
const { deferredExports: o } = e;
if (!Wr(o, n)) {
- const s = hc();
+ const s = mc();
he(
r,
s.exportsProxy,
- ic(t, n)
+ cc(t, n)
), pe(o, n, s);
}
return Ke(o, n);
-}, mc = (t, e) => {
+}, gc = (t, e) => {
const { sloppyGlobalsMode: r = !1, __moduleShimLexicals__: n = void 0 } = e;
let o;
if (n === void 0 && !r)
@@ -4107,14 +4107,14 @@ const It = (t, e, r, n, o, s, i) => {
// Note default on
} = r, c = [...n];
o === !0 && ne(c, Ps), s === !0 && ne(c, Is), i === !0 && ne(c, Cs);
- const { safeEvaluate: l } = mc(
+ const { safeEvaluate: l } = gc(
t,
r
);
return l(e, {
localTransforms: c
});
-}, { quote: mr } = Y, gc = (t, e, r, n, o, s) => {
+}, { quote: mr } = Y, yc = (t, e, r, n, o, s) => {
const { exportsProxy: i, exportsTarget: c, activate: l } = Bn(
r,
z(t, r),
@@ -4164,7 +4164,7 @@ const It = (t, e, r, n, o, s, i) => {
}
}
});
-}, yc = (t, e, r, n) => {
+}, _c = (t, e, r, n) => {
const {
compartment: o,
moduleSpecifier: s,
@@ -4178,9 +4178,9 @@ const It = (t, e, r, n, o, s, i) => {
__reexportMap__: h = {},
__needsImportMeta__: p = !1,
__syncModuleFunctor__: m
- } = i, A = z(t, o), { __shimTransforms__: x, importMetaHook: w } = A, { exportsProxy: R, exportsTarget: T, activate: j } = Bn(
+ } = i, k = z(t, o), { __shimTransforms__: x, importMetaHook: w } = k, { exportsProxy: R, exportsTarget: T, activate: j } = Bn(
o,
- A,
+ k,
e,
s
), I = H(null), L = H(null), Z = H(null), se = H(null), J = H(null);
@@ -4310,13 +4310,13 @@ const It = (t, e, r, n, o, s, i) => {
), y(T), j();
}
let wt;
- m !== void 0 ? wt = m : wt = Fs(A, u, {
+ m !== void 0 ? wt = m : wt = Fs(k, u, {
globalObject: o.globalThis,
transforms: x,
__moduleShimLexicals__: L
});
let Pe = !1, st;
- function ra() {
+ function na() {
if (wt) {
const we = wt;
wt = null;
@@ -4339,7 +4339,7 @@ const It = (t, e, r, n, o, s, i) => {
return y({
notifiers: Me,
exportsProxy: R,
- execute: ra
+ execute: na
});
}, { Fail: ft, quote: X } = Y, Ds = (t, e, r, n) => {
const { name: o, moduleRecords: s } = z(
@@ -4352,12 +4352,12 @@ const It = (t, e, r, n, o, s, i) => {
o
)}`
);
- return Sc(t, e, i);
+ return Ec(t, e, i);
};
-function _c(t) {
+function vc(t) {
return typeof t.__syncModuleProgram__ == "string";
}
-function vc(t, e) {
+function bc(t, e) {
const { __fixedExportMap__: r, __liveExportMap__: n } = t;
ke(r) || ft`Property '__fixedExportMap__' of a precompiled module source must be an object, got ${X(
r
@@ -4365,16 +4365,16 @@ function vc(t, e) {
n
)}, for module ${X(e)}`;
}
-function bc(t) {
+function wc(t) {
return typeof t.execute == "function";
}
-function wc(t, e) {
+function xc(t, e) {
const { exports: r } = t;
pt(r) || ft`Invalid module source: 'exports' of a virtual module source must be an array, got ${X(
r
)}, for module ${X(e)}`;
}
-function xc(t, e) {
+function Sc(t, e) {
ke(t) || ft`Invalid module source: must be of type object, got ${X(
t
)}, for module ${X(e)}`;
@@ -4387,22 +4387,22 @@ function xc(t, e) {
o
)}, for module ${X(e)}`;
}
-const Sc = (t, e, r) => {
+const Ec = (t, e, r) => {
const { compartment: n, moduleSpecifier: o, resolvedImports: s, moduleSource: i } = r, { instances: c } = z(t, n);
if (Wr(c, o))
return Ke(c, o);
- xc(i, o);
+ Sc(i, o);
const l = new $e();
let u;
- if (_c(i))
- vc(i, o), u = yc(
+ if (vc(i))
+ bc(i, o), u = _c(
t,
e,
r,
l
);
- else if (bc(i))
- wc(i, o), u = gc(
+ else if (wc(i))
+ xc(i, o), u = yc(
t,
i,
n,
@@ -4492,7 +4492,7 @@ const Sc = (t, e, r) => {
importNow(t) {
if (typeof t != "string")
throw _("first argument of importNow() must be a string");
- return pc(Fe, Gt, this, t), yo(
+ return hc(Fe, Gt, this, t), yo(
/** @type {Compartment} */
this,
t
@@ -4510,7 +4510,7 @@ B(Vn, {
B(Gn, {
prototype: { value: Vn }
});
-const Ec = (...t) => {
+const kc = (...t) => {
if (t.length === 0)
return {};
if (t.length === 1 && typeof t[0] == "object" && t[0] !== null && "__options__" in t[0]) {
@@ -4561,10 +4561,10 @@ const Ec = (...t) => {
importHook: h,
importNowHook: p,
moduleMapHook: m,
- importMetaHook: A,
+ importMetaHook: k,
__noNamespaceBox__: x = !1
- } = Ec(...s), w = [...c, ...l], R = { __proto__: null, ...u }, T = { __proto__: null, ...d }, j = new $e(), I = new $e(), L = new $e(), Z = {};
- xi(Z), _s(Z);
+ } = kc(...s), w = [...c, ...l], R = { __proto__: null, ...u }, T = { __proto__: null, ...d }, j = new $e(), I = new $e(), L = new $e(), Z = {};
+ Si(Z), _s(Z);
const { safeEvaluate: se } = Un({
globalObject: Z,
globalTransforms: w,
@@ -4590,7 +4590,7 @@ const Ec = (...t) => {
importNowHook: p,
moduleMap: T,
moduleMapHook: m,
- importMetaHook: A,
+ importMetaHook: k,
moduleRecords: j,
__shimTransforms__: l,
deferredExports: L,
@@ -4604,14 +4604,14 @@ const Ec = (...t) => {
function dn(t) {
return G(t).constructor;
}
-function kc() {
+function Pc() {
return arguments;
}
-const Pc = () => {
- const t = Ee.prototype.constructor, e = ee(kc(), "callee"), r = e && e.get, n = Na(new _e()), o = G(n), s = Br[$o] && Ca(/./), i = s && G(s), c = xa([]), l = G(c), u = G(sa), d = Ta(new $e()), f = G(d), h = Ia(new Dt()), p = G(h), m = G(l);
- function* A() {
+const Ac = () => {
+ const t = Ee.prototype.constructor, e = ee(Pc(), "callee"), r = e && e.get, n = Oa(new _e()), o = G(n), s = Br[$o] && Ra(/./), i = s && G(s), c = Sa([]), l = G(c), u = G(aa), d = Ia(new $e()), f = G(d), h = Ca(new Dt()), p = G(h), m = G(l);
+ function* k() {
}
- const x = dn(A), w = x.prototype;
+ const x = dn(k), w = x.prototype;
async function* R() {
}
const T = dn(
@@ -4665,7 +4665,7 @@ const Pc = () => {
return r.isFake = !0, y(r);
};
y(Us);
-const Ac = () => {
+const Tc = () => {
const t = At, e = t.prototype, r = Wo(At, void 0);
B(e, {
constructor: {
@@ -4682,7 +4682,7 @@ const Ac = () => {
])
);
return B(r, o), { "%SharedSymbol%": r };
-}, Tc = (t) => {
+}, Ic = (t) => {
try {
return t(), !1;
} catch {
@@ -4701,13 +4701,13 @@ const Ac = () => {
if (ue(s, c, [i]), c[e] !== i)
return !1;
const l = { __proto__: t };
- return ue(s, l, [i]), l[e] !== i || !Tc(() => ue(s, t, [r])) || "originalValue" in o || n.configurable === !1 ? !1 : (D(t, e, {
+ return ue(s, l, [i]), l[e] !== i || !Ic(() => ue(s, t, [r])) || "originalValue" in o || n.configurable === !1 ? !1 : (D(t, e, {
value: r,
writable: !0,
enumerable: n.enumerable,
configurable: !0
}), !0);
-}, Ic = (t) => {
+}, Cc = (t) => {
_o(
t["%IteratorPrototype%"],
"constructor",
@@ -4717,7 +4717,7 @@ const Ac = () => {
Qe,
"Iterator"
);
-}, Cc = () => {
+}, Rc = () => {
const t = on[De];
D(on, De, {
configurable: !0,
@@ -4733,7 +4733,7 @@ const Ac = () => {
}));
}
});
-}, Rc = () => {
+}, $c = () => {
if (typeof Sr.transfer == "function")
return {};
const t = S.structuredClone;
@@ -4744,16 +4744,16 @@ const Ac = () => {
* @param {number} [newLength]
*/
transfer(r = void 0) {
- const n = Ea(this);
+ const n = ka(this);
if (r === void 0 || r === n)
return t(this, { transfer: [this] });
if (typeof r != "number")
throw _("transfer newLength if provided must be a number");
if (r > n) {
const o = new To(r), s = new mn(this), i = new mn(o);
- return ka(i, s), t(this, { transfer: [this] }), o;
+ return Pa(i, s), t(this, { transfer: [this] }), o;
} else {
- const o = Sa(this, 0, r);
+ const o = Ea(this, 0, r);
return t(this, { transfer: [this] }), o;
}
}
@@ -4814,7 +4814,7 @@ const Ac = () => {
}
}, { Fail: fn, details: wo, quote: pn } = Y;
let yr, _r;
-const $c = ri(), Nc = () => {
+const Nc = ni(), Oc = () => {
let t = !1;
try {
t = Ee(
@@ -4869,7 +4869,7 @@ const $c = ri(), Nc = () => {
"safe"
),
__hardenTaming__: m = ce("LOCKDOWN_HARDEN_TAMING", "safe"),
- dateTaming: A = "safe",
+ dateTaming: k = "safe",
// deprecated
mathTaming: x = "safe",
// deprecated
@@ -4883,7 +4883,7 @@ const $c = ri(), Nc = () => {
Y.fail(
wo`Already locked down at ${yr} (SES_ALREADY_LOCKED_DOWN)`,
_
- ), yr = _("Prior lockdown (SES_ALREADY_LOCKED_DOWN)"), yr.stack, Nc(), S.Function.prototype.constructor !== S.Function && // @ts-ignore harden is absent on globalThis type def.
+ ), yr = _("Prior lockdown (SES_ALREADY_LOCKED_DOWN)"), yr.stack, Oc(), S.Function.prototype.constructor !== S.Function && // @ts-ignore harden is absent on globalThis type def.
typeof S.harden == "function" && // @ts-ignore lockdown is absent on globalThis type def.
typeof S.lockdown == "function" && S.Date.prototype.constructor !== S.Date && typeof S.Date.now == "function" && // @ts-ignore does not recognize that Date constructor is a special
// Function.
@@ -4892,14 +4892,14 @@ const $c = ri(), Nc = () => {
throw _(
"Already locked down but not by this SES instance (SES_MULTIPLE_INSTANCES)"
);
- Li(d);
- const I = Ns(), { addIntrinsics: L, completePrototypes: Z, finalIntrinsics: se } = ms(T), J = Us($c, m);
- L({ harden: J }), L(li()), L(ui(A)), L(nc(e, u)), L(di(x)), L(fi(s)), L(Ac()), L(Rc()), L(Fi()), L(Pc()), Z();
+ Fi(d);
+ const I = Ns(), { addIntrinsics: L, completePrototypes: Z, finalIntrinsics: se } = ms(T), J = Us(Nc, m);
+ L({ harden: J }), L(ui()), L(di(k)), L(oc(e, u)), L(fi(x)), L(pi(s)), L(Tc()), L($c()), L(Di()), L(Ac()), Z();
const be = se(), Me = { __proto__: null };
typeof S.Buffer == "function" && (Me.Buffer = S.Buffer);
let dr;
e === "safe" && (dr = be["%InitialGetStackString%"]);
- const zt = Zi(
+ const zt = zi(
c,
r,
o,
@@ -4911,10 +4911,10 @@ const $c = ri(), Nc = () => {
// eslint-disable-next-line no-underscore-dangle
/** @type {any} */
zt.console._times
- )), (e === "unsafe" || e === "unsafe-debug") && S.assert === Y && (S.assert = Xr(void 0, !0)), vi(be, i), Ic(be), bo(
+ )), (e === "unsafe" || e === "unsafe-debug") && S.assert === Y && (S.assert = Xr(void 0, !0)), bi(be, i), Cc(be), bo(
"SES Removing unpermitted intrinsics",
T,
- (Pe) => ci(
+ (Pe) => li(
be,
I,
Pe
@@ -4927,7 +4927,7 @@ const $c = ri(), Nc = () => {
}), f === "noEval")
wn(
S,
- Fa,
+ Da,
I
);
else if (f === "safeEval") {
@@ -4948,13 +4948,13 @@ const $c = ri(), Nc = () => {
), _r.stack, bo(
"SES Enabling property overrides",
T,
- (st) => mi(
+ (st) => gi(
be,
l,
st,
h
)
- ), p === "unsafe-ignore" && Cc();
+ ), p === "unsafe-ignore" && Rc();
const Pe = {
intrinsics: be,
hostIntrinsics: Me,
@@ -4983,36 +4983,43 @@ S.repairIntrinsics = (t) => {
S.harden = e();
};
};
-const Oc = Ns(), Mc = js("none");
+const Mc = Ns(), Lc = js("none");
S.Compartment = xn(
xn,
// Any reporting that would need to be done should have already been done
// during `lockdown()`.
// See https://github.com/endojs/endo/pull/2624#discussion_r1840979770
- ii(S, Mc),
- Oc
+ ci(S, Lc),
+ Mc
);
S.assert = Y;
-const Lc = Ms(Ir), Fc = ha(
+const Fc = Ms(Ir), Dc = ma(
"MAKE_CAUSAL_CONSOLE_FROM_LOGGER_KEY_FOR_SES_AVA"
);
-S[Fc] = Lc;
-const Dc = (t, e = t, r) => {
- let n = { x: 0, y: 0 }, o = { x: 0, y: 0 }, s = { x: 0, y: 0 };
- const i = (u) => {
- const { clientX: d, clientY: f } = u, h = d - s.x + o.x, p = f - s.y + o.y;
- n = { x: h, y: p }, e.style.transform = `translate(${h}px, ${p}px)`, r == null || r();
- }, c = () => {
- document.removeEventListener("mousemove", i), document.removeEventListener("mouseup", c);
- }, l = (u) => {
- s = { x: u.clientX, y: u.clientY }, o = { x: n.x, y: n.y }, document.addEventListener("mousemove", i), document.addEventListener("mouseup", c);
+S[Dc] = Fc;
+const zs = (t) => {
+ let e = 0, r = 0;
+ if (t && window.DOMMatrixReadOnly) {
+ const n = window.getComputedStyle(t), o = new DOMMatrixReadOnly(n.transform);
+ e = o.m41, r = o.m42;
+ }
+ return { x: e, y: r };
+}, Uc = (t, e = t, r) => {
+ let n = { x: 0, y: 0 }, o = { x: 0, y: 0 };
+ const s = (l) => {
+ const { clientX: u, clientY: d } = l, f = u - o.x + n.x, h = d - o.y + n.y;
+ e.style.transform = `translate(${f}px, ${h}px)`, r == null || r();
+ }, i = () => {
+ document.removeEventListener("mousemove", s), document.removeEventListener("mouseup", i);
+ }, c = (l) => {
+ o = { x: l.clientX, y: l.clientY }, n = zs(e), document.addEventListener("mousemove", s), document.addEventListener("mouseup", i);
};
- return t.addEventListener("mousedown", l), c;
-}, Uc = `:host{--spacing-4: .25rem;--spacing-8: calc(var(--spacing-4) * 2);--spacing-12: calc(var(--spacing-4) * 3);--spacing-16: calc(var(--spacing-4) * 4);--spacing-20: calc(var(--spacing-4) * 5);--spacing-24: calc(var(--spacing-4) * 6);--spacing-28: calc(var(--spacing-4) * 7);--spacing-32: calc(var(--spacing-4) * 8);--spacing-36: calc(var(--spacing-4) * 9);--spacing-40: calc(var(--spacing-4) * 10);--font-weight-regular: 400;--font-weight-bold: 500;--font-line-height-s: 1.2;--font-line-height-m: 1.4;--font-line-height-l: 1.5;--font-size-s: 12px;--font-size-m: 14px;--font-size-l: 16px}[data-theme]{background-color:var(--color-background-primary);color:var(--color-foreground-secondary)}::-webkit-resizer{display:none}.wrapper{position:absolute;inset-block-start:var(--modal-block-start);inset-inline-start:var(--modal-inline-start);z-index:1000;padding:10px;border-radius:15px;border:2px solid var(--color-background-quaternary);box-shadow:0 0 10px #0000004d;overflow:hidden;min-inline-size:25px;min-block-size:200px;resize:both}.wrapper:after{content:"";cursor:se-resize;inline-size:1rem;block-size:1rem;background-image:url("data:image/svg+xml,%3csvg%20width='16.022'%20xmlns='http://www.w3.org/2000/svg'%20height='16.022'%20viewBox='-0.011%20-0.011%2016.022%2016.022'%20fill='none'%3e%3cg%20data-testid='Group'%3e%3cg%20data-testid='Path'%3e%3cpath%20d='M.011%2015.917%2015.937-.011'%20class='fills'/%3e%3cg%20class='strokes'%3e%3cpath%20d='M.011%2015.917%2015.937-.011'%20style='fill:%20none;%20stroke-width:%201;%20stroke:%20rgb(111,%20111,%20111);%20stroke-opacity:%201;%20stroke-linecap:%20round;'%20class='stroke-shape'/%3e%3c/g%3e%3c/g%3e%3cg%20data-testid='Path'%3e%3cpath%20d='m11.207%2014.601%203.361-3.401'%20class='fills'/%3e%3cg%20class='strokes'%3e%3cpath%20d='m11.207%2014.601%203.361-3.401'%20style='fill:%20none;%20stroke-width:%201;%20stroke:%20rgb(111,%20111,%20111);%20stroke-opacity:%201;%20stroke-linecap:%20round;'%20class='stroke-shape'/%3e%3c/g%3e%3c/g%3e%3cg%20data-testid='Path'%3e%3cpath%20d='m4.884%2016.004%2011.112-11.17'%20class='fills'/%3e%3cg%20class='strokes'%3e%3cpath%20d='m4.884%2016.004%2011.112-11.17'%20style='fill:%20none;%20stroke-width:%201;%20stroke:%20rgb(111,%20111,%20111);%20stroke-opacity:%201;%20stroke-linecap:%20round;'%20class='stroke-shape'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e");background-position:center;right:5px;bottom:5px;pointer-events:none;position:absolute}.inner{padding:10px;cursor:grab;box-sizing:border-box;display:flex;flex-direction:column;overflow:hidden;block-size:100%}.inner>*{flex:1}.inner>.header{flex:0}.header{align-items:center;display:flex;justify-content:space-between;border-block-end:2px solid var(--color-background-quaternary);padding-block-end:var(--spacing-4)}button{background:transparent;border:0;cursor:pointer;padding:0}h1{font-size:var(--font-size-s);font-weight:var(--font-weight-bold);margin:0;margin-inline-end:var(--spacing-4);-webkit-user-select:none;user-select:none}iframe{border:none;inline-size:100%;block-size:100%}`;
-function jc(t, e, r, n, o) {
+ return t.addEventListener("mousedown", c), i;
+}, jc = `:host{--spacing-4: .25rem;--spacing-8: calc(var(--spacing-4) * 2);--spacing-12: calc(var(--spacing-4) * 3);--spacing-16: calc(var(--spacing-4) * 4);--spacing-20: calc(var(--spacing-4) * 5);--spacing-24: calc(var(--spacing-4) * 6);--spacing-28: calc(var(--spacing-4) * 7);--spacing-32: calc(var(--spacing-4) * 8);--spacing-36: calc(var(--spacing-4) * 9);--spacing-40: calc(var(--spacing-4) * 10);--font-weight-regular: 400;--font-weight-bold: 500;--font-line-height-s: 1.2;--font-line-height-m: 1.4;--font-line-height-l: 1.5;--font-size-s: 12px;--font-size-m: 14px;--font-size-l: 16px}[data-theme]{background-color:var(--color-background-primary);color:var(--color-foreground-secondary)}::-webkit-resizer{display:none}.wrapper{position:absolute;inset-block-start:var(--modal-block-start);inset-inline-start:var(--modal-inline-start);z-index:1000;padding:10px;border-radius:15px;border:2px solid var(--color-background-quaternary);box-shadow:0 0 10px #0000004d;overflow:hidden;min-inline-size:25px;min-block-size:200px;resize:both}.wrapper:after{content:"";cursor:se-resize;inline-size:1rem;block-size:1rem;background-image:url("data:image/svg+xml,%3csvg%20width='16.022'%20xmlns='http://www.w3.org/2000/svg'%20height='16.022'%20viewBox='-0.011%20-0.011%2016.022%2016.022'%20fill='none'%3e%3cg%20data-testid='Group'%3e%3cg%20data-testid='Path'%3e%3cpath%20d='M.011%2015.917%2015.937-.011'%20class='fills'/%3e%3cg%20class='strokes'%3e%3cpath%20d='M.011%2015.917%2015.937-.011'%20style='fill:%20none;%20stroke-width:%201;%20stroke:%20rgb(111,%20111,%20111);%20stroke-opacity:%201;%20stroke-linecap:%20round;'%20class='stroke-shape'/%3e%3c/g%3e%3c/g%3e%3cg%20data-testid='Path'%3e%3cpath%20d='m11.207%2014.601%203.361-3.401'%20class='fills'/%3e%3cg%20class='strokes'%3e%3cpath%20d='m11.207%2014.601%203.361-3.401'%20style='fill:%20none;%20stroke-width:%201;%20stroke:%20rgb(111,%20111,%20111);%20stroke-opacity:%201;%20stroke-linecap:%20round;'%20class='stroke-shape'/%3e%3c/g%3e%3c/g%3e%3cg%20data-testid='Path'%3e%3cpath%20d='m4.884%2016.004%2011.112-11.17'%20class='fills'/%3e%3cg%20class='strokes'%3e%3cpath%20d='m4.884%2016.004%2011.112-11.17'%20style='fill:%20none;%20stroke-width:%201;%20stroke:%20rgb(111,%20111,%20111);%20stroke-opacity:%201;%20stroke-linecap:%20round;'%20class='stroke-shape'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e");background-position:center;right:5px;bottom:5px;pointer-events:none;position:absolute}.inner{padding:10px;cursor:grab;box-sizing:border-box;display:flex;flex-direction:column;overflow:hidden;block-size:100%}.inner>*{flex:1}.inner>.header{flex:0}.header{align-items:center;display:flex;justify-content:space-between;border-block-end:2px solid var(--color-background-quaternary);padding-block-end:var(--spacing-4)}button{background:transparent;border:0;cursor:pointer;padding:0}h1{font-size:var(--font-size-s);font-weight:var(--font-weight-bold);margin:0;margin-inline-end:var(--spacing-4);-webkit-user-select:none;user-select:none}iframe{border:none;inline-size:100%;block-size:100%}`;
+function Zc(t, e, r, n, o) {
const s = document.createElement("plugin-modal");
s.setTheme(r);
- const { width: i } = zs(s, n == null ? void 0 : n.width, n == null ? void 0 : n.height), c = {
+ const { width: i } = Bs(s, n == null ? void 0 : n.width, n == null ? void 0 : n.height), c = {
blockStart: 40,
// To be able to resize the element as expected the position must be absolute from the right.
// This value is the length of the window minus the width of the element plus the width of the design tab.
@@ -5026,20 +5033,26 @@ function jc(t, e, r, n, o) {
`${c.inlineStart}px`
), s.setAttribute("title", t), s.setAttribute("iframe-src", e), o && s.setAttribute("allow-downloads", "true"), document.body.appendChild(s), s;
}
-function zs(t, e = 335, r = 590) {
- var d;
- let s = (d = t.shadowRoot) == null ? void 0 : d.querySelector(".wrapper"), i = 0, c = 0;
+function Bs(t, e = 335, r = 590) {
+ var m;
+ let s = (m = t.shadowRoot) == null ? void 0 : m.querySelector(".wrapper"), i = 0, c = 0;
if (s) {
- let f = s.getBoundingClientRect();
- i = f.x, c = f.y;
+ let k = s.getBoundingClientRect();
+ i = k.x, c = k.y;
}
- const l = window.innerWidth - i - 40, u = window.innerHeight - c - 40;
- return e = Math.min(e, l), r = Math.min(r, u), e = Math.max(e, 200), r = Math.max(r, 200), t.wrapper.style.width = `${e}px`, t.wrapper.style.minWidth = `${e}px`, t.wrapper.style.height = `${r}px`, t.wrapper.style.minHeight = `${r}px`, { width: e, height: r };
+ const l = window.innerWidth - 40, u = window.innerHeight - 40;
+ e = Math.min(e, l), r = Math.min(r, u), e = Math.max(e, 200), r = Math.max(r, 200);
+ let d = 0;
+ i + e > l && (d = l - (i + e));
+ let f = 0;
+ c + r > u && (f = u - (c + r));
+ let { x: h, y: p } = zs(t.wrapper);
+ return h = h + d, p = p + f, t.wrapper.style.transform = `translate(${h}px, ${p}px)`, t.wrapper.style.width = `${e}px`, t.wrapper.style.height = `${r}px`, { width: e, height: r };
}
-const Zc = `
-`, zc = 3;
+const zc = `
+`, Bc = 3;
var We, Rt;
-class Bc extends HTMLElement {
+class Gc extends HTMLElement {
constructor() {
super();
tn(this, We);
@@ -5050,14 +5063,14 @@ class Bc extends HTMLElement {
this.wrapper && this.wrapper.setAttribute("data-theme", r);
}
resize(r, n) {
- this.wrapper && zs(this, r, n);
+ this.wrapper && Bs(this, r, n);
}
disconnectedCallback() {
var r;
(r = at(this, Rt)) == null || r.call(this);
}
calculateZIndex() {
- const r = document.querySelectorAll("plugin-modal"), n = Array.from(r).filter((s) => s !== this).map((s) => Number(s.style.zIndex)), o = Math.max(...n, zc);
+ const r = document.querySelectorAll("plugin-modal"), n = Array.from(r).filter((s) => s !== this).map((s) => Number(s.style.zIndex)), o = Math.max(...n, Bc);
this.style.zIndex = (o + 1).toString();
}
connectedCallback() {
@@ -5066,7 +5079,7 @@ class Bc extends HTMLElement {
throw new Error("title and iframe-src attributes are required");
if (!this.shadowRoot)
throw new Error("Error creating shadow root");
- at(this, We).classList.add("inner"), this.wrapper.classList.add("wrapper"), this.wrapper.style.maxInlineSize = "90vw", this.wrapper.style.maxBlockSize = "90vh", fr(this, Rt, Dc(at(this, We), this.wrapper, () => {
+ at(this, We).classList.add("inner"), this.wrapper.classList.add("wrapper"), this.wrapper.style.maxInlineSize = "90vw", this.wrapper.style.maxBlockSize = "90vh", fr(this, Rt, Uc(at(this, We), this.wrapper, () => {
this.calculateZIndex();
}));
const s = document.createElement("div");
@@ -5074,7 +5087,7 @@ class Bc extends HTMLElement {
const i = document.createElement("h1");
i.textContent = r, s.appendChild(i);
const c = document.createElement("button");
- c.setAttribute("type", "button"), c.innerHTML = `