@retailcrm/embed-ui-v1-components 0.9.5 → 0.9.7

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/host.js CHANGED
@@ -1,7 +1,4 @@
1
- var __defProp = Object.defineProperty;
2
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- import { openBlock, createElementBlock, createElementVNode, defineComponent, inject, ref, computed, mergeProps, useSlots, createBlock, resolveDynamicComponent, unref, withCtx, createVNode, createCommentVNode, normalizeClass, renderSlot, createTextVNode, toDisplayString, provide, Fragment, renderList, Text, Comment, h, reactive, watch, nextTick, onMounted, onActivated, onDeactivated, onBeforeUnmount, Teleport, getCurrentInstance, Transition, normalizeProps, guardReactiveProps, normalizeStyle, withDirectives, vShow, useAttrs, toHandlers, withModifiers, useId, shallowRef, createSlots } from "vue";
1
+ import { createElementBlock, openBlock, createElementVNode, defineComponent, inject, ref, computed, mergeProps, useSlots, createBlock, resolveDynamicComponent, unref, withCtx, createCommentVNode, createVNode, normalizeClass, renderSlot, createTextVNode, toDisplayString, provide, Fragment, renderList, Text, Comment, h, reactive, watch, nextTick, onMounted, onActivated, onDeactivated, onBeforeUnmount, Teleport, getCurrentInstance, Transition, normalizeProps, guardReactiveProps, normalizeStyle, withDirectives, vShow, useAttrs, toHandlers, withModifiers, useId, shallowRef, createSlots } from "vue";
5
2
  import { preview } from "@retailcrm/image-preview";
6
3
  import isEqual from "lodash.isequal";
7
4
  import { format, formatISO } from "date-fns";
@@ -11,14 +8,14 @@ const _hoisted_1$m = {
11
8
  viewBox: "0 0 24 24"
12
9
  };
13
10
  function render$a(_ctx, _cache) {
14
- return openBlock(), createElementBlock("svg", _hoisted_1$m, _cache[0] || (_cache[0] = [
11
+ return openBlock(), createElementBlock("svg", _hoisted_1$m, [..._cache[0] || (_cache[0] = [
15
12
  createElementVNode("path", {
16
13
  fill: "currentColor",
17
14
  "fill-rule": "evenodd",
18
15
  d: "M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10A10 10 0 0 0 12 2m0 18a8 8 0 1 1 0-16 8 8 0 0 1 0 16m3.237-10.576A2.424 2.424 0 0 0 12.812 7H11.13a2.424 2.424 0 0 0-2.424 2.424v.421c0 .233.188.421.42.421h.64a.42.42 0 0 0 .421-.42v-.422a.943.943 0 0 1 .943-.942h1.683c.521 0 .943.422.943.942v.472a.95.95 0 0 1-.64.9l-.8.261a1.58 1.58 0 0 0-1.085 1.499v.656c0 .233.188.421.42.421h.64a.42.42 0 0 0 .421-.42v-.657a.11.11 0 0 1 .101-.101l.8-.261a2.43 2.43 0 0 0 1.684-2.298zm-2.845 5.893h-.842a.42.42 0 0 0-.421.42v.842c0 .233.188.421.42.421h.843a.42.42 0 0 0 .42-.42v-.843a.42.42 0 0 0-.42-.42",
19
16
  "clip-rule": "evenodd"
20
17
  }, null, -1)
21
- ]));
18
+ ])]);
22
19
  }
23
20
  const IconHelpOutlined = { render: render$a };
