@supersoniks/concorde 1.0.3 → 1.0.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.
@@ -281,7 +281,7 @@ var t$2;
281
281
  const i$4 = globalThis.trustedTypes, s$2 = i$4 ? i$4.createPolicy("lit-html", { createHTML: (t2) => t2 }) : void 0, e$5 = `lit$${(Math.random() + "").slice(9)}$`, o$4 = "?" + e$5, n$4 = `<${o$4}>`, l$2 = document, h$2 = (t2 = "") => l$2.createComment(t2), r$3 = (t2) => t2 === null || typeof t2 != "object" && typeof t2 != "function", d$1 = Array.isArray, u$2 = (t2) => {
282
282
  var i2;
283
283
  return d$1(t2) || typeof ((i2 = t2) === null || i2 === void 0 ? void 0 : i2[Symbol.iterator]) == "function";
284
- }, c$2 = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, v = /-->/g, a$2 = />/g, f$1 = />|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g, _ = /'/g, m$1 = /"/g, g$1 = /^(?:script|style|textarea)$/i, $$1 = (t2) => (i2, ...s2) => ({ _$litType$: t2, strings: i2, values: s2 }), p = $$1(1), b$1 = Symbol.for("lit-noChange"), T = Symbol.for("lit-nothing"), x$1 = new WeakMap(), w$1 = (t2, i2, s2) => {
284
+ }, c$2 = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, v = /-->/g, a$2 = />/g, f$2 = />|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g, _ = /'/g, m$1 = /"/g, g$1 = /^(?:script|style|textarea)$/i, $$1 = (t2) => (i2, ...s2) => ({ _$litType$: t2, strings: i2, values: s2 }), p$1 = $$1(1), b$1 = Symbol.for("lit-noChange"), T = Symbol.for("lit-nothing"), x$1 = new WeakMap(), w$1 = (t2, i2, s2) => {
285
285
  var e2, o2;
286
286
  const n2 = (e2 = s2 == null ? void 0 : s2.renderBefore) !== null && e2 !== void 0 ? e2 : i2;
287
287
  let l2 = n2._$litPart$;
