@wilow_app/design-system 0.1.0 → 0.1.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/index.es.js +94 -93
- package/dist/index.umd.js +4 -4
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as C, jsxs as V } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
2
|
+
import * as w from "react";
|
|
3
3
|
import L, { useRef as B, useEffect as te, useContext as gr, useState as Te, useLayoutEffect as Vo } from "react";
|
|
4
4
|
import Lo, { flushSync as mr } from "react-dom";
|
|
5
5
|
function W(e) {
|
|
@@ -321,7 +321,7 @@ function qo() {
|
|
|
321
321
|
}()), gt;
|
|
322
322
|
}
|
|
323
323
|
process.env.NODE_ENV === "production" ? zo() : qo();
|
|
324
|
-
var vr = /* @__PURE__ */
|
|
324
|
+
var vr = /* @__PURE__ */ w.version.startsWith("19"), jo = /* @__PURE__ */ Symbol.for(
|
|
325
325
|
vr ? "react.transitional.element" : "react.element"
|
|
326
326
|
), Yo = /* @__PURE__ */ Symbol.for("react.portal"), yr = /* @__PURE__ */ Symbol.for("react.fragment"), Er = /* @__PURE__ */ Symbol.for("react.strict_mode"), Dr = /* @__PURE__ */ Symbol.for("react.profiler"), Ut = /* @__PURE__ */ Symbol.for("react.consumer"), Ht = /* @__PURE__ */ Symbol.for("react.context"), zt = /* @__PURE__ */ Symbol.for("react.forward_ref"), Nr = /* @__PURE__ */ Symbol.for("react.suspense"), xr = /* @__PURE__ */ Symbol.for(
|
|
327
327
|
"react.suspense_list"
|
|
@@ -595,7 +595,7 @@ function Sr(e, t) {
|
|
|
595
595
|
};
|
|
596
596
|
return m;
|
|
597
597
|
}
|
|
598
|
-
var gi = () => typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", mi = /* @__PURE__ */ gi(), hi = () => typeof navigator < "u" && navigator.product === "ReactNative", bi = /* @__PURE__ */ hi(), vi = () => mi || bi ?
|
|
598
|
+
var gi = () => typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", mi = /* @__PURE__ */ gi(), hi = () => typeof navigator < "u" && navigator.product === "ReactNative", bi = /* @__PURE__ */ hi(), vi = () => mi || bi ? w.useLayoutEffect : w.useEffect, je = /* @__PURE__ */ vi();
|
|
599
599
|
function Rn(e, t) {
|
|
600
600
|
return e === t ? e !== 0 || t !== 0 || 1 / e === 1 / t : e !== e && t !== t;
|
|
601
601
|
}
|
|
@@ -678,12 +678,12 @@ var bt = /* @__PURE__ */ Symbol.for("react-redux-context"), vt = typeof globalTh
|
|
|
678
678
|
{}
|
|
679
679
|
);
|
|
680
680
|
function Si() {
|
|
681
|
-
if (!
|
|
681
|
+
if (!w.createContext) return {};
|
|
682
682
|
const e = vt[bt] ?? (vt[bt] = /* @__PURE__ */ new Map());
|
|
683
|
-
let t = e.get(
|
|
684
|
-
return t || (t =
|
|
683
|
+
let t = e.get(w.createContext);
|
|
684
|
+
return t || (t = w.createContext(
|
|
685
685
|
null
|
|
686
|
-
), process.env.NODE_ENV !== "production" && (t.displayName = "ReactRedux"), e.set(
|
|
686
|
+
), process.env.NODE_ENV !== "production" && (t.displayName = "ReactRedux"), e.set(w.createContext, t)), t;
|
|
687
687
|
}
|
|
688
688
|
var _r = /* @__PURE__ */ Si(), wi = [null, null], _i = (e) => {
|
|
689
689
|
try {
|
|
@@ -765,15 +765,15 @@ function Bi(e, t, n, {
|
|
|
765
765
|
areMergedPropsEqual: c
|
|
766
766
|
};
|
|
767
767
|
function N(_) {
|
|
768
|
-
const [P, U, T] =
|
|
768
|
+
const [P, U, T] = w.useMemo(() => {
|
|
769
769
|
const { reactReduxForwardedRef: z, ...ue } = _;
|
|
770
770
|
return [_.context, z, ue];
|
|
771
|
-
}, [_]), H =
|
|
771
|
+
}, [_]), H = w.useMemo(() => {
|
|
772
772
|
let z = p;
|
|
773
773
|
if (P != null && P.Consumer && process.env.NODE_ENV !== "production") {
|
|
774
774
|
if (!/* @__PURE__ */ ei(
|
|
775
775
|
// @ts-ignore
|
|
776
|
-
/* @__PURE__ */
|
|
776
|
+
/* @__PURE__ */ w.createElement(P.Consumer, null)
|
|
777
777
|
))
|
|
778
778
|
throw new Error(
|
|
779
779
|
"You must pass a valid React context consumer as `props.context`"
|
|
@@ -781,28 +781,28 @@ function Bi(e, t, n, {
|
|
|
781
781
|
z = P;
|
|
782
782
|
}
|
|
783
783
|
return z;
|
|
784
|
-
}, [P, p]), M =
|
|
784
|
+
}, [P, p]), M = w.useContext(H), Q = !!_.store && !!_.store.getState && !!_.store.dispatch, de = !!M && !!M.store;
|
|
785
785
|
if (process.env.NODE_ENV !== "production" && !Q && !de)
|
|
786
786
|
throw new Error(
|
|
787
787
|
`Could not find "store" in the context of "${v}". Either wrap the root component in a <Provider>, or pass a custom React context provider to <Provider> and the corresponding React context consumer to ${v} in connect options.`
|
|
788
788
|
);
|
|
789
|
-
const ee = Q ? _.store : M.store, ke = de ? M.getServerState : ee.getState, ct =
|
|
789
|
+
const ee = Q ? _.store : M.store, ke = de ? M.getServerState : ee.getState, ct = w.useMemo(() => oi(ee.dispatch, I), [ee]), [be, yn] = w.useMemo(() => {
|
|
790
790
|
if (!m) return wi;
|
|
791
791
|
const z = Sr(
|
|
792
792
|
ee,
|
|
793
793
|
Q ? void 0 : M.subscription
|
|
794
794
|
), ue = z.notifyNestedSubs.bind(z);
|
|
795
795
|
return [z, ue];
|
|
796
|
-
}, [ee, Q, M]), En =
|
|
796
|
+
}, [ee, Q, M]), En = w.useMemo(() => Q ? M : {
|
|
797
797
|
...M,
|
|
798
798
|
subscription: be
|
|
799
|
-
}, [Q, M, be]), at =
|
|
799
|
+
}, [Q, M, be]), at = w.useRef(void 0), lt = w.useRef(T), ve = w.useRef(void 0), Dn = w.useRef(!1), dt = w.useRef(!1), ut = w.useRef(
|
|
800
800
|
void 0
|
|
801
801
|
);
|
|
802
802
|
je(() => (dt.current = !0, () => {
|
|
803
803
|
dt.current = !1;
|
|
804
804
|
}), []);
|
|
805
|
-
const Nn =
|
|
805
|
+
const Nn = w.useMemo(() => () => ve.current && T === lt.current ? ve.current : ct(ee.getState(), T), [ee, T]), Bo = w.useMemo(() => (ue) => be ? Ri(
|
|
806
806
|
m,
|
|
807
807
|
ee,
|
|
808
808
|
be,
|
|
@@ -827,7 +827,7 @@ function Bi(e, t, n, {
|
|
|
827
827
|
]);
|
|
828
828
|
let Fe;
|
|
829
829
|
try {
|
|
830
|
-
Fe =
|
|
830
|
+
Fe = w.useSyncExternalStore(
|
|
831
831
|
// TODO We're passing through a big wrapper that does a bunch of extra side effects besides subscribing
|
|
832
832
|
Bo,
|
|
833
833
|
// TODO This is incredibly hacky. We've already processed the store update and calculated new child props,
|
|
@@ -845,9 +845,9 @@ ${ut.current.stack}
|
|
|
845
845
|
je(() => {
|
|
846
846
|
ut.current = void 0, ve.current = void 0, at.current = Fe;
|
|
847
847
|
});
|
|
848
|
-
const pt =
|
|
848
|
+
const pt = w.useMemo(() => (
|
|
849
849
|
// @ts-ignore
|
|
850
|
-
/* @__PURE__ */
|
|
850
|
+
/* @__PURE__ */ w.createElement(
|
|
851
851
|
h,
|
|
852
852
|
{
|
|
853
853
|
...Fe,
|
|
@@ -855,13 +855,13 @@ ${ut.current.stack}
|
|
|
855
855
|
}
|
|
856
856
|
)
|
|
857
857
|
), [U, h, Fe]);
|
|
858
|
-
return
|
|
858
|
+
return w.useMemo(() => m ? /* @__PURE__ */ w.createElement(H.Provider, { value: En }, pt) : pt, [H, pt, En]);
|
|
859
859
|
}
|
|
860
|
-
const x =
|
|
860
|
+
const x = w.memo(N);
|
|
861
861
|
if (x.WrappedComponent = h, x.displayName = N.displayName = v, a) {
|
|
862
|
-
const P =
|
|
862
|
+
const P = w.forwardRef(
|
|
863
863
|
function(T, H) {
|
|
864
|
-
return /* @__PURE__ */
|
|
864
|
+
return /* @__PURE__ */ w.createElement(x, { ...T, reactReduxForwardedRef: H });
|
|
865
865
|
}
|
|
866
866
|
);
|
|
867
867
|
return P.displayName = v, P.WrappedComponent = h, /* @__PURE__ */ Bt(P, h);
|
|
@@ -871,7 +871,7 @@ ${ut.current.stack}
|
|
|
871
871
|
}
|
|
872
872
|
var Ar = Bi;
|
|
873
873
|
function Vi(e) {
|
|
874
|
-
const { children: t, context: n, serverState: r, store: o } = e, i =
|
|
874
|
+
const { children: t, context: n, serverState: r, store: o } = e, i = w.useMemo(() => {
|
|
875
875
|
const a = Sr(o), d = {
|
|
876
876
|
store: o,
|
|
877
877
|
subscription: a,
|
|
@@ -886,7 +886,7 @@ function Vi(e) {
|
|
|
886
886
|
identityFunctionCheck: p
|
|
887
887
|
});
|
|
888
888
|
}
|
|
889
|
-
}, [o, r]), s =
|
|
889
|
+
}, [o, r]), s = w.useMemo(() => o.getState(), [o]);
|
|
890
890
|
je(() => {
|
|
891
891
|
const { subscription: a } = i;
|
|
892
892
|
return a.onStateChange = a.notifyNestedSubs, a.trySubscribe(), s !== o.getState() && a.notifyNestedSubs(), () => {
|
|
@@ -894,7 +894,7 @@ function Vi(e) {
|
|
|
894
894
|
};
|
|
895
895
|
}, [i, s]);
|
|
896
896
|
const c = n || _r;
|
|
897
|
-
return /* @__PURE__ */
|
|
897
|
+
return /* @__PURE__ */ w.createElement(c.Provider, { value: i }, t);
|
|
898
898
|
}
|
|
899
899
|
var Li = Vi, Mi = process.env.NODE_ENV === "production", yt = "Invariant failed";
|
|
900
900
|
function Mn(e, t) {
|
|
@@ -1170,7 +1170,7 @@ function Lr(e, t) {
|
|
|
1170
1170
|
return !1;
|
|
1171
1171
|
return !0;
|
|
1172
1172
|
}
|
|
1173
|
-
function
|
|
1173
|
+
function S(e, t) {
|
|
1174
1174
|
const n = Te(() => ({
|
|
1175
1175
|
inputs: t,
|
|
1176
1176
|
result: e()
|
|
@@ -1183,7 +1183,7 @@ function O(e, t) {
|
|
|
1183
1183
|
}, [s]), s.result;
|
|
1184
1184
|
}
|
|
1185
1185
|
function D(e, t) {
|
|
1186
|
-
return
|
|
1186
|
+
return S(() => e, t);
|
|
1187
1187
|
}
|
|
1188
1188
|
const G = {
|
|
1189
1189
|
x: 0,
|
|
@@ -4101,7 +4101,7 @@ const Y = typeof window < "u" && typeof window.document < "u" && typeof window.d
|
|
|
4101
4101
|
return e && t.setAttribute("nonce", e), t.type = "text/css", t;
|
|
4102
4102
|
};
|
|
4103
4103
|
function Da(e, t) {
|
|
4104
|
-
const n =
|
|
4104
|
+
const n = S(() => Ea(e), [e]), r = B(null), o = B(null), i = D($((l) => {
|
|
4105
4105
|
const u = o.current;
|
|
4106
4106
|
u || (process.env.NODE_ENV !== "production" ? f(!1, "Cannot set dynamic style element if it is not set") : f()), u.textContent = l;
|
|
4107
4107
|
}), []), s = D((l) => {
|
|
@@ -4128,7 +4128,7 @@ function Da(e, t) {
|
|
|
4128
4128
|
}, [i, n.dropAnimating, n.userCancel]), d = D(() => {
|
|
4129
4129
|
o.current && i(n.resting);
|
|
4130
4130
|
}, [i, n.resting]);
|
|
4131
|
-
return
|
|
4131
|
+
return S(() => ({
|
|
4132
4132
|
dragging: c,
|
|
4133
4133
|
dropping: a,
|
|
4134
4134
|
resting: d
|
|
@@ -4178,7 +4178,7 @@ function Na(e) {
|
|
|
4178
4178
|
o.current = !1;
|
|
4179
4179
|
const u = r.current;
|
|
4180
4180
|
u && cancelAnimationFrame(u);
|
|
4181
|
-
}), []),
|
|
4181
|
+
}), []), S(() => ({
|
|
4182
4182
|
register: i,
|
|
4183
4183
|
tryRecordFocus: d,
|
|
4184
4184
|
tryRestoreFocusRecorded: a,
|
|
@@ -4260,7 +4260,7 @@ function xa() {
|
|
|
4260
4260
|
};
|
|
4261
4261
|
}
|
|
4262
4262
|
function Ia() {
|
|
4263
|
-
const e =
|
|
4263
|
+
const e = S(xa, []);
|
|
4264
4264
|
return te(() => function() {
|
|
4265
4265
|
e.clean();
|
|
4266
4266
|
}, [e]), e;
|
|
@@ -4281,7 +4281,7 @@ const Ca = {
|
|
|
4281
4281
|
"clip-path": "inset(100%)"
|
|
4282
4282
|
}, Oa = (e) => `rfd-announcement-${e}`;
|
|
4283
4283
|
function Sa(e) {
|
|
4284
|
-
const t =
|
|
4284
|
+
const t = S(() => Oa(e), [e]), n = B(null);
|
|
4285
4285
|
return te(function() {
|
|
4286
4286
|
const i = document.createElement("div");
|
|
4287
4287
|
return n.current = i, i.id = t, i.setAttribute("aria-live", "assertive"), i.setAttribute("aria-atomic", "true"), Ke(i.style, Ca), Pe().appendChild(i), function() {
|
|
@@ -4313,7 +4313,7 @@ const wa = {
|
|
|
4313
4313
|
};
|
|
4314
4314
|
function pn(e, t = wa) {
|
|
4315
4315
|
const n = L.useId();
|
|
4316
|
-
return
|
|
4316
|
+
return S(() => `${e}${t.separator}${n}`, [t.separator, e, n]);
|
|
4317
4317
|
}
|
|
4318
4318
|
function _a({
|
|
4319
4319
|
contextId: e,
|
|
@@ -4327,7 +4327,7 @@ function Aa({
|
|
|
4327
4327
|
}) {
|
|
4328
4328
|
const n = pn("hidden-text", {
|
|
4329
4329
|
separator: "-"
|
|
4330
|
-
}), r =
|
|
4330
|
+
}), r = S(() => _a({
|
|
4331
4331
|
contextId: e,
|
|
4332
4332
|
uniqueId: n
|
|
4333
4333
|
}), [n, e]);
|
|
@@ -4560,7 +4560,7 @@ function Ka({
|
|
|
4560
4560
|
}];
|
|
4561
4561
|
}
|
|
4562
4562
|
function Ja(e) {
|
|
4563
|
-
const t = B(sr), n = B(re), r =
|
|
4563
|
+
const t = B(sr), n = B(re), r = S(() => ({
|
|
4564
4564
|
eventName: "mousedown",
|
|
4565
4565
|
fn: function(l) {
|
|
4566
4566
|
if (l.defaultPrevented || l.button !== No || l.ctrlKey || l.metaKey || l.shiftKey || l.altKey)
|
|
@@ -4580,7 +4580,7 @@ function Ja(e) {
|
|
|
4580
4580
|
};
|
|
4581
4581
|
n.current(), d(g, m);
|
|
4582
4582
|
}
|
|
4583
|
-
}), [e]), o =
|
|
4583
|
+
}), [e]), o = S(() => ({
|
|
4584
4584
|
eventName: "webkitmouseforcewillbegin",
|
|
4585
4585
|
fn: (p) => {
|
|
4586
4586
|
if (p.defaultPrevented)
|
|
@@ -4705,7 +4705,7 @@ function el(e, t) {
|
|
|
4705
4705
|
}];
|
|
4706
4706
|
}
|
|
4707
4707
|
function tl(e) {
|
|
4708
|
-
const t = B(Za), n =
|
|
4708
|
+
const t = B(Za), n = S(() => ({
|
|
4709
4709
|
eventName: "keydown",
|
|
4710
4710
|
fn: function(i) {
|
|
4711
4711
|
if (i.defaultPrevented || i.keyCode !== Eo)
|
|
@@ -4855,7 +4855,7 @@ function sl(e) {
|
|
|
4855
4855
|
return t.current;
|
|
4856
4856
|
}, []), o = D(function(g) {
|
|
4857
4857
|
t.current = g;
|
|
4858
|
-
}, []), i =
|
|
4858
|
+
}, []), i = S(() => ({
|
|
4859
4859
|
eventName: "touchstart",
|
|
4860
4860
|
fn: function(g) {
|
|
4861
4861
|
if (g.defaultPrevented)
|
|
@@ -5203,7 +5203,7 @@ function Dl({
|
|
|
5203
5203
|
return h ? h.options : null;
|
|
5204
5204
|
}, [n.draggable]), u = D(function() {
|
|
5205
5205
|
s.isClaimed() && (s.tryAbandon(), t.getState().phase !== "IDLE" && t.dispatch(rn()));
|
|
5206
|
-
}, [s, t]), g = D(() => s.isClaimed(), [s]), m =
|
|
5206
|
+
}, [s, t]), g = D(() => s.isClaimed(), [s]), m = S(() => ({
|
|
5207
5207
|
canGetLock: a,
|
|
5208
5208
|
tryGetLock: d,
|
|
5209
5209
|
findClosestDraggableId: p,
|
|
@@ -5250,20 +5250,20 @@ function Il(e) {
|
|
|
5250
5250
|
text: i
|
|
5251
5251
|
}), u = Da(t, o), g = D((T) => {
|
|
5252
5252
|
De(s).dispatch(T);
|
|
5253
|
-
}, []), m =
|
|
5253
|
+
}, []), m = S(() => Sn({
|
|
5254
5254
|
publishWhileDragging: cc,
|
|
5255
5255
|
updateDroppableScroll: lc,
|
|
5256
5256
|
updateDroppableIsEnabled: dc,
|
|
5257
5257
|
updateDroppableIsCombineEnabled: uc,
|
|
5258
5258
|
collectionStarting: ac
|
|
5259
|
-
}, g), [g]), b = Ia(), h =
|
|
5259
|
+
}, g), [g]), b = Ia(), h = S(() => Qc(b, m), [b, m]), y = S(() => ha({
|
|
5260
5260
|
scrollWindow: ea,
|
|
5261
5261
|
scrollDroppable: h.scrollDroppable,
|
|
5262
5262
|
getAutoScrollerOptions: d,
|
|
5263
5263
|
...Sn({
|
|
5264
5264
|
move: ro
|
|
5265
5265
|
}, g)
|
|
5266
|
-
}), [h.scrollDroppable, g, d]), v = Na(t), I =
|
|
5266
|
+
}), [h.scrollDroppable, g, d]), v = Na(t), I = S(() => Xc({
|
|
5267
5267
|
announce: p,
|
|
5268
5268
|
autoScroller: y,
|
|
5269
5269
|
dimensionMarshal: h,
|
|
@@ -5278,12 +5278,12 @@ function Il(e) {
|
|
|
5278
5278
|
}, []), E = D(() => {
|
|
5279
5279
|
const T = De(s).getState();
|
|
5280
5280
|
return T.phase === "DROP_ANIMATING" ? !0 : T.phase === "IDLE" ? !1 : T.isDragging;
|
|
5281
|
-
}, []), x =
|
|
5281
|
+
}, []), x = S(() => ({
|
|
5282
5282
|
isDragging: E,
|
|
5283
5283
|
tryAbort: N
|
|
5284
5284
|
}), [E, N]);
|
|
5285
5285
|
n(x);
|
|
5286
|
-
const _ = D((T) => fo(De(s).getState(), T), []), P = D(() => ce(De(s).getState()), []), U =
|
|
5286
|
+
const _ = D((T) => fo(De(s).getState(), T), []), P = D(() => ce(De(s).getState()), []), U = S(() => ({
|
|
5287
5287
|
marshal: h,
|
|
5288
5288
|
focus: v,
|
|
5289
5289
|
contextId: t,
|
|
@@ -5386,14 +5386,14 @@ function Bl(e) {
|
|
|
5386
5386
|
canDragInteractiveElements: i,
|
|
5387
5387
|
shouldRespectForcePress: s,
|
|
5388
5388
|
isEnabled: c
|
|
5389
|
-
} = e, a =
|
|
5389
|
+
} = e, a = S(() => ({
|
|
5390
5390
|
canDragInteractiveElements: i,
|
|
5391
5391
|
shouldRespectForcePress: s,
|
|
5392
5392
|
isEnabled: c
|
|
5393
5393
|
}), [i, c, s]), d = D((g) => {
|
|
5394
5394
|
const m = o();
|
|
5395
5395
|
return m || (process.env.NODE_ENV !== "production" ? f(!1, "Cannot get dimension when no ref is set") : f()), Tl(n, m, g);
|
|
5396
|
-
}, [n, o]), p =
|
|
5396
|
+
}, [n, o]), p = S(() => ({
|
|
5397
5397
|
uniqueId: t,
|
|
5398
5398
|
descriptor: n,
|
|
5399
5399
|
options: a,
|
|
@@ -5452,7 +5452,7 @@ const $l = (e) => {
|
|
|
5452
5452
|
} = Qe(it), {
|
|
5453
5453
|
type: c,
|
|
5454
5454
|
droppableId: a
|
|
5455
|
-
} = Qe(hn), d =
|
|
5455
|
+
} = Qe(hn), d = S(() => ({
|
|
5456
5456
|
id: e.draggableId,
|
|
5457
5457
|
index: e.index,
|
|
5458
5458
|
type: c,
|
|
@@ -5468,7 +5468,7 @@ const $l = (e) => {
|
|
|
5468
5468
|
dropAnimationFinished: y
|
|
5469
5469
|
} = e;
|
|
5470
5470
|
if (Vl(e, o, r), Ll(b), !b) {
|
|
5471
|
-
const x =
|
|
5471
|
+
const x = S(() => ({
|
|
5472
5472
|
descriptor: d,
|
|
5473
5473
|
registry: s,
|
|
5474
5474
|
getDraggableRef: r,
|
|
@@ -5478,7 +5478,7 @@ const $l = (e) => {
|
|
|
5478
5478
|
}), [d, s, r, m, g, u]);
|
|
5479
5479
|
Bl(x);
|
|
5480
5480
|
}
|
|
5481
|
-
const v =
|
|
5481
|
+
const v = S(() => u ? {
|
|
5482
5482
|
tabIndex: 0,
|
|
5483
5483
|
role: "button",
|
|
5484
5484
|
"aria-describedby": i,
|
|
@@ -5488,7 +5488,7 @@ const $l = (e) => {
|
|
|
5488
5488
|
onDragStart: Ml
|
|
5489
5489
|
} : null, [o, i, l, u]), I = D((x) => {
|
|
5490
5490
|
h.type === "DRAGGING" && h.dropping && x.propertyName === "transform" && mr(y);
|
|
5491
|
-
}, [y, h]), N =
|
|
5491
|
+
}, [y, h]), N = S(() => {
|
|
5492
5492
|
const x = Rl(h), _ = h.type === "DRAGGING" && h.dropping ? I : void 0;
|
|
5493
5493
|
return {
|
|
5494
5494
|
innerRef: n,
|
|
@@ -5500,7 +5500,7 @@ const $l = (e) => {
|
|
|
5500
5500
|
},
|
|
5501
5501
|
dragHandleProps: v
|
|
5502
5502
|
};
|
|
5503
|
-
}, [o, v, l, h, I, n]), E =
|
|
5503
|
+
}, [o, v, l, h, I, n]), E = S(() => ({
|
|
5504
5504
|
draggableId: d.id,
|
|
5505
5505
|
type: d.type,
|
|
5506
5506
|
source: {
|
|
@@ -5823,11 +5823,11 @@ function sd(e) {
|
|
|
5823
5823
|
const t = B(null), n = Qe(it), r = pn("droppable"), {
|
|
5824
5824
|
registry: o,
|
|
5825
5825
|
marshal: i
|
|
5826
|
-
} = n, s = gn(e), c =
|
|
5826
|
+
} = n, s = gn(e), c = S(() => ({
|
|
5827
5827
|
id: e.droppableId,
|
|
5828
5828
|
type: e.type,
|
|
5829
5829
|
mode: e.mode
|
|
5830
|
-
}), [e.droppableId, e.mode, e.type]), a = B(c), d =
|
|
5830
|
+
}), [e.droppableId, e.mode, e.type]), a = B(c), d = S(() => $((N, E) => {
|
|
5831
5831
|
t.current || (process.env.NODE_ENV !== "production" ? f(!1, "Can only update scroll when dragging") : f());
|
|
5832
5832
|
const x = {
|
|
5833
5833
|
x: N,
|
|
@@ -5840,7 +5840,7 @@ function sd(e) {
|
|
|
5840
5840
|
}, []), l = D(() => {
|
|
5841
5841
|
const N = p();
|
|
5842
5842
|
d(N.x, N.y);
|
|
5843
|
-
}, [p, d]), u =
|
|
5843
|
+
}, [p, d]), u = S(() => Ie(l), [l]), g = D(() => {
|
|
5844
5844
|
const N = t.current, E = He(N);
|
|
5845
5845
|
if (N && E || (process.env.NODE_ENV !== "production" ? f(!1, "Could not find scroll options while scrolling") : f()), N.scrollOptions.shouldPublishImmediately) {
|
|
5846
5846
|
l();
|
|
@@ -5882,12 +5882,12 @@ function sd(e) {
|
|
|
5882
5882
|
E || (process.env.NODE_ENV !== "production" ? f(!1, "Cannot scroll when there is no drag") : f());
|
|
5883
5883
|
const x = He(E);
|
|
5884
5884
|
x || (process.env.NODE_ENV !== "production" ? f(!1, "Cannot scroll a droppable with no closest scrollable") : f()), x.scrollTop += N.y, x.scrollLeft += N.x;
|
|
5885
|
-
}, []), v =
|
|
5885
|
+
}, []), v = S(() => ({
|
|
5886
5886
|
getDimensionAndWatchScroll: m,
|
|
5887
5887
|
getScrollWhileDragging: b,
|
|
5888
5888
|
dragStopped: h,
|
|
5889
5889
|
scroll: y
|
|
5890
|
-
}), [h, m, b, y]), I =
|
|
5890
|
+
}), [h, m, b, y]), I = S(() => ({
|
|
5891
5891
|
uniqueId: r,
|
|
5892
5892
|
descriptor: c,
|
|
5893
5893
|
callbacks: v
|
|
@@ -6094,7 +6094,7 @@ const hd = (e) => {
|
|
|
6094
6094
|
ignoreContainerClipping: l,
|
|
6095
6095
|
getDroppableRef: v
|
|
6096
6096
|
});
|
|
6097
|
-
const _ =
|
|
6097
|
+
const _ = S(() => L.createElement(md, {
|
|
6098
6098
|
on: e.placeholder,
|
|
6099
6099
|
shouldAnimate: e.shouldAnimatePlaceholder
|
|
6100
6100
|
}, ({
|
|
@@ -6108,14 +6108,14 @@ const hd = (e) => {
|
|
|
6108
6108
|
animate: de,
|
|
6109
6109
|
contextId: n,
|
|
6110
6110
|
onTransitionEnd: x
|
|
6111
|
-
})), [n, x, e.placeholder, e.shouldAnimatePlaceholder, E]), P =
|
|
6111
|
+
})), [n, x, e.placeholder, e.shouldAnimatePlaceholder, E]), P = S(() => ({
|
|
6112
6112
|
innerRef: I,
|
|
6113
6113
|
placeholder: _,
|
|
6114
6114
|
droppableProps: {
|
|
6115
6115
|
"data-rfd-droppable-id": c,
|
|
6116
6116
|
"data-rfd-droppable-context-id": n
|
|
6117
6117
|
}
|
|
6118
|
-
}), [n, c, _, I]), U = b ? b.dragging.draggableId : null, T =
|
|
6118
|
+
}), [n, c, _, I]), U = b ? b.dragging.draggableId : null, T = S(() => ({
|
|
6119
6119
|
droppableId: c,
|
|
6120
6120
|
type: a,
|
|
6121
6121
|
isUsingCloneFor: U
|
|
@@ -6365,19 +6365,19 @@ const ur = {
|
|
|
6365
6365
|
"div",
|
|
6366
6366
|
{
|
|
6367
6367
|
style: {
|
|
6368
|
-
...
|
|
6368
|
+
...O.orderBlock,
|
|
6369
6369
|
borderTop: n ? "none" : "1px solid #f3f4f6",
|
|
6370
6370
|
backgroundColor: r ? "#fafafa" : "transparent"
|
|
6371
6371
|
},
|
|
6372
6372
|
children: [
|
|
6373
|
-
/* @__PURE__ */ V("div", { style:
|
|
6374
|
-
/* @__PURE__ */ V("div", { style:
|
|
6375
|
-
/* @__PURE__ */ V("div", { style:
|
|
6373
|
+
/* @__PURE__ */ V("div", { style: O.orderHeader, children: [
|
|
6374
|
+
/* @__PURE__ */ V("div", { style: O.gridItem, children: [
|
|
6375
|
+
/* @__PURE__ */ V("div", { style: O.gridLabel, children: [
|
|
6376
6376
|
"ORDER",
|
|
6377
6377
|
" ",
|
|
6378
6378
|
r && /* @__PURE__ */ C("span", { style: { color: "#16a34a", marginLeft: "4px" }, children: "✓ DONE" })
|
|
6379
6379
|
] }),
|
|
6380
|
-
/* @__PURE__ */ V("div", { style:
|
|
6380
|
+
/* @__PURE__ */ V("div", { style: O.gridValue, children: [
|
|
6381
6381
|
"#",
|
|
6382
6382
|
e.order_id
|
|
6383
6383
|
] })
|
|
@@ -6386,15 +6386,15 @@ const ur = {
|
|
|
6386
6386
|
"button",
|
|
6387
6387
|
{
|
|
6388
6388
|
onClick: () => s(!i),
|
|
6389
|
-
style:
|
|
6389
|
+
style: O.expandButton,
|
|
6390
6390
|
children: i ? /* @__PURE__ */ C(Cd, {}) : /* @__PURE__ */ C(Id, {})
|
|
6391
6391
|
}
|
|
6392
6392
|
)
|
|
6393
6393
|
] }),
|
|
6394
|
-
/* @__PURE__ */ V("div", { style:
|
|
6395
|
-
/* @__PURE__ */ V("div", { style:
|
|
6396
|
-
/* @__PURE__ */ C("div", { style:
|
|
6397
|
-
/* @__PURE__ */ V("div", { style:
|
|
6394
|
+
/* @__PURE__ */ V("div", { style: O.detailsGrid, children: [
|
|
6395
|
+
/* @__PURE__ */ V("div", { style: O.gridItem, children: [
|
|
6396
|
+
/* @__PURE__ */ C("div", { style: O.gridLabel, children: "LOCATION" }),
|
|
6397
|
+
/* @__PURE__ */ V("div", { style: O.gridValueWithIcon, children: [
|
|
6398
6398
|
/* @__PURE__ */ C(Dd, {}),
|
|
6399
6399
|
/* @__PURE__ */ C(
|
|
6400
6400
|
"a",
|
|
@@ -6402,22 +6402,22 @@ const ur = {
|
|
|
6402
6402
|
href: c,
|
|
6403
6403
|
target: "_blank",
|
|
6404
6404
|
rel: "noopener noreferrer",
|
|
6405
|
-
style:
|
|
6405
|
+
style: O.addressLink,
|
|
6406
6406
|
children: ((g = (u = e.customer) == null ? void 0 : u.address) == null ? void 0 : g.street_area) || "N/A"
|
|
6407
6407
|
}
|
|
6408
6408
|
)
|
|
6409
6409
|
] })
|
|
6410
6410
|
] }),
|
|
6411
|
-
/* @__PURE__ */ V("div", { style:
|
|
6412
|
-
/* @__PURE__ */ C("div", { style:
|
|
6413
|
-
/* @__PURE__ */ C("div", { style:
|
|
6411
|
+
/* @__PURE__ */ V("div", { style: O.gridItem, children: [
|
|
6412
|
+
/* @__PURE__ */ C("div", { style: O.gridLabel, children: "PERIOD" }),
|
|
6413
|
+
/* @__PURE__ */ C("div", { style: O.gridValue, children: t })
|
|
6414
6414
|
] }),
|
|
6415
|
-
/* @__PURE__ */ V("div", { style:
|
|
6416
|
-
/* @__PURE__ */ C("div", { style:
|
|
6417
|
-
/* @__PURE__ */ V("div", { style:
|
|
6415
|
+
/* @__PURE__ */ V("div", { style: O.gridItem, children: [
|
|
6416
|
+
/* @__PURE__ */ C("div", { style: O.gridLabel, children: "TIME WINDOW" }),
|
|
6417
|
+
/* @__PURE__ */ V("div", { style: O.gridValueWithIcon, children: [
|
|
6418
6418
|
/* @__PURE__ */ C(Nd, {}),
|
|
6419
6419
|
" ",
|
|
6420
|
-
/* @__PURE__ */ V("span", { children: [
|
|
6420
|
+
/* @__PURE__ */ V("span", { style: O.direction, children: [
|
|
6421
6421
|
fr(e.eta_start),
|
|
6422
6422
|
" - ",
|
|
6423
6423
|
fr(e.eta_end)
|
|
@@ -6425,7 +6425,7 @@ const ur = {
|
|
|
6425
6425
|
] })
|
|
6426
6426
|
] })
|
|
6427
6427
|
] }),
|
|
6428
|
-
i && o && /* @__PURE__ */ C("div", { style:
|
|
6428
|
+
i && o && /* @__PURE__ */ C("div", { style: O.extraDataContainer, children: o(e) })
|
|
6429
6429
|
]
|
|
6430
6430
|
}
|
|
6431
6431
|
);
|
|
@@ -6453,26 +6453,26 @@ const ur = {
|
|
|
6453
6453
|
{
|
|
6454
6454
|
ref: l.innerRef,
|
|
6455
6455
|
...l.draggableProps,
|
|
6456
|
-
style: { ...
|
|
6456
|
+
style: { ...O.timelineItem, ...l.draggableProps.style },
|
|
6457
6457
|
children: [
|
|
6458
6458
|
/* @__PURE__ */ C(
|
|
6459
6459
|
"div",
|
|
6460
6460
|
{
|
|
6461
6461
|
style: {
|
|
6462
|
-
...
|
|
6463
|
-
...a ?
|
|
6462
|
+
...O.bubble,
|
|
6463
|
+
...a ? O.bubbleCompleted : O.bubblePending
|
|
6464
6464
|
},
|
|
6465
6465
|
children: t + 1
|
|
6466
6466
|
}
|
|
6467
6467
|
),
|
|
6468
|
-
/* @__PURE__ */ V("div", { style:
|
|
6469
|
-
/* @__PURE__ */ V("div", { style:
|
|
6468
|
+
/* @__PURE__ */ V("div", { style: O.card, children: [
|
|
6469
|
+
/* @__PURE__ */ V("div", { style: O.cardHeader, children: [
|
|
6470
6470
|
/* @__PURE__ */ V(
|
|
6471
6471
|
"div",
|
|
6472
6472
|
{
|
|
6473
6473
|
style: { display: "flex", alignItems: "center", gap: "8px" },
|
|
6474
6474
|
children: [
|
|
6475
|
-
/* @__PURE__ */ V("span", { style:
|
|
6475
|
+
/* @__PURE__ */ V("span", { style: O.title, children: [
|
|
6476
6476
|
n,
|
|
6477
6477
|
" #",
|
|
6478
6478
|
e.sequence_rank
|
|
@@ -6480,7 +6480,7 @@ const ur = {
|
|
|
6480
6480
|
/* @__PURE__ */ C(
|
|
6481
6481
|
"span",
|
|
6482
6482
|
{
|
|
6483
|
-
style: a ?
|
|
6483
|
+
style: a ? O.badgeCompleted : O.badgePending,
|
|
6484
6484
|
children: d
|
|
6485
6485
|
}
|
|
6486
6486
|
)
|
|
@@ -6489,11 +6489,11 @@ const ur = {
|
|
|
6489
6489
|
),
|
|
6490
6490
|
!p && /* @__PURE__ */ C("div", { ...l.dragHandleProps, children: /* @__PURE__ */ C(xd, {}) })
|
|
6491
6491
|
] }),
|
|
6492
|
-
/* @__PURE__ */ V("div", { style:
|
|
6492
|
+
/* @__PURE__ */ V("div", { style: O.customerName, children: [
|
|
6493
6493
|
"Customer: ",
|
|
6494
6494
|
(g = (u = e.orders[0]) == null ? void 0 : u.customer) == null ? void 0 : g.name
|
|
6495
6495
|
] }),
|
|
6496
|
-
/* @__PURE__ */ C("div", { style:
|
|
6496
|
+
/* @__PURE__ */ C("div", { style: O.ordersList, children: e.orders.map((m, b) => /* @__PURE__ */ C(
|
|
6497
6497
|
Sd,
|
|
6498
6498
|
{
|
|
6499
6499
|
order: m,
|
|
@@ -6504,7 +6504,7 @@ const ur = {
|
|
|
6504
6504
|
},
|
|
6505
6505
|
m.id
|
|
6506
6506
|
)) }),
|
|
6507
|
-
s && /* @__PURE__ */ C("div", { style:
|
|
6507
|
+
s && /* @__PURE__ */ C("div", { style: O.actionsSlot, children: s(e) })
|
|
6508
6508
|
] })
|
|
6509
6509
|
]
|
|
6510
6510
|
}
|
|
@@ -6542,14 +6542,14 @@ const ur = {
|
|
|
6542
6542
|
};
|
|
6543
6543
|
if (!e || !i.length) return /* @__PURE__ */ C("div", { children: "No Path Data" });
|
|
6544
6544
|
const a = qe(e.status);
|
|
6545
|
-
return /* @__PURE__ */ C("div", { style:
|
|
6545
|
+
return /* @__PURE__ */ C("div", { style: O.container, children: /* @__PURE__ */ C(Ol, { onDragEnd: c, children: /* @__PURE__ */ C(Ed, { droppableId: "path-list", children: (d) => /* @__PURE__ */ V(
|
|
6546
6546
|
"div",
|
|
6547
6547
|
{
|
|
6548
6548
|
ref: d.innerRef,
|
|
6549
6549
|
...d.droppableProps,
|
|
6550
|
-
style:
|
|
6550
|
+
style: O.timelineWrapper,
|
|
6551
6551
|
children: [
|
|
6552
|
-
/* @__PURE__ */ C("div", { style:
|
|
6552
|
+
/* @__PURE__ */ C("div", { style: O.verticalLine }),
|
|
6553
6553
|
/* @__PURE__ */ C(
|
|
6554
6554
|
"div",
|
|
6555
6555
|
{
|
|
@@ -6578,12 +6578,12 @@ const ur = {
|
|
|
6578
6578
|
]
|
|
6579
6579
|
}
|
|
6580
6580
|
) }) }) });
|
|
6581
|
-
},
|
|
6581
|
+
}, O = {
|
|
6582
6582
|
container: { fontFamily: "sans-serif", maxWidth: "800px", margin: "0 auto" },
|
|
6583
6583
|
timelineWrapper: { position: "relative", padding: "20px 0" },
|
|
6584
6584
|
verticalLine: {
|
|
6585
6585
|
position: "absolute",
|
|
6586
|
-
|
|
6586
|
+
insetInlineStart: "19px",
|
|
6587
6587
|
top: "40px",
|
|
6588
6588
|
bottom: "40px",
|
|
6589
6589
|
width: "2px",
|
|
@@ -6669,6 +6669,7 @@ const ur = {
|
|
|
6669
6669
|
gap: "4px",
|
|
6670
6670
|
color: "#374151"
|
|
6671
6671
|
},
|
|
6672
|
+
direction: { direction: "ltr" },
|
|
6672
6673
|
addressLink: {
|
|
6673
6674
|
color: "#3b82f6",
|
|
6674
6675
|
textDecoration: "underline",
|
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(Q,y){typeof exports=="object"&&typeof module<"u"?y(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],y):(Q=typeof globalThis<"u"?globalThis:Q||self,y(Q["my-react-component"]={},Q.jsxRuntime,Q.React,Q.ReactDOM))})(this,function(Q,y,D,ot){"use strict";function Ao(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const
|
|
1
|
+
(function(Q,y){typeof exports=="object"&&typeof module<"u"?y(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],y):(Q=typeof globalThis<"u"?globalThis:Q||self,y(Q["my-react-component"]={},Q.jsxRuntime,Q.React,Q.ReactDOM))})(this,function(Q,y,D,ot){"use strict";function Ao(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const _=Ao(D);function G(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Po=typeof Symbol=="function"&&Symbol.observable||"@@observable",bn=Po,vn=()=>Math.random().toString(36).substring(7).split("").join("."),To={INIT:`@@redux/INIT${vn()}`,REPLACE:`@@redux/REPLACE${vn()}`},yn=To;function Bo(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Vo(e){if(e===void 0)return"undefined";if(e===null)return"null";const t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(Mo(e))return"date";if(Ro(e))return"error";const n=Lo(e);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"")}function Lo(e){return typeof e.constructor=="function"?e.constructor.name:null}function Ro(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function Mo(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function ee(e){let t=typeof e;return process.env.NODE_ENV!=="production"&&(t=Vo(e)),t}function En(e,t,n){if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?G(2):`Expected the root reducer to be a function. Instead, received: '${ee(e)}'`);if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?G(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?G(1):`Expected the enhancer to be a function. Instead, received: '${ee(n)}'`);return n(En)(e,t)}let r=e,o=t,i=new Map,s=i,c=0,a=!1;function d(){s===i&&(s=new Map,i.forEach((h,E)=>{s.set(E,h)}))}function p(){if(a)throw new Error(process.env.NODE_ENV==="production"?G(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function l(h){if(typeof h!="function")throw new Error(process.env.NODE_ENV==="production"?G(4):`Expected the listener to be a function. Instead, received: '${ee(h)}'`);if(a)throw new Error(process.env.NODE_ENV==="production"?G(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let E=!0;d();const v=c++;return s.set(v,h),function(){if(E){if(a)throw new Error(process.env.NODE_ENV==="production"?G(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");E=!1,d(),s.delete(v),i=null}}}function u(h){if(!Bo(h))throw new Error(process.env.NODE_ENV==="production"?G(7):`Actions must be plain objects. Instead, the actual type was: '${ee(h)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);if(typeof h.type>"u")throw new Error(process.env.NODE_ENV==="production"?G(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(typeof h.type!="string")throw new Error(process.env.NODE_ENV==="production"?G(17):`Action "type" property must be a string. Instead, the actual type was: '${ee(h.type)}'. Value was: '${h.type}' (stringified)`);if(a)throw new Error(process.env.NODE_ENV==="production"?G(9):"Reducers may not dispatch actions.");try{a=!0,o=r(o,h)}finally{a=!1}return(i=s).forEach(v=>{v()}),h}function g(h){if(typeof h!="function")throw new Error(process.env.NODE_ENV==="production"?G(10):`Expected the nextReducer to be a function. Instead, received: '${ee(h)}`);r=h,u({type:yn.REPLACE})}function m(){const h=l;return{subscribe(E){if(typeof E!="object"||E===null)throw new Error(process.env.NODE_ENV==="production"?G(11):`Expected the observer to be an object. Instead, received: '${ee(E)}'`);function v(){const I=E;I.next&&I.next(p())}return v(),{unsubscribe:h(v)}},[bn](){return this}}}return u({type:yn.INIT}),{dispatch:u,subscribe:l,getState:p,replaceReducer:g,[bn]:m}}function Dn(e,t){return function(...n){return t(e.apply(this,n))}}function Nn(e,t){if(typeof e=="function")return Dn(e,t);if(typeof e!="object"||e===null)throw new Error(process.env.NODE_ENV==="production"?G(16):`bindActionCreators expected an object or a function, but instead received: '${ee(e)}'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?`);const n={};for(const r in e){const o=e[r];typeof o=="function"&&(n[r]=Dn(o,t))}return n}function xn(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function $o(...e){return t=>(n,r)=>{const o=t(n,r);let i=()=>{throw new Error(process.env.NODE_ENV==="production"?G(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")};const s={getState:o.getState,dispatch:(a,...d)=>i(a,...d)},c=e.map(a=>a(s));return i=xn(...c)(o.dispatch),{...o,dispatch:i}}}var it={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* use-sync-external-store-with-selector.production.js
|
|
4
4
|
*
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Sn;function ko(){return Sn||(Sn=1,process.env.NODE_ENV!=="production"&&function(){function e(a,d){return a===d&&(a!==0||1/a===1/d)||a!==a&&d!==d}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=D,n=typeof Object.is=="function"?Object.is:e,r=t.useSyncExternalStore,o=t.useRef,i=t.useEffect,s=t.useMemo,c=t.useDebugValue;st.useSyncExternalStoreWithSelector=function(a,d,p,l,u){var g=o(null);if(g.current===null){var m={hasValue:!1,value:null};g.current=m}else m=g.current;g=s(function(){function h(N){if(!E){if(E=!0,v=N,N=l(N),u!==void 0&&m.hasValue){var S=m.value;if(u(S,N))return C=S}return C=N}if(S=C,n(v,N))return S;var A=l(N);return u!==void 0&&u(S,A)?(v=N,S):(v=N,C=A)}var E=!1,v,C,I=p===void 0?null:p;return[function(){return h(d())},I===null?void 0:function(){return h(I())}]},[d,p,l,u]);var b=r(a,g[0],g[1]);return i(function(){m.hasValue=!0,m.value=b},[b]),c(b),b},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),st}process.env.NODE_ENV==="production"?Go():ko();var Cn=w.version.startsWith("19"),Fo=Symbol.for(Cn?"react.transitional.element":"react.element"),Wo=Symbol.for("react.portal"),On=Symbol.for("react.fragment"),wn=Symbol.for("react.strict_mode"),_n=Symbol.for("react.profiler"),ct=Symbol.for("react.consumer"),at=Symbol.for("react.context"),lt=Symbol.for("react.forward_ref"),An=Symbol.for("react.suspense"),Pn=Symbol.for("react.suspense_list"),Me=Symbol.for("react.memo"),Tn=Symbol.for("react.lazy"),Uo=Symbol.for("react.offscreen"),Ho=Symbol.for("react.client.reference"),zo=lt,qo=Me;function jo(e){return typeof e=="string"||typeof e=="function"||e===On||e===_n||e===wn||e===An||e===Pn||e===Uo||typeof e=="object"&&e!==null&&(e.$$typeof===Tn||e.$$typeof===Me||e.$$typeof===at||e.$$typeof===ct||e.$$typeof===lt||e.$$typeof===Ho||e.getModuleId!==void 0)}function dt(e){if(typeof e=="object"&&e!==null){const{$$typeof:t}=e;switch(t){case Fo:switch(e=e.type,e){case On:case _n:case wn:case An:case Pn:return e;default:switch(e=e&&e.$$typeof,e){case at:case lt:case Tn:case Me:return e;case ct:return e;default:return t}}case Wo:return t}}}function Yo(e){return Cn?dt(e)===ct:dt(e)===at}function Xo(e){return dt(e)===Me}function ut(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function pt(e,t){if(e)(t==="mapStateToProps"||t==="mapDispatchToProps")&&(Object.prototype.hasOwnProperty.call(e,"dependsOnOwnProps")||ut(`The selector for ${t} of connect did not specify a value for dependsOnOwnProps.`));else throw new Error(`Unexpected value for ${t} in connect.`)}function Ko(e,t,n){pt(e,"mapStateToProps"),pt(t,"mapDispatchToProps"),pt(n,"mergeProps")}function Jo(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let c=!1,a,d,p,l,u;function g(v,C){return a=v,d=C,p=e(a,d),l=t(r,d),u=n(p,l,d),c=!0,u}function m(){return p=e(a,d),t.dependsOnOwnProps&&(l=t(r,d)),u=n(p,l,d),u}function b(){return e.dependsOnOwnProps&&(p=e(a,d)),t.dependsOnOwnProps&&(l=t(r,d)),u=n(p,l,d),u}function h(){const v=e(a,d),C=!s(v,p);return p=v,C&&(u=n(p,l,d)),u}function E(v,C){const I=!i(C,d),N=!o(v,a,C,d);return a=v,d=C,I&&N?m():I?b():N?h():u}return function(C,I){return c?E(C,I):g(C,I)}}function Zo(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r,...o}){const i=t(e,o),s=n(e,o),c=r(e,o);return process.env.NODE_ENV!=="production"&&Ko(i,s,c),Jo(i,s,c,e,o)}function Qo(e,t){const n={};for(const r in e){const o=e[r];typeof o=="function"&&(n[r]=(...i)=>t(o(...i)))}return n}function ei(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;let n=t;for(;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return t===n}function Bn(e,t,n){ei(e)||ut(`${n}() in ${t} must return a plain object. Instead received ${e}.`)}function ft(e){return function(n){const r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function Vn(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function Ln(e,t){return function(r,{displayName:o}){const i=function(c,a){return i.dependsOnOwnProps?i.mapToProps(c,a):i.mapToProps(c,void 0)};return i.dependsOnOwnProps=!0,i.mapToProps=function(c,a){i.mapToProps=e,i.dependsOnOwnProps=Vn(e);let d=i(c,a);return typeof d=="function"&&(i.mapToProps=d,i.dependsOnOwnProps=Vn(d),d=i(c,a)),process.env.NODE_ENV!=="production"&&Bn(d,o,t),d},i}}function gt(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function ti(e){return e&&typeof e=="object"?ft(t=>Qo(e,t)):e?typeof e=="function"?Ln(e,"mapDispatchToProps"):gt(e,"mapDispatchToProps"):ft(t=>({dispatch:t}))}function ni(e){return e?typeof e=="function"?Ln(e,"mapStateToProps"):gt(e,"mapStateToProps"):ft(()=>({}))}function ri(e,t,n){return{...n,...e,...t}}function oi(e){return function(n,{displayName:r,areMergedPropsEqual:o}){let i=!1,s;return function(a,d,p){const l=e(a,d,p);return i?o(l,s)||(s=l):(i=!0,s=l,process.env.NODE_ENV!=="production"&&Bn(s,r,"mergeProps")),s}}}function ii(e){return e?typeof e=="function"?oi(e):gt(e,"mergeProps"):()=>ri}function si(e){e()}function ci(){let e=null,t=null;return{clear(){e=null,t=null},notify(){si(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!r||e===null||(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var Rn={notify(){},get:()=>[]};function Mn(e,t){let n,r=Rn,o=0,i=!1;function s(b){p();const h=r.subscribe(b);let E=!1;return()=>{E||(E=!0,h(),l())}}function c(){r.notify()}function a(){m.onStateChange&&m.onStateChange()}function d(){return i}function p(){o++,n||(n=t?t.addNestedSub(a):e.subscribe(a),r=ci())}function l(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=Rn)}function u(){i||(i=!0,p())}function g(){i&&(i=!1,l())}const m={addNestedSub:s,notifyNestedSubs:c,handleChangeWrapper:a,isSubscribed:d,trySubscribe:u,tryUnsubscribe:g,getListeners:()=>r};return m}var ai=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",li=ai(),di=()=>typeof navigator<"u"&&navigator.product==="ReactNative",ui=di(),pi=()=>li||ui?w.useLayoutEffect:w.useEffect,$e=pi();function $n(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function mt(e,t){if($n(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!$n(e[n[o]],t[n[o]]))return!1;return!0}var fi={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},gi={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},mi={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Gn={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},hi={[zo]:mi,[qo]:Gn};function kn(e){return Xo(e)?Gn:hi[e.$$typeof]||fi}var bi=Object.defineProperty,vi=Object.getOwnPropertyNames,Fn=Object.getOwnPropertySymbols,yi=Object.getOwnPropertyDescriptor,Ei=Object.getPrototypeOf,Wn=Object.prototype;function ht(e,t){if(typeof t!="string"){if(Wn){const i=Ei(t);i&&i!==Wn&&ht(e,i)}let n=vi(t);Fn&&(n=n.concat(Fn(t)));const r=kn(e),o=kn(t);for(let i=0;i<n.length;++i){const s=n[i];if(!gi[s]&&!(o&&o[s])&&!(r&&r[s])){const c=yi(t,s);try{bi(e,s,c)}catch{}}}}return e}var bt=Symbol.for("react-redux-context"),vt=typeof globalThis<"u"?globalThis:{};function Di(){if(!w.createContext)return{};const e=vt[bt]??(vt[bt]=new Map);let t=e.get(w.createContext);return t||(t=w.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(w.createContext,t)),t}var Un=Di(),Ni=[null,null],xi=e=>{try{return JSON.stringify(e)}catch{return String(e)}};function Ii(e,t,n){$e(()=>e(...t),n)}function Si(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function Ci(e,t,n,r,o,i,s,c,a,d,p){if(!e)return()=>{};let l=!1,u=null;const g=()=>{if(l||!c.current)return;const b=t.getState();let h,E;try{h=r(b,o.current)}catch(v){E=v,u=v}E||(u=null),h===i.current?s.current||d():(i.current=h,a.current=h,s.current=!0,p())};return n.onStateChange=g,n.trySubscribe(),g(),()=>{if(l=!0,n.tryUnsubscribe(),n.onStateChange=null,u)throw u}}function Oi(e,t){return e===t}var Hn=!1;function wi(e,t,n,{pure:r,areStatesEqual:o=Oi,areOwnPropsEqual:i=mt,areStatePropsEqual:s=mt,areMergedPropsEqual:c=mt,forwardRef:a=!1,context:d=Un}={}){process.env.NODE_ENV!=="production"&&r!==void 0&&!Hn&&(Hn=!0,ut('The `pure` option has been removed. `connect` is now always a "pure/memoized" component'));const p=d,l=ni(e),u=ti(t),g=ii(n),m=!!e;return h=>{if(process.env.NODE_ENV!=="production"&&!jo(h))throw new Error(`You must pass a component to the function returned by connect. Instead received ${xi(h)}`);const E=h.displayName||h.name||"Component",v=`Connect(${E})`,C={shouldHandleStateChanges:m,displayName:v,wrappedComponentName:E,WrappedComponent:h,initMapStateToProps:l,initMapDispatchToProps:u,initMergeProps:g,areStatesEqual:o,areStatePropsEqual:s,areOwnPropsEqual:i,areMergedPropsEqual:c};function I(A){const[T,H,V]=w.useMemo(()=>{const{reactReduxForwardedRef:q,...ge}=A;return[A.context,q,ge]},[A]),z=w.useMemo(()=>{let q=p;if(T!=null&&T.Consumer&&process.env.NODE_ENV!=="production"){if(!Yo(w.createElement(T.Consumer,null)))throw new Error("You must pass a valid React context consumer as `props.context`");q=T}return q},[T,p]),L=w.useContext(z),J=!!A.store&&!!A.store.getState&&!!A.store.dispatch,fe=!!L&&!!L.store;if(process.env.NODE_ENV!=="production"&&!J&&!fe)throw new Error(`Could not find "store" in the context of "${v}". Either wrap the root component in a <Provider>, or pass a custom React context provider to <Provider> and the corresponding React context consumer to ${v} in connect options.`);const Z=J?A.store:L.store,nt=fe?L.getServerState:Z.getState,un=w.useMemo(()=>Zo(Z.dispatch,C),[Z]),[Le,Co]=w.useMemo(()=>{if(!m)return Ni;const q=Mn(Z,J?void 0:L.subscription),ge=q.notifyNestedSubs.bind(q);return[q,ge]},[Z,J,L]),Oo=w.useMemo(()=>J?L:{...L,subscription:Le},[J,L,Le]),pn=w.useRef(void 0),fn=w.useRef(V),Re=w.useRef(void 0),wo=w.useRef(!1),gn=w.useRef(!1),mn=w.useRef(void 0);$e(()=>(gn.current=!0,()=>{gn.current=!1}),[]);const _o=w.useMemo(()=>()=>Re.current&&V===fn.current?Re.current:un(Z.getState(),V),[Z,V]),yd=w.useMemo(()=>ge=>Le?Ci(m,Z,Le,un,fn,pn,wo,gn,Re,Co,ge):()=>{},[Le]);Ii(Si,[fn,pn,wo,V,Re,Co]);let rt;try{rt=w.useSyncExternalStore(yd,_o,nt?()=>un(nt(),V):_o)}catch(q){throw mn.current&&(q.message+=`
|
|
17
|
+
*/var Sn;function ko(){return Sn||(Sn=1,process.env.NODE_ENV!=="production"&&function(){function e(a,d){return a===d&&(a!==0||1/a===1/d)||a!==a&&d!==d}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=D,n=typeof Object.is=="function"?Object.is:e,r=t.useSyncExternalStore,o=t.useRef,i=t.useEffect,s=t.useMemo,c=t.useDebugValue;st.useSyncExternalStoreWithSelector=function(a,d,p,l,u){var g=o(null);if(g.current===null){var m={hasValue:!1,value:null};g.current=m}else m=g.current;g=s(function(){function h(N){if(!E){if(E=!0,v=N,N=l(N),u!==void 0&&m.hasValue){var S=m.value;if(u(S,N))return C=S}return C=N}if(S=C,n(v,N))return S;var A=l(N);return u!==void 0&&u(S,A)?(v=N,S):(v=N,C=A)}var E=!1,v,C,I=p===void 0?null:p;return[function(){return h(d())},I===null?void 0:function(){return h(I())}]},[d,p,l,u]);var b=r(a,g[0],g[1]);return i(function(){m.hasValue=!0,m.value=b},[b]),c(b),b},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),st}process.env.NODE_ENV==="production"?Go():ko();var Cn=_.version.startsWith("19"),Fo=Symbol.for(Cn?"react.transitional.element":"react.element"),Wo=Symbol.for("react.portal"),On=Symbol.for("react.fragment"),wn=Symbol.for("react.strict_mode"),_n=Symbol.for("react.profiler"),ct=Symbol.for("react.consumer"),at=Symbol.for("react.context"),lt=Symbol.for("react.forward_ref"),An=Symbol.for("react.suspense"),Pn=Symbol.for("react.suspense_list"),Me=Symbol.for("react.memo"),Tn=Symbol.for("react.lazy"),Uo=Symbol.for("react.offscreen"),Ho=Symbol.for("react.client.reference"),zo=lt,qo=Me;function jo(e){return typeof e=="string"||typeof e=="function"||e===On||e===_n||e===wn||e===An||e===Pn||e===Uo||typeof e=="object"&&e!==null&&(e.$$typeof===Tn||e.$$typeof===Me||e.$$typeof===at||e.$$typeof===ct||e.$$typeof===lt||e.$$typeof===Ho||e.getModuleId!==void 0)}function dt(e){if(typeof e=="object"&&e!==null){const{$$typeof:t}=e;switch(t){case Fo:switch(e=e.type,e){case On:case _n:case wn:case An:case Pn:return e;default:switch(e=e&&e.$$typeof,e){case at:case lt:case Tn:case Me:return e;case ct:return e;default:return t}}case Wo:return t}}}function Yo(e){return Cn?dt(e)===ct:dt(e)===at}function Xo(e){return dt(e)===Me}function ut(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function pt(e,t){if(e)(t==="mapStateToProps"||t==="mapDispatchToProps")&&(Object.prototype.hasOwnProperty.call(e,"dependsOnOwnProps")||ut(`The selector for ${t} of connect did not specify a value for dependsOnOwnProps.`));else throw new Error(`Unexpected value for ${t} in connect.`)}function Ko(e,t,n){pt(e,"mapStateToProps"),pt(t,"mapDispatchToProps"),pt(n,"mergeProps")}function Jo(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let c=!1,a,d,p,l,u;function g(v,C){return a=v,d=C,p=e(a,d),l=t(r,d),u=n(p,l,d),c=!0,u}function m(){return p=e(a,d),t.dependsOnOwnProps&&(l=t(r,d)),u=n(p,l,d),u}function b(){return e.dependsOnOwnProps&&(p=e(a,d)),t.dependsOnOwnProps&&(l=t(r,d)),u=n(p,l,d),u}function h(){const v=e(a,d),C=!s(v,p);return p=v,C&&(u=n(p,l,d)),u}function E(v,C){const I=!i(C,d),N=!o(v,a,C,d);return a=v,d=C,I&&N?m():I?b():N?h():u}return function(C,I){return c?E(C,I):g(C,I)}}function Zo(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r,...o}){const i=t(e,o),s=n(e,o),c=r(e,o);return process.env.NODE_ENV!=="production"&&Ko(i,s,c),Jo(i,s,c,e,o)}function Qo(e,t){const n={};for(const r in e){const o=e[r];typeof o=="function"&&(n[r]=(...i)=>t(o(...i)))}return n}function ei(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;let n=t;for(;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return t===n}function Bn(e,t,n){ei(e)||ut(`${n}() in ${t} must return a plain object. Instead received ${e}.`)}function ft(e){return function(n){const r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function Vn(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function Ln(e,t){return function(r,{displayName:o}){const i=function(c,a){return i.dependsOnOwnProps?i.mapToProps(c,a):i.mapToProps(c,void 0)};return i.dependsOnOwnProps=!0,i.mapToProps=function(c,a){i.mapToProps=e,i.dependsOnOwnProps=Vn(e);let d=i(c,a);return typeof d=="function"&&(i.mapToProps=d,i.dependsOnOwnProps=Vn(d),d=i(c,a)),process.env.NODE_ENV!=="production"&&Bn(d,o,t),d},i}}function gt(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function ti(e){return e&&typeof e=="object"?ft(t=>Qo(e,t)):e?typeof e=="function"?Ln(e,"mapDispatchToProps"):gt(e,"mapDispatchToProps"):ft(t=>({dispatch:t}))}function ni(e){return e?typeof e=="function"?Ln(e,"mapStateToProps"):gt(e,"mapStateToProps"):ft(()=>({}))}function ri(e,t,n){return{...n,...e,...t}}function oi(e){return function(n,{displayName:r,areMergedPropsEqual:o}){let i=!1,s;return function(a,d,p){const l=e(a,d,p);return i?o(l,s)||(s=l):(i=!0,s=l,process.env.NODE_ENV!=="production"&&Bn(s,r,"mergeProps")),s}}}function ii(e){return e?typeof e=="function"?oi(e):gt(e,"mergeProps"):()=>ri}function si(e){e()}function ci(){let e=null,t=null;return{clear(){e=null,t=null},notify(){si(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!r||e===null||(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var Rn={notify(){},get:()=>[]};function Mn(e,t){let n,r=Rn,o=0,i=!1;function s(b){p();const h=r.subscribe(b);let E=!1;return()=>{E||(E=!0,h(),l())}}function c(){r.notify()}function a(){m.onStateChange&&m.onStateChange()}function d(){return i}function p(){o++,n||(n=t?t.addNestedSub(a):e.subscribe(a),r=ci())}function l(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=Rn)}function u(){i||(i=!0,p())}function g(){i&&(i=!1,l())}const m={addNestedSub:s,notifyNestedSubs:c,handleChangeWrapper:a,isSubscribed:d,trySubscribe:u,tryUnsubscribe:g,getListeners:()=>r};return m}var ai=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",li=ai(),di=()=>typeof navigator<"u"&&navigator.product==="ReactNative",ui=di(),pi=()=>li||ui?_.useLayoutEffect:_.useEffect,$e=pi();function $n(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function mt(e,t){if($n(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!$n(e[n[o]],t[n[o]]))return!1;return!0}var fi={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},gi={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},mi={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Gn={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},hi={[zo]:mi,[qo]:Gn};function kn(e){return Xo(e)?Gn:hi[e.$$typeof]||fi}var bi=Object.defineProperty,vi=Object.getOwnPropertyNames,Fn=Object.getOwnPropertySymbols,yi=Object.getOwnPropertyDescriptor,Ei=Object.getPrototypeOf,Wn=Object.prototype;function ht(e,t){if(typeof t!="string"){if(Wn){const i=Ei(t);i&&i!==Wn&&ht(e,i)}let n=vi(t);Fn&&(n=n.concat(Fn(t)));const r=kn(e),o=kn(t);for(let i=0;i<n.length;++i){const s=n[i];if(!gi[s]&&!(o&&o[s])&&!(r&&r[s])){const c=yi(t,s);try{bi(e,s,c)}catch{}}}}return e}var bt=Symbol.for("react-redux-context"),vt=typeof globalThis<"u"?globalThis:{};function Di(){if(!_.createContext)return{};const e=vt[bt]??(vt[bt]=new Map);let t=e.get(_.createContext);return t||(t=_.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(_.createContext,t)),t}var Un=Di(),Ni=[null,null],xi=e=>{try{return JSON.stringify(e)}catch{return String(e)}};function Ii(e,t,n){$e(()=>e(...t),n)}function Si(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function Ci(e,t,n,r,o,i,s,c,a,d,p){if(!e)return()=>{};let l=!1,u=null;const g=()=>{if(l||!c.current)return;const b=t.getState();let h,E;try{h=r(b,o.current)}catch(v){E=v,u=v}E||(u=null),h===i.current?s.current||d():(i.current=h,a.current=h,s.current=!0,p())};return n.onStateChange=g,n.trySubscribe(),g(),()=>{if(l=!0,n.tryUnsubscribe(),n.onStateChange=null,u)throw u}}function Oi(e,t){return e===t}var Hn=!1;function wi(e,t,n,{pure:r,areStatesEqual:o=Oi,areOwnPropsEqual:i=mt,areStatePropsEqual:s=mt,areMergedPropsEqual:c=mt,forwardRef:a=!1,context:d=Un}={}){process.env.NODE_ENV!=="production"&&r!==void 0&&!Hn&&(Hn=!0,ut('The `pure` option has been removed. `connect` is now always a "pure/memoized" component'));const p=d,l=ni(e),u=ti(t),g=ii(n),m=!!e;return h=>{if(process.env.NODE_ENV!=="production"&&!jo(h))throw new Error(`You must pass a component to the function returned by connect. Instead received ${xi(h)}`);const E=h.displayName||h.name||"Component",v=`Connect(${E})`,C={shouldHandleStateChanges:m,displayName:v,wrappedComponentName:E,WrappedComponent:h,initMapStateToProps:l,initMapDispatchToProps:u,initMergeProps:g,areStatesEqual:o,areStatePropsEqual:s,areOwnPropsEqual:i,areMergedPropsEqual:c};function I(A){const[T,H,V]=_.useMemo(()=>{const{reactReduxForwardedRef:q,...ge}=A;return[A.context,q,ge]},[A]),z=_.useMemo(()=>{let q=p;if(T!=null&&T.Consumer&&process.env.NODE_ENV!=="production"){if(!Yo(_.createElement(T.Consumer,null)))throw new Error("You must pass a valid React context consumer as `props.context`");q=T}return q},[T,p]),L=_.useContext(z),J=!!A.store&&!!A.store.getState&&!!A.store.dispatch,fe=!!L&&!!L.store;if(process.env.NODE_ENV!=="production"&&!J&&!fe)throw new Error(`Could not find "store" in the context of "${v}". Either wrap the root component in a <Provider>, or pass a custom React context provider to <Provider> and the corresponding React context consumer to ${v} in connect options.`);const Z=J?A.store:L.store,nt=fe?L.getServerState:Z.getState,un=_.useMemo(()=>Zo(Z.dispatch,C),[Z]),[Le,Co]=_.useMemo(()=>{if(!m)return Ni;const q=Mn(Z,J?void 0:L.subscription),ge=q.notifyNestedSubs.bind(q);return[q,ge]},[Z,J,L]),Oo=_.useMemo(()=>J?L:{...L,subscription:Le},[J,L,Le]),pn=_.useRef(void 0),fn=_.useRef(V),Re=_.useRef(void 0),wo=_.useRef(!1),gn=_.useRef(!1),mn=_.useRef(void 0);$e(()=>(gn.current=!0,()=>{gn.current=!1}),[]);const _o=_.useMemo(()=>()=>Re.current&&V===fn.current?Re.current:un(Z.getState(),V),[Z,V]),yd=_.useMemo(()=>ge=>Le?Ci(m,Z,Le,un,fn,pn,wo,gn,Re,Co,ge):()=>{},[Le]);Ii(Si,[fn,pn,wo,V,Re,Co]);let rt;try{rt=_.useSyncExternalStore(yd,_o,nt?()=>un(nt(),V):_o)}catch(q){throw mn.current&&(q.message+=`
|
|
18
18
|
The error may be correlated with this previous error:
|
|
19
19
|
${mn.current.stack}
|
|
20
20
|
|
|
21
|
-
`),q}$e(()=>{mn.current=void 0,Re.current=void 0,pn.current=rt});const hn=
|
|
21
|
+
`),q}$e(()=>{mn.current=void 0,Re.current=void 0,pn.current=rt});const hn=_.useMemo(()=>_.createElement(h,{...rt,ref:H}),[H,h,rt]);return _.useMemo(()=>m?_.createElement(z.Provider,{value:Oo},hn):hn,[z,hn,Oo])}const S=_.memo(I);if(S.WrappedComponent=h,S.displayName=I.displayName=v,a){const T=_.forwardRef(function(V,z){return _.createElement(S,{...V,reactReduxForwardedRef:z})});return T.displayName=v,T.WrappedComponent=h,ht(T,h)}return ht(S,h)}}var zn=wi;function _i(e){const{children:t,context:n,serverState:r,store:o}=e,i=_.useMemo(()=>{const a=Mn(o),d={store:o,subscription:a,getServerState:r?()=>r:void 0};if(process.env.NODE_ENV==="production")return d;{const{identityFunctionCheck:p="once",stabilityCheck:l="once"}=e;return Object.assign(d,{stabilityCheck:l,identityFunctionCheck:p})}},[o,r]),s=_.useMemo(()=>o.getState(),[o]);$e(()=>{const{subscription:a}=i;return a.onStateChange=a.notifyNestedSubs,a.trySubscribe(),s!==o.getState()&&a.notifyNestedSubs(),()=>{a.tryUnsubscribe(),a.onStateChange=void 0}},[i,s]);const c=n||Un;return _.createElement(c.Provider,{value:i},t)}var Ai=_i,Pi=process.env.NODE_ENV==="production",yt="Invariant failed";function qn(e,t){if(Pi)throw new Error(yt);var n=typeof t=="function"?t():t,r=n?"".concat(yt,": ").concat(n):yt;throw new Error(r)}var K=function(t){var n=t.top,r=t.right,o=t.bottom,i=t.left,s=r-i,c=o-n,a={top:n,right:r,bottom:o,left:i,width:s,height:c,x:i,y:n,center:{x:(r+i)/2,y:(o+n)/2}};return a},Et=function(t,n){return{top:t.top-n.top,left:t.left-n.left,bottom:t.bottom+n.bottom,right:t.right+n.right}},jn=function(t,n){return{top:t.top+n.top,left:t.left+n.left,bottom:t.bottom-n.bottom,right:t.right-n.right}},Ti=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},Dt={top:0,right:0,bottom:0,left:0},Nt=function(t){var n=t.borderBox,r=t.margin,o=r===void 0?Dt:r,i=t.border,s=i===void 0?Dt:i,c=t.padding,a=c===void 0?Dt:c,d=K(Et(n,o)),p=K(jn(n,s)),l=K(jn(p,a));return{marginBox:d,borderBox:K(n),paddingBox:p,contentBox:l,margin:o,border:s,padding:a}},j=function(t){var n=t.slice(0,-2),r=t.slice(-2);if(r!=="px")return 0;var o=Number(n);return isNaN(o)&&(process.env.NODE_ENV!=="production"?qn(!1,"Could not parse value [raw: "+t+", without suffix: "+n+"]"):qn()),o},Bi=function(){return{x:window.pageXOffset,y:window.pageYOffset}},Ge=function(t,n){var r=t.borderBox,o=t.border,i=t.margin,s=t.padding,c=Ti(r,n);return Nt({borderBox:c,border:o,margin:i,padding:s})},ke=function(t,n){return n===void 0&&(n=Bi()),Ge(t,n)},Yn=function(t,n){var r={top:j(n.marginTop),right:j(n.marginRight),bottom:j(n.marginBottom),left:j(n.marginLeft)},o={top:j(n.paddingTop),right:j(n.paddingRight),bottom:j(n.paddingBottom),left:j(n.paddingLeft)},i={top:j(n.borderTopWidth),right:j(n.borderRightWidth),bottom:j(n.borderBottomWidth),left:j(n.borderLeftWidth)};return Nt({borderBox:t,margin:r,padding:o,border:i})},Xn=function(t){var n=t.getBoundingClientRect(),r=window.getComputedStyle(t);return Yn(n,r)},me=function(t){var n=[],r=null,o=function(){for(var s=arguments.length,c=new Array(s),a=0;a<s;a++)c[a]=arguments[a];n=c,!r&&(r=requestAnimationFrame(function(){r=null,t.apply(void 0,n)}))};return o.cancel=function(){r&&(cancelAnimationFrame(r),r=null)},o};function Fe(){return Fe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fe.apply(null,arguments)}const Vi=process.env.NODE_ENV==="production",Li=/[ \t]{2,}/g,Ri=/^[ \t]*/gm,Kn=e=>e.replace(Li," ").replace(Ri,"").trim(),Mi=e=>Kn(`
|
|
22
22
|
%c@hello-pangea/dnd
|
|
23
23
|
|
|
24
24
|
%c${Kn(e)}
|
|
@@ -181,4 +181,4 @@ ${mn.current.stack}
|
|
|
181
181
|
|
|
182
182
|
Please be sure to add the {provided.placeholder} React Node as a child of your Droppable.
|
|
183
183
|
More information: https://github.com/hello-pangea/dnd/blob/main/docs/api/droppable.md
|
|
184
|
-
`)}],od=[function({props:t}){t.renderClone||(process.env.NODE_ENV!=="production"?f(!1,"Must provide a clone render function (renderClone) for virtual lists"):f())},function({getPlaceholderRef:t}){t()&&(process.env.NODE_ENV!=="production"?f(!1,"Expected virtual list to not have a placeholder"):f())}];function id(e){Te(()=>{an(e,nd),e.props.mode==="standard"&&an(e,rd),e.props.mode==="virtual"&&an(e,od)})}class sd extends D.PureComponent{constructor(...t){super(...t),this.state={isVisible:!!this.props.on,data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{this.state.animate==="close"&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(t,n){return t.shouldAnimate?t.on?{isVisible:!0,data:t.on,animate:"open"}:n.isVisible?{isVisible:!0,data:n.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!t.on,data:t.on,animate:"none"}}render(){if(!this.state.isVisible)return null;const t={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(t)}}const cd=e=>{const t=D.useContext(Ke);t||(process.env.NODE_ENV!=="production"?f(!1,"Could not find app context"):f());const{contextId:n,isMovementAllowed:r}=t,o=D.useRef(null),i=D.useRef(null),{children:s,droppableId:c,type:a,mode:d,direction:p,ignoreContainerClipping:l,isDropDisabled:u,isCombineEnabled:g,snapshot:m,useClone:b,updateViewportMaxScroll:h,getContainerForClone:E}=e,v=x(()=>o.current,[]),C=x((L=null)=>{o.current=L},[]),I=x(()=>i.current,[]),N=x((L=null)=>{i.current=L},[]);id({props:e,getDroppableRef:v,getPlaceholderRef:I});const S=x(()=>{r()&&h({maxScroll:Fr()})},[r,h]);Jl({droppableId:c,type:a,mode:d,direction:p,isDropDisabled:u,isCombineEnabled:g,ignoreContainerClipping:l,getDroppableRef:v});const A=O(()=>D.createElement(sd,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},({onClose:L,data:J,animate:fe})=>D.createElement(td,{placeholder:J,onClose:L,innerRef:N,animate:fe,contextId:n,onTransitionEnd:S})),[n,S,e.placeholder,e.shouldAnimatePlaceholder,N]),T=O(()=>({innerRef:C,placeholder:A,droppableProps:{"data-rfd-droppable-id":c,"data-rfd-droppable-context-id":n}}),[n,c,A,C]),H=b?b.dragging.draggableId:null,V=O(()=>({droppableId:c,type:a,isUsingCloneFor:H}),[c,H,a]);function z(){if(!b)return null;const{dragging:L,render:J}=b,fe=D.createElement(ho,{draggableId:L.draggableId,index:L.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(Z,nt)=>J(Z,nt,L));return ot.createPortal(fe,E())}return D.createElement(tn.Provider,{value:V},s(T,m),z())};function ad(){return document.body||(process.env.NODE_ENV!=="production"?f(!1,"document.body is not ready"):f()),document.body}const No={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:ad},xo=e=>{let t={...e},n;for(n in No)e[n]===void 0&&(t={...t,[n]:No[n]});return t},ln=(e,t)=>e===t.droppable.type,Io=(e,t)=>t.draggables[e.draggable.id],ld=zn(()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},n=M(i=>({draggableId:i.id,type:i.type,source:{index:i.index,droppableId:i.droppableId}})),r=M((i,s,c,a,d,p)=>{const l=d.descriptor.id;if(d.descriptor.droppableId===i){const m=p?{render:p,dragging:n(d.descriptor)}:null,b={isDraggingOver:c,draggingOverWith:c?l:null,draggingFromThisWith:l,isUsingPlaceholder:!0};return{placeholder:d.placeholder,shouldAnimatePlaceholder:!1,snapshot:b,useClone:m}}if(!s)return t;if(!a)return e;const g={isDraggingOver:c,draggingOverWith:l,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:d.placeholder,shouldAnimatePlaceholder:!0,snapshot:g,useClone:null}});return(i,s)=>{const c=xo(s),a=c.droppableId,d=c.type,p=!c.isDropDisabled,l=c.renderClone;if(Be(i)){const u=i.critical;if(!ln(d,u))return t;const g=Io(u,i.dimensions),m=W(i.impact)===a;return r(a,p,m,m,g,l)}if(i.phase==="DROP_ANIMATING"){const u=i.completed;if(!ln(d,u.critical))return t;const g=Io(u.critical,i.dimensions);return r(a,p,go(u.result)===a,W(u.impact)===a,g,l)}if(i.phase==="IDLE"&&i.completed&&!i.shouldFlush){const u=i.completed;if(!ln(d,u.critical))return t;const g=W(u.impact)===a,m=!!(u.impact.at&&u.impact.at.type==="COMBINE"),b=u.critical.droppable.id===a;return g?m?e:t:b?e:t}return t}},{updateViewportMaxScroll:sc},(e,t,n)=>({...xo(n),...e,...t}),{context:Yt,areStatePropsEqual:fo})(cd),dd=()=>y.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{flexShrink:0},children:[y.jsx("path",{d:"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"}),y.jsx("circle",{cx:"12",cy:"10",r:"3"})]}),ud=()=>y.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{flexShrink:0},children:[y.jsx("circle",{cx:"12",cy:"12",r:"10"}),y.jsx("polyline",{points:"12 6 12 12 16 14"})]}),pd=()=>y.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#9ca3af",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{cursor:"grab"},children:[y.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),y.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),y.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]}),fd=()=>y.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[y.jsx("polyline",{points:"15 3 21 3 21 9"}),y.jsx("polyline",{points:"9 21 3 21 3 15"}),y.jsx("line",{x1:"21",y1:"3",x2:"14",y2:"10"}),y.jsx("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]}),gd=()=>y.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[y.jsx("polyline",{points:"4 14 10 14 10 20"}),y.jsx("polyline",{points:"20 10 14 10 14 4"}),y.jsx("line",{x1:"14",y1:"10",x2:"21",y2:"3"}),y.jsx("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]}),So=e=>e?new Date(e).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0}):"--:--",dn=e=>typeof e=="object"&&(e!=null&&e.name)?e.name:e,tt=e=>{var t;return e?typeof e=="string"?e.toLowerCase()==="completed":((t=e==null?void 0:e.code)==null?void 0:t.toLowerCase())==="completed":!1},md=e=>{const t=[];return[...e].sort((r,o)=>r.sequence_rank-o.sequence_rank).forEach(r=>{const o=t[t.length-1];o&&o.stop_id===r.stop_id?o.orders.push(r):t.push({stop_id:r.stop_id,sequence_rank:r.sequence_rank,orders:[r]})}),t},hd=({order:e,pathPeriod:t,isFirst:n,isDone:r,renderOrderExtraData:o})=>{var a,d,p,l,u,g;const[i,s]=D.useState(!1),c=(d=(a=e.customer)==null?void 0:a.address)!=null&&d.lat&&((l=(p=e.customer)==null?void 0:p.address)!=null&&l.long)?`http://googleusercontent.com/maps.google.com/4${e.customer.address.lat},${e.customer.address.long}`:"#";return y.jsxs("div",{style:{..._.orderBlock,borderTop:n?"none":"1px solid #f3f4f6",backgroundColor:r?"#fafafa":"transparent"},children:[y.jsxs("div",{style:_.orderHeader,children:[y.jsxs("div",{style:_.gridItem,children:[y.jsxs("div",{style:_.gridLabel,children:["ORDER"," ",r&&y.jsx("span",{style:{color:"#16a34a",marginLeft:"4px"},children:"✓ DONE"})]}),y.jsxs("div",{style:_.gridValue,children:["#",e.order_id]})]}),o&&y.jsx("button",{onClick:()=>s(!i),style:_.expandButton,children:i?y.jsx(gd,{}):y.jsx(fd,{})})]}),y.jsxs("div",{style:_.detailsGrid,children:[y.jsxs("div",{style:_.gridItem,children:[y.jsx("div",{style:_.gridLabel,children:"LOCATION"}),y.jsxs("div",{style:_.gridValueWithIcon,children:[y.jsx(dd,{}),y.jsx("a",{href:c,target:"_blank",rel:"noopener noreferrer",style:_.addressLink,children:((g=(u=e.customer)==null?void 0:u.address)==null?void 0:g.street_area)||"N/A"})]})]}),y.jsxs("div",{style:_.gridItem,children:[y.jsx("div",{style:_.gridLabel,children:"PERIOD"}),y.jsx("div",{style:_.gridValue,children:t})]}),y.jsxs("div",{style:_.gridItem,children:[y.jsx("div",{style:_.gridLabel,children:"TIME WINDOW"}),y.jsxs("div",{style:_.gridValueWithIcon,children:[y.jsx(ud,{})," ",y.jsxs("span",{children:[So(e.eta_start)," - ",So(e.eta_end)]})]})]})]}),i&&o&&y.jsx("div",{style:_.extraDataContainer,children:o(e)})]})},bd=({stopGroup:e,index:t,pathType:n,pathPeriod:r,canEditPath:o,isPathCompleted:i,renderStopActions:s,renderOrderExtraData:c})=>{const a=e.status?tt(e.status):e.orders.every(l=>tt(l.status)),d=e.status?dn(e.status):a?"Completed":"Pending",p=!o||i||a;return y.jsx($l,{draggableId:e.stop_id.toString(),index:t,isDragDisabled:p,children:l=>{var u,g;return y.jsxs("div",{ref:l.innerRef,...l.draggableProps,style:{..._.timelineItem,...l.draggableProps.style},children:[y.jsx("div",{style:{..._.bubble,...a?_.bubbleCompleted:_.bubblePending},children:t+1}),y.jsxs("div",{style:_.card,children:[y.jsxs("div",{style:_.cardHeader,children:[y.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[y.jsxs("span",{style:_.title,children:[n," #",e.sequence_rank]}),y.jsx("span",{style:a?_.badgeCompleted:_.badgePending,children:d})]}),!p&&y.jsx("div",{...l.dragHandleProps,children:y.jsx(pd,{})})]}),y.jsxs("div",{style:_.customerName,children:["Customer: ",(g=(u=e.orders[0])==null?void 0:u.customer)==null?void 0:g.name]}),y.jsx("div",{style:_.ordersList,children:e.orders.map((m,b)=>y.jsx(hd,{order:m,pathPeriod:r,isFirst:b===0,isDone:tt(m.status),renderOrderExtraData:c},m.id))}),s&&y.jsx("div",{style:_.actionsSlot,children:s(e)})]})]})}})},vd=({path:e,onReorder:t,renderStopActions:n,renderOrderExtraData:r,canEditPath:o=!0})=>{const[i,s]=D.useState([]);D.useEffect(()=>{if(e)if(e.stops&&e.stops.length>0){const d=e.stops.map(p=>({stop_id:p.id,sequence_rank:p.sequence_rank,status:p.status,orders:(e.path_orders||[]).filter(l=>l.stop_id===p.id).sort((l,u)=>l.sequence_rank-u.sequence_rank)})).sort((p,l)=>p.sequence_rank-l.sequence_rank);s(d)}else e.path_orders&&s(md(e.path_orders))},[e]);const c=d=>{if(!d.destination)return;const p=Array.from(i),[l]=p.splice(d.source.index,1);p.splice(d.destination.index,0,l),s(p),t&&t(e.id,p.map(u=>u.stop_id))};if(!e||!i.length)return y.jsx("div",{children:"No Path Data"});const a=tt(e.status);return y.jsx("div",{style:_.container,children:y.jsx(yl,{onDragEnd:c,children:y.jsx(ld,{droppableId:"path-list",children:d=>y.jsxs("div",{ref:d.innerRef,...d.droppableProps,style:_.timelineWrapper,children:[y.jsx("div",{style:_.verticalLine}),y.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"24px"},children:i.map((p,l)=>y.jsx(bd,{stopGroup:p,index:l,pathType:dn(e.type),pathPeriod:dn(e.period),canEditPath:o,isPathCompleted:a,renderStopActions:n,renderOrderExtraData:r},p.stop_id))}),d.placeholder]})})})})},_={container:{fontFamily:"sans-serif",maxWidth:"800px",margin:"0 auto"},timelineWrapper:{position:"relative",padding:"20px 0"},verticalLine:{position:"absolute",left:"19px",top:"40px",bottom:"40px",width:"2px",backgroundColor:"#f3f4f6"},timelineItem:{display:"flex",gap:"16px",marginBottom:"24px",position:"relative",zIndex:1},bubble:{width:"40px",height:"40px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"bold",backgroundColor:"#fff",border:"2px solid",flexShrink:0},bubblePending:{borderColor:"#f3f4f6",color:"#9ca3af"},bubbleCompleted:{borderColor:"#dcfce7",color:"#16a34a",backgroundColor:"#f0fdf4"},card:{flex:1,backgroundColor:"#fff",border:"1px solid #f3f4f6",borderRadius:"12px",padding:"16px",boxShadow:"0 1px 3px rgba(0,0,0,0.1)"},cardHeader:{display:"flex",justifyContent:"space-between",marginBottom:"8px",alignItems:"center"},title:{fontSize:"16px",fontWeight:"bold"},badgePending:{fontSize:"11px",padding:"2px 8px",borderRadius:"12px",backgroundColor:"#f3f4f6",color:"#4b5563",fontWeight:"600"},badgeCompleted:{fontSize:"11px",padding:"2px 8px",borderRadius:"12px",backgroundColor:"#dcfce7",color:"#16a34a",fontWeight:"600"},customerName:{fontSize:"14px",color:"#6b7280",marginBottom:"12px"},ordersList:{backgroundColor:"#f9fafb",borderRadius:"8px",overflow:"hidden"},orderBlock:{padding:"12px",transition:"background-color 0.2s"},orderHeader:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"8px"},detailsGrid:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"12px"},gridItem:{display:"flex",flexDirection:"column"},gridLabel:{fontSize:"10px",color:"#9ca3af",fontWeight:"bold"},gridValue:{fontSize:"13px",fontWeight:"600"},gridValueWithIcon:{fontSize:"13px",display:"flex",alignItems:"flex-start",gap:"4px",color:"#374151"},addressLink:{color:"#3b82f6",textDecoration:"underline",wordBreak:"break-word",lineHeight:"1.4"},expandButton:{background:"none",border:"none",cursor:"pointer",color:"#6b7280",padding:"4px"},extraDataContainer:{marginTop:"12px",padding:"12px",borderTop:"1px dashed #e5e7eb",backgroundColor:"#fff",borderRadius:"4px"},actionsSlot:{marginTop:"16px"}};Q.LogisticsDashboard=vd,Object.defineProperty(Q,Symbol.toStringTag,{value:"Module"})});
|
|
184
|
+
`)}],od=[function({props:t}){t.renderClone||(process.env.NODE_ENV!=="production"?f(!1,"Must provide a clone render function (renderClone) for virtual lists"):f())},function({getPlaceholderRef:t}){t()&&(process.env.NODE_ENV!=="production"?f(!1,"Expected virtual list to not have a placeholder"):f())}];function id(e){Te(()=>{an(e,nd),e.props.mode==="standard"&&an(e,rd),e.props.mode==="virtual"&&an(e,od)})}class sd extends D.PureComponent{constructor(...t){super(...t),this.state={isVisible:!!this.props.on,data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{this.state.animate==="close"&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(t,n){return t.shouldAnimate?t.on?{isVisible:!0,data:t.on,animate:"open"}:n.isVisible?{isVisible:!0,data:n.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!t.on,data:t.on,animate:"none"}}render(){if(!this.state.isVisible)return null;const t={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(t)}}const cd=e=>{const t=D.useContext(Ke);t||(process.env.NODE_ENV!=="production"?f(!1,"Could not find app context"):f());const{contextId:n,isMovementAllowed:r}=t,o=D.useRef(null),i=D.useRef(null),{children:s,droppableId:c,type:a,mode:d,direction:p,ignoreContainerClipping:l,isDropDisabled:u,isCombineEnabled:g,snapshot:m,useClone:b,updateViewportMaxScroll:h,getContainerForClone:E}=e,v=x(()=>o.current,[]),C=x((L=null)=>{o.current=L},[]),I=x(()=>i.current,[]),N=x((L=null)=>{i.current=L},[]);id({props:e,getDroppableRef:v,getPlaceholderRef:I});const S=x(()=>{r()&&h({maxScroll:Fr()})},[r,h]);Jl({droppableId:c,type:a,mode:d,direction:p,isDropDisabled:u,isCombineEnabled:g,ignoreContainerClipping:l,getDroppableRef:v});const A=O(()=>D.createElement(sd,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},({onClose:L,data:J,animate:fe})=>D.createElement(td,{placeholder:J,onClose:L,innerRef:N,animate:fe,contextId:n,onTransitionEnd:S})),[n,S,e.placeholder,e.shouldAnimatePlaceholder,N]),T=O(()=>({innerRef:C,placeholder:A,droppableProps:{"data-rfd-droppable-id":c,"data-rfd-droppable-context-id":n}}),[n,c,A,C]),H=b?b.dragging.draggableId:null,V=O(()=>({droppableId:c,type:a,isUsingCloneFor:H}),[c,H,a]);function z(){if(!b)return null;const{dragging:L,render:J}=b,fe=D.createElement(ho,{draggableId:L.draggableId,index:L.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(Z,nt)=>J(Z,nt,L));return ot.createPortal(fe,E())}return D.createElement(tn.Provider,{value:V},s(T,m),z())};function ad(){return document.body||(process.env.NODE_ENV!=="production"?f(!1,"document.body is not ready"):f()),document.body}const No={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:ad},xo=e=>{let t={...e},n;for(n in No)e[n]===void 0&&(t={...t,[n]:No[n]});return t},ln=(e,t)=>e===t.droppable.type,Io=(e,t)=>t.draggables[e.draggable.id],ld=zn(()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},n=M(i=>({draggableId:i.id,type:i.type,source:{index:i.index,droppableId:i.droppableId}})),r=M((i,s,c,a,d,p)=>{const l=d.descriptor.id;if(d.descriptor.droppableId===i){const m=p?{render:p,dragging:n(d.descriptor)}:null,b={isDraggingOver:c,draggingOverWith:c?l:null,draggingFromThisWith:l,isUsingPlaceholder:!0};return{placeholder:d.placeholder,shouldAnimatePlaceholder:!1,snapshot:b,useClone:m}}if(!s)return t;if(!a)return e;const g={isDraggingOver:c,draggingOverWith:l,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:d.placeholder,shouldAnimatePlaceholder:!0,snapshot:g,useClone:null}});return(i,s)=>{const c=xo(s),a=c.droppableId,d=c.type,p=!c.isDropDisabled,l=c.renderClone;if(Be(i)){const u=i.critical;if(!ln(d,u))return t;const g=Io(u,i.dimensions),m=W(i.impact)===a;return r(a,p,m,m,g,l)}if(i.phase==="DROP_ANIMATING"){const u=i.completed;if(!ln(d,u.critical))return t;const g=Io(u.critical,i.dimensions);return r(a,p,go(u.result)===a,W(u.impact)===a,g,l)}if(i.phase==="IDLE"&&i.completed&&!i.shouldFlush){const u=i.completed;if(!ln(d,u.critical))return t;const g=W(u.impact)===a,m=!!(u.impact.at&&u.impact.at.type==="COMBINE"),b=u.critical.droppable.id===a;return g?m?e:t:b?e:t}return t}},{updateViewportMaxScroll:sc},(e,t,n)=>({...xo(n),...e,...t}),{context:Yt,areStatePropsEqual:fo})(cd),dd=()=>y.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{flexShrink:0},children:[y.jsx("path",{d:"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"}),y.jsx("circle",{cx:"12",cy:"10",r:"3"})]}),ud=()=>y.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{flexShrink:0},children:[y.jsx("circle",{cx:"12",cy:"12",r:"10"}),y.jsx("polyline",{points:"12 6 12 12 16 14"})]}),pd=()=>y.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#9ca3af",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{cursor:"grab"},children:[y.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),y.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),y.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]}),fd=()=>y.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[y.jsx("polyline",{points:"15 3 21 3 21 9"}),y.jsx("polyline",{points:"9 21 3 21 3 15"}),y.jsx("line",{x1:"21",y1:"3",x2:"14",y2:"10"}),y.jsx("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]}),gd=()=>y.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[y.jsx("polyline",{points:"4 14 10 14 10 20"}),y.jsx("polyline",{points:"20 10 14 10 14 4"}),y.jsx("line",{x1:"14",y1:"10",x2:"21",y2:"3"}),y.jsx("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]}),So=e=>e?new Date(e).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0}):"--:--",dn=e=>typeof e=="object"&&(e!=null&&e.name)?e.name:e,tt=e=>{var t;return e?typeof e=="string"?e.toLowerCase()==="completed":((t=e==null?void 0:e.code)==null?void 0:t.toLowerCase())==="completed":!1},md=e=>{const t=[];return[...e].sort((r,o)=>r.sequence_rank-o.sequence_rank).forEach(r=>{const o=t[t.length-1];o&&o.stop_id===r.stop_id?o.orders.push(r):t.push({stop_id:r.stop_id,sequence_rank:r.sequence_rank,orders:[r]})}),t},hd=({order:e,pathPeriod:t,isFirst:n,isDone:r,renderOrderExtraData:o})=>{var a,d,p,l,u,g;const[i,s]=D.useState(!1),c=(d=(a=e.customer)==null?void 0:a.address)!=null&&d.lat&&((l=(p=e.customer)==null?void 0:p.address)!=null&&l.long)?`http://googleusercontent.com/maps.google.com/4${e.customer.address.lat},${e.customer.address.long}`:"#";return y.jsxs("div",{style:{...w.orderBlock,borderTop:n?"none":"1px solid #f3f4f6",backgroundColor:r?"#fafafa":"transparent"},children:[y.jsxs("div",{style:w.orderHeader,children:[y.jsxs("div",{style:w.gridItem,children:[y.jsxs("div",{style:w.gridLabel,children:["ORDER"," ",r&&y.jsx("span",{style:{color:"#16a34a",marginLeft:"4px"},children:"✓ DONE"})]}),y.jsxs("div",{style:w.gridValue,children:["#",e.order_id]})]}),o&&y.jsx("button",{onClick:()=>s(!i),style:w.expandButton,children:i?y.jsx(gd,{}):y.jsx(fd,{})})]}),y.jsxs("div",{style:w.detailsGrid,children:[y.jsxs("div",{style:w.gridItem,children:[y.jsx("div",{style:w.gridLabel,children:"LOCATION"}),y.jsxs("div",{style:w.gridValueWithIcon,children:[y.jsx(dd,{}),y.jsx("a",{href:c,target:"_blank",rel:"noopener noreferrer",style:w.addressLink,children:((g=(u=e.customer)==null?void 0:u.address)==null?void 0:g.street_area)||"N/A"})]})]}),y.jsxs("div",{style:w.gridItem,children:[y.jsx("div",{style:w.gridLabel,children:"PERIOD"}),y.jsx("div",{style:w.gridValue,children:t})]}),y.jsxs("div",{style:w.gridItem,children:[y.jsx("div",{style:w.gridLabel,children:"TIME WINDOW"}),y.jsxs("div",{style:w.gridValueWithIcon,children:[y.jsx(ud,{})," ",y.jsxs("span",{style:w.direction,children:[So(e.eta_start)," - ",So(e.eta_end)]})]})]})]}),i&&o&&y.jsx("div",{style:w.extraDataContainer,children:o(e)})]})},bd=({stopGroup:e,index:t,pathType:n,pathPeriod:r,canEditPath:o,isPathCompleted:i,renderStopActions:s,renderOrderExtraData:c})=>{const a=e.status?tt(e.status):e.orders.every(l=>tt(l.status)),d=e.status?dn(e.status):a?"Completed":"Pending",p=!o||i||a;return y.jsx($l,{draggableId:e.stop_id.toString(),index:t,isDragDisabled:p,children:l=>{var u,g;return y.jsxs("div",{ref:l.innerRef,...l.draggableProps,style:{...w.timelineItem,...l.draggableProps.style},children:[y.jsx("div",{style:{...w.bubble,...a?w.bubbleCompleted:w.bubblePending},children:t+1}),y.jsxs("div",{style:w.card,children:[y.jsxs("div",{style:w.cardHeader,children:[y.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[y.jsxs("span",{style:w.title,children:[n," #",e.sequence_rank]}),y.jsx("span",{style:a?w.badgeCompleted:w.badgePending,children:d})]}),!p&&y.jsx("div",{...l.dragHandleProps,children:y.jsx(pd,{})})]}),y.jsxs("div",{style:w.customerName,children:["Customer: ",(g=(u=e.orders[0])==null?void 0:u.customer)==null?void 0:g.name]}),y.jsx("div",{style:w.ordersList,children:e.orders.map((m,b)=>y.jsx(hd,{order:m,pathPeriod:r,isFirst:b===0,isDone:tt(m.status),renderOrderExtraData:c},m.id))}),s&&y.jsx("div",{style:w.actionsSlot,children:s(e)})]})]})}})},vd=({path:e,onReorder:t,renderStopActions:n,renderOrderExtraData:r,canEditPath:o=!0})=>{const[i,s]=D.useState([]);D.useEffect(()=>{if(e)if(e.stops&&e.stops.length>0){const d=e.stops.map(p=>({stop_id:p.id,sequence_rank:p.sequence_rank,status:p.status,orders:(e.path_orders||[]).filter(l=>l.stop_id===p.id).sort((l,u)=>l.sequence_rank-u.sequence_rank)})).sort((p,l)=>p.sequence_rank-l.sequence_rank);s(d)}else e.path_orders&&s(md(e.path_orders))},[e]);const c=d=>{if(!d.destination)return;const p=Array.from(i),[l]=p.splice(d.source.index,1);p.splice(d.destination.index,0,l),s(p),t&&t(e.id,p.map(u=>u.stop_id))};if(!e||!i.length)return y.jsx("div",{children:"No Path Data"});const a=tt(e.status);return y.jsx("div",{style:w.container,children:y.jsx(yl,{onDragEnd:c,children:y.jsx(ld,{droppableId:"path-list",children:d=>y.jsxs("div",{ref:d.innerRef,...d.droppableProps,style:w.timelineWrapper,children:[y.jsx("div",{style:w.verticalLine}),y.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"24px"},children:i.map((p,l)=>y.jsx(bd,{stopGroup:p,index:l,pathType:dn(e.type),pathPeriod:dn(e.period),canEditPath:o,isPathCompleted:a,renderStopActions:n,renderOrderExtraData:r},p.stop_id))}),d.placeholder]})})})})},w={container:{fontFamily:"sans-serif",maxWidth:"800px",margin:"0 auto"},timelineWrapper:{position:"relative",padding:"20px 0"},verticalLine:{position:"absolute",insetInlineStart:"19px",top:"40px",bottom:"40px",width:"2px",backgroundColor:"#f3f4f6"},timelineItem:{display:"flex",gap:"16px",marginBottom:"24px",position:"relative",zIndex:1},bubble:{width:"40px",height:"40px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"bold",backgroundColor:"#fff",border:"2px solid",flexShrink:0},bubblePending:{borderColor:"#f3f4f6",color:"#9ca3af"},bubbleCompleted:{borderColor:"#dcfce7",color:"#16a34a",backgroundColor:"#f0fdf4"},card:{flex:1,backgroundColor:"#fff",border:"1px solid #f3f4f6",borderRadius:"12px",padding:"16px",boxShadow:"0 1px 3px rgba(0,0,0,0.1)"},cardHeader:{display:"flex",justifyContent:"space-between",marginBottom:"8px",alignItems:"center"},title:{fontSize:"16px",fontWeight:"bold"},badgePending:{fontSize:"11px",padding:"2px 8px",borderRadius:"12px",backgroundColor:"#f3f4f6",color:"#4b5563",fontWeight:"600"},badgeCompleted:{fontSize:"11px",padding:"2px 8px",borderRadius:"12px",backgroundColor:"#dcfce7",color:"#16a34a",fontWeight:"600"},customerName:{fontSize:"14px",color:"#6b7280",marginBottom:"12px"},ordersList:{backgroundColor:"#f9fafb",borderRadius:"8px",overflow:"hidden"},orderBlock:{padding:"12px",transition:"background-color 0.2s"},orderHeader:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"8px"},detailsGrid:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"12px"},gridItem:{display:"flex",flexDirection:"column"},gridLabel:{fontSize:"10px",color:"#9ca3af",fontWeight:"bold"},gridValue:{fontSize:"13px",fontWeight:"600"},gridValueWithIcon:{fontSize:"13px",display:"flex",alignItems:"flex-start",gap:"4px",color:"#374151"},direction:{direction:"ltr"},addressLink:{color:"#3b82f6",textDecoration:"underline",wordBreak:"break-word",lineHeight:"1.4"},expandButton:{background:"none",border:"none",cursor:"pointer",color:"#6b7280",padding:"4px"},extraDataContainer:{marginTop:"12px",padding:"12px",borderTop:"1px dashed #e5e7eb",backgroundColor:"#fff",borderRadius:"4px"},actionsSlot:{marginTop:"16px"}};Q.LogisticsDashboard=vd,Object.defineProperty(Q,Symbol.toStringTag,{value:"Module"})});
|