24
21
  const _hoisted_1$l = {
@@ -26,11 +23,11 @@ const _hoisted_1$l = {
26
23
  viewBox: "0 0 18 8"
27
24
  };
28
25
  function render$9(_ctx, _cache) {
29
- return openBlock(), createElementBlock("svg", _hoisted_1$l, _cache[0] || (_cache[0] = [
26
+ return openBlock(), createElementBlock("svg", _hoisted_1$l, [..._cache[0] || (_cache[0] = [
30
27
  createElementVNode("g", { fill: "currentColor" }, [
31
28
  createElementVNode("path", { d: "M0 0v8h2.867q1.257-.011 1.935-.604.68-.594.68-1.748 0-.675-.33-1.143a1.54 1.54 0 0 0-.892-.62q.497-.21.775-.654.279-.45.279-1.039 0-1.077-.694-1.632Q3.926 0 2.584 0zm1.52 6.676v-2.16h1.393q1.048.016 1.048 1.116 0 .488-.303.77-.3.273-.836.274zm1.124-3.324H1.52V1.335h1.064q.628 0 .916.242.294.236.294.78 0 .972-1.15.995M7.503 6.352h2.665L10.679 8h1.616l-2.76-8H8.125L5.38 8h1.616zm2.254-1.336H7.913l.917-2.994zM12.362 8V0h2.27q.972 0 1.737.478.77.473 1.2 1.352.432.873.431 1.989v.368q0 1.115-.425 1.983a3.17 3.17 0 0 1-1.191 1.346A3.26 3.26 0 0 1 14.646 8zm1.52-6.665v5.34h.734q.891 0 1.363-.631.47-.632.481-1.808v-.423q0-1.22-.466-1.846-.466-.632-1.363-.632z" })
32
29
  ], -1)
33
- ]));
30
+ ])]);
34
31
  }
35
32
  const SpriteBAD = { render: render$9 };
36
33
  const _hoisted_1$k = {
@@ -38,11 +35,11 @@ const _hoisted_1$k = {
38
35
  viewBox: "0 0 16 8"
39
36
  };
40
37
  function render$8(_ctx, _cache) {
41
- return openBlock(), createElementBlock("svg", _hoisted_1$k, _cache[0] || (_cache[0] = [
38
+ return openBlock(), createElementBlock("svg", _hoisted_1$k, [..._cache[0] || (_cache[0] = [
42
39
  createElementVNode("g", { fill: "currentColor" }, [
43
40
  createElementVNode("path", { d: "M3.373 6.016 5.058 0h1.704L4.175 8H2.577L0 0h1.7zM8.99 8H7.46V0H8.99zM11.84 8V5.181h1.343q1.322 0 2.067-.676.75-.681.75-1.857 0-.774-.342-1.379a2.3 2.3 0 0 0-.98-.94Q14.045 0 13.208 0H10.31v8zm1.368-4.154h-1.367v-2.51h1.403q.567.01.888.373t.322.95q0 .571-.322.88-.316.307-.924.307" })
44
41
  ], -1)
45
- ]));
42
+ ])]);
46
43
  }
47
44
  const SpriteVIP = { render: render$8 };
48
45
  const ImageWorkersKey = Symbol("$image.workers");
@@ -404,22 +401,12 @@ const _sfc_main$m = defineComponent({
404
401
  setup(props, { attrs, expose, slots }) {
405
402
  const root = useElementRef();
406
403
  expose({
407
- click: () => {
408
- var _a;
409
- return (_a = root.value) == null ? void 0 : _a.click();
410
- },
411
- focus: () => {
412
- var _a;
413
- return (_a = root.value) == null ? void 0 : _a.focus();
414
- },
415
- blur: () => {
416
- var _a;
417
- return (_a = root.value) == null ? void 0 : _a.blur();
418
- }
404
+ click: () => root.value?.click(),
405
+ focus: () => root.value?.focus(),
406
+ blur: () => root.value?.blur()
419
407
  });
420
408
  return () => {
421
- var _a;
422
- const content = normalize$1("default" in slots ? ((_a = slots.default) == null ? void 0 : _a.call(slots)) ?? [] : []);
409
+ const content = normalize$1("default" in slots ? slots.default?.() ?? [] : []);
423
410
  const hasText = content.some(([, isIcon]) => !isIcon);
424
411
  const [, hasLeadingIcon] = content[0] ?? [null, false];
425
412
  const [, hasTrailingIcon] = content[content.length - 1] ?? [null, false];
@@ -458,14 +445,14 @@ const _hoisted_1$h = {
458
445
  viewBox: "0 0 24 24"
459
446
  };
460
447
  function render$7(_ctx, _cache) {
461
- return openBlock(), createElementBlock("svg", _hoisted_1$h, _cache[0] || (_cache[0] = [
448
+ return openBlock(), createElementBlock("svg", _hoisted_1$h, [..._cache[0] || (_cache[0] = [
462
449
  createElementVNode("path", {
463
450
  fill: "currentColor",
464
451
  "fill-rule": "evenodd",
465
452
  d: "M19.793 6.965a.77.77 0 0 1-.022 1.075l-9.815 9.607a1.224 1.224 0 0 1-1.714.006l-4.01-3.878a.77.77 0 0 1-.028-1.074l.684-.736a.735.735 0 0 1 1.053-.028l3.15 3.046 8.96-8.771a.735.735 0 0 1 1.054.022z",
466
453
  "clip-rule": "evenodd"
467
454
  }, null, -1)
468
- ]));
455
+ ])]);
469
456
  }
470
457
  const IconDone = { render: render$7 };
471
458
  const expect = (value) => ({
@@ -553,18 +540,9 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
553
540
  const props = __props;
554
541
  const emit = __emit;
555
542
  const checkbox = useElementRef();
556
- const click = () => {
557
- var _a;
558
- return (_a = checkbox.value) == null ? void 0 : _a.click();
559
- };
560
- const focus = () => {
561
- var _a;
562
- return (_a = checkbox.value) == null ? void 0 : _a.focus();
563
- };
564
- const blur = () => {
565
- var _a;
566
- return (_a = checkbox.value) == null ? void 0 : _a.blur();
567
- };
543
+ const click = () => checkbox.value?.click();
544
+ const focus = () => checkbox.value?.focus();
545
+ const blur = () => checkbox.value?.blur();
568
546
  __expose({
569
547
  click,
570
548
  focus,
@@ -625,14 +603,14 @@ const _hoisted_1$f = {
625
603
  viewBox: "0 0 24 24"
626
604
  };
627
605
  function render$6(_ctx, _cache) {
628
- return openBlock(), createElementBlock("svg", _hoisted_1$f, _cache[0] || (_cache[0] = [
606
+ return openBlock(), createElementBlock("svg", _hoisted_1$f, [..._cache[0] || (_cache[0] = [
629
607
  createElementVNode("path", {
630
608
  fill: "currentColor",
631
609
  "fill-rule": "evenodd",
632
610
  d: "M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10A10 10 0 0 0 12 2m0 18a8 8 0 1 1 0-16 8 8 0 0 1 0 16m3.12-11.51a.5.5 0 0 1 .7 0l.5.53a.5.5 0 0 1 0 .71l-5.62 5.62a.48.48 0 0 1-.7 0l-2.35-2.37a.5.5 0 0 1 0-.71l.53-.53a.48.48 0 0 1 .7 0l1.5 1.49z",
633
611
  "clip-rule": "evenodd"
634
612
  }, null, -1)
635
- ]));
613
+ ])]);
636
614
  }
637
615
  const IconCheckmarkCircleOutlined = { render: render$6 };
638
616
  const _hoisted_1$e = {
@@ -640,12 +618,12 @@ const _hoisted_1$e = {
640
618
  viewBox: "0 0 24 24"
641
619
  };
642
620
  function render$5(_ctx, _cache) {
643
- return openBlock(), createElementBlock("svg", _hoisted_1$e, _cache[0] || (_cache[0] = [
621
+ return openBlock(), createElementBlock("svg", _hoisted_1$e, [..._cache[0] || (_cache[0] = [
644
622
  createElementVNode("path", {
645
623
  fill: "currentColor",
646
624
  d: "M18 16V4a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2M4 4h12v12H4zm16 14V6a2 2 0 0 1 2 2v10a4 4 0 0 1-4 4H8a2 2 0 0 1-2-2h12a2 2 0 0 0 2-2"
647
625
  }, null, -1)
648
- ]));
626
+ ])]);
649
627
  }
650
628
  const IconCopy = { render: render$5 };
651
629
  const isArray = Array.isArray;
@@ -658,15 +636,15 @@ const normalize = (triggers) => {
658
636
  };
659
637
  };
660
638
  class Listener {
639
+ _target = null;
640
+ _triggers = {
641
+ show: [],
642
+ hide: []
643
+ };
644
+ _listeners = [];
645
+ _onShow;
646
+ _onHide;
661
647
  constructor(onShow, onHide) {
662
- __publicField(this, "_target", null);
663
- __publicField(this, "_triggers", {
664
- show: [],
665
- hide: []
666
- });
667
- __publicField(this, "_listeners", []);
668
- __publicField(this, "_onShow");
669
- __publicField(this, "_onHide");
670
648
  this._onShow = onShow;
671
649
  this._onHide = onHide;
672
650
  }
@@ -735,9 +713,7 @@ class Listener {
735
713
  }
736
714
  }
737
715
  class Scheduler {
738
- constructor() {
739
- __publicField(this, "_timer");
740
- }
716
+ _timer = void 0;
741
717
  schedule(operation, delay) {
742
718
  clearTimeout(this._timer);
743
719
  if (delay > 0) {
@@ -802,8 +778,9 @@ function getOppositeAxis(axis) {
802
778
  function getAxisLength(axis) {
803
779
  return axis === "y" ? "height" : "width";
804
780
  }
781
+ const yAxisSides = /* @__PURE__ */ new Set(["top", "bottom"]);
805
782
  function getSideAxis(placement) {
806
- return ["top", "bottom"].includes(getSide(placement)) ? "y" : "x";
783
+ return yAxisSides.has(getSide(placement)) ? "y" : "x";
807
784
  }
808
785
  function getAlignmentAxis(placement) {
809
786
  return getOppositeAxis(getSideAxis(placement));
@@ -828,19 +805,19 @@ function getExpandedPlacements(placement) {
828
805
  function getOppositeAlignmentPlacement(placement) {
829
806
  return placement.replace(/start|end/g, (alignment) => oppositeAlignmentMap[alignment]);
830
807
  }
808
+ const lrPlacement = ["left", "right"];
809
+ const rlPlacement = ["right", "left"];
810
+ const tbPlacement = ["top", "bottom"];
811
+ const btPlacement = ["bottom", "top"];
831
812
  function getSideList(side, isStart, rtl) {
832
- const lr = ["left", "right"];
833
- const rl = ["right", "left"];
834
- const tb = ["top", "bottom"];
835
- const bt = ["bottom", "top"];
836
813
  switch (side) {
837
814
  case "top":
838
815
  case "bottom":
839
- if (rtl) return isStart ? rl : lr;
840
- return isStart ? lr : rl;
816
+ if (rtl) return isStart ? rlPlacement : lrPlacement;
817
+ return isStart ? lrPlacement : rlPlacement;
841
818
  case "left":
842
819
  case "right":
843
- return isStart ? tb : bt;
820
+ return isStart ? tbPlacement : btPlacement;
844
821
  default:
845
822
  return [];
846
823
  }
@@ -1208,15 +1185,20 @@ const flip$1 = function(options) {
1208
1185
  const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
1209
1186
  const nextPlacement = placements[nextIndex];
1210
1187
  if (nextPlacement) {
1211
- return {
1212
- data: {
1213
- index: nextIndex,
1214
- overflows: overflowsData
1215
- },
1216
- reset: {
1217
- placement: nextPlacement
1218
- }
1219
- };
1188
+ const ignoreCrossAxisOverflow = checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false;
1189
+ if (!ignoreCrossAxisOverflow || // We leave the current main axis only if every placement on that axis
1190
+ // overflows the main axis.
1191
+ overflowsData.every((d) => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {
1192
+ return {
1193
+ data: {
1194
+ index: nextIndex,
1195
+ overflows: overflowsData
1196
+ },
1197
+ reset: {
1198
+ placement: nextPlacement
1199
+ }
1200
+ };
1201
+ }
1220
1202
  }
1221
1203
  let resetPlacement = (_overflowsData$filter = overflowsData.filter((d) => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
1222
1204
  if (!resetPlacement) {
@@ -1314,6 +1296,7 @@ const hide$1 = function(options) {
1314
1296
  }
1315
1297
  };
1316
1298
  };
1299
+ const originSides = /* @__PURE__ */ new Set(["left", "top"]);
1317
1300
  async function convertValueToCoords(state, options) {
1318
1301
  const {
1319
1302
  placement,
@@ -1324,7 +1307,7 @@ async function convertValueToCoords(state, options) {
1324
1307
  const side = getSide(placement);
1325
1308
  const alignment = getAlignment(placement);
1326
1309
  const isVertical = getSideAxis(placement) === "y";
1327
- const mainAxisMulti = ["left", "top"].includes(side) ? -1 : 1;
1310
+ const mainAxisMulti = originSides.has(side) ? -1 : 1;
1328
1311
  const crossAxisMulti = rtl && isVertical ? -1 : 1;
1329
1312
  const rawValue = evaluate(options, state);
1330
1313
  let {
@@ -1494,31 +1477,37 @@ function isShadowRoot(value) {
1494
1477
  }
1495
1478
  return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
1496
1479
  }
1480
+ const invalidOverflowDisplayValues = /* @__PURE__ */ new Set(["inline", "contents"]);
1497
1481
  function isOverflowElement(element) {
1498
1482
  const {
1499
1483
  overflow,
1500
1484
  overflowX,
1501
1485
  overflowY,
1502
1486
  display
1503
- } = getComputedStyle(element);
1504
- return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !["inline", "contents"].includes(display);
1487
+ } = getComputedStyle$1(element);
1488
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);
1505
1489
  }
1490
+ const tableElements = /* @__PURE__ */ new Set(["table", "td", "th"]);
1506
1491
  function isTableElement(element) {
1507
- return ["table", "td", "th"].includes(getNodeName(element));
1492
+ return tableElements.has(getNodeName(element));
1508
1493
  }
1494
+ const topLayerSelectors = [":popover-open", ":modal"];
1509
1495
  function isTopLayer(element) {
1510
- return [":popover-open", ":modal"].some((selector) => {
1496
+ return topLayerSelectors.some((selector) => {
1511
1497
  try {
1512
1498
  return element.matches(selector);
1513
- } catch (e) {
1499
+ } catch (_e) {
1514
1500
  return false;
1515
1501
  }
1516
1502
  });
1517
1503
  }
1504
+ const transformProperties = ["transform", "translate", "scale", "rotate", "perspective"];
1505
+ const willChangeValues = ["transform", "translate", "scale", "rotate", "perspective", "filter"];
1506
+ const containValues = ["paint", "layout", "strict", "content"];
1518
1507
  function isContainingBlock(elementOrCss) {
1519
1508
  const webkit = isWebKit();
1520
- const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
1521
- return ["transform", "translate", "scale", "rotate", "perspective"].some((value) => css[value] ? css[value] !== "none" : false) || (css.containerType ? css.containerType !== "normal" : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== "none" : false) || !webkit && (css.filter ? css.filter !== "none" : false) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((value) => (css.willChange || "").includes(value)) || ["paint", "layout", "strict", "content"].some((value) => (css.contain || "").includes(value));
1509
+ const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
1510
+ return transformProperties.some((value) => css[value] ? css[value] !== "none" : false) || (css.containerType ? css.containerType !== "normal" : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== "none" : false) || !webkit && (css.filter ? css.filter !== "none" : false) || willChangeValues.some((value) => (css.willChange || "").includes(value)) || containValues.some((value) => (css.contain || "").includes(value));
1522
1511
  }
1523
1512
  function getContainingBlock(element) {
1524
1513
  let currentNode = getParentNode(element);
@@ -1536,10 +1525,11 @@ function isWebKit() {
1536
1525
  if (typeof CSS === "undefined" || !CSS.supports) return false;
1537
1526
  return CSS.supports("-webkit-backdrop-filter", "none");
1538
1527
  }
1528
+ const lastTraversableNodeNames = /* @__PURE__ */ new Set(["html", "body", "#document"]);
1539
1529
  function isLastTraversableNode(node) {
1540
- return ["html", "body", "#document"].includes(getNodeName(node));
1530
+ return lastTraversableNodeNames.has(getNodeName(node));
1541
1531
  }
1542
- function getComputedStyle(element) {
1532
+ function getComputedStyle$1(element) {
1543
1533
  return getWindow(element).getComputedStyle(element);
1544
1534
  }
1545
1535
  function getNodeScroll(element) {
@@ -1598,7 +1588,7 @@ function getFrameElement(win) {
1598
1588
  return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
1599
1589
  }
1600
1590
  function getCssDimensions(element) {
1601
- const css = getComputedStyle(element);
1591
+ const css = getComputedStyle$1(element);
1602
1592
  let width = parseFloat(css.width) || 0;
1603
1593
  let height = parseFloat(css.height) || 0;
1604
1594
  const hasOffset = isHTMLElement(element);
@@ -1694,7 +1684,7 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
1694
1684
  while (currentIFrame && offsetParent && offsetWin !== currentWin) {
1695
1685
  const iframeScale = getScale(currentIFrame);
1696
1686
  const iframeRect = currentIFrame.getBoundingClientRect();
1697
- const css = getComputedStyle(currentIFrame);
1687
+ const css = getComputedStyle$1(currentIFrame);
1698
1688
  const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
1699
1689
  const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
1700
1690
  x *= iframeScale.x;
@@ -1721,15 +1711,9 @@ function getWindowScrollBarX(element, rect) {
1721
1711
  }
1722
1712
  return rect.left + leftScroll;
1723
1713
  }
1724
- function getHTMLOffset(documentElement, scroll, ignoreScrollbarX) {
1725
- if (ignoreScrollbarX === void 0) {
1726
- ignoreScrollbarX = false;
1727
- }
1714
+ function getHTMLOffset(documentElement, scroll) {
1728
1715
  const htmlRect = documentElement.getBoundingClientRect();
1729
- const x = htmlRect.left + scroll.scrollLeft - (ignoreScrollbarX ? 0 : (
1730
- // RTL <body> scrollbar.
1731
- getWindowScrollBarX(documentElement, htmlRect)
1732
- ));
1716
+ const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
1733
1717
  const y = htmlRect.top + scroll.scrollTop;
1734
1718
  return {
1735
1719
  x,
@@ -1767,7 +1751,7 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
1767
1751
  offsets.y = offsetRect.y + offsetParent.clientTop;
1768
1752
  }
1769
1753
  }
1770
- const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll, true) : createCoords(0);
1754
+ const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
1771
1755
  return {
1772
1756
  width: rect.width * scale.x,
1773
1757
  height: rect.height * scale.y,
@@ -1786,7 +1770,7 @@ function getDocumentRect(element) {
1786
1770
  const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
1787
1771
  let x = -scroll.scrollLeft + getWindowScrollBarX(element);
1788
1772
  const y = -scroll.scrollTop;
1789
- if (getComputedStyle(body).direction === "rtl") {
1773
+ if (getComputedStyle$1(body).direction === "rtl") {
1790
1774
  x += max(html.clientWidth, body.clientWidth) - width;
1791
1775
  }
1792
1776
  return {
@@ -1796,6 +1780,7 @@ function getDocumentRect(element) {
1796
1780
  y
1797
1781
  };
1798
1782
  }
1783
+ const SCROLLBAR_MAX = 25;
1799
1784
  function getViewportRect(element, strategy) {
1800
1785
  const win = getWindow(element);
1801
1786
  const html = getDocumentElement(element);
@@ -1813,6 +1798,19 @@ function getViewportRect(element, strategy) {
1813
1798
  y = visualViewport.offsetTop;
1814
1799
  }
1815
1800
  }
1801
+ const windowScrollbarX = getWindowScrollBarX(html);
1802
+ if (windowScrollbarX <= 0) {
1803
+ const doc = html.ownerDocument;
1804
+ const body = doc.body;
1805
+ const bodyStyles = getComputedStyle(body);
1806
+ const bodyMarginInline = doc.compatMode === "CSS1Compat" ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
1807
+ const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
1808
+ if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {
1809
+ width -= clippingStableScrollbarWidth;
1810
+ }
1811
+ } else if (windowScrollbarX <= SCROLLBAR_MAX) {
1812
+ width += windowScrollbarX;
1813
+ }
1816
1814
  return {
1817
1815
  width,
1818
1816
  height,
@@ -1820,6 +1818,7 @@ function getViewportRect(element, strategy) {
1820
1818
  y
1821
1819
  };
1822
1820
  }
1821
+ const absoluteOrFixed = /* @__PURE__ */ new Set(["absolute", "fixed"]);
1823
1822
  function getInnerBoundingClientRect(element, strategy) {
1824
1823
  const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
1825
1824
  const top = clientRect.top + element.clientTop;
@@ -1860,7 +1859,7 @@ function hasFixedPositionAncestor(element, stopNode) {
1860
1859
  if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
1861
1860
  return false;
1862
1861
  }
1863
- return getComputedStyle(parentNode).position === "fixed" || hasFixedPositionAncestor(parentNode, stopNode);
1862
+ return getComputedStyle$1(parentNode).position === "fixed" || hasFixedPositionAncestor(parentNode, stopNode);
1864
1863
  }
1865
1864
  function getClippingElementAncestors(element, cache) {
1866
1865
  const cachedResult = cache.get(element);
@@ -1869,15 +1868,15 @@ function getClippingElementAncestors(element, cache) {
1869
1868
  }
1870
1869
  let result = getOverflowAncestors(element, [], false).filter((el) => isElement(el) && getNodeName(el) !== "body");
1871
1870
  let currentContainingBlockComputedStyle = null;
1872
- const elementIsFixed = getComputedStyle(element).position === "fixed";
1871
+ const elementIsFixed = getComputedStyle$1(element).position === "fixed";
1873
1872
  let currentNode = elementIsFixed ? getParentNode(element) : element;
1874
1873
  while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
1875
- const computedStyle = getComputedStyle(currentNode);
1874
+ const computedStyle = getComputedStyle$1(currentNode);
1876
1875
  const currentNodeIsContaining = isContainingBlock(currentNode);
1877
1876
  if (!currentNodeIsContaining && computedStyle.position === "fixed") {
1878
1877
  currentContainingBlockComputedStyle = null;
1879
1878
  }
1880
- const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && ["absolute", "fixed"].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
1879
+ const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
1881
1880
  if (shouldDropCurrentNode) {
1882
1881
  result = result.filter((ancestor) => ancestor !== currentNode);
1883
1882
  } else {
@@ -1933,6 +1932,9 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
1933
1932
  scrollTop: 0
1934
1933
  };
1935
1934
  const offsets = createCoords(0);
1935
+ function setLeftRTLScrollbarOffset() {
1936
+ offsets.x = getWindowScrollBarX(documentElement);
1937
+ }
1936
1938
  if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
1937
1939
  if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
1938
1940
  scroll = getNodeScroll(offsetParent);
@@ -1942,9 +1944,12 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
1942
1944
  offsets.x = offsetRect.x + offsetParent.clientLeft;
1943
1945
  offsets.y = offsetRect.y + offsetParent.clientTop;
1944
1946
  } else if (documentElement) {
1945
- offsets.x = getWindowScrollBarX(documentElement);
1947
+ setLeftRTLScrollbarOffset();
1946
1948
  }
1947
1949
  }
1950
+ if (isFixed && !isOffsetParentAnElement && documentElement) {
1951
+ setLeftRTLScrollbarOffset();
1952
+ }
1948
1953
  const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
1949
1954
  const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
1950
1955
  const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
@@ -1956,10 +1961,10 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
1956
1961
  };
1957
1962
  }
1958
1963
  function isStaticPositioned(element) {
1959
- return getComputedStyle(element).position === "static";
1964
+ return getComputedStyle$1(element).position === "static";
1960
1965
  }
1961
1966
  function getTrueOffsetParent(element, polyfill) {
1962
- if (!isHTMLElement(element) || getComputedStyle(element).position === "fixed") {
1967
+ if (!isHTMLElement(element) || getComputedStyle$1(element).position === "fixed") {
1963
1968
  return null;
1964
1969
  }
1965
1970
  if (polyfill) {
@@ -2010,7 +2015,7 @@ const getElementRects = async function(data) {
2010
2015
  };
2011
2016
  };
2012
2017
  function isRTL(element) {
2013
- return getComputedStyle(element).direction === "rtl";
2018
+ return getComputedStyle$1(element).direction === "rtl";
2014
2019
  }
2015
2020
  const platform = {
2016
2021
  convertOffsetParentRelativeRectToViewportRelativeRect,
@@ -2093,7 +2098,7 @@ function observeMove(element, onMove) {
2093
2098
  // Handle <iframe>s
2094
2099
  root: root.ownerDocument
2095
2100
  });
2096
- } catch (e) {
2101
+ } catch (_e) {
2097
2102
  io = new IntersectionObserver(handleObserve, options);
2098
2103
  }
2099
2104
  io.observe(element);
@@ -2206,7 +2211,6 @@ const moveArrow = (el, placement, strategy, coords) => {
2206
2211
  });
2207
2212
  };
2208
2213
  const move = async (el, arrow$12, target, options) => {
2209
- var _a;
2210
2214
  const adaptation = typeof options.placement === "object" ? options.placement.adaptation ?? ["flip", "shift"] : ["flip", "shift"];
2211
2215
  const middleware = [];
2212
2216
  if (options.offsetMainAxis || options.offsetCrossAxis) {
@@ -2248,7 +2252,7 @@ const move = async (el, arrow$12, target, options) => {
2248
2252
  if (middlewareData.hide) {
2249
2253
  const { referenceHidden } = middlewareData.hide;
2250
2254
  if (referenceHidden) {
2251
- (_a = options.onReferenceHidden) == null ? void 0 : _a.call(options);
2255
+ options.onReferenceHidden?.();
2252
2256
  }
2253
2257
  }
2254
2258
  };
@@ -2509,10 +2513,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
2509
2513
  detach();
2510
2514
  emit("dispose");
2511
2515
  };
2512
- const contains = (el) => {
2513
- var _a;
2514
- return ((_a = popper.value) == null ? void 0 : _a.contains(el)) ?? false;
2515
- };
2516
+ const contains = (el) => popper.value?.contains(el) ?? false;
2516
2517
  const onGlobalTap = async (event, touch = false) => {
2517
2518
  const captures = state.clicked || contains(event.target);
2518
2519
  await new Promise((resolve) => requestAnimationFrame(resolve));
@@ -2747,22 +2748,10 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
2747
2748
  setup(__props, { expose: __expose }) {
2748
2749
  const popper = ref(null);
2749
2750
  __expose({
2750
- adjust: () => {
2751
- var _a;
2752
- return (_a = popper.value) == null ? void 0 : _a.adjust();
2753
- },
2754
- dispose: () => {
2755
- var _a;
2756
- return (_a = popper.value) == null ? void 0 : _a.dispose();
2757
- },
2758
- show: () => {
2759
- var _a;
2760
- return (_a = popper.value) == null ? void 0 : _a.show();
2761
- },
2762
- hide: () => {
2763
- var _a;
2764
- return (_a = popper.value) == null ? void 0 : _a.hide();
2765
- }
2751
+ adjust: () => popper.value?.adjust(),
2752
+ dispose: () => popper.value?.dispose(),
2753
+ show: () => popper.value?.show(),
2754
+ hide: () => popper.value?.hide()
2766
2755
  });
2767
2756
  return (_ctx, _cache) => {
2768
2757
  return openBlock(), createBlock(_sfc_main$k, mergeProps({
@@ -2837,14 +2826,13 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
2837
2826
  clipboardAvailable.value = navigator.clipboard && "writeText" in navigator.clipboard;
2838
2827
  });
2839
2828
  const copy = async () => {
2840
- var _a, _b;
2841
2829
  try {
2842
2830
  if (clipboardAvailable.value) {
2843
2831
  await navigator.clipboard.writeText(props.text);
2844
2832
  copied.value = true;
2845
2833
  } else {
2846
- (_a = input.value) == null ? void 0 : _a.focus();
2847
- (_b = input.value) == null ? void 0 : _b.select();
2834
+ input.value?.focus();
2835
+ input.value?.select();
2848
2836
  copied.value = document.execCommand("copy");
2849
2837
  }
2850
2838
  } catch (e) {
@@ -2930,15 +2918,15 @@ function buildFormatLongFn(args) {
2930
2918
  }
2931
2919
  function buildLocalizeFn(args) {
2932
2920
  return (value, options) => {
2933
- const context = (options == null ? void 0 : options.context) ? String(options.context) : "standalone";
2921
+ const context = options?.context ? String(options.context) : "standalone";
2934
2922
  let valuesArray;
2935
2923
  if (context === "formatting" && args.formattingValues) {
2936
2924
  const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
2937
- const width = (options == null ? void 0 : options.width) ? String(options.width) : defaultWidth;
2925
+ const width = options?.width ? String(options.width) : defaultWidth;
2938
2926
  valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
2939
2927
  } else {
2940
2928
  const defaultWidth = args.defaultWidth;
2941
- const width = (options == null ? void 0 : options.width) ? String(options.width) : args.defaultWidth;
2929
+ const width = options?.width ? String(options.width) : args.defaultWidth;
2942
2930
  valuesArray = args.values[width] || args.values[defaultWidth];
2943
2931
  }
2944
2932
  const index = args.argumentCallback ? args.argumentCallback(value) : value;
@@ -3021,10 +3009,9 @@ function toDate(argument, context) {
3021
3009
  return constructFrom(context || argument, argument);
3022
3010
  }
3023
3011
  function startOfWeek(date, options) {
3024
- var _a, _b, _c, _d;
3025
3012
  const defaultOptions2 = getDefaultOptions();
3026
- const weekStartsOn = (options == null ? void 0 : options.weekStartsOn) ?? ((_b = (_a = options == null ? void 0 : options.locale) == null ? void 0 : _a.options) == null ? void 0 : _b.weekStartsOn) ?? defaultOptions2.weekStartsOn ?? ((_d = (_c = defaultOptions2.locale) == null ? void 0 : _c.options) == null ? void 0 : _d.weekStartsOn) ?? 0;
3027
- const _date = toDate(date, options == null ? void 0 : options.in);
3013
+ const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions2.weekStartsOn ?? defaultOptions2.locale?.options?.weekStartsOn ?? 0;
3014
+ const _date = toDate(date, options?.in);
3028
3015
  const day = _date.getDay();
3029
3016
  const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
3030
3017
  _date.setDate(_date.getDate() - diff);
@@ -3033,7 +3020,7 @@ function startOfWeek(date, options) {
3033
3020
  }
3034
3021
  function isSameWeek(laterDate, earlierDate, options) {
3035
3022
  const [laterDate_, earlierDate_] = normalizeDates(
3036
- options == null ? void 0 : options.in,
3023
+ options?.in,
3037
3024
  laterDate,
3038
3025
  earlierDate
3039
3026
  );
@@ -3112,7 +3099,7 @@ const formatDistance$2 = (token, count, options) => {
3112
3099
  } else {
3113
3100
  result = tokenValue.other.replace("{{count}}", count.toString());
3114
3101
  }
3115
- if (options == null ? void 0 : options.addSuffix) {
3102
+ if (options?.addSuffix) {
3116
3103
  if (options.comparison && options.comparison > 0) {
3117
3104
  return "in " + result;
3118
3105
  } else {
@@ -3524,7 +3511,7 @@ const formatDistance$1 = (token, count, options) => {
3524
3511
  } else {
3525
3512
  result = tokenValue.other.replace("{{count}}", count.toString());
3526
3513
  }
3527
- if (options == null ? void 0 : options.addSuffix) {
3514
+ if (options?.addSuffix) {
3528
3515
  if (options.comparison && options.comparison > 0) {
3529
3516
  return "en " + result;
3530
3517
  } else {
@@ -3888,7 +3875,7 @@ function declension(scheme, count) {
3888
3875
  }
3889
3876
  function buildLocalizeTokenFn(scheme) {
3890
3877
  return (count, options) => {
3891
- if (options == null ? void 0 : options.addSuffix) {
3878
+ if (options?.addSuffix) {
3892
3879
  if (options.comparison && options.comparison > 0) {
3893
3880
  if (scheme.future) {
3894
3881
  return declension(scheme.future, count);
@@ -3940,7 +3927,7 @@ const formatDistanceLocale = {
3940
3927
  }
3941
3928
  }),
3942
3929
  halfAMinute: (_count, options) => {
3943
- if (options == null ? void 0 : options.addSuffix) {
3930
+ if (options?.addSuffix) {
3944
3931
  if (options.comparison && options.comparison > 0) {
3945
3932
  return "через полминуты";
3946
3933
  } else {
@@ -4348,7 +4335,7 @@ const formattingDayPeriodValues = {
4348
4335
  };
4349
4336
  const ordinalNumber = (dirtyNumber, options) => {
4350
4337
  const number = Number(dirtyNumber);
4351
- const unit = options == null ? void 0 : options.unit;
4338
+ const unit = options?.unit;
4352
4339
  let suffix;
4353
4340
  if (unit === "date") {
4354
4341
  suffix = "-е";
@@ -4538,9 +4525,8 @@ const formatDateTime = (date, locale = void 0) => format(date, "Pp", {
4538
4525
  }[locale ?? detectLocale()] ?? enGB
4539
4526
  });
4540
4527
  function detectLocale() {
4541
- var _a, _b, _c, _d;
4542
4528
  const instance = getCurrentInstance();
4543
- const i18n = (_d = (_c = (_b = (_a = instance == null ? void 0 : instance.appContext) == null ? void 0 : _a.app) == null ? void 0 : _b.config) == null ? void 0 : _c.globalProperties) == null ? void 0 : _d.$i18n;
4529
+ const i18n = instance?.appContext?.app?.config?.globalProperties?.$i18n;
4544
4530
  if (i18n) {
4545
4531
  try {
4546
4532
  const locale = (typeof i18n.locale === "object" ? i18n.locale.value : i18n.locale) ?? "en-GB";
@@ -4629,12 +4615,12 @@ const _hoisted_1$b = {
4629
4615
  viewBox: "0 0 24 24"
4630
4616
  };
4631
4617
  function render$4(_ctx, _cache) {
4632
- return openBlock(), createElementBlock("svg", _hoisted_1$b, _cache[0] || (_cache[0] = [
4618
+ return openBlock(), createElementBlock("svg", _hoisted_1$b, [..._cache[0] || (_cache[0] = [
4633
4619
  createElementVNode("path", {
4634
4620
  fill: "currentColor",
4635
4621
  d: "m6.844 17.854-.7-.703a.5.5 0 0 1 0-.704l8.48-8.456-6.212.007a.49.49 0 0 1-.496-.5l.007-.991a.5.5 0 0 1 .496-.5L16.994 6c.196 0 .385.078.524.218l.265.267c.137.142.215.33.217.528l-.007 8.633a.5.5 0 0 1-.496.5h-.992a.48.48 0 0 1-.49-.493l.007-6.255-8.48 8.456a.49.49 0 0 1-.698 0"
4636
4622
  }, null, -1)
4637
- ]));
4623
+ ])]);
4638
4624
  }
4639
4625
  const IconOpenInNew = { render: render$4 };
4640
4626
  var APPEARANCE$1 = /* @__PURE__ */ ((APPEARANCE2) => {
@@ -4869,16 +4855,12 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
4869
4855
  const root = ref(null);
4870
4856
  const scrollable = ref(null);
4871
4857
  const scroll = (y) => {
4872
- var _a;
4873
- const el = root.value ?? ((_a = scrollable.value) == null ? void 0 : _a.$el);
4858
+ const el = root.value ?? scrollable.value?.$el;
4874
4859
  if (el) {
4875
4860
  el.scrollTop = y;
4876
4861
  }
4877
4862
  };
4878
- const update = () => {
4879
- var _a;
4880
- return (_a = scrollable.value) == null ? void 0 : _a.$forceUpdate();
4881
- };
4863
+ const update = () => scrollable.value?.$forceUpdate();
4882
4864
  __expose({
4883
4865
  scroll,
4884
4866
  update
@@ -4900,7 +4882,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
4900
4882
  "opacity",
4901
4883
  "transform",
4902
4884
  "visibility"
4903
- ], e == null ? void 0 : e.propertyName)) {
4885
+ ], e?.propertyName)) {
4904
4886
  update();
4905
4887
  }
4906
4888
  };
@@ -4941,12 +4923,12 @@ const _hoisted_1$9 = {
4941
4923
  viewBox: "0 0 24 24"
4942
4924
  };
4943
4925
  function render$3(_ctx, _cache) {
4944
- return openBlock(), createElementBlock("svg", _hoisted_1$9, _cache[0] || (_cache[0] = [
4926
+ return openBlock(), createElementBlock("svg", _hoisted_1$9, [..._cache[0] || (_cache[0] = [
4945
4927
  createElementVNode("path", {
4946
4928
  fill: "currentColor",
4947
4929
  d: "M7.113 6.176a.6.6 0 0 1 .848 0L12 10.214l4.038-4.038a.6.6 0 0 1 .849 0l.937.937a.6.6 0 0 1 0 .848L13.785 12l4.04 4.04a.6.6 0 0 1 0 .848l-.937.937a.6.6 0 0 1-.849 0L12 13.784l-4.038 4.04a.6.6 0 0 1-.849 0l-.937-.937a.6.6 0 0 1 0-.848l4.04-4.04-4.039-4.038a.6.6 0 0 1 0-.849z"
4948
4930
  }, null, -1)
4949
- ]));
4931
+ ])]);
4950
4932
  }
4951
4933
  const IconClear = { render: render$3 };
4952
4934
  const ModalInjectKey = Symbol("$embedModal");
@@ -4960,9 +4942,9 @@ const plugin$1 = {
4960
4942
  };
4961
4943
  const nextAnimationFrame = async () => new Promise((resolve) => requestAnimationFrame(resolve));
4962
4944
  class LayerRegistry {
4945
+ registry;
4946
+ started = false;
4963
4947
  constructor() {
4964
- __publicField(this, "registry");
4965
- __publicField(this, "started", false);
4966
4948
  this.registry = [];
4967
4949
  }
4968
4950
  start() {
@@ -5277,10 +5259,9 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
5277
5259
  }
5278
5260
  };
5279
5261
  return (_ctx, _cache) => {
5280
- var _a;
5281
5262
  return state.attached ? (openBlock(), createBlock(Teleport, {
5282
5263
  key: 0,
5283
- to: ((_a = unref(globals)) == null ? void 0 : _a.container) || "body"
5264
+ to: unref(globals)?.container || "body"
5284
5265
  }, [
5285
5266
  createVNode(_sfc_main$e, {
5286
5267
  name: "fade-2",
@@ -5344,9 +5325,9 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
5344
5325
  target: closerTarget.value,
5345
5326
  "offset-main-axis": 0
5346
5327
  }, {
5347
- default: withCtx(() => _cache[9] || (_cache[9] = [
5348
- createTextVNode(" Esc ")
5349
- ])),
5328
+ default: withCtx(() => [..._cache[9] || (_cache[9] = [
5329
+ createTextVNode(" Esc ", -1)
5330
+ ])]),
5350
5331
  _: 1
5351
5332
  }, 8, ["target"])
5352
5333
  ], 512)
@@ -5568,8 +5549,8 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
5568
5549
  scheduleDetach();
5569
5550
  };
5570
5551
  const close = (event = void 0) => {
5571
- const target = event == null ? void 0 : event.target;
5572
- if (target == null ? void 0 : target.closest(".ps__thumb-y")) {
5552
+ const target = event?.target;
5553
+ if (target?.closest(".ps__thumb-y")) {
5573
5554
  return;
5574
5555
  }
5575
5556
  if (props.closable) {
@@ -5638,7 +5619,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
5638
5619
  }
5639
5620
  };
5640
5621
  const EmbedModalWindowSurface = () => !state.attached ? void 0 : h(Teleport, {
5641
- to: (globals == null ? void 0 : globals.container) ?? document.body
5622
+ to: globals?.container ?? document.body
5642
5623
  }, h(_sfc_main$e, {
5643
5624
  name: "fade-2",
5644
5625
  onBeforeEnter: () => visibilityOfOverlay.value = "showing",
@@ -5667,9 +5648,8 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
5667
5648
  onClick: onOverlayClick,
5668
5649
  onPsYReachEnd: (event) => emit("scroll:y:end", event),
5669
5650
  onScroll: (event) => {
5670
- var _a, _b;
5671
5651
  if (!state.overlapped) {
5672
- emit("scroll:y", event, ((_b = (_a = body.value) == null ? void 0 : _a.getBoundingClientRect()) == null ? void 0 : _b.toJSON()) ?? null);
5652
+ emit("scroll:y", event, body.value?.getBoundingClientRect()?.toJSON() ?? null);
5673
5653
  }
5674
5654
  }
5675
5655
  }, {
@@ -5686,14 +5666,14 @@ const _hoisted_1$7 = {
5686
5666
  viewBox: "0 0 24 24"
5687
5667
  };
5688
5668
  function render$2(_ctx, _cache) {
5689
- return openBlock(), createElementBlock("svg", _hoisted_1$7, _cache[0] || (_cache[0] = [
5669
+ return openBlock(), createElementBlock("svg", _hoisted_1$7, [..._cache[0] || (_cache[0] = [
5690
5670
  createElementVNode("path", {
5691
5671
  fill: "currentColor",
5692
5672
  "fill-rule": "evenodd",
5693
5673
  d: "M22.905 19.63 12.813 2.37a.76.76 0 0 0-.65-.37h-.3a.76.76 0 0 0-.65.37L1.1 19.63a.79.79 0 0 0 0 .76l.14.23a.73.73 0 0 0 .65.38h20.225a.73.73 0 0 0 .65-.38l.14-.23a.79.79 0 0 0 0-.76m-9.902-3.13a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5v-1a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5zm-.47-3.5a.25.25 0 0 0 .25-.22l.4-3.22a.5.5 0 0 0-.5-.56h-1.36a.5.5 0 0 0-.5.56l.4 3.22a.25.25 0 0 0 .25.22z",
5694
5674
  "clip-rule": "evenodd"
5695
5675
  }, null, -1)
5696
- ]));
5676
+ ])]);
5697
5677
  }
5698
5678
  const IconWarning = { render: render$2 };
5699
5679
  const _hoisted_1$6 = {
@@ -5994,18 +5974,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
5994
5974
  const props = __props;
5995
5975
  const emit = __emit;
5996
5976
  const radio = useElementRef();
5997
- const click = () => {
5998
- var _a;
5999
- return (_a = radio.value) == null ? void 0 : _a.click();
6000
- };
6001
- const focus = () => {
6002
- var _a;
6003
- return (_a = radio.value) == null ? void 0 : _a.focus();
6004
- };
6005
- const blur = () => {
6006
- var _a;
6007
- return (_a = radio.value) == null ? void 0 : _a.blur();
6008
- };
5977
+ const click = () => radio.value?.click();
5978
+ const focus = () => radio.value?.focus();
5979
+ const blur = () => radio.value?.blur();
6009
5980
  __expose({
6010
5981
  click,
6011
5982
  focus,
@@ -6047,17 +6018,17 @@ const _hoisted_1$4 = {
6047
6018
  viewBox: "0 0 24 24"
6048
6019
  };
6049
6020
  function render$1(_ctx, _cache) {
6050
- return openBlock(), createElementBlock("svg", _hoisted_1$4, _cache[0] || (_cache[0] = [
6021
+ return openBlock(), createElementBlock("svg", _hoisted_1$4, [..._cache[0] || (_cache[0] = [
6051
6022
  createElementVNode("path", {
6052
6023
  fill: "currentColor",
6053
6024
  d: "m14.675 4.6.544-1.257a.99.99 0 0 0-.04-.911.82.82 0 0 0-.739-.421L9.5 2a.81.81 0 0 0-.704.423.99.99 0 0 0-.047.88l.55 1.26c.155.358.201.762.13 1.15l-.623 3.441a2.8 2.8 0 0 1-.685 1.426l-.875.96a.96.96 0 0 0-.246.646l.025.555c.002.502.373.91.83.912l8.312.025c.458 0 .828-.407.828-.909l.005-.536a.96.96 0 0 0-.248-.646l-.878-.964a2.85 2.85 0 0 1-.691-1.43l-.636-3.443a2 2 0 0 1 .128-1.15M10.967 20.047a3 3 0 0 1-.196-1.079l-.007-3.771 2.424.057.007 3.758a3 3 0 0 1-.193 1.079l-.638 1.632a.415.415 0 0 1-.382.277.42.42 0 0 1-.383-.279z"
6054
6025
  }, null, -1)
6055
- ]));
6026
+ ])]);
6056
6027
  }
6057
6028
  const IconPinned = { render: render$1 };
6058
6029
  class VueI18n {
6030
+ _state;
6059
6031
  constructor(locale = void 0) {
6060
- __publicField(this, "_state");
6061
6032
  this._state = reactive({ locale });
6062
6033
  }
6063
6034
  get locale() {
@@ -6070,7 +6041,7 @@ class VueI18n {
6070
6041
  const I18nInjectKey = Symbol("$embedI18n");
6071
6042
  const plugin = {
6072
6043
  install(app, options) {
6073
- app.provide(I18nInjectKey, options instanceof VueI18n ? options : new VueI18n(options == null ? void 0 : options.locale));
6044
+ app.provide(I18nInjectKey, options instanceof VueI18n ? options : new VueI18n(options?.locale));
6074
6045
  }
6075
6046
  };
6076
6047
  var SIZE$2 = /* @__PURE__ */ ((SIZE2) => {
@@ -6141,22 +6112,22 @@ const plural = (template, choice, rule) => {
6141
6112
  return forms[rule(choice, forms.length)];
6142
6113
  };
6143
6114
  class I18n {
6115
+ parent;
6116
+ messages;
6117
+ computed;
6118
+ pluralization;
6119
+ fallback;
6144
6120
  constructor(options = void 0, parent = void 0) {
6145
- __publicField(this, "parent");
6146
- __publicField(this, "messages");
6147
- __publicField(this, "computed");
6148
- __publicField(this, "pluralization");
6149
- __publicField(this, "fallback");
6150
6121
  this.parent = parent;
6151
- this.messages = (options == null ? void 0 : options.messages) ?? {};
6152
- this.computed = (options == null ? void 0 : options.computed) ?? {};
6122
+ this.messages = options?.messages ?? {};
6123
+ this.computed = options?.computed ?? {};
6153
6124
  this.pluralization = {
6154
6125
  "en-GB": pluralization_en_GB,
6155
6126
  "es-ES": pluralization_es_ES,
6156
6127
  "ru-RU": pluralization_ru_RU,
6157
- ...(options == null ? void 0 : options.pluralization) ?? {}
6128
+ ...options?.pluralization ?? {}
6158
6129
  };
6159
- this.fallback = options == null ? void 0 : options.fallback;
6130
+ this.fallback = options?.fallback;
6160
6131
  }
6161
6132
  t(locale, path, values = void 0) {
6162
6133
  try {
@@ -6289,10 +6260,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
6289
6260
  emits: ["remove"],
6290
6261
  setup(__props) {
6291
6262
  const props = __props;
6292
- const i18n = computed(() => {
6293
- var _a;
6294
- return _i18n$1.init(((_a = inject(I18nInjectKey, null)) == null ? void 0 : _a.locale) ?? _i18n$1.fallback);
6295
- });
6263
+ const i18n = computed(() => _i18n$1.init(inject(I18nInjectKey, null)?.locale ?? _i18n$1.fallback));
6296
6264
  const textRef = ref(null);
6297
6265
  const textStyle = ref({});
6298
6266
  const onHover = () => {
@@ -6347,14 +6315,14 @@ const _hoisted_1$2 = {
6347
6315
  viewBox: "0 0 24 24"
6348
6316
  };
6349
6317
  function render(_ctx, _cache) {
6350
- return openBlock(), createElementBlock("svg", _hoisted_1$2, _cache[0] || (_cache[0] = [
6318
+ return openBlock(), createElementBlock("svg", _hoisted_1$2, [..._cache[0] || (_cache[0] = [
6351
6319
  createElementVNode("path", {
6352
6320
  fill: "currentColor",
6353
6321
  "fill-rule": "evenodd",
6354
6322
  d: "M4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0m11 2.045c0-.122-.05-.24-.14-.324L13.148 12l1.712-1.721a.445.445 0 0 0 0-.648l-.49-.49a.444.444 0 0 0-.649 0L12 10.851 10.279 9.14a.444.444 0 0 0-.648 0l-.49.49a.444.444 0 0 0 0 .649L10.851 12 9.14 13.721a.444.444 0 0 0 0 .648l.49.49a.444.444 0 0 0 .649 0L12 13.149l1.721 1.712a.444.444 0 0 0 .648 0l.49-.49a.45.45 0 0 0 .141-.325",
6355
6323
  "clip-rule": "evenodd"
6356
6324
  }, null, -1)
6357
- ]));
6325
+ ])]);
6358
6326
  }
6359
6327
  const IconClearCircle = { render };
6360
6328
  var TYPE = /* @__PURE__ */ ((TYPE2) => {
@@ -6621,10 +6589,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
6621
6589
  const props = __props;
6622
6590
  const emit = __emit;
6623
6591
  const uid2 = useId();
6624
- const i18n = computed(() => {
6625
- var _a;
6626
- return _i18n.init(((_a = inject(I18nInjectKey, null)) == null ? void 0 : _a.locale) ?? _i18n.fallback);
6627
- });
6592
+ const i18n = computed(() => _i18n.init(inject(I18nInjectKey, null)?.locale ?? _i18n.fallback));
6628
6593
  const decimalsParsed = computed(() => {
6629
6594
  if (props.decimals === "*" || props.decimals === void 0) return "*";
6630
6595
  const n = Number(props.decimals);
@@ -6700,9 +6665,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
6700
6665
  emit("input", event);
6701
6666
  };
6702
6667
  const onPaste = async (event) => {
6703
- var _a;
6704
6668
  event.preventDefault();
6705
- const text2 = ((_a = event.clipboardData) == null ? void 0 : _a.getData("text")) ?? "";
6669
+ const text2 = event.clipboardData?.getData("text") ?? "";
6706
6670
  if (!text2) return;
6707
6671
  await insert(text2);
6708
6672
  emit("paste", event);
@@ -6740,26 +6704,11 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
6740
6704
  };
6741
6705
  const root = useElementRef();
6742
6706
  const textbox = shallowRef(null);
6743
- const getSelectionStart = () => {
6744
- var _a;
6745
- return ((_a = textbox.value) == null ? void 0 : _a.selectionStart) ?? 0;
6746
- };
6747
- const getSelectionEnd = () => {
6748
- var _a;
6749
- return ((_a = textbox.value) == null ? void 0 : _a.selectionEnd) ?? 0;
6750
- };
6751
- const setSelectionRange = (start, end) => {
6752
- var _a;
6753
- return (_a = textbox.value) == null ? void 0 : _a.setSelectionRange(start, end);
6754
- };
6755
- const select = () => {
6756
- var _a;
6757
- return (_a = textbox.value) == null ? void 0 : _a.select();
6758
- };
6759
- const focus = () => {
6760
- var _a;
6761
- return (_a = textbox.value) == null ? void 0 : _a.focus();
6762
- };
6707
+ const getSelectionStart = () => textbox.value?.selectionStart ?? 0;
6708
+ const getSelectionEnd = () => textbox.value?.selectionEnd ?? 0;
6709
+ const setSelectionRange = (start, end) => textbox.value?.setSelectionRange(start, end);
6710
+ const select = () => textbox.value?.select();
6711
+ const focus = () => textbox.value?.focus();
6763
6712
  const onFocus = async (event) => {
6764
6713
  emit("focus", event);
6765
6714
  emit("update:focused", true);
@@ -6794,10 +6743,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
6794
6743
  /** Установка фокуса на поле ввода */
6795
6744
  focus,
6796
6745
  /** Сброс фокуса с поля ввода */
6797
- blur: () => {
6798
- var _a;
6799
- return (_a = textbox.value) == null ? void 0 : _a.blur();
6800
- },
6746
+ blur: () => textbox.value?.blur(),
6801
6747
  /** Выбор значения внутри поля ввода */
6802
6748
  select,
6803
6749
  /** Вставка значения */
@@ -6983,18 +6929,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
6983
6929
  setup(__props, { expose: __expose }) {
6984
6930
  const root = ref(null);
6985
6931
  __expose({
6986
- click: () => {
6987
- var _a;
6988
- return (_a = root.value) == null ? void 0 : _a.click();
6989
- },
6990
- focus: () => {
6991
- var _a;
6992
- return (_a = root.value) == null ? void 0 : _a.focus();
6993
- },
6994
- blur: () => {
6995
- var _a;
6996
- return (_a = root.value) == null ? void 0 : _a.blur();
6997
- }
6932
+ click: () => root.value?.click(),
6933
+ focus: () => root.value?.focus(),
6934
+ blur: () => root.value?.blur()
6998
6935
  });
6999
6936
  const toolbarSize = useToolbarSize();
7000
6937
  const size = computed(() => {
@@ -7143,14 +7080,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
7143
7080
  const emit = __emit;
7144
7081
  const i18nBus = inject(I18nInjectKey, null);
7145
7082
  const iframe = ref(null);
7146
- const getIFrameDocument = () => {
7147
- var _a;
7148
- return ((_a = iframe.value) == null ? void 0 : _a.contentDocument) ?? null;
7149
- };
7150
- const getIFrameWindow = () => {
7151
- var _a;
7152
- return ((_a = iframe.value) == null ? void 0 : _a.contentWindow) ?? null;
7153
- };
7083
+ const getIFrameDocument = () => iframe.value?.contentDocument ?? null;
7084
+ const getIFrameWindow = () => iframe.value?.contentWindow ?? null;
7154
7085
  const getIFrameYMaps = () => {
7155
7086
  const iframeWindow = getIFrameWindow();
7156
7087
  if (iframeWindow && "ymaps3" in iframeWindow) {
@@ -7163,8 +7094,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
7163
7094
  zoom: 10
7164
7095
  };
7165
7096
  const waitIFrameContentLoaded = (retry = 5) => {
7166
- var _a;
7167
- if ((_a = iframe.value) == null ? void 0 : _a.contentDocument) {
7097
+ if (iframe.value?.contentDocument) {
7168
7098
  return Promise.resolve();
7169
7099
  }
7170
7100
  if (retry <= 1) {
@@ -7180,7 +7110,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
7180
7110
  "en-GB": "en_US",
7181
7111
  "es-ES": "en_US",
7182
7112
  "ru-RU": "ru_RU"
7183
- })[(i18nBus == null ? void 0 : i18nBus.locale) ?? "en-GB"]);
7113
+ })[i18nBus?.locale ?? "en-GB"]);
7184
7114
  const apiUrl = computed(() => `https://api-maps.yandex.ru/v3/?apikey=${props.apiKey}&lang=${apiLocale.value}`);
7185
7115
  const apiUrlVersion = ref(0);
7186
7116
  const getGeocodeApiUrl = (geocode) => `https://geocode-maps.yandex.ru/1.x/?apikey=${props.apiKey}&geocode=${geocode}&lang=${apiLocale.value}&format=json`;
@@ -7191,19 +7121,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
7191
7121
  });
7192
7122
  }
7193
7123
  const fetchAddressFromCoordinates = async (coordinates) => {
7194
- var _a, _b, _c, _d, _e;
7195
7124
  const response = await fetch(getGeocodeApiUrl(coordinates.toString()));
7196
7125
  const result = await response.json();
7197
- return ((_e = (_d = (_c = (_b = (_a = result.response.GeoObjectCollection.featureMember[0]) == null ? void 0 : _a.GeoObject) == null ? void 0 : _b.metaDataProperty) == null ? void 0 : _c.GeocoderMetaData) == null ? void 0 : _d.Address) == null ? void 0 : _e.formatted) ?? "";
7126
+ return result.response.GeoObjectCollection.featureMember[0]?.GeoObject?.metaDataProperty?.GeocoderMetaData?.Address?.formatted ?? "";
7198
7127
  };
7199
7128
  const fetchCoordinatesFromAddress = async (address) => {
7200
- var _a, _b;
7201
7129
  const response = await fetch(getGeocodeApiUrl(address));
7202
7130
  const result = await response.json();
7203
- return ((_b = (_a = result.response.GeoObjectCollection.featureMember[0]) == null ? void 0 : _a.GeoObject) == null ? void 0 : _b.Point.pos) ?? "";
7131
+ return result.response.GeoObjectCollection.featureMember[0]?.GeoObject?.Point.pos ?? "";
7204
7132
  };
7205
7133
  const loadApi = async () => {
7206
- var _a;
7207
7134
  await waitIFrameContentLoaded();
7208
7135
  const iframeDocument = getIFrameDocument();
7209
7136
  if (iframeDocument) {
@@ -7211,7 +7138,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
7211
7138
  style.innerHTML = "body { margin: 0; }";
7212
7139
  iframeDocument.head.appendChild(style);
7213
7140
  await load(iframeDocument, apiUrl.value);
7214
- await ((_a = getIFrameYMaps()) == null ? void 0 : _a.ready);
7141
+ await getIFrameYMaps()?.ready;
7215
7142
  const el = iframeDocument.createElement("div");
7216
7143
  el.setAttribute("id", "map");
7217
7144
  iframeDocument.body.appendChild(el);