@@ -297,8 +297,8 @@ const i$4 = globalThis.trustedTypes, s$2 = i$4 ? i$4.createPolicy("lit-html", {
297
297
  const s2 = t2[i3];
298
298
  let o3, u3, $2 = -1, p2 = 0;
299
299
  for (; p2 < s2.length && (d2.lastIndex = p2, u3 = d2.exec(s2), u3 !== null); )
300
- p2 = d2.lastIndex, d2 === c$2 ? u3[1] === "!--" ? d2 = v : u3[1] !== void 0 ? d2 = a$2 : u3[2] !== void 0 ? (g$1.test(u3[2]) && (h2 = RegExp("</" + u3[2], "g")), d2 = f$1) : u3[3] !== void 0 && (d2 = f$1) : d2 === f$1 ? u3[0] === ">" ? (d2 = h2 != null ? h2 : c$2, $2 = -1) : u3[1] === void 0 ? $2 = -2 : ($2 = d2.lastIndex - u3[2].length, o3 = u3[1], d2 = u3[3] === void 0 ? f$1 : u3[3] === '"' ? m$1 : _) : d2 === m$1 || d2 === _ ? d2 = f$1 : d2 === v || d2 === a$2 ? d2 = c$2 : (d2 = f$1, h2 = void 0);
301
- const y = d2 === f$1 && t2[i3 + 1].startsWith("/>") ? " " : "";
300
+ p2 = d2.lastIndex, d2 === c$2 ? u3[1] === "!--" ? d2 = v : u3[1] !== void 0 ? d2 = a$2 : u3[2] !== void 0 ? (g$1.test(u3[2]) && (h2 = RegExp("</" + u3[2], "g")), d2 = f$2) : u3[3] !== void 0 && (d2 = f$2) : d2 === f$2 ? u3[0] === ">" ? (d2 = h2 != null ? h2 : c$2, $2 = -1) : u3[1] === void 0 ? $2 = -2 : ($2 = d2.lastIndex - u3[2].length, o3 = u3[1], d2 = u3[3] === void 0 ? f$2 : u3[3] === '"' ? m$1 : _) : d2 === m$1 || d2 === _ ? d2 = f$2 : d2 === v || d2 === a$2 ? d2 = c$2 : (d2 = f$2, h2 = void 0);
301
+ const y = d2 === f$2 && t2[i3 + 1].startsWith("/>") ? " " : "";
302
302
  r2 += d2 === c$2 ? s2 + n$4 : $2 >= 0 ? (l2.push(o3), s2.slice(0, $2) + "$lit$" + s2.slice($2) + e$5 + y) : s2 + e$5 + ($2 === -2 ? (l2.push(void 0), i3) : y);
303
303
  }
304
304
  const u2 = r2 + (t2[o2] || "<?>") + (i2 === 2 ? "</svg>" : "");
@@ -755,6 +755,7 @@ var publisherProxy = { exports: {} };
755
755
  this._mutationListeners_ = new Set();
756
756
  this._fillListeners_ = new Set();
757
757
  this._templateFillListeners_ = new Set();
758
+ this._lockInternalMutationPublishing_ = false;
758
759
  this.parent = parentProxPub;
759
760
  this.root = this;
760
761
  while (this.root.parent) {
@@ -764,6 +765,8 @@ var publisherProxy = { exports: {} };
764
765
  _createClass(CustomProxy2, [{
765
766
  key: "_publishInternalMutation_",
766
767
  value: function _publishInternalMutation_() {
768
+ if (this._lockInternalMutationPublishing_)
769
+ return;
767
770
  this._mutationListeners_.forEach(function(handler) {
768
771
  return handler();
769
772
  });
@@ -858,24 +861,25 @@ var publisherProxy = { exports: {} };
858
861
  this._publishAssignement_();
859
862
  return true;
860
863
  }
861
- this._proxies_.keys();
862
- Array.from(this._proxies_.keys()).forEach(function(key) {
863
- if (!_this2._value_[key]) {
864
- _this2._proxies_["delete"](key);
864
+ this._lockInternalMutationPublishing_ = true;
865
+ Array.from(this._proxies_.keys()).forEach(function(key2) {
866
+ if (!_this2._value_[key2]) {
867
+ _this2._proxies_["delete"](key2);
865
868
  }
866
869
  });
867
- for (var _key in this._value_) {
868
- var v2 = this._value_[_key];
869
- if (!this._proxies_.has(_key)) {
870
- this._proxies_.set(_key, new Publisher(isComplex(v2) ? v2 : {
870
+ for (var key in this._value_) {
871
+ var v2 = this._value_[key];
872
+ if (!this._proxies_.has(key)) {
873
+ this._proxies_.set(key, new Publisher(isComplex(v2) ? v2 : {
871
874
  __value: v2
872
875
  }, this));
873
876
  }
874
- this._proxies_.get(_key).set(isComplex(v2) ? v2 : {
877
+ this._proxies_.get(key).set(isComplex(v2) ? v2 : {
875
878
  __value: v2
876
879
  });
877
- this._publishDynamicFilling_(_key, this._value_[_key]);
880
+ this._publishDynamicFilling_(key, this._value_[key]);
878
881
  }
882
+ this._lockInternalMutationPublishing_ = false;
879
883
  this._publishAssignement_();
880
884
  return true;
881
885
  }
@@ -926,7 +930,7 @@ var publisherProxy = { exports: {} };
926
930
  var that = _assertThisInitialized(_this3);
927
931
  return _possibleConstructorReturn(_this3, new Proxy(_assertThisInitialized(_this3), {
928
932
  "get": function get(oTarget, sKey) {
929
- if (["onAssign", "offAssign", "startDynamicFilling", "stopDynamicFilling", "startTemplateFilling", "stopTemplateFilling", "onInternalMutation", "set", "get", "_templateFillListeners_", "_fillListeners_", "_assignListeners_", "_publishInternalMutation_", "_mutationListeners_", "_publishDynamicFilling_", "_publishTemplateFilling_", "_publishAssignement_", "_proxies_", "parent", "_value_"].includes(sKey))
933
+ if (["onAssign", "offAssign", "startDynamicFilling", "stopDynamicFilling", "startTemplateFilling", "stopTemplateFilling", "onInternalMutation", "set", "get", "_templateFillListeners_", "_fillListeners_", "_assignListeners_", "_publishInternalMutation_", "_mutationListeners_", "_publishDynamicFilling_", "_publishTemplateFilling_", "_publishAssignement_", "_proxies_", "parent", "_value_", "_lockInternalMutationPublishing_"].includes(sKey))
930
934
  return that[sKey];
931
935
  if (!that._proxies_.has(sKey)) {
932
936
  var vValue = target[sKey];
@@ -941,11 +945,14 @@ var publisherProxy = { exports: {} };
941
945
  oTarget._value_ = vValue;
942
946
  return oTarget._value_;
943
947
  }
948
+ var isValueComplex = isComplex(vValue);
944
949
  if (!that._proxies_.has(sKey)) {
945
- that._proxies_.set(sKey, new Publisher2(isComplex(vValue) ? vValue : {
950
+ that._proxies_.set(sKey, new Publisher2(isValueComplex ? vValue : {
946
951
  __value: vValue
947
952
  }, that));
948
953
  }
954
+ if (target[sKey] == vValue && isValueComplex)
955
+ return;
949
956
  target[sKey] = vValue;
950
957
  that._publishDynamicFilling_(sKey, vValue);
951
958
  that._proxies_.get(sKey).set(isComplex(vValue) ? vValue : {
@@ -993,15 +1000,15 @@ var publisherProxy = { exports: {} };
993
1000
  };
994
1001
  })();
995
1002
  })(publisherProxy);
996
- var __defProp$h = Object.defineProperty;
997
- var __getOwnPropDesc$h = Object.getOwnPropertyDescriptor;
998
- var __decorateClass$h = (decorators, target, key, kind) => {
999
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$h(target, key) : target;
1003
+ var __defProp$k = Object.defineProperty;
1004
+ var __getOwnPropDesc$k = Object.getOwnPropertyDescriptor;
1005
+ var __decorateClass$k = (decorators, target, key, kind) => {
1006
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$k(target, key) : target;
1000
1007
  for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
1001
1008
  if (decorator = decorators[i2])
1002
1009
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
1003
1010
  if (kind && result)
1004
- __defProp$h(target, key, result);
1011
+ __defProp$k(target, key, result);
1005
1012
  return result;
1006
1013
  };
1007
1014
  const Subscriber = (superClass) => {
@@ -1009,7 +1016,7 @@ const Subscriber = (superClass) => {
1009
1016
  constructor(...args) {
1010
1017
  super();
1011
1018
  this.title = "";
1012
- this._dataProvider = null;
1019
+ this.dataProvider = null;
1013
1020
  this._props = null;
1014
1021
  this.args = args;
1015
1022
  }
@@ -1038,13 +1045,6 @@ const Subscriber = (superClass) => {
1038
1045
  }
1039
1046
  return node.getAttribute(attributeName);
1040
1047
  }
1041
- get dataProvider() {
1042
- return this._dataProvider;
1043
- }
1044
- set dataProvider(value) {
1045
- this._dataProvider = value;
1046
- this.requestUpdate();
1047
- }
1048
1048
  get props() {
1049
1049
  return this.publisher.get();
1050
1050
  }
@@ -1078,7 +1078,7 @@ const Subscriber = (superClass) => {
1078
1078
  let publisherId = this.dataProvider;
1079
1079
  if (!publisherId)
1080
1080
  publisherId = this.getAncestorAttributeValue("dataProvider");
1081
- if (!publisherId) {
1081
+ if (!publisherId && this._props) {
1082
1082
  this.dataProvider = publisherId = "__subscriber__" + _SubscriberElement.instanceCounter;
1083
1083
  }
1084
1084
  if (publisherId) {
@@ -1108,17 +1108,237 @@ const Subscriber = (superClass) => {
1108
1108
  };
1109
1109
  let SubscriberElement = _SubscriberElement;
1110
1110
  SubscriberElement.instanceCounter = 0;
1111
- __decorateClass$h([
1111
+ __decorateClass$k([
1112
1112
  e$4({ type: String, attribute: "data-title" })
1113
1113
  ], SubscriberElement.prototype, "title", 2);
1114
- __decorateClass$h([
1115
- e$4({ type: String })
1116
- ], SubscriberElement.prototype, "dataProvider", 1);
1117
- __decorateClass$h([
1114
+ __decorateClass$k([
1115
+ e$4({ type: String, reflect: true })
1116
+ ], SubscriberElement.prototype, "dataProvider", 2);
1117
+ __decorateClass$k([
1118
1118
  e$4()
1119
1119
  ], SubscriberElement.prototype, "props", 1);
1120
1120
  return SubscriberElement;
1121
1121
  };
1122
+ /**
1123
+ * @license
1124
+ * Copyright 2017 Google LLC
1125
+ * SPDX-License-Identifier: BSD-3-Clause
1126
+ */
1127
+ const t = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, e$3 = (t2) => (...e2) => ({ _$litDirective$: t2, values: e2 });
1128
+ class i$2 {
1129
+ constructor(t2) {
1130
+ }
1131
+ get _$AU() {
1132
+ return this._$AM._$AU;
1133
+ }
1134
+ _$AT(t2, e2, i2) {
1135
+ this._$Ct = t2, this._$AM = e2, this._$Ci = i2;
1136
+ }
1137
+ _$AS(t2, e2) {
1138
+ return this.update(t2, e2);
1139
+ }
1140
+ update(t2, e2) {
1141
+ return this.render(...e2);
1142
+ }
1143
+ }
1144
+ /**
1145
+ * @license
1146
+ * Copyright 2020 Google LLC
1147
+ * SPDX-License-Identifier: BSD-3-Clause
1148
+ */
1149
+ const { H: i$1 } = R, r$2 = (o2) => o2.strings === void 0, e$2 = () => document.createComment(""), u$1 = (o2, t2, n2) => {
1150
+ var v2;
1151
+ const l2 = o2._$AA.parentNode, d2 = t2 === void 0 ? o2._$AB : t2._$AA;
1152
+ if (n2 === void 0) {
1153
+ const t3 = l2.insertBefore(e$2(), d2), v3 = l2.insertBefore(e$2(), d2);
1154
+ n2 = new i$1(t3, v3, o2, o2.options);
1155
+ } else {
1156
+ const i2 = n2._$AB.nextSibling, t3 = n2._$AM, r2 = t3 !== o2;
1157
+ if (r2) {
1158
+ let i3;
1159
+ (v2 = n2._$AQ) === null || v2 === void 0 || v2.call(n2, o2), n2._$AM = o2, n2._$AP !== void 0 && (i3 = o2._$AU) !== t3._$AU && n2._$AP(i3);
1160
+ }
1161
+ if (i2 !== d2 || r2) {
1162
+ let o3 = n2._$AA;
1163
+ for (; o3 !== i2; ) {
1164
+ const i3 = o3.nextSibling;
1165
+ l2.insertBefore(o3, d2), o3 = i3;
1166
+ }
1167
+ }
1168
+ }
1169
+ return n2;
1170
+ }, c$1 = (o2, i2, t2 = o2) => (o2._$AI(i2, t2), o2), f$1 = {}, s = (o2, i2 = f$1) => o2._$AH = i2, a$1 = (o2) => o2._$AH, m = (o2) => {
1171
+ var i2;
1172
+ (i2 = o2._$AP) === null || i2 === void 0 || i2.call(o2, false, true);
1173
+ let t2 = o2._$AA;
1174
+ const n2 = o2._$AB.nextSibling;
1175
+ for (; t2 !== n2; ) {
1176
+ const o3 = t2.nextSibling;
1177
+ t2.remove(), t2 = o3;
1178
+ }
1179
+ };
1180
+ /**
1181
+ * @license
1182
+ * Copyright 2017 Google LLC
1183
+ * SPDX-License-Identifier: BSD-3-Clause
1184
+ */
1185
+ const u = (e2, s2, t2) => {
1186
+ const r2 = new Map();
1187
+ for (let l2 = s2; l2 <= t2; l2++)
1188
+ r2.set(e2[l2], l2);
1189
+ return r2;
1190
+ }, c = e$3(class extends i$2 {
1191
+ constructor(e2) {
1192
+ if (super(e2), e2.type !== t.CHILD)
1193
+ throw Error("repeat() can only be used in text expressions");
1194
+ }
1195
+ dt(e2, s2, t2) {
1196
+ let r2;
1197
+ t2 === void 0 ? t2 = s2 : s2 !== void 0 && (r2 = s2);
1198
+ const l2 = [], o2 = [];
1199
+ let i2 = 0;
1200
+ for (const s3 of e2)
1201
+ l2[i2] = r2 ? r2(s3, i2) : i2, o2[i2] = t2(s3, i2), i2++;
1202
+ return { values: o2, keys: l2 };
1203
+ }
1204
+ render(e2, s2, t2) {
1205
+ return this.dt(e2, s2, t2).values;
1206
+ }
1207
+ update(s$12, [t2, r2, c2]) {
1208
+ var d2;
1209
+ const a2 = a$1(s$12), { values: p2, keys: v2 } = this.dt(t2, r2, c2);
1210
+ if (!Array.isArray(a2))
1211
+ return this.ct = v2, p2;
1212
+ const h2 = (d2 = this.ct) !== null && d2 !== void 0 ? d2 : this.ct = [], m$12 = [];
1213
+ let y, x2, j2 = 0, k2 = a2.length - 1, w2 = 0, A2 = p2.length - 1;
1214
+ for (; j2 <= k2 && w2 <= A2; )
1215
+ if (a2[j2] === null)
1216
+ j2++;
1217
+ else if (a2[k2] === null)
1218
+ k2--;
1219
+ else if (h2[j2] === v2[w2])
1220
+ m$12[w2] = c$1(a2[j2], p2[w2]), j2++, w2++;
1221
+ else if (h2[k2] === v2[A2])
1222
+ m$12[A2] = c$1(a2[k2], p2[A2]), k2--, A2--;
1223
+ else if (h2[j2] === v2[A2])
1224
+ m$12[A2] = c$1(a2[j2], p2[A2]), u$1(s$12, m$12[A2 + 1], a2[j2]), j2++, A2--;
1225
+ else if (h2[k2] === v2[w2])
1226
+ m$12[w2] = c$1(a2[k2], p2[w2]), u$1(s$12, a2[j2], a2[k2]), k2--, w2++;
1227
+ else if (y === void 0 && (y = u(v2, w2, A2), x2 = u(h2, j2, k2)), y.has(h2[j2]))
1228
+ if (y.has(h2[k2])) {
1229
+ const e2 = x2.get(v2[w2]), t3 = e2 !== void 0 ? a2[e2] : null;
1230
+ if (t3 === null) {
1231
+ const e3 = u$1(s$12, a2[j2]);
1232
+ c$1(e3, p2[w2]), m$12[w2] = e3;
1233
+ } else
1234
+ m$12[w2] = c$1(t3, p2[w2]), u$1(s$12, a2[j2], t3), a2[e2] = null;
1235
+ w2++;
1236
+ } else
1237
+ m(a2[k2]), k2--;
1238
+ else
1239
+ m(a2[j2]), j2++;
1240
+ for (; w2 <= A2; ) {
1241
+ const e2 = u$1(s$12, m$12[A2 + 1]);
1242
+ c$1(e2, p2[w2]), m$12[w2++] = e2;
1243
+ }
1244
+ for (; j2 <= k2; ) {
1245
+ const e2 = a2[j2++];
1246
+ e2 !== null && m(e2);
1247
+ }
1248
+ return this.ct = v2, s(s$12, m$12), b$1;
1249
+ }
1250
+ });
1251
+ /**
1252
+ * @license
1253
+ * Copyright 2020 Google LLC
1254
+ * SPDX-License-Identifier: BSD-3-Clause
1255
+ */
1256
+ const o$2 = e$3(class extends i$2 {
1257
+ constructor(t$12) {
1258
+ if (super(t$12), t$12.type !== t.CHILD)
1259
+ throw Error("templateContent can only be used in child bindings");
1260
+ }
1261
+ render(r2) {
1262
+ return this.at === r2 ? b$1 : (this.at = r2, document.importNode(r2.content, true));
1263
+ }
1264
+ });
1265
+ var __defProp$j = Object.defineProperty;
1266
+ var __getOwnPropDesc$j = Object.getOwnPropertyDescriptor;
1267
+ var __decorateClass$j = (decorators, target, key, kind) => {
1268
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$j(target, key) : target;
1269
+ for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
1270
+ if (decorator = decorators[i2])
1271
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
1272
+ if (kind && result)
1273
+ __defProp$j(target, key, result);
1274
+ return result;
1275
+ };
1276
+ let SonicQueue = class extends Subscriber(s$1) {
1277
+ constructor() {
1278
+ super(...arguments);
1279
+ this.template = null;
1280
+ this.lastRequestTime = 0;
1281
+ this.targetRequestDuration = 500;
1282
+ this.limit = 5;
1283
+ this.dataProviderExpression = "";
1284
+ }
1285
+ connectedCallback() {
1286
+ if (!this.dataProvider)
1287
+ this.dataProvider = "sonic-queue-" + SonicQueue.instanceCounter++;
1288
+ super.connectedCallback();
1289
+ this.template = this.getElementsByTagName("template")[0];
1290
+ this.lastRequestTime = new Date().getTime();
1291
+ this.next();
1292
+ }
1293
+ next(e2) {
1294
+ let offset = 0;
1295
+ if (e2) {
1296
+ if (!e2.detail.isFirstLoad || e2.detail.props.length == 0) {
1297
+ return;
1298
+ }
1299
+ }
1300
+ if (!Array.isArray(this.props))
1301
+ this.props = [];
1302
+ else {
1303
+ const props = Object.values(this.props);
1304
+ const item = props[props.length - 1];
1305
+ offset = parseInt(item.offset.toString()) + parseInt(item.limit.toString());
1306
+ }
1307
+ const newTime = new Date().getTime();
1308
+ const requestDuration = newTime - this.lastRequestTime;
1309
+ this.lastRequestTime = newTime;
1310
+ if (requestDuration > 0)
1311
+ this.limit = Math.round(this.limit / requestDuration * this.targetRequestDuration);
1312
+ if (this.limit < 1)
1313
+ this.limit = 1;
1314
+ if (this.limit > 15)
1315
+ this.limit = 15;
1316
+ const dataProvider = this.dataProviderExpression.replace("$offset", offset + "").replace("$limit", this.limit + "");
1317
+ this.props = [...Object.values(this.props), { id: this.props.length, dataProvider, offset, limit: this.limit }];
1318
+ }
1319
+ render() {
1320
+ if (!Array.isArray(this.props))
1321
+ return p$1``;
1322
+ return p$1`
1323
+ ${c(this.props, (item) => item.id, (item) => p$1`
1324
+ <sonic-list @load=${this.next} dataProvider="${item.dataProvider}"> ${o$2(this.template)} </sonic-list>
1325
+ `)}
1326
+ `;
1327
+ }
1328
+ };
1329
+ SonicQueue.instanceCounter = 0;
1330
+ __decorateClass$j([
1331
+ e$4()
1332
+ ], SonicQueue.prototype, "targetRequestDuration", 2);
1333
+ __decorateClass$j([
1334
+ e$4()
1335
+ ], SonicQueue.prototype, "limit", 2);
1336
+ __decorateClass$j([
1337
+ e$4({ type: String })
1338
+ ], SonicQueue.prototype, "dataProviderExpression", 2);
1339
+ SonicQueue = __decorateClass$j([
1340
+ n$2("sonic-queue")
1341
+ ], SonicQueue);
1122
1342
  const inline = r$5`
1123
1343
  .sonic-loader--inline {
1124
1344
  display:block;
@@ -1126,8 +1346,7 @@ const inline = r$5`
1126
1346
  width: 80px;
1127
1347
  height: 80px;
1128
1348
  margin:auto;
1129
- z-index:999;
1130
-
1349
+ z-index:20;
1131
1350
  }
1132
1351
  .sonic-loader--inline div {
1133
1352
  position: absolute;
@@ -1237,15 +1456,15 @@ const fixed = r$5`
1237
1456
  }
1238
1457
 
1239
1458
  `;
1240
- var __defProp$g = Object.defineProperty;
1241
- var __getOwnPropDesc$g = Object.getOwnPropertyDescriptor;
1242
- var __decorateClass$g = (decorators, target, key, kind) => {
1243
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$g(target, key) : target;
1459
+ var __defProp$i = Object.defineProperty;
1460
+ var __getOwnPropDesc$i = Object.getOwnPropertyDescriptor;
1461
+ var __decorateClass$i = (decorators, target, key, kind) => {
1462
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$i(target, key) : target;
1244
1463
  for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
1245
1464
  if (decorator = decorators[i2])
1246
1465
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
1247
1466
  if (kind && result)
1248
- __defProp$g(target, key, result);
1467
+ __defProp$i(target, key, result);
1249
1468
  return result;
1250
1469
  };
1251
1470
  let SonicLoader = class extends Subscriber(s$1) {
@@ -1277,7 +1496,7 @@ let SonicLoader = class extends Subscriber(s$1) {
1277
1496
  SonicLoader.loader.remove();
1278
1497
  }
1279
1498
  render() {
1280
- return p`<div class="sonic-loader--${this.mode} ">
1499
+ return p$1`<div class="sonic-loader--${this.mode} ">
1281
1500
  <div></div>
1282
1501
  <div></div>
1283
1502
  <div></div>
@@ -1294,10 +1513,10 @@ SonicLoader.styles = [
1294
1513
  }`
1295
1514
  ];
1296
1515
  SonicLoader.callCounter = 0;
1297
- __decorateClass$g([
1516
+ __decorateClass$i([
1298
1517
  e$4({ type: String })
1299
1518
  ], SonicLoader.prototype, "mode", 2);
1300
- SonicLoader = __decorateClass$g([
1519
+ SonicLoader = __decorateClass$i([
1301
1520
  n$2("sonic-loader")
1302
1521
  ], SonicLoader);
1303
1522
  /**
@@ -1305,29 +1524,7 @@ SonicLoader = __decorateClass$g([
1305
1524
  * Copyright 2017 Google LLC
1306
1525
  * SPDX-License-Identifier: BSD-3-Clause
1307
1526
  */
1308
- const t = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, e$3 = (t2) => (...e2) => ({ _$litDirective$: t2, values: e2 });
1309
- class i$2 {
1310
- constructor(t2) {
1311
- }
1312
- get _$AU() {
1313
- return this._$AM._$AU;
1314
- }
1315
- _$AT(t2, e2, i2) {
1316
- this._$Ct = t2, this._$AM = e2, this._$Ci = i2;
1317
- }
1318
- _$AS(t2, e2) {
1319
- return this.update(t2, e2);
1320
- }
1321
- update(t2, e2) {
1322
- return this.render(...e2);
1323
- }
1324
- }
1325
- /**
1326
- * @license
1327
- * Copyright 2017 Google LLC
1328
- * SPDX-License-Identifier: BSD-3-Clause
1329
- */
1330
- class e$2 extends i$2 {
1527
+ class e$1 extends i$2 {
1331
1528
  constructor(i2) {
1332
1529
  if (super(i2), this.it = T, i2.type !== t.CHILD)
1333
1530
  throw Error(this.constructor.directiveName + "() can only be used in child bindings");
@@ -1346,115 +1543,8 @@ class e$2 extends i$2 {
1346
1543
  return s2.raw = s2, this.vt = { _$litType$: this.constructor.resultType, strings: s2, values: [] };
1347
1544
  }
1348
1545
  }
1349
- e$2.directiveName = "unsafeHTML", e$2.resultType = 1;
1350
- const o$2 = e$3(e$2);
1351
- /**
1352
- * @license
1353
- * Copyright 2020 Google LLC
1354
- * SPDX-License-Identifier: BSD-3-Clause
1355
- */
1356
- const { H: i$1 } = R, r$2 = (o2) => o2.strings === void 0, e$1 = () => document.createComment(""), u$1 = (o2, t2, n2) => {
1357
- var v2;
1358
- const l2 = o2._$AA.parentNode, d2 = t2 === void 0 ? o2._$AB : t2._$AA;
1359
- if (n2 === void 0) {
1360
- const t3 = l2.insertBefore(e$1(), d2), v3 = l2.insertBefore(e$1(), d2);
1361
- n2 = new i$1(t3, v3, o2, o2.options);
1362
- } else {
1363
- const i2 = n2._$AB.nextSibling, t3 = n2._$AM, r2 = t3 !== o2;
1364
- if (r2) {
1365
- let i3;
1366
- (v2 = n2._$AQ) === null || v2 === void 0 || v2.call(n2, o2), n2._$AM = o2, n2._$AP !== void 0 && (i3 = o2._$AU) !== t3._$AU && n2._$AP(i3);
1367
- }
1368
- if (i2 !== d2 || r2) {
1369
- let o3 = n2._$AA;
1370
- for (; o3 !== i2; ) {
1371
- const i3 = o3.nextSibling;
1372
- l2.insertBefore(o3, d2), o3 = i3;
1373
- }
1374
- }
1375
- }
1376
- return n2;
1377
- }, c$1 = (o2, i2, t2 = o2) => (o2._$AI(i2, t2), o2), f = {}, s = (o2, i2 = f) => o2._$AH = i2, a$1 = (o2) => o2._$AH, m = (o2) => {
1378
- var i2;
1379
- (i2 = o2._$AP) === null || i2 === void 0 || i2.call(o2, false, true);
1380
- let t2 = o2._$AA;
1381
- const n2 = o2._$AB.nextSibling;
1382
- for (; t2 !== n2; ) {
1383
- const o3 = t2.nextSibling;
1384
- t2.remove(), t2 = o3;
1385
- }
1386
- };
1387
- /**
1388
- * @license
1389
- * Copyright 2017 Google LLC
1390
- * SPDX-License-Identifier: BSD-3-Clause
1391
- */
1392
- const u = (e2, s2, t2) => {
1393
- const r2 = new Map();
1394
- for (let l2 = s2; l2 <= t2; l2++)
1395
- r2.set(e2[l2], l2);
1396
- return r2;
1397
- }, c = e$3(class extends i$2 {
1398
- constructor(e2) {
1399
- if (super(e2), e2.type !== t.CHILD)
1400
- throw Error("repeat() can only be used in text expressions");
1401
- }
1402
- dt(e2, s2, t2) {
1403
- let r2;
1404
- t2 === void 0 ? t2 = s2 : s2 !== void 0 && (r2 = s2);
1405
- const l2 = [], o2 = [];
1406
- let i2 = 0;
1407
- for (const s3 of e2)
1408
- l2[i2] = r2 ? r2(s3, i2) : i2, o2[i2] = t2(s3, i2), i2++;
1409
- return { values: o2, keys: l2 };
1410
- }
1411
- render(e2, s2, t2) {
1412
- return this.dt(e2, s2, t2).values;
1413
- }
1414
- update(s$12, [t2, r2, c2]) {
1415
- var d2;
1416
- const a2 = a$1(s$12), { values: p2, keys: v2 } = this.dt(t2, r2, c2);
1417
- if (!Array.isArray(a2))
1418
- return this.ct = v2, p2;
1419
- const h2 = (d2 = this.ct) !== null && d2 !== void 0 ? d2 : this.ct = [], m$12 = [];
1420
- let y, x2, j2 = 0, k2 = a2.length - 1, w2 = 0, A2 = p2.length - 1;
1421
- for (; j2 <= k2 && w2 <= A2; )
1422
- if (a2[j2] === null)
1423
- j2++;
1424
- else if (a2[k2] === null)
1425
- k2--;
1426
- else if (h2[j2] === v2[w2])
1427
- m$12[w2] = c$1(a2[j2], p2[w2]), j2++, w2++;
1428
- else if (h2[k2] === v2[A2])
1429
- m$12[A2] = c$1(a2[k2], p2[A2]), k2--, A2--;
1430
- else if (h2[j2] === v2[A2])
1431
- m$12[A2] = c$1(a2[j2], p2[A2]), u$1(s$12, m$12[A2 + 1], a2[j2]), j2++, A2--;
1432
- else if (h2[k2] === v2[w2])
1433
- m$12[w2] = c$1(a2[k2], p2[w2]), u$1(s$12, a2[j2], a2[k2]), k2--, w2++;
1434
- else if (y === void 0 && (y = u(v2, w2, A2), x2 = u(h2, j2, k2)), y.has(h2[j2]))
1435
- if (y.has(h2[k2])) {
1436
- const e2 = x2.get(v2[w2]), t3 = e2 !== void 0 ? a2[e2] : null;
1437
- if (t3 === null) {
1438
- const e3 = u$1(s$12, a2[j2]);
1439
- c$1(e3, p2[w2]), m$12[w2] = e3;
1440
- } else
1441
- m$12[w2] = c$1(t3, p2[w2]), u$1(s$12, a2[j2], t3), a2[e2] = null;
1442
- w2++;
1443
- } else
1444
- m(a2[k2]), k2--;
1445
- else
1446
- m(a2[j2]), j2++;
1447
- for (; w2 <= A2; ) {
1448
- const e2 = u$1(s$12, m$12[A2 + 1]);
1449
- c$1(e2, p2[w2]), m$12[w2++] = e2;
1450
- }
1451
- for (; j2 <= k2; ) {
1452
- const e2 = a2[j2++];
1453
- e2 !== null && m(e2);
1454
- }
1455
- return this.ct = v2, s(s$12, m$12), b$1;
1456
- }
1457
- });
1546
+ e$1.directiveName = "unsafeHTML", e$1.resultType = 1;
1547
+ const o$1 = e$3(e$1);
1458
1548
  /**
1459
1549
  * @license
1460
1550
  * Copyright 2017 Google LLC
@@ -1468,7 +1558,7 @@ const e = (i2, t2) => {
1468
1558
  for (const i3 of n2)
1469
1559
  (o2 = (s2 = i3)._$AO) === null || o2 === void 0 || o2.call(s2, t2, false), e(i3, t2);
1470
1560
  return true;
1471
- }, o$1 = (i2) => {
1561
+ }, o = (i2) => {
1472
1562
  let t2, s2;
1473
1563
  do {
1474
1564
  if ((t2 = i2._$AM) === void 0)
@@ -1486,7 +1576,7 @@ const e = (i2, t2) => {
1486
1576
  }
1487
1577
  };
1488
1578
  function r$1(i2) {
1489
- this._$AN !== void 0 ? (o$1(this), this._$AM = i2, n$1(this)) : this._$AM = i2;
1579
+ this._$AN !== void 0 ? (o(this), this._$AM = i2, n$1(this)) : this._$AM = i2;
1490
1580
  }
1491
1581
  function h$1(i2, t2 = false, s2 = 0) {
1492
1582
  const n2 = this._$AH, r2 = this._$AN;
@@ -1494,9 +1584,9 @@ function h$1(i2, t2 = false, s2 = 0) {
1494
1584
  if (t2)
1495
1585
  if (Array.isArray(n2))
1496
1586
  for (let i3 = s2; i3 < n2.length; i3++)
1497
- e(n2[i3], false), o$1(n2[i3]);
1587
+ e(n2[i3], false), o(n2[i3]);
1498
1588
  else
1499
- n2 != null && (e(n2, false), o$1(n2));
1589
+ n2 != null && (e(n2, false), o(n2));
1500
1590
  else
1501
1591
  e(this, i2);
1502
1592
  }
@@ -1513,7 +1603,7 @@ class d extends i$2 {
1513
1603
  }
1514
1604
  _$AO(i2, t2 = true) {
1515
1605
  var s2, n2;
1516
- i2 !== this.isConnected && (this.isConnected = i2, i2 ? (s2 = this.reconnected) === null || s2 === void 0 || s2.call(this) : (n2 = this.disconnected) === null || n2 === void 0 || n2.call(this)), t2 && (e(this, i2), o$1(this));
1606
+ i2 !== this.isConnected && (this.isConnected = i2, i2 ? (s2 = this.reconnected) === null || s2 === void 0 || s2.call(this) : (n2 = this.disconnected) === null || n2 === void 0 || n2.call(this)), t2 && (e(this, i2), o(this));
1517
1607
  }
1518
1608
  setValue(t2) {
1519
1609
  if (r$2(this._$Ct))
@@ -1530,7 +1620,7 @@ class d extends i$2 {
1530
1620
  }
1531
1621
  const i = new WeakMap();
1532
1622
  let h = 0;
1533
- const r = new Map(), n = new WeakSet(), a = () => new Promise((t2) => requestAnimationFrame(t2)), g = (t2, i2) => {
1623
+ const r = new Map(), n = new WeakSet(), a = () => new Promise((t2) => requestAnimationFrame(t2)), f = [{ opacity: 0 }], p = [{ opacity: 0 }, { opacity: 1 }], g = (t2, i2) => {
1534
1624
  const s2 = t2 - i2;
1535
1625
  return s2 === 0 ? void 0 : s2;
1536
1626
  }, w = (t2, i2) => {
@@ -1736,15 +1826,15 @@ class S extends d {
1736
1826
  }
1737
1827
  }
1738
1828
  const $ = e$3(S);
1739
- var __defProp$f = Object.defineProperty;
1740
- var __getOwnPropDesc$f = Object.getOwnPropertyDescriptor;
1741
- var __decorateClass$f = (decorators, target, key, kind) => {
1742
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$f(target, key) : target;
1829
+ var __defProp$h = Object.defineProperty;
1830
+ var __getOwnPropDesc$h = Object.getOwnPropertyDescriptor;
1831
+ var __decorateClass$h = (decorators, target, key, kind) => {
1832
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$h(target, key) : target;
1743
1833
  for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
1744
1834
  if (decorator = decorators[i2])
1745
1835
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
1746
1836
  if (kind && result)
1747
- __defProp$f(target, key, result);
1837
+ __defProp$h(target, key, result);
1748
1838
  return result;
1749
1839
  };
1750
1840
  const removeIcon = `<svg aria-hidden="true" focusable="false" data-icon="xmark" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">
@@ -1781,9 +1871,9 @@ let SonicToast = class extends Subscriber(s$1) {
1781
1871
  this.styled = false;
1782
1872
  }
1783
1873
  render() {
1784
- return p`<div class="sonic-toast-area">
1874
+ return p$1`<div class="sonic-toast-area">
1785
1875
 
1786
- ${c(this.toasts, (item) => item.id, (item) => p`
1876
+ ${c(this.toasts, (item) => item.id, (item) => p$1`
1787
1877
  <div
1788
1878
  class="${this.className} sonic-toast ${item.status}"
1789
1879
  ${$({
@@ -1803,16 +1893,16 @@ let SonicToast = class extends Subscriber(s$1) {
1803
1893
  stabilizeOut: true
1804
1894
  })}
1805
1895
  >
1806
- ${item.status && p`<div class="sonic-toast-icon">${o$2(icon[item.status])}</div>`}
1896
+ ${item.status && p$1`<div class="sonic-toast-icon">${o$1(icon[item.status])}</div>`}
1807
1897
 
1808
1898
  <div class="sonic-toast-text">
1809
- ${item.title ? p`<div class="sonic-toast-title">${item.title}</div>` : ""}
1810
- ${item.text ? o$2(item.text) : ""}
1899
+ ${item.title ? p$1`<div class="sonic-toast-title">${item.title}</div>` : ""}
1900
+ ${item.text ? o$1(item.text) : ""}
1811
1901
  <slot></slot>
1812
1902
  </div>
1813
1903
 
1814
1904
  <button class="sonic-toast-close" @click=${() => this.removeItem(item)}>
1815
- ${o$2(removeIcon)}
1905
+ ${o$1(removeIcon)}
1816
1906
  </button>
1817
1907
  ${!item.preserve ? this.autoRemoveItem(item) : ""}
1818
1908
 
@@ -1853,13 +1943,16 @@ let SonicToast = class extends Subscriber(s$1) {
1853
1943
  };
1854
1944
  SonicToast.styles = [
1855
1945
  r$5`
1946
+ * {
1947
+ box-sizing:border-box;
1948
+ }
1856
1949
 
1857
1950
  .sonic-toast-area{
1858
1951
  position: fixed;
1859
1952
  top: 1.25rem;
1860
1953
  right: 1.25rem;
1861
1954
  pointer-events: none;
1862
- width: 75%;
1955
+ width: calc(100% - 2.5rem);
1863
1956
  max-width: 40ch;
1864
1957
  z-index: 999;
1865
1958
  }
@@ -1962,23 +2055,23 @@ SonicToast.styles = [
1962
2055
  }
1963
2056
  `
1964
2057
  ];
1965
- __decorateClass$f([
2058
+ __decorateClass$h([
1966
2059
  t$1()
1967
2060
  ], SonicToast.prototype, "toasts", 2);
1968
- __decorateClass$f([
2061
+ __decorateClass$h([
1969
2062
  e$4({ type: String })
1970
2063
  ], SonicToast.prototype, "className", 2);
1971
- __decorateClass$f([
2064
+ __decorateClass$h([
1972
2065
  e$4({ type: Boolean })
1973
2066
  ], SonicToast.prototype, "styled", 2);
1974
- SonicToast = __decorateClass$f([
2067
+ SonicToast = __decorateClass$h([
1975
2068
  n$2("sonic-toast")
1976
2069
  ], SonicToast);
1977
2070
  if (typeof window !== "undefined") {
1978
2071
  let win = window;
1979
2072
  win.SonicToast = SonicToast;
1980
2073
  }
1981
- class API {
2074
+ const _API = class {
1982
2075
  constructor(config) {
1983
2076
  this.nologin = false;
1984
2077
  this.serviceURL = config.serviceURL;
@@ -1990,12 +2083,19 @@ class API {
1990
2083
  this.tokenProvider = config.tokenProvider;
1991
2084
  }
1992
2085
  async auth() {
2086
+ if (this.token)
2087
+ return;
2088
+ if (_API.tokens.has(this.serviceURL)) {
2089
+ this.token = _API.tokens.get(this.serviceURL);
2090
+ return;
2091
+ }
1993
2092
  if (!this.userName || !this.password || !this.tokenProvider)
1994
2093
  return;
1995
2094
  let headers = { Authorization: "Basic " + window.btoa(unescape(encodeURIComponent(this.userName + ":" + this.password))) };
1996
2095
  let result = await fetch(this.computeURL(this.tokenProvider), { headers });
1997
2096
  let json = await result.json();
1998
2097
  this.token = json.token;
2098
+ _API.tokens.set(this.serviceURL, this.token);
1999
2099
  }
2000
2100
  async get(path) {
2001
2101
  let headers = await this.createHeaders();
@@ -2008,8 +2108,7 @@ class API {
2008
2108
  }
2009
2109
  }
2010
2110
  async createHeaders() {
2011
- if (!this.token)
2012
- await this.auth();
2111
+ await this.auth();
2013
2112
  let headers = {};
2014
2113
  if (this.token)
2015
2114
  headers.Authorization = "Bearer " + this.token;
@@ -2020,6 +2119,7 @@ class API {
2020
2119
  return this.serviceURL + "/" + path;
2021
2120
  }
2022
2121
  async put(path, data) {
2122
+ await this.auth();
2023
2123
  let headers = await this.createHeaders();
2024
2124
  headers["Accept"] = "application/json";
2025
2125
  headers["Content-Type"] = "application/json";
@@ -2035,7 +2135,9 @@ class API {
2035
2135
  return null;
2036
2136
  }
2037
2137
  }
2038
- }
2138
+ };
2139
+ let API = _API;
2140
+ API.tokens = new Map();
2039
2141
  const Fetcher = (superClass) => {
2040
2142
  class FetcherElement extends superClass {
2041
2143
  constructor(...args) {
@@ -2046,7 +2148,7 @@ const Fetcher = (superClass) => {
2046
2148
  this.userName = "";
2047
2149
  this.key = "";
2048
2150
  this.password = "";
2049
- this.args = args;
2151
+ this.isFirstLoad = true;
2050
2152
  this.dataProvider = "";
2051
2153
  }
2052
2154
  async _fetchEventData() {
@@ -2066,6 +2168,8 @@ const Fetcher = (superClass) => {
2066
2168
  data = data[this.key];
2067
2169
  }
2068
2170
  this.props = data;
2171
+ this.dispatchEvent(new CustomEvent("load", { detail: this }));
2172
+ this.isFirstLoad = false;
2069
2173
  }
2070
2174
  connectedCallback() {
2071
2175
  super.connectedCallback();
@@ -2078,8 +2182,8 @@ const Fetcher = (superClass) => {
2078
2182
  this.serviceURL = document.location.origin;
2079
2183
  this.api = new API({
2080
2184
  serviceURL: this.serviceURL,
2081
- userName: "api",
2082
- password: "super",
2185
+ userName: this.userName,
2186
+ password: this.password,
2083
2187
  tokenProvider: this.tokenProvider,
2084
2188
  dataProvider: this.dataProvider
2085
2189
  });
@@ -2091,23 +2195,23 @@ const Fetcher = (superClass) => {
2091
2195
  }
2092
2196
  return FetcherElement;
2093
2197
  };
2094
- var __defProp$e = Object.defineProperty;
2095
- var __getOwnPropDesc$e = Object.getOwnPropertyDescriptor;
2096
- var __decorateClass$e = (decorators, target, key, kind) => {
2097
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$e(target, key) : target;
2198
+ var __defProp$g = Object.defineProperty;
2199
+ var __getOwnPropDesc$g = Object.getOwnPropertyDescriptor;
2200
+ var __decorateClass$g = (decorators, target, key, kind) => {
2201
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$g(target, key) : target;
2098
2202
  for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
2099
2203
  if (decorator = decorators[i2])
2100
2204
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
2101
2205
  if (kind && result)
2102
- __defProp$e(target, key, result);
2206
+ __defProp$g(target, key, result);
2103
2207
  return result;
2104
2208
  };
2105
2209
  let SonicFetch = class extends Fetcher(Subscriber(s$1)) {
2106
2210
  render() {
2107
- return p`<slot></slot>`;
2211
+ return p$1`<slot></slot>`;
2108
2212
  }
2109
2213
  };
2110
- SonicFetch = __decorateClass$e([
2214
+ SonicFetch = __decorateClass$g([
2111
2215
  n$2("sonic-fetch")
2112
2216
  ], SonicFetch);
2113
2217
  const cssProse = r$5`
@@ -2136,15 +2240,15 @@ r$5`
2136
2240
  margin-bottom:.5em;
2137
2241
  }
2138
2242
  `;
2139
- var __defProp$d = Object.defineProperty;
2140
- var __getOwnPropDesc$d = Object.getOwnPropertyDescriptor;
2141
- var __decorateClass$d = (decorators, target, key, kind) => {
2142
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$d(target, key) : target;
2243
+ var __defProp$f = Object.defineProperty;
2244
+ var __getOwnPropDesc$f = Object.getOwnPropertyDescriptor;
2245
+ var __decorateClass$f = (decorators, target, key, kind) => {
2246
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$f(target, key) : target;
2143
2247
  for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
2144
2248
  if (decorator = decorators[i2])
2145
2249
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
2146
2250
  if (kind && result)
2147
- __defProp$d(target, key, result);
2251
+ __defProp$f(target, key, result);
2148
2252
  return result;
2149
2253
  };
2150
2254
  let SonicTextFormatted = class extends Subscriber(s$1) {
@@ -2155,9 +2259,9 @@ let SonicTextFormatted = class extends Subscriber(s$1) {
2155
2259
  this.className = "";
2156
2260
  }
2157
2261
  render() {
2158
- return p`
2262
+ return p$1`
2159
2263
  <div class="${this.className} text-formatted">
2160
- ${o$2(this.html)}
2264
+ ${o$1(this.html)}
2161
2265
  </div>
2162
2266
  `;
2163
2267
  }
@@ -2165,27 +2269,27 @@ let SonicTextFormatted = class extends Subscriber(s$1) {
2165
2269
  SonicTextFormatted.styles = [
2166
2270
  cssProse
2167
2271
  ];
2168
- __decorateClass$d([
2272
+ __decorateClass$f([
2169
2273
  e$4({ type: String })
2170
2274
  ], SonicTextFormatted.prototype, "html", 2);
2171
- __decorateClass$d([
2275
+ __decorateClass$f([
2172
2276
  e$4({ type: String })
2173
2277
  ], SonicTextFormatted.prototype, "leading", 2);
2174
- __decorateClass$d([
2278
+ __decorateClass$f([
2175
2279
  e$4()
2176
2280
  ], SonicTextFormatted.prototype, "className", 2);
2177
- SonicTextFormatted = __decorateClass$d([
2281
+ SonicTextFormatted = __decorateClass$f([
2178
2282
  n$2("sonic-text-formatted")
2179
2283
  ], SonicTextFormatted);
2180
- var __defProp$c = Object.defineProperty;
2181
- var __getOwnPropDesc$c = Object.getOwnPropertyDescriptor;
2182
- var __decorateClass$c = (decorators, target, key, kind) => {
2183
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$c(target, key) : target;
2284
+ var __defProp$e = Object.defineProperty;
2285
+ var __getOwnPropDesc$e = Object.getOwnPropertyDescriptor;
2286
+ var __decorateClass$e = (decorators, target, key, kind) => {
2287
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$e(target, key) : target;
2184
2288
  for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
2185
2289
  if (decorator = decorators[i2])
2186
2290
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
2187
2291
  if (kind && result)
2188
- __defProp$c(target, key, result);
2292
+ __defProp$e(target, key, result);
2189
2293
  return result;
2190
2294
  };
2191
2295
  let SonicText = class extends Subscriber(s$1) {
@@ -2197,55 +2301,37 @@ let SonicText = class extends Subscriber(s$1) {
2197
2301
  }
2198
2302
  render() {
2199
2303
  let text = this.text;
2200
- if (this.props) {
2201
- if (this.key)
2202
- text = this.props[this.key];
2203
- else if (typeof this.props === "string")
2204
- text = this.props;
2205
- }
2206
- return text || this.children.length ? p`<div class="${this.className}">
2304
+ if (this.props && typeof this.props === "string")
2305
+ text = this.props;
2306
+ return text || this.children.length ? p$1`<div class="${this.className}">
2207
2307
  <slot name="prefix"></slot>
2208
- ${text && o$2(text)}
2308
+ ${text && o$1(text)}
2209
2309
  <slot></slot>
2210
2310
  <slot name="suffix"></slot>
2211
- </div>` : p`<slot></slot>`;
2311
+ </div>` : p$1`<slot></slot>`;
2212
2312
  }
2213
2313
  };
2214
- __decorateClass$c([
2314
+ __decorateClass$e([
2215
2315
  e$4()
2216
2316
  ], SonicText.prototype, "key", 2);
2217
- __decorateClass$c([
2317
+ __decorateClass$e([
2218
2318
  e$4()
2219
2319
  ], SonicText.prototype, "text", 2);
2220
- __decorateClass$c([
2320
+ __decorateClass$e([
2221
2321
  e$4()
2222
2322
  ], SonicText.prototype, "className", 2);
2223
- SonicText = __decorateClass$c([
2323
+ SonicText = __decorateClass$e([
2224
2324
  n$2("sonic-text")
2225
2325
  ], SonicText);
2226
- /**
2227
- * @license
2228
- * Copyright 2020 Google LLC
2229
- * SPDX-License-Identifier: BSD-3-Clause
2230
- */
2231
- const o = e$3(class extends i$2 {
2232
- constructor(t$12) {
2233
- if (super(t$12), t$12.type !== t.CHILD)
2234
- throw Error("templateContent can only be used in child bindings");
2235
- }
2236
- render(r2) {
2237
- return this.at === r2 ? b$1 : (this.at = r2, document.importNode(r2.content, true));
2238
- }
2239
- });
2240
- var __defProp$b = Object.defineProperty;
2241
- var __getOwnPropDesc$b = Object.getOwnPropertyDescriptor;
2242
- var __decorateClass$b = (decorators, target, key, kind) => {
2243
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$b(target, key) : target;
2326
+ var __defProp$d = Object.defineProperty;
2327
+ var __getOwnPropDesc$d = Object.getOwnPropertyDescriptor;
2328
+ var __decorateClass$d = (decorators, target, key, kind) => {
2329
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$d(target, key) : target;
2244
2330
  for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
2245
2331
  if (decorator = decorators[i2])
2246
2332
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
2247
2333
  if (kind && result)
2248
- __defProp$b(target, key, result);
2334
+ __defProp$d(target, key, result);
2249
2335
  return result;
2250
2336
  };
2251
2337
  let SonicList = class extends Fetcher(Subscriber(s$1)) {
@@ -2260,16 +2346,16 @@ let SonicList = class extends Fetcher(Subscriber(s$1)) {
2260
2346
  render() {
2261
2347
  if (typeof this.props == "string") {
2262
2348
  const icon2 = `<svg aria-hidden="true" focusable="false" data-prefix="fal" data-icon="face-thinking" class="svg-inline--fa fa-face-thinking" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M40.05 315.7C42.4 324.3 37.4 333.1 28.88 335.4C20.37 337.8 11.56 332.8 9.204 324.3C3.202 302.5 0 279.6 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 379.9 424 483.2 307.2 506.9C298.5 508.6 290.1 503 288.3 494.4C286.6 485.7 292.2 477.3 300.8 475.5C403.1 454.8 480 364.4 480 256C480 132.3 379.7 32 256 32C132.3 32 32 132.3 32 256C32 276.7 34.81 296.7 40.05 315.7H40.05zM318.3 297.2C336.5 303.3 349.4 319.3 351.6 338C354.3 359.3 342.4 380.5 321.5 388.7L274.5 407.1L250.6 466.7C239.7 494.1 213.2 512 183.8 512H136C96.24 512 64 479.8 64 440V320C64 293.5 85.49 272 112 272C138.5 272 160 293.5 160 320V348.8L257.4 310.7L186.9 287.2C178.6 284.4 174 275.3 176.8 266.9C179.6 258.6 188.7 254 197.1 256.8L318.3 297.2zM318.9 338.2C315.7 329.9 306.4 325.9 298.2 329.1L149.8 387.1C144.9 389.1 139.3 388.4 134.1 385.5C130.6 382.5 128 377.5 128 372.2V320C128 311.2 120.8 304 112 304C103.2 304 96 311.2 96 320V440C96 462.1 113.9 480 136 480H183.8C200.1 480 214.8 470 220.9 454.9L246.9 389.9C246.9 389.7 247 389.6 247.1 389.4C248.6 385 252 381.5 256.3 379.8L309.8 358.9C316.1 356.4 320 350.4 320 344C320 343.6 319.1 343.1 319.1 342.7C319.8 341.2 319.5 339.7 318.9 338.2H318.9zM200.4 192C200.4 205.3 189.6 216 176.4 216C163.1 216 152.4 205.3 152.4 192C152.4 178.7 163.1 168 176.4 168C189.6 168 200.4 178.7 200.4 192zM312.4 208C312.4 194.7 323.1 184 336.4 184C349.6 184 360.4 194.7 360.4 208C360.4 221.3 349.6 232 336.4 232C323.1 232 312.4 221.3 312.4 208zM216.4 144.8C195.9 127.2 166.5 124.4 142.1 137.9L135.9 141.9C128.3 146.3 118.5 143.6 114.1 135.9C109.7 128.3 112.4 118.5 120.1 114.1L127.1 110.1C162.3 89.95 206.4 94.14 237.2 120.5L250.4 131.9C257.1 137.6 257.9 147.7 252.1 154.4C246.4 161.1 236.3 161.9 229.6 156.1L216.4 144.8z"></path></svg>`;
2263
- return p`<div class="sonic-no-result-container">
2264
- ${o$2(icon2)} <span class="sonic-no-result-text">${this.props}
2349
+ return p$1`<div class="sonic-no-result-container">
2350
+ ${o$1(icon2)} <span class="sonic-no-result-text">${this.props}
2265
2351
  </span></div>`;
2266
2352
  }
2267
2353
  if (!Array.isArray(this.props))
2268
- return p``;
2269
- return p`
2270
- ${c(this.props, (item) => item.id, (item, index) => p`
2354
+ return p$1``;
2355
+ return p$1`
2356
+ ${c(this.props, (item) => item.id, (item, index) => item && p$1`
2271
2357
  <sonic-subscriber .props=${item} dataProvider="${this.dataProvider}/${index}">
2272
- ${o(this.template)}
2358
+ ${o$2(this.template)}
2273
2359
  </sonic-subscriber>
2274
2360
  `)}
2275
2361
  `;
@@ -2294,39 +2380,39 @@ SonicList.styles = [
2294
2380
  }
2295
2381
  `
2296
2382
  ];
2297
- SonicList = __decorateClass$b([
2383
+ SonicList = __decorateClass$d([
2298
2384
  n$2("sonic-list")
2299
2385
  ], SonicList);
2300
- var __defProp$a = Object.defineProperty;
2301
- var __getOwnPropDesc$a = Object.getOwnPropertyDescriptor;
2302
- var __decorateClass$a = (decorators, target, key, kind) => {
2303
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$a(target, key) : target;
2386
+ var __defProp$c = Object.defineProperty;
2387
+ var __getOwnPropDesc$c = Object.getOwnPropertyDescriptor;
2388
+ var __decorateClass$c = (decorators, target, key, kind) => {
2389
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$c(target, key) : target;
2304
2390
  for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
2305
2391
  if (decorator = decorators[i2])
2306
2392
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
2307
2393
  if (kind && result)
2308
- __defProp$a(target, key, result);
2394
+ __defProp$c(target, key, result);
2309
2395
  return result;
2310
2396
  };
2311
2397
  let SonicSubscriber = class extends Subscriber(s$1) {
2312
2398
  render() {
2313
- return p`
2399
+ return p$1`
2314
2400
  <slot></slot>
2315
2401
  `;
2316
2402
  }
2317
2403
  };
2318
- SonicSubscriber = __decorateClass$a([
2404
+ SonicSubscriber = __decorateClass$c([
2319
2405
  n$2("sonic-subscriber")
2320
2406
  ], SonicSubscriber);
2321
- var __defProp$9 = Object.defineProperty;
2322
- var __getOwnPropDesc$9 = Object.getOwnPropertyDescriptor;
2323
- var __decorateClass$9 = (decorators, target, key, kind) => {
2324
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$9(target, key) : target;
2407
+ var __defProp$b = Object.defineProperty;
2408
+ var __getOwnPropDesc$b = Object.getOwnPropertyDescriptor;
2409
+ var __decorateClass$b = (decorators, target, key, kind) => {
2410
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$b(target, key) : target;
2325
2411
  for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
2326
2412
  if (decorator = decorators[i2])
2327
2413
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
2328
2414
  if (kind && result)
2329
- __defProp$9(target, key, result);
2415
+ __defProp$b(target, key, result);
2330
2416
  return result;
2331
2417
  };
2332
2418
  let SonicTaxonomy = class extends Subscriber(s$1) {
@@ -2340,11 +2426,11 @@ let SonicTaxonomy = class extends Subscriber(s$1) {
2340
2426
  return;
2341
2427
  const idKey = "category_id";
2342
2428
  const nameKey = "category_name";
2343
- return p`
2429
+ return p$1`
2344
2430
  <div class="sonic-taxonomy">
2345
2431
  <i class=" fas fa-circle"></i>
2346
2432
  <div>
2347
- ${c(this.taxonomy, (item) => item[idKey], (item) => p`<span>
2433
+ ${c(this.taxonomy, (item) => item[idKey], (item) => p$1`<span>
2348
2434
  ${item[nameKey]}
2349
2435
  </span>
2350
2436
  <span class="sonic-taxonomy-separator"></span>
@@ -2355,24 +2441,24 @@ let SonicTaxonomy = class extends Subscriber(s$1) {
2355
2441
  `;
2356
2442
  }
2357
2443
  };
2358
- __decorateClass$9([
2444
+ __decorateClass$b([
2359
2445
  e$4({ type: Array })
2360
2446
  ], SonicTaxonomy.prototype, "taxonomy", 2);
2361
- __decorateClass$9([
2447
+ __decorateClass$b([
2362
2448
  e$4({ type: String })
2363
2449
  ], SonicTaxonomy.prototype, "separator", 2);
2364
- SonicTaxonomy = __decorateClass$9([
2450
+ SonicTaxonomy = __decorateClass$b([
2365
2451
  n$2("sonic-taxonomy")
2366
2452
  ], SonicTaxonomy);
2367
- var __defProp$8 = Object.defineProperty;
2368
- var __getOwnPropDesc$8 = Object.getOwnPropertyDescriptor;
2369
- var __decorateClass$8 = (decorators, target, key, kind) => {
2370
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$8(target, key) : target;
2453
+ var __defProp$a = Object.defineProperty;
2454
+ var __getOwnPropDesc$a = Object.getOwnPropertyDescriptor;
2455
+ var __decorateClass$a = (decorators, target, key, kind) => {
2456
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$a(target, key) : target;
2371
2457
  for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
2372
2458
  if (decorator = decorators[i2])
2373
2459
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
2374
2460
  if (kind && result)
2375
- __defProp$8(target, key, result);
2461
+ __defProp$a(target, key, result);
2376
2462
  return result;
2377
2463
  };
2378
2464
  let SonicEventCard = class extends Subscriber(s$1) {
@@ -2383,7 +2469,7 @@ let SonicEventCard = class extends Subscriber(s$1) {
2383
2469
  this.categories = [];
2384
2470
  }
2385
2471
  render() {
2386
- return p`
2472
+ return p$1`
2387
2473
  <div class="sonic-event-card">
2388
2474
  <div class="sonic-event-card-illustration">
2389
2475
  <sonic-illustration
@@ -2448,27 +2534,27 @@ SonicEventCard.styles = [
2448
2534
  }
2449
2535
  `
2450
2536
  ];
2451
- __decorateClass$8([
2537
+ __decorateClass$a([
2452
2538
  e$4({ type: String })
2453
2539
  ], SonicEventCard.prototype, "start_date", 2);
2454
- __decorateClass$8([
2540
+ __decorateClass$a([
2455
2541
  e$4({ type: String })
2456
2542
  ], SonicEventCard.prototype, "illustration", 2);
2457
- __decorateClass$8([
2543
+ __decorateClass$a([
2458
2544
  e$4({ type: Array })
2459
2545
  ], SonicEventCard.prototype, "categories", 2);
2460
- SonicEventCard = __decorateClass$8([
2546
+ SonicEventCard = __decorateClass$a([
2461
2547
  n$2("sonic-event-card")
2462
2548
  ], SonicEventCard);
2463
- var __defProp$7 = Object.defineProperty;
2464
- var __getOwnPropDesc$7 = Object.getOwnPropertyDescriptor;
2465
- var __decorateClass$7 = (decorators, target, key, kind) => {
2466
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$7(target, key) : target;
2549
+ var __defProp$9 = Object.defineProperty;
2550
+ var __getOwnPropDesc$9 = Object.getOwnPropertyDescriptor;
2551
+ var __decorateClass$9 = (decorators, target, key, kind) => {
2552
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$9(target, key) : target;
2467
2553
  for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
2468
2554
  if (decorator = decorators[i2])
2469
2555
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
2470
2556
  if (kind && result)
2471
- __defProp$7(target, key, result);
2557
+ __defProp$9(target, key, result);
2472
2558
  return result;
2473
2559
  };
2474
2560
  let SonicEventTitle = class extends Subscriber(s$1) {
@@ -2477,47 +2563,47 @@ let SonicEventTitle = class extends Subscriber(s$1) {
2477
2563
  this.title = "";
2478
2564
  }
2479
2565
  render() {
2480
- return p`
2566
+ return p$1`
2481
2567
  ${this.title}
2482
2568
  `;
2483
2569
  }
2484
2570
  };
2485
- __decorateClass$7([
2571
+ __decorateClass$9([
2486
2572
  e$4({ type: String })
2487
2573
  ], SonicEventTitle.prototype, "title", 2);
2488
- SonicEventTitle = __decorateClass$7([
2574
+ SonicEventTitle = __decorateClass$9([
2489
2575
  n$2("sonic-event-title")
2490
2576
  ], SonicEventTitle);
2491
- var __defProp$6 = Object.defineProperty;
2492
- var __getOwnPropDesc$6 = Object.getOwnPropertyDescriptor;
2493
- var __decorateClass$6 = (decorators, target, key, kind) => {
2494
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$6(target, key) : target;
2577
+ var __defProp$8 = Object.defineProperty;
2578
+ var __getOwnPropDesc$8 = Object.getOwnPropertyDescriptor;
2579
+ var __decorateClass$8 = (decorators, target, key, kind) => {
2580
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$8(target, key) : target;
2495
2581
  for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
2496
2582
  if (decorator = decorators[i2])
2497
2583
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
2498
2584
  if (kind && result)
2499
- __defProp$6(target, key, result);
2585
+ __defProp$8(target, key, result);
2500
2586
  return result;
2501
2587
  };
2502
2588
  let SonicEvent = class extends Subscriber(s$1) {
2503
2589
  render() {
2504
- return p`
2590
+ return p$1`
2505
2591
  <slot></slot>
2506
2592
  `;
2507
2593
  }
2508
2594
  };
2509
- SonicEvent = __decorateClass$6([
2595
+ SonicEvent = __decorateClass$8([
2510
2596
  n$2("super-event")
2511
2597
  ], SonicEvent);
2512
- var __defProp$5 = Object.defineProperty;
2513
- var __getOwnPropDesc$5 = Object.getOwnPropertyDescriptor;
2514
- var __decorateClass$5 = (decorators, target, key, kind) => {
2515
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$5(target, key) : target;
2598
+ var __defProp$7 = Object.defineProperty;
2599
+ var __getOwnPropDesc$7 = Object.getOwnPropertyDescriptor;
2600
+ var __decorateClass$7 = (decorators, target, key, kind) => {
2601
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$7(target, key) : target;
2516
2602
  for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
2517
2603
  if (decorator = decorators[i2])
2518
2604
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
2519
2605
  if (kind && result)
2520
- __defProp$5(target, key, result);
2606
+ __defProp$7(target, key, result);
2521
2607
  return result;
2522
2608
  };
2523
2609
  let SonicIllustration = class extends Subscriber(s$1) {
@@ -2529,7 +2615,7 @@ let SonicIllustration = class extends Subscriber(s$1) {
2529
2615
  this.className = "";
2530
2616
  }
2531
2617
  render() {
2532
- return p` <div class="${this.className} sonic-img-container">
2618
+ return p$1` <div class="${this.className} sonic-img-container">
2533
2619
  <picture
2534
2620
  ><img src="${this.illustration}" loading="${this.loadingMode}" alt=""
2535
2621
  /></picture>
@@ -2554,30 +2640,30 @@ SonicIllustration.styles = r$5`
2554
2640
  }
2555
2641
 
2556
2642
  `;
2557
- __decorateClass$5([
2643
+ __decorateClass$7([
2558
2644
  e$4({ type: String })
2559
2645
  ], SonicIllustration.prototype, "illustration", 2);
2560
- __decorateClass$5([
2646
+ __decorateClass$7([
2561
2647
  e$4({ type: String })
2562
2648
  ], SonicIllustration.prototype, "loadingMode", 2);
2563
- __decorateClass$5([
2649
+ __decorateClass$7([
2564
2650
  e$4({ type: String })
2565
2651
  ], SonicIllustration.prototype, "ratio", 2);
2566
- __decorateClass$5([
2652
+ __decorateClass$7([
2567
2653
  e$4({ type: String })
2568
2654
  ], SonicIllustration.prototype, "className", 2);
2569
- SonicIllustration = __decorateClass$5([
2655
+ SonicIllustration = __decorateClass$7([
2570
2656
  n$2("sonic-illustration")
2571
2657
  ], SonicIllustration);
2572
- var __defProp$4 = Object.defineProperty;
2573
- var __getOwnPropDesc$4 = Object.getOwnPropertyDescriptor;
2574
- var __decorateClass$4 = (decorators, target, key, kind) => {
2575
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$4(target, key) : target;
2658
+ var __defProp$6 = Object.defineProperty;
2659
+ var __getOwnPropDesc$6 = Object.getOwnPropertyDescriptor;
2660
+ var __decorateClass$6 = (decorators, target, key, kind) => {
2661
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$6(target, key) : target;
2576
2662
  for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
2577
2663
  if (decorator = decorators[i2])
2578
2664
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
2579
2665
  if (kind && result)
2580
- __defProp$4(target, key, result);
2666
+ __defProp$6(target, key, result);
2581
2667
  return result;
2582
2668
  };
2583
2669
  let SonicGiftcard = class extends Subscriber(s$1) {
@@ -2585,9 +2671,10 @@ let SonicGiftcard = class extends Subscriber(s$1) {
2585
2671
  super(...arguments);
2586
2672
  this.title = "";
2587
2673
  this.body = "";
2674
+ this.status = "";
2588
2675
  }
2589
2676
  render() {
2590
- return p`
2677
+ return p$1`
2591
2678
  <div class="sonic-giftcard-item">
2592
2679
  <div class="sonic-giftcard-illustration">
2593
2680
  <sonic-illustration></sonic-illustration>
@@ -2595,12 +2682,10 @@ let SonicGiftcard = class extends Subscriber(s$1) {
2595
2682
  <div class="sonic-giftcard-text">
2596
2683
  <div class="sonic-giftcard-title">${this.title}</div>
2597
2684
  <div class="sonic-giftcard-body">
2598
- <sonic-text-formatted
2599
- .html=${this.body}
2600
- leading="tight"
2601
- ></sonic-text-formatted>
2685
+ <sonic-text-formatted .html=${this.body} leading="tight"></sonic-text-formatted>
2602
2686
  </div>
2603
- <sonic-prices-form></sonic-prices-form>
2687
+ ${this.status == "on_sale" ? p$1`<sonic-prices-form></sonic-prices-form>` : ""}
2688
+ ${this.status == "only_visible" ? p$1`<div class="sonic-indispo"> Non disponible en ligne</div>` : ""}
2604
2689
  </div>
2605
2690
  </div>
2606
2691
  `;
@@ -2646,20 +2731,33 @@ SonicGiftcard.styles = [
2646
2731
  .sonic-giftcard-text {
2647
2732
  align-self: center;
2648
2733
  }
2734
+
2735
+ .sonic-indispo {
2736
+ display:inline-block;
2737
+ padding:.25em 1em;
2738
+ font-size:.85rem;
2739
+ font-weight:bold;
2740
+ border-radius:5rem;
2741
+ background:var(--sc-warning);
2742
+ color:var(--sc-warning-content);
2743
+ }
2744
+
2649
2745
  `
2650
2746
  ];
2651
- __decorateClass$4([
2747
+ __decorateClass$6([
2652
2748
  e$4({ type: String })
2653
2749
  ], SonicGiftcard.prototype, "title", 2);
2654
- __decorateClass$4([
2750
+ __decorateClass$6([
2655
2751
  e$4({ type: String })
2656
2752
  ], SonicGiftcard.prototype, "body", 2);
2657
- SonicGiftcard = __decorateClass$4([
2753
+ __decorateClass$6([
2754
+ e$4({ type: String })
2755
+ ], SonicGiftcard.prototype, "status", 2);
2756
+ SonicGiftcard = __decorateClass$6([
2658
2757
  n$2("sonic-giftcard")
2659
2758
  ], SonicGiftcard);
2660
2759
  const cssButton = r$5`
2661
- button {
2662
-
2760
+ .btn {
2663
2761
  all: unset;
2664
2762
  cursor: pointer;
2665
2763
  text-align: center;
@@ -2674,24 +2772,24 @@ const cssButton = r$5`
2674
2772
  padding-inline: var(--sc-btn-px, 0.8em);
2675
2773
  }
2676
2774
 
2677
- button:hover,
2678
- button:focus {
2775
+ .btn:hover,
2776
+ .btn:focus {
2679
2777
  filter:brightness(.99)
2680
2778
  }
2681
2779
 
2682
- button:active{
2780
+ .btn:active{
2683
2781
  transform:scale(.98)
2684
2782
  }
2685
2783
  `;
2686
- var __defProp$3 = Object.defineProperty;
2687
- var __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor;
2688
- var __decorateClass$3 = (decorators, target, key, kind) => {
2689
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$3(target, key) : target;
2784
+ var __defProp$5 = Object.defineProperty;
2785
+ var __getOwnPropDesc$5 = Object.getOwnPropertyDescriptor;
2786
+ var __decorateClass$5 = (decorators, target, key, kind) => {
2787
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$5(target, key) : target;
2690
2788
  for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
2691
2789
  if (decorator = decorators[i2])
2692
2790
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
2693
2791
  if (kind && result)
2694
- __defProp$3(target, key, result);
2792
+ __defProp$5(target, key, result);
2695
2793
  return result;
2696
2794
  };
2697
2795
  let SonicPricesButton = class extends Subscriber(s$1) {
@@ -2745,14 +2843,14 @@ let SonicPricesButton = class extends Subscriber(s$1) {
2745
2843
  render() {
2746
2844
  if (!this.props)
2747
2845
  return;
2748
- const icon2 = this.displayBtnIcon ? p`<i class="${this.btnIconClass}"></i>` : "";
2749
- const infoTooltip = this.price_help_text ? p`<div class="sonic-price-btn-help"><sonic-tooltip tooltipText="${this.price_help_text}">
2846
+ const icon2 = this.displayBtnIcon ? p$1`<i class="${this.btnIconClass}"></i>` : "";
2847
+ const infoTooltip = this.price_help_text ? p$1`<div class="sonic-price-btn-help"><sonic-tooltip tooltipText="${this.price_help_text}">
2750
2848
  <span>?</span>
2751
2849
  </sonic-tooltip></div>` : "";
2752
- return p`
2850
+ return p$1`
2753
2851
 
2754
- <button class="sonic-price-btn ${this.btnClass} ${!this.props.price_available || this.loading ? "sonic-price-disabled" : ""}" @click="${this._handleClick}">
2755
- ${this.displayPriceName && p`<span class="${this.priceNameClass} sonic-price-btn-name">
2852
+ <button class="btn sonic-price-btn ${this.btnClass} ${!this.props.price_available || this.loading ? "sonic-price-disabled" : ""}" @click="${this._handleClick}">
2853
+ ${this.displayPriceName && p$1`<span class="${this.priceNameClass} sonic-price-btn-name">
2756
2854
  ${this.price_name}
2757
2855
  </span>`}
2758
2856
  <span> ${icon2} ${this._cleanPrice(this.price_amount)}€ </span>
@@ -2799,51 +2897,51 @@ SonicPricesButton.styles = [
2799
2897
 
2800
2898
  `
2801
2899
  ];
2802
- __decorateClass$3([
2900
+ __decorateClass$5([
2803
2901
  e$4({ type: String })
2804
2902
  ], SonicPricesButton.prototype, "price_amount", 2);
2805
- __decorateClass$3([
2903
+ __decorateClass$5([
2806
2904
  e$4({ type: String })
2807
2905
  ], SonicPricesButton.prototype, "giftcard_id", 2);
2808
- __decorateClass$3([
2906
+ __decorateClass$5([
2809
2907
  e$4({ type: String })
2810
2908
  ], SonicPricesButton.prototype, "price_name", 2);
2811
- __decorateClass$3([
2909
+ __decorateClass$5([
2812
2910
  e$4({ type: String })
2813
2911
  ], SonicPricesButton.prototype, "price_id", 2);
2814
- __decorateClass$3([
2912
+ __decorateClass$5([
2815
2913
  e$4({ type: String })
2816
2914
  ], SonicPricesButton.prototype, "btnClass", 2);
2817
- __decorateClass$3([
2915
+ __decorateClass$5([
2818
2916
  e$4({ type: Boolean })
2819
2917
  ], SonicPricesButton.prototype, "displayBtnIcon", 2);
2820
- __decorateClass$3([
2918
+ __decorateClass$5([
2821
2919
  e$4({ type: Boolean })
2822
2920
  ], SonicPricesButton.prototype, "displayPriceName", 2);
2823
- __decorateClass$3([
2921
+ __decorateClass$5([
2824
2922
  e$4({ type: String })
2825
2923
  ], SonicPricesButton.prototype, "priceNameClass", 2);
2826
- __decorateClass$3([
2924
+ __decorateClass$5([
2827
2925
  e$4({ type: String })
2828
2926
  ], SonicPricesButton.prototype, "price_help_text", 2);
2829
- __decorateClass$3([
2927
+ __decorateClass$5([
2830
2928
  e$4({ type: String })
2831
2929
  ], SonicPricesButton.prototype, "btnIconClass", 2);
2832
- __decorateClass$3([
2930
+ __decorateClass$5([
2833
2931
  e$4()
2834
2932
  ], SonicPricesButton.prototype, "loading", 2);
2835
- SonicPricesButton = __decorateClass$3([
2933
+ SonicPricesButton = __decorateClass$5([
2836
2934
  n$2("sonic-price-button")
2837
2935
  ], SonicPricesButton);
2838
- var __defProp$2 = Object.defineProperty;
2839
- var __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor;
2840
- var __decorateClass$2 = (decorators, target, key, kind) => {
2841
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$2(target, key) : target;
2936
+ var __defProp$4 = Object.defineProperty;
2937
+ var __getOwnPropDesc$4 = Object.getOwnPropertyDescriptor;
2938
+ var __decorateClass$4 = (decorators, target, key, kind) => {
2939
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$4(target, key) : target;
2842
2940
  for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
2843
2941
  if (decorator = decorators[i2])
2844
2942
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
2845
2943
  if (kind && result)
2846
- __defProp$2(target, key, result);
2944
+ __defProp$4(target, key, result);
2847
2945
  return result;
2848
2946
  };
2849
2947
  let SonicPricesForm = class extends Subscriber(s$1) {
@@ -2863,11 +2961,11 @@ let SonicPricesForm = class extends Subscriber(s$1) {
2863
2961
  render() {
2864
2962
  if (this.prices.length === 0)
2865
2963
  return;
2866
- return p`
2964
+ return p$1`
2867
2965
  <div class="${this.className} sonic-prices-list">
2868
- ${c(this.prices, (price) => price.price_id, (price, index) => p`<div class="${this.itemClass} sonic-prices-list-item" ><sonic-price-button
2869
- .props=${this.makeShadow(this.props, price)}
2870
- dataProvider="${this.dataProvider}/${index}"
2966
+ ${c(this.prices, (price) => price.price_id, (price, index) => price && p$1`<div class="${this.itemClass} sonic-prices-list-item" ><sonic-price-button
2967
+ dataPath="prices.${index}"
2968
+ giftcard_id="${this.giftcard_id}"
2871
2969
  .btnClass=${this.btnClass}
2872
2970
  .displayBtnIcon=${this.displayBtnIcon}
2873
2971
  .priceNameClass=${this.priceNameClass}
@@ -2893,48 +2991,227 @@ SonicPricesForm.styles = [
2893
2991
  }
2894
2992
  `
2895
2993
  ];
2896
- __decorateClass$2([
2994
+ __decorateClass$4([
2897
2995
  e$4({ type: String })
2898
2996
  ], SonicPricesForm.prototype, "giftcard_id", 2);
2899
- __decorateClass$2([
2997
+ __decorateClass$4([
2900
2998
  e$4({ type: Array })
2901
2999
  ], SonicPricesForm.prototype, "prices", 2);
2902
- __decorateClass$2([
3000
+ __decorateClass$4([
2903
3001
  e$4({ type: Boolean })
2904
3002
  ], SonicPricesForm.prototype, "wrapper", 2);
2905
- __decorateClass$2([
3003
+ __decorateClass$4([
2906
3004
  e$4({ type: Boolean })
2907
3005
  ], SonicPricesForm.prototype, "displayBtnIcon", 2);
2908
- __decorateClass$2([
3006
+ __decorateClass$4([
2909
3007
  e$4({ type: Boolean })
2910
3008
  ], SonicPricesForm.prototype, "displayPriceName", 2);
2911
- __decorateClass$2([
3009
+ __decorateClass$4([
2912
3010
  e$4({ type: String })
2913
3011
  ], SonicPricesForm.prototype, "className", 2);
2914
- __decorateClass$2([
3012
+ __decorateClass$4([
2915
3013
  e$4({ type: String })
2916
3014
  ], SonicPricesForm.prototype, "itemClass", 2);
2917
- __decorateClass$2([
3015
+ __decorateClass$4([
2918
3016
  e$4({ type: String })
2919
3017
  ], SonicPricesForm.prototype, "btnClass", 2);
2920
- __decorateClass$2([
3018
+ __decorateClass$4([
2921
3019
  e$4({ type: String })
2922
3020
  ], SonicPricesForm.prototype, "iconClass", 2);
2923
- __decorateClass$2([
3021
+ __decorateClass$4([
2924
3022
  e$4({ type: String })
2925
3023
  ], SonicPricesForm.prototype, "priceNameClass", 2);
2926
- SonicPricesForm = __decorateClass$2([
3024
+ SonicPricesForm = __decorateClass$4([
2927
3025
  n$2("sonic-prices-form")
2928
3026
  ], SonicPricesForm);
2929
- var __defProp$1 = Object.defineProperty;
2930
- var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
2931
- var __decorateClass$1 = (decorators, target, key, kind) => {
2932
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$1(target, key) : target;
3027
+ var __defProp$3 = Object.defineProperty;
3028
+ var __getOwnPropDesc$3 = Object.getOwnPropertyDescriptor;
3029
+ var __decorateClass$3 = (decorators, target, key, kind) => {
3030
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$3(target, key) : target;
2933
3031
  for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
2934
3032
  if (decorator = decorators[i2])
2935
3033
  result = (kind ? decorator(target, key, result) : decorator(result)) || result;
2936
3034
  if (kind && result)
2937
- __defProp$1(target, key, result);
3035
+ __defProp$3(target, key, result);
3036
+ return result;
3037
+ };
3038
+ let SonicButton = class extends Subscriber(s$1) {
3039
+ constructor() {
3040
+ super(...arguments);
3041
+ this.type = "";
3042
+ this.variant = "";
3043
+ this.size = "";
3044
+ this.shape = "";
3045
+ this.className = "";
3046
+ this.href = "";
3047
+ }
3048
+ render() {
3049
+ const btn = p$1`<button
3050
+ class="${this.className}
3051
+ sonic-btn
3052
+ sonic-btn-xs
3053
+ ${this.variant}
3054
+ "
3055
+ >
3056
+ <span>
3057
+ <slot name="prefix"></slot>
3058
+ <slot></slot>
3059
+ <slot name="suffix"></slot>
3060
+ </span>
3061
+ </button>`;
3062
+ return this.href ? p$1`<a href="${this.href}" class="sonic-btn-link"> ${btn}</a>` : p$1`${btn}`;
3063
+ }
3064
+ };
3065
+ SonicButton.styles = [
3066
+ r$5`
3067
+
3068
+ button {
3069
+ all: unset;
3070
+ box-sizing: border-box;
3071
+
3072
+ --btn-height: 2.5em;
3073
+ --btn-border-color:transparent;
3074
+ --sc-btn-bg:var(--sc-base-200, #e5e7eb);
3075
+ --sc-btn-color: var(--sc-content, #1f2937)
3076
+ --sc-btn-ff:inherit;
3077
+ --sc-btn-fs:1rem;
3078
+ --sc-btn-py:.6em;
3079
+ --sc-btn-px:1.1em;
3080
+
3081
+ cursor: pointer;
3082
+ text-align: center;
3083
+ line-height: 1.2;
3084
+ border-radius: var(--sc-btn-rounded);
3085
+
3086
+ background:var(--sc-btn-bg) ;
3087
+ color: var(--sc-btn-color);
3088
+
3089
+ font-family: var(--sc-btn-ff);
3090
+ font-size: var(--sc-btn-fs);
3091
+
3092
+ padding-block: var(--sc-btn-py);
3093
+ padding-inline: var(--sc-btn-px);
3094
+
3095
+ border-width:var(--btn-)
3096
+ height:var(--btn-height);
3097
+ }
3098
+
3099
+ button:hover,
3100
+ button:focus {
3101
+ filter: brightness(0.98);
3102
+ }
3103
+
3104
+ button:active {
3105
+ filter: brightness(0.92);
3106
+ }
3107
+
3108
+ /*TYPES*/
3109
+ :host([type="primary"]) button {
3110
+ --sc-btn-color: var(--sc-primary-content);
3111
+ --sc-btn-bg: var(--sc-primary);
3112
+ }
3113
+ :host([type="warning"]) button {
3114
+ --sc-btn-color: var(--sc-warning-content);
3115
+ --sc-btn-bg: var(--sc-warning);
3116
+ }
3117
+ :host([type="danger"]) button {
3118
+ --sc-btn-color: var(--sc-danger-content);
3119
+ --sc-btn-bg: var(--sc-danger);
3120
+ }
3121
+ :host([type="info"]) button {
3122
+ --sc-btn-color: var(--sc-info-content);
3123
+ --sc-btn-bg: var(--sc-info);
3124
+ }
3125
+ :host([type="success"]) button {
3126
+ --sc-btn-color: var(--sc-success-content);
3127
+ --sc-btn-bg: var(--sc-success);
3128
+ }
3129
+ :host([type="dark"]) button {
3130
+ --sc-btn-color: var(--sc-base);
3131
+ --sc-btn-bg: var(--sc-base-content);
3132
+ }
3133
+
3134
+
3135
+ /*Variant*/
3136
+ :host([size="xs"]) button {
3137
+ font-size:.75rem;
3138
+ }
3139
+ :host([size="sm"]) button {
3140
+ font-size:.85rem;
3141
+ }
3142
+ :host([size="lg"]) button {
3143
+ font-size:1.2rem;
3144
+ }
3145
+
3146
+
3147
+
3148
+ /*Variant*/
3149
+ :host([variant="ghost"]:not([type])) button {
3150
+ color: var(--sc-btn-color);
3151
+ background: transparent;
3152
+ }
3153
+
3154
+ :host([variant="ghost"][type]) button {
3155
+ color: var(--sc-btn-bg);
3156
+ background: transparent;
3157
+ }
3158
+
3159
+ :host([variant="ghost"]) button:focus,
3160
+ :host([variant="ghost"]) button:hover {
3161
+ background: var(--sc-base-200);
3162
+ }
3163
+
3164
+ /*Shape*/
3165
+ :host([shape="circle"]) button {
3166
+ border-radius: 50%;
3167
+ }
3168
+
3169
+ :host([shape="circle"]) button,
3170
+ :host([shape="square"]) button {
3171
+ width: var(--btn-height);
3172
+ height: var(--btn-height);
3173
+ overflow: hidden;
3174
+ padding: 0;
3175
+ align-items: center;
3176
+ justify-content: 0;
3177
+ }
3178
+
3179
+ .sonic-btn-link {
3180
+ color: unset;
3181
+ display:contents;
3182
+ }
3183
+ `
3184
+ ];
3185
+ __decorateClass$3([
3186
+ e$4({ type: String })
3187
+ ], SonicButton.prototype, "type", 2);
3188
+ __decorateClass$3([
3189
+ e$4({ type: String })
3190
+ ], SonicButton.prototype, "variant", 2);
3191
+ __decorateClass$3([
3192
+ e$4({ type: String })
3193
+ ], SonicButton.prototype, "size", 2);
3194
+ __decorateClass$3([
3195
+ e$4({ type: String })
3196
+ ], SonicButton.prototype, "shape", 2);
3197
+ __decorateClass$3([
3198
+ e$4({ type: String })
3199
+ ], SonicButton.prototype, "className", 2);
3200
+ __decorateClass$3([
3201
+ e$4({ type: String })
3202
+ ], SonicButton.prototype, "href", 2);
3203
+ SonicButton = __decorateClass$3([
3204
+ n$2("sonic-button")
3205
+ ], SonicButton);
3206
+ var __defProp$2 = Object.defineProperty;
3207
+ var __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor;
3208
+ var __decorateClass$2 = (decorators, target, key, kind) => {
3209
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$2(target, key) : target;
3210
+ for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
3211
+ if (decorator = decorators[i2])
3212
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
3213
+ if (kind && result)
3214
+ __defProp$2(target, key, result);
2938
3215
  return result;
2939
3216
  };
2940
3217
  let SonicTooltip = class extends Subscriber(s$1) {
@@ -2944,7 +3221,7 @@ let SonicTooltip = class extends Subscriber(s$1) {
2944
3221
  this.className = "";
2945
3222
  }
2946
3223
  render() {
2947
- return p`<div
3224
+ return p$1`<div
2948
3225
  data-tooltip-text="${this.tooltipText}"
2949
3226
  class="${this.className} sonic-tooltip"
2950
3227
  >
@@ -2956,6 +3233,8 @@ SonicTooltip.styles = [
2956
3233
  r$5`
2957
3234
  .sonic-tooltip {
2958
3235
  position: relative;
3236
+ display:flex;
3237
+ align-items-center;
2959
3238
  }
2960
3239
  .sonic-tooltip:before {
2961
3240
  position: absolute;
@@ -2973,21 +3252,187 @@ SonicTooltip.styles = [
2973
3252
  border-radius: 0.25rem;
2974
3253
  color:var(--sc-base, #fff);
2975
3254
  z-index:999;
3255
+ display:none;
2976
3256
  }
2977
3257
  .sonic-tooltip:hover:before {
2978
3258
  opacity: 1;
3259
+ display:block;
2979
3260
  }
2980
3261
  `
2981
3262
  ];
2982
- __decorateClass$1([
3263
+ __decorateClass$2([
2983
3264
  e$4({ type: String })
2984
3265
  ], SonicTooltip.prototype, "tooltipText", 2);
2985
- __decorateClass$1([
3266
+ __decorateClass$2([
2986
3267
  e$4({ type: String })
2987
3268
  ], SonicTooltip.prototype, "className", 2);
2988
- SonicTooltip = __decorateClass$1([
3269
+ SonicTooltip = __decorateClass$2([
2989
3270
  n$2("sonic-tooltip")
2990
3271
  ], SonicTooltip);
3272
+ var __defProp$1 = Object.defineProperty;
3273
+ var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
3274
+ var __decorateClass$1 = (decorators, target, key, kind) => {
3275
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$1(target, key) : target;
3276
+ for (var i2 = decorators.length - 1, decorator; i2 >= 0; i2--)
3277
+ if (decorator = decorators[i2])
3278
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
3279
+ if (kind && result)
3280
+ __defProp$1(target, key, result);
3281
+ return result;
3282
+ };
3283
+ let SonicModal = class extends Subscriber(s$1) {
3284
+ constructor() {
3285
+ super(...arguments);
3286
+ this.className = "";
3287
+ this.title = "";
3288
+ this.text = "";
3289
+ this.visibility = "visible";
3290
+ }
3291
+ render() {
3292
+ if (this.visibility == "hidden")
3293
+ return p$1``;
3294
+ return p$1`<div
3295
+ class="sonic-modal-wrapper"
3296
+ ${$({
3297
+ out: f
3298
+ })}
3299
+ >
3300
+ <div
3301
+ class="${this.className} sonic-modal"
3302
+ ${$({
3303
+ in: [{ transform: "translateY(100%) scale(1)", boxShadow: "0 0 0 rgba(0,0,0,0)", opacity: 0 }],
3304
+ out: [{ transform: "translateY(20%) scale(1)", boxShadow: "0 0 0 rgba(0,0,0,0)", opacity: 0 }]
3305
+ })}
3306
+ >
3307
+ <div class="sonic-modal-text-container">
3308
+ <div class="sonic-modal-title">${this.title}</div>
3309
+ <div class="sonic-modal-text">${this.text}</div>
3310
+ <slot name="text"></slot>
3311
+ </div>
3312
+
3313
+ <div class="sonic-modal-actions">
3314
+ <sonic-button type="success">Mon action</sonic-button>
3315
+ <slot name="actions"></slot>
3316
+ </div>
3317
+ </div>
3318
+ </div>
3319
+
3320
+ <div
3321
+ class="sonic-modal-overlay"
3322
+ @click="${() => this.hide()}"
3323
+ ${$({
3324
+ in: p,
3325
+ out: f
3326
+ })}
3327
+ ></div> `;
3328
+ }
3329
+ hide() {
3330
+ this.visibility = "hidden";
3331
+ }
3332
+ static show(conf) {
3333
+ if (!document.querySelector("sonic-modal")) {
3334
+ let ModalComponent2 = document.createElement("sonic-modal");
3335
+ ModalComponent2.setAttribute("styled", new Boolean(conf.styled).toString() || "true");
3336
+ let container = document.querySelector("sonic-theme") || document.body;
3337
+ container.appendChild(ModalComponent2);
3338
+ }
3339
+ let ModalComponent = document.querySelector("sonic-modal");
3340
+ conf.title ? ModalComponent.title = conf.title : "";
3341
+ conf.text ? ModalComponent.text = conf.text : "";
3342
+ ModalComponent.visibility = "visible";
3343
+ }
3344
+ };
3345
+ SonicModal.styles = [
3346
+ r$5`
3347
+ * {
3348
+ box-sizing: border-box;
3349
+ }
3350
+
3351
+ .sonic-modal-wrapper {
3352
+ position: fixed;
3353
+ bottom: 0;
3354
+ left: 0;
3355
+ width: 100%;
3356
+ min-height: 20rem;
3357
+ z-index: 990;
3358
+ text-align: center;
3359
+ align-items: center;
3360
+ display: flex;
3361
+ flex-direction: column;
3362
+ }
3363
+
3364
+ .sonic-modal {
3365
+ width: 100%;
3366
+ background: var(--sc-base);
3367
+ min-height: 20rem;
3368
+ display: flex;
3369
+ flex-direction: column;
3370
+ text-align: center;
3371
+ align-items: center;
3372
+ padding: 1.25rem;
3373
+ box-shadow: var(--sc-shadow-lg);
3374
+ border-radius: var(--sc-rounded-lg) var(--sc-rounded-lg) 0 0;
3375
+ }
3376
+
3377
+ .sonic-modal-text-container {
3378
+ max-height: 20rem;
3379
+ margin-block: auto;
3380
+ }
3381
+
3382
+ .sonic-modal-title {
3383
+ font-size: 2rem;
3384
+ font-weight: bold;
3385
+ line-height: 1.15;
3386
+ margin-bottom: 0.25em;
3387
+ }
3388
+ .sonic-modal-overlay {
3389
+ background: var(--sc-base-200);
3390
+ inset: 0;
3391
+ z-index: 900;
3392
+ opacity: 0.8;
3393
+ position: fixed;
3394
+ }
3395
+
3396
+ @media (min-width: 768px) {
3397
+ .sonic-modal-wrapper {
3398
+ max-width: 60ch;
3399
+ top: 50%;
3400
+ left: 50%;
3401
+ bottom: auto;
3402
+ right: auto;
3403
+ transform: translateX(-50%) translateY(-50%);
3404
+ }
3405
+
3406
+ .sonic-modal {
3407
+ max-width: 60ch;
3408
+ top: 50%;
3409
+ left: 50%;
3410
+ bottom: auto;
3411
+ right: auto;
3412
+ border-radius: var(--sc-rounded-lg);
3413
+ }
3414
+ }
3415
+ `
3416
+ ];
3417
+ __decorateClass$1([
3418
+ e$4({ type: String })
3419
+ ], SonicModal.prototype, "className", 2);
3420
+ __decorateClass$1([
3421
+ e$4({ type: String, reflect: false })
3422
+ ], SonicModal.prototype, "title", 2);
3423
+ __decorateClass$1([
3424
+ e$4({ type: String })
3425
+ ], SonicModal.prototype, "text", 2);
3426
+ __decorateClass$1([
3427
+ t$1()
3428
+ ], SonicModal.prototype, "visibility", 2);
3429
+ SonicModal = __decorateClass$1([
3430
+ n$2("sonic-modal")
3431
+ ], SonicModal);
3432
+ if (typeof window !== "undefined") {
3433
+ let win = window;
3434
+ win.SonicModal = SonicModal;
3435
+ }
2991
3436
  const light = r$5`
2992
3437
  :host([theme="light"]) {
2993
3438
  --sc-primary: #6366f1;
@@ -3086,7 +3531,7 @@ const dark = r$5`
3086
3531
  --sc-headings-font-weight: bold;
3087
3532
  --sc-headings-text-transform: none;
3088
3533
 
3089
- --sc-btn-rounded: 0.25em;
3534
+ --sc-btn-rounded: 5rem;
3090
3535
  --sc-rounded: 0.35rem;
3091
3536
  --sc-rounded-lg: 0.8rem;
3092
3537
  --sc-placeholder-bg: rgba(0, 0, 0, 0.1);
@@ -3148,7 +3593,7 @@ let SonicTheme = class extends Subscriber(s$1) {
3148
3593
  this.theme = "light";
3149
3594
  }
3150
3595
  render() {
3151
- return p`<slot></slot>`;
3596
+ return p$1`<slot></slot>`;
3152
3597
  }
3153
3598
  };
3154
3599
  SonicTheme.styles = [
@@ -3159,11 +3604,10 @@ SonicTheme.styles = [
3159
3604
  r$5`
3160
3605
  :host {
3161
3606
  --sc-font-size-root: 1rem;
3162
- color:var(--sc-base-content);
3163
3607
  }
3164
3608
  :host([background]){
3165
- display:block;
3166
- background:var(--sc-base);
3609
+ display:block !important;
3610
+ background:var(--sc-base) !important;
3167
3611
  }
3168
3612
 
3169
3613
  `