tocco-widget-bundle 0.1.74 → 0.1.76

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/user-menu.js CHANGED
@@ -48,4 +48,4 @@ object-assign
48
48
  *
49
49
  * This source code is licensed under the MIT license found in the
50
50
  * LICENSE file in the root directory of this source tree.
51
- */var r=n(1024),o=n(61688);var i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=o.useSyncExternalStore,s=r.useRef,c=r.useEffect,u=r.useMemo,l=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var f=s(null);if(null===f.current){var d={hasValue:!1,value:null};f.current=d}else d=f.current;f=u((function(){function e(e){if(!c){if(c=!0,a=e,e=r(e),void 0!==o&&d.hasValue){var t=d.value;if(o(t,e))return s=t}return s=e}if(t=s,i(a,e))return t;var n=r(e);return void 0!==o&&o(t,n)?t:(a=e,s=n)}var a,s,c=!1,u=void 0===n?null:n;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]}),[t,n,r,o]);var p=a(e,f[0],f[1]);return c((function(){d.hasValue=!0,d.value=p}),[p]),l(p),p}},61688:(e,t,n)=>{"use strict";e.exports=n(53250)},52798:(e,t,n)=>{"use strict";e.exports=n(50139)},28721:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});const r={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let o;const i=new Uint8Array(16);function a(){if(!o&&(o="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!o))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return o(i)}const s=[];for(let e=0;e<256;++e)s.push((e+256).toString(16).slice(1));function c(e,t=0){return(s[e[t+0]]+s[e[t+1]]+s[e[t+2]]+s[e[t+3]]+"-"+s[e[t+4]]+s[e[t+5]]+"-"+s[e[t+6]]+s[e[t+7]]+"-"+s[e[t+8]]+s[e[t+9]]+"-"+s[e[t+10]]+s[e[t+11]]+s[e[t+12]]+s[e[t+13]]+s[e[t+14]]+s[e[t+15]]).toLowerCase()}const u=function(e,t,n){if(r.randomUUID&&!t&&!e)return r.randomUUID();const o=(e=e||{}).random||(e.rng||a)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=o[e];return t}return c(o)}},1024:e=>{"use strict";e.exports=t},30314:t=>{"use strict";t.exports=e},71298:e=>{e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},38088:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},87462:(e,t,n)=>{"use strict";function r(){return r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{Z:()=>r})},31599:(e,t,n)=>{"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{Z:()=>r})},28549:(e,t,n)=>{"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{Z:()=>r})},2717:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{Z:()=>r})},33417:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(28549);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},32924:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}n.d(t,{Z:()=>r})},1972:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(78001);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||(0,r.Z)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},78001:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(31599);function o(e,t){if(e){if("string"==typeof e)return(0,r.Z)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.Z)(e,t):void 0}}}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var n=i[e]={id:e,loaded:!1,exports:{}};return o[e].call(n.exports,n,n.exports,a),n.loaded=!0,n.exports}a.m=o,a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((t,n)=>(a.f[n](e,t),t)),[])),a.u=e=>"chunk-"+({85:"code-editor",198:"vendor-fontawesome",614:"vendor-icons"}[e]||e)+"."+{85:"8840975b97242261b121",198:"31f4b8bed925991d2b90",608:"4b0c7d41ad01e0cdf560",614:"efd993f71245e247d22c",817:"5758e51444b678849e3d"}[e]+".js",a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},r="tocco-widget-bundle:",a.l=(e,t,o,i)=>{if(n[e])n[e].push(t);else{var s,c;if(void 0!==o)for(var u=document.getElementsByTagName("script"),l=0;l<u.length;l++){var f=u[l];if(f.getAttribute("src")==e||f.getAttribute("data-webpack")==r+o){s=f;break}}s||(c=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,a.nc&&s.setAttribute("nonce",a.nc),s.setAttribute("data-webpack",r+o),s.src=e),n[e]=[t];var d=(t,r)=>{s.onerror=s.onload=null,clearTimeout(p);var o=n[e];if(delete n[e],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach((e=>e(r))),t)return t(r)},p=setTimeout(d.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=d.bind(null,s.onerror),s.onload=d.bind(null,s.onload),c&&document.head.appendChild(s)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),a.j=30,a.p="/",(()=>{var e={30:0};a.f.j=(t,n)=>{var r=a.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=o);var i=a.p+a.u(t),s=new Error;a.l(i,(n=>{if(a.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;s.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",s.name="ChunkLoadError",s.type=o,s.request=i,r[1](s)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,o,[i,s,c]=n,u=0;if(i.some((t=>0!==e[t]))){for(r in s)a.o(s,r)&&(a.m[r]=s[r]);if(c)c(a)}for(t&&t(n);u<i.length;u++)o=i[u],a.o(e,o)&&e[o]&&e[o][0](),e[o]=0},n=self.webpackChunktocco_widget_bundle=self.webpackChunktocco_widget_bundle||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),a.nc=void 0;var s={};return(()=>{"use strict";a.r(s);var e=a(87533),t=a(59713),n=a.n(t),r=a(45697),o=a.n(r),i=a(98773);const c={propTypes:o().shape({embedType:o().oneOf(i.Nc),widgetConfigKey:function(e,t,n){if("widget"===e.embedType&&!e[t])return new Error("Prop `"+t+"` is missing for `"+n+"`. Validation failed.")}})};var u,l=a(23369),f=a(28655),d=a.n(f),p=a(38205);const h=p.ZP.div.withConfig({displayName:"StyledFixedWrapper"})(u||(u=d()(["\n width: ",";\n height: ",";\n"])),(function(e){return e.width}),(function(e){return e.height}));var m,g,v,y,b,w=a(74806),x=a(50558),O="userMenu/LOAD_USER",E="userMenu/SET_LOGGED_IN",S="userMenu/SET_USERNAME",P="userMenu/LOGOUT",k=function(e){return{type:E,payload:{loggedIn:e}}},j=function(e){return{type:S,payload:{username:e}}},T=a(63038),C=a.n(T),_=a(1024),A=a(44012),N=a(14942),Z=a(87686),M=a(88162),R=a(7281),D=a(58129),I=p.ZP.div.withConfig({displayName:"StyledHeader"})(m||(m=d()(["\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n"]))),L=p.ZP.span.withConfig({displayName:"StyledLabelWrapper"})(g||(g=d()(["\n width: 100%;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis;\n"]))),H=p.ZP.div.withConfig({displayName:"StyledIconWrapper"})(v||(v=d()(["\n margin-left: ",";\n margin-right: -",";\n"])),R.Z.space(-1.7),R.Z.space(-2.1)),F=(0,p.ZP)(D.Z).withConfig({displayName:"StyledButton"})(y||(y=d()(["\n width: 100%;\n margin: 0;\n padding-left: 3px;\n padding-right: 3px;\n"]))),W=a(85893);const B=function(e){var t,n=e.loggedIn,r=e.username,o=e.logout,i=(0,_.useRef)(null),a=(0,_.useState)(!1),s=C()(a,2),c=s[0],u=s[1],l=function(){u(!1)},f=function(){return(0,W.jsx)(N.Z,{referenceElement:i.current,open:c,onClose:l,children:t||(t=(0,W.jsx)(Z.Z,{onClick:o,children:b||(b=(0,W.jsx)(A.Z,{id:"client.user-menu.logout"}))}))})},d=c?"chevron-up":"chevron-down";return(0,W.jsx)(I,{children:n&&(0,W.jsxs)(F,{type:"button",ref:i,onClick:function(){u((function(e){return!e}))},children:[(0,W.jsx)(L,{children:r}),(0,W.jsx)(H,{children:(0,W.jsx)(M.Z,{icon:d})}),c&&(0,W.jsx)(f,{})]})})};var U={logout:function(){return{type:P}}};const z=(0,x.connect)((function(e){return{loggedIn:e.userMenu.loggedIn,username:e.userMenu.username}}),U)((0,w.ZP)(B));var G,q=a(81770),V=(G={},n()(G,E,q.Z.singleTransferReducer("loggedIn")),n()(G,S,q.Z.singleTransferReducer("username")),G),Y={loggedIn:void 0,username:void 0};const $=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y,t=arguments.length>1?arguments[1]:void 0,n=V[t.type];return n?n(e,t):e};var X,K=a(87757),J=a.n(K),Q=a(34857),ee="login/SET_LOGGED_IN",te="login/SET_ADMIN_ALLOWED";X={},n()(X,ee,q.Z.singleTransferReducer("loggedIn")),n()(X,te,q.Z.singleTransferReducer("adminAllowed"));var ne=a(44759),re=a(54159);a(21913),a(27023);function oe(e,t){return re.Z.executeRequest(e,t).then(re.Z.extractBody).catch((function(e){return ne.Z.logError("Failed to execute request",e),{success:!1}}))}const ie=oe;var ae=J().mark(le),se=J().mark(fe),ce=J().mark(de),ue=function(e){return e.input};function le(){return J().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Q.$6)([(0,Q.Fm)(O,fe),(0,Q.Fm)(P,de)]);case 2:case"end":return e.stop()}}),ae)}function fe(){var e,t;return J().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Q.RE)(ie,"username");case 2:if(e=n.sent,"anonymous"!==(t=e.username)){n.next=9;break}return n.next=7,(0,Q.gz)(k(!1));case 7:n.next=13;break;case 9:return n.next=11,(0,Q.gz)(k(!0));case 11:return n.next=13,(0,Q.gz)(j(t));case 13:case"end":return n.stop()}}),se)}function de(){var e,t;return J().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Q.RE)(ie,"logout",{method:"POST"});case 2:return n.next=4,(0,Q.Ys)(ue);case 4:e=n.sent,t=e.logoutRedirectUrl,window.location.href=t||"/";case 7:case"end":return n.stop()}}),ce)}const pe={userMenu:$};var he,me=[le];function ge(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ve(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ge(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ge(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ye="user-menu",be=function(t,n,r,o){l.Z.setInputEnvs(n);var i=he||(he=(0,W.jsx)(z,{})),a=ve(ve({},{width:"120px",height:"40px"}),n),s=e.Z.createStore(pe,me,a,ye),c=e.Z.createApp(ye,i,s,{input:n,events:r,actions:[{type:O}],publicPath:o,textResourceModules:["component","common",ye]});return ve(ve({},c),{},{component:(0,W.jsx)(h,{width:a.width,height:a.height,children:c.component})})},we=function(t){return e.Z.useApp({initApp:be,props:t,packageName:ye}).component};we.propTypes={appContext:c.propTypes.isRequired,logoutRedirectUrl:o().string};var xe=e.Z.createBundleableApp(ye,be,we);e.Z.registerAppInRegistry(xe.name,xe.init)})(),s})()));
51
+ */var r=n(1024),o=n(61688);var i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=o.useSyncExternalStore,s=r.useRef,c=r.useEffect,u=r.useMemo,l=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var f=s(null);if(null===f.current){var d={hasValue:!1,value:null};f.current=d}else d=f.current;f=u((function(){function e(e){if(!c){if(c=!0,a=e,e=r(e),void 0!==o&&d.hasValue){var t=d.value;if(o(t,e))return s=t}return s=e}if(t=s,i(a,e))return t;var n=r(e);return void 0!==o&&o(t,n)?t:(a=e,s=n)}var a,s,c=!1,u=void 0===n?null:n;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]}),[t,n,r,o]);var p=a(e,f[0],f[1]);return c((function(){d.hasValue=!0,d.value=p}),[p]),l(p),p}},61688:(e,t,n)=>{"use strict";e.exports=n(53250)},52798:(e,t,n)=>{"use strict";e.exports=n(50139)},28721:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});const r={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let o;const i=new Uint8Array(16);function a(){if(!o&&(o="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!o))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return o(i)}const s=[];for(let e=0;e<256;++e)s.push((e+256).toString(16).slice(1));function c(e,t=0){return(s[e[t+0]]+s[e[t+1]]+s[e[t+2]]+s[e[t+3]]+"-"+s[e[t+4]]+s[e[t+5]]+"-"+s[e[t+6]]+s[e[t+7]]+"-"+s[e[t+8]]+s[e[t+9]]+"-"+s[e[t+10]]+s[e[t+11]]+s[e[t+12]]+s[e[t+13]]+s[e[t+14]]+s[e[t+15]]).toLowerCase()}const u=function(e,t,n){if(r.randomUUID&&!t&&!e)return r.randomUUID();const o=(e=e||{}).random||(e.rng||a)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=o[e];return t}return c(o)}},1024:e=>{"use strict";e.exports=t},30314:t=>{"use strict";t.exports=e},71298:e=>{e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},38088:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},87462:(e,t,n)=>{"use strict";function r(){return r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{Z:()=>r})},31599:(e,t,n)=>{"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{Z:()=>r})},28549:(e,t,n)=>{"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{Z:()=>r})},2717:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{Z:()=>r})},33417:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(28549);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},32924:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}n.d(t,{Z:()=>r})},1972:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(78001);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||(0,r.Z)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},78001:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(31599);function o(e,t){if(e){if("string"==typeof e)return(0,r.Z)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.Z)(e,t):void 0}}}},i={};function a(e){var t=i[e];if(void 0!==t)return t.exports;var n=i[e]={id:e,loaded:!1,exports:{}};return o[e].call(n.exports,n,n.exports,a),n.loaded=!0,n.exports}a.m=o,a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((t,n)=>(a.f[n](e,t),t)),[])),a.u=e=>"chunk-"+({85:"code-editor",198:"vendor-fontawesome",614:"vendor-icons"}[e]||e)+"."+{85:"9f6f9a2436c4d680a330",198:"5b19b660607a2531d217",608:"4b0c7d41ad01e0cdf560",614:"f8ea9961d7656e4fa642",817:"5758e51444b678849e3d"}[e]+".js",a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},r="tocco-widget-bundle:",a.l=(e,t,o,i)=>{if(n[e])n[e].push(t);else{var s,c;if(void 0!==o)for(var u=document.getElementsByTagName("script"),l=0;l<u.length;l++){var f=u[l];if(f.getAttribute("src")==e||f.getAttribute("data-webpack")==r+o){s=f;break}}s||(c=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,a.nc&&s.setAttribute("nonce",a.nc),s.setAttribute("data-webpack",r+o),s.src=e),n[e]=[t];var d=(t,r)=>{s.onerror=s.onload=null,clearTimeout(p);var o=n[e];if(delete n[e],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach((e=>e(r))),t)return t(r)},p=setTimeout(d.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=d.bind(null,s.onerror),s.onload=d.bind(null,s.onload),c&&document.head.appendChild(s)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),a.j=30,a.p="/",(()=>{var e={30:0};a.f.j=(t,n)=>{var r=a.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=o);var i=a.p+a.u(t),s=new Error;a.l(i,(n=>{if(a.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;s.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",s.name="ChunkLoadError",s.type=o,s.request=i,r[1](s)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,o,[i,s,c]=n,u=0;if(i.some((t=>0!==e[t]))){for(r in s)a.o(s,r)&&(a.m[r]=s[r]);if(c)c(a)}for(t&&t(n);u<i.length;u++)o=i[u],a.o(e,o)&&e[o]&&e[o][0](),e[o]=0},n=self.webpackChunktocco_widget_bundle=self.webpackChunktocco_widget_bundle||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),a.nc=void 0;var s={};return(()=>{"use strict";a.r(s);var e=a(87533),t=a(59713),n=a.n(t),r=a(45697),o=a.n(r),i=a(98773);const c={propTypes:o().shape({embedType:o().oneOf(i.Nc),widgetConfigKey:function(e,t,n){if("widget"===e.embedType&&!e[t])return new Error("Prop `"+t+"` is missing for `"+n+"`. Validation failed.")}})};var u,l=a(23369),f=a(28655),d=a.n(f),p=a(38205);const h=p.ZP.div.withConfig({displayName:"StyledFixedWrapper"})(u||(u=d()(["\n width: ",";\n height: ",";\n"])),(function(e){return e.width}),(function(e){return e.height}));var m,g,v,y,b,w=a(74806),x=a(50558),O="userMenu/LOAD_USER",E="userMenu/SET_LOGGED_IN",S="userMenu/SET_USERNAME",P="userMenu/LOGOUT",k=function(e){return{type:E,payload:{loggedIn:e}}},j=function(e){return{type:S,payload:{username:e}}},T=a(63038),C=a.n(T),_=a(1024),A=a(44012),N=a(14942),Z=a(87686),M=a(88162),R=a(7281),D=a(58129),I=p.ZP.div.withConfig({displayName:"StyledHeader"})(m||(m=d()(["\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n"]))),L=p.ZP.span.withConfig({displayName:"StyledLabelWrapper"})(g||(g=d()(["\n width: 100%;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis;\n"]))),H=p.ZP.div.withConfig({displayName:"StyledIconWrapper"})(v||(v=d()(["\n margin-left: ",";\n margin-right: -",";\n"])),R.Z.space(-1.7),R.Z.space(-2.1)),F=(0,p.ZP)(D.Z).withConfig({displayName:"StyledButton"})(y||(y=d()(["\n width: 100%;\n margin: 0;\n padding-left: 3px;\n padding-right: 3px;\n"]))),W=a(85893);const B=function(e){var t,n=e.loggedIn,r=e.username,o=e.logout,i=(0,_.useRef)(null),a=(0,_.useState)(!1),s=C()(a,2),c=s[0],u=s[1],l=function(){u(!1)},f=function(){return(0,W.jsx)(N.Z,{referenceElement:i.current,open:c,onClose:l,children:t||(t=(0,W.jsx)(Z.Z,{onClick:o,children:b||(b=(0,W.jsx)(A.Z,{id:"client.user-menu.logout"}))}))})},d=c?"chevron-up":"chevron-down";return(0,W.jsx)(I,{children:n&&(0,W.jsxs)(F,{type:"button",ref:i,onClick:function(){u((function(e){return!e}))},children:[(0,W.jsx)(L,{children:r}),(0,W.jsx)(H,{children:(0,W.jsx)(M.Z,{icon:d})}),c&&(0,W.jsx)(f,{})]})})};var U={logout:function(){return{type:P}}};const z=(0,x.connect)((function(e){return{loggedIn:e.userMenu.loggedIn,username:e.userMenu.username}}),U)((0,w.ZP)(B));var G,q=a(81770),V=(G={},n()(G,E,q.Z.singleTransferReducer("loggedIn")),n()(G,S,q.Z.singleTransferReducer("username")),G),Y={loggedIn:void 0,username:void 0};const $=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y,t=arguments.length>1?arguments[1]:void 0,n=V[t.type];return n?n(e,t):e};var X,K=a(87757),J=a.n(K),Q=a(34857),ee="login/SET_LOGGED_IN",te="login/SET_ADMIN_ALLOWED";X={},n()(X,ee,q.Z.singleTransferReducer("loggedIn")),n()(X,te,q.Z.singleTransferReducer("adminAllowed"));var ne=a(44759),re=a(54159);a(21913),a(27023);function oe(e,t){return re.Z.executeRequest(e,t).then(re.Z.extractBody).catch((function(e){return ne.Z.logError("Failed to execute request",e),{success:!1}}))}const ie=oe;var ae=J().mark(le),se=J().mark(fe),ce=J().mark(de),ue=function(e){return e.input};function le(){return J().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Q.$6)([(0,Q.Fm)(O,fe),(0,Q.Fm)(P,de)]);case 2:case"end":return e.stop()}}),ae)}function fe(){var e,t;return J().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Q.RE)(ie,"username");case 2:if(e=n.sent,"anonymous"!==(t=e.username)){n.next=9;break}return n.next=7,(0,Q.gz)(k(!1));case 7:n.next=13;break;case 9:return n.next=11,(0,Q.gz)(k(!0));case 11:return n.next=13,(0,Q.gz)(j(t));case 13:case"end":return n.stop()}}),se)}function de(){var e,t;return J().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Q.RE)(ie,"logout",{method:"POST"});case 2:return n.next=4,(0,Q.Ys)(ue);case 4:e=n.sent,t=e.logoutRedirectUrl,window.location.href=t||"/";case 7:case"end":return n.stop()}}),ce)}const pe={userMenu:$};var he,me=[le];function ge(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ve(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ge(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ge(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ye="user-menu",be=function(t,n,r,o){l.Z.setInputEnvs(n);var i=he||(he=(0,W.jsx)(z,{})),a=ve(ve({},{width:"120px",height:"40px"}),n),s=e.Z.createStore(pe,me,a,ye),c=e.Z.createApp(ye,i,s,{input:n,events:r,actions:[{type:O}],publicPath:o,textResourceModules:["component","common",ye]});return ve(ve({},c),{},{component:(0,W.jsx)(h,{width:a.width,height:a.height,children:c.component})})},we=function(t){return e.Z.useApp({initApp:be,props:t,packageName:ye}).component};we.propTypes={appContext:c.propTypes.isRequired,logoutRedirectUrl:o().string};var xe=e.Z.createBundleableApp(ye,be,we);e.Z.registerAppInRegistry(xe.name,xe.init)})(),s})()));