@themarioga/grid-editor 9.0.0-beta.7 → 9.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +29 -15
  3. package/UPGRADING.md +1 -1
  4. package/dist/grideditor.bundle.min.js +2 -2
  5. package/dist/grideditor.css +27 -3
  6. package/dist/grideditor.d.ts +20 -0
  7. package/dist/grideditor.esm.js +10 -1
  8. package/dist/grideditor.js +10 -1
  9. package/dist/grideditor.min.css +1 -1
  10. package/dist/grideditor.min.css.map +1 -1
  11. package/dist/grideditor.min.js +1 -1
  12. package/dist/grideditor.min.js.map +3 -3
  13. package/dist/locales/grideditor.es.esm.js +1 -0
  14. package/dist/locales/grideditor.es.js +1 -0
  15. package/dist/locales/grideditor.es.min.js +1 -1
  16. package/dist/locales/grideditor.es.min.js.map +2 -2
  17. package/dist/plugins/grideditor.ckeditor.min.js.map +1 -1
  18. package/dist/plugins/grideditor.inline-style.esm.js +66 -3
  19. package/dist/plugins/grideditor.inline-style.js +66 -3
  20. package/dist/plugins/grideditor.inline-style.min.js +4 -4
  21. package/dist/plugins/grideditor.inline-style.min.js.map +3 -3
  22. package/dist/plugins/grideditor.summernote.min.js.map +1 -1
  23. package/dist/plugins/grideditor.tinymce.min.js.map +1 -1
  24. package/docs/locale-keys.md +1 -0
  25. package/docs/plugins.md +7 -6
  26. package/example/adapter.html +11 -1
  27. package/example/{autocols.html → columns.html} +61 -20
  28. package/example/containers.html +13 -2
  29. package/example/{attributes.html → custom-plugins.html} +130 -12
  30. package/example/elements.html +13 -2
  31. package/example/history.html +6 -3
  32. package/example/index.html +30 -81
  33. package/example/playground.html +845 -0
  34. package/example/style.html +291 -0
  35. package/example/text-editors.html +320 -0
  36. package/package.json +1 -1
  37. package/src/js/grideditor.js +11 -1
  38. package/src/js/inline-style/accordion.js +4 -3
  39. package/src/js/inline-style/fields.js +56 -3
  40. package/src/js/inline-style/options.js +12 -0
  41. package/src/js/locales/grideditor.es.js +1 -0
  42. package/src/js/plugins/grideditor.inline-style.js +10 -0
  43. package/src/js/text/grideditor.text.js +1 -1
  44. package/src/less/grideditor.less +29 -3
  45. package/types/grideditor.d.ts +20 -0
  46. package/example/breakpoints.html +0 -100
  47. package/example/ckeditor.html +0 -110
  48. package/example/custom_editor.html +0 -212
  49. package/example/inline-style.html +0 -163
  50. package/example/plugins.html +0 -251
  51. package/example/summernote.html +0 -114
  52. package/example/utilities.html +0 -200
@@ -1160,9 +1160,20 @@ function resolveSections(ge, given) {
1160
1160
  });
1161
1161
  return resolved;
1162
1162
  }
1163
+ function resolveBrowse(ge, given) {
1164
+ if (given === void 0 || given === null) {
1165
+ return null;
1166
+ }
1167
+ if (typeof given === "function") {
1168
+ return given;
1169
+ }
1170
+ ge.warn("inline_style.browse must be a function: ignored");
1171
+ return null;
1172
+ }
1163
1173
  function resolveOptions(ge) {
1164
1174
  var style = ge.settings.inline_style || {};
1165
1175
  return {
1176
+ browse: resolveBrowse(ge, style.browse),
1166
1177
  sections: resolveSections(ge, style.sections),
1167
1178
  spacing: style.spacing,
1168
1179
  visibility: style.visibility
@@ -1448,7 +1459,41 @@ function shadowControl(ge, node, property, changed) {
1448
1459
  return ge.hostStyle(node, property).value;
1449
1460
  } };
1450
1461
  }
