ywana-core8 0.0.3 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +1 -1
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +7 -2
- package/src/domain/CollectionPage.js +9 -4
- package/src/index.js +1 -0
- package/src/site/index.js +1 -0
- package/src/upload/UploadArea.js +1 -3
- package/src/upload/UploadFile.js +1 -3
- package/src/upload/index.js +4 -1
- package/src/upload/uploader.js +0 -1
package/dist/index.cjs
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
require("material-design-icons-iconfont/dist/material-design-icons.css");var e=function(e,n,t,r){void 0===t&&(t=null);try{console.log("FETCH",e,n);var o={method:e,mode:"cors",headers:{Accept:"application/json","Content-Type":"application/json","x-access-token":r},body:t};return Promise.resolve(function(e,t){try{var r=Promise.resolve(fetch(n,o)).then(function(e){var n;function t(t){if(n)return t;throw e}var r=function(){if(e.ok)return Promise.resolve(e.json()).then(function(e){return n=1,e})}();return r&&r.then?r.then(t):t(r)})}catch(e){return t(e)}return r&&r.then?r.then(void 0,t):r}(0,function(e){if(e instanceof Error)throw{error:e};return Promise.resolve(e.json()).then(function(e){throw{success:!1,message:e.message}})}))}catch(e){return Promise.reject(e)}},n=process.env.REACT_APP_SESSION||window&&window.SESSION?window.SESSION:"YWANA-CORE6-SESSION",t={token:function(){return(sessionStorage.getItem(n)?JSON.parse(sessionStorage.getItem(n)):{}).token},me:function(){return(sessionStorage.getItem(n)?JSON.parse(sessionStorage.getItem(n)):{}).me},init:function(e,t){sessionStorage.setItem(n,JSON.stringify({token:e,me:t}))},refresh:function(e){var t=this.me();sessionStorage.setItem(n,JSON.stringify({token:e,me:t}))},isLoggedIn:function(){return!!sessionStorage.DSSession},logout:function(){sessionStorage.removeItem(n)}};function r(e){var n={exports:{}};return e(n,n.exports),n.exports}var o=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function u(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var l=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var n={},t=0;t<10;t++)n["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(n).map(function(e){return n[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,n){for(var t,r,l=u(e),c=1;c<arguments.length;c++){for(var s in t=Object(arguments[c]))a.call(t,s)&&(l[s]=t[s]);if(o){r=o(t);for(var f=0;f<r.length;f++)i.call(t,r[f])&&(l[r[f]]=t[r[f]])}}return l},c=r(function(e,n){var t=60103,r=60106;n.Fragment=60107,n.StrictMode=60108,n.Profiler=60114;var o=60109,a=60110,i=60112;n.Suspense=60113;var u=60115,c=60116;if("function"==typeof Symbol&&Symbol.for){var s=Symbol.for;t=s("react.element"),r=s("react.portal"),n.Fragment=s("react.fragment"),n.StrictMode=s("react.strict_mode"),n.Profiler=s("react.profiler"),o=s("react.provider"),a=s("react.context"),i=s("react.forward_ref"),n.Suspense=s("react.suspense"),u=s("react.memo"),c=s("react.lazy")}var f="function"==typeof Symbol&&Symbol.iterator;function d(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,t=1;t<arguments.length;t++)n+="&args[]="+encodeURIComponent(arguments[t]);return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h={};function v(e,n,t){this.props=e,this.context=n,this.refs=h,this.updater=t||p}function m(){}function y(e,n,t){this.props=e,this.context=n,this.refs=h,this.updater=t||p}v.prototype.isReactComponent={},v.prototype.setState=function(e,n){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(d(85));this.updater.enqueueSetState(this,e,n,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},m.prototype=v.prototype;var g=y.prototype=new m;g.constructor=y,l(g,v.prototype),g.isPureReactComponent=!0;var b={current:null},C=Object.prototype.hasOwnProperty,k={key:!0,ref:!0,__self:!0,__source:!0};function S(e,n,r){var o,a={},i=null,u=null;if(null!=n)for(o in void 0!==n.ref&&(u=n.ref),void 0!==n.key&&(i=""+n.key),n)C.call(n,o)&&!k.hasOwnProperty(o)&&(a[o]=n[o]);var l=arguments.length-2;if(1===l)a.children=r;else if(1<l){for(var c=Array(l),s=0;s<l;s++)c[s]=arguments[s+2];a.children=c}if(e&&e.defaultProps)for(o in l=e.defaultProps)void 0===a[o]&&(a[o]=l[o]);return{$$typeof:t,type:e,key:i,ref:u,props:a,_owner:b.current}}function _(e){return"object"==typeof e&&null!==e&&e.$$typeof===t}var w=/\/+/g;function N(e,n){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var n={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return n[e]})}(""+e.key):n.toString(36)}function x(e,n,o,a,i){var u=typeof e;"undefined"!==u&&"boolean"!==u||(e=null);var l=!1;if(null===e)l=!0;else switch(u){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case t:case r:l=!0}}if(l)return i=i(l=e),e=""===a?"."+N(l,0):a,Array.isArray(i)?(o="",null!=e&&(o=e.replace(w,"$&/")+"/"),x(i,n,o,"",function(e){return e})):null!=i&&(_(i)&&(i=function(e,n){return{$$typeof:t,type:e.type,key:n,ref:e.ref,props:e.props,_owner:e._owner}}(i,o+(!i.key||l&&l.key===i.key?"":(""+i.key).replace(w,"$&/")+"/")+e)),n.push(i)),1;if(l=0,a=""===a?".":a+":",Array.isArray(e))for(var c=0;c<e.length;c++){var s=a+N(u=e[c],c);l+=x(u,n,o,s,i)}else if(s=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=f&&e[f]||e["@@iterator"])?e:null}(e),"function"==typeof s)for(e=s.call(e),c=0;!(u=e.next()).done;)l+=x(u=u.value,n,o,s=a+N(u,c++),i);else if("object"===u)throw n=""+e,Error(d(31,"[object Object]"===n?"object with keys {"+Object.keys(e).join(", ")+"}":n));return l}function O(e,n,t){if(null==e)return e;var r=[],o=0;return x(e,r,"","",function(e){return n.call(t,e,o++)}),r}function E(e){if(-1===e._status){var n=e._result;n=n(),e._status=0,e._result=n,n.then(function(n){0===e._status&&(n=n.default,e._status=1,e._result=n)},function(n){0===e._status&&(e._status=2,e._result=n)})}if(1===e._status)return e._result;throw e._result}var j={current:null};function P(){var e=j.current;if(null===e)throw Error(d(321));return e}var R={ReactCurrentDispatcher:j,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:b,IsSomeRendererActing:{current:!1},assign:l};n.Children={map:O,forEach:function(e,n,t){O(e,function(){n.apply(this,arguments)},t)},count:function(e){var n=0;return O(e,function(){n++}),n},toArray:function(e){return O(e,function(e){return e})||[]},only:function(e){if(!_(e))throw Error(d(143));return e}},n.Component=v,n.PureComponent=y,n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=R,n.cloneElement=function(e,n,r){if(null==e)throw Error(d(267,e));var o=l({},e.props),a=e.key,i=e.ref,u=e._owner;if(null!=n){if(void 0!==n.ref&&(i=n.ref,u=b.current),void 0!==n.key&&(a=""+n.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(s in n)C.call(n,s)&&!k.hasOwnProperty(s)&&(o[s]=void 0===n[s]&&void 0!==c?c[s]:n[s])}var s=arguments.length-2;if(1===s)o.children=r;else if(1<s){c=Array(s);for(var f=0;f<s;f++)c[f]=arguments[f+2];o.children=c}return{$$typeof:t,type:e.type,key:a,ref:i,props:o,_owner:u}},n.createContext=function(e,n){return void 0===n&&(n=null),(e={$$typeof:a,_calculateChangedBits:n,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:o,_context:e},e.Consumer=e},n.createElement=S,n.createFactory=function(e){var n=S.bind(null,e);return n.type=e,n},n.createRef=function(){return{current:null}},n.forwardRef=function(e){return{$$typeof:i,render:e}},n.isValidElement=_,n.lazy=function(e){return{$$typeof:c,_payload:{_status:-1,_result:e},_init:E}},n.memo=function(e,n){return{$$typeof:u,type:e,compare:void 0===n?null:n}},n.useCallback=function(e,n){return P().useCallback(e,n)},n.useContext=function(e,n){return P().useContext(e,n)},n.useDebugValue=function(){},n.useEffect=function(e,n){return P().useEffect(e,n)},n.useImperativeHandle=function(e,n,t){return P().useImperativeHandle(e,n,t)},n.useLayoutEffect=function(e,n){return P().useLayoutEffect(e,n)},n.useMemo=function(e,n){return P().useMemo(e,n)},n.useReducer=function(e,n,t){return P().useReducer(e,n,t)},n.useRef=function(e){return P().useRef(e)},n.useState=function(e){return P().useState(e)},n.version="17.0.2"}),s=r(function(e,n){"production"!==process.env.NODE_ENV&&function(){var e=l,t=60103,r=60106;n.Fragment=60107,n.StrictMode=60108,n.Profiler=60114;var o=60109,a=60110,i=60112;n.Suspense=60113;var u=60120,c=60115,s=60116,f=60121,d=60122,p=60117,h=60129,v=60131;if("function"==typeof Symbol&&Symbol.for){var m=Symbol.for;t=m("react.element"),r=m("react.portal"),n.Fragment=m("react.fragment"),n.StrictMode=m("react.strict_mode"),n.Profiler=m("react.profiler"),o=m("react.provider"),a=m("react.context"),i=m("react.forward_ref"),n.Suspense=m("react.suspense"),u=m("react.suspense_list"),c=m("react.memo"),s=m("react.lazy"),f=m("react.block"),d=m("react.server.block"),p=m("react.fundamental"),m("react.scope"),m("react.opaque.id"),h=m("react.debug_trace_mode"),m("react.offscreen"),v=m("react.legacy_hidden")}var y="function"==typeof Symbol&&Symbol.iterator;function g(e){if(null===e||"object"!=typeof e)return null;var n=y&&e[y]||e["@@iterator"];return"function"==typeof n?n:null}var b={current:null},C={current:null},k={},S=null;function _(e){S=e}k.setExtraStackFrame=function(e){S=e},k.getCurrentStack=null,k.getStackAddendum=function(){var e="";S&&(e+=S);var n=k.getCurrentStack;return n&&(e+=n()||""),e};var w={ReactCurrentDispatcher:b,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:C,IsSomeRendererActing:{current:!1},assign:e};function N(e){for(var n=arguments.length,t=new Array(n>1?n-1:0),r=1;r<n;r++)t[r-1]=arguments[r];O("warn",e,t)}function x(e){for(var n=arguments.length,t=new Array(n>1?n-1:0),r=1;r<n;r++)t[r-1]=arguments[r];O("error",e,t)}function O(e,n,t){var r=w.ReactDebugCurrentFrame.getStackAddendum();""!==r&&(n+="%s",t=t.concat([r]));var o=t.map(function(e){return""+e});o.unshift("Warning: "+n),Function.prototype.apply.call(console[e],console,o)}w.ReactDebugCurrentFrame=k;var E={};function j(e,n){var t=e.constructor,r=t&&(t.displayName||t.name)||"ReactClass",o=r+"."+n;E[o]||(x("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",n,r),E[o]=!0)}var P={isMounted:function(e){return!1},enqueueForceUpdate:function(e,n,t){j(e,"forceUpdate")},enqueueReplaceState:function(e,n,t,r){j(e,"replaceState")},enqueueSetState:function(e,n,t,r){j(e,"setState")}},R={};function T(e,n,t){this.props=e,this.context=n,this.refs=R,this.updater=t||P}Object.freeze(R),T.prototype.isReactComponent={},T.prototype.setState=function(e,n){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,n,"setState")},T.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var A={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},I=function(e,n){Object.defineProperty(T.prototype,e,{get:function(){N("%s(...) is deprecated in plain JavaScript React classes. %s",n[0],n[1])}})};for(var D in A)A.hasOwnProperty(D)&&I(D,A[D]);function $(){}function F(e,n,t){this.props=e,this.context=n,this.refs=R,this.updater=t||P}$.prototype=T.prototype;var L=F.prototype=new $;function M(e){return e.displayName||"Context"}function B(e){if(null==e)return null;if("number"==typeof e.tag&&x("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case n.Fragment:return"Fragment";case r:return"Portal";case n.Profiler:return"Profiler";case n.StrictMode:return"StrictMode";case n.Suspense:return"Suspense";case u:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case a:return M(e)+".Consumer";case o:return M(e._context)+".Provider";case i:return p=(d=e.render).displayName||d.name||"",e.displayName||(""!==p?"ForwardRef("+p+")":"ForwardRef");case c:return B(e.type);case f:return B(e._render);case s:var t=e._payload,l=e._init;try{return B(l(t))}catch(e){return null}}var d,p;return null}L.constructor=F,e(L,T.prototype),L.isPureReactComponent=!0;var z,U,q,Y=Object.prototype.hasOwnProperty,V={key:!0,ref:!0,__self:!0,__source:!0};function K(e){if(Y.call(e,"ref")){var n=Object.getOwnPropertyDescriptor(e,"ref").get;if(n&&n.isReactWarning)return!1}return void 0!==e.ref}function H(e){if(Y.call(e,"key")){var n=Object.getOwnPropertyDescriptor(e,"key").get;if(n&&n.isReactWarning)return!1}return void 0!==e.key}function W(e,n){var t=function(){z||(z=!0,x("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",n))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}function G(e,n){var t=function(){U||(U=!0,x("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",n))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}function J(e){if("string"==typeof e.ref&&C.current&&e.__self&&C.current.stateNode!==e.__self){var n=B(C.current.type);q[n]||(x('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',n,e.ref),q[n]=!0)}}q={};var X=function(e,n,r,o,a,i,u){var l={$$typeof:t,type:e,key:n,ref:r,props:u,_owner:i,_store:{}};return Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(l,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(l,"_source",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l};function Q(e,n,t){var r,o={},a=null,i=null,u=null,l=null;if(null!=n)for(r in K(n)&&(i=n.ref,J(n)),H(n)&&(a=""+n.key),u=void 0===n.__self?null:n.__self,l=void 0===n.__source?null:n.__source,n)Y.call(n,r)&&!V.hasOwnProperty(r)&&(o[r]=n[r]);var c=arguments.length-2;if(1===c)o.children=t;else if(c>1){for(var s=Array(c),f=0;f<c;f++)s[f]=arguments[f+2];Object.freeze&&Object.freeze(s),o.children=s}if(e&&e.defaultProps){var d=e.defaultProps;for(r in d)void 0===o[r]&&(o[r]=d[r])}if(a||i){var p="function"==typeof e?e.displayName||e.name||"Unknown":e;a&&W(o,p),i&&G(o,p)}return X(e,a,i,u,l,C.current,o)}function Z(n,t,r){if(null==n)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+n+".");var o,a,i=e({},n.props),u=n.key,l=n.ref,c=n._self,s=n._source,f=n._owner;if(null!=t)for(o in K(t)&&(l=t.ref,f=C.current),H(t)&&(u=""+t.key),n.type&&n.type.defaultProps&&(a=n.type.defaultProps),t)Y.call(t,o)&&!V.hasOwnProperty(o)&&(i[o]=void 0===t[o]&&void 0!==a?a[o]:t[o]);var d=arguments.length-2;if(1===d)i.children=r;else if(d>1){for(var p=Array(d),h=0;h<d;h++)p[h]=arguments[h+2];i.children=p}return X(n.type,u,l,c,s,f,i)}function ee(e){return"object"==typeof e&&null!==e&&e.$$typeof===t}var ne=!1,te=/\/+/g;function re(e){return e.replace(te,"$&/")}function oe(e,n){return"object"==typeof e&&null!==e&&null!=e.key?(t={"=":"=0",":":"=2"},"$"+(""+e.key).replace(/[=:]/g,function(e){return t[e]})):n.toString(36);var t}function ae(e,n,o,a,i){var u=typeof e;"undefined"!==u&&"boolean"!==u||(e=null);var l,c,s,f=!1;if(null===e)f=!0;else switch(u){case"string":case"number":f=!0;break;case"object":switch(e.$$typeof){case t:case r:f=!0}}if(f){var d=e,p=i(d),h=""===a?"."+oe(d,0):a;if(Array.isArray(p)){var v="";null!=h&&(v=re(h)+"/"),ae(p,n,v,"",function(e){return e})}else null!=p&&(ee(p)&&(l=p,c=o+(!p.key||d&&d.key===p.key?"":re(""+p.key)+"/")+h,p=X(l.type,c,l.ref,l._self,l._source,l._owner,l.props)),n.push(p));return 1}var m=0,y=""===a?".":a+":";if(Array.isArray(e))for(var b=0;b<e.length;b++)m+=ae(s=e[b],n,o,y+oe(s,b),i);else{var C=g(e);if("function"==typeof C){var k=e;C===k.entries&&(ne||N("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),ne=!0);for(var S,_=C.call(k),w=0;!(S=_.next()).done;)m+=ae(s=S.value,n,o,y+oe(s,w++),i)}else if("object"===u){var x=""+e;throw Error("Objects are not valid as a React child (found: "+("[object Object]"===x?"object with keys {"+Object.keys(e).join(", ")+"}":x)+"). If you meant to render a collection of children, use an array instead.")}}return m}function ie(e,n,t){if(null==e)return e;var r=[],o=0;return ae(e,r,"","",function(e){return n.call(t,e,o++)}),r}function ue(e){if(-1===e._status){var n=(0,e._result)(),t=e;t._status=0,t._result=n,n.then(function(n){if(0===e._status){var t=n.default;void 0===t&&x("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",n);var r=e;r._status=1,r._result=t}},function(n){if(0===e._status){var t=e;t._status=2,t._result=n}})}if(1===e._status)return e._result;throw e._result}function le(e){return"string"==typeof e||"function"==typeof e||e===n.Fragment||e===n.Profiler||e===h||e===n.StrictMode||e===n.Suspense||e===u||e===v||"object"==typeof e&&null!==e&&(e.$$typeof===s||e.$$typeof===c||e.$$typeof===o||e.$$typeof===a||e.$$typeof===i||e.$$typeof===p||e.$$typeof===f||e[0]===d)}function ce(){var e=b.current;if(null===e)throw Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.");return e}var se,fe,de,pe,he,ve,me,ye=0;function ge(){}ge.__reactDisabledLog=!0;var be,Ce=w.ReactCurrentDispatcher;function ke(e,n,t){if(void 0===be)try{throw Error()}catch(e){var r=e.stack.trim().match(/\n( *(at )?)/);be=r&&r[1]||""}return"\n"+be+e}var Se,_e=!1,we="function"==typeof WeakMap?WeakMap:Map;function Ne(n,t){if(!n||_e)return"";var r,o=Se.get(n);if(void 0!==o)return o;_e=!0;var a,i=Error.prepareStackTrace;Error.prepareStackTrace=void 0,a=Ce.current,Ce.current=null,function(){if(0===ye){se=console.log,fe=console.info,de=console.warn,pe=console.error,he=console.group,ve=console.groupCollapsed,me=console.groupEnd;var e={configurable:!0,enumerable:!0,value:ge,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}ye++}();try{if(t){var u=function(){throw Error()};if(Object.defineProperty(u.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(u,[])}catch(e){r=e}Reflect.construct(n,[],u)}else{try{u.call()}catch(e){r=e}n.call(u.prototype)}}else{try{throw Error()}catch(e){r=e}n()}}catch(e){if(e&&r&&"string"==typeof e.stack){for(var l=e.stack.split("\n"),c=r.stack.split("\n"),s=l.length-1,f=c.length-1;s>=1&&f>=0&&l[s]!==c[f];)f--;for(;s>=1&&f>=0;s--,f--)if(l[s]!==c[f]){if(1!==s||1!==f)do{if(s--,--f<0||l[s]!==c[f]){var d="\n"+l[s].replace(" at new "," at ");return"function"==typeof n&&Se.set(n,d),d}}while(s>=1&&f>=0);break}}}finally{_e=!1,Ce.current=a,function(){if(0==--ye){var n={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:e({},n,{value:se}),info:e({},n,{value:fe}),warn:e({},n,{value:de}),error:e({},n,{value:pe}),group:e({},n,{value:he}),groupCollapsed:e({},n,{value:ve}),groupEnd:e({},n,{value:me})})}ye<0&&x("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=i}var p=n?n.displayName||n.name:"",h=p?ke(p):"";return"function"==typeof n&&Se.set(n,h),h}function xe(e,n,t){return Ne(e,!1)}function Oe(e,t,r){if(null==e)return"";if("function"==typeof e)return Ne(e,function(e){var n=e.prototype;return!(!n||!n.isReactComponent)}(e));if("string"==typeof e)return ke(e);switch(e){case n.Suspense:return ke("Suspense");case u:return ke("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case i:return xe(e.render);case c:return Oe(e.type,t,r);case f:return xe(e._render);case s:var o=e._payload,a=e._init;try{return Oe(a(o),t,r)}catch(e){}}return""}Se=new we;var Ee,je={},Pe=w.ReactDebugCurrentFrame;function Re(e){if(e){var n=e._owner,t=Oe(e.type,e._source,n?n.type:null);Pe.setExtraStackFrame(t)}else Pe.setExtraStackFrame(null)}function Te(e){if(e){var n=e._owner;_(Oe(e.type,e._source,n?n.type:null))}else _(null)}function Ae(){if(C.current){var e=B(C.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}function Ie(e){return null!=e&&void 0!==(n=e.__source)?"\n\nCheck your code at "+n.fileName.replace(/^.*[\\\/]/,"")+":"+n.lineNumber+".":"";var n}Ee=!1;var De={};function $e(e,n){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var t=function(e){var n=Ae();if(!n){var t="string"==typeof e?e:e.displayName||e.name;t&&(n="\n\nCheck the top-level render call using <"+t+">.")}return n}(n);if(!De[t]){De[t]=!0;var r="";e&&e._owner&&e._owner!==C.current&&(r=" It was passed a child from "+B(e._owner.type)+"."),Te(e),x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,r),Te(null)}}}function Fe(e,n){if("object"==typeof e)if(Array.isArray(e))for(var t=0;t<e.length;t++){var r=e[t];ee(r)&&$e(r,n)}else if(ee(e))e._store&&(e._store.validated=!0);else if(e){var o=g(e);if("function"==typeof o&&o!==e.entries)for(var a,i=o.call(e);!(a=i.next()).done;)ee(a.value)&&$e(a.value,n)}}function Le(e){var n,t=e.type;if(null!=t&&"string"!=typeof t){if("function"==typeof t)n=t.propTypes;else{if("object"!=typeof t||t.$$typeof!==i&&t.$$typeof!==c)return;n=t.propTypes}if(n){var r=B(t);!function(e,n,t,r,o){var a=Function.call.bind(Object.prototype.hasOwnProperty);for(var i in e)if(a(e,i)){var u=void 0;try{if("function"!=typeof e[i]){var l=Error((r||"React class")+": prop type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw l.name="Invariant Violation",l}u=e[i](n,i,r,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){u=e}!u||u instanceof Error||(Re(o),x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",t,i,typeof u),Re(null)),u instanceof Error&&!(u.message in je)&&(je[u.message]=!0,Re(o),x("Failed %s type: %s",t,u.message),Re(null))}}(n,e.props,"prop",r,e)}else void 0===t.PropTypes||Ee||(Ee=!0,x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",B(t)||"Unknown"));"function"!=typeof t.getDefaultProps||t.getDefaultProps.isReactClassApproved||x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Me(e){for(var n=Object.keys(e.props),t=0;t<n.length;t++){var r=n[t];if("children"!==r&&"key"!==r){Te(e),x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),Te(null);break}}null!==e.ref&&(Te(e),x("Invalid attribute `ref` supplied to `React.Fragment`."),Te(null))}function Be(e,r,o){var a=le(e);if(!a){var i="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(i+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var u,l=Ie(r);i+=l||Ae(),null===e?u="null":Array.isArray(e)?u="array":void 0!==e&&e.$$typeof===t?(u="<"+(B(e.type)||"Unknown")+" />",i=" Did you accidentally export a JSX literal instead of a component?"):u=typeof e,x("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",u,i)}var c=Q.apply(this,arguments);if(null==c)return c;if(a)for(var s=2;s<arguments.length;s++)Fe(arguments[s],e);return e===n.Fragment?Me(c):Le(c),c}var ze=!1;try{var Ue=Object.freeze({});new Map([[Ue,null]]),new Set([Ue])}catch(e){}var qe=Be,Ye={map:ie,forEach:function(e,n,t){ie(e,function(){n.apply(this,arguments)},t)},count:function(e){var n=0;return ie(e,function(){n++}),n},toArray:function(e){return ie(e,function(e){return e})||[]},only:function(e){if(!ee(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};n.Children=Ye,n.Component=T,n.PureComponent=F,n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=w,n.cloneElement=function(e,n,t){for(var r=Z.apply(this,arguments),o=2;o<arguments.length;o++)Fe(arguments[o],r.type);return Le(r),r},n.createContext=function(e,n){void 0===n?n=null:null!==n&&"function"!=typeof n&&x("createContext: Expected the optional second argument to be a function. Instead received: %s",n);var t={$$typeof:a,_calculateChangedBits:n,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null};t.Provider={$$typeof:o,_context:t};var r=!1,i=!1,u=!1,l={$$typeof:a,_context:t,_calculateChangedBits:t._calculateChangedBits};return Object.defineProperties(l,{Provider:{get:function(){return i||(i=!0,x("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),t.Provider},set:function(e){t.Provider=e}},_currentValue:{get:function(){return t._currentValue},set:function(e){t._currentValue=e}},_currentValue2:{get:function(){return t._currentValue2},set:function(e){t._currentValue2=e}},_threadCount:{get:function(){return t._threadCount},set:function(e){t._threadCount=e}},Consumer:{get:function(){return r||(r=!0,x("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),t.Consumer}},displayName:{get:function(){return t.displayName},set:function(e){u||(N("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",e),u=!0)}}}),t.Consumer=l,t._currentRenderer=null,t._currentRenderer2=null,t},n.createElement=qe,n.createFactory=function(e){var n=Be.bind(null,e);return n.type=e,ze||(ze=!0,N("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(n,"type",{enumerable:!1,get:function(){return N("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:e}),e}}),n},n.createRef=function(){var e={current:null};return Object.seal(e),e},n.forwardRef=function(e){null!=e&&e.$$typeof===c?x("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof e?x("forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&x("forwardRef render functions accept exactly two parameters: props and ref. %s",1===e.length?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),null!=e&&(null==e.defaultProps&&null==e.propTypes||x("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"));var n,t={$$typeof:i,render:e};return Object.defineProperty(t,"displayName",{enumerable:!1,configurable:!0,get:function(){return n},set:function(t){n=t,null==e.displayName&&(e.displayName=t)}}),t},n.isValidElement=ee,n.lazy=function(e){var n,t,r={$$typeof:s,_payload:{_status:-1,_result:e},_init:ue};return Object.defineProperties(r,{defaultProps:{configurable:!0,get:function(){return n},set:function(e){x("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),n=e,Object.defineProperty(r,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return t},set:function(e){x("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),t=e,Object.defineProperty(r,"propTypes",{enumerable:!0})}}}),r},n.memo=function(e,n){le(e)||x("memo: The first argument must be a component. Instead received: %s",null===e?"null":typeof e);var t,r={$$typeof:c,type:e,compare:void 0===n?null:n};return Object.defineProperty(r,"displayName",{enumerable:!1,configurable:!0,get:function(){return t},set:function(n){t=n,null==e.displayName&&(e.displayName=n)}}),r},n.useCallback=function(e,n){return ce().useCallback(e,n)},n.useContext=function(e,n){var t=ce();if(void 0!==n&&x("useContext() second argument is reserved for future use in React. Passing it is not supported. You passed: %s.%s",n,"number"==typeof n&&Array.isArray(arguments[2])?"\n\nDid you call array.map(useContext)? Calling Hooks inside a loop is not supported. Learn more at https://reactjs.org/link/rules-of-hooks":""),void 0!==e._context){var r=e._context;r.Consumer===e?x("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):r.Provider===e&&x("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return t.useContext(e,n)},n.useDebugValue=function(e,n){return ce().useDebugValue(e,n)},n.useEffect=function(e,n){return ce().useEffect(e,n)},n.useImperativeHandle=function(e,n,t){return ce().useImperativeHandle(e,n,t)},n.useLayoutEffect=function(e,n){return ce().useLayoutEffect(e,n)},n.useMemo=function(e,n){return ce().useMemo(e,n)},n.useReducer=function(e,n,t){return ce().useReducer(e,n,t)},n.useRef=function(e){return ce().useRef(e)},n.useState=function(e){return ce().useState(e)},n.version="17.0.2"}()}),f=r(function(e){e.exports="production"===process.env.NODE_ENV?c:s}),d=function(e){var n=e.size,t=e.clickable,r=e.action;return h("i",{className:"icon "+(void 0===n?"normal":n)+" "+(void 0!==t&&t?"clickable":"")+" material-icons",onClick:function(e){e.stopPropagation(),e.preventDefault(),r&&r()}},e.icon)},p=function(e){var n=e.label,t=e.icon,r=e.action,o=e.disabled,a=void 0!==o&&o,i=e.raised?"raised":e.outlined?"outlined":"normal";return a&&(i+=" disabled"),h("button",{className:"btn "+i,onClick:function(e){a||(e.stopPropagation(),e.preventDefault(),r&&r())}},t?h(d,{icon:t,size:"small"}):null,h("span",null,n))},v=React.createContext({}),m=function(e){var n=e.children,t=f.useContext(v);if(t){var r=t.dictionary,o=(void 0===r?{}:r)[n],a=o?o[t.lang]:n;return a?h("span",null,a):""}return n?h("span",null,n):""},y=function(e){var n=e.id,t=e.label,r=e.placeholder,o=e.value,a=e.onChange;function i(e){a&&a(n,e.target.checked)}var u=h(m,null,t);return console.log(t,o),!0===o?h("div",{className:"checkbox",key:n+"1"},h("input",{id:n,type:"checkbox",placeholder:r,checked:!0,value:o,onChange:i}),h("span",{class:"checkmark"}),h("label",{htmlFor:n},u)):h("div",{className:"checkbox",key:n+"0"},h("input",{id:n,type:"checkbox",placeholder:r,value:o,onChange:i}),h("span",{class:"checkmark"}),h("label",{htmlFor:n},u))},g=function(e){var n=e.title,t=e.columns,r=void 0===t?1:t,o=e.children,a=e.outlined,i=e.onChange,u=f.useState([]),l=u[0],c=u[1],s=function(e){return null==e||""===e};f.useEffect(function(){var e=f.Children.toArray(o).filter(function(e){return null!==e&&""!==e}).map(function(e){var n=e.props,t=n.id,r=n.value,o=n.required,a=void 0!==o&&o,i=n.validation,u=!a||(i?i(r):!s(r));return{id:t,value:r,required:a,validation:i,valid:u}}).filter(function(e){return void 0!==e.id});c(e)},[]),f.useEffect(function(){if(i){var e=l.every(function(e){return!0===e.valid}),n=l.reduce(function(e,n){var t=n.value;return(t||!1===t)&&(e[n.id]=t),e},{});i(n,e)}},[l]);var d=function(e,n){var t=l.find(function(n){return n.id===e});if(t){var r=!t.required||(t.validation?t.validation(n):!s(n));Object.assign(t,{value:n,valid:r}),c(l.slice())}},p=f.Children.toArray(o).filter(function(e){return null!==e&&""!==e}).map(function(e){var n=e.props.span,t=void 0===n?1:n,r=f.cloneElement(e,{onChange:d,outlined:!!a});return h(b,{style:{gridColumn:"span "+t}},r)}),v={gridTemplateColumns:"repeat("+r+", 1fr)"};return h(f.Fragment,null,n?h("header",{className:"form-header"},h(m,{use:"headline6"},n)):"",h("form",{className:"form-grid",style:v},p))},b=function(e){return h("div",{className:"field-wrapper",style:e.style},e.children)},C=function(e){var n=e.caption?"caption":"",t=e.prominent?"prominent":"",r=e.dense?"dense":"",o=e.primary?"primary":"";o=e.secondary?"secondary":o;var a=e.icon?h(d,{icon:e.icon,clickable:e.clickable,action:e.action}):"";a=e.iconSrc?h("img",{className:"header-icon",src:e.iconSrc}):a;var i=e.img?{backgroundImage:"url("+e.img+")"}:{},u=h(m,null,e.title);return h("header",{className:"header "+n+" "+t+" "+r+" "+o+" "+e.className,style:i},a,e.title?h("label",null,u):null,h("span",{className:"actions"},e.children))};function k(){return k=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},k.apply(this,arguments)}var S=function(e){var n=e.items,t=e.children,r=e.onSelect,o=e.groupBy,a=(void 0===n?[]:n).reduce(function(e,n){var t=e.find(function(e){return e.name===n.content[o]});return t||e.push(t={name:n.content[o],items:[]}),t.items.push(n),e},[]);return h("div",{className:"list"},a.map(function(e){return h(f.Fragment,{key:e.name},h("header",{key:e.name+"-header"},h(m,null,e.name)),h("ul",{key:e.name+"-ul"},e.items.map(function(e){return h(_,{key:e.id,item:e,onSelect:r})})))}),t)},_=function(e){var n=e.item,t=e.onSelect,r=n.id,o=n.icon,a=n.line1,i=n.line2,u=n.meta;return h("li",{id:r,onClick:function(){t&&t(r)}},o?h(d,{icon:o,size:"small"}):null,h("main",null,h("div",{className:"primary-line"},h(m,null,a)),i?h("div",{className:"secondary-line"},h(m,null,i)):null),u?h("div",{className:"meta"},u):null)},w=f.createContext({}),N=function(e){var n=e.icon,t=void 0===n?"more_vert":n,r=e.children,o=e.align,a=f.useState(!1),i=a[0],u=a[1];function l(){u(!i)}return h(w.Provider,{value:[i,u]},h("div",{className:"menu-icon"},h(d,{icon:t,clickable:!0,action:l}),i?h("menu",{className:""+o},r):null,i?h("div",{className:"overlay",onClick:l}):null))},x=function(e){var n=e.selected,t=e.onChange,r=f.Children.map(e.children,function(e,r){return f.cloneElement(e,{selected:r===n,onSelect:function(){t&&t(r)}})});return h("div",{class:"tabs"},r,h("div",{class:"tab-filler"}))},O=function(e){var n=e.onSelect;return h("div",{className:"tab "+(e.selected?"selected":""),onClick:function(){n&&n()}},e.label,e.actions||null)},E=function(e){var n=e.selected,t=void 0===n?0:n,r=f.Children.toArray(e.children).filter(function(e,n){return n===t})[0];return h(f.Fragment,null,r)},j=function(e){var n=f.useContext(v),t=e.id,r=e.type,o=void 0===r?"text":r,a=e.label,i=e.placeholder,u=e.value,l=e.readOnly,c=void 0!==l&&l,s=e.onChange,d=e.onEnter,p=e.onClick,y=(a?"":"no-label")+" "+(e.outlined?"textfield-outlined":"textfield"),g=h(m,null,a);return h("div",{className:""+y,onClick:p},h("input",{id:t,type:o,placeholder:i,value:u,required:!0,onChange:function(e){e.stopPropagation(),e.preventDefault(),s&&s(t,e.target.value)},onKeyDown:function(e){13==(e.charCode?e.charCode:e.keyCode?e.keyCode:0)&&d()},onFocus:function(){n&&n.changeFocus({lose:function(){}})},readOnly:c}),h("span",{className:"bar"}),a?h("label",null,g):null)},P=function(e){var n=f.useContext(v),t=e.id,r=e.options,o=void 0===r?[]:r,a=e.value,i=e.onChange,u=f.useState(!1),l=u[0],c=u[1],s=f.useState(),p=s[0],m=s[1];function y(){n&&n.changeFocus({lose:function(){c(!1)}}),c(!l)}return f.useEffect(function(){if(Array.isArray(o)){var e=o.find(function(e){return e.value===a});e&&m(e.label)}},[a]),h("div",{className:"dropdown"},h(j,k({},e,{onClick:y,value:p})),h(d,{icon:"expand_more",clickable:!0,size:"small",action:y}),1==l?h("menu",null,h("ul",{onClick:function(e){var n=e.target.getAttribute("value"),r=o.find(function(e){return e.value===n});i&&i(t,n),m(r.label),c(!1)}},Array.isArray(o)?o.map(function(e){return h("li",{key:e.value,value:e.value},e.label)}):null)):null)},R=function(e){var n=e.columns,t=void 0===n?[]:n,r=e.rows,o=void 0===r?[]:r,a=e.onRowSelection,i=e.onSort,u=e.editable,l=e.outlined,c=f.useState({})[0];function s(e,n){a&&a(e,n)}function p(e,n){i&&i(e,n)}return h("div",{className:"datatable8 "+(l?"outlined":"")},h("table",null,h("thead",null,h("tr",null,t.map(function(e){var n=e.sortable;return h("th",null,h(m,null,e.label),n?h(d,{icon:"arrow_up",size:"small",clickable:!0}):null)}))),h("tbody",null,function(e,n){void 0===n&&(n={});var t=Object.keys(n);if(!t.length)return e;var r=function(e,n,t){return t=null!==t?t:1,e===n?0:e>n?t:-1*t};return e.sort(function(e,o){for(var a=0,i=0;0===a&&i<t.length;){var u=t[i];u&&(a=r(e[u],o[u],n[u]),i++)}return a})}(o,c).map(function(e){return h(T,{key:e.id,row:e,columns:t,onSelect:s,onDrop:p,editable:u})}))))},T=function(e){var n,t=e.row,r=e.columns,o=void 0===r?[]:r,a=e.onSelect,i=e.editable,u=f.useState(!1),l=u[0],c=u[1],s=l?"expand_more":"expand_less";return h(f.Fragment,null,h("tr",{onClick:function(e){return a(t,e)}},o.map(function(e){return h(A,{row:t,column:e,cell:t[e.id],editable:i})}),t.info?h(d,{icon:s,clickable:!0,action:function(){return c(!l)}}):null),t.info&&l?h("tr",{className:"table-row-info"},(n=t.info)&&("[object Function]"===Object.prototype.toString.call(n)||"function"==typeof n||n instanceof Function)?t.info():t.info):null)},A=function(e){var n=e.row,t=e.column,r=e.cell,o=e.editable;return h("td",{className:t.id},function(e){var a=t.id,i=t.disabled,u=void 0!==i&&i,l=t.min,c=t.max,s=t.onChange,f=t.options;if(o&&s)switch(e){case"ICON":return h(d,{icon:r});case"BOOLEAN":case"Boolean":return h(y,{id:a,value:r,onChange:function(e,t){return s(n.id,e,t)},disabled:u});case"SELECTION":return h(P,{id:a,value:r,placeholder:"--Select--",options:f,onChange:function(e,t){return s(n.id,e,t)}});case"CHECK":return h(y,{id:a,value:r,onChange:function(e,t){return s(n.id,e,t)},disabled:n.disabled});case"CHECKABLE":return r&&r.value?h(y,{id:a,value:r.checked||!1,label:r.value,onChange:function(e,t){return s(n.id,e,r.value,t,r)}}):"";case"TEXTFIELD":return h(j,{id:a,value:r,onChange:function(e,t){return s(n.id,e,t)}});case"String":return h($,{id:a,value:r,options:f,onChange:function(e,t){return s(n.id,e,t)}});case"Number":return h(j,{id:a,type:"number",value:r,min:l,max:c,onChange:function(e,t){return s(n.id,e,t)}});default:return r}else switch(e){case"ICON":return h(d,{icon:r});case"Boolean":return h(I,{id:a,value:r});case"String":return h(D,{id:a,value:r,options:f});default:return r}}(t.type))},I=function(e){var n=e.value;return h(d,{icon:!0===(void 0!==n&&n)?"check_box":"check_box_outline_blank"})},D=function(e){var n=e.value,t=e.options,r=t?t.find(function(e){return e.value===n}):null;return h("div",{className:"field-editor string-editor"},r?r.label:n)},$=function(e){var n=e.id,t=e.value,r=void 0===t?"":t,o=e.options,a=e.onChange;function i(e,n){a&&a(e,n)}return h("div",{className:"field-editor string-editor"},o?h(P,{outlined:!0,id:n,value:r,onChange:i,options:o}):h(j,{outlined:!0,id:n,value:r,onChange:i}))},F=function(e){var n=e.id,t=e.label,r=e.init,o=e.onChange,a=f.useRef(!1),i=f.useState(),u=i[0],l=i[1],c=f.useState(r),s=c[0],d=c[1];return f.useEffect(function(){a.current?o&&s&&o(n,s):a.current=!0},[s]),h("div",{className:"tokenField"},h("label",null,t),s.map(function(e,n){return h(L,{text:e,onDelete:function(){return function(e){var n=s.slice();n.splice(e,1),d(n)}(n)}})}),h("input",{type:"text",value:u,onChange:function(e){l(e.target.value)},onKeyDown:function(e){if("Enter"===e.key){e.preventDefault(),e.stopPropagation();var n=s.concat(e.target.value);d(n),l("")}if(""===u&&s.length>0&&"Backspace"===e.key){var t=s.slice(0,-1);d(t)}}}))},L=function(e){var n=e.onDelete;return h("div",{className:"token"},h(m,{use:"caption",tag:"div"},e.text),h(d,{icon:"close",clickable:!0,action:n,size:"small"}))},M=function(e){var n=e.nodes;return h("div",{className:"tree"},void 0===n?[]:n,e.children)},B=function(e){var n=e.icon,t=void 0===n?"folder":n,r=e.label,o=e.open,a=e.children,i=e.actions;return h("details",{className:"tree-node",open:void 0!==o&&o},h("summary",{className:"tree-item"},t?h(d,{icon:t,size:"small",small:!0}):null,h("div",{className:"label"},r),h("div",{className:"actions"},i)),a)},z=function(e){var n=e.id,t=e.icon,r=e.label,o=e.actions,a=e.onSelect;return h("div",{className:"tree-item final",onClick:function(){a&&a(n)}},h(d,{icon:void 0===t?"description":t,size:"small",small:!0}),h("div",{className:"label"},r),h("div",{className:"actions"},o))},U=f.createContext({}),q=function(e){var n=e.context,t=e.children,r=f.useState(void 0===n?{}:n);return h(U.Provider,{value:[r[0],r[1]]},t)},Y=function(e){var n=e.layout,t=e.context;return h(q,{context:void 0===t?{}:t},h("article",{className:"page6 "+(void 0===n?"simple":n)},e.children))},V=function(e){var n=e.children,t=e.siteDictionary,r=f.useState(e.siteLang),o=r[0],a=r[1],i=f.useState(t),u=i[0],l=i[1],c=f.useState("max"),s=c[0],d=c[1],p=f.useState(!1),m=p[0],y=p[1],g=f.useState(null),b=g[0],C=g[1],k=f.useState(!1),S=k[0],_=k[1],w=f.useState(),N=w[0],x=w[1],O=f.useState(),E=O[0],j=O[1],P=f.useState(),R=P[0],T=P[1],A=f.useState(),I=A[0],D=A[1],$=f.useState(),F=$[0],L=$[1],M={lang:o,setLang:a,dictionary:u,setDictionary:l,focused:F,changeFocus:function(e){F&&F.lose(),L(e)},sideNav:s,setSideNav:d,showNav:m,setShowNav:y,info:b,openInfo:function(e){C(e)},closeInfo:function(){C(null)},console:S,toggleConsole:function(){_(!S)},breadcrumb:I,setBreadcrumb:D,page:N,goto:function(e){x(e)},dialog:E,openDialog:function(e){j(e)},closeDialog:function(){j(null)},preview:R,openPreview:function(e){T(e)},closePreview:function(){T(null)}};return h(v.Provider,{value:M},n)},K=function(e){var n=e.icon;return h(C,{icon:void 0===n?"equalizer":n,title:e.title})},H=function(e){var n=e.children;return f.useContext(v),h("nav",null,n)},W=function(){var e=f.useContext(v);return e.info?h("aside",null,e.info):""},G=function(e){var n=e.children,t=e.min,r=f.useContext(v),o=r.showNav;f.useEffect(function(){t&&r.setSideNav("min")},[]);var a=n?f.Children.toArray(n).reduce(function(e,n){var t=n.props?n.props.section:"...";e[t]||(e[t]=[]);var r=n.props,o=r.title;return o&&e[t].push({id:r.id,icon:r.icon,title:o}),e},{}):{};return h("menu",{className:"min "+(o?"show":"")},h("main",null,Object.keys(a).map(function(e){return h(f.Fragment,{key:e},a[e].map(function(e){var n=e.id,t=e.icon;return h(d,{key:n,icon:void 0===t?"info":t,clickable:!0,checked:n===r.page,action:function(){return function(e){r.setShowNav(!1),r.goto(e)}(n)}})}),h("div",{className:"section-divider"}))})))},J=function(e){var n=e.children,t=e.init,r=f.useContext(v),o=r.page;return f.useEffect(function(){r.goto(t||"EMPTY")},[]),h("main",null,f.Children.toArray(n).filter(function(e){return!!e.props&&e.props.id===o}))},X=function(){var e=f.useContext(v);return e.dialog?e.dialog:""},Q=function(){var e=f.useContext(v);return e.preview?h("div",{className:"site-preview"},e.preview):""},Z=function(){return f.useContext(v).console?h("footer",{className:"site-console"},h(C,null,h(x,null,h(O,{label:"Console"}))),h("main",null)):""},ee=function(e){var n=f.useContext(v),t=e.icon,r=e.title,o=void 0===r?"Dialog":r,a=e.children,i=e.actions;return h(f.Fragment,null,h("div",{className:"overlay"}),h("div",{className:"dialog",onClick:function(){n.closeDialog()}},h("div",{className:"dialog-panel",onClick:function(e){e.preventDefault(),e.stopPropagation()}},h("header",null,t?h(N,{icon:t}):null,h(m,null,o)),h("main",null,a),h("footer",null,i))))},ne={STRING:"String",NUMBER:"Number",DATE:"Date",BOOLEAN:"Boolean",ARRAY:"Array",ENTITY:"Object",FUNCTION:"Function",EMAIL:"String"},te=Object.values(ne).reduce(function(e,n){return e["is"+n]=function(e){return toString.call(e)=="[object "+n+"]"},e},{}),re=/*#__PURE__*/function(){function e(e){this._schema=e}var n=e.prototype;return n.checkType=function(n,t){var r=n.type,o=n.item,a=!0,i=!0;if(o){var u=new e(o);switch(r){case ne.ARRAY:a=te["is"+r](t),i=t.every(function(e){return u.validate(e)});break;case ne.ENTITY:a=te["is"+r](t),i=u.validate(t);break;case ne.NUMBER:a=te["is"+r](t.value),i=!0;break;default:a=!0,i=!0}}return a&&i},n.validate=function(e){var n=this;return Object.entries(this._schema).filter(function(e){return!0===e[1].required}).every(function(t){var r=t[0];return void 0!==e[r]&&n.checkType(t[1],e[r])})},n.form=function(e){return Object.entries(this._schema).reduce(function(n,t){var r=t[0];return n[r]=Object.assign({},t[1],{value:e[r]}),n},{})},n.sections=function(e){var n=this.form(e),t=Object.values(n).reduce(function(e,n){var t=n.section||"";return e.hasOwnProperty(t)||(e[t]={title:t,fields:[]}),e[t].fields.push(n),e},{});return Object.values(t)},n.value=function(n){return Object.entries(this._schema).reduce(function(t,r){var o=r[0],a=r[1],i=a.item,u=n?n[o]:null;switch(a.type){case ne.STRING:case ne.NUMBER:case ne.BOOLEAN:t[o]=u||a.default;break;case ne.ENTITY:var l=new e(i);t[o]=l.value(u);break;case ne.ARRAY:if(i===ne.STRING)t[o]=u||[];else{var c=new e(i);t[o]=u?u.map(function(e){return c.value(e)}):[]}break;default:t[o]=a}return t},{})},e}(),oe=/*#__PURE__*/function(){function e(e,n){this.type=e,this._type=new re(e),this._value=n}var n=e.prototype;return n.isValid=function(){return this._type.validate(this._value)},n.value=function(){return this._type.value(this._value)},n.form=function(){return this._type.form(this._value)},n.sections=function(){return this._type.sections(this._value)},n.update=function(e){this._value=e},e}(),ae=function(e){var n=e.columns,t=void 0===n?1:n,r=e.filter,o=e.onChange,a=e.content.form();console.log(a);var i=Object.keys(a).map(function(e){return a[e]}).filter(function(e){return!r||r(e)});return console.log(i),h(g,{className:"content-form",columns:t,outlined:!0,onChange:o},i.map(function(e){return h(ie,k({key:e.id},e))}))},ie=function(e){switch(e.type){case ne.BOOLEAN:return h(y,k({key:e.id},e));case ne.NUMBER:return h(le,k({key:e.id},e));default:return h(ue,k({key:e.id},e))}},ue=function(e){var n,t=e.id,r=e.type,o=e.label,a=e.options,i=e.textarea,u=e.required,l=void 0!==u&&u,c=e.value,s=e.onChange,f=e.outlined,d=((n={})[ne.NUMBER]="number",n[ne.DATE]="date",n)[r]||"text";return a?h(P,{key:t,id:t,label:o,value:c,onChange:s,options:"function"==typeof a?a():a,outlined:f}):h(j,{key:t,id:t,type:d,label:o,value:c,onChange:s,required:l,outlined:f,textarea:i})},le=function(e){var n=e.id,t=e.label,r=e.options,o=e.required,a=void 0!==o&&o,i=e.value,u=e.onChange,l=e.outlined;function c(e,n){u&&u(e,+n?+n:n)}return r?h(P,{key:n,id:n,label:t,value:i,onChange:c,options:r,outlined:l}):h(j,{key:n,id:n,type:"number",label:t,value:i,onChange:c,required:a,outlined:l})},ce=function(e){var n=e.content,t=e.filter,r=e.onChange;function o(e,t){var o,a=Object.assign({},n.value(),((o={})[e]=t,o));r&&r(a)}var a=n.sections();return h("div",{className:"content-editor"},a.map(function(e){var r=e.title,a=e.fields;return h("section",{key:r},h("header",null,r),h("main",null,a.filter(function(e){return"id"!==e.id}).filter(function(e){return!t||t(e,n)}).map(function(e){return h(fe,{key:e.id,field:e,onChange:o})})))}))},se=function(e){var n=e.content,t=e.filter,r=e.grouped,o=void 0!==r&&r,a=e.onChange,i=f.useState(0),u=i[0],l=i[1];function c(e,t){var r,o=Object.assign({},n.value(),((r={})[e]=t,r));a&&a(o)}var s=n.sections();return h("div",{className:"content-editor tabbed"},h(x,{selected:u,onChange:function(e){l(e)}},s.map(function(e){return h(O,{label:e.title})})),h(E,{selected:u},s.map(function(e){var r=e.fields;return h("section",{key:e.title},h("nav",null," "),h("main",null,o?function(e){var n=e.fields,t=(void 0===n?[]:n).reduce(function(e,n){var t=n.group||"",r=e[t]||{name:t,fields:[]};return r.fields.push(n),e[t]=r,e},{});return Object.values(t)}(e).map(function(e){return h(f.Fragment,null,e.name.length>0?h("div",{className:"group-caption"},e.name):null,e.fields.filter(function(e){return"id"!==e.id}).filter(function(e){return!t||t(e)}).map(function(e){return h(fe,{key:e.id,field:e,onChange:c,content:n})}))}):r.filter(function(e){return"id"!==e.id}).filter(function(e){return!t||t(e)}).map(function(e){return h(fe,{key:e.id,field:e,onChange:c,content:n})})))})))},fe=function(e){var n=e.field,t=e.onChange,r=e.content,o=e.outlined,a=void 0!==o&&o,i=n.id,u=n.type,l=n.item,c=n.label,s=n.editable,f=n.options;function d(e,n){t&&t(e,n)}return function(){var e=n.value?n.value:n.default;switch(u){case ne.ENTITY:return h(de,{field:n,value:e,onChange:d});case ne.STRING:return h(pe,{outlined:a,field:n,value:e,onChange:d,content:r});case ne.BOOLEAN:return h(y,{outlined:!0,id:i,label:c,value:e,onChange:d});case ne.DATE:return h(j,{outlined:a,id:i,type:"date",label:c,value:e,onChange:d,disabled:s});case ne.NUMBER:return h(he,{outlined:a,field:n,value:e,onChange:d});case ne.ARRAY:return l===ne.STRING?f?h(me,{content:r,field:n,value:e,onChange:d}):h(ve,{field:n,value:e,onChange:d}):h(ye,{field:n,value:e,onChange:d});default:return h("div",null,c)}}()},de=function(e){var n=e.field,t=e.value,r=e.onChange,o=n.id,a=n.label,i=new oe(n.item,void 0===t?{}:t);function u(e,n){var t,a=Object.assign({},i.value(),((t={})[e]=n,t));r&&r(o,a)}var l=i.form(),c=Object.keys(l).map(function(e){return l[e]});return h("div",{className:"entity-editor"},h("header",null,h(m,{use:"caption"},a)),h("main",null,c.map(function(e){return h(fe,{key:e.id,field:e,onChange:u})})))},pe=function(e){var n=e.field,t=e.value,r=void 0===t?"":t,o=e.onChange,a=e.outlined,i=n.id,u=n.label,l=n.options,c=n.editable;function s(e,n){o&&o(e,n)}return h("div",{className:"field-editor string-editor"},void 0===c||c?l?h(P,{outlined:a,id:i,label:u,value:r,onChange:s,options:"function"==typeof l?l(n,e.content):l}):h(j,{outlined:a,id:i,label:u,value:r,onChange:s}):h(j,{outlined:a,id:i,label:u,value:r,onChange:s,readOnly:!0}))},he=function(e){var n=e.field,t=e.onChange,r=n.editable;return h("div",{className:"field-editor number-editor"},h(j,{outlined:!0,id:n.id,label:n.label,type:"NUMBER",value:e.value||n.default,max:n.max,min:n.min,onChange:function(e,n){t&&t(e,n)},disabled:!(void 0===r||r)}))},ve=function(e){var n=e.field,t=e.value,r=e.onChange;return h("div",{className:"list-editor"},h(F,{id:n.id,label:n.label,init:void 0===t?[]:t,onChange:function(e,n){r&&r(e,n)}}))},me=function(e){var n=e.field,t=e.value,r=void 0===t?[]:t,o=e.content,a=e.onChange,i=n.id,u=n.options;return h("div",{className:"multiselection-editor"},h("label",null,n.label),("function"==typeof u?u(n,o):u).map(function(e){var n=r.includes(e.value);return h(y,{value:n,label:e.label,onChange:function(){return(t=r.indexOf(n=e.value))>=0?r.splice(t,1):r.push(n),void(a&&a(i,r));var n,t}})}))},ye=function(e){var n=e.field,t=e.value,r=void 0===t?[]:t,o=e.onChange,a=n.id,i=n.item,u=n.label,l=n.Feeder,c=n.Renderer,s=n.Adder,f=void 0===s||s,p=n.editable,v=void 0===p||p;function y(e){if(o){var n=r.concat(e);o(a,n)}}function g(e){if(o){var n=r.filter(function(n,t){return t!==e});o(a,n)}}function b(e,n,t){if(o){var i=r.slice();i[e][n]=t,o(a,i)}}var C=Object.values(i).map(function(e){return k({},e,{onChange:b})});C.push({id:"actions",label:"Actions"});var S=r.map(function(e,n){return k({},e,{id:n,actions:[h(d,{icon:"delete",clickable:!0,action:function(){return g(n)},small:!0})]})}),_={columns:C,rows:S};return h("div",{className:"collection-editor"},h("header",null,h(m,{use:"caption"},u),h("div",{className:"actions"},l?h(l,{onAdd:y}):null)),c?h(c,{field:n,value:r,onRemove:g,onChange:o}):h(R,k({},_,{editable:v})),h("footer",null,f?h(ge,{item:i,onAdd:y}):null))},ge=function(e){var n=e.item,t=e.onAdd,r=f.useState(!1),o=r[0],a=r[1],i=f.useState({}),u=i[0],l=i[1];function c(){a(!o)}function s(e,n,r){if(t){var o,a=Object.assign({},u,((o={})[n]=r,o));l(a)}}var v=Object.values(n).map(function(e){return k({},e,{type:"String",onChange:s})});v.push({id:"actions",label:""});var m=[{actions:[h(d,{icon:"done",clickable:!0,action:function(){t&&t([u]),c()}}),h(d,{icon:"close",clickable:!0,action:c})]}];return m[0]=Object.assign({},u,m[0]),h("div",{className:"collection-adder"},o?h(R,k({},{columns:v,rows:m},{editable:!0})):h(p,{icon:"add",label:"Add",action:c}))};exports.Button=p,exports.CheckBox=y,exports.Chip=function(e){var n=e.id,t=e.icon,r=e.label,o=e.action,a=e.onSelect,i=e.outlined?"outlined":"normal";return e.selected&&(i+=" selected"),h("div",{className:"chip "+i,onClick:function(e){e.stopPropagation(),e.preventDefault(),a&&a(n)}},t?h(d,{icon:t,size:"small"}):null,h("main",null,h(m,null,r)),o?h("span",{className:"meta"},o):null)},exports.Chips=function(e){return h("div",{className:"chips"},e.children)},exports.CircularProgress=function(e){return h("div",{className:"circular-progress"},h(d,{icon:"refresh",size:"small"}))},exports.CollectionEditor=ye,exports.Content=oe,exports.ContentEditor=ce,exports.ContentForm=ae,exports.CreateContentDialog=function(e){var n=e.label,t=e.type,r=e.validator,o=e.onOK,a=e.onActionClose,i=void 0===a||a,u=f.useContext(v),l=f.useState({}),c=l[0],s=l[1],d=f.useState(!1),y=d[0],g=d[1],b=f.useState([]),C=b[0],k=b[1];function S(e){"OK"===e&&o&&o(c),"CLOSE"!==e&&!0!==i||u.closeDialog()}var _=h(f.Fragment,null,h(p,{label:"CLOSE",action:function(){return S("CLOSE")}}),h(p,{label:"OK",action:function(){return S("OK")},disabled:!y,raised:!0})),w=h(m,{use:"headline6"},n),N=new oe(t,c);return h(ee,{title:w,open:!0,onAction:S,actions:_},h(ae,{content:N,filter:function(e){return function(e){var n=e.required;return void 0!==n&&n}(e)||function(e){var n=e.creation;return void 0!==n&&n}(e)},onChange:function(e,n){if(s(e),r){var t=r(e),o=t.errors,a=void 0===o?[]:o;g(n&&t.validation),k(a)}else g(n)}}),C.map(function(e){return h(m,{use:"overline",tag:"div",className:"error"},e)}))},exports.DataTable=R,exports.Dialog=ee,exports.DropDown=P,exports.EditContentDialog=function(e){var n=e.label,t=e.type,r=e.value,o=void 0===r?{}:r,a=e.filter,i=e.validator,u=e.onOK,l=f.useContext(v),c=f.useState(o),s=c[0],d=c[1],y=f.useState(!1),g=y[0],b=y[1],C=f.useState([]),k=C[0],S=C[1];function _(e){"OK"===e&&u&&u(Object.assign({},o,s)),l.closeDialog()}var w=h(f.Fragment,null,h(p,{label:"CLOSE",action:function(){return _("CLOSE")}}),h("div",{className:"expand"}),h(p,{label:"OK",action:function(){return _("OK")},disabled:!g,raised:!0})),N=h(m,{use:"headline6"},n),x=new oe(t,s);return h(ee,{title:N,open:!0,onAction:_,actions:w},h(ce,{content:x,onChange:function(e){if(d(e),i){var n=i(e),t=n.errors,r=void 0===t?[]:t;b(n.validation),S(r)}else b(!0)},filter:a}),k.map(function(e){return h(m,{use:"overline",tag:"div",className:"error"},e)}))},exports.FieldEditor=fe,exports.Form=g,exports.HTTPClient=function(n,t){return{GET:function(r){var o=t?t.token():null;return e("GET",n+r,void 0,o)},POST:function(r,o){var a=t?t.token():null;return e("POST",n+r,o,a)},PUT:function(r,o){var a=t?t.token():null;return e("PUT",n+r,o,a)},PATCH:function(r,o){var a=t?t.token():null;return e("PATCH",n+r,o,a)},DELETE:function(r){var o=t?t.token():null;return e("DELETE",n+r,void 0,o)}}},exports.Header=C,exports.Icon=d,exports.Kanban=function(e){return h("div",{className:"kanban"},e.children)},exports.KanbanCard=function(e){return h("div",{className:"kanban-card "+e.color},e.children)},exports.KanbanColumn=function(e){var n=e.id,t=e.icon,r=e.title,o=e.subtitle,a=e.badge,i=e.children,u=e.minified,l=e.disabled,c=void 0!==l&&l,s=f.useState(void 0!==u&&u),p=s[0],v=s[1];function y(){v(!p)}return p?h("div",{className:"kanban-column "+n+" min"},h("main",null,r),h("footer",null,h(d,{icon:"toggle_off",onIcon:"toggle_on",clickable:!0,action:y}))):h("div",{className:"kanban-column "+n+" "+(c?"disabled":"")},h("header",null,h(d,{icon:t}),h("div",{className:"title"},h(m,{use:"headline6"},r),h(m,{className:"secondary-text",use:"body2"},o)),h("div",{className:"badge"},a)),h("main",null,i),h("footer",null,h(d,{icon:"toggle_off",onIcon:"toggle_on",clickable:!0,action:y})))},exports.LinearProgress=function(e){var n=e.progress,t=e.max;return h("div",{className:"linear-progress"},h("progress",{value:void 0===n?0:n,max:void 0===t?100:t}))},exports.List=function(e){var n=e.items,t=void 0===n?[]:n,r=e.children,o=e.onSelect;function a(e){o&&o(e)}return e.groupBy?h(S,k({},e,{onSelect:a})):h("div",{className:"list"},h("ul",null,t.map(function(e){return h(_,{key:e.id,item:e,onSelect:a})})),r)},exports.ListEditor=ve,exports.LoginBox=function(e){var n=e.logo,t=e.title,r=e.userLabel,o=void 0===r?"User":r,a=e.passwordLabel,i=void 0===a?"Password":a,u=e.loginLabel,l=void 0===u?"Log In":u,c=e.onOK,s=e.forgotLabel,v=void 0===s?"Forgot Password ?":s,y=e.onForgot,g=e.message,b=e.loading,C=f.useState(""),k=C[0],S=C[1],_=f.useState(""),w=_[0],N=_[1];function x(){return k&&k.length>0&&w&&w.length>0}function O(e){c&&x()&&c(k,e||w)}function E(e){return h(m,null,e)}return h("div",{className:"login-box"},h("header",null,n?h("img",{src:n}):"",h("div",{className:"title"},h(m,null,t))),h("main",null,h(j,{label:E(o),value:k,onChange:function(e,n){S(n)},onEnter:O,outlined:!0}),h(j,{label:E(i),value:w,onChange:function(e,n){N(n)},onEnter:O,type:"password",outlined:!0})),h("footer",null,y?h(p,{label:E(v),action:function(){y&&y(k)},disabled:!(k&&k.length>0)}):null,b?h("div",{className:"load-box"},h(d,{icon:"refresh"})):h(p,{label:E(l),action:O,disabled:!x(),raised:!0}),g?h("div",{className:"message"},h(m,null,g)):null))},exports.Menu=function(e){return h("ul",null,e.children)},exports.MenuIcon=N,exports.MenuItem=function(e){var n=e.icon,t=e.label,r=e.meta,o=e.onSelect,a=f.useContext(w)[1];return h("li",{className:"menu-item",onClick:function(){o&&o(),a(!1)}},n?h(d,{icon:n}):null,h("label",null,t),r?h("div",{className:"meta"},r):null)},exports.MenuSeparator=function(e){return h("li",null,"menuSeparator")},exports.Page=Y,exports.PageContext=U,exports.PageProvider=q,exports.Property=function(e){var n=e.value;return h("div",{className:"property"},h("div",{className:"property-name"},e.name),h("div",{className:"property-value"},n))},exports.RadioButton=function(e){var n=e.id,t=e.name,r=e.placeholder,o=e.value,a=e.onChange,i=h(m,null,e.label);return h("div",{className:"radio"},h("input",{id:n,name:t,type:"radio",placeholder:r,value:o,onClick:function(e){a&&a(n,e.target.value)}}),h("span",{class:"checkmark"}),h("label",{htmlFor:n},i))},exports.ResetPasswordBox=function(e){var n=e.logo,t=e.title,r=e.children,o=e.onOK,a=e.onClose,i=f.useState({}),u=i[0],l=i[1],c=f.useState(),s=c[0],d=c[1];function v(){return u.password1&&u.password2}function y(e,n){var t,r=Object.assign({},u,((t={})[e]=n,t));l(r)}function g(){o&&v()&&(u.password1===u.password2?(d(null),o(u)):d("New Password and Confirm New Password do not match"))}return h("div",{className:"reset-password-box"},h("header",null,n?h("img",{src:n}):null,t?h("div",{className:"title"},h(m,null,t)):null,r),h("main",null,h(m,{use:"headline6"},"Change Password"),h(j,{id:"password1",outlined:!0,icon:"lock",type:"password",label:"New Password",lapse:100,onChange:y,onEnter:g}),h(j,{id:"password2",outlined:!0,icon:"lock",type:"password",label:"Confirm New Password",lapse:100,onChange:y,onEnter:g}),s?h("div",{className:"error"},s):null),h("footer",null,h(p,{label:"Close",action:function(){a&&a()}}),h(p,{label:"OK",raised:!0,disabled:!v(),action:g})))},exports.Section=function(e){var n=e.icon,t=e.title,r=void 0===t?"":t,o=e.canCollapse,a=void 0===o||o,i=e.open,u=void 0!==i&&i,l=e.actions,c=e.children,s=e.className,p=f.useState(u),v=p[0],m=p[1];return f.useEffect(function(){m(u)},[u]),h("section",{className:"section2 "+s},h(C,{icon:{icon:n},title:r},l,a?h(d,{icon:"expand_more",onIcon:"expand_less",clickable:!0,action:function(){m(!u)}}):""),v?h("main",null,c):"")},exports.Session=t,exports.Site=function(e){var n=e.logo,t=e.title,r=e.toolbar,o=e.children,a=e.init,i=e.min;return h(V,{siteLang:e.lang,siteDictionary:e.dictionary},h("div",{className:"site6"},h(K,{icon:e.icon}),h(H,null,r),h(G,{logo:n,title:t,min:i},o),h(J,{init:a},o,h(Y,{id:"EMPTY"},"EMPTY")),h(W,null),h(Z,null),h(X,null),h(Q,null)))},exports.SiteProvider=V,exports.Stack=E,exports.TYPES=ne,exports.Tab=O,exports.TabbedContentEditor=se,exports.Tabs=x,exports.Text=m,exports.TextField=j,exports.TokenField=F,exports.Tree=M,exports.TreeItem=z,exports.TreeNode=B,exports.TreededContentEditor=function(e){var n=e.content,t=e.onChange,r=n.value(),o=Object.values(n.type).filter(function(e){return e.type===ne.ARRAY}),a=f.useState(),i=a[0],u=a[1];function l(){}return h("div",{className:"content-editor treeded-editor"},h("menu",null,h("header",null,h(m,{use:"caption"},"Tree Editor")),h(M,null,o.map(function(e,n){return h(B,{icon:"folder",label:e.label,actions:[h(d,{small:!0,icon:"add",clickable:!0,action:l})]},r[e.id]?r[e.id].map(function(n,t){return h(z,{icon:n.icon||"description",label:n.name||n.label,onSelect:function(){return function(e,n,t){var o=new oe(t.item,n);u({index:e,item:o,node:t,value:r[t.id]})}(t,n,e)}})}):null)}))),h("div",null,i?h(se,{content:i.item,onChange:function(e){var n,o=i.value.slice();o[i.index]=e;var a=Object.assign({},r,((n={})[i.node.id]=o,n));t&&t(a)}}):"select"))},exports.Viewer=function(e){var n=e.title,t=e.src,r=e.info,o=e.actions,a=void 0===o?[]:o,i=e.tools,u=void 0!==i&&i,l=e.onClose,c=f.useState(!1),s=c[0],p=c[1];function v(){p(!s)}var y=h(m,{use:"headline6"},n);return h("div",{className:"viewer"},h(C,{icon:{icon:"close",clickable:!0,action:l},title:y},s?"":h(d,{icon:"info",clickable:!0,action:v}),a),h("main",null,h("div",{className:"resizer"},h("picture",null,h("img",{src:t})))),h("aside",{className:s?"open":""},h(C,{title:"Detalles"},h(d,{icon:"close",clickable:!0,action:v})),h("main",null,r)),u?h("footer",null,h(d,{clickable:!0,icon:"zoom_out"}),h(d,{clickable:!0,icon:"zoom_out_map"}),h(d,{clickable:!0,icon:"zoom_in"})):null)},exports.isFunction=function(e){return e&&("[object Function]"===Object.prototype.toString.call(e)||"function"==typeof e||e instanceof Function)};
|
1
|
+
require("material-design-icons-iconfont/dist/material-design-icons.css");var e=require("react"),n=require("deep-equal"),t=require("resumablejs");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=/*#__PURE__*/o(e),r=/*#__PURE__*/o(n),a=/*#__PURE__*/o(t),l=function(e,n,t,o){void 0===t&&(t=null);try{console.log("FETCH",e,n);var i={method:e,mode:"cors",headers:{Accept:"application/json","Content-Type":"application/json","x-access-token":o},body:t};return Promise.resolve(function(e,t){try{var o=Promise.resolve(fetch(n,i)).then(function(e){var n;function t(t){if(n)return t;throw e}var o=function(){if(e.ok)return Promise.resolve(e.json()).then(function(e){return n=1,e})}();return o&&o.then?o.then(t):t(o)})}catch(e){return t(e)}return o&&o.then?o.then(void 0,t):o}(0,function(e){if(e instanceof Error)throw{error:e};return Promise.resolve(e.json()).then(function(e){throw{success:!1,message:e.message}})}))}catch(e){return Promise.reject(e)}},u=function(e,n){return{GET:function(t){var o=n?n.token():null;return l("GET",e+t,void 0,o)},POST:function(t,o){var i=n?n.token():null;return l("POST",e+t,o,i)},PUT:function(t,o){var i=n?n.token():null;return l("PUT",e+t,o,i)},PATCH:function(t,o){var i=n?n.token():null;return l("PATCH",e+t,o,i)},DELETE:function(t){var o=n?n.token():null;return l("DELETE",e+t,void 0,o)}}},c=process.env.REACT_APP_SESSION||window&&window.SESSION?window.SESSION:"YWANA-CORE6-SESSION",s={token:function(){return(sessionStorage.getItem(c)?JSON.parse(sessionStorage.getItem(c)):{}).token},me:function(){return(sessionStorage.getItem(c)?JSON.parse(sessionStorage.getItem(c)):{}).me},init:function(e,n){sessionStorage.setItem(c,JSON.stringify({token:e,me:n}))},refresh:function(e){var n=this.me();sessionStorage.setItem(c,JSON.stringify({token:e,me:n}))},isLoggedIn:function(){return!!sessionStorage.DSSession},logout:function(){sessionStorage.removeItem(c)}},d=function(e){var n=e.size,t=e.clickable,o=e.action;return h("i",{className:"icon "+(void 0===n?"normal":n)+" "+(void 0!==t&&t?"clickable":"")+" material-icons",onClick:function(e){e.stopPropagation(),e.preventDefault(),o&&o()}},e.icon)},f=function(e){var n=e.label,t=e.icon,o=e.action,i=e.disabled,r=void 0!==i&&i,a=e.raised?"raised":e.outlined?"outlined":"normal";return r&&(a+=" disabled"),h("button",{className:"btn "+a,onClick:function(e){r||(e.stopPropagation(),e.preventDefault(),o&&o())}},t?h(d,{icon:t,size:"small"}):null,h("span",null,n))},v=React.createContext({}),m=function(n){var t=n.children,o=e.useContext(v);if(o){var i=o.dictionary,r=(void 0===i?{}:i)[t],a=r?r[o.lang]:t;return a?h("span",null,a):""}return t?h("span",null,t):""},p=function(e){var n=e.id,t=e.label,o=e.placeholder,i=e.value,r=e.onChange;function a(e){r&&r(n,e.target.checked)}var l=h(m,null,t);return console.log(t,i),!0===i?h("div",{className:"checkbox",key:n+"1"},h("input",{id:n,type:"checkbox",placeholder:o,checked:!0,value:i,onChange:a}),h("span",{class:"checkmark"}),h("label",{htmlFor:n},l)):h("div",{className:"checkbox",key:n+"0"},h("input",{id:n,type:"checkbox",placeholder:o,value:i,onChange:a}),h("span",{class:"checkmark"}),h("label",{htmlFor:n},l))},g=function(n){var t=n.title,o=n.columns,r=void 0===o?1:o,a=n.children,l=n.outlined,u=n.onChange,c=e.useState([]),s=c[0],d=c[1],f=function(e){return null==e||""===e};e.useEffect(function(){var e=i.default.Children.toArray(a).filter(function(e){return null!==e&&""!==e}).map(function(e){var n=e.props,t=n.id,o=n.value,i=n.required,r=void 0!==i&&i,a=n.validation,l=!r||(a?a(o):!f(o));return{id:t,value:o,required:r,validation:a,valid:l}}).filter(function(e){return void 0!==e.id});d(e)},[]),e.useEffect(function(){if(u){var e=s.every(function(e){return!0===e.valid}),n=s.reduce(function(e,n){var t=n.value;return(t||!1===t)&&(e[n.id]=t),e},{});u(n,e)}},[s]);var v=function(e,n){var t=s.find(function(n){return n.id===e});if(t){var o=!t.required||(t.validation?t.validation(n):!f(n));Object.assign(t,{value:n,valid:o}),d(s.slice())}},p=i.default.Children.toArray(a).filter(function(e){return null!==e&&""!==e}).map(function(e){var n=e.props.span,t=void 0===n?1:n,o=i.default.cloneElement(e,{onChange:v,outlined:!!l});return h(b,{style:{gridColumn:"span "+t}},o)}),g={gridTemplateColumns:"repeat("+r+", 1fr)"};return h(e.Fragment,null,t?h("header",{className:"form-header"},h(m,{use:"headline6"},t)):"",h("form",{className:"form-grid",style:g},p))},b=function(e){return h("div",{className:"field-wrapper",style:e.style},e.children)},C=function(e){var n=e.caption?"caption":"",t=e.prominent?"prominent":"",o=e.dense?"dense":"",i=e.primary?"primary":"";i=e.secondary?"secondary":i;var r=e.icon?h(d,{icon:e.icon,clickable:e.clickable,action:e.action}):"";r=e.iconSrc?h("img",{className:"header-icon",src:e.iconSrc}):r;var a=e.img?{backgroundImage:"url("+e.img+")"}:{},l=h(m,null,e.title);return h("header",{className:"header "+n+" "+t+" "+o+" "+i+" "+e.className,style:a},r,e.title?h("label",null,l):null,h("span",{className:"actions"},e.children))};function y(){return y=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},y.apply(this,arguments)}var N=function(e){var n=e.items,t=void 0===n?[]:n,o=e.children,i=e.onSelect;function r(e){i&&i(e)}return e.groupBy?h(S,y({},e,{onSelect:r})):h("div",{className:"list"},h("ul",null,t.map(function(e){return h(x,{key:e.id,item:e,onSelect:r})})),o)},S=function(n){var t=n.items,o=n.children,i=n.onSelect,r=n.groupBy,a=(void 0===t?[]:t).reduce(function(e,n){var t=e.find(function(e){return e.name===n.content[r]});return t||e.push(t={name:n.content[r],items:[]}),t.items.push(n),e},[]);return h("div",{className:"list"},a.map(function(n){return h(e.Fragment,{key:n.name},h("header",{key:n.name+"-header"},h(m,null,n.name)),h("ul",{key:n.name+"-ul"},n.items.map(function(e){return h(x,{key:e.id,item:e,onSelect:i})})))}),o)},x=function(e){var n=e.item,t=e.onSelect,o=n.id,i=n.icon,r=n.line1,a=n.line2,l=n.meta;return h("li",{id:o,onClick:function(){t&&t(o)}},i?h(d,{icon:i,size:"small"}):null,h("main",null,h("div",{className:"primary-line"},h(m,null,r)),a?h("div",{className:"secondary-line"},h(m,null,a)):null),l?h("div",{className:"meta"},l):null)},k=i.default.createContext({}),E=function(e){return h("ul",null,e.children)},P=function(n){var t=n.icon,o=void 0===t?"more_vert":t,i=n.children,r=n.align,a=e.useState(!1),l=a[0],u=a[1];function c(){u(!l)}return h(k.Provider,{value:[l,u]},h("div",{className:"menu-icon"},h(d,{icon:o,clickable:!0,action:c}),l?h("menu",{className:""+r},i):null,l?h("div",{className:"overlay",onClick:c}):null))},O=function(n){var t=n.icon,o=n.label,i=n.meta,r=n.onSelect,a=e.useContext(k)[1];return h("li",{className:"menu-item",onClick:function(){r&&r(),a(!1)}},t?h(d,{icon:t}):null,h("label",null,o),i?h("div",{className:"meta"},i):null)},w=function(e){return h("div",{className:"circular-progress"},h(d,{icon:"refresh",size:"small"}))},T=function(e){var n=e.progress,t=e.max;return h("div",{className:"linear-progress"},h("progress",{value:void 0===n?0:n,max:void 0===t?100:t}))},j=function(e){var n=e.selected,t=e.onChange,o=i.default.Children.map(e.children,function(e,o){return i.default.cloneElement(e,{selected:o===n,onSelect:function(){t&&t(o)}})});return h("div",{class:"tabs"},o,h("div",{class:"tab-filler"}))},A=function(e){var n=e.onSelect;return h("div",{className:"tab "+(e.selected?"selected":""),onClick:function(){n&&n()}},e.label,e.actions||null)},D=function(n){var t=n.selected,o=void 0===t?0:t,r=i.default.Children.toArray(n.children).filter(function(e,n){return n===o})[0];return h(e.Fragment,null,r)},R=function(n){var t=e.useContext(v),o=n.id,i=n.type,r=void 0===i?"text":i,a=n.label,l=n.placeholder,u=n.value,c=n.readOnly,s=void 0!==c&&c,d=n.onChange,f=n.onEnter,p=n.onClick,g=(a?"":"no-label")+" "+(n.outlined?"textfield-outlined":"textfield"),b=h(m,null,a);return h("div",{className:""+g,onClick:p},h("input",{id:o,type:r,placeholder:l,value:u,required:!0,onChange:function(e){e.stopPropagation(),e.preventDefault(),d&&d(o,e.target.value)},onKeyDown:function(e){13==(e.charCode?e.charCode:e.keyCode?e.keyCode:0)&&f()},onFocus:function(){t&&t.changeFocus({lose:function(){}})},readOnly:s}),h("span",{className:"bar"}),a?h("label",null,b):null)},I=function(n){var t=e.useContext(v),o=n.id,i=n.options,r=void 0===i?[]:i,a=n.value,l=n.onChange,u=e.useState(!1),c=u[0],s=u[1],f=e.useState(),m=f[0],p=f[1];function g(){t&&t.changeFocus({lose:function(){s(!1)}}),s(!c)}return e.useEffect(function(){if(Array.isArray(r)){var e=r.find(function(e){return e.value===a});e&&p(e.label)}},[a]),h("div",{className:"dropdown"},h(R,y({},n,{onClick:g,value:m})),h(d,{icon:"expand_more",clickable:!0,size:"small",action:g}),1==c?h("menu",null,h("ul",{onClick:function(e){var n=e.target.getAttribute("value"),t=r.find(function(e){return e.value===n});l&&l(o,n),p(t.label),s(!1)}},Array.isArray(r)?r.map(function(e){return h("li",{key:e.value,value:e.value},e.label)}):null)):null)},_=function(n){var t=n.columns,o=void 0===t?[]:t,i=n.rows,r=void 0===i?[]:i,a=n.onRowSelection,l=n.onSort,u=n.editable,c=n.outlined,s=e.useState({})[0];function f(e,n){a&&a(e,n)}function v(e,n){l&&l(e,n)}return h("div",{className:"datatable8 "+(c?"outlined":"")},h("table",null,h("thead",null,h("tr",null,o.map(function(e){var n=e.sortable;return h("th",null,h(m,null,e.label),n?h(d,{icon:"arrow_up",size:"small",clickable:!0}):null)}))),h("tbody",null,function(e,n){void 0===n&&(n={});var t=Object.keys(n);if(!t.length)return e;var o=function(e,n,t){return t=null!==t?t:1,e===n?0:e>n?t:-1*t};return e.sort(function(e,i){for(var r=0,a=0;0===r&&a<t.length;){var l=t[a];l&&(r=o(e[l],i[l],n[l]),a++)}return r})}(r,s).map(function(e){return h(F,{key:e.id,row:e,columns:o,onSelect:f,onDrop:v,editable:u})}))))},F=function(n){var t,o=n.row,i=n.columns,r=void 0===i?[]:i,a=n.onSelect,l=n.editable,u=e.useState(!1),c=u[0],s=u[1],f=c?"expand_more":"expand_less";return h(e.Fragment,null,h("tr",{onClick:function(e){return a(o,e)}},r.map(function(e){return h(L,{row:o,column:e,cell:o[e.id],editable:l})}),o.info?h(d,{icon:f,clickable:!0,action:function(){return s(!c)}}):null),o.info&&c?h("tr",{className:"table-row-info"},(t=o.info)&&("[object Function]"===Object.prototype.toString.call(t)||"function"==typeof t||t instanceof Function)?o.info():o.info):null)},L=function(e){var n=e.row,t=e.column,o=e.cell,i=e.editable;return h("td",{className:t.id},function(e){var r=t.id,a=t.disabled,l=void 0!==a&&a,u=t.min,c=t.max,s=t.onChange,f=t.options;if(i&&s)switch(e){case"ICON":return h(d,{icon:o});case"BOOLEAN":case"Boolean":return h(p,{id:r,value:o,onChange:function(e,t){return s(n.id,e,t)},disabled:l});case"SELECTION":return h(I,{id:r,value:o,placeholder:"--Select--",options:f,onChange:function(e,t){return s(n.id,e,t)}});case"CHECK":return h(p,{id:r,value:o,onChange:function(e,t){return s(n.id,e,t)},disabled:n.disabled});case"CHECKABLE":return o&&o.value?h(p,{id:r,value:o.checked||!1,label:o.value,onChange:function(e,t){return s(n.id,e,o.value,t,o)}}):"";case"TEXTFIELD":return h(R,{id:r,value:o,onChange:function(e,t){return s(n.id,e,t)}});case"String":return h(U,{id:r,value:o,options:f,onChange:function(e,t){return s(n.id,e,t)}});case"Number":return h(R,{id:r,type:"number",value:o,min:u,max:c,onChange:function(e,t){return s(n.id,e,t)}});default:return o}else switch(e){case"ICON":return h(d,{icon:o});case"Boolean":return h(B,{id:r,value:o});case"String":return h(K,{id:r,value:o,options:f});default:return o}}(t.type))},B=function(e){var n=e.value;return h(d,{icon:!0===(void 0!==n&&n)?"check_box":"check_box_outline_blank"})},K=function(e){var n=e.value,t=e.options,o=t?t.find(function(e){return e.value===n}):null;return h("div",{className:"field-editor string-editor"},o?o.label:n)},U=function(e){var n=e.id,t=e.value,o=void 0===t?"":t,i=e.options,r=e.onChange;function a(e,n){r&&r(e,n)}return h("div",{className:"field-editor string-editor"},i?h(I,{outlined:!0,id:n,value:o,onChange:a,options:i}):h(R,{outlined:!0,id:n,value:o,onChange:a}))},z=function(n){var t=n.id,o=n.label,i=n.init,r=n.onChange,a=e.useRef(!1),l=e.useState(),u=l[0],c=l[1],s=e.useState(i),d=s[0],f=s[1];return e.useEffect(function(){a.current?r&&d&&r(t,d):a.current=!0},[d]),h("div",{className:"tokenField"},h("label",null,o),d.map(function(e,n){return h(q,{text:e,onDelete:function(){return function(e){var n=d.slice();n.splice(e,1),f(n)}(n)}})}),h("input",{type:"text",value:u,onChange:function(e){c(e.target.value)},onKeyDown:function(e){if("Enter"===e.key){e.preventDefault(),e.stopPropagation();var n=d.concat(e.target.value);f(n),c("")}if(""===u&&d.length>0&&"Backspace"===e.key){var t=d.slice(0,-1);f(t)}}}))},q=function(e){var n=e.onDelete;return h("div",{className:"token"},h(m,{use:"caption",tag:"div"},e.text),h(d,{icon:"close",clickable:!0,action:n,size:"small"}))},M=function(e){var n=e.nodes;return h("div",{className:"tree"},void 0===n?[]:n,e.children)},Y=function(e){var n=e.icon,t=void 0===n?"folder":n,o=e.label,i=e.open,r=e.children,a=e.actions;return h("details",{className:"tree-node",open:void 0!==i&&i},h("summary",{className:"tree-item"},t?h(d,{icon:t,size:"small",small:!0}):null,h("div",{className:"label"},o),h("div",{className:"actions"},a)),r)},G=function(e){var n=e.id,t=e.icon,o=e.label,i=e.actions,r=e.onSelect;return h("div",{className:"tree-item final",onClick:function(){r&&r(n)}},h(d,{icon:void 0===t?"description":t,size:"small",small:!0}),h("div",{className:"label"},o),h("div",{className:"actions"},i))},H=i.default.createContext({}),J=function(n){var t=n.context,o=n.children,i=e.useState(void 0===t?{}:t);return h(H.Provider,{value:[i[0],i[1]]},o)},V=function(e){var n=e.layout,t=e.context;return h(J,{context:void 0===t?{}:t},h("article",{className:"page6 "+(void 0===n?"simple":n)},e.children))},W=function(n){var t=n.children,o=n.siteDictionary,i=e.useState(n.siteLang),r=i[0],a=i[1],l=e.useState(o),u=l[0],c=l[1],s=e.useState("max"),d=s[0],f=s[1],m=e.useState(!1),p=m[0],g=m[1],b=e.useState(null),C=b[0],y=b[1],N=e.useState(!1),S=N[0],x=N[1],k=e.useState(),E=k[0],P=k[1],O=e.useState(),w=O[0],T=O[1],j=e.useState(),A=j[0],D=j[1],R=e.useState(),I=R[0],_=R[1],F=e.useState(),L=F[0],B=F[1],K={lang:r,setLang:a,dictionary:u,setDictionary:c,focused:L,changeFocus:function(e){L&&L.lose(),B(e)},sideNav:d,setSideNav:f,showNav:p,setShowNav:g,info:C,openInfo:function(e){y(e)},closeInfo:function(){y(null)},console:S,toggleConsole:function(){x(!S)},breadcrumb:I,setBreadcrumb:_,page:E,goto:function(e){P(e)},dialog:w,openDialog:function(e){T(e)},closeDialog:function(){T(null)},preview:A,openPreview:function(e){D(e)},closePreview:function(){D(null)}};return h(v.Provider,{value:K},t)},X=function(e){var n=e.icon;return h(C,{icon:void 0===n?"equalizer":n,title:e.title})},Q=function(n){var t=n.children;return e.useContext(v),h("nav",null,t)},Z=function(){var n=e.useContext(v);return n.info?h("aside",null,n.info):""},$=function(n){var t=n.children,o=n.min,i=e.useContext(v),r=i.showNav;e.useEffect(function(){o&&i.setSideNav("min")},[]);var a=t?e.Children.toArray(t).reduce(function(e,n){var t=n.props?n.props.section:"...";e[t]||(e[t]=[]);var o=n.props,i=o.title;return i&&e[t].push({id:o.id,icon:o.icon,title:i}),e},{}):{};return h("menu",{className:"min "+(r?"show":"")},h("main",null,Object.keys(a).map(function(n){return h(e.Fragment,{key:n},a[n].map(function(e){var n=e.id,t=e.icon;return h(d,{key:n,icon:void 0===t?"info":t,clickable:!0,checked:n===i.page,action:function(){return function(e){i.setShowNav(!1),i.goto(e)}(n)}})}),h("div",{className:"section-divider"}))})))},ee=function(n){var t=n.children,o=n.init,r=e.useContext(v),a=r.page;return e.useEffect(function(){r.goto(o||"EMPTY")},[]),h("main",null,i.default.Children.toArray(t).filter(function(e){return!!e.props&&e.props.id===a}))},ne=function(){var n=e.useContext(v);return n.dialog?n.dialog:""},te=function(){var n=e.useContext(v);return n.preview?h("div",{className:"site-preview"},n.preview):""},oe=function(){return e.useContext(v).console?h("footer",{className:"site-console"},h(C,null,h(j,null,h(A,{label:"Console"}))),h("main",null)):""},ie=function(n){var t=e.useContext(v),o=n.icon,i=n.title,r=void 0===i?"Dialog":i,a=n.children,l=n.actions;return h(e.Fragment,null,h("div",{className:"overlay"}),h("div",{className:"dialog",onClick:function(){t.closeDialog()}},h("div",{className:"dialog-panel",onClick:function(e){e.preventDefault(),e.stopPropagation()}},h("header",null,o?h(P,{icon:o}):null,h(m,null,r)),h("main",null,a),h("footer",null,l))))},re={STRING:"String",NUMBER:"Number",DATE:"Date",BOOLEAN:"Boolean",ARRAY:"Array",ENTITY:"Object",FUNCTION:"Function",EMAIL:"String"},ae=Object.values(re).reduce(function(e,n){return e["is"+n]=function(e){return toString.call(e)=="[object "+n+"]"},e},{}),le=/*#__PURE__*/function(){function e(e){this._schema=e}var n=e.prototype;return n.checkType=function(n,t){var o=n.type,i=n.item,r=!0,a=!0;if(i){var l=new e(i);switch(o){case re.ARRAY:r=ae["is"+o](t),a=t.every(function(e){return l.validate(e)});break;case re.ENTITY:r=ae["is"+o](t),a=l.validate(t);break;case re.NUMBER:r=ae["is"+o](t.value),a=!0;break;default:r=!0,a=!0}}return r&&a},n.validate=function(e){var n=this;return Object.entries(this._schema).filter(function(e){return!0===e[1].required}).every(function(t){var o=t[0];return void 0!==e[o]&&n.checkType(t[1],e[o])})},n.form=function(e){return Object.entries(this._schema).reduce(function(n,t){var o=t[0];return n[o]=Object.assign({},t[1],{value:e[o]}),n},{})},n.sections=function(e){var n=this.form(e),t=Object.values(n).reduce(function(e,n){var t=n.section||"";return e.hasOwnProperty(t)||(e[t]={title:t,fields:[]}),e[t].fields.push(n),e},{});return Object.values(t)},n.value=function(n){return Object.entries(this._schema).reduce(function(t,o){var i=o[0],r=o[1],a=r.item,l=n?n[i]:null;switch(r.type){case re.STRING:case re.NUMBER:case re.BOOLEAN:t[i]=l||r.default;break;case re.ENTITY:var u=new e(a);t[i]=u.value(l);break;case re.ARRAY:if(a===re.STRING)t[i]=l||[];else{var c=new e(a);t[i]=l?l.map(function(e){return c.value(e)}):[]}break;default:t[i]=r}return t},{})},e}(),ue=/*#__PURE__*/function(){function e(e,n){this.type=e,this._type=new le(e),this._value=n}var n=e.prototype;return n.isValid=function(){return this._type.validate(this._value)},n.value=function(){return this._type.value(this._value)},n.form=function(){return this._type.form(this._value)},n.sections=function(){return this._type.sections(this._value)},n.update=function(e){this._value=e},e}(),ce=function(e){var n=e.columns,t=void 0===n?1:n,o=e.filter,i=e.onChange,r=e.content.form();console.log(r);var a=Object.keys(r).map(function(e){return r[e]}).filter(function(e){return!o||o(e)});return console.log(a),h(g,{className:"content-form",columns:t,outlined:!0,onChange:i},a.map(function(e){return h(se,y({key:e.id},e))}))},se=function(e){switch(e.type){case re.BOOLEAN:return h(p,y({key:e.id},e));case re.NUMBER:return h(he,y({key:e.id},e));default:return h(de,y({key:e.id},e))}},de=function(e){var n,t=e.id,o=e.type,i=e.label,r=e.options,a=e.textarea,l=e.required,u=void 0!==l&&l,c=e.value,s=e.onChange,d=e.outlined,f=((n={})[re.NUMBER]="number",n[re.DATE]="date",n)[o]||"text";return r?h(I,{key:t,id:t,label:i,value:c,onChange:s,options:"function"==typeof r?r():r,outlined:d}):h(R,{key:t,id:t,type:f,label:i,value:c,onChange:s,required:u,outlined:d,textarea:a})},he=function(e){var n=e.id,t=e.label,o=e.options,i=e.required,r=void 0!==i&&i,a=e.value,l=e.onChange,u=e.outlined;function c(e,n){l&&l(e,+n?+n:n)}return o?h(I,{key:n,id:n,label:t,value:a,onChange:c,options:o,outlined:u}):h(R,{key:n,id:n,type:"number",label:t,value:a,onChange:c,required:r,outlined:u})},fe=function(e){var n=e.content,t=e.filter,o=e.onChange;function i(e,t){var i,r=Object.assign({},n.value(),((i={})[e]=t,i));o&&o(r)}var r=n.sections();return h("div",{className:"content-editor"},r.map(function(e){var o=e.title,r=e.fields;return h("section",{key:o},h("header",null,o),h("main",null,r.filter(function(e){return"id"!==e.id}).filter(function(e){return!t||t(e,n)}).map(function(e){return h(pe,{key:e.id,field:e,onChange:i})})))}))},ve=function(n){var t=n.content,o=n.filter,i=n.grouped,r=void 0!==i&&i,a=n.onChange,l=e.useState(0),u=l[0],c=l[1];function s(e,n){var o,i=Object.assign({},t.value(),((o={})[e]=n,o));a&&a(i)}var d=t.sections();return h("div",{className:"content-editor tabbed"},h(j,{selected:u,onChange:function(e){c(e)}},d.map(function(e){return h(A,{label:e.title})})),h(D,{selected:u},d.map(function(n){var i=n.fields;return h("section",{key:n.title},h("nav",null," "),h("main",null,r?function(e){var n=e.fields,t=(void 0===n?[]:n).reduce(function(e,n){var t=n.group||"",o=e[t]||{name:t,fields:[]};return o.fields.push(n),e[t]=o,e},{});return Object.values(t)}(n).map(function(n){return h(e.Fragment,null,n.name.length>0?h("div",{className:"group-caption"},n.name):null,n.fields.filter(function(e){return"id"!==e.id}).filter(function(e){return!o||o(e)}).map(function(e){return h(pe,{key:e.id,field:e,onChange:s,content:t})}))}):i.filter(function(e){return"id"!==e.id}).filter(function(e){return!o||o(e)}).map(function(e){return h(pe,{key:e.id,field:e,onChange:s,content:t})})))})))},me=function(n){var t=n.content,o=n.onChange,i=t.value(),r=Object.values(t.type).filter(function(e){return e.type===re.ARRAY}),a=e.useState(),l=a[0],u=a[1];function c(){}return h("div",{className:"content-editor treeded-editor"},h("menu",null,h("header",null,h(m,{use:"caption"},"Tree Editor")),h(M,null,r.map(function(e,n){return h(Y,{icon:"folder",label:e.label,actions:[h(d,{small:!0,icon:"add",clickable:!0,action:c})]},i[e.id]?i[e.id].map(function(n,t){return h(G,{icon:n.icon||"description",label:n.name||n.label,onSelect:function(){return function(e,n,t){var o=new ue(t.item,n);u({index:e,item:o,node:t,value:i[t.id]})}(t,n,e)}})}):null)}))),h("div",null,l?h(ve,{content:l.item,onChange:function(e){var n,t=l.value.slice();t[l.index]=e;var r=Object.assign({},i,((n={})[l.node.id]=t,n));o&&o(r)}}):"select"))},pe=function(e){var n=e.field,t=e.onChange,o=e.content,i=e.outlined,r=void 0!==i&&i,a=n.id,l=n.type,u=n.item,c=n.label,s=n.editable,d=n.options;function f(e,n){t&&t(e,n)}return function(){var e=n.value?n.value:n.default;switch(l){case re.ENTITY:return h(ge,{field:n,value:e,onChange:f});case re.STRING:return h(be,{outlined:r,field:n,value:e,onChange:f,content:o});case re.BOOLEAN:return h(p,{outlined:!0,id:a,label:c,value:e,onChange:f});case re.DATE:return h(R,{outlined:r,id:a,type:"date",label:c,value:e,onChange:f,disabled:s});case re.NUMBER:return h(Ce,{outlined:r,field:n,value:e,onChange:f});case re.ARRAY:return u===re.STRING?d?h(Ne,{content:o,field:n,value:e,onChange:f}):h(ye,{field:n,value:e,onChange:f}):h(Se,{field:n,value:e,onChange:f});default:return h("div",null,c)}}()},ge=function(e){var n=e.field,t=e.value,o=e.onChange,i=n.id,r=n.label,a=new ue(n.item,void 0===t?{}:t);function l(e,n){var t,r=Object.assign({},a.value(),((t={})[e]=n,t));o&&o(i,r)}var u=a.form(),c=Object.keys(u).map(function(e){return u[e]});return h("div",{className:"entity-editor"},h("header",null,h(m,{use:"caption"},r)),h("main",null,c.map(function(e){return h(pe,{key:e.id,field:e,onChange:l})})))},be=function(e){var n=e.field,t=e.value,o=void 0===t?"":t,i=e.onChange,r=e.outlined,a=n.id,l=n.label,u=n.options,c=n.editable;function s(e,n){i&&i(e,n)}return h("div",{className:"field-editor string-editor"},void 0===c||c?u?h(I,{outlined:r,id:a,label:l,value:o,onChange:s,options:"function"==typeof u?u(n,e.content):u}):h(R,{outlined:r,id:a,label:l,value:o,onChange:s}):h(R,{outlined:r,id:a,label:l,value:o,onChange:s,readOnly:!0}))},Ce=function(e){var n=e.field,t=e.onChange,o=n.editable;return h("div",{className:"field-editor number-editor"},h(R,{outlined:!0,id:n.id,label:n.label,type:"NUMBER",value:e.value||n.default,max:n.max,min:n.min,onChange:function(e,n){t&&t(e,n)},disabled:!(void 0===o||o)}))},ye=function(e){var n=e.field,t=e.value,o=e.onChange;return h("div",{className:"list-editor"},h(z,{id:n.id,label:n.label,init:void 0===t?[]:t,onChange:function(e,n){o&&o(e,n)}}))},Ne=function(e){var n=e.field,t=e.value,o=void 0===t?[]:t,i=e.content,r=e.onChange,a=n.id,l=n.options;return h("div",{className:"multiselection-editor"},h("label",null,n.label),("function"==typeof l?l(n,i):l).map(function(e){var n=o.includes(e.value);return h(p,{value:n,label:e.label,onChange:function(){return(t=o.indexOf(n=e.value))>=0?o.splice(t,1):o.push(n),void(r&&r(a,o));var n,t}})}))},Se=function(e){var n=e.field,t=e.value,o=void 0===t?[]:t,i=e.onChange,r=n.id,a=n.item,l=n.label,u=n.Feeder,c=n.Renderer,s=n.Adder,f=void 0===s||s,v=n.editable,p=void 0===v||v;function g(e){if(i){var n=o.concat(e);i(r,n)}}function b(e){if(i){var n=o.filter(function(n,t){return t!==e});i(r,n)}}function C(e,n,t){if(i){var a=o.slice();a[e][n]=t,i(r,a)}}var N=Object.values(a).map(function(e){return y({},e,{onChange:C})});N.push({id:"actions",label:"Actions"});var S=o.map(function(e,n){return y({},e,{id:n,actions:[h(d,{icon:"delete",clickable:!0,action:function(){return b(n)},small:!0})]})}),x={columns:N,rows:S};return h("div",{className:"collection-editor"},h("header",null,h(m,{use:"caption"},l),h("div",{className:"actions"},u?h(u,{onAdd:g}):null)),c?h(c,{field:n,value:o,onRemove:b,onChange:i}):h(_,y({},x,{editable:p})),h("footer",null,f?h(xe,{item:a,onAdd:g}):null))},xe=function(n){var t=n.item,o=n.onAdd,i=e.useState(!1),r=i[0],a=i[1],l=e.useState({}),u=l[0],c=l[1];function s(){a(!r)}function v(e,n,t){if(o){var i,r=Object.assign({},u,((i={})[n]=t,i));c(r)}}var m=Object.values(t).map(function(e){return y({},e,{type:"String",onChange:v})});m.push({id:"actions",label:""});var p=[{actions:[h(d,{icon:"done",clickable:!0,action:function(){o&&o([u]),s()}}),h(d,{icon:"close",clickable:!0,action:s})]}];return p[0]=Object.assign({},u,p[0]),h("div",{className:"collection-adder"},r?h(_,y({},{columns:m,rows:p},{editable:!0})):h(f,{icon:"add",label:"Add",action:s}))},ke=function(n){var t=n.label,o=n.type,i=n.value,r=void 0===i?{}:i,a=n.filter,l=n.validator,u=n.onOK,c=e.useContext(v),s=e.useState(r),d=s[0],p=s[1],g=e.useState(!1),b=g[0],C=g[1],y=e.useState([]),N=y[0],S=y[1];function x(e){"OK"===e&&u&&u(Object.assign({},r,d)),c.closeDialog()}var k=h(e.Fragment,null,h(f,{label:"CLOSE",action:function(){return x("CLOSE")}}),h("div",{className:"expand"}),h(f,{label:"OK",action:function(){return x("OK")},disabled:!b,raised:!0})),E=h(m,{use:"headline6"},t),P=new ue(o,d);return h(ie,{title:E,open:!0,onAction:x,actions:k},h(fe,{content:P,onChange:function(e){if(p(e),l){var n=l(e),t=n.errors,o=void 0===t?[]:t;C(n.validation),S(o)}else C(!0)},filter:a}),N.map(function(e){return h(m,{use:"overline",tag:"div",className:"error"},e)}))};function Ee(e,n){try{var t=e()}catch(e){return n(e)}return t&&t.then?t.then(void 0,n):t}var Pe=u(window.API||process.env.REACT_APP_API,s),Oe=function(n){var t=n.groupBy,o=e.useContext(H),i=o[0],r=o[1],a=i.all,l=void 0===a?[]:a,u=l?l.map(function(e){return{id:e.id,line1:e.name,line2:e.description,content:e}}):[];return h(N,{items:u,onSelect:function(e){try{return i.clear(),r(Object.assign({},i)),Promise.resolve(i.select(e)).then(function(){r(Object.assign({},i))})}catch(e){return Promise.reject(e)}},groupBy:t})},we=function(n){var t=function(e){try{return r.clear(),a(Object.assign({},r)),Promise.resolve(r.select(e)).then(function(){a(Object.assign({},r))})}catch(e){return Promise.reject(e)}},o=n.levels,i=e.useContext(H),r=i[0],a=i[1],l=r.all,u=function e(n,t){var o=function(e,n){return e.reduce(function(e,t){var o=e.find(function(e){return e.name===t[n]});return o||e.push(o={name:t[n],items:[],field:n}),o.items.push(t),e},[])}(t,n[0]);return n.length>1&&o.forEach(function(t){return t.nodes=e(n.slice(1),t.items)}),o}(o,void 0===l?[]:l);return h("main",null,h(M,null,function e(n){return n.map(function(n){return h(Y,{key:n.name,icon:null,label:"boolean"==typeof n.name?n.field+" = "+n.name:n.name,open:!0},n.nodes?e(n.nodes):n.items.map(function(e){return h(G,{key:e.id,id:e.id,label:e.name,onSelect:t},"item")}))})}(u)))},Te=function(n){var t=function(){try{return console.log("saving....."),Promise.resolve(i.update(x)).then(function(){a(Object.assign({},i))})}catch(e){return Promise.reject(e)}},o=e.useContext(H),i=o[0],a=o[1],l=i.selected,u=n.icon,c=n.schema,s=n.layout,v=n.autosave,p=void 0!==v&&v,g=n.delay,b=void 0===g?1e3:g,N=e.useRef(null),S=e.useState(l),x=S[0],k=S[1];function w(e){k(e)}function T(){return!r.default(x,l)}return e.useEffect(function(){k(l)},[l]),e.useEffect(function(){p&&(clearTimeout(N.current),N.current=setTimeout(function(){T()&&t()},b))},[x]),l&&x?h(e.Fragment,null,h(C,{icon:u,title:h(m,null,l.name)},h(d,{icon:"close",clickable:!0,action:function(){i.clear(),a(Object.assign({},i))}}),h(P,{align:"alignRight"},h(E,null,h(O,{label:"Eliminar",onSelect:function(){try{return Promise.resolve(i.remove(l.id)).then(function(){i.clear(),a(Object.assign({},i))})}catch(e){return Promise.reject(e)}}}))),!0===p?null:h(f,{icon:"save",label:"Guardar Cambios",raised:!0,disabled:!T(),action:t})),function(){var e=new ue(c,x);switch(s){case"TABBED":return h(ve,y({},n,{content:e,onChange:w}));case"TREEDED":return h(me,y({},n,{content:e,onChange:w}));default:return h(fe,y({},n,{content:e,onChange:w}))}}()):null},je=function(e,n){var t=Ae(e);return{all:[],selected:null,load:function(){try{var e=this,o=Ee(function(){return Promise.resolve(t.all()).then(function(t){e.all=n?t[n]:t})},function(e){console.log(e)});return Promise.resolve(o&&o.then?o.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},select:function(e){var n=this.all.find(function(n){return n.id===e});this.selected=n},clear:function(){this.selected=null},create:function(e){try{var n=this,o=Ee(function(){return Promise.resolve(t.create(e)).then(function(){return Promise.resolve(n.load()).then(function(){})})},function(e){console.log("CREATE ERROR",e)});return Promise.resolve(o&&o.then?o.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},update:function(e){try{var n=this,o=Ee(function(){return Promise.resolve(t.update(e)).then(function(){return Promise.resolve(n.load()).then(function(){})})},function(e){console.log(e)});return Promise.resolve(o&&o.then?o.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},patch:function(e,n){try{var o=this,i=Ee(function(){return Promise.resolve(t.patch(e,n)).then(function(){return Promise.resolve(o.load()).then(function(){})})},function(e){console.log(e)});return Promise.resolve(i&&i.then?i.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},updateProperty:function(e,n,o){try{var i=this,r=Ee(function(){return Promise.resolve(t.updateProperty(e,n,o)).then(function(){return Promise.resolve(i.load()).then(function(){})})},function(e){console.log(e)});return Promise.resolve(r&&r.then?r.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},remove:function(e){try{var n=this,o=Ee(function(){return Promise.resolve(t.remove(e)).then(function(){return Promise.resolve(n.load()).then(function(){})})},function(e){console.log(e)});return Promise.resolve(o&&o.then?o.then(function(){}):void 0)}catch(e){return Promise.reject(e)}}}},Ae=function(e){return{all:function(){return Pe.GET(e)},find:function(n){return Pe.GET(e+"/"+n)},create:function(n){var t=JSON.stringify(n);return Pe.POST(e,t)},update:function(n){var t=JSON.stringify(n);return Pe.PUT(e+"/"+n.id,t)},patch:function(n,t){var o=JSON.stringify(t);return Pe.PATCH(e+"/"+n,o)},updateProperty:function(n,t,o){var i=JSON.stringify(o);return Pe.PUT(e+"/"+n+"/"+t,i)},remove:function(n){return Pe.DELETE(e+"/"+n)}}},De=function(n){var t=e.useRef(),o=e.useState(!1),i=o[0],r=o[1];e.useEffect(function(){var e=n.resumable;e&&t&&e.assignDrop(t.current)},[]);var a=n.state,l=void 0===a?0:a,u=n.label,c=void 0===u?"Add file or drop file here...":u,s=n.error;return h("div",{className:"upload-area6 "+(!0===i?"drag-over":""),onDragOver:function(){r(!0)},onDragLeave:function(){r(!1)},ref:t},0===l?h(Re,{resumable:n.resumable}):"",0===l?h("label",null,c):"",1===l?h(w,{size:"xlarge"}):"",2===l?h(d,{icon:"done_all"}):"",3===l?h(m,{use:"body1"},s):"",n.children)},Re=function(n){var t=n.resumable,o=e.useRef();return e.useEffect(function(){t&&o&&t.assignBrowse(o.current)},[]),h("div",{className:"upload-icon",ref:o},h(d,{icon:"folder_open",clickable:!0}))},Ie=function(n){var t=n.label,o=n.target,i=n.accept,r=n.className,l=n.onSuccess,u=n.onError,c=n.onComplete,s=e.useMemo(function(){var e=new a.default({target:o,chunkSize:1048576,simultaneousUploads:1,testChunks:!1,throttleProgressCallbacks:1,fileType:i});return e.on("fileAdded",S),e.on("fileProgress",x),e.on("fileSuccess",k),e.on("fileError",E),e.on("complete",P),e},[]),d=e.useState(0)[1],f=e.useState(0),v=f[0],m=f[1],p=e.useState(),g=p[0],b=p[1],C=e.useState([]),y=C[0],N=C[1];function S(e){y.push(e),N(y),s.upload()}function x(e){var n=e.progress();d(n)}function k(e,n){m(2),l&&l(e,n)}function E(e,n){b(n),m(3),u&&u(e,n)}function P(){m(0),c&&c(y)}return h("div",{className:"uploader "+r},h(De,{resumable:s,state:v,label:t,error:g}))},_e=function(n){var t=n.file,o=n.state,i=n.progress,r=n.error,a=r?h(d,{icon:"image",className:"error"}):h(d,{icon:"image"});return 0!==o?h(e.Fragment,null,h("div",{className:"upload-file"},a,h(m,{use:"body1",tag:"label"},t.fileName),1===o?h(T,{progress:i}):"",1===o?h(d,{icon:"close",clickable:!0}):"",2===o?h(d,{icon:"done"}):"",3===o?h(d,{icon:"error"}):""),r?h("div",{className:"error"},h(m,{use:"overline"},r)):""):""};exports.Button=f,exports.CheckBox=p,exports.Chip=function(e){var n=e.id,t=e.icon,o=e.label,i=e.action,r=e.onSelect,a=e.outlined?"outlined":"normal";return e.selected&&(a+=" selected"),h("div",{className:"chip "+a,onClick:function(e){e.stopPropagation(),e.preventDefault(),r&&r(n)}},t?h(d,{icon:t,size:"small"}):null,h("main",null,h(m,null,o)),i?h("span",{className:"meta"},i):null)},exports.Chips=function(e){return h("div",{className:"chips"},e.children)},exports.CircularProgress=w,exports.CollectionContext=je,exports.CollectionEditor=Se,exports.CollectionPage=function(n){var t=e.useContext(v),o=n.id,i=void 0===o?"collection":o,r=n.icon,a=n.title,l=n.name,u=void 0===l?"Collection 1":l,c=n.schema,s=n.url,d=n.groupBy,p=n.editor,g=n.field,b=n.autosave,y=void 0!==b&&b,N=n.delay,S=void 0===N?1e3:N,x=n.actions,k=n.levels,E=e.useContext(H),P=E[0],O=E[1],w=je(s,g);return e.useEffect(function(){try{return Promise.resolve(w.load()).then(function(){O(w)})}catch(e){return Promise.reject(e)}},[]),h(e.Fragment,null,h(C,{className:"collection-page",title:h(m,null,a)},h(f,{icon:"add",label:"Add",action:function(){t.openDialog(h(ke,{label:"Crear "+u,type:c,onOK:function(e){try{return Promise.resolve(P.create(e)).then(function(){O(Object.assign({},P))})}catch(e){return Promise.reject(e)}}}))}}),h(f,{icon:"refresh",label:"Reload",action:function(){try{return Promise.resolve(P.load()).then(function(){O(Object.assign({},P))})}catch(e){return Promise.reject(e)}}}),x),h("menu",{className:"collection-page"},h(C,{title:h(m,null,"Lista de ",u)}),k?h(we,{levels:k}):h(Oe,{groupBy:d})),h("main",{key:i,className:"collection-page"},h(Te,{icon:r,schema:c,layout:p,autosave:y,delay:S})))},exports.Content=ue,exports.ContentEditor=fe,exports.ContentForm=ce,exports.CreateContentDialog=function(n){var t=n.label,o=n.type,i=n.validator,r=n.onOK,a=n.onActionClose,l=void 0===a||a,u=e.useContext(v),c=e.useState({}),s=c[0],d=c[1],p=e.useState(!1),g=p[0],b=p[1],C=e.useState([]),y=C[0],N=C[1];function S(e){"OK"===e&&r&&r(s),"CLOSE"!==e&&!0!==l||u.closeDialog()}var x=h(e.Fragment,null,h(f,{label:"CLOSE",action:function(){return S("CLOSE")}}),h(f,{label:"OK",action:function(){return S("OK")},disabled:!g,raised:!0})),k=h(m,{use:"headline6"},t),E=new ue(o,s);return h(ie,{title:k,open:!0,onAction:S,actions:x},h(ce,{content:E,filter:function(e){return function(e){var n=e.required;return void 0!==n&&n}(e)||function(e){var n=e.creation;return void 0!==n&&n}(e)},onChange:function(e,n){if(d(e),i){var t=i(e),o=t.errors,r=void 0===o?[]:o;b(n&&t.validation),N(r)}else b(n)}}),y.map(function(e){return h(m,{use:"overline",tag:"div",className:"error"},e)}))},exports.DataTable=_,exports.Dialog=ie,exports.DropDown=I,exports.EditContentDialog=ke,exports.FieldEditor=pe,exports.Form=g,exports.HTTPClient=u,exports.Header=C,exports.Icon=d,exports.Kanban=function(e){return h("div",{className:"kanban"},e.children)},exports.KanbanCard=function(e){return h("div",{className:"kanban-card "+e.color},e.children)},exports.KanbanColumn=function(n){var t=n.id,o=n.icon,i=n.title,r=n.subtitle,a=n.badge,l=n.children,u=n.minified,c=n.disabled,s=void 0!==c&&c,f=e.useState(void 0!==u&&u),v=f[0],p=f[1];function g(){p(!v)}return v?h("div",{className:"kanban-column "+t+" min"},h("main",null,i),h("footer",null,h(d,{icon:"toggle_off",onIcon:"toggle_on",clickable:!0,action:g}))):h("div",{className:"kanban-column "+t+" "+(s?"disabled":"")},h("header",null,h(d,{icon:o}),h("div",{className:"title"},h(m,{use:"headline6"},i),h(m,{className:"secondary-text",use:"body2"},r)),h("div",{className:"badge"},a)),h("main",null,l),h("footer",null,h(d,{icon:"toggle_off",onIcon:"toggle_on",clickable:!0,action:g})))},exports.LinearProgress=T,exports.List=N,exports.ListEditor=ye,exports.LoginBox=function(n){var t=n.logo,o=n.title,i=n.userLabel,r=void 0===i?"User":i,a=n.passwordLabel,l=void 0===a?"Password":a,u=n.loginLabel,c=void 0===u?"Log In":u,s=n.onOK,v=n.forgotLabel,p=void 0===v?"Forgot Password ?":v,g=n.onForgot,b=n.message,C=n.loading,y=e.useState(""),N=y[0],S=y[1],x=e.useState(""),k=x[0],E=x[1];function P(){return N&&N.length>0&&k&&k.length>0}function O(e){s&&P()&&s(N,e||k)}function w(e){return h(m,null,e)}return h("div",{className:"login-box"},h("header",null,t?h("img",{src:t}):"",h("div",{className:"title"},h(m,null,o))),h("main",null,h(R,{label:w(r),value:N,onChange:function(e,n){S(n)},onEnter:O,outlined:!0}),h(R,{label:w(l),value:k,onChange:function(e,n){E(n)},onEnter:O,type:"password",outlined:!0})),h("footer",null,g?h(f,{label:w(p),action:function(){g&&g(N)},disabled:!(N&&N.length>0)}):null,C?h("div",{className:"load-box"},h(d,{icon:"refresh"})):h(f,{label:w(c),action:O,disabled:!P(),raised:!0}),b?h("div",{className:"message"},h(m,null,b)):null))},exports.Menu=E,exports.MenuIcon=P,exports.MenuItem=O,exports.MenuSeparator=function(e){return h("li",null,"menuSeparator")},exports.Page=V,exports.PageContext=H,exports.PageProvider=J,exports.Property=function(e){var n=e.value;return h("div",{className:"property"},h("div",{className:"property-name"},e.name),h("div",{className:"property-value"},n))},exports.RadioButton=function(e){var n=e.id,t=e.name,o=e.placeholder,i=e.value,r=e.onChange,a=h(m,null,e.label);return h("div",{className:"radio"},h("input",{id:n,name:t,type:"radio",placeholder:o,value:i,onClick:function(e){r&&r(n,e.target.value)}}),h("span",{class:"checkmark"}),h("label",{htmlFor:n},a))},exports.ResetPasswordBox=function(n){var t=n.logo,o=n.title,i=n.children,r=n.onOK,a=n.onClose,l=e.useState({}),u=l[0],c=l[1],s=e.useState(),d=s[0],v=s[1];function p(){return u.password1&&u.password2}function g(e,n){var t,o=Object.assign({},u,((t={})[e]=n,t));c(o)}function b(){r&&p()&&(u.password1===u.password2?(v(null),r(u)):v("New Password and Confirm New Password do not match"))}return h("div",{className:"reset-password-box"},h("header",null,t?h("img",{src:t}):null,o?h("div",{className:"title"},h(m,null,o)):null,i),h("main",null,h(m,{use:"headline6"},"Change Password"),h(R,{id:"password1",outlined:!0,icon:"lock",type:"password",label:"New Password",lapse:100,onChange:g,onEnter:b}),h(R,{id:"password2",outlined:!0,icon:"lock",type:"password",label:"Confirm New Password",lapse:100,onChange:g,onEnter:b}),d?h("div",{className:"error"},d):null),h("footer",null,h(f,{label:"Close",action:function(){a&&a()}}),h(f,{label:"OK",raised:!0,disabled:!p(),action:b})))},exports.Section=function(n){var t=n.icon,o=n.title,i=void 0===o?"":o,r=n.canCollapse,a=void 0===r||r,l=n.open,u=void 0!==l&&l,c=n.actions,s=n.children,f=n.className,v=e.useState(u),m=v[0],p=v[1];return e.useEffect(function(){p(u)},[u]),h("section",{className:"section2 "+f},h(C,{icon:{icon:t},title:i},c,a?h(d,{icon:"expand_more",onIcon:"expand_less",clickable:!0,action:function(){p(!u)}}):""),m?h("main",null,s):"")},exports.Session=s,exports.Site=function(e){var n=e.logo,t=e.title,o=e.toolbar,i=e.children,r=e.init,a=e.min;return h(W,{siteLang:e.lang,siteDictionary:e.dictionary},h("div",{className:"site6"},h(X,{icon:e.icon}),h(Q,null,o),h($,{logo:n,title:t,min:a},i),h(ee,{init:r},i,h(V,{id:"EMPTY"},"EMPTY")),h(Z,null),h(oe,null),h(ne,null),h(te,null)))},exports.SiteContext=v,exports.SiteProvider=W,exports.Stack=D,exports.TYPES=re,exports.Tab=A,exports.TabbedContentEditor=ve,exports.Tabs=j,exports.Text=m,exports.TextField=R,exports.TokenField=z,exports.Tree=M,exports.TreeItem=G,exports.TreeNode=Y,exports.TreededContentEditor=me,exports.UploadArea=De,exports.UploadDialog=function(n){var t=n.label,o=n.target,i=n.accept,r=n.onSuccess,a=n.onClose,l=n.onActionClose,u=void 0===l||l,c=e.useContext(v),s=e.useState(),d=s[0],p=s[1],g=e.useState([])[0];function b(e){"CLOSE"!==e&&!0!==u||(c.closeDialog(),a())}var C=h(e.Fragment,null,h(f,{label:"CLOSE",action:function(){return b("CLOSE")}})),y=h(m,{use:"headline6"},t);return h(ie,{title:y,open:!0,onAction:b,actions:C},d?h(_e,{file:d}):h(Ie,{label:t,accept:i,target:o,onComplete:function(e){p(e[0]),r&&r(e[0])}}),g.map(function(e){return h(m,{use:"overline",tag:"div",className:"error"},e)}))},exports.UploadFile=_e,exports.Uploader=Ie,exports.Viewer=function(n){var t=n.title,o=n.src,i=n.info,r=n.actions,a=void 0===r?[]:r,l=n.tools,u=void 0!==l&&l,c=n.onClose,s=e.useState(!1),f=s[0],v=s[1];function p(){v(!f)}var g=h(m,{use:"headline6"},t);return h("div",{className:"viewer"},h(C,{icon:{icon:"close",clickable:!0,action:c},title:g},f?"":h(d,{icon:"info",clickable:!0,action:p}),a),h("main",null,h("div",{className:"resizer"},h("picture",null,h("img",{src:o})))),h("aside",{className:f?"open":""},h(C,{title:"Detalles"},h(d,{icon:"close",clickable:!0,action:p})),h("main",null,i)),u?h("footer",null,h(d,{clickable:!0,icon:"zoom_out"}),h(d,{clickable:!0,icon:"zoom_out_map"}),h(d,{clickable:!0,icon:"zoom_in"})):null)},exports.isFunction=function(e){return e&&("[object Function]"===Object.prototype.toString.call(e)||"function"==typeof e||e instanceof Function)};
|
2
2
|
//# sourceMappingURL=index.cjs.map
|