@fluid-topics/ft-wc-utils 0.3.52 → 0.3.54

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.
@@ -148,4 +148,4 @@ var vt;const pt=null!=(null===(vt=window.HTMLSlotElement)||void 0===vt?void 0:vt
148
148
  -webkit-hyphens: auto;
149
149
  hyphens: auto
150
150
  }
151
- `;function Zt(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+t+(n.length?" "+n.map((function(t){return"'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Xt(t){return!!t&&!!t[Fe]}function Gt(t){return!!t&&(function(t){if(!t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;var n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===Le}(t)||Array.isArray(t)||!!t[Ue]||!!t.constructor[Ue]||re(t)||ie(t))}function Qt(t,e,n){void 0===n&&(n=!1),0===Yt(t)?(n?Object.keys:Te)(t).forEach((function(r){n&&"symbol"==typeof r||e(r,t[r],t)})):t.forEach((function(n,r){return e(r,n,t)}))}function Yt(t){var e=t[Fe];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:re(t)?2:ie(t)?3:0}function te(t,e){return 2===Yt(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function ee(t,e,n){var r=Yt(t);2===r?t.set(e,n):3===r?(t.delete(e),t.add(n)):t[e]=n}function ne(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function re(t){return $e&&t instanceof Map}function ie(t){return _e&&t instanceof Set}function oe(t){return t.o||t.t}function se(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=De(t);delete e[Fe];for(var n=Te(e),r=0;r<n.length;r++){var i=n[r],o=e[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(e[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function ue(t,e){return void 0===e&&(e=!1),ae(t)||Xt(t)||!Gt(t)||(Yt(t)>1&&(t.set=t.add=t.clear=t.delete=ce),Object.freeze(t),e&&Qt(t,(function(t,e){return ue(e,!0)}),!0)),t}function ce(){Zt(2)}function ae(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function le(t){var e=Be[t];return e||Zt(18,t),e}function fe(){return Me}function he(t,e){e&&(le("Patches"),t.u=[],t.s=[],t.v=e)}function de(t){ve(t),t.p.forEach(be),t.p=null}function ve(t){t===Me&&(Me=t.l)}function pe(t){return Me={p:[],l:Me,h:t,m:!0,_:0}}function be(t){var e=t[Fe];0===e.i||1===e.i?e.j():e.O=!0}function ye(t,e){e._=e.p.length;var n=e.p[0],r=void 0!==t&&t!==n;return e.h.g||le("ES5").S(e,t,r),r?(n[Fe].P&&(de(e),Zt(4)),Gt(t)&&(t=me(e,t),e.l||ge(e,t)),e.u&&le("Patches").M(n[Fe].t,t,e.u,e.s)):t=me(e,n,[]),de(e),e.u&&e.v(e.u,e.s),t!==ke?t:void 0}function me(t,e,n){if(ae(e))return e;var r=e[Fe];if(!r)return Qt(e,(function(i,o){return we(t,r,e,i,o,n)}),!0),e;if(r.A!==t)return e;if(!r.P)return ge(t,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=4===r.i||5===r.i?r.o=se(r.k):r.o;Qt(3===r.i?new Set(i):i,(function(e,o){return we(t,r,i,e,o,n)})),ge(t,i,!1),n&&t.u&&le("Patches").R(r,n,t.u,t.s)}return r.o}function we(t,e,n,r,i,o){if(Xt(i)){var s=me(t,i,o&&e&&3!==e.i&&!te(e.D,r)?o.concat(r):void 0);if(ee(n,r,s),!Xt(s))return;t.m=!1}if(Gt(i)&&!ae(i)){if(!t.h.F&&t._<1)return;me(t,i),e&&e.A.l||ge(t,i)}}function ge(t,e,n){void 0===n&&(n=!1),t.h.F&&t.m&&ue(e,n)}function Oe(t,e){var n=t[Fe];return(n?oe(n):t)[e]}function xe(t,e){if(e in t)for(var n=Object.getPrototypeOf(t);n;){var r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function Se(t){t.P||(t.P=!0,t.l&&Se(t.l))}function Ee(t){t.o||(t.o=se(t.t))}function je(t,e,n){var r=re(e)?le("MapSet").N(e,n):ie(e)?le("MapSet").T(e,n):t.g?function(t,e){var n=Array.isArray(t),r={i:n?1:0,A:e?e.A:fe(),P:!1,I:!1,D:{},l:e,t,k:null,o:null,j:null,C:!1},i=r,o=We;n&&(i=[r],o=Ie);var s=Proxy.revocable(i,o),u=s.revoke,c=s.proxy;return r.k=c,r.j=u,c}(e,n):le("ES5").J(e,n);return(n?n.A:fe()).p.push(r),r}function Re(t){return Xt(t)||Zt(22,t),function t(e){if(!Gt(e))return e;var n,r=e[Fe],i=Yt(e);if(r){if(!r.P&&(r.i<4||!le("ES5").K(r)))return r.t;r.I=!0,n=Ce(e,i),r.I=!1}else n=Ce(e,i);return Qt(n,(function(e,i){r&&function(t,e){return 2===Yt(t)?t.get(e):t[e]}(r.t,e)===i||ee(n,e,t(i))})),3===i?new Set(n):n}(t)}function Ce(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return se(t)}var Ne,Me,Ae="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),$e="undefined"!=typeof Map,_e="undefined"!=typeof Set,Pe="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,ke=Ae?Symbol.for("immer-nothing"):((Ne={})["immer-nothing"]=!0,Ne),Ue=Ae?Symbol.for("immer-draftable"):"__$immer_draftable",Fe=Ae?Symbol.for("immer-state"):"__$immer_state",Le=""+Object.prototype.constructor,Te="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,De=Object.getOwnPropertyDescriptors||function(t){var e={};return Te(t).forEach((function(n){e[n]=Object.getOwnPropertyDescriptor(t,n)})),e},Be={},We={get:function(t,e){if(e===Fe)return t;var n=oe(t);if(!te(n,e))return function(t,e,n){var r,i=xe(e,n);return i?"value"in i?i.value:null===(r=i.get)||void 0===r?void 0:r.call(t.k):void 0}(t,n,e);var r=n[e];return t.I||!Gt(r)?r:r===Oe(t.t,e)?(Ee(t),t.o[e]=je(t.A.h,r,t)):r},has:function(t,e){return e in oe(t)},ownKeys:function(t){return Reflect.ownKeys(oe(t))},set:function(t,e,n){var r=xe(oe(t),e);if(null==r?void 0:r.set)return r.set.call(t.k,n),!0;if(!t.P){var i=Oe(oe(t),e),o=null==i?void 0:i[Fe];if(o&&o.t===n)return t.o[e]=n,t.D[e]=!1,!0;if(ne(n,i)&&(void 0!==n||te(t.t,e)))return!0;Ee(t),Se(t)}return t.o[e]===n&&"number"!=typeof n&&(void 0!==n||e in t.o)||(t.o[e]=n,t.D[e]=!0,!0)},deleteProperty:function(t,e){return void 0!==Oe(t.t,e)||e in t.t?(t.D[e]=!1,Ee(t),Se(t)):delete t.D[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var n=oe(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:r.enumerable,value:n[e]}:r},defineProperty:function(){Zt(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Zt(12)}},Ie={};Qt(We,(function(t,e){Ie[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),Ie.deleteProperty=function(t,e){return Ie.set.call(this,t,e,void 0)},Ie.set=function(t,e,n){return We.set.call(this,t[0],e,n,t[0])};var He=function(){function t(t){var e=this;this.g=Pe,this.F=!0,this.produce=function(t,n,r){if("function"==typeof t&&"function"!=typeof n){var i=n;n=t;var o=e;return function(t){var e=this;void 0===t&&(t=i);for(var r=arguments.length,s=Array(r>1?r-1:0),u=1;u<r;u++)s[u-1]=arguments[u];return o.produce(t,(function(t){var r;return(r=n).call.apply(r,[e,t].concat(s))}))}}var s;if("function"!=typeof n&&Zt(6),void 0!==r&&"function"!=typeof r&&Zt(7),Gt(t)){var u=pe(e),c=je(e,t,void 0),a=!0;try{s=n(c),a=!1}finally{a?de(u):ve(u)}return"undefined"!=typeof Promise&&s instanceof Promise?s.then((function(t){return he(u,r),ye(t,u)}),(function(t){throw de(u),t})):(he(u,r),ye(s,u))}if(!t||"object"!=typeof t){if(void 0===(s=n(t))&&(s=t),s===ke&&(s=void 0),e.F&&ue(s,!0),r){var l=[],f=[];le("Patches").M(t,s,l,f),r(l,f)}return s}Zt(21,t)},this.produceWithPatches=function(t,n){if("function"==typeof t)return function(n){for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return e.produceWithPatches(n,(function(e){return t.apply(void 0,[e].concat(i))}))};var r,i,o=e.produce(t,n,(function(t,e){r=t,i=e}));return"undefined"!=typeof Promise&&o instanceof Promise?o.then((function(t){return[t,r,i]})):[o,r,i]},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}var e=t.prototype;return e.createDraft=function(t){Gt(t)||Zt(8),Xt(t)&&(t=Re(t));var e=pe(this),n=je(this,t,void 0);return n[Fe].C=!0,ve(e),n},e.finishDraft=function(t,e){var n=(t&&t[Fe]).A;return he(n,e),ye(void 0,n)},e.setAutoFreeze=function(t){this.F=t},e.setUseProxies=function(t){t&&!Pe&&Zt(20),this.g=t},e.applyPatches=function(t,e){var n;for(n=e.length-1;n>=0;n--){var r=e[n];if(0===r.path.length&&"replace"===r.op){t=r.value;break}}n>-1&&(e=e.slice(n+1));var i=le("Patches").$;return Xt(t)?i(t,e):this.produce(t,(function(t){return i(t,e)}))},t}(),Ke=new He,qe=Ke.produce;Ke.produceWithPatches.bind(Ke),Ke.setAutoFreeze.bind(Ke),Ke.setUseProxies.bind(Ke),Ke.applyPatches.bind(Ke),Ke.createDraft.bind(Ke),Ke.finishDraft.bind(Ke);var ze=qe;function Ve(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Je(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ze(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Je(Object(n),!0).forEach((function(e){Ve(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Je(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Xe(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Ge="function"==typeof Symbol&&Symbol.observable||"@@observable",Qe=function(){return Math.random().toString(36).substring(7).split("").join(".")},Ye={INIT:"@@redux/INIT"+Qe(),REPLACE:"@@redux/REPLACE"+Qe(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Qe()}};function tn(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function en(t,e,n){var r;if("function"==typeof e&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(Xe(0));if("function"==typeof e&&void 0===n&&(n=e,e=void 0),void 0!==n){if("function"!=typeof n)throw new Error(Xe(1));return n(en)(t,e)}if("function"!=typeof t)throw new Error(Xe(2));var i=t,o=e,s=[],u=s,c=!1;function a(){u===s&&(u=s.slice())}function l(){if(c)throw new Error(Xe(3));return o}function f(t){if("function"!=typeof t)throw new Error(Xe(4));if(c)throw new Error(Xe(5));var e=!0;return a(),u.push(t),function(){if(e){if(c)throw new Error(Xe(6));e=!1,a();var n=u.indexOf(t);u.splice(n,1),s=null}}}function h(t){if(!tn(t))throw new Error(Xe(7));if(void 0===t.type)throw new Error(Xe(8));if(c)throw new Error(Xe(9));try{c=!0,o=i(o,t)}finally{c=!1}for(var e=s=u,n=0;n<e.length;n++)(0,e[n])();return t}function d(t){if("function"!=typeof t)throw new Error(Xe(10));i=t,h({type:Ye.REPLACE})}function v(){var t,e=f;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(Xe(11));function n(){t.next&&t.next(l())}return n(),{unsubscribe:e(n)}}})[Ge]=function(){return this},t}return h({type:Ye.INIT}),(r={dispatch:h,subscribe:f,getState:l,replaceReducer:d})[Ge]=v,r}function nn(t){for(var e=Object.keys(t),n={},r=0;r<e.length;r++){var i=e[r];"function"==typeof t[i]&&(n[i]=t[i])}var o,s=Object.keys(n);try{!function(t){Object.keys(t).forEach((function(e){var n=t[e];if(void 0===n(void 0,{type:Ye.INIT}))throw new Error(Xe(12));if(void 0===n(void 0,{type:Ye.PROBE_UNKNOWN_ACTION()}))throw new Error(Xe(13))}))}(n)}catch(t){o=t}return function(t,e){if(void 0===t&&(t={}),o)throw o;for(var r=!1,i={},u=0;u<s.length;u++){var c=s[u],a=n[c],l=t[c],f=a(l,e);if(void 0===f)throw e&&e.type,new Error(Xe(14));i[c]=f,r=r||f!==l}return(r=r||s.length!==Object.keys(t).length)?i:t}}function rn(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}function on(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return function(){var n=t.apply(void 0,arguments),r=function(){throw new Error(Xe(15))},i={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},o=e.map((function(t){return t(i)}));return r=rn.apply(void 0,o)(n.dispatch),Ze(Ze({},n),{},{dispatch:r})}}}function sn(t){return function(e){var n=e.dispatch,r=e.getState;return function(e){return function(i){return"function"==typeof i?i(n,r,t):e(i)}}}}var un=sn();un.withExtraArgument=sn;var cn,an=un,ln=(cn=function(t,e){return cn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},cn(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}cn(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),fn=function(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t},hn=Object.defineProperty,dn=Object.getOwnPropertySymbols,vn=Object.prototype.hasOwnProperty,pn=Object.prototype.propertyIsEnumerable,bn=function(t,e,n){return e in t?hn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n},yn=function(t,e){for(var n in e||(e={}))vn.call(e,n)&&bn(t,n,e[n]);if(dn)for(var r=0,i=dn(e);r<i.length;r++)n=i[r],pn.call(e,n)&&bn(t,n,e[n]);return t},mn="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?rn:rn.apply(null,arguments)},wn=function(t){function e(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=t.apply(this,n)||this;return Object.setPrototypeOf(i,e.prototype),i}return ln(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,fn([void 0],t[0].concat(this)))):new(e.bind.apply(e,fn([void 0],t.concat(this))))},e}(Array);function gn(t){return Gt(t)?ze(t,(function(){})):t}function On(){return function(t){return function(t){void 0===t&&(t={});var e=t.thunk,n=void 0===e||e;t.immutableCheck,t.serializableCheck;var r=new wn;return n&&(function(t){return"boolean"==typeof t}(n)?r.push(an):r.push(an.withExtraArgument(n.extraArgument))),r}(t)}}function xn(t){var e,n=On(),r=t||{},i=r.reducer,o=void 0===i?void 0:i,s=r.middleware,u=void 0===s?n():s,c=r.devTools,a=void 0===c||c,l=r.preloadedState,f=void 0===l?void 0:l,h=r.enhancers,d=void 0===h?void 0:h;if("function"==typeof o)e=o;else{if(!function(t){if("object"!=typeof t||null===t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;for(var n=e;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return e===n}(o))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');e=nn(o)}var v=u;"function"==typeof v&&(v=v(n));var p=on.apply(void 0,v),b=rn;a&&(b=mn(yn({trace:!1},"object"==typeof a&&a)));var y=[p];return Array.isArray(d)?y=fn([p],d):"function"==typeof d&&(y=d(y)),en(e,f,b.apply(void 0,y))}function Sn(t,e){function n(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];if(e){var i=e.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return yn(yn({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:t,payload:n[0]}}return n.toString=function(){return""+t},n.type=t,n.match=function(e){return e.type===t},n}function En(t){var e,n={},r=[],i={addCase:function(t,e){var r="string"==typeof t?t:t.type;if(r in n)throw new Error("addCase cannot be called with two reducers for the same action type");return n[r]=e,i},addMatcher:function(t,e){return r.push({matcher:t,reducer:e}),i},addDefaultCase:function(t){return e=t,i}};return t(i),[n,r,e]}function jn(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");var n,r="function"==typeof t.initialState?t.initialState:gn(t.initialState),i=t.reducers||{},o=Object.keys(i),s={},u={},c={};function a(){var e="function"==typeof t.extraReducers?En(t.extraReducers):[t.extraReducers],n=e[0],i=void 0===n?{}:n,o=e[1],s=void 0===o?[]:o,c=e[2],a=void 0===c?void 0:c,l=yn(yn({},i),u);return function(t,e,n,r){void 0===n&&(n=[]);var i,o="function"==typeof e?En(e):[e,n,r],s=o[0],u=o[1],c=o[2];if(function(t){return"function"==typeof t}(t))i=function(){return gn(t())};else{var a=gn(t);i=function(){return a}}function l(t,e){void 0===t&&(t=i());var n=fn([s[e.type]],u.filter((function(t){return(0,t.matcher)(e)})).map((function(t){return t.reducer})));return 0===n.filter((function(t){return!!t})).length&&(n=[c]),n.reduce((function(t,n){if(n){var r;if(Xt(t))return void 0===(r=n(t,e))?t:r;if(Gt(t))return ze(t,(function(t){return n(t,e)}));if(void 0===(r=n(t,e))){if(null===t)return t;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}return t}),t)}return l.getInitialState=i,l}(r,l,s,a)}return o.forEach((function(t){var n,r,o=i[t],a=e+"/"+t;"reducer"in o?(n=o.reducer,r=o.prepare):n=o,s[t]=n,u[a]=n,c[t]=r?Sn(a,r):Sn(a)})),{name:e,reducer:function(t,e){return n||(n=a()),n(t,e)},actions:c,caseReducers:s,getInitialState:function(){return n||(n=a()),n.getInitialState()}}}var Rn,Cn,Nn,Mn="listenerMiddleware";function An(t){var e;return null===(e=t)||void 0===e?void 0:e.isFtReduxStore}Sn(Mn+"/add"),Sn(Mn+"/removeAll"),Sn(Mn+"/remove"),function(){function t(t,e){var n=i[t];return n?n.enumerable=e:i[t]=n={configurable:!0,enumerable:e,get:function(){var e=this[Fe];return We.get(e,t)},set:function(e){var n=this[Fe];We.set(n,t,e)}},n}function e(t){for(var e=t.length-1;e>=0;e--){var i=t[e][Fe];if(!i.P)switch(i.i){case 5:r(i)&&Se(i);break;case 4:n(i)&&Se(i)}}}function n(t){for(var e=t.t,n=t.k,r=Te(n),i=r.length-1;i>=0;i--){var o=r[i];if(o!==Fe){var s=e[o];if(void 0===s&&!te(e,o))return!0;var u=n[o],c=u&&u[Fe];if(c?c.t!==s:!ne(u,s))return!0}}var a=!!e[Fe];return r.length!==Te(e).length+(a?0:1)}function r(t){var e=t.k;if(e.length!==t.t.length)return!0;var n=Object.getOwnPropertyDescriptor(e,e.length-1);if(n&&!n.get)return!0;for(var r=0;r<e.length;r++)if(!e.hasOwnProperty(r))return!0;return!1}var i={};!function(t,e){Be[t]||(Be[t]=e)}("ES5",{J:function(e,n){var r=Array.isArray(e),i=function(e,n){if(e){for(var r=Array(n.length),i=0;i<n.length;i++)Object.defineProperty(r,""+i,t(i,!0));return r}var o=De(n);delete o[Fe];for(var s=Te(o),u=0;u<s.length;u++){var c=s[u];o[c]=t(c,e||!!o[c].enumerable)}return Object.create(Object.getPrototypeOf(n),o)}(r,e),o={i:r?5:4,A:n?n.A:fe(),P:!1,I:!1,D:{},l:n,t:e,k:i,o:null,O:!1,C:!1};return Object.defineProperty(i,Fe,{value:o,writable:!0}),i},S:function(t,n,i){i?Xt(n)&&n[Fe].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var n=e[Fe];if(n){var i=n.t,o=n.k,s=n.D,u=n.i;if(4===u)Qt(o,(function(e){e!==Fe&&(void 0!==i[e]||te(i,e)?s[e]||t(o[e]):(s[e]=!0,Se(n)))})),Qt(i,(function(t){void 0!==o[t]||te(o,t)||(s[t]=!1,Se(n))}));else if(5===u){if(r(n)&&(Se(n),s.length=!0),o.length<i.length)for(var c=o.length;c<i.length;c++)s[c]=!1;else for(var a=i.length;a<o.length;a++)s[a]=!0;for(var l=Math.min(o.length,i.length),f=0;f<l;f++)o.hasOwnProperty(f)||(s[f]=!0),void 0===s[f]&&t(o[f])}}}}(t.p[0]),e(t.p))},K:function(t){return 4===t.i?n(t):r(t)}})}();class $n{constructor(t,e){this.reduxSlice=t,this.reduxStore=e,this.isFtReduxStore=!0,this.actions=new Proxy(this.reduxSlice.actions,{get:(t,e,n)=>{const r=t[e];if(r)return(...t)=>{const e=r(...t);return this.reduxStore.dispatch(e),e}}})}static get(t){window.ftReduxStores||(window.ftReduxStores={});const e=window.ftReduxStores[t.name];if(An(e))return e;const n=jn(t);if(e)return new $n(n,e);const r=xn({reducer:n.reducer});return window.ftReduxStores[t.name]=new $n(n,r)}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}}const _n=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(Nn=null===(Cn=null===(Rn=window.safari)||void 0===Rn?void 0:Rn.pushNotification)||void 0===Cn?void 0:Cn.toString())&&void 0!==Nn?Nn:"");var Pn=Object.freeze({__proto__:null,isSafari:_n,CacheRegistry:class{constructor(){this.loaders={},this.content={},this.finalContent=new Set}register(t,e){this.loaders[t]=e,this.finalContent.delete(t)}registerFinal(t,e){this.loaders[t]=e,this.finalContent.add(t)}clearAll(){for(let t in this.content)this.clear(t)}clear(t){this.finalContent.has(t)||(this.content[t]instanceof Tt&&this.content[t].cancel(),delete this.content[t])}async get(t,e){if(void 0===this.content[t]){if(null==(e=null!=e?e:this.loaders[t]))throw new Error("Unknown cache key "+t);const n=Dt(e());return this.content[t]=n,n.then((e=>(this.content[t]=e,e)))}if(this.content[t]instanceof Error)throw this.content[t];return this.content[t]}getNow(t){if(!(this.content[t]instanceof Promise||this.content[t]instanceof Error))return this.content[t]}},CancelablePromise:Tt,cancelable:Dt,Debouncer:Bt,customElement:t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)},jsonProperty:Wt,deepEqual:It,delay:t=>new Promise((e=>setTimeout(e,t))),designSystemVariables:Kt,FtCssVariableFactory:Ht,setVariable:function(t,e){return s(`${t.name}: ${e}`)},FtLitElement:zt,noTextSelect:Vt,wordWrap:Jt,ParametrizedLabelResolver:class{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var n,r;let i=null!==(r=null!==(n=this.labels[t])&&void 0!==n?n:this.defaultLabels[t])&&void 0!==r?r:"";return e.forEach(((t,e)=>i=i.replace(new RegExp(`\\{${e}\\}`,"g"),t))),i}},redux:(t,e)=>{var n;const r="function"==typeof t?{}:null!=t?t:{};return e=null!==(n=null!=e?e:r.hasChanged)&&void 0!==n?n:(t,e)=>!It(t,e),(n,i)=>{var o;n.constructor.createProperty(i,{attribute:!1,hasChanged:e});const s=n;s.reduxProperties=s.reduxProperties||new Map;const u=null!==(o="function"==typeof t?t:r.selector)&&void 0!==o?o:t=>t[i];s.reduxProperties.set(i,{selector:u,store:r.store})}},FtLitElementRedux:class extends zt{constructor(){super(...arguments),this.internalStoresUnsubscribers=new Map,this.internalStores=new Map}getUnnamedStore(){if(this.internalStores.size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this.internalStores.values()][0]}get store(){return this.getUnnamedStore()}set store(t){this.unsubscribeFromStores(),this.internalStores.clear(),t&&this.addStore(t)}getStore(t){var e;return null==t?null!==(e=this.getUnnamedStore())&&void 0!==e?e:this.store:this.internalStores.get(t)}addStore(t,e){e=null!=e?e:An(t)?t.name:"ft-lit-element-redux-default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:An(t)?t.name:"ft-lit-element-redux-default-store";this.unsubscribeFromStore(e),this.internalStores.delete(e)}setupStore(t,e){this.internalStores.set(t,e),this.updateFromStores(),this.subscribeToStore(t,e)}setupStores(){this.unsubscribeFromStores(),this.updateFromStores(),this.internalStores.forEach(((t,e)=>this.subscribeToStore(e,t)))}updateFromStores(){this.reduxProperties&&this.reduxProperties.forEach(((t,e)=>{const n=this.getStore(t.store);n&&(this[e]=t.selector(n.getState(),this))}))}subscribeToStore(t,e){this.internalStoresUnsubscribers.set(t,e.subscribe((()=>this.updateFromStores()))),this.onStoreAvailable(t)}unsubscribeFromStores(){Object.keys(this.internalStoresUnsubscribers).forEach((t=>this.unsubscribeFromStore(t)))}unsubscribeFromStore(t){this.internalStoresUnsubscribers.has(t)&&this.internalStoresUnsubscribers.get(t)(),this.internalStoresUnsubscribers.delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){this.unsubscribeFromStores(),super.disconnectedCallback()}},FtReduxStore:$n,getStore:function(t,e){window.ftReduxStores||(window.ftReduxStores={});const n=e||t.name;return window.ftReduxStores[n]||(window.ftReduxStores[n]=xn({reducer:t.reducer})),window.ftReduxStores[n]},clearAllStores:function(){window.ftReduxStores={}}});t.lit=lt,t.litClassMap=_t,t.litDecorators=yt,t.litRepeat=At,t.litStyleMap=kt,t.litUnsafeHTML=Lt,t.wcUtils=Pn,Object.defineProperty(t,"W",{value:!0})},"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).ftGlobals={});
151
+ `;function Zt(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+t+(n.length?" "+n.map((function(t){return"'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Xt(t){return!!t&&!!t[Fe]}function Gt(t){return!!t&&(function(t){if(!t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;var n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===Le}(t)||Array.isArray(t)||!!t[Ue]||!!t.constructor[Ue]||re(t)||ie(t))}function Qt(t,e,n){void 0===n&&(n=!1),0===Yt(t)?(n?Object.keys:Te)(t).forEach((function(r){n&&"symbol"==typeof r||e(r,t[r],t)})):t.forEach((function(n,r){return e(r,n,t)}))}function Yt(t){var e=t[Fe];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:re(t)?2:ie(t)?3:0}function te(t,e){return 2===Yt(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function ee(t,e,n){var r=Yt(t);2===r?t.set(e,n):3===r?(t.delete(e),t.add(n)):t[e]=n}function ne(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function re(t){return $e&&t instanceof Map}function ie(t){return _e&&t instanceof Set}function oe(t){return t.o||t.t}function se(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=De(t);delete e[Fe];for(var n=Te(e),r=0;r<n.length;r++){var i=n[r],o=e[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(e[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function ue(t,e){return void 0===e&&(e=!1),ae(t)||Xt(t)||!Gt(t)||(Yt(t)>1&&(t.set=t.add=t.clear=t.delete=ce),Object.freeze(t),e&&Qt(t,(function(t,e){return ue(e,!0)}),!0)),t}function ce(){Zt(2)}function ae(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function le(t){var e=Be[t];return e||Zt(18,t),e}function fe(){return Me}function he(t,e){e&&(le("Patches"),t.u=[],t.s=[],t.v=e)}function de(t){ve(t),t.p.forEach(be),t.p=null}function ve(t){t===Me&&(Me=t.l)}function pe(t){return Me={p:[],l:Me,h:t,m:!0,_:0}}function be(t){var e=t[Fe];0===e.i||1===e.i?e.j():e.O=!0}function ye(t,e){e._=e.p.length;var n=e.p[0],r=void 0!==t&&t!==n;return e.h.g||le("ES5").S(e,t,r),r?(n[Fe].P&&(de(e),Zt(4)),Gt(t)&&(t=me(e,t),e.l||ge(e,t)),e.u&&le("Patches").M(n[Fe].t,t,e.u,e.s)):t=me(e,n,[]),de(e),e.u&&e.v(e.u,e.s),t!==ke?t:void 0}function me(t,e,n){if(ae(e))return e;var r=e[Fe];if(!r)return Qt(e,(function(i,o){return we(t,r,e,i,o,n)}),!0),e;if(r.A!==t)return e;if(!r.P)return ge(t,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=4===r.i||5===r.i?r.o=se(r.k):r.o;Qt(3===r.i?new Set(i):i,(function(e,o){return we(t,r,i,e,o,n)})),ge(t,i,!1),n&&t.u&&le("Patches").R(r,n,t.u,t.s)}return r.o}function we(t,e,n,r,i,o){if(Xt(i)){var s=me(t,i,o&&e&&3!==e.i&&!te(e.D,r)?o.concat(r):void 0);if(ee(n,r,s),!Xt(s))return;t.m=!1}if(Gt(i)&&!ae(i)){if(!t.h.F&&t._<1)return;me(t,i),e&&e.A.l||ge(t,i)}}function ge(t,e,n){void 0===n&&(n=!1),t.h.F&&t.m&&ue(e,n)}function Oe(t,e){var n=t[Fe];return(n?oe(n):t)[e]}function xe(t,e){if(e in t)for(var n=Object.getPrototypeOf(t);n;){var r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function Se(t){t.P||(t.P=!0,t.l&&Se(t.l))}function Ee(t){t.o||(t.o=se(t.t))}function je(t,e,n){var r=re(e)?le("MapSet").N(e,n):ie(e)?le("MapSet").T(e,n):t.g?function(t,e){var n=Array.isArray(t),r={i:n?1:0,A:e?e.A:fe(),P:!1,I:!1,D:{},l:e,t,k:null,o:null,j:null,C:!1},i=r,o=We;n&&(i=[r],o=Ie);var s=Proxy.revocable(i,o),u=s.revoke,c=s.proxy;return r.k=c,r.j=u,c}(e,n):le("ES5").J(e,n);return(n?n.A:fe()).p.push(r),r}function Re(t){return Xt(t)||Zt(22,t),function t(e){if(!Gt(e))return e;var n,r=e[Fe],i=Yt(e);if(r){if(!r.P&&(r.i<4||!le("ES5").K(r)))return r.t;r.I=!0,n=Ce(e,i),r.I=!1}else n=Ce(e,i);return Qt(n,(function(e,i){r&&function(t,e){return 2===Yt(t)?t.get(e):t[e]}(r.t,e)===i||ee(n,e,t(i))})),3===i?new Set(n):n}(t)}function Ce(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return se(t)}var Ne,Me,Ae="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),$e="undefined"!=typeof Map,_e="undefined"!=typeof Set,Pe="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,ke=Ae?Symbol.for("immer-nothing"):((Ne={})["immer-nothing"]=!0,Ne),Ue=Ae?Symbol.for("immer-draftable"):"__$immer_draftable",Fe=Ae?Symbol.for("immer-state"):"__$immer_state",Le=""+Object.prototype.constructor,Te="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,De=Object.getOwnPropertyDescriptors||function(t){var e={};return Te(t).forEach((function(n){e[n]=Object.getOwnPropertyDescriptor(t,n)})),e},Be={},We={get:function(t,e){if(e===Fe)return t;var n=oe(t);if(!te(n,e))return function(t,e,n){var r,i=xe(e,n);return i?"value"in i?i.value:null===(r=i.get)||void 0===r?void 0:r.call(t.k):void 0}(t,n,e);var r=n[e];return t.I||!Gt(r)?r:r===Oe(t.t,e)?(Ee(t),t.o[e]=je(t.A.h,r,t)):r},has:function(t,e){return e in oe(t)},ownKeys:function(t){return Reflect.ownKeys(oe(t))},set:function(t,e,n){var r=xe(oe(t),e);if(null==r?void 0:r.set)return r.set.call(t.k,n),!0;if(!t.P){var i=Oe(oe(t),e),o=null==i?void 0:i[Fe];if(o&&o.t===n)return t.o[e]=n,t.D[e]=!1,!0;if(ne(n,i)&&(void 0!==n||te(t.t,e)))return!0;Ee(t),Se(t)}return t.o[e]===n&&"number"!=typeof n&&(void 0!==n||e in t.o)||(t.o[e]=n,t.D[e]=!0,!0)},deleteProperty:function(t,e){return void 0!==Oe(t.t,e)||e in t.t?(t.D[e]=!1,Ee(t),Se(t)):delete t.D[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var n=oe(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:r.enumerable,value:n[e]}:r},defineProperty:function(){Zt(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Zt(12)}},Ie={};Qt(We,(function(t,e){Ie[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),Ie.deleteProperty=function(t,e){return Ie.set.call(this,t,e,void 0)},Ie.set=function(t,e,n){return We.set.call(this,t[0],e,n,t[0])};var He=function(){function t(t){var e=this;this.g=Pe,this.F=!0,this.produce=function(t,n,r){if("function"==typeof t&&"function"!=typeof n){var i=n;n=t;var o=e;return function(t){var e=this;void 0===t&&(t=i);for(var r=arguments.length,s=Array(r>1?r-1:0),u=1;u<r;u++)s[u-1]=arguments[u];return o.produce(t,(function(t){var r;return(r=n).call.apply(r,[e,t].concat(s))}))}}var s;if("function"!=typeof n&&Zt(6),void 0!==r&&"function"!=typeof r&&Zt(7),Gt(t)){var u=pe(e),c=je(e,t,void 0),a=!0;try{s=n(c),a=!1}finally{a?de(u):ve(u)}return"undefined"!=typeof Promise&&s instanceof Promise?s.then((function(t){return he(u,r),ye(t,u)}),(function(t){throw de(u),t})):(he(u,r),ye(s,u))}if(!t||"object"!=typeof t){if(void 0===(s=n(t))&&(s=t),s===ke&&(s=void 0),e.F&&ue(s,!0),r){var l=[],f=[];le("Patches").M(t,s,l,f),r(l,f)}return s}Zt(21,t)},this.produceWithPatches=function(t,n){if("function"==typeof t)return function(n){for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return e.produceWithPatches(n,(function(e){return t.apply(void 0,[e].concat(i))}))};var r,i,o=e.produce(t,n,(function(t,e){r=t,i=e}));return"undefined"!=typeof Promise&&o instanceof Promise?o.then((function(t){return[t,r,i]})):[o,r,i]},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}var e=t.prototype;return e.createDraft=function(t){Gt(t)||Zt(8),Xt(t)&&(t=Re(t));var e=pe(this),n=je(this,t,void 0);return n[Fe].C=!0,ve(e),n},e.finishDraft=function(t,e){var n=(t&&t[Fe]).A;return he(n,e),ye(void 0,n)},e.setAutoFreeze=function(t){this.F=t},e.setUseProxies=function(t){t&&!Pe&&Zt(20),this.g=t},e.applyPatches=function(t,e){var n;for(n=e.length-1;n>=0;n--){var r=e[n];if(0===r.path.length&&"replace"===r.op){t=r.value;break}}n>-1&&(e=e.slice(n+1));var i=le("Patches").$;return Xt(t)?i(t,e):this.produce(t,(function(t){return i(t,e)}))},t}(),Ke=new He,qe=Ke.produce;Ke.produceWithPatches.bind(Ke),Ke.setAutoFreeze.bind(Ke),Ke.setUseProxies.bind(Ke),Ke.applyPatches.bind(Ke),Ke.createDraft.bind(Ke),Ke.finishDraft.bind(Ke);var ze=qe;function Ve(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Je(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ze(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Je(Object(n),!0).forEach((function(e){Ve(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Je(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Xe(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Ge="function"==typeof Symbol&&Symbol.observable||"@@observable",Qe=function(){return Math.random().toString(36).substring(7).split("").join(".")},Ye={INIT:"@@redux/INIT"+Qe(),REPLACE:"@@redux/REPLACE"+Qe(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Qe()}};function tn(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function en(t,e,n){var r;if("function"==typeof e&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(Xe(0));if("function"==typeof e&&void 0===n&&(n=e,e=void 0),void 0!==n){if("function"!=typeof n)throw new Error(Xe(1));return n(en)(t,e)}if("function"!=typeof t)throw new Error(Xe(2));var i=t,o=e,s=[],u=s,c=!1;function a(){u===s&&(u=s.slice())}function l(){if(c)throw new Error(Xe(3));return o}function f(t){if("function"!=typeof t)throw new Error(Xe(4));if(c)throw new Error(Xe(5));var e=!0;return a(),u.push(t),function(){if(e){if(c)throw new Error(Xe(6));e=!1,a();var n=u.indexOf(t);u.splice(n,1),s=null}}}function h(t){if(!tn(t))throw new Error(Xe(7));if(void 0===t.type)throw new Error(Xe(8));if(c)throw new Error(Xe(9));try{c=!0,o=i(o,t)}finally{c=!1}for(var e=s=u,n=0;n<e.length;n++)(0,e[n])();return t}function d(t){if("function"!=typeof t)throw new Error(Xe(10));i=t,h({type:Ye.REPLACE})}function v(){var t,e=f;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(Xe(11));function n(){t.next&&t.next(l())}return n(),{unsubscribe:e(n)}}})[Ge]=function(){return this},t}return h({type:Ye.INIT}),(r={dispatch:h,subscribe:f,getState:l,replaceReducer:d})[Ge]=v,r}function nn(t){for(var e=Object.keys(t),n={},r=0;r<e.length;r++){var i=e[r];"function"==typeof t[i]&&(n[i]=t[i])}var o,s=Object.keys(n);try{!function(t){Object.keys(t).forEach((function(e){var n=t[e];if(void 0===n(void 0,{type:Ye.INIT}))throw new Error(Xe(12));if(void 0===n(void 0,{type:Ye.PROBE_UNKNOWN_ACTION()}))throw new Error(Xe(13))}))}(n)}catch(t){o=t}return function(t,e){if(void 0===t&&(t={}),o)throw o;for(var r=!1,i={},u=0;u<s.length;u++){var c=s[u],a=n[c],l=t[c],f=a(l,e);if(void 0===f)throw e&&e.type,new Error(Xe(14));i[c]=f,r=r||f!==l}return(r=r||s.length!==Object.keys(t).length)?i:t}}function rn(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}function on(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return function(){var n=t.apply(void 0,arguments),r=function(){throw new Error(Xe(15))},i={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},o=e.map((function(t){return t(i)}));return r=rn.apply(void 0,o)(n.dispatch),Ze(Ze({},n),{},{dispatch:r})}}}function sn(t){return function(e){var n=e.dispatch,r=e.getState;return function(e){return function(i){return"function"==typeof i?i(n,r,t):e(i)}}}}var un=sn();un.withExtraArgument=sn;var cn,an=un,ln=(cn=function(t,e){return cn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},cn(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}cn(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),fn=function(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t},hn=Object.defineProperty,dn=Object.getOwnPropertySymbols,vn=Object.prototype.hasOwnProperty,pn=Object.prototype.propertyIsEnumerable,bn=function(t,e,n){return e in t?hn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n},yn=function(t,e){for(var n in e||(e={}))vn.call(e,n)&&bn(t,n,e[n]);if(dn)for(var r=0,i=dn(e);r<i.length;r++)n=i[r],pn.call(e,n)&&bn(t,n,e[n]);return t},mn="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?rn:rn.apply(null,arguments)},wn=function(t){function e(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=t.apply(this,n)||this;return Object.setPrototypeOf(i,e.prototype),i}return ln(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,fn([void 0],t[0].concat(this)))):new(e.bind.apply(e,fn([void 0],t.concat(this))))},e}(Array);function gn(t){return Gt(t)?ze(t,(function(){})):t}function On(){return function(t){return function(t){void 0===t&&(t={});var e=t.thunk,n=void 0===e||e;t.immutableCheck,t.serializableCheck;var r=new wn;return n&&(function(t){return"boolean"==typeof t}(n)?r.push(an):r.push(an.withExtraArgument(n.extraArgument))),r}(t)}}function xn(t){var e,n=On(),r=t||{},i=r.reducer,o=void 0===i?void 0:i,s=r.middleware,u=void 0===s?n():s,c=r.devTools,a=void 0===c||c,l=r.preloadedState,f=void 0===l?void 0:l,h=r.enhancers,d=void 0===h?void 0:h;if("function"==typeof o)e=o;else{if(!function(t){if("object"!=typeof t||null===t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;for(var n=e;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return e===n}(o))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');e=nn(o)}var v=u;"function"==typeof v&&(v=v(n));var p=on.apply(void 0,v),b=rn;a&&(b=mn(yn({trace:!1},"object"==typeof a&&a)));var y=[p];return Array.isArray(d)?y=fn([p],d):"function"==typeof d&&(y=d(y)),en(e,f,b.apply(void 0,y))}function Sn(t,e){function n(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];if(e){var i=e.apply(void 0,n);if(!i)throw new Error("prepareAction did not return an object");return yn(yn({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:t,payload:n[0]}}return n.toString=function(){return""+t},n.type=t,n.match=function(e){return e.type===t},n}function En(t){var e,n={},r=[],i={addCase:function(t,e){var r="string"==typeof t?t:t.type;if(r in n)throw new Error("addCase cannot be called with two reducers for the same action type");return n[r]=e,i},addMatcher:function(t,e){return r.push({matcher:t,reducer:e}),i},addDefaultCase:function(t){return e=t,i}};return t(i),[n,r,e]}function jn(t){var e=t.name;if(!e)throw new Error("`name` is a required option for createSlice");var n,r="function"==typeof t.initialState?t.initialState:gn(t.initialState),i=t.reducers||{},o=Object.keys(i),s={},u={},c={};function a(){var e="function"==typeof t.extraReducers?En(t.extraReducers):[t.extraReducers],n=e[0],i=void 0===n?{}:n,o=e[1],s=void 0===o?[]:o,c=e[2],a=void 0===c?void 0:c,l=yn(yn({},i),u);return function(t,e,n,r){void 0===n&&(n=[]);var i,o="function"==typeof e?En(e):[e,n,r],s=o[0],u=o[1],c=o[2];if(function(t){return"function"==typeof t}(t))i=function(){return gn(t())};else{var a=gn(t);i=function(){return a}}function l(t,e){void 0===t&&(t=i());var n=fn([s[e.type]],u.filter((function(t){return(0,t.matcher)(e)})).map((function(t){return t.reducer})));return 0===n.filter((function(t){return!!t})).length&&(n=[c]),n.reduce((function(t,n){if(n){var r;if(Xt(t))return void 0===(r=n(t,e))?t:r;if(Gt(t))return ze(t,(function(t){return n(t,e)}));if(void 0===(r=n(t,e))){if(null===t)return t;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}return t}),t)}return l.getInitialState=i,l}(r,l,s,a)}return o.forEach((function(t){var n,r,o=i[t],a=e+"/"+t;"reducer"in o?(n=o.reducer,r=o.prepare):n=o,s[t]=n,u[a]=n,c[t]=r?Sn(a,r):Sn(a)})),{name:e,reducer:function(t,e){return n||(n=a()),n(t,e)},actions:c,caseReducers:s,getInitialState:function(){return n||(n=a()),n.getInitialState()}}}var Rn="listenerMiddleware";Sn(Rn+"/add"),Sn(Rn+"/removeAll"),Sn(Rn+"/remove"),function(){function t(t,e){var n=i[t];return n?n.enumerable=e:i[t]=n={configurable:!0,enumerable:e,get:function(){var e=this[Fe];return We.get(e,t)},set:function(e){var n=this[Fe];We.set(n,t,e)}},n}function e(t){for(var e=t.length-1;e>=0;e--){var i=t[e][Fe];if(!i.P)switch(i.i){case 5:r(i)&&Se(i);break;case 4:n(i)&&Se(i)}}}function n(t){for(var e=t.t,n=t.k,r=Te(n),i=r.length-1;i>=0;i--){var o=r[i];if(o!==Fe){var s=e[o];if(void 0===s&&!te(e,o))return!0;var u=n[o],c=u&&u[Fe];if(c?c.t!==s:!ne(u,s))return!0}}var a=!!e[Fe];return r.length!==Te(e).length+(a?0:1)}function r(t){var e=t.k;if(e.length!==t.t.length)return!0;var n=Object.getOwnPropertyDescriptor(e,e.length-1);if(n&&!n.get)return!0;for(var r=0;r<e.length;r++)if(!e.hasOwnProperty(r))return!0;return!1}var i={};!function(t,e){Be[t]||(Be[t]=e)}("ES5",{J:function(e,n){var r=Array.isArray(e),i=function(e,n){if(e){for(var r=Array(n.length),i=0;i<n.length;i++)Object.defineProperty(r,""+i,t(i,!0));return r}var o=De(n);delete o[Fe];for(var s=Te(o),u=0;u<s.length;u++){var c=s[u];o[c]=t(c,e||!!o[c].enumerable)}return Object.create(Object.getPrototypeOf(n),o)}(r,e),o={i:r?5:4,A:n?n.A:fe(),P:!1,I:!1,D:{},l:n,t:e,k:i,o:null,O:!1,C:!1};return Object.defineProperty(i,Fe,{value:o,writable:!0}),i},S:function(t,n,i){i?Xt(n)&&n[Fe].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var n=e[Fe];if(n){var i=n.t,o=n.k,s=n.D,u=n.i;if(4===u)Qt(o,(function(e){e!==Fe&&(void 0!==i[e]||te(i,e)?s[e]||t(o[e]):(s[e]=!0,Se(n)))})),Qt(i,(function(t){void 0!==o[t]||te(o,t)||(s[t]=!1,Se(n))}));else if(5===u){if(r(n)&&(Se(n),s.length=!0),o.length<i.length)for(var c=o.length;c<i.length;c++)s[c]=!1;else for(var a=i.length;a<o.length;a++)s[a]=!0;for(var l=Math.min(o.length,i.length),f=0;f<l;f++)o.hasOwnProperty(f)||(s[f]=!0),void 0===s[f]&&t(o[f])}}}}(t.p[0]),e(t.p))},K:function(t){return 4===t.i?n(t):r(t)}})}();const Cn=t=>"object"==typeof t&&(0===Object.keys(t).length||"string"==typeof t.store||null!=t.selector||"function"==typeof t.hasChanged);function Nn(t){var e;return null===(e=t)||void 0===e?void 0:e.isFtReduxStore}class Mn{constructor(t,e){this.reduxSlice=t,this.reduxStore=e,this.isFtReduxStore=!0,this.actions=new Proxy(this.reduxSlice.actions,{get:(t,e,n)=>{const r=t[e];if(r)return(...t)=>{const e=r(...t);return this.reduxStore.dispatch(e),e}}})}static get(t){window.ftReduxStores||(window.ftReduxStores={});const e=window.ftReduxStores[t.name];if(Nn(e))return e;const n=jn(t);if(e)return new Mn(n,e);const r=xn({reducer:n.reducer});return window.ftReduxStores[t.name]=new Mn(n,r)}get dispatch(){throw new Error("Don't use this method, actions are automatically dispatched when called.")}[Symbol.observable](){return this.reduxStore[Symbol.observable]()}getState(){return this.reduxStore.getState()}replaceReducer(t){throw new Error("Not implemented yet.")}subscribe(t){return this.reduxStore.subscribe(t)}get name(){return this.reduxSlice.name}get reducer(){return this.reduxSlice.reducer}get caseReducers(){return this.reduxSlice.caseReducers}getInitialState(){return this.reduxSlice.getInitialState()}}var An,$n,_n;const Pn=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(_n=null===($n=null===(An=window.safari)||void 0===An?void 0:An.pushNotification)||void 0===$n?void 0:$n.toString())&&void 0!==_n?_n:"");var kn=Object.freeze({__proto__:null,isSafari:Pn,CacheRegistry:class{constructor(){this.loaders={},this.content={},this.finalContent=new Set}register(t,e){this.loaders[t]=e,this.finalContent.delete(t)}registerFinal(t,e){this.loaders[t]=e,this.finalContent.add(t)}clearAll(){for(let t in this.content)this.clear(t)}clear(t){this.finalContent.has(t)||(this.content[t]instanceof Tt&&this.content[t].cancel(),delete this.content[t])}async get(t,e){if(void 0===this.content[t]){if(null==(e=null!=e?e:this.loaders[t]))throw new Error("Unknown cache key "+t);const n=Dt(e());return this.content[t]=n,n.then((e=>(this.content[t]=e,e)))}if(this.content[t]instanceof Error)throw this.content[t];return this.content[t]}getNow(t){if(!(this.content[t]instanceof Promise||this.content[t]instanceof Error))return this.content[t]}},CancelablePromise:Tt,cancelable:Dt,Debouncer:Bt,customElement:t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)},jsonProperty:Wt,deepEqual:It,delay:t=>new Promise((e=>setTimeout(e,t))),designSystemVariables:Kt,FtCssVariableFactory:Ht,setVariable:function(t,e){return s(`${t.name}: ${e}`)},FtLitElement:zt,noTextSelect:Vt,wordWrap:Jt,ParametrizedLabelResolver:class{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var n,r;let i=null!==(r=null!==(n=this.labels[t])&&void 0!==n?n:this.defaultLabels[t])&&void 0!==r?r:"";return e.forEach(((t,e)=>i=i.replace(new RegExp(`\\{${e}\\}`,"g"),t))),i}},redux:(t,e)=>{var n;const r=Cn(t)?t:{};return e=null!==(n=null!=e?e:r.hasChanged)&&void 0!==n?n:(t,e)=>!It(t,e),(n,i)=>{var o;n.constructor.createProperty(i,{attribute:!1,hasChanged:e});const s=n;s.reduxProperties=s.reduxProperties||new Map;const u=null!==(o=Cn(t)?r.selector:t)&&void 0!==o?o:t=>t[i];s.reduxProperties.set(i,{selector:u,store:r.store})}},FtLitElementRedux:class extends zt{constructor(){super(...arguments),this.internalStoresUnsubscribers=new Map,this.internalStores=new Map}getUnnamedStore(){if(this.internalStores.size>1)throw new Error("Cannot resolve unnamed store when multiple stores are configured.");return[...this.internalStores.values()][0]}get store(){return this.getUnnamedStore()}set store(t){this.unsubscribeFromStores(),this.internalStores.clear(),t&&this.addStore(t)}getStore(t){var e;return null==t?null!==(e=this.getUnnamedStore())&&void 0!==e?e:this.store:this.internalStores.get(t)}addStore(t,e){e=null!=e?e:Nn(t)?t.name:"ft-lit-element-redux-default-store",this.unsubscribeFromStore(e),this.setupStore(e,t)}removeStore(t){const e="string"==typeof t?t:Nn(t)?t.name:"ft-lit-element-redux-default-store";this.unsubscribeFromStore(e),this.internalStores.delete(e)}setupStore(t,e){this.internalStores.set(t,e),this.updateFromStores(),this.subscribeToStore(t,e)}setupStores(){this.unsubscribeFromStores(),0===this.internalStores.size&&null!=this.store?this.addStore(this.store):(this.updateFromStores(),this.internalStores.forEach(((t,e)=>this.subscribeToStore(e,t))))}updateFromStores(){this.reduxProperties&&this.reduxProperties.forEach(((t,e)=>{const n=this.getStore(t.store);n&&(this[e]=t.selector(n.getState(),this))}))}subscribeToStore(t,e){this.internalStoresUnsubscribers.set(t,e.subscribe((()=>this.updateFromStores()))),this.onStoreAvailable(t)}unsubscribeFromStores(){Object.keys(this.internalStoresUnsubscribers).forEach((t=>this.unsubscribeFromStore(t)))}unsubscribeFromStore(t){this.internalStoresUnsubscribers.has(t)&&this.internalStoresUnsubscribers.get(t)(),this.internalStoresUnsubscribers.delete(t)}onStoreAvailable(t){}connectedCallback(){super.connectedCallback(),this.setupStores()}disconnectedCallback(){this.unsubscribeFromStores(),super.disconnectedCallback()}},FtReduxStore:Mn,getStore:function(t,e){window.ftReduxStores||(window.ftReduxStores={});const n=e||t.name;return window.ftReduxStores[n]||(window.ftReduxStores[n]=xn({reducer:t.reducer})),window.ftReduxStores[n]},clearAllStores:function(){window.ftReduxStores={}}});t.lit=lt,t.litClassMap=_t,t.litDecorators=yt,t.litRepeat=At,t.litStyleMap=kt,t.litUnsafeHTML=Lt,t.wcUtils=kn,Object.defineProperty(t,"W",{value:!0})},"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).ftGlobals={});
package/build/redux.js CHANGED
@@ -1,17 +1,23 @@
1
1
  import { FtLitElement } from "./FtLitElement";
2
2
  import { configureStore, createSlice } from "@reduxjs/toolkit";
3
3
  import { deepEqual } from "./deep-equal";
4
+ const isReduxPropertyInit = (o) => {
5
+ return typeof o === "object" && (Object.keys(o).length === 0
6
+ || typeof o.store === "string"
7
+ || o.selector != null
8
+ || typeof o.hasChanged === "function");
9
+ };
4
10
  export const redux = (// TODO next major version: Remove compat
5
11
  selectorOrInit, hasChanged) => {
6
12
  var _a;
7
- const init = typeof selectorOrInit === "function" ? {} : (selectorOrInit !== null && selectorOrInit !== void 0 ? selectorOrInit : {});
13
+ const init = isReduxPropertyInit(selectorOrInit) ? selectorOrInit : {};
8
14
  hasChanged = (_a = hasChanged !== null && hasChanged !== void 0 ? hasChanged : init.hasChanged) !== null && _a !== void 0 ? _a : ((a, b) => !deepEqual(a, b));
9
15
  return (proto, name) => {
10
16
  var _a;
11
17
  proto.constructor.createProperty(name, { attribute: false, hasChanged });
12
18
  const reduxProto = proto;
13
19
  reduxProto.reduxProperties = reduxProto.reduxProperties || new Map();
14
- const selector = (_a = (typeof selectorOrInit === "function" ? selectorOrInit : init.selector)) !== null && _a !== void 0 ? _a : (s => s[name]);
20
+ const selector = (_a = (isReduxPropertyInit(selectorOrInit) ? init.selector : selectorOrInit)) !== null && _a !== void 0 ? _a : (s => s[name]);
15
21
  reduxProto.reduxProperties.set(name, { selector, store: init.store });
16
22
  };
17
23
  };
@@ -62,8 +68,13 @@ export class FtLitElementRedux extends FtLitElement {
62
68
  }
63
69
  setupStores() {
64
70
  this.unsubscribeFromStores();
65
- this.updateFromStores();
66
- this.internalStores.forEach((store, name) => this.subscribeToStore(name, store));
71
+ if (this.internalStores.size === 0 && this.store != null) { // Compatibility with getter override TODO next major version: Remove compat
72
+ this.addStore(this.store);
73
+ }
74
+ else {
75
+ this.updateFromStores();
76
+ this.internalStores.forEach((store, name) => this.subscribeToStore(name, store));
77
+ }
67
78
  }
68
79
  updateFromStores() {
69
80
  if (this.reduxProperties) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-wc-utils",
3
- "version": "0.3.52",
3
+ "version": "0.3.54",
4
4
  "description": "Internal web components tools",
5
5
  "author": "Fluid Topics <devtopics@antidot.net>",
6
6
  "license": "ISC",
@@ -17,5 +17,5 @@
17
17
  "@reduxjs/toolkit": "^1.6.2",
18
18
  "lit": "2.2.8"
19
19
  },
20
- "gitHead": "746cdd6b34c2fa25220ed735914fb1dff9c0fde7"
20
+ "gitHead": "a44cb80b87fa9a6a35c255f4e37a75af484b443a"
21
21
  }