@orangelogic/design-system 3.10.0 → 3.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/library/chunks/{asset-link-format.BLKOUD2l.js → asset-link-format.f7Khv8SZ.js} +646 -642
- package/library/chunks/{button.w0zH5Ivx.js → button.-Jl_NdgM.js} +1 -1
- package/library/chunks/{color-swatch-group.Bvq6xkM-.js → color-swatch-group.Ib1WYbMl.js} +10 -10
- package/library/chunks/{color-swatch.Caved2kL.js → color-swatch.Dc-IqxsX.js} +1 -1
- package/library/chunks/{confirm-popover.BpYjy5nJ.js → confirm-popover.mgYIjZdo.js} +3 -3
- package/library/chunks/{dialog.ICoCAj6Z.js → dialog.YFc-HBc5.js} +2 -2
- package/library/chunks/{document-viewer.CRMRT7Ou.js → document-viewer.CMET1HRd.js} +7 -7
- package/library/chunks/{dot-pagination.CzVpiv00.js → dot-pagination.BgETAL2j.js} +1 -1
- package/library/chunks/{folder-select.CP0NPc0S.js → folder-select.Hl51n0ge.js} +4 -4
- package/library/chunks/{header.BQg_JjHw.js → header.BeZml2NV.js} +2 -2
- package/library/chunks/{i18n.BA19xtyU.js → i18n.CNnI4-0K.js} +4 -0
- package/library/chunks/{icon-button.BWJ1Vqn5.js → icon-button.ENVA7x3u.js} +1 -1
- package/library/chunks/{iframe.Dm-nXSBv.js → iframe.Cgy_DE7W.js} +1 -1
- package/library/chunks/{image.BsLsWySo.js → image.rtjsax7e.js} +2 -2
- package/library/chunks/{index.CExDr5Lh.js → index.BBLDucoY.js} +584 -619
- package/library/chunks/{input.D1TGTsxj.js → input.BJ5LN8of.js} +1 -1
- package/library/chunks/{markdown.CnX2rNeb.js → markdown.CrIkpd0h.js} +2 -2
- package/library/chunks/{menu-item.uFqeX_J6.js → menu-item.DfsfX25P.js} +1 -1
- package/library/chunks/{option.jeaj7_Lr.js → option.B34is9Z5.js} +1 -1
- package/library/chunks/{pagination.DDW-Lw16.js → pagination.DMAcWRyI.js} +5 -5
- package/library/chunks/{tab-group.Dpj7Lx8_.js → tab-group.D14m1Kel.js} +4 -4
- package/library/chunks/{toast.CCWVobz5.js → toast.CGIDPKV8.js} +1 -1
- package/library/chunks/transformation.OaRYixzE.js +385 -0
- package/library/chunks/{tree.DYFFjW1-.js → tree.BEFWro0D.js} +1 -1
- package/library/chunks/{types.CQDQXXnW.js → types.IAKAUHSg.js} +21505 -21291
- package/library/components/alert.js +2 -2
- package/library/components/asset-link-format.js +4 -4
- package/library/components/atoms.js +15 -15
- package/library/components/audio.js +2 -2
- package/library/components/border-input-group.js +2 -2
- package/library/components/breadcrumb.js +1 -1
- package/library/components/button.js +2 -2
- package/library/components/color-picker.js +3 -3
- package/library/components/color-swatch-group.js +5 -5
- package/library/components/color-swatch.js +2 -2
- package/library/components/confirm-popover.js +4 -4
- package/library/components/copy-button.js +1 -1
- package/library/components/corner-position-input-group.js +3 -3
- package/library/components/date-calendar.js +1 -1
- package/library/components/details.js +1 -1
- package/library/components/dialog.js +3 -3
- package/library/components/document-viewer.js +3 -3
- package/library/components/dot-pagination.js +2 -2
- package/library/components/drawer.js +2 -2
- package/library/components/dropdown.js +2 -2
- package/library/components/dynamic-select.js +4 -4
- package/library/components/e-chart.js +1 -1
- package/library/components/element-clamp.js +2 -2
- package/library/components/file-on-demand.js +9 -9
- package/library/components/folder-select.js +4 -4
- package/library/components/format-bytes.js +1 -1
- package/library/components/format-date.js +1 -1
- package/library/components/format-number.js +1 -1
- package/library/components/format-time.js +1 -1
- package/library/components/header.js +2 -2
- package/library/components/icon-button.js +2 -2
- package/library/components/iframe.js +2 -2
- package/library/components/image-comparer.js +1 -1
- package/library/components/image.js +2 -2
- package/library/components/input.js +2 -2
- package/library/components/line-clamp.js +1 -1
- package/library/components/markdown.js +3 -3
- package/library/components/masonry.js +2 -2
- package/library/components/menu-item.js +2 -2
- package/library/components/menu.js +2 -2
- package/library/components/molecules.js +3 -3
- package/library/components/option.js +2 -2
- package/library/components/organisms.js +2 -2
- package/library/components/padding-input-group.js +1 -1
- package/library/components/pagination.js +6 -6
- package/library/components/popup.js +1 -1
- package/library/components/position-picker.js +1 -1
- package/library/components/progress-bar.js +1 -1
- package/library/components/progress-ring.js +1 -1
- package/library/components/range.js +1 -1
- package/library/components/rating.js +1 -1
- package/library/components/relative-time.js +1 -1
- package/library/components/select.js +2 -2
- package/library/components/shadow-input-group.js +1 -1
- package/library/components/share-option-list.js +1 -1
- package/library/components/sidebar.js +1 -1
- package/library/components/size-input-group.js +3 -3
- package/library/components/spinner.js +1 -1
- package/library/components/split-panel.js +1 -1
- package/library/components/tab-group.js +5 -5
- package/library/components/tab.js +2 -2
- package/library/components/tag.js +2 -2
- package/library/components/tooltip.js +1 -1
- package/library/components/tree-item.js +2 -2
- package/library/components/tree.js +2 -2
- package/library/components/typeface.js +2 -2
- package/library/components/types.js +267 -267
- package/library/components/video.js +2 -2
- package/library/package.json +1 -1
- package/library/packages/events/src/cx-publish-page-cancel.d.ts +6 -0
- package/library/packages/events/src/cx-publish-page-submit.d.ts +9 -0
- package/library/packages/events/src/cx-view-and-sort-action-click.d.ts +11 -0
- package/library/packages/events/src/events.d.ts +3 -0
- package/library/packages/molecules/src/index.d.ts +1 -0
- package/library/packages/molecules/src/publish-page/publish-page.d.ts +169 -0
- package/library/packages/molecules/src/publish-page/publish-page.styles.d.ts +2 -0
- package/library/packages/molecules/src/view-and-sort/view-and-sort.d.ts +7 -0
- package/library/packages/organisms/src/content-builder/blocks/image/image.d.ts +2 -0
- package/library/packages/organisms/src/content-builder/blocks/video/video.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/components/config-manager/config-manager.d.ts +0 -25
- package/library/packages/organisms/src/content-builder/components/gallery-picker/gallery-picker.d.ts +8 -0
- package/library/packages/organisms/src/content-builder/content-builder.d.ts +39 -25
- package/library/packages/organisms/src/content-builder/plugins/plugin-factory.d.ts +0 -5
- package/library/packages/organisms/src/content-builder/styleController.d.ts +1 -1
- package/library/packages/organisms/src/dam-custom-toolbar-buttons-editor/dam-custom-toolbar-buttons-editor.d.ts +11 -1
- package/library/packages/organisms/src/template-switcher/template-switcher-example.data.d.ts +1 -0
- package/library/packages/organisms/src/template-switcher/template-switcher.d.ts +3 -0
- package/library/packages/tools/src/fetch-image/fetch-image.d.ts +10 -0
- package/library/packages/tools/src/tiptap/utils/md/schema.d.ts +1 -1
- package/library/packages/types/src/content-builder.d.ts +0 -5
- package/library/packages/utils/src/transformation/transformation.d.ts +10 -29
- package/library/react-web-component.d.ts +116 -13
- package/library/utils.js +95 -96
- package/package.json +1 -1
- package/library/chunks/transformation.D27sTUdZ.js +0 -392
|
@@ -4,7 +4,7 @@ import { f as ot } from "./form-control.styles.CaGWmeAS.js";
|
|
|
4
4
|
import { c as lt } from "./custom-element.L4WJXn1j.js";
|
|
5
5
|
import { d as ht } from "./default-value.COZopaet.js";
|
|
6
6
|
import { F as pt } from "./form.C8LMdQB4.js";
|
|
7
|
-
import { L as ct } from "./i18n.
|
|
7
|
+
import { L as ct } from "./i18n.CNnI4-0K.js";
|
|
8
8
|
import { H as dt } from "./slot.j5oheLJC.js";
|
|
9
9
|
import { w as V } from "./watch.DJF5K-8U.js";
|
|
10
10
|
import { i as ft, x as E } from "./lit-element.jLBm65_O.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { C as jn, I as Yn } from "./icon-button.
|
|
1
|
+
import { C as jn, I as Yn } from "./icon-button.ENVA7x3u.js";
|
|
2
2
|
import { C as Un, n as me } from "./lib-cortex-element.CVMmyPMC.js";
|
|
3
3
|
import { c as Gn } from "./custom-element.L4WJXn1j.js";
|
|
4
|
-
import { L as Hn } from "./i18n.
|
|
4
|
+
import { L as Hn } from "./i18n.CNnI4-0K.js";
|
|
5
5
|
import { w as Ne } from "./watch.DJF5K-8U.js";
|
|
6
6
|
import { s as Kn } from "./string.Demn8Xmk.js";
|
|
7
7
|
import { i as mt, x as Wn } from "./lit-element.jLBm65_O.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as r, C as L } from "./lib-cortex-element.CVMmyPMC.js";
|
|
2
2
|
import { c as M } from "./component.styles.CRO4Odto.js";
|
|
3
3
|
import { c as E } from "./custom-element.L4WJXn1j.js";
|
|
4
|
-
import { d as k, L as P } from "./i18n.
|
|
4
|
+
import { d as k, L as P } from "./i18n.CNnI4-0K.js";
|
|
5
5
|
import { H as z, g as R } from "./slot.j5oheLJC.js";
|
|
6
6
|
import { w as b } from "./watch.DJF5K-8U.js";
|
|
7
7
|
import { i as D, x as h, E as S } from "./lit-element.jLBm65_O.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as s, C as x } from "./lib-cortex-element.CVMmyPMC.js";
|
|
2
2
|
import { c as m } from "./component.styles.CRO4Odto.js";
|
|
3
3
|
import { c as v } from "./custom-element.L4WJXn1j.js";
|
|
4
|
-
import { L as g } from "./i18n.
|
|
4
|
+
import { L as g } from "./i18n.CNnI4-0K.js";
|
|
5
5
|
import { w as d } from "./watch.DJF5K-8U.js";
|
|
6
6
|
import { i as _, x as h } from "./lit-element.jLBm65_O.js";
|
|
7
7
|
import { r as f } from "./state.CSDxrqLd.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import b from "../components/space.js";
|
|
2
2
|
import { n as o, C as _ } from "./lib-cortex-element.CVMmyPMC.js";
|
|
3
|
-
import { C as P, I as y } from "./icon-button.
|
|
3
|
+
import { C as P, I as y } from "./icon-button.ENVA7x3u.js";
|
|
4
4
|
import { c as f } from "./custom-element.L4WJXn1j.js";
|
|
5
|
-
import { L as z } from "./i18n.
|
|
5
|
+
import { L as z } from "./i18n.CNnI4-0K.js";
|
|
6
6
|
import { c as m } from "./math.DuKzLacZ.js";
|
|
7
7
|
import { w as d } from "./watch.DJF5K-8U.js";
|
|
8
8
|
import { i as C, x as s } from "./lit-element.jLBm65_O.js";
|
|
@@ -10,9 +10,9 @@ import { r as S } from "./state.CSDxrqLd.js";
|
|
|
10
10
|
import { e as $ } from "./class-map.BiVq-cVR.js";
|
|
11
11
|
import { c as x } from "./repeat.CFjcER6_.js";
|
|
12
12
|
import { n as g } from "./when.Dr1es41R.js";
|
|
13
|
-
import { C as w } from "./button.
|
|
14
|
-
import { C as v } from "./input.
|
|
15
|
-
import { C as I } from "./option.
|
|
13
|
+
import { C as w } from "./button.-Jl_NdgM.js";
|
|
14
|
+
import { C as v } from "./input.BJ5LN8of.js";
|
|
15
|
+
import { C as I } from "./option.B34is9Z5.js";
|
|
16
16
|
import B from "../components/select.js";
|
|
17
17
|
import N from "../components/tooltip.js";
|
|
18
18
|
import { C as k } from "./typography.IqHbnd3C.js";
|
|
@@ -2,7 +2,7 @@ import zn from "../components/resize-observer.js";
|
|
|
2
2
|
import { n as wt, C as Bn } from "./lib-cortex-element.CVMmyPMC.js";
|
|
3
3
|
import { c as Fn } from "./component.styles.CRO4Odto.js";
|
|
4
4
|
import { c as Nn } from "./custom-element.L4WJXn1j.js";
|
|
5
|
-
import { L as Ln } from "./i18n.
|
|
5
|
+
import { L as Ln } from "./i18n.CNnI4-0K.js";
|
|
6
6
|
import { s as Zi } from "./scroll.xtO5yojm.js";
|
|
7
7
|
import { w as ft } from "./watch.DJF5K-8U.js";
|
|
8
8
|
import { i as $n } from "./dom.DShN_5Jh.js";
|
|
@@ -17,11 +17,11 @@ import { i as Ji } from "./guard.D4axKaMo.js";
|
|
|
17
17
|
import { o as tr } from "./map.D8heArFD.js";
|
|
18
18
|
import { o as Ve } from "./style-map.llVFPd__.js";
|
|
19
19
|
import { n as Pe } from "./when.Dr1es41R.js";
|
|
20
|
-
import { C as Yn } from "./button.
|
|
20
|
+
import { C as Yn } from "./button.-Jl_NdgM.js";
|
|
21
21
|
import Xn from "../components/dropdown.js";
|
|
22
|
-
import { C as qn } from "./icon-button.
|
|
22
|
+
import { C as qn } from "./icon-button.ENVA7x3u.js";
|
|
23
23
|
import Gn from "../components/menu.js";
|
|
24
|
-
import { C as Kn } from "./menu-item.
|
|
24
|
+
import { C as Kn } from "./menu-item.DfsfX25P.js";
|
|
25
25
|
import jn from "../components/tab.js";
|
|
26
26
|
var bi = /* @__PURE__ */ ((o) => (o.Bottom = "bottom", o.End = "end", o.Start = "start", o.Top = "top", o))(bi || {}), Ke = /* @__PURE__ */ ((o) => (o.Center = "center", o.End = "flex-end", o.Start = "flex-start", o))(Ke || {}), wr = /* @__PURE__ */ ((o) => (o.Auto = "auto", o.Manual = "manual", o))(wr || {}), ue = /* @__PURE__ */ ((o) => (o.Button = "button", o.Default = "default", o.Timeline = "timeline", o))(ue || {}), Tt = /* @__PURE__ */ ((o) => (o.Dropdown = "dropdown", o.Pagination = "pagination", o.Scroll = "scroll", o))(Tt || {}), Ut = /* @__PURE__ */ ((o) => (o.Absolute = "absolute", o.DisplayNone = "display-none", o))(Ut || {});
|
|
27
27
|
function Dt(o) {
|
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
import { c as k } from "./capitalize.CIBKBL10.js";
|
|
2
|
+
import { C as $, T as R, U as M } from "./asset-link-format.ClaYu_v8.js";
|
|
3
|
+
import { P as v } from "./position-picker.DjnhxIKF.js";
|
|
4
|
+
const y = window.location.origin.includes("localhost:") ? "https://local.orangelogic.com" : window.location.origin;
|
|
5
|
+
function ae(e, i, n, u = y) {
|
|
6
|
+
const c = new URL(u + "/" + e);
|
|
7
|
+
return Array.isArray(n) ? n.forEach((a) => {
|
|
8
|
+
a[1] && c.searchParams.append(a[0], a[1]);
|
|
9
|
+
}) : n && Object.keys(n).forEach((a) => {
|
|
10
|
+
n[a] && c.searchParams.append(a, n[a]);
|
|
11
|
+
}), fetch(c, i);
|
|
12
|
+
}
|
|
13
|
+
const oe = "space-default";
|
|
14
|
+
var L = /* @__PURE__ */ ((e) => (e.Desktop = "desktop", e.Mobile = "mobile", e.Tablet = "tablet", e))(L || {});
|
|
15
|
+
const w = {
|
|
16
|
+
canvasWidth: "",
|
|
17
|
+
height: "",
|
|
18
|
+
id: "desktop",
|
|
19
|
+
maxWidth: "",
|
|
20
|
+
name: k(
|
|
21
|
+
"desktop"
|
|
22
|
+
/* Desktop */
|
|
23
|
+
)
|
|
24
|
+
}, F = {
|
|
25
|
+
canvasWidth: "770px",
|
|
26
|
+
height: "",
|
|
27
|
+
id: "tablet",
|
|
28
|
+
maxWidth: "1280px",
|
|
29
|
+
name: k(
|
|
30
|
+
"tablet"
|
|
31
|
+
/* Tablet */
|
|
32
|
+
)
|
|
33
|
+
}, W = {
|
|
34
|
+
canvasWidth: "320px",
|
|
35
|
+
height: "",
|
|
36
|
+
id: "mobile",
|
|
37
|
+
maxWidth: "480px",
|
|
38
|
+
name: k(
|
|
39
|
+
"mobile"
|
|
40
|
+
/* Mobile */
|
|
41
|
+
)
|
|
42
|
+
}, re = [w, F, W];
|
|
43
|
+
var B = /* @__PURE__ */ ((e) => (e.All = "ALL", e.CanDelete = "CanDelete", e.CanDownload = "CanDownload", e.CanFind = "CanFind", e.CanManageRights = "CanManageRights", e.CanMove = "CanMove", e.CanRead = "CanRead", e.CanReadAll = "CanReadAll", e.CanReadAndWrite = "CanReadAndWrite", e.CanReadLarge = "CanReadLarge", e.CanReadMedium = "CanReadMedium", e.CanReadOriginal = "CanReadOriginal", e.CanShare = "CanShare", e.CanUpload = "CanUpload", e.CanWrite = "CanWrite", e.None = "NONE", e))(B || {}), D = /* @__PURE__ */ ((e) => (e.All = "all", e.Audio = "audio", e.Image = "image", e.Other = "other", e.Video = "video", e))(D || {}), U = /* @__PURE__ */ ((e) => (e.Content = "content", e.Template = "template", e))(U || {}), G = /* @__PURE__ */ ((e) => (e.Administrator = "Administrator", e.Designer = "Designer", e.Editor = "Editor", e))(G || {}), I = /* @__PURE__ */ ((e) => (e.Accordion = "BlockAccordion", e.Analytics = "BlockAnalytics", e.Audio = "BlockAudio", e.Button = "BlockButton", e.Carousel = "BlockCarousel", e.ColorSwatches = "BlockColorSwatches", e.Column = "BlockCell", e.ColumnGroup = "BlockColumns", e.DamView = "BlockDamView", e.Divider = "BlockDivider", e.DocumentViewer = "BlockDocumentViewer", e.FontKit = "BlockFontKit", e.Gallery = "BlockGallery", e.Header = "BlockHeader", e.Image = "BlockImage", e.RichText = "BlockRichText", e.SearchBox = "BlockSearchBox", e.TabGroup = "BlockTabs", e.Text = "BlockText", e.Timeline = "BlockTimeline", e.Video = "BlockVideo", e))(I || {});
|
|
44
|
+
const se = Object.values(I).filter(
|
|
45
|
+
(e) => e !== "BlockCell"
|
|
46
|
+
/* Column */
|
|
47
|
+
);
|
|
48
|
+
var K = /* @__PURE__ */ ((e) => (e.Carousel = "carousel", e.Gallery = "gallery", e))(K || {}), j = /* @__PURE__ */ ((e) => (e.Templates = "TEMPLATES", e.TranslatableAttributes = "TRANSLATABLE_ATTRIBUTES", e.TranslatableTexts = "TRANSLATABLE_TEXTS", e))(j || {});
|
|
49
|
+
const _ = "/AssetLink/", V = {
|
|
50
|
+
[v.BottomCenter]: $.South,
|
|
51
|
+
[v.BottomLeft]: $.Southwest,
|
|
52
|
+
[v.BottomRight]: $.Southeast,
|
|
53
|
+
[v.CenterCenter]: $.Center,
|
|
54
|
+
[v.CenterLeft]: $.West,
|
|
55
|
+
[v.CenterRight]: $.East,
|
|
56
|
+
[v.TopCenter]: $.North,
|
|
57
|
+
[v.TopLeft]: $.Northwest,
|
|
58
|
+
[v.TopRight]: $.Northeast
|
|
59
|
+
}, g = "/t/", X = [400, 800, 1200, 1600, 2400], z = 0.15;
|
|
60
|
+
function H({
|
|
61
|
+
asset: e,
|
|
62
|
+
baseUrl: i,
|
|
63
|
+
extension: n,
|
|
64
|
+
options: u,
|
|
65
|
+
parameters: c,
|
|
66
|
+
transformations: a,
|
|
67
|
+
useSession: h = ""
|
|
68
|
+
}) {
|
|
69
|
+
if (i == null)
|
|
70
|
+
return "";
|
|
71
|
+
let r = i;
|
|
72
|
+
const f = a?.findLast(
|
|
73
|
+
(l) => l.key === R.Quality
|
|
74
|
+
);
|
|
75
|
+
if (f && (a = [
|
|
76
|
+
...a?.filter(
|
|
77
|
+
(l) => l.key !== R.Quality
|
|
78
|
+
) || [],
|
|
79
|
+
f
|
|
80
|
+
]), a) {
|
|
81
|
+
const l = [];
|
|
82
|
+
for (let t = 0; t < a.length; t++) {
|
|
83
|
+
const d = a[t];
|
|
84
|
+
if (d.key === R.Rotate) {
|
|
85
|
+
let o = d.value.rotation ?? 0;
|
|
86
|
+
for (; a[t + 1]?.key === R.Rotate; )
|
|
87
|
+
t++, o += a[t].value.rotation ?? 0;
|
|
88
|
+
o !== 0 && l.push({ key: R.Rotate, value: { rotation: o } });
|
|
89
|
+
} else
|
|
90
|
+
l.push(d);
|
|
91
|
+
}
|
|
92
|
+
a = l;
|
|
93
|
+
}
|
|
94
|
+
a && a.length > 0 && (r += "/t/"), a?.forEach(({ key: l, value: t }) => {
|
|
95
|
+
if (l === R.Resize) {
|
|
96
|
+
if (t.unit === M.AspectRatio && t.ratioWidth && t.ratioHeight) {
|
|
97
|
+
r += `re_ar_${t.ratioWidth}:${t.ratioHeight}/`;
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
const d = [
|
|
101
|
+
...[
|
|
102
|
+
{
|
|
103
|
+
key: "re_w_",
|
|
104
|
+
value: Math.round(t.width ?? 0)
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
key: "re_h_",
|
|
108
|
+
value: Math.round(t.height ?? 0)
|
|
109
|
+
}
|
|
110
|
+
].filter((o) => o.value !== void 0).map((o) => ({
|
|
111
|
+
key: o.key,
|
|
112
|
+
value: Math.round(Number(o.value))
|
|
113
|
+
})),
|
|
114
|
+
{
|
|
115
|
+
key: "re_rm_",
|
|
116
|
+
value: "stretch"
|
|
117
|
+
}
|
|
118
|
+
];
|
|
119
|
+
d.forEach(({ key: o, value: m }, A) => {
|
|
120
|
+
r += `${o}${m}${A < d.length - 1 ? "," : ""}`;
|
|
121
|
+
}), r += "/";
|
|
122
|
+
}
|
|
123
|
+
if (l === R.Crop) {
|
|
124
|
+
const d = t.unit === M.AspectRatio && !!t.ratioWidth && !!t.ratioHeight, o = !t.disabledSize && !d, m = o && (t.x !== void 0 || t.y !== void 0), A = [
|
|
125
|
+
...[
|
|
126
|
+
{
|
|
127
|
+
key: "c_",
|
|
128
|
+
value: t.mode
|
|
129
|
+
},
|
|
130
|
+
...d ? [
|
|
131
|
+
{
|
|
132
|
+
key: "ar_",
|
|
133
|
+
value: `${t.ratioWidth}:${t.ratioHeight}`
|
|
134
|
+
}
|
|
135
|
+
] : [],
|
|
136
|
+
...o ? [
|
|
137
|
+
{
|
|
138
|
+
key: "c_w_",
|
|
139
|
+
value: Math.round(t.width ?? 0)
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
key: "c_h_",
|
|
143
|
+
value: Math.round(t.height ?? 0)
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
key: "c_x_",
|
|
147
|
+
value: Math.round(t.x ?? 0) === 0 && u?.omitZeroXY ? void 0 : Math.round(t.x ?? 0)
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
key: "c_y_",
|
|
151
|
+
value: Math.round(t.y ?? 0) === 0 && u?.omitZeroXY ? void 0 : Math.round(t.y ?? 0)
|
|
152
|
+
}
|
|
153
|
+
] : [],
|
|
154
|
+
...!m && t.focusMode && t.focusMode !== "manual" ? [
|
|
155
|
+
{
|
|
156
|
+
key: t.isFocusModeAuto ? "acm_" : "c_g_",
|
|
157
|
+
value: t.focusMode
|
|
158
|
+
}
|
|
159
|
+
] : [],
|
|
160
|
+
...!m && t.focusMode === "manual" && t.position ? [
|
|
161
|
+
{
|
|
162
|
+
key: "c_g_",
|
|
163
|
+
value: V[t.position]
|
|
164
|
+
}
|
|
165
|
+
] : []
|
|
166
|
+
].filter((C) => C.value !== void 0 && C.value !== null).map((C) => ({
|
|
167
|
+
key: C.key,
|
|
168
|
+
value: C.value
|
|
169
|
+
})),
|
|
170
|
+
...d ? [] : [
|
|
171
|
+
{
|
|
172
|
+
key: "c_whu_",
|
|
173
|
+
value: "pixel"
|
|
174
|
+
}
|
|
175
|
+
]
|
|
176
|
+
];
|
|
177
|
+
A.forEach(({ key: C, value: b }, x) => {
|
|
178
|
+
const p = ["c_w_", "c_h_", "c_x_", "c_y_"].includes(C);
|
|
179
|
+
r += `${C}${p ? Math.round(Number(b)) : b}${x < A.length - 1 ? "," : ""}`;
|
|
180
|
+
}), r += "/";
|
|
181
|
+
}
|
|
182
|
+
if (l === R.Rotate && ([
|
|
183
|
+
{
|
|
184
|
+
key: "r_a_",
|
|
185
|
+
value: t.rotation
|
|
186
|
+
}
|
|
187
|
+
].filter((o) => o.value !== void 0).map((o) => ({
|
|
188
|
+
key: o.key,
|
|
189
|
+
value: Math.round(Number(o.value))
|
|
190
|
+
})).forEach(({ key: o, value: m }) => {
|
|
191
|
+
r += `${o}${m}`;
|
|
192
|
+
}), r += "/"), l === R.Quality) {
|
|
193
|
+
const d = [
|
|
194
|
+
{
|
|
195
|
+
key: "q_level_",
|
|
196
|
+
value: t.quality
|
|
197
|
+
}
|
|
198
|
+
].filter((o) => o.value !== void 0).map((o) => ({
|
|
199
|
+
key: o.key,
|
|
200
|
+
value: Math.round(Number(o.value))
|
|
201
|
+
}));
|
|
202
|
+
d.forEach(({ key: o, value: m }, A) => {
|
|
203
|
+
r += `${o}${m}${A < d.length - 1 ? "," : ""}`;
|
|
204
|
+
}), r += "/";
|
|
205
|
+
}
|
|
206
|
+
if (l === R.Metadata) {
|
|
207
|
+
const d = [
|
|
208
|
+
{
|
|
209
|
+
key: "fl_keep_metadata",
|
|
210
|
+
value: t.keepMetadata
|
|
211
|
+
}
|
|
212
|
+
].filter((o) => o.value !== void 0).map((o) => ({ key: o.key, value: o.value }));
|
|
213
|
+
d.forEach(({ key: o }, m) => {
|
|
214
|
+
r += `${o}${m < d.length - 1 ? "," : ""}`;
|
|
215
|
+
}), r += "/";
|
|
216
|
+
}
|
|
217
|
+
}), n && (r += `${e?.identifier ?? crypto.randomUUID()}${n}`);
|
|
218
|
+
const s = [];
|
|
219
|
+
return c && c.length > 0 && c.forEach(({ key: l, value: t }) => {
|
|
220
|
+
s.push(
|
|
221
|
+
`${encodeURIComponent(l.trim())}=${encodeURIComponent(t.trim())}`
|
|
222
|
+
);
|
|
223
|
+
}), i && h && s.push(`UseSession=${encodeURIComponent(h)}`), s.length > 0 && (r += `?${s.join("&")}`), r.endsWith("/") && (r = r.slice(0, -1)), r;
|
|
224
|
+
}
|
|
225
|
+
const E = ".auto";
|
|
226
|
+
function ce(e, i, n = {}) {
|
|
227
|
+
const u = n.format === T && S(n.extension), c = !!n.autoFormat && !u;
|
|
228
|
+
if (!e || !i?.length && !c)
|
|
229
|
+
return e;
|
|
230
|
+
const a = i?.length ? H({ baseUrl: "", transformations: i }).replace(/\/t\//g, "") : "";
|
|
231
|
+
if (!a && !c)
|
|
232
|
+
return e;
|
|
233
|
+
const h = e.indexOf(_);
|
|
234
|
+
if (h < 0)
|
|
235
|
+
return a ? `${e}${g}${a}` : e;
|
|
236
|
+
const r = e.slice(0, h + _.length), f = e.slice(h + _.length);
|
|
237
|
+
if (!f)
|
|
238
|
+
return e;
|
|
239
|
+
const s = f.indexOf(g), l = s >= 0, t = f.indexOf("/"), d = l ? s : t, o = d >= 0 ? f.slice(0, d) : f, m = l ? f.slice(s + g.length) : t >= 0 ? f.slice(t + 1) : "", A = m.slice(m.lastIndexOf("/") + 1), C = A ? `${A.replace(/\.[^.]+$/, "")}${E}` : `${o.replace(/\.[^.]+$/, "")}${E}`, x = [a, c ? C : l ? "" : A].filter(
|
|
240
|
+
Boolean
|
|
241
|
+
);
|
|
242
|
+
return x.length === 0 ? e : `${r}${o}${g}${x.join("/")}`;
|
|
243
|
+
}
|
|
244
|
+
function Y(e) {
|
|
245
|
+
return `re_w_${Math.round(e)}`;
|
|
246
|
+
}
|
|
247
|
+
function q(e, i) {
|
|
248
|
+
if (!e || !Number.isFinite(i) || i <= 0)
|
|
249
|
+
return e;
|
|
250
|
+
const n = e.indexOf(_);
|
|
251
|
+
if (n < 0)
|
|
252
|
+
return e;
|
|
253
|
+
const u = Y(i), c = e.slice(0, n + _.length), a = e.slice(n + _.length), h = a.indexOf(g);
|
|
254
|
+
if (h >= 0) {
|
|
255
|
+
const f = a.slice(0, h), s = a.slice(
|
|
256
|
+
h + g.length
|
|
257
|
+
);
|
|
258
|
+
return `${c}${f}${g}${u}/${s}`;
|
|
259
|
+
}
|
|
260
|
+
const r = a.indexOf("/");
|
|
261
|
+
if (r >= 0) {
|
|
262
|
+
const f = a.slice(0, r), s = a.slice(r);
|
|
263
|
+
return `${c}${f}${g}${u}${s}`;
|
|
264
|
+
}
|
|
265
|
+
return `${c}${a}${g}${u}`;
|
|
266
|
+
}
|
|
267
|
+
function le(e) {
|
|
268
|
+
const i = e.indexOf(_);
|
|
269
|
+
return i < 0 ? !1 : e.slice(i + _.length).includes(g);
|
|
270
|
+
}
|
|
271
|
+
function Q(e) {
|
|
272
|
+
const i = e.indexOf(_);
|
|
273
|
+
if (i < 0)
|
|
274
|
+
return !1;
|
|
275
|
+
const n = e.slice(i + _.length), u = n.indexOf(g);
|
|
276
|
+
return u < 0 ? !1 : n.slice(u + g.length).includes("/");
|
|
277
|
+
}
|
|
278
|
+
const T = "TRX", N = "TR1", Z = /* @__PURE__ */ new Set([
|
|
279
|
+
"avif",
|
|
280
|
+
"bmp",
|
|
281
|
+
"gif",
|
|
282
|
+
"ico",
|
|
283
|
+
"jpeg",
|
|
284
|
+
"jpg",
|
|
285
|
+
"png",
|
|
286
|
+
"svg",
|
|
287
|
+
"tif",
|
|
288
|
+
"tiff",
|
|
289
|
+
"webp"
|
|
290
|
+
]);
|
|
291
|
+
function O(e) {
|
|
292
|
+
if (!e)
|
|
293
|
+
return "";
|
|
294
|
+
const i = e.trim().toLowerCase();
|
|
295
|
+
return i.startsWith(".") ? i.slice(1) : i;
|
|
296
|
+
}
|
|
297
|
+
function S(e) {
|
|
298
|
+
return O(e) === "gif";
|
|
299
|
+
}
|
|
300
|
+
const J = 1e3 * 1024 * 1024, P = {
|
|
301
|
+
b: 1,
|
|
302
|
+
byte: 1,
|
|
303
|
+
bytes: 1,
|
|
304
|
+
gb: 1024 ** 3,
|
|
305
|
+
kb: 1024,
|
|
306
|
+
mb: 1024 ** 2,
|
|
307
|
+
tb: 1024 ** 4
|
|
308
|
+
};
|
|
309
|
+
function ee(e) {
|
|
310
|
+
if (typeof e == "number")
|
|
311
|
+
return Number.isFinite(e) && e >= 0 ? e : void 0;
|
|
312
|
+
if (!e)
|
|
313
|
+
return;
|
|
314
|
+
const i = /^\s*([\d.,]+)\s*([a-z]*)\s*$/i.exec(e);
|
|
315
|
+
if (!i)
|
|
316
|
+
return;
|
|
317
|
+
const n = Number(i[1].replace(/,/g, ""));
|
|
318
|
+
if (!Number.isFinite(n) || n < 0)
|
|
319
|
+
return;
|
|
320
|
+
const u = i[2].toLowerCase();
|
|
321
|
+
if (!u)
|
|
322
|
+
return n;
|
|
323
|
+
const c = P[u];
|
|
324
|
+
return c === void 0 ? void 0 : n * c;
|
|
325
|
+
}
|
|
326
|
+
function de(e, i) {
|
|
327
|
+
if (e)
|
|
328
|
+
return;
|
|
329
|
+
const n = typeof i == "number" ? i : Number(i ?? "");
|
|
330
|
+
return Number.isFinite(n) && n > 0 ? n : void 0;
|
|
331
|
+
}
|
|
332
|
+
function ue(e, i) {
|
|
333
|
+
if (!Z.has(O(e)))
|
|
334
|
+
return N;
|
|
335
|
+
const n = ee(i);
|
|
336
|
+
return n !== void 0 && n > J ? N : T;
|
|
337
|
+
}
|
|
338
|
+
function fe(e, i = {}) {
|
|
339
|
+
if (!e.includes(_) || Q(e) || i.format === T && S(i.extension))
|
|
340
|
+
return "";
|
|
341
|
+
const { maxWidth: n, widths: u = X } = i, c = [...u].filter((s) => Number.isFinite(s) && s > 0).sort((s, l) => s - l);
|
|
342
|
+
if (c.length === 0)
|
|
343
|
+
return "";
|
|
344
|
+
let a = c;
|
|
345
|
+
if (n !== void 0 && Number.isFinite(n) && n > 0) {
|
|
346
|
+
const s = c.filter((l) => l <= n);
|
|
347
|
+
a = s.length > 0 ? s : [c[0]];
|
|
348
|
+
}
|
|
349
|
+
const h = n !== void 0 && Number.isFinite(n) && n > 0, f = (h ? a.filter(
|
|
350
|
+
(s) => n > s * (1 + z)
|
|
351
|
+
) : a).map(
|
|
352
|
+
(s) => `${q(e, s)} ${s}w`
|
|
353
|
+
);
|
|
354
|
+
return h && f.push(`${e} ${n}w`), f.join(", ");
|
|
355
|
+
}
|
|
356
|
+
function he(e, i = 100) {
|
|
357
|
+
return !Number.isFinite(e) || e <= 0 ? "" : `${Math.ceil(e / i) * i}px`;
|
|
358
|
+
}
|
|
359
|
+
export {
|
|
360
|
+
D as A,
|
|
361
|
+
I as B,
|
|
362
|
+
L as D,
|
|
363
|
+
U as E,
|
|
364
|
+
B as P,
|
|
365
|
+
oe as S,
|
|
366
|
+
G as T,
|
|
367
|
+
ce as a,
|
|
368
|
+
fe as b,
|
|
369
|
+
de as c,
|
|
370
|
+
H as d,
|
|
371
|
+
K as e,
|
|
372
|
+
ae as f,
|
|
373
|
+
he as g,
|
|
374
|
+
j as h,
|
|
375
|
+
se as i,
|
|
376
|
+
re as j,
|
|
377
|
+
X as k,
|
|
378
|
+
E as l,
|
|
379
|
+
q as m,
|
|
380
|
+
le as n,
|
|
381
|
+
N as o,
|
|
382
|
+
J as p,
|
|
383
|
+
ee as q,
|
|
384
|
+
ue as r
|
|
385
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { C as F, n as l } from "./lib-cortex-element.CVMmyPMC.js";
|
|
2
2
|
import { c as O } from "./component.styles.CRO4Odto.js";
|
|
3
3
|
import { c as U } from "./custom-element.L4WJXn1j.js";
|
|
4
|
-
import { L as N } from "./i18n.
|
|
4
|
+
import { L as N } from "./i18n.CNnI4-0K.js";
|
|
5
5
|
import { c as X } from "./math.DuKzLacZ.js";
|
|
6
6
|
import { w as b } from "./watch.DJF5K-8U.js";
|
|
7
7
|
import { i as R, x as m, E } from "./lit-element.jLBm65_O.js";
|