@measured/puck-plugin-heading-analyzer 0.21.0-canary.cf074bc6 → 0.21.0-canary.dfecd012

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -98,7 +98,7 @@ var require_classnames = __commonJS({
98
98
  init_react_import();
99
99
  (function() {
100
100
  "use strict";
101
- var hasOwn = {}.hasOwnProperty;
101
+ var hasOwn2 = {}.hasOwnProperty;
102
102
  function classNames() {
103
103
  var classes = "";
104
104
  for (var i = 0; i < arguments.length; i++) {
@@ -124,7 +124,7 @@ var require_classnames = __commonJS({
124
124
  }
125
125
  var classes = "";
126
126
  for (var key in arg) {
127
- if (hasOwn.call(arg, key) && arg[key]) {
127
+ if (hasOwn2.call(arg, key) && arg[key]) {
128
128
  classes = appendClass(classes, key);
129
129
  }
130
130
  }
@@ -213,11 +213,11 @@ var require_flat = __commonJS({
213
213
  }
214
214
  function isEmpty(val) {
215
215
  const type = Object.prototype.toString.call(val);
216
- const isArray = type === "[object Array]";
216
+ const isArray2 = type === "[object Array]";
217
217
  const isObject = type === "[object Object]";
218
218
  if (!val) {
219
219
  return true;
220
- } else if (isArray) {
220
+ } else if (isArray2) {
221
221
  return !val.length;
222
222
  } else if (isObject) {
223
223
  return !Object.keys(val).length;
@@ -267,48 +267,12 @@ var require_flat = __commonJS({
267
267
  }
268
268
  });
269
269
 
270
- // ../../node_modules/fast-deep-equal/index.js
271
- var require_fast_deep_equal = __commonJS({
272
- "../../node_modules/fast-deep-equal/index.js"(exports2, module2) {
273
- "use strict";
274
- init_react_import();
275
- module2.exports = function equal(a, b) {
276
- if (a === b) return true;
277
- if (a && b && typeof a == "object" && typeof b == "object") {
278
- if (a.constructor !== b.constructor) return false;
279
- var length, i, keys;
280
- if (Array.isArray(a)) {
281
- length = a.length;
282
- if (length != b.length) return false;
283
- for (i = length; i-- !== 0; )
284
- if (!equal(a[i], b[i])) return false;
285
- return true;
286
- }
287
- if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
288
- if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
289
- if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
290
- keys = Object.keys(a);
291
- length = keys.length;
292
- if (length !== Object.keys(b).length) return false;
293
- for (i = length; i-- !== 0; )
294
- if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
295
- for (i = length; i-- !== 0; ) {
296
- var key = keys[i];
297
- if (!equal(a[key], b[key])) return false;
298
- }
299
- return true;
300
- }
301
- return a !== a && b !== b;
302
- };
303
- }
304
- });
305
-
306
270
  // index.ts
307
- var plugin_heading_analyzer_exports = {};
308
- __export(plugin_heading_analyzer_exports, {
271
+ var index_exports = {};
272
+ __export(index_exports, {
309
273
  default: () => HeadingAnalyzer_default
310
274
  });
311
- module.exports = __toCommonJS(plugin_heading_analyzer_exports);
275
+ module.exports = __toCommonJS(index_exports);
312
276
  init_react_import();
313
277
 
314
278
  // src/HeadingAnalyzer.tsx
@@ -854,10 +818,10 @@ var insert = (list, index, item) => {
854
818
  // ../core/lib/generate-id.ts
855
819
  init_react_import();
856
820
 
857
- // ../../node_modules/uuid/dist/esm-node/index.js
821
+ // ../core/node_modules/uuid/dist/esm-node/index.js
858
822
  init_react_import();
859
823
 
860
- // ../../node_modules/uuid/dist/esm-node/rng.js
824
+ // ../core/node_modules/uuid/dist/esm-node/rng.js
861
825
  init_react_import();
862
826
  var import_crypto = __toESM(require("crypto"));
863
827
  var rnds8Pool = new Uint8Array(256);
@@ -870,7 +834,7 @@ function rng() {
870
834
  return rnds8Pool.slice(poolPtr, poolPtr += 16);
871
835
  }
872
836
 
873
- // ../../node_modules/uuid/dist/esm-node/stringify.js
837
+ // ../core/node_modules/uuid/dist/esm-node/stringify.js
874
838
  init_react_import();
875
839
  var byteToHex = [];
876
840
  for (let i = 0; i < 256; ++i) {
@@ -880,17 +844,17 @@ function unsafeStringify(arr, offset = 0) {
880
844
  return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
881
845
  }
882
846
 
883
- // ../../node_modules/uuid/dist/esm-node/v4.js
847
+ // ../core/node_modules/uuid/dist/esm-node/v4.js
884
848
  init_react_import();
885
849
 
886
- // ../../node_modules/uuid/dist/esm-node/native.js
850
+ // ../core/node_modules/uuid/dist/esm-node/native.js
887
851
  init_react_import();
888
852
  var import_crypto2 = __toESM(require("crypto"));
889
853
  var native_default = {
890
854
  randomUUID: import_crypto2.default.randomUUID
891
855
  };
892
856
 
893
- // ../../node_modules/uuid/dist/esm-node/v4.js
857
+ // ../core/node_modules/uuid/dist/esm-node/v4.js
894
858
  function v4(options, buf, offset) {
895
859
  if (native_default.randomUUID && !buf && !options) {
896
860
  return native_default.randomUUID();
@@ -1470,7 +1434,7 @@ var createStoreImpl = (createState) => {
1470
1434
  const initialState = state = createState(setState, getState, api);
1471
1435
  return api;
1472
1436
  };
1473
- var createStore = (createState) => createState ? createStoreImpl(createState) : createStoreImpl;
1437
+ var createStore = ((createState) => createState ? createStoreImpl(createState) : createStoreImpl);
1474
1438
 
1475
1439
  // ../../node_modules/zustand/esm/react.mjs
1476
1440
  init_react_import();
@@ -1479,8 +1443,8 @@ var identity = (arg) => arg;
1479
1443
  function useStore(api, selector = identity) {
1480
1444
  const slice = import_react4.default.useSyncExternalStore(
1481
1445
  api.subscribe,
1482
- () => selector(api.getState()),
1483
- () => selector(api.getInitialState())
1446
+ import_react4.default.useCallback(() => selector(api.getState()), [api, selector]),
1447
+ import_react4.default.useCallback(() => selector(api.getInitialState()), [api, selector])
1484
1448
  );
1485
1449
  import_react4.default.useDebugValue(slice);
1486
1450
  return slice;
@@ -1491,13 +1455,13 @@ var createImpl = (createState) => {
1491
1455
  Object.assign(useBoundStore, api);
1492
1456
  return useBoundStore;
1493
1457
  };
1494
- var create = (createState) => createState ? createImpl(createState) : createImpl;
1458
+ var create = ((createState) => createState ? createImpl(createState) : createImpl);
1495
1459
 
1496
1460
  // ../../node_modules/zustand/esm/middleware.mjs
1497
1461
  init_react_import();
1498
1462
  var subscribeWithSelectorImpl = (fn) => (set, get, api) => {
1499
1463
  const origSubscribe = api.subscribe;
1500
- api.subscribe = (selector, optListener, options) => {
1464
+ api.subscribe = ((selector, optListener, options) => {
1501
1465
  let listener = selector;
1502
1466
  if (optListener) {
1503
1467
  const equalityFn = (options == null ? void 0 : options.equalityFn) || Object.is;
@@ -1514,7 +1478,7 @@ var subscribeWithSelectorImpl = (fn) => (set, get, api) => {
1514
1478
  }
1515
1479
  }
1516
1480
  return origSubscribe(listener);
1517
- };
1481
+ });
1518
1482
  const initialState = fn(set, get, api);
1519
1483
  return initialState;
1520
1484
  };
@@ -1698,23 +1662,435 @@ var flattenData = (state, config) => {
1698
1662
 
1699
1663
  // ../core/lib/get-changed.ts
1700
1664
  init_react_import();
1701
- var import_fast_deep_equal = __toESM(require_fast_deep_equal());
1665
+
1666
+ // ../../node_modules/fast-equals/dist/esm/index.mjs
1667
+ init_react_import();
1668
+ var getOwnPropertyNames = Object.getOwnPropertyNames;
1669
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
1670
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
1671
+ function combineComparators(comparatorA, comparatorB) {
1672
+ return function isEqual(a, b, state) {
1673
+ return comparatorA(a, b, state) && comparatorB(a, b, state);
1674
+ };
1675
+ }
1676
+ function createIsCircular(areItemsEqual) {
1677
+ return function isCircular(a, b, state) {
1678
+ if (!a || !b || typeof a !== "object" || typeof b !== "object") {
1679
+ return areItemsEqual(a, b, state);
1680
+ }
1681
+ var cache2 = state.cache;
1682
+ var cachedA = cache2.get(a);
1683
+ var cachedB = cache2.get(b);
1684
+ if (cachedA && cachedB) {
1685
+ return cachedA === b && cachedB === a;
1686
+ }
1687
+ cache2.set(a, b);
1688
+ cache2.set(b, a);
1689
+ var result = areItemsEqual(a, b, state);
1690
+ cache2.delete(a);
1691
+ cache2.delete(b);
1692
+ return result;
1693
+ };
1694
+ }
1695
+ function getStrictProperties(object) {
1696
+ return getOwnPropertyNames(object).concat(getOwnPropertySymbols(object));
1697
+ }
1698
+ var hasOwn = Object.hasOwn || (function(object, property) {
1699
+ return hasOwnProperty.call(object, property);
1700
+ });
1701
+ function sameValueZeroEqual(a, b) {
1702
+ return a === b || !a && !b && a !== a && b !== b;
1703
+ }
1704
+ var PREACT_VNODE = "__v";
1705
+ var PREACT_OWNER = "__o";
1706
+ var REACT_OWNER = "_owner";
1707
+ var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
1708
+ var keys = Object.keys;
1709
+ function areArraysEqual(a, b, state) {
1710
+ var index = a.length;
1711
+ if (b.length !== index) {
1712
+ return false;
1713
+ }
1714
+ while (index-- > 0) {
1715
+ if (!state.equals(a[index], b[index], index, index, a, b, state)) {
1716
+ return false;
1717
+ }
1718
+ }
1719
+ return true;
1720
+ }
1721
+ function areDatesEqual(a, b) {
1722
+ return sameValueZeroEqual(a.getTime(), b.getTime());
1723
+ }
1724
+ function areErrorsEqual(a, b) {
1725
+ return a.name === b.name && a.message === b.message && a.cause === b.cause && a.stack === b.stack;
1726
+ }
1727
+ function areFunctionsEqual(a, b) {
1728
+ return a === b;
1729
+ }
1730
+ function areMapsEqual(a, b, state) {
1731
+ var size = a.size;
1732
+ if (size !== b.size) {
1733
+ return false;
1734
+ }
1735
+ if (!size) {
1736
+ return true;
1737
+ }
1738
+ var matchedIndices = new Array(size);
1739
+ var aIterable = a.entries();
1740
+ var aResult;
1741
+ var bResult;
1742
+ var index = 0;
1743
+ while (aResult = aIterable.next()) {
1744
+ if (aResult.done) {
1745
+ break;
1746
+ }
1747
+ var bIterable = b.entries();
1748
+ var hasMatch = false;
1749
+ var matchIndex = 0;
1750
+ while (bResult = bIterable.next()) {
1751
+ if (bResult.done) {
1752
+ break;
1753
+ }
1754
+ if (matchedIndices[matchIndex]) {
1755
+ matchIndex++;
1756
+ continue;
1757
+ }
1758
+ var aEntry = aResult.value;
1759
+ var bEntry = bResult.value;
1760
+ if (state.equals(aEntry[0], bEntry[0], index, matchIndex, a, b, state) && state.equals(aEntry[1], bEntry[1], aEntry[0], bEntry[0], a, b, state)) {
1761
+ hasMatch = matchedIndices[matchIndex] = true;
1762
+ break;
1763
+ }
1764
+ matchIndex++;
1765
+ }
1766
+ if (!hasMatch) {
1767
+ return false;
1768
+ }
1769
+ index++;
1770
+ }
1771
+ return true;
1772
+ }
1773
+ var areNumbersEqual = sameValueZeroEqual;
1774
+ function areObjectsEqual(a, b, state) {
1775
+ var properties = keys(a);
1776
+ var index = properties.length;
1777
+ if (keys(b).length !== index) {
1778
+ return false;
1779
+ }
1780
+ while (index-- > 0) {
1781
+ if (!isPropertyEqual(a, b, state, properties[index])) {
1782
+ return false;
1783
+ }
1784
+ }
1785
+ return true;
1786
+ }
1787
+ function areObjectsEqualStrict(a, b, state) {
1788
+ var properties = getStrictProperties(a);
1789
+ var index = properties.length;
1790
+ if (getStrictProperties(b).length !== index) {
1791
+ return false;
1792
+ }
1793
+ var property;
1794
+ var descriptorA;
1795
+ var descriptorB;
1796
+ while (index-- > 0) {
1797
+ property = properties[index];
1798
+ if (!isPropertyEqual(a, b, state, property)) {
1799
+ return false;
1800
+ }
1801
+ descriptorA = getOwnPropertyDescriptor(a, property);
1802
+ descriptorB = getOwnPropertyDescriptor(b, property);
1803
+ if ((descriptorA || descriptorB) && (!descriptorA || !descriptorB || descriptorA.configurable !== descriptorB.configurable || descriptorA.enumerable !== descriptorB.enumerable || descriptorA.writable !== descriptorB.writable)) {
1804
+ return false;
1805
+ }
1806
+ }
1807
+ return true;
1808
+ }
1809
+ function arePrimitiveWrappersEqual(a, b) {
1810
+ return sameValueZeroEqual(a.valueOf(), b.valueOf());
1811
+ }
1812
+ function areRegExpsEqual(a, b) {
1813
+ return a.source === b.source && a.flags === b.flags;
1814
+ }
1815
+ function areSetsEqual(a, b, state) {
1816
+ var size = a.size;
1817
+ if (size !== b.size) {
1818
+ return false;
1819
+ }
1820
+ if (!size) {
1821
+ return true;
1822
+ }
1823
+ var matchedIndices = new Array(size);
1824
+ var aIterable = a.values();
1825
+ var aResult;
1826
+ var bResult;
1827
+ while (aResult = aIterable.next()) {
1828
+ if (aResult.done) {
1829
+ break;
1830
+ }
1831
+ var bIterable = b.values();
1832
+ var hasMatch = false;
1833
+ var matchIndex = 0;
1834
+ while (bResult = bIterable.next()) {
1835
+ if (bResult.done) {
1836
+ break;
1837
+ }
1838
+ if (!matchedIndices[matchIndex] && state.equals(aResult.value, bResult.value, aResult.value, bResult.value, a, b, state)) {
1839
+ hasMatch = matchedIndices[matchIndex] = true;
1840
+ break;
1841
+ }
1842
+ matchIndex++;
1843
+ }
1844
+ if (!hasMatch) {
1845
+ return false;
1846
+ }
1847
+ }
1848
+ return true;
1849
+ }
1850
+ function areTypedArraysEqual(a, b) {
1851
+ var index = a.length;
1852
+ if (b.length !== index) {
1853
+ return false;
1854
+ }
1855
+ while (index-- > 0) {
1856
+ if (a[index] !== b[index]) {
1857
+ return false;
1858
+ }
1859
+ }
1860
+ return true;
1861
+ }
1862
+ function areUrlsEqual(a, b) {
1863
+ return a.hostname === b.hostname && a.pathname === b.pathname && a.protocol === b.protocol && a.port === b.port && a.hash === b.hash && a.username === b.username && a.password === b.password;
1864
+ }
1865
+ function isPropertyEqual(a, b, state, property) {
1866
+ if ((property === REACT_OWNER || property === PREACT_OWNER || property === PREACT_VNODE) && (a.$$typeof || b.$$typeof)) {
1867
+ return true;
1868
+ }
1869
+ return hasOwn(b, property) && state.equals(a[property], b[property], property, property, a, b, state);
1870
+ }
1871
+ var ARGUMENTS_TAG = "[object Arguments]";
1872
+ var BOOLEAN_TAG = "[object Boolean]";
1873
+ var DATE_TAG = "[object Date]";
1874
+ var ERROR_TAG = "[object Error]";
1875
+ var MAP_TAG = "[object Map]";
1876
+ var NUMBER_TAG = "[object Number]";
1877
+ var OBJECT_TAG = "[object Object]";
1878
+ var REG_EXP_TAG = "[object RegExp]";
1879
+ var SET_TAG = "[object Set]";
1880
+ var STRING_TAG = "[object String]";
1881
+ var URL_TAG = "[object URL]";
1882
+ var isArray = Array.isArray;
1883
+ var isTypedArray = typeof ArrayBuffer === "function" && ArrayBuffer.isView ? ArrayBuffer.isView : null;
1884
+ var assign = Object.assign;
1885
+ var getTag = Object.prototype.toString.call.bind(Object.prototype.toString);
1886
+ function createEqualityComparator(_a) {
1887
+ var areArraysEqual2 = _a.areArraysEqual, areDatesEqual2 = _a.areDatesEqual, areErrorsEqual2 = _a.areErrorsEqual, areFunctionsEqual2 = _a.areFunctionsEqual, areMapsEqual2 = _a.areMapsEqual, areNumbersEqual2 = _a.areNumbersEqual, areObjectsEqual2 = _a.areObjectsEqual, arePrimitiveWrappersEqual2 = _a.arePrimitiveWrappersEqual, areRegExpsEqual2 = _a.areRegExpsEqual, areSetsEqual2 = _a.areSetsEqual, areTypedArraysEqual2 = _a.areTypedArraysEqual, areUrlsEqual2 = _a.areUrlsEqual;
1888
+ return function comparator(a, b, state) {
1889
+ if (a === b) {
1890
+ return true;
1891
+ }
1892
+ if (a == null || b == null) {
1893
+ return false;
1894
+ }
1895
+ var type = typeof a;
1896
+ if (type !== typeof b) {
1897
+ return false;
1898
+ }
1899
+ if (type !== "object") {
1900
+ if (type === "number") {
1901
+ return areNumbersEqual2(a, b, state);
1902
+ }
1903
+ if (type === "function") {
1904
+ return areFunctionsEqual2(a, b, state);
1905
+ }
1906
+ return false;
1907
+ }
1908
+ var constructor = a.constructor;
1909
+ if (constructor !== b.constructor) {
1910
+ return false;
1911
+ }
1912
+ if (constructor === Object) {
1913
+ return areObjectsEqual2(a, b, state);
1914
+ }
1915
+ if (isArray(a)) {
1916
+ return areArraysEqual2(a, b, state);
1917
+ }
1918
+ if (isTypedArray != null && isTypedArray(a)) {
1919
+ return areTypedArraysEqual2(a, b, state);
1920
+ }
1921
+ if (constructor === Date) {
1922
+ return areDatesEqual2(a, b, state);
1923
+ }
1924
+ if (constructor === RegExp) {
1925
+ return areRegExpsEqual2(a, b, state);
1926
+ }
1927
+ if (constructor === Map) {
1928
+ return areMapsEqual2(a, b, state);
1929
+ }
1930
+ if (constructor === Set) {
1931
+ return areSetsEqual2(a, b, state);
1932
+ }
1933
+ var tag = getTag(a);
1934
+ if (tag === DATE_TAG) {
1935
+ return areDatesEqual2(a, b, state);
1936
+ }
1937
+ if (tag === REG_EXP_TAG) {
1938
+ return areRegExpsEqual2(a, b, state);
1939
+ }
1940
+ if (tag === MAP_TAG) {
1941
+ return areMapsEqual2(a, b, state);
1942
+ }
1943
+ if (tag === SET_TAG) {
1944
+ return areSetsEqual2(a, b, state);
1945
+ }
1946
+ if (tag === OBJECT_TAG) {
1947
+ return typeof a.then !== "function" && typeof b.then !== "function" && areObjectsEqual2(a, b, state);
1948
+ }
1949
+ if (tag === URL_TAG) {
1950
+ return areUrlsEqual2(a, b, state);
1951
+ }
1952
+ if (tag === ERROR_TAG) {
1953
+ return areErrorsEqual2(a, b, state);
1954
+ }
1955
+ if (tag === ARGUMENTS_TAG) {
1956
+ return areObjectsEqual2(a, b, state);
1957
+ }
1958
+ if (tag === BOOLEAN_TAG || tag === NUMBER_TAG || tag === STRING_TAG) {
1959
+ return arePrimitiveWrappersEqual2(a, b, state);
1960
+ }
1961
+ return false;
1962
+ };
1963
+ }
1964
+ function createEqualityComparatorConfig(_a) {
1965
+ var circular = _a.circular, createCustomConfig = _a.createCustomConfig, strict = _a.strict;
1966
+ var config = {
1967
+ areArraysEqual: strict ? areObjectsEqualStrict : areArraysEqual,
1968
+ areDatesEqual,
1969
+ areErrorsEqual,
1970
+ areFunctionsEqual,
1971
+ areMapsEqual: strict ? combineComparators(areMapsEqual, areObjectsEqualStrict) : areMapsEqual,
1972
+ areNumbersEqual,
1973
+ areObjectsEqual: strict ? areObjectsEqualStrict : areObjectsEqual,
1974
+ arePrimitiveWrappersEqual,
1975
+ areRegExpsEqual,
1976
+ areSetsEqual: strict ? combineComparators(areSetsEqual, areObjectsEqualStrict) : areSetsEqual,
1977
+ areTypedArraysEqual: strict ? areObjectsEqualStrict : areTypedArraysEqual,
1978
+ areUrlsEqual
1979
+ };
1980
+ if (createCustomConfig) {
1981
+ config = assign({}, config, createCustomConfig(config));
1982
+ }
1983
+ if (circular) {
1984
+ var areArraysEqual$1 = createIsCircular(config.areArraysEqual);
1985
+ var areMapsEqual$1 = createIsCircular(config.areMapsEqual);
1986
+ var areObjectsEqual$1 = createIsCircular(config.areObjectsEqual);
1987
+ var areSetsEqual$1 = createIsCircular(config.areSetsEqual);
1988
+ config = assign({}, config, {
1989
+ areArraysEqual: areArraysEqual$1,
1990
+ areMapsEqual: areMapsEqual$1,
1991
+ areObjectsEqual: areObjectsEqual$1,
1992
+ areSetsEqual: areSetsEqual$1
1993
+ });
1994
+ }
1995
+ return config;
1996
+ }
1997
+ function createInternalEqualityComparator(compare) {
1998
+ return function(a, b, _indexOrKeyA, _indexOrKeyB, _parentA, _parentB, state) {
1999
+ return compare(a, b, state);
2000
+ };
2001
+ }
2002
+ function createIsEqual(_a) {
2003
+ var circular = _a.circular, comparator = _a.comparator, createState = _a.createState, equals = _a.equals, strict = _a.strict;
2004
+ if (createState) {
2005
+ return function isEqual(a, b) {
2006
+ var _a2 = createState(), _b = _a2.cache, cache2 = _b === void 0 ? circular ? /* @__PURE__ */ new WeakMap() : void 0 : _b, meta = _a2.meta;
2007
+ return comparator(a, b, {
2008
+ cache: cache2,
2009
+ equals,
2010
+ meta,
2011
+ strict
2012
+ });
2013
+ };
2014
+ }
2015
+ if (circular) {
2016
+ return function isEqual(a, b) {
2017
+ return comparator(a, b, {
2018
+ cache: /* @__PURE__ */ new WeakMap(),
2019
+ equals,
2020
+ meta: void 0,
2021
+ strict
2022
+ });
2023
+ };
2024
+ }
2025
+ var state = {
2026
+ cache: void 0,
2027
+ equals,
2028
+ meta: void 0,
2029
+ strict
2030
+ };
2031
+ return function isEqual(a, b) {
2032
+ return comparator(a, b, state);
2033
+ };
2034
+ }
2035
+ var deepEqual = createCustomEqual();
2036
+ var strictDeepEqual = createCustomEqual({ strict: true });
2037
+ var circularDeepEqual = createCustomEqual({ circular: true });
2038
+ var strictCircularDeepEqual = createCustomEqual({
2039
+ circular: true,
2040
+ strict: true
2041
+ });
2042
+ var shallowEqual = createCustomEqual({
2043
+ createInternalComparator: function() {
2044
+ return sameValueZeroEqual;
2045
+ }
2046
+ });
2047
+ var strictShallowEqual = createCustomEqual({
2048
+ strict: true,
2049
+ createInternalComparator: function() {
2050
+ return sameValueZeroEqual;
2051
+ }
2052
+ });
2053
+ var circularShallowEqual = createCustomEqual({
2054
+ circular: true,
2055
+ createInternalComparator: function() {
2056
+ return sameValueZeroEqual;
2057
+ }
2058
+ });
2059
+ var strictCircularShallowEqual = createCustomEqual({
2060
+ circular: true,
2061
+ createInternalComparator: function() {
2062
+ return sameValueZeroEqual;
2063
+ },
2064
+ strict: true
2065
+ });
2066
+ function createCustomEqual(options) {
2067
+ if (options === void 0) {
2068
+ options = {};
2069
+ }
2070
+ var _a = options.circular, circular = _a === void 0 ? false : _a, createCustomInternalComparator = options.createInternalComparator, createState = options.createState, _b = options.strict, strict = _b === void 0 ? false : _b;
2071
+ var config = createEqualityComparatorConfig(options);
2072
+ var comparator = createEqualityComparator(config);
2073
+ var equals = createCustomInternalComparator ? createCustomInternalComparator(comparator) : createInternalEqualityComparator(comparator);
2074
+ return createIsEqual({ circular, comparator, createState, equals, strict });
2075
+ }
2076
+
2077
+ // ../core/lib/get-changed.ts
1702
2078
  var getChanged = (newItem, oldItem) => {
1703
2079
  return newItem ? Object.keys(newItem.props || {}).reduce((acc, item) => {
1704
2080
  const newItemProps = (newItem == null ? void 0 : newItem.props) || {};
1705
2081
  const oldItemProps = (oldItem == null ? void 0 : oldItem.props) || {};
1706
2082
  return __spreadProps(__spreadValues({}, acc), {
1707
- [item]: !(0, import_fast_deep_equal.default)(oldItemProps[item], newItemProps[item])
2083
+ [item]: !deepEqual(oldItemProps[item], newItemProps[item])
1708
2084
  });
1709
2085
  }, {}) : {};
1710
2086
  };
1711
2087
 
1712
2088
  // ../core/store/slices/permissions.ts
1713
2089
  var createPermissionsSlice = (set, get) => {
1714
- const resolvePermissions = (..._0) => __async(void 0, [..._0], function* (params = {}, force) {
2090
+ const resolvePermissions = (..._0) => __async(null, [..._0], function* (params = {}, force) {
1715
2091
  const { state, permissions, config } = get();
1716
2092
  const { cache: cache2, globalPermissions } = permissions;
1717
- const resolveDataForItem = (item2, force2 = false) => __async(void 0, null, function* () {
2093
+ const resolveDataForItem = (item2, force2 = false) => __async(null, null, function* () {
1718
2094
  var _a, _b, _c;
1719
2095
  const { config: config2, state: appState, setComponentLoading } = get();
1720
2096
  const componentConfig = item2.type === "root" ? config2.root : config2.components[item2.type];
@@ -1769,13 +2145,13 @@ var createPermissionsSlice = (set, get) => {
1769
2145
  if (item) {
1770
2146
  yield resolveDataForItem(item, force);
1771
2147
  } else if (type) {
1772
- flattenData(state, config).filter((item2) => item2.type === type).map((item2) => __async(void 0, null, function* () {
2148
+ flattenData(state, config).filter((item2) => item2.type === type).map((item2) => __async(null, null, function* () {
1773
2149
  yield resolveDataForItem(item2, force);
1774
2150
  }));
1775
2151
  } else if (root) {
1776
2152
  resolveDataForRoot(force);
1777
2153
  } else {
1778
- flattenData(state, config).map((item2) => __async(void 0, null, function* () {
2154
+ flattenData(state, config).map((item2) => __async(null, null, function* () {
1779
2155
  yield resolveDataForItem(item2, force);
1780
2156
  }));
1781
2157
  }
@@ -1829,16 +2205,15 @@ var createFieldsSlice = (_set, _get) => {
1829
2205
 
1830
2206
  // ../core/lib/resolve-component-data.ts
1831
2207
  init_react_import();
1832
- var import_fast_deep_equal2 = __toESM(require_fast_deep_equal());
1833
2208
  var cache = { lastChange: {} };
1834
- var resolveComponentData = (_0, _1, ..._2) => __async(void 0, [_0, _1, ..._2], function* (item, config, metadata = {}, onResolveStart, onResolveEnd, trigger = "replace") {
2209
+ var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], function* (item, config, metadata = {}, onResolveStart, onResolveEnd, trigger = "replace") {
1835
2210
  const configForItem = "type" in item && item.type !== "root" ? config.components[item.type] : config.root;
1836
2211
  const resolvedItem = __spreadValues({}, item);
1837
2212
  const shouldRunResolver = (configForItem == null ? void 0 : configForItem.resolveData) && item.props;
1838
2213
  const id = "id" in item.props ? item.props.id : "root";
1839
2214
  if (shouldRunResolver) {
1840
2215
  const { item: oldItem = null, resolved = {} } = cache.lastChange[id] || {};
1841
- if (trigger !== "force" && item && (0, import_fast_deep_equal2.default)(item, oldItem)) {
2216
+ if (trigger !== "force" && item && deepEqual(item, oldItem)) {
1842
2217
  return { node: resolved, didChange: false };
1843
2218
  }
1844
2219
  const changed = getChanged(item, oldItem);
@@ -1859,11 +2234,11 @@ var resolveComponentData = (_0, _1, ..._2) => __async(void 0, [_0, _1, ..._2], f
1859
2234
  let itemWithResolvedChildren = yield mapFields(
1860
2235
  resolvedItem,
1861
2236
  {
1862
- slot: (_02) => __async(void 0, [_02], function* ({ value }) {
2237
+ slot: (_02) => __async(null, [_02], function* ({ value }) {
1863
2238
  const content = value;
1864
2239
  return yield Promise.all(
1865
2240
  content.map(
1866
- (childItem) => __async(void 0, null, function* () {
2241
+ (childItem) => __async(null, null, function* () {
1867
2242
  return (yield resolveComponentData(
1868
2243
  childItem,
1869
2244
  config,
@@ -1888,7 +2263,7 @@ var resolveComponentData = (_0, _1, ..._2) => __async(void 0, [_0, _1, ..._2], f
1888
2263
  };
1889
2264
  return {
1890
2265
  node: itemWithResolvedChildren,
1891
- didChange: !(0, import_fast_deep_equal2.default)(item, itemWithResolvedChildren)
2266
+ didChange: !deepEqual(item, itemWithResolvedChildren)
1892
2267
  };
1893
2268
  });
1894
2269
 
@@ -2053,7 +2428,7 @@ var createAppStore = (initialAppStore) => create()(
2053
2428
  const selectedItem = state.ui.itemSelector ? getItem(state.ui.itemSelector, state) : null;
2054
2429
  return __spreadProps(__spreadValues({}, s), { state, selectedItem });
2055
2430
  }),
2056
- resolveComponentData: (componentData, trigger) => __async(void 0, null, function* () {
2431
+ resolveComponentData: (componentData, trigger) => __async(null, null, function* () {
2057
2432
  const { config, metadata, setComponentLoading, permissions } = get();
2058
2433
  const timeouts = {};
2059
2434
  return yield resolveComponentData(
@@ -2064,7 +2439,7 @@ var createAppStore = (initialAppStore) => create()(
2064
2439
  const id = "id" in item.props ? item.props.id : "root";
2065
2440
  timeouts[id] = setComponentLoading(id, true, 50);
2066
2441
  },
2067
- (item) => __async(void 0, null, function* () {
2442
+ (item) => __async(null, null, function* () {
2068
2443
  const id = "id" in item.props ? item.props.id : "root";
2069
2444
  if ("type" in item) {
2070
2445
  yield permissions.refreshPermissions({ item });
@@ -2076,7 +2451,7 @@ var createAppStore = (initialAppStore) => create()(
2076
2451
  trigger
2077
2452
  );
2078
2453
  }),
2079
- resolveAndCommitData: () => __async(void 0, null, function* () {
2454
+ resolveAndCommitData: () => __async(null, null, function* () {
2080
2455
  const { config, state, dispatch, resolveComponentData: resolveComponentData2 } = get();
2081
2456
  walkAppState(
2082
2457
  state,
@@ -2500,45 +2875,10 @@ classnames/index.js:
2500
2875
  *)
2501
2876
 
2502
2877
  lucide-react/dist/esm/shared/src/utils.js:
2503
- (**
2504
- * @license lucide-react v0.468.0 - ISC
2505
- *
2506
- * This source code is licensed under the ISC license.
2507
- * See the LICENSE file in the root directory of this source tree.
2508
- *)
2509
-
2510
2878
  lucide-react/dist/esm/defaultAttributes.js:
2511
- (**
2512
- * @license lucide-react v0.468.0 - ISC
2513
- *
2514
- * This source code is licensed under the ISC license.
2515
- * See the LICENSE file in the root directory of this source tree.
2516
- *)
2517
-
2518
2879
  lucide-react/dist/esm/Icon.js:
2519
- (**
2520
- * @license lucide-react v0.468.0 - ISC
2521
- *
2522
- * This source code is licensed under the ISC license.
2523
- * See the LICENSE file in the root directory of this source tree.
2524
- *)
2525
-
2526
2880
  lucide-react/dist/esm/createLucideIcon.js:
2527
- (**
2528
- * @license lucide-react v0.468.0 - ISC
2529
- *
2530
- * This source code is licensed under the ISC license.
2531
- * See the LICENSE file in the root directory of this source tree.
2532
- *)
2533
-
2534
2881
  lucide-react/dist/esm/icons/chevron-right.js:
2535
- (**
2536
- * @license lucide-react v0.468.0 - ISC
2537
- *
2538
- * This source code is licensed under the ISC license.
2539
- * See the LICENSE file in the root directory of this source tree.
2540
- *)
2541
-
2542
2882
  lucide-react/dist/esm/lucide-react.js:
2543
2883
  (**
2544
2884
  * @license lucide-react v0.468.0 - ISC