@fluidattacks/design 3.1.11 → 3.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (205) hide show
  1. package/dist/_commonjsHelpers-C6fGbg64.mjs +6 -0
  2. package/dist/components/@core/index.js +18 -1
  3. package/dist/components/accordion/accordion-content/index.js +22 -1
  4. package/dist/components/accordion/index.js +78 -1
  5. package/dist/components/alert/index.js +162 -4
  6. package/dist/components/button/index.js +69 -1
  7. package/dist/components/card/card-header/index.js +83 -1
  8. package/dist/components/card/card-with-image/index.js +93 -1
  9. package/dist/components/card/card-with-input/index.js +106 -3
  10. package/dist/components/card/card-with-selector/index.js +71 -1
  11. package/dist/components/card/card-with-switch/index.js +50 -1
  12. package/dist/components/card/index.js +12 -1
  13. package/dist/components/carousel/index.js +62 -10
  14. package/dist/components/checkbox/index.js +118 -3
  15. package/dist/components/cloud-image/index.js +8 -1
  16. package/dist/components/code-snippet/index.js +72 -1
  17. package/dist/components/code-snippet/location-code/index.js +171 -1
  18. package/dist/components/colors/index.js +224 -1
  19. package/dist/components/confirm-dialog/index.js +46 -1
  20. package/dist/components/container/index.js +51 -3
  21. package/dist/components/content-card/category-tag/index.js +42 -1
  22. package/dist/components/content-card/event-date/index.js +61 -1
  23. package/dist/components/content-card/index.js +168 -3
  24. package/dist/components/content-card-carousel/index.js +95 -1
  25. package/dist/components/content-card-carousel/scroll-buttons/index.js +9 -1
  26. package/dist/components/divider/index.js +25 -1
  27. package/dist/components/empty-state/empty-button/index.js +6 -1
  28. package/dist/components/empty-state/index.js +58 -8
  29. package/dist/components/file-preview/index.js +31 -3
  30. package/dist/components/form/index.js +63 -3
  31. package/dist/components/grid-container/index.js +46 -5
  32. package/dist/components/group-selector/index.js +135 -1
  33. package/dist/components/group-selector/option-container/index.js +12 -1
  34. package/dist/components/icon/index.js +102 -4
  35. package/dist/components/icon-button/index.js +76 -3
  36. package/dist/components/indicator-card/index.js +74 -1
  37. package/dist/components/info-sidebar/index.js +116 -1
  38. package/dist/components/inputs/fields/combobox/index.js +146 -1
  39. package/dist/components/inputs/fields/combobox/option/index.js +8 -1
  40. package/dist/components/inputs/fields/date/calendar/cell/index.js +27 -1
  41. package/dist/components/inputs/fields/date/calendar/grid/index.js +26 -1
  42. package/dist/components/inputs/fields/date/calendar/header/index.js +38 -1
  43. package/dist/components/inputs/fields/date/calendar/index.js +30 -1
  44. package/dist/components/inputs/fields/date/index.js +68 -1
  45. package/dist/components/inputs/fields/date-range/calendar/index.js +35 -1
  46. package/dist/components/inputs/fields/date-range/index.js +108 -3
  47. package/dist/components/inputs/fields/date-time/calendar/index.js +60 -5
  48. package/dist/components/inputs/fields/date-time/index.js +69 -1
  49. package/dist/components/inputs/fields/editable/index.js +28 -1
  50. package/dist/components/inputs/fields/input/index.js +77 -1
  51. package/dist/components/inputs/fields/input-file/index.js +117 -4
  52. package/dist/components/inputs/fields/input-tags/index.js +63 -2
  53. package/dist/components/inputs/fields/number/index.js +57 -1
  54. package/dist/components/inputs/fields/number-range/index.js +49 -1
  55. package/dist/components/inputs/fields/phone/index.js +574 -11
  56. package/dist/components/inputs/fields/text-area/index.js +81 -1
  57. package/dist/components/inputs/index.js +28 -1
  58. package/dist/components/inputs/label/index.js +38 -1
  59. package/dist/components/inputs/outline-container/index.js +104 -1
  60. package/dist/components/inputs/utils/action-button/index.js +31 -1
  61. package/dist/components/inputs/utils/calendar-button/index.js +37 -1
  62. package/dist/components/inputs/utils/date-selector/index.js +62 -1
  63. package/dist/components/inputs/utils/date-time-field/index.js +133 -1
  64. package/dist/components/inputs/utils/dialog/index.js +14 -1
  65. package/dist/components/inputs/utils/number-field/index.js +86 -1
  66. package/dist/components/inputs/utils/popover/index.js +44 -1
  67. package/dist/components/interactive-card/icon/index.js +7 -1
  68. package/dist/components/interactive-card/index.js +118 -1
  69. package/dist/components/language-selector/index.js +37 -1
  70. package/dist/components/language-selector/item-list/index.js +8 -1
  71. package/dist/components/link/index.js +106 -7
  72. package/dist/components/list-item/index.js +67 -1
  73. package/dist/components/little-flag/index.js +32 -3
  74. package/dist/components/loading/index.js +55 -14
  75. package/dist/components/logo/index.js +13 -1
  76. package/dist/components/logo-carousel/index.js +45 -4
  77. package/dist/components/lottie/index.js +20 -3
  78. package/dist/components/menu/index.js +67 -1
  79. package/dist/components/message-banner/index.js +87 -4
  80. package/dist/components/modal/index.js +65 -1
  81. package/dist/components/modal/modal-confirm/index.js +51 -1
  82. package/dist/components/modal/modal-footer/index.js +25 -1
  83. package/dist/components/modal/modal-header/index.js +51 -1
  84. package/dist/components/notification/index.js +113 -5
  85. package/dist/components/notification-sign/index.js +43 -6
  86. package/dist/components/number-input/index.js +62 -7
  87. package/dist/components/oauth-selector/index.js +100 -1
  88. package/dist/components/oauth-selector/option-container/index.js +76 -1
  89. package/dist/components/plan-card/index.js +155 -5
  90. package/dist/components/plan-card/recommended-tag/index.js +31 -1
  91. package/dist/components/pop-up/description/index.js +51 -1
  92. package/dist/components/pop-up/index.js +152 -1
  93. package/dist/components/premium-feature/index.js +85 -3
  94. package/dist/components/priority-score/index.js +29 -1
  95. package/dist/components/progress/index.js +36 -3
  96. package/dist/components/progress-bar/index.js +153 -5
  97. package/dist/components/radio-button/index.js +125 -3
  98. package/dist/components/scroll-button/index.js +38 -2
  99. package/dist/components/search/index.js +105 -7
  100. package/dist/components/search-bar/index.js +219 -1
  101. package/dist/components/search-bar/item-searching/index.js +10 -1
  102. package/dist/components/severity-badge/index.js +74 -1
  103. package/dist/components/severity-overview/badge/index.js +69 -1
  104. package/dist/components/severity-overview/index.js +17 -1
  105. package/dist/components/show-on-hover/index.js +31 -3
  106. package/dist/components/slide-out-menu/index.js +3456 -3
  107. package/dist/components/slide-out-menu/menu-item/index.js +67 -1
  108. package/dist/components/slider/index.js +124 -7
  109. package/dist/components/slider/thumb/index.js +17 -1
  110. package/dist/components/step-lapse/index.js +153 -9
  111. package/dist/components/table-button/index.js +97 -3
  112. package/dist/components/tabs/fixed-tabs/index.js +29 -1
  113. package/dist/components/tabs/index.js +57 -1
  114. package/dist/components/tabs/tab/index.js +39 -1
  115. package/dist/components/tag/index.js +184 -3
  116. package/dist/components/timeline/card/index.js +9 -1
  117. package/dist/components/timeline/index.js +17 -1
  118. package/dist/components/toggle/index.js +85 -14
  119. package/dist/components/toggle-buttons/index.js +103 -5
  120. package/dist/components/tooltip/index.js +13 -1
  121. package/dist/components/tour/index.js +4549 -4
  122. package/dist/components/typography/heading/index.js +47 -1
  123. package/dist/components/typography/index.js +8 -1
  124. package/dist/components/typography/span/index.js +41 -1
  125. package/dist/components/typography/text/index.js +47 -1
  126. package/dist/components/web-form/index.js +68 -7
  127. package/dist/hooks/index.js +13 -1
  128. package/dist/index-BMHVi812.mjs +234 -0
  129. package/dist/index-BzAniA2J.mjs +135 -0
  130. package/dist/index-C6LbClYh.mjs +146 -0
  131. package/dist/index-CAIe8hBv.mjs +130 -0
  132. package/dist/index-CUQBAqt_.mjs +75 -0
  133. package/dist/index-CWlrSlUk.mjs +68 -0
  134. package/dist/index-Ckmu1TfV.mjs +86 -0
  135. package/dist/index-DwznImvK.mjs +1678 -0
  136. package/dist/index-maWH3JYC.mjs +3561 -0
  137. package/dist/index.js +206 -1
  138. package/dist/styles-B2N0JLw1.mjs +114 -0
  139. package/dist/styles-B64DVBIF.mjs +115 -0
  140. package/dist/{styles-BAhpqi6C.mjs → styles-BXFVwnWT.mjs} +28 -28
  141. package/dist/styles-BZQOqe8p.mjs +141 -0
  142. package/dist/styles-Bdque9TT.mjs +65 -0
  143. package/dist/styles-BlHspTrz.mjs +144 -0
  144. package/dist/styles-CROOwXEH.mjs +76 -0
  145. package/dist/styles-CplEd2kw.mjs +228 -0
  146. package/dist/styles-D1eTIklB.mjs +110 -0
  147. package/dist/styles-ePGii_9g.mjs +74 -0
  148. package/dist/use-carousel-CgAF78h3.mjs +23 -0
  149. package/dist/use-click-outside-BUll8Ag-.mjs +18 -0
  150. package/dist/use-cloudinary-image-BCxwj15o.mjs +1176 -0
  151. package/dist/use-modal-CtgexKnf.mjs +14 -0
  152. package/dist/use-search-Dj47QDw9.mjs +15 -0
  153. package/dist/utils-V0EumEPM.mjs +6 -0
  154. package/package.json +1 -3
  155. package/dist/_commonjsHelpers-C37NGDzP.js +0 -1
  156. package/dist/_commonjsHelpers-D6CrkqQz.mjs +0 -6
  157. package/dist/index-BH27NQKA.mjs +0 -2311
  158. package/dist/index-Bcw2vW_n.mjs +0 -75
  159. package/dist/index-C0_LPuYU.mjs +0 -106
  160. package/dist/index-C8zdgAVH.mjs +0 -82
  161. package/dist/index-CA_9DXWd.js +0 -5
  162. package/dist/index-CmylnDrF.js +0 -14
  163. package/dist/index-DUMgwAbO.js +0 -26
  164. package/dist/index-DpQYiwGu.js +0 -5
  165. package/dist/index-Dy8ZUIYs.js +0 -5
  166. package/dist/index-JPf5Yzg6.js +0 -17
  167. package/dist/index-OBZtKZuT.mjs +0 -1021
  168. package/dist/index-SsXlDjK4.mjs +0 -122
  169. package/dist/index-TKLFHcRp.js +0 -18
  170. package/dist/index-TnyKqJHo.mjs +0 -61
  171. package/dist/index-Yr95Cb7Z.mjs +0 -54
  172. package/dist/index-h9-U5wxq.mjs +0 -209
  173. package/dist/index-qCiUU4sZ.js +0 -9
  174. package/dist/index-qe0nJwzl.js +0 -15
  175. package/dist/styles--Elze-LV.js +0 -3
  176. package/dist/styles-3pR4Xdvy.js +0 -33
  177. package/dist/styles-59h91S9m.mjs +0 -65
  178. package/dist/styles-BCwLWpC3.mjs +0 -126
  179. package/dist/styles-BJ7-0I5X.mjs +0 -74
  180. package/dist/styles-BKObp9bh.mjs +0 -76
  181. package/dist/styles-BWVdbvFu.js +0 -5
  182. package/dist/styles-Bl-CstrT.js +0 -5
  183. package/dist/styles-Bn42XCW5.js +0 -7
  184. package/dist/styles-C2CoGJl7.js +0 -33
  185. package/dist/styles-CNzziAXG.js +0 -5
  186. package/dist/styles-CdD9waPD.js +0 -29
  187. package/dist/styles-CnKTwnFk.mjs +0 -110
  188. package/dist/styles-D4R-eerv.mjs +0 -77
  189. package/dist/styles-DNIIhyRC.mjs +0 -144
  190. package/dist/styles-DV8yOaqV.mjs +0 -131
  191. package/dist/styles-DYoftbd3.js +0 -42
  192. package/dist/styles-DlmKLhPh.js +0 -7
  193. package/dist/styles-be8gOdgy.mjs +0 -106
  194. package/dist/use-carousel-64dKFW4E.js +0 -1
  195. package/dist/use-carousel-D7xeL3YZ.mjs +0 -17
  196. package/dist/use-click-outside-BqkLISED.js +0 -1
  197. package/dist/use-click-outside-C4Z4pdiW.mjs +0 -18
  198. package/dist/use-cloudinary-image-DKMl7jbx.mjs +0 -612
  199. package/dist/use-cloudinary-image-YMMafagv.js +0 -1
  200. package/dist/use-modal-CNbLSSQb.mjs +0 -14
  201. package/dist/use-modal-_bYY6M_n.js +0 -1
  202. package/dist/use-search-75ip5xR-.mjs +0 -12
  203. package/dist/use-search-DeL4UDMh.js +0 -1
  204. package/dist/utils-C2whpEd3.js +0 -1
  205. package/dist/utils-Da0qL35u.mjs +0 -4