1451
- function createStyleField(ge, node, property, changed) {
1462
+ function browseButton(ge, node, property, context, current, apply) {
1463
+ var button = element("button", {
1464
+ type: "button",
1465
+ "class": "btn btn-outline-secondary ge-inline-style-browse",
1466
+ title: ge.t("inline_style.browse"),
1467
+ "aria-label": ge.t("inline_style.browse")
1468
+ });
1469
+ button.appendChild(element("i", { "class": "bi bi-folder2-open", "aria-hidden": "true" }));
1470
+ button.addEventListener("click", function() {
1471
+ var answered = false;
1472
+ function answer(url) {
1473
+ if (answered) {
1474
+ return;
1475
+ }
1476
+ answered = true;
1477
+ if (url === null || url === void 0) {
1478
+ return;
1479
+ }
1480
+ if (typeof url !== "string") {
1481
+ ge.warn("inline_style.browse gave " + typeof url + ", not a text: ignored");
1482
+ return;
1483
+ }
1484
+ if (url.trim() === "" || context.destroyed || !ge.canvas.contains(node)) {
1485
+ return;
1486
+ }
1487
+ apply(url.trim());
1488
+ }
1489
+ var result = context.browse(answer, { node, property: property.name, value: shownUrl(current()) });
1490
+ if (result && typeof result.then === "function") {
1491
+ result.then(answer);
1492
+ }
1493
+ });
1494
+ return button;
1495
+ }
1496
+ function createStyleField(ge, node, property, changed, context) {
1452
1497
  var field = element("div", { "class": "ge-inline-style-field", "data-ge-inline-style-property": property.name });
1453
1498
  var label = field.appendChild(element("label", { "class": "ge-inline-style-label" }, ge.t(property.labelKey)));
1454
1499
  var render;
@@ -1489,10 +1534,21 @@ function createStyleField(ge, node, property, changed) {
1489
1534
  color.set(current());
1490
1535
  };
1491
1536
  } else if (property.type === "url") {
1492
- var url = field.appendChild(textInput());
1537
+ var url = textInput();
1493
1538
  url.addEventListener("change", function() {
1494
1539
  commit(urlValue(url.value), url);
1495
1540
  });
1541
+ if (context && context.browse) {
1542
+ var group2 = field.appendChild(element("div", { "class": "input-group input-group-sm ge-inline-style-url" }));
1543
+ group2.appendChild(url);
1544
+ group2.appendChild(browseButton(ge, node, property, context, current, function(text) {
1545
+ removeClass(url, "is-invalid");
1546
+ url.value = text;
1547
+ commit(urlValue(text), url);
1548
+ }));
1549
+ } else {
1550
+ field.appendChild(url);
1551
+ }
1496
1552
  render = function() {
1497
1553
  fill(url, shownUrl(current()));
1498
1554
  };
@@ -1754,7 +1810,7 @@ function createAccordion(ge, node, kind, context) {
1754
1810
  notes.push(note);
1755
1811
  var grid = body.appendChild(element("div", { "class": "ge-inline-style-fields" }));
1756
1812
  properties.forEach(function(property) {
1757
- var field = createStyleField(ge, node, property, changed);
1813
+ var field = createStyleField(ge, node, property, changed, context);
1758
1814
  fields.push(field);
1759
1815
  grid.appendChild(field);
1760
1816
  });
@@ -1814,6 +1870,7 @@ Object.assign(GridEditor7.locales.en, {
1814
1870
  "inline_style.overridden": "The class {class} takes priority over this value",
1815
1871
  "inline_style.invalid": "Not a value this property takes",
1816
1872
  "inline_style.catalog": "Bootstrap classes",
1873
+ "inline_style.browse": "Browse\u2026",
1817
1874
  "inline_style.shadow_x": "X",
1818
1875
  "inline_style.shadow_y": "Y",
1819
1876
  "inline_style.shadow_blur": "Blur",
@@ -1885,6 +1942,8 @@ GridEditor7.utilities["inline-style"] = function(ge) {
1885
1942
  sections: options.sections,
1886
1943
  parts,
1887
1944
  state: { open: null },
1945
+ browse: options.browse,
1946
+ destroyed: false,
1888
1947
  opened: function(key) {
1889
1948
  accordions.forEach(function(entry) {
1890
1949
  entry.accordion.open(key);
@@ -1934,6 +1993,10 @@ GridEditor7.utilities["inline-style"] = function(ge) {
1934
1993
  });
1935
1994
  },
1936
1995
  drawerTools: each2("drawerTools"),
1996
+ // An answer from the host's browser can come after the editor is gone
1997
+ onDestroy: function() {
1998
+ context.destroyed = true;
1999
+ },
1937
2000
  onDeinit: function() {
1938
2001
  each2("onDeinit")();
1939
2002
  accordions = [];
@@ -1156,9 +1156,20 @@
1156
1156
  });
1157
1157
  return resolved;
1158
1158
  }
1159
+ function resolveBrowse(ge, given) {
1160
+ if (given === void 0 || given === null) {
1161
+ return null;
1162
+ }
1163
+ if (typeof given === "function") {
1164
+ return given;
1165
+ }
1166
+ ge.warn("inline_style.browse must be a function: ignored");
1167
+ return null;
1168
+ }
1159
1169
  function resolveOptions(ge) {
1160
1170
  var style = ge.settings.inline_style || {};
1161
1171
  return {
1172
+ browse: resolveBrowse(ge, style.browse),
1162
1173
  sections: resolveSections(ge, style.sections),
1163
1174
  spacing: style.spacing,
1164
1175
  visibility: style.visibility
@@ -1444,7 +1455,41 @@
1444
1455
  return ge.hostStyle(node, property).value;
1445
1456
  } };
1446
1457
  }
1447
- function createStyleField(ge, node, property, changed) {
1458
+ function browseButton(ge, node, property, context, current, apply) {
1459
+ var button = element("button", {
1460
+ type: "button",
1461
+ "class": "btn btn-outline-secondary ge-inline-style-browse",
1462
+ title: ge.t("inline_style.browse"),
1463
+ "aria-label": ge.t("inline_style.browse")
1464
+ });
1465
+ button.appendChild(element("i", { "class": "bi bi-folder2-open", "aria-hidden": "true" }));
1466
+ button.addEventListener("click", function() {
1467
+ var answered = false;
1468
+ function answer(url) {
1469
+ if (answered) {
1470
+ return;
1471
+ }
1472
+ answered = true;
1473
+ if (url === null || url === void 0) {
1474
+ return;
1475
+ }
1476
+ if (typeof url !== "string") {
1477
+ ge.warn("inline_style.browse gave " + typeof url + ", not a text: ignored");
1478
+ return;
1479
+ }
1480
+ if (url.trim() === "" || context.destroyed || !ge.canvas.contains(node)) {
1481
+ return;
1482
+ }
1483
+ apply(url.trim());
1484
+ }
1485
+ var result = context.browse(answer, { node, property: property.name, value: shownUrl(current()) });
1486
+ if (result && typeof result.then === "function") {
1487
+ result.then(answer);
1488
+ }
1489
+ });
1490
+ return button;
1491
+ }
1492
+ function createStyleField(ge, node, property, changed, context) {
1448
1493
  var field = element("div", { "class": "ge-inline-style-field", "data-ge-inline-style-property": property.name });
1449
1494
  var label = field.appendChild(element("label", { "class": "ge-inline-style-label" }, ge.t(property.labelKey)));
1450
1495
  var render;
@@ -1485,10 +1530,21 @@
1485
1530
  color.set(current());
1486
1531
  };
1487
1532
  } else if (property.type === "url") {
1488
- var url = field.appendChild(textInput());
1533
+ var url = textInput();
1489
1534
  url.addEventListener("change", function() {
1490
1535
  commit(urlValue(url.value), url);
1491
1536
  });
1537
+ if (context && context.browse) {
1538
+ var group2 = field.appendChild(element("div", { "class": "input-group input-group-sm ge-inline-style-url" }));
1539
+ group2.appendChild(url);
1540
+ group2.appendChild(browseButton(ge, node, property, context, current, function(text) {
1541
+ removeClass(url, "is-invalid");
1542
+ url.value = text;
1543
+ commit(urlValue(text), url);
1544
+ }));
1545
+ } else {
1546
+ field.appendChild(url);
1547
+ }
1492
1548
  render = function() {
1493
1549
  fill(url, shownUrl(current()));
1494
1550
  };
@@ -1750,7 +1806,7 @@
1750
1806
  notes.push(note);
1751
1807
  var grid = body.appendChild(element("div", { "class": "ge-inline-style-fields" }));
1752
1808
  properties.forEach(function(property) {
1753
- var field = createStyleField(ge, node, property, changed);
1809
+ var field = createStyleField(ge, node, property, changed, context);
1754
1810
  fields.push(field);
1755
1811
  grid.appendChild(field);
1756
1812
  });
@@ -1810,6 +1866,7 @@
1810
1866
  "inline_style.overridden": "The class {class} takes priority over this value",
1811
1867
  "inline_style.invalid": "Not a value this property takes",
1812
1868
  "inline_style.catalog": "Bootstrap classes",
1869
+ "inline_style.browse": "Browse\u2026",
1813
1870
  "inline_style.shadow_x": "X",
1814
1871
  "inline_style.shadow_y": "Y",
1815
1872
  "inline_style.shadow_blur": "Blur",
@@ -1881,6 +1938,8 @@
1881
1938
  sections: options.sections,
1882
1939
  parts,
1883
1940
  state: { open: null },
1941
+ browse: options.browse,
1942
+ destroyed: false,
1884
1943
  opened: function(key) {
1885
1944
  accordions.forEach(function(entry) {
1886
1945
  entry.accordion.open(key);
@@ -1930,6 +1989,10 @@
1930
1989
  });
1931
1990
  },
1932
1991
  drawerTools: each2("drawerTools"),
1992
+ // An answer from the host's browser can come after the editor is gone
1993
+ onDestroy: function() {
1994
+ context.destroyed = true;
1995
+ },
1933
1996
  onDeinit: function() {
1934
1997
  each2("onDeinit")();
1935
1998
  accordions = [];
@@ -1,4 +1,4 @@
1
- (()=>{var T=window.GridEditor;if(!T||typeof T.get!="function")throw new Error("grid-editor: load grideditor.js (or grideditor.bundle.min.js) before its plugins, its locales and grideditor.jquery.js");function P(e,t){return e?Array.prototype.slice.call(e.querySelectorAll(t)):[]}function N(e,t){return e?e.querySelector(t):null}function I(e,t){if(!e)return[];var n=P(e,t);return e.nodeType===1&&e.matches(t)&&n.unshift(e),n}function J(e,t){return e?Array.prototype.filter.call(e.children,function(n){return!t||n.matches(t)}):[]}function j(e,t){return J(e,t)[0]||null}function M(e,t){return!!e&&e.nodeType===1&&e.matches(t)}function g(e,t,n){var i=document.createElement(e);return Object.keys(t||{}).forEach(function(l){var o=t[l];o!=null&&o!==!1&&i.setAttribute(l,o)}),n!=null&&(i.textContent=n),i}function Z(e,t){return oe(t).forEach(function(n){e.classList.add(n)}),e}function H(e,t){return oe(t).forEach(function(n){e.classList.remove(n)}),e}function $(e,t,n){return oe(t).forEach(function(i){n===void 0?e.classList.toggle(i):e.classList.toggle(i,!!n)}),e}function R(e,t){return!!e&&e.nodeType===1&&e.classList.contains(t)}function oe(e){return String(e||"").split(/\s+/).filter(Boolean)}function W(e){return e.getAttribute("class")||e.removeAttribute("class"),e}function ae(e,t){return Object.keys(t).forEach(function(n){var i=t[n];typeof i=="number"&&!We[n]&&(i=i+"px"),e.style.setProperty(n,i==null?"":String(i))}),e}var We={opacity:!0,"z-index":!0,"flex-grow":!0,"flex-shrink":!0,order:!0},V={};function qe(e){var t=e.nodeName;if(!V[t]){var n=document.body.appendChild(document.createElement(t));V[t]=getComputedStyle(n).display,n.remove(),V[t]==="none"&&(V[t]="block")}return V[t]}function Xe(e){return e.style.removeProperty("display"),getComputedStyle(e).display==="none"&&(e.style.display=qe(e)),e}function Ye(e){return e.style.display="none",e}function F(e,t){return t===void 0&&(t=!Je(e)),t?Xe(e):Ye(e)}function Je(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}Object.assign(T.locales.en,{"utility.padding":"Padding","utility.margin":"Margin","utility.side_all":"All sides","utility.side_x":"Left and right","utility.side_y":"Top and bottom","utility.side_t":"Top","utility.side_b":"Bottom","utility.side_s":"Start","utility.side_e":"End","utility.spacing_gutter":"A column's side padding is its gutter: changing it changes the gutter"});var q=["0","1","2","3","4","5"],Ze=["0",".25rem",".5rem","1rem","1.5rem","3rem"],Q=["","x","y","t","e","b","s"],Qe={"":["top","right","bottom","left"],x:["left","right"],y:["top","bottom"],t:["top"],e:["right"],b:["bottom"],s:["left"]},he=["","sm","md","lg","xl","xxl"],se={p:"padding",m:"margin"};function ve(e){return new RegExp("^"+e+"[xytbse]?-(?:(?:sm|md|lg|xl|xxl)-)?(?:[0-5]|auto)$")}function be(e,t){var n=Object.assign({values:q,scale:Ze},t),i={p:ve("p"),m:ve("m")};function l(r,a){return a==="row"||a==="column"||a==="element"||M(r,"[data-ge-container]")}function o(r){return(r.getAttribute("class")||"").split(/\s+/)}function u(r,a){return o(r).some(function(p){return i[a].test(p)})}function c(r,a,p){for(var w=o(r),b=a.charAt(0)==="m"?q.concat(["auto"]):q,v=p;v>=0;v--)for(var C=0;C<b.length;C++){var k=a+(he[v]?"-"+he[v]:"")+"-"+b[C];if(w.indexOf(k)!==-1)return{tier:v,value:b[C]}}return null}function d(r,a){var p=r.getAttribute("class"),w,b={};return r.setAttribute("class",o(r).filter(function(v){return!i[a].test(v)}).join(" ")),w=getComputedStyle(r),["top","right","bottom","left"].forEach(function(v){b[v]=w.getPropertyValue(se[a]+"-"+v)}),p===null?r.removeAttribute("class"):r.setAttribute("class",p),b}function m(r,a,p){var w=e.breakpoints.indexOf(p),b={},v={},C=null;return Q.forEach(function(k,K){var A=c(r,a+k,w);A&&Qe[k].forEach(function(G){var Y=b[G];(!Y||A.tier>Y.tier||A.tier===Y.tier&&K>Y.order)&&(b[G]={tier:A.tier,order:K,value:A.value})})}),["top","right","bottom","left"].forEach(function(k){var K=b[k];K?v[se[a]+"-"+k]=K.value==="auto"?"auto":n.scale[K.value]:(C=C||d(r,a),v[se[a]+"-"+k]=C[k])}),v}function E(r,a){var p=o(r).filter(function(b){return i[a].test(b)}),w=Q.filter(function(b){return p.some(function(v){return v.indexOf(a+b+"-")===0})});return w.length?w[0]:""}function y(r){switch(r){case"x":return e.t("utility.side_x");case"y":return e.t("utility.side_y");case"t":return e.t("utility.side_t");case"b":return e.t("utility.side_b");case"s":return e.t("utility.side_s");case"e":return e.t("utility.side_e");default:return e.t("utility.side_all")}}function f(r,a,p){var w=g("div",{class:"ge-spacing-group","data-ge-spacing":a}),b=g("select",{class:"ge-spacing-side form-select form-select-sm"});w.appendChild(g("span",{class:"ge-utility-label"},p)),Q.forEach(function(C){b.appendChild(g("option",{value:C},y(C)))});var v=e.utilityField(r,a+E(r,a));return b.value=v.getAttribute("data-ge-family").slice(1),b.addEventListener("change",function(){var C=e.utilityField(r,a+this.value);v.replaceWith(C),v=C}),w.appendChild(b),w.appendChild(v),w}var x=".row, .column, .ge-element, [data-ge-container]";function O(r){I(r,x).forEach(function(a){var p=j(a,".ge-tools-drawer");if(!(!p||!l(a,e.kindOf(a)))){if(u(a,"p")){var w=getComputedStyle(a);ae(p,{"margin-top":"-"+w.paddingTop,"margin-left":"-"+w.paddingLeft,"margin-right":"-"+w.paddingRight,width:"calc(100% + "+w.paddingLeft+" + "+w.paddingRight+")"})}else ae(p,{"margin-top":"","margin-left":"","margin-right":"",width:""});if(R(a,"column")){var b=o(a).some(function(v){return/^p[xse]?-/.test(v)&&i.p.test(v)});P(p,".ge-spacing-gutter").forEach(function(v){F(v,b)})}}})}function s(r,a){var p=r==="m"?q.concat(["auto"]):q,w=n.values.concat(r==="m"?["auto"]:[]);return Q.map(function(b){return{name:r+b,prefix:r+b,values:p,appliesTo:["row","column","text","element","container"],labelKey:a,panel:!1,choices:function(){return p.filter(function(v){return w.indexOf(v)!==-1})}}})}return{families:s("p","utility.padding").concat(s("m","utility.margin")),panel:function(r,a){if(!l(r,a))return null;var p=g("div",{class:"ge-spacing"});return p.appendChild(f(r,"p",e.t("utility.padding"))),p.appendChild(f(r,"m",e.t("utility.margin"))),a==="column"&&p.appendChild(g("small",{class:"ge-spacing-gutter"},e.t("utility.spacing_gutter"))),p},preview:function(r,a,p){if(!l(r,a))return{};var w={};return["p","m"].forEach(function(b){u(r,b)&&Object.assign(w,m(r,b,p))}),w},onRefresh:O}}Object.assign(T.locales.en,{"utility.text_align":"Text alignment","utility.text_start":"Start","utility.text_center":"Center","utility.text_end":"End"});var et={start:"left",center:"center",end:"right"};function _e(e){function t(n){return n==="start"?e.t("utility.text_start"):n==="center"?e.t("utility.text_center"):e.t("utility.text_end")}return{families:[{name:"text-align",prefix:"text",values:["start","center","end"],appliesTo:["row","column","text","element","container"],labelKey:"utility.text_align",label:t,preview:function(n,i){return{"text-align":n===null?e.bareStyle(i,"text-align","text-align"):et[n]}}}]}}Object.assign(T.locales.en,{"utility.display":"Display","utility.visibility_hidden":"Hidden","tool.hide_in_view":"Hide in this view","tool.show_in_view":"Show in this view","badge.hidden_in":"Hidden at {breakpoints}"});var te=["none","inline","inline-block","block","grid","inline-grid","flex","inline-flex"],tt=new RegExp("(?:^|\\s)d-(?:(?:sm|md|lg|xl|xxl)-)?(?:"+te.join("|")+")(?:\\s|$)"),nt=/^d-(?:(?:sm|md|lg|xl|xxl)-)?none$/,it=".row, .column, .ge-content, .ge-element, [data-ge-container]",ee="data-ge-display";function xe(e,t){var n=Object.assign({drawer:!0},t);function i(s){return s==="row"?["none","flex"]:s==="text"||s==="plain"?["none","block"]:te}function l(s){return s==="row"?"flex":"block"}function o(s,r){return r==="row"||r==="column"||r==="element"||r==="text"||r==="plain"||M(s,"[data-ge-container]")}function u(s,r){return e.getUtility(s,"display",r)==="none"}function c(s){return e.breakpoints.filter(function(r){return u(s,r)})}function d(s){return e.view()==="all"?c(s).length===e.breakpoints.length:u(s,e.view())}function m(s){var r=e.breakpoints.indexOf(e.view());return r>0&&u(s,e.breakpoints[r-1])}function E(s,r){for(var a=e.breakpoints.indexOf(r)-1;a>=0;a--){var p=e.getUtility(s,"display",e.breakpoints[a]);if(p===null)return null;if(p!=="none")return p}return null}function y(s,r){var a=!d(s),p;e.view()==="all"?p=a?"none":null:a?p=m(s)?null:"none":p=m(s)?E(s,e.view())||l(r):null,e.setUtility(s,"display",p,{source:"tool"})}function f(s){var r=s.getAttribute("class");s.setAttribute("class",r.split(/\s+/).filter(function(p){return!nt.test(p)}).join(" "));var a=getComputedStyle(s).display;return s.setAttribute("class",r),a!=="none"&&te.indexOf(a)!==-1?a:"block"}function x(s){I(s,it).forEach(function(r){var a=e.kindOf(r),p=o(r,a)&&tt.test(r.getAttribute("class")||""),w=p?c(r):[],b=p&&d(r),v=p&&e.view()==="all"&&w.length>0&&!b;r.removeAttribute(ee),p&&getComputedStyle(r).display==="none"&&r.setAttribute(ee,f(r)),$(r,"ge-hidden-in-view",b),v?r.setAttribute("data-ge-hidden-in",e.t("badge.hidden_in",{breakpoints:w.join(", ")})):r.removeAttribute("data-ge-hidden-in"),J(r,".ge-tools-drawer").forEach(function(C){J(C,".ge-visibility-tool").forEach(function(k){k.setAttribute("title",b?e.t("tool.show_in_view"):e.t("tool.hide_in_view")),P(k,"i").forEach(function(K){K.setAttribute("class",b?"bi bi-eye-slash":"bi bi-eye")})})})})}function O(s){P(s||e.canvas,".ge-hidden-in-view, [data-ge-hidden-in], ["+ee+"]").forEach(function(r){H(r,"ge-hidden-in-view"),r.removeAttribute("data-ge-hidden-in"),r.removeAttribute(ee),W(r)})}return{families:[{name:"display",prefix:"d",values:te,appliesTo:["row","column","text","element","container"],labelKey:"utility.display",choices:function(s,r){return i(r)},label:function(s){return s==="none"?e.t("utility.visibility_hidden"):s},preview:function(s,r){return s==="none"&&(s=E(r,e.view())),{display:s===null?e.bareStyle(r,"display","display"):s}}}],drawerTools:function(s,r,a){!n.drawer||!o(r,a)||e.createTool(s,e.t("tool.hide_in_view"),"ge-visibility-tool","bi bi-eye",function(){y(r,a)})},onRefresh:x,onDeinit:function(){O()},cleanMarkup:O}}Object.assign(T.locales.en,{"utility.flex_direction":"Direction","utility.flex_wrap":"Wrap","utility.justify_content":"Justify columns","utility.align_items":"Align columns","utility.align_content":"Align lines","utility.gap":"Gap","utility.row_gap":"Row gap","utility.column_gap":"Column gap","utility.flex_fill":"Fill","utility.flex_grow":"Grow","utility.flex_shrink":"Shrink"});var rt={start:"flex-start",end:"flex-end",center:"center",between:"space-between",around:"space-around",evenly:"space-evenly",baseline:"baseline",stretch:"stretch"},lt=["0","1","2","3","4","5"],ot=["0",".25rem",".5rem","1rem","1.5rem","3rem"],ce=["row","column","element","container"],ne=["column","element","container"];function we(e,t){var n=t&&t.scale||ot;function i(c){var d=c.property||c.name;return Object.assign({prefix:c.name,panel:!1,preview:function(m,E){var y={};return y[d]=m===null?e.bareStyle(E,c.name,d):c.css(m),y}},c)}function l(c){return i(Object.assign({appliesTo:ce,preview:function(d){var m={};return m[c.name]=d===null?"normal":rt[d],m}},c))}function o(c){return i(Object.assign({values:lt,appliesTo:ne,css:function(d){return n[d]}},c))}function u(c){return c}return{families:[i({name:"flex-direction",prefix:"flex",labelKey:"utility.flex_direction",values:["row","row-reverse","column","column-reverse"],appliesTo:ce,css:u}),i({name:"flex-wrap",prefix:"flex",labelKey:"utility.flex_wrap",values:["wrap","nowrap","wrap-reverse"],appliesTo:ce,css:u}),l({name:"justify-content",labelKey:"utility.justify_content",values:["start","center","end","between","around","evenly"]}),l({name:"align-items",labelKey:"utility.align_items",values:["start","center","end","baseline","stretch"]}),l({name:"align-content",labelKey:"utility.align_content",values:["start","center","end","between","around","stretch"]}),o({name:"gap",labelKey:"utility.gap"}),o({name:"row-gap",labelKey:"utility.row_gap"}),o({name:"column-gap",labelKey:"utility.column_gap"}),i({name:"flex-fill",prefix:"flex",property:"flex",labelKey:"utility.flex_fill",values:["fill"],appliesTo:ne,css:function(){return"1 1 auto"}}),i({name:"flex-grow",prefix:"flex",labelKey:"utility.flex_grow",values:["grow-0","grow-1"],appliesTo:ne,css:function(c){return c.slice(-1)}}),i({name:"flex-shrink",prefix:"flex",labelKey:"utility.flex_shrink",values:["shrink-0","shrink-1"],appliesTo:ne,css:function(c){return c.slice(-1)}})]}}Object.assign(T.locales.en,{"utility.float":"Float","utility.float_start":"Start","utility.float_end":"End","utility.float_none":"None"});var at={start:"left",end:"right",none:"none"};function Ee(e){function t(n){return n==="start"?e.t("utility.float_start"):n==="end"?e.t("utility.float_end"):e.t("utility.float_none")}return{families:[{name:"float",prefix:"float",values:["start","end","none"],appliesTo:["element"],labelKey:"utility.float",label:t,preview:function(n,i){return{float:n===null?e.bareStyle(i,"float","float"):at[n]}}}]}}Object.assign(T.locales.en,{"utility.sticky":"Sticky"});var st={top:{position:"sticky",top:"0","z-index":"1020"},bottom:{position:"sticky",bottom:"0","z-index":"1020"}};function Ce(e){return{families:[{name:"sticky",prefix:"sticky",values:["top","bottom"],appliesTo:["row","column","element","container"],labelKey:"utility.sticky",panel:!1,preview:function(t,n){return t!==null?st[t]:{position:e.bareStyle(n,"sticky","position")}}}]}}var ct=".row, .column, .ge-element, [data-ge-container]",U="ge-drawer-out",ie="data-ge-drawer-out",ut=5,pt=/^(?:inline-)?(?:flex|grid)$/;function Se(e){var t=null,n={},i=null;function l(y){if(!n[y]){n[y]=!0,t||(t=document.head.appendChild(g("style",{"data-ge-drawer-flow":""})));var f=".ge-canvas.ge-editing ["+ie+'="'+y+'"]';t.appendChild(document.createTextNode(f+" { border-top-width: "+y+`px !important; }
2
- `+f+" > .ge-tools-drawer { top: -"+y+`px; }
3
- `))}}function o(y){var f=getComputedStyle(y);return pt.test(f.display)?!(R(y,"row")&&f.flexDirection==="row"&&f.flexWrap==="wrap"):!1}function u(y,f){var x=Math.ceil(f.offsetHeight)+ut;l(x),y.setAttribute(ie,String(x))}function c(y){typeof ResizeObserver!="undefined"&&(i||(i=new ResizeObserver(function(f){f.forEach(function(x){var O=x.target.parentNode;O&&R(O,U)&&u(O,x.target)})})),i.observe(y))}function d(y){I(y,ct).forEach(function(f){var x=j(f,".ge-tools-drawer");x&&(o(f)?(Z(f,U),u(f,x),c(x)):R(f,U)&&(H(f,U),f.removeAttribute(ie),W(f),i&&i.unobserve(x)))})}function m(y){P(y,"."+U).forEach(function(f){H(f,U),f.removeAttribute(ie),W(f)})}function E(){i&&i.disconnect(),i=null,m(e.canvas),t&&t.remove(),t=null,n={}}return{families:[],onRefresh:d,onDeinit:E,cleanMarkup:m}}var L=["primary","secondary","success","danger","warning","info","light","dark"],ue=["top","end","bottom","start"],Oe=["10","25","50","75","100"];function S(e,t,n){return t.map(function(i){return e+i+(n||"")})}function _(e,t,n,i){return{classes:e,exclusive:t!==!1,notOn:n||[],onlyOn:i||null}}function h(e,t){return{name:e,labelKey:t.labelKey,type:t.type||"text",values:t.values||null,notOn:t.notOn||[]}}var B=["column"],ke=["element"],fe=[{key:"size",labelKey:"inline_style.section_size",properties:[h("width",{labelKey:"inline_style.prop_width",notOn:B}),h("height",{labelKey:"inline_style.prop_height",notOn:B}),h("min-width",{labelKey:"inline_style.prop_min_width"}),h("min-height",{labelKey:"inline_style.prop_min_height"}),h("max-width",{labelKey:"inline_style.prop_max_width"}),h("max-height",{labelKey:"inline_style.prop_max_height"})],catalog:[_(S("w-",["25","50","75","100","auto"]),!0,B),_(S("h-",["25","50","75","100","auto"]),!0,B),_(["mw-100","mh-100","vw-100","vh-100","min-vw-100","min-vh-100"],!1,B),_(["img-fluid","img-thumbnail"],!1,[],ke),_(S("object-fit-",["contain","cover","fill","scale","none"]),!0,[],ke)],parts:[]},{key:"spacing",labelKey:"inline_style.section_spacing",properties:[h("margin-top",{labelKey:"inline_style.prop_margin_top"}),h("margin-right",{labelKey:"inline_style.prop_margin_right"}),h("margin-bottom",{labelKey:"inline_style.prop_margin_bottom"}),h("margin-left",{labelKey:"inline_style.prop_margin_left"}),h("padding-top",{labelKey:"inline_style.prop_padding_top"}),h("padding-right",{labelKey:"inline_style.prop_padding_right"}),h("padding-bottom",{labelKey:"inline_style.prop_padding_bottom"}),h("padding-left",{labelKey:"inline_style.prop_padding_left"})],catalog:[],parts:["spacing"]},{key:"border",labelKey:"inline_style.section_border",properties:[h("border-width",{labelKey:"inline_style.prop_border_width"}),h("border-style",{labelKey:"inline_style.prop_border_style",type:"select",values:["none","solid","dashed","dotted","double","groove","ridge","inset","outset"]}),h("border-color",{labelKey:"inline_style.prop_border_color",type:"color"}),h("border-radius",{labelKey:"inline_style.prop_border_radius"}),h("box-shadow",{labelKey:"inline_style.prop_box_shadow",type:"shadow"})],catalog:[_(["border","border-0"].concat(S("border-",ue),S("border-",ue,"-0")),!1),_(S("border-",["1","2","3","4","5"])),_(S("border-",L.concat(["black","white"])).concat(S("border-",L,"-subtle"))),_(S("border-opacity-",Oe)),_(["rounded"].concat(S("rounded-",["0","1","2","3","4","5","circle","pill"]))),_(S("rounded-",ue),!1),_(["shadow-none","shadow-sm","shadow","shadow-lg"])],parts:[]},{key:"background",labelKey:"inline_style.section_background",properties:[h("background-color",{labelKey:"inline_style.prop_background_color",type:"color"}),h("background-image",{labelKey:"inline_style.prop_background_image",type:"url"}),h("background-size",{labelKey:"inline_style.prop_background_size"}),h("background-position",{labelKey:"inline_style.prop_background_position"}),h("background-repeat",{labelKey:"inline_style.prop_background_repeat",type:"select",values:["repeat","no-repeat","repeat-x","repeat-y","space","round"]})],catalog:[_(S("bg-",L.concat(["body","body-secondary","body-tertiary","white","black","transparent"])).concat(S("bg-",L,"-subtle"),S("text-bg-",L))),_(["bg-gradient"],!1),_(S("bg-opacity-",Oe))],parts:[]},{key:"text",labelKey:"inline_style.section_text",properties:[h("color",{labelKey:"inline_style.prop_color",type:"color"}),h("font-size",{labelKey:"inline_style.prop_font_size"}),h("text-align",{labelKey:"inline_style.prop_text_align",type:"select",values:["start","center","end","left","right","justify"]}),h("text-shadow",{labelKey:"inline_style.prop_text_shadow",type:"shadow"})],catalog:[_(S("text-",L.concat(["body","body-secondary","body-tertiary","white","black"])).concat(S("text-",L,"-emphasis"),["text-body-emphasis"])),_(S("text-opacity-",["25","50","75","100"])),_(S("fs-",["1","2","3","4","5","6"])),_(S("text-decoration-",["none","underline","line-through"]))],parts:["textalign"]},{key:"typography",labelKey:"inline_style.section_typography",properties:[h("font-family",{labelKey:"inline_style.prop_font_family"}),h("font-weight",{labelKey:"inline_style.prop_font_weight",type:"select",values:["100","200","300","400","500","600","700","800","900","normal","bold","lighter","bolder"]}),h("font-style",{labelKey:"inline_style.prop_font_style",type:"select",values:["normal","italic","oblique"]}),h("line-height",{labelKey:"inline_style.prop_line_height"}),h("letter-spacing",{labelKey:"inline_style.prop_letter_spacing"}),h("text-transform",{labelKey:"inline_style.prop_text_transform",type:"select",values:["none","uppercase","lowercase","capitalize"]}),h("text-decoration",{labelKey:"inline_style.prop_text_decoration",type:"select",values:["none","underline","line-through","overline"]})],catalog:[_(S("fw-",["lighter","light","normal","medium","semibold","bold","bolder"])),_(S("fst-",["italic","normal"])),_(S("lh-",["1","sm","base","lg"])),_(S("text-",["lowercase","uppercase","capitalize"])),_(["font-monospace"],!1),_(["text-wrap","text-nowrap"]),_(["text-break"],!1)],parts:[]},{key:"display",labelKey:"inline_style.section_display",properties:[h("display",{labelKey:"inline_style.prop_display",type:"select",values:["none","block","inline","inline-block","flex","inline-flex","grid","inline-grid"]}),h("opacity",{labelKey:"inline_style.prop_opacity"}),h("overflow",{labelKey:"inline_style.prop_overflow",type:"select",values:["visible","hidden","auto","scroll","clip"]}),h("visibility",{labelKey:"inline_style.prop_visibility",type:"select",values:["visible","hidden"]})],catalog:[_(S("opacity-",["0","25","50","75","100"])),_(S("overflow-",["auto","hidden","visible","scroll"])),_(["visible","invisible"])],parts:["display"]},{key:"flex",labelKey:"inline_style.section_flex",properties:[],catalog:[_(["vstack","hstack"],!0,["row"])],parts:["flex"]},{key:"position",labelKey:"inline_style.section_position",properties:[h("position",{labelKey:"inline_style.prop_position",type:"select",values:["static","relative","absolute","fixed","sticky"]}),h("top",{labelKey:"inline_style.prop_top",notOn:B}),h("right",{labelKey:"inline_style.prop_right",notOn:B}),h("bottom",{labelKey:"inline_style.prop_bottom",notOn:B}),h("left",{labelKey:"inline_style.prop_left",notOn:B}),h("z-index",{labelKey:"inline_style.prop_z_index"})],catalog:[_(S("position-",["static","relative","absolute","fixed","sticky"])),_(S("top-",["0","50","100"])),_(S("bottom-",["0","50","100"])),_(S("start-",["0","50","100"])),_(S("end-",["0","50","100"])),_(["translate-middle","translate-middle-x","translate-middle-y"]),_(["z-n1","z-0","z-1","z-2","z-3"]),_(["fixed-top","fixed-bottom"])],parts:["float","sticky"]},{key:"custom",labelKey:"inline_style.section_custom",properties:[],catalog:[],parts:[],custom:!0}];function Ke(e){return fe.filter(function(t){return t.key===e})[0]||null}function le(e,t){return e.onlyOn&&e.onlyOn.indexOf(t)===-1?!1:e.notOn.indexOf(t)===-1}var re="(?:(?:sm|md|lg|xl|xxl)-)?",dt="(?:[0-5]|auto)",ft="(?:"+L.join("|")+"|black|white)",mt="(?:"+L.join("|")+"|body|body-secondary|body-tertiary|white|black|transparent)",yt="(?:"+L.join("|")+"|body|body-secondary|body-tertiary|white|black|muted|black-50|white-50)",pe="border(?:-(?:top|end|bottom|start))?(?:-0)?",Ae="(?:"+L.join("|")+")-subtle",gt="(?:"+L.join("|")+"|body)-emphasis",Te="text-bg-(?:"+L.join("|")+")",de="sticky-"+re;function z(e,t){var n={top:"[ty]?",bottom:"[by]?",left:"[sx]?",right:"[ex]?"}[t];return new RegExp("^"+e+n+"-"+re+dt+"$")}var ht={width:/^(?:w-(?:25|50|75|100|auto)|vw-100)$/,height:/^(?:h-(?:25|50|75|100|auto)|vh-100)$/,"max-width":/^mw-100$/,"max-height":/^mh-100$/,"min-width":/^min-vw-100$/,"min-height":/^min-vh-100$/,"margin-top":z("m","top"),"margin-right":z("m","right"),"margin-bottom":z("m","bottom"),"margin-left":z("m","left"),"padding-top":z("p","top"),"padding-right":z("p","right"),"padding-bottom":z("p","bottom"),"padding-left":z("p","left"),"border-width":new RegExp("^(?:"+pe+"|border-[1-5])$"),"border-style":new RegExp("^"+pe+"$"),"border-color":new RegExp("^(?:"+pe+"|border-"+ft+"|border-"+Ae+")$"),"border-radius":/^rounded(?:-(?:[0-5]|circle|pill|top|end|bottom|start))?$/,"box-shadow":/^shadow(?:-(?:none|sm|lg))?$/,"background-color":new RegExp("^(?:bg-"+mt+"|bg-"+Ae+"|"+Te+")$"),"background-image":/^bg-gradient$/,color:new RegExp("^(?:text-"+yt+"|text-"+gt+"|"+Te+")$"),"font-size":/^fs-[1-6]$/,"text-align":new RegExp("^text-"+re+"(?:start|center|end)$"),"text-decoration":/^text-decoration-(?:none|underline|line-through)$/,"font-family":/^font-monospace$/,"font-weight":/^fw-(?:lighter|light|normal|medium|semibold|bold|bolder)$/,"font-style":/^fst-(?:italic|normal)$/,"line-height":/^lh-(?:1|sm|base|lg)$/,"text-transform":/^text-(?:lowercase|uppercase|capitalize)$/,display:new RegExp("^(?:d-"+re+"(?:none|inline|inline-block|block|grid|inline-grid|table|table-row|table-cell|flex|inline-flex)|vstack|hstack)$"),opacity:/^opacity-(?:0|25|50|75|100)$/,overflow:/^overflow-(?:auto|hidden|visible|scroll)$/,visibility:/^(?:visible|invisible)$/,position:new RegExp("^(?:position-(?:static|relative|absolute|fixed|sticky)|fixed-(?:top|bottom)|"+de+"(?:top|bottom))$"),top:new RegExp("^(?:top-(?:0|50|100)|fixed-top|"+de+"top)$"),bottom:new RegExp("^(?:bottom-(?:0|50|100)|fixed-bottom|"+de+"bottom)$"),left:/^start-(?:0|50|100)$/,right:/^end-(?:0|50|100)$/,"z-index":/^z-(?:n1|[0-3])$/};function Le(e,t){var n=ht[e];return n&&t.filter(function(i){return n.test(i)})[0]||null}function vt(e,t){var n={};return Object.keys(t||{}).forEach(function(i){Ke(i)||e.warn('inline_style.sections: there is no "'+i+'" section: ignored')}),fe.forEach(function(i){var l=t&&t[i.key]!==void 0?t[i.key]:!0;if(l!==!1){var o=i.properties.map(function(d){return d.name}),u=i.properties,c=!0;l&&typeof l=="object"&&(Array.isArray(l.properties)&&(l.properties.forEach(function(d){o.indexOf(d)===-1&&e.warn("inline_style.sections."+i.key+': "'+d+'" is not one of its properties: ignored')}),u=l.properties.filter(function(d){return o.indexOf(d)!==-1}).map(function(d){return i.properties[o.indexOf(d)]})),l.catalog===!1&&(c=!1)),n[i.key]={section:i,properties:u,catalog:c}}}),n}function Pe(e){var t=e.settings.inline_style||{};return{sections:vt(e,t.sections),spacing:t.spacing,visibility:t.visibility}}var je=new WeakMap,bt=0;function _t(e){return(e.getAttribute("class")||"").split(/\s+/).filter(Boolean)}function ze(e,t,n,i){var l=String(i==null?"":i).trim(),o=/\s*!\s*important\s*$/i.exec(l),u;return o&&(l=l.slice(0,o.index).trim(),u="important"),e.setHostStyle(t,n,l,u)}function Ne(e,t,n){$(e,"is-invalid",!t),t?e.removeAttribute("title"):e.setAttribute("title",n.t("inline_style.invalid"))}function me(e,t){R(e,"is-invalid")||(e.value=t)}function X(e){return g("input",{type:"text",class:"form-control form-control-sm "+(e||"")})}var xt=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i;function Re(e){var t=xt.exec(e.trim());if(!t)return null;var n=t[1];return n.length===3&&(n=n.split("").map(function(i){return i+i}).join("")),"#"+n.toLowerCase()}function Me(e){var t=g("div",{class:"input-group input-group-sm ge-inline-style-color"}),n=t.appendChild(g("input",{type:"color",class:"form-control form-control-color"})),i=t.appendChild(X());return n.addEventListener("input",function(){H(i,"is-invalid"),i.value=n.value,e(n.value,i)}),i.addEventListener("change",function(){var l=Re(i.value);l&&(n.value=l),e(i.value,i)}),{element:t,set:function(l){me(i,l);var o=Re(l);o&&(n.value=o)}}}var wt=/^url\(\s*(["']?)(.*)\1\s*\)$/i;function Et(e){var t=wt.exec(e.trim());return t?t[1]?t[2].replace(/\\(["\\])/g,"$1"):t[2]:e}function Ct(e){return e=e.trim(),e===""||/^(?:none|inherit|initial|unset|revert)$/i.test(e)||/^[a-z-]+\(/i.test(e)?e:'url("'+e.replace(/(["\\])/g,"\\$1")+'")'}function St(e){for(var t=[],n=0,i="",l=0;l<e.length;l++){var o=e.charAt(l);o==="("&&n++,o===")"&&n--,n===0&&(o===" "||o===",")?(i&&t.push(i),o===","&&t.push(","),i=""):i+=o}return i&&t.push(i),t}var Ot=/^-?(?:\d*\.)?\d+(?:[a-z%]+)?$/i,$e=[{name:"x",labelKey:"inline_style.shadow_x"},{name:"y",labelKey:"inline_style.shadow_y"},{name:"blur",labelKey:"inline_style.shadow_blur"},{name:"spread",labelKey:"inline_style.shadow_spread"}];function Be(e,t){if(e=e.trim(),e==="")return{inset:!1,lengths:[],color:""};if(/var\(/i.test(e))return null;var n=St(e);if(n.indexOf(",")!==-1)return null;var i=!1,l=[],o=[];return n.forEach(function(u){t&&u.toLowerCase()==="inset"?i=!0:Ot.test(u)?l.push(u):o.push(u)}),o.length>1||l.length<2||l.length>(t?4:3)||o.length&&/^(?:none|inherit|initial|unset|revert)$/i.test(o[0])?null:{inset:i,lengths:l,color:o[0]||""}}function kt(e,t){for(var n=e.lengths.slice(),i=n.length-1;i>=0;i--)n[i]===""&&n.slice(i+1).some(Boolean)&&(n[i]="0");if(n=n.filter(Boolean),!n.length&&!e.color&&!e.inset)return"";for(;n.length<2;)n.push("0");return(t&&e.inset?"inset ":"")+n.join(" ")+(e.color?" "+e.color:"")}function At(e,t,n,i){var l=n==="box-shadow",o=g("div",{class:"ge-inline-style-shadow"}),u=!1;function c(f,x){var O=ze(e,t,n,f);return Ne(x,O,e),O&&i(),O}function d(f){o.innerHTML="";var x=o.appendChild(g("div",{class:"ge-inline-style-shadow-builder"})),O=l?$e:$e.slice(0,3),s=O.map(function(C,k){var K=x.appendChild(g("label",{class:"ge-inline-style-shadow-part"}));K.appendChild(g("span",{class:"ge-inline-style-shadow-label"},e.t(C.labelKey)));var A=K.appendChild(X("ge-inline-style-shadow-"+C.name));return A.value=f.lengths[k]||"",A}),r=x.appendChild(g("label",{class:"ge-inline-style-shadow-part ge-inline-style-shadow-color"}));r.appendChild(g("span",{class:"ge-inline-style-shadow-label"},e.t("inline_style.shadow_color")));var a=Me(function(){v()});r.appendChild(a.element),a.set(f.color);var p=null;if(l){var w=x.appendChild(g("label",{class:"form-check ge-inline-style-shadow-inset"}));p=w.appendChild(g("input",{type:"checkbox",class:"form-check-input"})),w.appendChild(g("span",{class:"form-check-label"},e.t("inline_style.shadow_inset"))),p.checked=f.inset,p.addEventListener("change",function(){v()})}s.forEach(function(C){C.addEventListener("change",function(){v()})});var b=o.appendChild(g("a",{href:"#",class:"ge-inline-style-shadow-mode"},e.t("inline_style.shadow_text_mode")));b.addEventListener("click",function(C){C.preventDefault(),u=!0,y()});function v(){var C=kt({inset:p?p.checked:!1,lengths:s.map(function(k){return k.value.trim()}),color:N(a.element,'input[type="text"]').value.trim()},l);c(C,s[0])}}function m(f){o.innerHTML="";var x=o.appendChild(X("ge-inline-style-shadow-text"));if(x.value=f,x.addEventListener("change",function(){if(x.value.trim()===""){c("",x)&&(u=!1,y());return}c(x.value,x)}),Be(f,l)){var O=o.appendChild(g("a",{href:"#",class:"ge-inline-style-shadow-mode"},e.t("inline_style.shadow_builder_mode")));O.addEventListener("click",function(s){s.preventDefault(),u=!1,y()})}}var E=null;function y(){if(!o.querySelector(".is-invalid")){var f=e.hostStyle(t,n).value,x=Be(f,l);f===E&&o.firstChild&&u===!!o.querySelector(".ge-inline-style-shadow-text")||(E=f,u||!x?(u=!!f||u,m(f)):d(x))}}return{element:o,render:y,value:function(){return e.hostStyle(t,n).value}}}function He(e,t,n,i){var l=g("div",{class:"ge-inline-style-field","data-ge-inline-style-property":n.name}),o=l.appendChild(g("label",{class:"ge-inline-style-label"},e.t(n.labelKey))),u;function c(){return e.hostStyle(t,n.name).value}function d(s,r){var a=ze(e,t,n.name,s);Ne(r,a,e),a&&i()}if(n.type==="select"){var m=l.appendChild(g("select",{class:"form-select form-select-sm"}));m.addEventListener("change",function(){d(m.value,m)}),u=function(){var s=c(),r=n.values.slice();s&&r.indexOf(s)===-1&&r.push(s),m.innerHTML="",m.appendChild(g("option",{value:""},"")),r.forEach(function(a){m.appendChild(g("option",{value:a},a))}),m.value=s}}else if(n.type==="color"){var E=Me(function(s,r){d(s,r)});l.appendChild(E.element),u=function(){E.set(c())}}else if(n.type==="url"){var y=l.appendChild(X());y.addEventListener("change",function(){d(Ct(y.value),y)}),u=function(){me(y,Et(c()))}}else if(n.type==="shadow"){var f=At(e,t,n.name,i);l.appendChild(f.element),u=f.render}else{var x=l.appendChild(X());x.addEventListener("change",function(){d(x.value,x)}),u=function(){me(x,c())}}var O=l.querySelector("input, select");return O&&(O.id="ge-inline-style-field-"+ ++bt,o.setAttribute("for",O.id)),l.appendChild(g("small",{class:"ge-inline-style-note ge-inline-style-overridden"})),je.set(l,function(){u();var s=c()?Le(n.name,_t(t)):null,r=j(l,".ge-inline-style-overridden");r.textContent=s?e.t("inline_style.overridden",{class:s}):"",F(r,!!s)}),ye(l),l}function ye(e){var t=je.get(e);t&&t()}function De(e){return(e.getAttribute("class")||"").split(/\s+/).filter(Boolean)}function Tt(e,t,n,i){var l=e.detailsOf(t),o=l?N(l,".ge-classes"):null;if(o){var u=De(t).indexOf(i)!==-1,c=o.value.split(/\s+/).filter(Boolean).filter(function(d){return d===i?!1:!(n.exclusive&&!u&&n.classes.indexOf(d)!==-1)});u||c.push(i),o.value=c.join(" "),o.dispatchEvent(new Event("change",{bubbles:!0}))}}function Ie(e,t,n,i){var l=i.filter(function(u){return le(u,n)});if(!l.length)return null;var o=g("div",{class:"ge-inline-style-catalog"});return o.appendChild(g("span",{class:"ge-inline-style-label"},e.t("inline_style.catalog"))),l.forEach(function(u){var c=o.appendChild(g("div",{class:"ge-inline-style-chips"}));u.classes.forEach(function(d){var m=c.appendChild(g("button",{type:"button",class:"btn btn-sm btn-outline-secondary ge-inline-style-chip","data-ge-class":d,"aria-pressed":"false"},d));m.addEventListener("click",function(){Tt(e,t,u,d)})})}),ge(o,t),o}function ge(e,t){var n=De(t);P(e,".ge-inline-style-chip").forEach(function(i){var l=n.indexOf(i.getAttribute("data-ge-class"))!==-1;$(i,"active",l),i.setAttribute("aria-pressed",l?"true":"false")})}function Kt(e){var t=document.createElement("div").style,n=[];t.setProperty(e,"initial");for(var i=0;i<t.length;i++)n.push(t[i]);return n.length?n:[e]}function Fe(e){var t=document.createElement("div").style;return t.cssText=e,t}function Ue(e,t,n,i){var l={};n.forEach(function(m){Kt(m).forEach(function(E){l[E]=!0})});var o=g("div",{class:"ge-inline-style-custom"}),u=o.appendChild(g("textarea",{class:"form-control form-control-sm font-monospace ge-inline-style-custom-css",rows:"4",spellcheck:"false","aria-label":e.t("inline_style.section_custom")}));function c(){for(var m=Fe(e.hostStyle(t)),E=document.createElement("div").style,y=0;y<m.length;y++){var f=m[y];l[f]||E.setProperty(f,m.getPropertyValue(f),m.getPropertyPriority(f))}return E}u.addEventListener("change",function(){var m=c(),E=Fe(u.value),y;for(y=0;y<m.length;y++)E.getPropertyValue(m[y])===""&&e.setHostStyle(t,m[y],"");for(y=0;y<E.length;y++)e.setHostStyle(t,E[y],E.getPropertyValue(E[y]),E.getPropertyPriority(E[y]));d(),i()});function d(){document.activeElement!==u&&(u.value=c().cssText.replace(/; /g,`;
4
- `))}return d(),{element:o,render:d}}function Lt(e,t){return t==="row"||t==="column"||t==="element"||t==="section"||M(e,"[data-ge-container]")?!0:!!j(e,".ge-tools-drawer.ge-pane-drawer")}function Pt(e,t,n){return n==="plain"&&(n="text"),e.appliesTo.indexOf(n)!==-1?!0:e.appliesTo.indexOf("container")!==-1&&M(t,"[data-ge-container]")}function Rt(e,t,n,i){if(t.panel)return t.panel(n,i);var l=t.families.filter(function(u){return Pt(u,n,i)}).map(function(u){return e.utilityField(n,u.name)});if(l.length<2)return l[0]||null;var o=g("div",{class:"ge-inline-style-part-fields"});return l.forEach(function(u){o.appendChild(u)}),o}function Ge(e,t,n,i){var l=Lt(t,n),o=g("div",{class:"accordion ge-inline-style"}),u=[],c=[],d=[],m=null,E=null,y=function(){s()};function f(r,a){var p=o.appendChild(g("div",{class:"accordion-item","data-ge-inline-style-section":r})),w=p.appendChild(g("h2",{class:"accordion-header"})),b=w.appendChild(g("button",{type:"button",class:"accordion-button collapsed","aria-expanded":"false"},e.t(a))),v=p.appendChild(g("div",{class:"accordion-collapse collapse"})),C=v.appendChild(g("div",{class:"accordion-body"}));return b.addEventListener("click",function(){var k=!R(v,"show");i.state.open=k?r:null,i.opened(i.state.open)}),{entry:p,body:C}}function x(r,a){$(N(r,".accordion-collapse"),"show",a);var p=N(r,".accordion-button");$(p,"collapsed",!a),p.setAttribute("aria-expanded",a?"true":"false")}if(Object.keys(i.sections).forEach(function(r){var a=i.sections[r],p=a.section;if(p.custom){l&&(E=f(r,p.labelKey));return}var w=p.parts.map(function(A){return i.parts[A]?Rt(e,i.parts[A],t,n):null}).filter(Boolean),b=l?a.properties.filter(function(A){return le(A,n)}):[],v=l&&a.catalog?Ie(e,t,n,p.catalog):null;if(!(!w.length&&!b.length&&!v)){var C=f(r,p.labelKey).body;if(w.forEach(function(A){C.appendChild(Z(A,"ge-inline-style-part"))}),b.length){var k=C.appendChild(g("small",{class:"ge-inline-style-note ge-inline-style-all-sizes"},e.t("inline_style.all_sizes")));d.push(k);var K=C.appendChild(g("div",{class:"ge-inline-style-fields"}));b.forEach(function(A){var G=He(e,t,A,y);u.push(G),K.appendChild(G)})}v&&(c.push(v),C.appendChild(v))}}),E&&(m=Ue(e,t,u.map(function(r){return r.getAttribute("data-ge-inline-style-property")}),y),E.body.appendChild(m.element),o.appendChild(E.entry)),!o.children.length)return null;function O(r){P(o,".accordion-item").forEach(function(a){x(a,a.getAttribute("data-ge-inline-style-section")===r)})}O(i.state.open);function s(){u.forEach(ye),c.forEach(function(r){ge(r,t)}),m&&m.render(),d.forEach(function(r){F(r,e.view()!=="all")})}return s(),{element:o,render:s,open:O}}Object.assign(T.locales.en,{"inline_style.section_title":"Style","inline_style.dialog_title":"Style: {kind}","inline_style.section_size":"Size","inline_style.section_spacing":"Spacing","inline_style.section_border":"Border","inline_style.section_background":"Background","inline_style.section_text":"Text","inline_style.section_typography":"Typography","inline_style.section_display":"Display","inline_style.section_flex":"Flex","inline_style.section_position":"Position","inline_style.section_custom":"Custom css","inline_style.all_sizes":"Applies to every size","inline_style.overridden":"The class {class} takes priority over this value","inline_style.invalid":"Not a value this property takes","inline_style.catalog":"Bootstrap classes","inline_style.shadow_x":"X","inline_style.shadow_y":"Y","inline_style.shadow_blur":"Blur","inline_style.shadow_spread":"Spread","inline_style.shadow_color":"Color","inline_style.shadow_inset":"Inset","inline_style.shadow_text_mode":"Edit as text","inline_style.shadow_builder_mode":"Edit with the builder","inline_style.prop_width":"Width","inline_style.prop_height":"Height","inline_style.prop_min_width":"Min width","inline_style.prop_min_height":"Min height","inline_style.prop_max_width":"Max width","inline_style.prop_max_height":"Max height","inline_style.prop_margin_top":"Margin top","inline_style.prop_margin_right":"Margin right","inline_style.prop_margin_bottom":"Margin bottom","inline_style.prop_margin_left":"Margin left","inline_style.prop_padding_top":"Padding top","inline_style.prop_padding_right":"Padding right","inline_style.prop_padding_bottom":"Padding bottom","inline_style.prop_padding_left":"Padding left","inline_style.prop_border_width":"Border width","inline_style.prop_border_style":"Border style","inline_style.prop_border_color":"Border color","inline_style.prop_border_radius":"Border radius","inline_style.prop_box_shadow":"Shadow","inline_style.prop_background_color":"Background color","inline_style.prop_background_image":"Background image","inline_style.prop_background_size":"Background size","inline_style.prop_background_position":"Background position","inline_style.prop_background_repeat":"Background repeat","inline_style.prop_color":"Color","inline_style.prop_font_size":"Font size","inline_style.prop_text_align":"Text align","inline_style.prop_text_shadow":"Text shadow","inline_style.prop_font_family":"Font family","inline_style.prop_font_weight":"Font weight","inline_style.prop_font_style":"Font style","inline_style.prop_line_height":"Line height","inline_style.prop_letter_spacing":"Letter spacing","inline_style.prop_text_transform":"Text transform","inline_style.prop_text_decoration":"Text decoration","inline_style.prop_display":"Display","inline_style.prop_opacity":"Opacity","inline_style.prop_overflow":"Overflow","inline_style.prop_visibility":"Visibility","inline_style.prop_position":"Position","inline_style.prop_top":"Top","inline_style.prop_right":"Right","inline_style.prop_bottom":"Bottom","inline_style.prop_left":"Left","inline_style.prop_z_index":"Z-index"});var Ve=["spacing","textalign","display","flex","float","sticky","drawerflow"];T.utilities["inline-style"]=function(e){var t=Pe(e),n={spacing:be(e,t.spacing),textalign:_e(e),display:xe(e,t.visibility),flex:we(e,t.spacing),float:Ee(e),sticky:Ce(e),drawerflow:Se(e)},i=[],l={sections:t.sections,parts:n,state:{open:null},opened:function(c){i.forEach(function(d){d.accordion.open(c)})}};function o(c){return function(){var d=arguments;Ve.forEach(function(m){n[m][c]&&n[m][c].apply(null,d)})}}var u=o("onRefresh");return{families:Ve.reduce(function(c,d){return c.concat(n[d].families.map(function(m){return Object.assign({},m,{panel:!1})}))},[]),panelSection:function(c,d){var m=Ge(e,c,d,l);return m?(i.push({node:c,accordion:m}),{labelKey:"inline_style.section_title",titleKey:"inline_style.dialog_title",body:m.element}):null},preview:function(c,d,m){return n.spacing.preview(c,d,m)},onRefresh:function(c){u(c),i=i.filter(function(d){return d.accordion.element.isConnected}),i.forEach(function(d){(d.node===c||c.contains(d.node))&&d.accordion.render()})},drawerTools:o("drawerTools"),onDeinit:function(){o("onDeinit")(),i=[]},cleanMarkup:o("cleanMarkup")}};})();
1
+ (()=>{var T=window.GridEditor;if(!T||typeof T.get!="function")throw new Error("grid-editor: load grideditor.js (or grideditor.bundle.min.js) before its plugins, its locales and grideditor.jquery.js");function P(e,t){return e?Array.prototype.slice.call(e.querySelectorAll(t)):[]}function M(e,t){return e?e.querySelector(t):null}function I(e,t){if(!e)return[];var n=P(e,t);return e.nodeType===1&&e.matches(t)&&n.unshift(e),n}function J(e,t){return e?Array.prototype.filter.call(e.children,function(n){return!t||n.matches(t)}):[]}function j(e,t){return J(e,t)[0]||null}function D(e,t){return!!e&&e.nodeType===1&&e.matches(t)}function y(e,t,n){var i=document.createElement(e);return Object.keys(t||{}).forEach(function(a){var l=t[a];l!=null&&l!==!1&&i.setAttribute(a,l)}),n!=null&&(i.textContent=n),i}function Z(e,t){return oe(t).forEach(function(n){e.classList.add(n)}),e}function z(e,t){return oe(t).forEach(function(n){e.classList.remove(n)}),e}function B(e,t,n){return oe(t).forEach(function(i){n===void 0?e.classList.toggle(i):e.classList.toggle(i,!!n)}),e}function R(e,t){return!!e&&e.nodeType===1&&e.classList.contains(t)}function oe(e){return String(e||"").split(/\s+/).filter(Boolean)}function W(e){return e.getAttribute("class")||e.removeAttribute("class"),e}function ae(e,t){return Object.keys(t).forEach(function(n){var i=t[n];typeof i=="number"&&!Xe[n]&&(i=i+"px"),e.style.setProperty(n,i==null?"":String(i))}),e}var Xe={opacity:!0,"z-index":!0,"flex-grow":!0,"flex-shrink":!0,order:!0},V={};function Ye(e){var t=e.nodeName;if(!V[t]){var n=document.body.appendChild(document.createElement(t));V[t]=getComputedStyle(n).display,n.remove(),V[t]==="none"&&(V[t]="block")}return V[t]}function Je(e){return e.style.removeProperty("display"),getComputedStyle(e).display==="none"&&(e.style.display=Ye(e)),e}function Ze(e){return e.style.display="none",e}function F(e,t){return t===void 0&&(t=!Qe(e)),t?Je(e):Ze(e)}function Qe(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}Object.assign(T.locales.en,{"utility.padding":"Padding","utility.margin":"Margin","utility.side_all":"All sides","utility.side_x":"Left and right","utility.side_y":"Top and bottom","utility.side_t":"Top","utility.side_b":"Bottom","utility.side_s":"Start","utility.side_e":"End","utility.spacing_gutter":"A column's side padding is its gutter: changing it changes the gutter"});var q=["0","1","2","3","4","5"],et=["0",".25rem",".5rem","1rem","1.5rem","3rem"],Q=["","x","y","t","e","b","s"],tt={"":["top","right","bottom","left"],x:["left","right"],y:["top","bottom"],t:["top"],e:["right"],b:["bottom"],s:["left"]},he=["","sm","md","lg","xl","xxl"],se={p:"padding",m:"margin"};function ve(e){return new RegExp("^"+e+"[xytbse]?-(?:(?:sm|md|lg|xl|xxl)-)?(?:[0-5]|auto)$")}function be(e,t){var n=Object.assign({values:q,scale:et},t),i={p:ve("p"),m:ve("m")};function a(r,o){return o==="row"||o==="column"||o==="element"||D(r,"[data-ge-container]")}function l(r){return(r.getAttribute("class")||"").split(/\s+/)}function p(r,o){return l(r).some(function(s){return i[o].test(s)})}function u(r,o,s){for(var b=l(r),x=o.charAt(0)==="m"?q.concat(["auto"]):q,_=s;_>=0;_--)for(var C=0;C<x.length;C++){var O=o+(he[_]?"-"+he[_]:"")+"-"+x[C];if(b.indexOf(O)!==-1)return{tier:_,value:x[C]}}return null}function c(r,o){var s=r.getAttribute("class"),b,x={};return r.setAttribute("class",l(r).filter(function(_){return!i[o].test(_)}).join(" ")),b=getComputedStyle(r),["top","right","bottom","left"].forEach(function(_){x[_]=b.getPropertyValue(se[o]+"-"+_)}),s===null?r.removeAttribute("class"):r.setAttribute("class",s),x}function m(r,o,s){var b=e.breakpoints.indexOf(s),x={},_={},C=null;return Q.forEach(function(O,K){var A=u(r,o+O,b);A&&tt[O].forEach(function(G){var Y=x[G];(!Y||A.tier>Y.tier||A.tier===Y.tier&&K>Y.order)&&(x[G]={tier:A.tier,order:K,value:A.value})})}),["top","right","bottom","left"].forEach(function(O){var K=x[O];K?_[se[o]+"-"+O]=K.value==="auto"?"auto":n.scale[K.value]:(C=C||c(r,o),_[se[o]+"-"+O]=C[O])}),_}function v(r,o){var s=l(r).filter(function(x){return i[o].test(x)}),b=Q.filter(function(x){return s.some(function(_){return _.indexOf(o+x+"-")===0})});return b.length?b[0]:""}function g(r){switch(r){case"x":return e.t("utility.side_x");case"y":return e.t("utility.side_y");case"t":return e.t("utility.side_t");case"b":return e.t("utility.side_b");case"s":return e.t("utility.side_s");case"e":return e.t("utility.side_e");default:return e.t("utility.side_all")}}function f(r,o,s){var b=y("div",{class:"ge-spacing-group","data-ge-spacing":o}),x=y("select",{class:"ge-spacing-side form-select form-select-sm"});b.appendChild(y("span",{class:"ge-utility-label"},s)),Q.forEach(function(C){x.appendChild(y("option",{value:C},g(C)))});var _=e.utilityField(r,o+v(r,o));return x.value=_.getAttribute("data-ge-family").slice(1),x.addEventListener("change",function(){var C=e.utilityField(r,o+this.value);_.replaceWith(C),_=C}),b.appendChild(x),b.appendChild(_),b}var E=".row, .column, .ge-element, [data-ge-container]";function k(r){I(r,E).forEach(function(o){var s=j(o,".ge-tools-drawer");if(!(!s||!a(o,e.kindOf(o)))){if(p(o,"p")){var b=getComputedStyle(o);ae(s,{"margin-top":"-"+b.paddingTop,"margin-left":"-"+b.paddingLeft,"margin-right":"-"+b.paddingRight,width:"calc(100% + "+b.paddingLeft+" + "+b.paddingRight+")"})}else ae(s,{"margin-top":"","margin-left":"","margin-right":"",width:""});if(R(o,"column")){var x=l(o).some(function(_){return/^p[xse]?-/.test(_)&&i.p.test(_)});P(s,".ge-spacing-gutter").forEach(function(_){F(_,x)})}}})}function d(r,o){var s=r==="m"?q.concat(["auto"]):q,b=n.values.concat(r==="m"?["auto"]:[]);return Q.map(function(x){return{name:r+x,prefix:r+x,values:s,appliesTo:["row","column","text","element","container"],labelKey:o,panel:!1,choices:function(){return s.filter(function(_){return b.indexOf(_)!==-1})}}})}return{families:d("p","utility.padding").concat(d("m","utility.margin")),panel:function(r,o){if(!a(r,o))return null;var s=y("div",{class:"ge-spacing"});return s.appendChild(f(r,"p",e.t("utility.padding"))),s.appendChild(f(r,"m",e.t("utility.margin"))),o==="column"&&s.appendChild(y("small",{class:"ge-spacing-gutter"},e.t("utility.spacing_gutter"))),s},preview:function(r,o,s){if(!a(r,o))return{};var b={};return["p","m"].forEach(function(x){p(r,x)&&Object.assign(b,m(r,x,s))}),b},onRefresh:k}}Object.assign(T.locales.en,{"utility.text_align":"Text alignment","utility.text_start":"Start","utility.text_center":"Center","utility.text_end":"End"});var nt={start:"left",center:"center",end:"right"};function _e(e){function t(n){return n==="start"?e.t("utility.text_start"):n==="center"?e.t("utility.text_center"):e.t("utility.text_end")}return{families:[{name:"text-align",prefix:"text",values:["start","center","end"],appliesTo:["row","column","text","element","container"],labelKey:"utility.text_align",label:t,preview:function(n,i){return{"text-align":n===null?e.bareStyle(i,"text-align","text-align"):nt[n]}}}]}}Object.assign(T.locales.en,{"utility.display":"Display","utility.visibility_hidden":"Hidden","tool.hide_in_view":"Hide in this view","tool.show_in_view":"Show in this view","badge.hidden_in":"Hidden at {breakpoints}"});var te=["none","inline","inline-block","block","grid","inline-grid","flex","inline-flex"],it=new RegExp("(?:^|\\s)d-(?:(?:sm|md|lg|xl|xxl)-)?(?:"+te.join("|")+")(?:\\s|$)"),rt=/^d-(?:(?:sm|md|lg|xl|xxl)-)?none$/,lt=".row, .column, .ge-content, .ge-element, [data-ge-container]",ee="data-ge-display";function xe(e,t){var n=Object.assign({drawer:!0},t);function i(d){return d==="row"?["none","flex"]:d==="text"||d==="plain"?["none","block"]:te}function a(d){return d==="row"?"flex":"block"}function l(d,r){return r==="row"||r==="column"||r==="element"||r==="text"||r==="plain"||D(d,"[data-ge-container]")}function p(d,r){return e.getUtility(d,"display",r)==="none"}function u(d){return e.breakpoints.filter(function(r){return p(d,r)})}function c(d){return e.view()==="all"?u(d).length===e.breakpoints.length:p(d,e.view())}function m(d){var r=e.breakpoints.indexOf(e.view());return r>0&&p(d,e.breakpoints[r-1])}function v(d,r){for(var o=e.breakpoints.indexOf(r)-1;o>=0;o--){var s=e.getUtility(d,"display",e.breakpoints[o]);if(s===null)return null;if(s!=="none")return s}return null}function g(d,r){var o=!c(d),s;e.view()==="all"?s=o?"none":null:o?s=m(d)?null:"none":s=m(d)?v(d,e.view())||a(r):null,e.setUtility(d,"display",s,{source:"tool"})}function f(d){var r=d.getAttribute("class");d.setAttribute("class",r.split(/\s+/).filter(function(s){return!rt.test(s)}).join(" "));var o=getComputedStyle(d).display;return d.setAttribute("class",r),o!=="none"&&te.indexOf(o)!==-1?o:"block"}function E(d){I(d,lt).forEach(function(r){var o=e.kindOf(r),s=l(r,o)&&it.test(r.getAttribute("class")||""),b=s?u(r):[],x=s&&c(r),_=s&&e.view()==="all"&&b.length>0&&!x;r.removeAttribute(ee),s&&getComputedStyle(r).display==="none"&&r.setAttribute(ee,f(r)),B(r,"ge-hidden-in-view",x),_?r.setAttribute("data-ge-hidden-in",e.t("badge.hidden_in",{breakpoints:b.join(", ")})):r.removeAttribute("data-ge-hidden-in"),J(r,".ge-tools-drawer").forEach(function(C){J(C,".ge-visibility-tool").forEach(function(O){O.setAttribute("title",x?e.t("tool.show_in_view"):e.t("tool.hide_in_view")),P(O,"i").forEach(function(K){K.setAttribute("class",x?"bi bi-eye-slash":"bi bi-eye")})})})})}function k(d){P(d||e.canvas,".ge-hidden-in-view, [data-ge-hidden-in], ["+ee+"]").forEach(function(r){z(r,"ge-hidden-in-view"),r.removeAttribute("data-ge-hidden-in"),r.removeAttribute(ee),W(r)})}return{families:[{name:"display",prefix:"d",values:te,appliesTo:["row","column","text","element","container"],labelKey:"utility.display",choices:function(d,r){return i(r)},label:function(d){return d==="none"?e.t("utility.visibility_hidden"):d},preview:function(d,r){return d==="none"&&(d=v(r,e.view())),{display:d===null?e.bareStyle(r,"display","display"):d}}}],drawerTools:function(d,r,o){!n.drawer||!l(r,o)||e.createTool(d,e.t("tool.hide_in_view"),"ge-visibility-tool","bi bi-eye",function(){g(r,o)})},onRefresh:E,onDeinit:function(){k()},cleanMarkup:k}}Object.assign(T.locales.en,{"utility.flex_direction":"Direction","utility.flex_wrap":"Wrap","utility.justify_content":"Justify columns","utility.align_items":"Align columns","utility.align_content":"Align lines","utility.gap":"Gap","utility.row_gap":"Row gap","utility.column_gap":"Column gap","utility.flex_fill":"Fill","utility.flex_grow":"Grow","utility.flex_shrink":"Shrink"});var ot={start:"flex-start",end:"flex-end",center:"center",between:"space-between",around:"space-around",evenly:"space-evenly",baseline:"baseline",stretch:"stretch"},at=["0","1","2","3","4","5"],st=["0",".25rem",".5rem","1rem","1.5rem","3rem"],ue=["row","column","element","container"],ne=["column","element","container"];function we(e,t){var n=t&&t.scale||st;function i(u){var c=u.property||u.name;return Object.assign({prefix:u.name,panel:!1,preview:function(m,v){var g={};return g[c]=m===null?e.bareStyle(v,u.name,c):u.css(m),g}},u)}function a(u){return i(Object.assign({appliesTo:ue,preview:function(c){var m={};return m[u.name]=c===null?"normal":ot[c],m}},u))}function l(u){return i(Object.assign({values:at,appliesTo:ne,css:function(c){return n[c]}},u))}function p(u){return u}return{families:[i({name:"flex-direction",prefix:"flex",labelKey:"utility.flex_direction",values:["row","row-reverse","column","column-reverse"],appliesTo:ue,css:p}),i({name:"flex-wrap",prefix:"flex",labelKey:"utility.flex_wrap",values:["wrap","nowrap","wrap-reverse"],appliesTo:ue,css:p}),a({name:"justify-content",labelKey:"utility.justify_content",values:["start","center","end","between","around","evenly"]}),a({name:"align-items",labelKey:"utility.align_items",values:["start","center","end","baseline","stretch"]}),a({name:"align-content",labelKey:"utility.align_content",values:["start","center","end","between","around","stretch"]}),l({name:"gap",labelKey:"utility.gap"}),l({name:"row-gap",labelKey:"utility.row_gap"}),l({name:"column-gap",labelKey:"utility.column_gap"}),i({name:"flex-fill",prefix:"flex",property:"flex",labelKey:"utility.flex_fill",values:["fill"],appliesTo:ne,css:function(){return"1 1 auto"}}),i({name:"flex-grow",prefix:"flex",labelKey:"utility.flex_grow",values:["grow-0","grow-1"],appliesTo:ne,css:function(u){return u.slice(-1)}}),i({name:"flex-shrink",prefix:"flex",labelKey:"utility.flex_shrink",values:["shrink-0","shrink-1"],appliesTo:ne,css:function(u){return u.slice(-1)}})]}}Object.assign(T.locales.en,{"utility.float":"Float","utility.float_start":"Start","utility.float_end":"End","utility.float_none":"None"});var ut={start:"left",end:"right",none:"none"};function Ee(e){function t(n){return n==="start"?e.t("utility.float_start"):n==="end"?e.t("utility.float_end"):e.t("utility.float_none")}return{families:[{name:"float",prefix:"float",values:["start","end","none"],appliesTo:["element"],labelKey:"utility.float",label:t,preview:function(n,i){return{float:n===null?e.bareStyle(i,"float","float"):ut[n]}}}]}}Object.assign(T.locales.en,{"utility.sticky":"Sticky"});var ct={top:{position:"sticky",top:"0","z-index":"1020"},bottom:{position:"sticky",bottom:"0","z-index":"1020"}};function Ce(e){return{families:[{name:"sticky",prefix:"sticky",values:["top","bottom"],appliesTo:["row","column","element","container"],labelKey:"utility.sticky",panel:!1,preview:function(t,n){return t!==null?ct[t]:{position:e.bareStyle(n,"sticky","position")}}}]}}var pt=".row, .column, .ge-element, [data-ge-container]",U="ge-drawer-out",ie="data-ge-drawer-out",dt=5,ft=/^(?:inline-)?(?:flex|grid)$/;function Se(e){var t=null,n={},i=null;function a(g){if(!n[g]){n[g]=!0,t||(t=document.head.appendChild(y("style",{"data-ge-drawer-flow":""})));var f=".ge-canvas.ge-editing ["+ie+'="'+g+'"]';t.appendChild(document.createTextNode(f+" { border-top-width: "+g+`px !important; }
2
+ `+f+" > .ge-tools-drawer { top: -"+g+`px; }
3
+ `))}}function l(g){var f=getComputedStyle(g);return ft.test(f.display)?!(R(g,"row")&&f.flexDirection==="row"&&f.flexWrap==="wrap"):!1}function p(g,f){var E=Math.ceil(f.offsetHeight)+dt;a(E),g.setAttribute(ie,String(E))}function u(g){typeof ResizeObserver!="undefined"&&(i||(i=new ResizeObserver(function(f){f.forEach(function(E){var k=E.target.parentNode;k&&R(k,U)&&p(k,E.target)})})),i.observe(g))}function c(g){I(g,pt).forEach(function(f){var E=j(f,".ge-tools-drawer");E&&(l(f)?(Z(f,U),p(f,E),u(E)):R(f,U)&&(z(f,U),f.removeAttribute(ie),W(f),i&&i.unobserve(E)))})}function m(g){P(g,"."+U).forEach(function(f){z(f,U),f.removeAttribute(ie),W(f)})}function v(){i&&i.disconnect(),i=null,m(e.canvas),t&&t.remove(),t=null,n={}}return{families:[],onRefresh:c,onDeinit:v,cleanMarkup:m}}var L=["primary","secondary","success","danger","warning","info","light","dark"],ce=["top","end","bottom","start"],ke=["10","25","50","75","100"];function S(e,t,n){return t.map(function(i){return e+i+(n||"")})}function w(e,t,n,i){return{classes:e,exclusive:t!==!1,notOn:n||[],onlyOn:i||null}}function h(e,t){return{name:e,labelKey:t.labelKey,type:t.type||"text",values:t.values||null,notOn:t.notOn||[]}}var $=["column"],Oe=["element"],fe=[{key:"size",labelKey:"inline_style.section_size",properties:[h("width",{labelKey:"inline_style.prop_width",notOn:$}),h("height",{labelKey:"inline_style.prop_height",notOn:$}),h("min-width",{labelKey:"inline_style.prop_min_width"}),h("min-height",{labelKey:"inline_style.prop_min_height"}),h("max-width",{labelKey:"inline_style.prop_max_width"}),h("max-height",{labelKey:"inline_style.prop_max_height"})],catalog:[w(S("w-",["25","50","75","100","auto"]),!0,$),w(S("h-",["25","50","75","100","auto"]),!0,$),w(["mw-100","mh-100","vw-100","vh-100","min-vw-100","min-vh-100"],!1,$),w(["img-fluid","img-thumbnail"],!1,[],Oe),w(S("object-fit-",["contain","cover","fill","scale","none"]),!0,[],Oe)],parts:[]},{key:"spacing",labelKey:"inline_style.section_spacing",properties:[h("margin-top",{labelKey:"inline_style.prop_margin_top"}),h("margin-right",{labelKey:"inline_style.prop_margin_right"}),h("margin-bottom",{labelKey:"inline_style.prop_margin_bottom"}),h("margin-left",{labelKey:"inline_style.prop_margin_left"}),h("padding-top",{labelKey:"inline_style.prop_padding_top"}),h("padding-right",{labelKey:"inline_style.prop_padding_right"}),h("padding-bottom",{labelKey:"inline_style.prop_padding_bottom"}),h("padding-left",{labelKey:"inline_style.prop_padding_left"})],catalog:[],parts:["spacing"]},{key:"border",labelKey:"inline_style.section_border",properties:[h("border-width",{labelKey:"inline_style.prop_border_width"}),h("border-style",{labelKey:"inline_style.prop_border_style",type:"select",values:["none","solid","dashed","dotted","double","groove","ridge","inset","outset"]}),h("border-color",{labelKey:"inline_style.prop_border_color",type:"color"}),h("border-radius",{labelKey:"inline_style.prop_border_radius"}),h("box-shadow",{labelKey:"inline_style.prop_box_shadow",type:"shadow"})],catalog:[w(["border","border-0"].concat(S("border-",ce),S("border-",ce,"-0")),!1),w(S("border-",["1","2","3","4","5"])),w(S("border-",L.concat(["black","white"])).concat(S("border-",L,"-subtle"))),w(S("border-opacity-",ke)),w(["rounded"].concat(S("rounded-",["0","1","2","3","4","5","circle","pill"]))),w(S("rounded-",ce),!1),w(["shadow-none","shadow-sm","shadow","shadow-lg"])],parts:[]},{key:"background",labelKey:"inline_style.section_background",properties:[h("background-color",{labelKey:"inline_style.prop_background_color",type:"color"}),h("background-image",{labelKey:"inline_style.prop_background_image",type:"url"}),h("background-size",{labelKey:"inline_style.prop_background_size"}),h("background-position",{labelKey:"inline_style.prop_background_position"}),h("background-repeat",{labelKey:"inline_style.prop_background_repeat",type:"select",values:["repeat","no-repeat","repeat-x","repeat-y","space","round"]})],catalog:[w(S("bg-",L.concat(["body","body-secondary","body-tertiary","white","black","transparent"])).concat(S("bg-",L,"-subtle"),S("text-bg-",L))),w(["bg-gradient"],!1),w(S("bg-opacity-",ke))],parts:[]},{key:"text",labelKey:"inline_style.section_text",properties:[h("color",{labelKey:"inline_style.prop_color",type:"color"}),h("font-size",{labelKey:"inline_style.prop_font_size"}),h("text-align",{labelKey:"inline_style.prop_text_align",type:"select",values:["start","center","end","left","right","justify"]}),h("text-shadow",{labelKey:"inline_style.prop_text_shadow",type:"shadow"})],catalog:[w(S("text-",L.concat(["body","body-secondary","body-tertiary","white","black"])).concat(S("text-",L,"-emphasis"),["text-body-emphasis"])),w(S("text-opacity-",["25","50","75","100"])),w(S("fs-",["1","2","3","4","5","6"])),w(S("text-decoration-",["none","underline","line-through"]))],parts:["textalign"]},{key:"typography",labelKey:"inline_style.section_typography",properties:[h("font-family",{labelKey:"inline_style.prop_font_family"}),h("font-weight",{labelKey:"inline_style.prop_font_weight",type:"select",values:["100","200","300","400","500","600","700","800","900","normal","bold","lighter","bolder"]}),h("font-style",{labelKey:"inline_style.prop_font_style",type:"select",values:["normal","italic","oblique"]}),h("line-height",{labelKey:"inline_style.prop_line_height"}),h("letter-spacing",{labelKey:"inline_style.prop_letter_spacing"}),h("text-transform",{labelKey:"inline_style.prop_text_transform",type:"select",values:["none","uppercase","lowercase","capitalize"]}),h("text-decoration",{labelKey:"inline_style.prop_text_decoration",type:"select",values:["none","underline","line-through","overline"]})],catalog:[w(S("fw-",["lighter","light","normal","medium","semibold","bold","bolder"])),w(S("fst-",["italic","normal"])),w(S("lh-",["1","sm","base","lg"])),w(S("text-",["lowercase","uppercase","capitalize"])),w(["font-monospace"],!1),w(["text-wrap","text-nowrap"]),w(["text-break"],!1)],parts:[]},{key:"display",labelKey:"inline_style.section_display",properties:[h("display",{labelKey:"inline_style.prop_display",type:"select",values:["none","block","inline","inline-block","flex","inline-flex","grid","inline-grid"]}),h("opacity",{labelKey:"inline_style.prop_opacity"}),h("overflow",{labelKey:"inline_style.prop_overflow",type:"select",values:["visible","hidden","auto","scroll","clip"]}),h("visibility",{labelKey:"inline_style.prop_visibility",type:"select",values:["visible","hidden"]})],catalog:[w(S("opacity-",["0","25","50","75","100"])),w(S("overflow-",["auto","hidden","visible","scroll"])),w(["visible","invisible"])],parts:["display"]},{key:"flex",labelKey:"inline_style.section_flex",properties:[],catalog:[w(["vstack","hstack"],!0,["row"])],parts:["flex"]},{key:"position",labelKey:"inline_style.section_position",properties:[h("position",{labelKey:"inline_style.prop_position",type:"select",values:["static","relative","absolute","fixed","sticky"]}),h("top",{labelKey:"inline_style.prop_top",notOn:$}),h("right",{labelKey:"inline_style.prop_right",notOn:$}),h("bottom",{labelKey:"inline_style.prop_bottom",notOn:$}),h("left",{labelKey:"inline_style.prop_left",notOn:$}),h("z-index",{labelKey:"inline_style.prop_z_index"})],catalog:[w(S("position-",["static","relative","absolute","fixed","sticky"])),w(S("top-",["0","50","100"])),w(S("bottom-",["0","50","100"])),w(S("start-",["0","50","100"])),w(S("end-",["0","50","100"])),w(["translate-middle","translate-middle-x","translate-middle-y"]),w(["z-n1","z-0","z-1","z-2","z-3"]),w(["fixed-top","fixed-bottom"])],parts:["float","sticky"]},{key:"custom",labelKey:"inline_style.section_custom",properties:[],catalog:[],parts:[],custom:!0}];function Ke(e){return fe.filter(function(t){return t.key===e})[0]||null}function le(e,t){return e.onlyOn&&e.onlyOn.indexOf(t)===-1?!1:e.notOn.indexOf(t)===-1}var re="(?:(?:sm|md|lg|xl|xxl)-)?",mt="(?:[0-5]|auto)",yt="(?:"+L.join("|")+"|black|white)",gt="(?:"+L.join("|")+"|body|body-secondary|body-tertiary|white|black|transparent)",ht="(?:"+L.join("|")+"|body|body-secondary|body-tertiary|white|black|muted|black-50|white-50)",pe="border(?:-(?:top|end|bottom|start))?(?:-0)?",Ae="(?:"+L.join("|")+")-subtle",vt="(?:"+L.join("|")+"|body)-emphasis",Te="text-bg-(?:"+L.join("|")+")",de="sticky-"+re;function N(e,t){var n={top:"[ty]?",bottom:"[by]?",left:"[sx]?",right:"[ex]?"}[t];return new RegExp("^"+e+n+"-"+re+mt+"$")}var bt={width:/^(?:w-(?:25|50|75|100|auto)|vw-100)$/,height:/^(?:h-(?:25|50|75|100|auto)|vh-100)$/,"max-width":/^mw-100$/,"max-height":/^mh-100$/,"min-width":/^min-vw-100$/,"min-height":/^min-vh-100$/,"margin-top":N("m","top"),"margin-right":N("m","right"),"margin-bottom":N("m","bottom"),"margin-left":N("m","left"),"padding-top":N("p","top"),"padding-right":N("p","right"),"padding-bottom":N("p","bottom"),"padding-left":N("p","left"),"border-width":new RegExp("^(?:"+pe+"|border-[1-5])$"),"border-style":new RegExp("^"+pe+"$"),"border-color":new RegExp("^(?:"+pe+"|border-"+yt+"|border-"+Ae+")$"),"border-radius":/^rounded(?:-(?:[0-5]|circle|pill|top|end|bottom|start))?$/,"box-shadow":/^shadow(?:-(?:none|sm|lg))?$/,"background-color":new RegExp("^(?:bg-"+gt+"|bg-"+Ae+"|"+Te+")$"),"background-image":/^bg-gradient$/,color:new RegExp("^(?:text-"+ht+"|text-"+vt+"|"+Te+")$"),"font-size":/^fs-[1-6]$/,"text-align":new RegExp("^text-"+re+"(?:start|center|end)$"),"text-decoration":/^text-decoration-(?:none|underline|line-through)$/,"font-family":/^font-monospace$/,"font-weight":/^fw-(?:lighter|light|normal|medium|semibold|bold|bolder)$/,"font-style":/^fst-(?:italic|normal)$/,"line-height":/^lh-(?:1|sm|base|lg)$/,"text-transform":/^text-(?:lowercase|uppercase|capitalize)$/,display:new RegExp("^(?:d-"+re+"(?:none|inline|inline-block|block|grid|inline-grid|table|table-row|table-cell|flex|inline-flex)|vstack|hstack)$"),opacity:/^opacity-(?:0|25|50|75|100)$/,overflow:/^overflow-(?:auto|hidden|visible|scroll)$/,visibility:/^(?:visible|invisible)$/,position:new RegExp("^(?:position-(?:static|relative|absolute|fixed|sticky)|fixed-(?:top|bottom)|"+de+"(?:top|bottom))$"),top:new RegExp("^(?:top-(?:0|50|100)|fixed-top|"+de+"top)$"),bottom:new RegExp("^(?:bottom-(?:0|50|100)|fixed-bottom|"+de+"bottom)$"),left:/^start-(?:0|50|100)$/,right:/^end-(?:0|50|100)$/,"z-index":/^z-(?:n1|[0-3])$/};function Le(e,t){var n=bt[e];return n&&t.filter(function(i){return n.test(i)})[0]||null}function _t(e,t){var n={};return Object.keys(t||{}).forEach(function(i){Ke(i)||e.warn('inline_style.sections: there is no "'+i+'" section: ignored')}),fe.forEach(function(i){var a=t&&t[i.key]!==void 0?t[i.key]:!0;if(a!==!1){var l=i.properties.map(function(c){return c.name}),p=i.properties,u=!0;a&&typeof a=="object"&&(Array.isArray(a.properties)&&(a.properties.forEach(function(c){l.indexOf(c)===-1&&e.warn("inline_style.sections."+i.key+': "'+c+'" is not one of its properties: ignored')}),p=a.properties.filter(function(c){return l.indexOf(c)!==-1}).map(function(c){return i.properties[l.indexOf(c)]})),a.catalog===!1&&(u=!1)),n[i.key]={section:i,properties:p,catalog:u}}}),n}function xt(e,t){return t==null?null:typeof t=="function"?t:(e.warn("inline_style.browse must be a function: ignored"),null)}function Pe(e){var t=e.settings.inline_style||{};return{browse:xt(e,t.browse),sections:_t(e,t.sections),spacing:t.spacing,visibility:t.visibility}}var ze=new WeakMap,wt=0;function Et(e){return(e.getAttribute("class")||"").split(/\s+/).filter(Boolean)}function Ne(e,t,n,i){var a=String(i==null?"":i).trim(),l=/\s*!\s*important\s*$/i.exec(a),p;return l&&(a=a.slice(0,l.index).trim(),p="important"),e.setHostStyle(t,n,a,p)}function Me(e,t,n){B(e,"is-invalid",!t),t?e.removeAttribute("title"):e.setAttribute("title",n.t("inline_style.invalid"))}function me(e,t){R(e,"is-invalid")||(e.value=t)}function X(e){return y("input",{type:"text",class:"form-control form-control-sm "+(e||"")})}var Ct=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i;function Re(e){var t=Ct.exec(e.trim());if(!t)return null;var n=t[1];return n.length===3&&(n=n.split("").map(function(i){return i+i}).join("")),"#"+n.toLowerCase()}function De(e){var t=y("div",{class:"input-group input-group-sm ge-inline-style-color"}),n=t.appendChild(y("input",{type:"color",class:"form-control form-control-color"})),i=t.appendChild(X());return n.addEventListener("input",function(){z(i,"is-invalid"),i.value=n.value,e(n.value,i)}),i.addEventListener("change",function(){var a=Re(i.value);a&&(n.value=a),e(i.value,i)}),{element:t,set:function(a){me(i,a);var l=Re(a);l&&(n.value=l)}}}var St=/^url\(\s*(["']?)(.*)\1\s*\)$/i;function He(e){var t=St.exec(e.trim());return t?t[1]?t[2].replace(/\\(["\\])/g,"$1"):t[2]:e}function Be(e){return e=e.trim(),e===""||/^(?:none|inherit|initial|unset|revert)$/i.test(e)||/^[a-z-]+\(/i.test(e)?e:'url("'+e.replace(/(["\\])/g,"\\$1")+'")'}function kt(e){for(var t=[],n=0,i="",a=0;a<e.length;a++){var l=e.charAt(a);l==="("&&n++,l===")"&&n--,n===0&&(l===" "||l===",")?(i&&t.push(i),l===","&&t.push(","),i=""):i+=l}return i&&t.push(i),t}var Ot=/^-?(?:\d*\.)?\d+(?:[a-z%]+)?$/i,$e=[{name:"x",labelKey:"inline_style.shadow_x"},{name:"y",labelKey:"inline_style.shadow_y"},{name:"blur",labelKey:"inline_style.shadow_blur"},{name:"spread",labelKey:"inline_style.shadow_spread"}];function je(e,t){if(e=e.trim(),e==="")return{inset:!1,lengths:[],color:""};if(/var\(/i.test(e))return null;var n=kt(e);if(n.indexOf(",")!==-1)return null;var i=!1,a=[],l=[];return n.forEach(function(p){t&&p.toLowerCase()==="inset"?i=!0:Ot.test(p)?a.push(p):l.push(p)}),l.length>1||a.length<2||a.length>(t?4:3)||l.length&&/^(?:none|inherit|initial|unset|revert)$/i.test(l[0])?null:{inset:i,lengths:a,color:l[0]||""}}function At(e,t){for(var n=e.lengths.slice(),i=n.length-1;i>=0;i--)n[i]===""&&n.slice(i+1).some(Boolean)&&(n[i]="0");if(n=n.filter(Boolean),!n.length&&!e.color&&!e.inset)return"";for(;n.length<2;)n.push("0");return(t&&e.inset?"inset ":"")+n.join(" ")+(e.color?" "+e.color:"")}function Tt(e,t,n,i){var a=n==="box-shadow",l=y("div",{class:"ge-inline-style-shadow"}),p=!1;function u(f,E){var k=Ne(e,t,n,f);return Me(E,k,e),k&&i(),k}function c(f){l.innerHTML="";var E=l.appendChild(y("div",{class:"ge-inline-style-shadow-builder"})),k=a?$e:$e.slice(0,3),d=k.map(function(C,O){var K=E.appendChild(y("label",{class:"ge-inline-style-shadow-part"}));K.appendChild(y("span",{class:"ge-inline-style-shadow-label"},e.t(C.labelKey)));var A=K.appendChild(X("ge-inline-style-shadow-"+C.name));return A.value=f.lengths[O]||"",A}),r=E.appendChild(y("label",{class:"ge-inline-style-shadow-part ge-inline-style-shadow-color"}));r.appendChild(y("span",{class:"ge-inline-style-shadow-label"},e.t("inline_style.shadow_color")));var o=De(function(){_()});r.appendChild(o.element),o.set(f.color);var s=null;if(a){var b=E.appendChild(y("label",{class:"form-check ge-inline-style-shadow-inset"}));s=b.appendChild(y("input",{type:"checkbox",class:"form-check-input"})),b.appendChild(y("span",{class:"form-check-label"},e.t("inline_style.shadow_inset"))),s.checked=f.inset,s.addEventListener("change",function(){_()})}d.forEach(function(C){C.addEventListener("change",function(){_()})});var x=l.appendChild(y("a",{href:"#",class:"ge-inline-style-shadow-mode"},e.t("inline_style.shadow_text_mode")));x.addEventListener("click",function(C){C.preventDefault(),p=!0,g()});function _(){var C=At({inset:s?s.checked:!1,lengths:d.map(function(O){return O.value.trim()}),color:M(o.element,'input[type="text"]').value.trim()},a);u(C,d[0])}}function m(f){l.innerHTML="";var E=l.appendChild(X("ge-inline-style-shadow-text"));if(E.value=f,E.addEventListener("change",function(){if(E.value.trim()===""){u("",E)&&(p=!1,g());return}u(E.value,E)}),je(f,a)){var k=l.appendChild(y("a",{href:"#",class:"ge-inline-style-shadow-mode"},e.t("inline_style.shadow_builder_mode")));k.addEventListener("click",function(d){d.preventDefault(),p=!1,g()})}}var v=null;function g(){if(!l.querySelector(".is-invalid")){var f=e.hostStyle(t,n).value,E=je(f,a);f===v&&l.firstChild&&p===!!l.querySelector(".ge-inline-style-shadow-text")||(v=f,p||!E?(p=!!f||p,m(f)):c(E))}}return{element:l,render:g,value:function(){return e.hostStyle(t,n).value}}}function Kt(e,t,n,i,a,l){var p=y("button",{type:"button",class:"btn btn-outline-secondary ge-inline-style-browse",title:e.t("inline_style.browse"),"aria-label":e.t("inline_style.browse")});return p.appendChild(y("i",{class:"bi bi-folder2-open","aria-hidden":"true"})),p.addEventListener("click",function(){var u=!1;function c(v){if(!u&&(u=!0,v!=null)){if(typeof v!="string"){e.warn("inline_style.browse gave "+typeof v+", not a text: ignored");return}v.trim()===""||i.destroyed||!e.canvas.contains(t)||l(v.trim())}}var m=i.browse(c,{node:t,property:n.name,value:He(a())});m&&typeof m.then=="function"&&m.then(c)}),p}function Ie(e,t,n,i,a){var l=y("div",{class:"ge-inline-style-field","data-ge-inline-style-property":n.name}),p=l.appendChild(y("label",{class:"ge-inline-style-label"},e.t(n.labelKey))),u;function c(){return e.hostStyle(t,n.name).value}function m(o,s){var b=Ne(e,t,n.name,o);Me(s,b,e),b&&i()}if(n.type==="select"){var v=l.appendChild(y("select",{class:"form-select form-select-sm"}));v.addEventListener("change",function(){m(v.value,v)}),u=function(){var o=c(),s=n.values.slice();o&&s.indexOf(o)===-1&&s.push(o),v.innerHTML="",v.appendChild(y("option",{value:""},"")),s.forEach(function(b){v.appendChild(y("option",{value:b},b))}),v.value=o}}else if(n.type==="color"){var g=De(function(o,s){m(o,s)});l.appendChild(g.element),u=function(){g.set(c())}}else if(n.type==="url"){var f=X();if(f.addEventListener("change",function(){m(Be(f.value),f)}),a&&a.browse){var E=l.appendChild(y("div",{class:"input-group input-group-sm ge-inline-style-url"}));E.appendChild(f),E.appendChild(Kt(e,t,n,a,c,function(o){z(f,"is-invalid"),f.value=o,m(Be(o),f)}))}else l.appendChild(f);u=function(){me(f,He(c()))}}else if(n.type==="shadow"){var k=Tt(e,t,n.name,i);l.appendChild(k.element),u=k.render}else{var d=l.appendChild(X());d.addEventListener("change",function(){m(d.value,d)}),u=function(){me(d,c())}}var r=l.querySelector("input, select");return r&&(r.id="ge-inline-style-field-"+ ++wt,p.setAttribute("for",r.id)),l.appendChild(y("small",{class:"ge-inline-style-note ge-inline-style-overridden"})),ze.set(l,function(){u();var o=c()?Le(n.name,Et(t)):null,s=j(l,".ge-inline-style-overridden");s.textContent=o?e.t("inline_style.overridden",{class:o}):"",F(s,!!o)}),ye(l),l}function ye(e){var t=ze.get(e);t&&t()}function Fe(e){return(e.getAttribute("class")||"").split(/\s+/).filter(Boolean)}function Lt(e,t,n,i){var a=e.detailsOf(t),l=a?M(a,".ge-classes"):null;if(l){var p=Fe(t).indexOf(i)!==-1,u=l.value.split(/\s+/).filter(Boolean).filter(function(c){return c===i?!1:!(n.exclusive&&!p&&n.classes.indexOf(c)!==-1)});p||u.push(i),l.value=u.join(" "),l.dispatchEvent(new Event("change",{bubbles:!0}))}}function Ue(e,t,n,i){var a=i.filter(function(p){return le(p,n)});if(!a.length)return null;var l=y("div",{class:"ge-inline-style-catalog"});return l.appendChild(y("span",{class:"ge-inline-style-label"},e.t("inline_style.catalog"))),a.forEach(function(p){var u=l.appendChild(y("div",{class:"ge-inline-style-chips"}));p.classes.forEach(function(c){var m=u.appendChild(y("button",{type:"button",class:"btn btn-sm btn-outline-secondary ge-inline-style-chip","data-ge-class":c,"aria-pressed":"false"},c));m.addEventListener("click",function(){Lt(e,t,p,c)})})}),ge(l,t),l}function ge(e,t){var n=Fe(t);P(e,".ge-inline-style-chip").forEach(function(i){var a=n.indexOf(i.getAttribute("data-ge-class"))!==-1;B(i,"active",a),i.setAttribute("aria-pressed",a?"true":"false")})}function Pt(e){var t=document.createElement("div").style,n=[];t.setProperty(e,"initial");for(var i=0;i<t.length;i++)n.push(t[i]);return n.length?n:[e]}function Ge(e){var t=document.createElement("div").style;return t.cssText=e,t}function Ve(e,t,n,i){var a={};n.forEach(function(m){Pt(m).forEach(function(v){a[v]=!0})});var l=y("div",{class:"ge-inline-style-custom"}),p=l.appendChild(y("textarea",{class:"form-control form-control-sm font-monospace ge-inline-style-custom-css",rows:"4",spellcheck:"false","aria-label":e.t("inline_style.section_custom")}));function u(){for(var m=Ge(e.hostStyle(t)),v=document.createElement("div").style,g=0;g<m.length;g++){var f=m[g];a[f]||v.setProperty(f,m.getPropertyValue(f),m.getPropertyPriority(f))}return v}p.addEventListener("change",function(){var m=u(),v=Ge(p.value),g;for(g=0;g<m.length;g++)v.getPropertyValue(m[g])===""&&e.setHostStyle(t,m[g],"");for(g=0;g<v.length;g++)e.setHostStyle(t,v[g],v.getPropertyValue(v[g]),v.getPropertyPriority(v[g]));c(),i()});function c(){document.activeElement!==p&&(p.value=u().cssText.replace(/; /g,`;
4
+ `))}return c(),{element:l,render:c}}function Rt(e,t){return t==="row"||t==="column"||t==="element"||t==="section"||D(e,"[data-ge-container]")?!0:!!j(e,".ge-tools-drawer.ge-pane-drawer")}function Bt(e,t,n){return n==="plain"&&(n="text"),e.appliesTo.indexOf(n)!==-1?!0:e.appliesTo.indexOf("container")!==-1&&D(t,"[data-ge-container]")}function $t(e,t,n,i){if(t.panel)return t.panel(n,i);var a=t.families.filter(function(p){return Bt(p,n,i)}).map(function(p){return e.utilityField(n,p.name)});if(a.length<2)return a[0]||null;var l=y("div",{class:"ge-inline-style-part-fields"});return a.forEach(function(p){l.appendChild(p)}),l}function We(e,t,n,i){var a=Rt(t,n),l=y("div",{class:"accordion ge-inline-style"}),p=[],u=[],c=[],m=null,v=null,g=function(){d()};function f(r,o){var s=l.appendChild(y("div",{class:"accordion-item","data-ge-inline-style-section":r})),b=s.appendChild(y("h2",{class:"accordion-header"})),x=b.appendChild(y("button",{type:"button",class:"accordion-button collapsed","aria-expanded":"false"},e.t(o))),_=s.appendChild(y("div",{class:"accordion-collapse collapse"})),C=_.appendChild(y("div",{class:"accordion-body"}));return x.addEventListener("click",function(){var O=!R(_,"show");i.state.open=O?r:null,i.opened(i.state.open)}),{entry:s,body:C}}function E(r,o){B(M(r,".accordion-collapse"),"show",o);var s=M(r,".accordion-button");B(s,"collapsed",!o),s.setAttribute("aria-expanded",o?"true":"false")}if(Object.keys(i.sections).forEach(function(r){var o=i.sections[r],s=o.section;if(s.custom){a&&(v=f(r,s.labelKey));return}var b=s.parts.map(function(A){return i.parts[A]?$t(e,i.parts[A],t,n):null}).filter(Boolean),x=a?o.properties.filter(function(A){return le(A,n)}):[],_=a&&o.catalog?Ue(e,t,n,s.catalog):null;if(!(!b.length&&!x.length&&!_)){var C=f(r,s.labelKey).body;if(b.forEach(function(A){C.appendChild(Z(A,"ge-inline-style-part"))}),x.length){var O=C.appendChild(y("small",{class:"ge-inline-style-note ge-inline-style-all-sizes"},e.t("inline_style.all_sizes")));c.push(O);var K=C.appendChild(y("div",{class:"ge-inline-style-fields"}));x.forEach(function(A){var G=Ie(e,t,A,g,i);p.push(G),K.appendChild(G)})}_&&(u.push(_),C.appendChild(_))}}),v&&(m=Ve(e,t,p.map(function(r){return r.getAttribute("data-ge-inline-style-property")}),g),v.body.appendChild(m.element),l.appendChild(v.entry)),!l.children.length)return null;function k(r){P(l,".accordion-item").forEach(function(o){E(o,o.getAttribute("data-ge-inline-style-section")===r)})}k(i.state.open);function d(){p.forEach(ye),u.forEach(function(r){ge(r,t)}),m&&m.render(),c.forEach(function(r){F(r,e.view()!=="all")})}return d(),{element:l,render:d,open:k}}Object.assign(T.locales.en,{"inline_style.section_title":"Style","inline_style.dialog_title":"Style: {kind}","inline_style.section_size":"Size","inline_style.section_spacing":"Spacing","inline_style.section_border":"Border","inline_style.section_background":"Background","inline_style.section_text":"Text","inline_style.section_typography":"Typography","inline_style.section_display":"Display","inline_style.section_flex":"Flex","inline_style.section_position":"Position","inline_style.section_custom":"Custom css","inline_style.all_sizes":"Applies to every size","inline_style.overridden":"The class {class} takes priority over this value","inline_style.invalid":"Not a value this property takes","inline_style.catalog":"Bootstrap classes","inline_style.browse":"Browse\u2026","inline_style.shadow_x":"X","inline_style.shadow_y":"Y","inline_style.shadow_blur":"Blur","inline_style.shadow_spread":"Spread","inline_style.shadow_color":"Color","inline_style.shadow_inset":"Inset","inline_style.shadow_text_mode":"Edit as text","inline_style.shadow_builder_mode":"Edit with the builder","inline_style.prop_width":"Width","inline_style.prop_height":"Height","inline_style.prop_min_width":"Min width","inline_style.prop_min_height":"Min height","inline_style.prop_max_width":"Max width","inline_style.prop_max_height":"Max height","inline_style.prop_margin_top":"Margin top","inline_style.prop_margin_right":"Margin right","inline_style.prop_margin_bottom":"Margin bottom","inline_style.prop_margin_left":"Margin left","inline_style.prop_padding_top":"Padding top","inline_style.prop_padding_right":"Padding right","inline_style.prop_padding_bottom":"Padding bottom","inline_style.prop_padding_left":"Padding left","inline_style.prop_border_width":"Border width","inline_style.prop_border_style":"Border style","inline_style.prop_border_color":"Border color","inline_style.prop_border_radius":"Border radius","inline_style.prop_box_shadow":"Shadow","inline_style.prop_background_color":"Background color","inline_style.prop_background_image":"Background image","inline_style.prop_background_size":"Background size","inline_style.prop_background_position":"Background position","inline_style.prop_background_repeat":"Background repeat","inline_style.prop_color":"Color","inline_style.prop_font_size":"Font size","inline_style.prop_text_align":"Text align","inline_style.prop_text_shadow":"Text shadow","inline_style.prop_font_family":"Font family","inline_style.prop_font_weight":"Font weight","inline_style.prop_font_style":"Font style","inline_style.prop_line_height":"Line height","inline_style.prop_letter_spacing":"Letter spacing","inline_style.prop_text_transform":"Text transform","inline_style.prop_text_decoration":"Text decoration","inline_style.prop_display":"Display","inline_style.prop_opacity":"Opacity","inline_style.prop_overflow":"Overflow","inline_style.prop_visibility":"Visibility","inline_style.prop_position":"Position","inline_style.prop_top":"Top","inline_style.prop_right":"Right","inline_style.prop_bottom":"Bottom","inline_style.prop_left":"Left","inline_style.prop_z_index":"Z-index"});var qe=["spacing","textalign","display","flex","float","sticky","drawerflow"];T.utilities["inline-style"]=function(e){var t=Pe(e),n={spacing:be(e,t.spacing),textalign:_e(e),display:xe(e,t.visibility),flex:we(e,t.spacing),float:Ee(e),sticky:Ce(e),drawerflow:Se(e)},i=[],a={sections:t.sections,parts:n,state:{open:null},browse:t.browse,destroyed:!1,opened:function(u){i.forEach(function(c){c.accordion.open(u)})}};function l(u){return function(){var c=arguments;qe.forEach(function(m){n[m][u]&&n[m][u].apply(null,c)})}}var p=l("onRefresh");return{families:qe.reduce(function(u,c){return u.concat(n[c].families.map(function(m){return Object.assign({},m,{panel:!1})}))},[]),panelSection:function(u,c){var m=We(e,u,c,a);return m?(i.push({node:u,accordion:m}),{labelKey:"inline_style.section_title",titleKey:"inline_style.dialog_title",body:m.element}):null},preview:function(u,c,m){return n.spacing.preview(u,c,m)},onRefresh:function(u){p(u),i=i.filter(function(c){return c.accordion.element.isConnected}),i.forEach(function(c){(c.node===u||u.contains(c.node))&&c.accordion.render()})},drawerTools:l("drawerTools"),onDestroy:function(){a.destroyed=!0},onDeinit:function(){l("onDeinit")(),i=[]},cleanMarkup:l("cleanMarkup")}};})();