@panphora/clayjs 1.11.0 → 1.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/clay.standalone.js +1035 -908
- package/entries/sap.js +6 -6
- package/package.json +1 -1
package/dist/clay.standalone.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* clayjs 1.11.
|
|
1
|
+
/* clayjs 1.11.1 standalone build: every clayjs module in one file. https://clayjs.com/offline
|
|
2
2
|
Third-party code inside keeps its own license (Sortable MIT, Squire MIT, DOMPurify Apache-2.0 OR MPL-2.0, MicroModal MIT, parse5 MIT): https://clayjs.com/THIRD-PARTY-NOTICES.md */
|
|
3
3
|
(() => {
|
|
4
4
|
var __create = Object.create;
|
|
@@ -40494,28 +40494,28 @@ tr.hcms-shell.hcms-inline-ghost { display: table-row; }
|
|
|
40494
40494
|
"entries/sap.js"() {
|
|
40495
40495
|
(function() {
|
|
40496
40496
|
var Sap = (() => {
|
|
40497
|
-
var
|
|
40498
|
-
var
|
|
40499
|
-
var
|
|
40500
|
-
var
|
|
40501
|
-
var
|
|
40502
|
-
for (var n2 in e)
|
|
40503
|
-
},
|
|
40504
|
-
if (e && typeof e == "object" || typeof e == "function") for (let
|
|
40497
|
+
var Yt3 = Object.defineProperty;
|
|
40498
|
+
var Ke3 = Object.getOwnPropertyDescriptor;
|
|
40499
|
+
var Je3 = Object.getOwnPropertyNames;
|
|
40500
|
+
var Qe3 = Object.prototype.hasOwnProperty;
|
|
40501
|
+
var Ze3 = (t, e) => {
|
|
40502
|
+
for (var n2 in e) Yt3(t, n2, { get: e[n2], enumerable: true });
|
|
40503
|
+
}, tr2 = (t, e, n2, r) => {
|
|
40504
|
+
if (e && typeof e == "object" || typeof e == "function") for (let i2 of Je3(e)) !Qe3.call(t, i2) && i2 !== n2 && Yt3(t, i2, { get: () => e[i2], enumerable: !(r = Ke3(e, i2)) || r.enumerable });
|
|
40505
40505
|
return t;
|
|
40506
40506
|
};
|
|
40507
|
-
var
|
|
40508
|
-
var
|
|
40509
|
-
|
|
40510
|
-
function
|
|
40507
|
+
var er2 = (t) => tr2(Yt3({}, "__esModule", { value: true }), t);
|
|
40508
|
+
var nn2 = {};
|
|
40509
|
+
Ze3(nn2, { Sap: () => F2, default: () => rn, mount: () => Xe3, mountAll: () => Ut3, runtime: () => dt3 });
|
|
40510
|
+
function ue3(t) {
|
|
40511
40511
|
let e = false, n2 = /* @__PURE__ */ new Set(), r = [];
|
|
40512
|
-
function
|
|
40512
|
+
function i2(f2) {
|
|
40513
40513
|
f2 && (r.push(f2), r.length > 8 && r.shift());
|
|
40514
40514
|
}
|
|
40515
|
-
function
|
|
40516
|
-
|
|
40515
|
+
function s2(f2, w2) {
|
|
40516
|
+
i2(w2), !f2._broken && (n2.add(f2), !e && (e = true, queueMicrotask(a)));
|
|
40517
40517
|
}
|
|
40518
|
-
function
|
|
40518
|
+
function a() {
|
|
40519
40519
|
e = false;
|
|
40520
40520
|
let f2 = [...n2];
|
|
40521
40521
|
n2.clear();
|
|
@@ -40533,42 +40533,105 @@ tr.hcms-shell.hcms-inline-ghost { display: table-row; }
|
|
|
40533
40533
|
}
|
|
40534
40534
|
}
|
|
40535
40535
|
function k2(f2, w2) {
|
|
40536
|
-
|
|
40536
|
+
i2(w2), R2(f2);
|
|
40537
40537
|
}
|
|
40538
|
-
function
|
|
40538
|
+
function A2(f2) {
|
|
40539
40539
|
f2._broken = false, f2._passes = 0;
|
|
40540
40540
|
}
|
|
40541
|
-
return { schedule:
|
|
40541
|
+
return { schedule: s2, runNow: k2, rearm: A2, ring: r };
|
|
40542
|
+
}
|
|
40543
|
+
var Xt3 = { E01: { slug: "foreign-dialect", behavior: "HALT" }, E02: { slug: "moustaches-in-text", behavior: "HALT" }, E04: { slug: "duplicate-declaration", behavior: "HALT" }, E05: { slug: "reserved-name", behavior: "HALT" }, E06: { slug: "global-html-name", behavior: "HALT" }, E07: { slug: "calc-cycle", behavior: "ERR" }, E08: { slug: "expression-syntax", behavior: "HALT" }, E10: { slug: "orphan-item", behavior: "HALT" }, E12: { slug: "unknown-state-key", behavior: "ERR" }, E15: { slug: "write-to-undeclared-key", behavior: "ERR" }, E16: { slug: "write-to-computed-field", behavior: "ERR" }, E17: { slug: "unresolvable-action-target", behavior: "HALT" }, E18: { slug: "paint-on-form-control", behavior: "HALT" }, E20: { slug: "bind-on-non-control", behavior: "HALT" }, E22: { slug: "format-type", behavior: "ERR" }, E24: { slug: "runtime-expression-throw", behavior: "ERR" }, E26: { slug: "circuit-breaker", behavior: "HALT" }, E30: { slug: "attr-on-bound-control", behavior: "HALT" }, E31: { slug: "password-without-transient", behavior: "HALT" }, E32: { slug: "file-bind", behavior: "HALT" }, E33: { slug: "dialog-state-open", behavior: "HALT" }, E34: { slug: "transient-persist-collision", behavior: "HALT" }, E35: { slug: "presence-state-misuse", behavior: "HALT" }, E40: { slug: "each-not-array", behavior: "ERR" }, E41: { slug: "each-bad-key", behavior: "ERR" }, E42: { slug: "each-template", behavior: "ERR" }, E43: { slug: "bind-in-each-row", behavior: "ERR" }, W03: { slug: "unknown-colon-attribute", behavior: "WARN" }, W04: { slug: "expression-in-when", behavior: "WARN" }, W30: { slug: "nonzero-mount-writes", behavior: "WARN" }, W31: { slug: "detail-dialog-saved-open", behavior: "WARN" } }, mt3 = ["disabled", "readonly", "required", "checked", "selected", "multiple", "open", "inert", "autofocus", "novalidate", "hidden"], St3 = /* @__PURE__ */ new Set(["title", "style", "hidden", "lang", "dir", "translate", "class", "id", "nonce", "autofocus", "tabindex", "contenteditable", "spellcheck", "draggable", "role", "slot", "part", "name", "value", "type", "itemscope", "itemtype", "itemid", "itemprop", "itemref"]), Rt3 = /* @__PURE__ */ new Set(["sap", "scope", "items", "item", "template", "bind", "calc", "text", "show", "attr", "set", "trigger", "move", "sort", "detail", "each", "effect", "invalid", "confirm", "transient", "default", "persist", "sortable", "editmode"]);
|
|
40544
|
+
function Dt3(t) {
|
|
40545
|
+
if (!t || t.nodeType !== 1) return "?";
|
|
40546
|
+
if (t.id) return `${t.tagName.toLowerCase()}#${t.id}`;
|
|
40547
|
+
let e = [], n2 = t, r = 0;
|
|
40548
|
+
for (; n2 && n2.nodeType === 1 && r < 4; ) {
|
|
40549
|
+
let i2 = n2.tagName.toLowerCase();
|
|
40550
|
+
if (n2.hasAttribute("sap")) i2 += "[sap]";
|
|
40551
|
+
else if (n2.parentElement) {
|
|
40552
|
+
let s2 = [...n2.parentElement.children].filter((a) => a.tagName === n2.tagName);
|
|
40553
|
+
s2.length > 1 && (i2 += `:nth-of-type(${s2.indexOf(n2) + 1})`);
|
|
40554
|
+
}
|
|
40555
|
+
if (e.unshift(i2), n2.hasAttribute("sap")) break;
|
|
40556
|
+
n2 = n2.parentElement, r++;
|
|
40557
|
+
}
|
|
40558
|
+
return e.join(" > ");
|
|
40559
|
+
}
|
|
40560
|
+
function ce3(t) {
|
|
40561
|
+
let e = t.toLowerCase();
|
|
40562
|
+
return /^x-text$|^x-html$/.test(e) ? 'use text="state.x" (Sap paints text only)' : /^x-show$|^v-show$|^v-if$/.test(e) ? 'use show="expr" (toggles native hidden)' : /^x-model$|^v-model$/.test(e) ? 'use bind="field"' : /^@|^x-on:|^v-on:|^on:/.test(e) ? "use native onclick + Sap(this) (no event directive)" : /^:|^x-bind:class$|^v-bind:class$/.test(e) ? 'use class:NAME="expr" or attr:NAME="expr"' : /^x-for$|^v-for$/.test(e) ? 'use items="name" on the container and item template on the row' : /^x-data$/.test(e) ? "declare state with state= / bind / items (no JS state object)" : /^x-init$/.test(e) ? "use a <script> or onclick + Sap(this)" : /^bind:/.test(e) ? 'use bind="field"; one-way paint is attr:NAME="expr"' : /^x-/.test(e) || /^v-/.test(e) ? "this is a foreign-dialect attribute; Sap has no x-/v- attributes" : null;
|
|
40563
|
+
}
|
|
40564
|
+
var pt3 = class {
|
|
40565
|
+
constructor(e) {
|
|
40566
|
+
this.appName = e, this.errors = [], this.warnings = [], this.halted = false, this.haltReason = null;
|
|
40567
|
+
}
|
|
40568
|
+
block(e, n2, r = {}) {
|
|
40569
|
+
let i2 = (Xt3[e] || {}).slug || "error", s2 = { code: e, slug: i2, el: Dt3(n2), attr: r.attr || null, expr: r.expr || null, key: r.key || null, problem: r.problem || "", didYouMean: r.didYouMean || null, fix: r.fix || null, phase: r.phase || "runtime" }, a = [`
|
|
40570
|
+
` + (e[0] === "W" ? "sap \u26A0 " : "sap \u2717 ") + e + " " + i2];
|
|
40571
|
+
return a.push(` at ${s2.el}${s2.attr ? ` \u2014 ${s2.attr}="${s2.expr ?? ""}"` : ""}`), s2.problem && a.push(` problem: ${s2.problem}`), s2.didYouMean && a.push(` did you mean: ${s2.didYouMean}`), s2.fix && a.push(` fix: ${s2.fix}`), console.error(a.join(`
|
|
40572
|
+
`)), s2;
|
|
40573
|
+
}
|
|
40574
|
+
error(e, n2, r = {}) {
|
|
40575
|
+
let i2 = this.block(e, n2, r);
|
|
40576
|
+
return this.errors.push(i2), i2;
|
|
40577
|
+
}
|
|
40578
|
+
warn(e, n2, r = {}) {
|
|
40579
|
+
let i2 = this.block(e, n2, r);
|
|
40580
|
+
return this.warnings.push(i2), i2;
|
|
40581
|
+
}
|
|
40582
|
+
report() {
|
|
40583
|
+
return { ok: this.errors.length === 0 && !this.halted, app: this.appName, halted: this.halted, haltReason: this.haltReason, errors: this.errors.slice(), warnings: this.warnings.slice() };
|
|
40584
|
+
}
|
|
40585
|
+
};
|
|
40586
|
+
function ut3(t, e) {
|
|
40587
|
+
t && t.getAttribute("sap-error") !== e && t.setAttribute("sap-error", e);
|
|
40588
|
+
}
|
|
40589
|
+
function Ct3(t) {
|
|
40590
|
+
t && t.hasAttribute("sap-error") && t.removeAttribute("sap-error");
|
|
40591
|
+
}
|
|
40592
|
+
function xt3(t, e) {
|
|
40593
|
+
let n2 = null, r = 3;
|
|
40594
|
+
for (let i2 of e) {
|
|
40595
|
+
let s2 = rr2(t, i2);
|
|
40596
|
+
s2 < r && (r = s2, n2 = i2);
|
|
40597
|
+
}
|
|
40598
|
+
return n2;
|
|
40599
|
+
}
|
|
40600
|
+
function rr2(t, e) {
|
|
40601
|
+
let n2 = t.length, r = e.length, i2 = Array.from({ length: n2 + 1 }, (s2, a) => [a, ...new Array(r).fill(0)]);
|
|
40602
|
+
for (let s2 = 0; s2 <= r; s2++) i2[0][s2] = s2;
|
|
40603
|
+
for (let s2 = 1; s2 <= n2; s2++) for (let a = 1; a <= r; a++) i2[s2][a] = Math.min(i2[s2 - 1][a] + 1, i2[s2][a - 1] + 1, i2[s2 - 1][a - 1] + (t[s2 - 1] === e[a - 1] ? 0 : 1));
|
|
40604
|
+
return i2[n2][r];
|
|
40542
40605
|
}
|
|
40543
|
-
var
|
|
40544
|
-
function
|
|
40606
|
+
var nr2 = new Set(mt3), or2 = { readonly: "readOnly", novalidate: "noValidate" }, ir2 = 0, fe3 = /* @__PURE__ */ new WeakMap();
|
|
40607
|
+
function Mt3(t, e = "sap") {
|
|
40545
40608
|
let n2 = t.getAttribute("data-id");
|
|
40546
40609
|
if (n2) return n2;
|
|
40547
40610
|
if (t.id) return t.id;
|
|
40548
|
-
let r =
|
|
40549
|
-
return r || (r = `${e}-${(
|
|
40611
|
+
let r = fe3.get(t);
|
|
40612
|
+
return r || (r = `${e}-${(ir2++).toString(36)}`, fe3.set(t, r)), r;
|
|
40550
40613
|
}
|
|
40551
|
-
function
|
|
40614
|
+
function le3(t, e = "row") {
|
|
40552
40615
|
for (; ; ) {
|
|
40553
40616
|
let n2 = `${e}-${Math.random().toString(36).slice(2, 8)}`;
|
|
40554
40617
|
if (!t.getElementById(n2) && !t.querySelector(`[data-id="${n2}"]`)) return n2;
|
|
40555
40618
|
}
|
|
40556
40619
|
}
|
|
40557
|
-
function
|
|
40620
|
+
function sr2(t) {
|
|
40558
40621
|
return t.hasAttribute("scope") || t.hasAttribute("items") || t.hasAttribute("detail") || t.hasAttribute("each");
|
|
40559
40622
|
}
|
|
40560
|
-
function
|
|
40561
|
-
return t.hasAttribute("sap-ignore") || t.hasAttribute("template");
|
|
40623
|
+
function ar2(t) {
|
|
40624
|
+
return t.tagName === "TEMPLATE" || t.hasAttribute("sap-ignore") || t.hasAttribute("template");
|
|
40562
40625
|
}
|
|
40563
|
-
function
|
|
40626
|
+
function K2(t, e) {
|
|
40564
40627
|
for (let r of t.children) n2(r);
|
|
40565
40628
|
function n2(r) {
|
|
40566
|
-
if (r.nodeType !== 1 ||
|
|
40567
|
-
let
|
|
40568
|
-
if (e(r,
|
|
40629
|
+
if (r.nodeType !== 1 || ar2(r)) return;
|
|
40630
|
+
let i2 = sr2(r);
|
|
40631
|
+
if (e(r, i2), !i2) for (let s2 of r.children) n2(s2);
|
|
40569
40632
|
}
|
|
40570
40633
|
}
|
|
40571
|
-
function
|
|
40634
|
+
function Y2(t) {
|
|
40572
40635
|
let e = t;
|
|
40573
40636
|
for (; e; ) {
|
|
40574
40637
|
if (e.hasAttribute("sap") || e.hasAttribute("scope") || e.hasAttribute("item") || e.hasAttribute("detail")) return e;
|
|
@@ -40576,14 +40639,14 @@ tr.hcms-shell.hcms-inline-ghost { display: table-row; }
|
|
|
40576
40639
|
}
|
|
40577
40640
|
return null;
|
|
40578
40641
|
}
|
|
40579
|
-
function
|
|
40642
|
+
function ft2(t) {
|
|
40580
40643
|
for (let e = t; e && e.nodeType === 1; e = e.parentElement) {
|
|
40581
40644
|
if (e._sapEachRow) return e;
|
|
40582
40645
|
if (e.hasAttribute("item") || e.hasAttribute("sap")) return null;
|
|
40583
40646
|
}
|
|
40584
40647
|
return null;
|
|
40585
40648
|
}
|
|
40586
|
-
function
|
|
40649
|
+
function It3(t) {
|
|
40587
40650
|
let e = t;
|
|
40588
40651
|
for (; e; ) {
|
|
40589
40652
|
if (e.hasAttribute("detail") || e.hasAttribute("item")) return e;
|
|
@@ -40591,7 +40654,7 @@ tr.hcms-shell.hcms-inline-ghost { display: table-row; }
|
|
|
40591
40654
|
}
|
|
40592
40655
|
return null;
|
|
40593
40656
|
}
|
|
40594
|
-
function
|
|
40657
|
+
function kt3(t) {
|
|
40595
40658
|
let e = t;
|
|
40596
40659
|
for (; e; ) {
|
|
40597
40660
|
if (e.hasAttribute("detail")) return e;
|
|
@@ -40599,39 +40662,56 @@ tr.hcms-shell.hcms-inline-ghost { display: table-row; }
|
|
|
40599
40662
|
}
|
|
40600
40663
|
return null;
|
|
40601
40664
|
}
|
|
40602
|
-
function
|
|
40665
|
+
function lt3(t, e) {
|
|
40666
|
+
if (t.hasAttribute("item") && t.getAttribute("bind") === e) return t;
|
|
40603
40667
|
let n2 = null;
|
|
40604
|
-
return
|
|
40668
|
+
return K2(t, (r) => {
|
|
40605
40669
|
!n2 && r.getAttribute("bind") === e && (n2 = r);
|
|
40606
40670
|
}), n2;
|
|
40607
40671
|
}
|
|
40608
|
-
function
|
|
40672
|
+
function ht3(t, e) {
|
|
40609
40673
|
let n2 = null;
|
|
40610
|
-
return
|
|
40674
|
+
return K2(t, (r) => {
|
|
40611
40675
|
!n2 && r.getAttribute("items") === e && (n2 = r);
|
|
40612
40676
|
}), n2;
|
|
40613
40677
|
}
|
|
40614
|
-
function
|
|
40678
|
+
function bt3(t, e) {
|
|
40679
|
+
return !t || t.nodeType !== 1 || !t.hasAttribute("item") ? false : lt3(t, e) || ht3(t, e) ? true : z2(t.getAttribute("state") || "").some((n2) => n2.name === e);
|
|
40680
|
+
}
|
|
40681
|
+
function de3(t) {
|
|
40682
|
+
let e = t && t.$el;
|
|
40683
|
+
return e && e.nodeType === 1 && e.isConnected && e.hasAttribute("item") ? e : null;
|
|
40684
|
+
}
|
|
40685
|
+
function Ot3(t) {
|
|
40686
|
+
return !!t.closest("form[trigger-add]");
|
|
40687
|
+
}
|
|
40688
|
+
function Z3(t) {
|
|
40615
40689
|
return [...t.children].filter((e) => e.hasAttribute("item") && !e.hasAttribute("template"));
|
|
40616
40690
|
}
|
|
40617
|
-
function
|
|
40618
|
-
|
|
40691
|
+
function Kt2(t, e) {
|
|
40692
|
+
if (!t || !e) return null;
|
|
40693
|
+
let n2 = [...t.querySelectorAll(`template[items="${e}"]`)].find((i2) => i2.closest("[sap]") === t), r = n2 && n2.content.firstElementChild;
|
|
40694
|
+
return r && r.hasAttribute("item") ? r : null;
|
|
40619
40695
|
}
|
|
40620
|
-
function
|
|
40696
|
+
function Ft3(t) {
|
|
40697
|
+
let e = [...t.children].find((n2) => n2.hasAttribute("item") && n2.hasAttribute("template"));
|
|
40698
|
+
return e || Kt2(t.closest("[sap]"), t.getAttribute("items"));
|
|
40699
|
+
}
|
|
40700
|
+
function z2(t) {
|
|
40621
40701
|
let e = [];
|
|
40622
40702
|
if (!t) return e;
|
|
40623
40703
|
for (let n2 of t.trim().split(/\s+/)) {
|
|
40624
40704
|
if (!n2) continue;
|
|
40625
|
-
let r = n2,
|
|
40626
|
-
|
|
40627
|
-
let
|
|
40628
|
-
for (let N2 of
|
|
40629
|
-
let f2 = R2, w2 = f2.startsWith("data-") && f2.length > 5 ? f2.slice(5).replace(/-([a-z])/g, (N2,
|
|
40630
|
-
e.push({ name: w2, attr: f2, type: k2, default:
|
|
40705
|
+
let r = n2, i2, s2 = r.indexOf("=");
|
|
40706
|
+
s2 >= 0 && (i2 = r.slice(s2 + 1), r = r.slice(0, s2));
|
|
40707
|
+
let a = r.split(":"), R2 = a[0], k2 = "string", A2 = false;
|
|
40708
|
+
for (let N2 of a.slice(1)) N2 === "num" ? k2 = "num" : N2 === "bool" ? k2 = "bool" : N2 === "presence" ? k2 = "presence" : N2 === "transient" && (A2 = true);
|
|
40709
|
+
let f2 = R2, w2 = f2.startsWith("data-") && f2.length > 5 ? f2.slice(5).replace(/-([a-z])/g, (N2, I3) => I3.toUpperCase()) : f2;
|
|
40710
|
+
e.push({ name: w2, attr: f2, type: k2, default: i2, transient: A2 });
|
|
40631
40711
|
}
|
|
40632
40712
|
return e;
|
|
40633
40713
|
}
|
|
40634
|
-
function
|
|
40714
|
+
function ct3(t, e) {
|
|
40635
40715
|
if (e === "num") {
|
|
40636
40716
|
if (t == null || t === "") return 0;
|
|
40637
40717
|
let n2 = Number(t);
|
|
@@ -40639,161 +40719,187 @@ tr.hcms-shell.hcms-inline-ghost { display: table-row; }
|
|
|
40639
40719
|
}
|
|
40640
40720
|
return e === "bool" ? t === "true" || t === "" || t === "1" : t ?? "";
|
|
40641
40721
|
}
|
|
40642
|
-
function
|
|
40722
|
+
function Jt3(t, e) {
|
|
40643
40723
|
return e === "bool" ? t ? "true" : "false" : t == null ? "" : String(t);
|
|
40644
40724
|
}
|
|
40645
|
-
function
|
|
40725
|
+
function Qt3(t, e) {
|
|
40726
|
+
return nr2.has(e) && typeof t[or2[e] || e] == "boolean";
|
|
40727
|
+
}
|
|
40728
|
+
function gt3(t, e) {
|
|
40729
|
+
return e.type === "presence" || e.type !== "num" && Qt3(t, e.attr || e.name);
|
|
40730
|
+
}
|
|
40731
|
+
function $t3(t) {
|
|
40732
|
+
return t.default != null ? t.default : t.type === "num" ? "0" : t.type === "bool" ? "false" : "";
|
|
40733
|
+
}
|
|
40734
|
+
function pe3(t, e) {
|
|
40735
|
+
let n2 = e.attr || e.name;
|
|
40736
|
+
if (gt3(t, e)) return t.hasAttribute(n2);
|
|
40737
|
+
let r = t.getAttribute(n2);
|
|
40738
|
+
return ct3(r ?? $t3(e), e.type);
|
|
40739
|
+
}
|
|
40740
|
+
function me3(t, e) {
|
|
40741
|
+
return gt3(t, e) ? e.default != null ? ct3(e.default, "bool") : false : ct3($t3(e), e.type);
|
|
40742
|
+
}
|
|
40743
|
+
function _t2(t, e, n2) {
|
|
40744
|
+
let r = e.attr || e.name;
|
|
40745
|
+
if (gt3(t, e)) {
|
|
40746
|
+
n2 ? t.hasAttribute(r) || t.setAttribute(r, "") : t.hasAttribute(r) && t.removeAttribute(r);
|
|
40747
|
+
return;
|
|
40748
|
+
}
|
|
40749
|
+
t.setAttribute(r, Jt3(n2, e.type));
|
|
40750
|
+
}
|
|
40751
|
+
function Pt3(t, e) {
|
|
40646
40752
|
let n2 = e.attr || e.name, r = t._sapTransient || (t._sapTransient = {});
|
|
40647
40753
|
if (!(e.name in r)) {
|
|
40648
|
-
let
|
|
40649
|
-
|
|
40754
|
+
let i2 = t.getAttribute(n2);
|
|
40755
|
+
i2 == null && (i2 = $t3(e)), r[e.name] = ct3(i2, e.type);
|
|
40650
40756
|
}
|
|
40651
40757
|
return t.hasAttribute(n2) && t.removeAttribute(n2), r[e.name];
|
|
40652
40758
|
}
|
|
40653
|
-
function
|
|
40759
|
+
function Tt3(t, e, n2) {
|
|
40654
40760
|
let r = e.attr || e.name;
|
|
40655
40761
|
(t._sapTransient || (t._sapTransient = {}))[e.name] = n2, t.hasAttribute(r) && t.removeAttribute(r);
|
|
40656
40762
|
}
|
|
40657
|
-
function
|
|
40658
|
-
let r = String(n2).split("."),
|
|
40763
|
+
function Nt3(t, e, n2) {
|
|
40764
|
+
let r = String(n2).split("."), i2 = r[r.length - 1];
|
|
40659
40765
|
if (r.length === 1) {
|
|
40660
|
-
let R2 =
|
|
40661
|
-
return R2 || (t.getAttribute("items") ===
|
|
40766
|
+
let R2 = ur2(e, i2);
|
|
40767
|
+
return R2 || (t.getAttribute("items") === i2 ? t : t.querySelector(`[items="${i2}"]:not(template)`));
|
|
40662
40768
|
}
|
|
40663
|
-
let
|
|
40664
|
-
return
|
|
40769
|
+
let s2 = r[r.length - 2], a = [...t.querySelectorAll(`[scope="${s2}"]`)].find((R2) => ht3(R2, i2));
|
|
40770
|
+
return a ? ht3(a, i2) : null;
|
|
40665
40771
|
}
|
|
40666
|
-
function
|
|
40667
|
-
let n2 =
|
|
40772
|
+
function ur2(t, e) {
|
|
40773
|
+
let n2 = Y2(t);
|
|
40668
40774
|
for (; n2; ) {
|
|
40669
40775
|
if (n2.getAttribute("items") === e) return n2;
|
|
40670
|
-
let r =
|
|
40776
|
+
let r = ht3(n2, e);
|
|
40671
40777
|
if (r) return r;
|
|
40672
|
-
n2 =
|
|
40778
|
+
n2 = Y2(n2.parentElement);
|
|
40673
40779
|
}
|
|
40674
40780
|
return null;
|
|
40675
40781
|
}
|
|
40676
|
-
function
|
|
40782
|
+
function tt3(t) {
|
|
40677
40783
|
if (typeof t == "number") return t;
|
|
40678
40784
|
if (t == null || t === "") return 0;
|
|
40679
40785
|
let e = Number(typeof t == "string" ? t.replace(/[$,%\s]/g, "") : t);
|
|
40680
40786
|
return Number.isNaN(e) ? 0 : e;
|
|
40681
40787
|
}
|
|
40682
|
-
function
|
|
40788
|
+
function Wt3(t, e) {
|
|
40683
40789
|
return Array.isArray(t) ? e == null ? t : t.map((n2) => typeof e == "function" ? e(n2) : n2?.[e]) : [];
|
|
40684
40790
|
}
|
|
40685
|
-
function
|
|
40686
|
-
return
|
|
40791
|
+
function he3(t, e) {
|
|
40792
|
+
return Wt3(t, e).reduce((n2, r) => n2 + tt3(r), 0);
|
|
40687
40793
|
}
|
|
40688
|
-
function
|
|
40794
|
+
function cr2(t, e) {
|
|
40689
40795
|
return Array.isArray(t) ? e == null ? t.length : t.reduce((n2, r) => n2 + (e(r) ? 1 : 0), 0) : 0;
|
|
40690
40796
|
}
|
|
40691
|
-
function
|
|
40692
|
-
let n2 =
|
|
40693
|
-
return n2.length ?
|
|
40797
|
+
function fr2(t, e) {
|
|
40798
|
+
let n2 = Wt3(t, e);
|
|
40799
|
+
return n2.length ? he3(t, e) / n2.length : 0;
|
|
40694
40800
|
}
|
|
40695
|
-
function
|
|
40696
|
-
let n2 =
|
|
40697
|
-
return n2.length ? n2.every((r) => typeof r == "number" || !Number.isNaN(Number(r))) ? Math.min(...n2.map(Number)) : n2.reduce((r,
|
|
40801
|
+
function lr2(t, e) {
|
|
40802
|
+
let n2 = Wt3(t, e).filter((r) => r != null && r !== "");
|
|
40803
|
+
return n2.length ? n2.every((r) => typeof r == "number" || !Number.isNaN(Number(r))) ? Math.min(...n2.map(Number)) : n2.reduce((r, i2) => String(r) <= String(i2) ? r : i2) : 0;
|
|
40698
40804
|
}
|
|
40699
|
-
function
|
|
40700
|
-
let n2 =
|
|
40701
|
-
return n2.length ? n2.every((r) => typeof r == "number" || !Number.isNaN(Number(r))) ? Math.max(...n2.map(Number)) : n2.reduce((r,
|
|
40805
|
+
function dr2(t, e) {
|
|
40806
|
+
let n2 = Wt3(t, e).filter((r) => r != null && r !== "");
|
|
40807
|
+
return n2.length ? n2.every((r) => typeof r == "number" || !Number.isNaN(Number(r))) ? Math.max(...n2.map(Number)) : n2.reduce((r, i2) => String(r) >= String(i2) ? r : i2) : 0;
|
|
40702
40808
|
}
|
|
40703
|
-
function
|
|
40704
|
-
let r =
|
|
40809
|
+
function pr2(t, e, n2) {
|
|
40810
|
+
let r = tt3(t) === 1 ? e : n2 ?? e + "s";
|
|
40705
40811
|
return `${t} ${r}`;
|
|
40706
40812
|
}
|
|
40707
|
-
function
|
|
40813
|
+
function mr2(t, e) {
|
|
40708
40814
|
let n2 = new Date(t), r = new Date(e);
|
|
40709
40815
|
return Number.isNaN(+n2) || Number.isNaN(+r) ? 0 : Math.round((r - n2) / 864e5);
|
|
40710
40816
|
}
|
|
40711
|
-
function
|
|
40817
|
+
function nt3(t) {
|
|
40712
40818
|
return typeof t == "number" ? t : Number(t);
|
|
40713
40819
|
}
|
|
40714
|
-
var
|
|
40820
|
+
var Lt2 = { usd: (t) => "$" + nt3(t).toLocaleString("en-US", { maximumFractionDigits: 0 }), usd2: (t) => "$" + nt3(t).toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 }), pct: (t) => Math.round(nt3(t)) + "%", pct1: (t) => nt3(t).toFixed(1) + "%", int: (t) => Math.round(nt3(t)).toLocaleString("en-US"), num: (t) => nt3(t).toLocaleString("en-US"), num2: (t) => nt3(t).toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 }), compact: (t) => nt3(t).toLocaleString("en-US", { notation: "compact" }), date: (t) => {
|
|
40715
40821
|
let e = new Date(t);
|
|
40716
40822
|
return Number.isNaN(+e) ? String(t) : e.toLocaleDateString("en-US");
|
|
40717
40823
|
}, clock: (t) => {
|
|
40718
|
-
let e =
|
|
40719
|
-
return `${Math.floor(n2 / 600)}:${String(
|
|
40720
|
-
} },
|
|
40721
|
-
function
|
|
40824
|
+
let e = nt3(t), n2 = Math.floor(e / 100), r = n2 % 10, i2 = Math.floor(n2 / 10) % 60;
|
|
40825
|
+
return `${Math.floor(n2 / 600)}:${String(i2).padStart(2, "0")}.${r}`;
|
|
40826
|
+
} }, hr2 = /* @__PURE__ */ new Set(["usd", "usd2", "pct", "pct1", "int", "num", "num2", "compact", "clock"]);
|
|
40827
|
+
function be3(t, e) {
|
|
40722
40828
|
if (!t) return e == null ? "" : String(e);
|
|
40723
|
-
let n2 =
|
|
40829
|
+
let n2 = Lt2[t];
|
|
40724
40830
|
if (typeof n2 != "function") {
|
|
40725
40831
|
let r = new Error(`unknown format "${t}"`);
|
|
40726
40832
|
throw r.sapCode = "E22", r;
|
|
40727
40833
|
}
|
|
40728
|
-
if (
|
|
40834
|
+
if (hr2.has(t)) {
|
|
40729
40835
|
let r = typeof e == "number" ? e : Number(e);
|
|
40730
40836
|
if (!Number.isFinite(r)) {
|
|
40731
|
-
let
|
|
40732
|
-
throw
|
|
40837
|
+
let i2 = new Error(`format "${t}" received ${typeof e == "string" ? `"${e}"` : e}`);
|
|
40838
|
+
throw i2.sapCode = "E22", i2;
|
|
40733
40839
|
}
|
|
40734
40840
|
}
|
|
40735
40841
|
return n2(e);
|
|
40736
40842
|
}
|
|
40737
|
-
function
|
|
40738
|
-
return [
|
|
40843
|
+
function ge2() {
|
|
40844
|
+
return [Lt2, tt3, he3, cr2, fr2, lr2, dr2, pr2, mr2];
|
|
40739
40845
|
}
|
|
40740
|
-
var
|
|
40741
|
-
function
|
|
40846
|
+
var br2 = ["state", "item", "el", "root", "fmt", "num", "sum", "count", "avg", "min", "max", "plural", "days"], Bt3 = /* @__PURE__ */ new Map(), we3 = /\bstate\.([a-z][a-z0-9_]*)/g, ye3 = /\bitem\.([a-z][a-z0-9_]*)/g;
|
|
40847
|
+
function gr2(t) {
|
|
40742
40848
|
let e = /* @__PURE__ */ new Set(), n2 = /* @__PURE__ */ new Set(), r;
|
|
40743
|
-
for (
|
|
40744
|
-
for (
|
|
40849
|
+
for (we3.lastIndex = 0; r = we3.exec(t); ) e.add(r[1]);
|
|
40850
|
+
for (ye3.lastIndex = 0; r = ye3.exec(t); ) n2.add(r[1]);
|
|
40745
40851
|
return { state: e, item: n2 };
|
|
40746
40852
|
}
|
|
40747
|
-
function
|
|
40748
|
-
let n2 = (e ? "!" : "") + t, r =
|
|
40853
|
+
function H2(t, e = false) {
|
|
40854
|
+
let n2 = (e ? "!" : "") + t, r = Bt3.get(n2);
|
|
40749
40855
|
if (r) return r;
|
|
40750
|
-
|
|
40856
|
+
Bt3.size > 512 && Bt3.clear();
|
|
40751
40857
|
try {
|
|
40752
|
-
let
|
|
40858
|
+
let i2 = e ? `"use strict";
|
|
40753
40859
|
${t}` : `"use strict"; return (${t});`;
|
|
40754
|
-
r = { fn: new Function(...
|
|
40755
|
-
} catch (
|
|
40756
|
-
r = { fn: null, src: t, statement: e, deps: { state: /* @__PURE__ */ new Set(), item: /* @__PURE__ */ new Set() }, error:
|
|
40860
|
+
r = { fn: new Function(...br2, i2), src: t, statement: e, deps: gr2(t), error: null };
|
|
40861
|
+
} catch (i2) {
|
|
40862
|
+
r = { fn: null, src: t, statement: e, deps: { state: /* @__PURE__ */ new Set(), item: /* @__PURE__ */ new Set() }, error: i2 };
|
|
40757
40863
|
}
|
|
40758
|
-
return
|
|
40864
|
+
return Bt3.set(n2, r), r;
|
|
40759
40865
|
}
|
|
40760
|
-
function
|
|
40866
|
+
function J3(t, e) {
|
|
40761
40867
|
if (t.error) throw t.error;
|
|
40762
|
-
return t.fn(e.state, e.item, e.el ?? null, e.root, ...
|
|
40868
|
+
return t.fn(e.state, e.item, e.el ?? null, e.root, ...ge2());
|
|
40763
40869
|
}
|
|
40764
|
-
function
|
|
40870
|
+
function Ae3(t) {
|
|
40765
40871
|
let e = /* @__PURE__ */ new Map();
|
|
40766
|
-
for (let
|
|
40767
|
-
let n2 = [], r = /* @__PURE__ */ new Map(),
|
|
40768
|
-
function a
|
|
40769
|
-
let R2 = r.get(
|
|
40872
|
+
for (let a of t) e.set(a.name, a);
|
|
40873
|
+
let n2 = [], r = /* @__PURE__ */ new Map(), i2 = [];
|
|
40874
|
+
function s2(a) {
|
|
40875
|
+
let R2 = r.get(a.name);
|
|
40770
40876
|
if (R2 !== 1) {
|
|
40771
40877
|
if (R2 === 0) {
|
|
40772
|
-
let k2 = [...
|
|
40773
|
-
throw
|
|
40878
|
+
let k2 = [...i2.slice(i2.indexOf(a.name)), a.name].join(" -> "), A2 = new Error(`calc: cycle: ${k2}`);
|
|
40879
|
+
throw A2.sapCode = "E07", A2.cycle = k2, A2;
|
|
40774
40880
|
}
|
|
40775
|
-
r.set(
|
|
40776
|
-
for (let k2 of
|
|
40777
|
-
let
|
|
40778
|
-
|
|
40881
|
+
r.set(a.name, 0), i2.push(a.name);
|
|
40882
|
+
for (let k2 of a.entry.deps.state) {
|
|
40883
|
+
let A2 = e.get(k2);
|
|
40884
|
+
A2 && A2 !== a && s2(A2);
|
|
40779
40885
|
}
|
|
40780
|
-
for (let k2 of
|
|
40781
|
-
let
|
|
40782
|
-
|
|
40886
|
+
for (let k2 of a.entry.deps.item) {
|
|
40887
|
+
let A2 = e.get(k2);
|
|
40888
|
+
A2 && A2 !== a && s2(A2);
|
|
40783
40889
|
}
|
|
40784
|
-
|
|
40890
|
+
i2.pop(), r.set(a.name, 1), n2.push(a);
|
|
40785
40891
|
}
|
|
40786
40892
|
}
|
|
40787
|
-
for (let
|
|
40893
|
+
for (let a of t) s2(a);
|
|
40788
40894
|
return n2;
|
|
40789
40895
|
}
|
|
40790
|
-
function
|
|
40896
|
+
function Ee3(t) {
|
|
40791
40897
|
return (t.getAttribute("type") || "text").toLowerCase();
|
|
40792
40898
|
}
|
|
40793
|
-
function
|
|
40899
|
+
function wt3(t) {
|
|
40794
40900
|
let e = t.tagName;
|
|
40795
40901
|
if (e === "INPUT") {
|
|
40796
|
-
let n2 =
|
|
40902
|
+
let n2 = Ee3(t);
|
|
40797
40903
|
n2 === "checkbox" || n2 === "radio" ? t.checked ? t.setAttribute("checked", "") : t.removeAttribute("checked") : t.setAttribute("value", t.value);
|
|
40798
40904
|
return;
|
|
40799
40905
|
}
|
|
@@ -40806,10 +40912,10 @@ ${t}` : `"use strict"; return (${t});`;
|
|
|
40806
40912
|
for (let r = 0; r < n2.length; r++) n2[r].selected ? n2[r].setAttribute("selected", "") : n2[r].removeAttribute("selected");
|
|
40807
40913
|
}
|
|
40808
40914
|
}
|
|
40809
|
-
function
|
|
40915
|
+
function ve3(t, e = t) {
|
|
40810
40916
|
let n2 = t.tagName;
|
|
40811
40917
|
if (n2 === "INPUT") {
|
|
40812
|
-
let r =
|
|
40918
|
+
let r = Ee3(t);
|
|
40813
40919
|
r === "checkbox" || r === "radio" ? e.checked ? t.hasAttribute("checked") || t.setAttribute("checked", "") : t.removeAttribute("checked") : e.value !== (t.getAttribute("value") ?? "") && t.setAttribute("value", e.value);
|
|
40814
40920
|
return;
|
|
40815
40921
|
}
|
|
@@ -40821,77 +40927,77 @@ ${t}` : `"use strict"; return (${t});`;
|
|
|
40821
40927
|
return;
|
|
40822
40928
|
}
|
|
40823
40929
|
if (n2 === "SELECT") {
|
|
40824
|
-
let r = t.options,
|
|
40825
|
-
for (let
|
|
40930
|
+
let r = t.options, i2 = e.options;
|
|
40931
|
+
for (let s2 = 0; s2 < r.length; s2++) i2[s2] && i2[s2].selected ? r[s2].hasAttribute("selected") || r[s2].setAttribute("selected", "") : r[s2].removeAttribute("selected");
|
|
40826
40932
|
}
|
|
40827
40933
|
}
|
|
40828
|
-
function
|
|
40934
|
+
function qt3(t) {
|
|
40829
40935
|
t.tagName !== "TEXTAREA" || !t.hasAttribute("data-value") || t !== t.ownerDocument.activeElement && (t.textContent = t.getAttribute("data-value"), t.removeAttribute("data-value"));
|
|
40830
40936
|
}
|
|
40831
|
-
function
|
|
40937
|
+
function X2(t) {
|
|
40832
40938
|
if (typeof window > "u") return null;
|
|
40833
40939
|
let e = window.clay, n2 = window.hyperclay;
|
|
40834
40940
|
return t === "consent" ? e?.confirm || n2?.consent || null : e?.[t] || n2?.[t] || null;
|
|
40835
40941
|
}
|
|
40836
|
-
var
|
|
40837
|
-
function
|
|
40838
|
-
let r = null,
|
|
40839
|
-
r !== null && r !==
|
|
40942
|
+
var Zt3 = ["clay:mutation-ready", "hyperclay:mutation-ready"], wr2 = ["clay:sync-applied", "hyperclay:livesync-applied"], yr2 = ["clay:ready", "hyperclay:ready"], Ar2 = ["clay:route"];
|
|
40943
|
+
function yt3(t, e, n2) {
|
|
40944
|
+
let r = null, i2 = (s2) => {
|
|
40945
|
+
r !== null && r !== s2.type || (r = s2.type, queueMicrotask(() => {
|
|
40840
40946
|
r = null;
|
|
40841
|
-
}), n2(
|
|
40947
|
+
}), n2(s2));
|
|
40842
40948
|
};
|
|
40843
|
-
for (let
|
|
40949
|
+
for (let s2 of e) t.addEventListener(s2, i2);
|
|
40844
40950
|
return () => {
|
|
40845
|
-
for (let
|
|
40951
|
+
for (let s2 of e) t.removeEventListener(s2, i2);
|
|
40846
40952
|
};
|
|
40847
40953
|
}
|
|
40848
|
-
function
|
|
40954
|
+
function Se3(t) {
|
|
40849
40955
|
let e = typeof window < "u" && window.clay && window.clay.ready;
|
|
40850
40956
|
e && typeof e.then == "function" ? e.then(() => t(), () => t()) : t();
|
|
40851
40957
|
}
|
|
40852
|
-
function
|
|
40853
|
-
let e =
|
|
40958
|
+
function Vt3(t) {
|
|
40959
|
+
let e = X2("region");
|
|
40854
40960
|
return !e || typeof e.resolveRegionPolicy != "function" || typeof e.skipForPolicy != "function" ? false : e.skipForPolicy(e.resolveRegionPolicy(t), void 0, ["no-save", "freeze"]);
|
|
40855
40961
|
}
|
|
40856
|
-
function
|
|
40857
|
-
let t =
|
|
40962
|
+
function xe3() {
|
|
40963
|
+
let t = X2("consent");
|
|
40858
40964
|
return typeof t == "function" ? t : null;
|
|
40859
40965
|
}
|
|
40860
|
-
function
|
|
40966
|
+
function ke3(t, e) {
|
|
40861
40967
|
if (typeof e != "function") throw new Error("Sap.batch(label, fn): fn must be a function");
|
|
40862
|
-
let n2 =
|
|
40968
|
+
let n2 = X2("undo");
|
|
40863
40969
|
n2 && n2.flush && n2.flush();
|
|
40864
40970
|
let r = e();
|
|
40865
40971
|
if (r && typeof r.then == "function") throw new Error("Sap.batch fn must be synchronous (it returned a promise)");
|
|
40866
40972
|
return n2 && n2.commitCaptured && n2.commitCaptured(t), r;
|
|
40867
40973
|
}
|
|
40868
|
-
function
|
|
40974
|
+
function $e3(t) {
|
|
40869
40975
|
if (typeof window > "u" || typeof document > "u") return;
|
|
40870
40976
|
let e = () => {
|
|
40871
|
-
let
|
|
40872
|
-
for (let
|
|
40873
|
-
|
|
40977
|
+
let s2 = false;
|
|
40978
|
+
for (let a of t.apps()) a.root.isConnected ? t.runNow(a, "platform") : s2 = true;
|
|
40979
|
+
s2 && (t.pruneDisconnected(), t.remountIfPresent());
|
|
40874
40980
|
};
|
|
40875
|
-
|
|
40981
|
+
yt3(document, wr2, e), yt3(document, Ar2, e);
|
|
40876
40982
|
let n2 = false, r = () => {
|
|
40877
|
-
},
|
|
40983
|
+
}, i2 = () => {
|
|
40878
40984
|
if (n2) return true;
|
|
40879
|
-
let
|
|
40880
|
-
if (!
|
|
40881
|
-
let
|
|
40882
|
-
return typeof
|
|
40985
|
+
let s2 = X2("undo");
|
|
40986
|
+
if (!s2 || typeof s2.on != "function") return false;
|
|
40987
|
+
let a = s2.on("undo", e);
|
|
40988
|
+
return typeof a != "function" ? false : typeof s2.on("redo", e) != "function" ? (a(), false) : (n2 = true, r(), true);
|
|
40883
40989
|
};
|
|
40884
|
-
if (!
|
|
40885
|
-
let
|
|
40990
|
+
if (!i2()) {
|
|
40991
|
+
let s2 = yt3(document, Zt3, i2), a = yt3(document, yr2, i2);
|
|
40886
40992
|
r = () => {
|
|
40887
|
-
|
|
40993
|
+
s2(), a();
|
|
40888
40994
|
};
|
|
40889
|
-
let R2 =
|
|
40890
|
-
R2 && typeof R2.then == "function" && R2.then(
|
|
40995
|
+
let R2 = X2("ready");
|
|
40996
|
+
R2 && typeof R2.then == "function" && R2.then(i2, () => {
|
|
40891
40997
|
});
|
|
40892
40998
|
}
|
|
40893
40999
|
}
|
|
40894
|
-
function
|
|
41000
|
+
function Er2(t) {
|
|
40895
41001
|
let e = t.tagName;
|
|
40896
41002
|
if (e === "INPUT") {
|
|
40897
41003
|
let n2 = (t.getAttribute("type") || "text").toLowerCase();
|
|
@@ -40899,20 +41005,20 @@ ${t}` : `"use strict"; return (${t});`;
|
|
|
40899
41005
|
}
|
|
40900
41006
|
return e === "TEXTAREA" ? "text" : e === "SELECT" ? t.multiple ? "select-multiple" : "select-one" : "leaf";
|
|
40901
41007
|
}
|
|
40902
|
-
function
|
|
41008
|
+
function vr2(t) {
|
|
40903
41009
|
if (t.validity && t.validity.badInput) return t.hasAttribute("value") ? Number(t.getAttribute("value")) || 0 : t._sapLastGood ?? 0;
|
|
40904
41010
|
if (t.value === "") return 0;
|
|
40905
41011
|
let e = Number(t.value);
|
|
40906
41012
|
return Number.isNaN(e) ? t._sapLastGood ?? 0 : (t._sapLastGood = e, e);
|
|
40907
41013
|
}
|
|
40908
|
-
function
|
|
41014
|
+
function Sr2(t, e) {
|
|
40909
41015
|
switch (e) {
|
|
40910
41016
|
case "checkbox":
|
|
40911
41017
|
return t.checked;
|
|
40912
41018
|
case "radio":
|
|
40913
41019
|
return t.checked ? t.value : void 0;
|
|
40914
41020
|
case "number":
|
|
40915
|
-
return
|
|
41021
|
+
return vr2(t);
|
|
40916
41022
|
case "select-one":
|
|
40917
41023
|
return t.value;
|
|
40918
41024
|
case "select-multiple":
|
|
@@ -40926,7 +41032,7 @@ ${t}` : `"use strict"; return (${t});`;
|
|
|
40926
41032
|
return t.value;
|
|
40927
41033
|
}
|
|
40928
41034
|
}
|
|
40929
|
-
function
|
|
41035
|
+
function xr2(t, e, n2) {
|
|
40930
41036
|
switch (e) {
|
|
40931
41037
|
case "checkbox":
|
|
40932
41038
|
t.checked = !!n2;
|
|
@@ -40944,7 +41050,7 @@ ${t}` : `"use strict"; return (${t});`;
|
|
|
40944
41050
|
break;
|
|
40945
41051
|
case "select-multiple": {
|
|
40946
41052
|
let r = new Set((Array.isArray(n2) ? n2 : [n2]).map(String));
|
|
40947
|
-
for (let
|
|
41053
|
+
for (let i2 of t.options) i2.selected = r.has(i2.value);
|
|
40948
41054
|
break;
|
|
40949
41055
|
}
|
|
40950
41056
|
case "leaf":
|
|
@@ -40954,91 +41060,28 @@ ${t}` : `"use strict"; return (${t});`;
|
|
|
40954
41060
|
t.value = n2 == null ? "" : String(n2);
|
|
40955
41061
|
}
|
|
40956
41062
|
}
|
|
40957
|
-
function
|
|
41063
|
+
function _e3(t) {
|
|
40958
41064
|
if (t.hasAttribute("transient")) {
|
|
40959
41065
|
t.removeAttribute("value"), t.removeAttribute("checked"), t.removeAttribute("data-value");
|
|
40960
41066
|
return;
|
|
40961
41067
|
}
|
|
40962
|
-
|
|
41068
|
+
Vt3(t) || wt3(t);
|
|
40963
41069
|
}
|
|
40964
|
-
function
|
|
41070
|
+
function kr2(t) {
|
|
40965
41071
|
t.dispatchEvent(new Event("input", { bubbles: true })), t.dispatchEvent(new Event("change", { bubbles: true }));
|
|
40966
41072
|
}
|
|
40967
|
-
function
|
|
40968
|
-
let e =
|
|
41073
|
+
function P2(t) {
|
|
41074
|
+
let e = Er2(t);
|
|
40969
41075
|
return { el: t, kind: e, read() {
|
|
40970
|
-
return
|
|
41076
|
+
return Sr2(t, e);
|
|
40971
41077
|
}, write(n2, r = {}) {
|
|
40972
|
-
|
|
41078
|
+
xr2(t, e, n2), r.noMirror || _e3(t), r.silent || kr2(t);
|
|
40973
41079
|
}, mirror() {
|
|
40974
|
-
|
|
41080
|
+
_e3(t);
|
|
40975
41081
|
} };
|
|
40976
41082
|
}
|
|
40977
|
-
var
|
|
40978
|
-
function
|
|
40979
|
-
if (!t || t.nodeType !== 1) return "?";
|
|
40980
|
-
if (t.id) return `${t.tagName.toLowerCase()}#${t.id}`;
|
|
40981
|
-
let e = [], n2 = t, r = 0;
|
|
40982
|
-
for (; n2 && n2.nodeType === 1 && r < 4; ) {
|
|
40983
|
-
let o2 = n2.tagName.toLowerCase();
|
|
40984
|
-
if (n2.hasAttribute("sap")) o2 += "[sap]";
|
|
40985
|
-
else if (n2.parentElement) {
|
|
40986
|
-
let a = [...n2.parentElement.children].filter((u2) => u2.tagName === n2.tagName);
|
|
40987
|
-
a.length > 1 && (o2 += `:nth-of-type(${a.indexOf(n2) + 1})`);
|
|
40988
|
-
}
|
|
40989
|
-
if (e.unshift(o2), n2.hasAttribute("sap")) break;
|
|
40990
|
-
n2 = n2.parentElement, r++;
|
|
40991
|
-
}
|
|
40992
|
-
return e.join(" > ");
|
|
40993
|
-
}
|
|
40994
|
-
function be3(t) {
|
|
40995
|
-
let e = t.toLowerCase();
|
|
40996
|
-
return /^x-text$|^x-html$/.test(e) ? 'use text="state.x" (Sap paints text only)' : /^x-show$|^v-show$|^v-if$/.test(e) ? 'use show="expr" (toggles native hidden)' : /^x-model$|^v-model$/.test(e) ? 'use bind="field"' : /^@|^x-on:|^v-on:|^on:/.test(e) ? "use native onclick + Sap(this) (no event directive)" : /^:|^x-bind:class$|^v-bind:class$/.test(e) ? 'use class:NAME="expr" or attr:NAME="expr"' : /^x-for$|^v-for$/.test(e) ? 'use items="name" on the container and item template on the row' : /^x-data$/.test(e) ? "declare state with state= / bind / items (no JS state object)" : /^x-init$/.test(e) ? "use a <script> or onclick + Sap(this)" : /^bind:/.test(e) ? 'use bind="field"; one-way paint is attr:NAME="expr"' : /^x-/.test(e) || /^v-/.test(e) ? "this is a foreign-dialect attribute; Sap has no x-/v- attributes" : null;
|
|
40997
|
-
}
|
|
40998
|
-
var dt3 = class {
|
|
40999
|
-
constructor(e) {
|
|
41000
|
-
this.appName = e, this.errors = [], this.warnings = [], this.halted = false, this.haltReason = null;
|
|
41001
|
-
}
|
|
41002
|
-
block(e, n2, r = {}) {
|
|
41003
|
-
let o2 = (Vt3[e] || {}).slug || "error", a = { code: e, slug: o2, el: Wt3(n2), attr: r.attr || null, expr: r.expr || null, key: r.key || null, problem: r.problem || "", didYouMean: r.didYouMean || null, fix: r.fix || null, phase: r.phase || "runtime" }, u2 = [`
|
|
41004
|
-
` + (e[0] === "W" ? "sap \u26A0 " : "sap \u2717 ") + e + " " + o2];
|
|
41005
|
-
return u2.push(` at ${a.el}${a.attr ? ` \u2014 ${a.attr}="${a.expr ?? ""}"` : ""}`), a.problem && u2.push(` problem: ${a.problem}`), a.didYouMean && u2.push(` did you mean: ${a.didYouMean}`), a.fix && u2.push(` fix: ${a.fix}`), console.error(u2.join(`
|
|
41006
|
-
`)), a;
|
|
41007
|
-
}
|
|
41008
|
-
error(e, n2, r = {}) {
|
|
41009
|
-
let o2 = this.block(e, n2, r);
|
|
41010
|
-
return this.errors.push(o2), o2;
|
|
41011
|
-
}
|
|
41012
|
-
warn(e, n2, r = {}) {
|
|
41013
|
-
let o2 = this.block(e, n2, r);
|
|
41014
|
-
return this.warnings.push(o2), o2;
|
|
41015
|
-
}
|
|
41016
|
-
report() {
|
|
41017
|
-
return { ok: this.errors.length === 0 && !this.halted, app: this.appName, halted: this.halted, haltReason: this.haltReason, errors: this.errors.slice(), warnings: this.warnings.slice() };
|
|
41018
|
-
}
|
|
41019
|
-
};
|
|
41020
|
-
function at3(t, e) {
|
|
41021
|
-
t && t.getAttribute("sap-error") !== e && t.setAttribute("sap-error", e);
|
|
41022
|
-
}
|
|
41023
|
-
function Ot3(t) {
|
|
41024
|
-
t && t.hasAttribute("sap-error") && t.removeAttribute("sap-error");
|
|
41025
|
-
}
|
|
41026
|
-
function St3(t, e) {
|
|
41027
|
-
let n2 = null, r = 3;
|
|
41028
|
-
for (let o2 of e) {
|
|
41029
|
-
let a = fr2(t, o2);
|
|
41030
|
-
a < r && (r = a, n2 = o2);
|
|
41031
|
-
}
|
|
41032
|
-
return n2;
|
|
41033
|
-
}
|
|
41034
|
-
function fr2(t, e) {
|
|
41035
|
-
let n2 = t.length, r = e.length, o2 = Array.from({ length: n2 + 1 }, (a, u2) => [u2, ...new Array(r).fill(0)]);
|
|
41036
|
-
for (let a = 0; a <= r; a++) o2[0][a] = a;
|
|
41037
|
-
for (let a = 1; a <= n2; a++) for (let u2 = 1; u2 <= r; u2++) o2[a][u2] = Math.min(o2[a - 1][u2] + 1, o2[a][u2 - 1] + 1, o2[a - 1][u2 - 1] + (t[a - 1] === e[u2 - 1] ? 0 : 1));
|
|
41038
|
-
return o2[n2][r];
|
|
41039
|
-
}
|
|
41040
|
-
var et3 = null, Ft3 = false, pt3 = null;
|
|
41041
|
-
function ge2(t) {
|
|
41083
|
+
var ot3 = null, Ht3 = false, At2 = null;
|
|
41084
|
+
function Te3(t) {
|
|
41042
41085
|
let e = null;
|
|
41043
41086
|
return { kind: "hub", subscribe(n2) {
|
|
41044
41087
|
let r = t.onAnyChange({ debounce: 0, require: "observed" }, n2);
|
|
@@ -41060,14 +41103,14 @@ ${t}` : `"use strict"; return (${t});`;
|
|
|
41060
41103
|
}
|
|
41061
41104
|
} };
|
|
41062
41105
|
}
|
|
41063
|
-
function
|
|
41106
|
+
function $r2() {
|
|
41064
41107
|
let t = null;
|
|
41065
41108
|
return { kind: "native", subscribe(e) {
|
|
41066
|
-
t = new MutationObserver((r) => e(
|
|
41109
|
+
t = new MutationObserver((r) => e(_r2(r)));
|
|
41067
41110
|
let n2 = typeof document < "u" && document.body || typeof document < "u" && document.documentElement;
|
|
41068
41111
|
n2 && t.observe(n2, { childList: true, subtree: true, attributes: true, characterData: true });
|
|
41069
41112
|
}, suppress(e) {
|
|
41070
|
-
let n2 =
|
|
41113
|
+
let n2 = X2("undo");
|
|
41071
41114
|
n2 && n2.pause && n2.pause();
|
|
41072
41115
|
try {
|
|
41073
41116
|
return e();
|
|
@@ -41078,36 +41121,36 @@ ${t}` : `"use strict"; return (${t});`;
|
|
|
41078
41121
|
t && (t.disconnect(), t = null);
|
|
41079
41122
|
} };
|
|
41080
41123
|
}
|
|
41081
|
-
function
|
|
41124
|
+
function _r2(t) {
|
|
41082
41125
|
let e = [];
|
|
41083
41126
|
for (let n2 of t) if (n2.type === "attributes") {
|
|
41084
41127
|
let r = n2.target;
|
|
41085
|
-
r && r.nodeType === 1 && !
|
|
41128
|
+
r && r.nodeType === 1 && !zt3(r) && e.push({ type: "attribute", element: r });
|
|
41086
41129
|
} else if (n2.type === "characterData") {
|
|
41087
41130
|
let r = n2.target && n2.target.parentElement;
|
|
41088
|
-
r && !
|
|
41131
|
+
r && !zt3(r) && e.push({ type: "characterData", element: r });
|
|
41089
41132
|
} else if (n2.type === "childList") {
|
|
41090
|
-
for (let r of n2.addedNodes) if (!(r.nodeType !== 1 ||
|
|
41133
|
+
for (let r of n2.addedNodes) if (!(r.nodeType !== 1 || zt3(r)) && (e.push({ type: "add", element: r }), r.querySelectorAll)) for (let i2 of r.querySelectorAll("*")) zt3(i2) || e.push({ type: "add", element: i2 });
|
|
41091
41134
|
for (let r of n2.removedNodes) r.nodeType === 1 && e.push({ type: "remove", element: r, parent: n2.target });
|
|
41092
41135
|
}
|
|
41093
41136
|
return e;
|
|
41094
41137
|
}
|
|
41095
|
-
function
|
|
41138
|
+
function zt3(t) {
|
|
41096
41139
|
return !!(t.closest && t.closest("[sap-ignore],[template]"));
|
|
41097
41140
|
}
|
|
41098
|
-
function
|
|
41141
|
+
function Tr2(t, e) {
|
|
41099
41142
|
t.pruneDisconnected();
|
|
41100
41143
|
let n2 = /* @__PURE__ */ new Set(), r = false;
|
|
41101
|
-
for (let
|
|
41102
|
-
let
|
|
41103
|
-
|
|
41144
|
+
for (let i2 of e) {
|
|
41145
|
+
let s2 = i2.type === "remove" ? i2.parent : i2.element, a = s2 && t.appFor(s2);
|
|
41146
|
+
a && n2.add(a), i2.type === "add" && i2.element && i2.element.nodeType === 1 && i2.element.hasAttribute && i2.element.hasAttribute("sap") && !(t.isRegistered && t.isRegistered(i2.element)) && (r = true);
|
|
41104
41147
|
}
|
|
41105
41148
|
r && t.remountIfPresent();
|
|
41106
|
-
for (let
|
|
41149
|
+
for (let i2 of n2) i2.root.isConnected && t.schedule(i2, "mutation");
|
|
41107
41150
|
}
|
|
41108
|
-
function
|
|
41109
|
-
if (
|
|
41110
|
-
let e =
|
|
41151
|
+
function Ne3(t) {
|
|
41152
|
+
if (ot3) return ot3.suppress(t);
|
|
41153
|
+
let e = X2("undo");
|
|
41111
41154
|
if (e && e.pause && e.resume) {
|
|
41112
41155
|
e.pause();
|
|
41113
41156
|
try {
|
|
@@ -41118,258 +41161,286 @@ ${t}` : `"use strict"; return (${t});`;
|
|
|
41118
41161
|
}
|
|
41119
41162
|
return t();
|
|
41120
41163
|
}
|
|
41121
|
-
function
|
|
41122
|
-
|
|
41164
|
+
function te3(t, e) {
|
|
41165
|
+
Ht3 = true, ot3 = t, t.subscribe((n2) => Tr2(e, n2));
|
|
41123
41166
|
}
|
|
41124
|
-
function
|
|
41125
|
-
if (
|
|
41126
|
-
let e =
|
|
41167
|
+
function ee3(t) {
|
|
41168
|
+
if (Ht3 || typeof window > "u" || typeof document > "u") return;
|
|
41169
|
+
let e = X2("Mutation");
|
|
41127
41170
|
if (e && typeof e.onAnyChange == "function") {
|
|
41128
|
-
|
|
41171
|
+
te3(Te3(e), t);
|
|
41129
41172
|
return;
|
|
41130
41173
|
}
|
|
41131
|
-
typeof MutationObserver == "function" && (
|
|
41132
|
-
let r =
|
|
41133
|
-
r && (
|
|
41174
|
+
typeof MutationObserver == "function" && (te3($r2(), t), At2 = yt3(document, Zt3, function() {
|
|
41175
|
+
let r = X2("Mutation");
|
|
41176
|
+
r && (At2(), At2 = null, ot3 && ot3.teardown(), Ht3 = false, te3(Te3(r), t));
|
|
41134
41177
|
}));
|
|
41135
41178
|
}
|
|
41136
|
-
function
|
|
41137
|
-
if (
|
|
41138
|
-
|
|
41179
|
+
function Le3() {
|
|
41180
|
+
if (ot3) try {
|
|
41181
|
+
ot3.teardown();
|
|
41139
41182
|
} catch {
|
|
41140
41183
|
}
|
|
41141
|
-
|
|
41184
|
+
At2 && typeof document < "u" && At2(), ot3 = null, Ht3 = false, At2 = null;
|
|
41142
41185
|
}
|
|
41143
|
-
var
|
|
41144
|
-
function
|
|
41186
|
+
var Nr2 = new Set(mt3);
|
|
41187
|
+
function Et3(t, e = {}) {
|
|
41145
41188
|
if (e.breaker) {
|
|
41146
|
-
t.diag.error("E26", t.root, { problem: "recompute loop halted after 50 passes; recent triggers: " + (t._breakerRing || []).join(", ") }),
|
|
41189
|
+
t.diag.error("E26", t.root, { problem: "recompute loop halted after 50 passes; recent triggers: " + (t._breakerRing || []).join(", ") }), ut3(t.root, "loop");
|
|
41147
41190
|
return;
|
|
41148
41191
|
}
|
|
41149
|
-
|
|
41192
|
+
Ne3(() => Lr2(t, e)), t._viewsChanged && (t._viewsChanged = false, t.root.dispatchEvent(new CustomEvent("sap:views-updated", { bubbles: true })));
|
|
41150
41193
|
}
|
|
41151
|
-
function
|
|
41152
|
-
let n2 = t.root, r = {},
|
|
41194
|
+
function Lr2(t, e) {
|
|
41195
|
+
let n2 = t.root, r = {}, i2 = [], s2 = [], a = [], R2 = [], k2 = [], A2 = [], f2 = [], w2 = /* @__PURE__ */ new Set();
|
|
41153
41196
|
t.diag.errors = [];
|
|
41154
41197
|
let N2 = { root: r, state: r, item: null, ownerEl: n2, projection: false };
|
|
41155
|
-
function
|
|
41156
|
-
let
|
|
41157
|
-
return
|
|
41158
|
-
}
|
|
41159
|
-
function
|
|
41160
|
-
let
|
|
41161
|
-
|
|
41162
|
-
for (let
|
|
41163
|
-
if (
|
|
41164
|
-
p2[
|
|
41198
|
+
function I3(o2, p2) {
|
|
41199
|
+
let l = p2.attr || p2.name, g = o2.getAttribute(l);
|
|
41200
|
+
return g == null && (g = $t3(p2), k2.push({ el: o2, name: p2.name, attr: l, value: Jt3(ct3(g, p2.type), p2.type) })), ct3(g, p2.type);
|
|
41201
|
+
}
|
|
41202
|
+
function W3(o2, p2) {
|
|
41203
|
+
let l = z2(o2.getAttribute("state") || "");
|
|
41204
|
+
o2._sapStateDecls = l;
|
|
41205
|
+
for (let g of l) {
|
|
41206
|
+
if (g.transient) {
|
|
41207
|
+
p2[g.name] = Pt3(o2, g);
|
|
41165
41208
|
continue;
|
|
41166
41209
|
}
|
|
41167
|
-
if (
|
|
41168
|
-
p2[
|
|
41210
|
+
if (gt3(o2, g)) {
|
|
41211
|
+
p2[g.name] = o2.hasAttribute(g.attr);
|
|
41169
41212
|
continue;
|
|
41170
41213
|
}
|
|
41171
|
-
p2[
|
|
41172
|
-
}
|
|
41173
|
-
}
|
|
41174
|
-
function
|
|
41175
|
-
if (!
|
|
41176
|
-
let
|
|
41177
|
-
|
|
41178
|
-
}
|
|
41179
|
-
function
|
|
41180
|
-
for (let
|
|
41181
|
-
let
|
|
41182
|
-
if (
|
|
41183
|
-
else if (
|
|
41184
|
-
else if (
|
|
41185
|
-
else if (
|
|
41186
|
-
else if (
|
|
41187
|
-
else if (
|
|
41188
|
-
else if (
|
|
41189
|
-
else if (
|
|
41190
|
-
else if (
|
|
41191
|
-
let
|
|
41192
|
-
w2.add(
|
|
41193
|
-
} else if (
|
|
41194
|
-
let
|
|
41195
|
-
w2.add(
|
|
41196
|
-
} else if (
|
|
41197
|
-
let
|
|
41198
|
-
w2.add(
|
|
41214
|
+
p2[g.name] = I3(o2, g);
|
|
41215
|
+
}
|
|
41216
|
+
}
|
|
41217
|
+
function h(o2, p2) {
|
|
41218
|
+
if (!o2.hasAttribute("bind")) return;
|
|
41219
|
+
let l = o2.getAttribute("bind"), g = p2.item || p2.state, L3 = P2(o2);
|
|
41220
|
+
L3.kind === "radio" ? (l in g || (g[l] = ""), o2.checked && (g[l] = o2.value)) : g[l] = L3.read(), o2.hasAttribute("transient") && (o2.removeAttribute("value"), o2.removeAttribute("checked"));
|
|
41221
|
+
}
|
|
41222
|
+
function d(o2, p2) {
|
|
41223
|
+
for (let l of o2.attributes) {
|
|
41224
|
+
let g = l.name, L3 = l.value;
|
|
41225
|
+
if (g.startsWith("calc:")) i2.push({ owner: p2.item || p2.state, ownerEl: p2.ownerEl, name: g.slice(5), entry: H2(L3), el: o2, ctx: p2 });
|
|
41226
|
+
else if (g === "text" || g.startsWith("text:")) s2.push({ el: o2, kind: "text", fmt: g.includes(":") ? g.slice(5) : null, entry: H2(L3), ctx: p2 });
|
|
41227
|
+
else if (g === "show") s2.push({ el: o2, kind: "show", entry: H2(L3), ctx: p2 });
|
|
41228
|
+
else if (g.startsWith("attr:")) s2.push({ el: o2, kind: "attr", arg: g.slice(5), entry: H2(L3), ctx: p2 });
|
|
41229
|
+
else if (g.startsWith("class:")) s2.push({ el: o2, kind: "class", arg: g.slice(6), entry: H2(L3), ctx: p2 });
|
|
41230
|
+
else if (g.startsWith("css:")) s2.push({ el: o2, kind: "css", arg: g.slice(4), entry: H2(L3), ctx: p2 });
|
|
41231
|
+
else if (g === "effect") a.push({ el: o2, entry: H2(L3, true), ctx: p2 });
|
|
41232
|
+
else if (g === "invalid") R2.push({ el: o2, entry: H2(L3), ctx: p2 });
|
|
41233
|
+
else if (g.startsWith("show-when:") || g.startsWith("option:")) {
|
|
41234
|
+
let C2 = g.slice(g.indexOf(":") + 1);
|
|
41235
|
+
w2.add(C2), s2.push({ el: o2, kind: "when", match: "show", field: C2, values: L3.split("|"), ctx: p2 });
|
|
41236
|
+
} else if (g.startsWith("hide-when:")) {
|
|
41237
|
+
let C2 = g.slice(g.indexOf(":") + 1);
|
|
41238
|
+
w2.add(C2), s2.push({ el: o2, kind: "when", match: "hide", field: C2, values: L3.split("|"), ctx: p2 });
|
|
41239
|
+
} else if (g.startsWith("option-not:")) {
|
|
41240
|
+
let C2 = g.slice(g.indexOf(":") + 1);
|
|
41241
|
+
w2.add(C2), s2.push({ el: o2, kind: "when", match: "show-not", field: C2, values: L3.split("|"), ctx: p2 });
|
|
41199
41242
|
}
|
|
41200
41243
|
}
|
|
41201
|
-
|
|
41244
|
+
if (o2.hasAttribute("bind") && (p2.view || p2.projection) && !Ot3(o2)) {
|
|
41245
|
+
let l = o2.getAttribute("bind");
|
|
41246
|
+
p2.view ? bt3(de3(p2.item), l) ? (o2._sapViewBind = "item", s2.push({ el: o2, kind: "projection", field: l, ctx: p2, from: "item" })) : l in p2.state || l in p2.root ? (o2._sapViewBind = "drawn", s2.push({ el: o2, kind: "projection", field: l, ctx: p2, from: "drawn" })) : (o2._sapViewBind = null, t.diag.error("E43", o2, { attr: "bind", expr: l, problem: `bind="${l}" inside an each row matches no field of the row's record or of the scope the row is drawn in`, fix: "bind a field the record owns (bind, state= or items= on the [item]), or declare it with state= where the list is drawn" })) : s2.push({ el: o2, kind: "projection", field: l, ctx: p2 });
|
|
41247
|
+
}
|
|
41202
41248
|
}
|
|
41203
|
-
function
|
|
41204
|
-
Object.defineProperty(
|
|
41249
|
+
function m2(o2, p2, l) {
|
|
41250
|
+
Object.defineProperty(o2, "$key", { value: Mt3(p2, "row"), enumerable: false }), Object.defineProperty(o2, "$index", { value: l, enumerable: false }), Object.defineProperty(o2, "$el", { value: p2, enumerable: false });
|
|
41205
41251
|
}
|
|
41206
|
-
function
|
|
41207
|
-
|
|
41252
|
+
function y2(o2, p2, l) {
|
|
41253
|
+
W3(o2, p2), o2._sapScope = p2, !l.projection && o2.hasAttribute("bind") && h(o2, l), d(o2, l), o2.hasAttribute("items") ? $3(o2, p2, l) : E2(o2, p2, l);
|
|
41208
41254
|
}
|
|
41209
|
-
function E2(
|
|
41210
|
-
|
|
41211
|
-
|
|
41255
|
+
function E2(o2, p2, l) {
|
|
41256
|
+
K2(o2, (g, L3) => {
|
|
41257
|
+
L3 ? g.hasAttribute("scope") ? x2(g, p2, l) : g.hasAttribute("items") ? (d(g, l), $3(g, p2, l)) : g.hasAttribute("detail") ? B2(g, p2, l) : g.hasAttribute("each") && (d(g, l), f2.push({ el: g, ctx: l })) : (!l.projection && !l.view && h(g, l), d(g, l));
|
|
41212
41258
|
});
|
|
41213
41259
|
}
|
|
41214
|
-
function
|
|
41215
|
-
let
|
|
41216
|
-
p2[
|
|
41217
|
-
let
|
|
41218
|
-
|
|
41219
|
-
}
|
|
41220
|
-
function
|
|
41221
|
-
let
|
|
41222
|
-
p2[
|
|
41223
|
-
let
|
|
41224
|
-
|
|
41225
|
-
let
|
|
41226
|
-
|
|
41260
|
+
function x2(o2, p2, l) {
|
|
41261
|
+
let g = o2.getAttribute("scope"), L3 = {};
|
|
41262
|
+
p2[g] = L3;
|
|
41263
|
+
let C2 = { root: l.root, state: L3, item: null, ownerEl: o2, projection: l.projection };
|
|
41264
|
+
y2(o2, L3, C2);
|
|
41265
|
+
}
|
|
41266
|
+
function $3(o2, p2, l) {
|
|
41267
|
+
let g = o2.getAttribute("items"), L3 = [];
|
|
41268
|
+
p2[g] = L3, o2._sapList = L3, Z3(o2).forEach((C2, Q3) => {
|
|
41269
|
+
let q3 = {};
|
|
41270
|
+
m2(q3, C2, Q3);
|
|
41271
|
+
let rt3 = { root: l.root, state: l.state, item: q3, ownerEl: C2, projection: l.projection };
|
|
41272
|
+
y2(C2, q3, rt3), L3.push(q3);
|
|
41227
41273
|
});
|
|
41228
41274
|
}
|
|
41229
|
-
function
|
|
41230
|
-
let
|
|
41231
|
-
|
|
41232
|
-
|
|
41233
|
-
|
|
41234
|
-
|
|
41235
|
-
|
|
41236
|
-
|
|
41275
|
+
function O2(o2, p2) {
|
|
41276
|
+
let l = String(o2).split("."), g = (C2) => {
|
|
41277
|
+
for (let Q3 of l) {
|
|
41278
|
+
if (C2 == null) return;
|
|
41279
|
+
C2 = Array.isArray(C2) ? C2.flatMap((q3) => q3 && q3[Q3] != null ? q3[Q3] : []) : C2[Q3];
|
|
41280
|
+
}
|
|
41281
|
+
return C2;
|
|
41282
|
+
}, L3 = g(p2.state);
|
|
41283
|
+
return L3 === void 0 ? g(p2.root) : L3;
|
|
41237
41284
|
}
|
|
41238
|
-
function
|
|
41239
|
-
for (let
|
|
41240
|
-
|
|
41285
|
+
function B2(o2, p2, l) {
|
|
41286
|
+
for (let g of z2(o2.getAttribute("state") || "")) g.name in p2 || (p2[g.name] = gt3(o2, g) ? o2.hasAttribute(g.attr) : I3(o2, g));
|
|
41287
|
+
A2.push({ el: o2, parentObj: p2, ctx: l });
|
|
41241
41288
|
}
|
|
41242
|
-
function
|
|
41243
|
-
|
|
41244
|
-
let
|
|
41245
|
-
if (!
|
|
41246
|
-
|
|
41289
|
+
function c2(o2, p2, l) {
|
|
41290
|
+
o2._sapScope = p2;
|
|
41291
|
+
let g = o2.getAttribute("detail") || "", L3 = /^([\w.]+)\s+by\s+(.+)$/.exec(g);
|
|
41292
|
+
if (!L3) {
|
|
41293
|
+
o2.hidden = true, o2._sapDetailRow = null;
|
|
41247
41294
|
return;
|
|
41248
41295
|
}
|
|
41249
|
-
let
|
|
41296
|
+
let C2 = L3[1], Q3 = L3[2].trim(), q3 = O2(C2, l), rt3;
|
|
41250
41297
|
try {
|
|
41251
|
-
|
|
41298
|
+
rt3 = J3(H2(Q3), { state: p2, item: l.item, el: o2, root: l.root });
|
|
41252
41299
|
} catch {
|
|
41253
|
-
|
|
41300
|
+
rt3 = void 0;
|
|
41254
41301
|
}
|
|
41255
|
-
let
|
|
41256
|
-
if (
|
|
41257
|
-
|
|
41258
|
-
|
|
41302
|
+
let U3 = Array.isArray(q3) && rt3 != null ? q3.find((V3) => V3 && typeof V3 == "object" && V3.$el && String(V3.$key) === String(rt3)) : null;
|
|
41303
|
+
if (o2._sapDetailRow = U3 ? U3.$el : null, o2.tagName === "DIALOG") {
|
|
41304
|
+
let V3 = U3 ? String(U3.$key) : null;
|
|
41305
|
+
if (V3 !== o2._sapDetailKey && (o2._sapDetailKey = V3, o2._sapDismissed = false), !U3) {
|
|
41306
|
+
o2._sapOpenedFor = null, o2.open && typeof o2.close == "function" && (o2._sapEngineClose = true, o2.close());
|
|
41307
|
+
return;
|
|
41308
|
+
}
|
|
41309
|
+
o2.open ? o2._sapOpenedFor = V3 : (o2._sapOpenedFor === V3 && (o2._sapDismissed = true), o2._sapOpenedFor = null, !o2._sapDismissed && o2.isConnected && typeof o2.showModal == "function" && (o2.hidden && (o2.hidden = false), o2.showModal(), o2._sapOpenedFor = V3));
|
|
41310
|
+
} else {
|
|
41311
|
+
if (!U3) {
|
|
41312
|
+
o2.hidden || (o2.hidden = true);
|
|
41313
|
+
return;
|
|
41314
|
+
}
|
|
41315
|
+
o2.hidden && (o2.hidden = false);
|
|
41259
41316
|
}
|
|
41260
|
-
|
|
41261
|
-
|
|
41262
|
-
c2(s2, ot3), E2(s2, Q3, ot3);
|
|
41317
|
+
let at3 = { root: l.root, state: p2, item: U3, ownerEl: U3.$el, projection: true };
|
|
41318
|
+
d(o2, at3), E2(o2, U3, at3);
|
|
41263
41319
|
}
|
|
41264
|
-
function
|
|
41265
|
-
let
|
|
41266
|
-
|
|
41267
|
-
|
|
41320
|
+
function u2(o2, p2) {
|
|
41321
|
+
for (let l = o2.parentElement; l; l = l.parentElement) if (l._sapScope === p2 && !l.hasAttribute("detail") || l.hasAttribute("sap")) return l;
|
|
41322
|
+
return n2;
|
|
41323
|
+
}
|
|
41324
|
+
function b(o2, p2) {
|
|
41325
|
+
o2._sapDrawnEl = u2(o2, p2.state);
|
|
41326
|
+
let l = [...o2.children].find((j2) => j2.tagName === "TEMPLATE"), g = l && l.content.children.length === 1 ? l.content.firstElementChild : null;
|
|
41327
|
+
if (!g) return t.diag.error("E42", o2, { attr: "each", problem: "each needs one <template> child with exactly one element root" }), 0;
|
|
41328
|
+
let L3 = o2.getAttribute("each"), C2;
|
|
41268
41329
|
try {
|
|
41269
|
-
|
|
41270
|
-
} catch (
|
|
41271
|
-
return t.diag.error("E24",
|
|
41272
|
-
}
|
|
41273
|
-
if (!Array.isArray(
|
|
41274
|
-
let
|
|
41275
|
-
for (let
|
|
41276
|
-
let
|
|
41330
|
+
C2 = J3(H2(L3), { state: p2.state, item: p2.item, el: o2, root: p2.root });
|
|
41331
|
+
} catch (j2) {
|
|
41332
|
+
return t.diag.error("E24", o2, { attr: "each", expr: L3, problem: String(j2.message) }), 0;
|
|
41333
|
+
}
|
|
41334
|
+
if (!Array.isArray(C2)) return t.diag.error("E40", o2, { attr: "each", expr: L3, problem: "each must evaluate to an array; the list keeps its last good rows" }), 0;
|
|
41335
|
+
let Q3 = H2(o2.getAttribute("key") || "item.$key"), q3 = [], rt3 = /* @__PURE__ */ new Set();
|
|
41336
|
+
for (let j2 of C2) {
|
|
41337
|
+
let G3;
|
|
41277
41338
|
try {
|
|
41278
|
-
|
|
41339
|
+
G3 = J3(Q3, { state: p2.state, item: j2, el: o2, root: p2.root });
|
|
41279
41340
|
} catch {
|
|
41280
|
-
|
|
41341
|
+
G3 = void 0;
|
|
41281
41342
|
}
|
|
41282
|
-
let M2 =
|
|
41283
|
-
if (M2 === "" ||
|
|
41284
|
-
|
|
41285
|
-
}
|
|
41286
|
-
let
|
|
41287
|
-
|
|
41288
|
-
let M2 =
|
|
41289
|
-
if (!M2 || M2.parentElement !==
|
|
41290
|
-
M2 =
|
|
41291
|
-
let
|
|
41292
|
-
|
|
41343
|
+
let M2 = G3 == null ? "" : String(G3);
|
|
41344
|
+
if (M2 === "" || rt3.has(M2)) return t.diag.error("E41", o2, { attr: "key", expr: Q3.src, problem: M2 === "" ? "an item has no key; the list keeps its last good rows" : `duplicate key "${M2}"; the list keeps its last good rows` }), 0;
|
|
41345
|
+
rt3.add(M2), q3.push(M2);
|
|
41346
|
+
}
|
|
41347
|
+
let U3 = o2._sapEach || /* @__PURE__ */ new Map(), at3 = /* @__PURE__ */ new Map(), V3 = 0, Gt2 = l;
|
|
41348
|
+
q3.forEach((j2, G3) => {
|
|
41349
|
+
let M2 = U3.get(j2);
|
|
41350
|
+
if (!M2 || M2.parentElement !== o2) {
|
|
41351
|
+
M2 = o2.ownerDocument.importNode(g, true);
|
|
41352
|
+
let vt2 = (M2.getAttribute("clay") || "").split(/\s+/).filter(Boolean);
|
|
41353
|
+
vt2.includes("editor-ui") || M2.setAttribute("clay", [...vt2, "editor-ui"].join(" ")), M2._sapEachRow = true, V3++;
|
|
41293
41354
|
}
|
|
41294
|
-
M2.getAttribute("data-key") !==
|
|
41355
|
+
M2.getAttribute("data-key") !== j2 && M2.setAttribute("data-key", j2), Gt2.nextElementSibling !== M2 && (Ir2(o2, M2, Gt2), V3++), M2._sapEachItem = C2[G3], at3.set(j2, M2), Gt2 = M2;
|
|
41295
41356
|
});
|
|
41296
|
-
for (let [
|
|
41297
|
-
return
|
|
41298
|
-
let M2 =
|
|
41299
|
-
|
|
41300
|
-
}),
|
|
41301
|
-
}
|
|
41302
|
-
|
|
41303
|
-
for (let
|
|
41304
|
-
let { el: p2, parentObj:
|
|
41305
|
-
|
|
41306
|
-
}
|
|
41307
|
-
if (k2.length && w2.size) for (let
|
|
41357
|
+
for (let [j2, G3] of U3) at3.get(j2) !== G3 && G3.parentElement === o2 && (G3.remove(), V3++);
|
|
41358
|
+
return o2._sapEach = at3, q3.forEach((j2, G3) => {
|
|
41359
|
+
let M2 = at3.get(j2), vt2 = { root: p2.root, state: p2.state, item: C2[G3], ownerEl: M2, projection: false, view: true };
|
|
41360
|
+
d(M2, vt2), E2(M2, {}, vt2);
|
|
41361
|
+
}), V3;
|
|
41362
|
+
}
|
|
41363
|
+
y2(n2, r, N2);
|
|
41364
|
+
for (let o2 = 0; o2 < A2.length; o2++) {
|
|
41365
|
+
let { el: p2, parentObj: l, ctx: g } = A2[o2];
|
|
41366
|
+
c2(p2, l, g);
|
|
41367
|
+
}
|
|
41368
|
+
if (k2.length && w2.size) for (let o2 of k2) w2.has(o2.attr) && o2.el.getAttribute(o2.attr) == null && o2.el.setAttribute(o2.attr, o2.value);
|
|
41308
41369
|
let v2 = /* @__PURE__ */ new Map();
|
|
41309
|
-
for (let
|
|
41310
|
-
let p2 = v2.get(
|
|
41311
|
-
p2 || (p2 = { ownerEl:
|
|
41370
|
+
for (let o2 of i2) {
|
|
41371
|
+
let p2 = v2.get(o2.owner);
|
|
41372
|
+
p2 || (p2 = { ownerEl: o2.ownerEl, list: [] }, v2.set(o2.owner, p2)), p2.list.push(o2);
|
|
41312
41373
|
}
|
|
41313
|
-
let S2 = [...v2.values()].sort((
|
|
41314
|
-
for (let
|
|
41374
|
+
let S2 = [...v2.values()].sort((o2, p2) => Ce3(p2.ownerEl) - Ce3(o2.ownerEl));
|
|
41375
|
+
for (let o2 of S2) {
|
|
41315
41376
|
let p2;
|
|
41316
41377
|
try {
|
|
41317
|
-
p2 =
|
|
41318
|
-
} catch (
|
|
41319
|
-
t.diag.error("E07",
|
|
41378
|
+
p2 = Ae3(o2.list);
|
|
41379
|
+
} catch (l) {
|
|
41380
|
+
t.diag.error("E07", o2.list[0].el, { problem: l.message }), p2 = o2.list;
|
|
41320
41381
|
}
|
|
41321
|
-
for (let
|
|
41322
|
-
|
|
41323
|
-
} catch (
|
|
41324
|
-
|
|
41382
|
+
for (let l of p2) try {
|
|
41383
|
+
l.owner[l.name] = J3(l.entry, { state: l.ctx.state, item: l.ctx.item, el: l.el, root: l.ctx.root }), Ct3(l.el);
|
|
41384
|
+
} catch (g) {
|
|
41385
|
+
l.owner[l.name] = void 0, t.diag.error("E24", l.el, { attr: "calc:" + l.name, expr: l.entry.src, problem: String(g.message) }), ut3(l.el, g.sapCode || "E24");
|
|
41325
41386
|
}
|
|
41326
41387
|
}
|
|
41327
|
-
let
|
|
41328
|
-
for (let
|
|
41329
|
-
let
|
|
41330
|
-
for (let
|
|
41331
|
-
let p2 =
|
|
41332
|
-
|
|
41388
|
+
let _ = 0;
|
|
41389
|
+
for (let o2 = 0; o2 < f2.length; o2++) _ += b(f2[o2].el, f2[o2].ctx);
|
|
41390
|
+
let T2 = 0, D2 = _;
|
|
41391
|
+
for (let o2 of s2) {
|
|
41392
|
+
let p2 = Dr2(o2, t);
|
|
41393
|
+
o2.ctx.view ? D2 += p2 : T2 += p2;
|
|
41333
41394
|
}
|
|
41334
|
-
for (let
|
|
41335
|
-
for (let
|
|
41336
|
-
t._state = r, t._stats = { fields: Object.keys(r).filter((
|
|
41395
|
+
for (let o2 of a) Cr2(o2, t);
|
|
41396
|
+
for (let o2 of R2) Mr2(o2);
|
|
41397
|
+
t._state = r, t._stats = { fields: Object.keys(r).filter((o2) => typeof r[o2] != "function").length, calcs: i2.length, paints: s2.length, lists: v2.size, writes: T2, viewWrites: D2 }, t._viewsChanged = D2 > 0, t._lastPass = { trigger: e.trigger || "refresh", writes: T2 }, t._debug && console.log(`sap pass \xB7 trigger: ${t._lastPass.trigger} \xB7 writes ${T2}/${s2.length}`);
|
|
41337
41398
|
}
|
|
41338
|
-
function
|
|
41399
|
+
function Rr2(t) {
|
|
41339
41400
|
return t.kind === "text" ? t.fmt ? "text:" + t.fmt : "text" : t.kind === "attr" ? "attr:" + t.arg : t.kind === "class" ? "class:" + t.arg : t.kind === "css" ? "css:" + t.arg : t.kind === "when" ? (t.match === "hide" ? "hide-when:" : t.match === "show-not" ? "option-not:" : "show-when:") + t.field : t.kind;
|
|
41340
41401
|
}
|
|
41341
|
-
function
|
|
41342
|
-
let
|
|
41343
|
-
for (;
|
|
41344
|
-
if (
|
|
41345
|
-
let
|
|
41346
|
-
if (r ? !
|
|
41402
|
+
function re3(t, e, n2, r) {
|
|
41403
|
+
let i2 = t;
|
|
41404
|
+
for (; i2 && i2.nodeType === 1; ) {
|
|
41405
|
+
if (i2.hasAttribute && i2.hasAttribute(e)) {
|
|
41406
|
+
let s2 = n2.includes(i2.getAttribute(e));
|
|
41407
|
+
if (r ? !s2 : s2) return true;
|
|
41347
41408
|
}
|
|
41348
|
-
|
|
41409
|
+
i2 = i2.parentElement;
|
|
41349
41410
|
}
|
|
41350
41411
|
return false;
|
|
41351
41412
|
}
|
|
41352
|
-
function
|
|
41413
|
+
function Re3(t, e) {
|
|
41353
41414
|
if (t === t.ownerDocument.activeElement) return 0;
|
|
41354
|
-
|
|
41355
|
-
|
|
41415
|
+
if (t.type === "radio") {
|
|
41416
|
+
let s2 = e != null && String(t.value) === String(e);
|
|
41417
|
+
return t.checked === s2 ? 0 : (t.checked = s2, 1);
|
|
41418
|
+
}
|
|
41419
|
+
let n2 = P2(t), r = n2.read(), i2 = e ?? "";
|
|
41420
|
+
return String(r) !== String(i2) ? (n2.write(i2, { silent: true }), 1) : 0;
|
|
41356
41421
|
}
|
|
41357
|
-
function
|
|
41358
|
-
if (t.kind === "projection")
|
|
41359
|
-
|
|
41422
|
+
function Dr2(t, e) {
|
|
41423
|
+
if (t.kind === "projection") {
|
|
41424
|
+
if (t.from === "drawn") {
|
|
41425
|
+
let r = t.field in t.ctx.state ? t.ctx.state : t.ctx.root;
|
|
41426
|
+
return Re3(t.el, r[t.field]);
|
|
41427
|
+
}
|
|
41428
|
+
return Re3(t.el, t.ctx.item ? t.ctx.item[t.field] : "");
|
|
41429
|
+
}
|
|
41430
|
+
if (t.kind === "when") return De3(t, null);
|
|
41360
41431
|
let n2 = { state: t.ctx.state, item: t.ctx.item, el: t.el, root: t.ctx.root };
|
|
41361
41432
|
try {
|
|
41362
|
-
let r =
|
|
41363
|
-
return
|
|
41433
|
+
let r = J3(t.entry, n2), i2 = De3(t, r);
|
|
41434
|
+
return Ct3(t.el), i2;
|
|
41364
41435
|
} catch (r) {
|
|
41365
|
-
return e.diag.error(r.sapCode === "E22" ? "E22" : "E24", t.el, { attr:
|
|
41436
|
+
return e.diag.error(r.sapCode === "E22" ? "E22" : "E24", t.el, { attr: Rr2(t), expr: t.entry && t.entry.src, problem: String(r.message) }), ut3(t.el, r.sapCode || "E24"), 0;
|
|
41366
41437
|
}
|
|
41367
41438
|
}
|
|
41368
|
-
function
|
|
41439
|
+
function De3(t, e) {
|
|
41369
41440
|
let n2 = t.el;
|
|
41370
41441
|
switch (t.kind) {
|
|
41371
41442
|
case "text": {
|
|
41372
|
-
let r = t.fmt != null ?
|
|
41443
|
+
let r = t.fmt != null ? be3(t.fmt, e) : e == null ? "" : String(e);
|
|
41373
41444
|
return n2.textContent !== r ? (n2.textContent = r, 1) : 0;
|
|
41374
41445
|
}
|
|
41375
41446
|
case "show": {
|
|
@@ -41377,21 +41448,25 @@ ${t}` : `"use strict"; return (${t});`;
|
|
|
41377
41448
|
return n2.hidden !== r ? (n2.hidden = r, 1) : 0;
|
|
41378
41449
|
}
|
|
41379
41450
|
case "when": {
|
|
41380
|
-
let r =
|
|
41451
|
+
let r = X2("optionVisibility");
|
|
41381
41452
|
if (r && r._started) return n2._sapWhen && n2.hidden ? (n2.hidden = false, n2._sapWhen = false, 1) : 0;
|
|
41382
|
-
let
|
|
41383
|
-
t.match === "hide" ?
|
|
41384
|
-
let
|
|
41385
|
-
return n2.hidden !==
|
|
41453
|
+
let i2;
|
|
41454
|
+
t.match === "hide" ? i2 = !re3(n2, t.field, t.values, false) : t.match === "show-not" ? i2 = re3(n2, t.field, t.values, true) : i2 = re3(n2, t.field, t.values, false), n2._sapWhen = true;
|
|
41455
|
+
let s2 = !i2;
|
|
41456
|
+
return n2.hidden !== s2 ? (n2.hidden = s2, 1) : 0;
|
|
41386
41457
|
}
|
|
41387
41458
|
case "attr": {
|
|
41388
41459
|
let r = t.arg;
|
|
41389
|
-
if (
|
|
41390
|
-
let
|
|
41391
|
-
return e &&
|
|
41460
|
+
if ((r === "checked" || r === "selected") && typeof n2[r] == "boolean" && !n2.hasAttribute("bind") && !n2.closest("select[bind]")) {
|
|
41461
|
+
let s2 = 0;
|
|
41462
|
+
return n2[r] !== !!e && (n2[r] = !!e, s2 = 1), !!e !== n2.hasAttribute(r) && (e ? n2.setAttribute(r, "") : n2.removeAttribute(r), s2 = 1), s2;
|
|
41392
41463
|
}
|
|
41393
|
-
|
|
41394
|
-
|
|
41464
|
+
if (Nr2.has(r)) {
|
|
41465
|
+
let s2 = n2.hasAttribute(r);
|
|
41466
|
+
return e && !s2 ? (n2.setAttribute(r, ""), 1) : !e && s2 ? (n2.removeAttribute(r), 1) : 0;
|
|
41467
|
+
}
|
|
41468
|
+
let i2 = typeof e == "boolean" ? String(e) : e == null ? "" : String(e);
|
|
41469
|
+
return n2.getAttribute(r) !== i2 ? (n2.setAttribute(r, i2), 1) : 0;
|
|
41395
41470
|
}
|
|
41396
41471
|
case "class": {
|
|
41397
41472
|
let r = !!e;
|
|
@@ -41405,29 +41480,29 @@ ${t}` : `"use strict"; return (${t});`;
|
|
|
41405
41480
|
return 0;
|
|
41406
41481
|
}
|
|
41407
41482
|
}
|
|
41408
|
-
function
|
|
41483
|
+
function Cr2(t, e) {
|
|
41409
41484
|
try {
|
|
41410
|
-
|
|
41485
|
+
J3(t.entry, { state: t.ctx.state, item: t.ctx.item, el: t.el, root: t.ctx.root }), Ct3(t.el);
|
|
41411
41486
|
} catch (n2) {
|
|
41412
|
-
e.diag.error("E24", t.el, { attr: "effect", expr: t.entry && t.entry.src, problem: String(n2.message) }),
|
|
41487
|
+
e.diag.error("E24", t.el, { attr: "effect", expr: t.entry && t.entry.src, problem: String(n2.message) }), ut3(t.el, "E24");
|
|
41413
41488
|
}
|
|
41414
41489
|
}
|
|
41415
|
-
function
|
|
41490
|
+
function Mr2(t) {
|
|
41416
41491
|
let e = "";
|
|
41417
41492
|
try {
|
|
41418
|
-
let n2 =
|
|
41493
|
+
let n2 = J3(t.entry, { state: t.ctx.state, item: t.ctx.item, el: t.el, root: t.ctx.root });
|
|
41419
41494
|
e = typeof n2 == "string" ? n2 : "";
|
|
41420
41495
|
} catch {
|
|
41421
41496
|
e = "";
|
|
41422
41497
|
}
|
|
41423
41498
|
typeof t.el.setCustomValidity == "function" && t.el.setCustomValidity(e);
|
|
41424
41499
|
}
|
|
41425
|
-
function
|
|
41500
|
+
function Ce3(t) {
|
|
41426
41501
|
let e = 0, n2 = t;
|
|
41427
41502
|
for (; n2 && !(n2.hasAttribute && n2.hasAttribute("sap")); ) n2 = n2.parentElement, e++;
|
|
41428
41503
|
return e;
|
|
41429
41504
|
}
|
|
41430
|
-
function
|
|
41505
|
+
function Ir2(t, e, n2) {
|
|
41431
41506
|
let r = n2.nextSibling;
|
|
41432
41507
|
if (e.isConnected && t.moveBefore) try {
|
|
41433
41508
|
t.moveBefore(e, r);
|
|
@@ -41436,531 +41511,582 @@ ${t}` : `"use strict"; return (${t});`;
|
|
|
41436
41511
|
}
|
|
41437
41512
|
t.insertBefore(e, r);
|
|
41438
41513
|
}
|
|
41439
|
-
var
|
|
41440
|
-
function
|
|
41514
|
+
var Or2 = new Set(mt3), Me3 = /* @__PURE__ */ new Set(["calc", "text", "attr", "class", "css", "set", "move", "sort", "option", "option-not", "show-when", "hide-when", "editmode"]), Fr2 = /* @__PURE__ */ new Set(["show-when", "hide-when", "option", "option-not"]), Pr2 = /\b(?:state|item|root)\.|===|!==|&&|\|\||[()]|^\s*!/, Ie3 = /* @__PURE__ */ new Set(["sap", "scope", "items", "item", "template", "bind", "show", "effect", "invalid", "detail", "state", "transient", "confirm", "default", "persist", "sortable", "trigger-add", "trigger-remove", "trigger-reset", "sap-ignore", "sap-error", "no-save", "no-watch", "no-undo", "no-trigger-autosave", "freeze", "mutations-ignore", "save-remove", "save-ignore", "save-freeze"]);
|
|
41515
|
+
function Wr(t) {
|
|
41441
41516
|
return t.tagName === "INPUT" || t.tagName === "SELECT" || t.tagName === "TEXTAREA";
|
|
41442
41517
|
}
|
|
41443
|
-
function
|
|
41518
|
+
function ne3(t) {
|
|
41444
41519
|
return t.hasAttribute("bind");
|
|
41445
41520
|
}
|
|
41446
|
-
function
|
|
41521
|
+
function Br2(t, e) {
|
|
41447
41522
|
e(t);
|
|
41448
41523
|
for (let r of t.children) n2(r);
|
|
41449
41524
|
function n2(r) {
|
|
41450
|
-
if (r.nodeType === 1 && !
|
|
41525
|
+
if (r.nodeType === 1 && !r.hasAttribute("sap-ignore")) {
|
|
41526
|
+
if (r.tagName === "TEMPLATE") {
|
|
41527
|
+
if (r.hasAttribute("items")) for (let i2 of r.content.children) n2(i2);
|
|
41528
|
+
return;
|
|
41529
|
+
}
|
|
41451
41530
|
e(r);
|
|
41452
|
-
for (let
|
|
41531
|
+
for (let i2 of r.children) n2(i2);
|
|
41453
41532
|
}
|
|
41454
41533
|
}
|
|
41455
41534
|
}
|
|
41456
|
-
function
|
|
41457
|
-
let n2 = false, r = (
|
|
41458
|
-
e.error(
|
|
41459
|
-
},
|
|
41460
|
-
for (;
|
|
41461
|
-
r("E02",
|
|
41535
|
+
function jt3(t, e) {
|
|
41536
|
+
let n2 = false, r = (a, R2, k2) => {
|
|
41537
|
+
e.error(a, R2, k2), n2 = true;
|
|
41538
|
+
}, i2 = t.ownerDocument.createTreeWalker(t, 4), s2;
|
|
41539
|
+
for (; s2 = i2.nextNode(); ) if (/\{\{.*\}\}/.test(s2.nodeValue || "")) {
|
|
41540
|
+
r("E02", s2.parentElement || t, { problem: "moustaches in text content are not a Sap feature", fix: 'move the expression onto the element: text="state.x"' });
|
|
41462
41541
|
break;
|
|
41463
41542
|
}
|
|
41464
|
-
return
|
|
41465
|
-
let R2 =
|
|
41466
|
-
for (let k2 of [...
|
|
41467
|
-
let
|
|
41543
|
+
return Br2(t, (a) => {
|
|
41544
|
+
let R2 = a.closest && a.closest("[detail]");
|
|
41545
|
+
for (let k2 of [...a.attributes]) {
|
|
41546
|
+
let A2 = k2.name, f2 = ce3(A2);
|
|
41468
41547
|
if (f2) {
|
|
41469
|
-
r("E01",
|
|
41548
|
+
r("E01", a, { attr: A2, expr: k2.value, problem: `"${A2}" is a foreign-dialect attribute; Sap has no ${A2.split(/[:=]/)[0]} directive`, fix: f2 + " \u2014 or wrap the subtree in sap-ignore if intentional" });
|
|
41470
41549
|
continue;
|
|
41471
41550
|
}
|
|
41472
|
-
if (
|
|
41473
|
-
let
|
|
41474
|
-
if (
|
|
41475
|
-
if (
|
|
41476
|
-
let
|
|
41477
|
-
e.warn("W04",
|
|
41551
|
+
if (A2.includes(":")) {
|
|
41552
|
+
let N2 = A2.slice(0, A2.indexOf(":"));
|
|
41553
|
+
if (Me3.has(N2)) {
|
|
41554
|
+
if (Fr2.has(N2) && Pr2.test(k2.value)) {
|
|
41555
|
+
let I3 = A2.slice(A2.indexOf(":") + 1);
|
|
41556
|
+
e.warn("W04", a, { attr: A2, expr: k2.value, problem: `${N2}: compares the "${I3}" attribute against a literal value, not a JS expression`, fix: `use show="${k2.value}" for an expression, or a literal like ${N2}:${I3}="overview"` });
|
|
41478
41557
|
}
|
|
41479
41558
|
} else {
|
|
41480
|
-
let
|
|
41481
|
-
e.warn("W03",
|
|
41559
|
+
let I3 = xt3(N2, [...Me3]);
|
|
41560
|
+
e.warn("W03", a, { attr: A2, problem: `unknown "${N2}:" attribute`, didYouMean: I3 ? `${I3}:` : null });
|
|
41482
41561
|
}
|
|
41483
|
-
} else if (!
|
|
41484
|
-
let
|
|
41485
|
-
|
|
41562
|
+
} else if (!Ie3.has(A2) && !St3.has(A2) && !Or2.has(A2) && !/^(data-|aria-|on)/.test(A2) && !(A2 in a)) {
|
|
41563
|
+
let N2 = xt3(A2, [...Ie3]);
|
|
41564
|
+
N2 && e.warn("W03", a, { attr: A2, problem: `unknown "${A2}" attribute`, didYouMean: N2 });
|
|
41565
|
+
}
|
|
41566
|
+
A2 === "attr:hidden" && e.warn("W03", a, { attr: A2, problem: "attr:hidden paints the wrong attribute", fix: 'use show="expr"' });
|
|
41567
|
+
let w2 = ne3(a) || A2 === "attr:selected" && a.tagName === "OPTION" && !!a.closest("select[bind]");
|
|
41568
|
+
(A2 === "attr:value" || A2 === "attr:checked" || A2 === "attr:selected") && w2 && r("E30", a, { attr: A2, problem: "attr: on a bound control collides with persist ownership", fix: "remove it; bind owns this attribute" }), A2 === "effect" && ne3(a) && /\b(value|checked)\s*=[^=]/.test(k2.value) && r("E30", a, { attr: A2, expr: k2.value, problem: "effect writes value/checked on a bound control (writes a stale value with no synthetic event)", fix: "write through onclick + Sap(this) instead" }), (A2 === "text" || A2.startsWith("text:") || A2 === "show") && Wr(a) && (A2 === "show" || r("E18", a, { attr: A2, problem: "paint belongs on output elements, not form controls", fix: "move the paint to an <output> or <span>" }));
|
|
41569
|
+
}
|
|
41570
|
+
if (a.hasAttribute("state")) {
|
|
41571
|
+
let k2 = z2(a.getAttribute("state")), A2 = /* @__PURE__ */ new Set();
|
|
41572
|
+
for (let f2 of k2) {
|
|
41573
|
+
f2.name.includes("-") && r("E08", a, { attr: "state", problem: `field "${f2.name}" is not a valid identifier (the hyphen parses as subtraction)`, fix: `rename to ${f2.name.replace(/-/g, "")}` }), A2.has(f2.name) && r("E04", a, { attr: "state", problem: `field "${f2.name}" is declared twice in one scope` }), A2.add(f2.name), Rt3.has(f2.attr) && r("E05", a, { attr: "state", problem: `"${f2.name}" is a reserved Sap word` }), St3.has(f2.attr) && r("E06", a, { attr: "state", problem: `"${f2.name}" is a global HTML attribute name; pick another field name` }), f2.name === "open" && a.tagName === "DIALOG" && r("E33", a, { attr: "state", problem: "dialog open is transient", fix: "use showModal() \u2014 declare state= only on <details> or popovers" });
|
|
41574
|
+
let w2 = Qt3(a, f2.attr);
|
|
41575
|
+
w2 && (f2.attr === "checked" || f2.attr === "selected") && r("E35", a, { attr: "state", problem: `"${f2.attr}" on a form control is the control's own state, not a declared field`, fix: 'bind the control instead, e.g. <input type="checkbox" bind="done">' }), w2 && f2.type === "num" && r("E35", a, { attr: "state", problem: `"${f2.attr}" is an HTML boolean attribute; it cannot hold a number`, fix: `declare it bare: state="${f2.attr}"` }), f2.transient && (w2 || f2.type === "presence") && r("E35", a, { attr: "state", problem: `"${f2.name}" is carried by attribute presence, which transient would strip`, fix: "declare a separate name:bool:transient field and paint the attribute from it" });
|
|
41486
41576
|
}
|
|
41487
|
-
|
|
41488
|
-
|
|
41489
|
-
|
|
41490
|
-
|
|
41491
|
-
|
|
41492
|
-
|
|
41493
|
-
|
|
41494
|
-
|
|
41495
|
-
let k2 = (u2.getAttribute("type") || "text").toLowerCase();
|
|
41496
|
-
k2 === "file" && r("E32", u2, { attr: "bind", problem: "files never serialize into an HTML file", fix: "use no-save + effect instead of bind" }), k2 === "password" && !u2.hasAttribute("transient") && r("E31", u2, { attr: "bind", problem: "a password must never serialize into a world-readable file", fix: "add transient to the password input" });
|
|
41497
|
-
} else if (u2.tagName !== "SELECT" && u2.tagName !== "TEXTAREA") {
|
|
41498
|
-
let k2 = u2.getAttribute("contenteditable");
|
|
41499
|
-
!(k2 != null && k2 !== "false") && u2.children.length > 0 && r("E20", u2, { attr: "bind", problem: "bind on a container element is not a control; a write would overwrite its children", fix: "bind a control (input/select/textarea), a contenteditable, or an empty text leaf" });
|
|
41577
|
+
}
|
|
41578
|
+
if (ne3(a)) {
|
|
41579
|
+
if (a.hasAttribute("-"), a.tagName === "INPUT") {
|
|
41580
|
+
let k2 = (a.getAttribute("type") || "text").toLowerCase();
|
|
41581
|
+
k2 === "file" && r("E32", a, { attr: "bind", problem: "files never serialize into an HTML file", fix: "use no-save + effect instead of bind" }), k2 === "password" && !a.hasAttribute("transient") && r("E31", a, { attr: "bind", problem: "a password must never serialize into a world-readable file", fix: "add transient to the password input" });
|
|
41582
|
+
} else if (a.tagName !== "SELECT" && a.tagName !== "TEXTAREA") {
|
|
41583
|
+
let k2 = a.getAttribute("contenteditable");
|
|
41584
|
+
!(k2 != null && k2 !== "false") && a.children.length > 0 && r("E20", a, { attr: "bind", problem: "bind on a container element is not a control; a write would overwrite its children", fix: "bind a control (input/select/textarea), a contenteditable, or an empty text leaf" });
|
|
41500
41585
|
}
|
|
41501
41586
|
}
|
|
41502
|
-
if (
|
|
41503
|
-
let k2 =
|
|
41504
|
-
(!k2 || !k2.hasAttribute("items")) && r("E10",
|
|
41587
|
+
if (a.hasAttribute("transient") && a.hasAttribute("persist") && r("E34", a, { problem: "transient and persist are opposite: persist forces the live value into the saved bytes, leaking exactly what transient drops", fix: "remove one \u2014 transient to keep it out of the file, or persist to save it" }), a.tagName === "DIALOG" && a.hasAttribute("detail") && !(a.parentElement && a.parentElement.closest('[clay~="freeze"], [freeze], [save-freeze]')) && e.warn("W31", a, { attr: "detail", problem: "a detail dialog writes open when it opens, and that attribute would be saved into the file", fix: 'wrap the dialog in an element with clay="freeze" (not editor-ui, which removes it from the file), and make its key field transient' }), a.hasAttribute("item") && !a.hasAttribute("template") && a.parentNode && a.parentNode.nodeType === 1) {
|
|
41588
|
+
let k2 = a.parentElement;
|
|
41589
|
+
(!k2 || !k2.hasAttribute("items")) && r("E10", a, { problem: "an [item] must be a direct child of an [items] list", fix: 'wrap it in a container with items="name"' });
|
|
41505
41590
|
}
|
|
41506
|
-
if (
|
|
41507
|
-
let k2 = t.querySelector(`[trigger-add="${
|
|
41508
|
-
!
|
|
41591
|
+
if (a.hasAttribute("items") && R2 && r("E17", a, { attr: "items", problem: "nested items inside a detail panel is a v1 mount error (nested collections ship in v1.1)" }), a.hasAttribute("items")) {
|
|
41592
|
+
let k2 = t.querySelector(`[trigger-add="${a.getAttribute("items")}"]`);
|
|
41593
|
+
!Ft3(a) && !Kt2(t, a.getAttribute("items")) && Z3(a).length === 0 && k2 && r("E17", a, { attr: "items", problem: `trigger-add targets items="${a.getAttribute("items")}" but it has no [item template] to clone` });
|
|
41509
41594
|
}
|
|
41510
|
-
}), n2 && (e.halted = true, e.haltReason = e.errors[0] ? e.errors[0].code : "halt",
|
|
41595
|
+
}), n2 && (e.halted = true, e.haltReason = e.errors[0] ? e.errors[0].code : "halt", ut3(t, e.haltReason)), !n2;
|
|
41511
41596
|
}
|
|
41512
|
-
var
|
|
41513
|
-
function
|
|
41514
|
-
if (
|
|
41597
|
+
var Oe3 = "sap-styles", Fe3 = "[item][template]{display:none!important}[hidden]{display:none!important}[sap-error]{outline:2px solid #e5484d;outline-offset:1px}", oe3 = /* @__PURE__ */ new WeakSet();
|
|
41598
|
+
function qr2(t) {
|
|
41599
|
+
if (oe3.has(t)) return;
|
|
41515
41600
|
let e = t.defaultView, n2 = e && e.CSSStyleSheet;
|
|
41516
41601
|
if (n2 && "adoptedStyleSheets" in t) try {
|
|
41517
41602
|
let r = new n2();
|
|
41518
|
-
r.replaceSync(
|
|
41603
|
+
r.replaceSync(Fe3), t.adoptedStyleSheets = [...t.adoptedStyleSheets, r], oe3.add(t);
|
|
41519
41604
|
return;
|
|
41520
41605
|
} catch {
|
|
41521
41606
|
}
|
|
41522
|
-
if (!t.getElementById(
|
|
41607
|
+
if (!t.getElementById(Oe3)) {
|
|
41523
41608
|
let r = t.createElement("style");
|
|
41524
|
-
r.id =
|
|
41609
|
+
r.id = Oe3, r.textContent = Fe3, (t.head || t.documentElement).appendChild(r);
|
|
41525
41610
|
}
|
|
41526
|
-
|
|
41611
|
+
oe3.add(t);
|
|
41527
41612
|
}
|
|
41528
|
-
var
|
|
41529
|
-
function
|
|
41613
|
+
var Vr2 = 0;
|
|
41614
|
+
function Pe3() {
|
|
41530
41615
|
return typeof performance < "u" && performance.now ? performance.now() : 0;
|
|
41531
41616
|
}
|
|
41532
|
-
function
|
|
41533
|
-
let e = t.id || t.getAttribute("sap") || `app-${
|
|
41534
|
-
if (!
|
|
41535
|
-
|
|
41536
|
-
for (let
|
|
41537
|
-
let
|
|
41538
|
-
return
|
|
41617
|
+
function ie3(t) {
|
|
41618
|
+
let e = t.id || t.getAttribute("sap") || `app-${Vr2++}`, n2 = new pt3(e), r = { root: t, name: e, diag: n2, _state: null, _stats: null, _lastPass: null, _passes: 0, _broken: false, _mountMs: 0, _mountWrites: 0 };
|
|
41619
|
+
if (!jt3(t, n2)) return r.halted = true, r;
|
|
41620
|
+
qr2(t.ownerDocument);
|
|
41621
|
+
for (let a of t.querySelectorAll("textarea[data-value]")) qt3(a);
|
|
41622
|
+
let s2 = Pe3();
|
|
41623
|
+
return Et3(r, { trigger: "mount" }), r._mountMs = Pe3() - s2, r._mountWrites = r._stats ? r._stats.writes : 0, r._mountWrites > 0 && n2.warn("W30", t, { problem: `${r._mountWrites} paint(s) ran at mount; the saved file was out of sync with its declared state`, fix: "re-save once so the file mounts clean (a settled file writes nothing)" }), r;
|
|
41539
41624
|
}
|
|
41540
|
-
|
|
41625
|
+
var zr2 = ["for", "form", "list", "headers", "popovertarget", "commandfor", "anchor", "aria-activedescendant", "aria-controls", "aria-describedby", "aria-details", "aria-errormessage", "aria-flowto", "aria-labelledby", "aria-owns"];
|
|
41626
|
+
function Hr2(t, e) {
|
|
41541
41627
|
let n2 = null;
|
|
41542
|
-
return
|
|
41628
|
+
return K2(t, (r) => {
|
|
41543
41629
|
!n2 && r.getAttribute("scope") === e && (n2 = r);
|
|
41544
41630
|
}), n2;
|
|
41545
41631
|
}
|
|
41546
|
-
function
|
|
41547
|
-
let r =
|
|
41632
|
+
function We3(t, e, n2) {
|
|
41633
|
+
let r = Y2(t) || e;
|
|
41548
41634
|
for (; r; ) {
|
|
41549
|
-
for (let
|
|
41635
|
+
for (let i2 of z2(r.getAttribute("state") || "")) if (i2.name === n2) return { el: r, decl: i2 };
|
|
41550
41636
|
if (r.hasAttribute("sap")) break;
|
|
41551
|
-
r =
|
|
41637
|
+
r = Y2(r.parentElement);
|
|
41552
41638
|
}
|
|
41553
41639
|
return null;
|
|
41554
41640
|
}
|
|
41555
|
-
function
|
|
41641
|
+
function jr2(t) {
|
|
41556
41642
|
return typeof t == "number" ? "num" : typeof t == "boolean" ? "bool" : "string";
|
|
41557
41643
|
}
|
|
41558
|
-
function
|
|
41559
|
-
function e(
|
|
41560
|
-
let
|
|
41561
|
-
if (!
|
|
41562
|
-
let
|
|
41563
|
-
if (
|
|
41564
|
-
let
|
|
41565
|
-
if (
|
|
41566
|
-
let
|
|
41567
|
-
if (
|
|
41568
|
-
let $3 =
|
|
41569
|
-
return { ctxEl: $3, appRec:
|
|
41570
|
-
}
|
|
41571
|
-
function n2(
|
|
41572
|
-
let
|
|
41573
|
-
if (!
|
|
41574
|
-
let
|
|
41575
|
-
return
|
|
41576
|
-
}
|
|
41577
|
-
function r(
|
|
41578
|
-
let
|
|
41579
|
-
if (
|
|
41580
|
-
let
|
|
41581
|
-
if (
|
|
41582
|
-
let
|
|
41583
|
-
|
|
41584
|
-
|
|
41585
|
-
|
|
41586
|
-
let
|
|
41587
|
-
|
|
41588
|
-
|
|
41589
|
-
|
|
41590
|
-
|
|
41591
|
-
|
|
41592
|
-
|
|
41593
|
-
|
|
41594
|
-
|
|
41595
|
-
|
|
41596
|
-
|
|
41597
|
-
|
|
41598
|
-
|
|
41599
|
-
|
|
41600
|
-
|
|
41601
|
-
|
|
41602
|
-
|
|
41603
|
-
|
|
41604
|
-
|
|
41605
|
-
|
|
41606
|
-
|
|
41607
|
-
|
|
41644
|
+
function Be3(t) {
|
|
41645
|
+
function e(h) {
|
|
41646
|
+
let d = t.appFor(h);
|
|
41647
|
+
if (!d) return null;
|
|
41648
|
+
let m2 = ft2(h), y2 = m2 && m2._sapEachItem && m2._sapEachItem.$el;
|
|
41649
|
+
if (y2 && y2.isConnected) return { ctxEl: y2, appRec: d, isRow: true };
|
|
41650
|
+
let E2 = kt3(h);
|
|
41651
|
+
if (E2) return E2._sapDetailRow ? { ctxEl: E2._sapDetailRow, appRec: d, isRow: true } : { ctxEl: Y2(E2.parentElement) || d.root, appRec: d, isRow: false };
|
|
41652
|
+
let x2 = It3(h);
|
|
41653
|
+
if (x2 && x2.hasAttribute("item")) return { ctxEl: x2, appRec: d, isRow: true };
|
|
41654
|
+
let $3 = Y2(h) || d.root;
|
|
41655
|
+
return { ctxEl: $3, appRec: d, isRow: $3.hasAttribute("item") };
|
|
41656
|
+
}
|
|
41657
|
+
function n2(h) {
|
|
41658
|
+
let d = typeof h == "string" ? document.querySelector(h) : h;
|
|
41659
|
+
if (!d || d.nodeType !== 1) return null;
|
|
41660
|
+
let m2 = e(d);
|
|
41661
|
+
return m2 ? W3(m2.ctxEl, m2.appRec, m2.isRow) : null;
|
|
41662
|
+
}
|
|
41663
|
+
function r(h, d) {
|
|
41664
|
+
let m2 = ft2(h);
|
|
41665
|
+
if (!m2) return n2(h);
|
|
41666
|
+
let y2 = t.appFor(h), E2 = m2._sapEachItem && m2._sapEachItem.$el;
|
|
41667
|
+
if (E2 && E2.nodeType === 1 && E2.hasAttribute("item") && bt3(E2, d)) return E2.isConnected ? W3(E2, y2, true) : null;
|
|
41668
|
+
let x2 = m2.parentElement && m2.parentElement._sapDrawnEl;
|
|
41669
|
+
return !x2 || !x2.isConnected ? null : W3(x2, y2, x2.hasAttribute("item"));
|
|
41670
|
+
}
|
|
41671
|
+
function i2(h, d, m2) {
|
|
41672
|
+
let y2 = lt3(h, m2);
|
|
41673
|
+
if (y2) return P2(y2).read();
|
|
41674
|
+
let E2 = ht3(h, m2);
|
|
41675
|
+
if (E2) return Z3(E2).map((B2) => W3(B2, d, true));
|
|
41676
|
+
let x2 = Hr2(h, m2);
|
|
41677
|
+
if (x2) return W3(x2, d, false);
|
|
41678
|
+
let $3 = We3(h, d.root, m2);
|
|
41679
|
+
if ($3) return $3.decl.transient ? Pt3($3.el, $3.decl) : pe3($3.el, $3.decl);
|
|
41680
|
+
let O2 = h._sapScope;
|
|
41681
|
+
return O2 ? O2[m2] : void 0;
|
|
41682
|
+
}
|
|
41683
|
+
function s2(h, d, m2, y2, E2) {
|
|
41684
|
+
y2.transient ? Tt3(h, y2, m2) : _t2(h, y2, m2), t.schedule(E2, "set:" + d);
|
|
41685
|
+
}
|
|
41686
|
+
function a(h, d) {
|
|
41687
|
+
let m2 = /* @__PURE__ */ new Set(), y2 = Y2(h) || d;
|
|
41688
|
+
for (; y2; ) {
|
|
41689
|
+
for (let E2 of z2(y2.getAttribute("state") || "")) m2.add(E2.name);
|
|
41690
|
+
if (y2.hasAttribute("sap")) break;
|
|
41691
|
+
y2 = Y2(y2.parentElement);
|
|
41692
|
+
}
|
|
41693
|
+
return K2(h, (E2) => {
|
|
41694
|
+
let x2 = E2.getAttribute("bind");
|
|
41695
|
+
x2 && m2.add(x2);
|
|
41696
|
+
}), m2;
|
|
41697
|
+
}
|
|
41698
|
+
function R2(h, d, m2, y2) {
|
|
41699
|
+
let E2 = lt3(h, m2);
|
|
41700
|
+
if (E2) {
|
|
41701
|
+
P2(E2).write(y2);
|
|
41608
41702
|
return;
|
|
41609
41703
|
}
|
|
41610
|
-
let
|
|
41611
|
-
for (;
|
|
41612
|
-
for (let S2 of
|
|
41613
|
-
|
|
41704
|
+
let x2 = h;
|
|
41705
|
+
for (; x2; ) {
|
|
41706
|
+
for (let S2 of x2.attributes) if (S2.name === "calc:" + m2) {
|
|
41707
|
+
d.diag.error("E16", x2, { attr: "calc:" + m2, problem: `"${m2}" is a computed field; computed fields are read-only` });
|
|
41614
41708
|
return;
|
|
41615
41709
|
}
|
|
41616
|
-
if (
|
|
41617
|
-
|
|
41710
|
+
if (x2.hasAttribute("sap")) break;
|
|
41711
|
+
x2 = x2.parentElement;
|
|
41618
41712
|
}
|
|
41619
|
-
let $3 =
|
|
41713
|
+
let $3 = We3(h, d.root, m2);
|
|
41620
41714
|
if ($3) {
|
|
41621
|
-
|
|
41715
|
+
s2($3.el, m2, y2, $3.decl, d);
|
|
41622
41716
|
return;
|
|
41623
41717
|
}
|
|
41624
|
-
let O2 = a(
|
|
41625
|
-
O2.delete(
|
|
41626
|
-
let
|
|
41627
|
-
if (
|
|
41628
|
-
|
|
41718
|
+
let O2 = a(h, d.root);
|
|
41719
|
+
O2.delete(m2);
|
|
41720
|
+
let B2 = m2.length >= 4 ? xt3(m2, [...O2]) : null;
|
|
41721
|
+
if (B2) {
|
|
41722
|
+
d.diag.error("E12", h, { key: m2, problem: `unknown state key "${m2}"`, didYouMean: B2 });
|
|
41629
41723
|
return;
|
|
41630
41724
|
}
|
|
41631
|
-
if (
|
|
41632
|
-
|
|
41725
|
+
if (Rt3.has(m2) || St3.has(m2)) {
|
|
41726
|
+
d.diag.error("E15", h, { key: m2, problem: `cannot write undeclared field "${m2}" \u2014 it is a reserved/global name and cannot become state`, fix: "pick a different field name, or declare it explicitly in a state= attribute" });
|
|
41633
41727
|
return;
|
|
41634
41728
|
}
|
|
41635
|
-
let
|
|
41636
|
-
|
|
41637
|
-
}
|
|
41638
|
-
function
|
|
41639
|
-
let
|
|
41640
|
-
|
|
41641
|
-
|
|
41642
|
-
}
|
|
41643
|
-
|
|
41644
|
-
|
|
41645
|
-
|
|
41646
|
-
|
|
41647
|
-
|
|
41648
|
-
|
|
41649
|
-
|
|
41650
|
-
|
|
41651
|
-
|
|
41652
|
-
|
|
41653
|
-
|
|
41654
|
-
|
|
41655
|
-
|
|
41656
|
-
|
|
41729
|
+
let c2 = d.root, u2 = jr2(y2), b = c2.getAttribute("state") || "", v2 = u2 === "string" ? m2 : `${m2}:${u2}`;
|
|
41730
|
+
c2.setAttribute("state", b ? `${b} ${v2}` : v2), s2(c2, m2, y2, { name: m2, attr: m2, type: u2, transient: false }, d);
|
|
41731
|
+
}
|
|
41732
|
+
function k2(h) {
|
|
41733
|
+
let d = h.ownerDocument, m2 = /* @__PURE__ */ new Map(), y2 = (E2, x2) => {
|
|
41734
|
+
let $3 = le3(d), O2 = E2.getAttribute(x2);
|
|
41735
|
+
O2 && x2 === "id" && m2.set(O2, $3), E2.setAttribute(x2, $3);
|
|
41736
|
+
};
|
|
41737
|
+
h.querySelectorAll("[id]").forEach((E2) => y2(E2, "id")), h.querySelectorAll("[data-id]").forEach((E2) => y2(E2, "data-id")), h.querySelectorAll("[sap-error]").forEach((E2) => E2.removeAttribute("sap-error")), h.removeAttribute("sap-error"), h.hasAttribute("data-id") ? (h.removeAttribute("id"), y2(h, "data-id")) : y2(h, "id");
|
|
41738
|
+
for (let E2 of [h, ...h.querySelectorAll("*")]) for (let x2 of zr2) {
|
|
41739
|
+
let $3 = E2.getAttribute(x2);
|
|
41740
|
+
if ($3 == null) continue;
|
|
41741
|
+
let O2 = $3.split(/\s+/).map((B2) => m2.get(B2) || B2).join(" ");
|
|
41742
|
+
O2 !== $3 && E2.setAttribute(x2, O2);
|
|
41743
|
+
}
|
|
41744
|
+
}
|
|
41745
|
+
function A2(h, d, m2) {
|
|
41746
|
+
let y2 = Nt3(d.root, h, m2);
|
|
41747
|
+
if (!y2) return d.diag.error("E17", h, { problem: `cannot resolve a list named "${m2}" from here` }), null;
|
|
41748
|
+
let E2 = Ft3(y2);
|
|
41749
|
+
if (!E2) return d.diag.error("E17", y2, { problem: `items="${m2}" has no [item template] to clone` }), null;
|
|
41750
|
+
let x2 = y2.ownerDocument.importNode(E2, true);
|
|
41751
|
+
return x2.removeAttribute("template"), k2(x2), y2.appendChild(x2), t.schedule(d, "trigger-add:" + m2), W3(x2, d, true);
|
|
41752
|
+
}
|
|
41753
|
+
function f2(h, d) {
|
|
41754
|
+
K2(h, (m2) => {
|
|
41755
|
+
if (m2.hasAttribute("bind")) {
|
|
41756
|
+
let y2 = P2(m2), E2 = m2.getAttribute("default");
|
|
41757
|
+
y2.kind === "checkbox" || y2.kind === "radio" ? y2.write(E2 != null ? E2 === "" || E2 === "true" || m2.value === E2 : m2.hasAttribute("checked")) : y2.write(E2 ?? (m2.getAttribute("value") || ""));
|
|
41657
41758
|
}
|
|
41658
41759
|
});
|
|
41659
|
-
for (let
|
|
41660
|
-
let
|
|
41661
|
-
|
|
41760
|
+
for (let m2 of z2(h.getAttribute("state") || "")) {
|
|
41761
|
+
let y2 = me3(h, m2);
|
|
41762
|
+
m2.transient ? Tt3(h, m2, y2) : _t2(h, m2, y2);
|
|
41662
41763
|
}
|
|
41663
|
-
t.schedule(
|
|
41764
|
+
t.schedule(d, "trigger-reset");
|
|
41664
41765
|
}
|
|
41665
|
-
function
|
|
41666
|
-
if (!
|
|
41667
|
-
|
|
41766
|
+
function w2(h, d) {
|
|
41767
|
+
if (!h.isConnected) throw new Error("stale row handle: $remove() on a removed row");
|
|
41768
|
+
h.remove(), t.schedule(d, "trigger-remove");
|
|
41668
41769
|
}
|
|
41669
|
-
function
|
|
41670
|
-
if (!
|
|
41671
|
-
let
|
|
41672
|
-
if (
|
|
41673
|
-
|
|
41770
|
+
function N2(h, d, m2) {
|
|
41771
|
+
if (!h.isConnected) throw new Error("stale row handle: $move() on a removed row");
|
|
41772
|
+
let y2 = null;
|
|
41773
|
+
if (m2 && m2.nodeType === 1 ? y2 = m2 : typeof m2 == "string" && (y2 = Nt3(d.root, h, m2)), !y2) {
|
|
41774
|
+
d.diag.error("E17", h, { problem: `$move() cannot resolve target "${m2}"` });
|
|
41674
41775
|
return;
|
|
41675
41776
|
}
|
|
41676
|
-
t.moveInto(
|
|
41777
|
+
t.moveInto(y2, h), t.schedule(d, "trigger-move");
|
|
41677
41778
|
}
|
|
41678
|
-
function
|
|
41679
|
-
let
|
|
41680
|
-
return
|
|
41779
|
+
function I3(h) {
|
|
41780
|
+
let d = h.parentElement;
|
|
41781
|
+
return d ? Z3(d).indexOf(h) : -1;
|
|
41681
41782
|
}
|
|
41682
|
-
function W3(
|
|
41683
|
-
let
|
|
41684
|
-
return
|
|
41783
|
+
function W3(h, d, m2) {
|
|
41784
|
+
let y2 = { get $el() {
|
|
41785
|
+
return h;
|
|
41685
41786
|
}, get $key() {
|
|
41686
|
-
return
|
|
41787
|
+
return Mt3(h, m2 ? "row" : "scope");
|
|
41687
41788
|
}, get $index() {
|
|
41688
|
-
return
|
|
41689
|
-
}, $add(
|
|
41690
|
-
return
|
|
41789
|
+
return I3(h);
|
|
41790
|
+
}, $add(x2) {
|
|
41791
|
+
return A2(h, d, x2);
|
|
41691
41792
|
}, $reset() {
|
|
41692
|
-
return
|
|
41793
|
+
return f2(h, d), E2;
|
|
41693
41794
|
}, $remove() {
|
|
41694
|
-
|
|
41695
|
-
}, $move(
|
|
41696
|
-
|
|
41795
|
+
w2(h, d);
|
|
41796
|
+
}, $move(x2) {
|
|
41797
|
+
N2(h, d, x2);
|
|
41697
41798
|
}, get $appRec() {
|
|
41698
|
-
return
|
|
41699
|
-
} },
|
|
41700
|
-
return typeof $3 == "symbol" || $3[0] === "$" ?
|
|
41701
|
-
}, set(
|
|
41702
|
-
return typeof $3 == "string" && $3[0] === "$" ? (
|
|
41703
|
-
}, has(
|
|
41704
|
-
return typeof $3 == "string" && $3[0] === "$" ? $3 in
|
|
41799
|
+
return d;
|
|
41800
|
+
} }, E2 = new Proxy(y2, { get(x2, $3) {
|
|
41801
|
+
return typeof $3 == "symbol" || $3[0] === "$" ? x2[$3] : i2(h, d, $3);
|
|
41802
|
+
}, set(x2, $3, O2) {
|
|
41803
|
+
return typeof $3 == "string" && $3[0] === "$" ? (x2[$3] = O2, true) : (R2(h, d, $3, O2), true);
|
|
41804
|
+
}, has(x2, $3) {
|
|
41805
|
+
return typeof $3 == "string" && $3[0] === "$" ? $3 in x2 : i2(h, d, $3) !== void 0;
|
|
41705
41806
|
} });
|
|
41706
|
-
return
|
|
41807
|
+
return E2;
|
|
41707
41808
|
}
|
|
41708
|
-
return { Sap: n2, contextElFor: e, readField:
|
|
41809
|
+
return { Sap: n2, contextElFor: e, readField: i2, writeField: R2, makeProxy: W3, writeTargetFor: r };
|
|
41709
41810
|
}
|
|
41710
|
-
var
|
|
41711
|
-
function
|
|
41811
|
+
var Ur2 = ["trigger-add", "trigger-remove", "trigger-reset"];
|
|
41812
|
+
function Gr(t) {
|
|
41712
41813
|
if (t.nodeType !== 1) return false;
|
|
41713
41814
|
for (let e of t.attributes) {
|
|
41714
41815
|
let n2 = e.name;
|
|
41715
|
-
if (n2.startsWith("set:") || n2.startsWith("move:") || n2.startsWith("sort:") ||
|
|
41816
|
+
if (n2.startsWith("set:") || n2.startsWith("move:") || n2.startsWith("sort:") || Ur2.includes(n2)) return true;
|
|
41716
41817
|
}
|
|
41717
41818
|
return false;
|
|
41718
41819
|
}
|
|
41719
|
-
function
|
|
41820
|
+
function Yr(t, e) {
|
|
41720
41821
|
let n2 = t, r = e.parentElement;
|
|
41721
41822
|
for (; n2 && n2 !== r; ) {
|
|
41722
|
-
if (n2.nodeType === 1 &&
|
|
41823
|
+
if (n2.nodeType === 1 && Gr(n2) && !(n2.tagName === "FORM" && n2.hasAttribute("trigger-add"))) return n2;
|
|
41723
41824
|
n2 = n2.parentElement;
|
|
41724
41825
|
}
|
|
41725
41826
|
return null;
|
|
41726
41827
|
}
|
|
41727
|
-
function
|
|
41828
|
+
function qe3(t, e) {
|
|
41728
41829
|
let { Sap: n2 } = e;
|
|
41729
|
-
function r(
|
|
41730
|
-
let
|
|
41731
|
-
if (v2)
|
|
41732
|
-
else if (S2 && S2._sapDetailRow)
|
|
41830
|
+
function r(c2, u2) {
|
|
41831
|
+
let b = null, v2 = ft2(c2), S2 = kt3(c2);
|
|
41832
|
+
if (v2) b = v2._sapEachItem ?? null;
|
|
41833
|
+
else if (S2 && S2._sapDetailRow) b = S2._sapDetailRow._sapScope || null;
|
|
41733
41834
|
else {
|
|
41734
|
-
let
|
|
41735
|
-
|
|
41835
|
+
let D2 = It3(c2);
|
|
41836
|
+
D2 && D2.hasAttribute("item") && (b = D2._sapScope || null);
|
|
41736
41837
|
}
|
|
41737
|
-
return { state: (
|
|
41838
|
+
return { state: (Y2(c2) || u2.root)._sapScope || u2._state || {}, item: b, el: c2, root: u2._state || {} };
|
|
41738
41839
|
}
|
|
41739
|
-
function
|
|
41740
|
-
if (!
|
|
41741
|
-
|
|
41840
|
+
function i2(c2, u2, b) {
|
|
41841
|
+
if (!c2.hasAttribute("confirm")) {
|
|
41842
|
+
b();
|
|
41742
41843
|
return;
|
|
41743
41844
|
}
|
|
41744
|
-
let v2 =
|
|
41745
|
-
if (!
|
|
41746
|
-
let
|
|
41747
|
-
(typeof
|
|
41845
|
+
let v2 = c2.getAttribute("confirm"), S2 = v2, _ = H2(v2);
|
|
41846
|
+
if (!_.error) try {
|
|
41847
|
+
let o2 = J3(_, r(c2, u2));
|
|
41848
|
+
(typeof o2 == "string" || typeof o2 == "number") && (S2 = String(o2));
|
|
41748
41849
|
} catch {
|
|
41749
41850
|
}
|
|
41750
|
-
let
|
|
41751
|
-
if (!
|
|
41752
|
-
window.confirm(S2) &&
|
|
41851
|
+
let T2 = xe3();
|
|
41852
|
+
if (!T2) {
|
|
41853
|
+
window.confirm(S2) && b();
|
|
41753
41854
|
return;
|
|
41754
41855
|
}
|
|
41755
|
-
if (
|
|
41756
|
-
|
|
41757
|
-
let
|
|
41758
|
-
|
|
41856
|
+
if (c2._sapGatePending) return;
|
|
41857
|
+
c2._sapGatePending = true;
|
|
41858
|
+
let D2 = () => {
|
|
41859
|
+
c2._sapGatePending = false;
|
|
41759
41860
|
};
|
|
41760
|
-
|
|
41761
|
-
|
|
41762
|
-
}).catch(
|
|
41763
|
-
}
|
|
41764
|
-
function
|
|
41765
|
-
for (let
|
|
41766
|
-
if (!
|
|
41767
|
-
let v2 =
|
|
41861
|
+
T2(S2, () => {
|
|
41862
|
+
D2(), b();
|
|
41863
|
+
}).catch(D2);
|
|
41864
|
+
}
|
|
41865
|
+
function s2(c2, u2) {
|
|
41866
|
+
for (let b of c2.attributes) {
|
|
41867
|
+
if (!b.name.startsWith("set:")) continue;
|
|
41868
|
+
let v2 = b.name.slice(4), S2 = H2(b.value);
|
|
41768
41869
|
if (S2.error) {
|
|
41769
|
-
|
|
41870
|
+
u2.diag.error("E08", c2, { attr: b.name, expr: b.value, problem: String(S2.error.message) });
|
|
41770
41871
|
continue;
|
|
41771
41872
|
}
|
|
41772
|
-
let
|
|
41873
|
+
let _;
|
|
41773
41874
|
try {
|
|
41774
|
-
|
|
41775
|
-
} catch (
|
|
41776
|
-
|
|
41875
|
+
_ = J3(S2, r(c2, u2));
|
|
41876
|
+
} catch (D2) {
|
|
41877
|
+
u2.diag.error("E24", c2, { attr: b.name, expr: b.value, problem: String(D2.message) });
|
|
41777
41878
|
continue;
|
|
41778
41879
|
}
|
|
41779
|
-
let
|
|
41780
|
-
|
|
41880
|
+
let T2 = e.writeTargetFor(c2, v2);
|
|
41881
|
+
T2 && (T2[v2] = _);
|
|
41781
41882
|
}
|
|
41782
41883
|
}
|
|
41783
|
-
function
|
|
41784
|
-
let
|
|
41785
|
-
if (!
|
|
41786
|
-
let
|
|
41787
|
-
return
|
|
41884
|
+
function a(c2) {
|
|
41885
|
+
let u2 = ft2(c2);
|
|
41886
|
+
if (!u2) return c2.closest("[item]");
|
|
41887
|
+
let b = u2._sapEachItem && u2._sapEachItem.$el;
|
|
41888
|
+
return b && b.nodeType === 1 && b.hasAttribute("item") ? b : null;
|
|
41788
41889
|
}
|
|
41789
|
-
function R2(
|
|
41790
|
-
let
|
|
41791
|
-
if (!
|
|
41792
|
-
let v2 =
|
|
41793
|
-
|
|
41890
|
+
function R2(c2, u2) {
|
|
41891
|
+
let b = a(c2);
|
|
41892
|
+
if (!b) return;
|
|
41893
|
+
let v2 = Z3(b.parentElement), S2 = v2.indexOf(b);
|
|
41894
|
+
u2 === "up" && S2 > 0 ? t.placeBefore(b, v2[S2 - 1]) : u2 === "down" && S2 < v2.length - 1 && t.placeBefore(v2[S2 + 1], b);
|
|
41794
41895
|
}
|
|
41795
|
-
function k2(
|
|
41796
|
-
if (
|
|
41797
|
-
let v2 =
|
|
41896
|
+
function k2(c2, u2, b) {
|
|
41897
|
+
if (u2) return Nt3(b.root, c2, u2);
|
|
41898
|
+
let v2 = c2;
|
|
41798
41899
|
for (; v2; ) {
|
|
41799
41900
|
if (v2.hasAttribute && v2.hasAttribute("items")) return v2;
|
|
41800
41901
|
v2 = v2.parentElement;
|
|
41801
41902
|
}
|
|
41802
|
-
let S2 =
|
|
41803
|
-
return
|
|
41804
|
-
|
|
41805
|
-
}),
|
|
41903
|
+
let S2 = Y2(c2) || b.root, _ = [];
|
|
41904
|
+
return K2(S2, (T2) => {
|
|
41905
|
+
T2.hasAttribute("items") && _.push(T2);
|
|
41906
|
+
}), _[0] || null;
|
|
41806
41907
|
}
|
|
41807
|
-
function
|
|
41808
|
-
let
|
|
41809
|
-
if (
|
|
41810
|
-
if (
|
|
41908
|
+
function A2(c2, u2) {
|
|
41909
|
+
let b = c2 == null || c2 === "", v2 = u2 == null || u2 === "";
|
|
41910
|
+
if (b && v2) return 0;
|
|
41911
|
+
if (b) return 1;
|
|
41811
41912
|
if (v2) return -1;
|
|
41812
|
-
let S2 = Number(
|
|
41813
|
-
return !Number.isNaN(S2) && !Number.isNaN(
|
|
41913
|
+
let S2 = Number(c2), _ = Number(u2);
|
|
41914
|
+
return !Number.isNaN(S2) && !Number.isNaN(_) ? S2 - _ : String(c2) < String(u2) ? -1 : String(c2) > String(u2) ? 1 : 0;
|
|
41814
41915
|
}
|
|
41815
|
-
function f2(
|
|
41816
|
-
let S2 = k2(
|
|
41916
|
+
function f2(c2, u2, b, v2) {
|
|
41917
|
+
let S2 = k2(c2, b, v2);
|
|
41817
41918
|
if (!S2) {
|
|
41818
|
-
v2.diag.error("E17",
|
|
41919
|
+
v2.diag.error("E17", c2, { attr: "sort:" + u2, problem: `no items list resolvable for sort:${u2}` });
|
|
41819
41920
|
return;
|
|
41820
41921
|
}
|
|
41821
|
-
let
|
|
41822
|
-
for (let
|
|
41823
|
-
t.schedule(v2, "sort:" +
|
|
41922
|
+
let _ = Z3(S2), T2 = (l) => l._sapScope ? l._sapScope[u2] : void 0, D2 = [..._].sort((l, g) => A2(T2(l), T2(g))), p2 = D2.every((l, g) => l === _[g]) ? [...D2].reverse() : D2;
|
|
41923
|
+
for (let l of p2) t.moveInto(S2, l);
|
|
41924
|
+
t.schedule(v2, "sort:" + u2);
|
|
41824
41925
|
}
|
|
41825
|
-
function w2(
|
|
41826
|
-
if (!
|
|
41827
|
-
let
|
|
41828
|
-
|
|
41926
|
+
function w2(c2) {
|
|
41927
|
+
if (!c2 || c2.hidden) return;
|
|
41928
|
+
let u2 = c2.querySelector("[bind]:not([type=hidden]), [contenteditable]");
|
|
41929
|
+
u2 && typeof u2.focus == "function" && u2.focus();
|
|
41829
41930
|
}
|
|
41830
|
-
function N2(
|
|
41831
|
-
|
|
41832
|
-
let
|
|
41833
|
-
for (let v2 of [...
|
|
41931
|
+
function N2(c2, u2) {
|
|
41932
|
+
i2(c2, u2, () => {
|
|
41933
|
+
let b = n2(c2);
|
|
41934
|
+
for (let v2 of [...c2.attributes]) {
|
|
41834
41935
|
let S2 = v2.name;
|
|
41835
|
-
if (S2 === "trigger-remove")
|
|
41836
|
-
else if (S2 === "trigger-reset")
|
|
41936
|
+
if (S2 === "trigger-remove") b && b.$remove();
|
|
41937
|
+
else if (S2 === "trigger-reset") b && b.$reset();
|
|
41837
41938
|
else if (S2 === "trigger-add") {
|
|
41838
|
-
let
|
|
41839
|
-
|
|
41840
|
-
} else S2 === "move:up" ? (R2(
|
|
41939
|
+
let _ = b && b.$add(v2.value);
|
|
41940
|
+
_ && w2(_.$el);
|
|
41941
|
+
} else S2 === "move:up" ? (R2(c2, "up"), t.schedule(u2, "move:up")) : S2 === "move:down" ? (R2(c2, "down"), t.schedule(u2, "move:down")) : S2.startsWith("move:to") ? b && b.$move(v2.value) : S2.startsWith("sort:") && f2(c2, S2.slice(5), v2.value, u2);
|
|
41841
41942
|
}
|
|
41842
|
-
[...
|
|
41943
|
+
[...c2.attributes].some((v2) => v2.name.startsWith("set:")) && s2(c2, u2);
|
|
41843
41944
|
});
|
|
41844
41945
|
}
|
|
41845
|
-
function
|
|
41846
|
-
let
|
|
41847
|
-
if (!
|
|
41848
|
-
let
|
|
41849
|
-
if (!
|
|
41850
|
-
let v2 =
|
|
41851
|
-
v2 && N2(v2,
|
|
41946
|
+
function I3(c2) {
|
|
41947
|
+
let u2 = c2.target;
|
|
41948
|
+
if (!u2 || u2.nodeType !== 1) return;
|
|
41949
|
+
let b = t.appFor(u2);
|
|
41950
|
+
if (!b) return;
|
|
41951
|
+
let v2 = Yr(u2, b.root);
|
|
41952
|
+
v2 && N2(v2, b);
|
|
41852
41953
|
}
|
|
41853
|
-
function
|
|
41854
|
-
let
|
|
41855
|
-
|
|
41954
|
+
function W3(c2) {
|
|
41955
|
+
let u2 = P2(c2), b = c2.getAttribute("default");
|
|
41956
|
+
u2.kind === "checkbox" ? u2.write(b === "" || b === "true") : u2.write(b ?? "");
|
|
41856
41957
|
}
|
|
41857
|
-
function
|
|
41858
|
-
let v2 = n2(
|
|
41958
|
+
function h(c2, u2, b) {
|
|
41959
|
+
let v2 = n2(c2);
|
|
41859
41960
|
if (!v2) return;
|
|
41860
|
-
let S2 = v2.$add(
|
|
41961
|
+
let S2 = v2.$add(b);
|
|
41861
41962
|
if (!S2) return;
|
|
41862
|
-
let
|
|
41863
|
-
|
|
41864
|
-
|
|
41963
|
+
let _ = [];
|
|
41964
|
+
K2(c2, (T2) => {
|
|
41965
|
+
T2.hasAttribute("bind") && _.push(T2);
|
|
41865
41966
|
});
|
|
41866
|
-
for (let
|
|
41867
|
-
|
|
41868
|
-
|
|
41869
|
-
|
|
41870
|
-
|
|
41871
|
-
|
|
41872
|
-
|
|
41873
|
-
|
|
41874
|
-
|
|
41875
|
-
|
|
41876
|
-
|
|
41877
|
-
|
|
41878
|
-
|
|
41879
|
-
|
|
41880
|
-
|
|
41881
|
-
|
|
41967
|
+
for (let T2 of _) {
|
|
41968
|
+
if (T2.type === "radio" && !T2.checked) continue;
|
|
41969
|
+
let D2 = T2.getAttribute("bind"), o2 = lt3(S2.$el, D2);
|
|
41970
|
+
o2 ? P2(o2).write(P2(T2).read()) : bt3(S2.$el, D2) && (S2[D2] = P2(T2).read());
|
|
41971
|
+
}
|
|
41972
|
+
_.forEach(W3), _.length ? typeof _[0].focus == "function" && _[0].focus() : w2(S2.$el);
|
|
41973
|
+
}
|
|
41974
|
+
function d(c2) {
|
|
41975
|
+
let u2 = c2.target;
|
|
41976
|
+
if (!u2 || !u2.hasAttribute || !u2.hasAttribute("trigger-add")) return;
|
|
41977
|
+
let b = t.appFor(u2);
|
|
41978
|
+
b && (c2.preventDefault(), i2(u2, b, () => h(u2, b, u2.getAttribute("trigger-add"))));
|
|
41979
|
+
}
|
|
41980
|
+
function m2(c2) {
|
|
41981
|
+
let u2 = c2.target, b = t.appFor(u2);
|
|
41982
|
+
b && setTimeout(() => {
|
|
41983
|
+
u2.querySelectorAll("[bind]").forEach((v2) => {
|
|
41882
41984
|
v2.dispatchEvent(new Event("input", { bubbles: true })), v2.dispatchEvent(new Event("change", { bubbles: true }));
|
|
41883
|
-
}), t.schedule(
|
|
41985
|
+
}), t.schedule(b, "reset");
|
|
41884
41986
|
}, 0);
|
|
41885
41987
|
}
|
|
41886
|
-
function
|
|
41887
|
-
let
|
|
41888
|
-
|
|
41889
|
-
}
|
|
41890
|
-
function E2(
|
|
41891
|
-
let
|
|
41892
|
-
if (!
|
|
41893
|
-
|
|
41894
|
-
|
|
41895
|
-
|
|
41896
|
-
|
|
41897
|
-
if (
|
|
41898
|
-
|
|
41899
|
-
|
|
41900
|
-
|
|
41988
|
+
function y2(c2) {
|
|
41989
|
+
let u2 = t.appFor(c2.target);
|
|
41990
|
+
u2 && t.schedule(u2, "toggle");
|
|
41991
|
+
}
|
|
41992
|
+
function E2(c2) {
|
|
41993
|
+
let u2 = c2.target;
|
|
41994
|
+
if (!u2 || u2.tagName !== "DIALOG" || !u2.hasAttribute("detail")) return;
|
|
41995
|
+
if (u2._sapEngineClose) {
|
|
41996
|
+
u2._sapEngineClose = false;
|
|
41997
|
+
return;
|
|
41998
|
+
}
|
|
41999
|
+
if (u2.open) return;
|
|
42000
|
+
let b = /^[\w.]+\s+by\s+state\.(\w+)\s*$/.exec(u2.getAttribute("detail") || ""), v2 = t.appFor(u2);
|
|
42001
|
+
if (!b || !v2) return;
|
|
42002
|
+
let S2 = z2(u2.getAttribute("state") || "").find((T2) => T2.name === b[1]);
|
|
42003
|
+
if (S2) {
|
|
42004
|
+
S2.transient ? Tt3(u2, S2, "") : _t2(u2, S2, ""), t.schedule(v2, "close");
|
|
42005
|
+
return;
|
|
42006
|
+
}
|
|
42007
|
+
let _ = n2(u2.parentElement);
|
|
42008
|
+
_ && _[b[1]] !== "" && (_[b[1]] = "");
|
|
42009
|
+
}
|
|
42010
|
+
function x2(c2) {
|
|
42011
|
+
let u2 = c2.target;
|
|
42012
|
+
if (!u2 || u2.nodeType !== 1) return;
|
|
42013
|
+
let b = t.appFor(u2);
|
|
42014
|
+
if (!b) return;
|
|
42015
|
+
u2.hasAttribute("persist") && !Vt3(u2) && wt3(u2);
|
|
42016
|
+
let v2 = u2.hasAttribute("bind") && Ot3(u2);
|
|
42017
|
+
if (!v2 && u2.hasAttribute("bind") && ft2(u2)) {
|
|
42018
|
+
let _ = u2.getAttribute("bind"), T2 = u2._sapViewBind ? e.writeTargetFor(u2, _) : null;
|
|
42019
|
+
T2 && (T2[_] = P2(u2).read());
|
|
42020
|
+
return;
|
|
42021
|
+
}
|
|
42022
|
+
let S2 = kt3(u2);
|
|
42023
|
+
if (S2 && S2._sapDetailRow && u2.hasAttribute("bind") && !v2) {
|
|
42024
|
+
let _ = S2._sapDetailRow, T2 = u2.getAttribute("bind"), D2 = lt3(_, T2);
|
|
42025
|
+
if (D2 && D2 !== u2) {
|
|
42026
|
+
P2(D2).write(P2(u2).read());
|
|
41901
42027
|
return;
|
|
41902
42028
|
}
|
|
41903
|
-
if (!
|
|
41904
|
-
e.writeField(
|
|
42029
|
+
if (!D2 && z2(_.getAttribute("state") || "").some((o2) => o2.name === T2)) {
|
|
42030
|
+
e.writeField(_, b, T2, P2(u2).read());
|
|
41905
42031
|
return;
|
|
41906
42032
|
}
|
|
41907
42033
|
}
|
|
41908
|
-
t.schedule(
|
|
42034
|
+
t.schedule(b, c2.type + " " + (u2.id || u2.tagName.toLowerCase()));
|
|
41909
42035
|
}
|
|
41910
|
-
function $3(
|
|
41911
|
-
let
|
|
41912
|
-
for (let
|
|
41913
|
-
if (!
|
|
41914
|
-
let v2 = t.appFor(
|
|
42036
|
+
function $3(c2) {
|
|
42037
|
+
let u2 = c2.detail || {};
|
|
42038
|
+
for (let b of [u2.from, u2.to, c2.target]) {
|
|
42039
|
+
if (!b || b.nodeType !== 1) continue;
|
|
42040
|
+
let v2 = t.appFor(b);
|
|
41915
42041
|
v2 && t.schedule(v2, "sorted");
|
|
41916
42042
|
}
|
|
41917
42043
|
}
|
|
41918
|
-
function O2(
|
|
41919
|
-
if (
|
|
41920
|
-
let
|
|
41921
|
-
if (!
|
|
41922
|
-
let
|
|
41923
|
-
if (
|
|
41924
|
-
|
|
41925
|
-
let S2 =
|
|
41926
|
-
|
|
42044
|
+
function O2(c2) {
|
|
42045
|
+
if (c2.key !== "ArrowUp" && c2.key !== "ArrowDown") return;
|
|
42046
|
+
let u2 = c2.target;
|
|
42047
|
+
if (!u2 || u2.nodeType !== 1 || u2.tagName !== "INPUT" || !u2.hasAttribute("bind") || !u2.hasAttribute("step")) return;
|
|
42048
|
+
let b = (u2.getAttribute("type") || "text").toLowerCase();
|
|
42049
|
+
if (b !== "text" && b !== "tel" && b !== "search" || !t.appFor(u2)) return;
|
|
42050
|
+
c2.preventDefault();
|
|
42051
|
+
let S2 = tt3(u2.getAttribute("step")) || 1, _ = c2.key === "ArrowUp" ? 1 : -1, T2 = tt3(u2.value) + S2 * (c2.shiftKey ? 10 : 1) * _, D2 = u2.getAttribute("min"), o2 = u2.getAttribute("max");
|
|
42052
|
+
D2 !== null && D2 !== "" && T2 < tt3(D2) && (T2 = tt3(D2)), o2 !== null && o2 !== "" && T2 > tt3(o2) && (T2 = tt3(o2)), P2(u2).write(String(Number(T2.toFixed(2))));
|
|
41927
42053
|
}
|
|
41928
|
-
function
|
|
41929
|
-
|
|
42054
|
+
function B2(c2 = document) {
|
|
42055
|
+
c2.addEventListener("click", I3), c2.addEventListener("submit", d), c2.addEventListener("reset", m2), c2.addEventListener("toggle", y2, true), c2.addEventListener("close", E2, true), c2.addEventListener("input", x2), c2.addEventListener("change", x2), c2.addEventListener("clay:sorted", $3), c2.addEventListener("keydown", O2);
|
|
41930
42056
|
}
|
|
41931
|
-
return { install:
|
|
42057
|
+
return { install: B2 };
|
|
41932
42058
|
}
|
|
41933
|
-
var
|
|
41934
|
-
function
|
|
42059
|
+
var Ve2 = /^(set:|move:|sort:|trigger-add$|trigger-remove$|trigger-reset$)/;
|
|
42060
|
+
function se3(t) {
|
|
41935
42061
|
return `${t.tagName.toLowerCase()}[sap]`;
|
|
41936
42062
|
}
|
|
41937
|
-
function
|
|
42063
|
+
function Xr(t) {
|
|
41938
42064
|
let e = 0;
|
|
41939
|
-
for (let n2 of t.querySelectorAll("*")) for (let r of n2.attributes) if (
|
|
42065
|
+
for (let n2 of t.querySelectorAll("*")) for (let r of n2.attributes) if (Ve2.test(r.name)) {
|
|
41940
42066
|
e++;
|
|
41941
42067
|
break;
|
|
41942
42068
|
}
|
|
41943
|
-
for (let n2 of t.attributes) if (
|
|
42069
|
+
for (let n2 of t.attributes) if (Ve2.test(n2.name)) {
|
|
41944
42070
|
e++;
|
|
41945
42071
|
break;
|
|
41946
42072
|
}
|
|
41947
42073
|
return e;
|
|
41948
42074
|
}
|
|
41949
|
-
function
|
|
42075
|
+
function ze3(t) {
|
|
41950
42076
|
let e = [], n2 = (r) => {
|
|
41951
|
-
for (let
|
|
41952
|
-
let
|
|
41953
|
-
(
|
|
42077
|
+
for (let i2 of r.attributes) {
|
|
42078
|
+
let s2 = i2.name;
|
|
42079
|
+
(s2.startsWith("calc:") || s2 === "text" || s2.startsWith("text:") || s2 === "show" || s2.startsWith("attr:") || s2.startsWith("class:") || s2.startsWith("css:") || s2 === "effect" || s2 === "invalid" || s2.startsWith("set:") || s2 === "detail") && e.push({ el: r, attr: s2, src: i2.value });
|
|
41954
42080
|
}
|
|
41955
42081
|
};
|
|
41956
42082
|
n2(t);
|
|
41957
42083
|
for (let r of t.querySelectorAll("*")) n2(r);
|
|
41958
42084
|
return e;
|
|
41959
42085
|
}
|
|
41960
|
-
function
|
|
42086
|
+
function He3(t) {
|
|
41961
42087
|
function e(f2) {
|
|
41962
42088
|
let w2 = f2._stats || {}, N2 = f2.root;
|
|
41963
|
-
return { root:
|
|
42089
|
+
return { root: se3(N2), fields: w2.fields || 0, calcs: w2.calcs || 0, paints: w2.paints || 0, actions: Xr(N2), lists: (N2.hasAttribute("items") ? 1 : 0) + N2.querySelectorAll("[items]").length, rows: N2.querySelectorAll("[item]:not([template])").length, warnings: f2.diag.warnings.length, errors: f2.diag.errors.length, mountWrites: f2._mountWrites || 0, ms: Math.round((f2._mountMs || 0) * 10) / 10, passes: f2._passes || 0, lastPass: f2._lastPass || null, ok: f2.diag.errors.length === 0 && !f2.halted };
|
|
41964
42090
|
}
|
|
41965
42091
|
function n2() {
|
|
41966
42092
|
let f2 = t.apps().map(e);
|
|
@@ -41970,36 +42096,36 @@ ${t}` : `"use strict"; return (${t});`;
|
|
|
41970
42096
|
let w2 = e(f2);
|
|
41971
42097
|
return w2.ok ? `sap \u2713 ${w2.root} \xB7 fields ${w2.fields} \xB7 calcs ${w2.calcs} \xB7 paints ${w2.paints} \xB7 actions ${w2.actions} \xB7 lists ${w2.lists} \xB7 rows ${w2.rows} \xB7 warnings ${w2.warnings} \xB7 mount writes ${w2.mountWrites} \xB7 ${w2.ms}ms` : `sap \u2717 ${w2.root} \xB7 errors ${w2.errors} \xB7 warnings ${w2.warnings} \xB7 ${w2.ms}ms`;
|
|
41972
42098
|
}
|
|
41973
|
-
function
|
|
42099
|
+
function i2() {
|
|
41974
42100
|
for (let f2 of t.apps()) {
|
|
41975
42101
|
let w2 = r(f2);
|
|
41976
42102
|
f2.diag.errors.length || f2.halted ? console.error(w2) : console.log(w2);
|
|
41977
42103
|
}
|
|
41978
42104
|
}
|
|
41979
|
-
function
|
|
42105
|
+
function s2() {
|
|
41980
42106
|
let f2 = [], w2 = [];
|
|
41981
42107
|
for (let N2 of t.apps()) f2.push(...N2.diag.errors), w2.push(...N2.diag.warnings);
|
|
41982
42108
|
return { ok: f2.length === 0, errors: f2, warnings: w2, counts: { errors: f2.length, warnings: w2.length } };
|
|
41983
42109
|
}
|
|
41984
|
-
function
|
|
42110
|
+
function a(f2) {
|
|
41985
42111
|
return f2 ? typeof f2 == "string" ? document.querySelector(f2) : f2.nodeType === 1 ? f2 : null : null;
|
|
41986
42112
|
}
|
|
41987
42113
|
function R2(f2, w2) {
|
|
41988
|
-
let N2 =
|
|
42114
|
+
let N2 = a(f2);
|
|
41989
42115
|
if (!N2) return console.warn("sap why: element not found"), null;
|
|
41990
|
-
let
|
|
41991
|
-
for (let
|
|
41992
|
-
let
|
|
41993
|
-
for (;
|
|
41994
|
-
if (
|
|
41995
|
-
let
|
|
41996
|
-
|
|
41997
|
-
for (let
|
|
41998
|
-
let E2 =
|
|
41999
|
-
typeof E2 != "function" &&
|
|
42116
|
+
let I3 = [`sap why <${N2.tagName.toLowerCase()}> \u2014 ${Dt3(N2)}`], W3 = [...N2.attributes].filter((d) => /^(bind|text|show|effect|invalid|detail|calc:|text:|attr:|class:|css:|set:|state|items|scope)/.test(d.name));
|
|
42117
|
+
for (let d of W3) I3.push(` ${d.name}="${d.value}"`);
|
|
42118
|
+
let h = N2;
|
|
42119
|
+
for (; h && !h._sapScope; ) h = h.parentElement;
|
|
42120
|
+
if (h && h._sapScope) {
|
|
42121
|
+
let d = h._sapScope, m2 = w2 ? [w2] : Object.keys(d);
|
|
42122
|
+
I3.push(" reads:");
|
|
42123
|
+
for (let y2 of m2) {
|
|
42124
|
+
let E2 = d[y2];
|
|
42125
|
+
typeof E2 != "function" && I3.push(` ${y2} = ${JSON.stringify(Array.isArray(E2) ? `[${E2.length} rows]` : E2)}`);
|
|
42000
42126
|
}
|
|
42001
42127
|
}
|
|
42002
|
-
return
|
|
42128
|
+
return I3.push(" serialization: textContent and value/checked attributes save with the file; reads live from properties"), console.log(I3.join(`
|
|
42003
42129
|
`)), null;
|
|
42004
42130
|
}
|
|
42005
42131
|
function k2(f2) {
|
|
@@ -42007,56 +42133,57 @@ ${t}` : `"use strict"; return (${t});`;
|
|
|
42007
42133
|
for (let N2 of t.apps()) N2._debug = w2;
|
|
42008
42134
|
return console.log(`sap debug ${w2 ? "on" : "off"} \u2014 per-pass headers will ${w2 ? "" : "no longer "}log`), w2;
|
|
42009
42135
|
}
|
|
42010
|
-
function
|
|
42136
|
+
function A2() {
|
|
42011
42137
|
let f2 = [], w2 = 0;
|
|
42012
|
-
for (let
|
|
42013
|
-
let
|
|
42138
|
+
for (let d of t.apps()) {
|
|
42139
|
+
let m2 = d.root, y2 = se3(m2);
|
|
42014
42140
|
w2++;
|
|
42015
|
-
let E2 = new
|
|
42016
|
-
|
|
42017
|
-
for (let
|
|
42018
|
-
for (let
|
|
42019
|
-
w2++,
|
|
42020
|
-
let
|
|
42021
|
-
|
|
42022
|
-
let
|
|
42023
|
-
for (let
|
|
42024
|
-
for (let
|
|
42141
|
+
let E2 = new pt3(d.name);
|
|
42142
|
+
jt3(m2, E2);
|
|
42143
|
+
for (let c2 of E2.errors) f2.push({ code: c2.code, severity: "error", message: `${y2}: ${c2.code} ${c2.slug} at ${c2.el}` });
|
|
42144
|
+
for (let c2 of E2.warnings) f2.push({ code: c2.code, severity: "warn", message: `${y2}: ${c2.code} ${c2.slug} at ${c2.el}` });
|
|
42145
|
+
w2++, Et3(d, { trigger: "doctor-dryrun" });
|
|
42146
|
+
let x2 = d._stats ? d._stats.writes : 0;
|
|
42147
|
+
x2 > 0 && f2.push({ code: "W30", severity: "warn", message: `${y2}: dry recompute wrote ${x2} cells on a quiet page; an element is stale or non-idempotent` }), w2++;
|
|
42148
|
+
let $3 = ze3(m2).map((c2) => c2.src).join(" \0 "), O2 = [];
|
|
42149
|
+
for (let c2 of [m2, ...m2.querySelectorAll("[state]")]) for (let u2 of z2(c2.getAttribute("state") || "")) O2.push(u2.name);
|
|
42150
|
+
for (let c2 of O2) new RegExp(`(state|item)\\.${c2}\\b`).test($3) || f2.push({ code: "I33", severity: "info", message: `${y2}: field "${c2}" is declared but read nowhere (dead state)` });
|
|
42025
42151
|
w2++;
|
|
42026
|
-
let
|
|
42027
|
-
for (let
|
|
42028
|
-
for (let [
|
|
42152
|
+
let B2 = /* @__PURE__ */ new Map();
|
|
42153
|
+
for (let c2 of m2.querySelectorAll("[id]")) B2.set(c2.id, (B2.get(c2.id) || 0) + 1);
|
|
42154
|
+
for (let [c2, u2] of B2) u2 > 1 && f2.push({ code: "W32", severity: "warn", message: `${y2}: duplicate id "${c2}" (${u2} elements) \u2014 clone/edit collision` });
|
|
42029
42155
|
w2++;
|
|
42030
|
-
for (let
|
|
42156
|
+
for (let c2 of ze3(m2)) c2.src.length > 120 && f2.push({ code: "I33", severity: "info", message: `${y2}: ${c2.attr} expression is ${c2.src.length} chars; consider a calc: field` });
|
|
42031
42157
|
w2++;
|
|
42032
|
-
for (let
|
|
42033
|
-
let
|
|
42034
|
-
/\.\d{5,}/.test(
|
|
42158
|
+
for (let c2 of m2.querySelectorAll("[text], [text\\:num]")) {
|
|
42159
|
+
let u2 = c2.textContent || "";
|
|
42160
|
+
/\.\d{5,}/.test(u2) && f2.push({ code: "I33", severity: "info", message: `${y2}: ${Dt3(c2)} paints >4 decimals; consider text:FMT` });
|
|
42035
42161
|
}
|
|
42036
42162
|
}
|
|
42037
|
-
let N2 = f2.filter((
|
|
42038
|
-
console.log(`sap doctor \xB7 ${t.apps().map((
|
|
42039
|
-
for (let
|
|
42163
|
+
let N2 = f2.filter((d) => d.severity === "error").length, I3 = f2.filter((d) => d.severity === "warn").length, W3 = f2.filter((d) => d.severity === "info").length;
|
|
42164
|
+
console.log(`sap doctor \xB7 ${t.apps().map((d) => se3(d.root)).join(", ")} \xB7 errors ${N2} \xB7 warnings ${I3} \xB7 info ${W3} \xB7 ${w2} checks \xB7 0ms`);
|
|
42165
|
+
for (let d of f2) (d.severity === "error" ? console.error : d.severity === "warn" ? console.warn : console.info)(` ${d.severity === "error" ? "\u2717" : d.severity === "warn" ? "\u26A0" : "\xB7"} ${d.message}`);
|
|
42040
42166
|
return f2;
|
|
42041
42167
|
}
|
|
42042
|
-
return { status: n2, report:
|
|
42168
|
+
return { status: n2, report: s2, why: R2, debug: k2, doctor: A2, greenLine: r, printGreenLines: i2, REGISTRY: Xt3 };
|
|
42043
42169
|
}
|
|
42044
|
-
var
|
|
42045
|
-
|
|
42170
|
+
var je3 = "0.5.0";
|
|
42171
|
+
var et3 = /* @__PURE__ */ new Map(), it3 = [], ae3 = ue3(Et3);
|
|
42172
|
+
function Kr(t) {
|
|
42046
42173
|
let e = t;
|
|
42047
42174
|
for (; e; ) {
|
|
42048
|
-
if (e.nodeType === 1 && e.hasAttribute && e.hasAttribute("sap")) return
|
|
42175
|
+
if (e.nodeType === 1 && e.hasAttribute && e.hasAttribute("sap")) return et3.get(e) || null;
|
|
42049
42176
|
e = e.parentNode && e.parentNode.host ? e.parentNode.host : e.parentElement;
|
|
42050
42177
|
}
|
|
42051
42178
|
return null;
|
|
42052
42179
|
}
|
|
42053
|
-
function
|
|
42054
|
-
for (let t =
|
|
42055
|
-
let e =
|
|
42056
|
-
e.root.isConnected || (
|
|
42180
|
+
function Jr() {
|
|
42181
|
+
for (let t = it3.length - 1; t >= 0; t--) {
|
|
42182
|
+
let e = it3[t];
|
|
42183
|
+
e.root.isConnected || (et3.delete(e.root), it3.splice(t, 1));
|
|
42057
42184
|
}
|
|
42058
42185
|
}
|
|
42059
|
-
function
|
|
42186
|
+
function Qr(t, e) {
|
|
42060
42187
|
if (t.moveBefore) try {
|
|
42061
42188
|
t.moveBefore(e, null);
|
|
42062
42189
|
return;
|
|
@@ -42064,7 +42191,7 @@ ${t}` : `"use strict"; return (${t});`;
|
|
|
42064
42191
|
}
|
|
42065
42192
|
t.appendChild(e);
|
|
42066
42193
|
}
|
|
42067
|
-
function
|
|
42194
|
+
function Zr(t, e) {
|
|
42068
42195
|
let n2 = e.parentElement;
|
|
42069
42196
|
if (n2) {
|
|
42070
42197
|
if (n2.moveBefore) try {
|
|
@@ -42075,67 +42202,67 @@ ${t}` : `"use strict"; return (${t});`;
|
|
|
42075
42202
|
n2.insertBefore(t, e);
|
|
42076
42203
|
}
|
|
42077
42204
|
}
|
|
42078
|
-
var
|
|
42079
|
-
function
|
|
42080
|
-
|
|
42205
|
+
var dt3 = { apps: () => it3.slice(), appFor: Kr, isRegistered: (t) => et3.has(t), pruneDisconnected: Jr, schedule: (t, e) => ae3.schedule(t, e), runNow: (t, e) => ae3.runNow(t, e), moveInto: Qr, placeBefore: Zr, remountIfPresent: () => Ut3() }, Ge3 = Be3(dt3), tn = qe3(dt3, Ge3), st3 = He3(dt3), Ue3 = false;
|
|
42206
|
+
function Ye3() {
|
|
42207
|
+
Ue3 || (Ue3 = true, tn.install(document), $e3(dt3));
|
|
42081
42208
|
}
|
|
42082
|
-
function
|
|
42083
|
-
|
|
42209
|
+
function Ut3(t = document) {
|
|
42210
|
+
Ye3(), ee3(dt3);
|
|
42084
42211
|
let e = t.querySelectorAll("[sap]"), n2 = [];
|
|
42085
42212
|
for (let r of e) {
|
|
42086
|
-
if (
|
|
42087
|
-
let
|
|
42088
|
-
|
|
42213
|
+
if (et3.has(r)) continue;
|
|
42214
|
+
let i2 = ie3(r);
|
|
42215
|
+
et3.set(r, i2), it3.push(i2), n2.push(i2);
|
|
42089
42216
|
}
|
|
42090
42217
|
for (let r of n2) {
|
|
42091
|
-
let
|
|
42092
|
-
r.diag.errors.length || r.halted ? console.error(
|
|
42218
|
+
let i2 = st3.greenLine(r);
|
|
42219
|
+
r.diag.errors.length || r.halted ? console.error(i2) : console.log(i2);
|
|
42093
42220
|
}
|
|
42094
42221
|
return n2;
|
|
42095
42222
|
}
|
|
42096
|
-
function
|
|
42097
|
-
if (
|
|
42223
|
+
function Xe3(t) {
|
|
42224
|
+
if (Ye3(), ee3(dt3), !t) return Ut3();
|
|
42098
42225
|
let e = typeof t == "string" ? document.querySelector(t) : t;
|
|
42099
42226
|
if (!e) return null;
|
|
42100
|
-
if (
|
|
42101
|
-
let n2 =
|
|
42102
|
-
|
|
42103
|
-
let r =
|
|
42227
|
+
if (et3.has(e)) return et3.get(e);
|
|
42228
|
+
let n2 = ie3(e);
|
|
42229
|
+
et3.set(e, n2), it3.push(n2);
|
|
42230
|
+
let r = st3.greenLine(n2);
|
|
42104
42231
|
return n2.diag.errors.length || n2.halted ? console.error(r) : console.log(r), n2;
|
|
42105
42232
|
}
|
|
42106
|
-
var
|
|
42107
|
-
|
|
42108
|
-
|
|
42109
|
-
for (let e of
|
|
42233
|
+
var F2 = Ge3.Sap;
|
|
42234
|
+
F2.version = je3;
|
|
42235
|
+
F2.refresh = function() {
|
|
42236
|
+
for (let e of it3) e.root.isConnected && ae3.runNow(e, "refresh");
|
|
42110
42237
|
};
|
|
42111
|
-
|
|
42112
|
-
|
|
42113
|
-
|
|
42114
|
-
|
|
42115
|
-
|
|
42116
|
-
|
|
42117
|
-
|
|
42118
|
-
|
|
42119
|
-
|
|
42120
|
-
|
|
42121
|
-
|
|
42122
|
-
|
|
42123
|
-
|
|
42124
|
-
return e.formats && Object.assign(
|
|
42238
|
+
F2.batch = ke3;
|
|
42239
|
+
F2.status = st3.status;
|
|
42240
|
+
F2.report = st3.report;
|
|
42241
|
+
F2.why = st3.why;
|
|
42242
|
+
F2.debug = st3.debug;
|
|
42243
|
+
F2.doctor = st3.doctor;
|
|
42244
|
+
F2.greenLine = st3.greenLine;
|
|
42245
|
+
F2.formats = Lt2;
|
|
42246
|
+
F2.serializeControlToAttributes = wt3;
|
|
42247
|
+
F2.finalizeControlForSave = ve3;
|
|
42248
|
+
F2.rehydrateControlFromAttributes = qt3;
|
|
42249
|
+
F2.mount = Xe3;
|
|
42250
|
+
F2.config = function(e = {}) {
|
|
42251
|
+
return e.formats && Object.assign(Lt2, e.formats), F2;
|
|
42125
42252
|
};
|
|
42126
|
-
|
|
42127
|
-
|
|
42128
|
-
|
|
42253
|
+
F2._registry = et3;
|
|
42254
|
+
F2._reset = function() {
|
|
42255
|
+
et3.clear(), it3.length = 0, Le3();
|
|
42129
42256
|
};
|
|
42130
|
-
function
|
|
42257
|
+
function en() {
|
|
42131
42258
|
if (typeof document > "u") return;
|
|
42132
|
-
let t = () =>
|
|
42259
|
+
let t = () => Se3(() => Ut3());
|
|
42133
42260
|
document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", t) : t();
|
|
42134
42261
|
}
|
|
42135
|
-
|
|
42136
|
-
typeof window < "u" && (window.Sap =
|
|
42137
|
-
var
|
|
42138
|
-
return
|
|
42262
|
+
en();
|
|
42263
|
+
typeof window < "u" && (window.Sap = F2);
|
|
42264
|
+
var rn = F2;
|
|
42265
|
+
return er2(nn2);
|
|
42139
42266
|
})();
|
|
42140
42267
|
if (typeof window !== "undefined" && Sap && Sap.default) window.Sap = Sap.default;
|
|
42141
42268
|
var sapDefault = Sap.default;
|