@marimo-team/islands 0.13.16-dev9 → 0.13.16-dev91

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.
Files changed (57) hide show
  1. package/dist/{ConnectedDataExplorerComponent-DKR70thk.js → ConnectedDataExplorerComponent-CQFn-mDE.js} +3 -3
  2. package/dist/ImageComparisonComponent-CYeUw5Ie.js +248 -0
  3. package/dist/{VegaLite-ilgm95Ij.js → VegaLite-p2-nGqeE.js} +11085 -11380
  4. package/dist/{_baseUniq-DQ-zcc0F.js → _baseUniq-B17_0PKa.js} +1 -1
  5. package/dist/{any-language-editor-DUc5yh9D.js → any-language-editor-Dkl-8pQa.js} +11 -11
  6. package/dist/{architectureDiagram-IEHRJDOE-BPxcckHU.js → architectureDiagram-IEHRJDOE-DeHCoU5t.js} +5 -5
  7. package/dist/{blockDiagram-JOT3LUYC-af4bkbIG.js → blockDiagram-JOT3LUYC-46-XvFSn.js} +4 -4
  8. package/dist/{c4Diagram-VJAJSXHY-DPIx8nql.js → c4Diagram-VJAJSXHY-BeCkgQWT.js} +2 -2
  9. package/dist/{channel-DeVfOt92.js → channel-mzQGV3a0.js} +1 -1
  10. package/dist/{chunk-4BMEZGHF-D2rz-XnF.js → chunk-4BMEZGHF-BGepDWvT.js} +1 -1
  11. package/dist/{chunk-A2AXSNBT-W1F_yc14.js → chunk-A2AXSNBT-jbXx6Q87.js} +2 -2
  12. package/dist/{chunk-AEK57VVT-CfkBqjI7.js → chunk-AEK57VVT-Dy-XJAie.js} +2 -2
  13. package/dist/{chunk-D6G4REZN-CWfUI2cV.js → chunk-D6G4REZN-CuIbvgEB.js} +1 -1
  14. package/dist/{chunk-RZ5BOZE2-D2M1q4QP.js → chunk-RZ5BOZE2-C9mPKHe3.js} +1 -1
  15. package/dist/{chunk-XZIHB7SX-BF4Yybb6.js → chunk-XZIHB7SX-DXY5Kf7A.js} +1 -1
  16. package/dist/{classDiagram-GIVACNV2-DKERpa9l.js → classDiagram-GIVACNV2-rkstXDIM.js} +2 -2
  17. package/dist/{classDiagram-v2-COTLJTTW-DKERpa9l.js → classDiagram-v2-COTLJTTW-rkstXDIM.js} +2 -2
  18. package/dist/{clone-DexLMTh7.js → clone-ClSOwerv.js} +1 -1
  19. package/dist/{dagre-OKDRZEBW-DPuNot-v.js → dagre-OKDRZEBW-BqB6zXjt.js} +6 -6
  20. package/dist/{data-editor-DuylCdSJ.js → data-editor-C8A4b1fT.js} +1 -1
  21. package/dist/{diagram-SSKATNLV-DdBPz6rS.js → diagram-SSKATNLV-DOX0VcJw.js} +3 -3
  22. package/dist/{diagram-VNBRO52H-D5IQHzXT.js → diagram-VNBRO52H-5Y5bP9uk.js} +3 -3
  23. package/dist/{erDiagram-Q7BY3M3F-CpDgwnAa.js → erDiagram-Q7BY3M3F-C_ii-wr9.js} +3 -3
  24. package/dist/{flowDiagram-4HSFHLVR-BvUXRA9U.js → flowDiagram-4HSFHLVR-Chit5_c5.js} +3 -3
  25. package/dist/{ganttDiagram-APWFNJXF-CoL3aayP.js → ganttDiagram-APWFNJXF-Bjlk9aYz.js} +4 -4
  26. package/dist/{gitGraphDiagram-7IBYFJ6S-0DCCEiL4.js → gitGraphDiagram-7IBYFJ6S-CHDnh3Vv.js} +4 -4
  27. package/dist/{graph-top1N_TE.js → graph-DkoXCvDM.js} +3 -3
  28. package/dist/{index-9iRMudHk.js → index-Bx-AyNn_.js} +1 -1
  29. package/dist/{index-CFC6qrgb.js → index-ByjOtPLm.js} +3 -3
  30. package/dist/{index-CCnU7egX.js → index-Cop1-_BI.js} +1 -1
  31. package/dist/{index-BgPxRSf-.js → index-D2k9TwPz.js} +15 -15
  32. package/dist/{infoDiagram-PH2N3AL5-DoobPCt1.js → infoDiagram-PH2N3AL5-nqzKskXS.js} +2 -2
  33. package/dist/{journeyDiagram-U35MCT3I-B6pZ2RFu.js → journeyDiagram-U35MCT3I-BcsyQSkx.js} +2 -2
  34. package/dist/{kanban-definition-NDS4AKOZ-Bs7h3Pv2.js → kanban-definition-NDS4AKOZ-DLx_pcKy.js} +1 -1
  35. package/dist/{layout-BpsM_T2i.js → layout-BI2NWLX0.js} +4 -4
  36. package/dist/{linear-MbPfJZCP.js → linear-BGkmk3fm.js} +1 -1
  37. package/dist/{main-DZFzYNDw.js → main-DEZltt-X.js} +56920 -58591
  38. package/dist/main.js +1 -1
  39. package/dist/{mermaid-BELvcAl1.js → mermaid-BQElHpVT.js} +274 -274
  40. package/dist/{min-BX4unMWZ.js → min-DNda7dsz.js} +2 -2
  41. package/dist/{mindmap-definition-ALO5MXBD-CZ4OcOcu.js → mindmap-definition-ALO5MXBD-Dfl3las3.js} +2 -2
  42. package/dist/{pieDiagram-IB7DONF6-OVM1_NlP.js → pieDiagram-IB7DONF6-Ky18-a2U.js} +3 -3
  43. package/dist/{quadrantDiagram-7GDLP6J5-CSqaa4O6.js → quadrantDiagram-7GDLP6J5-CdQ0XyvD.js} +2 -2
  44. package/dist/{radar-MK3ICKWK-BHQUSz6J.js → radar-MK3ICKWK-CIriPB23.js} +5 -5
  45. package/dist/{react-plotly-K5rEr1yu.js → react-plotly-zw2Qwo63.js} +1 -1
  46. package/dist/{requirementDiagram-KVF5MWMF-D_2ex71L.js → requirementDiagram-KVF5MWMF-EyYyrK-N.js} +2 -2
  47. package/dist/{sankeyDiagram-QLVOVGJD-C6n-5Lp9.js → sankeyDiagram-QLVOVGJD-BN9zHXV8.js} +1 -1
  48. package/dist/{sequenceDiagram-X6HHIX6F-bm6E5KnJ.js → sequenceDiagram-X6HHIX6F-C8YpQrM6.js} +3 -3
  49. package/dist/{slides-component-Cw00jSOF.js → slides-component-zaScO1VB.js} +1 -1
  50. package/dist/{stateDiagram-DGXRK772-BP3gxnI2.js → stateDiagram-DGXRK772-D_C7xtlC.js} +4 -4
  51. package/dist/{stateDiagram-v2-YXO3MK2T-ClZXEj9D.js → stateDiagram-v2-YXO3MK2T-DkYCWNqk.js} +2 -2
  52. package/dist/style.css +1 -1
  53. package/dist/{time-DTZ2WEFw.js → time-COT9dW34.js} +2 -2
  54. package/dist/{timeline-definition-BDJGKUSR-C1tVNfr8.js → timeline-definition-BDJGKUSR-DAk4r-9V.js} +1 -1
  55. package/dist/{vega-component-CboTiBDd.js → vega-component-BcvoTBZ8.js} +3 -3
  56. package/dist/{xychartDiagram-VJFVF3MP-CCQRTo8E.js → xychartDiagram-VJFVF3MP-caPsZAcT.js} +2 -2
  57. package/package.json +25 -25
