@juspay/svelte-ui-components 4.57.2 → 4.57.4
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.
|
@@ -900,8 +900,11 @@
|
|
|
900
900
|
caret-color: var(--chat-composer-color, #18181b);
|
|
901
901
|
}
|
|
902
902
|
|
|
903
|
+
/* A ::selection rule replaces the browser's whole highlight, so it has to paint its own
|
|
904
|
+
background too; Highlight is the colour a composer without inline mentions selects with. */
|
|
903
905
|
.input.inline-mentions::selection {
|
|
904
906
|
color: var(--chat-composer-color, #18181b);
|
|
907
|
+
background-color: var(--chat-composer-selection-background, Highlight);
|
|
905
908
|
}
|
|
906
909
|
|
|
907
910
|
.input-highlights {
|
|
@@ -141,6 +141,17 @@
|
|
|
141
141
|
|
|
142
142
|
const MS_PER_DAY = 24 * 60 * 60 * 1000;
|
|
143
143
|
|
|
144
|
+
// Whole calendar days from one date to another, ignoring the time of day. A boundary
|
|
145
|
+
// can carry a time while a clicked or typed date is midnight, and rounding the elapsed
|
|
146
|
+
// time then miscounts: from 13:00, midnight of the same day rounds to a day away and
|
|
147
|
+
// midnight of the next day to none. Date.UTC also keeps a daylight-saving change from
|
|
148
|
+
// shortening or lengthening a day.
|
|
149
|
+
function calendarDaysBetween(from: Date, to: Date): number {
|
|
150
|
+
const fromDay = Date.UTC(from.getFullYear(), from.getMonth(), from.getDate());
|
|
151
|
+
const toDay = Date.UTC(to.getFullYear(), to.getMonth(), to.getDate());
|
|
152
|
+
return (toDay - fromDay) / MS_PER_DAY;
|
|
153
|
+
}
|
|
154
|
+
|
|
144
155
|
function isBaseDisabledDate(date: Date): boolean {
|
|
145
156
|
if (typeof disabledDates === 'function') {
|
|
146
157
|
return disabledDates(date);
|
|
@@ -168,7 +179,7 @@
|
|
|
168
179
|
if (!selecting || anchor === null) {
|
|
169
180
|
return false;
|
|
170
181
|
}
|
|
171
|
-
const diffDays = Math.abs(
|
|
182
|
+
const diffDays = Math.abs(calendarDaysBetween(anchor, date));
|
|
172
183
|
return diffDays > limit - 1;
|
|
173
184
|
};
|
|
174
185
|
});
|
|
@@ -757,7 +768,8 @@
|
|
|
757
768
|
// Three ways a parsed date is refused:
|
|
758
769
|
// 1. it isn't selectable at all (minDate/maxDate/disabled, and the maxRangeDays
|
|
759
770
|
// span while a range is mid-selection),
|
|
760
|
-
// 2. it crosses the opposite boundary (a start after the end, or vice versa
|
|
771
|
+
// 2. it crosses the opposite boundary (a start after the end, or vice versa; with
|
|
772
|
+
// the time inputs showing, only a different day can cross),
|
|
761
773
|
// 3. it would stretch an *already-complete* range past maxRangeDays.
|
|
762
774
|
// Case 3 is not covered by isDateSelectable: rangeConstrainedDisabledDates only
|
|
763
775
|
// applies its span check while `selecting` is true (draftStart set, draftEnd still
|
|
@@ -771,16 +783,22 @@
|
|
|
771
783
|
if (otherBoundaryDate === null) {
|
|
772
784
|
return true;
|
|
773
785
|
}
|
|
786
|
+
// A typed date has no time of day, so a same-day range with times (an hour preset,
|
|
787
|
+
// 06:00 to 18:00) parses its end to midnight, before the start. With the time inputs
|
|
788
|
+
// showing, isTimeRangeValid already keeps a same-day start time at or before the end
|
|
789
|
+
// time, so the date only crosses the other boundary when it is a different day.
|
|
790
|
+
// Without them the draft's own time is the only one there is, so it is compared too.
|
|
791
|
+
const isSameDayWithTimeInputs = showTimeSelection && isSameDay(candidate, otherBoundaryDate);
|
|
774
792
|
const crossesOtherBoundary =
|
|
775
|
-
|
|
793
|
+
!isSameDayWithTimeInputs &&
|
|
794
|
+
(boundary === 'start'
|
|
776
795
|
? candidate.getTime() > otherBoundaryDate.getTime()
|
|
777
|
-
: candidate.getTime() < otherBoundaryDate.getTime();
|
|
796
|
+
: candidate.getTime() < otherBoundaryDate.getTime());
|
|
778
797
|
if (crossesOtherBoundary) {
|
|
779
798
|
return false;
|
|
780
799
|
}
|
|
781
800
|
if (maxRangeDays !== null) {
|
|
782
|
-
const spanDays =
|
|
783
|
-
Math.abs(Math.round((candidate.getTime() - otherBoundaryDate.getTime()) / MS_PER_DAY)) + 1;
|
|
801
|
+
const spanDays = Math.abs(calendarDaysBetween(otherBoundaryDate, candidate)) + 1;
|
|
784
802
|
if (spanDays > maxRangeDays) {
|
|
785
803
|
return false;
|
|
786
804
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -145,9 +145,11 @@ export type { SortTableRowsOptions, TableSortType } from './Table/sortEngine';
|
|
|
145
145
|
export type * from './Stepper/properties';
|
|
146
146
|
export type { Step as StepperStep } from './Stepper/properties';
|
|
147
147
|
export type * from './Toast/properties';
|
|
148
|
+
export type * from './GridItem/properties';
|
|
148
149
|
export type * from './IconStack/properties';
|
|
149
150
|
export type * from './Img/properties';
|
|
150
151
|
export type * from './Checkbox/properties';
|
|
152
|
+
export type * from './CheckListItem/properties';
|
|
151
153
|
export type * from './Radio/properties';
|
|
152
154
|
export type * from './Avatar/properties';
|
|
153
155
|
export type * from './Tabs/properties';
|
|
@@ -180,6 +182,7 @@ export type * from './RelativeTime/properties';
|
|
|
180
182
|
export type * from './ThemeSwitcher/properties';
|
|
181
183
|
export type * from './ThinkingIndicator/properties';
|
|
182
184
|
export type * from './ThinkingOrb/properties';
|
|
185
|
+
export type * from './Toggle/properties';
|
|
183
186
|
export type * from './ToolCallLog/properties';
|
|
184
187
|
export type * from './TaskList/properties';
|
|
185
188
|
export type * from './SoundKit/properties';
|
package/dist-wc/index.js
CHANGED
|
@@ -29247,57 +29247,61 @@ function DateRangePicker(e, t) {
|
|
|
29247
29247
|
})), Lt = /* @__PURE__ */ state(proxy({
|
|
29248
29248
|
start: null,
|
|
29249
29249
|
end: null
|
|
29250
|
-
})), Rt = /* @__PURE__ */ state(null), zt = /* @__PURE__ */ state("12:00 AM"), Bt = /* @__PURE__ */ state("11:59 PM"), Ht = /* @__PURE__ */ state(!1), Gt = /* @__PURE__ */ state(null), qt = /* @__PURE__ */ state(null), Zt = /* @__PURE__ */ user_derived(() => get(Gt) ?? (get(Mt) === null ? "" :
|
|
29251
|
-
function tn(e) {
|
|
29252
|
-
|
|
29250
|
+
})), Rt = /* @__PURE__ */ state(null), zt = /* @__PURE__ */ state("12:00 AM"), Bt = /* @__PURE__ */ state("11:59 PM"), Ht = /* @__PURE__ */ state(!1), Gt = /* @__PURE__ */ state(null), qt = /* @__PURE__ */ state(null), Zt = /* @__PURE__ */ user_derived(() => get(Gt) ?? (get(Mt) === null ? "" : Tn(get(Mt)))), Qt = /* @__PURE__ */ user_derived(() => get(qt) ?? (get(Nt) === null ? "" : Tn(get(Nt)))), $t = /* @__PURE__ */ user_derived(() => k() && R() === "inline" && c() === "range"), en = 1440 * 60 * 1e3;
|
|
29251
|
+
function tn(e, t) {
|
|
29252
|
+
let n = Date.UTC(e.getFullYear(), e.getMonth(), e.getDate());
|
|
29253
|
+
return (Date.UTC(t.getFullYear(), t.getMonth(), t.getDate()) - n) / 864e5;
|
|
29253
29254
|
}
|
|
29254
|
-
|
|
29255
|
+
function nn(e) {
|
|
29256
|
+
return typeof f() == "function" ? f()(e) : f().some((t) => Dr(t, e));
|
|
29257
|
+
}
|
|
29258
|
+
let rn = /* @__PURE__ */ user_derived(() => {
|
|
29255
29259
|
let e = p();
|
|
29256
|
-
if (e === null) return (e) =>
|
|
29260
|
+
if (e === null) return (e) => nn(e);
|
|
29257
29261
|
let t = get(Mt), n = t !== null && get(Nt) === null;
|
|
29258
|
-
return (i) =>
|
|
29259
|
-
}),
|
|
29262
|
+
return (i) => nn(i) ? !0 : !n || t === null ? !1 : Math.abs(tn(t, i)) > e - 1;
|
|
29263
|
+
}), an = /* @__PURE__ */ state(!1), on = /* @__PURE__ */ state(null), sn = /* @__PURE__ */ state(null), cn = /* @__PURE__ */ state(null), ln = /* @__PURE__ */ state(!1), un = /* @__PURE__ */ state(null), dn = /* @__PURE__ */ state(null), fn = null, pn = null, mn = untrack(() => {
|
|
29260
29264
|
if (typeof mt() == "string" && mt() !== "" && h() !== null && h().length > 0) {
|
|
29261
29265
|
let e = h().find((e) => e.label === mt());
|
|
29262
29266
|
return e ? e.label : null;
|
|
29263
29267
|
}
|
|
29264
29268
|
return null;
|
|
29265
|
-
}),
|
|
29269
|
+
}), hn = /* @__PURE__ */ state(proxy(mn)), gn = /* @__PURE__ */ state(proxy(mn));
|
|
29266
29270
|
user_pre_effect(() => {
|
|
29267
|
-
if (
|
|
29268
|
-
let e = h().find((e) => e.label ===
|
|
29271
|
+
if (mn !== null && h() !== null && get(Mt) === null && get(Nt) === null && get(Pt) === null) {
|
|
29272
|
+
let e = h().find((e) => e.label === mn) ?? null;
|
|
29269
29273
|
if (e !== null) {
|
|
29270
29274
|
let { start: t, end: n } = e.getValue();
|
|
29271
29275
|
c() === "single" ? set(Pt, t, !0) : (set(Mt, t, !0), set(Nt, n, !0));
|
|
29272
29276
|
}
|
|
29273
29277
|
}
|
|
29274
29278
|
});
|
|
29275
|
-
let
|
|
29279
|
+
let _n = new SvelteDate(), vn = /* @__PURE__ */ state(proxy(_n.getFullYear())), yn = /* @__PURE__ */ state(proxy(_n.getMonth())), bn = /* @__PURE__ */ state(0), xn = /* @__PURE__ */ user_derived(() => new SvelteDate(get(vn), get(yn), 1)), Sn = /* @__PURE__ */ user_derived(() => new SvelteDate(get(vn), get(yn) + 1, 1)), Cn = /* @__PURE__ */ user_derived(() => get(Sn).toLocaleDateString(ct(), {
|
|
29276
29280
|
month: "long",
|
|
29277
29281
|
year: "numeric"
|
|
29278
|
-
})),
|
|
29282
|
+
})), wn = /* @__PURE__ */ user_derived(() => get(xn).toLocaleDateString(ct(), {
|
|
29279
29283
|
month: "long",
|
|
29280
29284
|
year: "numeric"
|
|
29281
29285
|
}));
|
|
29282
|
-
function
|
|
29286
|
+
function Tn(e) {
|
|
29283
29287
|
return e.toLocaleDateString(ct(), {
|
|
29284
29288
|
month: "short",
|
|
29285
29289
|
day: "numeric",
|
|
29286
29290
|
year: "numeric"
|
|
29287
29291
|
});
|
|
29288
29292
|
}
|
|
29289
|
-
let
|
|
29293
|
+
let En = /* @__PURE__ */ user_derived(() => TIME_DISPLAY_PATTERN.test(get(zt).trim())), Dn = /* @__PURE__ */ user_derived(() => TIME_DISPLAY_PATTERN.test(get(Bt).trim())), On = /* @__PURE__ */ user_derived(() => {
|
|
29290
29294
|
if (!k()) return !0;
|
|
29291
|
-
if (!get(
|
|
29292
|
-
if (get(Mt) === null || get(Nt) === null || !
|
|
29295
|
+
if (!get(En) || !get(Dn)) return !1;
|
|
29296
|
+
if (get(Mt) === null || get(Nt) === null || !Dr(get(Mt), get(Nt))) return !0;
|
|
29293
29297
|
let e = toMinutesOfDay(get(zt)), t = toMinutesOfDay(get(Bt));
|
|
29294
29298
|
return e === null || t === null || e <= t;
|
|
29295
|
-
}),
|
|
29296
|
-
function
|
|
29299
|
+
}), kn = /* @__PURE__ */ user_derived(() => get(hn) === null ? c() === "single" ? s() === null ? ne() : Tn(s()) : a() !== null && o() !== null ? `${Tn(a())} – ${Tn(o())}` : a() === null ? ne() : `${Tn(a())} – ...` : get(hn)), An = /* @__PURE__ */ user_derived(() => Ue() !== null && it() !== null ? `${Tn(Ue())} – ${Tn(it())}` : ne());
|
|
29300
|
+
function jn(e) {
|
|
29297
29301
|
let { first: t } = getFocusTrapBoundary(e);
|
|
29298
29302
|
t?.focus();
|
|
29299
29303
|
}
|
|
29300
|
-
function
|
|
29304
|
+
function Mn(e, t) {
|
|
29301
29305
|
if (t.key !== "Tab") return;
|
|
29302
29306
|
let n = focusTrapTabTarget({
|
|
29303
29307
|
container: e,
|
|
@@ -29306,79 +29310,79 @@ function DateRangePicker(e, t) {
|
|
|
29306
29310
|
});
|
|
29307
29311
|
n !== null && (t.preventDefault(), n.focus());
|
|
29308
29312
|
}
|
|
29309
|
-
let
|
|
29310
|
-
function
|
|
29313
|
+
let Nn = (e, t) => (e === null ? null : e.getTime()) === (t === null ? null : t.getTime()), Pn = /* @__PURE__ */ user_derived(() => typeof at() == "function" && typeof ht() != "function");
|
|
29314
|
+
function Fn() {
|
|
29311
29315
|
set(Lt, {
|
|
29312
29316
|
start: Ue(),
|
|
29313
29317
|
end: it()
|
|
29314
29318
|
}, !0), get(It).start = Ue(), get(It).end = it();
|
|
29315
29319
|
}
|
|
29316
|
-
let
|
|
29320
|
+
let In = /* @__PURE__ */ user_derived(() => !Nn(get(It).start, get(Lt).start) || !Nn(get(It).end, get(Lt).end) ? {
|
|
29317
29321
|
start: get(It).start,
|
|
29318
29322
|
end: get(It).end
|
|
29319
29323
|
} : {
|
|
29320
29324
|
start: Ue(),
|
|
29321
29325
|
end: it()
|
|
29322
|
-
}),
|
|
29323
|
-
function
|
|
29324
|
-
let { start: e, end: t } = get(
|
|
29326
|
+
}), Ln = /* @__PURE__ */ user_derived(() => get(In).start !== null && get(In).end !== null);
|
|
29327
|
+
function Rn() {
|
|
29328
|
+
let { start: e, end: t } = get(In);
|
|
29325
29329
|
e === null || t === null || (Ue(e), it(t), yt()?.({
|
|
29326
29330
|
compareStart: e,
|
|
29327
29331
|
compareEnd: t,
|
|
29328
29332
|
presetLabel: get(Rt)
|
|
29329
29333
|
}));
|
|
29330
29334
|
}
|
|
29331
|
-
function Rn() {
|
|
29332
|
-
Mn(Ue(), get(Lt).start) || Ue(get(Lt).start), Mn(it(), get(Lt).end) || it(get(Lt).end), get(It).start = get(Lt).start, get(It).end = get(Lt).end;
|
|
29333
|
-
}
|
|
29334
29335
|
function zn() {
|
|
29335
|
-
get(Nn)
|
|
29336
|
+
Nn(Ue(), get(Lt).start) || Ue(get(Lt).start), Nn(it(), get(Lt).end) || it(get(Lt).end), get(It).start = get(Lt).start, get(It).end = get(Lt).end;
|
|
29336
29337
|
}
|
|
29337
29338
|
function Bn() {
|
|
29338
|
-
|
|
29339
|
-
let e = a() === null ? s() === null ? gn : s() : a();
|
|
29340
|
-
set(_n, e.getFullYear(), !0), set(vn, e.getMonth(), !0), update(yn), set(rn, !0), xt()?.({ open: !0 }), tick().then(() => An(get(an)));
|
|
29339
|
+
get(Pn) && zn(), Hn();
|
|
29341
29340
|
}
|
|
29342
29341
|
function Vn() {
|
|
29343
|
-
set(
|
|
29344
|
-
let e =
|
|
29345
|
-
|
|
29342
|
+
pn = get(sn) ? findInteractive(get(sn)) : null, set(Mt, a(), !0), set(Nt, o(), !0), set(Pt, s(), !0), get(Pn) && Fn(), set(Rt, get(gn), !0), set(Gt, null), set(qt, null), k() && (set(zt, get(Mt) === null ? "12:00 AM" : formatTimeDisplay(get(Mt)), !0), set(Bt, get(Nt) === null ? "11:59 PM" : formatTimeDisplay(get(Nt)), !0), set(Ht, !1));
|
|
29343
|
+
let e = a() === null ? s() === null ? _n : s() : a();
|
|
29344
|
+
set(vn, e.getFullYear(), !0), set(yn, e.getMonth(), !0), update(bn), set(an, !0), xt()?.({ open: !0 }), tick().then(() => jn(get(on)));
|
|
29345
|
+
}
|
|
29346
|
+
function Hn() {
|
|
29347
|
+
set(an, !1), set(ln, !1), xt()?.({ open: !1 });
|
|
29348
|
+
let e = pn;
|
|
29349
|
+
pn = null, tick().then(() => {
|
|
29346
29350
|
e?.focus();
|
|
29347
29351
|
});
|
|
29348
29352
|
}
|
|
29349
|
-
function
|
|
29350
|
-
if (e === null || get(
|
|
29353
|
+
function Un(e = get(on)) {
|
|
29354
|
+
if (e === null || get(sn) === null || typeof window > "u") return;
|
|
29351
29355
|
if (get(kt)) {
|
|
29352
|
-
set(
|
|
29356
|
+
set(ln, !1);
|
|
29353
29357
|
return;
|
|
29354
29358
|
}
|
|
29355
|
-
let t = get(
|
|
29356
|
-
set(
|
|
29359
|
+
let t = get(sn).getBoundingClientRect(), n = e.offsetHeight, i = 6, a = window.innerHeight - t.bottom - 6, o = t.top - 6;
|
|
29360
|
+
set(ln, n > a && o > a, !0);
|
|
29357
29361
|
}
|
|
29358
|
-
function
|
|
29359
|
-
let t = () =>
|
|
29362
|
+
function Wn(e) {
|
|
29363
|
+
let t = () => Un(e);
|
|
29360
29364
|
return t(), tick().then(t), window.addEventListener("resize", t), window.addEventListener("scroll", t, !0), { destroy: () => {
|
|
29361
29365
|
window.removeEventListener("resize", t), window.removeEventListener("scroll", t, !0);
|
|
29362
29366
|
} };
|
|
29363
29367
|
}
|
|
29364
|
-
function
|
|
29368
|
+
function Gn(e, t) {
|
|
29365
29369
|
if (typeof window > "u" || typeof window.matchMedia != "function") return () => {};
|
|
29366
29370
|
let n = window.matchMedia(e) ?? null;
|
|
29367
29371
|
if (n === null || (t(n.matches === !0), typeof n.addEventListener != "function")) return () => {};
|
|
29368
29372
|
let i = (e) => {
|
|
29369
|
-
let n = get(
|
|
29373
|
+
let n = get(on) !== null && get(on).contains(getActiveElement(get(on)));
|
|
29370
29374
|
t(e.matches), tick().then(() => {
|
|
29371
|
-
|
|
29375
|
+
Un(), n && get(on) !== null && !get(on).contains(getActiveElement(get(on))) && jn(get(on));
|
|
29372
29376
|
});
|
|
29373
29377
|
};
|
|
29374
29378
|
return n.addEventListener("change", i), () => n.removeEventListener("change", i);
|
|
29375
29379
|
}
|
|
29376
|
-
function
|
|
29380
|
+
function Kn(e, t) {
|
|
29377
29381
|
let n = () => {}, i = (e) => {
|
|
29378
29382
|
if (n(), n = () => {}, !e) return;
|
|
29379
|
-
let t =
|
|
29383
|
+
let t = Gn("(max-width: 1023px)", (e) => {
|
|
29380
29384
|
set(Et, e, !0);
|
|
29381
|
-
}), i =
|
|
29385
|
+
}), i = Gn("(max-width: 688px)", (e) => {
|
|
29382
29386
|
set(Dt, e, !0);
|
|
29383
29387
|
});
|
|
29384
29388
|
n = () => {
|
|
@@ -29390,70 +29394,70 @@ function DateRangePicker(e, t) {
|
|
|
29390
29394
|
destroy: () => i(!1)
|
|
29391
29395
|
};
|
|
29392
29396
|
}
|
|
29393
|
-
function Kn() {
|
|
29394
|
-
get(rn) ? zn() : Bn();
|
|
29395
|
-
}
|
|
29396
29397
|
function qn() {
|
|
29397
|
-
|
|
29398
|
+
get(an) ? Bn() : Vn();
|
|
29398
29399
|
}
|
|
29399
29400
|
function Jn() {
|
|
29401
|
+
fn = get(dn) ? findInteractive(get(dn)) : null, Fn(), gt(!0), tick().then(() => jn(get(un)));
|
|
29402
|
+
}
|
|
29403
|
+
function Yn() {
|
|
29400
29404
|
gt(!1);
|
|
29401
|
-
let e =
|
|
29402
|
-
|
|
29405
|
+
let e = fn;
|
|
29406
|
+
fn = null, tick().then(() => {
|
|
29403
29407
|
e?.focus();
|
|
29404
29408
|
});
|
|
29405
29409
|
}
|
|
29406
|
-
function Yn() {
|
|
29407
|
-
Ln(), Jn();
|
|
29408
|
-
}
|
|
29409
29410
|
function Xn() {
|
|
29410
|
-
Rn(),
|
|
29411
|
+
Rn(), Yn();
|
|
29411
29412
|
}
|
|
29412
|
-
function Zn(
|
|
29413
|
-
|
|
29414
|
-
|
|
29413
|
+
function Zn() {
|
|
29414
|
+
zn(), Yn();
|
|
29415
|
+
}
|
|
29416
|
+
function Qn(e) {
|
|
29417
|
+
let t = new SvelteDate(get(vn), get(yn) + e, 1);
|
|
29418
|
+
set(vn, t.getFullYear(), !0), set(yn, t.getMonth(), !0), update(bn);
|
|
29415
29419
|
}
|
|
29416
|
-
function
|
|
29417
|
-
if (set(
|
|
29420
|
+
function $n() {
|
|
29421
|
+
if (set(hn, null), c() === "range") {
|
|
29418
29422
|
if (get(Mt) !== null && get(Nt) !== null) {
|
|
29419
29423
|
let e = k() ? applyTimeDisplay(get(Mt), get(zt), "start") ?? get(Mt) : get(Mt), t = k() ? applyTimeDisplay(get(Nt), get(Bt), "end") ?? get(Nt) : get(Nt);
|
|
29420
|
-
a(e), o(t), set(
|
|
29424
|
+
a(e), o(t), set(gn, get(Rt), !0), _t()?.({
|
|
29421
29425
|
rangeStart: e,
|
|
29422
29426
|
rangeEnd: t,
|
|
29423
29427
|
presetLabel: get(Rt)
|
|
29424
29428
|
});
|
|
29425
29429
|
}
|
|
29426
|
-
typeof at() == "function" &&
|
|
29427
|
-
} else get(Pt) !== null && (s(get(Pt)), set(
|
|
29430
|
+
typeof at() == "function" && Rn();
|
|
29431
|
+
} else get(Pt) !== null && (s(get(Pt)), set(gn, get(Rt), !0), vt()?.({
|
|
29428
29432
|
date: get(Pt),
|
|
29429
29433
|
presetLabel: get(Rt)
|
|
29430
29434
|
}));
|
|
29431
|
-
|
|
29432
|
-
}
|
|
29433
|
-
function $n() {
|
|
29434
|
-
s(null), set(Pt, null), set(hn, null), St()?.(), Vn();
|
|
29435
|
+
Hn();
|
|
29435
29436
|
}
|
|
29436
29437
|
function er() {
|
|
29437
|
-
|
|
29438
|
+
s(null), set(Pt, null), set(gn, null), St()?.(), Hn();
|
|
29438
29439
|
}
|
|
29439
|
-
function tr(
|
|
29440
|
+
function tr() {
|
|
29441
|
+
bt()?.(), Bn();
|
|
29442
|
+
}
|
|
29443
|
+
function nr(e) {
|
|
29440
29444
|
if (te() && get(Rt) === e.label) {
|
|
29441
|
-
set(Mt, a(), !0), set(Nt, o(), !0), set(Pt, s(), !0), set(Rt, get(
|
|
29442
|
-
let e = a() === null ? s() === null ?
|
|
29443
|
-
set(
|
|
29445
|
+
set(Mt, a(), !0), set(Nt, o(), !0), set(Pt, s(), !0), set(Rt, get(gn), !0), set(Gt, null), set(qt, null);
|
|
29446
|
+
let e = a() === null ? s() === null ? _n : s() : a();
|
|
29447
|
+
set(vn, e.getFullYear(), !0), set(yn, e.getMonth(), !0), update(bn);
|
|
29444
29448
|
return;
|
|
29445
29449
|
}
|
|
29446
|
-
set(
|
|
29450
|
+
set(hn, null);
|
|
29447
29451
|
let { start: t, end: n } = e.getValue();
|
|
29448
|
-
set(Rt, e.label, !0), c() === "range" ? (set(Mt, t, !0), set(Nt, n, !0), set(Gt, null), set(qt, null), k() && (set(zt, formatTimeDisplay(t), !0), set(Bt, formatTimeDisplay(n), !0)), set(
|
|
29449
|
-
}
|
|
29450
|
-
function nr(e) {
|
|
29451
|
-
set(Mt, e.rangeStart, !0), set(Nt, e.rangeEnd, !0), set(Rt, null), set(Gt, null), set(qt, null), k() && (set(zt, "12:00 AM"), set(Bt, Er(e.rangeEnd, gn) ? formatTimeDisplay(gn) : "11:59 PM", !0));
|
|
29452
|
+
set(Rt, e.label, !0), c() === "range" ? (set(Mt, t, !0), set(Nt, n, !0), set(Gt, null), set(qt, null), k() && (set(zt, formatTimeDisplay(t), !0), set(Bt, formatTimeDisplay(n), !0)), set(vn, t.getFullYear(), !0), set(yn, t.getMonth(), !0), update(bn)) : set(Pt, t, !0);
|
|
29452
29453
|
}
|
|
29453
29454
|
function rr(e) {
|
|
29454
|
-
set(
|
|
29455
|
+
set(Mt, e.rangeStart, !0), set(Nt, e.rangeEnd, !0), set(Rt, null), set(Gt, null), set(qt, null), k() && (set(zt, "12:00 AM"), set(Bt, Dr(e.rangeEnd, _n) ? formatTimeDisplay(_n) : "11:59 PM", !0));
|
|
29455
29456
|
}
|
|
29456
29457
|
function ir(e) {
|
|
29458
|
+
set(Pt, e.date, !0), set(Rt, null);
|
|
29459
|
+
}
|
|
29460
|
+
function ar(e) {
|
|
29457
29461
|
if (l() !== null) {
|
|
29458
29462
|
let t = new SvelteDate(l().getFullYear(), l().getMonth(), l().getDate());
|
|
29459
29463
|
if (e.getTime() < t.getTime()) return !1;
|
|
@@ -29462,87 +29466,87 @@ function DateRangePicker(e, t) {
|
|
|
29462
29466
|
let t = new SvelteDate(u().getFullYear(), u().getMonth(), u().getDate());
|
|
29463
29467
|
if (e.getTime() > t.getTime()) return !1;
|
|
29464
29468
|
}
|
|
29465
|
-
return !get(
|
|
29469
|
+
return !get(rn)(e);
|
|
29466
29470
|
}
|
|
29467
|
-
function
|
|
29468
|
-
if (!
|
|
29471
|
+
function or(e, t) {
|
|
29472
|
+
if (!ar(t)) return !1;
|
|
29469
29473
|
let n = get(e === "start" ? Nt : Mt);
|
|
29470
|
-
return n === null ? !0 : !((e === "start" ? t.getTime() > n.getTime() : t.getTime() < n.getTime()) || p() !== null && Math.abs(
|
|
29474
|
+
return n === null ? !0 : !(!(k() && Dr(t, n)) && (e === "start" ? t.getTime() > n.getTime() : t.getTime() < n.getTime()) || p() !== null && Math.abs(tn(n, t)) + 1 > p());
|
|
29471
29475
|
}
|
|
29472
|
-
let
|
|
29476
|
+
let sr = /* @__PURE__ */ user_derived(() => {
|
|
29473
29477
|
if (get(Zt).trim() === "") return !0;
|
|
29474
29478
|
let e = parseDateDisplay(get(Zt));
|
|
29475
|
-
return e !== null &&
|
|
29476
|
-
}),
|
|
29479
|
+
return e !== null && or("start", e);
|
|
29480
|
+
}), cr = /* @__PURE__ */ user_derived(() => {
|
|
29477
29481
|
if (get(Qt).trim() === "") return !0;
|
|
29478
29482
|
let e = parseDateDisplay(get(Qt));
|
|
29479
|
-
return e !== null &&
|
|
29480
|
-
}),
|
|
29481
|
-
function
|
|
29482
|
-
let t = e.getFullYear() === get(
|
|
29483
|
+
return e !== null && or("end", e);
|
|
29484
|
+
}), lr = "Enter a date this picker accepts, like 12 Mar 2025.", ur = "Enter a time like 12:00 AM.", dr = /* @__PURE__ */ user_derived(() => describeField(`${n}-start-date`, { error: get(sr) ? null : lr })), fr = /* @__PURE__ */ user_derived(() => describeField(`${n}-start-time`, { error: get(En) ? null : ur })), pr = /* @__PURE__ */ user_derived(() => describeField(`${n}-end-date`, { error: get(cr) ? null : lr })), mr = /* @__PURE__ */ user_derived(() => describeField(`${n}-end-time`, { error: get(Dn) ? null : ur }));
|
|
29485
|
+
function hr(e) {
|
|
29486
|
+
let t = e.getFullYear() === get(vn) && e.getMonth() === get(yn);
|
|
29483
29487
|
if (!get(At)) return t;
|
|
29484
|
-
let n = new SvelteDate(get(
|
|
29488
|
+
let n = new SvelteDate(get(vn), get(yn) + 1, 1), i = e.getFullYear() === n.getFullYear() && e.getMonth() === n.getMonth();
|
|
29485
29489
|
return t || i;
|
|
29486
29490
|
}
|
|
29487
|
-
function hr(e) {
|
|
29488
|
-
set(_n, e.year, !0), set(vn, e.month, !0);
|
|
29489
|
-
}
|
|
29490
29491
|
function gr(e) {
|
|
29491
|
-
|
|
29492
|
+
set(vn, e.year, !0), set(yn, e.month, !0);
|
|
29492
29493
|
}
|
|
29493
29494
|
function _r(e) {
|
|
29495
|
+
hr(e) || (set(vn, e.getFullYear(), !0), set(yn, e.getMonth(), !0), update(bn));
|
|
29496
|
+
}
|
|
29497
|
+
function vr(e) {
|
|
29494
29498
|
set(e === "start" ? Gt : qt, null);
|
|
29495
29499
|
}
|
|
29496
|
-
function
|
|
29500
|
+
function yr(e, t) {
|
|
29497
29501
|
e.currentTarget instanceof HTMLInputElement && set(t === "start" ? Gt : qt, e.currentTarget.value, !0);
|
|
29498
29502
|
}
|
|
29499
|
-
function
|
|
29503
|
+
function br(e) {
|
|
29500
29504
|
let t = get(e === "start" ? Gt : qt);
|
|
29501
29505
|
if (t === null) return;
|
|
29502
29506
|
let n = parseDateDisplay(t);
|
|
29503
|
-
if (n === null || !
|
|
29504
|
-
|
|
29507
|
+
if (n === null || !or(e, n)) {
|
|
29508
|
+
vr(e);
|
|
29505
29509
|
return;
|
|
29506
29510
|
}
|
|
29507
|
-
set(e === "start" ? Mt : Nt, n, !0), set(Rt, null),
|
|
29508
|
-
}
|
|
29509
|
-
function br(e, t) {
|
|
29510
|
-
e.key === "Enter" && (e.preventDefault(), yr(t));
|
|
29511
|
+
set(e === "start" ? Mt : Nt, n, !0), set(Rt, null), _r(n), vr(e);
|
|
29511
29512
|
}
|
|
29512
|
-
function xr() {
|
|
29513
|
-
|
|
29513
|
+
function xr(e, t) {
|
|
29514
|
+
e.key === "Enter" && (e.preventDefault(), br(t));
|
|
29514
29515
|
}
|
|
29515
29516
|
function Sr() {
|
|
29516
|
-
|
|
29517
|
+
gt() ? Zn() : get(an) && tr();
|
|
29518
|
+
}
|
|
29519
|
+
function Cr() {
|
|
29520
|
+
get(an) && Bn(), gt() && (zn(), Yn());
|
|
29517
29521
|
}
|
|
29518
|
-
let
|
|
29522
|
+
let wr = null;
|
|
29519
29523
|
user_effect(() => {
|
|
29520
|
-
let e = get(
|
|
29521
|
-
e &&
|
|
29522
|
-
element: () => get(
|
|
29523
|
-
onEscape:
|
|
29524
|
-
onOutside:
|
|
29525
|
-
}) : !e &&
|
|
29524
|
+
let e = get(an) || gt();
|
|
29525
|
+
e && wr === null ? wr = registerDismissible({
|
|
29526
|
+
element: () => get(cn),
|
|
29527
|
+
onEscape: Sr,
|
|
29528
|
+
onOutside: Cr
|
|
29529
|
+
}) : !e && wr !== null && (wr(), wr = null);
|
|
29526
29530
|
}), onDestroy(() => {
|
|
29527
|
-
|
|
29531
|
+
wr?.(), wr = null;
|
|
29528
29532
|
});
|
|
29529
|
-
let
|
|
29530
|
-
function
|
|
29531
|
-
if (get(
|
|
29533
|
+
let Tr = /* @__PURE__ */ user_derived(() => c() === "range" ? get(Mt) !== null && get(Nt) !== null && get(On) : get(Pt) !== null);
|
|
29534
|
+
function Er(e) {
|
|
29535
|
+
if (get(hn) !== null && get(Mt) === null && get(Nt) === null && get(Pt) === null) return e.label === get(hn);
|
|
29532
29536
|
if (get(Rt) !== null) return e.label === get(Rt);
|
|
29533
29537
|
if (c() === "single") {
|
|
29534
29538
|
if (get(Pt) === null) return !1;
|
|
29535
29539
|
let { start: t } = e.getValue();
|
|
29536
|
-
return
|
|
29540
|
+
return Dr(get(Pt), t);
|
|
29537
29541
|
}
|
|
29538
29542
|
if (get(Mt) === null || get(Nt) === null) return !1;
|
|
29539
29543
|
let { start: t, end: n } = e.getValue();
|
|
29540
|
-
return
|
|
29544
|
+
return Dr(get(Mt), t) && Dr(get(Nt), n);
|
|
29541
29545
|
}
|
|
29542
|
-
function
|
|
29546
|
+
function Dr(e, t) {
|
|
29543
29547
|
return e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate();
|
|
29544
29548
|
}
|
|
29545
|
-
var
|
|
29549
|
+
var Or = {
|
|
29546
29550
|
get rangeStart() {
|
|
29547
29551
|
return a();
|
|
29548
29552
|
},
|
|
@@ -29777,11 +29781,11 @@ function DateRangePicker(e, t) {
|
|
|
29777
29781
|
set onclear(e) {
|
|
29778
29782
|
St(e), flushSync();
|
|
29779
29783
|
}
|
|
29780
|
-
},
|
|
29784
|
+
}, kr = root_20$3(), Ar = child(kr), jr = child(Ar);
|
|
29781
29785
|
{
|
|
29782
|
-
let e = /* @__PURE__ */ user_derived(() => get(
|
|
29783
|
-
Button(
|
|
29784
|
-
onclick:
|
|
29786
|
+
let e = /* @__PURE__ */ user_derived(() => get(an) ? "Close date picker" : "Open date picker"), t = /* @__PURE__ */ user_derived(() => get(an) ? "drp-trigger-open" : "");
|
|
29787
|
+
Button(jr, spread_props({
|
|
29788
|
+
onclick: qn,
|
|
29785
29789
|
get ariaLabel() {
|
|
29786
29790
|
return get(e);
|
|
29787
29791
|
},
|
|
@@ -29792,7 +29796,7 @@ function DateRangePicker(e, t) {
|
|
|
29792
29796
|
children: (e, t) => {
|
|
29793
29797
|
var n = comment(), i = first_child(n), a = (e) => {
|
|
29794
29798
|
var t = comment();
|
|
29795
|
-
snippet(first_child(t), dt, () => get(
|
|
29799
|
+
snippet(first_child(t), dt, () => get(kn)), append(e, t);
|
|
29796
29800
|
}, o = (e) => {
|
|
29797
29801
|
var t = root_1$36(), n = first_child(t), i = child(n, !0);
|
|
29798
29802
|
reset(n);
|
|
@@ -29805,7 +29809,7 @@ function DateRangePicker(e, t) {
|
|
|
29805
29809
|
};
|
|
29806
29810
|
if_block(o, (e) => {
|
|
29807
29811
|
typeof ft() == "function" ? e(s) : e(c, -1);
|
|
29808
|
-
}), reset(a), template_effect(() => set_text(i, get(
|
|
29812
|
+
}), reset(a), template_effect(() => set_text(i, get(kn))), append(e, t);
|
|
29809
29813
|
};
|
|
29810
29814
|
if_block(i, (e) => {
|
|
29811
29815
|
typeof dt() == "function" ? e(a) : e(o, -1);
|
|
@@ -29814,20 +29818,20 @@ function DateRangePicker(e, t) {
|
|
|
29814
29818
|
$$slots: { default: !0 }
|
|
29815
29819
|
}));
|
|
29816
29820
|
}
|
|
29817
|
-
reset(
|
|
29818
|
-
var
|
|
29821
|
+
reset(Ar), bind_this(Ar, (e) => set(sn, e), () => get(sn));
|
|
29822
|
+
var Mr = sibling(Ar, 2), Nr = (e) => {
|
|
29819
29823
|
var t = root_4$22(), n = child(t);
|
|
29820
29824
|
{
|
|
29821
29825
|
let e = /* @__PURE__ */ user_derived(() => gt() ? "drp-compare-trigger-open" : "");
|
|
29822
29826
|
Button(n, {
|
|
29823
|
-
onclick:
|
|
29827
|
+
onclick: Jn,
|
|
29824
29828
|
ariaLabel: "Open compare period picker",
|
|
29825
29829
|
get classes() {
|
|
29826
29830
|
return `drp-compare-trigger ${get(e) ?? ""}`;
|
|
29827
29831
|
},
|
|
29828
29832
|
children: (e, t) => {
|
|
29829
29833
|
var n = comment();
|
|
29830
|
-
snippet(first_child(n), ht, () => get(
|
|
29834
|
+
snippet(first_child(n), ht, () => get(An)), append(e, n);
|
|
29831
29835
|
},
|
|
29832
29836
|
$$slots: { default: !0 }
|
|
29833
29837
|
});
|
|
@@ -29842,7 +29846,7 @@ function DateRangePicker(e, t) {
|
|
|
29842
29846
|
});
|
|
29843
29847
|
var a = sibling(n, 2), o = child(a);
|
|
29844
29848
|
Button(o, {
|
|
29845
|
-
onclick:
|
|
29849
|
+
onclick: Zn,
|
|
29846
29850
|
ariaLabel: "Cancel compare selection",
|
|
29847
29851
|
classes: "drp-btn-cancel",
|
|
29848
29852
|
children: (e, t) => {
|
|
@@ -29852,9 +29856,9 @@ function DateRangePicker(e, t) {
|
|
|
29852
29856
|
});
|
|
29853
29857
|
var s = sibling(o, 2);
|
|
29854
29858
|
{
|
|
29855
|
-
let e = /* @__PURE__ */ user_derived(() => !get(
|
|
29859
|
+
let e = /* @__PURE__ */ user_derived(() => !get(Ln));
|
|
29856
29860
|
Button(s, {
|
|
29857
|
-
onclick:
|
|
29861
|
+
onclick: Xn,
|
|
29858
29862
|
ariaLabel: "Apply compare selection",
|
|
29859
29863
|
classes: "drp-btn-apply",
|
|
29860
29864
|
get disabled() {
|
|
@@ -29866,16 +29870,16 @@ function DateRangePicker(e, t) {
|
|
|
29866
29870
|
$$slots: { default: !0 }
|
|
29867
29871
|
});
|
|
29868
29872
|
}
|
|
29869
|
-
reset(a), reset(t), bind_this(t, (e) => set(
|
|
29873
|
+
reset(a), reset(t), bind_this(t, (e) => set(un, e), () => get(un)), delegated("keydown", t, (e) => Mn(get(un), e)), append(e, t);
|
|
29870
29874
|
};
|
|
29871
29875
|
if_block(i, (e) => {
|
|
29872
29876
|
gt() && e(a);
|
|
29873
|
-
}), reset(t), bind_this(t, (e) => set(
|
|
29877
|
+
}), reset(t), bind_this(t, (e) => set(dn, e), () => get(dn)), append(e, t);
|
|
29874
29878
|
};
|
|
29875
|
-
if_block(
|
|
29876
|
-
typeof ht() == "function" && e(
|
|
29879
|
+
if_block(Mr, (e) => {
|
|
29880
|
+
typeof ht() == "function" && e(Nr);
|
|
29877
29881
|
});
|
|
29878
|
-
var
|
|
29882
|
+
var Pr = sibling(Mr, 2), Fr = (e) => {
|
|
29879
29883
|
var t = root_19$4();
|
|
29880
29884
|
let n;
|
|
29881
29885
|
var a = child(t), o = child(a), p = (e) => {
|
|
@@ -29901,15 +29905,15 @@ function DateRangePicker(e, t) {
|
|
|
29901
29905
|
html(t, () => checkmark_default, !0), reset(t), template_effect(() => {
|
|
29902
29906
|
set_attribute(t, "data-pw", typeof lt() == "string" ? `${lt()}-preset-check` : null), set_attribute(t, "testid", typeof lt() == "string" ? `${lt()}-preset-check` : null);
|
|
29903
29907
|
}), append(e, t);
|
|
29904
|
-
}, k = /* @__PURE__ */ user_derived(() => S() &&
|
|
29908
|
+
}, k = /* @__PURE__ */ user_derived(() => S() && Er(get(t)));
|
|
29905
29909
|
if_block(p, (e) => {
|
|
29906
29910
|
get(k) && e(C);
|
|
29907
29911
|
}), reset(l), template_effect((e, n) => {
|
|
29908
29912
|
u = set_class(l, 1, "drp-preset-item svelte-gpybdi", null, u, e), set_attribute(l, "aria-selected", n), set_attribute(l, "data-pw", typeof lt() == "string" ? `${lt()}-preset-${get(t).label}` : null), set_attribute(l, "testid", typeof lt() == "string" ? `${lt()}-preset-${get(t).label}` : null), set_text(f, `${get(t).label ?? ""} `);
|
|
29909
29913
|
}, [() => ({
|
|
29910
|
-
"drp-preset-active":
|
|
29914
|
+
"drp-preset-active": Er(get(t)),
|
|
29911
29915
|
"drp-preset-checkable": S()
|
|
29912
|
-
}), () =>
|
|
29916
|
+
}), () => Er(get(t))]), delegated("click", l, () => nr(get(t))), append(e, o);
|
|
29913
29917
|
}), reset(t), append(e, t);
|
|
29914
29918
|
};
|
|
29915
29919
|
if_block(o, (e) => {
|
|
@@ -29928,9 +29932,9 @@ function DateRangePicker(e, t) {
|
|
|
29928
29932
|
var u = child(c);
|
|
29929
29933
|
html(u, () => i, !0), reset(u);
|
|
29930
29934
|
var f = sibling(u, 2);
|
|
29931
|
-
remove_input_defaults(f), reset(c), drpFieldError(sibling(c, 2), () => get(
|
|
29935
|
+
remove_input_defaults(f), reset(c), drpFieldError(sibling(c, 2), () => get(dr).errorId, () => get(dr).showsError, () => lr), reset(n);
|
|
29932
29936
|
var p = sibling(n, 2);
|
|
29933
|
-
drpFieldError(p, () => get(
|
|
29937
|
+
drpFieldError(p, () => get(fr).errorId, () => get(fr).showsError, () => ur);
|
|
29934
29938
|
var h = sibling(p, 2);
|
|
29935
29939
|
html(h, () => chevron_right_default, !0), reset(h);
|
|
29936
29940
|
var S = sibling(h, 2), C = child(S);
|
|
@@ -29942,20 +29946,20 @@ function DateRangePicker(e, t) {
|
|
|
29942
29946
|
var G = child(te);
|
|
29943
29947
|
html(G, () => i, !0), reset(G);
|
|
29944
29948
|
var re = sibling(G, 2);
|
|
29945
|
-
remove_input_defaults(re), reset(te), drpFieldError(sibling(te, 2), () => get(
|
|
29946
|
-
o = set_class(a, 1, "drp-date-input svelte-gpybdi", null, o, { "drp-date-input-invalid": !get(
|
|
29947
|
-
}), delegated("input", s, (e) =>
|
|
29949
|
+
remove_input_defaults(re), reset(te), drpFieldError(sibling(te, 2), () => get(pr).errorId, () => get(pr).showsError, () => lr), reset(S), drpFieldError(sibling(S, 2), () => get(mr).errorId, () => get(mr).showsError, () => ur), template_effect(() => {
|
|
29950
|
+
o = set_class(a, 1, "drp-date-input svelte-gpybdi", null, o, { "drp-date-input-invalid": !get(sr) }), set_value(s, get(Zt)), set_attribute(s, "aria-invalid", !get(sr)), set_attribute(s, "aria-describedby", get(dr).describedBy), set_attribute(s, "data-pw", lt() ? `${lt()}-start-date` : null), set_attribute(s, "testid", lt() ? `${lt()}-start-date` : null), l = set_class(c, 1, "drp-time-input drp-time-input-inline svelte-gpybdi", null, l, { "drp-time-input-invalid": !get(En) }), set_attribute(f, "aria-invalid", !get(En)), set_attribute(f, "aria-describedby", get(fr).describedBy), set_attribute(f, "data-pw", lt() ? `${lt()}-start-time` : null), set_attribute(f, "testid", lt() ? `${lt()}-start-time` : null), k = set_class(C, 1, "drp-date-input svelte-gpybdi", null, k, { "drp-date-input-invalid": !get(cr) }), set_value(R, get(Qt)), set_attribute(R, "aria-invalid", !get(cr)), set_attribute(R, "aria-describedby", get(pr).describedBy), set_attribute(R, "data-pw", lt() ? `${lt()}-end-date` : null), set_attribute(R, "testid", lt() ? `${lt()}-end-date` : null), ne = set_class(te, 1, "drp-time-input drp-time-input-inline svelte-gpybdi", null, ne, { "drp-time-input-invalid": !get(Dn) }), set_attribute(re, "aria-invalid", !get(Dn)), set_attribute(re, "aria-describedby", get(mr).describedBy), set_attribute(re, "data-pw", lt() ? `${lt()}-end-time` : null), set_attribute(re, "testid", lt() ? `${lt()}-end-time` : null);
|
|
29951
|
+
}), delegated("input", s, (e) => yr(e, "start")), event("blur", s, () => br("start")), delegated("keydown", s, (e) => xr(e, "start")), bind_value(f, () => get(zt), (e) => set(zt, e)), delegated("input", R, (e) => yr(e, "end")), event("blur", R, () => br("end")), delegated("keydown", R, (e) => xr(e, "end")), bind_value(re, () => get(Bt), (e) => set(Bt, e)), append(e, t);
|
|
29948
29952
|
}, c = (e) => {
|
|
29949
29953
|
var t = root_12$12(), n = first_child(t);
|
|
29950
29954
|
let a;
|
|
29951
29955
|
var o = child(n);
|
|
29952
|
-
remove_input_defaults(o), drpFieldError(sibling(o, 2), () => get(
|
|
29956
|
+
remove_input_defaults(o), drpFieldError(sibling(o, 2), () => get(dr).errorId, () => get(dr).showsError, () => lr), reset(n);
|
|
29953
29957
|
var s = sibling(n, 2);
|
|
29954
29958
|
html(s, () => chevron_right_default, !0), reset(s);
|
|
29955
29959
|
var c = sibling(s, 2);
|
|
29956
29960
|
let l;
|
|
29957
29961
|
var u = child(c);
|
|
29958
|
-
remove_input_defaults(u), drpFieldError(sibling(u, 2), () => get(
|
|
29962
|
+
remove_input_defaults(u), drpFieldError(sibling(u, 2), () => get(pr).errorId, () => get(pr).showsError, () => lr), reset(c);
|
|
29959
29963
|
var f = sibling(c, 2), p = (e) => {
|
|
29960
29964
|
var t = root_11$13();
|
|
29961
29965
|
let n;
|
|
@@ -29967,8 +29971,8 @@ function DateRangePicker(e, t) {
|
|
|
29967
29971
|
if_block(f, (e) => {
|
|
29968
29972
|
k() && e(p);
|
|
29969
29973
|
}), template_effect(() => {
|
|
29970
|
-
a = set_class(n, 1, "drp-date-input svelte-gpybdi", null, a, { "drp-date-input-invalid": !get(
|
|
29971
|
-
}), delegated("input", o, (e) =>
|
|
29974
|
+
a = set_class(n, 1, "drp-date-input svelte-gpybdi", null, a, { "drp-date-input-invalid": !get(sr) }), set_value(o, get(Zt)), set_attribute(o, "aria-invalid", !get(sr)), set_attribute(o, "aria-describedby", get(dr).describedBy), set_attribute(o, "data-pw", lt() ? `${lt()}-start-date` : null), set_attribute(o, "testid", lt() ? `${lt()}-start-date` : null), l = set_class(c, 1, "drp-date-input svelte-gpybdi", null, l, { "drp-date-input-invalid": !get(cr) }), set_value(u, get(Qt)), set_attribute(u, "aria-invalid", !get(cr)), set_attribute(u, "aria-describedby", get(pr).describedBy), set_attribute(u, "data-pw", lt() ? `${lt()}-end-date` : null), set_attribute(u, "testid", lt() ? `${lt()}-end-date` : null);
|
|
29975
|
+
}), delegated("input", o, (e) => yr(e, "start")), event("blur", o, () => br("start")), delegated("keydown", o, (e) => xr(e, "start")), delegated("input", u, (e) => yr(e, "end")), event("blur", u, () => br("end")), delegated("keydown", u, (e) => xr(e, "end")), append(e, t);
|
|
29972
29976
|
};
|
|
29973
29977
|
if_block(o, (e) => {
|
|
29974
29978
|
get($t) ? e(s) : e(c, -1);
|
|
@@ -29979,7 +29983,7 @@ function DateRangePicker(e, t) {
|
|
|
29979
29983
|
var o = child(n);
|
|
29980
29984
|
html(o, () => i, !0), reset(o);
|
|
29981
29985
|
var s = sibling(o, 2);
|
|
29982
|
-
remove_input_defaults(s), drpFieldError(sibling(s, 2), () => get(
|
|
29986
|
+
remove_input_defaults(s), drpFieldError(sibling(s, 2), () => get(fr).errorId, () => get(fr).showsError, () => ur), reset(n);
|
|
29983
29987
|
var c = sibling(n, 2);
|
|
29984
29988
|
html(c, () => chevron_right_default, !0), reset(c);
|
|
29985
29989
|
var l = sibling(c, 2);
|
|
@@ -29987,8 +29991,8 @@ function DateRangePicker(e, t) {
|
|
|
29987
29991
|
var f = child(l);
|
|
29988
29992
|
html(f, () => i, !0), reset(f);
|
|
29989
29993
|
var p = sibling(f, 2);
|
|
29990
|
-
remove_input_defaults(p), drpFieldError(sibling(p, 2), () => get(
|
|
29991
|
-
a = set_class(n, 1, "drp-time-input svelte-gpybdi", null, a, { "drp-time-input-invalid": !get(
|
|
29994
|
+
remove_input_defaults(p), drpFieldError(sibling(p, 2), () => get(mr).errorId, () => get(mr).showsError, () => ur), reset(l), reset(t), template_effect(() => {
|
|
29995
|
+
a = set_class(n, 1, "drp-time-input svelte-gpybdi", null, a, { "drp-time-input-invalid": !get(En) }), set_attribute(s, "aria-invalid", !get(En)), set_attribute(s, "aria-describedby", get(fr).describedBy), set_attribute(s, "data-pw", lt() ? `${lt()}-start-time` : null), set_attribute(s, "testid", lt() ? `${lt()}-start-time` : null), u = set_class(l, 1, "drp-time-input svelte-gpybdi", null, u, { "drp-time-input-invalid": !get(Dn) }), set_attribute(p, "aria-invalid", !get(Dn)), set_attribute(p, "aria-describedby", get(mr).describedBy), set_attribute(p, "data-pw", lt() ? `${lt()}-end-time` : null), set_attribute(p, "testid", lt() ? `${lt()}-end-time` : null);
|
|
29992
29996
|
}), bind_value(s, () => get(zt), (e) => set(zt, e)), bind_value(p, () => get(Bt), (e) => set(Bt, e)), append(e, t);
|
|
29993
29997
|
};
|
|
29994
29998
|
if_block(l, (e) => {
|
|
@@ -30006,7 +30010,7 @@ function DateRangePicker(e, t) {
|
|
|
30006
30010
|
var p = sibling(a, 2);
|
|
30007
30011
|
reset(n);
|
|
30008
30012
|
var h = sibling(n, 2);
|
|
30009
|
-
key(child(h), () => get(
|
|
30013
|
+
key(child(h), () => get(bn), (e) => {
|
|
30010
30014
|
var t = root_15$6(), n = first_child(t);
|
|
30011
30015
|
Calendar(n, {
|
|
30012
30016
|
mode: "range",
|
|
@@ -30023,12 +30027,12 @@ function DateRangePicker(e, t) {
|
|
|
30023
30027
|
return u();
|
|
30024
30028
|
},
|
|
30025
30029
|
get disabledDates() {
|
|
30026
|
-
return get(
|
|
30030
|
+
return get(rn);
|
|
30027
30031
|
},
|
|
30028
30032
|
get initialMonth() {
|
|
30029
|
-
return get(
|
|
30033
|
+
return get(xn);
|
|
30030
30034
|
},
|
|
30031
|
-
onrangeselect:
|
|
30035
|
+
onrangeselect: rr,
|
|
30032
30036
|
classes: "drp-calendar-embedded",
|
|
30033
30037
|
get rangeStart() {
|
|
30034
30038
|
return get(Mt);
|
|
@@ -30057,12 +30061,12 @@ function DateRangePicker(e, t) {
|
|
|
30057
30061
|
return u();
|
|
30058
30062
|
},
|
|
30059
30063
|
get disabledDates() {
|
|
30060
|
-
return get(
|
|
30064
|
+
return get(rn);
|
|
30061
30065
|
},
|
|
30062
30066
|
get initialMonth() {
|
|
30063
|
-
return get(
|
|
30067
|
+
return get(Sn);
|
|
30064
30068
|
},
|
|
30065
|
-
onrangeselect:
|
|
30069
|
+
onrangeselect: rr,
|
|
30066
30070
|
classes: "drp-calendar-embedded",
|
|
30067
30071
|
get rangeStart() {
|
|
30068
30072
|
return get(Mt);
|
|
@@ -30078,13 +30082,13 @@ function DateRangePicker(e, t) {
|
|
|
30078
30082
|
}
|
|
30079
30083
|
}), append(e, t);
|
|
30080
30084
|
}), reset(h), template_effect(() => {
|
|
30081
|
-
set_text(s, get(
|
|
30082
|
-
}), delegated("click", i, () =>
|
|
30085
|
+
set_text(s, get(wn)), set_text(f, get(Cn));
|
|
30086
|
+
}), delegated("click", i, () => Qn(-1)), delegated("click", p, () => Qn(1)), append(e, t);
|
|
30083
30087
|
}, Re = (e) => {
|
|
30084
30088
|
var t = comment();
|
|
30085
|
-
key(first_child(t), () => get(
|
|
30089
|
+
key(first_child(t), () => get(bn), (e) => {
|
|
30086
30090
|
{
|
|
30087
|
-
let t = /* @__PURE__ */ user_derived(() => c() === "range" ? "range" : "single"), n = /* @__PURE__ */ user_derived(() => c() === "range" ? get(
|
|
30091
|
+
let t = /* @__PURE__ */ user_derived(() => c() === "range" ? "range" : "single"), n = /* @__PURE__ */ user_derived(() => c() === "range" ? get(rn) : f());
|
|
30088
30092
|
Calendar(e, {
|
|
30089
30093
|
get mode() {
|
|
30090
30094
|
return get(t);
|
|
@@ -30105,11 +30109,11 @@ function DateRangePicker(e, t) {
|
|
|
30105
30109
|
return get(n);
|
|
30106
30110
|
},
|
|
30107
30111
|
get initialMonth() {
|
|
30108
|
-
return get(
|
|
30112
|
+
return get(xn);
|
|
30109
30113
|
},
|
|
30110
|
-
onrangeselect:
|
|
30111
|
-
onselect:
|
|
30112
|
-
onmonthchange:
|
|
30114
|
+
onrangeselect: rr,
|
|
30115
|
+
onselect: ir,
|
|
30116
|
+
onmonthchange: gr,
|
|
30113
30117
|
classes: "drp-calendar-embedded",
|
|
30114
30118
|
get rangeStart() {
|
|
30115
30119
|
return get(Mt);
|
|
@@ -30152,7 +30156,7 @@ function DateRangePicker(e, t) {
|
|
|
30152
30156
|
}), reset(R), reset(a);
|
|
30153
30157
|
var ft = sibling(a, 2), mt = child(ft), gt = (e) => {
|
|
30154
30158
|
Button(e, {
|
|
30155
|
-
onclick:
|
|
30159
|
+
onclick: er,
|
|
30156
30160
|
ariaLabel: "Clear date selection",
|
|
30157
30161
|
classes: "drp-btn-clear",
|
|
30158
30162
|
children: (e, t) => {
|
|
@@ -30166,7 +30170,7 @@ function DateRangePicker(e, t) {
|
|
|
30166
30170
|
});
|
|
30167
30171
|
var _t = sibling(mt, 2);
|
|
30168
30172
|
Button(_t, {
|
|
30169
|
-
onclick:
|
|
30173
|
+
onclick: tr,
|
|
30170
30174
|
ariaLabel: "Cancel date selection",
|
|
30171
30175
|
classes: "drp-btn-cancel",
|
|
30172
30176
|
children: (e, t) => {
|
|
@@ -30176,9 +30180,9 @@ function DateRangePicker(e, t) {
|
|
|
30176
30180
|
});
|
|
30177
30181
|
var vt = sibling(_t, 2);
|
|
30178
30182
|
{
|
|
30179
|
-
let e = /* @__PURE__ */ user_derived(() => !get(
|
|
30183
|
+
let e = /* @__PURE__ */ user_derived(() => !get(Tr));
|
|
30180
30184
|
Button(vt, {
|
|
30181
|
-
onclick:
|
|
30185
|
+
onclick: $n,
|
|
30182
30186
|
ariaLabel: "Apply date selection",
|
|
30183
30187
|
classes: "drp-btn-apply",
|
|
30184
30188
|
get disabled() {
|
|
@@ -30190,22 +30194,22 @@ function DateRangePicker(e, t) {
|
|
|
30190
30194
|
$$slots: { default: !0 }
|
|
30191
30195
|
});
|
|
30192
30196
|
}
|
|
30193
|
-
reset(ft), reset(t), action(t, (e) =>
|
|
30197
|
+
reset(ft), reset(t), action(t, (e) => Wn?.(e)), bind_this(t, (e) => set(on, e), () => get(on)), template_effect(() => {
|
|
30194
30198
|
n = set_class(t, 1, "drp-panel svelte-gpybdi", null, n, {
|
|
30195
|
-
"drp-panel-above": get(
|
|
30199
|
+
"drp-panel-above": get(ln),
|
|
30196
30200
|
"drp-panel-align-left": be() === "left",
|
|
30197
30201
|
"drp-panel-align-right": be() === "right",
|
|
30198
30202
|
"drp-panel-presets-top": get(jt),
|
|
30199
30203
|
"drp-panel-sheet": get(kt),
|
|
30200
30204
|
"drp-panel-narrow": get(Ot)
|
|
30201
30205
|
}), set_attribute(t, "data-pw", typeof lt() == "string" ? `${lt()}-panel` : null), set_attribute(t, "testid", typeof lt() == "string" ? `${lt()}-panel` : null);
|
|
30202
|
-
}), delegated("keydown", t, (e) =>
|
|
30206
|
+
}), delegated("keydown", t, (e) => Mn(get(on), e)), append(e, t);
|
|
30203
30207
|
};
|
|
30204
|
-
return if_block(
|
|
30205
|
-
get(
|
|
30206
|
-
}), reset(
|
|
30207
|
-
set_class(
|
|
30208
|
-
}), append(e,
|
|
30208
|
+
return if_block(Pr, (e) => {
|
|
30209
|
+
get(an) && e(Fr);
|
|
30210
|
+
}), reset(kr), bind_this(kr, (e) => set(cn, e), () => get(cn)), action(kr, (e, t) => Kn?.(e, t), Re), template_effect(() => {
|
|
30211
|
+
set_class(kr, 1, `drp-root ${ut() ?? "" ?? ""}`, "svelte-gpybdi"), set_attribute(kr, "data-pw", lt()), set_attribute(kr, "testid", lt());
|
|
30212
|
+
}), append(e, kr), pop(Or);
|
|
30209
30213
|
}
|
|
30210
30214
|
delegate([
|
|
30211
30215
|
"keydown",
|
|
@@ -56648,7 +56652,7 @@ function normalizeDictationState(e) {
|
|
|
56648
56652
|
//#region src/lib/ChatComposer/ChatComposer.svelte
|
|
56649
56653
|
var root$12 = /* @__PURE__ */ from_html("<div class=\"control attach svelte-xpd394\"><!> <input type=\"file\" class=\"file-input\" hidden=\"\"/></div>"), root_1$11 = /* @__PURE__ */ from_html("<div class=\"leading svelte-xpd394\"><!></div>"), root_2$6 = /* @__PURE__ */ from_html("<!> <!>", 1), root_3$6 = /* @__PURE__ */ from_html("<div class=\"input-field svelte-xpd394\"><div class=\"input-highlights svelte-xpd394\" aria-hidden=\"true\"></div> <!></div>"), root_4$5 = /* @__PURE__ */ from_html("<textarea rows=\"1\"></textarea>"), root_5$4 = /* @__PURE__ */ from_html("<div><!></div>"), root_6$4 = /* @__PURE__ */ from_html("<div class=\"control send stop svelte-xpd394\"><!></div>"), root_7$4 = /* @__PURE__ */ from_html("<span> </span>"), root_8$4 = /* @__PURE__ */ from_html("<div class=\"control send svelte-xpd394\"><!></div>"), root_9$3 = /* @__PURE__ */ from_html("<!> <!> <!>", 1), root_10$3 = /* @__PURE__ */ from_html("<span class=\"slash-hint svelte-xpd394\"> </span>"), root_11$2 = /* @__PURE__ */ from_html("<span class=\"slash-desc svelte-xpd394\"> </span>"), root_12$2 = /* @__PURE__ */ from_html("<span class=\"slash-badge svelte-xpd394\"> </span>"), root_13$2 = /* @__PURE__ */ from_html("<span class=\"slash-name svelte-xpd394\"> </span> <!> <!> <!>", 1), root_14$2 = /* @__PURE__ */ from_html("<li role=\"option\"><!></li>"), root_15$2 = /* @__PURE__ */ from_html("<div role=\"listbox\"><ul class=\"slash-list svelte-xpd394\" role=\"presentation\"></ul> <div class=\"slash-foot svelte-xpd394\"> </div></div>"), root_16$2 = /* @__PURE__ */ from_html("<div class=\"sr-only svelte-xpd394\" role=\"status\" aria-live=\"polite\"> </div>"), root_17$2 = /* @__PURE__ */ from_html("<div class=\"attachments-rich svelte-xpd394\"><!></div>"), root_18$2 = /* @__PURE__ */ from_html("<div class=\"attachments svelte-xpd394\"></div>"), root_19$2 = /* @__PURE__ */ from_html("<div class=\"text-row svelte-xpd394\"><!></div> <div class=\"control-row svelte-xpd394\"><!> <div class=\"control-spacer svelte-xpd394\" aria-hidden=\"true\"></div> <!></div>", 1), root_20$1 = /* @__PURE__ */ from_html("<div><!> <!> <!> <div><!></div></div>"), $$css$33 = {
|
|
56650
56654
|
hash: "svelte-xpd394",
|
|
56651
|
-
code: ".chat-composer.svelte-xpd394 {box-sizing:border-box;display:flex;flex-direction:column;gap:var(--chat-composer-stack-gap, 8px);width:var(--chat-composer-width, 100%);padding:var(--chat-composer-padding, 8px);background:var(--chat-composer-background, #ffffff);border:var(--chat-composer-border, 1px solid #e4e4e7);border-radius:var(--chat-composer-border-radius, 24px);box-shadow:var(--chat-composer-box-shadow, none);}.chat-composer.disabled.svelte-xpd394 {opacity:var(--chat-composer-disabled-opacity, 0.6);}.chat-composer.pill.svelte-xpd394 {border-radius:var(--chat-composer-pill-border-radius, 999px);}\n\n /* .input below sets outline: none with nothing standing in for it, so the\n visible replacement lives here on the surrounding surface instead --\n :focus-within lights up whenever the textarea inside is focused, the same\n pattern Select's .select-trigger uses for its nested search input. */.chat-composer.svelte-xpd394:focus-within {border-color:var(--chat-composer-focus-border-color, #2563eb);box-shadow:var(--chat-composer-focus-shadow, 0 0 0 2px rgba(37, 99, 235, 0.2));}.attachments-rich.svelte-xpd394 {padding:var(--chat-composer-attachments-padding, 2px 4px 0);}.attachments.svelte-xpd394 {display:flex;flex-wrap:wrap;gap:var(--chat-composer-attachments-gap, 6px);padding:var(--chat-composer-attachments-padding, 2px 4px 0);}.input-row.svelte-xpd394 {display:flex;align-items:flex-end;gap:var(--chat-composer-gap, 8px);}.input-row.stacked.svelte-xpd394 {flex-direction:column;align-items:stretch;gap:var(--chat-composer-stack-gap, 8px);}.text-row.svelte-xpd394 {display:flex;min-width:0;}.control-row.svelte-xpd394 {display:flex;align-items:flex-end;gap:var(--chat-composer-gap, 8px);}.control-spacer.svelte-xpd394 {flex:1;}.stacked.svelte-xpd394 .input:where(.svelte-xpd394) {min-width:0;width:100%;}.leading.svelte-xpd394 {display:flex;align-items:center;flex-shrink:0;}.input.svelte-xpd394 {flex:1;box-sizing:border-box;resize:none;border:none;outline:none;background:transparent;font-family:var(--chat-composer-font-family, inherit);font-size:var(--chat-composer-font-size, 0.9375rem);font-weight:var(--chat-composer-font-weight, 400);line-height:var(--chat-composer-line-height, 1.5);color:var(--chat-composer-color, #18181b);padding:var(--chat-composer-input-padding, 6px 4px);max-height:var(--chat-composer-max-height, 160px);overflow-y:auto;}\n\n /* Inline mentions: an identical text layer sits behind a transparent textarea and\n colours the mentions, so the caret, selection and editing stay the textarea's own. */.input-field.svelte-xpd394 {position:relative;flex:1;min-width:0;display:flex;}.input-field.svelte-xpd394 .input:where(.svelte-xpd394) {position:relative;width:100%;scrollbar-gutter:stable;}.input.inline-mentions.svelte-xpd394 {color:transparent;caret-color:var(--chat-composer-color, #18181b);}.input.inline-mentions.svelte-xpd394::selection {color:var(--chat-composer-color, #18181b);}.input-highlights.svelte-xpd394 {position:absolute;inset:0;box-sizing:border-box;overflow:hidden;scrollbar-gutter:stable;pointer-events:none;white-space:pre-wrap;overflow-wrap:break-word;letter-spacing:normal;word-spacing:normal;font-family:var(--chat-composer-font-family, inherit);font-size:var(--chat-composer-font-size, 0.9375rem);font-weight:var(--chat-composer-font-weight, 400);line-height:var(--chat-composer-line-height, 1.5);color:var(--chat-composer-color, #18181b);padding:var(--chat-composer-input-padding, 6px 4px);}\n\n /* The mention must lay out exactly like the textarea's text, so it inherits every font\n property: a consumer's global span styles would otherwise shift it off the caret. */.input-highlights.svelte-xpd394 .mention {font:inherit;letter-spacing:inherit;word-spacing:inherit;color:var(--chat-composer-mention-color, var(--chat-composer-slash-name-color, #2563eb));}.input.svelte-xpd394::placeholder {color:var(--chat-composer-placeholder-color, #52525b);}.control.svelte-xpd394 {flex-shrink:0;display:flex;}.control.svelte-xpd394 svg {height:100%;width:100%;}.attach.svelte-xpd394,\n .voice.svelte-xpd394 {--button-width: var(--chat-composer-action-size, 36px);--button-height: var(--chat-composer-action-size, 36px);--button-padding: var(--chat-composer-action-padding, 8px);--button-border-radius: var(--chat-composer-action-border-radius, 50%);--button-color: var(--chat-composer-action-background-color, transparent);--button-text-color: var(--chat-composer-action-color, #52525b);--button-content-gap: 0px;--button-hover-color: var(--chat-composer-action-hover-background-color, #f4f4f5);\n /* Ghost brings its own hover label; keep this control's, recording red included. */--button-hover-text-color: var(--button-text-color);}.voice.recording.svelte-xpd394 {--button-color: var(--chat-composer-voice-recording-background-color, #fee2e2);--button-text-color: var(--chat-composer-voice-recording-color, #dc2626);}\n\n /* No dedicated busy palette: the disabled `Button` already dims itself\n (`--disabled-opacity`), which is enough to distinguish \"busy\" from the\n active \"recording\" red without inventing new color tokens that would\n need a matching dark-theme entry outside this component's scope. The\n `.busy` class is still applied to the wrapper (see markup) so a caller\n can target it with their own CSS if they want a distinct look. */.send.svelte-xpd394 {--button-width: var(--chat-composer-send-size, 40px);--button-height: var(--chat-composer-send-size, 40px);--button-padding: var(--chat-composer-send-padding, 8px);--button-border-radius: var(--chat-composer-send-border-radius, 50%);--button-color: var(--chat-composer-send-background-color, #18181b);--button-text-color: var(--chat-composer-send-color, #ffffff);--button-content-gap: 0px;--button-hover-color: var(--chat-composer-send-hover-background-color, #27272a);}.send.stop.svelte-xpd394 {--button-color: var(--chat-composer-stop-background-color, #18181b);--button-text-color: var(--chat-composer-stop-color, #ffffff);}\n\n /* Positioned only when slash commands are on, so their menu can sit\n above the composer; a consumer without them is unchanged. A data attribute,\n not a class, and the menu rules below are written down the structure they live in\n (.chat-composer > .slash-menu ...): a class directive would strip a `has-slash` class a\n consumer already passes through `classes`, and a class of one of these names passed\n there would match rules meant for the menu. */.chat-composer[data-has-slash].svelte-xpd394 {position:relative;}\n\n /* Positioned from the composer's padding box; the outset (e.g. the\n composer's border width) lines it up with the outer edge instead. */.chat-composer.svelte-xpd394 > .slash-menu:where(.svelte-xpd394) {position:absolute;bottom:calc(100% + var(--chat-composer-slash-menu-outset, 0px));left:calc(-1 * var(--chat-composer-slash-menu-outset, 0px));right:calc(-1 * var(--chat-composer-slash-menu-outset, 0px));margin-bottom:var(--chat-composer-slash-menu-gap, 8px);overflow:hidden;z-index:var(--chat-composer-slash-menu-z-index, 30);background:var(--chat-composer-slash-menu-background, var(--menu-background-color, #ffffff));border:var(--chat-composer-slash-menu-border, var(--menu-border, 1px solid #e0e0e0));border-radius:var(--chat-composer-slash-menu-border-radius, 12px);box-shadow:var(\n --chat-composer-slash-menu-box-shadow,\n var(--menu-box-shadow, 0px 4px 16px rgba(0, 0, 0, 0.12))\n );}\n\n /* In the top layer the menu is placed by script against the composer, so the popover's\n own defaults (inset, auto margin, padding, overflow) are cleared. */.chat-composer.svelte-xpd394 > .slash-menu.top-layer:where(.svelte-xpd394) {position:fixed;inset:auto;box-sizing:border-box;margin:0 0 var(--chat-composer-slash-menu-gap, 8px);padding:0;color:inherit;}.slash-menu.svelte-xpd394 > .slash-list:where(.svelte-xpd394) {list-style:none;margin:0;padding:var(--chat-composer-slash-list-padding, 4px);max-height:var(--chat-composer-slash-list-max-height, 280px);overflow-y:auto;display:grid;gap:var(--chat-composer-slash-list-gap, 2px);}\n\n /* Rows are menu items, not buttons: the row sets its Button's tokens itself so a\n consumer's app-wide button fill never reaches it, and the highlighted row is\n tinted by the <li> beneath a transparent Button. */.slash-menu.svelte-xpd394 .slash-list:where(.svelte-xpd394) li:where(.svelte-xpd394) {min-width:0;border-radius:var(--chat-composer-slash-item-border-radius, 8px);--button-color: var(--chat-composer-slash-item-background, transparent);--button-background: none;--button-hover-color: var(--chat-composer-slash-item-hover-background, transparent);--button-text-color: var(--chat-composer-slash-item-color, var(--menu-item-color, #333333));--button-hover-text-color: var(\n --chat-composer-slash-item-color,\n var(--menu-item-color, #333333)\n );--button-border: none;--button-box-shadow: none;--button-border-radius: var(--chat-composer-slash-item-border-radius, 8px);--button-width: 100%;--button-height: auto;--button-justify-content: flex-start;--button-padding: var(--chat-composer-slash-item-padding, 8px 12px);--button-content-gap: var(--chat-composer-slash-item-gap, 8px);}.slash-menu.svelte-xpd394 > .slash-foot:where(.svelte-xpd394) {padding:var(--chat-composer-slash-foot-padding, 4px 12px);border-top:var(\n --chat-composer-slash-foot-border,\n 1px solid var(--menu-separator-color, #e0e0e0)\n );font-family:var(--chat-composer-slash-foot-font-family, inherit);font-variant-ligatures:var(--chat-composer-slash-foot-font-variant-ligatures, inherit);font-size:var(--chat-composer-slash-foot-font-size, 12px);color:var(--chat-composer-slash-foot-color, var(--menu-item-color, #333333));}\n\n /* The default row content (a consumer's slashItem snippet replaces it). */.slash-menu.svelte-xpd394 .slash-name:where(.svelte-xpd394) {flex-shrink:0;font-family:var(--chat-composer-slash-name-font-family, monospace);color:var(--chat-composer-slash-name-color, #2563eb);}.slash-menu.svelte-xpd394 .slash-hint:where(.svelte-xpd394) {flex-shrink:0;font-size:var(--chat-composer-slash-hint-font-size, 12px);color:var(--chat-composer-slash-hint-color, #71717a);}.slash-menu.svelte-xpd394 .slash-desc:where(.svelte-xpd394) {flex:1;min-width:0;text-align:start;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--chat-composer-slash-desc-color, #52525b);}\n\n /* Default visual for the arrow-key-highlighted row when a consumer hasn't\n opted into their own selected-state look via slashSelectedItemClasses --\n without this, the only signal was aria-selected, screen-reader-only.\n Scoped so a consumer's own class stays authoritative the moment it's\n supplied: this rule simply never applies then. */.slash-menu.svelte-xpd394 .slash-item-selected-default:where(.svelte-xpd394) {background:var(\n --chat-composer-slash-item-selected-background,\n var(--menu-item-hover-background-color, #f5f5f5)\n );}.slash-menu.svelte-xpd394 .slash-badge:where(.svelte-xpd394) {padding:var(--chat-composer-slash-badge-padding, 2px 8px);border-radius:var(--chat-composer-slash-badge-border-radius, 999px);font-size:var(--chat-composer-slash-badge-font-size, 12px);background:var(--chat-composer-slash-badge-background, #eff6ff);color:var(--chat-composer-slash-badge-color, #2563eb);}.send.action.svelte-xpd394 {--button-width: var(--chat-composer-idle-action-width, var(--chat-composer-send-size, 40px));--button-padding: var(\n --chat-composer-idle-action-padding,\n var(--chat-composer-send-padding, 8px)\n );--button-border-radius: var(\n --chat-composer-idle-action-border-radius,\n var(--chat-composer-send-border-radius, 50%)\n );--button-color: var(\n --chat-composer-idle-action-background-color,\n var(--chat-composer-send-background-color, #18181b)\n );--button-text-color: var(\n --chat-composer-idle-action-color,\n var(--chat-composer-send-color, #ffffff)\n );--button-hover-color: var(\n --chat-composer-idle-action-hover-background-color,\n var(--chat-composer-send-hover-background-color, #27272a)\n );--button-hover-text-color: var(\n --chat-composer-idle-action-hover-color,\n var(--button-text-color)\n );--button-content-gap: var(--chat-composer-idle-action-gap, 0px);}.send.action.action-with-text.svelte-xpd394 {--button-width: var(--chat-composer-idle-action-width, max-content);--button-padding: var(--chat-composer-idle-action-padding, 8px 12px);--button-content-gap: var(--chat-composer-idle-action-gap, 6px);}.action-with-text.svelte-xpd394 svg {width:var(--chat-composer-idle-action-icon-size, 20px);height:var(--chat-composer-idle-action-icon-size, 20px);}\n\n /* Visually hidden but still read by assistive technology -- same pattern\n Table's caption and Label's required marker use. */.sr-only.svelte-xpd394 {position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);clip-path:inset(50%);white-space:nowrap;border-width:0;}"
|
|
56655
|
+
code: ".chat-composer.svelte-xpd394 {box-sizing:border-box;display:flex;flex-direction:column;gap:var(--chat-composer-stack-gap, 8px);width:var(--chat-composer-width, 100%);padding:var(--chat-composer-padding, 8px);background:var(--chat-composer-background, #ffffff);border:var(--chat-composer-border, 1px solid #e4e4e7);border-radius:var(--chat-composer-border-radius, 24px);box-shadow:var(--chat-composer-box-shadow, none);}.chat-composer.disabled.svelte-xpd394 {opacity:var(--chat-composer-disabled-opacity, 0.6);}.chat-composer.pill.svelte-xpd394 {border-radius:var(--chat-composer-pill-border-radius, 999px);}\n\n /* .input below sets outline: none with nothing standing in for it, so the\n visible replacement lives here on the surrounding surface instead --\n :focus-within lights up whenever the textarea inside is focused, the same\n pattern Select's .select-trigger uses for its nested search input. */.chat-composer.svelte-xpd394:focus-within {border-color:var(--chat-composer-focus-border-color, #2563eb);box-shadow:var(--chat-composer-focus-shadow, 0 0 0 2px rgba(37, 99, 235, 0.2));}.attachments-rich.svelte-xpd394 {padding:var(--chat-composer-attachments-padding, 2px 4px 0);}.attachments.svelte-xpd394 {display:flex;flex-wrap:wrap;gap:var(--chat-composer-attachments-gap, 6px);padding:var(--chat-composer-attachments-padding, 2px 4px 0);}.input-row.svelte-xpd394 {display:flex;align-items:flex-end;gap:var(--chat-composer-gap, 8px);}.input-row.stacked.svelte-xpd394 {flex-direction:column;align-items:stretch;gap:var(--chat-composer-stack-gap, 8px);}.text-row.svelte-xpd394 {display:flex;min-width:0;}.control-row.svelte-xpd394 {display:flex;align-items:flex-end;gap:var(--chat-composer-gap, 8px);}.control-spacer.svelte-xpd394 {flex:1;}.stacked.svelte-xpd394 .input:where(.svelte-xpd394) {min-width:0;width:100%;}.leading.svelte-xpd394 {display:flex;align-items:center;flex-shrink:0;}.input.svelte-xpd394 {flex:1;box-sizing:border-box;resize:none;border:none;outline:none;background:transparent;font-family:var(--chat-composer-font-family, inherit);font-size:var(--chat-composer-font-size, 0.9375rem);font-weight:var(--chat-composer-font-weight, 400);line-height:var(--chat-composer-line-height, 1.5);color:var(--chat-composer-color, #18181b);padding:var(--chat-composer-input-padding, 6px 4px);max-height:var(--chat-composer-max-height, 160px);overflow-y:auto;}\n\n /* Inline mentions: an identical text layer sits behind a transparent textarea and\n colours the mentions, so the caret, selection and editing stay the textarea's own. */.input-field.svelte-xpd394 {position:relative;flex:1;min-width:0;display:flex;}.input-field.svelte-xpd394 .input:where(.svelte-xpd394) {position:relative;width:100%;scrollbar-gutter:stable;}.input.inline-mentions.svelte-xpd394 {color:transparent;caret-color:var(--chat-composer-color, #18181b);}\n\n /* A ::selection rule replaces the browser's whole highlight, so it has to paint its own\n background too; Highlight is the colour a composer without inline mentions selects with. */.input.inline-mentions.svelte-xpd394::selection {color:var(--chat-composer-color, #18181b);background-color:var(--chat-composer-selection-background, Highlight);}.input-highlights.svelte-xpd394 {position:absolute;inset:0;box-sizing:border-box;overflow:hidden;scrollbar-gutter:stable;pointer-events:none;white-space:pre-wrap;overflow-wrap:break-word;letter-spacing:normal;word-spacing:normal;font-family:var(--chat-composer-font-family, inherit);font-size:var(--chat-composer-font-size, 0.9375rem);font-weight:var(--chat-composer-font-weight, 400);line-height:var(--chat-composer-line-height, 1.5);color:var(--chat-composer-color, #18181b);padding:var(--chat-composer-input-padding, 6px 4px);}\n\n /* The mention must lay out exactly like the textarea's text, so it inherits every font\n property: a consumer's global span styles would otherwise shift it off the caret. */.input-highlights.svelte-xpd394 .mention {font:inherit;letter-spacing:inherit;word-spacing:inherit;color:var(--chat-composer-mention-color, var(--chat-composer-slash-name-color, #2563eb));}.input.svelte-xpd394::placeholder {color:var(--chat-composer-placeholder-color, #52525b);}.control.svelte-xpd394 {flex-shrink:0;display:flex;}.control.svelte-xpd394 svg {height:100%;width:100%;}.attach.svelte-xpd394,\n .voice.svelte-xpd394 {--button-width: var(--chat-composer-action-size, 36px);--button-height: var(--chat-composer-action-size, 36px);--button-padding: var(--chat-composer-action-padding, 8px);--button-border-radius: var(--chat-composer-action-border-radius, 50%);--button-color: var(--chat-composer-action-background-color, transparent);--button-text-color: var(--chat-composer-action-color, #52525b);--button-content-gap: 0px;--button-hover-color: var(--chat-composer-action-hover-background-color, #f4f4f5);\n /* Ghost brings its own hover label; keep this control's, recording red included. */--button-hover-text-color: var(--button-text-color);}.voice.recording.svelte-xpd394 {--button-color: var(--chat-composer-voice-recording-background-color, #fee2e2);--button-text-color: var(--chat-composer-voice-recording-color, #dc2626);}\n\n /* No dedicated busy palette: the disabled `Button` already dims itself\n (`--disabled-opacity`), which is enough to distinguish \"busy\" from the\n active \"recording\" red without inventing new color tokens that would\n need a matching dark-theme entry outside this component's scope. The\n `.busy` class is still applied to the wrapper (see markup) so a caller\n can target it with their own CSS if they want a distinct look. */.send.svelte-xpd394 {--button-width: var(--chat-composer-send-size, 40px);--button-height: var(--chat-composer-send-size, 40px);--button-padding: var(--chat-composer-send-padding, 8px);--button-border-radius: var(--chat-composer-send-border-radius, 50%);--button-color: var(--chat-composer-send-background-color, #18181b);--button-text-color: var(--chat-composer-send-color, #ffffff);--button-content-gap: 0px;--button-hover-color: var(--chat-composer-send-hover-background-color, #27272a);}.send.stop.svelte-xpd394 {--button-color: var(--chat-composer-stop-background-color, #18181b);--button-text-color: var(--chat-composer-stop-color, #ffffff);}\n\n /* Positioned only when slash commands are on, so their menu can sit\n above the composer; a consumer without them is unchanged. A data attribute,\n not a class, and the menu rules below are written down the structure they live in\n (.chat-composer > .slash-menu ...): a class directive would strip a `has-slash` class a\n consumer already passes through `classes`, and a class of one of these names passed\n there would match rules meant for the menu. */.chat-composer[data-has-slash].svelte-xpd394 {position:relative;}\n\n /* Positioned from the composer's padding box; the outset (e.g. the\n composer's border width) lines it up with the outer edge instead. */.chat-composer.svelte-xpd394 > .slash-menu:where(.svelte-xpd394) {position:absolute;bottom:calc(100% + var(--chat-composer-slash-menu-outset, 0px));left:calc(-1 * var(--chat-composer-slash-menu-outset, 0px));right:calc(-1 * var(--chat-composer-slash-menu-outset, 0px));margin-bottom:var(--chat-composer-slash-menu-gap, 8px);overflow:hidden;z-index:var(--chat-composer-slash-menu-z-index, 30);background:var(--chat-composer-slash-menu-background, var(--menu-background-color, #ffffff));border:var(--chat-composer-slash-menu-border, var(--menu-border, 1px solid #e0e0e0));border-radius:var(--chat-composer-slash-menu-border-radius, 12px);box-shadow:var(\n --chat-composer-slash-menu-box-shadow,\n var(--menu-box-shadow, 0px 4px 16px rgba(0, 0, 0, 0.12))\n );}\n\n /* In the top layer the menu is placed by script against the composer, so the popover's\n own defaults (inset, auto margin, padding, overflow) are cleared. */.chat-composer.svelte-xpd394 > .slash-menu.top-layer:where(.svelte-xpd394) {position:fixed;inset:auto;box-sizing:border-box;margin:0 0 var(--chat-composer-slash-menu-gap, 8px);padding:0;color:inherit;}.slash-menu.svelte-xpd394 > .slash-list:where(.svelte-xpd394) {list-style:none;margin:0;padding:var(--chat-composer-slash-list-padding, 4px);max-height:var(--chat-composer-slash-list-max-height, 280px);overflow-y:auto;display:grid;gap:var(--chat-composer-slash-list-gap, 2px);}\n\n /* Rows are menu items, not buttons: the row sets its Button's tokens itself so a\n consumer's app-wide button fill never reaches it, and the highlighted row is\n tinted by the <li> beneath a transparent Button. */.slash-menu.svelte-xpd394 .slash-list:where(.svelte-xpd394) li:where(.svelte-xpd394) {min-width:0;border-radius:var(--chat-composer-slash-item-border-radius, 8px);--button-color: var(--chat-composer-slash-item-background, transparent);--button-background: none;--button-hover-color: var(--chat-composer-slash-item-hover-background, transparent);--button-text-color: var(--chat-composer-slash-item-color, var(--menu-item-color, #333333));--button-hover-text-color: var(\n --chat-composer-slash-item-color,\n var(--menu-item-color, #333333)\n );--button-border: none;--button-box-shadow: none;--button-border-radius: var(--chat-composer-slash-item-border-radius, 8px);--button-width: 100%;--button-height: auto;--button-justify-content: flex-start;--button-padding: var(--chat-composer-slash-item-padding, 8px 12px);--button-content-gap: var(--chat-composer-slash-item-gap, 8px);}.slash-menu.svelte-xpd394 > .slash-foot:where(.svelte-xpd394) {padding:var(--chat-composer-slash-foot-padding, 4px 12px);border-top:var(\n --chat-composer-slash-foot-border,\n 1px solid var(--menu-separator-color, #e0e0e0)\n );font-family:var(--chat-composer-slash-foot-font-family, inherit);font-variant-ligatures:var(--chat-composer-slash-foot-font-variant-ligatures, inherit);font-size:var(--chat-composer-slash-foot-font-size, 12px);color:var(--chat-composer-slash-foot-color, var(--menu-item-color, #333333));}\n\n /* The default row content (a consumer's slashItem snippet replaces it). */.slash-menu.svelte-xpd394 .slash-name:where(.svelte-xpd394) {flex-shrink:0;font-family:var(--chat-composer-slash-name-font-family, monospace);color:var(--chat-composer-slash-name-color, #2563eb);}.slash-menu.svelte-xpd394 .slash-hint:where(.svelte-xpd394) {flex-shrink:0;font-size:var(--chat-composer-slash-hint-font-size, 12px);color:var(--chat-composer-slash-hint-color, #71717a);}.slash-menu.svelte-xpd394 .slash-desc:where(.svelte-xpd394) {flex:1;min-width:0;text-align:start;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--chat-composer-slash-desc-color, #52525b);}\n\n /* Default visual for the arrow-key-highlighted row when a consumer hasn't\n opted into their own selected-state look via slashSelectedItemClasses --\n without this, the only signal was aria-selected, screen-reader-only.\n Scoped so a consumer's own class stays authoritative the moment it's\n supplied: this rule simply never applies then. */.slash-menu.svelte-xpd394 .slash-item-selected-default:where(.svelte-xpd394) {background:var(\n --chat-composer-slash-item-selected-background,\n var(--menu-item-hover-background-color, #f5f5f5)\n );}.slash-menu.svelte-xpd394 .slash-badge:where(.svelte-xpd394) {padding:var(--chat-composer-slash-badge-padding, 2px 8px);border-radius:var(--chat-composer-slash-badge-border-radius, 999px);font-size:var(--chat-composer-slash-badge-font-size, 12px);background:var(--chat-composer-slash-badge-background, #eff6ff);color:var(--chat-composer-slash-badge-color, #2563eb);}.send.action.svelte-xpd394 {--button-width: var(--chat-composer-idle-action-width, var(--chat-composer-send-size, 40px));--button-padding: var(\n --chat-composer-idle-action-padding,\n var(--chat-composer-send-padding, 8px)\n );--button-border-radius: var(\n --chat-composer-idle-action-border-radius,\n var(--chat-composer-send-border-radius, 50%)\n );--button-color: var(\n --chat-composer-idle-action-background-color,\n var(--chat-composer-send-background-color, #18181b)\n );--button-text-color: var(\n --chat-composer-idle-action-color,\n var(--chat-composer-send-color, #ffffff)\n );--button-hover-color: var(\n --chat-composer-idle-action-hover-background-color,\n var(--chat-composer-send-hover-background-color, #27272a)\n );--button-hover-text-color: var(\n --chat-composer-idle-action-hover-color,\n var(--button-text-color)\n );--button-content-gap: var(--chat-composer-idle-action-gap, 0px);}.send.action.action-with-text.svelte-xpd394 {--button-width: var(--chat-composer-idle-action-width, max-content);--button-padding: var(--chat-composer-idle-action-padding, 8px 12px);--button-content-gap: var(--chat-composer-idle-action-gap, 6px);}.action-with-text.svelte-xpd394 svg {width:var(--chat-composer-idle-action-icon-size, 20px);height:var(--chat-composer-idle-action-icon-size, 20px);}\n\n /* Visually hidden but still read by assistive technology -- same pattern\n Table's caption and Label's required marker use. */.sr-only.svelte-xpd394 {position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);clip-path:inset(50%);white-space:nowrap;border-width:0;}"
|
|
56652
56656
|
};
|
|
56653
56657
|
function ChatComposer(e, t) {
|
|
56654
56658
|
let n = props_id();
|