@wix/zero-config-implementation 1.63.0 → 1.65.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,96 @@
1
+ import { g as x } from "./index-BLr9vmnH.js";
2
+ function h(r, a) {
3
+ for (var i = 0; i < a.length; i++) {
4
+ const o = a[i];
5
+ if (typeof o != "string" && !Array.isArray(o)) {
6
+ for (const c in o)
7
+ if (c !== "default" && !(c in r)) {
8
+ const n = Object.getOwnPropertyDescriptor(o, c);
9
+ n && Object.defineProperty(r, c, n.get ? n : {
10
+ enumerable: !0,
11
+ get: () => o[c]
12
+ });
13
+ }
14
+ }
15
+ }
16
+ return Object.freeze(Object.defineProperty(r, Symbol.toStringTag, { value: "Module" }));
17
+ }
18
+ var g, v;
19
+ function E() {
20
+ return v || (v = 1, g = function() {
21
+ var r = document.getSelection();
22
+ if (!r.rangeCount)
23
+ return function() {
24
+ };
25
+ for (var a = document.activeElement, i = [], o = 0; o < r.rangeCount; o++)
26
+ i.push(r.getRangeAt(o));
27
+ switch (a.tagName.toUpperCase()) {
28
+ // .toUpperCase handles XHTML
29
+ case "INPUT":
30
+ case "TEXTAREA":
31
+ a.blur();
32
+ break;
33
+ default:
34
+ a = null;
35
+ break;
36
+ }
37
+ return r.removeAllRanges(), function() {
38
+ r.type === "Caret" && r.removeAllRanges(), r.rangeCount || i.forEach(function(c) {
39
+ r.addRange(c);
40
+ }), a && a.focus();
41
+ };
42
+ }), g;
43
+ }
44
+ var y, C;
45
+ function T() {
46
+ if (C) return y;
47
+ C = 1;
48
+ var r = E(), a = {
49
+ "text/plain": "Text",
50
+ "text/html": "Url",
51
+ default: "Text"
52
+ }, i = "Copy to clipboard: #{key}, Enter";
53
+ function o(n) {
54
+ var t = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C";
55
+ return n.replace(/#{\s*key\s*}/g, t);
56
+ }
57
+ function c(n, t) {
58
+ var s, m, b, d, u, e, f = !1;
59
+ t || (t = {}), s = t.debug || !1;
60
+ try {
61
+ b = r(), d = document.createRange(), u = document.getSelection(), e = document.createElement("span"), e.textContent = n, e.ariaHidden = "true", e.style.all = "unset", e.style.position = "fixed", e.style.top = 0, e.style.clip = "rect(0, 0, 0, 0)", e.style.whiteSpace = "pre", e.style.webkitUserSelect = "text", e.style.MozUserSelect = "text", e.style.msUserSelect = "text", e.style.userSelect = "text", e.addEventListener("copy", function(l) {
62
+ if (l.stopPropagation(), t.format)
63
+ if (l.preventDefault(), typeof l.clipboardData > "u") {
64
+ s && console.warn("unable to use e.clipboardData"), s && console.warn("trying IE specific stuff"), window.clipboardData.clearData();
65
+ var p = a[t.format] || a.default;
66
+ window.clipboardData.setData(p, n);
67
+ } else
68
+ l.clipboardData.clearData(), l.clipboardData.setData(t.format, n);
69
+ t.onCopy && (l.preventDefault(), t.onCopy(l.clipboardData));
70
+ }), document.body.appendChild(e), d.selectNodeContents(e), u.addRange(d);
71
+ var D = document.execCommand("copy");
72
+ if (!D)
73
+ throw new Error("copy command was unsuccessful");
74
+ f = !0;
75
+ } catch (l) {
76
+ s && console.error("unable to copy using execCommand: ", l), s && console.warn("trying IE specific stuff");
77
+ try {
78
+ window.clipboardData.setData(t.format || "text", n), t.onCopy && t.onCopy(window.clipboardData), f = !0;
79
+ } catch (p) {
80
+ s && console.error("unable to copy using clipboardData: ", p), s && console.error("falling back to prompt"), m = o("message" in t ? t.message : i), window.prompt(m, n);
81
+ }
82
+ } finally {
83
+ u && (typeof u.removeRange == "function" ? u.removeRange(d) : u.removeAllRanges()), e && document.body.removeChild(e), b();
84
+ }
85
+ return f;
86
+ }
87
+ return y = c, y;
88
+ }
89
+ var w = T();
90
+ const R = /* @__PURE__ */ x(w), A = /* @__PURE__ */ h({
91
+ __proto__: null,
92
+ default: R
93
+ }, [w]);
94
+ export {
95
+ A as i
96
+ };