@@ -1,5 +1,5 @@
1
- import { bx as sr, S as cr, by as Ki, j as S, bz as Xi, bA as Ji, bB as Zi, bC as Qi, L as ea, bD as ta, bE as na, bF as ra, d as Ce, bG as on, bH as Ot, bI as ur, bJ as bt, bK as Ke, bL as lr, bM as xt, bN as Ae, bO as ia, bP as dr, bQ as aa, bR as oa, F as Ln, K as sa, M as fr, bS as ca, bT as ua, bU as la, W as da, J as fa, U as ga, E as ha, a4 as ma, bV as pa, $ as ya, bW as Ea, R as Sa } from "./main-DZFzYNDw.js";
2
- import { i as Na, c as _a, N as Ca, a as Bn } from "./VegaLite-ilgm95Ij.js";
1
+ import { bx as sr, S as cr, by as Ki, j as S, bz as Xi, bA as Ji, bB as Zi, bC as Qi, L as ea, bD as ta, bE as na, bF as ra, c as Ce, bG as on, bH as Ot, bI as ur, bJ as bt, bK as Ke, bL as lr, bM as xt, bN as Ae, bO as ia, bP as dr, bQ as aa, bR as oa, F as Ln, K as sa, M as fr, bS as ca, bT as ua, bU as la, W as da, J as fa, U as ga, E as ha, a4 as ma, bV as pa, $ as ya, bW as Ea, R as Sa } from "./main-DEZltt-X.js";
2
+ import { i as Na, c as _a, N as Ca, a as Bn } from "./VegaLite-p2-nGqeE.js";
3
3
  /**
4
4
  * @license lucide-react v0.503.0 - ISC
5
5
  *
@@ -6190,7 +6190,7 @@ const Md = (e) => {
6190
6190
  t[3] !== n ? (o = [n], t[3] = n, t[4] = o) : o = t[4];
6191
6191
  const {
6192
6192
  data: c,
6193
- loading: f,
6193
+ isPending: f,
6194
6194
  error: i
6195
6195
  } = da(r, o), {
6196
6196
  mark: s
@@ -0,0 +1,248 @@
1
+ import { O as S, c as D, j as g } from "./main-DEZltt-X.js";
2
+ var v = {}, y = {}, x;
3
+ function T() {
4
+ return x || (x = 1, (() => {
5
+ var w = { 792: (r, t, i) => {
6
+ i.d(t, { Z: () => u });
7
+ var a = i(609), l = i.n(a)()(function(f) {
8
+ return f[1];
9
+ });
10
+ l.push([r.id, ':host{--divider-width: 1px;--divider-color: #fff;--divider-shadow: none;--default-handle-width: 50px;--default-handle-color: #fff;--default-handle-opacity: 1;--default-handle-shadow: none;--handle-position-start: 50%;position:relative;display:inline-block;overflow:hidden;line-height:0;direction:ltr}@media screen and (-webkit-min-device-pixel-ratio: 0)and (min-resolution: 0.001dpcm){:host{outline-offset:1px}}:host(:focus){outline:2px solid -webkit-focus-ring-color}::slotted(*){-webkit-user-drag:none;-khtml-user-drag:none;-moz-user-drag:none;-o-user-drag:none;user-drag:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.first{position:absolute;left:0;top:0;right:0;line-height:normal;font-size:100%;max-height:100%;height:100%;width:100%;--exposure: 50%;--keyboard-transition-time: 0ms;--default-transition-time: 0ms;--transition-time: var(--default-transition-time)}.first .first-overlay-container{position:relative;clip-path:inset(0 var(--exposure) 0 0);transition:clip-path var(--transition-time);height:100%}.first .first-overlay{overflow:hidden;height:100%}.first.focused{will-change:clip-path}.first.focused .first-overlay-container{will-change:clip-path}.second{position:relative}.handle-container{transform:translateX(50%);position:absolute;top:0;right:var(--exposure);height:100%;transition:right var(--transition-time),bottom var(--transition-time)}.focused .handle-container{will-change:right}.divider{position:absolute;height:100%;width:100%;left:0;top:0;display:flex;align-items:center;justify-content:center;flex-direction:column}.divider:after{content:" ";display:block;height:100%;border-left-width:var(--divider-width);border-left-style:solid;border-left-color:var(--divider-color);box-shadow:var(--divider-shadow)}.handle{position:absolute;top:var(--handle-position-start);pointer-events:none;box-sizing:border-box;margin-left:1px;transform:translate(calc(-50% - 0.5px), -50%);line-height:0}.default-handle{width:var(--default-handle-width);opacity:var(--default-handle-opacity);transition:all 1s;filter:drop-shadow(var(--default-handle-shadow))}.default-handle path{stroke:var(--default-handle-color)}.vertical .first-overlay-container{clip-path:inset(0 0 var(--exposure) 0)}.vertical .handle-container{transform:translateY(50%);height:auto;top:unset;bottom:var(--exposure);width:100%;left:0;flex-direction:row}.vertical .divider:after{height:1px;width:100%;border-top-width:var(--divider-width);border-top-style:solid;border-top-color:var(--divider-color);border-left:0}.vertical .handle{top:auto;left:var(--handle-position-start);transform:translate(calc(-50% - 0.5px), -50%) rotate(90deg)}', ""]);
11
+ const u = l;
12
+ }, 609: (r) => {
13
+ r.exports = function(t) {
14
+ var i = [];
15
+ return i.toString = function() {
16
+ return this.map(function(a) {
17
+ var l = t(a);
18
+ return a[2] ? "@media ".concat(a[2], " {").concat(l, "}") : l;
19
+ }).join("");
20
+ }, i.i = function(a, l, u) {
21
+ typeof a == "string" && (a = [[null, a, ""]]);
22
+ var f = {};
23
+ if (u) for (var h = 0; h < this.length; h++) {
24
+ var p = this[h][0];
25
+ p != null && (f[p] = true);
26
+ }
27
+ for (var e = 0; e < a.length; e++) {
28
+ var s = [].concat(a[e]);
29
+ u && f[s[0]] || (l && (s[2] ? s[2] = "".concat(l, " and ").concat(s[2]) : s[2] = l), i.push(s));
30
+ }
31
+ }, i;
32
+ };
33
+ } }, n = {};
34
+ function c(r) {
35
+ var t = n[r];
36
+ if (t !== void 0) return t.exports;
37
+ var i = n[r] = { id: r, exports: {} };
38
+ return w[r](i, i.exports, c), i.exports;
39
+ }
40
+ c.n = (r) => {
41
+ var t = r && r.__esModule ? () => r.default : () => r;
42
+ return c.d(t, { a: t }), t;
43
+ }, c.d = (r, t) => {
44
+ for (var i in t) c.o(t, i) && !c.o(r, i) && Object.defineProperty(r, i, { enumerable: true, get: t[i] });
45
+ }, c.o = (r, t) => Object.prototype.hasOwnProperty.call(r, t), (() => {
46
+ var r = c(792);
47
+ const t = "rendered", i = (e, s) => {
48
+ const o = e.getBoundingClientRect();
49
+ let d, m;
50
+ return s.type === "mousedown" ? (d = s.clientX, m = s.clientY) : (d = s.touches[0].clientX, m = s.touches[0].clientY), d >= o.x && d <= o.x + o.width && m >= o.y && m <= o.y + o.height;
51
+ };
52
+ let a;
53
+ const l = { ArrowLeft: -1, ArrowRight: 1 }, u = ["horizontal", "vertical"], f = (e) => ({ x: e.touches[0].pageX, y: e.touches[0].pageY }), h = (e) => ({ x: e.pageX, y: e.pageY }), p = typeof window < "u" && (window == null ? void 0 : window.HTMLElement);
54
+ typeof window < "u" && (window.document && (a = document.createElement("template"), a.innerHTML = '<div class="second" id="second"> <slot name="second"><slot name="before"></slot></slot> </div> <div class="first" id="first"> <div class="first-overlay"> <div class="first-overlay-container" id="firstImageContainer"> <slot name="first"><slot name="after"></slot></slot> </div> </div> <div class="handle-container"> <div class="divider"></div> <div class="handle" id="handle"> <slot name="handle"> <svg xmlns="http://www.w3.org/2000/svg" class="default-handle" viewBox="-8 -3 16 6"> <path d="M -5 -2 L -7 0 L -5 2 M 5 -2 L 7 0 L 5 2" fill="none" vector-effect="non-scaling-stroke"/> </svg> </slot> </div> </div> </div> '), window.customElements.define("img-comparison-slider", class extends p {
55
+ constructor() {
56
+ super(), this.exposure = this.hasAttribute("value") ? parseFloat(this.getAttribute("value")) : 50, this.slideOnHover = false, this.slideDirection = "horizontal", this.keyboard = "enabled", this.isMouseDown = false, this.animationDirection = 0, this.isFocused = false, this.dragByHandle = false, this.onMouseMove = (o) => {
57
+ if (this.isMouseDown || this.slideOnHover) {
58
+ const d = h(o);
59
+ this.slideToPage(d);
60
+ }
61
+ }, this.bodyUserSelectStyle = "", this.bodyWebkitUserSelectStyle = "", this.onMouseDown = (o) => {
62
+ if (this.slideOnHover || this.handle && !i(this.handleElement, o)) return;
63
+ o.preventDefault(), window.addEventListener("mousemove", this.onMouseMove), window.addEventListener("mouseup", this.onWindowMouseUp), this.isMouseDown = true, this.enableTransition();
64
+ const d = h(o);
65
+ this.slideToPage(d), this.focus(), this.bodyUserSelectStyle = window.document.body.style.userSelect, this.bodyWebkitUserSelectStyle = window.document.body.style.webkitUserSelect, window.document.body.style.userSelect = "none", window.document.body.style.webkitUserSelect = "none";
66
+ }, this.onWindowMouseUp = () => {
67
+ this.isMouseDown = false, window.document.body.style.userSelect = this.bodyUserSelectStyle, window.document.body.style.webkitUserSelect = this.bodyWebkitUserSelectStyle, window.removeEventListener("mousemove", this.onMouseMove), window.removeEventListener("mouseup", this.onWindowMouseUp);
68
+ }, this.touchStartPoint = null, this.isTouchComparing = false, this.hasTouchMoved = false, this.onTouchStart = (o) => {
69
+ this.dragByHandle && !i(this.handleElement, o) || (this.touchStartPoint = f(o), this.isFocused && (this.enableTransition(), this.slideToPage(this.touchStartPoint)));
70
+ }, this.onTouchMove = (o) => {
71
+ if (this.touchStartPoint === null) return;
72
+ const d = f(o);
73
+ if (this.isTouchComparing) return this.slideToPage(d), o.preventDefault(), false;
74
+ if (!this.hasTouchMoved) {
75
+ const m = Math.abs(d.y - this.touchStartPoint.y), b = Math.abs(d.x - this.touchStartPoint.x);
76
+ if (this.slideDirection === "horizontal" && m < b || this.slideDirection === "vertical" && m > b) return this.isTouchComparing = true, this.focus(), this.slideToPage(d), o.preventDefault(), false;
77
+ this.hasTouchMoved = true;
78
+ }
79
+ }, this.onTouchEnd = () => {
80
+ this.isTouchComparing = false, this.hasTouchMoved = false, this.touchStartPoint = null;
81
+ }, this.onBlur = () => {
82
+ this.stopSlideAnimation(), this.isFocused = false, this.firstElement.classList.remove("focused");
83
+ }, this.onFocus = () => {
84
+ this.isFocused = true, this.firstElement.classList.add("focused");
85
+ }, this.onKeyDown = (o) => {
86
+ if (this.keyboard === "disabled") return;
87
+ const d = l[o.key];
88
+ this.animationDirection !== d && d !== void 0 && (this.animationDirection = d, this.startSlideAnimation());
89
+ }, this.onKeyUp = (o) => {
90
+ if (this.keyboard === "disabled") return;
91
+ const d = l[o.key];
92
+ d !== void 0 && this.animationDirection === d && this.stopSlideAnimation();
93
+ }, this.resetDimensions = () => {
94
+ this.imageWidth = this.offsetWidth, this.imageHeight = this.offsetHeight;
95
+ };
96
+ const e = this.attachShadow({ mode: "open" }), s = document.createElement("style");
97
+ s.innerHTML = r.Z, this.getAttribute("nonce") && s.setAttribute("nonce", this.getAttribute("nonce")), e.appendChild(s), e.appendChild(a.content.cloneNode(true)), this.firstElement = e.getElementById("first"), this.handleElement = e.getElementById("handle");
98
+ }
99
+ set handle(e) {
100
+ this.dragByHandle = e.toString().toLowerCase() !== "false";
101
+ }
102
+ get handle() {
103
+ return this.dragByHandle;
104
+ }
105
+ get value() {
106
+ return this.exposure;
107
+ }
108
+ set value(e) {
109
+ const s = parseFloat(e);
110
+ s !== this.exposure && (this.exposure = s, this.enableTransition(), this.setExposure());
111
+ }
112
+ get hover() {
113
+ return this.slideOnHover;
114
+ }
115
+ set hover(e) {
116
+ this.slideOnHover = e.toString().toLowerCase() !== "false", this.removeEventListener("mousemove", this.onMouseMove), this.slideOnHover && this.addEventListener("mousemove", this.onMouseMove);
117
+ }
118
+ get direction() {
119
+ return this.slideDirection;
120
+ }
121
+ set direction(e) {
122
+ this.slideDirection = e.toString().toLowerCase(), this.slide(0), this.firstElement.classList.remove(...u), u.includes(this.slideDirection) && this.firstElement.classList.add(this.slideDirection);
123
+ }
124
+ static get observedAttributes() {
125
+ return ["hover", "direction"];
126
+ }
127
+ connectedCallback() {
128
+ this.hasAttribute("tabindex") || (this.tabIndex = 0), this.addEventListener("dragstart", (e) => (e.preventDefault(), false)), new ResizeObserver(this.resetDimensions).observe(this), this.setExposure(0), this.keyboard = this.hasAttribute("keyboard") && this.getAttribute("keyboard") === "disabled" ? "disabled" : "enabled", this.addEventListener("keydown", this.onKeyDown), this.addEventListener("keyup", this.onKeyUp), this.addEventListener("focus", this.onFocus), this.addEventListener("blur", this.onBlur), this.addEventListener("touchstart", this.onTouchStart, { passive: true }), this.addEventListener("touchmove", this.onTouchMove, { passive: false }), this.addEventListener("touchend", this.onTouchEnd), this.addEventListener("mousedown", this.onMouseDown), this.handle = this.hasAttribute("handle") ? this.getAttribute("handle") : this.dragByHandle, this.hover = this.hasAttribute("hover") ? this.getAttribute("hover") : this.slideOnHover, this.direction = this.hasAttribute("direction") ? this.getAttribute("direction") : this.slideDirection, this.resetDimensions(), this.classList.contains(t) || this.classList.add(t);
129
+ }
130
+ disconnectedCallback() {
131
+ this.transitionTimer && window.clearTimeout(this.transitionTimer);
132
+ }
133
+ attributeChangedCallback(e, s, o) {
134
+ e === "hover" && (this.hover = o), e === "direction" && (this.direction = o), e === "keyboard" && (this.keyboard = o === "disabled" ? "disabled" : "enabled");
135
+ }
136
+ setExposure(e = 0) {
137
+ var s;
138
+ this.exposure = (s = this.exposure + e) < 0 ? 0 : s > 100 ? 100 : s, this.firstElement.style.setProperty("--exposure", 100 - this.exposure + "%");
139
+ }
140
+ slide(e = 0) {
141
+ this.setExposure(e);
142
+ const s = new Event("slide");
143
+ this.dispatchEvent(s);
144
+ }
145
+ slideToPage(e) {
146
+ this.slideDirection === "horizontal" && this.slideToPageX(e.x), this.slideDirection === "vertical" && this.slideToPageY(e.y);
147
+ }
148
+ slideToPageX(e) {
149
+ const s = e - this.getBoundingClientRect().left - window.scrollX;
150
+ this.exposure = s / this.imageWidth * 100, this.slide(0);
151
+ }
152
+ slideToPageY(e) {
153
+ const s = e - this.getBoundingClientRect().top - window.scrollY;
154
+ this.exposure = s / this.imageHeight * 100, this.slide(0);
155
+ }
156
+ enableTransition() {
157
+ this.firstElement.style.setProperty("--transition-time", "100ms"), this.transitionTimer = window.setTimeout(() => {
158
+ this.firstElement.style.setProperty("--transition-time", "var(--default-transition-time)"), this.transitionTimer = null;
159
+ }, 100);
160
+ }
161
+ startSlideAnimation() {
162
+ let e = null, s = this.animationDirection;
163
+ this.firstElement.style.setProperty("--transition-time", "var(--keyboard-transition-time)");
164
+ const o = (d) => {
165
+ if (this.animationDirection === 0 || s !== this.animationDirection) return;
166
+ e === null && (e = d);
167
+ const m = (d - e) / 16.666666666666668 * this.animationDirection;
168
+ this.slide(m), setTimeout(() => window.requestAnimationFrame(o), 0), e = d;
169
+ };
170
+ window.requestAnimationFrame(o);
171
+ }
172
+ stopSlideAnimation() {
173
+ this.animationDirection = 0, this.firstElement.style.setProperty("--transition-time", "var(--default-transition-time)");
174
+ }
175
+ }));
176
+ })();
177
+ })()), y;
178
+ }
179
+ var E;
180
+ function M() {
181
+ if (E) return v;
182
+ E = 1;
183
+ var w = v && v.__createBinding || (Object.create ? function(t, i, a, l) {
184
+ l === void 0 && (l = a), Object.defineProperty(t, l, { enumerable: true, get: function() {
185
+ return i[a];
186
+ } });
187
+ } : function(t, i, a, l) {
188
+ l === void 0 && (l = a), t[l] = i[a];
189
+ }), n = v && v.__setModuleDefault || (Object.create ? function(t, i) {
190
+ Object.defineProperty(t, "default", { enumerable: true, value: i });
191
+ } : function(t, i) {
192
+ t.default = i;
193
+ }), c = v && v.__importStar || function(t) {
194
+ if (t && t.__esModule) return t;
195
+ var i = {};
196
+ if (t != null) for (var a in t) a !== "default" && Object.prototype.hasOwnProperty.call(t, a) && w(i, t, a);
197
+ return n(i, t), i;
198
+ };
199
+ Object.defineProperty(v, "__esModule", { value: true }), v.ImgComparisonSlider = void 0;
200
+ const r = S();
201
+ return typeof document < "u" && Promise.resolve().then(() => c(T())), v.ImgComparisonSlider = (0, r.forwardRef)(({ children: t, onSlide: i, value: a, className: l, ...u }, f) => {
202
+ const h = (0, r.useRef)();
203
+ return (0, r.useEffect)(() => {
204
+ a !== void 0 && (h.current.value = parseFloat(a.toString()));
205
+ }, [a, h]), (0, r.useEffect)(() => {
206
+ i && h.current.addEventListener("slide", i);
207
+ }, []), (0, r.useImperativeHandle)(f, () => h.current, [h]), (0, r.createElement)("img-comparison-slider", Object.assign({
208
+ class: l ? `${l} rendered` : "rendered",
209
+ // Align tabIndex between the web and React components
210
+ // this code could be removed when
211
+ // https://github.com/WICG/webcomponents/issues/762 is resolved.
212
+ tabIndex: 0,
213
+ ref: h
214
+ }, u), t);
215
+ }), v;
216
+ }
217
+ var L = M();
218
+ const k = (w) => {
219
+ const n = D.c(15), {
220
+ beforeSrc: c,
221
+ afterSrc: r,
222
+ value: t,
223
+ direction: i,
224
+ width: a,
225
+ height: l
226
+ } = w, u = a || "100%", f = l || (i === "vertical" ? "400px" : "auto");
227
+ let h;
228
+ n[0] !== u || n[1] !== f ? (h = {
229
+ width: u,
230
+ height: f,
231
+ maxWidth: "100%"
232
+ }, n[0] = u, n[1] = f, n[2] = h) : h = n[2];
233
+ const p = h;
234
+ let e;
235
+ n[3] !== c ? (e = /* @__PURE__ */ g.jsx("img", { slot: "first", src: c, alt: "Before", width: "100%" }), n[3] = c, n[4] = e) : e = n[4];
236
+ let s;
237
+ n[5] !== r ? (s = /* @__PURE__ */ g.jsx("img", { slot: "second", src: r, alt: "After", width: "100%" }), n[5] = r, n[6] = s) : s = n[6];
238
+ let o;
239
+ n[7] !== i || n[8] !== e || n[9] !== s || n[10] !== t ? (o = /* @__PURE__ */ g.jsxs(L.ImgComparisonSlider, { value: t, direction: i, children: [
240
+ e,
241
+ s
242
+ ] }), n[7] = i, n[8] = e, n[9] = s, n[10] = t, n[11] = o) : o = n[11];
243
+ let d;
244
+ return n[12] !== p || n[13] !== o ? (d = /* @__PURE__ */ g.jsx("div", { style: p, children: o }), n[12] = p, n[13] = o, n[14] = d) : d = n[14], d;
245
+ };
246
+ export {
247
+ k as default
248
+ };