@@ -1,612 +0,0 @@
1
- import { useMemo as t } from "react";
2
- class e {
3
- filterOutNonSupportedKeys(t2, e2) {
4
- const r2 = /* @__PURE__ */ Object.create({});
5
- return "object" != typeof (i2 = t2) || i2 instanceof Array ? /* @__PURE__ */ Object.create({}) : (Object.keys(t2).forEach((i3) => {
6
- e2.indexOf(i3) >= 0 ? r2[i3] = t2[i3] : console.warn("Warning - unsupported key provided to configuration: ", i3);
7
- }), r2);
8
- var i2;
9
- }
10
- }
11
- const r = ["cname", "secureDistribution", "privateCdn", "signUrl", "longUrlSignature", "shorten", "useRootPath", "secure", "forceVersion", "analytics", "queryParams"];
12
- class i extends e {
13
- constructor(t2) {
14
- super();
15
- const e2 = this.filterOutNonSupportedKeys(t2, r);
16
- Object.assign(this, { secure: true }, e2);
17
- }
18
- extend(t2) {
19
- const e2 = this.filterOutNonSupportedKeys(t2, r);
20
- return new i(Object.assign({}, this, e2));
21
- }
22
- setCname(t2) {
23
- return this.cname = t2, this;
24
- }
25
- setSecureDistribution(t2) {
26
- return this.secureDistribution = t2, this;
27
- }
28
- setPrivateCdn(t2) {
29
- return this.privateCdn = t2, this;
30
- }
31
- setSignUrl(t2) {
32
- return this.signUrl = t2, this;
33
- }
34
- setLongUrlSignature(t2) {
35
- return this.longUrlSignature = t2, this;
36
- }
37
- setShorten(t2) {
38
- return this.shorten = t2, this;
39
- }
40
- setUseRootPath(t2) {
41
- return this.useRootPath = t2, this;
42
- }
43
- setSecure(t2) {
44
- return this.secure = t2, this;
45
- }
46
- setForceVersion(t2) {
47
- return this.forceVersion = t2, this;
48
- }
49
- setQueryParams(t2) {
50
- return this.queryParams = t2, this;
51
- }
52
- }
53
- class s {
54
- constructor(t2) {
55
- this.values = [], this.delimiter = ":", this.hasValue(t2) && this.addValue(t2);
56
- }
57
- toString() {
58
- return this.values.join(this.delimiter);
59
- }
60
- hasValue(t2) {
61
- return null != t2 && "" !== t2;
62
- }
63
- addValue(t2) {
64
- return Array.isArray(t2) ? this.values = this.values.concat(t2) : this.values.push(t2), this.values = this.values.filter((t3) => this.hasValue(t3)), this;
65
- }
66
- setDelimiter(t2) {
67
- return this.delimiter = t2, this;
68
- }
69
- }
70
- class n extends Error {
71
- constructor(t2 = "Unsupported") {
72
- super(t2);
73
- }
74
- }
75
- function o(t2) {
76
- return new n(t2);
77
- }
78
- function a() {
79
- return this._qualifierModel || { error: o(`unsupported qualifier ${this.constructor.name}`) };
80
- }
81
- class u {
82
- constructor() {
83
- this._qualifierModel = {};
84
- }
85
- toJson() {
86
- return a.apply(this);
87
- }
88
- }
89
- class c extends u {
90
- constructor(t2, e2) {
91
- super(), this.delimiter = "_", this.key = t2, e2 instanceof s ? this.qualifierValue = e2 : (this.qualifierValue = new s(), this.qualifierValue.addValue(e2));
92
- }
93
- toString() {
94
- const { key: t2, delimiter: e2, qualifierValue: r2 } = this;
95
- return `${t2}${e2}${r2.toString()}`;
96
- }
97
- addValue(t2) {
98
- return this.qualifierValue.addValue(t2), this;
99
- }
100
- }
101
- class h extends c {
102
- constructor(t2, e2) {
103
- let r2;
104
- r2 = e2 ? new s([t2, `${e2}`]).setDelimiter(":") : t2, super("fl", r2), this.flagValue = e2;
105
- }
106
- toString() {
107
- return super.toString().replace(/\./g, "%2E");
108
- }
109
- getFlagValue() {
110
- return this.flagValue;
111
- }
112
- }
113
- function d() {
114
- var t2, e2, r2;
115
- const i2 = this._actionModel && Object.keys(this._actionModel).length, s2 = null === (r2 = null === (e2 = null === (t2 = this._actionModel) || void 0 === t2 ? void 0 : t2.source) || void 0 === e2 ? void 0 : e2.transformation) || void 0 === r2 ? void 0 : r2.error;
116
- return s2 && s2 instanceof Error ? { error: s2 } : i2 ? this._actionModel : { error: o(`unsupported action ${this.constructor.name}`) };
117
- }
118
- class l {
119
- constructor() {
120
- this._actionModel = {};
121
- }
122
- toJson() {
123
- return d.apply(this);
124
- }
125
- }
126
- class f extends l {
127
- constructor() {
128
- super(...arguments), this.qualifiers = /* @__PURE__ */ new Map(), this.flags = [], this.delimiter = ",", this.actionTag = "";
129
- }
130
- prepareQualifiers() {
131
- }
132
- getActionTag() {
133
- return this.actionTag;
134
- }
135
- setActionTag(t2) {
136
- return this.actionTag = t2, this;
137
- }
138
- toString() {
139
- return this.prepareQualifiers(), function(t2, e2) {
140
- const r2 = Array.from(t2.entries());
141
- return e2.forEach((t3) => {
142
- r2.push(["fl", t3]);
143
- }), r2.sort().map((t3) => t3[1]);
144
- }(this.qualifiers, this.flags).join(this.delimiter);
145
- }
146
- addQualifier(t2) {
147
- if ("string" == typeof t2) {
148
- const [e2, r2] = t2.toLowerCase().split("_");
149
- "fl" === e2 ? this.flags.push(new h(r2)) : this.qualifiers.set(e2, new c(e2, r2));
150
- } else this.qualifiers.set(t2.key, t2);
151
- return this;
152
- }
153
- addFlag(t2) {
154
- return "string" == typeof t2 ? this.flags.push(new h(t2)) : t2 instanceof h && this.flags.push(t2), this;
155
- }
156
- addValueToQualifier(t2, e2) {
157
- return this.qualifiers.get(t2).addValue(e2), this;
158
- }
159
- }
160
- class p extends f {
161
- constructor(t2) {
162
- super(), this._actionModel = {}, this.addQualifier(new c("b", new s(function(t3) {
163
- return t3 && t3.match(/^#/) ? `rgb:${t3.substr(1)}` : t3;
164
- }(t2)).setDelimiter("_"))), this._actionModel.color = t2, this._actionModel.actionType = "backgroundColor";
165
- }
166
- static fromJson(t2) {
167
- const { color: e2 } = t2;
168
- return new this(e2);
169
- }
170
- }
171
- class g {
172
- constructor(t2) {
173
- this.raw = t2;
174
- }
175
- toString() {
176
- return this.raw;
177
- }
178
- toJson() {
179
- return { error: o(`unsupported action ${this.constructor.name}`) };
180
- }
181
- }
182
- class m extends s {
183
- constructor(t2) {
184
- super(t2), this.val = t2;
185
- }
186
- getValue() {
187
- return this.val;
188
- }
189
- }
190
- function y(t2) {
191
- const e2 = {};
192
- return Object.keys(t2).forEach((r2) => {
193
- e2[t2[r2]] = r2;
194
- }), e2;
195
- }
196
- y({ 444: "CHROMA_444", 420: "CHROMA_420" }), y({ noCmyk: "no_cmyk", keepCmyk: "keep_cmyk", tinySrgb: "tinysrgb", srgbTrueColor: "srgb:truecolor" }), y({ limitFit: "limit", limitFill: "lfill", minimumFit: "mfit", thumbnail: "thumb", limitPad: "lpad", minimumPad: "mpad", autoPad: "auto_pad" });
197
- const v = y({ colorSpace: "cs", dpr: "dpr", density: "dn", defaultImage: "d", format: "f", quality: "q" });
198
- y({ redEye: "redeye", advancedRedEye: "adv_redeye", oilPaint: "oil_paint", unsharpMask: "unsharp_mask", makeTransparent: "make_transparent", generativeRestore: "gen_restore", upscale: "upscale" }), y({ autoBest: "auto:best", autoEco: "auto:eco", autoGood: "auto:good", autoLow: "auto:low", jpegminiHigh: "jpegmini:1", jpegminiMedium: "jpegmini:2", jpegminiBest: "jpegmini:0" }), y({ fullHd: "full_hd", fullHdWifi: "full_hd_wifi", fullHdLean: "full_hd_lean", hdLean: "hd_lean" });
199
- class w extends f {
200
- constructor(t2, e2, r2) {
201
- let i2;
202
- super(), this._actionModel = {}, i2 = e2 instanceof m ? e2.getValue() : e2, this._actionModel.actionType = v[t2], this._actionModel[r2] = i2, this.addQualifier(new c(t2, e2));
203
- }
204
- }
205
- class C extends h {
206
- constructor(t2) {
207
- super("progressive", t2);
208
- }
209
- }
210
- class b extends w {
211
- constructor(t2, e2) {
212
- super(t2, e2, "formatType");
213
- }
214
- lossy() {
215
- return this._actionModel.lossy = true, this.addFlag(new h("lossy")), this;
216
- }
217
- progressive(t2) {
218
- return t2 instanceof C ? (this._actionModel.progressive = { mode: t2.getFlagValue() }, this.addFlag(t2)) : (this._actionModel.progressive = { mode: t2 }, this.addFlag(function(t3) {
219
- return new h("progressive", t3);
220
- }(t2))), this;
221
- }
222
- preserveTransparency() {
223
- return this._actionModel.preserveTransparency = true, this.addFlag(new h("preserve_transparency")), this;
224
- }
225
- static fromJson(t2) {
226
- const { formatType: e2, lossy: r2, progressive: i2, preserveTransparency: s2 } = t2;
227
- let n2;
228
- return n2 = e2 ? new this("f", e2) : new this("f"), i2 && (i2.mode ? n2.progressive(i2.mode) : n2.progressive()), r2 && n2.lossy(), s2 && n2.preserveTransparency(), n2;
229
- }
230
- }
231
- class S {
232
- constructor() {
233
- this.actions = [];
234
- }
235
- addAction(t2) {
236
- let e2;
237
- if ("string" == typeof t2) {
238
- if (t2.indexOf("/") >= 0) throw "addAction cannot accept a string with a forward slash in it - /, use .addTransformation() instead";
239
- e2 = new g(t2);
240
- } else e2 = t2;
241
- return this.actions.push(e2), this;
242
- }
243
- addTransformation(t2) {
244
- return t2 instanceof S ? this.actions = this.actions.concat(t2.actions) : this.actions.push(new g(t2)), this;
245
- }
246
- toString() {
247
- return this.actions.map((t2) => t2.toString()).filter((t2) => t2).join("/");
248
- }
249
- animated(t2) {
250
- return this.addAction(t2);
251
- }
252
- border(t2) {
253
- return this.addAction(t2);
254
- }
255
- reshape(t2) {
256
- return this.addAction(t2);
257
- }
258
- resize(t2) {
259
- return this.addAction(t2);
260
- }
261
- quality(t2) {
262
- return this.addAction(new b("q", t2)), this;
263
- }
264
- format(t2) {
265
- return this.addAction(new b("f", t2)), this;
266
- }
267
- roundCorners(t2) {
268
- return this.addAction(t2);
269
- }
270
- overlay(t2) {
271
- return this.addAction(t2);
272
- }
273
- underlay(t2) {
274
- return t2.setLayerType("u"), this.addAction(t2);
275
- }
276
- addVariable(t2) {
277
- return this.addAction(t2);
278
- }
279
- conditional(t2) {
280
- return this.addAction(t2);
281
- }
282
- effect(t2) {
283
- return this.addAction(t2);
284
- }
285
- adjust(t2) {
286
- return this.addAction(t2);
287
- }
288
- rotate(t2) {
289
- return this.addAction(t2);
290
- }
291
- namedTransformation(t2) {
292
- return this.addAction(t2);
293
- }
294
- delivery(t2) {
295
- return this.addAction(t2);
296
- }
297
- backgroundColor(t2) {
298
- return this.addAction(new p(t2));
299
- }
300
- psdTools(t2) {
301
- return this.addAction(t2);
302
- }
303
- extract(t2) {
304
- return this.addAction(t2);
305
- }
306
- addFlag(t2) {
307
- const e2 = new f();
308
- let r2 = t2;
309
- return "string" == typeof t2 && (r2 = new h(t2)), e2.addQualifier(r2), this.addAction(e2);
310
- }
311
- customFunction(t2) {
312
- return this.addAction(t2);
313
- }
314
- transcode(t2) {
315
- return this.addAction(t2);
316
- }
317
- videoEdit(t2) {
318
- return this.addAction(t2);
319
- }
320
- toJson() {
321
- const t2 = [];
322
- for (const r2 of this.actions) {
323
- const i2 = r2.toJson();
324
- if ("error" in (e2 = i2) && e2.error) return i2;
325
- t2.push(i2);
326
- }
327
- var e2;
328
- return { actions: t2 };
329
- }
330
- }
331
- class T extends S {
332
- }
333
- class A extends S {
334
- }
335
- function V(t2, e2, r2) {
336
- let i2 = e2 | 0, s2 = String(r2);
337
- return t2.length > i2 ? String(t2) : (i2 -= t2.length, i2 > s2.length && (s2 += function(t3, e3) {
338
- let r3 = e3, i3 = "";
339
- for (; r3 > 0; ) i3 += t3, r3--;
340
- return i3;
341
- }(s2, i2 / s2.length)), s2.slice(0, i2) + String(t2));
342
- }
343
- const _ = {};
344
- let x = 0;
345
- function $(t2) {
346
- let e2 = "";
347
- const r2 = 6 * t2.split(".").length, i2 = function(t3) {
348
- if (t3.split(".").length < 2) throw new Error("invalid semVer, must have at least two segments");
349
- return t3.split(".").reverse().join(".");
350
- }(t2), s2 = function(t3) {
351
- if (t3.split(".").length < 2) throw new Error("invalid semVer, must have at least two segments");
352
- return t3.split(".").map((t4) => {
353
- const e3 = +t4;
354
- if (isNaN(e3) || e3 < 0) throw "Invalid version number provided";
355
- return V(t4, 2, "0");
356
- }).join(".");
357
- }(i2);
358
- let n2 = parseInt(s2.split(".").join("")).toString(2);
359
- if (n2 = V(n2, r2, "0"), n2.length % 6 != 0) throw "Version must be smaller than 43.21.26)";
360
- return n2.match(/.{1,6}/g).forEach((t3) => {
361
- e2 += _[t3];
362
- }), e2;
363
- }
364
- "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("").forEach((t2) => {
365
- let e2 = x.toString(2);
366
- e2 = V(e2, 6, "0"), _[e2] = t2, x++;
367
- });
368
- function k() {
369
- const t2 = "0.0.0";
370
- if ("undefined" != typeof window) return t2;
371
- try {
372
- return process.versions.node || t2;
373
- } catch (e2) {
374
- return t2;
375
- }
376
- }
377
- function j(t2) {
378
- const e2 = function(t3) {
379
- const e3 = { sdkSemver: t3.sdkSemver, techVersion: t3.techVersion, sdkCode: t3.sdkCode, product: t3.product, feature: "0", osType: t3.osType, osVersion: t3.osVersion };
380
- return t3.accessibility && (e3.feature = "D"), t3.lazyload && (e3.feature = "C"), t3.responsive && (e3.feature = "A"), t3.placeholder && (e3.feature = "B"), e3;
381
- }(function(t3) {
382
- const e3 = { techVersion: k(), sdkCode: "T", sdkSemver: "1.21.0".split("-")[0], product: "A", osType: "Z", osVersion: "0.0", responsive: false, placeholder: false, lazyload: false, accessibility: false };
383
- return t3 ? Object.assign(Object.assign({}, e3), t3) : e3;
384
- }(t2));
385
- try {
386
- const t3 = function(t4) {
387
- const e3 = t4.split(".");
388
- return `${e3[0]}.${e3[1]}`;
389
- }(e2.techVersion), r2 = $(e2.sdkSemver), i2 = $(t3), s2 = function(t4) {
390
- const [e3, r3] = t4.split("."), i3 = parseInt(e3).toString(2), s3 = parseInt(r3).toString(2), n3 = i3.padStart(6, "0"), o3 = s3.padStart(6, "0");
391
- return _[n3] + _[o3];
392
- }(e2.osVersion), n2 = e2.feature, o2 = e2.sdkCode, { product: a2, osType: u2 } = e2;
393
- return `${"D"}${a2}${o2}${r2}${i2}${u2}${s2}${n2}`;
394
- } catch (t3) {
395
- return "E";
396
- }
397
- }
398
- const R = { "image/upload": "images", "image/private": "private_images", "image/authenticated": "authenticated_images", "raw/upload": "files", "video/upload": "videos" };
399
- class q {
400
- constructor(t2, e2 = {}, r2) {
401
- this.setPublicID(t2), this.setCloudConfig(e2), this.setURLConfig(r2);
402
- }
403
- setURLConfig(t2) {
404
- return this.urlConfig = new i(t2), this;
405
- }
406
- setCloudConfig(t2) {
407
- return this.cloudName = t2.cloudName, this.apiKey = t2.apiKey, this.apiSecret = t2.apiSecret, this.authToken = t2.authToken, this;
408
- }
409
- setPublicID(t2) {
410
- return this.publicID = t2 ? t2.toString() : "", this;
411
- }
412
- setDeliveryType(t2) {
413
- return this.deliveryType = t2, this;
414
- }
415
- setSuffix(t2) {
416
- return this.suffix = t2, this;
417
- }
418
- setSignature(t2) {
419
- return this.signature = t2, this;
420
- }
421
- setVersion(t2) {
422
- return t2 && (this.version = t2), this;
423
- }
424
- setAssetType(t2) {
425
- return t2 && (this.assetType = t2), this;
426
- }
427
- sign() {
428
- return this;
429
- }
430
- toURL(t2 = {}) {
431
- return this.createCloudinaryURL(null, t2.trackedAnalytics);
432
- }
433
- validateAssetForURLCreation() {
434
- if (void 0 === this.cloudName) throw "You must supply a cloudName when initializing the asset";
435
- const t2 = this.suffix && this.suffix.indexOf(".") >= 0, e2 = this.suffix && this.suffix.indexOf("/") >= 0;
436
- if (t2 || e2) throw "`suffix`` should not include . or /";
437
- }
438
- getResourceType() {
439
- const t2 = /* @__PURE__ */ function(t3) {
440
- return t3 || "image";
441
- }(this.assetType), e2 = /* @__PURE__ */ function(t3) {
442
- return t3 || "upload";
443
- }(this.deliveryType), r2 = !!this.suffix, i2 = `${t2}/${e2}`, s2 = R[`${t2}/${e2}`], n2 = this.urlConfig.useRootPath, o2 = this.urlConfig.shorten;
444
- if (n2) {
445
- if ("image/upload" === i2) return "";
446
- throw new Error(`useRootPath can only be used with assetType: 'image' and deliveryType: 'upload'. Provided: ${i2} instead`);
447
- }
448
- if (o2 && "image/upload" === i2) return "iu";
449
- if (r2) {
450
- if (s2) return s2;
451
- throw new Error(`URL Suffix only supported for ${Object.keys(R).join(", ")}, Provided: ${i2} instead`);
452
- }
453
- return i2;
454
- }
455
- getSignature() {
456
- return this.signature ? `s--${this.signature}--` : "";
457
- }
458
- createCloudinaryURL(t2, e2) {
459
- if (!this.publicID) return "";
460
- this.validateAssetForURLCreation();
461
- const r2 = function(t3, e3) {
462
- const r3 = e3.secure, i3 = e3.privateCdn, s3 = e3.cname, n3 = e3.secureDistribution;
463
- return r3 || s3 ? r3 && !n3 && i3 ? `https://${t3}-res.cloudinary.com` : r3 && !n3 ? `https://res.cloudinary.com/${t3}` : r3 && n3 && i3 ? `https://${n3}` : r3 && n3 ? `https://${n3}/${t3}` : !r3 && s3 ? `http://${s3}/${t3}` : "ERROR" : `http://res.cloudinary.com/${t3}`;
464
- }(this.cloudName, this.urlConfig), i2 = t2 ? t2.toString() : "", s2 = function(t3, e3, r3) {
465
- const i3 = false !== r3;
466
- return e3 ? `v${e3}` : function(t4) {
467
- return t4.match(/^v[0-9]+/);
468
- }(t3) || function(t4) {
469
- return t4.match(/^https?:\//);
470
- }(t3) || function(t4) {
471
- return t4.indexOf("/") < 0;
472
- }(t3) ? "" : i3 ? "v1" : "";
473
- }(this.publicID, this.version, this.urlConfig.forceVersion), n2 = this.publicID;
474
- if ("string" == typeof t2) {
475
- return [r2, this.getResourceType(), this.getSignature(), i2, s2, n2.replace(/,/g, "%2C"), this.suffix].filter((t3) => t3).join("/");
476
- }
477
- {
478
- const t3 = [encodeURI(r2), this.getResourceType(), this.getSignature(), encodeURI(i2), s2, encodeURI(n2).replace(/,/g, "%2C"), this.suffix && encodeURI(this.suffix)].filter((t4) => t4).join("/").replace(/\?/g, "%3F").replace(/=/g, "%3D"), o2 = false !== this.urlConfig.analytics && !n2.includes("?");
479
- let a2 = "";
480
- if ("object" == typeof this.urlConfig.queryParams) try {
481
- const t4 = new URLSearchParams(this.urlConfig.queryParams);
482
- o2 && t4.set("_a", j(e2)), a2 = t4.toString();
483
- } catch (t4) {
484
- console.error("Error: URLSearchParams is not available so the queryParams object cannot be parsed, please try passing as an already parsed string");
485
- }
486
- else a2 = this.urlConfig.queryParams || "", o2 && (a2 += `${a2.length > 0 ? "&" : ""}_a=${j(e2)}`);
487
- return a2 ? `${t3}?${a2}` : t3;
488
- }
489
- }
490
- }
491
- class U extends q {
492
- constructor(t2, e2, r2, i2) {
493
- super(t2, e2, r2), this.transformation = i2;
494
- }
495
- animated(t2) {
496
- return this.transformation.animated(t2), this;
497
- }
498
- border(t2) {
499
- return this.transformation.border(t2), this;
500
- }
501
- reshape(t2) {
502
- return this.transformation.reshape(t2), this;
503
- }
504
- resize(t2) {
505
- return this.transformation.resize(t2), this;
506
- }
507
- quality(t2) {
508
- return this.addAction(new b("q", t2)), this;
509
- }
510
- format(t2) {
511
- return this.addAction(new b("f", t2)), this;
512
- }
513
- roundCorners(t2) {
514
- return this.transformation.roundCorners(t2), this;
515
- }
516
- overlay(t2) {
517
- return this.transformation.overlay(t2), this;
518
- }
519
- addVariable(t2) {
520
- return this.transformation.addVariable(t2), this;
521
- }
522
- conditional(t2) {
523
- return this.transformation.conditional(t2), this;
524
- }
525
- effect(t2) {
526
- return this.transformation.effect(t2), this;
527
- }
528
- adjust(t2) {
529
- return this.transformation.adjust(t2), this;
530
- }
531
- rotate(t2) {
532
- return this.transformation.rotate(t2), this;
533
- }
534
- namedTransformation(t2) {
535
- return this.transformation.namedTransformation(t2), this;
536
- }
537
- delivery(t2) {
538
- return this.transformation.delivery(t2), this;
539
- }
540
- backgroundColor(t2) {
541
- return this.transformation.backgroundColor(t2), this;
542
- }
543
- psdTools(t2) {
544
- return this.transformation.psdTools(t2), this;
545
- }
546
- extract(t2) {
547
- return this.transformation.extract(t2), this;
548
- }
549
- addFlag(t2) {
550
- return this.transformation.addFlag(t2), this;
551
- }
552
- customFunction(t2) {
553
- return this.transformation.customFunction(t2), this;
554
- }
555
- addAction(t2) {
556
- return this.transformation.addAction(t2), this;
557
- }
558
- addTransformation(t2) {
559
- return this.transformation.addTransformation(t2), this;
560
- }
561
- toString() {
562
- return this.transformation.toString();
563
- }
564
- underlay(t2) {
565
- return this.transformation.underlay(t2), this;
566
- }
567
- toURL(t2 = {}) {
568
- return this.createCloudinaryURL(this.transformation, null == t2 ? void 0 : t2.trackedAnalytics);
569
- }
570
- }
571
- class P extends U {
572
- constructor(t2, e2, r2) {
573
- super(t2, e2, r2, new T());
574
- }
575
- }
576
- class M extends U {
577
- constructor(t2, e2, r2) {
578
- super(t2, e2, r2, new A()), this.assetType = "video";
579
- }
580
- transcode(t2) {
581
- return this.transformation.transcode(t2), this;
582
- }
583
- videoEdit(t2) {
584
- return this.transformation.videoEdit(t2), this;
585
- }
586
- }
587
- class E {
588
- constructor(t2) {
589
- t2 && (this.cloudinaryConfig = t2);
590
- }
591
- image(t2) {
592
- return new P(t2, this.cloudinaryConfig.cloud, this.cloudinaryConfig.url);
593
- }
594
- video(t2) {
595
- return new M(t2, this.cloudinaryConfig.cloud, this.cloudinaryConfig.url);
596
- }
597
- setConfig(t2) {
598
- return this.cloudinaryConfig = t2, this;
599
- }
600
- getConfig() {
601
- return this.cloudinaryConfig;
602
- }
603
- extendConfig() {
604
- }
605
- }
606
- const O = ({ publicId: e2, format: r2 = "webp" }) => {
607
- const i2 = t(() => new E({ cloud: { cloudName: "fluid-attacks" } }), []);
608
- return t(() => i2.image(e2).format(r2), [i2, e2, r2]);
609
- };
610
- export {
611
- O as u
612
- };
@@ -1 +0,0 @@
1
- "use strict";const t=require("react");class e{filterOutNonSupportedKeys(t,e){const r=Object.create({});return"object"!=typeof(i=t)||i instanceof Array?Object.create({}):(Object.keys(t).forEach((i=>{e.indexOf(i)>=0&&(r[i]=t[i])})),r);var i}}const r=["cname","secureDistribution","privateCdn","signUrl","longUrlSignature","shorten","useRootPath","secure","forceVersion","analytics","queryParams"];class i extends e{constructor(t){super();const e=this.filterOutNonSupportedKeys(t,r);Object.assign(this,{secure:!0},e)}extend(t){const e=this.filterOutNonSupportedKeys(t,r);return new i(Object.assign({},this,e))}setCname(t){return this.cname=t,this}setSecureDistribution(t){return this.secureDistribution=t,this}setPrivateCdn(t){return this.privateCdn=t,this}setSignUrl(t){return this.signUrl=t,this}setLongUrlSignature(t){return this.longUrlSignature=t,this}setShorten(t){return this.shorten=t,this}setUseRootPath(t){return this.useRootPath=t,this}setSecure(t){return this.secure=t,this}setForceVersion(t){return this.forceVersion=t,this}setQueryParams(t){return this.queryParams=t,this}}class s{constructor(t){this.values=[],this.delimiter=":",this.hasValue(t)&&this.addValue(t)}toString(){return this.values.join(this.delimiter)}hasValue(t){return null!=t&&""!==t}addValue(t){return Array.isArray(t)?this.values=this.values.concat(t):this.values.push(t),this.values=this.values.filter((t=>this.hasValue(t))),this}setDelimiter(t){return this.delimiter=t,this}}class n extends Error{constructor(t="Unsupported"){super(t)}}function o(t){return new n(t)}function a(){return this._qualifierModel||{error:o(`unsupported qualifier ${this.constructor.name}`)}}class u{constructor(){this._qualifierModel={}}toJson(){return a.apply(this)}}class c extends u{constructor(t,e){super(),this.delimiter="_",this.key=t,e instanceof s?this.qualifierValue=e:(this.qualifierValue=new s,this.qualifierValue.addValue(e))}toString(){const{key:t,delimiter:e,qualifierValue:r}=this;return`${t}${e}${r.toString()}`}addValue(t){return this.qualifierValue.addValue(t),this}}class h extends c{constructor(t,e){let r;r=e?new s([t,`${e}`]).setDelimiter(":"):t,super("fl",r),this.flagValue=e}toString(){return super.toString().replace(/\./g,"%2E")}getFlagValue(){return this.flagValue}}function d(){var t,e,r;const i=this._actionModel&&Object.keys(this._actionModel).length,s=null===(r=null===(e=null===(t=this._actionModel)||void 0===t?void 0:t.source)||void 0===e?void 0:e.transformation)||void 0===r?void 0:r.error;return s&&s instanceof Error?{error:s}:i?this._actionModel:{error:o(`unsupported action ${this.constructor.name}`)}}class l{constructor(){this._actionModel={}}toJson(){return d.apply(this)}}class f extends l{constructor(){super(...arguments),this.qualifiers=new Map,this.flags=[],this.delimiter=",",this.actionTag=""}prepareQualifiers(){}getActionTag(){return this.actionTag}setActionTag(t){return this.actionTag=t,this}toString(){return this.prepareQualifiers(),function(t,e){const r=Array.from(t.entries());return e.forEach((t=>{r.push(["fl",t])})),r.sort().map((t=>t[1]))}(this.qualifiers,this.flags).join(this.delimiter)}addQualifier(t){if("string"==typeof t){const[e,r]=t.toLowerCase().split("_");"fl"===e?this.flags.push(new h(r)):this.qualifiers.set(e,new c(e,r))}else this.qualifiers.set(t.key,t);return this}addFlag(t){return"string"==typeof t?this.flags.push(new h(t)):t instanceof h&&this.flags.push(t),this}addValueToQualifier(t,e){return this.qualifiers.get(t).addValue(e),this}}class p extends f{constructor(t){var e;super(),this._actionModel={},this.addQualifier(new c("b",new s((e=t,e&&e.match(/^#/)?`rgb:${e.substr(1)}`:e)).setDelimiter("_"))),this._actionModel.color=t,this._actionModel.actionType="backgroundColor"}static fromJson(t){const{color:e}=t;return new this(e)}}class g{constructor(t){this.raw=t}toString(){return this.raw}toJson(){return{error:o(`unsupported action ${this.constructor.name}`)}}}class m extends s{constructor(t){super(t),this.val=t}getValue(){return this.val}}function y(t){const e={};return Object.keys(t).forEach((r=>{e[t[r]]=r})),e}y({444:"CHROMA_444",420:"CHROMA_420"}),y({noCmyk:"no_cmyk",keepCmyk:"keep_cmyk",tinySrgb:"tinysrgb",srgbTrueColor:"srgb:truecolor"}),y({limitFit:"limit",limitFill:"lfill",minimumFit:"mfit",thumbnail:"thumb",limitPad:"lpad",minimumPad:"mpad",autoPad:"auto_pad"});const v=y({colorSpace:"cs",dpr:"dpr",density:"dn",defaultImage:"d",format:"f",quality:"q"});y({redEye:"redeye",advancedRedEye:"adv_redeye",oilPaint:"oil_paint",unsharpMask:"unsharp_mask",makeTransparent:"make_transparent",generativeRestore:"gen_restore",upscale:"upscale"}),y({autoBest:"auto:best",autoEco:"auto:eco",autoGood:"auto:good",autoLow:"auto:low",jpegminiHigh:"jpegmini:1",jpegminiMedium:"jpegmini:2",jpegminiBest:"jpegmini:0"}),y({fullHd:"full_hd",fullHdWifi:"full_hd_wifi",fullHdLean:"full_hd_lean",hdLean:"hd_lean"});class w extends f{constructor(t,e,r){let i;super(),this._actionModel={},i=e instanceof m?e.getValue():e,this._actionModel.actionType=v[t],this._actionModel[r]=i,this.addQualifier(new c(t,e))}}class C extends h{constructor(t){super("progressive",t)}}class b extends w{constructor(t,e){super(t,e,"formatType")}lossy(){return this._actionModel.lossy=!0,this.addFlag(new h("lossy")),this}progressive(t){return t instanceof C?(this._actionModel.progressive={mode:t.getFlagValue()},this.addFlag(t)):(this._actionModel.progressive={mode:t},this.addFlag(new h("progressive",t))),this}preserveTransparency(){return this._actionModel.preserveTransparency=!0,this.addFlag(new h("preserve_transparency")),this}static fromJson(t){const{formatType:e,lossy:r,progressive:i,preserveTransparency:s}=t;let n;return n=e?new this("f",e):new this("f"),i&&(i.mode?n.progressive(i.mode):n.progressive()),r&&n.lossy(),s&&n.preserveTransparency(),n}}class S{constructor(){this.actions=[]}addAction(t){let e;if("string"==typeof t){if(t.indexOf("/")>=0)throw"addAction cannot accept a string with a forward slash in it - /, use .addTransformation() instead";e=new g(t)}else e=t;return this.actions.push(e),this}addTransformation(t){return t instanceof S?this.actions=this.actions.concat(t.actions):this.actions.push(new g(t)),this}toString(){return this.actions.map((t=>t.toString())).filter((t=>t)).join("/")}animated(t){return this.addAction(t)}border(t){return this.addAction(t)}reshape(t){return this.addAction(t)}resize(t){return this.addAction(t)}quality(t){return this.addAction(new b("q",t)),this}format(t){return this.addAction(new b("f",t)),this}roundCorners(t){return this.addAction(t)}overlay(t){return this.addAction(t)}underlay(t){return t.setLayerType("u"),this.addAction(t)}addVariable(t){return this.addAction(t)}conditional(t){return this.addAction(t)}effect(t){return this.addAction(t)}adjust(t){return this.addAction(t)}rotate(t){return this.addAction(t)}namedTransformation(t){return this.addAction(t)}delivery(t){return this.addAction(t)}backgroundColor(t){return this.addAction(new p(t))}psdTools(t){return this.addAction(t)}extract(t){return this.addAction(t)}addFlag(t){const e=new f;let r=t;return"string"==typeof t&&(r=new h(t)),e.addQualifier(r),this.addAction(e)}customFunction(t){return this.addAction(t)}transcode(t){return this.addAction(t)}videoEdit(t){return this.addAction(t)}toJson(){const t=[];for(const r of this.actions){const i=r.toJson();if("error"in(e=i)&&e.error)return i;t.push(i)}var e;return{actions:t}}}class T extends S{}class A extends S{}function V(t,e,r){let i=0|e,s=String(r);return t.length>i?String(t):(i-=t.length,i>s.length&&(s+=function(t,e){let r=e,i="";for(;r>0;)i+=t,r--;return i}(s,i/s.length)),s.slice(0,i)+String(t))}const _={};let x=0;function $(t){let e="";const r=6*t.split(".").length,i=function(t){if(t.split(".").length<2)throw new Error("invalid semVer, must have at least two segments");return t.split(".").map((t=>{const e=+t;if(isNaN(e)||e<0)throw"Invalid version number provided";return V(t,2,"0")})).join(".")}(function(t){if(t.split(".").length<2)throw new Error("invalid semVer, must have at least two segments");return t.split(".").reverse().join(".")}(t));let s=parseInt(i.split(".").join("")).toString(2);if(s=V(s,r,"0"),s.length%6!=0)throw"Version must be smaller than 43.21.26)";return s.match(/.{1,6}/g).forEach((t=>{e+=_[t]})),e}function k(){const t="0.0.0";if("undefined"!=typeof window)return t;try{return process.versions.node||t}catch(e){return t}}function j(t){const e=function(t){const e={sdkSemver:t.sdkSemver,techVersion:t.techVersion,sdkCode:t.sdkCode,product:t.product,feature:"0",osType:t.osType,osVersion:t.osVersion};return t.accessibility&&(e.feature="D"),t.lazyload&&(e.feature="C"),t.responsive&&(e.feature="A"),t.placeholder&&(e.feature="B"),e}(function(t){const e={techVersion:k(),sdkCode:"T",sdkSemver:"1.21.0".split("-")[0],product:"A",osType:"Z",osVersion:"0.0",responsive:!1,placeholder:!1,lazyload:!1,accessibility:!1};return t?Object.assign(Object.assign({},e),t):e}(t));try{const t=function(t){const e=t.split(".");return`${e[0]}.${e[1]}`}(e.techVersion),r=$(e.sdkSemver),i=$(t),s=function(t){const[e,r]=t.split("."),i=parseInt(e).toString(2),s=parseInt(r).toString(2),n=i.padStart(6,"0"),o=s.padStart(6,"0");return _[n]+_[o]}(e.osVersion),n=e.feature,o=e.sdkCode,{product:a,osType:u}=e;return`D${a}${o}${r}${i}${u}${s}${n}`}catch(r){return"E"}}"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("").forEach((t=>{let e=x.toString(2);e=V(e,6,"0"),_[e]=t,x++}));const R={"image/upload":"images","image/private":"private_images","image/authenticated":"authenticated_images","raw/upload":"files","video/upload":"videos"};class q{constructor(t,e={},r){this.setPublicID(t),this.setCloudConfig(e),this.setURLConfig(r)}setURLConfig(t){return this.urlConfig=new i(t),this}setCloudConfig(t){return this.cloudName=t.cloudName,this.apiKey=t.apiKey,this.apiSecret=t.apiSecret,this.authToken=t.authToken,this}setPublicID(t){return this.publicID=t?t.toString():"",this}setDeliveryType(t){return this.deliveryType=t,this}setSuffix(t){return this.suffix=t,this}setSignature(t){return this.signature=t,this}setVersion(t){return t&&(this.version=t),this}setAssetType(t){return t&&(this.assetType=t),this}sign(){return this}toURL(t={}){return this.createCloudinaryURL(null,t.trackedAnalytics)}validateAssetForURLCreation(){if(void 0===this.cloudName)throw"You must supply a cloudName when initializing the asset";const t=this.suffix&&this.suffix.indexOf(".")>=0,e=this.suffix&&this.suffix.indexOf("/")>=0;if(t||e)throw"`suffix`` should not include . or /"}getResourceType(){const t=function(t){return t||"image"}(this.assetType),e=function(t){return t||"upload"}(this.deliveryType),r=!!this.suffix,i=`${t}/${e}`,s=R[`${t}/${e}`],n=this.urlConfig.useRootPath,o=this.urlConfig.shorten;if(n){if("image/upload"===i)return"";throw new Error(`useRootPath can only be used with assetType: 'image' and deliveryType: 'upload'. Provided: ${i} instead`)}if(o&&"image/upload"===i)return"iu";if(r){if(s)return s;throw new Error(`URL Suffix only supported for ${Object.keys(R).join(", ")}, Provided: ${i} instead`)}return i}getSignature(){return this.signature?`s--${this.signature}--`:""}createCloudinaryURL(t,e){if(!this.publicID)return"";this.validateAssetForURLCreation();const r=function(t,e){const r=e.secure,i=e.privateCdn,s=e.cname,n=e.secureDistribution;return r||s?r&&!n&&i?`https://${t}-res.cloudinary.com`:r&&!n?`https://res.cloudinary.com/${t}`:r&&n&&i?`https://${n}`:r&&n?`https://${n}/${t}`:!r&&s?`http://${s}/${t}`:"ERROR":`http://res.cloudinary.com/${t}`}(this.cloudName,this.urlConfig),i=t?t.toString():"",s=function(t,e,r){const i=!1!==r;return e?`v${e}`:t.match(/^v[0-9]+/)||function(t){return t.match(/^https?:\//)}(t)||function(t){return t.indexOf("/")<0}(t)?"":i?"v1":""}(this.publicID,this.version,this.urlConfig.forceVersion),n=this.publicID;if("string"==typeof t)return[r,this.getResourceType(),this.getSignature(),i,s,n.replace(/,/g,"%2C"),this.suffix].filter((t=>t)).join("/");{const t=[encodeURI(r),this.getResourceType(),this.getSignature(),encodeURI(i),s,encodeURI(n).replace(/,/g,"%2C"),this.suffix&&encodeURI(this.suffix)].filter((t=>t)).join("/").replace(/\?/g,"%3F").replace(/=/g,"%3D"),a=!1!==this.urlConfig.analytics&&!n.includes("?");let u="";if("object"==typeof this.urlConfig.queryParams)try{const t=new URLSearchParams(this.urlConfig.queryParams);a&&t.set("_a",j(e)),u=t.toString()}catch(o){}else u=this.urlConfig.queryParams||"",a&&(u+=`${u.length>0?"&":""}_a=${j(e)}`);return u?`${t}?${u}`:t}}}class M extends q{constructor(t,e,r,i){super(t,e,r),this.transformation=i}animated(t){return this.transformation.animated(t),this}border(t){return this.transformation.border(t),this}reshape(t){return this.transformation.reshape(t),this}resize(t){return this.transformation.resize(t),this}quality(t){return this.addAction(new b("q",t)),this}format(t){return this.addAction(new b("f",t)),this}roundCorners(t){return this.transformation.roundCorners(t),this}overlay(t){return this.transformation.overlay(t),this}addVariable(t){return this.transformation.addVariable(t),this}conditional(t){return this.transformation.conditional(t),this}effect(t){return this.transformation.effect(t),this}adjust(t){return this.transformation.adjust(t),this}rotate(t){return this.transformation.rotate(t),this}namedTransformation(t){return this.transformation.namedTransformation(t),this}delivery(t){return this.transformation.delivery(t),this}backgroundColor(t){return this.transformation.backgroundColor(t),this}psdTools(t){return this.transformation.psdTools(t),this}extract(t){return this.transformation.extract(t),this}addFlag(t){return this.transformation.addFlag(t),this}customFunction(t){return this.transformation.customFunction(t),this}addAction(t){return this.transformation.addAction(t),this}addTransformation(t){return this.transformation.addTransformation(t),this}toString(){return this.transformation.toString()}underlay(t){return this.transformation.underlay(t),this}toURL(t={}){return this.createCloudinaryURL(this.transformation,null==t?void 0:t.trackedAnalytics)}}class U extends M{constructor(t,e,r){super(t,e,r,new T)}}class O extends M{constructor(t,e,r){super(t,e,r,new A),this.assetType="video"}transcode(t){return this.transformation.transcode(t),this}videoEdit(t){return this.transformation.videoEdit(t),this}}class P{constructor(t){t&&(this.cloudinaryConfig=t)}image(t){return new U(t,this.cloudinaryConfig.cloud,this.cloudinaryConfig.url)}video(t){return new O(t,this.cloudinaryConfig.cloud,this.cloudinaryConfig.url)}setConfig(t){return this.cloudinaryConfig=t,this}getConfig(){return this.cloudinaryConfig}extendConfig(){}}exports.useCloudinaryImage=({publicId:e,format:r="webp"})=>{const i=t.useMemo((()=>new P({cloud:{cloudName:"fluid-attacks"}})),[]);return t.useMemo((()=>i.image(e).format(r)),[i,e,r])};
@@ -1,14 +0,0 @@
1
- import { useState as e, useCallback as o } from "react";
2
- const t = (t2) => {
3
- const [n, s] = e(false), r = o(() => {
4
- s(true);
5
- }, []), p = o(() => {
6
- s(false);
7
- }, []), c = o(() => {
8
- s((e2) => !e2);
9
- }, []);
10
- return { close: p, isOpen: n, name: t2, open: r, setIsOpen: s, toggle: c };
11
- };
12
- export {
13
- t as u
14
- };
@@ -1 +0,0 @@
1
- "use strict";const e=require("react");exports.useModal=s=>{const[t,a]=e.useState(!1),l=e.useCallback((()=>{a(!0)}),[]),c=e.useCallback((()=>{a(!1)}),[]),u=e.useCallback((()=>{a((e=>!e))}),[]);return{close:c,isOpen:t,name:s,open:l,setIsOpen:a,toggle:u}};
@@ -1,12 +0,0 @@
1
- import { useMemo as o, useState as r } from "react";
2
- import t from "lodash";
3
- const e = (r2, e2) => o(() => t.debounce(r2, e2), [r2, e2]), a = (o2) => {
4
- const [t2, a2] = r();
5
- return [t2, e((o3) => {
6
- a2(o3);
7
- }, (o2 == null ? void 0 : o2.debounceWait) ?? 300)];
8
- };
9
- export {
10
- a,
11
- e as u
12
- };
@@ -1 +0,0 @@
1
- "use strict";const e=require("react"),u=require("lodash"),r=(r,s)=>e.useMemo((()=>u.debounce(r,s)),[r,s]);exports.useDebouncedCallback=r,exports.useSearch=u=>{const[s,t]=e.useState();return[s,r((e=>{t(e)}),(null==u?void 0:u.debounceWait)??300)]};
@@ -1 +0,0 @@
1
- "use strict";exports.variantBuilder=t=>({getVariant:(r,a)=>t(r)[a]});
@@ -1,4 +0,0 @@
1
- const t = (t2) => ({ getVariant: (a, e) => t2(a)[e] });
2
- export {
3
- t as v
4
- };